From c7baf1773bcac9838cef4ed1e63de4ebffcb88f6 Mon Sep 17 00:00:00 2001 From: tiodot Date: Mon, 8 Jul 2024 11:21:00 +0800 Subject: [PATCH 1/3] Set openApi tags default value as 'other' --- server/node-service/src/plugins/openApi/parse.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/node-service/src/plugins/openApi/parse.ts b/server/node-service/src/plugins/openApi/parse.ts index b785bd5d3..c44c08aa3 100644 --- a/server/node-service/src/plugins/openApi/parse.ts +++ b/server/node-service/src/plugins/openApi/parse.ts @@ -264,7 +264,7 @@ export async function parseOpenApi( return; } - const { tags } = operation; + const { tags = ["other"] } = operation; if (tags) { appendCategories( categories, @@ -288,7 +288,7 @@ export async function parseOpenApi( ); } const action: ActionConfig = { - category: operation.tags || "", + category: tags || "", actionName: operationId, label: actionLabel(httpMethod, path, operation), description: actionDescription(httpMethod, path, operation), From 9e14af4c219e455d2972e6b122d19c8afda10040 Mon Sep 17 00:00:00 2001 From: RAHEEL Date: Mon, 8 Jul 2024 20:05:20 +0500 Subject: [PATCH 2/3] fix infinite loop issue on accessing app view page without permission --- .../lowcoder/src/pages/editor/AppEditor.tsx | 38 +++++++++++++++---- .../redux/reduxActions/applicationActions.ts | 1 + .../src/redux/sagas/applicationSagas.ts | 3 +- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/client/packages/lowcoder/src/pages/editor/AppEditor.tsx b/client/packages/lowcoder/src/pages/editor/AppEditor.tsx index 805c7af18..294367599 100644 --- a/client/packages/lowcoder/src/pages/editor/AppEditor.tsx +++ b/client/packages/lowcoder/src/pages/editor/AppEditor.tsx @@ -1,5 +1,5 @@ import { AppPathParams, AppTypeEnum } from "constants/applicationConstants"; -import { Suspense, lazy, useEffect, useRef, useState } from "react"; +import { Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { useParams } from "react-router"; import { AppSummaryInfo, fetchApplicationInfo } from "redux/reduxActions/applicationActions"; @@ -30,6 +30,7 @@ import EditorSkeletonView from "./editorSkeletonView"; import {ErrorBoundary, FallbackProps} from 'react-error-boundary'; import { ALL_APPLICATIONS_URL } from "@lowcoder-ee/constants/routesURL"; import history from "util/history"; +import Flex from "antd/es/flex"; const AppSnapshot = lazy(() => { return import("pages/editor/appSnapshot") @@ -56,6 +57,7 @@ export default function AppEditor() { const orgId = currentUser.currentOrgId; const firstRendered = useRef(false); const [isDataSourcePluginRegistered, setIsDataSourcePluginRegistered] = useState(false); + const [appError, setAppError] = useState(''); setGlobalSettings({ applicationId, isViewMode: paramViewMode === "view" }); @@ -132,15 +134,37 @@ export default function AppEditor() { setAppInfo(info); fetchJSDataSourceByApp(); }, + onError: (errorMessage) => { + setAppError(errorMessage); + } }) ); }, [viewMode, applicationId, dispatch]); -const fallbackUI = ( -
-

Something went wrong while displaying this webpage

- -
-); + + const fallbackUI = useMemo(() => ( + +

Something went wrong while displaying this webpage

+ +
+ ), []); + + if (Boolean(appError)) { + return ( + +

{appError}

+ +
+ ) + } + return ( {showAppSnapshot ? ( diff --git a/client/packages/lowcoder/src/redux/reduxActions/applicationActions.ts b/client/packages/lowcoder/src/redux/reduxActions/applicationActions.ts index 7619798d6..15a69d7fe 100644 --- a/client/packages/lowcoder/src/redux/reduxActions/applicationActions.ts +++ b/client/packages/lowcoder/src/redux/reduxActions/applicationActions.ts @@ -132,6 +132,7 @@ export type FetchAppInfoPayload = { applicationId: string; type: ApplicationDSLType; onSuccess?: (info: AppSummaryInfo) => void; + onError?: (error: string) => void; }; export const fetchApplicationInfo = (payload: FetchAppInfoPayload) => ({ type: ReduxActionTypes.FETCH_APPLICATION_DETAIL, diff --git a/client/packages/lowcoder/src/redux/sagas/applicationSagas.ts b/client/packages/lowcoder/src/redux/sagas/applicationSagas.ts index e6ea615eb..d5d1b5a31 100644 --- a/client/packages/lowcoder/src/redux/sagas/applicationSagas.ts +++ b/client/packages/lowcoder/src/redux/sagas/applicationSagas.ts @@ -242,7 +242,8 @@ export function* fetchApplicationDetailSaga(action: ReduxAction Date: Mon, 8 Jul 2024 21:20:40 +0200 Subject: [PATCH 3/3] Adding Remote Gantt Chart --- .../lowcoder-design/src/icons/index.ts | 2 + .../src/icons/v2/gantt-chart-l.svg | 1262 +++++++++++++++++ .../src/icons/v2/gantt-chart-m.svg | 5 + .../src/icons/v2/gantt-chart-s.svg | 4 + client/packages/lowcoder/src/comps/index.tsx | 22 +- .../lowcoder/src/comps/uiCompRegistry.ts | 1 + .../packages/lowcoder/src/i18n/locales/en.ts | 4 + .../src/pages/editor/editorConstants.tsx | 4 +- 8 files changed, 1302 insertions(+), 2 deletions(-) create mode 100644 client/packages/lowcoder-design/src/icons/v2/gantt-chart-l.svg create mode 100644 client/packages/lowcoder-design/src/icons/v2/gantt-chart-m.svg create mode 100644 client/packages/lowcoder-design/src/icons/v2/gantt-chart-s.svg diff --git a/client/packages/lowcoder-design/src/icons/index.ts b/client/packages/lowcoder-design/src/icons/index.ts index 18aab7063..27d9428fc 100644 --- a/client/packages/lowcoder-design/src/icons/index.ts +++ b/client/packages/lowcoder-design/src/icons/index.ts @@ -350,6 +350,7 @@ export { ReactComponent as GeoMapLayersCompIconSmall } from "./v2/geomap-layers- export { ReactComponent as HillchartCompIconSmall } from "./v2/hillchart-s.svg"; // new export { ReactComponent as PivotTableCompIconSmall } from "./v2/pivot-table-s.svg"; // new export { ReactComponent as TurnstileCaptchaCompIconSmall } from "./v2/turnstile-captcha-s.svg"; // new +export { ReactComponent as GanttCompIconSmall } from "./v2/gantt-chart-s.svg"; // new // medium @@ -435,6 +436,7 @@ export { ReactComponent as VideoCameraStreamCompIcon } from "./v2/camera-stream- export { ReactComponent as VideoScreenshareCompIcon } from "./v2/screen-share-stream-m.svg"; export { ReactComponent as StepCompIcon } from "./v2/steps-m.svg"; export { ReactComponent as SignatureCompIcon } from "./v2/signature-m.svg"; +export { ReactComponent as GanttCompIcon } from "./v2/gantt-chart-m.svg"; export { ReactComponent as CandlestickChartCompIcon } from "./v2/candlestick-chart-m.svg"; export { ReactComponent as FunnelChartCompIcon } from "./v2/funnel-chart-m.svg"; diff --git a/client/packages/lowcoder-design/src/icons/v2/gantt-chart-l.svg b/client/packages/lowcoder-design/src/icons/v2/gantt-chart-l.svg new file mode 100644 index 000000000..74b64f1e5 --- /dev/null +++ b/client/packages/lowcoder-design/src/icons/v2/gantt-chart-l.svg @@ -0,0 +1,1262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/packages/lowcoder-design/src/icons/v2/gantt-chart-m.svg b/client/packages/lowcoder-design/src/icons/v2/gantt-chart-m.svg new file mode 100644 index 000000000..4d96c8393 --- /dev/null +++ b/client/packages/lowcoder-design/src/icons/v2/gantt-chart-m.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/client/packages/lowcoder-design/src/icons/v2/gantt-chart-s.svg b/client/packages/lowcoder-design/src/icons/v2/gantt-chart-s.svg new file mode 100644 index 000000000..68e130d1a --- /dev/null +++ b/client/packages/lowcoder-design/src/icons/v2/gantt-chart-s.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/packages/lowcoder/src/comps/index.tsx b/client/packages/lowcoder/src/comps/index.tsx index f6db97011..b4bebbc98 100644 --- a/client/packages/lowcoder/src/comps/index.tsx +++ b/client/packages/lowcoder/src/comps/index.tsx @@ -108,7 +108,8 @@ import { HillchartCompIcon, TurnstileCaptchaCompIcon, PivotTableCompIcon, - GraphChartCompIcon + GraphChartCompIcon, + GanttCompIcon, } from "lowcoder-design"; @@ -1225,6 +1226,25 @@ export var uiCompMap: Registry = { // Project Management + ganttChart: { + name: trans("uiComp.ganttChartCompName"), + enName: "ganttChart", + description: trans("uiComp.ganttChartCompDesc"), + categories: ["projectmanagement"], + icon: GanttCompIcon, + keywords: trans("uiComp.ganttChartCompKeywords"), + comp: remoteComp({ + compName: "ganttchart", + packageName: "lowcoder-comp-gantt-chart", + source: "npm", + isRemote: true, + }), + layoutInfo: { + w: 20, + h: 60, + }, + }, + hillchart: { name: trans("uiComp.hillchartCompName"), enName: "Hillchart", diff --git a/client/packages/lowcoder/src/comps/uiCompRegistry.ts b/client/packages/lowcoder/src/comps/uiCompRegistry.ts index 0eba90a19..ff5284118 100644 --- a/client/packages/lowcoder/src/comps/uiCompRegistry.ts +++ b/client/packages/lowcoder/src/comps/uiCompRegistry.ts @@ -161,6 +161,7 @@ export type UICompType = | "themeriverChart" | "basicChart" | "columnLayout" + | "ganttChart" ; diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index 3fb351f91..dff76aa79 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -1222,6 +1222,10 @@ export const en = { "shapeCompDesc": "A collection of geometric shapes for use with diagrams, illustrations, and visualizations.", "shapeCompKeywords": "shapes, geometric, diagrams, illustrations", + "ganttChartCompName" : "Gantt Chart", + "ganttChartCompDesc" : "A chart that illustrates a project schedule, showing the start and finish dates of elements and dependencies.", + "ganttChartCompKeywords" : "gantt chart, project management, schedule", + // by mousheng "colorPickerCompName": "Color Picker", diff --git a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx index c359ff85f..e6b9d43a6 100644 --- a/client/packages/lowcoder/src/pages/editor/editorConstants.tsx +++ b/client/packages/lowcoder/src/pages/editor/editorConstants.tsx @@ -82,6 +82,7 @@ import { ColorPickerCompIconSmall, TransferCompIconSmall, ShapesCompIconSmall, + GanttCompIconSmall, CandlestickChartCompIconSmall, FunnelChartCompIconSmall, @@ -182,8 +183,9 @@ export const CompStateIcon: { treeSelect: , video: , videocomponent: , - + hillchart: , + ganttChart: , openLayersGeoMap: , chartsGeoMap: , bpmnEditor: ,