@plasmicpkgs/antd5 0.0.115 → 0.0.119
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/LICENSE.app.md +661 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/antd.esm.js +1707 -639
- package/dist/antd.esm.js.map +1 -1
- package/dist/index.js +1707 -638
- package/dist/index.js.map +1 -1
- package/dist/react-utils.d.ts +1 -1
- package/dist/registerAvatar.d.ts +2 -2
- package/dist/registerButton.d.ts +1 -1
- package/dist/registerCheckbox.d.ts +1 -1
- package/dist/registerCollapse.d.ts +29 -18
- package/dist/registerColorPicker.d.ts +1 -1
- package/dist/registerConfigProvider.d.ts +1 -1
- package/dist/registerDatePicker.d.ts +2 -1
- package/dist/registerDrawer.d.ts +2 -1
- package/dist/registerDropdown.d.ts +2 -1
- package/dist/registerForm.d.ts +2 -2
- package/dist/registerModal.d.ts +3 -1
- package/dist/registerPopover.d.ts +8 -0
- package/dist/registerRadio.d.ts +1 -1
- package/dist/registerRate.d.ts +12 -0
- package/dist/registerSelect.d.ts +4 -4
- package/dist/registerSteps.d.ts +1 -1
- package/dist/registerSwitch.d.ts +1 -1
- package/dist/registerTable.d.ts +2 -2
- package/dist/registerTabs.d.ts +27 -0
- package/dist/registerTooltip.d.ts +1 -1
- package/dist/registerTree.d.ts +5 -5
- package/dist/registerUpload.d.ts +2 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +2 -2
- package/skinny/react-utils.d.ts +1 -1
- package/skinny/registerAvatar.d.ts +2 -2
- package/skinny/registerButton.d.ts +1 -1
- package/skinny/registerCheckbox.d.ts +1 -1
- package/skinny/registerCollapse.cjs.js +251 -157
- package/skinny/registerCollapse.cjs.js.map +1 -1
- package/skinny/registerCollapse.d.ts +29 -18
- package/skinny/registerCollapse.esm.js +243 -153
- package/skinny/registerCollapse.esm.js.map +1 -1
- package/skinny/registerColorPicker.d.ts +1 -1
- package/skinny/registerConfigProvider.d.ts +1 -1
- package/skinny/registerDatePicker.cjs.js +47 -2
- package/skinny/registerDatePicker.cjs.js.map +1 -1
- package/skinny/registerDatePicker.d.ts +2 -1
- package/skinny/registerDatePicker.esm.js +47 -2
- package/skinny/registerDatePicker.esm.js.map +1 -1
- package/skinny/registerDrawer.cjs.js +63 -6
- package/skinny/registerDrawer.cjs.js.map +1 -1
- package/skinny/registerDrawer.d.ts +2 -1
- package/skinny/registerDrawer.esm.js +63 -6
- package/skinny/registerDrawer.esm.js.map +1 -1
- package/skinny/registerDropdown.cjs.js +41 -3
- package/skinny/registerDropdown.cjs.js.map +1 -1
- package/skinny/registerDropdown.d.ts +2 -1
- package/skinny/registerDropdown.esm.js +41 -3
- package/skinny/registerDropdown.esm.js.map +1 -1
- package/skinny/registerForm.cjs.js.map +1 -1
- package/skinny/registerForm.d.ts +2 -2
- package/skinny/registerForm.esm.js.map +1 -1
- package/skinny/registerMenu.cjs.js +23 -0
- package/skinny/registerMenu.cjs.js.map +1 -1
- package/skinny/registerMenu.esm.js +23 -0
- package/skinny/registerMenu.esm.js.map +1 -1
- package/skinny/registerModal.cjs.js +30 -9
- package/skinny/registerModal.cjs.js.map +1 -1
- package/skinny/registerModal.d.ts +3 -1
- package/skinny/registerModal.esm.js +30 -9
- package/skinny/registerModal.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +176 -0
- package/skinny/registerPopover.cjs.js.map +1 -0
- package/skinny/registerPopover.d.ts +8 -0
- package/skinny/registerPopover.esm.js +169 -0
- package/skinny/registerPopover.esm.js.map +1 -0
- package/skinny/registerRadio.d.ts +1 -1
- package/skinny/registerRate.cjs.js +199 -0
- package/skinny/registerRate.cjs.js.map +1 -0
- package/skinny/registerRate.d.ts +12 -0
- package/skinny/registerRate.esm.js +191 -0
- package/skinny/registerRate.esm.js.map +1 -0
- package/skinny/registerSelect-40844a74.cjs.js.map +1 -1
- package/skinny/registerSelect-6b399103.esm.js.map +1 -1
- package/skinny/registerSelect.d.ts +4 -4
- package/skinny/registerSteps.d.ts +1 -1
- package/skinny/registerSwitch.d.ts +1 -1
- package/skinny/registerTable.d.ts +2 -2
- package/skinny/registerTabs.cjs.js +461 -0
- package/skinny/registerTabs.cjs.js.map +1 -0
- package/skinny/registerTabs.d.ts +27 -0
- package/skinny/registerTabs.esm.js +451 -0
- package/skinny/registerTabs.esm.js.map +1 -0
- package/skinny/registerTooltip.cjs.js +4 -0
- package/skinny/registerTooltip.cjs.js.map +1 -1
- package/skinny/registerTooltip.d.ts +1 -1
- package/skinny/registerTooltip.esm.js +4 -0
- package/skinny/registerTooltip.esm.js.map +1 -1
- package/skinny/registerTree.cjs.js.map +1 -1
- package/skinny/registerTree.d.ts +5 -5
- package/skinny/registerTree.esm.js.map +1 -1
- package/skinny/registerUpload.cjs.js +1 -1
- package/skinny/registerUpload.cjs.js.map +1 -1
- package/skinny/registerUpload.d.ts +2 -1
- package/skinny/registerUpload.esm.js +1 -1
- package/skinny/registerUpload.esm.js.map +1 -1
- package/skinny/utils.d.ts +1 -1
- package/LICENSE.md +0 -21
package/dist/antd.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { isValidElement, cloneElement, useState, useMemo } from 'react';
|
|
2
|
-
import { Result, Button, Checkbox, ConfigProvider, theme, message, notification, Menu, Dropdown, Input, InputNumber, Radio, Select, Switch, Form, DatePicker, Modal, Table, Upload, Avatar, Tooltip, ColorPicker, Drawer, Steps, Tree, Collapse } from 'antd';
|
|
2
|
+
import { Result, Button, Checkbox, ConfigProvider, theme, message, notification, Menu, Dropdown, Input, InputNumber, Radio, Select, Switch, Form, DatePicker, Modal, Table, Upload, Avatar, Tooltip, ColorPicker, Drawer, Steps, Tree, Collapse, Popover, Tabs, Rate } from 'antd';
|
|
3
3
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
4
4
|
import registerGlobalContext from '@plasmicapp/host/registerGlobalContext';
|
|
5
5
|
import { GlobalActionsProvider, usePlasmicCanvasContext, DataProvider, repeatedElement, usePlasmicLink } from '@plasmicapp/host';
|
|
@@ -10,6 +10,7 @@ import equal from 'fast-deep-equal';
|
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import { normalizeData, deriveFieldConfigs, usePlasmicDataOp } from '@plasmicapp/data-sources';
|
|
12
12
|
import dayjs from 'dayjs';
|
|
13
|
+
import uniqueId from 'lodash/uniqueId';
|
|
13
14
|
|
|
14
15
|
function makeRegisterGlobalContext(component, meta) {
|
|
15
16
|
return function(loader) {
|
|
@@ -111,43 +112,43 @@ class ErrorBoundary extends React.Component {
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
var __defProp$
|
|
115
|
-
var __defProps$
|
|
116
|
-
var __getOwnPropDescs$
|
|
117
|
-
var __getOwnPropSymbols$
|
|
118
|
-
var __hasOwnProp$
|
|
119
|
-
var __propIsEnum$
|
|
120
|
-
var __defNormalProp$
|
|
121
|
-
var __spreadValues$
|
|
115
|
+
var __defProp$o = Object.defineProperty;
|
|
116
|
+
var __defProps$i = Object.defineProperties;
|
|
117
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
118
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
119
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
120
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
121
|
+
var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
122
|
+
var __spreadValues$o = (a, b) => {
|
|
122
123
|
for (var prop in b || (b = {}))
|
|
123
|
-
if (__hasOwnProp$
|
|
124
|
-
__defNormalProp$
|
|
125
|
-
if (__getOwnPropSymbols$
|
|
126
|
-
for (var prop of __getOwnPropSymbols$
|
|
127
|
-
if (__propIsEnum$
|
|
128
|
-
__defNormalProp$
|
|
124
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
125
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
126
|
+
if (__getOwnPropSymbols$o)
|
|
127
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
128
|
+
if (__propIsEnum$o.call(b, prop))
|
|
129
|
+
__defNormalProp$o(a, prop, b[prop]);
|
|
129
130
|
}
|
|
130
131
|
return a;
|
|
131
132
|
};
|
|
132
|
-
var __spreadProps$
|
|
133
|
-
var __objRest$
|
|
133
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
134
|
+
var __objRest$h = (source, exclude) => {
|
|
134
135
|
var target = {};
|
|
135
136
|
for (var prop in source)
|
|
136
|
-
if (__hasOwnProp$
|
|
137
|
+
if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
137
138
|
target[prop] = source[prop];
|
|
138
|
-
if (source != null && __getOwnPropSymbols$
|
|
139
|
-
for (var prop of __getOwnPropSymbols$
|
|
140
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
139
|
+
if (source != null && __getOwnPropSymbols$o)
|
|
140
|
+
for (var prop of __getOwnPropSymbols$o(source)) {
|
|
141
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
|
|
141
142
|
target[prop] = source[prop];
|
|
142
143
|
}
|
|
143
144
|
return target;
|
|
144
145
|
};
|
|
145
146
|
function AntdButton(props) {
|
|
146
|
-
const _a = props, { submitsForm = false } = _a, rest = __objRest$
|
|
147
|
+
const _a = props, { submitsForm = false } = _a, rest = __objRest$h(_a, ["submitsForm"]);
|
|
147
148
|
const target = props.target === true ? "_blank" : props.target === false ? void 0 : props.target;
|
|
148
149
|
return /* @__PURE__ */ React.createElement(
|
|
149
150
|
Button,
|
|
150
|
-
__spreadProps$
|
|
151
|
+
__spreadProps$i(__spreadValues$o(__spreadProps$i(__spreadValues$o({}, rest), {
|
|
151
152
|
htmlType: submitsForm ? "submit" : "button"
|
|
152
153
|
}), rest), {
|
|
153
154
|
target
|
|
@@ -220,7 +221,7 @@ function registerButton(loader) {
|
|
|
220
221
|
hidden: (props) => !props.href,
|
|
221
222
|
defaultValueHint: false
|
|
222
223
|
},
|
|
223
|
-
children: __spreadValues$
|
|
224
|
+
children: __spreadValues$o({
|
|
224
225
|
type: "slot",
|
|
225
226
|
defaultValue: [
|
|
226
227
|
{
|
|
@@ -244,39 +245,39 @@ function registerButton(loader) {
|
|
|
244
245
|
});
|
|
245
246
|
}
|
|
246
247
|
|
|
247
|
-
var __defProp$
|
|
248
|
-
var __defProps$
|
|
249
|
-
var __getOwnPropDescs$
|
|
250
|
-
var __getOwnPropSymbols$
|
|
251
|
-
var __hasOwnProp$
|
|
252
|
-
var __propIsEnum$
|
|
253
|
-
var __defNormalProp$
|
|
254
|
-
var __spreadValues$
|
|
248
|
+
var __defProp$n = Object.defineProperty;
|
|
249
|
+
var __defProps$h = Object.defineProperties;
|
|
250
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
251
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
252
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
253
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
254
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
255
|
+
var __spreadValues$n = (a, b) => {
|
|
255
256
|
for (var prop in b || (b = {}))
|
|
256
|
-
if (__hasOwnProp$
|
|
257
|
-
__defNormalProp$
|
|
258
|
-
if (__getOwnPropSymbols$
|
|
259
|
-
for (var prop of __getOwnPropSymbols$
|
|
260
|
-
if (__propIsEnum$
|
|
261
|
-
__defNormalProp$
|
|
257
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
258
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
259
|
+
if (__getOwnPropSymbols$n)
|
|
260
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
261
|
+
if (__propIsEnum$n.call(b, prop))
|
|
262
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
262
263
|
}
|
|
263
264
|
return a;
|
|
264
265
|
};
|
|
265
|
-
var __spreadProps$
|
|
266
|
-
var __objRest$
|
|
266
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
267
|
+
var __objRest$g = (source, exclude) => {
|
|
267
268
|
var target = {};
|
|
268
269
|
for (var prop in source)
|
|
269
|
-
if (__hasOwnProp$
|
|
270
|
+
if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
270
271
|
target[prop] = source[prop];
|
|
271
|
-
if (source != null && __getOwnPropSymbols$
|
|
272
|
-
for (var prop of __getOwnPropSymbols$
|
|
273
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
272
|
+
if (source != null && __getOwnPropSymbols$n)
|
|
273
|
+
for (var prop of __getOwnPropSymbols$n(source)) {
|
|
274
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
|
|
274
275
|
target[prop] = source[prop];
|
|
275
276
|
}
|
|
276
277
|
return target;
|
|
277
278
|
};
|
|
278
279
|
function AntdCheckbox(props) {
|
|
279
|
-
const _a = props, { onChange } = _a, rest = __objRest$
|
|
280
|
+
const _a = props, { onChange } = _a, rest = __objRest$g(_a, ["onChange"]);
|
|
280
281
|
const wrappedOnChange = React.useMemo(() => {
|
|
281
282
|
if (onChange) {
|
|
282
283
|
return (event) => onChange(event.target.checked);
|
|
@@ -284,7 +285,7 @@ function AntdCheckbox(props) {
|
|
|
284
285
|
return void 0;
|
|
285
286
|
}
|
|
286
287
|
}, [onChange]);
|
|
287
|
-
return /* @__PURE__ */ React.createElement(Checkbox, __spreadProps$
|
|
288
|
+
return /* @__PURE__ */ React.createElement(Checkbox, __spreadProps$h(__spreadValues$n({}, rest), { onChange: wrappedOnChange }));
|
|
288
289
|
}
|
|
289
290
|
AntdCheckbox.__plasmicFormFieldMeta = { valueProp: "checked" };
|
|
290
291
|
const AntdCheckboxGroup = Checkbox.Group;
|
|
@@ -319,7 +320,7 @@ function registerCheckbox(loader) {
|
|
|
319
320
|
defaultValueHint: false,
|
|
320
321
|
advanced: true
|
|
321
322
|
},
|
|
322
|
-
children: __spreadValues$
|
|
323
|
+
children: __spreadValues$n({
|
|
323
324
|
type: "slot",
|
|
324
325
|
defaultValue: [
|
|
325
326
|
{
|
|
@@ -400,33 +401,33 @@ function registerCheckbox(loader) {
|
|
|
400
401
|
});
|
|
401
402
|
}
|
|
402
403
|
|
|
403
|
-
var __defProp$
|
|
404
|
-
var __defProps$
|
|
405
|
-
var __getOwnPropDescs$
|
|
406
|
-
var __getOwnPropSymbols$
|
|
407
|
-
var __hasOwnProp$
|
|
408
|
-
var __propIsEnum$
|
|
409
|
-
var __defNormalProp$
|
|
410
|
-
var __spreadValues$
|
|
404
|
+
var __defProp$m = Object.defineProperty;
|
|
405
|
+
var __defProps$g = Object.defineProperties;
|
|
406
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
407
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
408
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
409
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
410
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
411
|
+
var __spreadValues$m = (a, b) => {
|
|
411
412
|
for (var prop in b || (b = {}))
|
|
412
|
-
if (__hasOwnProp$
|
|
413
|
-
__defNormalProp$
|
|
414
|
-
if (__getOwnPropSymbols$
|
|
415
|
-
for (var prop of __getOwnPropSymbols$
|
|
416
|
-
if (__propIsEnum$
|
|
417
|
-
__defNormalProp$
|
|
413
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
414
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
415
|
+
if (__getOwnPropSymbols$m)
|
|
416
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
417
|
+
if (__propIsEnum$m.call(b, prop))
|
|
418
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
418
419
|
}
|
|
419
420
|
return a;
|
|
420
421
|
};
|
|
421
|
-
var __spreadProps$
|
|
422
|
-
var __objRest$
|
|
422
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
423
|
+
var __objRest$f = (source, exclude) => {
|
|
423
424
|
var target = {};
|
|
424
425
|
for (var prop in source)
|
|
425
|
-
if (__hasOwnProp$
|
|
426
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
426
427
|
target[prop] = source[prop];
|
|
427
|
-
if (source != null && __getOwnPropSymbols$
|
|
428
|
-
for (var prop of __getOwnPropSymbols$
|
|
429
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
428
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
429
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
430
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
430
431
|
target[prop] = source[prop];
|
|
431
432
|
}
|
|
432
433
|
return target;
|
|
@@ -476,12 +477,12 @@ function themeToAntdConfig(opts) {
|
|
|
476
477
|
};
|
|
477
478
|
}
|
|
478
479
|
function AntdConfigProvider(props) {
|
|
479
|
-
const _a = props, { children, themeStyles, loadingText, removeLoading } = _a, rest = __objRest$
|
|
480
|
+
const _a = props, { children, themeStyles, loadingText, removeLoading } = _a, rest = __objRest$f(_a, ["children", "themeStyles", "loadingText", "removeLoading"]);
|
|
480
481
|
return /* @__PURE__ */ React.createElement(
|
|
481
482
|
ConfigProvider,
|
|
482
|
-
__spreadValues$
|
|
483
|
+
__spreadValues$m({
|
|
483
484
|
locale: defaultLocale
|
|
484
|
-
}, themeToAntdConfig(__spreadProps$
|
|
485
|
+
}, themeToAntdConfig(__spreadProps$g(__spreadValues$m({}, rest), {
|
|
485
486
|
fontFamily: themeStyles.fontFamily,
|
|
486
487
|
fontSize: themeStyles.fontSize ? parseInt(themeStyles.fontSize) : void 0,
|
|
487
488
|
lineHeight: themeStyles.lineHeight ? parseInt(themeStyles.lineHeight) : void 0,
|
|
@@ -523,8 +524,8 @@ function InnerConfigProvider(props) {
|
|
|
523
524
|
() => ({
|
|
524
525
|
showNotification: (opts) => {
|
|
525
526
|
var _b;
|
|
526
|
-
const _a = opts, rest = __objRest$
|
|
527
|
-
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$
|
|
527
|
+
const _a = opts, rest = __objRest$f(_a, ["type"]);
|
|
528
|
+
app.notification[(_b = opts.type) != null ? _b : "info"](__spreadValues$m({}, rest));
|
|
528
529
|
},
|
|
529
530
|
hideNotifications: () => {
|
|
530
531
|
app.notification.destroy();
|
|
@@ -824,7 +825,7 @@ function registerTokens(loader) {
|
|
|
824
825
|
}
|
|
825
826
|
const registerConfigProvider = makeRegisterGlobalContext(
|
|
826
827
|
AntdConfigProvider,
|
|
827
|
-
__spreadProps$
|
|
828
|
+
__spreadProps$g(__spreadValues$m({
|
|
828
829
|
name: "plasmic-antd5-config-provider",
|
|
829
830
|
displayName: "Ant Design System Settings",
|
|
830
831
|
props: {
|
|
@@ -944,25 +945,25 @@ const registerConfigProvider = makeRegisterGlobalContext(
|
|
|
944
945
|
})
|
|
945
946
|
);
|
|
946
947
|
|
|
947
|
-
var __defProp$
|
|
948
|
-
var __defProps$
|
|
949
|
-
var __getOwnPropDescs$
|
|
950
|
-
var __getOwnPropSymbols$
|
|
951
|
-
var __hasOwnProp$
|
|
952
|
-
var __propIsEnum$
|
|
953
|
-
var __defNormalProp$
|
|
954
|
-
var __spreadValues$
|
|
948
|
+
var __defProp$l = Object.defineProperty;
|
|
949
|
+
var __defProps$f = Object.defineProperties;
|
|
950
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
951
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
952
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
953
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
954
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
955
|
+
var __spreadValues$l = (a, b) => {
|
|
955
956
|
for (var prop in b || (b = {}))
|
|
956
|
-
if (__hasOwnProp$
|
|
957
|
-
__defNormalProp$
|
|
958
|
-
if (__getOwnPropSymbols$
|
|
959
|
-
for (var prop of __getOwnPropSymbols$
|
|
960
|
-
if (__propIsEnum$
|
|
961
|
-
__defNormalProp$
|
|
957
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
958
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
959
|
+
if (__getOwnPropSymbols$l)
|
|
960
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
961
|
+
if (__propIsEnum$l.call(b, prop))
|
|
962
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
962
963
|
}
|
|
963
964
|
return a;
|
|
964
965
|
};
|
|
965
|
-
var __spreadProps$
|
|
966
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
966
967
|
const AntdMenuDivider = Menu.Divider;
|
|
967
968
|
const AntdMenuItem = Menu.Item;
|
|
968
969
|
const AntdMenuItemGroup = Menu.ItemGroup;
|
|
@@ -1017,7 +1018,7 @@ const MENU_ITEM_TYPE = {
|
|
|
1017
1018
|
}
|
|
1018
1019
|
}
|
|
1019
1020
|
};
|
|
1020
|
-
const UNKEYED_MENU_ITEM_TYPE = __spreadProps$
|
|
1021
|
+
const UNKEYED_MENU_ITEM_TYPE = __spreadProps$f(__spreadValues$l({}, MENU_ITEM_TYPE), {
|
|
1021
1022
|
fields: Object.fromEntries(
|
|
1022
1023
|
Object.entries(MENU_ITEM_TYPE.fields).filter(([k]) => k !== "key")
|
|
1023
1024
|
)
|
|
@@ -1051,6 +1052,25 @@ function registerMenu(loader) {
|
|
|
1051
1052
|
defaultValueHint: "hover",
|
|
1052
1053
|
advanced: true
|
|
1053
1054
|
},
|
|
1055
|
+
// menuScopeClassName: {
|
|
1056
|
+
// type: "styleScopeClass",
|
|
1057
|
+
// scopeName: "menu",
|
|
1058
|
+
// } as any,
|
|
1059
|
+
// menuItemClassName: {
|
|
1060
|
+
// type: "class",
|
|
1061
|
+
// displayName: "Menu items",
|
|
1062
|
+
// noSelf: true,
|
|
1063
|
+
// selectors: [
|
|
1064
|
+
// {
|
|
1065
|
+
// selector: ":menu .ant-menu-item",
|
|
1066
|
+
// label: "Base",
|
|
1067
|
+
// },
|
|
1068
|
+
// {
|
|
1069
|
+
// selector: ":menu .ant-menu-item-selected",
|
|
1070
|
+
// label: "Selected",
|
|
1071
|
+
// },
|
|
1072
|
+
// ],
|
|
1073
|
+
// } as any,
|
|
1054
1074
|
children: {
|
|
1055
1075
|
type: "slot",
|
|
1056
1076
|
allowedComponents: allowedMenuComponents,
|
|
@@ -1103,7 +1123,7 @@ function registerMenu(loader) {
|
|
|
1103
1123
|
type: "string",
|
|
1104
1124
|
description: "Set display title for collapsed item"
|
|
1105
1125
|
},
|
|
1106
|
-
children: __spreadValues$
|
|
1126
|
+
children: __spreadValues$l({
|
|
1107
1127
|
type: "slot",
|
|
1108
1128
|
defaultValue: [
|
|
1109
1129
|
{
|
|
@@ -1187,6 +1207,10 @@ function registerMenu(loader) {
|
|
|
1187
1207
|
}
|
|
1188
1208
|
]
|
|
1189
1209
|
},
|
|
1210
|
+
popupClassName: {
|
|
1211
|
+
type: "class",
|
|
1212
|
+
displayName: "Sidemenu Popup"
|
|
1213
|
+
},
|
|
1190
1214
|
children: {
|
|
1191
1215
|
type: "slot",
|
|
1192
1216
|
allowedComponents: allowedMenuComponents,
|
|
@@ -1211,33 +1235,33 @@ function registerMenu(loader) {
|
|
|
1211
1235
|
});
|
|
1212
1236
|
}
|
|
1213
1237
|
|
|
1214
|
-
var __defProp$
|
|
1215
|
-
var __defProps$
|
|
1216
|
-
var __getOwnPropDescs$
|
|
1217
|
-
var __getOwnPropSymbols$
|
|
1218
|
-
var __hasOwnProp$
|
|
1219
|
-
var __propIsEnum$
|
|
1220
|
-
var __defNormalProp$
|
|
1221
|
-
var __spreadValues$
|
|
1238
|
+
var __defProp$k = Object.defineProperty;
|
|
1239
|
+
var __defProps$e = Object.defineProperties;
|
|
1240
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
1241
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
1242
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
1243
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
1244
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1245
|
+
var __spreadValues$k = (a, b) => {
|
|
1222
1246
|
for (var prop in b || (b = {}))
|
|
1223
|
-
if (__hasOwnProp$
|
|
1224
|
-
__defNormalProp$
|
|
1225
|
-
if (__getOwnPropSymbols$
|
|
1226
|
-
for (var prop of __getOwnPropSymbols$
|
|
1227
|
-
if (__propIsEnum$
|
|
1228
|
-
__defNormalProp$
|
|
1247
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
1248
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1249
|
+
if (__getOwnPropSymbols$k)
|
|
1250
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
1251
|
+
if (__propIsEnum$k.call(b, prop))
|
|
1252
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1229
1253
|
}
|
|
1230
1254
|
return a;
|
|
1231
1255
|
};
|
|
1232
|
-
var __spreadProps$
|
|
1233
|
-
var __objRest$
|
|
1256
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
1257
|
+
var __objRest$e = (source, exclude) => {
|
|
1234
1258
|
var target = {};
|
|
1235
1259
|
for (var prop in source)
|
|
1236
|
-
if (__hasOwnProp$
|
|
1260
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1237
1261
|
target[prop] = source[prop];
|
|
1238
|
-
if (source != null && __getOwnPropSymbols$
|
|
1239
|
-
for (var prop of __getOwnPropSymbols$
|
|
1240
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1262
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
1263
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
1264
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
1241
1265
|
target[prop] = source[prop];
|
|
1242
1266
|
}
|
|
1243
1267
|
return target;
|
|
@@ -1249,24 +1273,34 @@ function AntdDropdown(props) {
|
|
|
1249
1273
|
menuItems,
|
|
1250
1274
|
useMenuItemsSlot = false,
|
|
1251
1275
|
menuItemsJson,
|
|
1252
|
-
trigger = "click"
|
|
1253
|
-
|
|
1276
|
+
trigger = "click",
|
|
1277
|
+
dropdownMenuScopeClassName
|
|
1278
|
+
} = _a, rest = __objRest$e(_a, [
|
|
1254
1279
|
"children",
|
|
1255
1280
|
"onAction",
|
|
1256
1281
|
"menuItems",
|
|
1257
1282
|
"useMenuItemsSlot",
|
|
1258
1283
|
"menuItemsJson",
|
|
1259
|
-
"trigger"
|
|
1284
|
+
"trigger",
|
|
1285
|
+
"dropdownMenuScopeClassName"
|
|
1260
1286
|
]);
|
|
1261
1287
|
return /* @__PURE__ */ React.createElement(
|
|
1262
1288
|
Dropdown,
|
|
1263
|
-
__spreadProps$
|
|
1289
|
+
__spreadProps$e(__spreadValues$k({}, rest), {
|
|
1264
1290
|
trigger: [trigger],
|
|
1265
1291
|
overlay: () => {
|
|
1266
1292
|
var _a2;
|
|
1267
1293
|
const itemsChildren = useMenuItemsSlot ? (_a2 = menuItems == null ? void 0 : menuItems()) != null ? _a2 : [] : void 0;
|
|
1268
1294
|
const items = useMenuItemsSlot ? void 0 : menuItemsJson;
|
|
1269
|
-
return /* @__PURE__ */ React.createElement(
|
|
1295
|
+
return /* @__PURE__ */ React.createElement(
|
|
1296
|
+
Menu,
|
|
1297
|
+
{
|
|
1298
|
+
className: `${dropdownMenuScopeClassName}`,
|
|
1299
|
+
onClick: (event) => onAction == null ? void 0 : onAction(event.key),
|
|
1300
|
+
items
|
|
1301
|
+
},
|
|
1302
|
+
itemsChildren
|
|
1303
|
+
);
|
|
1270
1304
|
}
|
|
1271
1305
|
}),
|
|
1272
1306
|
typeof children === "string" ? /* @__PURE__ */ React.createElement("div", null, children) : children
|
|
@@ -1323,6 +1357,34 @@ function registerDropdown(loader) {
|
|
|
1323
1357
|
}
|
|
1324
1358
|
]
|
|
1325
1359
|
},
|
|
1360
|
+
dropdownMenuScopeClassName: {
|
|
1361
|
+
type: "styleScopeClass",
|
|
1362
|
+
scopeName: "dropdownMenu"
|
|
1363
|
+
},
|
|
1364
|
+
menuClassName: {
|
|
1365
|
+
type: "class",
|
|
1366
|
+
displayName: "Menu",
|
|
1367
|
+
selectors: [
|
|
1368
|
+
{
|
|
1369
|
+
selector: ":dropdownMenu.ant-dropdown-menu",
|
|
1370
|
+
label: "Base"
|
|
1371
|
+
}
|
|
1372
|
+
]
|
|
1373
|
+
},
|
|
1374
|
+
menuItemClassName: {
|
|
1375
|
+
type: "class",
|
|
1376
|
+
displayName: "Menu item",
|
|
1377
|
+
selectors: [
|
|
1378
|
+
{
|
|
1379
|
+
selector: ":dropdownMenu.ant-dropdown-menu .ant-dropdown-menu-item",
|
|
1380
|
+
label: "Base"
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
selector: ":dropdownMenu.ant-dropdown-menu .ant-dropdown-menu-item-active",
|
|
1384
|
+
label: "Focused"
|
|
1385
|
+
}
|
|
1386
|
+
]
|
|
1387
|
+
},
|
|
1326
1388
|
open: {
|
|
1327
1389
|
type: "boolean",
|
|
1328
1390
|
description: "Toggle visibility of dropdown menu in Plasmic Editor",
|
|
@@ -1365,7 +1427,7 @@ function registerDropdown(loader) {
|
|
|
1365
1427
|
advanced: true,
|
|
1366
1428
|
description: "Instead of configuring a list of menu items, build the menu items using MenuItem elements. This gives you greater control over item styling."
|
|
1367
1429
|
},
|
|
1368
|
-
children: __spreadValues$
|
|
1430
|
+
children: __spreadValues$k({
|
|
1369
1431
|
type: "slot",
|
|
1370
1432
|
defaultValue: [
|
|
1371
1433
|
{
|
|
@@ -1390,19 +1452,19 @@ function registerDropdown(loader) {
|
|
|
1390
1452
|
});
|
|
1391
1453
|
}
|
|
1392
1454
|
|
|
1393
|
-
var __defProp$
|
|
1394
|
-
var __getOwnPropSymbols$
|
|
1395
|
-
var __hasOwnProp$
|
|
1396
|
-
var __propIsEnum$
|
|
1397
|
-
var __defNormalProp$
|
|
1398
|
-
var __spreadValues$
|
|
1455
|
+
var __defProp$j = Object.defineProperty;
|
|
1456
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
1457
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
1458
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
1459
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1460
|
+
var __spreadValues$j = (a, b) => {
|
|
1399
1461
|
for (var prop in b || (b = {}))
|
|
1400
|
-
if (__hasOwnProp$
|
|
1401
|
-
__defNormalProp$
|
|
1402
|
-
if (__getOwnPropSymbols$
|
|
1403
|
-
for (var prop of __getOwnPropSymbols$
|
|
1404
|
-
if (__propIsEnum$
|
|
1405
|
-
__defNormalProp$
|
|
1462
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
1463
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1464
|
+
if (__getOwnPropSymbols$j)
|
|
1465
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
1466
|
+
if (__propIsEnum$j.call(b, prop))
|
|
1467
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1406
1468
|
}
|
|
1407
1469
|
return a;
|
|
1408
1470
|
};
|
|
@@ -1413,7 +1475,7 @@ function mergeProps(props, ...restProps) {
|
|
|
1413
1475
|
if (restProps.every((rest) => Object.keys(rest).length === 0)) {
|
|
1414
1476
|
return props;
|
|
1415
1477
|
}
|
|
1416
|
-
const result = __spreadValues$
|
|
1478
|
+
const result = __spreadValues$j({}, props);
|
|
1417
1479
|
for (const rest of restProps) {
|
|
1418
1480
|
for (const key of Object.keys(rest)) {
|
|
1419
1481
|
result[key] = mergePropVals(key, result[key], rest[key]);
|
|
@@ -1450,7 +1512,7 @@ function mergePropVals(name, val1, val2) {
|
|
|
1450
1512
|
} else if (name === "className") {
|
|
1451
1513
|
return classNames(val1, val2);
|
|
1452
1514
|
} else if (name === "style") {
|
|
1453
|
-
return __spreadValues$
|
|
1515
|
+
return __spreadValues$j(__spreadValues$j({}, val1), val2);
|
|
1454
1516
|
} else if (name === "ref") {
|
|
1455
1517
|
return mergeRefs(val1, val2);
|
|
1456
1518
|
} else if (typeof val1 !== typeof val2) {
|
|
@@ -1486,25 +1548,25 @@ function reactNodeToString(reactNode) {
|
|
|
1486
1548
|
return string;
|
|
1487
1549
|
}
|
|
1488
1550
|
|
|
1489
|
-
var __defProp$
|
|
1490
|
-
var __defProps$
|
|
1491
|
-
var __getOwnPropDescs$
|
|
1492
|
-
var __getOwnPropSymbols$
|
|
1493
|
-
var __hasOwnProp$
|
|
1494
|
-
var __propIsEnum$
|
|
1495
|
-
var __defNormalProp$
|
|
1496
|
-
var __spreadValues$
|
|
1551
|
+
var __defProp$i = Object.defineProperty;
|
|
1552
|
+
var __defProps$d = Object.defineProperties;
|
|
1553
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
1554
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
1555
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
1556
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
1557
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1558
|
+
var __spreadValues$i = (a, b) => {
|
|
1497
1559
|
for (var prop in b || (b = {}))
|
|
1498
|
-
if (__hasOwnProp$
|
|
1499
|
-
__defNormalProp$
|
|
1500
|
-
if (__getOwnPropSymbols$
|
|
1501
|
-
for (var prop of __getOwnPropSymbols$
|
|
1502
|
-
if (__propIsEnum$
|
|
1503
|
-
__defNormalProp$
|
|
1560
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
1561
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
1562
|
+
if (__getOwnPropSymbols$i)
|
|
1563
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
1564
|
+
if (__propIsEnum$i.call(b, prop))
|
|
1565
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
1504
1566
|
}
|
|
1505
1567
|
return a;
|
|
1506
1568
|
};
|
|
1507
|
-
var __spreadProps$
|
|
1569
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
1508
1570
|
const AntdInput = Input;
|
|
1509
1571
|
const AntdTextArea = Input.TextArea;
|
|
1510
1572
|
const AntdPassword = Input.Password;
|
|
@@ -1594,10 +1656,10 @@ const COMMON_EVENT_HANDLERS = {
|
|
|
1594
1656
|
};
|
|
1595
1657
|
const inputComponentName = "plasmic-antd5-input";
|
|
1596
1658
|
function registerInput(loader) {
|
|
1597
|
-
registerComponentHelper(loader, AntdInput, __spreadProps$
|
|
1659
|
+
registerComponentHelper(loader, AntdInput, __spreadProps$d(__spreadValues$i({
|
|
1598
1660
|
name: inputComponentName,
|
|
1599
1661
|
displayName: "Input",
|
|
1600
|
-
props: __spreadValues$
|
|
1662
|
+
props: __spreadValues$i(__spreadValues$i(__spreadValues$i({
|
|
1601
1663
|
value: {
|
|
1602
1664
|
type: "string",
|
|
1603
1665
|
hidden: (ps) => !!ps.__plasmicFormField
|
|
@@ -1628,7 +1690,7 @@ function registerInput(loader) {
|
|
|
1628
1690
|
defaultValueHint: "text"
|
|
1629
1691
|
}
|
|
1630
1692
|
}, COMMON_ADVANCED_PROPS), COMMON_DECORATOR_PROPS), COMMON_EVENT_HANDLERS),
|
|
1631
|
-
states: __spreadValues$
|
|
1693
|
+
states: __spreadValues$i({}, COMMON_STATES)
|
|
1632
1694
|
}, { trapsSelection: true }), {
|
|
1633
1695
|
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1634
1696
|
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
@@ -1641,7 +1703,7 @@ function registerTextArea(loader) {
|
|
|
1641
1703
|
name: textAreaComponentName,
|
|
1642
1704
|
parentComponentName: inputComponentName,
|
|
1643
1705
|
displayName: "Text Area",
|
|
1644
|
-
props: __spreadValues$
|
|
1706
|
+
props: __spreadValues$i({
|
|
1645
1707
|
value: {
|
|
1646
1708
|
type: "string",
|
|
1647
1709
|
hidden: (ps) => !!ps.__plasmicFormField
|
|
@@ -1662,7 +1724,7 @@ function registerTextArea(loader) {
|
|
|
1662
1724
|
defaultValueHint: true
|
|
1663
1725
|
}
|
|
1664
1726
|
}, COMMON_EVENT_HANDLERS),
|
|
1665
|
-
states: __spreadValues$
|
|
1727
|
+
states: __spreadValues$i({}, COMMON_STATES),
|
|
1666
1728
|
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1667
1729
|
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1668
1730
|
importName: "AntdTextArea"
|
|
@@ -1674,7 +1736,7 @@ function registerPasswordInput(loader) {
|
|
|
1674
1736
|
name: passwordComponentName,
|
|
1675
1737
|
parentComponentName: inputComponentName,
|
|
1676
1738
|
displayName: "Password Input",
|
|
1677
|
-
props: __spreadValues$
|
|
1739
|
+
props: __spreadValues$i({
|
|
1678
1740
|
value: {
|
|
1679
1741
|
type: "string",
|
|
1680
1742
|
hidden: (ps) => !!ps.__plasmicFormField
|
|
@@ -1695,7 +1757,7 @@ function registerPasswordInput(loader) {
|
|
|
1695
1757
|
defaultValueHint: true
|
|
1696
1758
|
}
|
|
1697
1759
|
}, COMMON_EVENT_HANDLERS),
|
|
1698
|
-
states: __spreadValues$
|
|
1760
|
+
states: __spreadValues$i({}, COMMON_STATES),
|
|
1699
1761
|
componentHelpers: COMMON_HELPERS_CONFIG,
|
|
1700
1762
|
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
1701
1763
|
importName: "AntdPassword"
|
|
@@ -1703,11 +1765,11 @@ function registerPasswordInput(loader) {
|
|
|
1703
1765
|
}
|
|
1704
1766
|
const inputNumberComponentName = "plasmic-antd5-input-number";
|
|
1705
1767
|
function registerNumberInput(loader) {
|
|
1706
|
-
registerComponentHelper(loader, AntdInputNumber, __spreadProps$
|
|
1768
|
+
registerComponentHelper(loader, AntdInputNumber, __spreadProps$d(__spreadValues$i({
|
|
1707
1769
|
name: inputNumberComponentName,
|
|
1708
1770
|
parentComponentName: inputComponentName,
|
|
1709
1771
|
displayName: "Number Input",
|
|
1710
|
-
props: __spreadProps$
|
|
1772
|
+
props: __spreadProps$d(__spreadValues$i(__spreadValues$i(__spreadValues$i({
|
|
1711
1773
|
value: {
|
|
1712
1774
|
type: "number",
|
|
1713
1775
|
hidden: (ps) => !!ps.__plasmicFormField
|
|
@@ -1745,7 +1807,7 @@ function registerNumberInput(loader) {
|
|
|
1745
1807
|
]
|
|
1746
1808
|
}
|
|
1747
1809
|
}),
|
|
1748
|
-
states: __spreadValues$
|
|
1810
|
+
states: __spreadValues$i({}, COMMON_STATES)
|
|
1749
1811
|
}, { trapsSelection: true }), {
|
|
1750
1812
|
// don't need component helpers
|
|
1751
1813
|
importPath: "@plasmicpkgs/antd5/skinny/registerInput",
|
|
@@ -1753,33 +1815,33 @@ function registerNumberInput(loader) {
|
|
|
1753
1815
|
}));
|
|
1754
1816
|
}
|
|
1755
1817
|
|
|
1756
|
-
var __defProp$
|
|
1757
|
-
var __defProps$
|
|
1758
|
-
var __getOwnPropDescs$
|
|
1759
|
-
var __getOwnPropSymbols$
|
|
1760
|
-
var __hasOwnProp$
|
|
1761
|
-
var __propIsEnum$
|
|
1762
|
-
var __defNormalProp$
|
|
1763
|
-
var __spreadValues$
|
|
1818
|
+
var __defProp$h = Object.defineProperty;
|
|
1819
|
+
var __defProps$c = Object.defineProperties;
|
|
1820
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1821
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1822
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1823
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1824
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1825
|
+
var __spreadValues$h = (a, b) => {
|
|
1764
1826
|
for (var prop in b || (b = {}))
|
|
1765
|
-
if (__hasOwnProp$
|
|
1766
|
-
__defNormalProp$
|
|
1767
|
-
if (__getOwnPropSymbols$
|
|
1768
|
-
for (var prop of __getOwnPropSymbols$
|
|
1769
|
-
if (__propIsEnum$
|
|
1770
|
-
__defNormalProp$
|
|
1827
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
1828
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1829
|
+
if (__getOwnPropSymbols$h)
|
|
1830
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
1831
|
+
if (__propIsEnum$h.call(b, prop))
|
|
1832
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1771
1833
|
}
|
|
1772
1834
|
return a;
|
|
1773
1835
|
};
|
|
1774
|
-
var __spreadProps$
|
|
1775
|
-
var __objRest$
|
|
1836
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1837
|
+
var __objRest$d = (source, exclude) => {
|
|
1776
1838
|
var target = {};
|
|
1777
1839
|
for (var prop in source)
|
|
1778
|
-
if (__hasOwnProp$
|
|
1840
|
+
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1779
1841
|
target[prop] = source[prop];
|
|
1780
|
-
if (source != null && __getOwnPropSymbols$
|
|
1781
|
-
for (var prop of __getOwnPropSymbols$
|
|
1782
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1842
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
1843
|
+
for (var prop of __getOwnPropSymbols$h(source)) {
|
|
1844
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
|
|
1783
1845
|
target[prop] = source[prop];
|
|
1784
1846
|
}
|
|
1785
1847
|
return target;
|
|
@@ -1788,7 +1850,7 @@ const RadioGroup = Radio.Group;
|
|
|
1788
1850
|
const AntdRadio = Radio;
|
|
1789
1851
|
const AntdRadioButton = Radio.Button;
|
|
1790
1852
|
function AntdRadioGroup(props) {
|
|
1791
|
-
const _a = props, { onChange, useChildren } = _a, rest = __objRest$
|
|
1853
|
+
const _a = props, { onChange, useChildren } = _a, rest = __objRest$d(_a, ["onChange", "useChildren"]);
|
|
1792
1854
|
const wrappedOnChange = React.useMemo(() => {
|
|
1793
1855
|
if (onChange) {
|
|
1794
1856
|
return (event) => onChange(event.target.value);
|
|
@@ -1798,7 +1860,7 @@ function AntdRadioGroup(props) {
|
|
|
1798
1860
|
}, [onChange]);
|
|
1799
1861
|
return /* @__PURE__ */ React.createElement(
|
|
1800
1862
|
RadioGroup,
|
|
1801
|
-
__spreadProps$
|
|
1863
|
+
__spreadProps$c(__spreadValues$h({}, rest), {
|
|
1802
1864
|
onChange: wrappedOnChange,
|
|
1803
1865
|
options: useChildren ? void 0 : rest.options
|
|
1804
1866
|
})
|
|
@@ -1826,7 +1888,7 @@ function registerRadio(loader) {
|
|
|
1826
1888
|
defaultValueHint: false,
|
|
1827
1889
|
advanced: true
|
|
1828
1890
|
},
|
|
1829
|
-
children: __spreadValues$
|
|
1891
|
+
children: __spreadValues$h({
|
|
1830
1892
|
type: "slot",
|
|
1831
1893
|
defaultValue: [
|
|
1832
1894
|
{
|
|
@@ -1858,7 +1920,7 @@ function registerRadio(loader) {
|
|
|
1858
1920
|
defaultValueHint: false,
|
|
1859
1921
|
advanced: true
|
|
1860
1922
|
},
|
|
1861
|
-
children: __spreadValues$
|
|
1923
|
+
children: __spreadValues$h({
|
|
1862
1924
|
type: "slot",
|
|
1863
1925
|
defaultValue: [
|
|
1864
1926
|
{
|
|
@@ -1872,7 +1934,7 @@ function registerRadio(loader) {
|
|
|
1872
1934
|
importName: "AntdRadioButton",
|
|
1873
1935
|
parentComponentName: radioGroupComponentName
|
|
1874
1936
|
});
|
|
1875
|
-
registerComponentHelper(loader, AntdRadioGroup, __spreadValues$
|
|
1937
|
+
registerComponentHelper(loader, AntdRadioGroup, __spreadValues$h({
|
|
1876
1938
|
name: radioGroupComponentName,
|
|
1877
1939
|
displayName: "Radio Group",
|
|
1878
1940
|
props: {
|
|
@@ -1995,33 +2057,33 @@ function registerRadio(loader) {
|
|
|
1995
2057
|
}));
|
|
1996
2058
|
}
|
|
1997
2059
|
|
|
1998
|
-
var __defProp$
|
|
1999
|
-
var __defProps$
|
|
2000
|
-
var __getOwnPropDescs$
|
|
2001
|
-
var __getOwnPropSymbols$
|
|
2002
|
-
var __hasOwnProp$
|
|
2003
|
-
var __propIsEnum$
|
|
2004
|
-
var __defNormalProp$
|
|
2005
|
-
var __spreadValues$
|
|
2060
|
+
var __defProp$g = Object.defineProperty;
|
|
2061
|
+
var __defProps$b = Object.defineProperties;
|
|
2062
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
2063
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
2064
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
2065
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
2066
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2067
|
+
var __spreadValues$g = (a, b) => {
|
|
2006
2068
|
for (var prop in b || (b = {}))
|
|
2007
|
-
if (__hasOwnProp$
|
|
2008
|
-
__defNormalProp$
|
|
2009
|
-
if (__getOwnPropSymbols$
|
|
2010
|
-
for (var prop of __getOwnPropSymbols$
|
|
2011
|
-
if (__propIsEnum$
|
|
2012
|
-
__defNormalProp$
|
|
2069
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
2070
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2071
|
+
if (__getOwnPropSymbols$g)
|
|
2072
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
2073
|
+
if (__propIsEnum$g.call(b, prop))
|
|
2074
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2013
2075
|
}
|
|
2014
2076
|
return a;
|
|
2015
2077
|
};
|
|
2016
|
-
var __spreadProps$
|
|
2017
|
-
var __objRest$
|
|
2078
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
2079
|
+
var __objRest$c = (source, exclude) => {
|
|
2018
2080
|
var target = {};
|
|
2019
2081
|
for (var prop in source)
|
|
2020
|
-
if (__hasOwnProp$
|
|
2082
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2021
2083
|
target[prop] = source[prop];
|
|
2022
|
-
if (source != null && __getOwnPropSymbols$
|
|
2023
|
-
for (var prop of __getOwnPropSymbols$
|
|
2024
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2084
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
2085
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
2086
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
2025
2087
|
target[prop] = source[prop];
|
|
2026
2088
|
}
|
|
2027
2089
|
return target;
|
|
@@ -2036,7 +2098,7 @@ function AntdSelect(props) {
|
|
|
2036
2098
|
suffixIcon,
|
|
2037
2099
|
mode,
|
|
2038
2100
|
useChildren
|
|
2039
|
-
} = _a, rest = __objRest$
|
|
2101
|
+
} = _a, rest = __objRest$c(_a, [
|
|
2040
2102
|
"popupClassName",
|
|
2041
2103
|
"popupScopeClassName",
|
|
2042
2104
|
"defaultStylesClassName",
|
|
@@ -2044,13 +2106,13 @@ function AntdSelect(props) {
|
|
|
2044
2106
|
"mode",
|
|
2045
2107
|
"useChildren"
|
|
2046
2108
|
]);
|
|
2047
|
-
const curated = __spreadValues$
|
|
2109
|
+
const curated = __spreadValues$g({}, rest);
|
|
2048
2110
|
if (useChildren) {
|
|
2049
2111
|
curated.options = void 0;
|
|
2050
2112
|
}
|
|
2051
2113
|
return /* @__PURE__ */ React.createElement(
|
|
2052
2114
|
Select,
|
|
2053
|
-
__spreadValues$
|
|
2115
|
+
__spreadValues$g(__spreadProps$b(__spreadValues$g({}, curated), {
|
|
2054
2116
|
mode: !mode || mode === "single" ? void 0 : mode,
|
|
2055
2117
|
popupClassName: `${defaultStylesClassName} ${popupScopeClassName} ${popupClassName}`,
|
|
2056
2118
|
optionFilterProp: curated.options ? "label" : void 0,
|
|
@@ -2065,7 +2127,7 @@ const selectComponentName = "plasmic-antd5-select";
|
|
|
2065
2127
|
const optionComponentName = "plasmic-antd5-option";
|
|
2066
2128
|
const optionGroupComponentName = "plasmic-antd5-option-group";
|
|
2067
2129
|
function registerSelect(loader) {
|
|
2068
|
-
registerComponentHelper(loader, AntdSelect, __spreadProps$
|
|
2130
|
+
registerComponentHelper(loader, AntdSelect, __spreadProps$b(__spreadValues$g({
|
|
2069
2131
|
name: selectComponentName,
|
|
2070
2132
|
displayName: "Select",
|
|
2071
2133
|
props: {
|
|
@@ -2301,7 +2363,7 @@ function registerSelect(loader) {
|
|
|
2301
2363
|
displayName: "Option",
|
|
2302
2364
|
parentComponentName: selectComponentName,
|
|
2303
2365
|
props: {
|
|
2304
|
-
children: __spreadValues$
|
|
2366
|
+
children: __spreadValues$g({
|
|
2305
2367
|
type: "slot",
|
|
2306
2368
|
defaultValue: "Option"
|
|
2307
2369
|
}, { mergeWithParent: true }),
|
|
@@ -2354,24 +2416,24 @@ function registerSelect(loader) {
|
|
|
2354
2416
|
});
|
|
2355
2417
|
}
|
|
2356
2418
|
|
|
2357
|
-
var __defProp$
|
|
2358
|
-
var __getOwnPropSymbols$
|
|
2359
|
-
var __hasOwnProp$
|
|
2360
|
-
var __propIsEnum$
|
|
2361
|
-
var __defNormalProp$
|
|
2362
|
-
var __spreadValues$
|
|
2419
|
+
var __defProp$f = Object.defineProperty;
|
|
2420
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
2421
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
2422
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
2423
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2424
|
+
var __spreadValues$f = (a, b) => {
|
|
2363
2425
|
for (var prop in b || (b = {}))
|
|
2364
|
-
if (__hasOwnProp$
|
|
2365
|
-
__defNormalProp$
|
|
2366
|
-
if (__getOwnPropSymbols$
|
|
2367
|
-
for (var prop of __getOwnPropSymbols$
|
|
2368
|
-
if (__propIsEnum$
|
|
2369
|
-
__defNormalProp$
|
|
2426
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
2427
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2428
|
+
if (__getOwnPropSymbols$f)
|
|
2429
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
2430
|
+
if (__propIsEnum$f.call(b, prop))
|
|
2431
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2370
2432
|
}
|
|
2371
2433
|
return a;
|
|
2372
2434
|
};
|
|
2373
2435
|
function AntdSwitch(props) {
|
|
2374
|
-
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$
|
|
2436
|
+
return /* @__PURE__ */ React.createElement(Switch, __spreadValues$f({}, props));
|
|
2375
2437
|
}
|
|
2376
2438
|
AntdSwitch.__plasmicFormFieldMeta = { valueProp: "checked" };
|
|
2377
2439
|
const switchComponentName = "plasmic-antd5-switch";
|
|
@@ -2417,33 +2479,33 @@ function registerSwitch(loader) {
|
|
|
2417
2479
|
});
|
|
2418
2480
|
}
|
|
2419
2481
|
|
|
2420
|
-
var __defProp$
|
|
2421
|
-
var __defProps$
|
|
2422
|
-
var __getOwnPropDescs$
|
|
2423
|
-
var __getOwnPropSymbols$
|
|
2424
|
-
var __hasOwnProp$
|
|
2425
|
-
var __propIsEnum$
|
|
2426
|
-
var __defNormalProp$
|
|
2427
|
-
var __spreadValues$
|
|
2482
|
+
var __defProp$e = Object.defineProperty;
|
|
2483
|
+
var __defProps$a = Object.defineProperties;
|
|
2484
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
2485
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
2486
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
2487
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
2488
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2489
|
+
var __spreadValues$e = (a, b) => {
|
|
2428
2490
|
for (var prop in b || (b = {}))
|
|
2429
|
-
if (__hasOwnProp$
|
|
2430
|
-
__defNormalProp$
|
|
2431
|
-
if (__getOwnPropSymbols$
|
|
2432
|
-
for (var prop of __getOwnPropSymbols$
|
|
2433
|
-
if (__propIsEnum$
|
|
2434
|
-
__defNormalProp$
|
|
2491
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
2492
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2493
|
+
if (__getOwnPropSymbols$e)
|
|
2494
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
2495
|
+
if (__propIsEnum$e.call(b, prop))
|
|
2496
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2435
2497
|
}
|
|
2436
2498
|
return a;
|
|
2437
2499
|
};
|
|
2438
|
-
var __spreadProps$
|
|
2439
|
-
var __objRest$
|
|
2500
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
2501
|
+
var __objRest$b = (source, exclude) => {
|
|
2440
2502
|
var target = {};
|
|
2441
2503
|
for (var prop in source)
|
|
2442
|
-
if (__hasOwnProp$
|
|
2504
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2443
2505
|
target[prop] = source[prop];
|
|
2444
|
-
if (source != null && __getOwnPropSymbols$
|
|
2445
|
-
for (var prop of __getOwnPropSymbols$
|
|
2446
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2506
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
2507
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
2508
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
2447
2509
|
target[prop] = source[prop];
|
|
2448
2510
|
}
|
|
2449
2511
|
return target;
|
|
@@ -2478,7 +2540,7 @@ const Internal = React.forwardRef(
|
|
|
2478
2540
|
const [form] = Form.useForm();
|
|
2479
2541
|
const values = form.getFieldsValue(true);
|
|
2480
2542
|
const lastValue = React.useRef(values);
|
|
2481
|
-
const _a = props, { extendedOnValuesChange, setRemountKey } = _a, rest = __objRest$
|
|
2543
|
+
const _a = props, { extendedOnValuesChange, setRemountKey } = _a, rest = __objRest$b(_a, ["extendedOnValuesChange", "setRemountKey"]);
|
|
2482
2544
|
let childrenNode;
|
|
2483
2545
|
if (props.mode !== "simplified") {
|
|
2484
2546
|
childrenNode = typeof props.children === "function" ? props.children(values, form) : props.children;
|
|
@@ -2493,7 +2555,7 @@ const Internal = React.forwardRef(
|
|
|
2493
2555
|
},
|
|
2494
2556
|
/* @__PURE__ */ React.createElement(
|
|
2495
2557
|
FormItemWrapper,
|
|
2496
|
-
__spreadProps$
|
|
2558
|
+
__spreadProps$a(__spreadValues$e({}, formItem), {
|
|
2497
2559
|
noLabel: formItem.inputType === "Checkbox" /* Checkbox */ || formItem.noLabel,
|
|
2498
2560
|
style: { width: "100%" }
|
|
2499
2561
|
}),
|
|
@@ -2561,7 +2623,7 @@ const Internal = React.forwardRef(
|
|
|
2561
2623
|
},
|
|
2562
2624
|
/* @__PURE__ */ React.createElement(FormLayoutContext.Provider, { value: formLayout }, /* @__PURE__ */ React.createElement(
|
|
2563
2625
|
Form,
|
|
2564
|
-
__spreadProps$
|
|
2626
|
+
__spreadProps$a(__spreadValues$e({}, rest), {
|
|
2565
2627
|
key: props.initialValues ? JSON.stringify(props.initialValues) : void 0,
|
|
2566
2628
|
onValuesChange: (...args) => {
|
|
2567
2629
|
var _a2;
|
|
@@ -2597,7 +2659,7 @@ function useFormItemDefinitions(rawData, props, formRef) {
|
|
|
2597
2659
|
const { mergedFields, minimalFullLengthFields } = deriveFieldConfigs(
|
|
2598
2660
|
formItems != null ? formItems : [],
|
|
2599
2661
|
schema,
|
|
2600
|
-
(field) => __spreadValues$
|
|
2662
|
+
(field) => __spreadValues$e({
|
|
2601
2663
|
inputType: "Text" /* Text */
|
|
2602
2664
|
}, field && {
|
|
2603
2665
|
key: field.id,
|
|
@@ -2635,7 +2697,7 @@ const FormWrapper = React.forwardRef(
|
|
|
2635
2697
|
}, [previousInitialValues, props.initialValues]);
|
|
2636
2698
|
React.useImperativeHandle(
|
|
2637
2699
|
ref,
|
|
2638
|
-
() => wrapperRef.current ? __spreadValues$
|
|
2700
|
+
() => wrapperRef.current ? __spreadValues$e({}, wrapperRef.current) : {}
|
|
2639
2701
|
);
|
|
2640
2702
|
const rawData = useRawData(props);
|
|
2641
2703
|
const formItemDefinitions = useFormItemDefinitions(
|
|
@@ -2648,7 +2710,7 @@ const FormWrapper = React.forwardRef(
|
|
|
2648
2710
|
setRemountKey((k) => k + 1);
|
|
2649
2711
|
}
|
|
2650
2712
|
}, [rawData]);
|
|
2651
|
-
const _a = props, { formItems } = _a, rest = __objRest$
|
|
2713
|
+
const _a = props, { formItems } = _a, rest = __objRest$b(_a, ["formItems"]);
|
|
2652
2714
|
const actualFormItems = props.mode === "simplified" && formItemDefinitions ? formItemDefinitions : formItems;
|
|
2653
2715
|
const previousFormItems = React.useRef([]);
|
|
2654
2716
|
React.useEffect(() => {
|
|
@@ -2663,7 +2725,7 @@ const FormWrapper = React.forwardRef(
|
|
|
2663
2725
|
const isLoadingData = rawData == null ? void 0 : rawData.isLoading;
|
|
2664
2726
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
2665
2727
|
Internal,
|
|
2666
|
-
__spreadProps$
|
|
2728
|
+
__spreadProps$a(__spreadValues$e({
|
|
2667
2729
|
key: remountKey
|
|
2668
2730
|
}, rest), {
|
|
2669
2731
|
setRemountKey,
|
|
@@ -2806,7 +2868,7 @@ function registerForm(loader) {
|
|
|
2806
2868
|
type: "array",
|
|
2807
2869
|
itemType: {
|
|
2808
2870
|
type: "object",
|
|
2809
|
-
fields: __spreadValues$
|
|
2871
|
+
fields: __spreadValues$e({
|
|
2810
2872
|
label: {
|
|
2811
2873
|
type: "string",
|
|
2812
2874
|
defaultValueHint: getDefaultValueHint("label")
|
|
@@ -2933,7 +2995,7 @@ function registerForm(loader) {
|
|
|
2933
2995
|
return true;
|
|
2934
2996
|
}
|
|
2935
2997
|
},
|
|
2936
|
-
submitSlot: __spreadValues$
|
|
2998
|
+
submitSlot: __spreadValues$e({
|
|
2937
2999
|
type: "slot",
|
|
2938
3000
|
hidden: () => true,
|
|
2939
3001
|
defaultValue: {
|
|
@@ -3210,7 +3272,7 @@ function FormItemWrapper(props) {
|
|
|
3210
3272
|
customizeProps,
|
|
3211
3273
|
setControlContextData,
|
|
3212
3274
|
alignLabellessWithControls = true
|
|
3213
|
-
} = _a, rest = __objRest$
|
|
3275
|
+
} = _a, rest = __objRest$b(_a, [
|
|
3214
3276
|
"rules",
|
|
3215
3277
|
"description",
|
|
3216
3278
|
"noLabel",
|
|
@@ -3257,7 +3319,7 @@ function FormItemWrapper(props) {
|
|
|
3257
3319
|
}
|
|
3258
3320
|
return /* @__PURE__ */ React.createElement(
|
|
3259
3321
|
FormItem,
|
|
3260
|
-
__spreadProps$
|
|
3322
|
+
__spreadProps$a(__spreadValues$e({}, rest), {
|
|
3261
3323
|
label: noLabel ? void 0 : props.label,
|
|
3262
3324
|
name: relativeFormItemName,
|
|
3263
3325
|
rules,
|
|
@@ -3322,7 +3384,7 @@ function deriveOnChangePropName(props) {
|
|
|
3322
3384
|
return void 0;
|
|
3323
3385
|
}
|
|
3324
3386
|
function FormItemForwarder(_a) {
|
|
3325
|
-
var _b = _a, { formItemProps } = _b, props = __objRest$
|
|
3387
|
+
var _b = _a, { formItemProps } = _b, props = __objRest$b(_b, ["formItemProps"]);
|
|
3326
3388
|
var _a2;
|
|
3327
3389
|
const status = Form.Item.useStatus();
|
|
3328
3390
|
const internalFormCtx = React.useContext(InternalFormInstanceContext);
|
|
@@ -3335,7 +3397,7 @@ function FormItemForwarder(_a) {
|
|
|
3335
3397
|
});
|
|
3336
3398
|
return React.Children.map(formItemProps.children, (child, i) => {
|
|
3337
3399
|
var _a3;
|
|
3338
|
-
let newProps = __spreadProps$
|
|
3400
|
+
let newProps = __spreadProps$a(__spreadValues$e(__spreadValues$e({}, (_a3 = child.props) != null ? _a3 : {}), props), {
|
|
3339
3401
|
__plasmicFormField: true
|
|
3340
3402
|
});
|
|
3341
3403
|
if (formItemProps.customizeProps) {
|
|
@@ -3470,7 +3532,7 @@ const commonFormItemProps = {
|
|
|
3470
3532
|
};
|
|
3471
3533
|
const formItemComponentName = "plasmic-antd5-form-item";
|
|
3472
3534
|
function registerFormItem(loader) {
|
|
3473
|
-
registerComponentHelper(loader, FormItemWrapper, __spreadValues$
|
|
3535
|
+
registerComponentHelper(loader, FormItemWrapper, __spreadValues$e({
|
|
3474
3536
|
name: formItemComponentName,
|
|
3475
3537
|
displayName: "Form Field",
|
|
3476
3538
|
parentComponentName: formComponentName,
|
|
@@ -3478,8 +3540,8 @@ function registerFormItem(loader) {
|
|
|
3478
3540
|
marginBottom: "24px",
|
|
3479
3541
|
width: "stretch"
|
|
3480
3542
|
},
|
|
3481
|
-
props: __spreadValues$
|
|
3482
|
-
label: __spreadValues$
|
|
3543
|
+
props: __spreadValues$e({
|
|
3544
|
+
label: __spreadValues$e({
|
|
3483
3545
|
type: "slot",
|
|
3484
3546
|
defaultValue: {
|
|
3485
3547
|
type: "text",
|
|
@@ -3487,7 +3549,7 @@ function registerFormItem(loader) {
|
|
|
3487
3549
|
},
|
|
3488
3550
|
hidden: (ps) => !!ps.noLabel
|
|
3489
3551
|
}, { mergeWithParent: true }),
|
|
3490
|
-
children: __spreadValues$
|
|
3552
|
+
children: __spreadValues$e({
|
|
3491
3553
|
type: "slot",
|
|
3492
3554
|
defaultValue: {
|
|
3493
3555
|
type: "component",
|
|
@@ -3662,7 +3724,7 @@ const FormListWrapper = React.forwardRef(function FormListWrapper2(props, ref) {
|
|
|
3662
3724
|
}
|
|
3663
3725
|
}, [props.initialValue, fullFormItemName]);
|
|
3664
3726
|
}
|
|
3665
|
-
return /* @__PURE__ */ React.createElement(FormList, __spreadProps$
|
|
3727
|
+
return /* @__PURE__ */ React.createElement(FormList, __spreadProps$a(__spreadValues$e({}, props), { name: relativeFormItemName != null ? relativeFormItemName : [] }), (...args) => {
|
|
3666
3728
|
operationsRef.current = args;
|
|
3667
3729
|
return args[0].map((field, index) => /* @__PURE__ */ React.createElement(
|
|
3668
3730
|
PathContext.Provider,
|
|
@@ -3789,39 +3851,55 @@ function registerFormList(loader) {
|
|
|
3789
3851
|
});
|
|
3790
3852
|
}
|
|
3791
3853
|
|
|
3792
|
-
var __defProp$
|
|
3793
|
-
var __defProps$
|
|
3794
|
-
var __getOwnPropDescs$
|
|
3795
|
-
var __getOwnPropSymbols$
|
|
3796
|
-
var __hasOwnProp$
|
|
3797
|
-
var __propIsEnum$
|
|
3798
|
-
var __defNormalProp$
|
|
3799
|
-
var __spreadValues$
|
|
3854
|
+
var __defProp$d = Object.defineProperty;
|
|
3855
|
+
var __defProps$9 = Object.defineProperties;
|
|
3856
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
3857
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
3858
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
3859
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
3860
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3861
|
+
var __spreadValues$d = (a, b) => {
|
|
3800
3862
|
for (var prop in b || (b = {}))
|
|
3801
|
-
if (__hasOwnProp$
|
|
3802
|
-
__defNormalProp$
|
|
3803
|
-
if (__getOwnPropSymbols$
|
|
3804
|
-
for (var prop of __getOwnPropSymbols$
|
|
3805
|
-
if (__propIsEnum$
|
|
3806
|
-
__defNormalProp$
|
|
3863
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
3864
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
3865
|
+
if (__getOwnPropSymbols$d)
|
|
3866
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
3867
|
+
if (__propIsEnum$d.call(b, prop))
|
|
3868
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
3807
3869
|
}
|
|
3808
3870
|
return a;
|
|
3809
3871
|
};
|
|
3810
|
-
var __spreadProps$
|
|
3811
|
-
var __objRest$
|
|
3872
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
3873
|
+
var __objRest$a = (source, exclude) => {
|
|
3812
3874
|
var target = {};
|
|
3813
3875
|
for (var prop in source)
|
|
3814
|
-
if (__hasOwnProp$
|
|
3876
|
+
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3815
3877
|
target[prop] = source[prop];
|
|
3816
|
-
if (source != null && __getOwnPropSymbols$
|
|
3817
|
-
for (var prop of __getOwnPropSymbols$
|
|
3818
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3878
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
3879
|
+
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
3880
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
3819
3881
|
target[prop] = source[prop];
|
|
3820
3882
|
}
|
|
3821
3883
|
return target;
|
|
3822
3884
|
};
|
|
3823
3885
|
function AntdModal(props) {
|
|
3824
|
-
const _a = props, {
|
|
3886
|
+
const _a = props, {
|
|
3887
|
+
onOpenChange,
|
|
3888
|
+
onOk,
|
|
3889
|
+
onCancel,
|
|
3890
|
+
open,
|
|
3891
|
+
footer,
|
|
3892
|
+
modalScopeClassName,
|
|
3893
|
+
wrapClassName
|
|
3894
|
+
} = _a, rest = __objRest$a(_a, [
|
|
3895
|
+
"onOpenChange",
|
|
3896
|
+
"onOk",
|
|
3897
|
+
"onCancel",
|
|
3898
|
+
"open",
|
|
3899
|
+
"footer",
|
|
3900
|
+
"modalScopeClassName",
|
|
3901
|
+
"wrapClassName"
|
|
3902
|
+
]);
|
|
3825
3903
|
const memoOnOk = React.useMemo(() => {
|
|
3826
3904
|
if (onOpenChange || onOk) {
|
|
3827
3905
|
return (e) => {
|
|
@@ -3844,12 +3922,13 @@ function AntdModal(props) {
|
|
|
3844
3922
|
}, [onOpenChange, onCancel]);
|
|
3845
3923
|
return /* @__PURE__ */ React.createElement(
|
|
3846
3924
|
Modal,
|
|
3847
|
-
__spreadProps$
|
|
3925
|
+
__spreadProps$9(__spreadValues$d({}, rest), {
|
|
3848
3926
|
onOk: memoOnOk,
|
|
3849
3927
|
onCancel: memoOnCancel,
|
|
3850
3928
|
open,
|
|
3851
3929
|
footer: footer != null ? footer : void 0,
|
|
3852
|
-
|
|
3930
|
+
wrapClassName,
|
|
3931
|
+
className: `${props.className} ${props.defaultStylesClassName} ${modalScopeClassName}`
|
|
3853
3932
|
})
|
|
3854
3933
|
);
|
|
3855
3934
|
}
|
|
@@ -3903,29 +3982,33 @@ function registerModal(loader) {
|
|
|
3903
3982
|
type: "eventHandler",
|
|
3904
3983
|
argTypes: [{ name: "open", type: "boolean" }]
|
|
3905
3984
|
},
|
|
3985
|
+
wrapClassName: {
|
|
3986
|
+
type: "class",
|
|
3987
|
+
displayName: "Modal container",
|
|
3988
|
+
styleSections: ["background"]
|
|
3989
|
+
},
|
|
3906
3990
|
modalScopeClassName: {
|
|
3907
3991
|
type: "styleScopeClass",
|
|
3908
3992
|
scopeName: "modal"
|
|
3909
3993
|
},
|
|
3910
|
-
|
|
3994
|
+
modalContentClassName: {
|
|
3911
3995
|
type: "class",
|
|
3912
|
-
displayName: "Modal content
|
|
3996
|
+
displayName: "Modal content",
|
|
3913
3997
|
noSelf: true,
|
|
3914
3998
|
selectors: [
|
|
3915
3999
|
{
|
|
3916
|
-
selector: ":modal .ant-modal
|
|
4000
|
+
selector: ":modal .ant-modal-content",
|
|
3917
4001
|
label: "Base"
|
|
3918
4002
|
}
|
|
3919
|
-
]
|
|
3920
|
-
advanced: true
|
|
4003
|
+
]
|
|
3921
4004
|
},
|
|
3922
4005
|
closeButtonClassName: {
|
|
3923
4006
|
type: "class",
|
|
3924
|
-
displayName: "Close button
|
|
4007
|
+
displayName: "Close button",
|
|
3925
4008
|
noSelf: true,
|
|
3926
4009
|
selectors: [
|
|
3927
4010
|
{
|
|
3928
|
-
selector: ":modal .ant-modal
|
|
4011
|
+
selector: ":modal .ant-modal-close",
|
|
3929
4012
|
label: "Base"
|
|
3930
4013
|
}
|
|
3931
4014
|
],
|
|
@@ -3948,30 +4031,30 @@ function registerModal(loader) {
|
|
|
3948
4031
|
});
|
|
3949
4032
|
}
|
|
3950
4033
|
|
|
3951
|
-
var __defProp$
|
|
3952
|
-
var __getOwnPropSymbols$
|
|
3953
|
-
var __hasOwnProp$
|
|
3954
|
-
var __propIsEnum$
|
|
3955
|
-
var __defNormalProp$
|
|
3956
|
-
var __spreadValues$
|
|
4034
|
+
var __defProp$c = Object.defineProperty;
|
|
4035
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
4036
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
4037
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
4038
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4039
|
+
var __spreadValues$c = (a, b) => {
|
|
3957
4040
|
for (var prop in b || (b = {}))
|
|
3958
|
-
if (__hasOwnProp$
|
|
3959
|
-
__defNormalProp$
|
|
3960
|
-
if (__getOwnPropSymbols$
|
|
3961
|
-
for (var prop of __getOwnPropSymbols$
|
|
3962
|
-
if (__propIsEnum$
|
|
3963
|
-
__defNormalProp$
|
|
4041
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
4042
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
4043
|
+
if (__getOwnPropSymbols$c)
|
|
4044
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
4045
|
+
if (__propIsEnum$c.call(b, prop))
|
|
4046
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
3964
4047
|
}
|
|
3965
4048
|
return a;
|
|
3966
4049
|
};
|
|
3967
|
-
var __objRest$
|
|
4050
|
+
var __objRest$9 = (source, exclude) => {
|
|
3968
4051
|
var target = {};
|
|
3969
4052
|
for (var prop in source)
|
|
3970
|
-
if (__hasOwnProp$
|
|
4053
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3971
4054
|
target[prop] = source[prop];
|
|
3972
|
-
if (source != null && __getOwnPropSymbols$
|
|
3973
|
-
for (var prop of __getOwnPropSymbols$
|
|
3974
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4055
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
4056
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
4057
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
3975
4058
|
target[prop] = source[prop];
|
|
3976
4059
|
}
|
|
3977
4060
|
return target;
|
|
@@ -3986,7 +4069,7 @@ const AntdTable = React.forwardRef(function AntdTable2(props, ref) {
|
|
|
3986
4069
|
setControlContextData,
|
|
3987
4070
|
selectedRowKeys,
|
|
3988
4071
|
defaultSelectedRowKeys
|
|
3989
|
-
} = _a, rest = __objRest$
|
|
4072
|
+
} = _a, rest = __objRest$9(_a, [
|
|
3990
4073
|
"data",
|
|
3991
4074
|
"onSelectedRowKeysChange",
|
|
3992
4075
|
"onSelectedRowsChange",
|
|
@@ -4052,7 +4135,7 @@ const AntdTable = React.forwardRef(function AntdTable2(props, ref) {
|
|
|
4052
4135
|
);
|
|
4053
4136
|
return /* @__PURE__ */ React.createElement(
|
|
4054
4137
|
Table,
|
|
4055
|
-
__spreadValues$
|
|
4138
|
+
__spreadValues$c({
|
|
4056
4139
|
loading: data == null ? void 0 : data.isLoading,
|
|
4057
4140
|
dataSource: data == null ? void 0 : data.data,
|
|
4058
4141
|
rowSelection: selection,
|
|
@@ -4161,7 +4244,7 @@ function registerTable(loader) {
|
|
|
4161
4244
|
}
|
|
4162
4245
|
}
|
|
4163
4246
|
});
|
|
4164
|
-
registerComponentHelper(loader, AntdColumn, __spreadValues$
|
|
4247
|
+
registerComponentHelper(loader, AntdColumn, __spreadValues$c({
|
|
4165
4248
|
name: "plasmic-antd5-table-column",
|
|
4166
4249
|
displayName: "Column",
|
|
4167
4250
|
parentComponentName: "plasmic-antd5-table",
|
|
@@ -4198,7 +4281,7 @@ function registerTable(loader) {
|
|
|
4198
4281
|
importPath: "@plasmicpkgs/antd5/skinny/registerTable",
|
|
4199
4282
|
importName: "AntdColumn"
|
|
4200
4283
|
}, { isRenderless: true }));
|
|
4201
|
-
registerComponentHelper(loader, AntdColumnGroup, __spreadValues$
|
|
4284
|
+
registerComponentHelper(loader, AntdColumnGroup, __spreadValues$c({
|
|
4202
4285
|
name: "plasmic-antd5-table-column-group",
|
|
4203
4286
|
displayName: "Column Group",
|
|
4204
4287
|
parentComponentName: "plasmic-antd5-table",
|
|
@@ -4217,39 +4300,39 @@ function registerTable(loader) {
|
|
|
4217
4300
|
}, { isRenderless: true }));
|
|
4218
4301
|
}
|
|
4219
4302
|
|
|
4220
|
-
var __defProp$
|
|
4221
|
-
var __defProps$
|
|
4222
|
-
var __getOwnPropDescs$
|
|
4223
|
-
var __getOwnPropSymbols$
|
|
4224
|
-
var __hasOwnProp$
|
|
4225
|
-
var __propIsEnum$
|
|
4226
|
-
var __defNormalProp$
|
|
4227
|
-
var __spreadValues$
|
|
4303
|
+
var __defProp$b = Object.defineProperty;
|
|
4304
|
+
var __defProps$8 = Object.defineProperties;
|
|
4305
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
4306
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
4307
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
4308
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
4309
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4310
|
+
var __spreadValues$b = (a, b) => {
|
|
4228
4311
|
for (var prop in b || (b = {}))
|
|
4229
|
-
if (__hasOwnProp$
|
|
4230
|
-
__defNormalProp$
|
|
4231
|
-
if (__getOwnPropSymbols$
|
|
4232
|
-
for (var prop of __getOwnPropSymbols$
|
|
4233
|
-
if (__propIsEnum$
|
|
4234
|
-
__defNormalProp$
|
|
4312
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
4313
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
4314
|
+
if (__getOwnPropSymbols$b)
|
|
4315
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
4316
|
+
if (__propIsEnum$b.call(b, prop))
|
|
4317
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
4235
4318
|
}
|
|
4236
4319
|
return a;
|
|
4237
4320
|
};
|
|
4238
|
-
var __spreadProps$
|
|
4239
|
-
var __objRest$
|
|
4321
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
4322
|
+
var __objRest$8 = (source, exclude) => {
|
|
4240
4323
|
var target = {};
|
|
4241
4324
|
for (var prop in source)
|
|
4242
|
-
if (__hasOwnProp$
|
|
4325
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4243
4326
|
target[prop] = source[prop];
|
|
4244
|
-
if (source != null && __getOwnPropSymbols$
|
|
4245
|
-
for (var prop of __getOwnPropSymbols$
|
|
4246
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4327
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
4328
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
4329
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
4247
4330
|
target[prop] = source[prop];
|
|
4248
4331
|
}
|
|
4249
4332
|
return target;
|
|
4250
4333
|
};
|
|
4251
4334
|
function UploadWrapper(props) {
|
|
4252
|
-
const _a = props, { files, onFilesChange } = _a, rest = __objRest$
|
|
4335
|
+
const _a = props, { files, onFilesChange } = _a, rest = __objRest$8(_a, ["files", "onFilesChange"]);
|
|
4253
4336
|
const handleChange = (info) => {
|
|
4254
4337
|
const { file } = info;
|
|
4255
4338
|
if (file.status === "removed") {
|
|
@@ -4264,7 +4347,7 @@ function UploadWrapper(props) {
|
|
|
4264
4347
|
};
|
|
4265
4348
|
onFilesChange == null ? void 0 : onFilesChange([
|
|
4266
4349
|
...files,
|
|
4267
|
-
__spreadProps$
|
|
4350
|
+
__spreadProps$8(__spreadValues$b({}, metadata), {
|
|
4268
4351
|
status: "uploading"
|
|
4269
4352
|
})
|
|
4270
4353
|
]);
|
|
@@ -4272,19 +4355,19 @@ function UploadWrapper(props) {
|
|
|
4272
4355
|
reader.onload = () => {
|
|
4273
4356
|
onFilesChange == null ? void 0 : onFilesChange([
|
|
4274
4357
|
...files.filter((f) => f.uid !== file.uid),
|
|
4275
|
-
__spreadProps$
|
|
4358
|
+
__spreadProps$8(__spreadValues$b({}, metadata), {
|
|
4276
4359
|
contents: reader.result.replace(
|
|
4277
4360
|
/^data:[^;]+;base64,/,
|
|
4278
4361
|
""
|
|
4279
4362
|
),
|
|
4280
|
-
status: "
|
|
4363
|
+
status: "done"
|
|
4281
4364
|
})
|
|
4282
4365
|
]);
|
|
4283
4366
|
};
|
|
4284
4367
|
reader.onerror = (error) => {
|
|
4285
4368
|
onFilesChange == null ? void 0 : onFilesChange([
|
|
4286
4369
|
...files.filter((f) => f.uid !== file.uid),
|
|
4287
|
-
__spreadProps$
|
|
4370
|
+
__spreadProps$8(__spreadValues$b({}, metadata), {
|
|
4288
4371
|
status: "error"
|
|
4289
4372
|
})
|
|
4290
4373
|
]);
|
|
@@ -4296,7 +4379,7 @@ function UploadWrapper(props) {
|
|
|
4296
4379
|
};
|
|
4297
4380
|
return /* @__PURE__ */ React.createElement(
|
|
4298
4381
|
Upload,
|
|
4299
|
-
__spreadProps$
|
|
4382
|
+
__spreadProps$8(__spreadValues$b({}, rest), {
|
|
4300
4383
|
fileList: files,
|
|
4301
4384
|
beforeUpload: () => {
|
|
4302
4385
|
return false;
|
|
@@ -4315,7 +4398,7 @@ UploadWrapper.__plasmicFormFieldMeta = {
|
|
|
4315
4398
|
onChangePropName: "onFilesChange"
|
|
4316
4399
|
};
|
|
4317
4400
|
function registerUpload(loader) {
|
|
4318
|
-
registerComponentHelper(loader, UploadWrapper, __spreadProps$
|
|
4401
|
+
registerComponentHelper(loader, UploadWrapper, __spreadProps$8(__spreadValues$b({
|
|
4319
4402
|
name: "plasmic-antd5-upload",
|
|
4320
4403
|
displayName: "Upload",
|
|
4321
4404
|
props: {
|
|
@@ -4402,33 +4485,33 @@ function registerUpload(loader) {
|
|
|
4402
4485
|
}));
|
|
4403
4486
|
}
|
|
4404
4487
|
|
|
4405
|
-
var __defProp$
|
|
4406
|
-
var __defProps$
|
|
4407
|
-
var __getOwnPropDescs$
|
|
4408
|
-
var __getOwnPropSymbols$
|
|
4409
|
-
var __hasOwnProp$
|
|
4410
|
-
var __propIsEnum$
|
|
4411
|
-
var __defNormalProp$
|
|
4412
|
-
var __spreadValues$
|
|
4488
|
+
var __defProp$a = Object.defineProperty;
|
|
4489
|
+
var __defProps$7 = Object.defineProperties;
|
|
4490
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
4491
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
4492
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
4493
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
4494
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4495
|
+
var __spreadValues$a = (a, b) => {
|
|
4413
4496
|
for (var prop in b || (b = {}))
|
|
4414
|
-
if (__hasOwnProp$
|
|
4415
|
-
__defNormalProp$
|
|
4416
|
-
if (__getOwnPropSymbols$
|
|
4417
|
-
for (var prop of __getOwnPropSymbols$
|
|
4418
|
-
if (__propIsEnum$
|
|
4419
|
-
__defNormalProp$
|
|
4497
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
4498
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
4499
|
+
if (__getOwnPropSymbols$a)
|
|
4500
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
4501
|
+
if (__propIsEnum$a.call(b, prop))
|
|
4502
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
4420
4503
|
}
|
|
4421
4504
|
return a;
|
|
4422
4505
|
};
|
|
4423
|
-
var __spreadProps$
|
|
4424
|
-
var __objRest$
|
|
4506
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
4507
|
+
var __objRest$7 = (source, exclude) => {
|
|
4425
4508
|
var target = {};
|
|
4426
4509
|
for (var prop in source)
|
|
4427
|
-
if (__hasOwnProp$
|
|
4510
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4428
4511
|
target[prop] = source[prop];
|
|
4429
|
-
if (source != null && __getOwnPropSymbols$
|
|
4430
|
-
for (var prop of __getOwnPropSymbols$
|
|
4431
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4512
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
4513
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
4514
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
4432
4515
|
target[prop] = source[prop];
|
|
4433
4516
|
}
|
|
4434
4517
|
return target;
|
|
@@ -4437,13 +4520,14 @@ function AntdDatePicker(props) {
|
|
|
4437
4520
|
const nativeInput = React.useRef(null);
|
|
4438
4521
|
const [open, setOpen] = useState(false);
|
|
4439
4522
|
const strValue = props.value && !(typeof props.value === "string") && "toISOString" in props.value ? props.value.toISOString() : props.value === null ? void 0 : props.value;
|
|
4440
|
-
const _a = props, rest = __objRest$
|
|
4523
|
+
const _a = props, { picker, popupScopeClassName } = _a, rest = __objRest$7(_a, ["picker", "popupScopeClassName"]);
|
|
4441
4524
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
4442
4525
|
DatePicker,
|
|
4443
|
-
__spreadProps$
|
|
4444
|
-
picker
|
|
4526
|
+
__spreadProps$7(__spreadValues$a({}, rest), {
|
|
4527
|
+
picker,
|
|
4445
4528
|
value: props.value === void 0 ? void 0 : !props.value ? null : dayjs(props.value),
|
|
4446
4529
|
defaultValue: props.defaultValue === void 0 ? void 0 : dayjs(props.defaultValue),
|
|
4530
|
+
popupClassName: popupScopeClassName,
|
|
4447
4531
|
onChange: (value, _dateString) => {
|
|
4448
4532
|
var _a2;
|
|
4449
4533
|
(_a2 = props.onChange) == null ? void 0 : _a2.call(props, value !== null ? value.toISOString() : null);
|
|
@@ -4505,6 +4589,50 @@ function registerDatePicker(loader) {
|
|
|
4505
4589
|
})),
|
|
4506
4590
|
defaultValueHint: "date"
|
|
4507
4591
|
},
|
|
4592
|
+
popupScopeClassName: {
|
|
4593
|
+
type: "styleScopeClass",
|
|
4594
|
+
scopeName: "datePickerPopup"
|
|
4595
|
+
},
|
|
4596
|
+
popupClassName: {
|
|
4597
|
+
type: "class",
|
|
4598
|
+
displayName: "Popup container",
|
|
4599
|
+
selectors: [
|
|
4600
|
+
{
|
|
4601
|
+
selector: ":datePickerPopup .ant-picker-panel-container",
|
|
4602
|
+
label: "Base"
|
|
4603
|
+
}
|
|
4604
|
+
]
|
|
4605
|
+
},
|
|
4606
|
+
popupHeaderClassName: {
|
|
4607
|
+
type: "class",
|
|
4608
|
+
displayName: "Popup header",
|
|
4609
|
+
selectors: [
|
|
4610
|
+
{
|
|
4611
|
+
selector: ":datePickerPopup .ant-picker-header",
|
|
4612
|
+
label: "Base"
|
|
4613
|
+
}
|
|
4614
|
+
]
|
|
4615
|
+
},
|
|
4616
|
+
popupBodyClassName: {
|
|
4617
|
+
type: "class",
|
|
4618
|
+
displayName: "Popup body",
|
|
4619
|
+
selectors: [
|
|
4620
|
+
{
|
|
4621
|
+
selector: ":datePickerPopup .ant-picker-body",
|
|
4622
|
+
label: "Base"
|
|
4623
|
+
}
|
|
4624
|
+
]
|
|
4625
|
+
},
|
|
4626
|
+
popupFooterClassName: {
|
|
4627
|
+
type: "class",
|
|
4628
|
+
displayName: "Popup footer",
|
|
4629
|
+
selectors: [
|
|
4630
|
+
{
|
|
4631
|
+
selector: ":datePickerPopup .ant-picker-footer",
|
|
4632
|
+
label: "Base"
|
|
4633
|
+
}
|
|
4634
|
+
]
|
|
4635
|
+
},
|
|
4508
4636
|
showTime: {
|
|
4509
4637
|
type: "boolean",
|
|
4510
4638
|
description: "Enable time selection"
|
|
@@ -4560,33 +4688,33 @@ function registerDatePicker(loader) {
|
|
|
4560
4688
|
});
|
|
4561
4689
|
}
|
|
4562
4690
|
|
|
4563
|
-
var __defProp$
|
|
4564
|
-
var __defProps$
|
|
4565
|
-
var __getOwnPropDescs$
|
|
4566
|
-
var __getOwnPropSymbols$
|
|
4567
|
-
var __hasOwnProp$
|
|
4568
|
-
var __propIsEnum$
|
|
4569
|
-
var __defNormalProp$
|
|
4570
|
-
var __spreadValues$
|
|
4691
|
+
var __defProp$9 = Object.defineProperty;
|
|
4692
|
+
var __defProps$6 = Object.defineProperties;
|
|
4693
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
4694
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
4695
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
4696
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
4697
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4698
|
+
var __spreadValues$9 = (a, b) => {
|
|
4571
4699
|
for (var prop in b || (b = {}))
|
|
4572
|
-
if (__hasOwnProp$
|
|
4573
|
-
__defNormalProp$
|
|
4574
|
-
if (__getOwnPropSymbols$
|
|
4575
|
-
for (var prop of __getOwnPropSymbols$
|
|
4576
|
-
if (__propIsEnum$
|
|
4577
|
-
__defNormalProp$
|
|
4700
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
4701
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
4702
|
+
if (__getOwnPropSymbols$9)
|
|
4703
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
4704
|
+
if (__propIsEnum$9.call(b, prop))
|
|
4705
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
4578
4706
|
}
|
|
4579
4707
|
return a;
|
|
4580
4708
|
};
|
|
4581
|
-
var __spreadProps$
|
|
4582
|
-
var __objRest$
|
|
4709
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
4710
|
+
var __objRest$6 = (source, exclude) => {
|
|
4583
4711
|
var target = {};
|
|
4584
4712
|
for (var prop in source)
|
|
4585
|
-
if (__hasOwnProp$
|
|
4713
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4586
4714
|
target[prop] = source[prop];
|
|
4587
|
-
if (source != null && __getOwnPropSymbols$
|
|
4588
|
-
for (var prop of __getOwnPropSymbols$
|
|
4589
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4715
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
4716
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
4717
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
4590
4718
|
target[prop] = source[prop];
|
|
4591
4719
|
}
|
|
4592
4720
|
return target;
|
|
@@ -4596,17 +4724,17 @@ function AntdAvatar(_a) {
|
|
|
4596
4724
|
letters,
|
|
4597
4725
|
href,
|
|
4598
4726
|
target
|
|
4599
|
-
} = _b, props = __objRest$
|
|
4727
|
+
} = _b, props = __objRest$6(_b, [
|
|
4600
4728
|
"letters",
|
|
4601
4729
|
"href",
|
|
4602
4730
|
"target"
|
|
4603
4731
|
]);
|
|
4604
|
-
const avatar = /* @__PURE__ */ React.createElement(Avatar, __spreadProps$
|
|
4732
|
+
const avatar = /* @__PURE__ */ React.createElement(Avatar, __spreadProps$6(__spreadValues$9({}, props), { children: props.children || letters }));
|
|
4605
4733
|
const PlasmicLink = usePlasmicLink();
|
|
4606
4734
|
return href ? /* @__PURE__ */ React.createElement(PlasmicLink, { href, target: target ? "_blank" : void 0 }, avatar) : avatar;
|
|
4607
4735
|
}
|
|
4608
4736
|
function AntdAvatarGroup(props) {
|
|
4609
|
-
return /* @__PURE__ */ React.createElement(Avatar.Group, __spreadValues$
|
|
4737
|
+
return /* @__PURE__ */ React.createElement(Avatar.Group, __spreadValues$9({}, props));
|
|
4610
4738
|
}
|
|
4611
4739
|
function registerAvatar(loader) {
|
|
4612
4740
|
registerComponentHelper(loader, AntdAvatar, {
|
|
@@ -4694,27 +4822,27 @@ function registerAvatarGroup(loader) {
|
|
|
4694
4822
|
});
|
|
4695
4823
|
}
|
|
4696
4824
|
|
|
4697
|
-
var __defProp$
|
|
4698
|
-
var __defProps$
|
|
4699
|
-
var __getOwnPropDescs$
|
|
4700
|
-
var __getOwnPropSymbols$
|
|
4701
|
-
var __hasOwnProp$
|
|
4702
|
-
var __propIsEnum$
|
|
4703
|
-
var __defNormalProp$
|
|
4704
|
-
var __spreadValues$
|
|
4825
|
+
var __defProp$8 = Object.defineProperty;
|
|
4826
|
+
var __defProps$5 = Object.defineProperties;
|
|
4827
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
4828
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
4829
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
4830
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
4831
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4832
|
+
var __spreadValues$8 = (a, b) => {
|
|
4705
4833
|
for (var prop in b || (b = {}))
|
|
4706
|
-
if (__hasOwnProp$
|
|
4707
|
-
__defNormalProp$
|
|
4708
|
-
if (__getOwnPropSymbols$
|
|
4709
|
-
for (var prop of __getOwnPropSymbols$
|
|
4710
|
-
if (__propIsEnum$
|
|
4711
|
-
__defNormalProp$
|
|
4834
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
4835
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
4836
|
+
if (__getOwnPropSymbols$8)
|
|
4837
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
4838
|
+
if (__propIsEnum$8.call(b, prop))
|
|
4839
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
4712
4840
|
}
|
|
4713
4841
|
return a;
|
|
4714
4842
|
};
|
|
4715
|
-
var __spreadProps$
|
|
4843
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
4716
4844
|
function AntdTooltip(props) {
|
|
4717
|
-
return /* @__PURE__ */ React.createElement(Tooltip, __spreadProps$
|
|
4845
|
+
return /* @__PURE__ */ React.createElement(Tooltip, __spreadProps$5(__spreadValues$8({}, props), { title: props.title || props.titleText }));
|
|
4718
4846
|
}
|
|
4719
4847
|
function registerTooltip(loader) {
|
|
4720
4848
|
registerComponentHelper(loader, AntdTooltip, {
|
|
@@ -4730,6 +4858,10 @@ function registerTooltip(loader) {
|
|
|
4730
4858
|
},
|
|
4731
4859
|
mergeWithParent: true
|
|
4732
4860
|
},
|
|
4861
|
+
overlayClassName: {
|
|
4862
|
+
type: "class",
|
|
4863
|
+
displayName: "Overlay"
|
|
4864
|
+
},
|
|
4733
4865
|
titleText: {
|
|
4734
4866
|
type: "string",
|
|
4735
4867
|
displayName: "Tooltip contents",
|
|
@@ -4770,33 +4902,33 @@ function registerTooltip(loader) {
|
|
|
4770
4902
|
});
|
|
4771
4903
|
}
|
|
4772
4904
|
|
|
4773
|
-
var __defProp$
|
|
4774
|
-
var __defProps$
|
|
4775
|
-
var __getOwnPropDescs$
|
|
4776
|
-
var __getOwnPropSymbols$
|
|
4777
|
-
var __hasOwnProp$
|
|
4778
|
-
var __propIsEnum$
|
|
4779
|
-
var __defNormalProp$
|
|
4780
|
-
var __spreadValues$
|
|
4905
|
+
var __defProp$7 = Object.defineProperty;
|
|
4906
|
+
var __defProps$4 = Object.defineProperties;
|
|
4907
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
4908
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
4909
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
4910
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
4911
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4912
|
+
var __spreadValues$7 = (a, b) => {
|
|
4781
4913
|
for (var prop in b || (b = {}))
|
|
4782
|
-
if (__hasOwnProp$
|
|
4783
|
-
__defNormalProp$
|
|
4784
|
-
if (__getOwnPropSymbols$
|
|
4785
|
-
for (var prop of __getOwnPropSymbols$
|
|
4786
|
-
if (__propIsEnum$
|
|
4787
|
-
__defNormalProp$
|
|
4914
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
4915
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
4916
|
+
if (__getOwnPropSymbols$7)
|
|
4917
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
4918
|
+
if (__propIsEnum$7.call(b, prop))
|
|
4919
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
4788
4920
|
}
|
|
4789
4921
|
return a;
|
|
4790
4922
|
};
|
|
4791
|
-
var __spreadProps$
|
|
4792
|
-
var __objRest$
|
|
4923
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
4924
|
+
var __objRest$5 = (source, exclude) => {
|
|
4793
4925
|
var target = {};
|
|
4794
4926
|
for (var prop in source)
|
|
4795
|
-
if (__hasOwnProp$
|
|
4927
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4796
4928
|
target[prop] = source[prop];
|
|
4797
|
-
if (source != null && __getOwnPropSymbols$
|
|
4798
|
-
for (var prop of __getOwnPropSymbols$
|
|
4799
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4929
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
4930
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
4931
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
4800
4932
|
target[prop] = source[prop];
|
|
4801
4933
|
}
|
|
4802
4934
|
return target;
|
|
@@ -4805,13 +4937,13 @@ function AntdColorPicker(_a) {
|
|
|
4805
4937
|
var _b = _a, {
|
|
4806
4938
|
showTextSwitch,
|
|
4807
4939
|
onChange
|
|
4808
|
-
} = _b, props = __objRest$
|
|
4940
|
+
} = _b, props = __objRest$5(_b, [
|
|
4809
4941
|
"showTextSwitch",
|
|
4810
4942
|
"onChange"
|
|
4811
4943
|
]);
|
|
4812
4944
|
return /* @__PURE__ */ React.createElement(
|
|
4813
4945
|
ColorPicker,
|
|
4814
|
-
__spreadProps$
|
|
4946
|
+
__spreadProps$4(__spreadValues$7({}, props), {
|
|
4815
4947
|
showText: props.showText || showTextSwitch,
|
|
4816
4948
|
onChangeComplete: (value) => {
|
|
4817
4949
|
onChange == null ? void 0 : onChange(typeof value === "string" ? value : value.toHexString());
|
|
@@ -4884,39 +5016,39 @@ function registerColorPicker(loader) {
|
|
|
4884
5016
|
});
|
|
4885
5017
|
}
|
|
4886
5018
|
|
|
4887
|
-
var __defProp$
|
|
4888
|
-
var __defProps$
|
|
4889
|
-
var __getOwnPropDescs$
|
|
4890
|
-
var __getOwnPropSymbols$
|
|
4891
|
-
var __hasOwnProp$
|
|
4892
|
-
var __propIsEnum$
|
|
4893
|
-
var __defNormalProp$
|
|
4894
|
-
var __spreadValues$
|
|
5019
|
+
var __defProp$6 = Object.defineProperty;
|
|
5020
|
+
var __defProps$3 = Object.defineProperties;
|
|
5021
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
5022
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
5023
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
5024
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
5025
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5026
|
+
var __spreadValues$6 = (a, b) => {
|
|
4895
5027
|
for (var prop in b || (b = {}))
|
|
4896
|
-
if (__hasOwnProp$
|
|
4897
|
-
__defNormalProp$
|
|
4898
|
-
if (__getOwnPropSymbols$
|
|
4899
|
-
for (var prop of __getOwnPropSymbols$
|
|
4900
|
-
if (__propIsEnum$
|
|
4901
|
-
__defNormalProp$
|
|
5028
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
5029
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
5030
|
+
if (__getOwnPropSymbols$6)
|
|
5031
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
5032
|
+
if (__propIsEnum$6.call(b, prop))
|
|
5033
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4902
5034
|
}
|
|
4903
5035
|
return a;
|
|
4904
5036
|
};
|
|
4905
|
-
var __spreadProps$
|
|
4906
|
-
var __objRest$
|
|
5037
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
5038
|
+
var __objRest$4 = (source, exclude) => {
|
|
4907
5039
|
var target = {};
|
|
4908
5040
|
for (var prop in source)
|
|
4909
|
-
if (__hasOwnProp$
|
|
5041
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4910
5042
|
target[prop] = source[prop];
|
|
4911
|
-
if (source != null && __getOwnPropSymbols$
|
|
4912
|
-
for (var prop of __getOwnPropSymbols$
|
|
4913
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
5043
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
5044
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
5045
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
4914
5046
|
target[prop] = source[prop];
|
|
4915
5047
|
}
|
|
4916
5048
|
return target;
|
|
4917
5049
|
};
|
|
4918
5050
|
function AntdDrawer(props) {
|
|
4919
|
-
const _a = props, { onOpenChange, onClose, open, footer } = _a, rest = __objRest$
|
|
5051
|
+
const _a = props, { onOpenChange, onClose, open, footer, drawerScopeClassName } = _a, rest = __objRest$4(_a, ["onOpenChange", "onClose", "open", "footer", "drawerScopeClassName"]);
|
|
4920
5052
|
const memoOnClose = React.useMemo(() => {
|
|
4921
5053
|
if (onOpenChange || onClose) {
|
|
4922
5054
|
return (e) => {
|
|
@@ -4929,8 +5061,9 @@ function AntdDrawer(props) {
|
|
|
4929
5061
|
}, [onOpenChange, onClose]);
|
|
4930
5062
|
return /* @__PURE__ */ React.createElement(
|
|
4931
5063
|
Drawer,
|
|
4932
|
-
__spreadProps$
|
|
5064
|
+
__spreadProps$3(__spreadValues$6({}, rest), {
|
|
4933
5065
|
onClose: memoOnClose,
|
|
5066
|
+
rootClassName: drawerScopeClassName,
|
|
4934
5067
|
open,
|
|
4935
5068
|
footer: footer != null ? footer : void 0,
|
|
4936
5069
|
className: `${props.className} ${props.defaultStylesClassName}`
|
|
@@ -4977,13 +5110,69 @@ function registerDrawer(loader) {
|
|
|
4977
5110
|
type: "styleScopeClass",
|
|
4978
5111
|
scopeName: "drawer"
|
|
4979
5112
|
},
|
|
4980
|
-
|
|
5113
|
+
drawerHeaderClassName: {
|
|
5114
|
+
type: "class",
|
|
5115
|
+
displayName: "Drawer header",
|
|
5116
|
+
noSelf: true,
|
|
5117
|
+
selectors: [
|
|
5118
|
+
{
|
|
5119
|
+
selector: ":drawer .ant-drawer-header",
|
|
5120
|
+
label: "Base"
|
|
5121
|
+
}
|
|
5122
|
+
]
|
|
5123
|
+
},
|
|
5124
|
+
drawerBodyClassName: {
|
|
4981
5125
|
type: "class",
|
|
4982
|
-
displayName: "Drawer
|
|
5126
|
+
displayName: "Drawer body",
|
|
4983
5127
|
noSelf: true,
|
|
4984
5128
|
selectors: [
|
|
4985
5129
|
{
|
|
4986
|
-
selector: ":drawer .ant-drawer
|
|
5130
|
+
selector: ":drawer .ant-drawer-body",
|
|
5131
|
+
label: "Base"
|
|
5132
|
+
}
|
|
5133
|
+
]
|
|
5134
|
+
},
|
|
5135
|
+
drawerFooterClassName: {
|
|
5136
|
+
type: "class",
|
|
5137
|
+
displayName: "Drawer footer",
|
|
5138
|
+
noSelf: true,
|
|
5139
|
+
selectors: [
|
|
5140
|
+
{
|
|
5141
|
+
selector: ":drawer .ant-drawer-footer",
|
|
5142
|
+
label: "Base"
|
|
5143
|
+
}
|
|
5144
|
+
]
|
|
5145
|
+
},
|
|
5146
|
+
drawerTitleClassName: {
|
|
5147
|
+
type: "class",
|
|
5148
|
+
displayName: "Drawer title",
|
|
5149
|
+
noSelf: true,
|
|
5150
|
+
selectors: [
|
|
5151
|
+
{
|
|
5152
|
+
selector: ":drawer .ant-drawer-title",
|
|
5153
|
+
label: "Base"
|
|
5154
|
+
}
|
|
5155
|
+
]
|
|
5156
|
+
},
|
|
5157
|
+
drawerMaskClassName: {
|
|
5158
|
+
type: "class",
|
|
5159
|
+
displayName: "Drawer mask",
|
|
5160
|
+
styleSections: ["background"],
|
|
5161
|
+
noSelf: true,
|
|
5162
|
+
selectors: [
|
|
5163
|
+
{
|
|
5164
|
+
selector: ":drawer .ant-drawer-mask",
|
|
5165
|
+
label: "Base"
|
|
5166
|
+
}
|
|
5167
|
+
]
|
|
5168
|
+
},
|
|
5169
|
+
drawerContentWrapperClassName: {
|
|
5170
|
+
type: "class",
|
|
5171
|
+
displayName: "Drawer content wrapper",
|
|
5172
|
+
noSelf: true,
|
|
5173
|
+
selectors: [
|
|
5174
|
+
{
|
|
5175
|
+
selector: ":drawer .ant-drawer-content-wrapper",
|
|
4987
5176
|
label: "Base"
|
|
4988
5177
|
}
|
|
4989
5178
|
],
|
|
@@ -4991,11 +5180,11 @@ function registerDrawer(loader) {
|
|
|
4991
5180
|
},
|
|
4992
5181
|
closeButtonClassName: {
|
|
4993
5182
|
type: "class",
|
|
4994
|
-
displayName: "Close button
|
|
5183
|
+
displayName: "Close button",
|
|
4995
5184
|
noSelf: true,
|
|
4996
5185
|
selectors: [
|
|
4997
5186
|
{
|
|
4998
|
-
selector: ":drawer .ant-drawer
|
|
5187
|
+
selector: ":drawer .ant-drawer-close",
|
|
4999
5188
|
label: "Base"
|
|
5000
5189
|
}
|
|
5001
5190
|
],
|
|
@@ -5022,24 +5211,24 @@ function registerDrawer(loader) {
|
|
|
5022
5211
|
});
|
|
5023
5212
|
}
|
|
5024
5213
|
|
|
5025
|
-
var __defProp$
|
|
5026
|
-
var __getOwnPropSymbols$
|
|
5027
|
-
var __hasOwnProp$
|
|
5028
|
-
var __propIsEnum$
|
|
5029
|
-
var __defNormalProp$
|
|
5030
|
-
var __spreadValues$
|
|
5214
|
+
var __defProp$5 = Object.defineProperty;
|
|
5215
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
5216
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
5217
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
5218
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5219
|
+
var __spreadValues$5 = (a, b) => {
|
|
5031
5220
|
for (var prop in b || (b = {}))
|
|
5032
|
-
if (__hasOwnProp$
|
|
5033
|
-
__defNormalProp$
|
|
5034
|
-
if (__getOwnPropSymbols$
|
|
5035
|
-
for (var prop of __getOwnPropSymbols$
|
|
5036
|
-
if (__propIsEnum$
|
|
5037
|
-
__defNormalProp$
|
|
5221
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
5222
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
5223
|
+
if (__getOwnPropSymbols$5)
|
|
5224
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
5225
|
+
if (__propIsEnum$5.call(b, prop))
|
|
5226
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
5038
5227
|
}
|
|
5039
5228
|
return a;
|
|
5040
5229
|
};
|
|
5041
5230
|
function AntdSteps(props) {
|
|
5042
|
-
return /* @__PURE__ */ React.createElement(Steps, __spreadValues$
|
|
5231
|
+
return /* @__PURE__ */ React.createElement(Steps, __spreadValues$5({}, props));
|
|
5043
5232
|
}
|
|
5044
5233
|
function registerSteps(loader) {
|
|
5045
5234
|
const statusOptions = ["wait", "process", "finish", "error"];
|
|
@@ -5146,30 +5335,30 @@ function registerSteps(loader) {
|
|
|
5146
5335
|
});
|
|
5147
5336
|
}
|
|
5148
5337
|
|
|
5149
|
-
var __defProp$
|
|
5150
|
-
var __defProps$
|
|
5151
|
-
var __getOwnPropDescs$
|
|
5152
|
-
var __getOwnPropSymbols$
|
|
5153
|
-
var __hasOwnProp$
|
|
5154
|
-
var __propIsEnum$
|
|
5155
|
-
var __defNormalProp$
|
|
5156
|
-
var __spreadValues$
|
|
5338
|
+
var __defProp$4 = Object.defineProperty;
|
|
5339
|
+
var __defProps$2 = Object.defineProperties;
|
|
5340
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
5341
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
5342
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
5343
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
5344
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5345
|
+
var __spreadValues$4 = (a, b) => {
|
|
5157
5346
|
for (var prop in b || (b = {}))
|
|
5158
|
-
if (__hasOwnProp$
|
|
5159
|
-
__defNormalProp$
|
|
5160
|
-
if (__getOwnPropSymbols$
|
|
5161
|
-
for (var prop of __getOwnPropSymbols$
|
|
5162
|
-
if (__propIsEnum$
|
|
5163
|
-
__defNormalProp$
|
|
5347
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
5348
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
5349
|
+
if (__getOwnPropSymbols$4)
|
|
5350
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
5351
|
+
if (__propIsEnum$4.call(b, prop))
|
|
5352
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
5164
5353
|
}
|
|
5165
5354
|
return a;
|
|
5166
5355
|
};
|
|
5167
|
-
var __spreadProps$
|
|
5356
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
5168
5357
|
function useMunged(props) {
|
|
5169
5358
|
const [autoExpandParent, setAutoExpandParent] = useState(
|
|
5170
5359
|
props.autoExpandParent
|
|
5171
5360
|
);
|
|
5172
|
-
const munged = __spreadProps$
|
|
5361
|
+
const munged = __spreadProps$2(__spreadValues$4({}, props), { autoExpandParent });
|
|
5173
5362
|
if (!props.expandedKeys) {
|
|
5174
5363
|
delete munged["expandedKeys"];
|
|
5175
5364
|
}
|
|
@@ -5182,11 +5371,11 @@ function useMunged(props) {
|
|
|
5182
5371
|
}
|
|
5183
5372
|
function AntdTree(props) {
|
|
5184
5373
|
const munged = useMunged(props);
|
|
5185
|
-
return /* @__PURE__ */ React.createElement(Tree, __spreadValues$
|
|
5374
|
+
return /* @__PURE__ */ React.createElement(Tree, __spreadValues$4({}, munged));
|
|
5186
5375
|
}
|
|
5187
5376
|
function AntdDirectoryTree(props) {
|
|
5188
5377
|
const munged = useMunged(props);
|
|
5189
|
-
return /* @__PURE__ */ React.createElement(Tree.DirectoryTree, __spreadValues$
|
|
5378
|
+
return /* @__PURE__ */ React.createElement(Tree.DirectoryTree, __spreadValues$4({}, munged));
|
|
5190
5379
|
}
|
|
5191
5380
|
const treeHelpers_ = {
|
|
5192
5381
|
states: {
|
|
@@ -5416,20 +5605,20 @@ function registerTreeHelper({
|
|
|
5416
5605
|
}
|
|
5417
5606
|
},
|
|
5418
5607
|
states: {
|
|
5419
|
-
checkedKeys: __spreadValues$
|
|
5608
|
+
checkedKeys: __spreadValues$4({
|
|
5420
5609
|
type: "writable",
|
|
5421
5610
|
valueProp: "checkedKeys",
|
|
5422
5611
|
onChangeProp: "onCheck",
|
|
5423
5612
|
variableType: "array",
|
|
5424
5613
|
initVal: []
|
|
5425
5614
|
}, treeHelpers_.states.checkedKeys),
|
|
5426
|
-
checkedNodes: __spreadValues$
|
|
5615
|
+
checkedNodes: __spreadValues$4({
|
|
5427
5616
|
type: "readonly",
|
|
5428
5617
|
onChangeProp: "onCheck",
|
|
5429
5618
|
variableType: "array",
|
|
5430
5619
|
initVal: []
|
|
5431
5620
|
}, treeHelpers_.states.checkedNodes),
|
|
5432
|
-
checkedDetails: __spreadValues$
|
|
5621
|
+
checkedDetails: __spreadValues$4({
|
|
5433
5622
|
type: "readonly",
|
|
5434
5623
|
onChangeProp: "onCheck",
|
|
5435
5624
|
variableType: "object",
|
|
@@ -5438,20 +5627,20 @@ function registerTreeHelper({
|
|
|
5438
5627
|
halfCheckedKeys: []
|
|
5439
5628
|
}
|
|
5440
5629
|
}, treeHelpers_.states.checkedDetails),
|
|
5441
|
-
selectedKeys: __spreadValues$
|
|
5630
|
+
selectedKeys: __spreadValues$4({
|
|
5442
5631
|
type: "writable",
|
|
5443
5632
|
valueProp: "selectedKeys",
|
|
5444
5633
|
onChangeProp: "onSelect",
|
|
5445
5634
|
variableType: "array",
|
|
5446
5635
|
initVal: []
|
|
5447
5636
|
}, treeHelpers_.states.selectedKeys),
|
|
5448
|
-
selectedNodes: __spreadValues$
|
|
5637
|
+
selectedNodes: __spreadValues$4({
|
|
5449
5638
|
type: "readonly",
|
|
5450
5639
|
onChangeProp: "onSelect",
|
|
5451
5640
|
variableType: "array",
|
|
5452
5641
|
initVal: []
|
|
5453
5642
|
}, treeHelpers_.states.selectedNodes),
|
|
5454
|
-
expandedKeys: __spreadValues$
|
|
5643
|
+
expandedKeys: __spreadValues$4({
|
|
5455
5644
|
type: "writable",
|
|
5456
5645
|
valueProp: "expandedKeys",
|
|
5457
5646
|
onChangeProp: "onExpand",
|
|
@@ -5491,68 +5680,61 @@ function registerDirectoryTree(loader) {
|
|
|
5491
5680
|
});
|
|
5492
5681
|
}
|
|
5493
5682
|
|
|
5494
|
-
var __defProp = Object.defineProperty;
|
|
5495
|
-
var __defProps = Object.defineProperties;
|
|
5496
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5497
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5498
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5499
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5500
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5501
|
-
var __spreadValues = (a, b) => {
|
|
5683
|
+
var __defProp$3 = Object.defineProperty;
|
|
5684
|
+
var __defProps$1 = Object.defineProperties;
|
|
5685
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
5686
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
5687
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
5688
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
5689
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5690
|
+
var __spreadValues$3 = (a, b) => {
|
|
5502
5691
|
for (var prop in b || (b = {}))
|
|
5503
|
-
if (__hasOwnProp.call(b, prop))
|
|
5504
|
-
__defNormalProp(a, prop, b[prop]);
|
|
5505
|
-
if (__getOwnPropSymbols)
|
|
5506
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
5507
|
-
if (__propIsEnum.call(b, prop))
|
|
5508
|
-
__defNormalProp(a, prop, b[prop]);
|
|
5692
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
5693
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
5694
|
+
if (__getOwnPropSymbols$3)
|
|
5695
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
5696
|
+
if (__propIsEnum$3.call(b, prop))
|
|
5697
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
5509
5698
|
}
|
|
5510
5699
|
return a;
|
|
5511
5700
|
};
|
|
5512
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
5513
|
-
var __objRest = (source, exclude) => {
|
|
5701
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
5702
|
+
var __objRest$3 = (source, exclude) => {
|
|
5514
5703
|
var target = {};
|
|
5515
5704
|
for (var prop in source)
|
|
5516
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5705
|
+
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
5517
5706
|
target[prop] = source[prop];
|
|
5518
|
-
if (source != null && __getOwnPropSymbols)
|
|
5519
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
5520
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
5707
|
+
if (source != null && __getOwnPropSymbols$3)
|
|
5708
|
+
for (var prop of __getOwnPropSymbols$3(source)) {
|
|
5709
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
|
|
5521
5710
|
target[prop] = source[prop];
|
|
5522
5711
|
}
|
|
5523
5712
|
return target;
|
|
5524
5713
|
};
|
|
5525
|
-
const
|
|
5526
|
-
const
|
|
5527
|
-
const
|
|
5714
|
+
const singleCollapseComponentName = "plasmic-antd5-single-collapse";
|
|
5715
|
+
const accordionComponentName = "plasmic-antd5-collapse";
|
|
5716
|
+
const accordionItemComponentName = "plasmic-antd5-collapse-item";
|
|
5717
|
+
function AntdAccordionItem({ children }) {
|
|
5528
5718
|
return /* @__PURE__ */ React.createElement("div", null, children);
|
|
5529
|
-
}
|
|
5530
|
-
function
|
|
5719
|
+
}
|
|
5720
|
+
function AntdAccordion(props) {
|
|
5531
5721
|
const _a = props, {
|
|
5532
5722
|
items: itemsRaw,
|
|
5533
|
-
|
|
5534
|
-
|
|
5723
|
+
activeKey,
|
|
5724
|
+
defaultActiveKey,
|
|
5535
5725
|
expandIcon,
|
|
5536
5726
|
collapsible,
|
|
5537
5727
|
disabled,
|
|
5538
5728
|
rotateCustomExpandIcon
|
|
5539
|
-
} = _a, rest = __objRest(_a, [
|
|
5729
|
+
} = _a, rest = __objRest$3(_a, [
|
|
5540
5730
|
"items",
|
|
5541
|
-
"
|
|
5542
|
-
"
|
|
5731
|
+
"activeKey",
|
|
5732
|
+
"defaultActiveKey",
|
|
5543
5733
|
"expandIcon",
|
|
5544
5734
|
"collapsible",
|
|
5545
5735
|
"disabled",
|
|
5546
5736
|
"rotateCustomExpandIcon"
|
|
5547
5737
|
]);
|
|
5548
|
-
const activeKeyProp = useMemo(() => {
|
|
5549
|
-
const res = (activeKeys == null ? void 0 : activeKeys.map((k) => k.key).filter((k) => k)) || [];
|
|
5550
|
-
return res.length ? res : void 0;
|
|
5551
|
-
}, [activeKeys]);
|
|
5552
|
-
const defaultActiveKeysProp = useMemo(() => {
|
|
5553
|
-
const res = (defaultActiveKeys == null ? void 0 : defaultActiveKeys.map((k) => k.key).filter((k) => k)) || [];
|
|
5554
|
-
return res.length ? res : void 0;
|
|
5555
|
-
}, [defaultActiveKeys]);
|
|
5556
5738
|
const items = useMemo(() => {
|
|
5557
5739
|
if (!React.isValidElement(itemsRaw))
|
|
5558
5740
|
return [];
|
|
@@ -5560,7 +5742,7 @@ function AntdCollapse(props) {
|
|
|
5560
5742
|
if (!React.isValidElement(currentItem) || !React.isValidElement(currentItem.props.children)) {
|
|
5561
5743
|
return null;
|
|
5562
5744
|
}
|
|
5563
|
-
return __spreadProps(__spreadValues({}, currentItem.props), {
|
|
5745
|
+
return __spreadProps$1(__spreadValues$3({}, currentItem.props), {
|
|
5564
5746
|
id: currentItem.props.id,
|
|
5565
5747
|
key: currentItem.props.id,
|
|
5566
5748
|
children: React.cloneElement(currentItem.props.children)
|
|
@@ -5569,10 +5751,69 @@ function AntdCollapse(props) {
|
|
|
5569
5751
|
}, [itemsRaw]);
|
|
5570
5752
|
return /* @__PURE__ */ React.createElement(
|
|
5571
5753
|
Collapse,
|
|
5572
|
-
__spreadValues({
|
|
5754
|
+
__spreadValues$3({
|
|
5755
|
+
accordion: true,
|
|
5573
5756
|
items,
|
|
5574
|
-
defaultActiveKey
|
|
5575
|
-
activeKey
|
|
5757
|
+
defaultActiveKey,
|
|
5758
|
+
activeKey,
|
|
5759
|
+
collapsible: disabled ? "disabled" : collapsible,
|
|
5760
|
+
expandIcon: (expandIcon == null ? void 0 : expandIcon.key) ? ({ isActive }) => /* @__PURE__ */ React.createElement(
|
|
5761
|
+
"div",
|
|
5762
|
+
{
|
|
5763
|
+
style: isActive && rotateCustomExpandIcon ? { transform: "rotate(90deg)" } : void 0
|
|
5764
|
+
},
|
|
5765
|
+
expandIcon
|
|
5766
|
+
) : void 0
|
|
5767
|
+
}, rest)
|
|
5768
|
+
);
|
|
5769
|
+
}
|
|
5770
|
+
function AntdSingleCollapse(props) {
|
|
5771
|
+
const _a = props, {
|
|
5772
|
+
open,
|
|
5773
|
+
defaultOpen,
|
|
5774
|
+
expandIcon,
|
|
5775
|
+
collapsible,
|
|
5776
|
+
disabled,
|
|
5777
|
+
rotateCustomExpandIcon,
|
|
5778
|
+
label,
|
|
5779
|
+
showArrow,
|
|
5780
|
+
extra,
|
|
5781
|
+
forceRender,
|
|
5782
|
+
children,
|
|
5783
|
+
headerClass
|
|
5784
|
+
} = _a, rest = __objRest$3(_a, [
|
|
5785
|
+
"open",
|
|
5786
|
+
"defaultOpen",
|
|
5787
|
+
"expandIcon",
|
|
5788
|
+
"collapsible",
|
|
5789
|
+
"disabled",
|
|
5790
|
+
"rotateCustomExpandIcon",
|
|
5791
|
+
"label",
|
|
5792
|
+
"showArrow",
|
|
5793
|
+
"extra",
|
|
5794
|
+
"forceRender",
|
|
5795
|
+
"children",
|
|
5796
|
+
"headerClass"
|
|
5797
|
+
]);
|
|
5798
|
+
const defaultItemKey = useMemo(() => uniqueId(), []);
|
|
5799
|
+
const item = useMemo(
|
|
5800
|
+
() => ({
|
|
5801
|
+
key: defaultItemKey,
|
|
5802
|
+
label,
|
|
5803
|
+
showArrow,
|
|
5804
|
+
extra: /* @__PURE__ */ React.createElement(React.Fragment, null, extra),
|
|
5805
|
+
headerClass,
|
|
5806
|
+
children
|
|
5807
|
+
}),
|
|
5808
|
+
[label, showArrow, extra, children, defaultItemKey, headerClass]
|
|
5809
|
+
);
|
|
5810
|
+
return /* @__PURE__ */ React.createElement(
|
|
5811
|
+
Collapse,
|
|
5812
|
+
__spreadValues$3({
|
|
5813
|
+
accordion: false,
|
|
5814
|
+
items: [item],
|
|
5815
|
+
defaultActiveKey: defaultOpen ? item.key : void 0,
|
|
5816
|
+
activeKey: open ? item.key : void 0,
|
|
5576
5817
|
collapsible: disabled ? "disabled" : collapsible,
|
|
5577
5818
|
expandIcon: (expandIcon == null ? void 0 : expandIcon.key) ? ({ isActive }) => /* @__PURE__ */ React.createElement(
|
|
5578
5819
|
"div",
|
|
@@ -5584,105 +5825,176 @@ function AntdCollapse(props) {
|
|
|
5584
5825
|
}, rest)
|
|
5585
5826
|
);
|
|
5586
5827
|
}
|
|
5587
|
-
const
|
|
5828
|
+
const accordionHelpers = {
|
|
5829
|
+
states: {
|
|
5830
|
+
activeKey: {
|
|
5831
|
+
onChangeArgsToValue: (activeKeys) => activeKeys[0]
|
|
5832
|
+
}
|
|
5833
|
+
}
|
|
5834
|
+
};
|
|
5835
|
+
const singleCollapseHelpers = {
|
|
5588
5836
|
states: {
|
|
5589
|
-
|
|
5590
|
-
onChangeArgsToValue: (activeKeys) => activeKeys.
|
|
5837
|
+
open: {
|
|
5838
|
+
onChangeArgsToValue: (activeKeys) => activeKeys.length > 0
|
|
5591
5839
|
}
|
|
5592
5840
|
}
|
|
5593
5841
|
};
|
|
5842
|
+
const commonAccordionProps = {
|
|
5843
|
+
bordered: {
|
|
5844
|
+
type: "boolean",
|
|
5845
|
+
defaultValue: true,
|
|
5846
|
+
description: `Display border around accordion `
|
|
5847
|
+
},
|
|
5848
|
+
disabled: {
|
|
5849
|
+
type: "boolean",
|
|
5850
|
+
description: "Disable the toggle behaviour of panels"
|
|
5851
|
+
},
|
|
5852
|
+
expandIcon: {
|
|
5853
|
+
type: "slot",
|
|
5854
|
+
hidePlaceholder: true
|
|
5855
|
+
},
|
|
5856
|
+
rotateCustomExpandIcon: {
|
|
5857
|
+
type: "boolean",
|
|
5858
|
+
description: "Enable rotation of custom expand icon when panel is expanded",
|
|
5859
|
+
advanced: true,
|
|
5860
|
+
hidden: (ps) => {
|
|
5861
|
+
var _a;
|
|
5862
|
+
return !((_a = ps.expandIcon) == null ? void 0 : _a.key);
|
|
5863
|
+
}
|
|
5864
|
+
},
|
|
5865
|
+
expandIconPosition: {
|
|
5866
|
+
type: "choice",
|
|
5867
|
+
defaultValueHint: "start",
|
|
5868
|
+
description: `Set expand icon position`,
|
|
5869
|
+
options: ["start", "end"]
|
|
5870
|
+
},
|
|
5871
|
+
ghost: {
|
|
5872
|
+
type: "boolean",
|
|
5873
|
+
description: `Make the accordion borderless and its background transparent`
|
|
5874
|
+
},
|
|
5875
|
+
size: {
|
|
5876
|
+
type: "choice",
|
|
5877
|
+
defaultValueHint: "middle",
|
|
5878
|
+
description: `Set the size of accordion`,
|
|
5879
|
+
options: ["large", "middle", "small"]
|
|
5880
|
+
},
|
|
5881
|
+
onChange: {
|
|
5882
|
+
type: "eventHandler",
|
|
5883
|
+
argTypes: [{ name: "activeIds", type: "object" }]
|
|
5884
|
+
}
|
|
5885
|
+
};
|
|
5886
|
+
const commonAccordionItemProps = {
|
|
5887
|
+
label: {
|
|
5888
|
+
type: "slot",
|
|
5889
|
+
displayName: "Header Content",
|
|
5890
|
+
defaultValue: "Collapse Header",
|
|
5891
|
+
hidePlaceholder: true
|
|
5892
|
+
},
|
|
5893
|
+
extra: {
|
|
5894
|
+
type: "slot",
|
|
5895
|
+
hidePlaceholder: true
|
|
5896
|
+
},
|
|
5897
|
+
showArrow: {
|
|
5898
|
+
type: "boolean",
|
|
5899
|
+
defaultValue: true,
|
|
5900
|
+
description: `Whether to show animating arrow alongside header text`,
|
|
5901
|
+
advanced: true
|
|
5902
|
+
},
|
|
5903
|
+
headerClass: {
|
|
5904
|
+
type: "class",
|
|
5905
|
+
displayName: "Header"
|
|
5906
|
+
},
|
|
5907
|
+
children: __spreadProps$1(__spreadValues$3({
|
|
5908
|
+
type: "slot",
|
|
5909
|
+
hidePlaceholder: true
|
|
5910
|
+
}, { mergeWithParent: true }), {
|
|
5911
|
+
defaultValue: "Collapsible text..."
|
|
5912
|
+
})
|
|
5913
|
+
};
|
|
5914
|
+
const commonProps = {
|
|
5915
|
+
collapsible: {
|
|
5916
|
+
displayName: "Toggle Area",
|
|
5917
|
+
type: "choice",
|
|
5918
|
+
defaultValueHint: "header",
|
|
5919
|
+
description: `Specify the element that can be clicked to toggle a panel`,
|
|
5920
|
+
options: ["header", "icon"],
|
|
5921
|
+
advanced: true,
|
|
5922
|
+
hidden: (ps) => Boolean(ps.disabled)
|
|
5923
|
+
},
|
|
5924
|
+
destroyInactivePanel: {
|
|
5925
|
+
type: "boolean",
|
|
5926
|
+
description: `Destroy/Unmount panel if inactive`,
|
|
5927
|
+
advanced: true
|
|
5928
|
+
},
|
|
5929
|
+
forceRender: {
|
|
5930
|
+
type: "boolean",
|
|
5931
|
+
description: `Force rendering of content in the panel, instead of lazy rendering it.`,
|
|
5932
|
+
advanced: true
|
|
5933
|
+
}
|
|
5934
|
+
};
|
|
5594
5935
|
function registerCollapse(loader) {
|
|
5595
|
-
registerComponentHelper(loader,
|
|
5596
|
-
name:
|
|
5936
|
+
registerComponentHelper(loader, AntdSingleCollapse, {
|
|
5937
|
+
name: singleCollapseComponentName,
|
|
5597
5938
|
displayName: "Collapse",
|
|
5939
|
+
description: "Accordion, but with a single collapsible block.",
|
|
5598
5940
|
defaultStyles: {
|
|
5599
5941
|
width: "stretch"
|
|
5600
5942
|
},
|
|
5601
|
-
props: {
|
|
5602
|
-
|
|
5603
|
-
type: "boolean",
|
|
5604
|
-
description: `Allow only one panel to be expanded at a time`
|
|
5605
|
-
},
|
|
5606
|
-
activeKeys: {
|
|
5943
|
+
props: __spreadValues$3(__spreadValues$3(__spreadValues$3({
|
|
5944
|
+
open: {
|
|
5607
5945
|
editOnly: true,
|
|
5608
|
-
displayName: "
|
|
5609
|
-
uncontrolledProp: "
|
|
5610
|
-
type: "array",
|
|
5611
|
-
description: `A list of panel IDs that are expanded by default.`,
|
|
5612
|
-
advanced: true,
|
|
5613
|
-
itemType: {
|
|
5614
|
-
type: "object",
|
|
5615
|
-
nameFunc: (_item) => `ID: ${_item.key}`,
|
|
5616
|
-
fields: {
|
|
5617
|
-
key: {
|
|
5618
|
-
type: "number",
|
|
5619
|
-
displayName: "Panel ID"
|
|
5620
|
-
}
|
|
5621
|
-
}
|
|
5622
|
-
}
|
|
5623
|
-
},
|
|
5624
|
-
bordered: {
|
|
5625
|
-
type: "boolean",
|
|
5626
|
-
defaultValue: true,
|
|
5627
|
-
description: `Display border around collapse `
|
|
5628
|
-
},
|
|
5629
|
-
disabled: {
|
|
5630
|
-
type: "boolean",
|
|
5631
|
-
description: "Disable the toggle behaviour of panels"
|
|
5632
|
-
},
|
|
5633
|
-
collapsible: {
|
|
5634
|
-
type: "choice",
|
|
5635
|
-
defaultValueHint: "header",
|
|
5636
|
-
description: `Specify the element that can be clicked to toggle a panel`,
|
|
5637
|
-
options: ["header", "icon"],
|
|
5638
|
-
hidden: (ps) => Boolean(ps.disabled)
|
|
5639
|
-
},
|
|
5640
|
-
destroyInactivePanel: {
|
|
5641
|
-
type: "boolean",
|
|
5642
|
-
advanced: true,
|
|
5643
|
-
description: `Destroy/Unmount inactive panels`
|
|
5644
|
-
},
|
|
5645
|
-
expandIcon: {
|
|
5646
|
-
type: "slot",
|
|
5647
|
-
hidePlaceholder: true
|
|
5648
|
-
},
|
|
5649
|
-
rotateCustomExpandIcon: {
|
|
5650
|
-
type: "boolean",
|
|
5651
|
-
description: "Enable rotation of custom expand icon when panel is expanded",
|
|
5652
|
-
advanced: true,
|
|
5653
|
-
hidden: (ps) => {
|
|
5654
|
-
var _a;
|
|
5655
|
-
return !((_a = ps.expandIcon) == null ? void 0 : _a.key);
|
|
5656
|
-
}
|
|
5657
|
-
},
|
|
5658
|
-
expandIconPosition: {
|
|
5659
|
-
type: "choice",
|
|
5660
|
-
defaultValueHint: "start",
|
|
5661
|
-
description: `Set expand icon position`,
|
|
5662
|
-
options: ["start", "end"]
|
|
5663
|
-
},
|
|
5664
|
-
ghost: {
|
|
5946
|
+
displayName: "Open",
|
|
5947
|
+
uncontrolledProp: "defaultOpen",
|
|
5665
5948
|
type: "boolean",
|
|
5666
|
-
description: `
|
|
5667
|
-
}
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5949
|
+
description: `Default open state of the collapse block`
|
|
5950
|
+
}
|
|
5951
|
+
}, commonProps), commonAccordionItemProps), commonAccordionProps),
|
|
5952
|
+
states: {
|
|
5953
|
+
open: __spreadValues$3({
|
|
5954
|
+
type: "writable",
|
|
5955
|
+
valueProp: "open",
|
|
5956
|
+
onChangeProp: "onChange",
|
|
5957
|
+
variableType: "boolean"
|
|
5958
|
+
}, singleCollapseHelpers.states.open)
|
|
5959
|
+
},
|
|
5960
|
+
componentHelpers: {
|
|
5961
|
+
helpers: accordionHelpers,
|
|
5962
|
+
importName: "accordionHelpers",
|
|
5963
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerCollapse"
|
|
5964
|
+
},
|
|
5965
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerCollapse",
|
|
5966
|
+
importName: "AntdSingleCollapse"
|
|
5967
|
+
});
|
|
5968
|
+
registerComponentHelper(loader, AntdAccordion, {
|
|
5969
|
+
name: accordionComponentName,
|
|
5970
|
+
displayName: "Accordion",
|
|
5971
|
+
defaultStyles: {
|
|
5972
|
+
width: "stretch"
|
|
5973
|
+
},
|
|
5974
|
+
props: __spreadValues$3(__spreadValues$3({
|
|
5975
|
+
activeKey: {
|
|
5976
|
+
editOnly: true,
|
|
5977
|
+
displayName: "Active panel ID",
|
|
5978
|
+
uncontrolledProp: "defaultActiveKey",
|
|
5979
|
+
type: "string",
|
|
5980
|
+
description: `ID of Accordion item that is expanded by default.`,
|
|
5981
|
+
advanced: true
|
|
5673
5982
|
},
|
|
5674
|
-
items: __spreadProps(__spreadValues({
|
|
5983
|
+
items: __spreadProps$1(__spreadValues$3({
|
|
5675
5984
|
type: "slot",
|
|
5676
5985
|
hidePlaceholder: true,
|
|
5677
|
-
allowedComponents: [
|
|
5986
|
+
allowedComponents: [accordionItemComponentName]
|
|
5678
5987
|
}, { mergeWithParent: true }), {
|
|
5679
5988
|
defaultValue: [
|
|
5680
5989
|
{
|
|
5681
5990
|
type: "component",
|
|
5682
|
-
name:
|
|
5991
|
+
name: accordionItemComponentName,
|
|
5683
5992
|
props: {
|
|
5684
5993
|
id: 1,
|
|
5685
|
-
label:
|
|
5994
|
+
label: {
|
|
5995
|
+
type: "text",
|
|
5996
|
+
value: "First Item"
|
|
5997
|
+
},
|
|
5686
5998
|
children: {
|
|
5687
5999
|
type: "text",
|
|
5688
6000
|
value: "First Children"
|
|
@@ -5691,10 +6003,13 @@ function registerCollapse(loader) {
|
|
|
5691
6003
|
},
|
|
5692
6004
|
{
|
|
5693
6005
|
type: "component",
|
|
5694
|
-
name:
|
|
6006
|
+
name: accordionItemComponentName,
|
|
5695
6007
|
props: {
|
|
5696
6008
|
id: 2,
|
|
5697
|
-
label:
|
|
6009
|
+
label: {
|
|
6010
|
+
type: "text",
|
|
6011
|
+
value: "Second Item"
|
|
6012
|
+
},
|
|
5698
6013
|
children: {
|
|
5699
6014
|
type: "text",
|
|
5700
6015
|
value: "Second Children"
|
|
@@ -5702,73 +6017,823 @@ function registerCollapse(loader) {
|
|
|
5702
6017
|
}
|
|
5703
6018
|
}
|
|
5704
6019
|
]
|
|
5705
|
-
})
|
|
5706
|
-
|
|
5707
|
-
type: "eventHandler",
|
|
5708
|
-
argTypes: [{ name: "activeIds", type: "object" }]
|
|
5709
|
-
}
|
|
5710
|
-
},
|
|
6020
|
+
})
|
|
6021
|
+
}, commonProps), commonAccordionProps),
|
|
5711
6022
|
states: {
|
|
5712
|
-
|
|
6023
|
+
activePanelId: __spreadValues$3({
|
|
5713
6024
|
type: "writable",
|
|
5714
|
-
valueProp: "
|
|
6025
|
+
valueProp: "activeKey",
|
|
5715
6026
|
onChangeProp: "onChange",
|
|
5716
6027
|
variableType: "array"
|
|
5717
|
-
},
|
|
6028
|
+
}, accordionHelpers.states.activeKey)
|
|
5718
6029
|
},
|
|
5719
6030
|
componentHelpers: {
|
|
5720
|
-
helpers:
|
|
5721
|
-
importName: "
|
|
6031
|
+
helpers: accordionHelpers,
|
|
6032
|
+
importName: "accordionHelpers",
|
|
5722
6033
|
importPath: "@plasmicpkgs/antd5/skinny/registerCollapse"
|
|
5723
6034
|
},
|
|
5724
6035
|
importPath: "@plasmicpkgs/antd5/skinny/registerCollapse",
|
|
5725
|
-
importName: "
|
|
6036
|
+
importName: "AntdAccordion"
|
|
5726
6037
|
});
|
|
5727
|
-
registerComponentHelper(loader,
|
|
5728
|
-
name:
|
|
5729
|
-
displayName: "
|
|
5730
|
-
props: {
|
|
6038
|
+
registerComponentHelper(loader, AntdAccordionItem, {
|
|
6039
|
+
name: accordionItemComponentName,
|
|
6040
|
+
displayName: "Accordion Item",
|
|
6041
|
+
props: __spreadValues$3(__spreadValues$3({
|
|
5731
6042
|
id: {
|
|
5732
6043
|
type: "string",
|
|
5733
|
-
description: `Unique identifier for this
|
|
5734
|
-
}
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
6044
|
+
description: `Unique identifier for this item`
|
|
6045
|
+
}
|
|
6046
|
+
}, commonProps), commonAccordionItemProps),
|
|
6047
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerCollapse",
|
|
6048
|
+
importName: "AntdAccordionItem",
|
|
6049
|
+
parentComponentName: accordionComponentName
|
|
6050
|
+
});
|
|
6051
|
+
}
|
|
6052
|
+
|
|
6053
|
+
var __defProp$2 = Object.defineProperty;
|
|
6054
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
6055
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
6056
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
6057
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6058
|
+
var __spreadValues$2 = (a, b) => {
|
|
6059
|
+
for (var prop in b || (b = {}))
|
|
6060
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
6061
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
6062
|
+
if (__getOwnPropSymbols$2)
|
|
6063
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
6064
|
+
if (__propIsEnum$2.call(b, prop))
|
|
6065
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
6066
|
+
}
|
|
6067
|
+
return a;
|
|
6068
|
+
};
|
|
6069
|
+
var __objRest$2 = (source, exclude) => {
|
|
6070
|
+
var target = {};
|
|
6071
|
+
for (var prop in source)
|
|
6072
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
6073
|
+
target[prop] = source[prop];
|
|
6074
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
6075
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
6076
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
6077
|
+
target[prop] = source[prop];
|
|
6078
|
+
}
|
|
6079
|
+
return target;
|
|
6080
|
+
};
|
|
6081
|
+
function AntdPopover(props) {
|
|
6082
|
+
const _a = props, { overlayClassName, popoverScopeClassName, contentText, content } = _a, rest = __objRest$2(_a, ["overlayClassName", "popoverScopeClassName", "contentText", "content"]);
|
|
6083
|
+
return /* @__PURE__ */ React.createElement(
|
|
6084
|
+
Popover,
|
|
6085
|
+
__spreadValues$2({
|
|
6086
|
+
content: content || contentText,
|
|
6087
|
+
overlayClassName: `${overlayClassName} ${popoverScopeClassName}`
|
|
6088
|
+
}, rest)
|
|
6089
|
+
);
|
|
6090
|
+
}
|
|
6091
|
+
function registerPopover(loader) {
|
|
6092
|
+
registerComponentHelper(loader, AntdPopover, {
|
|
6093
|
+
name: "plasmic-antd5-popover",
|
|
6094
|
+
displayName: "Popover",
|
|
6095
|
+
isAttachment: true,
|
|
6096
|
+
props: {
|
|
6097
|
+
open: {
|
|
6098
|
+
type: "boolean",
|
|
6099
|
+
editOnly: true,
|
|
6100
|
+
uncontrolledProp: "defaultOpen",
|
|
6101
|
+
description: "Default open state of the popover"
|
|
5739
6102
|
},
|
|
5740
|
-
|
|
6103
|
+
arrow: {
|
|
5741
6104
|
type: "boolean",
|
|
5742
6105
|
defaultValue: true,
|
|
5743
|
-
description: `Whether to show animating arrow alongside header text`,
|
|
5744
6106
|
advanced: true
|
|
5745
6107
|
},
|
|
5746
|
-
|
|
6108
|
+
children: {
|
|
6109
|
+
type: "slot",
|
|
6110
|
+
defaultValue: "This text element is wrapped in a Popover component",
|
|
6111
|
+
mergeWithParent: true
|
|
6112
|
+
},
|
|
6113
|
+
popoverScopeClassName: {
|
|
6114
|
+
type: "styleScopeClass",
|
|
6115
|
+
scopeName: "popover"
|
|
6116
|
+
},
|
|
6117
|
+
popoverContentClassName: {
|
|
6118
|
+
type: "class",
|
|
6119
|
+
displayName: "Popover content",
|
|
6120
|
+
selectors: [
|
|
6121
|
+
{
|
|
6122
|
+
selector: ":popover.ant-popover .ant-popover-inner",
|
|
6123
|
+
label: "Base"
|
|
6124
|
+
}
|
|
6125
|
+
]
|
|
6126
|
+
},
|
|
6127
|
+
overlayClassName: {
|
|
6128
|
+
type: "class",
|
|
6129
|
+
displayName: "Overlay"
|
|
6130
|
+
},
|
|
6131
|
+
content: {
|
|
6132
|
+
type: "slot",
|
|
6133
|
+
displayName: "Popover contents",
|
|
6134
|
+
defaultValue: "Popover contents",
|
|
6135
|
+
hidePlaceholder: true
|
|
6136
|
+
},
|
|
6137
|
+
/**
|
|
6138
|
+
* NOTE: contentText ensures that the popover shows as a custom behaviour without modifications
|
|
6139
|
+
* (when a random element is given a custom behaviour of Popover, the props of type "slot" do not receive any default value.
|
|
6140
|
+
* Therefore we use the contentText which has a string default value, so that the popover shows with at least something)
|
|
6141
|
+
* */
|
|
6142
|
+
contentText: {
|
|
6143
|
+
type: "string",
|
|
6144
|
+
displayName: "Popover contents",
|
|
6145
|
+
description: "What gets shown inside the popover on hover",
|
|
6146
|
+
defaultValue: "Popover contents"
|
|
6147
|
+
},
|
|
6148
|
+
title: {
|
|
6149
|
+
type: "slot",
|
|
6150
|
+
displayName: "Popover title",
|
|
6151
|
+
hidePlaceholder: true,
|
|
6152
|
+
defaultValue: "Popover title"
|
|
6153
|
+
},
|
|
6154
|
+
color: {
|
|
6155
|
+
type: "color",
|
|
6156
|
+
description: "Popover fill color"
|
|
6157
|
+
},
|
|
6158
|
+
trigger: {
|
|
6159
|
+
type: "choice",
|
|
6160
|
+
options: ["hover", "focus", "click"],
|
|
6161
|
+
defaultValueHint: "hover",
|
|
6162
|
+
advanced: true
|
|
6163
|
+
},
|
|
6164
|
+
placement: {
|
|
6165
|
+
type: "choice",
|
|
6166
|
+
options: [
|
|
6167
|
+
"topLeft",
|
|
6168
|
+
"top",
|
|
6169
|
+
"topRight",
|
|
6170
|
+
"leftTop",
|
|
6171
|
+
"left",
|
|
6172
|
+
"leftBottom",
|
|
6173
|
+
"rightTop",
|
|
6174
|
+
"right",
|
|
6175
|
+
"rightBottom",
|
|
6176
|
+
"bottomLeft",
|
|
6177
|
+
"bottom",
|
|
6178
|
+
"bottomRight"
|
|
6179
|
+
],
|
|
6180
|
+
description: "Default placement of popover",
|
|
6181
|
+
defaultValueHint: "top"
|
|
6182
|
+
},
|
|
6183
|
+
mouseEnterDelay: {
|
|
6184
|
+
type: "number",
|
|
6185
|
+
description: "Delay in seconds, before popover is shown on mouse enter",
|
|
6186
|
+
defaultValue: 0,
|
|
6187
|
+
advanced: true
|
|
6188
|
+
},
|
|
6189
|
+
mouseLeaveDelay: {
|
|
6190
|
+
type: "number",
|
|
6191
|
+
description: "Delay in seconds, before popover is hidden on mouse leave",
|
|
6192
|
+
defaultValue: 0,
|
|
6193
|
+
advanced: true
|
|
6194
|
+
},
|
|
6195
|
+
onOpenChange: {
|
|
6196
|
+
type: "eventHandler",
|
|
6197
|
+
argTypes: [{ name: "open", type: "boolean" }],
|
|
6198
|
+
advanced: true
|
|
6199
|
+
}
|
|
6200
|
+
},
|
|
6201
|
+
states: {
|
|
6202
|
+
open: {
|
|
6203
|
+
type: "writable",
|
|
6204
|
+
valueProp: "open",
|
|
6205
|
+
onChangeProp: "onOpenChange",
|
|
6206
|
+
variableType: "boolean"
|
|
6207
|
+
}
|
|
6208
|
+
},
|
|
6209
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerPopover",
|
|
6210
|
+
importName: "AntdPopover"
|
|
6211
|
+
});
|
|
6212
|
+
}
|
|
6213
|
+
|
|
6214
|
+
var __defProp$1 = Object.defineProperty;
|
|
6215
|
+
var __defProps = Object.defineProperties;
|
|
6216
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6217
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
6218
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
6219
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
6220
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6221
|
+
var __spreadValues$1 = (a, b) => {
|
|
6222
|
+
for (var prop in b || (b = {}))
|
|
6223
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
6224
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
6225
|
+
if (__getOwnPropSymbols$1)
|
|
6226
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
6227
|
+
if (__propIsEnum$1.call(b, prop))
|
|
6228
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
6229
|
+
}
|
|
6230
|
+
return a;
|
|
6231
|
+
};
|
|
6232
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
6233
|
+
var __objRest$1 = (source, exclude) => {
|
|
6234
|
+
var target = {};
|
|
6235
|
+
for (var prop in source)
|
|
6236
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
6237
|
+
target[prop] = source[prop];
|
|
6238
|
+
if (source != null && __getOwnPropSymbols$1)
|
|
6239
|
+
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
6240
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
6241
|
+
target[prop] = source[prop];
|
|
6242
|
+
}
|
|
6243
|
+
return target;
|
|
6244
|
+
};
|
|
6245
|
+
const tabsComponentName = "plasmic-antd5-tabs";
|
|
6246
|
+
const tabItemComponentName = "plasmic-antd5-tab-item";
|
|
6247
|
+
const AntdTabItem = ({ children }) => {
|
|
6248
|
+
return /* @__PURE__ */ React.createElement("div", null, children);
|
|
6249
|
+
};
|
|
6250
|
+
function getTabItems(items) {
|
|
6251
|
+
var _a;
|
|
6252
|
+
if ((items == null ? void 0 : items.type) === AntdTabItem) {
|
|
6253
|
+
return [items];
|
|
6254
|
+
}
|
|
6255
|
+
if (Array.isArray((_a = items == null ? void 0 : items.props) == null ? void 0 : _a.children)) {
|
|
6256
|
+
return items.props.children.filter((item) => item.type === AntdTabItem);
|
|
6257
|
+
}
|
|
6258
|
+
return [];
|
|
6259
|
+
}
|
|
6260
|
+
function AntdTabs(props) {
|
|
6261
|
+
const _a = props, {
|
|
6262
|
+
items: itemsRaw,
|
|
6263
|
+
animated,
|
|
6264
|
+
animateTabBar,
|
|
6265
|
+
animateTabContent,
|
|
6266
|
+
tabBarExtraContentLeft,
|
|
6267
|
+
tabBarExtraContentRight,
|
|
6268
|
+
sticky,
|
|
6269
|
+
stickyOffset,
|
|
6270
|
+
tabBarBackground,
|
|
6271
|
+
className,
|
|
6272
|
+
tabPosition,
|
|
6273
|
+
tabsScopeClassName,
|
|
6274
|
+
tabsDropdownScopeClassName
|
|
6275
|
+
} = _a, rest = __objRest$1(_a, [
|
|
6276
|
+
"items",
|
|
6277
|
+
"animated",
|
|
6278
|
+
"animateTabBar",
|
|
6279
|
+
"animateTabContent",
|
|
6280
|
+
"tabBarExtraContentLeft",
|
|
6281
|
+
"tabBarExtraContentRight",
|
|
6282
|
+
"sticky",
|
|
6283
|
+
"stickyOffset",
|
|
6284
|
+
"tabBarBackground",
|
|
6285
|
+
"className",
|
|
6286
|
+
"tabPosition",
|
|
6287
|
+
"tabsScopeClassName",
|
|
6288
|
+
"tabsDropdownScopeClassName"
|
|
6289
|
+
]);
|
|
6290
|
+
const animationProp = useMemo(
|
|
6291
|
+
() => animated ? {
|
|
6292
|
+
inkBar: animateTabBar,
|
|
6293
|
+
tabPane: animateTabContent
|
|
6294
|
+
} : false,
|
|
6295
|
+
[animateTabBar, animateTabContent, animated]
|
|
6296
|
+
);
|
|
6297
|
+
const items = useMemo(() => {
|
|
6298
|
+
if (!React.isValidElement(itemsRaw))
|
|
6299
|
+
return [];
|
|
6300
|
+
const tabItems = getTabItems(itemsRaw);
|
|
6301
|
+
return tabItems.map((currentItem) => {
|
|
6302
|
+
if (!React.isValidElement(currentItem) || !React.isValidElement(currentItem.props.children)) {
|
|
6303
|
+
return null;
|
|
6304
|
+
}
|
|
6305
|
+
return __spreadProps(__spreadValues$1({}, currentItem.props), {
|
|
6306
|
+
key: currentItem.key,
|
|
6307
|
+
children: /* @__PURE__ */ React.createElement(React.Fragment, null, currentItem.props.children)
|
|
6308
|
+
});
|
|
6309
|
+
}).filter((i) => i != null);
|
|
6310
|
+
}, [itemsRaw]);
|
|
6311
|
+
return /* @__PURE__ */ React.createElement(
|
|
6312
|
+
Tabs,
|
|
6313
|
+
__spreadValues$1({
|
|
6314
|
+
className: `${className} ${tabsScopeClassName}`,
|
|
6315
|
+
popupClassName: tabsDropdownScopeClassName,
|
|
6316
|
+
tabBarExtraContent: {
|
|
6317
|
+
left: /* @__PURE__ */ React.createElement(React.Fragment, null, tabBarExtraContentLeft),
|
|
6318
|
+
right: /* @__PURE__ */ React.createElement(React.Fragment, null, tabBarExtraContentRight)
|
|
6319
|
+
},
|
|
6320
|
+
tabPosition,
|
|
6321
|
+
renderTabBar: sticky && tabPosition === "top" ? (props2, DefaultTabBar) => /* @__PURE__ */ React.createElement(
|
|
6322
|
+
"div",
|
|
6323
|
+
{
|
|
6324
|
+
style: {
|
|
6325
|
+
zIndex: 1,
|
|
6326
|
+
position: "sticky",
|
|
6327
|
+
top: stickyOffset || 0
|
|
6328
|
+
}
|
|
6329
|
+
},
|
|
6330
|
+
/* @__PURE__ */ React.createElement(
|
|
6331
|
+
DefaultTabBar,
|
|
6332
|
+
__spreadProps(__spreadValues$1({}, props2), {
|
|
6333
|
+
style: { backgroundColor: tabBarBackground }
|
|
6334
|
+
})
|
|
6335
|
+
)
|
|
6336
|
+
) : void 0,
|
|
6337
|
+
animated: animationProp,
|
|
6338
|
+
items
|
|
6339
|
+
}, rest)
|
|
6340
|
+
);
|
|
6341
|
+
}
|
|
6342
|
+
function OutlineMessage() {
|
|
6343
|
+
return /* @__PURE__ */ React.createElement("div", null, "* To re-arrange tab panes, use the Outline panel");
|
|
6344
|
+
}
|
|
6345
|
+
function getActiveKeyOptions(props) {
|
|
6346
|
+
const options = /* @__PURE__ */ new Set();
|
|
6347
|
+
traverseReactEltTree(getTabItems(props.items), (elt) => {
|
|
6348
|
+
if ((elt == null ? void 0 : elt.type) === AntdTabItem && typeof (elt == null ? void 0 : elt.key) === "string") {
|
|
6349
|
+
options.add(elt.key);
|
|
6350
|
+
}
|
|
6351
|
+
});
|
|
6352
|
+
return Array.from(options.keys());
|
|
6353
|
+
}
|
|
6354
|
+
function registerTabs(loader) {
|
|
6355
|
+
registerComponentHelper(loader, AntdTabs, {
|
|
6356
|
+
name: tabsComponentName,
|
|
6357
|
+
displayName: "Tabs",
|
|
6358
|
+
defaultStyles: {
|
|
6359
|
+
width: "stretch",
|
|
6360
|
+
overflow: "scroll"
|
|
6361
|
+
},
|
|
6362
|
+
props: {
|
|
6363
|
+
activeKey: {
|
|
6364
|
+
editOnly: true,
|
|
6365
|
+
displayName: "Active tab key",
|
|
6366
|
+
uncontrolledProp: "defaultActiveKey",
|
|
6367
|
+
type: "choice",
|
|
6368
|
+
description: `Initial active tab's key`,
|
|
6369
|
+
options: getActiveKeyOptions
|
|
6370
|
+
},
|
|
6371
|
+
animated: {
|
|
6372
|
+
type: "boolean",
|
|
6373
|
+
defaultValue: true,
|
|
6374
|
+
description: "Change tabs with animation"
|
|
6375
|
+
},
|
|
6376
|
+
animateTabBar: {
|
|
6377
|
+
type: "boolean",
|
|
6378
|
+
defaultValue: true,
|
|
6379
|
+
description: "Animate the tab bar when switching tabs",
|
|
6380
|
+
hidden: (ps) => !ps.animated
|
|
6381
|
+
},
|
|
6382
|
+
animateTabContent: {
|
|
6383
|
+
type: "boolean",
|
|
6384
|
+
defaultValue: false,
|
|
6385
|
+
description: "Fade-in tab content when switching tabs",
|
|
6386
|
+
hidden: (ps) => !ps.animated
|
|
6387
|
+
},
|
|
6388
|
+
centered: {
|
|
6389
|
+
type: "boolean",
|
|
6390
|
+
description: "Center-align the tab bar"
|
|
6391
|
+
},
|
|
6392
|
+
type: {
|
|
6393
|
+
type: "choice",
|
|
6394
|
+
defaultValueHint: "line",
|
|
6395
|
+
options: ["line", "card"],
|
|
6396
|
+
description: "Basic style of tabs"
|
|
6397
|
+
},
|
|
6398
|
+
items: __spreadProps(__spreadValues$1({
|
|
6399
|
+
type: "slot",
|
|
6400
|
+
hidePlaceholder: true,
|
|
6401
|
+
allowedComponents: [tabItemComponentName]
|
|
6402
|
+
}, { mergeWithParent: true }), {
|
|
6403
|
+
// to make the tab items selectable from the components outline pane in Plasmic Studio.
|
|
6404
|
+
defaultValue: [
|
|
6405
|
+
{
|
|
6406
|
+
type: "component",
|
|
6407
|
+
name: tabItemComponentName,
|
|
6408
|
+
props: {
|
|
6409
|
+
key: "1",
|
|
6410
|
+
label: {
|
|
6411
|
+
type: "text",
|
|
6412
|
+
value: "First Item"
|
|
6413
|
+
},
|
|
6414
|
+
children: {
|
|
6415
|
+
type: "text",
|
|
6416
|
+
value: "First Children"
|
|
6417
|
+
}
|
|
6418
|
+
}
|
|
6419
|
+
},
|
|
6420
|
+
{
|
|
6421
|
+
type: "component",
|
|
6422
|
+
name: tabItemComponentName,
|
|
6423
|
+
props: {
|
|
6424
|
+
key: "2",
|
|
6425
|
+
label: {
|
|
6426
|
+
type: "text",
|
|
6427
|
+
value: "Second Item"
|
|
6428
|
+
},
|
|
6429
|
+
children: {
|
|
6430
|
+
type: "text",
|
|
6431
|
+
value: "Second Children"
|
|
6432
|
+
}
|
|
6433
|
+
}
|
|
6434
|
+
}
|
|
6435
|
+
]
|
|
6436
|
+
}),
|
|
6437
|
+
size: {
|
|
6438
|
+
type: "choice",
|
|
6439
|
+
defaultValueHint: "middle",
|
|
6440
|
+
options: ["large", "middle", "small"],
|
|
6441
|
+
description: "Preset tab bar size"
|
|
6442
|
+
},
|
|
6443
|
+
tabBarExtraContentLeft: {
|
|
6444
|
+
type: "slot",
|
|
6445
|
+
displayName: "Extra content on left side",
|
|
6446
|
+
hidePlaceholder: true
|
|
6447
|
+
},
|
|
6448
|
+
tabBarExtraContentRight: {
|
|
6449
|
+
type: "slot",
|
|
6450
|
+
displayName: "Extra content on right side",
|
|
6451
|
+
hidePlaceholder: true
|
|
6452
|
+
},
|
|
6453
|
+
tabBarGutter: {
|
|
6454
|
+
type: "number",
|
|
6455
|
+
displayName: "Tab gap",
|
|
6456
|
+
description: "Gap (in pixels) between tabs",
|
|
6457
|
+
advanced: true
|
|
6458
|
+
},
|
|
6459
|
+
tabPosition: {
|
|
6460
|
+
type: "choice",
|
|
6461
|
+
defaultValueHint: "top",
|
|
6462
|
+
options: ["top", "right", "bottom", "left"],
|
|
6463
|
+
description: "Position of tabs"
|
|
6464
|
+
},
|
|
6465
|
+
destroyInactiveTabPane: {
|
|
5747
6466
|
type: "boolean",
|
|
5748
|
-
description: `Destroy/Unmount
|
|
6467
|
+
description: `Destroy/Unmount inactive tab pane when changing tab`,
|
|
5749
6468
|
advanced: true
|
|
5750
6469
|
},
|
|
6470
|
+
sticky: {
|
|
6471
|
+
type: "boolean",
|
|
6472
|
+
advanced: true,
|
|
6473
|
+
description: "Stick tab bar to the top of the page when scrolling.",
|
|
6474
|
+
defaultValue: false,
|
|
6475
|
+
hidden: (ps) => ps.tabPosition !== "top"
|
|
6476
|
+
},
|
|
6477
|
+
stickyOffset: {
|
|
6478
|
+
type: "number",
|
|
6479
|
+
advanced: true,
|
|
6480
|
+
description: "Distance (in pixels) between the sticky tab bar and the top of the page as you scroll.",
|
|
6481
|
+
hidden: (ps) => ps.tabPosition !== "top" || !ps.sticky
|
|
6482
|
+
},
|
|
6483
|
+
tabBarBackground: {
|
|
6484
|
+
type: "color",
|
|
6485
|
+
advanced: true,
|
|
6486
|
+
defaultValue: "#FFF",
|
|
6487
|
+
hidden: (ps) => ps.tabPosition !== "top" || !ps.sticky
|
|
6488
|
+
},
|
|
6489
|
+
tabsScopeClassName: {
|
|
6490
|
+
type: "styleScopeClass",
|
|
6491
|
+
scopeName: "tabs"
|
|
6492
|
+
},
|
|
6493
|
+
tabBarClassName: {
|
|
6494
|
+
type: "class",
|
|
6495
|
+
displayName: "Tab bar",
|
|
6496
|
+
selectors: [
|
|
6497
|
+
{
|
|
6498
|
+
selector: ":tabs.ant-tabs .ant-tabs-nav",
|
|
6499
|
+
label: "Base"
|
|
6500
|
+
}
|
|
6501
|
+
]
|
|
6502
|
+
},
|
|
6503
|
+
tabsDropdownScopeClassName: {
|
|
6504
|
+
type: "styleScopeClass",
|
|
6505
|
+
scopeName: "tabsDropdown"
|
|
6506
|
+
},
|
|
6507
|
+
tabsDropdownClassName: {
|
|
6508
|
+
type: "class",
|
|
6509
|
+
displayName: "Overflow tabs menu",
|
|
6510
|
+
selectors: [
|
|
6511
|
+
{
|
|
6512
|
+
selector: ":tabsDropdown.ant-tabs-dropdown .ant-tabs-dropdown-menu",
|
|
6513
|
+
label: "Base"
|
|
6514
|
+
}
|
|
6515
|
+
]
|
|
6516
|
+
},
|
|
6517
|
+
onChange: {
|
|
6518
|
+
type: "eventHandler",
|
|
6519
|
+
advanced: true,
|
|
6520
|
+
argTypes: [{ name: "activeKey", type: "string" }]
|
|
6521
|
+
},
|
|
6522
|
+
onTabClick: {
|
|
6523
|
+
type: "eventHandler",
|
|
6524
|
+
advanced: true,
|
|
6525
|
+
argTypes: [
|
|
6526
|
+
{ name: "tabKey", type: "string" },
|
|
6527
|
+
{ name: "mouseEvent", type: "object" }
|
|
6528
|
+
]
|
|
6529
|
+
},
|
|
6530
|
+
onTabScroll: {
|
|
6531
|
+
type: "eventHandler",
|
|
6532
|
+
advanced: true,
|
|
6533
|
+
argTypes: [{ name: "scrollInfo", type: "object" }]
|
|
6534
|
+
}
|
|
6535
|
+
},
|
|
6536
|
+
states: {
|
|
6537
|
+
activeKey: {
|
|
6538
|
+
type: "writable",
|
|
6539
|
+
valueProp: "activeKey",
|
|
6540
|
+
onChangeProp: "onChange",
|
|
6541
|
+
variableType: "text"
|
|
6542
|
+
}
|
|
6543
|
+
},
|
|
6544
|
+
actions: [
|
|
6545
|
+
// {
|
|
6546
|
+
// type: "custom-action",
|
|
6547
|
+
// control: NavigateTabs,
|
|
6548
|
+
// },
|
|
6549
|
+
{
|
|
6550
|
+
type: "button-action",
|
|
6551
|
+
label: "Add new tab",
|
|
6552
|
+
onClick: ({ componentProps, studioOps }) => {
|
|
6553
|
+
const generateNewKey = () => {
|
|
6554
|
+
const keysSet = /* @__PURE__ */ new Set();
|
|
6555
|
+
traverseReactEltTree(getTabItems(componentProps.items), (elt) => {
|
|
6556
|
+
if ((elt == null ? void 0 : elt.type) === AntdTabItem && typeof (elt == null ? void 0 : elt.key) === "string") {
|
|
6557
|
+
keysSet.add(elt.key);
|
|
6558
|
+
}
|
|
6559
|
+
});
|
|
6560
|
+
for (let keyCandidate = 1; keyCandidate <= keysSet.size + 1; keyCandidate++) {
|
|
6561
|
+
const strKey = keyCandidate.toString();
|
|
6562
|
+
if (!keysSet.has(strKey)) {
|
|
6563
|
+
return strKey;
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
return void 0;
|
|
6567
|
+
};
|
|
6568
|
+
const tabKey = generateNewKey();
|
|
6569
|
+
studioOps.appendToSlot(
|
|
6570
|
+
{
|
|
6571
|
+
type: "component",
|
|
6572
|
+
name: tabItemComponentName,
|
|
6573
|
+
props: {
|
|
6574
|
+
key: tabKey,
|
|
6575
|
+
label: {
|
|
6576
|
+
type: "text",
|
|
6577
|
+
value: `Tab Label ${tabKey}`
|
|
6578
|
+
},
|
|
6579
|
+
children: {
|
|
6580
|
+
type: "text",
|
|
6581
|
+
value: `Tab Children ${tabKey}`
|
|
6582
|
+
}
|
|
6583
|
+
}
|
|
6584
|
+
},
|
|
6585
|
+
"items"
|
|
6586
|
+
);
|
|
6587
|
+
studioOps.updateProps({ activeKey: tabKey });
|
|
6588
|
+
}
|
|
6589
|
+
},
|
|
6590
|
+
{
|
|
6591
|
+
type: "button-action",
|
|
6592
|
+
label: "Delete current tab",
|
|
6593
|
+
onClick: ({ componentProps, studioOps }) => {
|
|
6594
|
+
if (componentProps.activeKey) {
|
|
6595
|
+
const tabPanes = [];
|
|
6596
|
+
traverseReactEltTree(getTabItems(componentProps.items), (elt) => {
|
|
6597
|
+
if ((elt == null ? void 0 : elt.type) === AntdTabItem && typeof (elt == null ? void 0 : elt.key) === "string") {
|
|
6598
|
+
tabPanes.push(elt.key);
|
|
6599
|
+
}
|
|
6600
|
+
});
|
|
6601
|
+
const activeKey = componentProps.activeKey;
|
|
6602
|
+
const currTabPos = tabPanes.findIndex((tabKey) => {
|
|
6603
|
+
return tabKey === activeKey;
|
|
6604
|
+
});
|
|
6605
|
+
if (currTabPos !== -1) {
|
|
6606
|
+
studioOps.removeFromSlotAt(currTabPos, "items");
|
|
6607
|
+
if (tabPanes.length - 1 > 0) {
|
|
6608
|
+
const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
|
|
6609
|
+
studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
|
|
6610
|
+
}
|
|
6611
|
+
}
|
|
6612
|
+
}
|
|
6613
|
+
}
|
|
6614
|
+
},
|
|
6615
|
+
{
|
|
6616
|
+
type: "custom-action",
|
|
6617
|
+
control: OutlineMessage
|
|
6618
|
+
}
|
|
6619
|
+
],
|
|
6620
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTabs",
|
|
6621
|
+
importName: "AntdTabs"
|
|
6622
|
+
});
|
|
6623
|
+
registerComponentHelper(loader, AntdTabItem, {
|
|
6624
|
+
name: tabItemComponentName,
|
|
6625
|
+
displayName: "Tab Item",
|
|
6626
|
+
props: {
|
|
6627
|
+
disabled: {
|
|
6628
|
+
type: "boolean",
|
|
6629
|
+
description: "Disable this tab"
|
|
6630
|
+
},
|
|
5751
6631
|
forceRender: {
|
|
5752
6632
|
type: "boolean",
|
|
5753
|
-
description: `Force
|
|
6633
|
+
description: `Force render of content in the tab, not lazy render after clicking on the tab`,
|
|
5754
6634
|
advanced: true
|
|
5755
6635
|
},
|
|
5756
|
-
|
|
6636
|
+
key: {
|
|
6637
|
+
type: "string",
|
|
6638
|
+
description: `Unique identifier for this tab`,
|
|
6639
|
+
displayName: "Tab key"
|
|
6640
|
+
},
|
|
6641
|
+
label: {
|
|
6642
|
+
type: "slot",
|
|
6643
|
+
displayName: "Tab title",
|
|
6644
|
+
defaultValue: "Tab"
|
|
6645
|
+
},
|
|
6646
|
+
children: {
|
|
5757
6647
|
type: "slot",
|
|
5758
6648
|
hidePlaceholder: true
|
|
6649
|
+
}
|
|
6650
|
+
},
|
|
6651
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerTabs",
|
|
6652
|
+
importName: "AntdTabItem",
|
|
6653
|
+
parentComponentName: tabsComponentName
|
|
6654
|
+
});
|
|
6655
|
+
}
|
|
6656
|
+
|
|
6657
|
+
var __defProp = Object.defineProperty;
|
|
6658
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6659
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6660
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6661
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6662
|
+
var __spreadValues = (a, b) => {
|
|
6663
|
+
for (var prop in b || (b = {}))
|
|
6664
|
+
if (__hasOwnProp.call(b, prop))
|
|
6665
|
+
__defNormalProp(a, prop, b[prop]);
|
|
6666
|
+
if (__getOwnPropSymbols)
|
|
6667
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
6668
|
+
if (__propIsEnum.call(b, prop))
|
|
6669
|
+
__defNormalProp(a, prop, b[prop]);
|
|
6670
|
+
}
|
|
6671
|
+
return a;
|
|
6672
|
+
};
|
|
6673
|
+
var __objRest = (source, exclude) => {
|
|
6674
|
+
var target = {};
|
|
6675
|
+
for (var prop in source)
|
|
6676
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
6677
|
+
target[prop] = source[prop];
|
|
6678
|
+
if (source != null && __getOwnPropSymbols)
|
|
6679
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
6680
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
6681
|
+
target[prop] = source[prop];
|
|
6682
|
+
}
|
|
6683
|
+
return target;
|
|
6684
|
+
};
|
|
6685
|
+
function AntdRate(props) {
|
|
6686
|
+
const _a = props, { character, count, tooltips, multiCharacter, symbols } = _a, rest = __objRest(_a, ["character", "count", "tooltips", "multiCharacter", "symbols"]);
|
|
6687
|
+
const symbolsProp = useMemo(
|
|
6688
|
+
() => {
|
|
6689
|
+
var _a2, _b, _c;
|
|
6690
|
+
return ((_c = Array.isArray((_a2 = symbols == null ? void 0 : symbols.props) == null ? void 0 : _a2.children) ? (_b = symbols == null ? void 0 : symbols.props) == null ? void 0 : _b.children : [symbols]) == null ? void 0 : _c.filter((c) => React.isValidElement(c)).map((c) => /* @__PURE__ */ React.createElement(React.Fragment, null, c))) || [];
|
|
6691
|
+
},
|
|
6692
|
+
[symbols]
|
|
6693
|
+
);
|
|
6694
|
+
const countProp = useMemo(() => {
|
|
6695
|
+
if (!multiCharacter)
|
|
6696
|
+
return count;
|
|
6697
|
+
return symbolsProp == null ? void 0 : symbolsProp.length;
|
|
6698
|
+
}, [count, multiCharacter, symbolsProp == null ? void 0 : symbolsProp.length]);
|
|
6699
|
+
const characterProp = useMemo(() => {
|
|
6700
|
+
if (!multiCharacter)
|
|
6701
|
+
return character || void 0;
|
|
6702
|
+
return (symbolsProp == null ? void 0 : symbolsProp.length) ? ({ index }) => symbolsProp[index] : character || void 0;
|
|
6703
|
+
}, [character, multiCharacter, symbolsProp]);
|
|
6704
|
+
return /* @__PURE__ */ React.createElement(
|
|
6705
|
+
Rate,
|
|
6706
|
+
__spreadValues({
|
|
6707
|
+
tooltips: tooltips == null ? void 0 : tooltips.map((t) => t == null ? void 0 : t.label),
|
|
6708
|
+
count: countProp,
|
|
6709
|
+
character: characterProp
|
|
6710
|
+
}, rest)
|
|
6711
|
+
);
|
|
6712
|
+
}
|
|
6713
|
+
const rateComponentName = "plasmic-antd5-rate";
|
|
6714
|
+
function registerRate(loader) {
|
|
6715
|
+
registerComponentHelper(loader, AntdRate, {
|
|
6716
|
+
name: rateComponentName,
|
|
6717
|
+
displayName: "Rate",
|
|
6718
|
+
props: {
|
|
6719
|
+
allowClear: {
|
|
6720
|
+
type: "boolean",
|
|
6721
|
+
advanced: true,
|
|
6722
|
+
defaultValueHint: true,
|
|
6723
|
+
description: "Clear the rating when the user clicks again"
|
|
6724
|
+
},
|
|
6725
|
+
allowHalf: {
|
|
6726
|
+
type: "boolean",
|
|
6727
|
+
advanced: true,
|
|
6728
|
+
defaultValueHint: false,
|
|
6729
|
+
description: "Allow fractional rating."
|
|
5759
6730
|
},
|
|
5760
|
-
|
|
6731
|
+
autoFocus: {
|
|
5761
6732
|
type: "boolean",
|
|
6733
|
+
description: "Focus when component is rendered",
|
|
6734
|
+
defaultValueHint: false,
|
|
5762
6735
|
advanced: true
|
|
5763
6736
|
},
|
|
5764
|
-
|
|
6737
|
+
character: {
|
|
5765
6738
|
type: "slot",
|
|
5766
|
-
|
|
6739
|
+
displayName: "Symbol",
|
|
6740
|
+
hidePlaceholder: true,
|
|
6741
|
+
hidden: (ps) => Boolean(ps.multiCharacter)
|
|
6742
|
+
},
|
|
6743
|
+
multiCharacter: {
|
|
6744
|
+
type: "boolean",
|
|
6745
|
+
displayName: "Multi Symbol",
|
|
6746
|
+
description: "Allow different symbols for rating. (You can add these symbols in the component slots if this is enabled)",
|
|
6747
|
+
advanced: true
|
|
6748
|
+
},
|
|
6749
|
+
symbols: {
|
|
6750
|
+
type: "slot",
|
|
6751
|
+
displayName: "Symbols",
|
|
6752
|
+
hidePlaceholder: true,
|
|
6753
|
+
defaultValue: ["1", "2", "3", "4", "5"],
|
|
6754
|
+
hidden: (ps) => !ps.multiCharacter
|
|
6755
|
+
},
|
|
6756
|
+
count: {
|
|
6757
|
+
type: "number",
|
|
6758
|
+
description: "Rating count",
|
|
6759
|
+
defaultValueHint: 5,
|
|
6760
|
+
advanced: true,
|
|
6761
|
+
hidden: (ps) => Boolean(ps.multiCharacter)
|
|
6762
|
+
},
|
|
6763
|
+
value: {
|
|
6764
|
+
type: "number",
|
|
6765
|
+
editOnly: true,
|
|
6766
|
+
uncontrolledProp: "defaultValue",
|
|
6767
|
+
description: "Default rating",
|
|
6768
|
+
defaultValueHint: 0
|
|
6769
|
+
},
|
|
6770
|
+
disabled: {
|
|
6771
|
+
type: "boolean",
|
|
6772
|
+
description: "Read-only rating",
|
|
6773
|
+
defaultValueHint: false
|
|
6774
|
+
},
|
|
6775
|
+
tooltips: {
|
|
6776
|
+
type: "array",
|
|
6777
|
+
description: "Rating labels",
|
|
6778
|
+
displayName: "Labels",
|
|
6779
|
+
advanced: true,
|
|
6780
|
+
hidden: (ps) => !ps.count,
|
|
6781
|
+
itemType: {
|
|
6782
|
+
type: "object",
|
|
6783
|
+
fields: {
|
|
6784
|
+
label: "string"
|
|
6785
|
+
},
|
|
6786
|
+
nameFunc: (value) => value.label
|
|
6787
|
+
},
|
|
6788
|
+
validator: (value, ps) => {
|
|
6789
|
+
if (!ps.count)
|
|
6790
|
+
return true;
|
|
6791
|
+
if (!Array.isArray(value) || value.length === 0)
|
|
6792
|
+
return true;
|
|
6793
|
+
if (value.length < ps.count)
|
|
6794
|
+
return `You need ${ps.count - value.length} more labels`;
|
|
6795
|
+
if (value.length > ps.count)
|
|
6796
|
+
return "You have too many labels. Some labels will not be used";
|
|
6797
|
+
return true;
|
|
6798
|
+
}
|
|
6799
|
+
},
|
|
6800
|
+
onChange: {
|
|
6801
|
+
type: "eventHandler",
|
|
6802
|
+
advanced: true,
|
|
6803
|
+
argTypes: [{ name: "value", type: "number" }]
|
|
6804
|
+
},
|
|
6805
|
+
onBlur: {
|
|
6806
|
+
type: "eventHandler",
|
|
6807
|
+
advanced: true,
|
|
6808
|
+
argTypes: []
|
|
6809
|
+
},
|
|
6810
|
+
onFocus: {
|
|
6811
|
+
type: "eventHandler",
|
|
6812
|
+
advanced: true,
|
|
6813
|
+
argTypes: []
|
|
6814
|
+
},
|
|
6815
|
+
onHoverChange: {
|
|
6816
|
+
type: "eventHandler",
|
|
6817
|
+
advanced: true,
|
|
6818
|
+
description: "Callback when an item is hovered",
|
|
6819
|
+
argTypes: []
|
|
6820
|
+
},
|
|
6821
|
+
onKeyDown: {
|
|
6822
|
+
type: "eventHandler",
|
|
6823
|
+
advanced: true,
|
|
6824
|
+
argTypes: [{ name: "event", type: "object" }]
|
|
5767
6825
|
}
|
|
5768
6826
|
},
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
6827
|
+
states: {
|
|
6828
|
+
value: {
|
|
6829
|
+
type: "writable",
|
|
6830
|
+
valueProp: "value",
|
|
6831
|
+
onChangeProp: "onChange",
|
|
6832
|
+
variableType: "number"
|
|
6833
|
+
}
|
|
6834
|
+
},
|
|
6835
|
+
importPath: "@plasmicpkgs/antd5/skinny/registerRate",
|
|
6836
|
+
importName: "AntdRate"
|
|
5772
6837
|
});
|
|
5773
6838
|
}
|
|
5774
6839
|
|
|
@@ -5803,6 +6868,9 @@ function registerAll(loader) {
|
|
|
5803
6868
|
registerTree(loader);
|
|
5804
6869
|
registerDirectoryTree(loader);
|
|
5805
6870
|
registerCollapse(loader);
|
|
6871
|
+
registerPopover(loader);
|
|
6872
|
+
registerTabs(loader);
|
|
6873
|
+
registerRate(loader);
|
|
5806
6874
|
}
|
|
5807
6875
|
const componentNameToInputType = {
|
|
5808
6876
|
[inputComponentName]: InputType.Text,
|