@plasmicpkgs/antd5 0.0.144 → 0.0.146

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.
@@ -0,0 +1,276 @@
1
+ import { Pagination } from 'antd';
2
+ import React, { useEffect } from 'react';
3
+ import { r as registerComponentHelper } from './utils-7d8f2418.esm.js';
4
+ import '@plasmicapp/host/registerComponent';
5
+ import '@plasmicapp/host/registerGlobalContext';
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __defProps = Object.defineProperties;
9
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
10
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
12
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __spreadValues = (a, b) => {
15
+ for (var prop in b || (b = {}))
16
+ if (__hasOwnProp.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ if (__getOwnPropSymbols)
19
+ for (var prop of __getOwnPropSymbols(b)) {
20
+ if (__propIsEnum.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ }
23
+ return a;
24
+ };
25
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ function AntdPagination(props) {
39
+ const _a = props, { paginatedUrl, pageSizeOptions } = _a, rest = __objRest(_a, ["paginatedUrl", "pageSizeOptions"]);
40
+ useEffect(() => {
41
+ if (props.current && props.pageSize && props.onChange) {
42
+ props.onChange(props.current, props.pageSize);
43
+ }
44
+ }, []);
45
+ return /* @__PURE__ */ React.createElement(
46
+ Pagination,
47
+ __spreadValues({
48
+ pageSizeOptions: pageSizeOptions == null ? void 0 : pageSizeOptions.filter((i) => i == null ? void 0 : i.pageSize).map((i) => i.pageSize),
49
+ itemRender: paginatedUrl ? (pageNo, _, originalElement) => {
50
+ var _a2, _b;
51
+ if (!React.isValidElement(originalElement) || !props.pageSize) {
52
+ return originalElement;
53
+ }
54
+ let rel = void 0;
55
+ if (props.current) {
56
+ rel = pageNo === props.current ? "self" : pageNo === props.current - 1 ? "prev" : pageNo === props.current + 1 ? "next" : void 0;
57
+ }
58
+ const href = paginatedUrl(pageNo, props.pageSize);
59
+ return React.cloneElement(originalElement, __spreadProps(__spreadValues({}, originalElement.props), {
60
+ rel,
61
+ href,
62
+ style: __spreadProps(__spreadValues({}, (_b = (_a2 = originalElement.props) == null ? void 0 : _a2.style) != null ? _b : {}), {
63
+ pointerEvents: "none"
64
+ })
65
+ }));
66
+ } : void 0
67
+ }, rest)
68
+ );
69
+ }
70
+ const paginationComponentName = "plasmic-antd5-pagination";
71
+ const paginationHelpers = {
72
+ states: {
73
+ pageSize: {
74
+ onChangeArgsToValue: (_, pageSize) => pageSize
75
+ },
76
+ startIndex: {
77
+ onChangeArgsToValue: (currentPage, pageSize) => (currentPage - 1) * pageSize
78
+ },
79
+ endIndex: {
80
+ onChangeArgsToValue: (currentPage, pageSize) => pageSize * currentPage - 1
81
+ }
82
+ }
83
+ };
84
+ function registerPagination(loader) {
85
+ registerComponentHelper(loader, AntdPagination, {
86
+ name: paginationComponentName,
87
+ displayName: "Pagination",
88
+ props: {
89
+ current: {
90
+ editOnly: true,
91
+ uncontrolledProp: "defaultCurrent",
92
+ type: "number",
93
+ displayName: "Current Page",
94
+ description: `Default current page`,
95
+ defaultValue: 1
96
+ },
97
+ total: {
98
+ type: "number",
99
+ defaultValueHint: 0,
100
+ description: `Total number of data items`
101
+ },
102
+ pageSize: {
103
+ editOnly: true,
104
+ uncontrolledProp: "defaultPageSize",
105
+ type: "number",
106
+ displayName: "Page size",
107
+ description: `Default number of items per page`,
108
+ defaultValue: 10
109
+ },
110
+ disabled: {
111
+ type: "boolean",
112
+ defaultValueHint: false,
113
+ description: `Disable pagination controls`
114
+ },
115
+ hideOnSinglePage: {
116
+ type: "boolean",
117
+ defaultValueHint: false,
118
+ advanced: true,
119
+ description: `Hide pager on single page`
120
+ },
121
+ showLessItems: {
122
+ type: "boolean",
123
+ defaultValueHint: false,
124
+ advanced: true,
125
+ description: `Show less page items`,
126
+ hidden: (ps) => !!ps.simple
127
+ },
128
+ showQuickJumper: {
129
+ type: "boolean",
130
+ defaultValueHint: false,
131
+ advanced: true,
132
+ description: `Show "Go to page" control to enable jumping to pages directly`,
133
+ hidden: (ps) => !!ps.simple
134
+ },
135
+ showSizeChanger: {
136
+ type: "boolean",
137
+ defaultValueHint: (ps) => ps.total ? ps.total > 50 : false,
138
+ advanced: true,
139
+ description: `Show page size selector`,
140
+ hidden: (ps) => !!ps.simple
141
+ },
142
+ // showTitle prop seems to be doing nothing, so this is skipped
143
+ // showTitle: {
144
+ // type: "boolean",
145
+ // defaultValueHint: true,
146
+ // description: `Show page item's title`,
147
+ // },
148
+ showTotal: {
149
+ type: "function",
150
+ displayName: "Show total",
151
+ description: "Display the total number and range",
152
+ advanced: true,
153
+ argNames: ["total", "range"],
154
+ argValues: (_ps, ctx) => [ctx.data[0], ctx.data[1]]
155
+ },
156
+ simple: {
157
+ type: "boolean",
158
+ defaultValueHint: false,
159
+ description: `Uuse simple mode (i.e. minimal controls)`
160
+ },
161
+ size: {
162
+ type: "choice",
163
+ defaultValueHint: "default",
164
+ description: `Size of the pager`,
165
+ options: ["default", "small"]
166
+ },
167
+ pageSizeOptions: {
168
+ type: "array",
169
+ defaultValue: [
170
+ {
171
+ pageSize: 10
172
+ },
173
+ {
174
+ pageSize: 20
175
+ },
176
+ {
177
+ pageSize: 50
178
+ },
179
+ {
180
+ pageSize: 100
181
+ }
182
+ ],
183
+ description: "The list of available page sizes",
184
+ advanced: true,
185
+ itemType: {
186
+ type: "object",
187
+ nameFunc: (item) => item.pageSize,
188
+ fields: {
189
+ pageSize: {
190
+ type: "number",
191
+ min: 1
192
+ }
193
+ }
194
+ }
195
+ },
196
+ paginatedUrl: {
197
+ type: "function",
198
+ advanced: true,
199
+ description: "Helps generate SEO-friendly pagination links. These links will include appropriate href attributes, ensuring that search engines can effectively crawl and index your paginated content",
200
+ control: {
201
+ type: "href"
202
+ },
203
+ argNames: ["pageNo", "pageSize"],
204
+ argValues: (_props, ctx) => {
205
+ var _a;
206
+ return [
207
+ (_a = ctx == null ? void 0 : ctx.data) == null ? void 0 : _a[0],
208
+ _props.pageSize
209
+ ];
210
+ }
211
+ },
212
+ onChange: {
213
+ type: "eventHandler",
214
+ advanced: true,
215
+ argTypes: [
216
+ {
217
+ name: "page",
218
+ type: "number"
219
+ },
220
+ {
221
+ name: "pageSize",
222
+ type: "number"
223
+ }
224
+ ]
225
+ },
226
+ onShowSizeChange: {
227
+ type: "eventHandler",
228
+ advanced: true,
229
+ argTypes: [
230
+ {
231
+ name: "current",
232
+ type: "number"
233
+ },
234
+ {
235
+ name: "size",
236
+ type: "number"
237
+ }
238
+ ]
239
+ }
240
+ },
241
+ states: {
242
+ currentPage: {
243
+ type: "writable",
244
+ valueProp: "current",
245
+ onChangeProp: "onChange",
246
+ variableType: "number"
247
+ },
248
+ pageSize: __spreadValues({
249
+ type: "writable",
250
+ valueProp: "pageSize",
251
+ onChangeProp: "onShowSizeChange",
252
+ variableType: "number"
253
+ }, paginationHelpers.states.pageSize),
254
+ startIndex: __spreadValues({
255
+ type: "readonly",
256
+ variableType: "number",
257
+ onChangeProp: "onChange"
258
+ }, paginationHelpers.states.startIndex),
259
+ endIndex: __spreadValues({
260
+ type: "readonly",
261
+ variableType: "number",
262
+ onChangeProp: "onChange"
263
+ }, paginationHelpers.states.endIndex)
264
+ },
265
+ componentHelpers: {
266
+ helpers: paginationHelpers,
267
+ importName: "paginationHelpers",
268
+ importPath: "@plasmicpkgs/antd5/skinny/registerPagination"
269
+ },
270
+ importPath: "@plasmicpkgs/antd5/skinny/registerPagination",
271
+ importName: "AntdPagination"
272
+ });
273
+ }
274
+
275
+ export { AntdPagination, paginationComponentName, paginationHelpers, registerPagination };
276
+ //# sourceMappingURL=registerPagination.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerPagination.esm.js","sources":["../src/registerPagination.tsx"],"sourcesContent":["import { Pagination } from \"antd\";\nimport React, { useEffect } from \"react\";\nimport { Registerable, registerComponentHelper } from \"./utils\";\n\ntype AntdPaginationProps = Omit<\n React.ComponentProps<typeof Pagination>,\n \"pageSizeOptions\"\n> & {\n pageSizeOptions?: { pageSize: number }[];\n paginatedUrl?: (pageNo: number, pageSize: number) => string;\n};\n\nexport function AntdPagination(props: AntdPaginationProps) {\n const { paginatedUrl, pageSizeOptions, ...rest } = props;\n\n // to populate startIndex and endIndex states which are set via onChange prop.\n useEffect(() => {\n if (props.current && props.pageSize && props.onChange) {\n props.onChange(props.current, props.pageSize);\n }\n }, []);\n\n return (\n <Pagination\n pageSizeOptions={pageSizeOptions\n ?.filter((i) => i?.pageSize)\n .map((i) => i.pageSize)}\n itemRender={\n paginatedUrl\n ? (pageNo, _, originalElement) => {\n if (!React.isValidElement(originalElement) || !props.pageSize) {\n return originalElement;\n }\n let rel = undefined;\n if (props.current) {\n rel =\n pageNo === props.current\n ? \"self\"\n : pageNo === props.current - 1\n ? \"prev\"\n : pageNo === props.current + 1\n ? \"next\"\n : undefined;\n }\n\n const href = paginatedUrl(pageNo, props.pageSize);\n return React.cloneElement(originalElement, {\n ...originalElement.props,\n rel,\n href,\n style: {\n ...(originalElement.props?.style ?? {}),\n pointerEvents: \"none\",\n },\n });\n }\n : undefined\n }\n {...rest}\n />\n );\n}\n\nexport const paginationComponentName = \"plasmic-antd5-pagination\";\n\nexport const paginationHelpers = {\n states: {\n pageSize: {\n onChangeArgsToValue: (_: number, pageSize: number) => pageSize,\n },\n startIndex: {\n onChangeArgsToValue: (currentPage: number, pageSize: number) =>\n (currentPage - 1) * pageSize,\n },\n endIndex: {\n onChangeArgsToValue: (currentPage: number, pageSize: number) =>\n pageSize * currentPage - 1,\n },\n },\n};\n\nexport function registerPagination(loader?: Registerable) {\n registerComponentHelper(loader, AntdPagination, {\n name: paginationComponentName,\n displayName: \"Pagination\",\n props: {\n current: {\n editOnly: true,\n uncontrolledProp: \"defaultCurrent\",\n type: \"number\",\n displayName: \"Current Page\",\n description: `Default current page`,\n defaultValue: 1,\n },\n total: {\n type: \"number\",\n defaultValueHint: 0,\n description: `Total number of data items`,\n },\n pageSize: {\n editOnly: true,\n uncontrolledProp: \"defaultPageSize\",\n type: \"number\",\n displayName: \"Page size\",\n description: `Default number of items per page`,\n defaultValue: 10,\n },\n disabled: {\n type: \"boolean\",\n defaultValueHint: false,\n description: `Disable pagination controls`,\n },\n hideOnSinglePage: {\n type: \"boolean\",\n defaultValueHint: false,\n advanced: true,\n description: `Hide pager on single page`,\n },\n showLessItems: {\n type: \"boolean\",\n defaultValueHint: false,\n advanced: true,\n description: `Show less page items`,\n hidden: (ps) => !!ps.simple,\n },\n showQuickJumper: {\n type: \"boolean\",\n defaultValueHint: false,\n advanced: true,\n description: `Show \"Go to page\" control to enable jumping to pages directly`,\n hidden: (ps) => !!ps.simple,\n },\n showSizeChanger: {\n type: \"boolean\",\n defaultValueHint: (ps) => (ps.total ? ps.total > 50 : false),\n advanced: true,\n description: `Show page size selector`,\n hidden: (ps) => !!ps.simple,\n },\n // showTitle prop seems to be doing nothing, so this is skipped\n // showTitle: {\n // type: \"boolean\",\n // defaultValueHint: true,\n // description: `Show page item's title`,\n // },\n showTotal: {\n type: \"function\" as const,\n displayName: \"Show total\",\n description: \"Display the total number and range\",\n advanced: true,\n argNames: [\"total\", \"range\"],\n argValues: (_ps: any, ctx: any) => [ctx.data[0], ctx.data[1]],\n } as any,\n simple: {\n type: \"boolean\",\n defaultValueHint: false,\n description: `Uuse simple mode (i.e. minimal controls)`,\n },\n size: {\n type: \"choice\",\n defaultValueHint: \"default\",\n description: `Size of the pager`,\n options: [\"default\", \"small\"],\n },\n pageSizeOptions: {\n type: \"array\",\n defaultValue: [\n {\n pageSize: 10,\n },\n {\n pageSize: 20,\n },\n {\n pageSize: 50,\n },\n {\n pageSize: 100,\n },\n ],\n description: \"The list of available page sizes\",\n advanced: true,\n itemType: {\n type: \"object\",\n nameFunc: (item) => item.pageSize,\n fields: {\n pageSize: {\n type: \"number\",\n min: 1,\n },\n },\n },\n },\n paginatedUrl: {\n type: \"function\",\n advanced: true,\n description:\n \"Helps generate SEO-friendly pagination links. These links will include appropriate href attributes, ensuring that search engines can effectively crawl and index your paginated content\",\n control: {\n type: \"href\",\n },\n argNames: [\"pageNo\", \"pageSize\"],\n argValues: (_props: AntdPaginationProps, ctx: any) => [\n ctx?.data?.[0],\n _props.pageSize,\n ],\n } as any,\n onChange: {\n type: \"eventHandler\",\n advanced: true,\n argTypes: [\n {\n name: \"page\",\n type: \"number\",\n },\n {\n name: \"pageSize\",\n type: \"number\",\n },\n ],\n },\n onShowSizeChange: {\n type: \"eventHandler\",\n advanced: true,\n argTypes: [\n {\n name: \"current\",\n type: \"number\",\n },\n {\n name: \"size\",\n type: \"number\",\n },\n ],\n },\n },\n states: {\n currentPage: {\n type: \"writable\",\n valueProp: \"current\",\n onChangeProp: \"onChange\",\n variableType: \"number\",\n },\n pageSize: {\n type: \"writable\",\n valueProp: \"pageSize\",\n onChangeProp: \"onShowSizeChange\",\n variableType: \"number\",\n ...paginationHelpers.states.pageSize,\n },\n startIndex: {\n type: \"readonly\",\n variableType: \"number\",\n onChangeProp: \"onChange\",\n ...paginationHelpers.states.startIndex,\n },\n endIndex: {\n type: \"readonly\",\n variableType: \"number\",\n onChangeProp: \"onChange\",\n ...paginationHelpers.states.endIndex,\n },\n },\n componentHelpers: {\n helpers: paginationHelpers,\n importName: \"paginationHelpers\",\n importPath: \"@plasmicpkgs/antd5/skinny/registerPagination\",\n },\n importPath: \"@plasmicpkgs/antd5/skinny/registerPagination\",\n importName: \"AntdPagination\",\n });\n}\n"],"names":["_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,SAAS,eAAe,KAA4B,EAAA;AACzD,EAAmD,MAAA,EAAA,GAAA,KAAA,EAA3C,gBAAc,eAbxB,EAAA,GAaqD,IAAT,IAAS,GAAA,SAAA,CAAA,EAAA,EAAT,CAAlC,cAAc,EAAA,iBAAA,CAAA,CAAA,CAAA;AAGtB,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,KAAM,CAAA,OAAA,IAAW,KAAM,CAAA,QAAA,IAAY,MAAM,QAAU,EAAA;AACrD,MAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,OAAS,EAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAAA,KAC9C;AAAA,GACF,EAAG,EAAE,CAAA,CAAA;AAEL,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,eAAA,EAAiB,eACb,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAA,MAAA,CAAO,CAAC,CAAA,KAAM,uBAAG,QAClB,CAAA,CAAA,GAAA,CAAI,CAAC,CAAA,KAAM,CAAE,CAAA,QAAA,CAAA;AAAA,MAChB,UACE,EAAA,YAAA,GACI,CAAC,MAAA,EAAQ,GAAG,eAAoB,KAAA;AA7B5C,QAAA,IAAAA,GAAA,EAAA,EAAA,CAAA;AA8Bc,QAAA,IAAI,CAAC,KAAM,CAAA,cAAA,CAAe,eAAe,CAAK,IAAA,CAAC,MAAM,QAAU,EAAA;AAC7D,UAAO,OAAA,eAAA,CAAA;AAAA,SACT;AACA,QAAA,IAAI,GAAM,GAAA,KAAA,CAAA,CAAA;AAC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AO,CAAA,UAAA,CAAA;AAAA,MAE9B,QAAU,EAAA,cAAA,CAAA;AAAA,QACR,IAAM,EAAA,UAAA;AAAA,QACN,YAAc,EAAA,QAAA;AAAA,QACd,YAAc,EAAA,UAAA;AAAA,OAAA,EACX,kBAAkB,MAAO,CAAA,QAAA,CAAA;AAAA,KAEhC;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,OAAS,EAAA,iBAAA;AAAA,MACT,UAAY,EAAA,mBAAA;AAAA,MACZ,UAAY,EAAA,8CAAA;AAAA,KACd;AAAA,IACA,UAAY,EAAA,8CAAA;AAAA,IACZ,UAAY,EAAA,gBAAA;AAAA,GACb,CAAA,CAAA;AACH;;;;"}
@@ -0,0 +1,234 @@
1
+ 'use strict';
2
+
3
+ var antd = require('antd');
4
+ var React = require('react');
5
+ var utils = require('./utils-174b9d45.cjs.js');
6
+ require('@plasmicapp/host/registerComponent');
7
+ require('@plasmicapp/host/registerGlobalContext');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var React__default = /*#__PURE__*/_interopDefault(React);
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
17
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18
+ var __spreadValues = (a, b) => {
19
+ for (var prop in b || (b = {}))
20
+ if (__hasOwnProp.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ if (__getOwnPropSymbols)
23
+ for (var prop of __getOwnPropSymbols(b)) {
24
+ if (__propIsEnum.call(b, prop))
25
+ __defNormalProp(a, prop, b[prop]);
26
+ }
27
+ return a;
28
+ };
29
+ var __objRest = (source, exclude) => {
30
+ var target = {};
31
+ for (var prop in source)
32
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
33
+ target[prop] = source[prop];
34
+ if (source != null && __getOwnPropSymbols)
35
+ for (var prop of __getOwnPropSymbols(source)) {
36
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
37
+ target[prop] = source[prop];
38
+ }
39
+ return target;
40
+ };
41
+ function AntdProgress(props) {
42
+ const _a = props, {
43
+ successPercent,
44
+ successStrokeColor,
45
+ stepColors,
46
+ infoFormat,
47
+ gradient,
48
+ strokeColor
49
+ } = _a, rest = __objRest(_a, [
50
+ "successPercent",
51
+ "successStrokeColor",
52
+ "stepColors",
53
+ "infoFormat",
54
+ "gradient",
55
+ "strokeColor"
56
+ ]);
57
+ const success = React.useMemo(() => {
58
+ if (!successPercent && !successStrokeColor)
59
+ return void 0;
60
+ const res = {
61
+ percent: successPercent,
62
+ strokeColor: successStrokeColor
63
+ };
64
+ return res;
65
+ }, [successPercent, successStrokeColor]);
66
+ const strokeColorProp = React.useMemo(() => {
67
+ if (props.type === "line" && !!props.steps) {
68
+ const colors = stepColors == null ? void 0 : stepColors.map((c) => c.color).filter((c) => c);
69
+ if (colors == null ? void 0 : colors.length) {
70
+ return colors;
71
+ }
72
+ }
73
+ const res = {};
74
+ gradient == null ? void 0 : gradient.filter((g) => g.color && g.percent !== void 0).map((g) => {
75
+ res[g.percent] = g.color;
76
+ });
77
+ if (Object.keys(res).length)
78
+ return res;
79
+ return strokeColor;
80
+ }, [gradient, props.steps, props.type, stepColors, strokeColor]);
81
+ return /* @__PURE__ */ React__default.default.createElement(
82
+ antd.Progress,
83
+ __spreadValues({
84
+ strokeColor: strokeColorProp,
85
+ success,
86
+ format: infoFormat
87
+ }, rest)
88
+ );
89
+ }
90
+ const progressComponentName = "plasmic-antd5-progress";
91
+ function registerProgress(loader) {
92
+ utils.registerComponentHelper(loader, AntdProgress, {
93
+ name: progressComponentName,
94
+ displayName: "Progress",
95
+ props: {
96
+ type: {
97
+ type: "choice",
98
+ defaultValueHint: "line",
99
+ options: ["line", "circle", "dashboard"]
100
+ },
101
+ percent: {
102
+ type: "number",
103
+ description: "The completion percentage",
104
+ defaultValueHint: 0
105
+ },
106
+ size: {
107
+ type: "choice",
108
+ defaultValueHint: "default",
109
+ description: `Size of progress`,
110
+ advanced: true,
111
+ options: ["default", "small"]
112
+ },
113
+ showInfo: {
114
+ type: "boolean",
115
+ displayName: "Show text",
116
+ defaultValueHint: true,
117
+ advanced: true,
118
+ description: "Display the progress value and the status icon"
119
+ },
120
+ status: {
121
+ type: "choice",
122
+ defaultValueHint: "normal",
123
+ advanced: true,
124
+ options: ["success", "exception", "normal", "active"]
125
+ },
126
+ strokeColor: {
127
+ type: "color",
128
+ description: "The color of progress bar"
129
+ },
130
+ strokeLinecap: {
131
+ type: "choice",
132
+ description: "Style of endpoints of the progress path",
133
+ defaultValueHint: "round",
134
+ advanced: true,
135
+ options: ["round", "butt", "square"]
136
+ },
137
+ successPercent: {
138
+ type: "number",
139
+ advanced: true
140
+ },
141
+ successStrokeColor: {
142
+ type: "color",
143
+ description: "Color of the progress path marked success",
144
+ advanced: true,
145
+ hidden: (ps) => !ps.successPercent
146
+ },
147
+ trailColor: {
148
+ type: "color",
149
+ advanced: true,
150
+ description: "The color of unfilled part"
151
+ },
152
+ infoFormat: {
153
+ type: "function",
154
+ displayName: "Format",
155
+ defaultValueHint: ({ percent }) => `${percent || 0}%`,
156
+ description: "Customize the progress text",
157
+ advanced: true,
158
+ hidden: (ps) => ps.showInfo === void 0 ? false : !ps.showInfo,
159
+ argNames: ["percent", "successPercent"],
160
+ argValues: (_ps) => [
161
+ _ps.percent,
162
+ _ps.successPercent
163
+ ]
164
+ },
165
+ steps: {
166
+ type: "number",
167
+ hidden: (ps) => ps.type !== "line",
168
+ advanced: true,
169
+ description: "The total step count"
170
+ },
171
+ stepColors: {
172
+ type: "array",
173
+ hidden: (ps) => ps.type !== "line" ? true : ps.steps == null,
174
+ advanced: true,
175
+ itemType: {
176
+ type: "object",
177
+ nameFunc: (item) => item.color,
178
+ fields: {
179
+ color: {
180
+ type: "color"
181
+ }
182
+ }
183
+ }
184
+ },
185
+ gradient: {
186
+ type: "array",
187
+ hidden: (ps) => ps.type === "line" && !!ps.steps,
188
+ advanced: true,
189
+ itemType: {
190
+ type: "object",
191
+ nameFunc: (item) => `${item.percent}%: ${item.color}`,
192
+ fields: {
193
+ color: {
194
+ type: "color"
195
+ },
196
+ percent: {
197
+ type: "number"
198
+ }
199
+ }
200
+ }
201
+ },
202
+ strokeWidth: {
203
+ type: "number",
204
+ hidden: (ps) => ps.type === "line",
205
+ description: "To set the width of the circular progress, unit: percentage of the canvas width",
206
+ advanced: true,
207
+ defaultValueHint: 6
208
+ },
209
+ gapDegree: {
210
+ type: "number",
211
+ hidden: (ps) => ps.type !== "dashboard",
212
+ defaultValueHint: 75,
213
+ advanced: true,
214
+ description: "The gap degree of half circle",
215
+ min: 0,
216
+ max: 295
217
+ },
218
+ gapPosition: {
219
+ type: "choice",
220
+ hidden: (ps) => ps.type !== "dashboard",
221
+ options: ["top", "bottom", "left", "right"],
222
+ advanced: true,
223
+ defaultValueHint: "bottom"
224
+ }
225
+ },
226
+ importPath: "@plasmicpkgs/antd5/skinny/registerProgress",
227
+ importName: "AntdProgress"
228
+ });
229
+ }
230
+
231
+ exports.AntdProgress = AntdProgress;
232
+ exports.progressComponentName = progressComponentName;
233
+ exports.registerProgress = registerProgress;
234
+ //# sourceMappingURL=registerProgress.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerProgress.cjs.js","sources":["../src/registerProgress.tsx"],"sourcesContent":["import { Progress } from \"antd\";\nimport React, { useMemo } from \"react\";\nimport { Registerable, registerComponentHelper } from \"./utils\";\n\nexport type AntdProgressProps = Omit<\n React.ComponentProps<typeof Progress>,\n \"format\" | \"success\" | \"successPercent\"\n> & {\n successPercent?: number;\n successStrokeColor?: string;\n infoFormat?: (percent?: number, percentSuccess?: number) => string;\n stepColors?: { color: string }[];\n gradient: { color: string; percent: number }[];\n};\n\nexport function AntdProgress(props: AntdProgressProps) {\n const {\n successPercent,\n successStrokeColor,\n stepColors,\n infoFormat,\n gradient,\n strokeColor,\n ...rest\n } = props;\n\n const success = useMemo(() => {\n if (!successPercent && !successStrokeColor) return undefined;\n const res: React.ComponentProps<typeof Progress>[\"success\"] = {\n percent: successPercent,\n strokeColor: successStrokeColor,\n };\n return res;\n }, [successPercent, successStrokeColor]);\n\n const strokeColorProp = useMemo(() => {\n if (props.type === \"line\" && !!props.steps) {\n const colors = stepColors?.map((c) => c.color).filter((c) => c);\n if (colors?.length) {\n return colors;\n }\n }\n const res: Record<number, string> = {};\n gradient\n ?.filter((g) => g.color && g.percent !== undefined)\n .map((g) => {\n res[g.percent] = g.color;\n });\n if (Object.keys(res).length) return res;\n return strokeColor;\n }, [gradient, props.steps, props.type, stepColors, strokeColor]);\n\n return (\n <Progress\n strokeColor={strokeColorProp}\n success={success}\n format={infoFormat}\n {...rest}\n />\n );\n}\n\nexport const progressComponentName = \"plasmic-antd5-progress\";\n\nexport function registerProgress(loader?: Registerable) {\n registerComponentHelper(loader, AntdProgress, {\n name: progressComponentName,\n displayName: \"Progress\",\n props: {\n type: {\n type: \"choice\",\n defaultValueHint: \"line\",\n options: [\"line\", \"circle\", \"dashboard\"],\n },\n percent: {\n type: \"number\",\n description: \"The completion percentage\",\n defaultValueHint: 0,\n },\n size: {\n type: \"choice\",\n defaultValueHint: \"default\",\n description: `Size of progress`,\n advanced: true,\n options: [\"default\", \"small\"],\n },\n showInfo: {\n type: \"boolean\",\n displayName: \"Show text\",\n defaultValueHint: true,\n advanced: true,\n description: \"Display the progress value and the status icon\",\n },\n status: {\n type: \"choice\",\n defaultValueHint: \"normal\",\n advanced: true,\n options: [\"success\", \"exception\", \"normal\", \"active\"],\n },\n strokeColor: {\n type: \"color\",\n description: \"The color of progress bar\",\n },\n strokeLinecap: {\n type: \"choice\",\n description: \"Style of endpoints of the progress path\",\n defaultValueHint: \"round\",\n advanced: true,\n options: [\"round\", \"butt\", \"square\"],\n },\n successPercent: {\n type: \"number\",\n advanced: true,\n },\n successStrokeColor: {\n type: \"color\",\n description: \"Color of the progress path marked success\",\n advanced: true,\n hidden: (ps) => !ps.successPercent,\n },\n trailColor: {\n type: \"color\",\n advanced: true,\n description: \"The color of unfilled part\",\n },\n infoFormat: {\n type: \"function\" as const,\n displayName: \"Format\",\n defaultValueHint: ({ percent }: AntdProgressProps) =>\n `${percent || 0}%`,\n description: \"Customize the progress text\",\n advanced: true,\n hidden: (ps: AntdProgressProps) =>\n ps.showInfo === undefined ? false : !ps.showInfo,\n argNames: [\"percent\", \"successPercent\"],\n argValues: (_ps: AntdProgressProps) => [\n _ps.percent,\n _ps.successPercent,\n ],\n } as any,\n steps: {\n type: \"number\",\n hidden: (ps) => ps.type !== \"line\",\n advanced: true,\n description: \"The total step count\",\n },\n stepColors: {\n type: \"array\",\n hidden: (ps) => (ps.type !== \"line\" ? true : ps.steps == null),\n advanced: true,\n itemType: {\n type: \"object\",\n nameFunc: (item) => item.color,\n fields: {\n color: {\n type: \"color\",\n },\n },\n },\n },\n gradient: {\n type: \"array\",\n hidden: (ps) => ps.type === \"line\" && !!ps.steps,\n advanced: true,\n itemType: {\n type: \"object\",\n nameFunc: (item) => `${item.percent}%: ${item.color}`,\n fields: {\n color: {\n type: \"color\",\n },\n percent: {\n type: \"number\",\n },\n },\n },\n },\n strokeWidth: {\n type: \"number\",\n hidden: (ps) => ps.type === \"line\",\n description:\n \"To set the width of the circular progress, unit: percentage of the canvas width\",\n advanced: true,\n defaultValueHint: 6,\n },\n gapDegree: {\n type: \"number\",\n hidden: (ps) => ps.type !== \"dashboard\",\n defaultValueHint: 75,\n advanced: true,\n description: \"The gap degree of half circle\",\n min: 0,\n max: 295,\n },\n gapPosition: {\n type: \"choice\",\n hidden: (ps) => ps.type !== \"dashboard\",\n options: [\"top\", \"bottom\", \"left\", \"right\"],\n advanced: true,\n defaultValueHint: \"bottom\",\n },\n },\n importPath: \"@plasmicpkgs/antd5/skinny/registerProgress\",\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C1C,QAAU,EAAA,IAAA;AAAA,QACV,gBAAkB,EAAA,QAAA;AAAA,OACpB;AAAA,KACF;AAAA,IACA,UAAY,EAAA,4CAAA;AAAA,IACZ,UAAY,EAAA,cAAA;AAAA,GACb,CAAA,CAAA;AACH;;;;;;"}
@@ -0,0 +1,18 @@
1
+ import { Progress } from "antd";
2
+ import React from "react";
3
+ import { Registerable } from "./utils";
4
+ export type AntdProgressProps = Omit<React.ComponentProps<typeof Progress>, "format" | "success" | "successPercent"> & {
5
+ successPercent?: number;
6
+ successStrokeColor?: string;
7
+ infoFormat?: (percent?: number, percentSuccess?: number) => string;
8
+ stepColors?: {
9
+ color: string;
10
+ }[];
11
+ gradient: {
12
+ color: string;
13
+ percent: number;
14
+ }[];
15
+ };
16
+ export declare function AntdProgress(props: AntdProgressProps): React.JSX.Element;
17
+ export declare const progressComponentName = "plasmic-antd5-progress";
18
+ export declare function registerProgress(loader?: Registerable): void;