Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev > Main - Bugfixes - preparation for v2.4.3 #1024

Merged
merged 5 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/packages/lowcoder-design/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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";
Expand Down
1,262 changes: 1,262 additions & 0 deletions client/packages/lowcoder-design/src/icons/v2/gantt-chart-l.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion client/packages/lowcoder/src/comps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ import {
HillchartCompIcon,
TurnstileCaptchaCompIcon,
PivotTableCompIcon,
GraphChartCompIcon
GraphChartCompIcon,
GanttCompIcon,

} from "lowcoder-design";

Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/comps/uiCompRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export type UICompType =
| "themeriverChart"
| "basicChart"
| "columnLayout"
| "ganttChart"
;


Expand Down
4 changes: 4 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions client/packages/lowcoder/src/pages/ApplicationV2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ export default function ApplicationHome() {

const isOrgAdmin = org?.createdBy == user.id ? true : false;

// useEffect(() => {
// dispatch(fetchHomeData({}));
// }, [user.currentOrgId]);
useEffect(() => {
dispatch(fetchHomeData({}));
}, [user.currentOrgId]);

useEffect(() => {
if (!org) {
Expand Down
38 changes: 31 additions & 7 deletions client/packages/lowcoder/src/pages/editor/AppEditor.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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")
Expand All @@ -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" });

Expand Down Expand Up @@ -132,15 +134,37 @@ export default function AppEditor() {
setAppInfo(info);
fetchJSDataSourceByApp();
},
onError: (errorMessage) => {
setAppError(errorMessage);
}
})
);
}, [viewMode, applicationId, dispatch]);
const fallbackUI = (
<div style={{display:'flex', height:'100%', width:'100%', alignItems:'center',justifyContent:'center', gap:'8px',marginTop:'10px'}}>
<p style={{margin:0}}>Something went wrong while displaying this webpage</p>
<button onClick={() => history.push(ALL_APPLICATIONS_URL)} style={{background: '#4965f2',border: '1px solid #4965f2', color: '#ffffff',borderRadius:'6px'}}>Go to Apps</button>
</div>
);

const fallbackUI = useMemo(() => (
<Flex align="center" justify="center" vertical style={{
height: '300px',
width: '400px',
margin: '0 auto',
}}>
<h4 style={{margin: 0}}>Something went wrong while displaying this webpage</h4>
<button onClick={() => history.push(ALL_APPLICATIONS_URL)} style={{background: '#4965f2',border: '1px solid #4965f2', color: '#ffffff',borderRadius:'6px'}}>Go to Apps</button>
</Flex>
), []);

if (Boolean(appError)) {
return (
<Flex align="center" justify="center" vertical style={{
height: '300px',
width: '400px',
margin: '0 auto',
}}>
<h4>{appError}</h4>
<button onClick={() => history.push(ALL_APPLICATIONS_URL)} style={{background: '#4965f2',border: '1px solid #4965f2', color: '#ffffff',borderRadius:'6px'}}>Back to Home</button>
</Flex>
)
}

return (
<ErrorBoundary fallback={fallbackUI}>
{showAppSnapshot ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import {
ColorPickerCompIconSmall,
TransferCompIconSmall,
ShapesCompIconSmall,
GanttCompIconSmall,

CandlestickChartCompIconSmall,
FunnelChartCompIconSmall,
Expand Down Expand Up @@ -182,8 +183,9 @@ export const CompStateIcon: {
treeSelect: <TreeSelectCompIconSmall />,
video: <VideoCompIconSmall />,
videocomponent: <VideoCameraStreamCompIconSmall />,

hillchart: <HillchartCompIconSmall/>,
ganttChart: <GanttCompIconSmall/>,
openLayersGeoMap: <GeoMapLayersCompIconSmall/>,
chartsGeoMap: <GeoMapChartsCompIconSmall/>,
bpmnEditor: <BPMNEditorCompIconSmall/>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion client/packages/lowcoder/src/redux/sagas/applicationSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ export function* fetchApplicationDetailSaga(action: ReduxAction<FetchAppInfoPayl
return;
} else if (!isValidResponse) {
if (response.data.code === SERVER_ERROR_CODES.NO_PERMISSION_TO_REQUEST_APP) {
history.push(BASE_URL);
// history.push(BASE_URL);
action.payload.onError?.(response.data.message);
}
throw Error(response.data.message);
}
Expand Down
4 changes: 2 additions & 2 deletions server/node-service/src/plugins/openApi/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export async function parseOpenApi(
return;
}

const { tags } = operation;
const { tags = ["other"] } = operation;
if (tags) {
appendCategories(
categories,
Expand All @@ -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),
Expand Down
Loading