Skip to content

Commit e3d1e44

Browse files
authored
Merge pull request #598 from lowcoder-org/dev
Dev -> Main - Bugfixes
2 parents 848d786 + cb48221 commit e3d1e44

File tree

40 files changed

+665
-418
lines changed

40 files changed

+665
-418
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.1
1+
dev

client/packages/lowcoder-core/lib/index.js

Lines changed: 113 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,118 @@
11
import _ from 'lodash';
22
import { serialize, compile, middleware, prefixer, stringify } from 'stylis';
33

4-
/******************************************************************************
5-
Copyright (c) Microsoft Corporation.
6-
7-
Permission to use, copy, modify, and/or distribute this software for any
8-
purpose with or without fee is hereby granted.
9-
10-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16-
PERFORMANCE OF THIS SOFTWARE.
17-
***************************************************************************** */
18-
/* global Reflect, Promise, SuppressedError, Symbol */
19-
20-
var extendStatics = function(d, b) {
21-
extendStatics = Object.setPrototypeOf ||
22-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24-
return extendStatics(d, b);
25-
};
26-
27-
function __extends(d, b) {
28-
if (typeof b !== "function" && b !== null)
29-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
30-
extendStatics(d, b);
31-
function __() { this.constructor = d; }
32-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33-
}
34-
35-
var __assign = function() {
36-
__assign = Object.assign || function __assign(t) {
37-
for (var s, i = 1, n = arguments.length; i < n; i++) {
38-
s = arguments[i];
39-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
40-
}
41-
return t;
42-
};
43-
return __assign.apply(this, arguments);
44-
};
45-
46-
function __rest(s, e) {
47-
var t = {};
48-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49-
t[p] = s[p];
50-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
51-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
53-
t[p[i]] = s[p[i]];
54-
}
55-
return t;
56-
}
57-
58-
function __decorate(decorators, target, key, desc) {
59-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
60-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
61-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
62-
return c > 3 && r && Object.defineProperty(target, key, r), r;
63-
}
64-
65-
function __awaiter(thisArg, _arguments, P, generator) {
66-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67-
return new (P || (P = Promise))(function (resolve, reject) {
68-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
69-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
70-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
71-
step((generator = generator.apply(thisArg, _arguments || [])).next());
72-
});
73-
}
74-
75-
function __generator(thisArg, body) {
76-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
77-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
78-
function verb(n) { return function (v) { return step([n, v]); }; }
79-
function step(op) {
80-
if (f) throw new TypeError("Generator is already executing.");
81-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
82-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
83-
if (y = 0, t) op = [op[0] & 2, t.value];
84-
switch (op[0]) {
85-
case 0: case 1: t = op; break;
86-
case 4: _.label++; return { value: op[1], done: false };
87-
case 5: _.label++; y = op[1]; op = [0]; continue;
88-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
89-
default:
90-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
91-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
92-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
93-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
94-
if (t[2]) _.ops.pop();
95-
_.trys.pop(); continue;
96-
}
97-
op = body.call(thisArg, _);
98-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
99-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
100-
}
101-
}
102-
103-
function __spreadArray(to, from, pack) {
104-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
105-
if (ar || !(i in from)) {
106-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
107-
ar[i] = from[i];
108-
}
109-
}
110-
return to.concat(ar || Array.prototype.slice.call(from));
111-
}
112-
113-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
114-
var e = new Error(message);
115-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4+
/******************************************************************************
5+
Copyright (c) Microsoft Corporation.
6+
7+
Permission to use, copy, modify, and/or distribute this software for any
8+
purpose with or without fee is hereby granted.
9+
10+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16+
PERFORMANCE OF THIS SOFTWARE.
17+
***************************************************************************** */
18+
/* global Reflect, Promise, SuppressedError, Symbol */
19+
20+
var extendStatics = function(d, b) {
21+
extendStatics = Object.setPrototypeOf ||
22+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24+
return extendStatics(d, b);
25+
};
26+
27+
function __extends(d, b) {
28+
if (typeof b !== "function" && b !== null)
29+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
30+
extendStatics(d, b);
31+
function __() { this.constructor = d; }
32+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33+
}
34+
35+
var __assign = function() {
36+
__assign = Object.assign || function __assign(t) {
37+
for (var s, i = 1, n = arguments.length; i < n; i++) {
38+
s = arguments[i];
39+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
40+
}
41+
return t;
42+
};
43+
return __assign.apply(this, arguments);
44+
};
45+
46+
function __rest(s, e) {
47+
var t = {};
48+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49+
t[p] = s[p];
50+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
51+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
53+
t[p[i]] = s[p[i]];
54+
}
55+
return t;
56+
}
57+
58+
function __decorate(decorators, target, key, desc) {
59+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
60+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
61+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
62+
return c > 3 && r && Object.defineProperty(target, key, r), r;
63+
}
64+
65+
function __awaiter(thisArg, _arguments, P, generator) {
66+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67+
return new (P || (P = Promise))(function (resolve, reject) {
68+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
69+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
70+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
71+
step((generator = generator.apply(thisArg, _arguments || [])).next());
72+
});
73+
}
74+
75+
function __generator(thisArg, body) {
76+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
77+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
78+
function verb(n) { return function (v) { return step([n, v]); }; }
79+
function step(op) {
80+
if (f) throw new TypeError("Generator is already executing.");
81+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
82+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
83+
if (y = 0, t) op = [op[0] & 2, t.value];
84+
switch (op[0]) {
85+
case 0: case 1: t = op; break;
86+
case 4: _.label++; return { value: op[1], done: false };
87+
case 5: _.label++; y = op[1]; op = [0]; continue;
88+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
89+
default:
90+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
91+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
92+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
93+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
94+
if (t[2]) _.ops.pop();
95+
_.trys.pop(); continue;
96+
}
97+
op = body.call(thisArg, _);
98+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
99+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
100+
}
101+
}
102+
103+
function __spreadArray(to, from, pack) {
104+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
105+
if (ar || !(i in from)) {
106+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
107+
ar[i] = from[i];
108+
}
109+
}
110+
return to.concat(ar || Array.prototype.slice.call(from));
111+
}
112+
113+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
114+
var e = new Error(message);
115+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
116116
};
117117

118118
function isEqualArgs(args, cacheArgs, equals) {
@@ -11400,7 +11400,7 @@ var IntlMessageFormat$1 = /** @class */ (function () {
1140011400
this.ast = message;
1140111401
}
1140211402
if (!Array.isArray(this.ast)) {
11403-
throw new TypeError('A message must be provided as a String or AST.');
11403+
throw new TypeError('A message must be provided as a String or AST. ' + this.ast);
1140411404
}
1140511405
// Creates a new object with the specified `formats` merged with the default
1140611406
// formats.

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

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function CustomModalRender(props: CustomModalProps & ModalFuncProps) {
227227
/>
228228
</ModalHeaderWrapper>
229229

230-
<div style={{ padding: "0 16px", ...props.bodyStyle }}>{props.children}</div>
230+
<div style={{ padding: "0 16px", ...props.styles?.body }}>{props.children}</div>
231231

232232
{props.footer === null || props.footer ? (
233233
props.footer
@@ -280,13 +280,15 @@ CustomModal.confirm = (props: {
280280
...DEFAULT_PROPS,
281281
okText: trans("ok"),
282282
cancelText: trans("cancel"),
283-
bodyStyle: {
284-
fontSize: "14px",
285-
color: "#333333",
286-
lineHeight: "22px",
287-
minHeight: "72px",
288-
marginTop: "24px",
289-
},
283+
styles: {
284+
body: {
285+
fontSize: "14px",
286+
color: "#333333",
287+
lineHeight: "22px",
288+
minHeight: "72px",
289+
marginTop: "24px",
290+
}
291+
}
290292
};
291293
// create model
292294
const model = modalInstance.confirm({
@@ -321,7 +323,12 @@ CustomModal.confirm = (props: {
321323
title={title}
322324
okButtonType={props.confirmBtnType}
323325
okText={props.okText}
324-
bodyStyle={{ ...defaultConfirmProps.bodyStyle, ...props.bodyStyle }}
326+
styles={{
327+
body: {
328+
...defaultConfirmProps.styles?.body,
329+
...props.bodyStyle,
330+
}
331+
}}
325332
footer={props.footer}
326333
width={props.width}
327334
/>

client/packages/lowcoder-design/src/components/Modal/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function Modal(props: ModalProps) {
3232
resizeHandles,
3333
width: modalWidth,
3434
height: modalHeight,
35-
bodyStyle,
35+
styles,
3636
children,
3737
...otherProps
3838
} = props;
@@ -53,7 +53,12 @@ export function Modal(props: ModalProps) {
5353
return (
5454
<AntdModal
5555
width={width ?? modalWidth}
56-
bodyStyle={{ height: height ?? modalHeight, ...bodyStyle }}
56+
styles={{
57+
body: {
58+
height: height ?? modalHeight,
59+
...styles?.body,
60+
}
61+
}}
5762
{...otherProps}
5863
>
5964
<Resizable

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ function ToolTipLabel(
188188
placement="top"
189189
defaultOpen={false}
190190
trigger="hover"
191-
popupVisible={!!title}
192191
style={tooltipStyle}
193192
{...restProps}
194193
>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export const zh = {
2323
validation: "验证",
2424
layout: "布局",
2525
style: "样式",
26+
meetings: "会议",
27+
data: "数据",
2628
},
2729
passwordInput: {
2830
label: "密码:",

client/packages/lowcoder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"agora-rtc-sdk-ng": "^4.19.0",
4141
"agora-rtm-sdk": "^1.5.1",
4242
"ali-oss": "^6.17.1",
43-
"antd": "5.7.2",
43+
"antd": "^5.12.2",
4444
"antd-img-crop": "^4.12.2",
4545
"axios": "^0.21.1",
4646
"buffer": "^6.0.3",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export function resolveParsedValue(files: UploadFile[]) {
210210
.then((a) => {
211211
const ext = mime.getExtension(f.originFileObj?.type ?? "");
212212
if (ext === "xlsx" || ext === "csv") {
213-
const workbook = XLSX.read(a, { raw: true });
213+
const workbook = XLSX.read(a, { raw: true, codepage: 65001 });
214214
return XLSX.utils.sheet_to_json(workbook.Sheets[workbook.SheetNames[0]], {
215215
raw: false,
216216
});

client/packages/lowcoder/src/comps/comps/formComp/createForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ export const CreateForm = (props: { onCreate: CreateHandler }) => {
669669
onCancel={() => setVisible(false)}
670670
width="600px"
671671
children={<CreateFormBody {...props} />}
672-
bodyStyle={{ padding: 0 }}
672+
styles={{ body: {padding: 0} }}
673673
/>
674674
</div>
675675
</>

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,11 @@ let MTComp = (function () {
508508
: {}
509509
}
510510
contentWrapperStyle={{ maxHeight: "100%", maxWidth: "100%" }}
511-
bodyStyle={{
512-
padding: 0,
513-
backgroundColor: props.style.background,
511+
styles={{
512+
body: {
513+
padding: 0,
514+
backgroundColor: props.style.background,
515+
}
514516
}}
515517
closable={false}
516518
placement={props.placement}

client/packages/lowcoder/src/comps/controls/labelControl.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ export const LabelControl = (function () {
178178
}}
179179
placement="top"
180180
color="#2c2c2c"
181-
popupVisible={!!props.tooltip}
182181
getPopupContainer={(node: any) => node.closest(".react-grid-item")}
183182
>
184183
<Label border={!!props.tooltip}>{props.text}</Label>

client/packages/lowcoder/src/comps/controls/slotControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function ModalConfigView(props: {
6565
onCancel={onCancel}
6666
getContainer={() => document.querySelector(`#${CanvasContainerID}`) || document.body}
6767
footer={null}
68-
bodyStyle={{ padding: "0" }}
68+
styles={{ body: {padding: "0"} }}
6969
zIndex={Layers.modal}
7070
modalRender={(node) => (
7171
<ModalStyled $background={background} onClick={() => {}}>

0 commit comments

Comments
 (0)