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/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
- -