@plasmicpkgs/antd 2.0.19 → 2.0.21

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.
Files changed (79) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/antd.esm.js +703 -616
  3. package/dist/antd.esm.js.map +1 -1
  4. package/dist/customControls.d.ts +17 -17
  5. package/dist/index.d.ts +16 -16
  6. package/dist/index.js +2352 -5
  7. package/dist/index.js.map +1 -0
  8. package/dist/registerButton.d.ts +5 -5
  9. package/dist/registerCarousel.d.ts +5 -5
  10. package/dist/registerCheckbox.d.ts +8 -8
  11. package/dist/registerCollapse.d.ts +14 -14
  12. package/dist/registerDropdown.d.ts +11 -11
  13. package/dist/registerInput.d.ts +14 -14
  14. package/dist/registerMenu.d.ts +15 -15
  15. package/dist/registerOption.d.ts +8 -8
  16. package/dist/registerRate.d.ts +5 -5
  17. package/dist/registerSelect.d.ts +8 -8
  18. package/dist/registerSlider.d.ts +19 -19
  19. package/dist/registerSwitch.d.ts +5 -5
  20. package/dist/registerTable.d.ts +30 -30
  21. package/dist/registerTabs.d.ts +14 -13
  22. package/dist/registerable.d.ts +4 -4
  23. package/package.json +10 -9
  24. package/skinny/customControls-fb0b7e5f.js +22 -0
  25. package/skinny/{customControls-ff79afdf.js.map → customControls-fb0b7e5f.js.map} +1 -1
  26. package/skinny/customControls.d.ts +17 -17
  27. package/skinny/registerButton.d.ts +5 -5
  28. package/skinny/registerButton.js +80 -81
  29. package/skinny/registerButton.js.map +1 -1
  30. package/skinny/registerCarousel.d.ts +5 -5
  31. package/skinny/registerCarousel.js +66 -67
  32. package/skinny/registerCarousel.js.map +1 -1
  33. package/skinny/registerCheckbox.d.ts +8 -8
  34. package/skinny/registerCheckbox.js +125 -121
  35. package/skinny/registerCheckbox.js.map +1 -1
  36. package/skinny/registerCollapse.d.ts +14 -14
  37. package/skinny/registerCollapse.js +174 -153
  38. package/skinny/registerCollapse.js.map +1 -1
  39. package/skinny/registerDropdown.d.ts +11 -11
  40. package/skinny/registerDropdown.js +175 -171
  41. package/skinny/registerDropdown.js.map +1 -1
  42. package/skinny/registerInput.d.ts +14 -14
  43. package/skinny/registerInput.js +362 -312
  44. package/skinny/registerInput.js.map +1 -1
  45. package/skinny/registerMenu.d.ts +15 -15
  46. package/skinny/registerMenu.js +275 -298
  47. package/skinny/registerMenu.js.map +1 -1
  48. package/skinny/registerOption.d.ts +8 -8
  49. package/skinny/registerOption.js +73 -81
  50. package/skinny/registerOption.js.map +1 -1
  51. package/skinny/registerRate.d.ts +5 -5
  52. package/skinny/registerRate.js +66 -0
  53. package/skinny/registerRate.js.map +1 -0
  54. package/skinny/registerSelect.d.ts +8 -8
  55. package/skinny/registerSelect.js +129 -130
  56. package/skinny/registerSelect.js.map +1 -1
  57. package/skinny/registerSlider.d.ts +19 -19
  58. package/skinny/registerSlider.js +132 -104
  59. package/skinny/registerSlider.js.map +1 -1
  60. package/skinny/registerSwitch.d.ts +5 -5
  61. package/skinny/registerSwitch.js +55 -56
  62. package/skinny/registerSwitch.js.map +1 -1
  63. package/skinny/registerTable.d.ts +30 -30
  64. package/skinny/registerTable.js +202 -183
  65. package/skinny/registerTable.js.map +1 -1
  66. package/skinny/registerTabs.d.ts +14 -13
  67. package/skinny/registerTabs.js +344 -311
  68. package/skinny/registerTabs.js.map +1 -1
  69. package/skinny/registerable.d.ts +4 -4
  70. package/skinny/registerable.js +3 -0
  71. package/skinny/registerable.js.map +1 -0
  72. package/dist/antd.cjs.development.js +0 -2243
  73. package/dist/antd.cjs.development.js.map +0 -1
  74. package/dist/antd.cjs.production.min.js +0 -2
  75. package/dist/antd.cjs.production.min.js.map +0 -1
  76. package/skinny/customControls-ff79afdf.js +0 -27
  77. package/skinny/index.d.ts +0 -16
  78. package/skinny/tslib.es6-b92c4a81.js +0 -59
  79. package/skinny/tslib.es6-b92c4a81.js.map +0 -1
package/dist/antd.esm.js CHANGED
@@ -1,35 +1,34 @@
1
1
  import registerComponent from '@plasmicapp/host/registerComponent';
2
- import Button from 'antd/lib/button';
3
- import Carousel from 'antd/lib/carousel';
4
- import Checkbox from 'antd/lib/checkbox/Checkbox';
5
- import CheckboxGroup from 'antd/lib/checkbox/Group';
2
+ import Button from 'antd/es/button';
3
+ import Carousel from 'antd/es/carousel';
4
+ import Checkbox from 'antd/es/checkbox/Checkbox';
5
+ import CheckboxGroup from 'antd/es/checkbox/Group';
6
6
  import React from 'react';
7
- import AntdCollapse from 'antd/lib/collapse/Collapse';
8
- import CollapsePanel from 'antd/lib/collapse/CollapsePanel';
9
- import AntdDropdown from 'antd/lib/dropdown';
10
- import DropdownButton from 'antd/lib/dropdown/dropdown-button';
11
- import Input from 'antd/lib/input';
12
- import InputGroup from 'antd/lib/input/Group';
13
- import Password from 'antd/lib/input/Password';
14
- import Search from 'antd/lib/input/Search';
15
- import TextArea from 'antd/lib/input/TextArea';
16
- import Menu from 'antd/lib/menu/index';
17
- import MenuDivider from 'antd/lib/menu/MenuDivider';
18
- import MenuItem from 'antd/lib/menu/MenuItem';
19
- import SubMenu from 'antd/lib/menu/SubMenu';
7
+ import AntdCollapse from 'antd/es/collapse/Collapse';
8
+ import CollapsePanel from 'antd/es/collapse/CollapsePanel';
9
+ import AntdDropdown from 'antd/es/dropdown';
10
+ import DropdownButton from 'antd/es/dropdown/dropdown-button';
11
+ import Input from 'antd/es/input';
12
+ import InputGroup from 'antd/es/input/Group';
13
+ import Password from 'antd/es/input/Password';
14
+ import Search from 'antd/es/input/Search';
15
+ import TextArea from 'antd/es/input/TextArea';
16
+ import Menu from 'antd/es/menu/index';
17
+ import MenuDivider from 'antd/es/menu/MenuDivider';
18
+ import MenuItem from 'antd/es/menu/MenuItem';
19
+ import SubMenu from 'antd/es/menu/SubMenu';
20
20
  import { ItemGroup } from 'rc-menu';
21
21
  import { Option, OptGroup } from 'rc-select';
22
- import Rate from 'antd/lib/rate';
23
- import Select from 'antd/lib/select';
24
- import AntdSlider from 'antd/lib/slider';
25
- import Switch from 'antd/lib/switch';
22
+ import Rate from 'antd/es/rate';
23
+ import Select from 'antd/es/select';
24
+ import AntdSlider from 'antd/es/slider';
25
+ import Switch from 'antd/es/switch';
26
26
  import { registerComponent as registerComponent$1, useSelector, DataProvider, repeatedElement } from '@plasmicapp/host';
27
- import Table from 'antd/lib/table/Table';
27
+ import Table from 'antd/es/table/Table';
28
28
  import { Button as Button$1 } from 'antd';
29
- import AntdTabs from 'antd/lib/tabs';
30
- import { TabPane } from 'rc-tabs';
29
+ import AntdTabs from 'antd/es/tabs';
31
30
 
32
- var buttonMeta = {
31
+ const buttonMeta = {
33
32
  name: "AntdButton",
34
33
  displayName: "Antd Button",
35
34
  props: {
@@ -84,17 +83,17 @@ var buttonMeta = {
84
83
  type: "choice",
85
84
  options: ["_blank", "_self", "_parent", "_top"],
86
85
  description: "Same as target attribute of a, works when href is specified",
87
- hidden: function hidden(props) {
88
- return !props.href;
89
- },
86
+ hidden: (props) => !props.href,
90
87
  defaultValueHint: "_self"
91
88
  },
92
89
  children: {
93
90
  type: "slot",
94
- defaultValue: [{
95
- type: "text",
96
- value: "Button"
97
- }]
91
+ defaultValue: [
92
+ {
93
+ type: "text",
94
+ value: "Button"
95
+ }
96
+ ]
98
97
  }
99
98
  },
100
99
  importPath: "antd/lib/button",
@@ -102,20 +101,18 @@ var buttonMeta = {
102
101
  importName: "Button"
103
102
  };
104
103
  function registerButton(loader, customButtonMeta) {
105
- var doRegisterComponent = function doRegisterComponent() {
106
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
107
- };
104
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
108
105
  doRegisterComponent(Button, customButtonMeta != null ? customButtonMeta : buttonMeta);
109
106
  }
110
107
 
111
- var contentStyle = {
108
+ const contentStyle = {
112
109
  height: "160px",
113
110
  color: "#fff",
114
111
  lineHeight: "160px",
115
112
  textAlign: "center",
116
113
  backgroundColor: "#364d79"
117
114
  };
118
- var carouselMeta = {
115
+ const carouselMeta = {
119
116
  name: "AntdCarousel",
120
117
  displayName: "Antd Carousel",
121
118
  props: {
@@ -142,21 +139,24 @@ var carouselMeta = {
142
139
  },
143
140
  children: {
144
141
  type: "slot",
145
- defaultValue: [{
146
- type: "vbox",
147
- children: {
148
- type: "text",
149
- value: "1",
150
- styles: contentStyle
151
- }
152
- }, {
153
- type: "vbox",
154
- children: {
155
- type: "text",
156
- value: "2",
157
- styles: contentStyle
142
+ defaultValue: [
143
+ {
144
+ type: "vbox",
145
+ children: {
146
+ type: "text",
147
+ value: "1",
148
+ styles: contentStyle
149
+ }
150
+ },
151
+ {
152
+ type: "vbox",
153
+ children: {
154
+ type: "text",
155
+ value: "2",
156
+ styles: contentStyle
157
+ }
158
158
  }
159
- }]
159
+ ]
160
160
  }
161
161
  },
162
162
  importPath: "antd/lib/carousel",
@@ -164,66 +164,20 @@ var carouselMeta = {
164
164
  isDefaultExport: true
165
165
  };
166
166
  function registerCarousel(loader, customCarouselMeta) {
167
- var doRegisterComponent = function doRegisterComponent() {
168
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
169
- };
167
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
170
168
  doRegisterComponent(Carousel, customCarouselMeta != null ? customCarouselMeta : carouselMeta);
171
169
  }
172
170
 
173
- function _extends() {
174
- _extends = Object.assign ? Object.assign.bind() : function (target) {
175
- for (var i = 1; i < arguments.length; i++) {
176
- var source = arguments[i];
177
- for (var key in source) {
178
- if (Object.prototype.hasOwnProperty.call(source, key)) {
179
- target[key] = source[key];
180
- }
181
- }
182
- }
183
- return target;
184
- };
185
- return _extends.apply(this, arguments);
186
- }
187
- function _inheritsLoose(subClass, superClass) {
188
- subClass.prototype = Object.create(superClass.prototype);
189
- subClass.prototype.constructor = subClass;
190
- _setPrototypeOf(subClass, superClass);
191
- }
192
- function _setPrototypeOf(o, p) {
193
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
194
- o.__proto__ = p;
195
- return o;
196
- };
197
- return _setPrototypeOf(o, p);
198
- }
199
- function _objectWithoutPropertiesLoose(source, excluded) {
200
- if (source == null) return {};
201
- var target = {};
202
- var sourceKeys = Object.keys(source);
203
- var key, i;
204
- for (i = 0; i < sourceKeys.length; i++) {
205
- key = sourceKeys[i];
206
- if (excluded.indexOf(key) >= 0) continue;
207
- target[key] = source[key];
208
- }
209
- return target;
210
- }
211
-
212
- /**
213
- * Traverses the tree of elements from a `React.createElement`. Notice we can't
214
- * traverse elements created within the children's render function since this is
215
- * the tree before rendering.
216
- */
217
171
  function traverseReactEltTree(children, callback) {
218
- var rec = function rec(elts) {
219
- (Array.isArray(elts) ? elts : [elts]).forEach(function (elt) {
172
+ const rec = (elts) => {
173
+ (Array.isArray(elts) ? elts : [elts]).forEach((elt) => {
174
+ var _a;
220
175
  if (elt) {
221
- var _elt$props;
222
176
  callback(elt);
223
177
  if (elt.children) {
224
178
  rec(elt.children);
225
179
  }
226
- if ((_elt$props = elt.props) != null && _elt$props.children && elt.props.children !== elt.children) {
180
+ if (((_a = elt.props) == null ? void 0 : _a.children) && elt.props.children !== elt.children) {
227
181
  rec(elt.props.children);
228
182
  }
229
183
  }
@@ -232,18 +186,28 @@ function traverseReactEltTree(children, callback) {
232
186
  rec(children);
233
187
  }
234
188
 
235
- var CheckboxWrapper = /*#__PURE__*/function (_React$Component) {
236
- _inheritsLoose(CheckboxWrapper, _React$Component);
237
- function CheckboxWrapper() {
238
- return _React$Component.apply(this, arguments) || this;
189
+ var __defProp$6 = Object.defineProperty;
190
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
191
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
192
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
193
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
194
+ var __spreadValues$6 = (a, b) => {
195
+ for (var prop in b || (b = {}))
196
+ if (__hasOwnProp$6.call(b, prop))
197
+ __defNormalProp$6(a, prop, b[prop]);
198
+ if (__getOwnPropSymbols$6)
199
+ for (var prop of __getOwnPropSymbols$6(b)) {
200
+ if (__propIsEnum$6.call(b, prop))
201
+ __defNormalProp$6(a, prop, b[prop]);
202
+ }
203
+ return a;
204
+ };
205
+ class CheckboxWrapper extends React.Component {
206
+ render() {
207
+ return /* @__PURE__ */ React.createElement(Checkbox, __spreadValues$6({}, this.props));
239
208
  }
240
- var _proto = CheckboxWrapper.prototype;
241
- _proto.render = function render() {
242
- return React.createElement(Checkbox, Object.assign({}, this.props));
243
- };
244
- return CheckboxWrapper;
245
- }(React.Component);
246
- var checkboxMeta = {
209
+ }
210
+ const checkboxMeta = {
247
211
  name: "AntdCheckbox",
248
212
  displayName: "Antd Checkbox",
249
213
  props: {
@@ -275,10 +239,12 @@ var checkboxMeta = {
275
239
  },
276
240
  children: {
277
241
  type: "slot",
278
- defaultValue: [{
279
- type: "text",
280
- value: "Checkbox"
281
- }]
242
+ defaultValue: [
243
+ {
244
+ type: "text",
245
+ value: "Checkbox"
246
+ }
247
+ ]
282
248
  }
283
249
  },
284
250
  importPath: "antd/lib/checkbox/Checkbox",
@@ -289,12 +255,10 @@ var checkboxMeta = {
289
255
  isDefaultExport: true
290
256
  };
291
257
  function registerCheckbox(loader, customCheckboxMeta) {
292
- var doRegisterComponent = function doRegisterComponent() {
293
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
294
- };
258
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
295
259
  doRegisterComponent(CheckboxWrapper, customCheckboxMeta != null ? customCheckboxMeta : checkboxMeta);
296
260
  }
297
- var checkboxGroupMeta = {
261
+ const checkboxGroupMeta = {
298
262
  name: "AntdCheckboxGroup",
299
263
  displayName: "Antd Checkbox Group",
300
264
  props: {
@@ -309,11 +273,11 @@ var checkboxGroupMeta = {
309
273
  uncontrolledProp: "defaultValue",
310
274
  description: "Default selected value",
311
275
  multiSelect: true,
312
- options: function options(componentProps) {
313
- var options = new Set();
314
- traverseReactEltTree(componentProps.children, function (elt) {
315
- var _elt$props;
316
- if ((elt == null ? void 0 : elt.type) === CheckboxWrapper && typeof (elt == null ? void 0 : (_elt$props = elt.props) == null ? void 0 : _elt$props.value) === "string") {
276
+ options: (componentProps) => {
277
+ const options = /* @__PURE__ */ new Set();
278
+ traverseReactEltTree(componentProps.children, (elt) => {
279
+ var _a;
280
+ if ((elt == null ? void 0 : elt.type) === CheckboxWrapper && typeof ((_a = elt == null ? void 0 : elt.props) == null ? void 0 : _a.value) === "string") {
317
281
  options.add(elt.props.value);
318
282
  }
319
283
  });
@@ -323,10 +287,12 @@ var checkboxGroupMeta = {
323
287
  children: {
324
288
  type: "slot",
325
289
  allowedComponents: ["AntdCheckbox"],
326
- defaultValue: [{
327
- type: "component",
328
- name: "AntdCheckbox"
329
- }]
290
+ defaultValue: [
291
+ {
292
+ type: "component",
293
+ name: "AntdCheckbox"
294
+ }
295
+ ]
330
296
  }
331
297
  },
332
298
  importPath: "antd/lib/checkbox/Group",
@@ -335,14 +301,42 @@ var checkboxGroupMeta = {
335
301
  isDefaultExport: true
336
302
  };
337
303
  function registerCheckboxGroup(loader, customCheckboxGroupMeta) {
338
- var doRegisterComponent = function doRegisterComponent() {
339
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
340
- };
304
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
341
305
  doRegisterComponent(CheckboxGroup, customCheckboxGroupMeta != null ? customCheckboxGroupMeta : checkboxGroupMeta);
342
306
  }
343
307
 
344
- var _excluded = ["openIcon", "closeIcon"];
345
- var collapstePanelMeta = {
308
+ var __defProp$5 = Object.defineProperty;
309
+ var __defProps$3 = Object.defineProperties;
310
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
311
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
312
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
313
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
314
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
315
+ var __spreadValues$5 = (a, b) => {
316
+ for (var prop in b || (b = {}))
317
+ if (__hasOwnProp$5.call(b, prop))
318
+ __defNormalProp$5(a, prop, b[prop]);
319
+ if (__getOwnPropSymbols$5)
320
+ for (var prop of __getOwnPropSymbols$5(b)) {
321
+ if (__propIsEnum$5.call(b, prop))
322
+ __defNormalProp$5(a, prop, b[prop]);
323
+ }
324
+ return a;
325
+ };
326
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
327
+ var __objRest$3 = (source, exclude) => {
328
+ var target = {};
329
+ for (var prop in source)
330
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
331
+ target[prop] = source[prop];
332
+ if (source != null && __getOwnPropSymbols$5)
333
+ for (var prop of __getOwnPropSymbols$5(source)) {
334
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
335
+ target[prop] = source[prop];
336
+ }
337
+ return target;
338
+ };
339
+ const collapstePanelMeta = {
346
340
  name: "AntdCollapsePanel",
347
341
  displayName: "Antd Collapse Panel",
348
342
  props: {
@@ -358,10 +352,12 @@ var collapstePanelMeta = {
358
352
  },
359
353
  header: {
360
354
  type: "slot",
361
- defaultValue: [{
362
- type: "text",
363
- value: "Header"
364
- }]
355
+ defaultValue: [
356
+ {
357
+ type: "text",
358
+ value: "Header"
359
+ }
360
+ ]
365
361
  },
366
362
  key: {
367
363
  type: "string",
@@ -378,10 +374,12 @@ var collapstePanelMeta = {
378
374
  },
379
375
  children: {
380
376
  type: "slot",
381
- defaultValue: [{
382
- type: "text",
383
- value: "Insert text here"
384
- }]
377
+ defaultValue: [
378
+ {
379
+ type: "text",
380
+ value: "Insert text here"
381
+ }
382
+ ]
385
383
  }
386
384
  },
387
385
  importPath: "antd/lib/collapse/CollapsePanel",
@@ -390,12 +388,10 @@ var collapstePanelMeta = {
390
388
  isDefaultExport: true
391
389
  };
392
390
  function registerCollapsePanel(loader, customCollapsePanelMeta) {
393
- var doRegisterComponent = function doRegisterComponent() {
394
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
395
- };
391
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
396
392
  doRegisterComponent(CollapsePanel, customCollapsePanelMeta != null ? customCollapsePanelMeta : collapstePanelMeta);
397
393
  }
398
- var collapsteMeta = {
394
+ const collapsteMeta = {
399
395
  name: "AntdCollapse",
400
396
  displayName: "Antd Collapse",
401
397
  props: {
@@ -410,10 +406,9 @@ var collapsteMeta = {
410
406
  uncontrolledProp: "defaultActiveKey",
411
407
  description: "Key of the active panel",
412
408
  multiSelect: true,
413
- options: function options(componentProps) {
414
- var options = new Set();
415
- // `children` is not defined in the Collapse props
416
- traverseReactEltTree(componentProps.children, function (elt) {
409
+ options: (componentProps) => {
410
+ const options = /* @__PURE__ */ new Set();
411
+ traverseReactEltTree(componentProps.children, (elt) => {
417
412
  if ((elt == null ? void 0 : elt.type) === CollapsePanel && typeof (elt == null ? void 0 : elt.key) === "string") {
418
413
  options.add(elt.key);
419
414
  }
@@ -445,13 +440,15 @@ var collapsteMeta = {
445
440
  children: {
446
441
  type: "slot",
447
442
  allowedComponents: ["AntdCollapsePanel"],
448
- defaultValue: [{
449
- type: "component",
450
- name: "AntdCollapsePanel",
451
- props: {
452
- key: "1"
443
+ defaultValue: [
444
+ {
445
+ type: "component",
446
+ name: "AntdCollapsePanel",
447
+ props: {
448
+ key: "1"
449
+ }
453
450
  }
454
- }]
451
+ ]
455
452
  },
456
453
  openIcon: {
457
454
  type: "slot",
@@ -466,38 +463,41 @@ var collapsteMeta = {
466
463
  importName: "Collapse"
467
464
  };
468
465
  function Collapse(props) {
469
- var openIcon = props.openIcon,
470
- closeIcon = props.closeIcon,
471
- rest = _objectWithoutPropertiesLoose(props, _excluded);
472
- return React.createElement(AntdCollapse, Object.assign({}, rest, {
473
- expandIcon: openIcon || closeIcon ? function (_ref) {
474
- var isActive = _ref.isActive;
475
- return isActive ? openIcon : closeIcon;
476
- } : undefined
466
+ const _a = props, { openIcon, closeIcon } = _a, rest = __objRest$3(_a, ["openIcon", "closeIcon"]);
467
+ return /* @__PURE__ */ React.createElement(AntdCollapse, __spreadProps$3(__spreadValues$5({}, rest), {
468
+ expandIcon: openIcon || closeIcon ? ({ isActive }) => isActive ? openIcon : closeIcon : void 0
477
469
  }));
478
470
  }
479
471
  function registerCollapse(loader, customCollapseMeta) {
480
- var doRegisterComponent = function doRegisterComponent() {
481
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
482
- };
472
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
483
473
  doRegisterComponent(Collapse, customCollapseMeta != null ? customCollapseMeta : collapsteMeta);
484
474
  }
485
475
 
486
- var Dropdown = /*#__PURE__*/function (_React$Component) {
487
- _inheritsLoose(Dropdown, _React$Component);
488
- function Dropdown() {
489
- return _React$Component.apply(this, arguments) || this;
476
+ var __defProp$4 = Object.defineProperty;
477
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
478
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
479
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
480
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
481
+ var __spreadValues$4 = (a, b) => {
482
+ for (var prop in b || (b = {}))
483
+ if (__hasOwnProp$4.call(b, prop))
484
+ __defNormalProp$4(a, prop, b[prop]);
485
+ if (__getOwnPropSymbols$4)
486
+ for (var prop of __getOwnPropSymbols$4(b)) {
487
+ if (__propIsEnum$4.call(b, prop))
488
+ __defNormalProp$4(a, prop, b[prop]);
489
+ }
490
+ return a;
491
+ };
492
+ class Dropdown extends React.Component {
493
+ render() {
494
+ const thisProps = this.props;
495
+ const finalProps = __spreadValues$4({}, thisProps);
496
+ finalProps.children = typeof thisProps.children === "string" ? /* @__PURE__ */ React.createElement("div", null, thisProps.children) : thisProps.children;
497
+ return /* @__PURE__ */ React.createElement(AntdDropdown, __spreadValues$4({}, finalProps));
490
498
  }
491
- var _proto = Dropdown.prototype;
492
- _proto.render = function render() {
493
- var thisProps = this.props;
494
- var finalProps = _extends({}, thisProps);
495
- finalProps.children = typeof thisProps.children === "string" ? React.createElement("div", null, thisProps.children) : thisProps.children;
496
- return React.createElement(AntdDropdown, Object.assign({}, finalProps));
497
- };
498
- return Dropdown;
499
- }(React.Component);
500
- var dropdownMeta = {
499
+ }
500
+ const dropdownMeta = {
501
501
  name: "AntdDropdown",
502
502
  displayName: "Antd Dropdown",
503
503
  props: {
@@ -514,14 +514,23 @@ var dropdownMeta = {
514
514
  overlay: {
515
515
  type: "slot",
516
516
  allowedComponents: ["AntdMenu"],
517
- defaultValue: [{
518
- type: "component",
519
- name: "AntdMenu"
520
- }]
517
+ defaultValue: [
518
+ {
519
+ type: "component",
520
+ name: "AntdMenu"
521
+ }
522
+ ]
521
523
  },
522
524
  placement: {
523
525
  type: "choice",
524
- options: ["bottomLeft", "bottomCenter", "bottomRight", "topLeft", "topCenter", "topRight"],
526
+ options: [
527
+ "bottomLeft",
528
+ "bottomCenter",
529
+ "bottomRight",
530
+ "topLeft",
531
+ "topCenter",
532
+ "topRight"
533
+ ],
525
534
  description: "Placement of popup menu",
526
535
  defaultValueHint: "bottomLeft"
527
536
  },
@@ -539,22 +548,22 @@ var dropdownMeta = {
539
548
  },
540
549
  children: {
541
550
  type: "slot",
542
- defaultValue: [{
543
- type: "text",
544
- value: "Dropdown"
545
- }]
551
+ defaultValue: [
552
+ {
553
+ type: "text",
554
+ value: "Dropdown"
555
+ }
556
+ ]
546
557
  }
547
558
  },
548
559
  importPath: "@plasmicpkgs/antd/skinny/registerDropdown",
549
560
  importName: "Dropdown"
550
561
  };
551
562
  function registerDropdown(loader, customDropdownMeta) {
552
- var doRegisterComponent = function doRegisterComponent() {
553
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
554
- };
563
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
555
564
  doRegisterComponent(Dropdown, customDropdownMeta != null ? customDropdownMeta : dropdownMeta);
556
565
  }
557
- var dropdownButtonMeta = {
566
+ const dropdownButtonMeta = {
558
567
  name: "AntdDropdownButton",
559
568
  displayName: "Antd Dropdown Button",
560
569
  props: {
@@ -570,14 +579,23 @@ var dropdownButtonMeta = {
570
579
  overlay: {
571
580
  type: "slot",
572
581
  allowedComponents: ["AntdMenu"],
573
- defaultValue: [{
574
- type: "component",
575
- name: "AntdMenu"
576
- }]
582
+ defaultValue: [
583
+ {
584
+ type: "component",
585
+ name: "AntdMenu"
586
+ }
587
+ ]
577
588
  },
578
589
  placement: {
579
590
  type: "choice",
580
- options: ["bottomLeft", "bottomCenter", "bottomRight", "topLeft", "topCenter", "topRight"],
591
+ options: [
592
+ "bottomLeft",
593
+ "bottomCenter",
594
+ "bottomRight",
595
+ "topLeft",
596
+ "topCenter",
597
+ "topRight"
598
+ ],
581
599
  description: "Placement of popup menu",
582
600
  defaultValueHint: "bottomLeft"
583
601
  },
@@ -607,10 +625,12 @@ var dropdownButtonMeta = {
607
625
  },
608
626
  children: {
609
627
  type: "slot",
610
- defaultValue: [{
611
- type: "text",
612
- value: "Dropdown"
613
- }]
628
+ defaultValue: [
629
+ {
630
+ type: "text",
631
+ value: "Dropdown"
632
+ }
633
+ ]
614
634
  }
615
635
  },
616
636
  importPath: "antd/lib/dropdown/dropdown-button",
@@ -619,19 +639,36 @@ var dropdownButtonMeta = {
619
639
  isDefaultExport: true
620
640
  };
621
641
  function registerDropdownButton(loader, customDropdownButtonMeta) {
622
- var doRegisterComponent = function doRegisterComponent() {
623
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
624
- };
642
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
625
643
  doRegisterComponent(DropdownButton, customDropdownButtonMeta != null ? customDropdownButtonMeta : dropdownButtonMeta);
626
644
  }
627
645
 
646
+ var __defProp$3 = Object.defineProperty;
647
+ var __defProps$2 = Object.defineProperties;
648
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
649
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
650
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
651
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
652
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
653
+ var __spreadValues$3 = (a, b) => {
654
+ for (var prop in b || (b = {}))
655
+ if (__hasOwnProp$3.call(b, prop))
656
+ __defNormalProp$3(a, prop, b[prop]);
657
+ if (__getOwnPropSymbols$3)
658
+ for (var prop of __getOwnPropSymbols$3(b)) {
659
+ if (__propIsEnum$3.call(b, prop))
660
+ __defNormalProp$3(a, prop, b[prop]);
661
+ }
662
+ return a;
663
+ };
664
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
628
665
  function sortObjectKeys(obj) {
629
666
  return Object.fromEntries(Object.entries(obj).sort());
630
667
  }
631
668
  function sortProps(props) {
632
669
  return sortObjectKeys(props);
633
670
  }
634
- var commonHtmlAttributes = {
671
+ const commonHtmlAttributes = {
635
672
  "aria-label": {
636
673
  type: "string",
637
674
  description: "The ARIA label for this input"
@@ -645,10 +682,10 @@ var commonHtmlAttributes = {
645
682
  description: "The HTML name of the input"
646
683
  }
647
684
  };
648
- var inputMeta = {
685
+ const inputMeta = {
649
686
  name: "AntdInput",
650
687
  displayName: "Antd Input",
651
- props: /*#__PURE__*/sortProps( /*#__PURE__*/_extends({}, commonHtmlAttributes, {
688
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
652
689
  addonAfter: {
653
690
  type: "slot",
654
691
  hidePlaceholder: true
@@ -714,15 +751,13 @@ var inputMeta = {
714
751
  isDefaultExport: true
715
752
  };
716
753
  function registerInput(loader, customInputMeta) {
717
- var doRegisterComponent = function doRegisterComponent() {
718
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
719
- };
754
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
720
755
  doRegisterComponent(Input, customInputMeta != null ? customInputMeta : inputMeta);
721
756
  }
722
- var inputTextAreaMeta = {
757
+ const inputTextAreaMeta = {
723
758
  name: "AntdInputTextArea",
724
759
  displayName: "Antd Input Text Area",
725
- props: /*#__PURE__*/sortProps( /*#__PURE__*/_extends({}, commonHtmlAttributes, {
760
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
726
761
  allowClear: {
727
762
  type: "boolean",
728
763
  description: "If allow to remove input content with clear icon",
@@ -771,15 +806,13 @@ var inputTextAreaMeta = {
771
806
  parentComponentName: "AntdInput"
772
807
  };
773
808
  function registerInputTextArea(loader, customInputTextAreaMeta) {
774
- var doRegisterComponent = function doRegisterComponent() {
775
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
776
- };
809
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
777
810
  doRegisterComponent(TextArea, customInputTextAreaMeta != null ? customInputTextAreaMeta : inputTextAreaMeta);
778
811
  }
779
- var inputSearchMeta = {
812
+ const inputSearchMeta = {
780
813
  name: "AntdInputSearch",
781
814
  displayName: "Antd Input Search",
782
- props: /*#__PURE__*/sortProps( /*#__PURE__*/_extends({}, commonHtmlAttributes, {
815
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
783
816
  addonBefore: {
784
817
  type: "slot",
785
818
  hidePlaceholder: true
@@ -850,15 +883,13 @@ var inputSearchMeta = {
850
883
  parentComponentName: "AntdInput"
851
884
  };
852
885
  function registerInputSearch(loader, customInputSearchMeta) {
853
- var doRegisterComponent = function doRegisterComponent() {
854
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
855
- };
886
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
856
887
  doRegisterComponent(Search, customInputSearchMeta != null ? customInputSearchMeta : inputSearchMeta);
857
888
  }
858
- var inputPasswordMeta = {
889
+ const inputPasswordMeta = {
859
890
  name: "AntdInputPassword",
860
891
  displayName: "Antd Input Password",
861
- props: /*#__PURE__*/sortProps( /*#__PURE__*/_extends({}, commonHtmlAttributes, {
892
+ props: sortProps(__spreadProps$2(__spreadValues$3({}, commonHtmlAttributes), {
862
893
  addonAfter: {
863
894
  type: "slot",
864
895
  hidePlaceholder: true
@@ -925,12 +956,10 @@ var inputPasswordMeta = {
925
956
  parentComponentName: "AntdInput"
926
957
  };
927
958
  function registerInputPassword(loader, customInputPasswordMeta) {
928
- var doRegisterComponent = function doRegisterComponent() {
929
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
930
- };
959
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
931
960
  doRegisterComponent(Password, customInputPasswordMeta != null ? customInputPasswordMeta : inputPasswordMeta);
932
961
  }
933
- var inputGroupMeta = {
962
+ const inputGroupMeta = {
934
963
  name: "AntdInputGroup",
935
964
  displayName: "Antd Input Group",
936
965
  props: {
@@ -947,13 +976,16 @@ var inputGroupMeta = {
947
976
  },
948
977
  children: {
949
978
  type: "slot",
950
- defaultValue: [{
951
- type: "component",
952
- name: "AntdInput"
953
- }, {
954
- type: "component",
955
- name: "AntdInput"
956
- }]
979
+ defaultValue: [
980
+ {
981
+ type: "component",
982
+ name: "AntdInput"
983
+ },
984
+ {
985
+ type: "component",
986
+ name: "AntdInput"
987
+ }
988
+ ]
957
989
  }
958
990
  },
959
991
  importPath: "antd/lib/input/Group",
@@ -962,13 +994,11 @@ var inputGroupMeta = {
962
994
  parentComponentName: "AntdInput"
963
995
  };
964
996
  function registerInputGroup(loader, customInputGroupMeta) {
965
- var doRegisterComponent = function doRegisterComponent() {
966
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
967
- };
997
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
968
998
  doRegisterComponent(InputGroup, customInputGroupMeta != null ? customInputGroupMeta : inputGroupMeta);
969
999
  }
970
1000
 
971
- var menuDividerMeta = {
1001
+ const menuDividerMeta = {
972
1002
  name: "AntdMenuDivider",
973
1003
  displayName: "Antd Menu Divider",
974
1004
  props: {
@@ -984,12 +1014,10 @@ var menuDividerMeta = {
984
1014
  parentComponentName: "AntdMenu"
985
1015
  };
986
1016
  function registerMenuDivider(loader, customMenuDividerMeta) {
987
- var doRegisterComponent = function doRegisterComponent() {
988
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
989
- };
1017
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
990
1018
  doRegisterComponent(MenuDivider, customMenuDividerMeta != null ? customMenuDividerMeta : menuDividerMeta);
991
1019
  }
992
- var menuItemMeta = {
1020
+ const menuItemMeta = {
993
1021
  name: "AntdMenuItem",
994
1022
  displayName: "Antd Menu Item",
995
1023
  props: {
@@ -1014,10 +1042,12 @@ var menuItemMeta = {
1014
1042
  },
1015
1043
  children: {
1016
1044
  type: "slot",
1017
- defaultValue: [{
1018
- type: "text",
1019
- value: "Option"
1020
- }]
1045
+ defaultValue: [
1046
+ {
1047
+ type: "text",
1048
+ value: "Option"
1049
+ }
1050
+ ]
1021
1051
  }
1022
1052
  },
1023
1053
  importPath: "antd/lib/menu/MenuItem",
@@ -1026,29 +1056,35 @@ var menuItemMeta = {
1026
1056
  parentComponentName: "AntdMenu"
1027
1057
  };
1028
1058
  function registerMenuItem(loader, customMenuItemMeta) {
1029
- var doRegisterComponent = function doRegisterComponent() {
1030
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1031
- };
1059
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1032
1060
  doRegisterComponent(MenuItem, customMenuItemMeta != null ? customMenuItemMeta : menuItemMeta);
1033
1061
  }
1034
- var menuItemGroupMeta = {
1062
+ const menuItemGroupMeta = {
1035
1063
  name: "AntdMenuItemGroup",
1036
1064
  displayName: "Antd Menu Item Group",
1037
1065
  props: {
1038
1066
  title: {
1039
1067
  type: "slot",
1040
- defaultValue: [{
1041
- type: "text",
1042
- value: "Group"
1043
- }]
1068
+ defaultValue: [
1069
+ {
1070
+ type: "text",
1071
+ value: "Group"
1072
+ }
1073
+ ]
1044
1074
  },
1045
1075
  children: {
1046
1076
  type: "slot",
1047
- allowedComponents: ["AntdMenuItem", "AntdMenuDivider", "AntdMenuItemGroup"],
1048
- defaultValue: [{
1049
- type: "component",
1050
- name: "AntdMenuItem"
1051
- }]
1077
+ allowedComponents: [
1078
+ "AntdMenuItem",
1079
+ "AntdMenuDivider",
1080
+ "AntdMenuItemGroup"
1081
+ ],
1082
+ defaultValue: [
1083
+ {
1084
+ type: "component",
1085
+ name: "AntdMenuItem"
1086
+ }
1087
+ ]
1052
1088
  }
1053
1089
  },
1054
1090
  importPath: "rc-menu",
@@ -1056,12 +1092,10 @@ var menuItemGroupMeta = {
1056
1092
  parentComponentName: "AntdMenu"
1057
1093
  };
1058
1094
  function registerMenuItemGroup(loader, customMenuItemGroupMeta) {
1059
- var doRegisterComponent = function doRegisterComponent() {
1060
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1061
- };
1095
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1062
1096
  doRegisterComponent(ItemGroup, customMenuItemGroupMeta != null ? customMenuItemGroupMeta : menuItemGroupMeta);
1063
1097
  }
1064
- var subMenuMeta = {
1098
+ const subMenuMeta = {
1065
1099
  name: "AntdSubMenu",
1066
1100
  displayName: "Antd SubMenu",
1067
1101
  props: {
@@ -1077,27 +1111,34 @@ var subMenuMeta = {
1077
1111
  },
1078
1112
  title: {
1079
1113
  type: "slot",
1080
- defaultValue: [{
1081
- type: "text",
1082
- value: "Sub-menu"
1083
- }]
1114
+ defaultValue: [
1115
+ {
1116
+ type: "text",
1117
+ value: "Sub-menu"
1118
+ }
1119
+ ]
1084
1120
  },
1085
1121
  children: {
1086
1122
  type: "slot",
1087
- allowedComponents: ["AntdMenuItem", "AntdMenuDivider", "AntdMenuItemGroup", "AntdSubMenu"],
1088
- defaultValue: /*#__PURE__*/[1, 2].map(function (i) {
1089
- return {
1090
- type: "component",
1091
- name: "AntdMenuItem",
1092
- props: {
1093
- key: "subMenuItemKey" + i,
1094
- children: [{
1123
+ allowedComponents: [
1124
+ "AntdMenuItem",
1125
+ "AntdMenuDivider",
1126
+ "AntdMenuItemGroup",
1127
+ "AntdSubMenu"
1128
+ ],
1129
+ defaultValue: [1, 2].map((i) => ({
1130
+ type: "component",
1131
+ name: "AntdMenuItem",
1132
+ props: {
1133
+ key: `subMenuItemKey${i}`,
1134
+ children: [
1135
+ {
1095
1136
  type: "text",
1096
- value: "Sub-menu item " + i
1097
- }]
1098
- }
1099
- };
1100
- })
1137
+ value: `Sub-menu item ${i}`
1138
+ }
1139
+ ]
1140
+ }
1141
+ }))
1101
1142
  }
1102
1143
  },
1103
1144
  importPath: "antd/lib/menu/SubMenu",
@@ -1106,12 +1147,10 @@ var subMenuMeta = {
1106
1147
  parentComponentName: "AntdMenu"
1107
1148
  };
1108
1149
  function registerSubMenu(loader, customSubMenuMeta) {
1109
- var doRegisterComponent = function doRegisterComponent() {
1110
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1111
- };
1150
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1112
1151
  doRegisterComponent(SubMenu, customSubMenuMeta != null ? customSubMenuMeta : subMenuMeta);
1113
1152
  }
1114
- var menuMeta = {
1153
+ const menuMeta = {
1115
1154
  name: "AntdMenu",
1116
1155
  displayName: "Antd Menu",
1117
1156
  props: {
@@ -1146,9 +1185,9 @@ var menuMeta = {
1146
1185
  uncontrolledProp: "defaultOpenKeys",
1147
1186
  description: "Array with the keys of default opened sub menus",
1148
1187
  multiSelect: true,
1149
- options: function options(componentProps) {
1150
- var options = new Set();
1151
- traverseReactEltTree(componentProps.children, function (elt) {
1188
+ options: (componentProps) => {
1189
+ const options = /* @__PURE__ */ new Set();
1190
+ traverseReactEltTree(componentProps.children, (elt) => {
1152
1191
  if ((elt == null ? void 0 : elt.type) === SubMenu && typeof (elt == null ? void 0 : elt.key) === "string") {
1153
1192
  options.add(elt.key);
1154
1193
  }
@@ -1171,9 +1210,9 @@ var menuMeta = {
1171
1210
  uncontrolledProp: "defaultSelectedKeys",
1172
1211
  description: "Array with the keys of default selected menu items",
1173
1212
  multiSelect: true,
1174
- options: function options(componentProps) {
1175
- var options = new Set();
1176
- traverseReactEltTree(componentProps.children, function (elt) {
1213
+ options: (componentProps) => {
1214
+ const options = /* @__PURE__ */ new Set();
1215
+ traverseReactEltTree(componentProps.children, (elt) => {
1177
1216
  if ([SubMenu, MenuItem].includes(elt == null ? void 0 : elt.type) && typeof (elt == null ? void 0 : elt.key) === "string") {
1178
1217
  options.add(elt.key);
1179
1218
  }
@@ -1206,13 +1245,16 @@ var menuMeta = {
1206
1245
  children: {
1207
1246
  type: "slot",
1208
1247
  allowedComponents: ["AntdMenuItem", "AntdMenuDivider", "AntdSubMenu"],
1209
- defaultValue: [{
1210
- type: "component",
1211
- name: "AntdMenuItem"
1212
- }, {
1213
- type: "component",
1214
- name: "AntdSubMenu"
1215
- }]
1248
+ defaultValue: [
1249
+ {
1250
+ type: "component",
1251
+ name: "AntdMenuItem"
1252
+ },
1253
+ {
1254
+ type: "component",
1255
+ name: "AntdSubMenu"
1256
+ }
1257
+ ]
1216
1258
  }
1217
1259
  },
1218
1260
  importPath: "antd/lib/menu/index",
@@ -1220,13 +1262,11 @@ var menuMeta = {
1220
1262
  isDefaultExport: true
1221
1263
  };
1222
1264
  function registerMenu(loader, customMenuMeta) {
1223
- var doRegisterComponent = function doRegisterComponent() {
1224
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1225
- };
1265
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1226
1266
  doRegisterComponent(Menu, customMenuMeta != null ? customMenuMeta : menuMeta);
1227
1267
  }
1228
1268
 
1229
- var optionMeta = {
1269
+ const optionMeta = {
1230
1270
  name: "AntdOption",
1231
1271
  displayName: "Antd Option",
1232
1272
  props: {
@@ -1249,10 +1289,12 @@ var optionMeta = {
1249
1289
  },
1250
1290
  children: {
1251
1291
  type: "slot",
1252
- defaultValue: [{
1253
- type: "text",
1254
- value: "Option"
1255
- }]
1292
+ defaultValue: [
1293
+ {
1294
+ type: "text",
1295
+ value: "Option"
1296
+ }
1297
+ ]
1256
1298
  }
1257
1299
  },
1258
1300
  importPath: "rc-select",
@@ -1260,12 +1302,10 @@ var optionMeta = {
1260
1302
  parentComponentName: "AntdSelect"
1261
1303
  };
1262
1304
  function registerOption(loader, customOptionMeta) {
1263
- var doRegisterComponent = function doRegisterComponent() {
1264
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1265
- };
1305
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1266
1306
  doRegisterComponent(Option, customOptionMeta != null ? customOptionMeta : optionMeta);
1267
1307
  }
1268
- var optGroupMeta = {
1308
+ const optGroupMeta = {
1269
1309
  name: "AntdOptionGroup",
1270
1310
  displayName: "Antd Option Group",
1271
1311
  props: {
@@ -1280,10 +1320,12 @@ var optGroupMeta = {
1280
1320
  children: {
1281
1321
  type: "slot",
1282
1322
  allowedComponents: ["AntdOption"],
1283
- defaultValue: [{
1284
- type: "component",
1285
- name: "AntdOption"
1286
- }]
1323
+ defaultValue: [
1324
+ {
1325
+ type: "component",
1326
+ name: "AntdOption"
1327
+ }
1328
+ ]
1287
1329
  }
1288
1330
  },
1289
1331
  importPath: "rc-select",
@@ -1291,13 +1333,11 @@ var optGroupMeta = {
1291
1333
  parentComponentName: "AntdSelect"
1292
1334
  };
1293
1335
  function registerOptGroup(loader, customOptGroupMeta) {
1294
- var doRegisterComponent = function doRegisterComponent() {
1295
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1296
- };
1336
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1297
1337
  doRegisterComponent(OptGroup, customOptGroupMeta != null ? customOptGroupMeta : optGroupMeta);
1298
1338
  }
1299
1339
 
1300
- var rateMeta = {
1340
+ const rateMeta = {
1301
1341
  name: "AntdRate",
1302
1342
  displayName: "Antd Rate",
1303
1343
  props: {
@@ -1346,13 +1386,11 @@ var rateMeta = {
1346
1386
  isDefaultExport: true
1347
1387
  };
1348
1388
  function registerRate(loader, customRateMeta) {
1349
- var doRegisterComponent = function doRegisterComponent() {
1350
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1351
- };
1389
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1352
1390
  doRegisterComponent(Rate, customRateMeta != null ? customRateMeta : rateMeta);
1353
1391
  }
1354
1392
 
1355
- var selectMeta = {
1393
+ const selectMeta = {
1356
1394
  name: "AntdSelect",
1357
1395
  displayName: "Antd Select",
1358
1396
  props: {
@@ -1365,9 +1403,7 @@ var selectMeta = {
1365
1403
  type: "boolean",
1366
1404
  description: "Whether the current search will be cleared on selecting an item",
1367
1405
  defaultValueHint: true,
1368
- hidden: function hidden(props) {
1369
- return props.mode !== "multiple" && props.mode !== "tags";
1370
- }
1406
+ hidden: (props) => props.mode !== "multiple" && props.mode !== "tags"
1371
1407
  },
1372
1408
  autoFocus: {
1373
1409
  type: "boolean",
@@ -1408,10 +1444,12 @@ var selectMeta = {
1408
1444
  },
1409
1445
  placeholder: {
1410
1446
  type: "slot",
1411
- defaultValue: [{
1412
- type: "text",
1413
- value: "Select"
1414
- }]
1447
+ defaultValue: [
1448
+ {
1449
+ type: "text",
1450
+ value: "Select"
1451
+ }
1452
+ ]
1415
1453
  },
1416
1454
  showArrow: {
1417
1455
  type: "boolean",
@@ -1434,11 +1472,11 @@ var selectMeta = {
1434
1472
  editOnly: true,
1435
1473
  uncontrolledProp: "defaultValue",
1436
1474
  description: "Initial selected option",
1437
- options: function options(componentProps) {
1438
- var options = new Set();
1439
- traverseReactEltTree(componentProps.children, function (elt) {
1440
- var _elt$props;
1441
- if ((elt == null ? void 0 : elt.type) === Option && typeof (elt == null ? void 0 : (_elt$props = elt.props) == null ? void 0 : _elt$props.value) === "string") {
1475
+ options: (componentProps) => {
1476
+ const options = /* @__PURE__ */ new Set();
1477
+ traverseReactEltTree(componentProps.children, (elt) => {
1478
+ var _a;
1479
+ if ((elt == null ? void 0 : elt.type) === Option && typeof ((_a = elt == null ? void 0 : elt.props) == null ? void 0 : _a.value) === "string") {
1442
1480
  options.add(elt.props.value);
1443
1481
  }
1444
1482
  });
@@ -1453,17 +1491,19 @@ var selectMeta = {
1453
1491
  children: {
1454
1492
  type: "slot",
1455
1493
  allowedComponents: ["AntdOption, AntdOptionGroup"],
1456
- defaultValue: [{
1457
- type: "component",
1458
- name: "AntdOption",
1459
- props: {
1460
- value: "Option",
1461
- children: {
1462
- type: "text",
1463
- value: "Option"
1494
+ defaultValue: [
1495
+ {
1496
+ type: "component",
1497
+ name: "AntdOption",
1498
+ props: {
1499
+ value: "Option",
1500
+ children: {
1501
+ type: "text",
1502
+ value: "Option"
1503
+ }
1464
1504
  }
1465
1505
  }
1466
- }]
1506
+ ]
1467
1507
  }
1468
1508
  },
1469
1509
  importPath: "antd/lib/select",
@@ -1471,20 +1511,44 @@ var selectMeta = {
1471
1511
  isDefaultExport: true
1472
1512
  };
1473
1513
  function registerSelect(loader, customSelectMeta) {
1474
- var doRegisterComponent = function doRegisterComponent() {
1475
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1476
- };
1514
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1477
1515
  doRegisterComponent(Select, customSelectMeta != null ? customSelectMeta : selectMeta);
1478
1516
  }
1479
1517
 
1480
- var _excluded$1 = ["value", "defaultValue", "value2", "defaultValue2"];
1481
- var Slider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1482
- var value = _ref.value,
1483
- defaultValue = _ref.defaultValue,
1484
- value2 = _ref.value2,
1485
- defaultValue2 = _ref.defaultValue2,
1486
- props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1487
- var newProps = _extends({}, props);
1518
+ var __defProp$2 = Object.defineProperty;
1519
+ var __defProps$1 = Object.defineProperties;
1520
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1521
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1522
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1523
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1524
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1525
+ var __spreadValues$2 = (a, b) => {
1526
+ for (var prop in b || (b = {}))
1527
+ if (__hasOwnProp$2.call(b, prop))
1528
+ __defNormalProp$2(a, prop, b[prop]);
1529
+ if (__getOwnPropSymbols$2)
1530
+ for (var prop of __getOwnPropSymbols$2(b)) {
1531
+ if (__propIsEnum$2.call(b, prop))
1532
+ __defNormalProp$2(a, prop, b[prop]);
1533
+ }
1534
+ return a;
1535
+ };
1536
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1537
+ var __objRest$2 = (source, exclude) => {
1538
+ var target = {};
1539
+ for (var prop in source)
1540
+ if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
1541
+ target[prop] = source[prop];
1542
+ if (source != null && __getOwnPropSymbols$2)
1543
+ for (var prop of __getOwnPropSymbols$2(source)) {
1544
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
1545
+ target[prop] = source[prop];
1546
+ }
1547
+ return target;
1548
+ };
1549
+ const Slider = React.forwardRef((_a, ref) => {
1550
+ var _b = _a, { value, defaultValue, value2, defaultValue2 } = _b, props = __objRest$2(_b, ["value", "defaultValue", "value2", "defaultValue2"]);
1551
+ const newProps = __spreadValues$2({}, props);
1488
1552
  if (props.range) {
1489
1553
  if (typeof value === "number" || typeof value2 === "number") {
1490
1554
  newProps.value = [value != null ? value : 0, value2 != null ? value2 : 0];
@@ -1500,11 +1564,11 @@ var Slider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1500
1564
  newProps.defaultValue = defaultValue;
1501
1565
  }
1502
1566
  }
1503
- return React.createElement(AntdSlider, Object.assign({}, newProps, {
1504
- ref: ref
1567
+ return /* @__PURE__ */ React.createElement(AntdSlider, __spreadProps$1(__spreadValues$2({}, newProps), {
1568
+ ref
1505
1569
  }));
1506
1570
  });
1507
- var sliderMeta = {
1571
+ const sliderMeta = {
1508
1572
  name: "AntdSlider",
1509
1573
  displayName: "Antd Slider",
1510
1574
  props: {
@@ -1555,18 +1619,16 @@ var sliderMeta = {
1555
1619
  editOnly: true,
1556
1620
  uncontrolledProp: "defaultValue2",
1557
1621
  description: "The default value for the second value of the slider",
1558
- hidden: function hidden(props) {
1559
- return !props.range;
1560
- }
1622
+ hidden: (props) => !props.range
1561
1623
  },
1562
1624
  step: {
1563
1625
  type: "number",
1564
- description: "The granularity the slider can step through values. Must greater than 0, and be divided by (max - min)." + " When marks no null, step can be null",
1626
+ description: "The granularity the slider can step through values. Must greater than 0, and be divided by (max - min). When marks no null, step can be null",
1565
1627
  defaultValueHint: 1
1566
1628
  },
1567
1629
  marks: {
1568
1630
  type: "object",
1569
- description: "Tick mark of Slider, type of key must be number, and must in closed interval [min, max]," + " each mark can declare its own style"
1631
+ description: "Tick mark of Slider, type of key must be number, and must in closed interval [min, max], each mark can declare its own style"
1570
1632
  }
1571
1633
  },
1572
1634
  defaultStyles: {
@@ -1577,13 +1639,11 @@ var sliderMeta = {
1577
1639
  importName: "Slider"
1578
1640
  };
1579
1641
  function registerSlider(loader, customSliderMeta) {
1580
- var doRegisterComponent = function doRegisterComponent() {
1581
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1582
- };
1642
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1583
1643
  doRegisterComponent(Slider, customSliderMeta != null ? customSliderMeta : sliderMeta);
1584
1644
  }
1585
1645
 
1586
- var switchMeta = {
1646
+ const switchMeta = {
1587
1647
  name: "AntdSwitch",
1588
1648
  displayName: "Antd Switch",
1589
1649
  props: {
@@ -1631,115 +1691,123 @@ var switchMeta = {
1631
1691
  isDefaultExport: true
1632
1692
  };
1633
1693
  function registerSwitch(loader, customSwitchMeta) {
1634
- var doRegisterComponent = function doRegisterComponent() {
1635
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1636
- };
1694
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1637
1695
  doRegisterComponent(Switch, customSwitchMeta != null ? customSwitchMeta : switchMeta);
1638
1696
  }
1639
1697
 
1640
- var _excluded$2 = ["columnTemplate", "title", "dataIndex"];
1641
- // This is an empty virtual component used to allow users to define column
1642
- // properties in plasmic.
1698
+ var __defProp$1 = Object.defineProperty;
1699
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1700
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1701
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1702
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1703
+ var __spreadValues$1 = (a, b) => {
1704
+ for (var prop in b || (b = {}))
1705
+ if (__hasOwnProp$1.call(b, prop))
1706
+ __defNormalProp$1(a, prop, b[prop]);
1707
+ if (__getOwnPropSymbols$1)
1708
+ for (var prop of __getOwnPropSymbols$1(b)) {
1709
+ if (__propIsEnum$1.call(b, prop))
1710
+ __defNormalProp$1(a, prop, b[prop]);
1711
+ }
1712
+ return a;
1713
+ };
1714
+ var __objRest$1 = (source, exclude) => {
1715
+ var target = {};
1716
+ for (var prop in source)
1717
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
1718
+ target[prop] = source[prop];
1719
+ if (source != null && __getOwnPropSymbols$1)
1720
+ for (var prop of __getOwnPropSymbols$1(source)) {
1721
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
1722
+ target[prop] = source[prop];
1723
+ }
1724
+ return target;
1725
+ };
1643
1726
  function TableColumn(_props) {
1644
1727
  return null;
1645
1728
  }
1646
1729
  function TableValue(props) {
1647
- var _column$toString;
1648
- var className = props.className;
1649
- var column = useSelector("currentColumn");
1650
- return React.createElement("div", {
1651
- className: className
1652
- }, (_column$toString = column == null ? void 0 : column.toString()) != null ? _column$toString : "");
1730
+ var _a;
1731
+ const { className } = props;
1732
+ const column = useSelector("currentColumn");
1733
+ return /* @__PURE__ */ React.createElement("div", {
1734
+ className
1735
+ }, (_a = column == null ? void 0 : column.toString()) != null ? _a : "");
1653
1736
  }
1654
- /**
1655
- * Wrapper used to consume internal canvas props
1656
- */
1657
1737
  function ColumnWrapper(props) {
1658
1738
  return props.children;
1659
1739
  }
1660
1740
  function TableWrapper(props) {
1661
- var _columns$props$childr, _columns$props;
1662
- var className = props.className,
1663
- items = props.items,
1664
- columns = props.columns,
1665
- size = props.size,
1666
- onSelect = props.onSelect,
1667
- pagination = props.pagination;
1668
- // Plasmic Studio Canvas currently renders items in a slightly different way than the generated code:
1669
- // - In the studio:
1670
- // - The `columns` prop value is an array of nested react <Column /> nodes.
1671
- // - In the generated code (preview mode):
1672
- // - The `columns` prop value is a React Node with a `children` property that contains
1673
- // an array of the nested react <Column /> components.
1674
- var tableColumns = (_columns$props$childr = columns == null ? void 0 : (_columns$props = columns.props) == null ? void 0 : _columns$props.children) != null ? _columns$props$childr : columns;
1675
- // Convert the props.columns slot children to an array of column definitions
1676
- var columnDefinitions = React.useMemo(function () {
1677
- return React.Children.map(tableColumns, function (column, columnIndex) {
1741
+ var _a, _b;
1742
+ const { className, items, columns, size, onSelect, pagination } = props;
1743
+ const tableColumns = (_b = (_a = columns == null ? void 0 : columns.props) == null ? void 0 : _a.children) != null ? _b : columns;
1744
+ const columnDefinitions = React.useMemo(() => {
1745
+ return React.Children.map(tableColumns, (column, columnIndex) => {
1678
1746
  if (!column) {
1679
- return undefined;
1747
+ return void 0;
1680
1748
  }
1681
- var _column$props = column.props,
1682
- columnTemplate = _column$props.columnTemplate,
1683
- title = _column$props.title,
1684
- dataIndex = _column$props.dataIndex,
1685
- rest = _objectWithoutPropertiesLoose(_column$props, _excluded$2);
1686
- var columnDefinition = {
1687
- columnIndex: columnIndex,
1688
- title: title,
1689
- dataIndex: dataIndex,
1749
+ const _a2 = column.props, { columnTemplate, title, dataIndex } = _a2, rest = __objRest$1(_a2, ["columnTemplate", "title", "dataIndex"]);
1750
+ const columnDefinition = {
1751
+ columnIndex,
1752
+ title,
1753
+ dataIndex,
1690
1754
  key: columnIndex,
1691
- render: function render(value, record, rowIndex) {
1692
- return React.createElement(DataProvider, {
1755
+ render: (value, record, rowIndex) => {
1756
+ return /* @__PURE__ */ React.createElement(DataProvider, {
1693
1757
  name: "currentRow",
1694
1758
  data: record
1695
- }, React.createElement(DataProvider, {
1759
+ }, /* @__PURE__ */ React.createElement(DataProvider, {
1696
1760
  name: "currentRowIndex",
1697
1761
  data: rowIndex
1698
- }, React.createElement(DataProvider, {
1762
+ }, /* @__PURE__ */ React.createElement(DataProvider, {
1699
1763
  name: "currentColumn",
1700
1764
  data: value
1701
- }, repeatedElement(rowIndex, React.createElement(ColumnWrapper, Object.assign({}, rest), columnTemplate)))));
1765
+ }, repeatedElement(rowIndex, /* @__PURE__ */ React.createElement(ColumnWrapper, __spreadValues$1({}, rest), columnTemplate)))));
1702
1766
  }
1703
1767
  };
1704
1768
  return columnDefinition;
1705
1769
  }).filter(Boolean);
1706
1770
  }, [tableColumns]);
1707
- return React.createElement(Table, {
1708
- className: className,
1771
+ return /* @__PURE__ */ React.createElement(Table, {
1772
+ className,
1709
1773
  columns: columnDefinitions,
1710
1774
  dataSource: items,
1711
- size: size,
1712
- onRow: function onRow(record) {
1775
+ size,
1776
+ onRow: (record) => {
1713
1777
  return {
1714
- onMouseUp: function onMouseUp() {
1778
+ onMouseUp: () => {
1715
1779
  return onSelect == null ? void 0 : onSelect(record.id);
1716
1780
  }
1717
1781
  };
1718
1782
  },
1719
- pagination: pagination ? undefined : pagination,
1783
+ pagination: pagination ? void 0 : pagination,
1720
1784
  rowKey: "id"
1721
1785
  });
1722
1786
  }
1723
- var DEFAULT_ITEMS = [{
1724
- name: "John Brown",
1725
- age: 19,
1726
- address: "New York No. 1 Lake Park",
1727
- tags: ["student", "developer"]
1728
- }, {
1729
- name: "Jim Green",
1730
- age: 42,
1731
- address: "London No. 1 Lake Park",
1732
- tags: ["teacher"]
1733
- }, {
1734
- name: "Joe Black",
1735
- age: 32,
1736
- address: "Sidney No. 1 Lake Park",
1737
- tags: ["cool", "teacher"]
1738
- }];
1787
+ const DEFAULT_ITEMS = [
1788
+ {
1789
+ name: "John Brown",
1790
+ age: 19,
1791
+ address: "New York No. 1 Lake Park",
1792
+ tags: ["student", "developer"]
1793
+ },
1794
+ {
1795
+ name: "Jim Green",
1796
+ age: 42,
1797
+ address: "London No. 1 Lake Park",
1798
+ tags: ["teacher"]
1799
+ },
1800
+ {
1801
+ name: "Joe Black",
1802
+ age: 32,
1803
+ address: "Sidney No. 1 Lake Park",
1804
+ tags: ["cool", "teacher"]
1805
+ }
1806
+ ];
1739
1807
  function capitalize(input) {
1740
1808
  return input.charAt(0).toUpperCase() + input.slice(1);
1741
1809
  }
1742
- var tableMeta = {
1810
+ const tableMeta = {
1743
1811
  name: "AntdTable",
1744
1812
  displayName: "Antd Table",
1745
1813
  props: {
@@ -1751,16 +1819,14 @@ var tableMeta = {
1751
1819
  columns: {
1752
1820
  type: "slot",
1753
1821
  allowedComponents: ["AntdTableColumn"],
1754
- defaultValue: /*#__PURE__*/Object.keys(DEFAULT_ITEMS[0]).map(function (columnName) {
1755
- return {
1756
- type: "component",
1757
- name: "AntdTableColumn",
1758
- props: {
1759
- title: capitalize(columnName),
1760
- dataIndex: columnName
1761
- }
1762
- };
1763
- })
1822
+ defaultValue: Object.keys(DEFAULT_ITEMS[0]).map((columnName) => ({
1823
+ type: "component",
1824
+ name: "AntdTableColumn",
1825
+ props: {
1826
+ title: capitalize(columnName),
1827
+ dataIndex: columnName
1828
+ }
1829
+ }))
1764
1830
  },
1765
1831
  size: {
1766
1832
  type: "choice",
@@ -1775,7 +1841,7 @@ var tableMeta = {
1775
1841
  importPath: "@plasmicpkgs/antd/skinny/registerTable",
1776
1842
  importName: "TableWrapper"
1777
1843
  };
1778
- var tableColumnMeta = {
1844
+ const tableColumnMeta = {
1779
1845
  name: "AntdTableColumn",
1780
1846
  parentComponentName: "AntdTable",
1781
1847
  providesData: true,
@@ -1796,17 +1862,19 @@ var tableColumnMeta = {
1796
1862
  styles: {
1797
1863
  padding: 0
1798
1864
  },
1799
- children: [{
1800
- type: "component",
1801
- name: "AntdTableValue"
1802
- }]
1865
+ children: [
1866
+ {
1867
+ type: "component",
1868
+ name: "AntdTableValue"
1869
+ }
1870
+ ]
1803
1871
  }
1804
1872
  }
1805
1873
  },
1806
1874
  importPath: "@plasmicpkgs/antd/skinny/registerTable",
1807
1875
  importName: "TableColumn"
1808
1876
  };
1809
- var tableValueMeta = {
1877
+ const tableValueMeta = {
1810
1878
  name: "AntdTableValue",
1811
1879
  parentComponentName: "AntdTableColumn",
1812
1880
  props: {},
@@ -1814,35 +1882,62 @@ var tableValueMeta = {
1814
1882
  importName: "TableValue"
1815
1883
  };
1816
1884
  function registerTable(loader, customMeta) {
1817
- var doRegisterComponent = function doRegisterComponent() {
1818
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent$1.apply(void 0, arguments);
1819
- };
1885
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent$1(...args);
1820
1886
  doRegisterComponent(TableWrapper, customMeta != null ? customMeta : tableMeta);
1821
1887
  }
1822
1888
  function registerTableColumn(loader, customMeta) {
1823
- var doRegisterComponent = function doRegisterComponent() {
1824
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent$1.apply(void 0, arguments);
1825
- };
1889
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent$1(...args);
1826
1890
  doRegisterComponent(TableColumn, customMeta != null ? customMeta : tableColumnMeta);
1827
1891
  }
1828
1892
  function registerTableValue(loader, customMeta) {
1829
- var doRegisterComponent = function doRegisterComponent() {
1830
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent$1.apply(void 0, arguments);
1831
- };
1893
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent$1(...args);
1832
1894
  doRegisterComponent(TableValue, customMeta != null ? customMeta : tableValueMeta);
1833
1895
  }
1834
1896
 
1835
- var _excluded$3 = ["leftTabBarExtraContent", "rightTabBarExtraContent"];
1836
- var tabPaneMeta = {
1897
+ var __defProp = Object.defineProperty;
1898
+ var __defProps = Object.defineProperties;
1899
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1900
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1901
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
1902
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
1903
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1904
+ var __spreadValues = (a, b) => {
1905
+ for (var prop in b || (b = {}))
1906
+ if (__hasOwnProp.call(b, prop))
1907
+ __defNormalProp(a, prop, b[prop]);
1908
+ if (__getOwnPropSymbols)
1909
+ for (var prop of __getOwnPropSymbols(b)) {
1910
+ if (__propIsEnum.call(b, prop))
1911
+ __defNormalProp(a, prop, b[prop]);
1912
+ }
1913
+ return a;
1914
+ };
1915
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1916
+ var __objRest = (source, exclude) => {
1917
+ var target = {};
1918
+ for (var prop in source)
1919
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
1920
+ target[prop] = source[prop];
1921
+ if (source != null && __getOwnPropSymbols)
1922
+ for (var prop of __getOwnPropSymbols(source)) {
1923
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
1924
+ target[prop] = source[prop];
1925
+ }
1926
+ return target;
1927
+ };
1928
+ const TabPane = AntdTabs.TabPane;
1929
+ const tabPaneMeta = {
1837
1930
  name: "AntdTabPane",
1838
1931
  displayName: "Antd Tab Pane",
1839
1932
  props: {
1840
1933
  tab: {
1841
1934
  type: "slot",
1842
- defaultValue: [{
1843
- type: "text",
1844
- value: "Tab"
1845
- }]
1935
+ defaultValue: [
1936
+ {
1937
+ type: "text",
1938
+ value: "Tab"
1939
+ }
1940
+ ]
1846
1941
  },
1847
1942
  key: {
1848
1943
  type: "string",
@@ -1870,47 +1965,49 @@ var tabPaneMeta = {
1870
1965
  },
1871
1966
  children: {
1872
1967
  type: "slot",
1873
- defaultValue: [{
1874
- type: "text",
1875
- value: "Tab Content"
1876
- }]
1968
+ defaultValue: [
1969
+ {
1970
+ type: "text",
1971
+ value: "Tab Content"
1972
+ }
1973
+ ]
1877
1974
  }
1878
1975
  },
1879
1976
  parentComponentName: "AntdTabs",
1880
- importPath: "rc-tabs",
1977
+ importPath: "@plasmicpkgs/antd/skinny/registerTabs",
1881
1978
  importName: "TabPane"
1882
1979
  };
1883
1980
  function registerTabPane(loader, customTabPaneMeta) {
1884
- var doRegisterComponent = function doRegisterComponent() {
1885
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
1886
- };
1981
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
1887
1982
  doRegisterComponent(TabPane, customTabPaneMeta != null ? customTabPaneMeta : tabPaneMeta);
1888
1983
  }
1889
1984
  function Tabs(props) {
1890
- var leftTabBarExtraContent = props.leftTabBarExtraContent,
1891
- rightTabBarExtraContent = props.rightTabBarExtraContent,
1892
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
1893
- return React.createElement(AntdTabs, Object.assign({}, otherProps, {
1985
+ const _a = props, {
1986
+ leftTabBarExtraContent,
1987
+ rightTabBarExtraContent
1988
+ } = _a, otherProps = __objRest(_a, [
1989
+ "leftTabBarExtraContent",
1990
+ "rightTabBarExtraContent"
1991
+ ]);
1992
+ return /* @__PURE__ */ React.createElement(AntdTabs, __spreadProps(__spreadValues({}, otherProps), {
1894
1993
  tabBarExtraContent: {
1895
1994
  left: leftTabBarExtraContent,
1896
1995
  right: rightTabBarExtraContent
1897
1996
  }
1898
1997
  }));
1899
1998
  }
1900
- function NavigateTabs(_ref) {
1901
- var componentProps = _ref.componentProps,
1902
- studioOps = _ref.studioOps;
1903
- var tabPanes = [];
1904
- traverseReactEltTree(componentProps.children, function (elt) {
1999
+ function NavigateTabs({ componentProps, studioOps }) {
2000
+ const tabPanes = [];
2001
+ traverseReactEltTree(componentProps.children, (elt) => {
1905
2002
  if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
1906
2003
  tabPanes.push(elt.key);
1907
2004
  }
1908
2005
  });
1909
- var activeKey = componentProps.activeKey;
1910
- var currTabPos = activeKey ? tabPanes.findIndex(function (tabKey) {
2006
+ const activeKey = componentProps.activeKey;
2007
+ const currTabPos = activeKey ? tabPanes.findIndex((tabKey) => {
1911
2008
  return tabKey === activeKey;
1912
2009
  }) : 0;
1913
- return React.createElement("div", {
2010
+ return /* @__PURE__ */ React.createElement("div", {
1914
2011
  style: {
1915
2012
  width: "100%",
1916
2013
  display: "flex",
@@ -1918,36 +2015,28 @@ function NavigateTabs(_ref) {
1918
2015
  gap: "10px",
1919
2016
  justifyContent: "space-between"
1920
2017
  }
1921
- }, React.createElement(Button$1, {
1922
- style: {
1923
- width: "100%"
1924
- },
1925
- onClick: function onClick() {
2018
+ }, /* @__PURE__ */ React.createElement(Button$1, {
2019
+ style: { width: "100%" },
2020
+ onClick: () => {
1926
2021
  if (tabPanes.length > 0) {
1927
- var prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
1928
- studioOps.updateProps({
1929
- activeKey: tabPanes[prevTabPos]
1930
- });
2022
+ const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
2023
+ studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
1931
2024
  }
1932
2025
  }
1933
- }, "Prev tab"), React.createElement(Button$1, {
1934
- style: {
1935
- width: "100%"
1936
- },
1937
- onClick: function onClick() {
2026
+ }, "Prev tab"), /* @__PURE__ */ React.createElement(Button$1, {
2027
+ style: { width: "100%" },
2028
+ onClick: () => {
1938
2029
  if (tabPanes.length > 0) {
1939
- var nextTabPos = (currTabPos + 1) % tabPanes.length;
1940
- studioOps.updateProps({
1941
- activeKey: tabPanes[nextTabPos]
1942
- });
2030
+ const nextTabPos = (currTabPos + 1) % tabPanes.length;
2031
+ studioOps.updateProps({ activeKey: tabPanes[nextTabPos] });
1943
2032
  }
1944
2033
  }
1945
2034
  }, "Next tab"));
1946
2035
  }
1947
2036
  function OutlineMessage() {
1948
- return React.createElement("div", null, "* To re-arrange tab panes, use the Outline panel");
2037
+ return /* @__PURE__ */ React.createElement("div", null, "* To re-arrange tab panes, use the Outline panel");
1949
2038
  }
1950
- var tabsMeta = {
2039
+ const tabsMeta = {
1951
2040
  name: "AntdTabs",
1952
2041
  displayName: "Antd Tabs",
1953
2042
  props: {
@@ -1963,20 +2052,13 @@ var tabsMeta = {
1963
2052
  },
1964
2053
  animated: {
1965
2054
  type: "object",
1966
- hidden: function hidden(props) {
1967
- return props.tabPosition !== "top" && !!props.tabPosition;
1968
- },
1969
- defaultValueHint: {
1970
- inkBar: true,
1971
- tabPane: false
1972
- },
2055
+ hidden: (props) => props.tabPosition !== "top" && !!props.tabPosition,
2056
+ defaultValueHint: { inkBar: true, tabPane: false },
1973
2057
  description: "Whether to change tabs with animation. Can be either a boolean or specify for inkBar and tabPane"
1974
2058
  },
1975
2059
  hideAdd: {
1976
2060
  type: "boolean",
1977
- hidden: function hidden(props) {
1978
- return props.type !== "editable-card";
1979
- },
2061
+ hidden: (props) => props.type !== "editable-card",
1980
2062
  defaultValueHint: false,
1981
2063
  description: "Hide plus icon or not"
1982
2064
  },
@@ -2022,9 +2104,9 @@ var tabsMeta = {
2022
2104
  editOnly: true,
2023
2105
  uncontrolledProp: "defaultActiveKey",
2024
2106
  description: "Initial active TabPane's key",
2025
- options: function options(props) {
2026
- var options = new Set();
2027
- traverseReactEltTree(props.children, function (elt) {
2107
+ options: (props) => {
2108
+ const options = /* @__PURE__ */ new Set();
2109
+ traverseReactEltTree(props.children, (elt) => {
2028
2110
  if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2029
2111
  options.add(elt.key);
2030
2112
  }
@@ -2035,113 +2117,118 @@ var tabsMeta = {
2035
2117
  children: {
2036
2118
  type: "slot",
2037
2119
  allowedComponents: ["AntdTabPane"],
2038
- defaultValue: [{
2039
- type: "component",
2040
- name: "AntdTabPane",
2041
- props: {
2042
- key: "1",
2043
- tab: [{
2044
- type: "text",
2045
- value: "Tab"
2046
- }],
2047
- children: [{
2048
- type: "text",
2049
- value: "Tab content"
2050
- }]
2051
- }
2052
- }, {
2053
- type: "component",
2054
- name: "AntdTabPane",
2055
- props: {
2056
- key: "2",
2057
- tab: [{
2058
- type: "text",
2059
- value: "Tab"
2060
- }],
2061
- children: [{
2062
- type: "text",
2063
- value: "Tab content"
2064
- }]
2065
- }
2066
- }]
2067
- }
2068
- },
2069
- actions: [{
2070
- type: "custom-action",
2071
- control: NavigateTabs
2072
- }, {
2073
- type: "button-action",
2074
- label: "Add new tab",
2075
- onClick: function onClick(_ref2) {
2076
- var componentProps = _ref2.componentProps,
2077
- studioOps = _ref2.studioOps;
2078
- // Get the first positive integer that isn't already a key
2079
- var generateNewKey = function generateNewKey() {
2080
- var keysSet = new Set();
2081
- traverseReactEltTree(componentProps.children, function (elt) {
2082
- if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2083
- keysSet.add(elt.key);
2120
+ defaultValue: [
2121
+ {
2122
+ type: "component",
2123
+ name: "AntdTabPane",
2124
+ props: {
2125
+ key: "1",
2126
+ tab: [
2127
+ {
2128
+ type: "text",
2129
+ value: "Tab"
2130
+ }
2131
+ ],
2132
+ children: [
2133
+ {
2134
+ type: "text",
2135
+ value: "Tab content"
2136
+ }
2137
+ ]
2084
2138
  }
2085
- });
2086
- for (var keyCandidate = 1; keyCandidate <= keysSet.size + 1; keyCandidate++) {
2087
- var strKey = keyCandidate.toString();
2088
- if (!keysSet.has(strKey)) {
2089
- return strKey;
2139
+ },
2140
+ {
2141
+ type: "component",
2142
+ name: "AntdTabPane",
2143
+ props: {
2144
+ key: "2",
2145
+ tab: [
2146
+ {
2147
+ type: "text",
2148
+ value: "Tab"
2149
+ }
2150
+ ],
2151
+ children: [
2152
+ {
2153
+ type: "text",
2154
+ value: "Tab content"
2155
+ }
2156
+ ]
2090
2157
  }
2091
2158
  }
2092
- return undefined;
2093
- };
2094
- var tabKey = generateNewKey();
2095
- studioOps.appendToSlot({
2096
- type: "component",
2097
- name: "AntdTabPane",
2098
- props: {
2099
- key: tabKey
2100
- }
2101
- }, "children");
2102
- studioOps.updateProps({
2103
- activeKey: tabKey
2104
- });
2159
+ ]
2105
2160
  }
2106
- }, {
2107
- type: "button-action",
2108
- label: "Delete current tab",
2109
- onClick: function onClick(_ref3) {
2110
- var componentProps = _ref3.componentProps,
2111
- studioOps = _ref3.studioOps;
2112
- if (componentProps.activeKey) {
2113
- var tabPanes = [];
2114
- traverseReactEltTree(componentProps.children, function (elt) {
2115
- if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2116
- tabPanes.push(elt.key);
2161
+ },
2162
+ actions: [
2163
+ {
2164
+ type: "custom-action",
2165
+ control: NavigateTabs
2166
+ },
2167
+ {
2168
+ type: "button-action",
2169
+ label: "Add new tab",
2170
+ onClick: ({ componentProps, studioOps }) => {
2171
+ const generateNewKey = () => {
2172
+ let keysSet = /* @__PURE__ */ new Set();
2173
+ traverseReactEltTree(componentProps.children, (elt) => {
2174
+ if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2175
+ keysSet.add(elt.key);
2176
+ }
2177
+ });
2178
+ for (let keyCandidate = 1; keyCandidate <= keysSet.size + 1; keyCandidate++) {
2179
+ const strKey = keyCandidate.toString();
2180
+ if (!keysSet.has(strKey)) {
2181
+ return strKey;
2182
+ }
2117
2183
  }
2118
- });
2119
- var activeKey = componentProps.activeKey;
2120
- var currTabPos = tabPanes.findIndex(function (tabKey) {
2121
- return tabKey === activeKey;
2122
- });
2123
- if (currTabPos !== -1) {
2124
- studioOps.removeFromSlotAt(currTabPos, "children");
2125
- if (tabPanes.length - 1 > 0) {
2126
- var prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
2127
- studioOps.updateProps({
2128
- activeKey: tabPanes[prevTabPos]
2129
- });
2184
+ return void 0;
2185
+ };
2186
+ const tabKey = generateNewKey();
2187
+ studioOps.appendToSlot({
2188
+ type: "component",
2189
+ name: "AntdTabPane",
2190
+ props: {
2191
+ key: tabKey
2192
+ }
2193
+ }, "children");
2194
+ studioOps.updateProps({ activeKey: tabKey });
2195
+ }
2196
+ },
2197
+ {
2198
+ type: "button-action",
2199
+ label: "Delete current tab",
2200
+ onClick: ({ componentProps, studioOps }) => {
2201
+ if (componentProps.activeKey) {
2202
+ const tabPanes = [];
2203
+ traverseReactEltTree(componentProps.children, (elt) => {
2204
+ if ((elt == null ? void 0 : elt.type) === TabPane && typeof (elt == null ? void 0 : elt.key) === "string") {
2205
+ tabPanes.push(elt.key);
2206
+ }
2207
+ });
2208
+ const activeKey = componentProps.activeKey;
2209
+ const currTabPos = tabPanes.findIndex((tabKey) => {
2210
+ return tabKey === activeKey;
2211
+ });
2212
+ if (currTabPos !== -1) {
2213
+ studioOps.removeFromSlotAt(currTabPos, "children");
2214
+ if (tabPanes.length - 1 > 0) {
2215
+ const prevTabPos = (currTabPos - 1 + tabPanes.length) % tabPanes.length;
2216
+ studioOps.updateProps({ activeKey: tabPanes[prevTabPos] });
2217
+ }
2130
2218
  }
2131
2219
  }
2132
2220
  }
2221
+ },
2222
+ {
2223
+ type: "custom-action",
2224
+ control: OutlineMessage
2133
2225
  }
2134
- }, {
2135
- type: "custom-action",
2136
- control: OutlineMessage
2137
- }],
2226
+ ],
2138
2227
  importPath: "@plasmicpkgs/antd/skinny/registerTabs",
2139
2228
  importName: "Tabs"
2140
2229
  };
2141
2230
  function registerTabs(loader, customTabsMeta) {
2142
- var doRegisterComponent = function doRegisterComponent() {
2143
- return loader ? loader.registerComponent.apply(loader, arguments) : registerComponent.apply(void 0, arguments);
2144
- };
2231
+ const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
2145
2232
  doRegisterComponent(Tabs, customTabsMeta != null ? customTabsMeta : tabsMeta);
2146
2233
  }
2147
2234
 
@@ -2177,5 +2264,5 @@ function registerAll(loader) {
2177
2264
  registerRate(loader);
2178
2265
  }
2179
2266
 
2180
- export { Collapse, Dropdown, Slider, Tabs, buttonMeta, carouselMeta, checkboxGroupMeta, checkboxMeta, collapsteMeta, collapstePanelMeta, dropdownButtonMeta, dropdownMeta, inputGroupMeta, inputMeta, inputPasswordMeta, inputSearchMeta, inputTextAreaMeta, menuDividerMeta, menuItemGroupMeta, menuItemMeta, menuMeta, optGroupMeta, optionMeta, rateMeta, registerAll, registerButton, registerCarousel, registerCheckbox, registerCheckboxGroup, registerCollapse, registerCollapsePanel, registerDropdown, registerDropdownButton, registerInput, registerInputGroup, registerInputPassword, registerInputSearch, registerInputTextArea, registerMenu, registerMenuDivider, registerMenuItem, registerMenuItemGroup, registerOptGroup, registerOption, registerRate, registerSelect, registerSlider, registerSubMenu, registerSwitch, registerTabPane, registerTabs, selectMeta, sliderMeta, subMenuMeta, switchMeta, tabPaneMeta, tabsMeta };
2267
+ export { Collapse, Dropdown, Slider, TabPane, Tabs, buttonMeta, carouselMeta, checkboxGroupMeta, checkboxMeta, collapsteMeta, collapstePanelMeta, dropdownButtonMeta, dropdownMeta, inputGroupMeta, inputMeta, inputPasswordMeta, inputSearchMeta, inputTextAreaMeta, menuDividerMeta, menuItemGroupMeta, menuItemMeta, menuMeta, optGroupMeta, optionMeta, rateMeta, registerAll, registerButton, registerCarousel, registerCheckbox, registerCheckboxGroup, registerCollapse, registerCollapsePanel, registerDropdown, registerDropdownButton, registerInput, registerInputGroup, registerInputPassword, registerInputSearch, registerInputTextArea, registerMenu, registerMenuDivider, registerMenuItem, registerMenuItemGroup, registerOptGroup, registerOption, registerRate, registerSelect, registerSlider, registerSubMenu, registerSwitch, registerTabPane, registerTabs, selectMeta, sliderMeta, subMenuMeta, switchMeta, tabPaneMeta, tabsMeta };
2181
2268
  //# sourceMappingURL=antd.esm.js.map