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