@plasmicpkgs/antd 0.0.106 → 2.0.2
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.css +0 -27184
- package/dist/antd.esm.js +724 -720
- 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 +2353 -5
- package/dist/index.js.map +1 -0
- 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 +13 -14
- package/dist/registerMenu.d.ts +14 -15
- 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 +14 -13
- package/dist/registerable.d.ts +4 -4
- package/package.json +14 -9
- package/skinny/customControls-f5378e2f.js +20 -0
- package/skinny/{customControls-8143c119.js.map → customControls-f5378e2f.js.map} +1 -1
- package/skinny/customControls.d.ts +17 -17
- package/skinny/package.json +2 -2
- package/skinny/registerButton.d.ts +5 -5
- package/skinny/registerButton.js +78 -94
- package/skinny/registerButton.js.map +1 -1
- package/skinny/registerCarousel.d.ts +5 -5
- package/skinny/registerCarousel.js +64 -80
- package/skinny/registerCarousel.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +8 -8
- package/skinny/registerCheckbox.js +123 -140
- package/skinny/registerCheckbox.js.map +1 -1
- package/skinny/registerCollapse.d.ts +14 -14
- package/skinny/registerCollapse.js +172 -173
- package/skinny/registerCollapse.js.map +1 -1
- package/skinny/registerDropdown.d.ts +11 -11
- package/skinny/registerDropdown.js +172 -190
- package/skinny/registerDropdown.js.map +1 -1
- package/skinny/registerInput.d.ts +13 -14
- package/skinny/registerInput.js +360 -341
- package/skinny/registerInput.js.map +1 -1
- package/skinny/registerMenu.d.ts +14 -15
- package/skinny/registerMenu.js +274 -326
- package/skinny/registerMenu.js.map +1 -1
- package/skinny/registerOption.d.ts +8 -8
- package/skinny/registerOption.js +72 -95
- 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 +128 -144
- package/skinny/registerSelect.js.map +1 -1
- package/skinny/registerSlider.d.ts +19 -19
- package/skinny/registerSlider.js +130 -120
- package/skinny/registerSlider.js.map +1 -1
- package/skinny/registerSwitch.d.ts +5 -5
- package/skinny/registerSwitch.js +53 -69
- package/skinny/registerSwitch.js.map +1 -1
- package/skinny/registerTable.d.ts +30 -30
- package/skinny/registerTable.js +201 -204
- package/skinny/registerTable.js.map +1 -1
- package/skinny/registerTabs.d.ts +14 -13
- package/skinny/registerTabs.js +342 -330
- package/skinny/registerTabs.js.map +1 -1
- package/skinny/registerable.d.ts +4 -4
- package/dist/antd.cjs.development.js +0 -2325
- package/dist/antd.cjs.development.js.map +0 -1
- package/dist/antd.cjs.production.min.js +0 -2
- package/dist/antd.cjs.production.min.js.map +0 -1
- package/skinny/customControls-8143c119.js +0 -27
- package/skinny/index.d.ts +0 -16
- package/skinny/tslib.es6-40998fef.js +0 -59
- package/skinny/tslib.es6-40998fef.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerSelect.js","sources":["../src/registerSelect.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Select from \"antd/
|
|
1
|
+
{"version":3,"file":"registerSelect.js","sources":["../src/registerSelect.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Select from \"antd/es/select\";\nimport { Option } from \"rc-select\";\nimport React from \"react\";\nimport { traverseReactEltTree } from \"./customControls\";\nimport { Registerable } from \"./registerable\";\n\ntype SelectProps = React.ComponentProps<typeof Select>;\n\nexport const selectMeta: ComponentMeta<SelectProps> = {\n name: \"AntdSelect\",\n displayName: \"Antd Select\",\n props: {\n allowClear: {\n type: \"boolean\",\n description: \"Show clear button\",\n defaultValueHint: false,\n },\n autoClearSearchValue: {\n type: \"boolean\",\n description:\n \"Whether the current search will be cleared on selecting an item\",\n defaultValueHint: true,\n hidden: (props) => props.mode !== \"multiple\" && props.mode !== \"tags\",\n },\n autoFocus: {\n type: \"boolean\",\n description: \"Get focus by default\",\n defaultValueHint: false,\n },\n bordered: {\n type: \"boolean\",\n description: \"Whether has border style\",\n defaultValueHint: true,\n },\n disabled: {\n type: \"boolean\",\n description: \"Whether disabled select\",\n defaultValueHint: false,\n },\n listHeight: {\n type: \"number\",\n description: \"Config popup height\",\n defaultValueHint: 256,\n },\n loading: {\n type: \"boolean\",\n description: \"Indicate loading state\",\n defaultValueHint: false,\n },\n mode: {\n type: \"choice\",\n options: [\"multiple\", \"tags\"],\n description: \"Set mode of Select\",\n },\n open: {\n type: \"boolean\",\n editOnly: true,\n uncontrolledProp: \"defaultOpen\",\n description: \"Initial open state of dropdown\",\n defaultValueHint: false,\n },\n placeholder: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"text\",\n value: \"Select\",\n },\n ],\n },\n showArrow: {\n type: \"boolean\",\n description: \"Whether to show the drop-down arrow\",\n defaultValueHint: true,\n },\n showSearch: {\n type: \"boolean\",\n description: \"Whether show search input in single mode\",\n defaultValueHint: false,\n },\n size: {\n type: \"choice\",\n options: [\"large\", \"middle\", \"small\"],\n description: \"Set mode of Select\",\n defaultValueHint: \"middle\",\n },\n value: {\n type: \"choice\",\n editOnly: true,\n uncontrolledProp: \"defaultValue\",\n description: \"Initial selected option\",\n options: (componentProps) => {\n const options = new Set<string>();\n traverseReactEltTree(componentProps.children, (elt) => {\n if (elt?.type === Option && typeof elt?.props?.value === \"string\") {\n options.add(elt.props.value);\n }\n });\n return Array.from(options.keys());\n },\n },\n virtual: {\n type: \"boolean\",\n description: \"Disable virtual scroll when set to false\",\n defaultValueHint: true,\n },\n children: {\n type: \"slot\",\n allowedComponents: [\"AntdOption, AntdOptionGroup\"],\n defaultValue: [\n {\n type: \"component\",\n name: \"AntdOption\",\n props: {\n value: \"Option\",\n children: {\n type: \"text\",\n value: \"Option\",\n },\n },\n },\n ],\n },\n },\n importPath: \"antd/es/select\",\n importName: \"Select\",\n isDefaultExport: true,\n};\n\nexport function registerSelect(\n loader?: Registerable,\n customSelectMeta?: ComponentMeta<SelectProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Select, customSelectMeta ?? selectMeta);\n}\n"],"names":[],"mappings":";;;;;MAWa,aAAyC;AAAA,EACpD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,aACE;AAAA,MACF,kBAAkB;AAAA,MAClB,QAAQ,CAAC,UAAU,MAAM,SAAS,cAAc,MAAM,SAAS;AAAA;AACjE,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC,YAAY,MAAM;AAAA,MAC5B,aAAa;AAAA;AACf,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,cAAc;AAAA,QACZ;AAAA,UACE,MAAM;AAAA,UACN,OAAO;AAAA;AACT;AACF;AACF,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC,SAAS,UAAU,OAAO;AAAA,MACpC,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,SAAS,CAAC,mBAAmB;AAC3B,cAAM,8BAAc;AACpB,6BAAqB,eAAe,UAAU,CAAC,QAAQ;AAhG/D;AAiGU,cAAI,4BAAK,UAAS,UAAU,yCAAY,UAAL,mBAAY,WAAU,UAAU;AACjE,oBAAQ,IAAI,IAAI,MAAM,KAAK;AAAA;AAC7B,SACD;AACD,eAAO,MAAM,KAAK,QAAQ,MAAM;AAAA;AAClC;AACF,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,mBAAmB,CAAC,6BAA6B;AAAA,MACjD,cAAc;AAAA,QACZ;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,YACL,OAAO;AAAA,YACP,UAAU;AAAA,cACR,MAAM;AAAA,cACN,OAAO;AAAA;AACT;AACF;AACF;AACF;AACF;AACF,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,iBAAiB;AACnB;wBAGE,QACA,kBACA;AACA,QAAM,sBAAgD,IAAI,SACxD,SAAS,OAAO,kBAAkB,GAAG,IAAI,IAAI,kBAAkB,GAAG,IAAI;AACxE,sBAAoB,QAAQ,8CAAoB,UAAU;AAC5D;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import type { SliderRangeProps, SliderSingleProps } from "antd/
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Registerable } from "./registerable";
|
|
5
|
-
|
|
6
|
-
value?: number;
|
|
7
|
-
defaultValue?: number;
|
|
8
|
-
value2?: number;
|
|
9
|
-
defaultValue2?: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const Slider: React.ForwardRefExoticComponent<
|
|
12
|
-
value?: number | undefined;
|
|
13
|
-
defaultValue?: number | undefined;
|
|
14
|
-
value2?: number | undefined;
|
|
15
|
-
defaultValue2?: number | undefined;
|
|
16
|
-
} & React.RefAttributes<unknown>>;
|
|
17
|
-
export declare const sliderMeta: ComponentMeta<SliderProps>;
|
|
18
|
-
export declare function registerSlider(loader?: Registerable, customSliderMeta?: ComponentMeta<SliderProps>): void;
|
|
19
|
-
export {};
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import type { SliderRangeProps, SliderSingleProps } from "antd/es/slider";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Registerable } from "./registerable";
|
|
5
|
+
type SliderProps = Omit<SliderSingleProps | SliderRangeProps, "value" | "defaultValue"> & {
|
|
6
|
+
value?: number;
|
|
7
|
+
defaultValue?: number;
|
|
8
|
+
value2?: number;
|
|
9
|
+
defaultValue2?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const Slider: React.ForwardRefExoticComponent<Omit<SliderSingleProps | SliderRangeProps, "defaultValue" | "value"> & {
|
|
12
|
+
value?: number | undefined;
|
|
13
|
+
defaultValue?: number | undefined;
|
|
14
|
+
value2?: number | undefined;
|
|
15
|
+
defaultValue2?: number | undefined;
|
|
16
|
+
} & React.RefAttributes<unknown>>;
|
|
17
|
+
export declare const sliderMeta: ComponentMeta<SliderProps>;
|
|
18
|
+
export declare function registerSlider(loader?: Registerable, customSliderMeta?: ComponentMeta<SliderProps>): void;
|
|
19
|
+
export {};
|
package/skinny/registerSlider.js
CHANGED
|
@@ -1,124 +1,134 @@
|
|
|
1
|
-
|
|
1
|
+
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
2
|
+
import AntdSlider from 'antd/es/slider';
|
|
3
|
+
import React from 'react';
|
|
2
4
|
|
|
3
|
-
Object.defineProperty
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
const Slider = React.forwardRef((_a, ref) => {
|
|
37
|
+
var _b = _a, { value, defaultValue, value2, defaultValue2 } = _b, props = __objRest(_b, ["value", "defaultValue", "value2", "defaultValue2"]);
|
|
38
|
+
const newProps = __spreadValues({}, props);
|
|
39
|
+
if (props.range) {
|
|
40
|
+
if (typeof value === "number" || typeof value2 === "number") {
|
|
41
|
+
newProps.value = [value != null ? value : 0, value2 != null ? value2 : 0];
|
|
42
|
+
}
|
|
43
|
+
if (typeof defaultValue === "number" || typeof defaultValue2 === "number") {
|
|
44
|
+
newProps.defaultValue = [defaultValue != null ? defaultValue : 0, defaultValue2 != null ? defaultValue2 : 0];
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
if (typeof value === "number") {
|
|
48
|
+
newProps.value = value;
|
|
49
|
+
}
|
|
50
|
+
if (typeof defaultValue === "number") {
|
|
51
|
+
newProps.defaultValue = defaultValue;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ React.createElement(AntdSlider, __spreadProps(__spreadValues({}, newProps), {
|
|
55
|
+
ref
|
|
56
|
+
}));
|
|
57
|
+
});
|
|
58
|
+
const sliderMeta = {
|
|
59
|
+
name: "AntdSlider",
|
|
60
|
+
displayName: "Antd Slider",
|
|
61
|
+
props: {
|
|
62
|
+
max: {
|
|
63
|
+
type: "number",
|
|
64
|
+
description: "The maximum value the slider can slide to",
|
|
65
|
+
defaultValueHint: 100
|
|
66
|
+
},
|
|
67
|
+
min: {
|
|
68
|
+
type: "number",
|
|
69
|
+
description: "The minimum value the slider can slide to",
|
|
70
|
+
defaultValueHint: 0
|
|
71
|
+
},
|
|
72
|
+
included: {
|
|
73
|
+
type: "boolean",
|
|
74
|
+
description: "Make effect when marks not null, true means containment and false means coordinative",
|
|
75
|
+
defaultValueHint: true
|
|
76
|
+
},
|
|
77
|
+
disabled: {
|
|
78
|
+
type: "boolean",
|
|
79
|
+
description: "If true, the slider will not be interactable",
|
|
80
|
+
defaultValueHint: false
|
|
81
|
+
},
|
|
82
|
+
range: {
|
|
83
|
+
type: "boolean",
|
|
84
|
+
description: "Dual thumb mode",
|
|
85
|
+
defaultValueHint: false
|
|
86
|
+
},
|
|
87
|
+
reverse: {
|
|
88
|
+
type: "boolean",
|
|
89
|
+
description: "Reverse the component",
|
|
90
|
+
defaultValueHint: false
|
|
91
|
+
},
|
|
92
|
+
vertical: {
|
|
93
|
+
type: "boolean",
|
|
94
|
+
description: "If true, the slider will be vertical",
|
|
95
|
+
defaultValueHint: false
|
|
96
|
+
},
|
|
97
|
+
value: {
|
|
98
|
+
type: "number",
|
|
99
|
+
editOnly: true,
|
|
100
|
+
uncontrolledProp: "defaultValue",
|
|
101
|
+
description: "The default value of slider"
|
|
102
|
+
},
|
|
103
|
+
value2: {
|
|
104
|
+
type: "number",
|
|
105
|
+
displayName: "value 2",
|
|
106
|
+
editOnly: true,
|
|
107
|
+
uncontrolledProp: "defaultValue2",
|
|
108
|
+
description: "The default value for the second value of the slider",
|
|
109
|
+
hidden: (props) => !props.range
|
|
110
|
+
},
|
|
111
|
+
step: {
|
|
112
|
+
type: "number",
|
|
113
|
+
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",
|
|
114
|
+
defaultValueHint: 1
|
|
115
|
+
},
|
|
116
|
+
marks: {
|
|
117
|
+
type: "object",
|
|
118
|
+
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"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
defaultStyles: {
|
|
122
|
+
width: "200px",
|
|
123
|
+
maxWidth: "100%"
|
|
124
|
+
},
|
|
125
|
+
importPath: "@plasmicpkgs/antd/skinny/registerSlider",
|
|
126
|
+
importName: "Slider"
|
|
127
|
+
};
|
|
128
|
+
function registerSlider(loader, customSliderMeta) {
|
|
129
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
130
|
+
doRegisterComponent(Slider, customSliderMeta != null ? customSliderMeta : sliderMeta);
|
|
119
131
|
}
|
|
120
132
|
|
|
121
|
-
|
|
122
|
-
exports.registerSlider = registerSlider;
|
|
123
|
-
exports.sliderMeta = sliderMeta;
|
|
133
|
+
export { Slider, registerSlider, sliderMeta };
|
|
124
134
|
//# sourceMappingURL=registerSlider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerSlider.js","sources":["../src/registerSlider.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport {
|
|
1
|
+
{"version":3,"file":"registerSlider.js","sources":["../src/registerSlider.tsx"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport type { SliderRangeProps, SliderSingleProps } from \"antd/es/slider\";\nimport { default as AntdSlider } from \"antd/es/slider\";\nimport React from \"react\";\nimport { Registerable } from \"./registerable\";\n\ntype SliderProps = Omit<\n SliderSingleProps | SliderRangeProps,\n \"value\" | \"defaultValue\"\n> & {\n value?: number;\n defaultValue?: number;\n value2?: number;\n defaultValue2?: number;\n};\n\nexport const Slider = React.forwardRef<unknown, SliderProps>(\n ({ value, defaultValue, value2, defaultValue2, ...props }, ref) => {\n const newProps = { ...props } as SliderSingleProps | SliderRangeProps;\n if (props.range) {\n if (typeof value === \"number\" || typeof value2 === \"number\") {\n newProps.value = [value ?? 0, value2 ?? 0];\n }\n if (\n typeof defaultValue === \"number\" ||\n typeof defaultValue2 === \"number\"\n ) {\n newProps.defaultValue = [defaultValue ?? 0, defaultValue2 ?? 0];\n }\n } else {\n if (typeof value === \"number\") {\n newProps.value = value;\n }\n if (typeof defaultValue === \"number\") {\n newProps.defaultValue = defaultValue;\n }\n }\n return <AntdSlider {...newProps} ref={ref} />;\n }\n);\n\nexport const sliderMeta: ComponentMeta<SliderProps> = {\n name: \"AntdSlider\",\n displayName: \"Antd Slider\",\n props: {\n max: {\n type: \"number\",\n description: \"The maximum value the slider can slide to\",\n defaultValueHint: 100,\n },\n min: {\n type: \"number\",\n description: \"The minimum value the slider can slide to\",\n defaultValueHint: 0,\n },\n included: {\n type: \"boolean\",\n description:\n \"Make effect when marks not null, true means containment and false means coordinative\",\n defaultValueHint: true,\n },\n disabled: {\n type: \"boolean\",\n description: \"If true, the slider will not be interactable\",\n defaultValueHint: false,\n },\n range: {\n type: \"boolean\",\n description: \"Dual thumb mode\",\n defaultValueHint: false,\n },\n reverse: {\n type: \"boolean\",\n description: \"Reverse the component\",\n defaultValueHint: false,\n },\n vertical: {\n type: \"boolean\",\n description: \"If true, the slider will be vertical\",\n defaultValueHint: false,\n },\n value: {\n type: \"number\",\n editOnly: true,\n uncontrolledProp: \"defaultValue\",\n description: \"The default value of slider\",\n },\n value2: {\n type: \"number\",\n displayName: \"value 2\",\n editOnly: true,\n uncontrolledProp: \"defaultValue2\",\n description: \"The default value for the second value of the slider\",\n hidden: (props) => !props.range,\n },\n step: {\n type: \"number\",\n description:\n \"The granularity the slider can step through values. Must greater than 0, and be divided by (max - min).\" +\n \" When marks no null, step can be null\",\n defaultValueHint: 1,\n },\n marks: {\n type: \"object\",\n description:\n \"Tick mark of Slider, type of key must be number, and must in closed interval [min, max],\" +\n \" each mark can declare its own style\",\n },\n },\n defaultStyles: {\n width: \"200px\",\n maxWidth: \"100%\",\n },\n importPath: \"@plasmicpkgs/antd/skinny/registerSlider\",\n importName: \"Slider\",\n};\n\nexport function registerSlider(\n loader?: Registerable,\n customSliderMeta?: ComponentMeta<SliderProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Slider, customSliderMeta ?? sliderMeta);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkBa,SAAS,MAAM,WAC1B,CAAC,IAA0D,QAAQ;AAAlE,eAAE,SAAO,cAAc,QAAQ,kBAA/B,IAAiD,kBAAjD,IAAiD,CAA/C,SAAO,gBAAc,UAAQ;AAC9B,QAAM,WAAW,mBAAK;AACtB,MAAI,MAAM,OAAO;AACf,QAAI,OAAO,UAAU,YAAY,OAAO,WAAW,UAAU;AAC3D,eAAS,QAAQ,CAAC,wBAAS,GAAG,0BAAU,CAAC;AAAA;AAE3C,QACE,OAAO,iBAAiB,YACxB,OAAO,kBAAkB,UACzB;AACA,eAAS,eAAe,CAAC,sCAAgB,GAAG,wCAAiB,CAAC;AAAA;AAChE,SACK;AACL,QAAI,OAAO,UAAU,UAAU;AAC7B,eAAS,QAAQ;AAAA;AAEnB,QAAI,OAAO,iBAAiB,UAAU;AACpC,eAAS,eAAe;AAAA;AAC1B;AAEF,6CAAQ,6CAAe,WAAf;AAAA,IAAyB;AAAA,IAAU;AAC7C,CACF;MAEa,aAAyC;AAAA,EACpD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,IACL,KAAK;AAAA,MACH,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,KAAK;AAAA,MACH,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aACE;AAAA,MACF,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB,aAAa;AAAA;AACf,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,MACb,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,QAAQ,CAAC,UAAU,CAAC,MAAM;AAAA;AAC5B,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aACE;AAAA,MAEF,kBAAkB;AAAA;AACpB,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aACE;AAAA;AAEJ;AACF,EACA,eAAe;AAAA,IACb,OAAO;AAAA,IACP,UAAU;AAAA;AACZ,EACA,YAAY;AAAA,EACZ,YAAY;AACd;wBAGE,QACA,kBACA;AACA,QAAM,sBAAgD,IAAI,SACxD,SAAS,OAAO,kBAAkB,GAAG,IAAI,IAAI,kBAAkB,GAAG,IAAI;AACxE,sBAAoB,QAAQ,8CAAoB,UAAU;AAC5D;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
import { SwitchProps } from "antd/
|
|
3
|
-
import { Registerable } from "./registerable";
|
|
4
|
-
export declare const switchMeta: ComponentMeta<SwitchProps>;
|
|
5
|
-
export declare function registerSwitch(loader?: Registerable, customSwitchMeta?: ComponentMeta<SwitchProps>): void;
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host/registerComponent";
|
|
2
|
+
import { SwitchProps } from "antd/es/switch";
|
|
3
|
+
import { Registerable } from "./registerable";
|
|
4
|
+
export declare const switchMeta: ComponentMeta<SwitchProps>;
|
|
5
|
+
export declare function registerSwitch(loader?: Registerable, customSwitchMeta?: ComponentMeta<SwitchProps>): void;
|
package/skinny/registerSwitch.js
CHANGED
|
@@ -1,73 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
2
|
+
import Switch from 'antd/es/switch';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
defaultValueHint: "default",
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
importPath: "antd/lib/switch",
|
|
57
|
-
importName: "Switch",
|
|
58
|
-
isDefaultExport: true,
|
|
59
|
-
};
|
|
60
|
-
function registerSwitch(loader, customSwitchMeta) {
|
|
61
|
-
var doRegisterComponent = function () {
|
|
62
|
-
var args = [];
|
|
63
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
64
|
-
args[_i] = arguments[_i];
|
|
65
|
-
}
|
|
66
|
-
return loader ? loader.registerComponent.apply(loader, args) : registerComponent__default['default'].apply(void 0, args);
|
|
67
|
-
};
|
|
68
|
-
doRegisterComponent(Switch__default['default'], customSwitchMeta !== null && customSwitchMeta !== void 0 ? customSwitchMeta : switchMeta);
|
|
4
|
+
const switchMeta = {
|
|
5
|
+
name: "AntdSwitch",
|
|
6
|
+
displayName: "Antd Switch",
|
|
7
|
+
props: {
|
|
8
|
+
autoFocus: {
|
|
9
|
+
type: "boolean",
|
|
10
|
+
description: "Whether get focus when component mounted",
|
|
11
|
+
defaultValueHint: false
|
|
12
|
+
},
|
|
13
|
+
checked: {
|
|
14
|
+
type: "boolean",
|
|
15
|
+
editOnly: true,
|
|
16
|
+
uncontrolledProp: "defaultChecked",
|
|
17
|
+
description: "Whether to set the initial state",
|
|
18
|
+
defaultValueHint: false
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: "boolean",
|
|
22
|
+
description: "Disable switch",
|
|
23
|
+
defaultValueHint: false
|
|
24
|
+
},
|
|
25
|
+
loading: {
|
|
26
|
+
type: "boolean",
|
|
27
|
+
description: "Loading state of switch",
|
|
28
|
+
defaultValueHint: false
|
|
29
|
+
},
|
|
30
|
+
checkedChildren: {
|
|
31
|
+
type: "slot",
|
|
32
|
+
defaultValue: [],
|
|
33
|
+
hidePlaceholder: true
|
|
34
|
+
},
|
|
35
|
+
unCheckedChildren: {
|
|
36
|
+
type: "slot",
|
|
37
|
+
defaultValue: [],
|
|
38
|
+
hidePlaceholder: true
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
type: "choice",
|
|
42
|
+
options: ["small", "default"],
|
|
43
|
+
description: "The size of the Switch",
|
|
44
|
+
defaultValueHint: "default"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
importPath: "antd/es/switch",
|
|
48
|
+
importName: "Switch",
|
|
49
|
+
isDefaultExport: true
|
|
50
|
+
};
|
|
51
|
+
function registerSwitch(loader, customSwitchMeta) {
|
|
52
|
+
const doRegisterComponent = (...args) => loader ? loader.registerComponent(...args) : registerComponent(...args);
|
|
53
|
+
doRegisterComponent(Switch, customSwitchMeta != null ? customSwitchMeta : switchMeta);
|
|
69
54
|
}
|
|
70
55
|
|
|
71
|
-
|
|
72
|
-
exports.switchMeta = switchMeta;
|
|
56
|
+
export { registerSwitch, switchMeta };
|
|
73
57
|
//# sourceMappingURL=registerSwitch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerSwitch.js","sources":["../src/registerSwitch.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Switch, { SwitchProps } from \"antd/
|
|
1
|
+
{"version":3,"file":"registerSwitch.js","sources":["../src/registerSwitch.ts"],"sourcesContent":["import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport Switch, { SwitchProps } from \"antd/es/switch\";\nimport { Registerable } from \"./registerable\";\n\nexport const switchMeta: ComponentMeta<SwitchProps> = {\n name: \"AntdSwitch\",\n displayName: \"Antd Switch\",\n props: {\n autoFocus: {\n type: \"boolean\",\n description: \"Whether get focus when component mounted\",\n defaultValueHint: false,\n },\n checked: {\n type: \"boolean\",\n editOnly: true,\n uncontrolledProp: \"defaultChecked\",\n description: \"Whether to set the initial state\",\n defaultValueHint: false,\n },\n disabled: {\n type: \"boolean\",\n description: \"Disable switch\",\n defaultValueHint: false,\n },\n loading: {\n type: \"boolean\",\n description: \"Loading state of switch\",\n defaultValueHint: false,\n },\n checkedChildren: {\n type: \"slot\",\n defaultValue: [],\n hidePlaceholder: true,\n },\n unCheckedChildren: {\n type: \"slot\",\n defaultValue: [],\n hidePlaceholder: true,\n },\n size: {\n type: \"choice\",\n options: [\"small\", \"default\"],\n description: \"The size of the Switch\",\n defaultValueHint: \"default\",\n },\n },\n importPath: \"antd/es/switch\",\n importName: \"Switch\",\n isDefaultExport: true,\n};\n\nexport function registerSwitch(\n loader?: Registerable,\n customSwitchMeta?: ComponentMeta<SwitchProps>\n) {\n const doRegisterComponent: typeof registerComponent = (...args) =>\n loader ? loader.registerComponent(...args) : registerComponent(...args);\n doRegisterComponent(Switch, customSwitchMeta ?? switchMeta);\n}\n"],"names":[],"mappings":";;;MAMa,aAAyC;AAAA,EACpD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,MACV,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB,IACA,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,cAAc;AAAC,MACf,iBAAiB;AAAA;AACnB,IACA,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,cAAc;AAAC,MACf,iBAAiB;AAAA;AACnB,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS,CAAC,SAAS,SAAS;AAAA,MAC5B,aAAa;AAAA,MACb,kBAAkB;AAAA;AACpB;AACF,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,iBAAiB;AACnB;wBAGE,QACA,kBACA;AACA,QAAM,sBAAgD,IAAI,SACxD,SAAS,OAAO,kBAAkB,GAAG,IAAI,IAAI,kBAAkB,GAAG,IAAI;AACxE,sBAAoB,QAAQ,8CAAoB,UAAU;AAC5D;;;;"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Registerable } from "./registerable";
|
|
4
|
-
interface TableColumnProps {
|
|
5
|
-
columnIndex: number;
|
|
6
|
-
title?: string;
|
|
7
|
-
dataIndex: string | string[];
|
|
8
|
-
columnTemplate: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export declare function TableColumn(_props: TableColumnProps): null;
|
|
11
|
-
export interface TableValueProps {
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function TableValue(props: TableValueProps): JSX.Element;
|
|
15
|
-
export interface TableWrapperProps {
|
|
16
|
-
className?: string;
|
|
17
|
-
items: Array<any>;
|
|
18
|
-
columns: React.ReactNode;
|
|
19
|
-
size?: string;
|
|
20
|
-
pagination?: boolean;
|
|
21
|
-
onSelect?: (record: any) => void;
|
|
22
|
-
}
|
|
23
|
-
export declare function TableWrapper(props: TableWrapperProps): JSX.Element;
|
|
24
|
-
export declare const tableMeta: ComponentMeta<TableWrapperProps>;
|
|
25
|
-
export declare const tableColumnMeta: ComponentMeta<TableColumnProps>;
|
|
26
|
-
export declare const tableValueMeta: ComponentMeta<TableValueProps>;
|
|
27
|
-
export declare function registerTable(loader?: Registerable, customMeta?: ComponentMeta<TableWrapperProps>): void;
|
|
28
|
-
export declare function registerTableColumn(loader?: Registerable, customMeta?: ComponentMeta<TableColumnProps>): void;
|
|
29
|
-
export declare function registerTableValue(loader?: Registerable, customMeta?: ComponentMeta<TableValueProps>): void;
|
|
30
|
-
export {};
|
|
1
|
+
import { ComponentMeta } from "@plasmicapp/host";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Registerable } from "./registerable";
|
|
4
|
+
interface TableColumnProps {
|
|
5
|
+
columnIndex: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
dataIndex: string | string[];
|
|
8
|
+
columnTemplate: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function TableColumn(_props: TableColumnProps): null;
|
|
11
|
+
export interface TableValueProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function TableValue(props: TableValueProps): JSX.Element;
|
|
15
|
+
export interface TableWrapperProps {
|
|
16
|
+
className?: string;
|
|
17
|
+
items: Array<any>;
|
|
18
|
+
columns: React.ReactNode;
|
|
19
|
+
size?: string;
|
|
20
|
+
pagination?: boolean;
|
|
21
|
+
onSelect?: (record: any) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function TableWrapper(props: TableWrapperProps): JSX.Element;
|
|
24
|
+
export declare const tableMeta: ComponentMeta<TableWrapperProps>;
|
|
25
|
+
export declare const tableColumnMeta: ComponentMeta<TableColumnProps>;
|
|
26
|
+
export declare const tableValueMeta: ComponentMeta<TableValueProps>;
|
|
27
|
+
export declare function registerTable(loader?: Registerable, customMeta?: ComponentMeta<TableWrapperProps>): void;
|
|
28
|
+
export declare function registerTableColumn(loader?: Registerable, customMeta?: ComponentMeta<TableColumnProps>): void;
|
|
29
|
+
export declare function registerTableValue(loader?: Registerable, customMeta?: ComponentMeta<TableValueProps>): void;
|
|
30
|
+
export {};
|