Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 763bd98

Browse files
committed
Merge branch 'dev' of github.com:lowcoder-org/lowcoder into feat/myorg-endpoint
2 parents 73a64b4 + d0d3169 commit 763bd98

File tree

18 files changed

+380
-240
lines changed

18 files changed

+380
-240
lines changed

‎client/packages/lowcoder/src/app.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ import GlobalInstances from 'components/GlobalInstances';
6060
import { fetchHomeData, fetchServerSettingsAction } from "./redux/reduxActions/applicationActions";
6161
import { getNpmPackageMeta } from "./comps/utils/remote";
6262
import { packageMetaReadyAction, setLowcoderCompsLoading } from "./redux/reduxActions/npmPluginActions";
63-
import { fetchBrandingSetting } from "./redux/reduxActions/enterpriseActions";
6463
import { EnterpriseProvider } from "./util/context/EnterpriseContext";
6564
import { SimpleSubscriptionContextProvider } from "./util/context/SimpleSubscriptionContext";
6665
import { getBrandingSetting } from "./redux/selectors/enterpriseSelectors";
@@ -137,7 +136,6 @@ type AppIndexProps = {
137136
defaultHomePage: string | null | undefined;
138137
fetchHomeDataFinished: boolean;
139138
fetchConfig: (orgId?: string) => void;
140-
fetchBrandingSetting: (orgId?: string) => void;
141139
fetchHomeData: (currentUserAnonymous?: boolean | undefined) => void;
142140
fetchLowcoderCompVersions: () => void;
143141
getCurrentUser: () => void;
@@ -167,7 +165,6 @@ class AppIndex extends React.Component<AppIndexProps, any> {
167165
if (!this.props.currentUserAnonymous) {
168166
this.props.fetchHomeData(this.props.currentUserAnonymous);
169167
this.props.fetchLowcoderCompVersions();
170-
this.props.fetchBrandingSetting(this.props.currentOrgId);
171168
}
172169
}
173170
}
@@ -521,7 +518,6 @@ const mapDispatchToProps = (dispatch: any) => ({
521518
fetchHomeData: (currentUserAnonymous: boolean | undefined) => {
522519
dispatch(fetchHomeData({}));
523520
},
524-
fetchBrandingSetting: (orgId?: string) => dispatch(fetchBrandingSetting({ orgId, fallbackToGlobal: true })),
525521
fetchLowcoderCompVersions: async () => {
526522
try {
527523
dispatch(setLowcoderCompsLoading(true));

‎client/packages/lowcoder/src/comps/comps/moduleContainerComp/moduleLayoutComp.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ function ModuleLayoutView(props: IProps) {
6565
const defaultGrid = useContext(ThemeContext)?.theme?.gridColumns || "24"; //Added By Aqib Mirza
6666
const { readOnly } = useContext(ExternalEditorContext);
6767

68-
if (readOnly) {
69-
return (
70-
<ModulePreviewWrapper className={CNRootContainer}>{props.containerView}</ModulePreviewWrapper>
71-
);
72-
}
68+
// Removed this so that module load with canvas view and app settings will apply
69+
// if (readOnly) {
70+
// return (
71+
// <ModulePreviewWrapper className={CNRootContainer}>{props.containerView}</ModulePreviewWrapper>
72+
// );
73+
// }
7374

7475
const layout = {
7576
[moduleContainerId]: {

‎client/packages/lowcoder/src/comps/comps/rootComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const RootView = React.memo((props: RootViewProps) => {
8282
localDefaultTheme;
8383

8484
const themeId = selectedTheme ? selectedTheme.id : (
85-
previewTheme ? "preview-theme" : 'default-theme-id'
85+
previewTheme?.previewTheme ? "preview-theme" : 'default-theme-id'
8686
);
8787

8888
useEffect(() => {

‎client/packages/lowcoder/src/comps/comps/tableComp/column/simpleColumnTypeComps.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ import { ToViewReturn } from "@lowcoder-ee/comps/generators/multi";
1616
import { clickEvent, eventHandlerControl, doubleClickEvent } from "comps/controls/eventHandlerControl";
1717
import { migrateOldData } from "@lowcoder-ee/comps/generators/simpleGenerators";
1818
import { useCompClickEventHandler } from "@lowcoder-ee/comps/utils/useCompClickEventHandler";
19+
import { isArray } from "lodash";
1920

2021
export const fixOldActionData = (oldData: any) => {
2122
if (!oldData) return oldData;
22-
if (Boolean(oldData.onClick)) {
23+
if (Boolean(oldData.onClick && !isArray(oldData.onClick))) {
2324
return {
2425
...oldData,
2526
onClick: [{

‎client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { stringExposingStateControl } from "comps/controls/codeStateControl";
1111
import { LabelControl } from "comps/controls/labelControl";
1212
import { InputLikeStyleType, LabelStyleType, heightCalculator, widthCalculator } from "comps/controls/styleControlConstants";
1313
import { Section, sectionNames, ValueFromOption } from "lowcoder-design";
14-
import { fromPairs } from "lodash";
14+
import { debounce, fromPairs } from "lodash";
1515
import { css } from "styled-components";
1616
import { EMAIL_PATTERN, URL_PATTERN } from "util/stringUtils";
1717
import { MultiBaseComp, RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core";
@@ -33,7 +33,7 @@ import {
3333
showDataLoadingIndicatorsPropertyView,
3434
} from "comps/utils/propertyUtils";
3535
import { trans } from "i18n";
36-
import { ChangeEvent, useEffect, useRef, useState } from "react";
36+
import { ChangeEvent, useEffect, useMemo, useRef, useState } from "react";
3737
import { refMethods } from "comps/generators/withMethodExposing";
3838
import { InputRef } from "antd/es/input";
3939
import {
@@ -199,7 +199,6 @@ export const useTextInputProps = (props: RecordConstructorToView<typeof textInpu
199199
},
200200
})
201201
);
202-
propsRef.current.onEvent("change");
203202
changeRef.current = false;
204203
}, [localInputValue]);
205204

@@ -216,19 +215,21 @@ export const useTextInputProps = (props: RecordConstructorToView<typeof textInpu
216215
);
217216
}, [props.customRule])
218217

219-
const onChangeRef = useRef(
220-
(value: string) => {
221-
props.value.onChange(value);
222-
}
218+
const debouncedOnChangeRef = useRef(
219+
debounce(function (value: string, valueCtx: any) {
220+
propsRef.current.value.onChange(value);
221+
propsRef.current.onEvent("change");
222+
}, 1000)
223223
);
224+
224225

225226
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
226227
const value = e.target.value;
227228
setLocalInputValue(value);
228229

229230
changeRef.current = true;
230231
touchRef.current = true;
231-
onChangeRef.current?.(value);
232+
debouncedOnChangeRef.current?.(value, propsRef.current.value);
232233
};
233234

234235
// Cleanup refs on unmount
@@ -237,7 +238,7 @@ export const useTextInputProps = (props: RecordConstructorToView<typeof textInpu
237238
changeRef.current = false;
238239
touchRef.current = false;
239240
propsRef.current = null as any;
240-
onChangeRef.current = null as any;
241+
debouncedOnChangeRef.current.cancel();
241242
};
242243
}, []);
243244

‎client/packages/lowcoder/src/constants/applicationConstants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export interface ApplicationMeta {
8181
title?: string;
8282
description?: string;
8383
image?: string;
84+
icon?: string;
8485
category?: ApplicationCategoriesEnum;
8586
showheader?: boolean;
8687
orgId: string;

‎client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3932,6 +3932,10 @@ export const en = {
39323932
"datasource": "Data Sources",
39333933
"selectDatasourceType": "Select Data Source Type",
39343934
"home": "Home",
3935+
"desc": "Description",
3936+
"renameApp": "Rename app",
3937+
"updateAppName": "Update Application Name",
3938+
"titleUpdateWarning": "The card displays the app title. Changing the app name will not update the card view.",
39353939
"all": "All",
39363940
"app": "App",
39373941
"navigation": "Navigation",

‎client/packages/lowcoder/src/pages/ApplicationV2/HomeLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export function HomeLayout(props: HomeLayoutProps) {
469469
title: e.title,
470470
description: e.description,
471471
category: e.category,
472-
icon: e.image,
472+
icon: e.icon,
473473
type: HomeResTypeEnum[HomeResTypeEnum[e.applicationType] as HomeResKey],
474474
creator: e?.creatorEmail ?? e.createBy,
475475
lastModifyTime: e.lastModifyTime,
@@ -630,7 +630,7 @@ export function HomeLayout(props: HomeLayoutProps) {
630630

631631
<Divider />
632632

633-
<ContentWrapper>
633+
<ContentWrapper>
634634

635635
{isFetching && resList.length === 0 ? (
636636
<SkeletonStyle active paragraph={{ rows: 8, width: 648 }} title={false} />

0 commit comments

Comments
 (0)