pb-sxp-ui 1.20.18 → 1.20.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/index.cjs +737 -26
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +291 -0
  4. package/dist/index.js +737 -26
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +44 -5
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +44 -5
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +737 -26
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +44 -5
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/index.d.ts +2 -0
  15. package/es/core/context/SxpDataSourceProvider.d.ts +1 -1
  16. package/es/materials/sxp/popup/AddToCart/index.d.ts +33 -0
  17. package/es/materials/sxp/popup/AddToCart/index.js +279 -0
  18. package/es/materials/sxp/popup/AddToCart/interactionRender.d.ts +3 -0
  19. package/es/materials/sxp/popup/AddToCart/interactionRender.js +11 -0
  20. package/es/materials/sxp/popup/AddToCart/material.d.ts +2 -0
  21. package/es/materials/sxp/popup/AddToCart/material.js +75 -0
  22. package/es/materials/sxp/popup/AddToCart/settingRender.d.ts +160 -0
  23. package/es/materials/sxp/popup/AddToCart/settingRender.js +277 -0
  24. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +2 -0
  25. package/es/materials/sxp/popup/CommodityDetail/index.js +30 -2
  26. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  27. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +16 -0
  28. package/es/materials/sxp/popup/index.d.ts +1 -0
  29. package/es/materials/sxp/popup/index.js +1 -0
  30. package/lib/core/components/SxpPageRender/index.d.ts +2 -0
  31. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -1
  32. package/lib/materials/sxp/popup/AddToCart/index.d.ts +33 -0
  33. package/lib/materials/sxp/popup/AddToCart/index.js +281 -0
  34. package/lib/materials/sxp/popup/AddToCart/interactionRender.d.ts +3 -0
  35. package/lib/materials/sxp/popup/AddToCart/interactionRender.js +14 -0
  36. package/lib/materials/sxp/popup/AddToCart/material.d.ts +2 -0
  37. package/lib/materials/sxp/popup/AddToCart/material.js +79 -0
  38. package/lib/materials/sxp/popup/AddToCart/settingRender.d.ts +160 -0
  39. package/lib/materials/sxp/popup/AddToCart/settingRender.js +279 -0
  40. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +2 -0
  41. package/lib/materials/sxp/popup/CommodityDetail/index.js +30 -2
  42. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  43. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +16 -0
  44. package/lib/materials/sxp/popup/index.d.ts +1 -0
  45. package/lib/materials/sxp/popup/index.js +1 -0
  46. package/package.json +1 -1
@@ -0,0 +1,281 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const react_1 = tslib_1.__importStar(require("react"));
5
+ const hooks_1 = require("../../../../core/hooks");
6
+ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
7
+ const tool_1 = require("../../../../core/utils/tool");
8
+ require("./index.less");
9
+ const AddToCartPopup = (_a) => {
10
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11
+ var { style, isActive = true, index, shopifyDomain = '', storefrontAccessToken = '', variantStyles = {}, buttonStyle = {}, quantityStyle = {}, texts = {}, popupBg = {} } = _a, props = tslib_1.__rest(_a, ["style", "isActive", "index", "shopifyDomain", "storefrontAccessToken", "variantStyles", "buttonStyle", "quantityStyle", "texts", "popupBg"]);
12
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, globalConfig } = (0, hooks_1.useSxpDataSource)();
13
+ const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
14
+ const curTimeRef = (0, react_1.useRef)(null);
15
+ const [productData, setProductData] = (0, react_1.useState)(null);
16
+ const [selectedOptions, setSelectedOptions] = (0, react_1.useState)({});
17
+ const [selectedVariant, setSelectedVariant] = (0, react_1.useState)(null);
18
+ const [quantity, setQuantity] = (0, react_1.useState)(1);
19
+ const [loading, setLoading] = (0, react_1.useState)(true);
20
+ const [error, setError] = (0, react_1.useState)(null);
21
+ const data = popupDetailData;
22
+ const product = (_c = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct) !== null && _c !== void 0 ? _c : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProducts) === null || _e === void 0 ? void 0 : _e[0];
23
+ const cta = product === null || product === void 0 ? void 0 : product.bindCta;
24
+ const position = (_g = (_f = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index) !== null && _f !== void 0 ? _f : index) !== null && _g !== void 0 ? _g : 0;
25
+ const finalShopifyDomain = shopifyDomain || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.shopifyDomain) || 'dev-store-749237498237498636.myshopify.com';
26
+ const finalStorefrontToken = storefrontAccessToken || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.storefrontAccessToken) || '77d894c490f79430ce7bd0a7efdff6b7';
27
+ const productId = (product === null || product === void 0 ? void 0 : product.itemId) || '';
28
+ const finalTexts = {
29
+ addToCart: texts.addToCart || 'Add to Cart',
30
+ selectOptions: texts.selectOptions || 'Please select options',
31
+ loading: texts.loading || 'Loading...',
32
+ error: texts.error || 'Failed to load product',
33
+ color: texts.color || 'Color',
34
+ size: texts.size || 'Size',
35
+ material: texts.material || 'Material',
36
+ style: texts.style || 'Style'
37
+ };
38
+ const fetchProductData = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
39
+ var _m;
40
+ if (!productId || !finalShopifyDomain || !finalStorefrontToken) {
41
+ console.log('[AddToCartPopup] 缺少必要配置:', {
42
+ productId,
43
+ shopifyDomain: finalShopifyDomain,
44
+ hasToken: !!finalStorefrontToken
45
+ });
46
+ setLoading(false);
47
+ return;
48
+ }
49
+ console.log('[AddToCartPopup] 开始加载商品数据:', {
50
+ productId,
51
+ shopifyDomain: finalShopifyDomain
52
+ });
53
+ setLoading(true);
54
+ setError(null);
55
+ try {
56
+ const query = `
57
+ query getProduct($id: ID!) {
58
+ product(id: $id) {
59
+ id
60
+ title
61
+ images(first: 10) {
62
+ edges {
63
+ node {
64
+ url
65
+ }
66
+ }
67
+ }
68
+ options {
69
+ name
70
+ values
71
+ }
72
+ variants(first: 100) {
73
+ edges {
74
+ node {
75
+ id
76
+ title
77
+ availableForSale
78
+ quantityAvailable
79
+ price {
80
+ amount
81
+ currencyCode
82
+ }
83
+ image {
84
+ url
85
+ }
86
+ selectedOptions {
87
+ name
88
+ value
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ `;
96
+ const formattedProductId = productId.startsWith('gid://')
97
+ ? productId
98
+ : `gid://shopify/Product/${productId}`;
99
+ console.log('[AddToCartPopup] 使用的 Product ID:', formattedProductId);
100
+ const response = yield fetch(`https://${finalShopifyDomain}/api/2024-01/graphql.json`, {
101
+ method: 'POST',
102
+ headers: {
103
+ 'Content-Type': 'application/json',
104
+ 'X-Shopify-Storefront-Access-Token': finalStorefrontToken
105
+ },
106
+ body: JSON.stringify({
107
+ query,
108
+ variables: { id: formattedProductId }
109
+ })
110
+ });
111
+ if (!response.ok) {
112
+ throw new Error(`HTTP ${response.status}`);
113
+ }
114
+ const result = yield response.json();
115
+ if (result.errors) {
116
+ console.error('[AddToCartPopup] GraphQL 错误:', result.errors);
117
+ throw new Error(result.errors[0].message);
118
+ }
119
+ if (!((_m = result.data) === null || _m === void 0 ? void 0 : _m.product)) {
120
+ console.error('[AddToCartPopup] 未找到商品');
121
+ throw new Error('Product not found');
122
+ }
123
+ console.log('[AddToCartPopup] 商品数据加载成功:', result.data.product.title);
124
+ setProductData(result.data.product);
125
+ }
126
+ catch (err) {
127
+ const errorMessage = err instanceof Error ? err.message : finalTexts.error;
128
+ setError(errorMessage);
129
+ console.error('[AddToCartPopup] 加载失败:', err);
130
+ }
131
+ finally {
132
+ setLoading(false);
133
+ }
134
+ }), [productId, finalShopifyDomain, finalStorefrontToken, finalTexts.error]);
135
+ (0, react_1.useEffect)(() => {
136
+ if (isActive) {
137
+ fetchProductData();
138
+ }
139
+ }, [isActive, fetchProductData]);
140
+ (0, react_1.useEffect)(() => {
141
+ if (!productData)
142
+ return;
143
+ const variants = productData.variants.edges.map(edge => edge.node);
144
+ const optionsCount = productData.options.length;
145
+ const selectedCount = Object.keys(selectedOptions).length;
146
+ if (selectedCount === 0 || selectedCount < optionsCount) {
147
+ setSelectedVariant(null);
148
+ return;
149
+ }
150
+ const matchedVariant = variants.find(variant => {
151
+ return variant.selectedOptions.every(option => selectedOptions[option.name] === option.value);
152
+ });
153
+ setSelectedVariant(matchedVariant || null);
154
+ setQuantity(1);
155
+ }, [selectedOptions, productData]);
156
+ const handleOptionSelect = (0, react_1.useCallback)((optionName, value) => {
157
+ setSelectedOptions(prev => {
158
+ const newOptions = Object.assign({}, prev);
159
+ if (newOptions[optionName] === value) {
160
+ delete newOptions[optionName];
161
+ }
162
+ else {
163
+ newOptions[optionName] = value;
164
+ }
165
+ return newOptions;
166
+ });
167
+ }, []);
168
+ const handleQuantityChange = (0, react_1.useCallback)((delta) => {
169
+ setQuantity(prev => {
170
+ var _a;
171
+ const newQuantity = prev + delta;
172
+ const maxQuantity = (_a = selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.quantityAvailable) !== null && _a !== void 0 ? _a : 999;
173
+ return Math.max(1, Math.min(newQuantity, maxQuantity));
174
+ });
175
+ }, [selectedVariant]);
176
+ const isOptionValueAvailable = (0, react_1.useCallback)((optionName, value) => {
177
+ if (!productData)
178
+ return false;
179
+ const variants = productData.variants.edges.map(edge => edge.node);
180
+ const tempOptions = Object.assign(Object.assign({}, selectedOptions), { [optionName]: value });
181
+ return variants.some(variant => {
182
+ const matches = variant.selectedOptions.every(option => !tempOptions[option.name] || tempOptions[option.name] === option.value);
183
+ const hasStock = variant.quantityAvailable === null || variant.quantityAvailable > 0;
184
+ return matches && variant.availableForSale && hasStock;
185
+ });
186
+ }, [productData, selectedOptions]);
187
+ const handleAddToCart = (0, react_1.useCallback)(() => {
188
+ var _a;
189
+ if (!selectedVariant || quantity === 0)
190
+ return;
191
+ const variantId = selectedVariant.id.split('/').pop();
192
+ const cartUrl = `https://${finalShopifyDomain}/cart/add?id=${variantId}&quantity=${quantity}`;
193
+ console.log('[AddToCartPopup] 加购:', {
194
+ variantId,
195
+ quantity,
196
+ cartUrl
197
+ });
198
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
199
+ eventName: 'AddToCart',
200
+ product: product ? [product] : undefined,
201
+ contentType: 'product',
202
+ data,
203
+ position,
204
+ content_id: (_a = product === null || product === void 0 ? void 0 : product.itemId) !== null && _a !== void 0 ? _a : '',
205
+ value: parseFloat(selectedVariant.price.amount) * quantity,
206
+ currency: selectedVariant.price.currencyCode,
207
+ contents: [{
208
+ id: variantId,
209
+ quantity
210
+ }]
211
+ });
212
+ window.location.href = cartUrl;
213
+ }, [selectedVariant, quantity, finalShopifyDomain, bffFbReport, product, data, position]);
214
+ const totalPrice = (0, react_1.useMemo)(() => {
215
+ if (!selectedVariant)
216
+ return null;
217
+ const price = parseFloat(selectedVariant.price.amount);
218
+ const total = price * quantity;
219
+ return total.toFixed(2);
220
+ }, [selectedVariant, quantity]);
221
+ (0, react_1.useEffect)(() => {
222
+ const initTime = () => {
223
+ curTimeRef.current = new Date();
224
+ };
225
+ initTime();
226
+ window.addEventListener('pageshow', initTime);
227
+ return () => {
228
+ window.removeEventListener('pageshow', initTime);
229
+ };
230
+ }, []);
231
+ if (loading) {
232
+ return (react_1.default.createElement("div", { className: "add-to-cart-popup-loading", style: style },
233
+ react_1.default.createElement("div", null, finalTexts.loading)));
234
+ }
235
+ if (error || !productData) {
236
+ return (react_1.default.createElement("div", { className: "add-to-cart-popup-error", style: style },
237
+ react_1.default.createElement("div", null,
238
+ finalTexts.error,
239
+ ": ",
240
+ error || 'Product not found')));
241
+ }
242
+ const mainImage = ((_h = selectedVariant === null || selectedVariant === void 0 ? void 0 : selectedVariant.image) === null || _h === void 0 ? void 0 : _h.url) || ((_j = productData.images.edges[0]) === null || _j === void 0 ? void 0 : _j.node.url) || ((_k = product === null || product === void 0 ? void 0 : product.homePage) === null || _k === void 0 ? void 0 : _k[0]) || '';
243
+ const hasAllOptionsSelected = productData.options.length === Object.keys(selectedOptions).length;
244
+ const isAddToCartDisabled = !selectedVariant || quantity === 0;
245
+ return (react_1.default.createElement("div", Object.assign({ className: "add-to-cart-popup-container", style: style }, props),
246
+ react_1.default.createElement("div", { className: "variant-detail-section" },
247
+ react_1.default.createElement("div", { className: "variant-image-wrapper" },
248
+ react_1.default.createElement("img", { src: mainImage, alt: productData.title, className: "variant-image" })),
249
+ react_1.default.createElement("div", { className: "variant-info-wrapper" },
250
+ react_1.default.createElement("h2", { className: "product-title-text", style: variantStyles.title, dangerouslySetInnerHTML: {
251
+ __html: (0, tool_1.setFontForText)(productData.title, variantStyles.title)
252
+ } }),
253
+ selectedVariant && (react_1.default.createElement(react_1.default.Fragment, null,
254
+ react_1.default.createElement("div", { className: "selected-options-tags" }, selectedVariant.selectedOptions.map(option => (react_1.default.createElement("span", { key: option.name, className: "option-tag", style: variantStyles.selectedOption },
255
+ option.name,
256
+ ": ",
257
+ option.value)))),
258
+ react_1.default.createElement("div", { className: "price-display" },
259
+ react_1.default.createElement("span", { className: "price-value", style: variantStyles.price, dangerouslySetInnerHTML: {
260
+ __html: (0, tool_1.setFontForText)(`${selectedVariant.price.currencyCode} $${totalPrice}`, variantStyles.price)
261
+ } })),
262
+ react_1.default.createElement("div", { className: "quantity-selector-wrapper", style: quantityStyle },
263
+ react_1.default.createElement("button", { className: "quantity-btn quantity-decrease", onClick: () => handleQuantityChange(-1), disabled: quantity <= 1, "aria-label": "Decrease quantity" }, "-"),
264
+ react_1.default.createElement("input", { type: "number", value: quantity, readOnly: true, className: "quantity-input-field", "aria-label": "Quantity" }),
265
+ react_1.default.createElement("button", { className: "quantity-btn quantity-increase", onClick: () => handleQuantityChange(1), disabled: quantity >= ((_l = selectedVariant.quantityAvailable) !== null && _l !== void 0 ? _l : 999), "aria-label": "Increase quantity" }, "+")))),
266
+ !hasAllOptionsSelected && (react_1.default.createElement("div", { className: "no-selection-hint", style: variantStyles.option }, finalTexts.selectOptions)))),
267
+ react_1.default.createElement("div", { className: "variant-options-section" }, productData.options.map(option => (react_1.default.createElement("div", { key: option.name, className: "option-group-wrapper" },
268
+ react_1.default.createElement("h3", { className: "option-group-name", style: variantStyles.option, dangerouslySetInnerHTML: {
269
+ __html: (0, tool_1.setFontForText)(option.name, variantStyles.option)
270
+ } }),
271
+ react_1.default.createElement("div", { className: "option-values-grid" }, option.values.map(value => {
272
+ const isSelected = selectedOptions[option.name] === value;
273
+ const isAvailable = isOptionValueAvailable(option.name, value);
274
+ return (react_1.default.createElement("button", { key: value, className: `option-value-button ${isSelected ? 'selected' : ''} ${!isAvailable ? 'disabled' : ''}`, onClick: () => isAvailable && handleOptionSelect(option.name, value), disabled: !isAvailable, "aria-label": `${option.name}: ${value}`, "aria-pressed": isSelected }, value));
275
+ })))))),
276
+ react_1.default.createElement("button", { className: `add-to-cart-button ${isAddToCartDisabled ? 'disabled' : ''}`, style: buttonStyle, onClick: handleAddToCart, disabled: isAddToCartDisabled, "aria-label": finalTexts.addToCart },
277
+ react_1.default.createElement("span", { dangerouslySetInnerHTML: {
278
+ __html: (0, tool_1.setFontForText)(finalTexts.addToCart, buttonStyle)
279
+ } }))));
280
+ };
281
+ exports.default = AddToCartPopup;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const react_1 = tslib_1.__importDefault(require("react"));
5
+ exports.default = () => {
6
+ return (react_1.default.createElement("div", { style: { padding: '20px', color: '#666' } },
7
+ react_1.default.createElement("p", null, "\u52A0\u8D2D\u5546\u54C1\u5F39\u7A97\u4EA4\u4E92\u8BF4\u660E\uFF1A"),
8
+ react_1.default.createElement("ul", { style: { paddingLeft: '20px', lineHeight: '1.8' } },
9
+ react_1.default.createElement("li", null, "\u70B9\u51FB\u5546\u54C1\u8BE6\u60C5\u5F39\u7A97\u7684\"Shop Now\"\u6309\u94AE\u540E\u81EA\u52A8\u5C55\u793A"),
10
+ react_1.default.createElement("li", null, "\u901A\u8FC7Shopify Storefront API\u83B7\u53D6\u5546\u54C1\u89C4\u683C\u548C\u5E93\u5B58\u4FE1\u606F"),
11
+ react_1.default.createElement("li", null, "\u7528\u6237\u9009\u62E9\u89C4\u683C\u540E\u5B9E\u65F6\u663E\u793A\u5BF9\u5E94SKU\u7684\u4EF7\u683C\u548C\u5E93\u5B58"),
12
+ react_1.default.createElement("li", null, "\u70B9\u51FB\"Add to Cart\"\u6309\u94AE\u540E\u8DF3\u8F6C\u81F3Shopify\u8D2D\u7269\u8F66\u9875\u9762"),
13
+ react_1.default.createElement("li", null, "\u65E0\u5E93\u5B58\u6216\u4E0D\u53EF\u552E\u5356\u7684\u89C4\u683C\u81EA\u52A8\u7F6E\u7070\u4E0D\u53EF\u9009"))));
14
+ };
@@ -0,0 +1,2 @@
1
+ declare const AddToCartPopup: import("../../../../core/create").MaterialComponet<import(".").IAddToCartPopupProps>;
2
+ export { AddToCartPopup };
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddToCartPopup = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
7
+ const _1 = tslib_1.__importDefault(require("."));
8
+ const create_1 = require("../../../../core/create");
9
+ const AddToCartPopup = (0, create_1.createMaterial)(_1.default, {
10
+ displayName: '加购商品',
11
+ icon: '',
12
+ category: 'popup',
13
+ type: 'AddToCartPopup',
14
+ related: {
15
+ settingRender: settingRender_1.default,
16
+ interactionRender: interactionRender_1.default
17
+ },
18
+ defaulSetting: {
19
+ props: {
20
+ shopifyDomain: '',
21
+ storefrontAccessToken: '',
22
+ variantStyles: {
23
+ title: {
24
+ color: '#000',
25
+ fontSize: 20,
26
+ fontWeight: 600,
27
+ marginBottom: 12
28
+ },
29
+ price: {
30
+ color: '#000',
31
+ fontSize: 24,
32
+ fontWeight: 700,
33
+ marginBottom: 16
34
+ },
35
+ option: {
36
+ color: '#111',
37
+ fontSize: 16,
38
+ fontWeight: 600,
39
+ marginBottom: 12
40
+ },
41
+ selectedOption: {
42
+ fontSize: 14,
43
+ color: '#374151'
44
+ }
45
+ },
46
+ buttonStyle: {
47
+ backgroundColor: '#000',
48
+ color: '#fff',
49
+ fontSize: 16,
50
+ height: 52,
51
+ fontWeight: 600,
52
+ textAlign: 'center',
53
+ textTransform: 'uppercase'
54
+ },
55
+ quantityStyle: {
56
+ gap: 12
57
+ },
58
+ texts: {
59
+ addToCart: 'Add to Cart',
60
+ selectOptions: 'Please select options',
61
+ loading: 'Loading...',
62
+ error: 'Failed to load product',
63
+ color: 'Color',
64
+ size: 'Size',
65
+ material: 'Material',
66
+ style: 'Style'
67
+ },
68
+ popupBg: {
69
+ horizontalMargin: 0,
70
+ bottomMargin: 0
71
+ }
72
+ },
73
+ style: {}
74
+ },
75
+ w: 100,
76
+ h: 40,
77
+ sort: 7
78
+ });
79
+ exports.AddToCartPopup = AddToCartPopup;
@@ -0,0 +1,160 @@
1
+ declare const _default: ({
2
+ title: string;
3
+ child: {
4
+ type: string;
5
+ label: string;
6
+ name: string[];
7
+ placeholder: string;
8
+ }[];
9
+ } | {
10
+ title: string;
11
+ child: {
12
+ name: string[];
13
+ type: string;
14
+ child: ({
15
+ label: string;
16
+ type: string;
17
+ options: {
18
+ label: string;
19
+ value: string;
20
+ }[];
21
+ name: string[];
22
+ initialValue: string;
23
+ child?: undefined;
24
+ } | {
25
+ type: string;
26
+ child: {
27
+ label: string;
28
+ type: string;
29
+ addonAfter: string;
30
+ name: string[];
31
+ }[];
32
+ label?: undefined;
33
+ options?: undefined;
34
+ name?: undefined;
35
+ initialValue?: undefined;
36
+ } | {
37
+ type: string;
38
+ label: string;
39
+ child: {
40
+ type: string;
41
+ name: string[];
42
+ bottomText: string;
43
+ }[];
44
+ options?: undefined;
45
+ name?: undefined;
46
+ initialValue?: undefined;
47
+ } | {
48
+ type: string;
49
+ label: string;
50
+ child: ({
51
+ type: string;
52
+ name: string[];
53
+ addonAfter?: undefined;
54
+ } | {
55
+ type: string;
56
+ addonAfter: string;
57
+ name: string[];
58
+ })[];
59
+ options?: undefined;
60
+ name?: undefined;
61
+ initialValue?: undefined;
62
+ } | {
63
+ label: string;
64
+ type: string;
65
+ options?: undefined;
66
+ name?: undefined;
67
+ initialValue?: undefined;
68
+ child?: undefined;
69
+ })[];
70
+ }[];
71
+ } | {
72
+ title: string;
73
+ child: ({
74
+ label: string;
75
+ type: string;
76
+ name: string[];
77
+ options: {
78
+ label: string;
79
+ value: string;
80
+ }[];
81
+ initialValue?: undefined;
82
+ child?: undefined;
83
+ } | {
84
+ type: string;
85
+ label: string;
86
+ name: string[];
87
+ initialValue: string;
88
+ options?: undefined;
89
+ child?: undefined;
90
+ } | {
91
+ type: string;
92
+ label: string;
93
+ child: ({
94
+ type: string;
95
+ name: string[];
96
+ max: number;
97
+ addonAfter?: undefined;
98
+ } | {
99
+ type: string;
100
+ name: string[];
101
+ addonAfter: string;
102
+ max: number;
103
+ })[];
104
+ name?: undefined;
105
+ options?: undefined;
106
+ initialValue?: undefined;
107
+ } | {
108
+ type: string;
109
+ name: string[];
110
+ label?: undefined;
111
+ options?: undefined;
112
+ initialValue?: undefined;
113
+ child?: undefined;
114
+ } | {
115
+ type: string;
116
+ label: string;
117
+ child: {
118
+ type: string;
119
+ name: string[];
120
+ bottomText: string;
121
+ }[];
122
+ name?: undefined;
123
+ options?: undefined;
124
+ initialValue?: undefined;
125
+ } | {
126
+ type: string;
127
+ label: string;
128
+ child: ({
129
+ type: string;
130
+ name: string[];
131
+ initialValue: string;
132
+ addonAfter?: undefined;
133
+ } | {
134
+ type: string;
135
+ name: string[];
136
+ addonAfter: string;
137
+ initialValue?: undefined;
138
+ })[];
139
+ name?: undefined;
140
+ options?: undefined;
141
+ initialValue?: undefined;
142
+ } | {
143
+ label: string;
144
+ type: string;
145
+ name: string[];
146
+ options?: undefined;
147
+ initialValue?: undefined;
148
+ child?: undefined;
149
+ })[];
150
+ } | {
151
+ title: string;
152
+ child: {
153
+ type: string;
154
+ label: string;
155
+ name: string[];
156
+ addonAfter: string;
157
+ initialValue: number;
158
+ }[];
159
+ })[];
160
+ export default _default;