@plasmicpkgs/antd5 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/antd.esm.js +570 -394
- package/dist/antd.esm.js.map +1 -1
- package/dist/index.js +569 -392
- package/dist/registerUpload.d.ts +19 -0
- package/package.json +3 -3
- package/skinny/registerButton.js +2 -1
- package/skinny/registerUpload.d.ts +19 -0
- package/skinny/registerUpload.js +189 -0
- package/skinny/registerUpload.js.map +1 -0
package/dist/antd.esm.js
CHANGED
|
@@ -19,14 +19,15 @@ import FormItem from 'antd/es/form/FormItem';
|
|
|
19
19
|
import FormList from 'antd/es/form/FormList';
|
|
20
20
|
import equal from 'fast-deep-equal';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
|
+
import Input from 'antd/es/input';
|
|
23
|
+
import InputNumber from 'antd/es/input-number';
|
|
22
24
|
import Modal from 'antd/es/modal';
|
|
23
25
|
import Radio from 'antd/es/radio';
|
|
24
26
|
import RadioGroup from 'antd/es/radio/group';
|
|
25
27
|
import 'antd/es/radio/radioButton';
|
|
26
28
|
import Select from 'antd/es/select';
|
|
27
29
|
import Table from 'antd/es/table';
|
|
28
|
-
import
|
|
29
|
-
import InputNumber from 'antd/es/input-number';
|
|
30
|
+
import Upload from 'antd/es/upload';
|
|
30
31
|
|
|
31
32
|
function makeRegisterGlobalContext(component, meta) {
|
|
32
33
|
return function(loader) {
|
|
@@ -149,7 +150,8 @@ function registerButton(loader) {
|
|
|
149
150
|
},
|
|
150
151
|
icon: {
|
|
151
152
|
type: "slot",
|
|
152
|
-
hidePlaceholder: true
|
|
153
|
+
hidePlaceholder: true,
|
|
154
|
+
hidden: () => true
|
|
153
155
|
},
|
|
154
156
|
onClick: {
|
|
155
157
|
type: "eventHandler",
|
|
@@ -161,39 +163,39 @@ function registerButton(loader) {
|
|
|
161
163
|
});
|
|
162
164
|
}
|
|
163
165
|
|
|
164
|
-
var __defProp$
|
|
165
|
-
var __defProps$
|
|
166
|
-
var __getOwnPropDescs$
|
|
167
|
-
var __getOwnPropSymbols$
|
|
168
|
-
var __hasOwnProp$
|
|
169
|
-
var __propIsEnum$
|
|
170
|
-
var __defNormalProp$
|
|
171
|
-
var __spreadValues$
|
|
166
|
+
var __defProp$a = Object.defineProperty;
|
|
167
|
+
var __defProps$8 = Object.defineProperties;
|
|
168
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
169
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
170
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
171
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
172
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
173
|
+
var __spreadValues$a = (a, b) => {
|
|
172
174
|
for (var prop in b || (b = {}))
|
|
173
|
-
if (__hasOwnProp$
|
|
174
|
-
__defNormalProp$
|
|
175
|
-
if (__getOwnPropSymbols$
|
|
176
|
-
for (var prop of __getOwnPropSymbols$
|
|
177
|
-
if (__propIsEnum$
|
|
178
|
-
__defNormalProp$
|
|
175
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
176
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
177
|
+
if (__getOwnPropSymbols$a)
|
|
178
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
179
|
+
if (__propIsEnum$a.call(b, prop))
|
|
180
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
179
181
|
}
|
|
180
182
|
return a;
|
|
181
183
|
};
|
|
182
|
-
var __spreadProps$
|
|
183
|
-
var __objRest$
|
|
184
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
185
|
+
var __objRest$8 = (source, exclude) => {
|
|
184
186
|
var target = {};
|
|
185
187
|
for (var prop in source)
|
|
186
|
-
if (__hasOwnProp$
|
|
188
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
187
189
|
target[prop] = source[prop];
|
|
188
|
-
if (source != null && __getOwnPropSymbols$
|
|
189
|
-
for (var prop of __getOwnPropSymbols$
|
|
190
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
190
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
191
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
192
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
191
193
|
target[prop] = source[prop];
|
|
192
194
|
}
|
|
193
195
|
return target;
|
|
194
196
|
};
|
|
195
197
|
function AntdCheckbox(props) {
|
|
196
|
-
const _a = props, { onChange } = _a, rest = __objRest$
|
|
198
|
+
const _a = props, { onChange } = _a, rest = __objRest$8(_a, ["onChange"]);
|
|
197
199
|
const wrappedOnChange = React.useMemo(() => {
|
|
198
200
|
if (onChange) {
|
|
199
201
|
return (event) => onChange(event.target.checked);
|
|
@@ -201,7 +203,7 @@ function AntdCheckbox(props) {
|
|
|
201
203
|
return void 0;
|
|
202
204
|
}
|
|
203
205
|
}, [onChange]);
|
|
204
|
-
return /* @__PURE__ */ React.createElement(Checkbox, __spreadProps$
|
|
206
|
+
return /* @__PURE__ */ React.createElement(Checkbox, __spreadProps$8(__spreadValues$a({}, rest), {
|
|
205
207
|
onChange: wrappedOnChange
|
|
206
208
|
}));
|
|
207
209
|
}
|
|
@@ -312,33 +314,33 @@ function registerCheckbox(loader) {
|
|
|
312
314
|
});
|
|
313
315
|
}
|
|
314
316
|
|
|
315
|
-
var __defProp$
|
|
316
|
-
var __defProps$
|
|
317
|
-
var __getOwnPropDescs$
|
|
318
|
-
var __getOwnPropSymbols$
|
|
319
|
-
var __hasOwnProp$
|
|
320
|
-
var __propIsEnum$
|
|
321
|
-
var __defNormalProp$
|
|
322
|
-
var __spreadValues$
|
|
317
|
+
var __defProp$9 = Object.defineProperty;
|
|
318
|
+
var __defProps$7 = Object.defineProperties;
|
|
319
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
320
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
321
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
322
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
323
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
324
|
+
var __spreadValues$9 = (a, b) => {
|
|
323
325
|
for (var prop in b || (b = {}))
|
|
324
|
-
if (__hasOwnProp$
|
|
325
|
-
__defNormalProp$
|
|
326
|
-
if (__getOwnPropSymbols$
|
|
327
|
-
for (var prop of __getOwnPropSymbols$
|
|
328
|
-
if (__propIsEnum$
|
|
329
|
-
__defNormalProp$
|
|
326
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
327
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
328
|
+
if (__getOwnPropSymbols$9)
|
|
329
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
330
|
+
if (__propIsEnum$9.call(b, prop))
|
|
331
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
330
332
|
}
|
|
331
333
|
return a;
|
|
332
334
|
};
|
|
333
|
-
var __spreadProps$
|
|
334
|
-
var __objRest$
|
|
335
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
336
|
+
var __objRest$7 = (source, exclude) => {
|
|
335
337
|
var target = {};
|
|
336
338
|
for (var prop in source)
|
|
337
|
-
if (__hasOwnProp$
|
|
339
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
338
340
|
target[prop] = source[prop];
|
|
339
|
-
if (source != null && __getOwnPropSymbols$
|
|
340
|
-
for (var prop of __getOwnPropSymbols$
|
|
341
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
341
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
342
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
343
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
342
344
|
target[prop] = source[prop];
|
|
343
345
|
}
|
|
344
346
|
return target;
|
|
@@ -380,10 +382,10 @@ function themeToAntdConfig(opts) {
|
|
|
380
382
|
};
|
|
381
383
|
}
|
|
382
384
|
function AntdConfigProvider(props) {
|
|
383
|
-
const _a = props, { children, themeStyles } = _a, rest = __objRest$
|
|
384
|
-
return /* @__PURE__ */ React.createElement(ConfigProvider, __spreadValues$
|
|
385
|
+
const _a = props, { children, themeStyles } = _a, rest = __objRest$7(_a, ["children", "themeStyles"]);
|
|
386
|
+
return /* @__PURE__ */ React.createElement(ConfigProvider, __spreadValues$9({
|
|
385
387
|
locale: enUS
|
|
386
|
-
}, themeToAntdConfig(__spreadProps$
|
|
388
|
+
}, themeToAntdConfig(__spreadProps$7(__spreadValues$9({}, rest), {
|
|
387
389
|
fontFamily: themeStyles.fontFamily,
|
|
388
390
|
fontSize: themeStyles.fontSize ? parseInt(themeStyles.fontSize) : void 0,
|
|
389
391
|
lineHeight: themeStyles.lineHeight ? parseInt(themeStyles.lineHeight) : void 0,
|
|
@@ -412,8 +414,8 @@ function InnerConfigProvider(props) {
|
|
|
412
414
|
const actions = React.useMemo(() => ({
|
|
413
415
|
showNotification: (opts) => {
|
|
414
416
|
var _b;
|
|
415
|
-
const _a = opts, rest = __objRest$
|
|
416
|
-
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$
|
|
417
|
+
const _a = opts, rest = __objRest$7(_a, ["type"]);
|
|
418
|
+
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$9({}, rest));
|
|
417
419
|
},
|
|
418
420
|
hideNotifications: () => {
|
|
419
421
|
app.notification.destroy();
|
|
@@ -621,7 +623,7 @@ function registerTokens(loader) {
|
|
|
621
623
|
regs.forEach((t) => registerToken(t));
|
|
622
624
|
}
|
|
623
625
|
}
|
|
624
|
-
const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __spreadProps$
|
|
626
|
+
const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __spreadProps$7(__spreadValues$9({
|
|
625
627
|
name: "plasmic-antd5-config-provider",
|
|
626
628
|
displayName: "Ant Design System Settings",
|
|
627
629
|
props: {
|
|
@@ -722,40 +724,40 @@ const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __s
|
|
|
722
724
|
importName: "AntdConfigProvider"
|
|
723
725
|
}));
|
|
724
726
|
|
|
725
|
-
var __defProp$
|
|
726
|
-
var __defProps$
|
|
727
|
-
var __getOwnPropDescs$
|
|
728
|
-
var __getOwnPropSymbols$
|
|
729
|
-
var __hasOwnProp$
|
|
730
|
-
var __propIsEnum$
|
|
731
|
-
var __defNormalProp$
|
|
732
|
-
var __spreadValues$
|
|
727
|
+
var __defProp$8 = Object.defineProperty;
|
|
728
|
+
var __defProps$6 = Object.defineProperties;
|
|
729
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
730
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
731
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
732
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
733
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
734
|
+
var __spreadValues$8 = (a, b) => {
|
|
733
735
|
for (var prop in b || (b = {}))
|
|
734
|
-
if (__hasOwnProp$
|
|
735
|
-
__defNormalProp$
|
|
736
|
-
if (__getOwnPropSymbols$
|
|
737
|
-
for (var prop of __getOwnPropSymbols$
|
|
738
|
-
if (__propIsEnum$
|
|
739
|
-
__defNormalProp$
|
|
736
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
737
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
738
|
+
if (__getOwnPropSymbols$8)
|
|
739
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
740
|
+
if (__propIsEnum$8.call(b, prop))
|
|
741
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
740
742
|
}
|
|
741
743
|
return a;
|
|
742
744
|
};
|
|
743
|
-
var __spreadProps$
|
|
744
|
-
var __objRest$
|
|
745
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
746
|
+
var __objRest$6 = (source, exclude) => {
|
|
745
747
|
var target = {};
|
|
746
748
|
for (var prop in source)
|
|
747
|
-
if (__hasOwnProp$
|
|
749
|
+
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
748
750
|
target[prop] = source[prop];
|
|
749
|
-
if (source != null && __getOwnPropSymbols$
|
|
750
|
-
for (var prop of __getOwnPropSymbols$
|
|
751
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
751
|
+
if (source != null && __getOwnPropSymbols$8)
|
|
752
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
753
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
|
|
752
754
|
target[prop] = source[prop];
|
|
753
755
|
}
|
|
754
756
|
return target;
|
|
755
757
|
};
|
|
756
758
|
function AntdDropdown(props) {
|
|
757
|
-
const _a = props, { children, onAction, menuItems } = _a, rest = __objRest$
|
|
758
|
-
return /* @__PURE__ */ React.createElement(Dropdown, __spreadProps$
|
|
759
|
+
const _a = props, { children, onAction, menuItems } = _a, rest = __objRest$6(_a, ["children", "onAction", "menuItems"]);
|
|
760
|
+
return /* @__PURE__ */ React.createElement(Dropdown, __spreadProps$6(__spreadValues$8({}, rest), {
|
|
759
761
|
overlay: () => {
|
|
760
762
|
var _a2;
|
|
761
763
|
const items = (_a2 = menuItems == null ? void 0 : menuItems()) != null ? _a2 : [];
|
|
@@ -859,19 +861,19 @@ function registerDropdown(loader) {
|
|
|
859
861
|
});
|
|
860
862
|
}
|
|
861
863
|
|
|
862
|
-
var __defProp$
|
|
863
|
-
var __getOwnPropSymbols$
|
|
864
|
-
var __hasOwnProp$
|
|
865
|
-
var __propIsEnum$
|
|
866
|
-
var __defNormalProp$
|
|
867
|
-
var __spreadValues$
|
|
864
|
+
var __defProp$7 = Object.defineProperty;
|
|
865
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
866
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
867
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
868
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
869
|
+
var __spreadValues$7 = (a, b) => {
|
|
868
870
|
for (var prop in b || (b = {}))
|
|
869
|
-
if (__hasOwnProp$
|
|
870
|
-
__defNormalProp$
|
|
871
|
-
if (__getOwnPropSymbols$
|
|
872
|
-
for (var prop of __getOwnPropSymbols$
|
|
873
|
-
if (__propIsEnum$
|
|
874
|
-
__defNormalProp$
|
|
871
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
872
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
873
|
+
if (__getOwnPropSymbols$7)
|
|
874
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
875
|
+
if (__propIsEnum$7.call(b, prop))
|
|
876
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
875
877
|
}
|
|
876
878
|
return a;
|
|
877
879
|
};
|
|
@@ -882,7 +884,7 @@ function mergeProps(props, ...restProps) {
|
|
|
882
884
|
if (restProps.every((rest) => Object.keys(rest).length === 0)) {
|
|
883
885
|
return props;
|
|
884
886
|
}
|
|
885
|
-
const result = __spreadValues$
|
|
887
|
+
const result = __spreadValues$7({}, props);
|
|
886
888
|
for (const rest of restProps) {
|
|
887
889
|
for (const key of Object.keys(rest)) {
|
|
888
890
|
result[key] = mergePropVals(key, result[key], rest[key]);
|
|
@@ -919,7 +921,7 @@ function mergePropVals(name, val1, val2) {
|
|
|
919
921
|
} else if (name === "className") {
|
|
920
922
|
return classNames(val1, val2);
|
|
921
923
|
} else if (name === "style") {
|
|
922
|
-
return __spreadValues$
|
|
924
|
+
return __spreadValues$7(__spreadValues$7({}, val1), val2);
|
|
923
925
|
} else if (name === "ref") {
|
|
924
926
|
return mergeRefs(val1, val2);
|
|
925
927
|
} else if (typeof val1 !== typeof val2) {
|
|
@@ -940,33 +942,33 @@ function mergePropVals(name, val1, val2) {
|
|
|
940
942
|
}
|
|
941
943
|
}
|
|
942
944
|
|
|
943
|
-
var __defProp$
|
|
944
|
-
var __defProps$
|
|
945
|
-
var __getOwnPropDescs$
|
|
946
|
-
var __getOwnPropSymbols$
|
|
947
|
-
var __hasOwnProp$
|
|
948
|
-
var __propIsEnum$
|
|
949
|
-
var __defNormalProp$
|
|
950
|
-
var __spreadValues$
|
|
945
|
+
var __defProp$6 = Object.defineProperty;
|
|
946
|
+
var __defProps$5 = Object.defineProperties;
|
|
947
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
948
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
949
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
950
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
951
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
952
|
+
var __spreadValues$6 = (a, b) => {
|
|
951
953
|
for (var prop in b || (b = {}))
|
|
952
|
-
if (__hasOwnProp$
|
|
953
|
-
__defNormalProp$
|
|
954
|
-
if (__getOwnPropSymbols$
|
|
955
|
-
for (var prop of __getOwnPropSymbols$
|
|
956
|
-
if (__propIsEnum$
|
|
957
|
-
__defNormalProp$
|
|
954
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
955
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
956
|
+
if (__getOwnPropSymbols$6)
|
|
957
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
958
|
+
if (__propIsEnum$6.call(b, prop))
|
|
959
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
958
960
|
}
|
|
959
961
|
return a;
|
|
960
962
|
};
|
|
961
|
-
var __spreadProps$
|
|
962
|
-
var __objRest$
|
|
963
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
964
|
+
var __objRest$5 = (source, exclude) => {
|
|
963
965
|
var target = {};
|
|
964
966
|
for (var prop in source)
|
|
965
|
-
if (__hasOwnProp$
|
|
967
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
966
968
|
target[prop] = source[prop];
|
|
967
|
-
if (source != null && __getOwnPropSymbols$
|
|
968
|
-
for (var prop of __getOwnPropSymbols$
|
|
969
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
969
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
970
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
971
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
970
972
|
target[prop] = source[prop];
|
|
971
973
|
}
|
|
972
974
|
return target;
|
|
@@ -996,7 +998,7 @@ const Internal = (props) => {
|
|
|
996
998
|
forceRemount: () => props.setRemountKey((k) => k + 1),
|
|
997
999
|
formProps: props
|
|
998
1000
|
}
|
|
999
|
-
}, /* @__PURE__ */ React.createElement(Form, __spreadProps$
|
|
1001
|
+
}, /* @__PURE__ */ React.createElement(Form, __spreadProps$5(__spreadValues$6({}, props), {
|
|
1000
1002
|
onValuesChange: (...args) => {
|
|
1001
1003
|
var _a2, _b2;
|
|
1002
1004
|
(_a2 = props.onValuesChange) == null ? void 0 : _a2.call(props, ...args);
|
|
@@ -1013,7 +1015,7 @@ const Internal = (props) => {
|
|
|
1013
1015
|
};
|
|
1014
1016
|
function FormWrapper(props) {
|
|
1015
1017
|
const [remountKey, setRemountKey] = React.useState(0);
|
|
1016
|
-
return /* @__PURE__ */ React.createElement(Internal, __spreadProps$
|
|
1018
|
+
return /* @__PURE__ */ React.createElement(Internal, __spreadProps$5(__spreadValues$6({
|
|
1017
1019
|
key: remountKey
|
|
1018
1020
|
}, props), {
|
|
1019
1021
|
setRemountKey
|
|
@@ -1304,7 +1306,7 @@ function FormItemWrapper(props) {
|
|
|
1304
1306
|
fireOnValuesChange == null ? void 0 : fireOnValuesChange();
|
|
1305
1307
|
}, [form, props.initialValue, fullFormItemName]);
|
|
1306
1308
|
}
|
|
1307
|
-
return /* @__PURE__ */ React.createElement(FormItem, __spreadValues$
|
|
1309
|
+
return /* @__PURE__ */ React.createElement(FormItem, __spreadValues$6(__spreadProps$5(__spreadValues$6({}, omit(props, "rules")), {
|
|
1308
1310
|
label: props.noLabel ? void 0 : props.label,
|
|
1309
1311
|
name: relativeFormItemName,
|
|
1310
1312
|
rules
|
|
@@ -1313,7 +1315,7 @@ function FormItemWrapper(props) {
|
|
|
1313
1315
|
}) : props.children);
|
|
1314
1316
|
}
|
|
1315
1317
|
function FormItemForwarder(_a) {
|
|
1316
|
-
var _b = _a, { formItemProps } = _b, props = __objRest$
|
|
1318
|
+
var _b = _a, { formItemProps } = _b, props = __objRest$5(_b, ["formItemProps"]);
|
|
1317
1319
|
var _a2;
|
|
1318
1320
|
const status = Form.Item.useStatus();
|
|
1319
1321
|
const internalFormCtx = React.useContext(InternalFormInstanceContext);
|
|
@@ -1326,7 +1328,7 @@ function FormItemForwarder(_a) {
|
|
|
1326
1328
|
});
|
|
1327
1329
|
return React.Children.map(formItemProps.children, (child, i) => {
|
|
1328
1330
|
var _a3;
|
|
1329
|
-
const baseProps = __spreadValues$
|
|
1331
|
+
const baseProps = __spreadValues$6(__spreadValues$6({}, (_a3 = child.props) != null ? _a3 : {}), props);
|
|
1330
1332
|
return i === 0 && isValidElement(child) ? cloneElement(child, mergeProps(baseProps, formItemProps.customizeProps(data, baseProps))) : child;
|
|
1331
1333
|
});
|
|
1332
1334
|
}
|
|
@@ -1522,7 +1524,7 @@ const FormListWrapper = React.forwardRef(function FormListWrapper2(props, ref) {
|
|
|
1522
1524
|
}
|
|
1523
1525
|
}, [props.initialValue, fullFormItemName]);
|
|
1524
1526
|
}
|
|
1525
|
-
return /* @__PURE__ */ React.createElement(FormList, __spreadProps$
|
|
1527
|
+
return /* @__PURE__ */ React.createElement(FormList, __spreadProps$5(__spreadValues$6({}, props), {
|
|
1526
1528
|
name: relativeFormItemName != null ? relativeFormItemName : []
|
|
1527
1529
|
}), (...args) => {
|
|
1528
1530
|
operationsRef.current = args;
|
|
@@ -1652,77 +1654,317 @@ function registerFormList(loader) {
|
|
|
1652
1654
|
});
|
|
1653
1655
|
}
|
|
1654
1656
|
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
];
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
description: "Allows selection of multiple items",
|
|
1684
|
-
defaultValueHint: false
|
|
1685
|
-
},
|
|
1686
|
-
triggerSubMenuAction: {
|
|
1687
|
-
type: "choice",
|
|
1688
|
-
options: ["hover", "click"],
|
|
1689
|
-
description: "Which action can trigger submenu open/close",
|
|
1690
|
-
defaultValueHint: "hover",
|
|
1691
|
-
advanced: true
|
|
1692
|
-
},
|
|
1693
|
-
children: {
|
|
1694
|
-
type: "slot",
|
|
1695
|
-
allowedComponents: allowedMenuComponents,
|
|
1696
|
-
defaultValue: [
|
|
1697
|
-
{
|
|
1698
|
-
type: "component",
|
|
1699
|
-
name: "plasmic-antd5-menu-item",
|
|
1700
|
-
props: {
|
|
1701
|
-
key: "menuItemKey1"
|
|
1702
|
-
}
|
|
1703
|
-
},
|
|
1704
|
-
{
|
|
1705
|
-
type: "component",
|
|
1706
|
-
name: "plasmic-antd5-menu-item",
|
|
1707
|
-
props: {
|
|
1708
|
-
key: "menuItemKey2"
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
]
|
|
1712
|
-
},
|
|
1713
|
-
onSelect: {
|
|
1714
|
-
type: "eventHandler",
|
|
1715
|
-
argTypes: [{ name: "key", type: "string" }]
|
|
1657
|
+
var __defProp$5 = Object.defineProperty;
|
|
1658
|
+
var __defProps$4 = Object.defineProperties;
|
|
1659
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1660
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1661
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1662
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1663
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1664
|
+
var __spreadValues$5 = (a, b) => {
|
|
1665
|
+
for (var prop in b || (b = {}))
|
|
1666
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1667
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
1668
|
+
if (__getOwnPropSymbols$5)
|
|
1669
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1670
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1671
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
1672
|
+
}
|
|
1673
|
+
return a;
|
|
1674
|
+
};
|
|
1675
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1676
|
+
const AntdInput = Input;
|
|
1677
|
+
const AntdTextArea = Input.TextArea;
|
|
1678
|
+
const AntdPassword = Input.Password;
|
|
1679
|
+
const AntdInputNumber = InputNumber;
|
|
1680
|
+
const inputHelpers = {
|
|
1681
|
+
states: {
|
|
1682
|
+
value: {
|
|
1683
|
+
onChangeArgsToValue: (e) => {
|
|
1684
|
+
return e.target.value;
|
|
1716
1685
|
}
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
const COMMON_HELPERS_CONFIG = {
|
|
1690
|
+
helpers: inputHelpers,
|
|
1691
|
+
importName: "inputHelpers",
|
|
1692
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput"
|
|
1693
|
+
};
|
|
1694
|
+
const COMMON_STATES = {
|
|
1695
|
+
value: {
|
|
1696
|
+
type: "writable",
|
|
1697
|
+
valueProp: "value",
|
|
1698
|
+
variableType: "text",
|
|
1699
|
+
onChangeProp: "onChange"
|
|
1700
|
+
}
|
|
1701
|
+
};
|
|
1702
|
+
const COMMON_DECORATOR_PROPS = {
|
|
1703
|
+
prefix: {
|
|
1704
|
+
type: "slot",
|
|
1705
|
+
hidePlaceholder: true
|
|
1706
|
+
},
|
|
1707
|
+
suffix: {
|
|
1708
|
+
type: "slot",
|
|
1709
|
+
hidePlaceholder: true
|
|
1710
|
+
},
|
|
1711
|
+
addonAfter: {
|
|
1712
|
+
type: "slot",
|
|
1713
|
+
hidePlaceholder: true
|
|
1714
|
+
},
|
|
1715
|
+
addonBefore: {
|
|
1716
|
+
type: "slot",
|
|
1717
|
+
hidePlaceholder: true
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
const COMMON_ADVANCED_PROPS = {
|
|
1721
|
+
maxLength: {
|
|
1722
|
+
type: "number",
|
|
1723
|
+
advanced: true
|
|
1724
|
+
},
|
|
1725
|
+
bordered: {
|
|
1726
|
+
type: "boolean",
|
|
1727
|
+
advanced: true,
|
|
1728
|
+
defaultValueHint: true
|
|
1729
|
+
},
|
|
1730
|
+
allowClear: {
|
|
1731
|
+
type: "boolean",
|
|
1732
|
+
advanced: true
|
|
1733
|
+
},
|
|
1734
|
+
autoFocus: {
|
|
1735
|
+
type: "boolean",
|
|
1736
|
+
advanced: true
|
|
1737
|
+
},
|
|
1738
|
+
readOnly: {
|
|
1739
|
+
type: "boolean",
|
|
1740
|
+
advanced: true
|
|
1741
|
+
}
|
|
1742
|
+
};
|
|
1743
|
+
const COMMON_EVENT_HANDLERS = {
|
|
1744
|
+
onChange: {
|
|
1745
|
+
type: "eventHandler",
|
|
1746
|
+
argTypes: [
|
|
1747
|
+
{
|
|
1748
|
+
name: "event",
|
|
1749
|
+
type: "object"
|
|
1750
|
+
}
|
|
1751
|
+
]
|
|
1752
|
+
},
|
|
1753
|
+
onPressEnter: {
|
|
1754
|
+
type: "eventHandler",
|
|
1755
|
+
argTypes: [
|
|
1756
|
+
{
|
|
1757
|
+
name: "event",
|
|
1758
|
+
type: "object"
|
|
1759
|
+
}
|
|
1760
|
+
]
|
|
1761
|
+
}
|
|
1762
|
+
};
|
|
1763
|
+
function registerInput(loader) {
|
|
1764
|
+
registerComponentHelper(loader, AntdInput, {
|
|
1765
|
+
name: "plasmic-antd5-input",
|
|
1766
|
+
displayName: "Input",
|
|
1767
|
+
props: __spreadValues$5(__spreadValues$5(__spreadValues$5({
|
|
1768
|
+
value: {
|
|
1769
|
+
type: "string"
|
|
1770
|
+
},
|
|
1771
|
+
placholder: {
|
|
1772
|
+
type: "string"
|
|
1773
|
+
},
|
|
1774
|
+
size: {
|
|
1775
|
+
type: "choice",
|
|
1776
|
+
options: ["large", "middle", "small"]
|
|
1777
|
+
},
|
|
1778
|
+
disabled: {
|
|
1779
|
+
type: "boolean"
|
|
1780
|
+
}
|
|
1781
|
+
}, COMMON_ADVANCED_PROPS), COMMON_DECORATOR_PROPS), COMMON_EVENT_HANDLERS),
|
|
1782
|
+
states: __spreadValues$5({}, COMMON_STATES),
|
|
1783
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1784
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1785
|
+
importName: "AntdInput"
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
function registerTextArea(loader) {
|
|
1789
|
+
registerComponentHelper(loader, AntdTextArea, {
|
|
1790
|
+
name: "plasmic-antd5-textarea",
|
|
1791
|
+
parentComponentName: "plasmic-antd5-input",
|
|
1792
|
+
displayName: "Text Area",
|
|
1793
|
+
props: __spreadValues$5({
|
|
1794
|
+
value: {
|
|
1795
|
+
type: "string"
|
|
1796
|
+
},
|
|
1797
|
+
placholder: {
|
|
1798
|
+
type: "string"
|
|
1799
|
+
},
|
|
1800
|
+
disabled: {
|
|
1801
|
+
type: "boolean"
|
|
1802
|
+
},
|
|
1803
|
+
maxLength: {
|
|
1804
|
+
type: "number",
|
|
1805
|
+
advanced: true
|
|
1806
|
+
},
|
|
1807
|
+
bordered: {
|
|
1808
|
+
type: "boolean",
|
|
1809
|
+
advanced: true,
|
|
1810
|
+
defaultValueHint: true
|
|
1811
|
+
}
|
|
1812
|
+
}, COMMON_EVENT_HANDLERS),
|
|
1813
|
+
states: __spreadValues$5({}, COMMON_STATES),
|
|
1814
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1815
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1816
|
+
importName: "AntdTextArea"
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1819
|
+
function registerPasswordInput(loader) {
|
|
1820
|
+
registerComponentHelper(loader, AntdPassword, {
|
|
1821
|
+
name: "plasmic-antd5-input-password",
|
|
1822
|
+
parentComponentName: "plasmic-antd5-input",
|
|
1823
|
+
displayName: "Password Input",
|
|
1824
|
+
props: __spreadValues$5({
|
|
1825
|
+
value: {
|
|
1826
|
+
type: "string"
|
|
1827
|
+
},
|
|
1828
|
+
placholder: {
|
|
1829
|
+
type: "string"
|
|
1830
|
+
},
|
|
1831
|
+
disabled: {
|
|
1832
|
+
type: "boolean"
|
|
1833
|
+
},
|
|
1834
|
+
maxLength: {
|
|
1835
|
+
type: "number",
|
|
1836
|
+
advanced: true
|
|
1837
|
+
},
|
|
1838
|
+
bordered: {
|
|
1839
|
+
type: "boolean",
|
|
1840
|
+
advanced: true,
|
|
1841
|
+
defaultValueHint: true
|
|
1842
|
+
}
|
|
1843
|
+
}, COMMON_EVENT_HANDLERS),
|
|
1844
|
+
states: __spreadValues$5({}, COMMON_STATES),
|
|
1845
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1846
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1847
|
+
importName: "AntdPassword"
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
function registerNumberInput(loader) {
|
|
1851
|
+
registerComponentHelper(loader, AntdInputNumber, {
|
|
1852
|
+
name: "plasmic-antd5-input-number",
|
|
1853
|
+
parentComponentName: "plasmic-antd5-input",
|
|
1854
|
+
displayName: "Number Input",
|
|
1855
|
+
props: __spreadProps$4(__spreadValues$5(__spreadValues$5(__spreadValues$5({
|
|
1856
|
+
value: {
|
|
1857
|
+
type: "number"
|
|
1858
|
+
},
|
|
1859
|
+
placholder: {
|
|
1860
|
+
type: "string"
|
|
1861
|
+
},
|
|
1862
|
+
disabled: {
|
|
1863
|
+
type: "boolean"
|
|
1864
|
+
},
|
|
1865
|
+
max: {
|
|
1866
|
+
type: "number"
|
|
1867
|
+
},
|
|
1868
|
+
min: {
|
|
1869
|
+
type: "number"
|
|
1870
|
+
},
|
|
1871
|
+
step: {
|
|
1872
|
+
type: "number",
|
|
1873
|
+
helpText: "Increment or decrement step"
|
|
1874
|
+
},
|
|
1875
|
+
controls: {
|
|
1876
|
+
type: "boolean",
|
|
1877
|
+
displayName: "Show add/minus controls?",
|
|
1878
|
+
advanced: true
|
|
1879
|
+
}
|
|
1880
|
+
}, COMMON_DECORATOR_PROPS), COMMON_ADVANCED_PROPS), COMMON_EVENT_HANDLERS), {
|
|
1881
|
+
onChange: {
|
|
1882
|
+
type: "eventHandler",
|
|
1883
|
+
argTypes: [
|
|
1884
|
+
{
|
|
1885
|
+
name: "value",
|
|
1886
|
+
type: "number"
|
|
1887
|
+
}
|
|
1888
|
+
]
|
|
1889
|
+
}
|
|
1890
|
+
}),
|
|
1891
|
+
states: __spreadValues$5({}, COMMON_STATES),
|
|
1892
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1893
|
+
importName: "AntdInputNumber"
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
const AntdMenu = Menu;
|
|
1898
|
+
const AntdMenuDivider = Menu.Divider;
|
|
1899
|
+
const AntdMenuItem = Menu.Item;
|
|
1900
|
+
const AntdMenuItemGroup = Menu.ItemGroup;
|
|
1901
|
+
const AntdSubMenu = Menu.SubMenu;
|
|
1902
|
+
const allowedMenuComponents = [
|
|
1903
|
+
"plasmic-antd5-menu-item",
|
|
1904
|
+
"plasmic-antd5-menu-divider",
|
|
1905
|
+
"plasmic-antd5-submenu",
|
|
1906
|
+
"plasmic-antd5-menu-item-group"
|
|
1907
|
+
];
|
|
1908
|
+
function registerMenu(loader) {
|
|
1909
|
+
registerComponentHelper(loader, AntdMenu, {
|
|
1910
|
+
name: "plasmic-antd5-menu",
|
|
1911
|
+
displayName: "Menu",
|
|
1912
|
+
props: {
|
|
1913
|
+
expandIcon: {
|
|
1914
|
+
type: "slot",
|
|
1915
|
+
hidePlaceholder: true
|
|
1916
|
+
},
|
|
1917
|
+
mode: {
|
|
1918
|
+
type: "choice",
|
|
1919
|
+
options: ["horizontal", "vertical", "inline"],
|
|
1920
|
+
description: "Type of menu",
|
|
1921
|
+
defaultValueHint: "vertical"
|
|
1922
|
+
},
|
|
1923
|
+
multiple: {
|
|
1924
|
+
type: "boolean",
|
|
1925
|
+
description: "Allows selection of multiple items",
|
|
1926
|
+
defaultValueHint: false
|
|
1927
|
+
},
|
|
1928
|
+
triggerSubMenuAction: {
|
|
1929
|
+
type: "choice",
|
|
1930
|
+
options: ["hover", "click"],
|
|
1931
|
+
description: "Which action can trigger submenu open/close",
|
|
1932
|
+
defaultValueHint: "hover",
|
|
1933
|
+
advanced: true
|
|
1934
|
+
},
|
|
1935
|
+
children: {
|
|
1936
|
+
type: "slot",
|
|
1937
|
+
allowedComponents: allowedMenuComponents,
|
|
1938
|
+
defaultValue: [
|
|
1939
|
+
{
|
|
1940
|
+
type: "component",
|
|
1941
|
+
name: "plasmic-antd5-menu-item",
|
|
1942
|
+
props: {
|
|
1943
|
+
key: "menuItemKey1"
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
{
|
|
1947
|
+
type: "component",
|
|
1948
|
+
name: "plasmic-antd5-menu-item",
|
|
1949
|
+
props: {
|
|
1950
|
+
key: "menuItemKey2"
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
]
|
|
1954
|
+
},
|
|
1955
|
+
onSelect: {
|
|
1956
|
+
type: "eventHandler",
|
|
1957
|
+
argTypes: [{ name: "key", type: "string" }]
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerMenu",
|
|
1961
|
+
importName: "AntdMenu"
|
|
1962
|
+
});
|
|
1963
|
+
registerComponentHelper(loader, AntdMenuItem, {
|
|
1964
|
+
name: "plasmic-antd5-menu-item",
|
|
1965
|
+
displayName: "Menu Item",
|
|
1966
|
+
props: {
|
|
1967
|
+
danger: {
|
|
1726
1968
|
type: "boolean",
|
|
1727
1969
|
description: "Display the danger style",
|
|
1728
1970
|
defaultValueHint: false
|
|
@@ -1869,7 +2111,7 @@ var __spreadValues$4 = (a, b) => {
|
|
|
1869
2111
|
return a;
|
|
1870
2112
|
};
|
|
1871
2113
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1872
|
-
var __objRest$
|
|
2114
|
+
var __objRest$4 = (source, exclude) => {
|
|
1873
2115
|
var target = {};
|
|
1874
2116
|
for (var prop in source)
|
|
1875
2117
|
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -1882,7 +2124,7 @@ var __objRest$3 = (source, exclude) => {
|
|
|
1882
2124
|
return target;
|
|
1883
2125
|
};
|
|
1884
2126
|
function AntdModal(props) {
|
|
1885
|
-
const _a = props, { onOpenChange, onOk, onCancel, open, footer } = _a, rest = __objRest$
|
|
2127
|
+
const _a = props, { onOpenChange, onOk, onCancel, open, footer } = _a, rest = __objRest$4(_a, ["onOpenChange", "onOk", "onCancel", "open", "footer"]);
|
|
1886
2128
|
const memoOnOk = React.useMemo(() => {
|
|
1887
2129
|
if (onOpenChange || onOk) {
|
|
1888
2130
|
return (e) => {
|
|
@@ -2023,7 +2265,7 @@ var __spreadValues$3 = (a, b) => {
|
|
|
2023
2265
|
return a;
|
|
2024
2266
|
};
|
|
2025
2267
|
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2026
|
-
var __objRest$
|
|
2268
|
+
var __objRest$3 = (source, exclude) => {
|
|
2027
2269
|
var target = {};
|
|
2028
2270
|
for (var prop in source)
|
|
2029
2271
|
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2037,7 +2279,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
2037
2279
|
};
|
|
2038
2280
|
const AntdRadio = Radio;
|
|
2039
2281
|
function AntdRadioGroup(props) {
|
|
2040
|
-
const _a = props, { onChange } = _a, rest = __objRest$
|
|
2282
|
+
const _a = props, { onChange } = _a, rest = __objRest$3(_a, ["onChange"]);
|
|
2041
2283
|
const wrappedOnChange = React.useMemo(() => {
|
|
2042
2284
|
if (onChange) {
|
|
2043
2285
|
return (event) => onChange(event.target.value);
|
|
@@ -2183,7 +2425,7 @@ var __spreadValues$2 = (a, b) => {
|
|
|
2183
2425
|
return a;
|
|
2184
2426
|
};
|
|
2185
2427
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2186
|
-
var __objRest$
|
|
2428
|
+
var __objRest$2 = (source, exclude) => {
|
|
2187
2429
|
var target = {};
|
|
2188
2430
|
for (var prop in source)
|
|
2189
2431
|
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2205,7 +2447,7 @@ function AntdSelect(props) {
|
|
|
2205
2447
|
suffixIcon,
|
|
2206
2448
|
mode,
|
|
2207
2449
|
useChildren
|
|
2208
|
-
} = _a, rest = __objRest$
|
|
2450
|
+
} = _a, rest = __objRest$2(_a, [
|
|
2209
2451
|
"popupClassName",
|
|
2210
2452
|
"popupScopeClassName",
|
|
2211
2453
|
"defaultStylesClassName",
|
|
@@ -2502,7 +2744,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
2502
2744
|
}
|
|
2503
2745
|
return a;
|
|
2504
2746
|
};
|
|
2505
|
-
var __objRest = (source, exclude) => {
|
|
2747
|
+
var __objRest$1 = (source, exclude) => {
|
|
2506
2748
|
var target = {};
|
|
2507
2749
|
for (var prop in source)
|
|
2508
2750
|
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -2524,7 +2766,7 @@ const AntdTable = React.forwardRef(function AntdTable2(props, ref) {
|
|
|
2524
2766
|
setControlContextData,
|
|
2525
2767
|
selectedRowKeys,
|
|
2526
2768
|
defaultSelectedRowKeys
|
|
2527
|
-
} = _a, rest = __objRest(_a, [
|
|
2769
|
+
} = _a, rest = __objRest$1(_a, [
|
|
2528
2770
|
"data",
|
|
2529
2771
|
"onSelectedRowKeysChange",
|
|
2530
2772
|
"onSelectedRowsChange",
|
|
@@ -2766,224 +3008,157 @@ var __spreadValues = (a, b) => {
|
|
|
2766
3008
|
return a;
|
|
2767
3009
|
};
|
|
2768
3010
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
}
|
|
3011
|
+
var __objRest = (source, exclude) => {
|
|
3012
|
+
var target = {};
|
|
3013
|
+
for (var prop in source)
|
|
3014
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3015
|
+
target[prop] = source[prop];
|
|
3016
|
+
if (source != null && __getOwnPropSymbols)
|
|
3017
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
3018
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
3019
|
+
target[prop] = source[prop];
|
|
2779
3020
|
}
|
|
2780
|
-
|
|
2781
|
-
};
|
|
2782
|
-
const COMMON_HELPERS_CONFIG = {
|
|
2783
|
-
helpers: inputHelpers,
|
|
2784
|
-
importName: "inputHelpers",
|
|
2785
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput"
|
|
2786
|
-
};
|
|
2787
|
-
const COMMON_STATES = {
|
|
2788
|
-
value: {
|
|
2789
|
-
type: "writable",
|
|
2790
|
-
valueProp: "value",
|
|
2791
|
-
variableType: "text",
|
|
2792
|
-
onChangeProp: "onChange"
|
|
2793
|
-
}
|
|
2794
|
-
};
|
|
2795
|
-
const COMMON_DECORATOR_PROPS = {
|
|
2796
|
-
prefix: {
|
|
2797
|
-
type: "slot",
|
|
2798
|
-
hidePlaceholder: true
|
|
2799
|
-
},
|
|
2800
|
-
suffix: {
|
|
2801
|
-
type: "slot",
|
|
2802
|
-
hidePlaceholder: true
|
|
2803
|
-
},
|
|
2804
|
-
addonAfter: {
|
|
2805
|
-
type: "slot",
|
|
2806
|
-
hidePlaceholder: true
|
|
2807
|
-
},
|
|
2808
|
-
addonBefore: {
|
|
2809
|
-
type: "slot",
|
|
2810
|
-
hidePlaceholder: true
|
|
2811
|
-
}
|
|
2812
|
-
};
|
|
2813
|
-
const COMMON_ADVANCED_PROPS = {
|
|
2814
|
-
maxLength: {
|
|
2815
|
-
type: "number",
|
|
2816
|
-
advanced: true
|
|
2817
|
-
},
|
|
2818
|
-
bordered: {
|
|
2819
|
-
type: "boolean",
|
|
2820
|
-
advanced: true,
|
|
2821
|
-
defaultValueHint: true
|
|
2822
|
-
},
|
|
2823
|
-
allowClear: {
|
|
2824
|
-
type: "boolean",
|
|
2825
|
-
advanced: true
|
|
2826
|
-
},
|
|
2827
|
-
autoFocus: {
|
|
2828
|
-
type: "boolean",
|
|
2829
|
-
advanced: true
|
|
2830
|
-
},
|
|
2831
|
-
readOnly: {
|
|
2832
|
-
type: "boolean",
|
|
2833
|
-
advanced: true
|
|
2834
|
-
}
|
|
2835
|
-
};
|
|
2836
|
-
const COMMON_EVENT_HANDLERS = {
|
|
2837
|
-
onChange: {
|
|
2838
|
-
type: "eventHandler",
|
|
2839
|
-
argTypes: [
|
|
2840
|
-
{
|
|
2841
|
-
name: "event",
|
|
2842
|
-
type: "object"
|
|
2843
|
-
}
|
|
2844
|
-
]
|
|
2845
|
-
},
|
|
2846
|
-
onPressEnter: {
|
|
2847
|
-
type: "eventHandler",
|
|
2848
|
-
argTypes: [
|
|
2849
|
-
{
|
|
2850
|
-
name: "event",
|
|
2851
|
-
type: "object"
|
|
2852
|
-
}
|
|
2853
|
-
]
|
|
2854
|
-
}
|
|
3021
|
+
return target;
|
|
2855
3022
|
};
|
|
2856
|
-
function
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
}
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
});
|
|
3023
|
+
function UploadWrapper(props) {
|
|
3024
|
+
const _a = props, { files, onFilesChange } = _a, rest = __objRest(_a, ["files", "onFilesChange"]);
|
|
3025
|
+
const handleChange = (info) => {
|
|
3026
|
+
const { file } = info;
|
|
3027
|
+
if (file.status === "removed") {
|
|
3028
|
+
return;
|
|
3029
|
+
}
|
|
3030
|
+
const metadata = {
|
|
3031
|
+
uid: file.uid,
|
|
3032
|
+
name: file.name,
|
|
3033
|
+
size: file.size,
|
|
3034
|
+
type: file.type,
|
|
3035
|
+
lastModified: file.lastModified
|
|
3036
|
+
};
|
|
3037
|
+
onFilesChange == null ? void 0 : onFilesChange([
|
|
3038
|
+
...files,
|
|
3039
|
+
__spreadProps(__spreadValues({}, metadata), {
|
|
3040
|
+
status: "uploading"
|
|
3041
|
+
})
|
|
3042
|
+
]);
|
|
3043
|
+
const reader = new FileReader();
|
|
3044
|
+
reader.onload = () => {
|
|
3045
|
+
onFilesChange == null ? void 0 : onFilesChange([
|
|
3046
|
+
...files.filter((f) => f.uid !== file.uid),
|
|
3047
|
+
__spreadProps(__spreadValues({}, metadata), {
|
|
3048
|
+
contents: reader.result.replace(/^data:[^;]+;base64,/, ""),
|
|
3049
|
+
status: "success"
|
|
3050
|
+
})
|
|
3051
|
+
]);
|
|
3052
|
+
};
|
|
3053
|
+
reader.onerror = (error) => {
|
|
3054
|
+
onFilesChange == null ? void 0 : onFilesChange([
|
|
3055
|
+
...files.filter((f) => f.uid !== file.uid),
|
|
3056
|
+
__spreadProps(__spreadValues({}, metadata), {
|
|
3057
|
+
status: "error"
|
|
3058
|
+
})
|
|
3059
|
+
]);
|
|
3060
|
+
};
|
|
3061
|
+
reader.readAsDataURL(info.file);
|
|
3062
|
+
};
|
|
3063
|
+
const handleRemove = (file) => {
|
|
3064
|
+
onFilesChange == null ? void 0 : onFilesChange(files.filter((f) => f.uid !== file.uid));
|
|
3065
|
+
};
|
|
3066
|
+
return /* @__PURE__ */ React.createElement(Upload, __spreadProps(__spreadValues({}, rest), {
|
|
3067
|
+
fileList: files,
|
|
3068
|
+
beforeUpload: () => {
|
|
3069
|
+
return false;
|
|
3070
|
+
},
|
|
3071
|
+
onChange: (info) => {
|
|
3072
|
+
handleChange(info);
|
|
3073
|
+
},
|
|
3074
|
+
onRemove: (file) => {
|
|
3075
|
+
handleRemove(file);
|
|
3076
|
+
}
|
|
3077
|
+
}));
|
|
2911
3078
|
}
|
|
2912
|
-
function
|
|
2913
|
-
registerComponentHelper(loader,
|
|
2914
|
-
name: "plasmic-antd5-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3079
|
+
function registerUpload(loader) {
|
|
3080
|
+
registerComponentHelper(loader, UploadWrapper, {
|
|
3081
|
+
name: "plasmic-antd5-upload",
|
|
3082
|
+
displayName: "Upload",
|
|
3083
|
+
props: {
|
|
3084
|
+
accept: {
|
|
3085
|
+
type: "choice",
|
|
3086
|
+
displayName: "Allowed types",
|
|
3087
|
+
options: [
|
|
3088
|
+
{
|
|
3089
|
+
value: "",
|
|
3090
|
+
label: "Any kind of file"
|
|
3091
|
+
},
|
|
3092
|
+
{
|
|
3093
|
+
value: "image/*",
|
|
3094
|
+
label: "Image"
|
|
3095
|
+
},
|
|
3096
|
+
{
|
|
3097
|
+
value: "video/*",
|
|
3098
|
+
label: "Video"
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
value: "audio/*",
|
|
3102
|
+
label: "Audio"
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
value: "application/pdf",
|
|
3106
|
+
label: "PDF"
|
|
3107
|
+
}
|
|
3108
|
+
],
|
|
3109
|
+
defaultValue: ""
|
|
2920
3110
|
},
|
|
2921
|
-
|
|
2922
|
-
type: "
|
|
3111
|
+
files: {
|
|
3112
|
+
type: "object",
|
|
3113
|
+
displayName: "Files",
|
|
3114
|
+
defaultValue: []
|
|
2923
3115
|
},
|
|
2924
|
-
|
|
2925
|
-
type: "
|
|
3116
|
+
children: {
|
|
3117
|
+
type: "slot",
|
|
3118
|
+
defaultValue: [
|
|
3119
|
+
{
|
|
3120
|
+
type: "default-component",
|
|
3121
|
+
kind: "button",
|
|
3122
|
+
props: {
|
|
3123
|
+
children: {
|
|
3124
|
+
type: "text",
|
|
3125
|
+
value: "Upload"
|
|
3126
|
+
}
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
]
|
|
2926
3130
|
},
|
|
2927
|
-
|
|
3131
|
+
maxCount: {
|
|
2928
3132
|
type: "number",
|
|
3133
|
+
displayName: "Limit of files",
|
|
2929
3134
|
advanced: true
|
|
2930
3135
|
},
|
|
2931
|
-
|
|
2932
|
-
type: "boolean",
|
|
2933
|
-
advanced: true,
|
|
2934
|
-
defaultValueHint: true
|
|
2935
|
-
}
|
|
2936
|
-
}, COMMON_EVENT_HANDLERS),
|
|
2937
|
-
states: __spreadValues({}, COMMON_STATES),
|
|
2938
|
-
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
2939
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
2940
|
-
importName: "AntdPassword"
|
|
2941
|
-
});
|
|
2942
|
-
}
|
|
2943
|
-
function registerNumberInput(loader) {
|
|
2944
|
-
registerComponentHelper(loader, AntdInputNumber, {
|
|
2945
|
-
name: "plasmic-antd5-input-number",
|
|
2946
|
-
parentComponentName: "plasmic-antd5-input",
|
|
2947
|
-
displayName: "Number Input",
|
|
2948
|
-
props: __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
2949
|
-
value: {
|
|
2950
|
-
type: "number"
|
|
2951
|
-
},
|
|
2952
|
-
placholder: {
|
|
2953
|
-
type: "string"
|
|
2954
|
-
},
|
|
2955
|
-
disabled: {
|
|
2956
|
-
type: "boolean"
|
|
2957
|
-
},
|
|
2958
|
-
max: {
|
|
2959
|
-
type: "number"
|
|
2960
|
-
},
|
|
2961
|
-
min: {
|
|
2962
|
-
type: "number"
|
|
2963
|
-
},
|
|
2964
|
-
step: {
|
|
2965
|
-
type: "number",
|
|
2966
|
-
helpText: "Increment or decrement step"
|
|
2967
|
-
},
|
|
2968
|
-
controls: {
|
|
2969
|
-
type: "boolean",
|
|
2970
|
-
displayName: "Show add/minus controls?",
|
|
2971
|
-
advanced: true
|
|
2972
|
-
}
|
|
2973
|
-
}, COMMON_DECORATOR_PROPS), COMMON_ADVANCED_PROPS), COMMON_EVENT_HANDLERS), {
|
|
2974
|
-
onChange: {
|
|
3136
|
+
onFilesChange: {
|
|
2975
3137
|
type: "eventHandler",
|
|
3138
|
+
displayName: "On file uploaded",
|
|
2976
3139
|
argTypes: [
|
|
2977
3140
|
{
|
|
2978
|
-
name: "
|
|
2979
|
-
type: "
|
|
3141
|
+
name: "files",
|
|
3142
|
+
type: "object"
|
|
2980
3143
|
}
|
|
2981
3144
|
]
|
|
3145
|
+
},
|
|
3146
|
+
showUploadList: {
|
|
3147
|
+
type: "boolean",
|
|
3148
|
+
displayName: "List files",
|
|
3149
|
+
defaultValue: true
|
|
2982
3150
|
}
|
|
2983
|
-
}
|
|
2984
|
-
states:
|
|
2985
|
-
|
|
2986
|
-
|
|
3151
|
+
},
|
|
3152
|
+
states: {
|
|
3153
|
+
files: {
|
|
3154
|
+
type: "writable",
|
|
3155
|
+
valueProp: "files",
|
|
3156
|
+
variableType: "array",
|
|
3157
|
+
onChangeProp: "onFilesChange"
|
|
3158
|
+
}
|
|
3159
|
+
},
|
|
3160
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerUpload",
|
|
3161
|
+
importName: "UploadWrapper"
|
|
2987
3162
|
});
|
|
2988
3163
|
}
|
|
2989
3164
|
|
|
@@ -3006,6 +3181,7 @@ function registerAll(loader) {
|
|
|
3006
3181
|
registerPasswordInput(loader);
|
|
3007
3182
|
registerTextArea(loader);
|
|
3008
3183
|
registerNumberInput(loader);
|
|
3184
|
+
registerUpload(loader);
|
|
3009
3185
|
}
|
|
3010
3186
|
|
|
3011
3187
|
export { registerAll };
|