@plasmicpkgs/antd5 0.0.30 → 0.0.32
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 +750 -471
- package/dist/antd.esm.js.map +1 -1
- package/dist/index.js +753 -473
- package/dist/registerTable.d.ts +26 -0
- package/package.json +2 -2
- package/skinny/registerForm.js +8 -1
- package/skinny/registerForm.js.map +1 -1
- package/skinny/registerTable.d.ts +26 -0
package/dist/antd.esm.js
CHANGED
|
@@ -19,13 +19,14 @@ 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';
|
|
24
22
|
import Modal from 'antd/es/modal';
|
|
25
23
|
import Radio from 'antd/es/radio';
|
|
26
24
|
import RadioGroup from 'antd/es/radio/group';
|
|
27
25
|
import 'antd/es/radio/radioButton';
|
|
28
26
|
import Select from 'antd/es/select';
|
|
27
|
+
import Table from 'antd/es/table';
|
|
28
|
+
import Input from 'antd/es/input';
|
|
29
|
+
import InputNumber from 'antd/es/input-number';
|
|
29
30
|
|
|
30
31
|
function makeRegisterGlobalContext(component, meta) {
|
|
31
32
|
return function(loader) {
|
|
@@ -60,6 +61,15 @@ function traverseReactEltTree(children, callback) {
|
|
|
60
61
|
};
|
|
61
62
|
rec(children);
|
|
62
63
|
}
|
|
64
|
+
function asArray(x) {
|
|
65
|
+
if (Array.isArray(x)) {
|
|
66
|
+
return x;
|
|
67
|
+
} else if (x == null) {
|
|
68
|
+
return [];
|
|
69
|
+
} else {
|
|
70
|
+
return [x];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
63
73
|
function omit(obj, ...keys) {
|
|
64
74
|
if (Object.keys(obj).length === 0) {
|
|
65
75
|
return obj;
|
|
@@ -151,39 +161,39 @@ function registerButton(loader) {
|
|
|
151
161
|
});
|
|
152
162
|
}
|
|
153
163
|
|
|
154
|
-
var __defProp$
|
|
164
|
+
var __defProp$9 = Object.defineProperty;
|
|
155
165
|
var __defProps$7 = Object.defineProperties;
|
|
156
166
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
157
|
-
var __getOwnPropSymbols$
|
|
158
|
-
var __hasOwnProp$
|
|
159
|
-
var __propIsEnum$
|
|
160
|
-
var __defNormalProp$
|
|
161
|
-
var __spreadValues$
|
|
167
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
168
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
169
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
170
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
171
|
+
var __spreadValues$9 = (a, b) => {
|
|
162
172
|
for (var prop in b || (b = {}))
|
|
163
|
-
if (__hasOwnProp$
|
|
164
|
-
__defNormalProp$
|
|
165
|
-
if (__getOwnPropSymbols$
|
|
166
|
-
for (var prop of __getOwnPropSymbols$
|
|
167
|
-
if (__propIsEnum$
|
|
168
|
-
__defNormalProp$
|
|
173
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
174
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
175
|
+
if (__getOwnPropSymbols$9)
|
|
176
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
177
|
+
if (__propIsEnum$9.call(b, prop))
|
|
178
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
169
179
|
}
|
|
170
180
|
return a;
|
|
171
181
|
};
|
|
172
182
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
173
|
-
var __objRest$
|
|
183
|
+
var __objRest$7 = (source, exclude) => {
|
|
174
184
|
var target = {};
|
|
175
185
|
for (var prop in source)
|
|
176
|
-
if (__hasOwnProp$
|
|
186
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
177
187
|
target[prop] = source[prop];
|
|
178
|
-
if (source != null && __getOwnPropSymbols$
|
|
179
|
-
for (var prop of __getOwnPropSymbols$
|
|
180
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
188
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
189
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
190
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
181
191
|
target[prop] = source[prop];
|
|
182
192
|
}
|
|
183
193
|
return target;
|
|
184
194
|
};
|
|
185
195
|
function AntdCheckbox(props) {
|
|
186
|
-
const _a = props, { onChange } = _a, rest = __objRest$
|
|
196
|
+
const _a = props, { onChange } = _a, rest = __objRest$7(_a, ["onChange"]);
|
|
187
197
|
const wrappedOnChange = React.useMemo(() => {
|
|
188
198
|
if (onChange) {
|
|
189
199
|
return (event) => onChange(event.target.checked);
|
|
@@ -191,7 +201,7 @@ function AntdCheckbox(props) {
|
|
|
191
201
|
return void 0;
|
|
192
202
|
}
|
|
193
203
|
}, [onChange]);
|
|
194
|
-
return /* @__PURE__ */ React.createElement(Checkbox, __spreadProps$7(__spreadValues$
|
|
204
|
+
return /* @__PURE__ */ React.createElement(Checkbox, __spreadProps$7(__spreadValues$9({}, rest), {
|
|
195
205
|
onChange: wrappedOnChange
|
|
196
206
|
}));
|
|
197
207
|
}
|
|
@@ -302,33 +312,33 @@ function registerCheckbox(loader) {
|
|
|
302
312
|
});
|
|
303
313
|
}
|
|
304
314
|
|
|
305
|
-
var __defProp$
|
|
315
|
+
var __defProp$8 = Object.defineProperty;
|
|
306
316
|
var __defProps$6 = Object.defineProperties;
|
|
307
317
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
308
|
-
var __getOwnPropSymbols$
|
|
309
|
-
var __hasOwnProp$
|
|
310
|
-
var __propIsEnum$
|
|
311
|
-
var __defNormalProp$
|
|
312
|
-
var __spreadValues$
|
|
318
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
319
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
320
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
321
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
322
|
+
var __spreadValues$8 = (a, b) => {
|
|
313
323
|
for (var prop in b || (b = {}))
|
|
314
|
-
if (__hasOwnProp$
|
|
315
|
-
__defNormalProp$
|
|
316
|
-
if (__getOwnPropSymbols$
|
|
317
|
-
for (var prop of __getOwnPropSymbols$
|
|
318
|
-
if (__propIsEnum$
|
|
319
|
-
__defNormalProp$
|
|
324
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
325
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
326
|
+
if (__getOwnPropSymbols$8)
|
|
327
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
328
|
+
if (__propIsEnum$8.call(b, prop))
|
|
329
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
320
330
|
}
|
|
321
331
|
return a;
|
|
322
332
|
};
|
|
323
333
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
324
|
-
var __objRest$
|
|
334
|
+
var __objRest$6 = (source, exclude) => {
|
|
325
335
|
var target = {};
|
|
326
336
|
for (var prop in source)
|
|
327
|
-
if (__hasOwnProp$
|
|
337
|
+
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
328
338
|
target[prop] = source[prop];
|
|
329
|
-
if (source != null && __getOwnPropSymbols$
|
|
330
|
-
for (var prop of __getOwnPropSymbols$
|
|
331
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
339
|
+
if (source != null && __getOwnPropSymbols$8)
|
|
340
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
341
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
|
|
332
342
|
target[prop] = source[prop];
|
|
333
343
|
}
|
|
334
344
|
return target;
|
|
@@ -350,7 +360,7 @@ function themeToAntdConfig(opts) {
|
|
|
350
360
|
wireframe,
|
|
351
361
|
spacing
|
|
352
362
|
} = opts;
|
|
353
|
-
return __spreadProps$6(__spreadValues$
|
|
363
|
+
return __spreadProps$6(__spreadValues$8({}, spacing && { size: spacing }), {
|
|
354
364
|
theme: {
|
|
355
365
|
token: Object.fromEntries(Object.entries({
|
|
356
366
|
colorTextBase,
|
|
@@ -371,10 +381,10 @@ function themeToAntdConfig(opts) {
|
|
|
371
381
|
});
|
|
372
382
|
}
|
|
373
383
|
function AntdConfigProvider(props) {
|
|
374
|
-
const _a = props, { children, themeStyles } = _a, rest = __objRest$
|
|
375
|
-
return /* @__PURE__ */ React.createElement(ConfigProvider, __spreadValues$
|
|
384
|
+
const _a = props, { children, themeStyles } = _a, rest = __objRest$6(_a, ["children", "themeStyles"]);
|
|
385
|
+
return /* @__PURE__ */ React.createElement(ConfigProvider, __spreadValues$8({
|
|
376
386
|
locale: enUS
|
|
377
|
-
}, themeToAntdConfig(__spreadProps$6(__spreadValues$
|
|
387
|
+
}, themeToAntdConfig(__spreadProps$6(__spreadValues$8({}, rest), {
|
|
378
388
|
fontFamily: themeStyles.fontFamily,
|
|
379
389
|
fontSize: themeStyles.fontSize ? parseInt(themeStyles.fontSize) : void 0,
|
|
380
390
|
lineHeight: themeStyles.lineHeight ? parseInt(themeStyles.lineHeight) : void 0,
|
|
@@ -394,8 +404,8 @@ function InnerConfigProvider(props) {
|
|
|
394
404
|
const actions = React.useMemo(() => ({
|
|
395
405
|
showNotification: (opts) => {
|
|
396
406
|
var _b;
|
|
397
|
-
const _a = opts, rest = __objRest$
|
|
398
|
-
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$
|
|
407
|
+
const _a = opts, rest = __objRest$6(_a, ["type"]);
|
|
408
|
+
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$8({}, rest));
|
|
399
409
|
},
|
|
400
410
|
hideNotifications: () => {
|
|
401
411
|
app.notification.destroy();
|
|
@@ -652,7 +662,7 @@ function registerTokens(loader) {
|
|
|
652
662
|
regs.forEach((t) => registerToken(t));
|
|
653
663
|
}
|
|
654
664
|
}
|
|
655
|
-
const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __spreadProps$6(__spreadValues$
|
|
665
|
+
const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __spreadProps$6(__spreadValues$8({
|
|
656
666
|
name: "plasmic-antd5-config-provider",
|
|
657
667
|
displayName: "Ant Design System Settings",
|
|
658
668
|
props: {
|
|
@@ -757,40 +767,40 @@ const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __s
|
|
|
757
767
|
importName: "AntdConfigProvider"
|
|
758
768
|
}));
|
|
759
769
|
|
|
760
|
-
var __defProp$
|
|
770
|
+
var __defProp$7 = Object.defineProperty;
|
|
761
771
|
var __defProps$5 = Object.defineProperties;
|
|
762
772
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
763
|
-
var __getOwnPropSymbols$
|
|
764
|
-
var __hasOwnProp$
|
|
765
|
-
var __propIsEnum$
|
|
766
|
-
var __defNormalProp$
|
|
767
|
-
var __spreadValues$
|
|
773
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
774
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
775
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
776
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
777
|
+
var __spreadValues$7 = (a, b) => {
|
|
768
778
|
for (var prop in b || (b = {}))
|
|
769
|
-
if (__hasOwnProp$
|
|
770
|
-
__defNormalProp$
|
|
771
|
-
if (__getOwnPropSymbols$
|
|
772
|
-
for (var prop of __getOwnPropSymbols$
|
|
773
|
-
if (__propIsEnum$
|
|
774
|
-
__defNormalProp$
|
|
779
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
780
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
781
|
+
if (__getOwnPropSymbols$7)
|
|
782
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
783
|
+
if (__propIsEnum$7.call(b, prop))
|
|
784
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
775
785
|
}
|
|
776
786
|
return a;
|
|
777
787
|
};
|
|
778
788
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
779
|
-
var __objRest$
|
|
789
|
+
var __objRest$5 = (source, exclude) => {
|
|
780
790
|
var target = {};
|
|
781
791
|
for (var prop in source)
|
|
782
|
-
if (__hasOwnProp$
|
|
792
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
783
793
|
target[prop] = source[prop];
|
|
784
|
-
if (source != null && __getOwnPropSymbols$
|
|
785
|
-
for (var prop of __getOwnPropSymbols$
|
|
786
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
794
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
795
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
796
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
787
797
|
target[prop] = source[prop];
|
|
788
798
|
}
|
|
789
799
|
return target;
|
|
790
800
|
};
|
|
791
801
|
function AntdDropdown(props) {
|
|
792
|
-
const _a = props, { children, onAction, menuItems } = _a, rest = __objRest$
|
|
793
|
-
return /* @__PURE__ */ React.createElement(Dropdown, __spreadProps$5(__spreadValues$
|
|
802
|
+
const _a = props, { children, onAction, menuItems } = _a, rest = __objRest$5(_a, ["children", "onAction", "menuItems"]);
|
|
803
|
+
return /* @__PURE__ */ React.createElement(Dropdown, __spreadProps$5(__spreadValues$7({}, rest), {
|
|
794
804
|
overlay: () => {
|
|
795
805
|
var _a2;
|
|
796
806
|
const items = (_a2 = menuItems == null ? void 0 : menuItems()) != null ? _a2 : [];
|
|
@@ -894,19 +904,19 @@ function registerDropdown(loader) {
|
|
|
894
904
|
});
|
|
895
905
|
}
|
|
896
906
|
|
|
897
|
-
var __defProp$
|
|
898
|
-
var __getOwnPropSymbols$
|
|
899
|
-
var __hasOwnProp$
|
|
900
|
-
var __propIsEnum$
|
|
901
|
-
var __defNormalProp$
|
|
902
|
-
var __spreadValues$
|
|
907
|
+
var __defProp$6 = Object.defineProperty;
|
|
908
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
909
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
910
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
911
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
912
|
+
var __spreadValues$6 = (a, b) => {
|
|
903
913
|
for (var prop in b || (b = {}))
|
|
904
|
-
if (__hasOwnProp$
|
|
905
|
-
__defNormalProp$
|
|
906
|
-
if (__getOwnPropSymbols$
|
|
907
|
-
for (var prop of __getOwnPropSymbols$
|
|
908
|
-
if (__propIsEnum$
|
|
909
|
-
__defNormalProp$
|
|
914
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
915
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
916
|
+
if (__getOwnPropSymbols$6)
|
|
917
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
918
|
+
if (__propIsEnum$6.call(b, prop))
|
|
919
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
910
920
|
}
|
|
911
921
|
return a;
|
|
912
922
|
};
|
|
@@ -917,7 +927,7 @@ function mergeProps(props, ...restProps) {
|
|
|
917
927
|
if (restProps.every((rest) => Object.keys(rest).length === 0)) {
|
|
918
928
|
return props;
|
|
919
929
|
}
|
|
920
|
-
const result = __spreadValues$
|
|
930
|
+
const result = __spreadValues$6({}, props);
|
|
921
931
|
for (const rest of restProps) {
|
|
922
932
|
for (const key of Object.keys(rest)) {
|
|
923
933
|
result[key] = mergePropVals(key, result[key], rest[key]);
|
|
@@ -954,7 +964,7 @@ function mergePropVals(name, val1, val2) {
|
|
|
954
964
|
} else if (name === "className") {
|
|
955
965
|
return classNames(val1, val2);
|
|
956
966
|
} else if (name === "style") {
|
|
957
|
-
return __spreadValues$
|
|
967
|
+
return __spreadValues$6(__spreadValues$6({}, val1), val2);
|
|
958
968
|
} else if (name === "ref") {
|
|
959
969
|
return mergeRefs(val1, val2);
|
|
960
970
|
} else if (typeof val1 !== typeof val2) {
|
|
@@ -975,33 +985,33 @@ function mergePropVals(name, val1, val2) {
|
|
|
975
985
|
}
|
|
976
986
|
}
|
|
977
987
|
|
|
978
|
-
var __defProp$
|
|
988
|
+
var __defProp$5 = Object.defineProperty;
|
|
979
989
|
var __defProps$4 = Object.defineProperties;
|
|
980
990
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
981
|
-
var __getOwnPropSymbols$
|
|
982
|
-
var __hasOwnProp$
|
|
983
|
-
var __propIsEnum$
|
|
984
|
-
var __defNormalProp$
|
|
985
|
-
var __spreadValues$
|
|
991
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
992
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
993
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
994
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
995
|
+
var __spreadValues$5 = (a, b) => {
|
|
986
996
|
for (var prop in b || (b = {}))
|
|
987
|
-
if (__hasOwnProp$
|
|
988
|
-
__defNormalProp$
|
|
989
|
-
if (__getOwnPropSymbols$
|
|
990
|
-
for (var prop of __getOwnPropSymbols$
|
|
991
|
-
if (__propIsEnum$
|
|
992
|
-
__defNormalProp$
|
|
997
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
998
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
999
|
+
if (__getOwnPropSymbols$5)
|
|
1000
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1001
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1002
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
993
1003
|
}
|
|
994
1004
|
return a;
|
|
995
1005
|
};
|
|
996
1006
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
997
|
-
var __objRest$
|
|
1007
|
+
var __objRest$4 = (source, exclude) => {
|
|
998
1008
|
var target = {};
|
|
999
1009
|
for (var prop in source)
|
|
1000
|
-
if (__hasOwnProp$
|
|
1010
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1001
1011
|
target[prop] = source[prop];
|
|
1002
|
-
if (source != null && __getOwnPropSymbols$
|
|
1003
|
-
for (var prop of __getOwnPropSymbols$
|
|
1004
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1012
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
1013
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
1014
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
1005
1015
|
target[prop] = source[prop];
|
|
1006
1016
|
}
|
|
1007
1017
|
return target;
|
|
@@ -1031,7 +1041,7 @@ const Internal = (props) => {
|
|
|
1031
1041
|
forceRemount: () => props.setRemountKey((k) => k + 1),
|
|
1032
1042
|
formProps: props
|
|
1033
1043
|
}
|
|
1034
|
-
}, /* @__PURE__ */ React.createElement(Form, __spreadProps$4(__spreadValues$
|
|
1044
|
+
}, /* @__PURE__ */ React.createElement(Form, __spreadProps$4(__spreadValues$5({}, props), {
|
|
1035
1045
|
onValuesChange: (...args) => {
|
|
1036
1046
|
var _a2, _b2;
|
|
1037
1047
|
(_a2 = props.onValuesChange) == null ? void 0 : _a2.call(props, ...args);
|
|
@@ -1040,11 +1050,18 @@ const Internal = (props) => {
|
|
|
1040
1050
|
form,
|
|
1041
1051
|
labelCol: ((_a = props.labelCol) == null ? void 0 : _a.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.labelCol,
|
|
1042
1052
|
wrapperCol: ((_b = props.wrapperCol) == null ? void 0 : _b.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.wrapperCol
|
|
1043
|
-
}),
|
|
1053
|
+
}), /* @__PURE__ */ React.createElement("style", null, `
|
|
1054
|
+
.ant-form-item {
|
|
1055
|
+
margin-bottom: 0;
|
|
1056
|
+
}
|
|
1057
|
+
.ant-form-item-explain + div {
|
|
1058
|
+
display: none;
|
|
1059
|
+
}
|
|
1060
|
+
`), childrenNode));
|
|
1044
1061
|
};
|
|
1045
1062
|
function FormWrapper(props) {
|
|
1046
1063
|
const [remountKey, setRemountKey] = React.useState(0);
|
|
1047
|
-
return /* @__PURE__ */ React.createElement(Internal, __spreadProps$4(__spreadValues$
|
|
1064
|
+
return /* @__PURE__ */ React.createElement(Internal, __spreadProps$4(__spreadValues$5({
|
|
1048
1065
|
key: remountKey
|
|
1049
1066
|
}, props), {
|
|
1050
1067
|
setRemountKey
|
|
@@ -1347,7 +1364,7 @@ function FormItemWrapper(props) {
|
|
|
1347
1364
|
fireOnValuesChange == null ? void 0 : fireOnValuesChange();
|
|
1348
1365
|
}, [form, props.initialValue, fullFormItemName]);
|
|
1349
1366
|
}
|
|
1350
|
-
return /* @__PURE__ */ React.createElement(FormItem, __spreadValues$
|
|
1367
|
+
return /* @__PURE__ */ React.createElement(FormItem, __spreadValues$5(__spreadProps$4(__spreadValues$5({}, omit(props, "rules")), {
|
|
1351
1368
|
label: props.noLabel ? void 0 : props.label,
|
|
1352
1369
|
name: relativeFormItemName,
|
|
1353
1370
|
rules
|
|
@@ -1356,7 +1373,7 @@ function FormItemWrapper(props) {
|
|
|
1356
1373
|
}) : props.children);
|
|
1357
1374
|
}
|
|
1358
1375
|
function FormItemForwarder(_a) {
|
|
1359
|
-
var _b = _a, { formItemProps } = _b, props = __objRest$
|
|
1376
|
+
var _b = _a, { formItemProps } = _b, props = __objRest$4(_b, ["formItemProps"]);
|
|
1360
1377
|
var _a2;
|
|
1361
1378
|
const status = Form.Item.useStatus();
|
|
1362
1379
|
const internalFormCtx = React.useContext(InternalFormInstanceContext);
|
|
@@ -1369,7 +1386,7 @@ function FormItemForwarder(_a) {
|
|
|
1369
1386
|
});
|
|
1370
1387
|
return React.Children.map(formItemProps.children, (child, i) => {
|
|
1371
1388
|
var _a3;
|
|
1372
|
-
const baseProps = __spreadValues$
|
|
1389
|
+
const baseProps = __spreadValues$5(__spreadValues$5({}, (_a3 = child.props) != null ? _a3 : {}), props);
|
|
1373
1390
|
return i === 0 && isValidElement(child) ? cloneElement(child, mergeProps(baseProps, formItemProps.customizeProps(data, baseProps))) : child;
|
|
1374
1391
|
});
|
|
1375
1392
|
}
|
|
@@ -1562,7 +1579,7 @@ const FormListWrapper = React.forwardRef(function FormListWrapper2(props, ref) {
|
|
|
1562
1579
|
}
|
|
1563
1580
|
}, [props.initialValue, fullFormItemName]);
|
|
1564
1581
|
}
|
|
1565
|
-
return /* @__PURE__ */ React.createElement(FormList, __spreadProps$4(__spreadValues$
|
|
1582
|
+
return /* @__PURE__ */ React.createElement(FormList, __spreadProps$4(__spreadValues$5({}, props), {
|
|
1566
1583
|
name: relativeFormItemName != null ? relativeFormItemName : []
|
|
1567
1584
|
}), (...args) => {
|
|
1568
1585
|
operationsRef.current = args;
|
|
@@ -1692,307 +1709,67 @@ function registerFormList(loader) {
|
|
|
1692
1709
|
});
|
|
1693
1710
|
}
|
|
1694
1711
|
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
}
|
|
1757
|
-
};
|
|
1758
|
-
const COMMON_ADVANCED_PROPS = {
|
|
1759
|
-
maxLength: {
|
|
1760
|
-
type: "number",
|
|
1761
|
-
advanced: true
|
|
1762
|
-
},
|
|
1763
|
-
bordered: {
|
|
1764
|
-
type: "boolean",
|
|
1765
|
-
advanced: true,
|
|
1766
|
-
defaultValueHint: true
|
|
1767
|
-
},
|
|
1768
|
-
allowClear: {
|
|
1769
|
-
type: "boolean",
|
|
1770
|
-
advanced: true
|
|
1771
|
-
},
|
|
1772
|
-
autoFocus: {
|
|
1773
|
-
type: "boolean",
|
|
1774
|
-
advanced: true
|
|
1775
|
-
},
|
|
1776
|
-
readOnly: {
|
|
1777
|
-
type: "boolean",
|
|
1778
|
-
advanced: true
|
|
1779
|
-
}
|
|
1780
|
-
};
|
|
1781
|
-
const COMMON_EVENT_HANDLERS = {
|
|
1782
|
-
onChange: {
|
|
1783
|
-
type: "eventHandler",
|
|
1784
|
-
argTypes: [
|
|
1785
|
-
{
|
|
1786
|
-
name: "event",
|
|
1787
|
-
type: "object"
|
|
1788
|
-
}
|
|
1789
|
-
]
|
|
1790
|
-
},
|
|
1791
|
-
onPressEnter: {
|
|
1792
|
-
type: "eventHandler",
|
|
1793
|
-
argTypes: [
|
|
1794
|
-
{
|
|
1795
|
-
name: "event",
|
|
1796
|
-
type: "object"
|
|
1797
|
-
}
|
|
1798
|
-
]
|
|
1799
|
-
}
|
|
1800
|
-
};
|
|
1801
|
-
function registerInput(loader) {
|
|
1802
|
-
registerComponentHelper(loader, AntdInput, {
|
|
1803
|
-
name: "plasmic-antd5-input",
|
|
1804
|
-
displayName: "Input",
|
|
1805
|
-
props: __spreadValues$3(__spreadValues$3(__spreadValues$3({
|
|
1806
|
-
value: {
|
|
1807
|
-
type: "string"
|
|
1808
|
-
},
|
|
1809
|
-
placholder: {
|
|
1810
|
-
type: "string"
|
|
1811
|
-
},
|
|
1812
|
-
size: {
|
|
1813
|
-
type: "choice",
|
|
1814
|
-
options: ["large", "middle", "small"]
|
|
1815
|
-
},
|
|
1816
|
-
disabled: {
|
|
1817
|
-
type: "boolean"
|
|
1818
|
-
}
|
|
1819
|
-
}, COMMON_ADVANCED_PROPS), COMMON_DECORATOR_PROPS), COMMON_EVENT_HANDLERS),
|
|
1820
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1821
|
-
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1822
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1823
|
-
importName: "AntdInput"
|
|
1824
|
-
});
|
|
1825
|
-
}
|
|
1826
|
-
function registerTextArea(loader) {
|
|
1827
|
-
registerComponentHelper(loader, AntdTextArea, {
|
|
1828
|
-
name: "plasmic-antd5-textarea",
|
|
1829
|
-
parentComponentName: "plasmic-antd5-input",
|
|
1830
|
-
displayName: "Text Area",
|
|
1831
|
-
props: __spreadValues$3({
|
|
1832
|
-
value: {
|
|
1833
|
-
type: "string"
|
|
1834
|
-
},
|
|
1835
|
-
placholder: {
|
|
1836
|
-
type: "string"
|
|
1837
|
-
},
|
|
1838
|
-
disabled: {
|
|
1839
|
-
type: "boolean"
|
|
1840
|
-
},
|
|
1841
|
-
maxLength: {
|
|
1842
|
-
type: "number",
|
|
1843
|
-
advanced: true
|
|
1844
|
-
},
|
|
1845
|
-
bordered: {
|
|
1846
|
-
type: "boolean",
|
|
1847
|
-
advanced: true,
|
|
1848
|
-
defaultValueHint: true
|
|
1849
|
-
}
|
|
1850
|
-
}, COMMON_EVENT_HANDLERS),
|
|
1851
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1852
|
-
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1853
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1854
|
-
importName: "AntdTextArea"
|
|
1855
|
-
});
|
|
1856
|
-
}
|
|
1857
|
-
function registerPasswordInput(loader) {
|
|
1858
|
-
registerComponentHelper(loader, AntdPassword, {
|
|
1859
|
-
name: "plasmic-antd5-input-password",
|
|
1860
|
-
parentComponentName: "plasmic-antd5-input",
|
|
1861
|
-
displayName: "Password Input",
|
|
1862
|
-
props: __spreadValues$3({
|
|
1863
|
-
value: {
|
|
1864
|
-
type: "string"
|
|
1865
|
-
},
|
|
1866
|
-
placholder: {
|
|
1867
|
-
type: "string"
|
|
1868
|
-
},
|
|
1869
|
-
disabled: {
|
|
1870
|
-
type: "boolean"
|
|
1871
|
-
},
|
|
1872
|
-
maxLength: {
|
|
1873
|
-
type: "number",
|
|
1874
|
-
advanced: true
|
|
1875
|
-
},
|
|
1876
|
-
bordered: {
|
|
1877
|
-
type: "boolean",
|
|
1878
|
-
advanced: true,
|
|
1879
|
-
defaultValueHint: true
|
|
1880
|
-
}
|
|
1881
|
-
}, COMMON_EVENT_HANDLERS),
|
|
1882
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1883
|
-
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1884
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1885
|
-
importName: "AntdPassword"
|
|
1886
|
-
});
|
|
1887
|
-
}
|
|
1888
|
-
function registerNumberInput(loader) {
|
|
1889
|
-
registerComponentHelper(loader, AntdInputNumber, {
|
|
1890
|
-
name: "plasmic-antd5-input-number",
|
|
1891
|
-
parentComponentName: "plasmic-antd5-input",
|
|
1892
|
-
displayName: "Number Input",
|
|
1893
|
-
props: __spreadProps$3(__spreadValues$3(__spreadValues$3(__spreadValues$3({
|
|
1894
|
-
value: {
|
|
1895
|
-
type: "number"
|
|
1896
|
-
},
|
|
1897
|
-
placholder: {
|
|
1898
|
-
type: "string"
|
|
1899
|
-
},
|
|
1900
|
-
disabled: {
|
|
1901
|
-
type: "boolean"
|
|
1902
|
-
},
|
|
1903
|
-
max: {
|
|
1904
|
-
type: "number"
|
|
1905
|
-
},
|
|
1906
|
-
min: {
|
|
1907
|
-
type: "number"
|
|
1908
|
-
},
|
|
1909
|
-
step: {
|
|
1910
|
-
type: "number",
|
|
1911
|
-
helpText: "Increment or decrement step"
|
|
1912
|
-
},
|
|
1913
|
-
controls: {
|
|
1914
|
-
type: "boolean",
|
|
1915
|
-
displayName: "Show add/minus controls?",
|
|
1916
|
-
advanced: true
|
|
1917
|
-
}
|
|
1918
|
-
}, COMMON_DECORATOR_PROPS), COMMON_ADVANCED_PROPS), COMMON_EVENT_HANDLERS), {
|
|
1919
|
-
onChange: {
|
|
1920
|
-
type: "eventHandler",
|
|
1921
|
-
argTypes: [
|
|
1922
|
-
{
|
|
1923
|
-
name: "value",
|
|
1924
|
-
type: "number"
|
|
1925
|
-
}
|
|
1926
|
-
]
|
|
1927
|
-
}
|
|
1928
|
-
}),
|
|
1929
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1930
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1931
|
-
importName: "AntdInputNumber"
|
|
1932
|
-
});
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
const AntdMenu = Menu;
|
|
1936
|
-
const AntdMenuDivider = Menu.Divider;
|
|
1937
|
-
const AntdMenuItem = Menu.Item;
|
|
1938
|
-
const AntdMenuItemGroup = Menu.ItemGroup;
|
|
1939
|
-
const AntdSubMenu = Menu.SubMenu;
|
|
1940
|
-
const allowedMenuComponents = [
|
|
1941
|
-
"plasmic-antd5-menu-item",
|
|
1942
|
-
"plasmic-antd5-menu-divider",
|
|
1943
|
-
"plasmic-antd5-submenu",
|
|
1944
|
-
"plasmic-antd5-menu-item-group"
|
|
1945
|
-
];
|
|
1946
|
-
function registerMenu(loader) {
|
|
1947
|
-
registerComponentHelper(loader, AntdMenu, {
|
|
1948
|
-
name: "plasmic-antd5-menu",
|
|
1949
|
-
displayName: "Menu",
|
|
1950
|
-
props: {
|
|
1951
|
-
expandIcon: {
|
|
1952
|
-
type: "slot",
|
|
1953
|
-
hidePlaceholder: true
|
|
1954
|
-
},
|
|
1955
|
-
mode: {
|
|
1956
|
-
type: "choice",
|
|
1957
|
-
options: ["horizontal", "vertical", "inline"],
|
|
1958
|
-
description: "Type of menu",
|
|
1959
|
-
defaultValueHint: "vertical"
|
|
1960
|
-
},
|
|
1961
|
-
multiple: {
|
|
1962
|
-
type: "boolean",
|
|
1963
|
-
description: "Allows selection of multiple items",
|
|
1964
|
-
defaultValueHint: false
|
|
1965
|
-
},
|
|
1966
|
-
triggerSubMenuAction: {
|
|
1967
|
-
type: "choice",
|
|
1968
|
-
options: ["hover", "click"],
|
|
1969
|
-
description: "Which action can trigger submenu open/close",
|
|
1970
|
-
defaultValueHint: "hover",
|
|
1971
|
-
advanced: true
|
|
1972
|
-
},
|
|
1973
|
-
children: {
|
|
1974
|
-
type: "slot",
|
|
1975
|
-
allowedComponents: allowedMenuComponents,
|
|
1976
|
-
defaultValue: [
|
|
1977
|
-
{
|
|
1978
|
-
type: "component",
|
|
1979
|
-
name: "plasmic-antd5-menu-item",
|
|
1980
|
-
props: {
|
|
1981
|
-
key: "menuItemKey1"
|
|
1982
|
-
}
|
|
1983
|
-
},
|
|
1984
|
-
{
|
|
1985
|
-
type: "component",
|
|
1986
|
-
name: "plasmic-antd5-menu-item",
|
|
1987
|
-
props: {
|
|
1988
|
-
key: "menuItemKey2"
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
]
|
|
1992
|
-
},
|
|
1993
|
-
onSelect: {
|
|
1994
|
-
type: "eventHandler",
|
|
1995
|
-
argTypes: [{ name: "key", type: "string" }]
|
|
1712
|
+
const AntdMenu = Menu;
|
|
1713
|
+
const AntdMenuDivider = Menu.Divider;
|
|
1714
|
+
const AntdMenuItem = Menu.Item;
|
|
1715
|
+
const AntdMenuItemGroup = Menu.ItemGroup;
|
|
1716
|
+
const AntdSubMenu = Menu.SubMenu;
|
|
1717
|
+
const allowedMenuComponents = [
|
|
1718
|
+
"plasmic-antd5-menu-item",
|
|
1719
|
+
"plasmic-antd5-menu-divider",
|
|
1720
|
+
"plasmic-antd5-submenu",
|
|
1721
|
+
"plasmic-antd5-menu-item-group"
|
|
1722
|
+
];
|
|
1723
|
+
function registerMenu(loader) {
|
|
1724
|
+
registerComponentHelper(loader, AntdMenu, {
|
|
1725
|
+
name: "plasmic-antd5-menu",
|
|
1726
|
+
displayName: "Menu",
|
|
1727
|
+
props: {
|
|
1728
|
+
expandIcon: {
|
|
1729
|
+
type: "slot",
|
|
1730
|
+
hidePlaceholder: true
|
|
1731
|
+
},
|
|
1732
|
+
mode: {
|
|
1733
|
+
type: "choice",
|
|
1734
|
+
options: ["horizontal", "vertical", "inline"],
|
|
1735
|
+
description: "Type of menu",
|
|
1736
|
+
defaultValueHint: "vertical"
|
|
1737
|
+
},
|
|
1738
|
+
multiple: {
|
|
1739
|
+
type: "boolean",
|
|
1740
|
+
description: "Allows selection of multiple items",
|
|
1741
|
+
defaultValueHint: false
|
|
1742
|
+
},
|
|
1743
|
+
triggerSubMenuAction: {
|
|
1744
|
+
type: "choice",
|
|
1745
|
+
options: ["hover", "click"],
|
|
1746
|
+
description: "Which action can trigger submenu open/close",
|
|
1747
|
+
defaultValueHint: "hover",
|
|
1748
|
+
advanced: true
|
|
1749
|
+
},
|
|
1750
|
+
children: {
|
|
1751
|
+
type: "slot",
|
|
1752
|
+
allowedComponents: allowedMenuComponents,
|
|
1753
|
+
defaultValue: [
|
|
1754
|
+
{
|
|
1755
|
+
type: "component",
|
|
1756
|
+
name: "plasmic-antd5-menu-item",
|
|
1757
|
+
props: {
|
|
1758
|
+
key: "menuItemKey1"
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
type: "component",
|
|
1763
|
+
name: "plasmic-antd5-menu-item",
|
|
1764
|
+
props: {
|
|
1765
|
+
key: "menuItemKey2"
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
]
|
|
1769
|
+
},
|
|
1770
|
+
onSelect: {
|
|
1771
|
+
type: "eventHandler",
|
|
1772
|
+
argTypes: [{ name: "key", type: "string" }]
|
|
1996
1773
|
}
|
|
1997
1774
|
},
|
|
1998
1775
|
importPath: "@plasmicpkgs/antd5/skinny/registerMenu",
|
|
@@ -2130,39 +1907,39 @@ function registerMenu(loader) {
|
|
|
2130
1907
|
});
|
|
2131
1908
|
}
|
|
2132
1909
|
|
|
2133
|
-
var __defProp$
|
|
2134
|
-
var __defProps$
|
|
2135
|
-
var __getOwnPropDescs$
|
|
2136
|
-
var __getOwnPropSymbols$
|
|
2137
|
-
var __hasOwnProp$
|
|
2138
|
-
var __propIsEnum$
|
|
2139
|
-
var __defNormalProp$
|
|
2140
|
-
var __spreadValues$
|
|
2141
|
-
for (var prop in b || (b = {}))
|
|
2142
|
-
if (__hasOwnProp$
|
|
2143
|
-
__defNormalProp$
|
|
2144
|
-
if (__getOwnPropSymbols$
|
|
2145
|
-
for (var prop of __getOwnPropSymbols$
|
|
2146
|
-
if (__propIsEnum$
|
|
2147
|
-
__defNormalProp$
|
|
1910
|
+
var __defProp$4 = Object.defineProperty;
|
|
1911
|
+
var __defProps$3 = Object.defineProperties;
|
|
1912
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1913
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1914
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1915
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1916
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1917
|
+
var __spreadValues$4 = (a, b) => {
|
|
1918
|
+
for (var prop in b || (b = {}))
|
|
1919
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
1920
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1921
|
+
if (__getOwnPropSymbols$4)
|
|
1922
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
1923
|
+
if (__propIsEnum$4.call(b, prop))
|
|
1924
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
2148
1925
|
}
|
|
2149
1926
|
return a;
|
|
2150
1927
|
};
|
|
2151
|
-
var __spreadProps$
|
|
2152
|
-
var __objRest$
|
|
1928
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1929
|
+
var __objRest$3 = (source, exclude) => {
|
|
2153
1930
|
var target = {};
|
|
2154
1931
|
for (var prop in source)
|
|
2155
|
-
if (__hasOwnProp$
|
|
1932
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2156
1933
|
target[prop] = source[prop];
|
|
2157
|
-
if (source != null && __getOwnPropSymbols$
|
|
2158
|
-
for (var prop of __getOwnPropSymbols$
|
|
2159
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1934
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
1935
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
1936
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
2160
1937
|
target[prop] = source[prop];
|
|
2161
1938
|
}
|
|
2162
1939
|
return target;
|
|
2163
1940
|
};
|
|
2164
1941
|
function AntdModal(props) {
|
|
2165
|
-
const _a = props, { onOpenChange, onOk, onCancel, open, footer } = _a, rest = __objRest$
|
|
1942
|
+
const _a = props, { onOpenChange, onOk, onCancel, open, footer } = _a, rest = __objRest$3(_a, ["onOpenChange", "onOk", "onCancel", "open", "footer"]);
|
|
2166
1943
|
const memoOnOk = React.useMemo(() => {
|
|
2167
1944
|
if (onOpenChange || onOk) {
|
|
2168
1945
|
return (e) => {
|
|
@@ -2183,7 +1960,7 @@ function AntdModal(props) {
|
|
|
2183
1960
|
return void 0;
|
|
2184
1961
|
}
|
|
2185
1962
|
}, [onOpenChange, onCancel]);
|
|
2186
|
-
return /* @__PURE__ */ React.createElement(Modal, __spreadProps$
|
|
1963
|
+
return /* @__PURE__ */ React.createElement(Modal, __spreadProps$3(__spreadValues$4({}, rest), {
|
|
2187
1964
|
onOk: memoOnOk,
|
|
2188
1965
|
onCancel: memoOnCancel,
|
|
2189
1966
|
open,
|
|
@@ -2284,40 +2061,40 @@ function registerModal(loader) {
|
|
|
2284
2061
|
});
|
|
2285
2062
|
}
|
|
2286
2063
|
|
|
2287
|
-
var __defProp$
|
|
2288
|
-
var __defProps$
|
|
2289
|
-
var __getOwnPropDescs$
|
|
2290
|
-
var __getOwnPropSymbols$
|
|
2291
|
-
var __hasOwnProp$
|
|
2292
|
-
var __propIsEnum$
|
|
2293
|
-
var __defNormalProp$
|
|
2294
|
-
var __spreadValues$
|
|
2064
|
+
var __defProp$3 = Object.defineProperty;
|
|
2065
|
+
var __defProps$2 = Object.defineProperties;
|
|
2066
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
2067
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
2068
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
2069
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
2070
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2071
|
+
var __spreadValues$3 = (a, b) => {
|
|
2295
2072
|
for (var prop in b || (b = {}))
|
|
2296
|
-
if (__hasOwnProp$
|
|
2297
|
-
__defNormalProp$
|
|
2298
|
-
if (__getOwnPropSymbols$
|
|
2299
|
-
for (var prop of __getOwnPropSymbols$
|
|
2300
|
-
if (__propIsEnum$
|
|
2301
|
-
__defNormalProp$
|
|
2073
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
2074
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2075
|
+
if (__getOwnPropSymbols$3)
|
|
2076
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
2077
|
+
if (__propIsEnum$3.call(b, prop))
|
|
2078
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2302
2079
|
}
|
|
2303
2080
|
return a;
|
|
2304
2081
|
};
|
|
2305
|
-
var __spreadProps$
|
|
2306
|
-
var __objRest$
|
|
2082
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2083
|
+
var __objRest$2 = (source, exclude) => {
|
|
2307
2084
|
var target = {};
|
|
2308
2085
|
for (var prop in source)
|
|
2309
|
-
if (__hasOwnProp$
|
|
2086
|
+
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2310
2087
|
target[prop] = source[prop];
|
|
2311
|
-
if (source != null && __getOwnPropSymbols$
|
|
2312
|
-
for (var prop of __getOwnPropSymbols$
|
|
2313
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2088
|
+
if (source != null && __getOwnPropSymbols$3)
|
|
2089
|
+
for (var prop of __getOwnPropSymbols$3(source)) {
|
|
2090
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
|
|
2314
2091
|
target[prop] = source[prop];
|
|
2315
2092
|
}
|
|
2316
2093
|
return target;
|
|
2317
2094
|
};
|
|
2318
2095
|
const AntdRadio = Radio;
|
|
2319
2096
|
function AntdRadioGroup(props) {
|
|
2320
|
-
const _a = props, { onChange } = _a, rest = __objRest$
|
|
2097
|
+
const _a = props, { onChange } = _a, rest = __objRest$2(_a, ["onChange"]);
|
|
2321
2098
|
const wrappedOnChange = React.useMemo(() => {
|
|
2322
2099
|
if (onChange) {
|
|
2323
2100
|
return (event) => onChange(event.target.value);
|
|
@@ -2325,7 +2102,7 @@ function AntdRadioGroup(props) {
|
|
|
2325
2102
|
return void 0;
|
|
2326
2103
|
}
|
|
2327
2104
|
}, [onChange]);
|
|
2328
|
-
return /* @__PURE__ */ React.createElement(RadioGroup, __spreadProps$
|
|
2105
|
+
return /* @__PURE__ */ React.createElement(RadioGroup, __spreadProps$2(__spreadValues$3({}, rest), {
|
|
2329
2106
|
onChange: wrappedOnChange
|
|
2330
2107
|
}));
|
|
2331
2108
|
}
|
|
@@ -2444,33 +2221,33 @@ function registerRadio(loader) {
|
|
|
2444
2221
|
});
|
|
2445
2222
|
}
|
|
2446
2223
|
|
|
2447
|
-
var __defProp = Object.defineProperty;
|
|
2448
|
-
var __defProps = Object.defineProperties;
|
|
2449
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2450
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2451
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2452
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2453
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2454
|
-
var __spreadValues = (a, b) => {
|
|
2224
|
+
var __defProp$2 = Object.defineProperty;
|
|
2225
|
+
var __defProps$1 = Object.defineProperties;
|
|
2226
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2227
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
2228
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
2229
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
2230
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2231
|
+
var __spreadValues$2 = (a, b) => {
|
|
2455
2232
|
for (var prop in b || (b = {}))
|
|
2456
|
-
if (__hasOwnProp.call(b, prop))
|
|
2457
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2458
|
-
if (__getOwnPropSymbols)
|
|
2459
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
2460
|
-
if (__propIsEnum.call(b, prop))
|
|
2461
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2233
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
2234
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2235
|
+
if (__getOwnPropSymbols$2)
|
|
2236
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
2237
|
+
if (__propIsEnum$2.call(b, prop))
|
|
2238
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2462
2239
|
}
|
|
2463
2240
|
return a;
|
|
2464
2241
|
};
|
|
2465
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2466
|
-
var __objRest = (source, exclude) => {
|
|
2242
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2243
|
+
var __objRest$1 = (source, exclude) => {
|
|
2467
2244
|
var target = {};
|
|
2468
2245
|
for (var prop in source)
|
|
2469
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2246
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2470
2247
|
target[prop] = source[prop];
|
|
2471
|
-
if (source != null && __getOwnPropSymbols)
|
|
2472
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
2473
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2248
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
2249
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
2250
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
2474
2251
|
target[prop] = source[prop];
|
|
2475
2252
|
}
|
|
2476
2253
|
return target;
|
|
@@ -2485,7 +2262,7 @@ function AntdSelect(props) {
|
|
|
2485
2262
|
suffixIcon,
|
|
2486
2263
|
mode,
|
|
2487
2264
|
useChildren
|
|
2488
|
-
} = _a, rest = __objRest(_a, [
|
|
2265
|
+
} = _a, rest = __objRest$1(_a, [
|
|
2489
2266
|
"popupClassName",
|
|
2490
2267
|
"popupScopeClassName",
|
|
2491
2268
|
"defaultStylesClassName",
|
|
@@ -2493,11 +2270,11 @@ function AntdSelect(props) {
|
|
|
2493
2270
|
"mode",
|
|
2494
2271
|
"useChildren"
|
|
2495
2272
|
]);
|
|
2496
|
-
const curated = __spreadValues({}, rest);
|
|
2273
|
+
const curated = __spreadValues$2({}, rest);
|
|
2497
2274
|
if (useChildren) {
|
|
2498
2275
|
curated.options = void 0;
|
|
2499
2276
|
}
|
|
2500
|
-
return /* @__PURE__ */ React.createElement(Select, __spreadValues(__spreadProps(__spreadValues({}, curated), {
|
|
2277
|
+
return /* @__PURE__ */ React.createElement(Select, __spreadValues$2(__spreadProps$1(__spreadValues$2({}, curated), {
|
|
2501
2278
|
mode: !mode || mode === "single" ? void 0 : mode,
|
|
2502
2279
|
popupClassName: `${defaultStylesClassName} ${popupScopeClassName} ${popupClassName}`
|
|
2503
2280
|
}), suffixIcon && { suffixIcon }));
|
|
@@ -2766,10 +2543,512 @@ function registerSelect(loader) {
|
|
|
2766
2543
|
});
|
|
2767
2544
|
}
|
|
2768
2545
|
|
|
2546
|
+
var __defProp$1 = Object.defineProperty;
|
|
2547
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2548
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2549
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2550
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2551
|
+
var __spreadValues$1 = (a, b) => {
|
|
2552
|
+
for (var prop in b || (b = {}))
|
|
2553
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2554
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2555
|
+
if (__getOwnPropSymbols$1)
|
|
2556
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
2557
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2558
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2559
|
+
}
|
|
2560
|
+
return a;
|
|
2561
|
+
};
|
|
2562
|
+
var __objRest = (source, exclude) => {
|
|
2563
|
+
var target = {};
|
|
2564
|
+
for (var prop in source)
|
|
2565
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2566
|
+
target[prop] = source[prop];
|
|
2567
|
+
if (source != null && __getOwnPropSymbols$1)
|
|
2568
|
+
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
2569
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
2570
|
+
target[prop] = source[prop];
|
|
2571
|
+
}
|
|
2572
|
+
return target;
|
|
2573
|
+
};
|
|
2574
|
+
const AntdTable = React.forwardRef(function AntdTable2(props, ref) {
|
|
2575
|
+
const _a = props, {
|
|
2576
|
+
data,
|
|
2577
|
+
onSelectedRowKeysChange,
|
|
2578
|
+
onSelectedRowsChange,
|
|
2579
|
+
isSelectable,
|
|
2580
|
+
rowKey,
|
|
2581
|
+
setControlContextData,
|
|
2582
|
+
selectedRowKeys,
|
|
2583
|
+
defaultSelectedRowKeys
|
|
2584
|
+
} = _a, rest = __objRest(_a, [
|
|
2585
|
+
"data",
|
|
2586
|
+
"onSelectedRowKeysChange",
|
|
2587
|
+
"onSelectedRowsChange",
|
|
2588
|
+
"isSelectable",
|
|
2589
|
+
"rowKey",
|
|
2590
|
+
"setControlContextData",
|
|
2591
|
+
"selectedRowKeys",
|
|
2592
|
+
"defaultSelectedRowKeys"
|
|
2593
|
+
]);
|
|
2594
|
+
setControlContextData == null ? void 0 : setControlContextData(data);
|
|
2595
|
+
const isControlled = !!selectedRowKeys;
|
|
2596
|
+
const [
|
|
2597
|
+
uncontrolledSelectedRowKeys,
|
|
2598
|
+
setUncontrolledSelectedRowKeys
|
|
2599
|
+
] = React.useState(defaultSelectedRowKeys != null ? defaultSelectedRowKeys : []);
|
|
2600
|
+
const selection = isSelectable && rowKey ? {
|
|
2601
|
+
onChange: (rowKeys, rows) => {
|
|
2602
|
+
onSelectedRowsChange == null ? void 0 : onSelectedRowsChange(rows);
|
|
2603
|
+
onSelectedRowKeysChange == null ? void 0 : onSelectedRowKeysChange(rowKeys);
|
|
2604
|
+
},
|
|
2605
|
+
type: isSelectable === "single" ? "radio" : "checkbox",
|
|
2606
|
+
selectedRowKeys: isControlled ? asArray(selectedRowKeys) : uncontrolledSelectedRowKeys
|
|
2607
|
+
} : void 0;
|
|
2608
|
+
React.useImperativeHandle(ref, () => ({
|
|
2609
|
+
selectRowByIndex(index) {
|
|
2610
|
+
if (data.data && rowKey) {
|
|
2611
|
+
const row = data.data[index];
|
|
2612
|
+
const rows = row ? [row] : [];
|
|
2613
|
+
this._setSelectedRows(rows);
|
|
2614
|
+
}
|
|
2615
|
+
},
|
|
2616
|
+
selectRowsByIndexes(indexes) {
|
|
2617
|
+
if (data.data && rowKey) {
|
|
2618
|
+
const rows = indexes.map((x) => data.data[x]).filter((x) => !!x);
|
|
2619
|
+
this._setSelectedRows(rows);
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
selectRowByKey(key) {
|
|
2623
|
+
if (data.data && rowKey) {
|
|
2624
|
+
const rows = data.data.filter((r) => r[rowKey] === key);
|
|
2625
|
+
this._setSelectedRows(rows);
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2628
|
+
selectRowsByKeys(keys) {
|
|
2629
|
+
if (data.data && rowKey) {
|
|
2630
|
+
const rows = data.data.filter((r) => keys.includes(r[rowKey]));
|
|
2631
|
+
this._setSelectedRows(rows);
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
clearSelection() {
|
|
2635
|
+
this._setSelectedRows([]);
|
|
2636
|
+
},
|
|
2637
|
+
_setSelectedRows(rows) {
|
|
2638
|
+
onSelectedRowsChange == null ? void 0 : onSelectedRowsChange(rows);
|
|
2639
|
+
if (rowKey) {
|
|
2640
|
+
onSelectedRowKeysChange == null ? void 0 : onSelectedRowKeysChange(rows.map((r) => r[rowKey]));
|
|
2641
|
+
}
|
|
2642
|
+
if (!isControlled) {
|
|
2643
|
+
setUncontrolledSelectedRowKeys(rows.map((r) => r[rowKey]));
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
}), [data, onSelectedRowKeysChange, onSelectedRowsChange, isSelectable, rowKey]);
|
|
2647
|
+
return /* @__PURE__ */ React.createElement(Table, __spreadValues$1({
|
|
2648
|
+
loading: data == null ? void 0 : data.isLoading,
|
|
2649
|
+
dataSource: data == null ? void 0 : data.data,
|
|
2650
|
+
rowSelection: selection,
|
|
2651
|
+
rowKey
|
|
2652
|
+
}, rest));
|
|
2653
|
+
});
|
|
2654
|
+
const AntdColumnGroup = Table.ColumnGroup;
|
|
2655
|
+
const AntdColumn = Table.Column;
|
|
2656
|
+
function registerTable(loader) {
|
|
2657
|
+
registerComponentHelper(loader, AntdTable, {
|
|
2658
|
+
name: "plasmic-antd5-table",
|
|
2659
|
+
displayName: "Table",
|
|
2660
|
+
props: {
|
|
2661
|
+
data: {
|
|
2662
|
+
type: "dataSourceOpData",
|
|
2663
|
+
displayName: "Data"
|
|
2664
|
+
},
|
|
2665
|
+
children: {
|
|
2666
|
+
type: "slot",
|
|
2667
|
+
allowedComponents: [
|
|
2668
|
+
"plasmic-antd5-table-column",
|
|
2669
|
+
"plasmic-antd5-table-column-group"
|
|
2670
|
+
]
|
|
2671
|
+
},
|
|
2672
|
+
bordered: {
|
|
2673
|
+
type: "boolean",
|
|
2674
|
+
defaultValueHint: false,
|
|
2675
|
+
advanced: true
|
|
2676
|
+
},
|
|
2677
|
+
isSelectable: {
|
|
2678
|
+
type: "choice",
|
|
2679
|
+
options: ["single", "multiple"],
|
|
2680
|
+
displayName: "Select rows?"
|
|
2681
|
+
},
|
|
2682
|
+
rowKey: {
|
|
2683
|
+
type: "choice",
|
|
2684
|
+
options: (ps, ctx) => {
|
|
2685
|
+
if (ctx.schema) {
|
|
2686
|
+
return ctx.schema.fields.map((f) => ({
|
|
2687
|
+
value: f.id,
|
|
2688
|
+
label: f.label || f.id
|
|
2689
|
+
}));
|
|
2690
|
+
}
|
|
2691
|
+
return [];
|
|
2692
|
+
},
|
|
2693
|
+
hidden: (ps) => !ps.isSelectable
|
|
2694
|
+
},
|
|
2695
|
+
selectedRowKeys: {
|
|
2696
|
+
type: "choice",
|
|
2697
|
+
multiSelect: (ps) => ps.isSelectable === "multiple",
|
|
2698
|
+
options: (ps, ctx) => {
|
|
2699
|
+
const key = ps.rowKey;
|
|
2700
|
+
if (key && ctx.data) {
|
|
2701
|
+
return ctx.data.map((r) => r[key]);
|
|
2702
|
+
}
|
|
2703
|
+
return [];
|
|
2704
|
+
},
|
|
2705
|
+
hidden: (ps) => !ps.rowKey
|
|
2706
|
+
},
|
|
2707
|
+
onSelectedRowKeysChange: {
|
|
2708
|
+
type: "eventHandler",
|
|
2709
|
+
argTypes: [{ name: "keys", type: "object" }],
|
|
2710
|
+
hidden: (ps) => !ps.isSelectable
|
|
2711
|
+
},
|
|
2712
|
+
onSelectedRowsChange: {
|
|
2713
|
+
type: "eventHandler",
|
|
2714
|
+
argTypes: [{ name: "rows", type: "object" }],
|
|
2715
|
+
hidden: (ps) => !ps.isSelectable
|
|
2716
|
+
}
|
|
2717
|
+
},
|
|
2718
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTable",
|
|
2719
|
+
importName: "AntdTable",
|
|
2720
|
+
states: {
|
|
2721
|
+
selectedRowKeys: {
|
|
2722
|
+
type: "writable",
|
|
2723
|
+
valueProp: "selectedRowKeys",
|
|
2724
|
+
onChangeProp: "onSelectedRowKeysChange",
|
|
2725
|
+
variableType: "array"
|
|
2726
|
+
}
|
|
2727
|
+
},
|
|
2728
|
+
unstable__refActions: {
|
|
2729
|
+
selectRowByIndex: {
|
|
2730
|
+
displayName: "Select row by index",
|
|
2731
|
+
parameters: [
|
|
2732
|
+
{
|
|
2733
|
+
name: "index",
|
|
2734
|
+
displayName: "Index",
|
|
2735
|
+
type: "number"
|
|
2736
|
+
}
|
|
2737
|
+
]
|
|
2738
|
+
},
|
|
2739
|
+
selectRowByKey: {
|
|
2740
|
+
displayName: "Select row by key",
|
|
2741
|
+
parameters: [
|
|
2742
|
+
{
|
|
2743
|
+
name: "key",
|
|
2744
|
+
displayName: "Row key",
|
|
2745
|
+
type: "string"
|
|
2746
|
+
}
|
|
2747
|
+
]
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
});
|
|
2751
|
+
registerComponentHelper(loader, AntdColumn, __spreadValues$1({
|
|
2752
|
+
name: "plasmic-antd5-table-column",
|
|
2753
|
+
displayName: "Column",
|
|
2754
|
+
parentComponentName: "plasmic-antd5-table",
|
|
2755
|
+
props: {
|
|
2756
|
+
title: {
|
|
2757
|
+
type: "slot",
|
|
2758
|
+
defaultValue: "Column Name"
|
|
2759
|
+
},
|
|
2760
|
+
dataIndex: {
|
|
2761
|
+
type: "string",
|
|
2762
|
+
displayName: "Column key"
|
|
2763
|
+
},
|
|
2764
|
+
render: {
|
|
2765
|
+
type: "slot",
|
|
2766
|
+
renderPropParams: ["cell", "row", "index"],
|
|
2767
|
+
hidePlaceholder: true,
|
|
2768
|
+
displayName: "Custom render"
|
|
2769
|
+
},
|
|
2770
|
+
align: {
|
|
2771
|
+
type: "choice",
|
|
2772
|
+
options: ["left", "right", "center"],
|
|
2773
|
+
defaultValueHint: "left"
|
|
2774
|
+
},
|
|
2775
|
+
fixed: {
|
|
2776
|
+
type: "choice",
|
|
2777
|
+
options: ["left", "right"],
|
|
2778
|
+
advanced: true
|
|
2779
|
+
},
|
|
2780
|
+
colSpan: {
|
|
2781
|
+
type: "number",
|
|
2782
|
+
advanced: true
|
|
2783
|
+
}
|
|
2784
|
+
},
|
|
2785
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTable",
|
|
2786
|
+
importName: "AntdColumn"
|
|
2787
|
+
}, { isRenderless: true }));
|
|
2788
|
+
registerComponentHelper(loader, AntdColumnGroup, __spreadValues$1({
|
|
2789
|
+
name: "plasmic-antd5-table-column-group",
|
|
2790
|
+
displayName: "Column Group",
|
|
2791
|
+
parentComponentName: "plasmic-antd5-table",
|
|
2792
|
+
props: {
|
|
2793
|
+
title: {
|
|
2794
|
+
type: "slot",
|
|
2795
|
+
defaultValue: "Column Group Name"
|
|
2796
|
+
},
|
|
2797
|
+
children: {
|
|
2798
|
+
type: "slot",
|
|
2799
|
+
allowedComponents: ["plasmic-antd5-table-column"]
|
|
2800
|
+
}
|
|
2801
|
+
},
|
|
2802
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTable",
|
|
2803
|
+
importName: "AntdColumnGroup"
|
|
2804
|
+
}, { isRenderless: true }));
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
var __defProp = Object.defineProperty;
|
|
2808
|
+
var __defProps = Object.defineProperties;
|
|
2809
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2810
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2811
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2812
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2813
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2814
|
+
var __spreadValues = (a, b) => {
|
|
2815
|
+
for (var prop in b || (b = {}))
|
|
2816
|
+
if (__hasOwnProp.call(b, prop))
|
|
2817
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2818
|
+
if (__getOwnPropSymbols)
|
|
2819
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
2820
|
+
if (__propIsEnum.call(b, prop))
|
|
2821
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2822
|
+
}
|
|
2823
|
+
return a;
|
|
2824
|
+
};
|
|
2825
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2826
|
+
const AntdInput = Input;
|
|
2827
|
+
const AntdTextArea = Input.TextArea;
|
|
2828
|
+
const AntdPassword = Input.Password;
|
|
2829
|
+
const AntdInputNumber = InputNumber;
|
|
2830
|
+
const inputHelpers = {
|
|
2831
|
+
states: {
|
|
2832
|
+
value: {
|
|
2833
|
+
onChangeArgsToValue: (e) => {
|
|
2834
|
+
return e.target.value;
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
};
|
|
2839
|
+
const COMMON_HELPERS_CONFIG = {
|
|
2840
|
+
helpers: inputHelpers,
|
|
2841
|
+
importName: "inputHelpers",
|
|
2842
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput"
|
|
2843
|
+
};
|
|
2844
|
+
const COMMON_STATES = {
|
|
2845
|
+
value: {
|
|
2846
|
+
type: "writable",
|
|
2847
|
+
valueProp: "value",
|
|
2848
|
+
variableType: "text",
|
|
2849
|
+
onChangeProp: "onChange"
|
|
2850
|
+
}
|
|
2851
|
+
};
|
|
2852
|
+
const COMMON_DECORATOR_PROPS = {
|
|
2853
|
+
prefix: {
|
|
2854
|
+
type: "slot",
|
|
2855
|
+
hidePlaceholder: true
|
|
2856
|
+
},
|
|
2857
|
+
suffix: {
|
|
2858
|
+
type: "slot",
|
|
2859
|
+
hidePlaceholder: true
|
|
2860
|
+
},
|
|
2861
|
+
addonAfter: {
|
|
2862
|
+
type: "slot",
|
|
2863
|
+
hidePlaceholder: true
|
|
2864
|
+
},
|
|
2865
|
+
addonBefore: {
|
|
2866
|
+
type: "slot",
|
|
2867
|
+
hidePlaceholder: true
|
|
2868
|
+
}
|
|
2869
|
+
};
|
|
2870
|
+
const COMMON_ADVANCED_PROPS = {
|
|
2871
|
+
maxLength: {
|
|
2872
|
+
type: "number",
|
|
2873
|
+
advanced: true
|
|
2874
|
+
},
|
|
2875
|
+
bordered: {
|
|
2876
|
+
type: "boolean",
|
|
2877
|
+
advanced: true,
|
|
2878
|
+
defaultValueHint: true
|
|
2879
|
+
},
|
|
2880
|
+
allowClear: {
|
|
2881
|
+
type: "boolean",
|
|
2882
|
+
advanced: true
|
|
2883
|
+
},
|
|
2884
|
+
autoFocus: {
|
|
2885
|
+
type: "boolean",
|
|
2886
|
+
advanced: true
|
|
2887
|
+
},
|
|
2888
|
+
readOnly: {
|
|
2889
|
+
type: "boolean",
|
|
2890
|
+
advanced: true
|
|
2891
|
+
}
|
|
2892
|
+
};
|
|
2893
|
+
const COMMON_EVENT_HANDLERS = {
|
|
2894
|
+
onChange: {
|
|
2895
|
+
type: "eventHandler",
|
|
2896
|
+
argTypes: [
|
|
2897
|
+
{
|
|
2898
|
+
name: "event",
|
|
2899
|
+
type: "object"
|
|
2900
|
+
}
|
|
2901
|
+
]
|
|
2902
|
+
},
|
|
2903
|
+
onPressEnter: {
|
|
2904
|
+
type: "eventHandler",
|
|
2905
|
+
argTypes: [
|
|
2906
|
+
{
|
|
2907
|
+
name: "event",
|
|
2908
|
+
type: "object"
|
|
2909
|
+
}
|
|
2910
|
+
]
|
|
2911
|
+
}
|
|
2912
|
+
};
|
|
2913
|
+
function registerInput(loader) {
|
|
2914
|
+
registerComponentHelper(loader, AntdInput, {
|
|
2915
|
+
name: "plasmic-antd5-input",
|
|
2916
|
+
displayName: "Input",
|
|
2917
|
+
props: __spreadValues(__spreadValues(__spreadValues({
|
|
2918
|
+
value: {
|
|
2919
|
+
type: "string"
|
|
2920
|
+
},
|
|
2921
|
+
placholder: {
|
|
2922
|
+
type: "string"
|
|
2923
|
+
},
|
|
2924
|
+
size: {
|
|
2925
|
+
type: "choice",
|
|
2926
|
+
options: ["large", "middle", "small"]
|
|
2927
|
+
},
|
|
2928
|
+
disabled: {
|
|
2929
|
+
type: "boolean"
|
|
2930
|
+
}
|
|
2931
|
+
}, COMMON_ADVANCED_PROPS), COMMON_DECORATOR_PROPS), COMMON_EVENT_HANDLERS),
|
|
2932
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
2933
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
2934
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
2935
|
+
importName: "AntdInput"
|
|
2936
|
+
});
|
|
2937
|
+
}
|
|
2938
|
+
function registerTextArea(loader) {
|
|
2939
|
+
registerComponentHelper(loader, AntdTextArea, {
|
|
2940
|
+
name: "plasmic-antd5-textarea",
|
|
2941
|
+
parentComponentName: "plasmic-antd5-input",
|
|
2942
|
+
displayName: "Text Area",
|
|
2943
|
+
props: __spreadValues({
|
|
2944
|
+
value: {
|
|
2945
|
+
type: "string"
|
|
2946
|
+
},
|
|
2947
|
+
placholder: {
|
|
2948
|
+
type: "string"
|
|
2949
|
+
},
|
|
2950
|
+
disabled: {
|
|
2951
|
+
type: "boolean"
|
|
2952
|
+
},
|
|
2953
|
+
maxLength: {
|
|
2954
|
+
type: "number",
|
|
2955
|
+
advanced: true
|
|
2956
|
+
},
|
|
2957
|
+
bordered: {
|
|
2958
|
+
type: "boolean",
|
|
2959
|
+
advanced: true,
|
|
2960
|
+
defaultValueHint: true
|
|
2961
|
+
}
|
|
2962
|
+
}, COMMON_EVENT_HANDLERS),
|
|
2963
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
2964
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
2965
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
2966
|
+
importName: "AntdTextArea"
|
|
2967
|
+
});
|
|
2968
|
+
}
|
|
2969
|
+
function registerPasswordInput(loader) {
|
|
2970
|
+
registerComponentHelper(loader, AntdPassword, {
|
|
2971
|
+
name: "plasmic-antd5-input-password",
|
|
2972
|
+
parentComponentName: "plasmic-antd5-input",
|
|
2973
|
+
displayName: "Password Input",
|
|
2974
|
+
props: __spreadValues({
|
|
2975
|
+
value: {
|
|
2976
|
+
type: "string"
|
|
2977
|
+
},
|
|
2978
|
+
placholder: {
|
|
2979
|
+
type: "string"
|
|
2980
|
+
},
|
|
2981
|
+
disabled: {
|
|
2982
|
+
type: "boolean"
|
|
2983
|
+
},
|
|
2984
|
+
maxLength: {
|
|
2985
|
+
type: "number",
|
|
2986
|
+
advanced: true
|
|
2987
|
+
},
|
|
2988
|
+
bordered: {
|
|
2989
|
+
type: "boolean",
|
|
2990
|
+
advanced: true,
|
|
2991
|
+
defaultValueHint: true
|
|
2992
|
+
}
|
|
2993
|
+
}, COMMON_EVENT_HANDLERS),
|
|
2994
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
2995
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
2996
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
2997
|
+
importName: "AntdPassword"
|
|
2998
|
+
});
|
|
2999
|
+
}
|
|
3000
|
+
function registerNumberInput(loader) {
|
|
3001
|
+
registerComponentHelper(loader, AntdInputNumber, {
|
|
3002
|
+
name: "plasmic-antd5-input-number",
|
|
3003
|
+
parentComponentName: "plasmic-antd5-input",
|
|
3004
|
+
displayName: "Number Input",
|
|
3005
|
+
props: __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
3006
|
+
value: {
|
|
3007
|
+
type: "number"
|
|
3008
|
+
},
|
|
3009
|
+
placholder: {
|
|
3010
|
+
type: "string"
|
|
3011
|
+
},
|
|
3012
|
+
disabled: {
|
|
3013
|
+
type: "boolean"
|
|
3014
|
+
},
|
|
3015
|
+
max: {
|
|
3016
|
+
type: "number"
|
|
3017
|
+
},
|
|
3018
|
+
min: {
|
|
3019
|
+
type: "number"
|
|
3020
|
+
},
|
|
3021
|
+
step: {
|
|
3022
|
+
type: "number",
|
|
3023
|
+
helpText: "Increment or decrement step"
|
|
3024
|
+
},
|
|
3025
|
+
controls: {
|
|
3026
|
+
type: "boolean",
|
|
3027
|
+
displayName: "Show add/minus controls?",
|
|
3028
|
+
advanced: true
|
|
3029
|
+
}
|
|
3030
|
+
}, COMMON_DECORATOR_PROPS), COMMON_ADVANCED_PROPS), COMMON_EVENT_HANDLERS), {
|
|
3031
|
+
onChange: {
|
|
3032
|
+
type: "eventHandler",
|
|
3033
|
+
argTypes: [
|
|
3034
|
+
{
|
|
3035
|
+
name: "value",
|
|
3036
|
+
type: "number"
|
|
3037
|
+
}
|
|
3038
|
+
]
|
|
3039
|
+
}
|
|
3040
|
+
}),
|
|
3041
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
3042
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
3043
|
+
importName: "AntdInputNumber"
|
|
3044
|
+
});
|
|
3045
|
+
}
|
|
3046
|
+
|
|
2769
3047
|
function registerAll(loader) {
|
|
2770
3048
|
registerConfigProvider(loader);
|
|
2771
3049
|
registerTokens(loader);
|
|
2772
3050
|
registerSelect(loader);
|
|
3051
|
+
registerTable(loader);
|
|
2773
3052
|
registerCheckbox(loader);
|
|
2774
3053
|
registerRadio(loader);
|
|
2775
3054
|
registerModal(loader);
|