@plasmicpkgs/antd5 0.0.29 → 0.0.31
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 +1141 -468
- package/dist/antd.esm.js.map +1 -1
- package/dist/index.js +1141 -466
- package/dist/react-utils.d.ts +21 -0
- package/dist/registerDropdown.d.ts +3 -0
- package/dist/registerForm.d.ts +1 -1
- package/dist/registerMenu.d.ts +10 -0
- package/dist/registerSelect.d.ts +2 -0
- package/dist/registerTable.d.ts +26 -0
- package/package.json +3 -3
- package/skinny/react-utils.d.ts +21 -0
- package/skinny/registerButton.js +4 -0
- package/skinny/registerButton.js.map +1 -1
- package/skinny/registerConfigProvider.js +2 -1
- package/skinny/registerConfigProvider.js.map +1 -1
- package/skinny/registerDropdown.d.ts +3 -0
- package/skinny/registerDropdown.js.map +1 -1
- package/skinny/registerForm.d.ts +1 -1
- package/skinny/registerForm.js +352 -49
- package/skinny/registerForm.js.map +1 -1
- package/skinny/registerMenu.d.ts +10 -0
- package/skinny/registerMenu.js +26 -23
- package/skinny/registerMenu.js.map +1 -1
- package/skinny/registerSelect.d.ts +2 -0
- package/skinny/registerSelect.js +101 -11
- package/skinny/registerSelect.js.map +1 -1
- package/skinny/registerTable.d.ts +26 -0
package/dist/index.js
CHANGED
|
@@ -20,13 +20,15 @@ var Form = require('antd/lib/form');
|
|
|
20
20
|
var FormItem = require('antd/lib/form/FormItem');
|
|
21
21
|
var FormList = require('antd/lib/form/FormList');
|
|
22
22
|
var equal = require('fast-deep-equal');
|
|
23
|
-
var
|
|
24
|
-
var InputNumber = require('antd/lib/input-number');
|
|
23
|
+
var classNames = require('classnames');
|
|
25
24
|
var Modal = require('antd/lib/modal');
|
|
26
25
|
var Radio = require('antd/lib/radio');
|
|
27
26
|
var RadioGroup = require('antd/lib/radio/group');
|
|
28
27
|
require('antd/lib/radio/radioButton');
|
|
29
28
|
var Select = require('antd/lib/select');
|
|
29
|
+
var Table = require('antd/lib/table');
|
|
30
|
+
var Input = require('antd/lib/input');
|
|
31
|
+
var InputNumber = require('antd/lib/input-number');
|
|
30
32
|
|
|
31
33
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
32
34
|
|
|
@@ -48,12 +50,14 @@ var Form__default = /*#__PURE__*/_interopDefault(Form);
|
|
|
48
50
|
var FormItem__default = /*#__PURE__*/_interopDefault(FormItem);
|
|
49
51
|
var FormList__default = /*#__PURE__*/_interopDefault(FormList);
|
|
50
52
|
var equal__default = /*#__PURE__*/_interopDefault(equal);
|
|
51
|
-
var
|
|
52
|
-
var InputNumber__default = /*#__PURE__*/_interopDefault(InputNumber);
|
|
53
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
53
54
|
var Modal__default = /*#__PURE__*/_interopDefault(Modal);
|
|
54
55
|
var Radio__default = /*#__PURE__*/_interopDefault(Radio);
|
|
55
56
|
var RadioGroup__default = /*#__PURE__*/_interopDefault(RadioGroup);
|
|
56
57
|
var Select__default = /*#__PURE__*/_interopDefault(Select);
|
|
58
|
+
var Table__default = /*#__PURE__*/_interopDefault(Table);
|
|
59
|
+
var Input__default = /*#__PURE__*/_interopDefault(Input);
|
|
60
|
+
var InputNumber__default = /*#__PURE__*/_interopDefault(InputNumber);
|
|
57
61
|
|
|
58
62
|
function makeRegisterGlobalContext(component, meta) {
|
|
59
63
|
return function(loader) {
|
|
@@ -88,6 +92,15 @@ function traverseReactEltTree(children, callback) {
|
|
|
88
92
|
};
|
|
89
93
|
rec(children);
|
|
90
94
|
}
|
|
95
|
+
function asArray(x) {
|
|
96
|
+
if (Array.isArray(x)) {
|
|
97
|
+
return x;
|
|
98
|
+
} else if (x == null) {
|
|
99
|
+
return [];
|
|
100
|
+
} else {
|
|
101
|
+
return [x];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
91
104
|
function omit(obj, ...keys) {
|
|
92
105
|
if (Object.keys(obj).length === 0) {
|
|
93
106
|
return obj;
|
|
@@ -168,6 +181,10 @@ function registerButton(loader) {
|
|
|
168
181
|
icon: {
|
|
169
182
|
type: "slot",
|
|
170
183
|
hidePlaceholder: true
|
|
184
|
+
},
|
|
185
|
+
onClick: {
|
|
186
|
+
type: "eventHandler",
|
|
187
|
+
argTypes: []
|
|
171
188
|
}
|
|
172
189
|
},
|
|
173
190
|
importPath: "@plasmicpkgs/antd5/skinny/registerButton",
|
|
@@ -175,39 +192,39 @@ function registerButton(loader) {
|
|
|
175
192
|
});
|
|
176
193
|
}
|
|
177
194
|
|
|
178
|
-
var __defProp$
|
|
195
|
+
var __defProp$9 = Object.defineProperty;
|
|
179
196
|
var __defProps$7 = Object.defineProperties;
|
|
180
197
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
181
|
-
var __getOwnPropSymbols$
|
|
182
|
-
var __hasOwnProp$
|
|
183
|
-
var __propIsEnum$
|
|
184
|
-
var __defNormalProp$
|
|
185
|
-
var __spreadValues$
|
|
198
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
199
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
200
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
201
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
202
|
+
var __spreadValues$9 = (a, b) => {
|
|
186
203
|
for (var prop in b || (b = {}))
|
|
187
|
-
if (__hasOwnProp$
|
|
188
|
-
__defNormalProp$
|
|
189
|
-
if (__getOwnPropSymbols$
|
|
190
|
-
for (var prop of __getOwnPropSymbols$
|
|
191
|
-
if (__propIsEnum$
|
|
192
|
-
__defNormalProp$
|
|
204
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
205
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
206
|
+
if (__getOwnPropSymbols$9)
|
|
207
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
208
|
+
if (__propIsEnum$9.call(b, prop))
|
|
209
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
193
210
|
}
|
|
194
211
|
return a;
|
|
195
212
|
};
|
|
196
213
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
197
|
-
var __objRest$
|
|
214
|
+
var __objRest$7 = (source, exclude) => {
|
|
198
215
|
var target = {};
|
|
199
216
|
for (var prop in source)
|
|
200
|
-
if (__hasOwnProp$
|
|
217
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
201
218
|
target[prop] = source[prop];
|
|
202
|
-
if (source != null && __getOwnPropSymbols$
|
|
203
|
-
for (var prop of __getOwnPropSymbols$
|
|
204
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
219
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
220
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
221
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
205
222
|
target[prop] = source[prop];
|
|
206
223
|
}
|
|
207
224
|
return target;
|
|
208
225
|
};
|
|
209
226
|
function AntdCheckbox(props) {
|
|
210
|
-
const _a = props, { onChange } = _a, rest = __objRest$
|
|
227
|
+
const _a = props, { onChange } = _a, rest = __objRest$7(_a, ["onChange"]);
|
|
211
228
|
const wrappedOnChange = React__default.default.useMemo(() => {
|
|
212
229
|
if (onChange) {
|
|
213
230
|
return (event) => onChange(event.target.checked);
|
|
@@ -215,7 +232,7 @@ function AntdCheckbox(props) {
|
|
|
215
232
|
return void 0;
|
|
216
233
|
}
|
|
217
234
|
}, [onChange]);
|
|
218
|
-
return /* @__PURE__ */ React__default.default.createElement(Checkbox__default.default, __spreadProps$7(__spreadValues$
|
|
235
|
+
return /* @__PURE__ */ React__default.default.createElement(Checkbox__default.default, __spreadProps$7(__spreadValues$9({}, rest), {
|
|
219
236
|
onChange: wrappedOnChange
|
|
220
237
|
}));
|
|
221
238
|
}
|
|
@@ -326,33 +343,33 @@ function registerCheckbox(loader) {
|
|
|
326
343
|
});
|
|
327
344
|
}
|
|
328
345
|
|
|
329
|
-
var __defProp$
|
|
346
|
+
var __defProp$8 = Object.defineProperty;
|
|
330
347
|
var __defProps$6 = Object.defineProperties;
|
|
331
348
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
332
|
-
var __getOwnPropSymbols$
|
|
333
|
-
var __hasOwnProp$
|
|
334
|
-
var __propIsEnum$
|
|
335
|
-
var __defNormalProp$
|
|
336
|
-
var __spreadValues$
|
|
349
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
350
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
351
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
352
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
353
|
+
var __spreadValues$8 = (a, b) => {
|
|
337
354
|
for (var prop in b || (b = {}))
|
|
338
|
-
if (__hasOwnProp$
|
|
339
|
-
__defNormalProp$
|
|
340
|
-
if (__getOwnPropSymbols$
|
|
341
|
-
for (var prop of __getOwnPropSymbols$
|
|
342
|
-
if (__propIsEnum$
|
|
343
|
-
__defNormalProp$
|
|
355
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
356
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
357
|
+
if (__getOwnPropSymbols$8)
|
|
358
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
359
|
+
if (__propIsEnum$8.call(b, prop))
|
|
360
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
344
361
|
}
|
|
345
362
|
return a;
|
|
346
363
|
};
|
|
347
364
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
348
|
-
var __objRest$
|
|
365
|
+
var __objRest$6 = (source, exclude) => {
|
|
349
366
|
var target = {};
|
|
350
367
|
for (var prop in source)
|
|
351
|
-
if (__hasOwnProp$
|
|
368
|
+
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
352
369
|
target[prop] = source[prop];
|
|
353
|
-
if (source != null && __getOwnPropSymbols$
|
|
354
|
-
for (var prop of __getOwnPropSymbols$
|
|
355
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
370
|
+
if (source != null && __getOwnPropSymbols$8)
|
|
371
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
372
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
|
|
356
373
|
target[prop] = source[prop];
|
|
357
374
|
}
|
|
358
375
|
return target;
|
|
@@ -374,7 +391,7 @@ function themeToAntdConfig(opts) {
|
|
|
374
391
|
wireframe,
|
|
375
392
|
spacing
|
|
376
393
|
} = opts;
|
|
377
|
-
return __spreadProps$6(__spreadValues$
|
|
394
|
+
return __spreadProps$6(__spreadValues$8({}, spacing && { size: spacing }), {
|
|
378
395
|
theme: {
|
|
379
396
|
token: Object.fromEntries(Object.entries({
|
|
380
397
|
colorTextBase,
|
|
@@ -395,10 +412,10 @@ function themeToAntdConfig(opts) {
|
|
|
395
412
|
});
|
|
396
413
|
}
|
|
397
414
|
function AntdConfigProvider(props) {
|
|
398
|
-
const _a = props, { children, themeStyles } = _a, rest = __objRest$
|
|
399
|
-
return /* @__PURE__ */ React__default.default.createElement(ConfigProvider__default.default, __spreadValues$
|
|
415
|
+
const _a = props, { children, themeStyles } = _a, rest = __objRest$6(_a, ["children", "themeStyles"]);
|
|
416
|
+
return /* @__PURE__ */ React__default.default.createElement(ConfigProvider__default.default, __spreadValues$8({
|
|
400
417
|
locale: enUS__default.default
|
|
401
|
-
}, themeToAntdConfig(__spreadProps$6(__spreadValues$
|
|
418
|
+
}, themeToAntdConfig(__spreadProps$6(__spreadValues$8({}, rest), {
|
|
402
419
|
fontFamily: themeStyles.fontFamily,
|
|
403
420
|
fontSize: themeStyles.fontSize ? parseInt(themeStyles.fontSize) : void 0,
|
|
404
421
|
lineHeight: themeStyles.lineHeight ? parseInt(themeStyles.lineHeight) : void 0,
|
|
@@ -418,8 +435,8 @@ function InnerConfigProvider(props) {
|
|
|
418
435
|
const actions = React__default.default.useMemo(() => ({
|
|
419
436
|
showNotification: (opts) => {
|
|
420
437
|
var _b;
|
|
421
|
-
const _a = opts, rest = __objRest$
|
|
422
|
-
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$
|
|
438
|
+
const _a = opts, rest = __objRest$6(_a, ["type"]);
|
|
439
|
+
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$8({}, rest));
|
|
423
440
|
},
|
|
424
441
|
hideNotifications: () => {
|
|
425
442
|
app.notification.destroy();
|
|
@@ -488,7 +505,8 @@ function registerTokens(loader) {
|
|
|
488
505
|
const colorIndex = name.indexOf("color");
|
|
489
506
|
const humanName = makeNiceName(colorIndex >= 0 ? name.substring(name.indexOf("color") + "color".length) : name);
|
|
490
507
|
return {
|
|
491
|
-
name
|
|
508
|
+
name,
|
|
509
|
+
displayName: `System: ${humanName}`,
|
|
492
510
|
value: `var(--antd-${name})`,
|
|
493
511
|
type: "color"
|
|
494
512
|
};
|
|
@@ -675,7 +693,7 @@ function registerTokens(loader) {
|
|
|
675
693
|
regs.forEach((t) => registerToken__default.default(t));
|
|
676
694
|
}
|
|
677
695
|
}
|
|
678
|
-
const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __spreadProps$6(__spreadValues$
|
|
696
|
+
const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __spreadProps$6(__spreadValues$8({
|
|
679
697
|
name: "plasmic-antd5-config-provider",
|
|
680
698
|
displayName: "Ant Design System Settings",
|
|
681
699
|
props: {
|
|
@@ -780,40 +798,40 @@ const registerConfigProvider = makeRegisterGlobalContext(AntdConfigProvider, __s
|
|
|
780
798
|
importName: "AntdConfigProvider"
|
|
781
799
|
}));
|
|
782
800
|
|
|
783
|
-
var __defProp$
|
|
801
|
+
var __defProp$7 = Object.defineProperty;
|
|
784
802
|
var __defProps$5 = Object.defineProperties;
|
|
785
803
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
786
|
-
var __getOwnPropSymbols$
|
|
787
|
-
var __hasOwnProp$
|
|
788
|
-
var __propIsEnum$
|
|
789
|
-
var __defNormalProp$
|
|
790
|
-
var __spreadValues$
|
|
804
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
805
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
806
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
807
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
808
|
+
var __spreadValues$7 = (a, b) => {
|
|
791
809
|
for (var prop in b || (b = {}))
|
|
792
|
-
if (__hasOwnProp$
|
|
793
|
-
__defNormalProp$
|
|
794
|
-
if (__getOwnPropSymbols$
|
|
795
|
-
for (var prop of __getOwnPropSymbols$
|
|
796
|
-
if (__propIsEnum$
|
|
797
|
-
__defNormalProp$
|
|
810
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
811
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
812
|
+
if (__getOwnPropSymbols$7)
|
|
813
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
814
|
+
if (__propIsEnum$7.call(b, prop))
|
|
815
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
798
816
|
}
|
|
799
817
|
return a;
|
|
800
818
|
};
|
|
801
819
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
802
|
-
var __objRest$
|
|
820
|
+
var __objRest$5 = (source, exclude) => {
|
|
803
821
|
var target = {};
|
|
804
822
|
for (var prop in source)
|
|
805
|
-
if (__hasOwnProp$
|
|
823
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
806
824
|
target[prop] = source[prop];
|
|
807
|
-
if (source != null && __getOwnPropSymbols$
|
|
808
|
-
for (var prop of __getOwnPropSymbols$
|
|
809
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
825
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
826
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
827
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
810
828
|
target[prop] = source[prop];
|
|
811
829
|
}
|
|
812
830
|
return target;
|
|
813
831
|
};
|
|
814
832
|
function AntdDropdown(props) {
|
|
815
|
-
const _a = props, { children, onAction, menuItems } = _a, rest = __objRest$
|
|
816
|
-
return /* @__PURE__ */ React__default.default.createElement(Dropdown__default.default, __spreadProps$5(__spreadValues$
|
|
833
|
+
const _a = props, { children, onAction, menuItems } = _a, rest = __objRest$5(_a, ["children", "onAction", "menuItems"]);
|
|
834
|
+
return /* @__PURE__ */ React__default.default.createElement(Dropdown__default.default, __spreadProps$5(__spreadValues$7({}, rest), {
|
|
817
835
|
overlay: () => {
|
|
818
836
|
var _a2;
|
|
819
837
|
const items = (_a2 = menuItems == null ? void 0 : menuItems()) != null ? _a2 : [];
|
|
@@ -917,37 +935,131 @@ function registerDropdown(loader) {
|
|
|
917
935
|
});
|
|
918
936
|
}
|
|
919
937
|
|
|
920
|
-
var __defProp$
|
|
938
|
+
var __defProp$6 = Object.defineProperty;
|
|
939
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
940
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
941
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
942
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
943
|
+
var __spreadValues$6 = (a, b) => {
|
|
944
|
+
for (var prop in b || (b = {}))
|
|
945
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
946
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
947
|
+
if (__getOwnPropSymbols$6)
|
|
948
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
949
|
+
if (__propIsEnum$6.call(b, prop))
|
|
950
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
951
|
+
}
|
|
952
|
+
return a;
|
|
953
|
+
};
|
|
954
|
+
const isBrowser = typeof window !== "undefined";
|
|
955
|
+
const NONE = Symbol("NONE");
|
|
956
|
+
isBrowser ? React__default.default.useLayoutEffect : React__default.default.useEffect;
|
|
957
|
+
function mergeProps(props, ...restProps) {
|
|
958
|
+
if (restProps.every((rest) => Object.keys(rest).length === 0)) {
|
|
959
|
+
return props;
|
|
960
|
+
}
|
|
961
|
+
const result = __spreadValues$6({}, props);
|
|
962
|
+
for (const rest of restProps) {
|
|
963
|
+
for (const key of Object.keys(rest)) {
|
|
964
|
+
result[key] = mergePropVals(key, result[key], rest[key]);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
return result;
|
|
968
|
+
}
|
|
969
|
+
function updateRef(ref, value) {
|
|
970
|
+
if (!ref) {
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
if (typeof ref === "function") {
|
|
974
|
+
ref(value);
|
|
975
|
+
} else {
|
|
976
|
+
if (!Object.isFrozen(ref)) {
|
|
977
|
+
ref.current = value;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
function mergeRefs(...refs) {
|
|
982
|
+
return (value) => {
|
|
983
|
+
for (const ref of refs) {
|
|
984
|
+
updateRef(ref, value);
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
function mergePropVals(name, val1, val2) {
|
|
989
|
+
if (val1 === NONE || val2 === NONE) {
|
|
990
|
+
return null;
|
|
991
|
+
} else if (val1 == null) {
|
|
992
|
+
return val2;
|
|
993
|
+
} else if (val2 == null) {
|
|
994
|
+
return val1;
|
|
995
|
+
} else if (name === "className") {
|
|
996
|
+
return classNames__default.default(val1, val2);
|
|
997
|
+
} else if (name === "style") {
|
|
998
|
+
return __spreadValues$6(__spreadValues$6({}, val1), val2);
|
|
999
|
+
} else if (name === "ref") {
|
|
1000
|
+
return mergeRefs(val1, val2);
|
|
1001
|
+
} else if (typeof val1 !== typeof val2) {
|
|
1002
|
+
return val2;
|
|
1003
|
+
} else if (name.startsWith("on") && typeof val1 === "function") {
|
|
1004
|
+
return (...args) => {
|
|
1005
|
+
let res;
|
|
1006
|
+
if (typeof val1 === "function") {
|
|
1007
|
+
res = val1(...args);
|
|
1008
|
+
}
|
|
1009
|
+
if (typeof val2 === "function") {
|
|
1010
|
+
res = val2(...args);
|
|
1011
|
+
}
|
|
1012
|
+
return res;
|
|
1013
|
+
};
|
|
1014
|
+
} else {
|
|
1015
|
+
return val2;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
var __defProp$5 = Object.defineProperty;
|
|
921
1020
|
var __defProps$4 = Object.defineProperties;
|
|
922
1021
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
923
|
-
var __getOwnPropSymbols$
|
|
924
|
-
var __hasOwnProp$
|
|
925
|
-
var __propIsEnum$
|
|
926
|
-
var __defNormalProp$
|
|
927
|
-
var __spreadValues$
|
|
1022
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1023
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1024
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1025
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1026
|
+
var __spreadValues$5 = (a, b) => {
|
|
928
1027
|
for (var prop in b || (b = {}))
|
|
929
|
-
if (__hasOwnProp$
|
|
930
|
-
__defNormalProp$
|
|
931
|
-
if (__getOwnPropSymbols$
|
|
932
|
-
for (var prop of __getOwnPropSymbols$
|
|
933
|
-
if (__propIsEnum$
|
|
934
|
-
__defNormalProp$
|
|
1028
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1029
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
1030
|
+
if (__getOwnPropSymbols$5)
|
|
1031
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1032
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1033
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
935
1034
|
}
|
|
936
1035
|
return a;
|
|
937
1036
|
};
|
|
938
1037
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1038
|
+
var __objRest$4 = (source, exclude) => {
|
|
1039
|
+
var target = {};
|
|
1040
|
+
for (var prop in source)
|
|
1041
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1042
|
+
target[prop] = source[prop];
|
|
1043
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
1044
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
1045
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
1046
|
+
target[prop] = source[prop];
|
|
1047
|
+
}
|
|
1048
|
+
return target;
|
|
1049
|
+
};
|
|
939
1050
|
const PathContext = React__default.default.createContext({ relativePath: [], fullPath: [] });
|
|
940
1051
|
const InternalFormInstanceContext = React__default.default.createContext(void 0);
|
|
941
1052
|
const Internal = (props) => {
|
|
1053
|
+
var _a, _b;
|
|
942
1054
|
const [form] = Form__default.default.useForm();
|
|
943
1055
|
const values = form.getFieldsValue(true);
|
|
944
1056
|
const lastValue = React__default.default.useRef(values);
|
|
945
1057
|
const childrenNode = typeof props.children === "function" ? props.children(values, form) : props.children;
|
|
946
1058
|
const fireOnValuesChange = () => {
|
|
947
|
-
var
|
|
1059
|
+
var _a2;
|
|
948
1060
|
const values2 = form.getFieldsValue(true);
|
|
949
1061
|
if (!equal__default.default(values2, lastValue.current)) {
|
|
950
|
-
(
|
|
1062
|
+
(_a2 = props.extendedOnValuesChange) == null ? void 0 : _a2.call(props, values2);
|
|
951
1063
|
lastValue.current = values2;
|
|
952
1064
|
}
|
|
953
1065
|
};
|
|
@@ -957,20 +1069,23 @@ const Internal = (props) => {
|
|
|
957
1069
|
return /* @__PURE__ */ React__default.default.createElement(InternalFormInstanceContext.Provider, {
|
|
958
1070
|
value: {
|
|
959
1071
|
fireOnValuesChange,
|
|
960
|
-
forceRemount: () => props.setRemountKey((k) => k + 1)
|
|
1072
|
+
forceRemount: () => props.setRemountKey((k) => k + 1),
|
|
1073
|
+
formProps: props
|
|
961
1074
|
}
|
|
962
|
-
}, /* @__PURE__ */ React__default.default.createElement(Form__default.default, __spreadProps$4(__spreadValues$
|
|
1075
|
+
}, /* @__PURE__ */ React__default.default.createElement(Form__default.default, __spreadProps$4(__spreadValues$5({}, props), {
|
|
963
1076
|
onValuesChange: (...args) => {
|
|
964
|
-
var
|
|
965
|
-
(
|
|
966
|
-
(
|
|
1077
|
+
var _a2, _b2;
|
|
1078
|
+
(_a2 = props.onValuesChange) == null ? void 0 : _a2.call(props, ...args);
|
|
1079
|
+
(_b2 = props.extendedOnValuesChange) == null ? void 0 : _b2.call(props, args[1]);
|
|
967
1080
|
},
|
|
968
|
-
form
|
|
1081
|
+
form,
|
|
1082
|
+
labelCol: ((_a = props.labelCol) == null ? void 0 : _a.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.labelCol,
|
|
1083
|
+
wrapperCol: ((_b = props.wrapperCol) == null ? void 0 : _b.horizontalOnly) && props.layout !== "horizontal" ? void 0 : props.wrapperCol
|
|
969
1084
|
}), childrenNode));
|
|
970
1085
|
};
|
|
971
1086
|
function FormWrapper(props) {
|
|
972
1087
|
const [remountKey, setRemountKey] = React__default.default.useState(0);
|
|
973
|
-
return /* @__PURE__ */ React__default.default.createElement(Internal, __spreadProps$4(__spreadValues$
|
|
1088
|
+
return /* @__PURE__ */ React__default.default.createElement(Internal, __spreadProps$4(__spreadValues$5({
|
|
974
1089
|
key: remountKey
|
|
975
1090
|
}, props), {
|
|
976
1091
|
setRemountKey
|
|
@@ -979,7 +1094,7 @@ function FormWrapper(props) {
|
|
|
979
1094
|
const COMMON_ACTIONS = [
|
|
980
1095
|
{
|
|
981
1096
|
type: "button-action",
|
|
982
|
-
label: "Append new Form
|
|
1097
|
+
label: "Append new Form Item",
|
|
983
1098
|
onClick: ({ studioOps }) => {
|
|
984
1099
|
studioOps.appendToSlot({
|
|
985
1100
|
type: "component",
|
|
@@ -989,7 +1104,7 @@ const COMMON_ACTIONS = [
|
|
|
989
1104
|
},
|
|
990
1105
|
{
|
|
991
1106
|
type: "button-action",
|
|
992
|
-
label: "Append new Form
|
|
1107
|
+
label: "Append new Form Group",
|
|
993
1108
|
onClick: ({ studioOps }) => {
|
|
994
1109
|
studioOps.appendToSlot({
|
|
995
1110
|
type: "component",
|
|
@@ -999,7 +1114,7 @@ const COMMON_ACTIONS = [
|
|
|
999
1114
|
},
|
|
1000
1115
|
{
|
|
1001
1116
|
type: "button-action",
|
|
1002
|
-
label: "Append new Form
|
|
1117
|
+
label: "Append new Form List",
|
|
1003
1118
|
onClick: ({ studioOps }) => {
|
|
1004
1119
|
studioOps.appendToSlot({
|
|
1005
1120
|
type: "component",
|
|
@@ -1009,6 +1124,33 @@ const COMMON_ACTIONS = [
|
|
|
1009
1124
|
}
|
|
1010
1125
|
];
|
|
1011
1126
|
function registerForm(loader) {
|
|
1127
|
+
const colProp = (displayName, defaultValue) => ({
|
|
1128
|
+
type: "object",
|
|
1129
|
+
displayName,
|
|
1130
|
+
advanced: true,
|
|
1131
|
+
fields: {
|
|
1132
|
+
span: {
|
|
1133
|
+
type: "number",
|
|
1134
|
+
displayName: "Grid columns",
|
|
1135
|
+
description: "The number of grid columns to span (24 columns available)",
|
|
1136
|
+
min: 1,
|
|
1137
|
+
max: 24
|
|
1138
|
+
},
|
|
1139
|
+
offset: {
|
|
1140
|
+
type: "number",
|
|
1141
|
+
displayName: "Offset columns",
|
|
1142
|
+
description: "Number of grid columns to skip from the left",
|
|
1143
|
+
min: 0,
|
|
1144
|
+
max: 23
|
|
1145
|
+
},
|
|
1146
|
+
horizontalOnly: {
|
|
1147
|
+
type: "boolean",
|
|
1148
|
+
displayName: "Horizontal only",
|
|
1149
|
+
description: "Only apply to horizontal layout"
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
defaultValue
|
|
1153
|
+
});
|
|
1012
1154
|
registerComponentHelper(loader, FormWrapper, {
|
|
1013
1155
|
name: "plasmic-antd5-form",
|
|
1014
1156
|
displayName: "Form",
|
|
@@ -1018,11 +1160,33 @@ function registerForm(loader) {
|
|
|
1018
1160
|
defaultValue: [
|
|
1019
1161
|
{
|
|
1020
1162
|
type: "component",
|
|
1021
|
-
name: "plasmic-antd5-form-item"
|
|
1163
|
+
name: "plasmic-antd5-form-item",
|
|
1164
|
+
props: {
|
|
1165
|
+
label: {
|
|
1166
|
+
type: "text",
|
|
1167
|
+
value: "Name"
|
|
1168
|
+
},
|
|
1169
|
+
name: "name",
|
|
1170
|
+
children: {
|
|
1171
|
+
type: "component",
|
|
1172
|
+
name: "plasmic-antd5-input"
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1022
1175
|
},
|
|
1023
1176
|
{
|
|
1024
1177
|
type: "component",
|
|
1025
|
-
name: "plasmic-antd5-form-item"
|
|
1178
|
+
name: "plasmic-antd5-form-item",
|
|
1179
|
+
props: {
|
|
1180
|
+
label: {
|
|
1181
|
+
type: "text",
|
|
1182
|
+
value: "Message"
|
|
1183
|
+
},
|
|
1184
|
+
name: "message",
|
|
1185
|
+
children: {
|
|
1186
|
+
type: "component",
|
|
1187
|
+
name: "plasmic-antd5-textarea"
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1026
1190
|
},
|
|
1027
1191
|
{
|
|
1028
1192
|
type: "default-component",
|
|
@@ -1044,21 +1208,51 @@ function registerForm(loader) {
|
|
|
1044
1208
|
layout: {
|
|
1045
1209
|
type: "choice",
|
|
1046
1210
|
options: ["horizontal", "vertical", "inline"],
|
|
1047
|
-
defaultValue: "
|
|
1211
|
+
defaultValue: "vertical"
|
|
1212
|
+
},
|
|
1213
|
+
labelAlign: {
|
|
1214
|
+
type: "choice",
|
|
1215
|
+
options: ["left", "right"],
|
|
1216
|
+
defaultValueHint: "right",
|
|
1217
|
+
advanced: true
|
|
1048
1218
|
},
|
|
1219
|
+
labelCol: colProp("Label layout", {
|
|
1220
|
+
span: 8,
|
|
1221
|
+
horizontalOnly: true
|
|
1222
|
+
}),
|
|
1223
|
+
wrapperCol: colProp("Field layout", {
|
|
1224
|
+
span: 16,
|
|
1225
|
+
horizontalOnly: true
|
|
1226
|
+
}),
|
|
1049
1227
|
colon: {
|
|
1050
1228
|
type: "boolean",
|
|
1051
|
-
description: `
|
|
1052
|
-
|
|
1229
|
+
description: `Show a colon after the label by default (only for horizontal layout)`,
|
|
1230
|
+
defaultValueHint: true,
|
|
1053
1231
|
advanced: true
|
|
1054
1232
|
},
|
|
1055
1233
|
requiredMark: {
|
|
1056
|
-
displayName: "
|
|
1057
|
-
type: "
|
|
1058
|
-
|
|
1234
|
+
displayName: "Required/optional mark",
|
|
1235
|
+
type: "choice",
|
|
1236
|
+
options: [
|
|
1237
|
+
{
|
|
1238
|
+
value: "optional",
|
|
1239
|
+
label: "Indicate optional fields"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
value: true,
|
|
1243
|
+
label: "Indicate required fields with asterisk"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
value: false,
|
|
1247
|
+
label: "Show no indicators"
|
|
1248
|
+
}
|
|
1249
|
+
],
|
|
1250
|
+
advanced: true,
|
|
1251
|
+
defaultValueHint: true
|
|
1059
1252
|
},
|
|
1060
1253
|
extendedOnValuesChange: {
|
|
1061
1254
|
type: "eventHandler",
|
|
1255
|
+
displayName: "On values change",
|
|
1062
1256
|
argTypes: [
|
|
1063
1257
|
{
|
|
1064
1258
|
name: "changedValues",
|
|
@@ -1072,6 +1266,7 @@ function registerForm(loader) {
|
|
|
1072
1266
|
},
|
|
1073
1267
|
onFinish: {
|
|
1074
1268
|
type: "eventHandler",
|
|
1269
|
+
displayName: "On submit",
|
|
1075
1270
|
argTypes: [
|
|
1076
1271
|
{
|
|
1077
1272
|
name: "values",
|
|
@@ -1081,6 +1276,7 @@ function registerForm(loader) {
|
|
|
1081
1276
|
},
|
|
1082
1277
|
onFinishFailed: {
|
|
1083
1278
|
type: "eventHandler",
|
|
1279
|
+
displayName: "On invalid submit",
|
|
1084
1280
|
argTypes: [
|
|
1085
1281
|
{
|
|
1086
1282
|
name: "data",
|
|
@@ -1090,9 +1286,9 @@ function registerForm(loader) {
|
|
|
1090
1286
|
},
|
|
1091
1287
|
validateTrigger: {
|
|
1092
1288
|
type: "choice",
|
|
1093
|
-
options: ["onSubmit", "onChange"],
|
|
1289
|
+
options: ["onSubmit", "onChange", "onBlur"],
|
|
1094
1290
|
multiSelect: true,
|
|
1095
|
-
|
|
1291
|
+
defaultValueHint: ["onChange"],
|
|
1096
1292
|
advanced: true
|
|
1097
1293
|
}
|
|
1098
1294
|
},
|
|
@@ -1160,40 +1356,68 @@ const useFormItemFullName = (name) => {
|
|
|
1160
1356
|
const pathCtx = React__default.default.useContext(PathContext);
|
|
1161
1357
|
return typeof name === "object" ? [...pathCtx.fullPath, ...name] : typeof name === "string" ? [...pathCtx.fullPath, name] : void 0;
|
|
1162
1358
|
};
|
|
1359
|
+
function useFormInstanceMaybe() {
|
|
1360
|
+
return Form__default.default.useFormInstance();
|
|
1361
|
+
}
|
|
1163
1362
|
function FormItemWrapper(props) {
|
|
1164
|
-
var _a;
|
|
1363
|
+
var _a, _b;
|
|
1165
1364
|
const relativeFormItemName = useFormItemRelativeName(props.name);
|
|
1166
1365
|
const fullFormItemName = useFormItemFullName(props.name);
|
|
1167
1366
|
const rules = props.rules ? plasmicRulesToAntdRules(props.rules) : void 0;
|
|
1168
1367
|
const inCanvas = !!host.usePlasmicCanvasContext();
|
|
1169
1368
|
if (inCanvas) {
|
|
1170
|
-
const form =
|
|
1369
|
+
const form = useFormInstanceMaybe();
|
|
1171
1370
|
const prevPropValues = React__default.default.useRef({
|
|
1172
1371
|
initialValue: props.initialValue,
|
|
1173
1372
|
name: props.name
|
|
1174
1373
|
});
|
|
1175
|
-
const
|
|
1374
|
+
const internalFormCtx = React__default.default.useContext(InternalFormInstanceContext);
|
|
1375
|
+
const { fireOnValuesChange, forceRemount } = internalFormCtx != null ? internalFormCtx : {};
|
|
1376
|
+
(_a = props.setControlContextData) == null ? void 0 : _a.call(props, {
|
|
1377
|
+
internalFormCtx
|
|
1378
|
+
});
|
|
1176
1379
|
React__default.default.useEffect(() => {
|
|
1177
1380
|
if (prevPropValues.current.name !== props.name) {
|
|
1178
1381
|
forceRemount == null ? void 0 : forceRemount();
|
|
1179
1382
|
}
|
|
1180
|
-
if (!fullFormItemName || form.getFieldValue(fullFormItemName) !== prevPropValues.current.initialValue) {
|
|
1383
|
+
if (!fullFormItemName || (form == null ? void 0 : form.getFieldValue(fullFormItemName)) !== prevPropValues.current.initialValue) {
|
|
1181
1384
|
return;
|
|
1182
1385
|
}
|
|
1183
|
-
form.setFieldValue(fullFormItemName, props.initialValue);
|
|
1386
|
+
form == null ? void 0 : form.setFieldValue(fullFormItemName, props.initialValue);
|
|
1184
1387
|
prevPropValues.current.initialValue = props.initialValue;
|
|
1185
1388
|
fireOnValuesChange == null ? void 0 : fireOnValuesChange();
|
|
1186
|
-
}, [props.initialValue, fullFormItemName]);
|
|
1389
|
+
}, [form, props.initialValue, fullFormItemName]);
|
|
1187
1390
|
}
|
|
1188
|
-
return /* @__PURE__ */ React__default.default.createElement(FormItem__default.default, __spreadProps$4(__spreadValues$
|
|
1391
|
+
return /* @__PURE__ */ React__default.default.createElement(FormItem__default.default, __spreadValues$5(__spreadProps$4(__spreadValues$5({}, omit(props, "rules")), {
|
|
1392
|
+
label: props.noLabel ? void 0 : props.label,
|
|
1189
1393
|
name: relativeFormItemName,
|
|
1190
1394
|
rules
|
|
1191
|
-
}))
|
|
1395
|
+
}), props.helpTextMode === "extra" ? { extra: props.help } : props.helpTextMode === "help" ? { help: (_b = props.help) != null ? _b : "" } : {}), props.customizeProps ? /* @__PURE__ */ React__default.default.createElement(FormItemForwarder, {
|
|
1396
|
+
formItemProps: props
|
|
1397
|
+
}) : props.children);
|
|
1398
|
+
}
|
|
1399
|
+
function FormItemForwarder(_a) {
|
|
1400
|
+
var _b = _a, { formItemProps } = _b, props = __objRest$4(_b, ["formItemProps"]);
|
|
1401
|
+
var _a2;
|
|
1402
|
+
const status = Form__default.default.Item.useStatus();
|
|
1403
|
+
const internalFormCtx = React__default.default.useContext(InternalFormInstanceContext);
|
|
1404
|
+
const data = {
|
|
1405
|
+
status: status.status
|
|
1406
|
+
};
|
|
1407
|
+
(_a2 = props.setControlContextData) == null ? void 0 : _a2.call(props, {
|
|
1408
|
+
internalFormCtx,
|
|
1409
|
+
status
|
|
1410
|
+
});
|
|
1411
|
+
return React__default.default.Children.map(formItemProps.children, (child, i) => {
|
|
1412
|
+
var _a3;
|
|
1413
|
+
const baseProps = __spreadValues$5(__spreadValues$5({}, (_a3 = child.props) != null ? _a3 : {}), props);
|
|
1414
|
+
return i === 0 && React.isValidElement(child) ? React.cloneElement(child, mergeProps(baseProps, formItemProps.customizeProps(data, baseProps))) : child;
|
|
1415
|
+
});
|
|
1192
1416
|
}
|
|
1193
1417
|
function registerFormItem(loader) {
|
|
1194
1418
|
registerComponentHelper(loader, FormItemWrapper, {
|
|
1195
1419
|
name: "plasmic-antd5-form-item",
|
|
1196
|
-
displayName: "Form
|
|
1420
|
+
displayName: "Form Item",
|
|
1197
1421
|
parentComponentName: "plasmic-antd5-form",
|
|
1198
1422
|
props: {
|
|
1199
1423
|
label: {
|
|
@@ -1220,12 +1444,18 @@ function registerFormItem(loader) {
|
|
|
1220
1444
|
type: "boolean"
|
|
1221
1445
|
},
|
|
1222
1446
|
rules: {
|
|
1223
|
-
type: "formValidationRules"
|
|
1224
|
-
|
|
1447
|
+
type: "formValidationRules"
|
|
1448
|
+
},
|
|
1449
|
+
noLabel: {
|
|
1450
|
+
type: "boolean",
|
|
1451
|
+
advanced: true
|
|
1225
1452
|
},
|
|
1226
1453
|
colon: {
|
|
1227
1454
|
type: "boolean",
|
|
1228
|
-
|
|
1455
|
+
defaultValueHint: (_ps, ctx) => {
|
|
1456
|
+
var _a, _b;
|
|
1457
|
+
return (_b = (_a = ctx == null ? void 0 : ctx.internalFormCtx) == null ? void 0 : _a.formProps.colon) != null ? _b : true;
|
|
1458
|
+
},
|
|
1229
1459
|
advanced: true
|
|
1230
1460
|
},
|
|
1231
1461
|
labelAlign: {
|
|
@@ -1236,6 +1466,66 @@ function registerFormItem(loader) {
|
|
|
1236
1466
|
hidden: {
|
|
1237
1467
|
type: "boolean",
|
|
1238
1468
|
advanced: true
|
|
1469
|
+
},
|
|
1470
|
+
validateTrigger: {
|
|
1471
|
+
type: "choice",
|
|
1472
|
+
options: ["onSubmit", "onChange", "onBlur"],
|
|
1473
|
+
multiSelect: true,
|
|
1474
|
+
advanced: true
|
|
1475
|
+
},
|
|
1476
|
+
shouldUpdate: {
|
|
1477
|
+
type: "boolean",
|
|
1478
|
+
advanced: true,
|
|
1479
|
+
displayName: "Always re-render",
|
|
1480
|
+
description: "Form items normally only re-render when the corresponding form value changes, for performance. This forces it to always re-render."
|
|
1481
|
+
},
|
|
1482
|
+
helpTextMode: {
|
|
1483
|
+
type: "choice",
|
|
1484
|
+
displayName: "Help text",
|
|
1485
|
+
options: [
|
|
1486
|
+
{
|
|
1487
|
+
value: "errors",
|
|
1488
|
+
label: "Validation errors"
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
value: "extra",
|
|
1492
|
+
label: "Custom help text and validation errors"
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
value: "help",
|
|
1496
|
+
label: "Custom help text, no validation errors"
|
|
1497
|
+
}
|
|
1498
|
+
],
|
|
1499
|
+
defaultValueHint: "Show validation errors",
|
|
1500
|
+
description: "What to show in the help text. Edit help text by editing the 'help' slot in the outline."
|
|
1501
|
+
},
|
|
1502
|
+
help: {
|
|
1503
|
+
type: "slot",
|
|
1504
|
+
hidden: (ps) => {
|
|
1505
|
+
var _a;
|
|
1506
|
+
return !["extra", "help"].includes((_a = ps.helpTextMode) != null ? _a : "");
|
|
1507
|
+
},
|
|
1508
|
+
hidePlaceholder: true
|
|
1509
|
+
},
|
|
1510
|
+
customizeProps: {
|
|
1511
|
+
type: "function",
|
|
1512
|
+
description: "Customize the props passed into the wrapped field component. Takes the current status ('success', 'warning', 'error', or 'validating').)",
|
|
1513
|
+
argNames: ["fieldData"],
|
|
1514
|
+
argValues: (_ps, ctx) => {
|
|
1515
|
+
var _a;
|
|
1516
|
+
return [
|
|
1517
|
+
{
|
|
1518
|
+
status: (_a = ctx == null ? void 0 : ctx.status) == null ? void 0 : _a.status
|
|
1519
|
+
}
|
|
1520
|
+
];
|
|
1521
|
+
},
|
|
1522
|
+
advanced: true
|
|
1523
|
+
},
|
|
1524
|
+
noStyle: {
|
|
1525
|
+
type: "boolean",
|
|
1526
|
+
displayName: "Field only",
|
|
1527
|
+
description: "Don't render anything but the wrapped field component - so no label, help text, validation error, etc.",
|
|
1528
|
+
advanced: true
|
|
1239
1529
|
}
|
|
1240
1530
|
},
|
|
1241
1531
|
importPath: "@plasmicpkgs/antd5/skinny/registerForm",
|
|
@@ -1254,7 +1544,7 @@ function FormGroup(props) {
|
|
|
1254
1544
|
function registerFormGroup(loader) {
|
|
1255
1545
|
registerComponentHelper(loader, FormGroup, {
|
|
1256
1546
|
name: "plasmic-antd5-form-group",
|
|
1257
|
-
displayName: "Form
|
|
1547
|
+
displayName: "Form Group",
|
|
1258
1548
|
parentComponentName: "plasmic-antd5-form",
|
|
1259
1549
|
actions: COMMON_ACTIONS,
|
|
1260
1550
|
props: {
|
|
@@ -1296,7 +1586,7 @@ const FormListWrapper = React__default.default.forwardRef(function FormListWrapp
|
|
|
1296
1586
|
}), [operationsRef]);
|
|
1297
1587
|
const inCanvas = !!host.usePlasmicCanvasContext();
|
|
1298
1588
|
if (inCanvas) {
|
|
1299
|
-
const form =
|
|
1589
|
+
const form = useFormInstanceMaybe();
|
|
1300
1590
|
const prevPropValues = React__default.default.useRef({
|
|
1301
1591
|
initialValue: props.initialValue,
|
|
1302
1592
|
name: props.name
|
|
@@ -1307,13 +1597,13 @@ const FormListWrapper = React__default.default.forwardRef(function FormListWrapp
|
|
|
1307
1597
|
forceRemount == null ? void 0 : forceRemount();
|
|
1308
1598
|
}
|
|
1309
1599
|
if (fullFormItemName) {
|
|
1310
|
-
form.setFieldValue(fullFormItemName, props.initialValue);
|
|
1600
|
+
form == null ? void 0 : form.setFieldValue(fullFormItemName, props.initialValue);
|
|
1311
1601
|
prevPropValues.current.initialValue = props.initialValue;
|
|
1312
1602
|
fireOnValuesChange == null ? void 0 : fireOnValuesChange();
|
|
1313
1603
|
}
|
|
1314
1604
|
}, [props.initialValue, fullFormItemName]);
|
|
1315
1605
|
}
|
|
1316
|
-
return /* @__PURE__ */ React__default.default.createElement(FormList__default.default, __spreadProps$4(__spreadValues$
|
|
1606
|
+
return /* @__PURE__ */ React__default.default.createElement(FormList__default.default, __spreadProps$4(__spreadValues$5({}, props), {
|
|
1317
1607
|
name: relativeFormItemName != null ? relativeFormItemName : []
|
|
1318
1608
|
}), (...args) => {
|
|
1319
1609
|
operationsRef.current = args;
|
|
@@ -1335,33 +1625,63 @@ function registerFormList(loader) {
|
|
|
1335
1625
|
registerComponentHelper(loader, FormListWrapper, {
|
|
1336
1626
|
name: "plasmic-antd5-form-list",
|
|
1337
1627
|
parentComponentName: "plasmic-antd5-form",
|
|
1338
|
-
displayName: "Form
|
|
1628
|
+
displayName: "Form List",
|
|
1339
1629
|
actions: COMMON_ACTIONS,
|
|
1340
1630
|
props: {
|
|
1341
1631
|
children: {
|
|
1342
1632
|
type: "slot",
|
|
1343
1633
|
defaultValue: [
|
|
1344
1634
|
{
|
|
1345
|
-
type: "
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1635
|
+
type: "hbox",
|
|
1636
|
+
children: [
|
|
1637
|
+
{
|
|
1638
|
+
type: "component",
|
|
1639
|
+
name: "plasmic-antd5-form-item",
|
|
1640
|
+
props: {
|
|
1641
|
+
name: "firstName",
|
|
1642
|
+
label: {
|
|
1643
|
+
type: "text",
|
|
1644
|
+
value: "First name"
|
|
1645
|
+
},
|
|
1646
|
+
children: {
|
|
1647
|
+
type: "component",
|
|
1648
|
+
name: "plasmic-antd5-input"
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
type: "component",
|
|
1654
|
+
name: "plasmic-antd5-form-item",
|
|
1655
|
+
props: {
|
|
1656
|
+
name: "lastName",
|
|
1657
|
+
label: {
|
|
1658
|
+
type: "text",
|
|
1659
|
+
value: "Last name"
|
|
1660
|
+
},
|
|
1661
|
+
children: {
|
|
1662
|
+
type: "component",
|
|
1663
|
+
name: "plasmic-antd5-input"
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
]
|
|
1350
1668
|
}
|
|
1351
1669
|
]
|
|
1352
1670
|
},
|
|
1353
1671
|
name: {
|
|
1354
1672
|
type: "string",
|
|
1355
|
-
defaultValue: "
|
|
1673
|
+
defaultValue: "guests"
|
|
1356
1674
|
},
|
|
1357
1675
|
initialValue: {
|
|
1358
|
-
type: "
|
|
1676
|
+
type: "array",
|
|
1359
1677
|
defaultValue: [
|
|
1360
1678
|
{
|
|
1361
|
-
|
|
1679
|
+
firstName: "Jane",
|
|
1680
|
+
lastName: "Doe"
|
|
1362
1681
|
},
|
|
1363
1682
|
{
|
|
1364
|
-
|
|
1683
|
+
firstName: "John",
|
|
1684
|
+
lastName: "Smith"
|
|
1365
1685
|
}
|
|
1366
1686
|
]
|
|
1367
1687
|
}
|
|
@@ -1413,251 +1733,17 @@ function registerFormList(loader) {
|
|
|
1413
1733
|
});
|
|
1414
1734
|
}
|
|
1415
1735
|
|
|
1416
|
-
var __defProp$3 = Object.defineProperty;
|
|
1417
|
-
var __defProps$3 = Object.defineProperties;
|
|
1418
|
-
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1419
|
-
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
1420
|
-
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
1421
|
-
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
1422
|
-
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1423
|
-
var __spreadValues$3 = (a, b) => {
|
|
1424
|
-
for (var prop in b || (b = {}))
|
|
1425
|
-
if (__hasOwnProp$3.call(b, prop))
|
|
1426
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
1427
|
-
if (__getOwnPropSymbols$3)
|
|
1428
|
-
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
1429
|
-
if (__propIsEnum$3.call(b, prop))
|
|
1430
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
1431
|
-
}
|
|
1432
|
-
return a;
|
|
1433
|
-
};
|
|
1434
|
-
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1435
|
-
const AntdInput = Input__default.default;
|
|
1436
|
-
const AntdTextArea = Input__default.default.TextArea;
|
|
1437
|
-
const AntdPassword = Input__default.default.Password;
|
|
1438
|
-
const AntdInputNumber = InputNumber__default.default;
|
|
1439
|
-
const inputHelpers = {
|
|
1440
|
-
states: {
|
|
1441
|
-
value: {
|
|
1442
|
-
onChangeArgsToValue: (e) => {
|
|
1443
|
-
return e.target.value;
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
};
|
|
1448
|
-
const COMMON_HELPERS_CONFIG = {
|
|
1449
|
-
helpers: inputHelpers,
|
|
1450
|
-
importName: "inputHelpers",
|
|
1451
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput"
|
|
1452
|
-
};
|
|
1453
|
-
const COMMON_STATES = {
|
|
1454
|
-
value: {
|
|
1455
|
-
type: "writable",
|
|
1456
|
-
valueProp: "value",
|
|
1457
|
-
variableType: "text",
|
|
1458
|
-
onChangeProp: "onChange"
|
|
1459
|
-
}
|
|
1460
|
-
};
|
|
1461
|
-
const COMMON_DECORATOR_PROPS = {
|
|
1462
|
-
prefix: {
|
|
1463
|
-
type: "slot",
|
|
1464
|
-
hidePlaceholder: true
|
|
1465
|
-
},
|
|
1466
|
-
suffix: {
|
|
1467
|
-
type: "slot",
|
|
1468
|
-
hidePlaceholder: true
|
|
1469
|
-
},
|
|
1470
|
-
addonAfter: {
|
|
1471
|
-
type: "slot",
|
|
1472
|
-
hidePlaceholder: true
|
|
1473
|
-
},
|
|
1474
|
-
addonBefore: {
|
|
1475
|
-
type: "slot",
|
|
1476
|
-
hidePlaceholder: true
|
|
1477
|
-
}
|
|
1478
|
-
};
|
|
1479
|
-
const COMMON_ADVANCED_PROPS = {
|
|
1480
|
-
maxLength: {
|
|
1481
|
-
type: "number",
|
|
1482
|
-
advanced: true
|
|
1483
|
-
},
|
|
1484
|
-
bordered: {
|
|
1485
|
-
type: "boolean",
|
|
1486
|
-
advanced: true,
|
|
1487
|
-
defaultValueHint: true
|
|
1488
|
-
},
|
|
1489
|
-
allowClear: {
|
|
1490
|
-
type: "boolean",
|
|
1491
|
-
advanced: true
|
|
1492
|
-
},
|
|
1493
|
-
autoFocus: {
|
|
1494
|
-
type: "boolean",
|
|
1495
|
-
advanced: true
|
|
1496
|
-
},
|
|
1497
|
-
readOnly: {
|
|
1498
|
-
type: "boolean",
|
|
1499
|
-
advanced: true
|
|
1500
|
-
}
|
|
1501
|
-
};
|
|
1502
|
-
const COMMON_EVENT_HANDLERS = {
|
|
1503
|
-
onChange: {
|
|
1504
|
-
type: "eventHandler",
|
|
1505
|
-
argTypes: [
|
|
1506
|
-
{
|
|
1507
|
-
name: "event",
|
|
1508
|
-
type: "object"
|
|
1509
|
-
}
|
|
1510
|
-
]
|
|
1511
|
-
},
|
|
1512
|
-
onPressEnter: {
|
|
1513
|
-
type: "eventHandler",
|
|
1514
|
-
argTypes: [
|
|
1515
|
-
{
|
|
1516
|
-
name: "event",
|
|
1517
|
-
type: "object"
|
|
1518
|
-
}
|
|
1519
|
-
]
|
|
1520
|
-
}
|
|
1521
|
-
};
|
|
1522
|
-
function registerInput(loader) {
|
|
1523
|
-
registerComponentHelper(loader, AntdInput, {
|
|
1524
|
-
name: "plasmic-antd5-input",
|
|
1525
|
-
displayName: "Input",
|
|
1526
|
-
props: __spreadValues$3(__spreadValues$3(__spreadValues$3({
|
|
1527
|
-
value: {
|
|
1528
|
-
type: "string"
|
|
1529
|
-
},
|
|
1530
|
-
placholder: {
|
|
1531
|
-
type: "string"
|
|
1532
|
-
},
|
|
1533
|
-
size: {
|
|
1534
|
-
type: "choice",
|
|
1535
|
-
options: ["large", "middle", "small"]
|
|
1536
|
-
},
|
|
1537
|
-
disabled: {
|
|
1538
|
-
type: "boolean"
|
|
1539
|
-
}
|
|
1540
|
-
}, COMMON_ADVANCED_PROPS), COMMON_DECORATOR_PROPS), COMMON_EVENT_HANDLERS),
|
|
1541
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1542
|
-
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1543
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1544
|
-
importName: "AntdInput"
|
|
1545
|
-
});
|
|
1546
|
-
}
|
|
1547
|
-
function registerTextArea(loader) {
|
|
1548
|
-
registerComponentHelper(loader, AntdTextArea, {
|
|
1549
|
-
name: "plasmic-antd5-textarea",
|
|
1550
|
-
parentComponentName: "plasmic-antd5-input",
|
|
1551
|
-
displayName: "Text Area",
|
|
1552
|
-
props: __spreadValues$3({
|
|
1553
|
-
value: {
|
|
1554
|
-
type: "string"
|
|
1555
|
-
},
|
|
1556
|
-
placholder: {
|
|
1557
|
-
type: "string"
|
|
1558
|
-
},
|
|
1559
|
-
disabled: {
|
|
1560
|
-
type: "boolean"
|
|
1561
|
-
},
|
|
1562
|
-
maxLength: {
|
|
1563
|
-
type: "number",
|
|
1564
|
-
advanced: true
|
|
1565
|
-
},
|
|
1566
|
-
bordered: {
|
|
1567
|
-
type: "boolean",
|
|
1568
|
-
advanced: true,
|
|
1569
|
-
defaultValueHint: true
|
|
1570
|
-
}
|
|
1571
|
-
}, COMMON_EVENT_HANDLERS),
|
|
1572
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1573
|
-
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1574
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1575
|
-
importName: "AntdTextArea"
|
|
1576
|
-
});
|
|
1577
|
-
}
|
|
1578
|
-
function registerPasswordInput(loader) {
|
|
1579
|
-
registerComponentHelper(loader, AntdPassword, {
|
|
1580
|
-
name: "plasmic-antd5-input-password",
|
|
1581
|
-
parentComponentName: "plasmic-antd5-input",
|
|
1582
|
-
displayName: "Password Input",
|
|
1583
|
-
props: __spreadValues$3({
|
|
1584
|
-
value: {
|
|
1585
|
-
type: "string"
|
|
1586
|
-
},
|
|
1587
|
-
placholder: {
|
|
1588
|
-
type: "string"
|
|
1589
|
-
},
|
|
1590
|
-
disabled: {
|
|
1591
|
-
type: "boolean"
|
|
1592
|
-
},
|
|
1593
|
-
maxLength: {
|
|
1594
|
-
type: "number",
|
|
1595
|
-
advanced: true
|
|
1596
|
-
},
|
|
1597
|
-
bordered: {
|
|
1598
|
-
type: "boolean",
|
|
1599
|
-
advanced: true,
|
|
1600
|
-
defaultValueHint: true
|
|
1601
|
-
}
|
|
1602
|
-
}, COMMON_EVENT_HANDLERS),
|
|
1603
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1604
|
-
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1605
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1606
|
-
importName: "AntdPassword"
|
|
1607
|
-
});
|
|
1608
|
-
}
|
|
1609
|
-
function registerNumberInput(loader) {
|
|
1610
|
-
registerComponentHelper(loader, AntdInputNumber, {
|
|
1611
|
-
name: "plasmic-antd5-input-number",
|
|
1612
|
-
parentComponentName: "plasmic-antd5-input",
|
|
1613
|
-
displayName: "Number Input",
|
|
1614
|
-
props: __spreadProps$3(__spreadValues$3(__spreadValues$3(__spreadValues$3({
|
|
1615
|
-
value: {
|
|
1616
|
-
type: "number"
|
|
1617
|
-
},
|
|
1618
|
-
placholder: {
|
|
1619
|
-
type: "string"
|
|
1620
|
-
},
|
|
1621
|
-
disabled: {
|
|
1622
|
-
type: "boolean"
|
|
1623
|
-
},
|
|
1624
|
-
max: {
|
|
1625
|
-
type: "number"
|
|
1626
|
-
},
|
|
1627
|
-
min: {
|
|
1628
|
-
type: "number"
|
|
1629
|
-
},
|
|
1630
|
-
step: {
|
|
1631
|
-
type: "number",
|
|
1632
|
-
helpText: "Increment or decrement step"
|
|
1633
|
-
},
|
|
1634
|
-
controls: {
|
|
1635
|
-
type: "boolean",
|
|
1636
|
-
displayName: "Show add/minus controls?",
|
|
1637
|
-
advanced: true
|
|
1638
|
-
}
|
|
1639
|
-
}, COMMON_DECORATOR_PROPS), COMMON_ADVANCED_PROPS), COMMON_EVENT_HANDLERS), {
|
|
1640
|
-
onChange: {
|
|
1641
|
-
type: "eventHandler",
|
|
1642
|
-
argTypes: [
|
|
1643
|
-
{
|
|
1644
|
-
name: "value",
|
|
1645
|
-
type: "number"
|
|
1646
|
-
}
|
|
1647
|
-
]
|
|
1648
|
-
}
|
|
1649
|
-
}),
|
|
1650
|
-
states: __spreadValues$3({}, COMMON_STATES),
|
|
1651
|
-
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1652
|
-
importName: "AntdInputNumber"
|
|
1653
|
-
});
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
1736
|
const AntdMenu = Menu__default.default;
|
|
1657
1737
|
const AntdMenuDivider = Menu__default.default.Divider;
|
|
1658
1738
|
const AntdMenuItem = Menu__default.default.Item;
|
|
1659
1739
|
const AntdMenuItemGroup = Menu__default.default.ItemGroup;
|
|
1660
1740
|
const AntdSubMenu = Menu__default.default.SubMenu;
|
|
1741
|
+
const allowedMenuComponents = [
|
|
1742
|
+
"plasmic-antd5-menu-item",
|
|
1743
|
+
"plasmic-antd5-menu-divider",
|
|
1744
|
+
"plasmic-antd5-submenu",
|
|
1745
|
+
"plasmic-antd5-menu-item-group"
|
|
1746
|
+
];
|
|
1661
1747
|
function registerMenu(loader) {
|
|
1662
1748
|
registerComponentHelper(loader, AntdMenu, {
|
|
1663
1749
|
name: "plasmic-antd5-menu",
|
|
@@ -1687,20 +1773,21 @@ function registerMenu(loader) {
|
|
|
1687
1773
|
},
|
|
1688
1774
|
children: {
|
|
1689
1775
|
type: "slot",
|
|
1690
|
-
allowedComponents:
|
|
1691
|
-
"plasmic-antd5-menu-item",
|
|
1692
|
-
"plasmic-antd5-menu-divider",
|
|
1693
|
-
"plasmic-antd5-submenu",
|
|
1694
|
-
"plasmic-antd5-menu-group"
|
|
1695
|
-
],
|
|
1776
|
+
allowedComponents: allowedMenuComponents,
|
|
1696
1777
|
defaultValue: [
|
|
1697
1778
|
{
|
|
1698
1779
|
type: "component",
|
|
1699
|
-
name: "plasmic-antd5-menu-item"
|
|
1780
|
+
name: "plasmic-antd5-menu-item",
|
|
1781
|
+
props: {
|
|
1782
|
+
key: "menuItemKey1"
|
|
1783
|
+
}
|
|
1700
1784
|
},
|
|
1701
1785
|
{
|
|
1702
1786
|
type: "component",
|
|
1703
|
-
name: "plasmic-antd5-menu-item"
|
|
1787
|
+
name: "plasmic-antd5-menu-item",
|
|
1788
|
+
props: {
|
|
1789
|
+
key: "menuItemKey2"
|
|
1790
|
+
}
|
|
1704
1791
|
}
|
|
1705
1792
|
]
|
|
1706
1793
|
},
|
|
@@ -1728,7 +1815,8 @@ function registerMenu(loader) {
|
|
|
1728
1815
|
},
|
|
1729
1816
|
key: {
|
|
1730
1817
|
type: "string",
|
|
1731
|
-
|
|
1818
|
+
displayName: "Unique key",
|
|
1819
|
+
description: "Unique ID of the menu item. Used to determine which item is selected.",
|
|
1732
1820
|
defaultValue: "menuItemKey"
|
|
1733
1821
|
},
|
|
1734
1822
|
title: {
|
|
@@ -1740,9 +1828,13 @@ function registerMenu(loader) {
|
|
|
1740
1828
|
defaultValue: [
|
|
1741
1829
|
{
|
|
1742
1830
|
type: "text",
|
|
1743
|
-
value: "
|
|
1831
|
+
value: "Menu item"
|
|
1744
1832
|
}
|
|
1745
1833
|
]
|
|
1834
|
+
},
|
|
1835
|
+
onClick: {
|
|
1836
|
+
type: "eventHandler",
|
|
1837
|
+
argTypes: []
|
|
1746
1838
|
}
|
|
1747
1839
|
},
|
|
1748
1840
|
importPath: "@plasmicpkgs/antd5/skinny/registerMenu",
|
|
@@ -1764,12 +1856,7 @@ function registerMenu(loader) {
|
|
|
1764
1856
|
},
|
|
1765
1857
|
children: {
|
|
1766
1858
|
type: "slot",
|
|
1767
|
-
allowedComponents:
|
|
1768
|
-
"plasmic-antd5-menu-item",
|
|
1769
|
-
"plasmic-antd5-menu-divider",
|
|
1770
|
-
"plasmic-antd5-menu-item-group",
|
|
1771
|
-
"plasmic-antd5-submenu"
|
|
1772
|
-
],
|
|
1859
|
+
allowedComponents: allowedMenuComponents,
|
|
1773
1860
|
defaultValue: [
|
|
1774
1861
|
{
|
|
1775
1862
|
type: "component",
|
|
@@ -1807,7 +1894,8 @@ function registerMenu(loader) {
|
|
|
1807
1894
|
},
|
|
1808
1895
|
key: {
|
|
1809
1896
|
type: "string",
|
|
1810
|
-
|
|
1897
|
+
displayName: "Unique key",
|
|
1898
|
+
description: "Unique ID of the sub-menu. Used to determine which item is selected.",
|
|
1811
1899
|
advanced: true
|
|
1812
1900
|
},
|
|
1813
1901
|
title: {
|
|
@@ -1821,12 +1909,7 @@ function registerMenu(loader) {
|
|
|
1821
1909
|
},
|
|
1822
1910
|
children: {
|
|
1823
1911
|
type: "slot",
|
|
1824
|
-
allowedComponents:
|
|
1825
|
-
"plasmic-antd5-menu-item",
|
|
1826
|
-
"plasmic-antd5-menu-divider",
|
|
1827
|
-
"plasmic-antd5-menu-item-group",
|
|
1828
|
-
"plasmic-antd5-submenu"
|
|
1829
|
-
],
|
|
1912
|
+
allowedComponents: allowedMenuComponents,
|
|
1830
1913
|
defaultValue: [1, 2].map((i) => ({
|
|
1831
1914
|
type: "component",
|
|
1832
1915
|
name: "plasmic-antd5-menu-item",
|
|
@@ -1848,39 +1931,39 @@ function registerMenu(loader) {
|
|
|
1848
1931
|
});
|
|
1849
1932
|
}
|
|
1850
1933
|
|
|
1851
|
-
var __defProp$
|
|
1852
|
-
var __defProps$
|
|
1853
|
-
var __getOwnPropDescs$
|
|
1854
|
-
var __getOwnPropSymbols$
|
|
1855
|
-
var __hasOwnProp$
|
|
1856
|
-
var __propIsEnum$
|
|
1857
|
-
var __defNormalProp$
|
|
1858
|
-
var __spreadValues$
|
|
1859
|
-
for (var prop in b || (b = {}))
|
|
1860
|
-
if (__hasOwnProp$
|
|
1861
|
-
__defNormalProp$
|
|
1862
|
-
if (__getOwnPropSymbols$
|
|
1863
|
-
for (var prop of __getOwnPropSymbols$
|
|
1864
|
-
if (__propIsEnum$
|
|
1865
|
-
__defNormalProp$
|
|
1934
|
+
var __defProp$4 = Object.defineProperty;
|
|
1935
|
+
var __defProps$3 = Object.defineProperties;
|
|
1936
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1937
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1938
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1939
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1940
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1941
|
+
var __spreadValues$4 = (a, b) => {
|
|
1942
|
+
for (var prop in b || (b = {}))
|
|
1943
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
1944
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1945
|
+
if (__getOwnPropSymbols$4)
|
|
1946
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
1947
|
+
if (__propIsEnum$4.call(b, prop))
|
|
1948
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1866
1949
|
}
|
|
1867
1950
|
return a;
|
|
1868
1951
|
};
|
|
1869
|
-
var __spreadProps$
|
|
1870
|
-
var __objRest$
|
|
1952
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1953
|
+
var __objRest$3 = (source, exclude) => {
|
|
1871
1954
|
var target = {};
|
|
1872
1955
|
for (var prop in source)
|
|
1873
|
-
if (__hasOwnProp$
|
|
1956
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1874
1957
|
target[prop] = source[prop];
|
|
1875
|
-
if (source != null && __getOwnPropSymbols$
|
|
1876
|
-
for (var prop of __getOwnPropSymbols$
|
|
1877
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1958
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
1959
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
1960
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
1878
1961
|
target[prop] = source[prop];
|
|
1879
1962
|
}
|
|
1880
1963
|
return target;
|
|
1881
1964
|
};
|
|
1882
1965
|
function AntdModal(props) {
|
|
1883
|
-
const _a = props, { onOpenChange, onOk, onCancel, open, footer } = _a, rest = __objRest$
|
|
1966
|
+
const _a = props, { onOpenChange, onOk, onCancel, open, footer } = _a, rest = __objRest$3(_a, ["onOpenChange", "onOk", "onCancel", "open", "footer"]);
|
|
1884
1967
|
const memoOnOk = React__default.default.useMemo(() => {
|
|
1885
1968
|
if (onOpenChange || onOk) {
|
|
1886
1969
|
return (e) => {
|
|
@@ -1901,7 +1984,7 @@ function AntdModal(props) {
|
|
|
1901
1984
|
return void 0;
|
|
1902
1985
|
}
|
|
1903
1986
|
}, [onOpenChange, onCancel]);
|
|
1904
|
-
return /* @__PURE__ */ React__default.default.createElement(Modal__default.default, __spreadProps$
|
|
1987
|
+
return /* @__PURE__ */ React__default.default.createElement(Modal__default.default, __spreadProps$3(__spreadValues$4({}, rest), {
|
|
1905
1988
|
onOk: memoOnOk,
|
|
1906
1989
|
onCancel: memoOnCancel,
|
|
1907
1990
|
open,
|
|
@@ -2002,40 +2085,40 @@ function registerModal(loader) {
|
|
|
2002
2085
|
});
|
|
2003
2086
|
}
|
|
2004
2087
|
|
|
2005
|
-
var __defProp$
|
|
2006
|
-
var __defProps$
|
|
2007
|
-
var __getOwnPropDescs$
|
|
2008
|
-
var __getOwnPropSymbols$
|
|
2009
|
-
var __hasOwnProp$
|
|
2010
|
-
var __propIsEnum$
|
|
2011
|
-
var __defNormalProp$
|
|
2012
|
-
var __spreadValues$
|
|
2088
|
+
var __defProp$3 = Object.defineProperty;
|
|
2089
|
+
var __defProps$2 = Object.defineProperties;
|
|
2090
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
2091
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
2092
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
2093
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
2094
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2095
|
+
var __spreadValues$3 = (a, b) => {
|
|
2013
2096
|
for (var prop in b || (b = {}))
|
|
2014
|
-
if (__hasOwnProp$
|
|
2015
|
-
__defNormalProp$
|
|
2016
|
-
if (__getOwnPropSymbols$
|
|
2017
|
-
for (var prop of __getOwnPropSymbols$
|
|
2018
|
-
if (__propIsEnum$
|
|
2019
|
-
__defNormalProp$
|
|
2097
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
2098
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2099
|
+
if (__getOwnPropSymbols$3)
|
|
2100
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
2101
|
+
if (__propIsEnum$3.call(b, prop))
|
|
2102
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2020
2103
|
}
|
|
2021
2104
|
return a;
|
|
2022
2105
|
};
|
|
2023
|
-
var __spreadProps$
|
|
2024
|
-
var __objRest$
|
|
2106
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2107
|
+
var __objRest$2 = (source, exclude) => {
|
|
2025
2108
|
var target = {};
|
|
2026
2109
|
for (var prop in source)
|
|
2027
|
-
if (__hasOwnProp$
|
|
2110
|
+
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2028
2111
|
target[prop] = source[prop];
|
|
2029
|
-
if (source != null && __getOwnPropSymbols$
|
|
2030
|
-
for (var prop of __getOwnPropSymbols$
|
|
2031
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2112
|
+
if (source != null && __getOwnPropSymbols$3)
|
|
2113
|
+
for (var prop of __getOwnPropSymbols$3(source)) {
|
|
2114
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
|
|
2032
2115
|
target[prop] = source[prop];
|
|
2033
2116
|
}
|
|
2034
2117
|
return target;
|
|
2035
2118
|
};
|
|
2036
2119
|
const AntdRadio = Radio__default.default;
|
|
2037
2120
|
function AntdRadioGroup(props) {
|
|
2038
|
-
const _a = props, { onChange } = _a, rest = __objRest$
|
|
2121
|
+
const _a = props, { onChange } = _a, rest = __objRest$2(_a, ["onChange"]);
|
|
2039
2122
|
const wrappedOnChange = React__default.default.useMemo(() => {
|
|
2040
2123
|
if (onChange) {
|
|
2041
2124
|
return (event) => onChange(event.target.value);
|
|
@@ -2043,7 +2126,7 @@ function AntdRadioGroup(props) {
|
|
|
2043
2126
|
return void 0;
|
|
2044
2127
|
}
|
|
2045
2128
|
}, [onChange]);
|
|
2046
|
-
return /* @__PURE__ */ React__default.default.createElement(RadioGroup__default.default, __spreadProps$
|
|
2129
|
+
return /* @__PURE__ */ React__default.default.createElement(RadioGroup__default.default, __spreadProps$2(__spreadValues$3({}, rest), {
|
|
2047
2130
|
onChange: wrappedOnChange
|
|
2048
2131
|
}));
|
|
2049
2132
|
}
|
|
@@ -2162,53 +2245,60 @@ function registerRadio(loader) {
|
|
|
2162
2245
|
});
|
|
2163
2246
|
}
|
|
2164
2247
|
|
|
2165
|
-
var __defProp = Object.defineProperty;
|
|
2166
|
-
var __defProps = Object.defineProperties;
|
|
2167
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2168
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2169
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2170
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2171
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2172
|
-
var __spreadValues = (a, b) => {
|
|
2248
|
+
var __defProp$2 = Object.defineProperty;
|
|
2249
|
+
var __defProps$1 = Object.defineProperties;
|
|
2250
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2251
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
2252
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
2253
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
2254
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2255
|
+
var __spreadValues$2 = (a, b) => {
|
|
2173
2256
|
for (var prop in b || (b = {}))
|
|
2174
|
-
if (__hasOwnProp.call(b, prop))
|
|
2175
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2176
|
-
if (__getOwnPropSymbols)
|
|
2177
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
2178
|
-
if (__propIsEnum.call(b, prop))
|
|
2179
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2257
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
2258
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2259
|
+
if (__getOwnPropSymbols$2)
|
|
2260
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
2261
|
+
if (__propIsEnum$2.call(b, prop))
|
|
2262
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2180
2263
|
}
|
|
2181
2264
|
return a;
|
|
2182
2265
|
};
|
|
2183
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2184
|
-
var __objRest = (source, exclude) => {
|
|
2266
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2267
|
+
var __objRest$1 = (source, exclude) => {
|
|
2185
2268
|
var target = {};
|
|
2186
2269
|
for (var prop in source)
|
|
2187
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2270
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2188
2271
|
target[prop] = source[prop];
|
|
2189
|
-
if (source != null && __getOwnPropSymbols)
|
|
2190
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
2191
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2272
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
2273
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
2274
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
2192
2275
|
target[prop] = source[prop];
|
|
2193
2276
|
}
|
|
2194
2277
|
return target;
|
|
2195
2278
|
};
|
|
2196
2279
|
const AntdOption = Select__default.default.Option;
|
|
2280
|
+
const AntdOptionGroup = Select__default.default.OptGroup;
|
|
2197
2281
|
function AntdSelect(props) {
|
|
2198
2282
|
const _a = props, {
|
|
2199
2283
|
popupClassName,
|
|
2200
2284
|
popupScopeClassName,
|
|
2201
2285
|
defaultStylesClassName,
|
|
2202
2286
|
suffixIcon,
|
|
2203
|
-
mode
|
|
2204
|
-
|
|
2287
|
+
mode,
|
|
2288
|
+
useChildren
|
|
2289
|
+
} = _a, rest = __objRest$1(_a, [
|
|
2205
2290
|
"popupClassName",
|
|
2206
2291
|
"popupScopeClassName",
|
|
2207
2292
|
"defaultStylesClassName",
|
|
2208
2293
|
"suffixIcon",
|
|
2209
|
-
"mode"
|
|
2294
|
+
"mode",
|
|
2295
|
+
"useChildren"
|
|
2210
2296
|
]);
|
|
2211
|
-
|
|
2297
|
+
const curated = __spreadValues$2({}, rest);
|
|
2298
|
+
if (useChildren) {
|
|
2299
|
+
curated.options = void 0;
|
|
2300
|
+
}
|
|
2301
|
+
return /* @__PURE__ */ React__default.default.createElement(Select__default.default, __spreadValues$2(__spreadProps$1(__spreadValues$2({}, curated), {
|
|
2212
2302
|
mode: !mode || mode === "single" ? void 0 : mode,
|
|
2213
2303
|
popupClassName: `${defaultStylesClassName} ${popupScopeClassName} ${popupClassName}`
|
|
2214
2304
|
}), suffixIcon && { suffixIcon }));
|
|
@@ -2218,9 +2308,41 @@ function registerSelect(loader) {
|
|
|
2218
2308
|
name: "plasmic-antd5-select",
|
|
2219
2309
|
displayName: "Select",
|
|
2220
2310
|
props: {
|
|
2311
|
+
options: {
|
|
2312
|
+
type: "array",
|
|
2313
|
+
hidden: (ps) => !!ps.useChildren,
|
|
2314
|
+
itemType: {
|
|
2315
|
+
type: "object",
|
|
2316
|
+
nameFunc: (item) => item.label,
|
|
2317
|
+
fields: {
|
|
2318
|
+
value: "string",
|
|
2319
|
+
label: "string"
|
|
2320
|
+
}
|
|
2321
|
+
},
|
|
2322
|
+
defaultValue: [
|
|
2323
|
+
{
|
|
2324
|
+
value: "option1",
|
|
2325
|
+
label: "Option 1"
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
value: "option2",
|
|
2329
|
+
label: "Option 2"
|
|
2330
|
+
}
|
|
2331
|
+
]
|
|
2332
|
+
},
|
|
2333
|
+
useChildren: {
|
|
2334
|
+
displayName: "Use slot",
|
|
2335
|
+
type: "boolean",
|
|
2336
|
+
defaultValueHint: false,
|
|
2337
|
+
description: "Instead of configuring a list of options, customize the contents of the Select by dragging and dropping options in the outline/canvas, inside the 'children' slot. Lets you use any content or formatting within the Options, and also use Option Groups."
|
|
2338
|
+
},
|
|
2221
2339
|
children: {
|
|
2222
2340
|
type: "slot",
|
|
2223
|
-
allowedComponents: [
|
|
2341
|
+
allowedComponents: [
|
|
2342
|
+
"plasmic-antd5-option",
|
|
2343
|
+
"plasmic-antd5-option-group"
|
|
2344
|
+
],
|
|
2345
|
+
hidden: (ps) => !ps.useChildren
|
|
2224
2346
|
},
|
|
2225
2347
|
placeholder: {
|
|
2226
2348
|
type: "slot",
|
|
@@ -2243,13 +2365,24 @@ function registerSelect(loader) {
|
|
|
2243
2365
|
description: "Initial selected option",
|
|
2244
2366
|
multiSelect: (ps) => ps.mode === "multiple",
|
|
2245
2367
|
options: (ps) => {
|
|
2368
|
+
var _a;
|
|
2246
2369
|
const options = /* @__PURE__ */ new Set();
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2370
|
+
if (!ps.useChildren) {
|
|
2371
|
+
return ((_a = ps.options) != null ? _a : []).map((o) => {
|
|
2372
|
+
var _a2;
|
|
2373
|
+
return {
|
|
2374
|
+
value: o.value || "",
|
|
2375
|
+
label: (_a2 = o.label) != null ? _a2 : o.value || ""
|
|
2376
|
+
};
|
|
2377
|
+
});
|
|
2378
|
+
} else {
|
|
2379
|
+
traverseReactEltTree(ps.children, (elt) => {
|
|
2380
|
+
var _a2;
|
|
2381
|
+
if ((elt == null ? void 0 : elt.type) === Select__default.default.Option && typeof ((_a2 = elt == null ? void 0 : elt.props) == null ? void 0 : _a2.value) === "string") {
|
|
2382
|
+
options.add(elt.props.value);
|
|
2383
|
+
}
|
|
2384
|
+
});
|
|
2385
|
+
}
|
|
2253
2386
|
return Array.from(options.keys());
|
|
2254
2387
|
}
|
|
2255
2388
|
},
|
|
@@ -2392,12 +2525,554 @@ function registerSelect(loader) {
|
|
|
2392
2525
|
importPath: "@plasmicpkgs/antd5/skinny/registerSelect",
|
|
2393
2526
|
importName: "AntdOption"
|
|
2394
2527
|
});
|
|
2528
|
+
registerComponentHelper(loader, AntdOptionGroup, {
|
|
2529
|
+
name: "plasmic-antd5-option-group",
|
|
2530
|
+
displayName: "Option Group",
|
|
2531
|
+
parentComponentName: "plasmic-antd5-select",
|
|
2532
|
+
props: {
|
|
2533
|
+
children: {
|
|
2534
|
+
type: "slot",
|
|
2535
|
+
defaultValue: [
|
|
2536
|
+
{
|
|
2537
|
+
type: "component",
|
|
2538
|
+
name: "plasmic-antd5-option",
|
|
2539
|
+
props: {
|
|
2540
|
+
value: "option1",
|
|
2541
|
+
children: {
|
|
2542
|
+
type: "text",
|
|
2543
|
+
value: "Option 1"
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
type: "component",
|
|
2549
|
+
name: "plasmic-antd5-option",
|
|
2550
|
+
props: {
|
|
2551
|
+
value: "option2",
|
|
2552
|
+
children: {
|
|
2553
|
+
type: "text",
|
|
2554
|
+
value: "Option 1"
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
]
|
|
2559
|
+
},
|
|
2560
|
+
label: {
|
|
2561
|
+
type: "slot",
|
|
2562
|
+
defaultValue: "Group label"
|
|
2563
|
+
}
|
|
2564
|
+
},
|
|
2565
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerSelect",
|
|
2566
|
+
importName: "AntdOptionGroup"
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
var __defProp$1 = Object.defineProperty;
|
|
2571
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2572
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2573
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2574
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2575
|
+
var __spreadValues$1 = (a, b) => {
|
|
2576
|
+
for (var prop in b || (b = {}))
|
|
2577
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2578
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2579
|
+
if (__getOwnPropSymbols$1)
|
|
2580
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
2581
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2582
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2583
|
+
}
|
|
2584
|
+
return a;
|
|
2585
|
+
};
|
|
2586
|
+
var __objRest = (source, exclude) => {
|
|
2587
|
+
var target = {};
|
|
2588
|
+
for (var prop in source)
|
|
2589
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2590
|
+
target[prop] = source[prop];
|
|
2591
|
+
if (source != null && __getOwnPropSymbols$1)
|
|
2592
|
+
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
2593
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
2594
|
+
target[prop] = source[prop];
|
|
2595
|
+
}
|
|
2596
|
+
return target;
|
|
2597
|
+
};
|
|
2598
|
+
const AntdTable = React__default.default.forwardRef(function AntdTable2(props, ref) {
|
|
2599
|
+
const _a = props, {
|
|
2600
|
+
data,
|
|
2601
|
+
onSelectedRowKeysChange,
|
|
2602
|
+
onSelectedRowsChange,
|
|
2603
|
+
isSelectable,
|
|
2604
|
+
rowKey,
|
|
2605
|
+
setControlContextData,
|
|
2606
|
+
selectedRowKeys,
|
|
2607
|
+
defaultSelectedRowKeys
|
|
2608
|
+
} = _a, rest = __objRest(_a, [
|
|
2609
|
+
"data",
|
|
2610
|
+
"onSelectedRowKeysChange",
|
|
2611
|
+
"onSelectedRowsChange",
|
|
2612
|
+
"isSelectable",
|
|
2613
|
+
"rowKey",
|
|
2614
|
+
"setControlContextData",
|
|
2615
|
+
"selectedRowKeys",
|
|
2616
|
+
"defaultSelectedRowKeys"
|
|
2617
|
+
]);
|
|
2618
|
+
setControlContextData == null ? void 0 : setControlContextData(data);
|
|
2619
|
+
const isControlled = !!selectedRowKeys;
|
|
2620
|
+
const [
|
|
2621
|
+
uncontrolledSelectedRowKeys,
|
|
2622
|
+
setUncontrolledSelectedRowKeys
|
|
2623
|
+
] = React__default.default.useState(defaultSelectedRowKeys != null ? defaultSelectedRowKeys : []);
|
|
2624
|
+
const selection = isSelectable && rowKey ? {
|
|
2625
|
+
onChange: (rowKeys, rows) => {
|
|
2626
|
+
onSelectedRowsChange == null ? void 0 : onSelectedRowsChange(rows);
|
|
2627
|
+
onSelectedRowKeysChange == null ? void 0 : onSelectedRowKeysChange(rowKeys);
|
|
2628
|
+
},
|
|
2629
|
+
type: isSelectable === "single" ? "radio" : "checkbox",
|
|
2630
|
+
selectedRowKeys: isControlled ? asArray(selectedRowKeys) : uncontrolledSelectedRowKeys
|
|
2631
|
+
} : void 0;
|
|
2632
|
+
React__default.default.useImperativeHandle(ref, () => ({
|
|
2633
|
+
selectRowByIndex(index) {
|
|
2634
|
+
if (data.data && rowKey) {
|
|
2635
|
+
const row = data.data[index];
|
|
2636
|
+
const rows = row ? [row] : [];
|
|
2637
|
+
this._setSelectedRows(rows);
|
|
2638
|
+
}
|
|
2639
|
+
},
|
|
2640
|
+
selectRowsByIndexes(indexes) {
|
|
2641
|
+
if (data.data && rowKey) {
|
|
2642
|
+
const rows = indexes.map((x) => data.data[x]).filter((x) => !!x);
|
|
2643
|
+
this._setSelectedRows(rows);
|
|
2644
|
+
}
|
|
2645
|
+
},
|
|
2646
|
+
selectRowByKey(key) {
|
|
2647
|
+
if (data.data && rowKey) {
|
|
2648
|
+
const rows = data.data.filter((r) => r[rowKey] === key);
|
|
2649
|
+
this._setSelectedRows(rows);
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
selectRowsByKeys(keys) {
|
|
2653
|
+
if (data.data && rowKey) {
|
|
2654
|
+
const rows = data.data.filter((r) => keys.includes(r[rowKey]));
|
|
2655
|
+
this._setSelectedRows(rows);
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2658
|
+
clearSelection() {
|
|
2659
|
+
this._setSelectedRows([]);
|
|
2660
|
+
},
|
|
2661
|
+
_setSelectedRows(rows) {
|
|
2662
|
+
onSelectedRowsChange == null ? void 0 : onSelectedRowsChange(rows);
|
|
2663
|
+
if (rowKey) {
|
|
2664
|
+
onSelectedRowKeysChange == null ? void 0 : onSelectedRowKeysChange(rows.map((r) => r[rowKey]));
|
|
2665
|
+
}
|
|
2666
|
+
if (!isControlled) {
|
|
2667
|
+
setUncontrolledSelectedRowKeys(rows.map((r) => r[rowKey]));
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
}), [data, onSelectedRowKeysChange, onSelectedRowsChange, isSelectable, rowKey]);
|
|
2671
|
+
return /* @__PURE__ */ React__default.default.createElement(Table__default.default, __spreadValues$1({
|
|
2672
|
+
loading: data == null ? void 0 : data.isLoading,
|
|
2673
|
+
dataSource: data == null ? void 0 : data.data,
|
|
2674
|
+
rowSelection: selection,
|
|
2675
|
+
rowKey
|
|
2676
|
+
}, rest));
|
|
2677
|
+
});
|
|
2678
|
+
const AntdColumnGroup = Table__default.default.ColumnGroup;
|
|
2679
|
+
const AntdColumn = Table__default.default.Column;
|
|
2680
|
+
function registerTable(loader) {
|
|
2681
|
+
registerComponentHelper(loader, AntdTable, {
|
|
2682
|
+
name: "plasmic-antd5-table",
|
|
2683
|
+
displayName: "Table",
|
|
2684
|
+
props: {
|
|
2685
|
+
data: {
|
|
2686
|
+
type: "dataSourceOpData",
|
|
2687
|
+
displayName: "Data"
|
|
2688
|
+
},
|
|
2689
|
+
children: {
|
|
2690
|
+
type: "slot",
|
|
2691
|
+
allowedComponents: [
|
|
2692
|
+
"plasmic-antd5-table-column",
|
|
2693
|
+
"plasmic-antd5-table-column-group"
|
|
2694
|
+
]
|
|
2695
|
+
},
|
|
2696
|
+
bordered: {
|
|
2697
|
+
type: "boolean",
|
|
2698
|
+
defaultValueHint: false,
|
|
2699
|
+
advanced: true
|
|
2700
|
+
},
|
|
2701
|
+
isSelectable: {
|
|
2702
|
+
type: "choice",
|
|
2703
|
+
options: ["single", "multiple"],
|
|
2704
|
+
displayName: "Select rows?"
|
|
2705
|
+
},
|
|
2706
|
+
rowKey: {
|
|
2707
|
+
type: "choice",
|
|
2708
|
+
options: (ps, ctx) => {
|
|
2709
|
+
if (ctx.schema) {
|
|
2710
|
+
return ctx.schema.fields.map((f) => ({
|
|
2711
|
+
value: f.id,
|
|
2712
|
+
label: f.label || f.id
|
|
2713
|
+
}));
|
|
2714
|
+
}
|
|
2715
|
+
return [];
|
|
2716
|
+
},
|
|
2717
|
+
hidden: (ps) => !ps.isSelectable
|
|
2718
|
+
},
|
|
2719
|
+
selectedRowKeys: {
|
|
2720
|
+
type: "choice",
|
|
2721
|
+
multiSelect: (ps) => ps.isSelectable === "multiple",
|
|
2722
|
+
options: (ps, ctx) => {
|
|
2723
|
+
const key = ps.rowKey;
|
|
2724
|
+
if (key && ctx.data) {
|
|
2725
|
+
return ctx.data.map((r) => r[key]);
|
|
2726
|
+
}
|
|
2727
|
+
return [];
|
|
2728
|
+
},
|
|
2729
|
+
hidden: (ps) => !ps.rowKey
|
|
2730
|
+
},
|
|
2731
|
+
onSelectedRowKeysChange: {
|
|
2732
|
+
type: "eventHandler",
|
|
2733
|
+
argTypes: [{ name: "keys", type: "object" }],
|
|
2734
|
+
hidden: (ps) => !ps.isSelectable
|
|
2735
|
+
},
|
|
2736
|
+
onSelectedRowsChange: {
|
|
2737
|
+
type: "eventHandler",
|
|
2738
|
+
argTypes: [{ name: "rows", type: "object" }],
|
|
2739
|
+
hidden: (ps) => !ps.isSelectable
|
|
2740
|
+
}
|
|
2741
|
+
},
|
|
2742
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTable",
|
|
2743
|
+
importName: "AntdTable",
|
|
2744
|
+
states: {
|
|
2745
|
+
selectedRowKeys: {
|
|
2746
|
+
type: "writable",
|
|
2747
|
+
valueProp: "selectedRowKeys",
|
|
2748
|
+
onChangeProp: "onSelectedRowKeysChange",
|
|
2749
|
+
variableType: "array"
|
|
2750
|
+
}
|
|
2751
|
+
},
|
|
2752
|
+
unstable__refActions: {
|
|
2753
|
+
selectRowByIndex: {
|
|
2754
|
+
displayName: "Select row by index",
|
|
2755
|
+
parameters: [
|
|
2756
|
+
{
|
|
2757
|
+
name: "index",
|
|
2758
|
+
displayName: "Index",
|
|
2759
|
+
type: "number"
|
|
2760
|
+
}
|
|
2761
|
+
]
|
|
2762
|
+
},
|
|
2763
|
+
selectRowByKey: {
|
|
2764
|
+
displayName: "Select row by key",
|
|
2765
|
+
parameters: [
|
|
2766
|
+
{
|
|
2767
|
+
name: "key",
|
|
2768
|
+
displayName: "Row key",
|
|
2769
|
+
type: "string"
|
|
2770
|
+
}
|
|
2771
|
+
]
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
});
|
|
2775
|
+
registerComponentHelper(loader, AntdColumn, __spreadValues$1({
|
|
2776
|
+
name: "plasmic-antd5-table-column",
|
|
2777
|
+
displayName: "Column",
|
|
2778
|
+
parentComponentName: "plasmic-antd5-table",
|
|
2779
|
+
props: {
|
|
2780
|
+
title: {
|
|
2781
|
+
type: "slot",
|
|
2782
|
+
defaultValue: "Column Name"
|
|
2783
|
+
},
|
|
2784
|
+
dataIndex: {
|
|
2785
|
+
type: "string",
|
|
2786
|
+
displayName: "Column key"
|
|
2787
|
+
},
|
|
2788
|
+
render: {
|
|
2789
|
+
type: "slot",
|
|
2790
|
+
renderPropParams: ["cell", "row", "index"],
|
|
2791
|
+
hidePlaceholder: true,
|
|
2792
|
+
displayName: "Custom render"
|
|
2793
|
+
},
|
|
2794
|
+
align: {
|
|
2795
|
+
type: "choice",
|
|
2796
|
+
options: ["left", "right", "center"],
|
|
2797
|
+
defaultValueHint: "left"
|
|
2798
|
+
},
|
|
2799
|
+
fixed: {
|
|
2800
|
+
type: "choice",
|
|
2801
|
+
options: ["left", "right"],
|
|
2802
|
+
advanced: true
|
|
2803
|
+
},
|
|
2804
|
+
colSpan: {
|
|
2805
|
+
type: "number",
|
|
2806
|
+
advanced: true
|
|
2807
|
+
}
|
|
2808
|
+
},
|
|
2809
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTable",
|
|
2810
|
+
importName: "AntdColumn"
|
|
2811
|
+
}, { isRenderless: true }));
|
|
2812
|
+
registerComponentHelper(loader, AntdColumnGroup, __spreadValues$1({
|
|
2813
|
+
name: "plasmic-antd5-table-column-group",
|
|
2814
|
+
displayName: "Column Group",
|
|
2815
|
+
parentComponentName: "plasmic-antd5-table",
|
|
2816
|
+
props: {
|
|
2817
|
+
title: {
|
|
2818
|
+
type: "slot",
|
|
2819
|
+
defaultValue: "Column Group Name"
|
|
2820
|
+
},
|
|
2821
|
+
children: {
|
|
2822
|
+
type: "slot",
|
|
2823
|
+
allowedComponents: ["plasmic-antd5-table-column"]
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTable",
|
|
2827
|
+
importName: "AntdColumnGroup"
|
|
2828
|
+
}, { isRenderless: true }));
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
var __defProp = Object.defineProperty;
|
|
2832
|
+
var __defProps = Object.defineProperties;
|
|
2833
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2834
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2835
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2836
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2837
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2838
|
+
var __spreadValues = (a, b) => {
|
|
2839
|
+
for (var prop in b || (b = {}))
|
|
2840
|
+
if (__hasOwnProp.call(b, prop))
|
|
2841
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2842
|
+
if (__getOwnPropSymbols)
|
|
2843
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
2844
|
+
if (__propIsEnum.call(b, prop))
|
|
2845
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2846
|
+
}
|
|
2847
|
+
return a;
|
|
2848
|
+
};
|
|
2849
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2850
|
+
const AntdInput = Input__default.default;
|
|
2851
|
+
const AntdTextArea = Input__default.default.TextArea;
|
|
2852
|
+
const AntdPassword = Input__default.default.Password;
|
|
2853
|
+
const AntdInputNumber = InputNumber__default.default;
|
|
2854
|
+
const inputHelpers = {
|
|
2855
|
+
states: {
|
|
2856
|
+
value: {
|
|
2857
|
+
onChangeArgsToValue: (e) => {
|
|
2858
|
+
return e.target.value;
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
};
|
|
2863
|
+
const COMMON_HELPERS_CONFIG = {
|
|
2864
|
+
helpers: inputHelpers,
|
|
2865
|
+
importName: "inputHelpers",
|
|
2866
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput"
|
|
2867
|
+
};
|
|
2868
|
+
const COMMON_STATES = {
|
|
2869
|
+
value: {
|
|
2870
|
+
type: "writable",
|
|
2871
|
+
valueProp: "value",
|
|
2872
|
+
variableType: "text",
|
|
2873
|
+
onChangeProp: "onChange"
|
|
2874
|
+
}
|
|
2875
|
+
};
|
|
2876
|
+
const COMMON_DECORATOR_PROPS = {
|
|
2877
|
+
prefix: {
|
|
2878
|
+
type: "slot",
|
|
2879
|
+
hidePlaceholder: true
|
|
2880
|
+
},
|
|
2881
|
+
suffix: {
|
|
2882
|
+
type: "slot",
|
|
2883
|
+
hidePlaceholder: true
|
|
2884
|
+
},
|
|
2885
|
+
addonAfter: {
|
|
2886
|
+
type: "slot",
|
|
2887
|
+
hidePlaceholder: true
|
|
2888
|
+
},
|
|
2889
|
+
addonBefore: {
|
|
2890
|
+
type: "slot",
|
|
2891
|
+
hidePlaceholder: true
|
|
2892
|
+
}
|
|
2893
|
+
};
|
|
2894
|
+
const COMMON_ADVANCED_PROPS = {
|
|
2895
|
+
maxLength: {
|
|
2896
|
+
type: "number",
|
|
2897
|
+
advanced: true
|
|
2898
|
+
},
|
|
2899
|
+
bordered: {
|
|
2900
|
+
type: "boolean",
|
|
2901
|
+
advanced: true,
|
|
2902
|
+
defaultValueHint: true
|
|
2903
|
+
},
|
|
2904
|
+
allowClear: {
|
|
2905
|
+
type: "boolean",
|
|
2906
|
+
advanced: true
|
|
2907
|
+
},
|
|
2908
|
+
autoFocus: {
|
|
2909
|
+
type: "boolean",
|
|
2910
|
+
advanced: true
|
|
2911
|
+
},
|
|
2912
|
+
readOnly: {
|
|
2913
|
+
type: "boolean",
|
|
2914
|
+
advanced: true
|
|
2915
|
+
}
|
|
2916
|
+
};
|
|
2917
|
+
const COMMON_EVENT_HANDLERS = {
|
|
2918
|
+
onChange: {
|
|
2919
|
+
type: "eventHandler",
|
|
2920
|
+
argTypes: [
|
|
2921
|
+
{
|
|
2922
|
+
name: "event",
|
|
2923
|
+
type: "object"
|
|
2924
|
+
}
|
|
2925
|
+
]
|
|
2926
|
+
},
|
|
2927
|
+
onPressEnter: {
|
|
2928
|
+
type: "eventHandler",
|
|
2929
|
+
argTypes: [
|
|
2930
|
+
{
|
|
2931
|
+
name: "event",
|
|
2932
|
+
type: "object"
|
|
2933
|
+
}
|
|
2934
|
+
]
|
|
2935
|
+
}
|
|
2936
|
+
};
|
|
2937
|
+
function registerInput(loader) {
|
|
2938
|
+
registerComponentHelper(loader, AntdInput, {
|
|
2939
|
+
name: "plasmic-antd5-input",
|
|
2940
|
+
displayName: "Input",
|
|
2941
|
+
props: __spreadValues(__spreadValues(__spreadValues({
|
|
2942
|
+
value: {
|
|
2943
|
+
type: "string"
|
|
2944
|
+
},
|
|
2945
|
+
placholder: {
|
|
2946
|
+
type: "string"
|
|
2947
|
+
},
|
|
2948
|
+
size: {
|
|
2949
|
+
type: "choice",
|
|
2950
|
+
options: ["large", "middle", "small"]
|
|
2951
|
+
},
|
|
2952
|
+
disabled: {
|
|
2953
|
+
type: "boolean"
|
|
2954
|
+
}
|
|
2955
|
+
}, COMMON_ADVANCED_PROPS), COMMON_DECORATOR_PROPS), COMMON_EVENT_HANDLERS),
|
|
2956
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
2957
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
2958
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
2959
|
+
importName: "AntdInput"
|
|
2960
|
+
});
|
|
2961
|
+
}
|
|
2962
|
+
function registerTextArea(loader) {
|
|
2963
|
+
registerComponentHelper(loader, AntdTextArea, {
|
|
2964
|
+
name: "plasmic-antd5-textarea",
|
|
2965
|
+
parentComponentName: "plasmic-antd5-input",
|
|
2966
|
+
displayName: "Text Area",
|
|
2967
|
+
props: __spreadValues({
|
|
2968
|
+
value: {
|
|
2969
|
+
type: "string"
|
|
2970
|
+
},
|
|
2971
|
+
placholder: {
|
|
2972
|
+
type: "string"
|
|
2973
|
+
},
|
|
2974
|
+
disabled: {
|
|
2975
|
+
type: "boolean"
|
|
2976
|
+
},
|
|
2977
|
+
maxLength: {
|
|
2978
|
+
type: "number",
|
|
2979
|
+
advanced: true
|
|
2980
|
+
},
|
|
2981
|
+
bordered: {
|
|
2982
|
+
type: "boolean",
|
|
2983
|
+
advanced: true,
|
|
2984
|
+
defaultValueHint: true
|
|
2985
|
+
}
|
|
2986
|
+
}, COMMON_EVENT_HANDLERS),
|
|
2987
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
2988
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
2989
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
2990
|
+
importName: "AntdTextArea"
|
|
2991
|
+
});
|
|
2992
|
+
}
|
|
2993
|
+
function registerPasswordInput(loader) {
|
|
2994
|
+
registerComponentHelper(loader, AntdPassword, {
|
|
2995
|
+
name: "plasmic-antd5-input-password",
|
|
2996
|
+
parentComponentName: "plasmic-antd5-input",
|
|
2997
|
+
displayName: "Password Input",
|
|
2998
|
+
props: __spreadValues({
|
|
2999
|
+
value: {
|
|
3000
|
+
type: "string"
|
|
3001
|
+
},
|
|
3002
|
+
placholder: {
|
|
3003
|
+
type: "string"
|
|
3004
|
+
},
|
|
3005
|
+
disabled: {
|
|
3006
|
+
type: "boolean"
|
|
3007
|
+
},
|
|
3008
|
+
maxLength: {
|
|
3009
|
+
type: "number",
|
|
3010
|
+
advanced: true
|
|
3011
|
+
},
|
|
3012
|
+
bordered: {
|
|
3013
|
+
type: "boolean",
|
|
3014
|
+
advanced: true,
|
|
3015
|
+
defaultValueHint: true
|
|
3016
|
+
}
|
|
3017
|
+
}, COMMON_EVENT_HANDLERS),
|
|
3018
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
3019
|
+
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
3020
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
3021
|
+
importName: "AntdPassword"
|
|
3022
|
+
});
|
|
3023
|
+
}
|
|
3024
|
+
function registerNumberInput(loader) {
|
|
3025
|
+
registerComponentHelper(loader, AntdInputNumber, {
|
|
3026
|
+
name: "plasmic-antd5-input-number",
|
|
3027
|
+
parentComponentName: "plasmic-antd5-input",
|
|
3028
|
+
displayName: "Number Input",
|
|
3029
|
+
props: __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
3030
|
+
value: {
|
|
3031
|
+
type: "number"
|
|
3032
|
+
},
|
|
3033
|
+
placholder: {
|
|
3034
|
+
type: "string"
|
|
3035
|
+
},
|
|
3036
|
+
disabled: {
|
|
3037
|
+
type: "boolean"
|
|
3038
|
+
},
|
|
3039
|
+
max: {
|
|
3040
|
+
type: "number"
|
|
3041
|
+
},
|
|
3042
|
+
min: {
|
|
3043
|
+
type: "number"
|
|
3044
|
+
},
|
|
3045
|
+
step: {
|
|
3046
|
+
type: "number",
|
|
3047
|
+
helpText: "Increment or decrement step"
|
|
3048
|
+
},
|
|
3049
|
+
controls: {
|
|
3050
|
+
type: "boolean",
|
|
3051
|
+
displayName: "Show add/minus controls?",
|
|
3052
|
+
advanced: true
|
|
3053
|
+
}
|
|
3054
|
+
}, COMMON_DECORATOR_PROPS), COMMON_ADVANCED_PROPS), COMMON_EVENT_HANDLERS), {
|
|
3055
|
+
onChange: {
|
|
3056
|
+
type: "eventHandler",
|
|
3057
|
+
argTypes: [
|
|
3058
|
+
{
|
|
3059
|
+
name: "value",
|
|
3060
|
+
type: "number"
|
|
3061
|
+
}
|
|
3062
|
+
]
|
|
3063
|
+
}
|
|
3064
|
+
}),
|
|
3065
|
+
states: __spreadValues({}, COMMON_STATES),
|
|
3066
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
3067
|
+
importName: "AntdInputNumber"
|
|
3068
|
+
});
|
|
2395
3069
|
}
|
|
2396
3070
|
|
|
2397
3071
|
function registerAll(loader) {
|
|
2398
3072
|
registerConfigProvider(loader);
|
|
2399
3073
|
registerTokens(loader);
|
|
2400
3074
|
registerSelect(loader);
|
|
3075
|
+
registerTable(loader);
|
|
2401
3076
|
registerCheckbox(loader);
|
|
2402
3077
|
registerRadio(loader);
|
|
2403
3078
|
registerModal(loader);
|