Skip to content

Commit 85c0499

Browse files
authored
Merge branch 'dev' into refactor-redirect
2 parents 27019d1 + 14e8dc2 commit 85c0499

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1464
-1025
lines changed

client/packages/lowcoder-design/src/components/Section.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,6 @@ export const sectionNames = {
142142
validation: trans("prop.validation"),
143143
layout: trans("prop.layout"),
144144
style: trans("prop.style"),
145+
data: trans("prop.data"),
145146
meetings : trans("prop.meetings"), // added by Falk Wolsky
146147
};

client/packages/lowcoder-design/src/i18n/design/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const en = {
2424
layout: "Layout",
2525
style: "Style",
2626
meetings : "Meeting Settings",
27+
data: "Data",
2728
},
2829
passwordInput: {
2930
label: "Password:",
Lines changed: 20 additions & 0 deletions
Loading

client/packages/lowcoder-design/src/icons/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export { ReactComponent as WarningWhiteIcon } from "./icon-warning-white.svg";
6464
export { ReactComponent as WarningIcon } from "./icon-warning.svg";
6565
export { ReactComponent as WidthDragIcon } from "./icon-widthDrag.svg";
6666
export { ReactComponent as ManyCheckboxIcon } from "./manyCheckbox.svg";
67+
export { ReactComponent as Layout } from "./icon-ShowLayout.svg";
6768
export { ReactComponent as Left } from "./icon-ShowLeft.svg";
6869
export { ReactComponent as Middle } from "./icon-ShowMiddle.svg";
6970
export { ReactComponent as Right } from "./icon-ShowRight.svg";

client/packages/lowcoder/index.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<meta
6-
name="viewport"
7-
content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no viewport-fit=cover"
8-
/>
9-
<meta
10-
lang="en"
11-
name="description"
12-
content="A developer-friendly open-source low code platform to build internal apps within minutes."
13-
/>
5+
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no viewport-fit=cover"/>
6+
<meta lang="en" name="description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
147
<meta name="theme-color" content="#000000" />
8+
<meta property="iframely:title" content="Lowcoder" />
9+
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
1510
<style>
1611
html,
1712
body {

client/packages/lowcoder/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
"ua-parser-js": "^1.0.33",
105105
"uuid": "^9.0.0",
106106
"web-vitals": "^2.1.0",
107-
"weixin-js-sdk": "^1.6.0",
108107
"xlsx": "^0.18.5"
109108
},
110109
"scripts": {

client/packages/lowcoder/src/app-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ declare var REACT_APP_BUNDLE_TYPE: "sdk" | "app";
4242
declare var REACT_APP_DISABLE_JS_SANDBOX: string;
4343
declare var REACT_APP_BUNDLE_BUILTIN_PLUGIN: string;
4444

45-
declare module "weixin-js-sdk";
45+
// declare module "weixin-js-sdk";

client/packages/lowcoder/src/comps/comps/buttonComp/buttonComp.tsx

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import {
2424
} from "./buttonCompConstants";
2525
import { RefControl } from "comps/controls/refControl";
2626

27+
import React, { useContext } from "react";
28+
2729
const FormLabel = styled(CommonBlueLabel)`
2830
font-size: 13px;
2931
margin-right: 4px;
@@ -161,24 +163,30 @@ const ButtonTmpComp = (function () {
161163
{children.text.propertyView({ label: trans("text") })}
162164
</Section>
163165

164-
<Section name={sectionNames.interaction}>
165-
{children.type.propertyView({ label: trans("prop.type"), radioButton: true })}
166-
{isDefault(children.type.getView())
167-
? [
166+
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
167+
<><Section name={sectionNames.interaction}>
168+
{children.type.propertyView({ label: trans("prop.type"), radioButton: true })}
169+
{isDefault(children.type.getView())
170+
? [
168171
children.onEvent.getPropertyView(),
169172
disabledPropertyView(children),
173+
hiddenPropertyView(children),
170174
loadingPropertyView(children),
171175
]
172-
: children.form.getPropertyView()}
173-
</Section>
174-
175-
<Section name={sectionNames.layout}>
176-
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
177-
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
178-
{hiddenPropertyView(children)}
179-
</Section>
176+
: children.form.getPropertyView()}
177+
</Section>
178+
</>
179+
)}
180180

181-
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
181+
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
182+
<>
183+
<Section name={sectionNames.layout}>
184+
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
185+
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
186+
</Section>
187+
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
188+
</>
189+
)}
182190
</>
183191
))
184192
.setExposeMethodConfigs(buttonRefMethods)

client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { UICompBuilder } from "comps/generators/uiCompBuilder";
77
import { disabledPropertyView, hiddenPropertyView } from "comps/utils/propertyUtils";
88
import { Section, sectionNames } from "lowcoder-design";
99
import { trans } from "i18n";
10-
import React, { ReactElement } from "react";
10+
import React, { ReactElement, useContext } from "react";
11+
import { EditorContext } from "comps/editorState";
1112
import styled from "styled-components";
1213
import { ButtonEventHandlerControl } from "../../controls/eventHandlerControl";
1314
import { DropdownOptionControl } from "../../controls/optionsControl";
@@ -19,16 +20,16 @@ import {
1920
getButtonStyle,
2021
} from "./buttonCompConstants";
2122

23+
2224
const DropdownButton = styled(Dropdown.Button)`
2325
width: 100%;
24-
2526
.ant-btn-group {
2627
width: 100%;
2728
}
2829
`;
2930

3031
const LeftButtonWrapper = styled.div<{ $buttonStyle: ButtonStyleType }>`
31-
width: calc(100% - 32px);
32+
width: calc(100%);
3233
${(props) => `margin: ${props.$buttonStyle.margin};`}
3334
margin-right: 0;
3435
.ant-btn {
@@ -66,7 +67,7 @@ const DropdownTmpComp = (function () {
6667
options: DropdownOptionControl,
6768
disabled: BoolCodeControl,
6869
onEvent: ButtonEventHandlerControl,
69-
style: withDefault(ButtonStyleControl, { background: "#FFFFFF" }),
70+
style: ButtonStyleControl,
7071
};
7172
return new UICompBuilder(childrenMap, (props) => {
7273
const hasIcon =
@@ -92,7 +93,6 @@ const DropdownTmpComp = (function () {
9293

9394
return (
9495
<ButtonCompWrapper disabled={props.disabled}>
95-
{console.log("props,", props)}
9696
{props.onlyMenu ? (
9797
<Dropdown
9898
disabled={props.disabled}
@@ -131,18 +131,26 @@ const DropdownTmpComp = (function () {
131131
<>
132132
<Section name={sectionNames.basic}>
133133
{children.options.propertyView({})}
134-
{children.text.propertyView({ label: trans("text") })}
135-
{children.onlyMenu.propertyView({ label: trans("dropdown.onlyMenu") })}
136-
</Section>
137-
138-
<Section name={sectionNames.interaction}>
139-
{disabledPropertyView(children)}
140-
{!children.onlyMenu.getView() && children.onEvent.getPropertyView()}
141134
</Section>
142135

143-
<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
136+
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
137+
<><Section name={sectionNames.interaction}>
138+
{!children.onlyMenu.getView() && children.onEvent.getPropertyView()}
139+
{disabledPropertyView(children)}
140+
{hiddenPropertyView(children)}
141+
</Section>
142+
</>
143+
)}
144144

145-
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
145+
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
146+
<>
147+
<Section name={sectionNames.layout}>
148+
{children.text.propertyView({ label: trans("label") })}
149+
{children.onlyMenu.propertyView({ label: trans("dropdown.onlyMenu") })}
150+
</Section>
151+
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
152+
</>
153+
)}
146154
</>
147155
))
148156
.build();

client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ import { IconControl } from "comps/controls/iconControl";
2020
import { hasIcon } from "comps/utils";
2121
import { RefControl } from "comps/controls/refControl";
2222

23+
import { EditorContext } from "comps/editorState";
24+
import React, { useContext } from "react";
25+
2326
const Link = styled(Button)<{ $style: LinkStyleType }>`
24-
${(props) => `color: ${props.$style.text};margin: ${props.$style.margin}; padding: ${props.$style.padding};`}
27+
${(props) => `color: ${props.$style.text}; margin: ${props.$style.margin}; padding: ${props.$style.padding};`}
2528
&.ant-btn {
2629
display: inline-flex;
2730
align-items: center;
@@ -93,19 +96,22 @@ const LinkTmpComp = (function () {
9396
{children.text.propertyView({ label: trans("text") })}
9497
</Section>
9598

96-
<Section name={sectionNames.interaction}>
97-
{children.onEvent.getPropertyView()}
98-
{disabledPropertyView(children)}
99-
{loadingPropertyView(children)}
100-
</Section>
101-
102-
<Section name={sectionNames.layout}>
103-
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
104-
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
105-
{hiddenPropertyView(children)}
106-
</Section>
99+
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
100+
<><Section name={sectionNames.interaction}>
101+
{children.onEvent.getPropertyView()}
102+
{disabledPropertyView(children)}
103+
{hiddenPropertyView(children)}
104+
{loadingPropertyView(children)}
105+
</Section>
106+
<Section name={sectionNames.advanced}>
107+
{children.prefixIcon.propertyView({ label: trans("button.prefixIcon") })}
108+
{children.suffixIcon.propertyView({ label: trans("button.suffixIcon") })}
109+
</Section></>
110+
)}
107111

108-
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
112+
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
113+
<><Section name={sectionNames.style}>{children.style.getPropertyView()}</Section></>
114+
)}
109115
</>
110116
);
111117
})

client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ import styled from "styled-components";
1515
import { CommonNameConfig, NameConfig, withExposingConfigs } from "../../generators/withExposing";
1616
import { hiddenPropertyView, disabledPropertyView } from "comps/utils/propertyUtils";
1717
import { trans } from "i18n";
18-
import React, { Suspense, useEffect, useRef, useState } from "react";
18+
import React, { Suspense, useEffect, useRef, useState, useContext } from "react";
1919
import { arrayStringExposingStateControl } from "comps/controls/codeStateControl";
2020
import { BoolControl } from "comps/controls/boolControl";
2121
import { ItemType } from "antd/lib/menu/hooks/useItems";
2222
import { RefControl } from "comps/controls/refControl";
23+
import { EditorContext } from "comps/editorState";
2324

2425
const Error = styled.div`
2526
color: #f5222d;
@@ -212,20 +213,26 @@ const ScannerTmpComp = (function () {
212213
<>
213214
<Section name={sectionNames.basic}>
214215
{children.text.propertyView({ label: trans("text") })}
215-
{children.continuous.propertyView({ label: trans("scanner.continuous") })}
216-
{children.continuous.getView() &&
217-
children.uniqueData.propertyView({ label: trans("scanner.uniqueData") })}
218-
{children.maskClosable.propertyView({ label: trans("scanner.maskClosable") })}
219-
</Section>
220-
221-
<Section name={sectionNames.interaction}>
222-
{children.onEvent.getPropertyView()}
223-
{disabledPropertyView(children)}
224216
</Section>
225217

226-
<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
218+
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
219+
<><Section name={sectionNames.interaction}>
220+
{children.onEvent.getPropertyView()}
221+
{disabledPropertyView(children)}
222+
{hiddenPropertyView(children)}
223+
</Section>
224+
<Section name={sectionNames.advanced}>
225+
{children.continuous.propertyView({ label: trans("scanner.continuous") })}
226+
{children.continuous.getView() &&
227+
children.uniqueData.propertyView({ label: trans("scanner.uniqueData") })}
228+
{children.maskClosable.propertyView({ label: trans("scanner.maskClosable") })}
229+
</Section>
230+
</>
231+
)}
227232

228-
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
233+
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
234+
<><Section name={sectionNames.style}>{children.style.getPropertyView()}</Section></>
235+
)}
229236
</>
230237
);
231238
})

client/packages/lowcoder/src/comps/comps/buttonComp/toggleButtonComp.tsx

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { ToggleButtonStyle } from "comps/controls/styleControlConstants";
1919
import { styleControl } from "comps/controls/styleControl";
2020
import { BoolControl } from "comps/controls/boolControl";
2121
import { RefControl } from "comps/controls/refControl";
22+
import React, { useContext } from "react";
23+
import { EditorContext } from "comps/editorState";
2224

2325
const IconWrapper = styled.div`
2426
display: flex;
@@ -90,38 +92,43 @@ const ToggleTmpComp = (function () {
9092
label: trans("prop.defaultValue"),
9193
tooltip: trans("toggleButton.valueDesc"),
9294
})}
93-
{children.showText.propertyView({ label: trans("toggleButton.showText") })}
94-
{children.showText.getView() &&
95-
children.trueText.propertyView({ label: trans("toggleButton.trueLabel") })}
96-
{children.showText.getView() &&
97-
children.falseText.propertyView({ label: trans("toggleButton.falseLabel") })}
9895
</Section>
9996

100-
<Section name={sectionNames.interaction}>
101-
{children.onEvent.getPropertyView()}
102-
{disabledPropertyView(children)}
103-
{loadingPropertyView(children)}
104-
</Section>
97+
{(useContext(EditorContext).editorModeStatus === "logic" || useContext(EditorContext).editorModeStatus === "both") && (
98+
<><Section name={sectionNames.interaction}>
99+
{children.onEvent.getPropertyView()}
100+
{disabledPropertyView(children)}
101+
{hiddenPropertyView(children)}
102+
{loadingPropertyView(children)}
103+
</Section>
104+
<Section name={sectionNames.advanced}>
105+
{children.showText.propertyView({ label: trans("toggleButton.showText") })}
106+
{children.showText.getView() &&
107+
children.trueText.propertyView({ label: trans("toggleButton.trueLabel") })}
108+
{children.showText.getView() &&
109+
children.falseText.propertyView({ label: trans("toggleButton.falseLabel") })}
110+
{children.trueIcon.propertyView({ label: trans("toggleButton.trueIconLabel") })}
111+
{children.falseIcon.propertyView({ label: trans("toggleButton.falseIconLabel") })}
112+
{children.showText.getView() &&
113+
children.iconPosition.propertyView({
114+
label: trans("toggleButton.iconPosition"),
115+
radioButton: true,
116+
})}
117+
{children.alignment.propertyView({
118+
label: trans("toggleButton.alignment"),
119+
radioButton: true,
120+
})}
121+
</Section>
122+
</>
123+
)}
105124

106-
<Section name={sectionNames.layout}>
107-
{children.trueIcon.propertyView({ label: trans("toggleButton.trueIconLabel") })}
108-
{children.falseIcon.propertyView({ label: trans("toggleButton.falseIconLabel") })}
109-
{children.showText.getView() &&
110-
children.iconPosition.propertyView({
111-
label: trans("toggleButton.iconPosition"),
112-
radioButton: true,
113-
})}
114-
{children.alignment.propertyView({
115-
label: trans("toggleButton.alignment"),
116-
radioButton: true,
117-
})}
118-
{hiddenPropertyView(children)}
119-
</Section>
125+
{(useContext(EditorContext).editorModeStatus === "layout" || useContext(EditorContext).editorModeStatus === "both") && (
126+
<><Section name={sectionNames.style}>
127+
{children.showBorder.propertyView({ label: trans("toggleButton.showBorder") })}
128+
{children.style.getPropertyView()}
129+
</Section></>
130+
)}
120131

121-
<Section name={sectionNames.style}>
122-
{children.showBorder.propertyView({ label: trans("toggleButton.showBorder") })}
123-
{children.style.getPropertyView()}
124-
</Section>
125132
</>
126133
))
127134
.setExposeMethodConfigs(buttonRefMethods)

0 commit comments

Comments
 (0)