@pisell/private-materials 6.12.140 → 6.12.142
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +4 -4
- package/es/components/bigSale/components/ProductList/index.js +24 -20
- package/es/plus/pisellSalesProductCard/index.js +3 -3
- package/es/plus/productSelect/ProductCard/ProductCardV2.js +2 -1
- package/es/plus/saasDevice/appDevicePlanning/hooks/useDeviceLinking.js +28 -4
- package/es/plus/saasDevice/appDevicePlanning/modules/devices/components/DeviceTable/index.js +4 -1
- package/es/plus/saasDevice/appDevicePlanning/modules/devices/components/DeviceTable/index.less +23 -3
- package/es/plus/salesSdk/context/SalesSdkCartContext.js +54 -53
- package/es/pro/skuDetailModal/README.md +2 -2
- package/es/pro/skuDetailModal/flow/presets.d.ts +2 -42
- package/lib/components/bigSale/components/ProductList/index.js +24 -20
- package/lib/plus/pisellSalesProductCard/index.js +3 -3
- package/lib/plus/productSelect/ProductCard/ProductCardV2.js +2 -1
- package/lib/plus/saasDevice/appDevicePlanning/hooks/useDeviceLinking.js +28 -4
- package/lib/plus/saasDevice/appDevicePlanning/modules/devices/components/DeviceTable/index.js +4 -1
- package/lib/plus/saasDevice/appDevicePlanning/modules/devices/components/DeviceTable/index.less +23 -3
- package/lib/plus/salesSdk/context/SalesSdkCartContext.js +54 -53
- package/lib/pro/skuDetailModal/README.md +2 -2
- package/lib/pro/skuDetailModal/flow/presets.d.ts +2 -42
- package/package.json +2 -2
|
@@ -717,26 +717,30 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
717
717
|
* @example
|
|
718
718
|
* renderListItem(item, 0);
|
|
719
719
|
*/
|
|
720
|
-
const renderListItem = useMemoizedFn((item, index) =>
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
720
|
+
const renderListItem = useMemoizedFn((item, index) => {
|
|
721
|
+
const isBookingProduct = !isNormalProductByDurationSchedule(item);
|
|
722
|
+
return usesV2ProductCard ? /* @__PURE__ */ React.createElement(ProductCardV2, {
|
|
723
|
+
key: item.id,
|
|
724
|
+
index,
|
|
725
|
+
item,
|
|
726
|
+
requiresOptions: isBookingProduct,
|
|
727
|
+
hideAction: isBookingProduct,
|
|
728
|
+
value: phoneCartProductValues,
|
|
729
|
+
onChange: handlePhoneProductCardChange,
|
|
730
|
+
decorateConfig: v2ProductCardDecorateConfig
|
|
731
|
+
}) : /* @__PURE__ */ React.createElement(ProductCard$1, {
|
|
732
|
+
key: item.id,
|
|
733
|
+
index,
|
|
734
|
+
item,
|
|
735
|
+
onSelect: () => handleSelectProduct(item),
|
|
736
|
+
onSelectCover: () => handleSelectProduct(item),
|
|
737
|
+
onSelectInfo: () => handleSelectProduct(item),
|
|
738
|
+
isSelected: false,
|
|
739
|
+
selectionTrigger: productSelectionTrigger,
|
|
740
|
+
scenario: "booking2",
|
|
741
|
+
customSkuCardAllConfig: skuCardAllConfig
|
|
742
|
+
});
|
|
743
|
+
});
|
|
740
744
|
const setPersistentSearchScrolling = useMemoizedFn((isScrolling) => {
|
|
741
745
|
var _listWrapperRef$curre;
|
|
742
746
|
if (variant !== "phone" || !persistentSearch) return;
|
|
@@ -49,7 +49,7 @@ function isNormalProduct(product) {
|
|
|
49
49
|
const requiresDetail = isEnabledProductFlag(productAny === null || productAny === void 0 ? void 0 : productAny.isOpenDetailModal) || isEnabledProductFlag(productAny === null || productAny === void 0 ? void 0 : productAny.open_sold_weight) || ["session_product", "session_ticket"].includes(String((productAny === null || productAny === void 0 ? void 0 : productAny.extension_type) || ""));
|
|
50
50
|
return !(hasOption || hasBundle || hasVariant || requiresDetail);
|
|
51
51
|
}
|
|
52
|
-
const PisellSalesProductCard = ({ product, requiresOptions = false, value, selectedQuantity: selectedQuantityProp, disabled = false, stepperProps, optionsText, skuCardConfig, cartElementId, style, className, onChange, onClick }) => {
|
|
52
|
+
const PisellSalesProductCard = ({ product, requiresOptions = false, hideAction = false, value, selectedQuantity: selectedQuantityProp, disabled = false, stepperProps, optionsText, skuCardConfig, cartElementId, style, className, onChange, onClick }) => {
|
|
53
53
|
var _context$appHelper$ut, _product$price, _value$num, _stepperProps$min3, _stepperProps$step;
|
|
54
54
|
const context = useEngineContext();
|
|
55
55
|
locales.init(locales_default, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get("umi_locale")) || "en");
|
|
@@ -143,7 +143,7 @@ const PisellSalesProductCard = ({ product, requiresOptions = false, value, selec
|
|
|
143
143
|
}) : /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__image-placeholder` }, textCover)), /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__content` }, /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__title` }, title), /* @__PURE__ */ React.createElement(index, {
|
|
144
144
|
value: (_product$price = product.price) !== null && _product$price !== void 0 ? _product$price : 0,
|
|
145
145
|
isMini: !!product.is_bundle
|
|
146
|
-
})), /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__action` }, normalProduct ? /* @__PURE__ */ React.createElement("div", {
|
|
146
|
+
})), !hideAction ? /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__action` }, normalProduct ? /* @__PURE__ */ React.createElement("div", {
|
|
147
147
|
className: `${PREFIX}__stepper`,
|
|
148
148
|
onClick: (event) => event.stopPropagation(),
|
|
149
149
|
onPointerDown: (event) => event.stopPropagation(),
|
|
@@ -198,7 +198,7 @@ const PisellSalesProductCard = ({ product, requiresOptions = false, value, selec
|
|
|
198
198
|
}, optionsText || locales.getText("pisell2.text.options"), selectedQuantity > 0 ? /* @__PURE__ */ React.createElement("span", {
|
|
199
199
|
className: `${PREFIX}__options-button-badge`,
|
|
200
200
|
"aria-hidden": "true"
|
|
201
|
-
}, selectedQuantity) : null)))));
|
|
201
|
+
}, selectedQuantity) : null)) : null)));
|
|
202
202
|
};
|
|
203
203
|
//#endregion
|
|
204
204
|
export { PisellSalesProductCard as default };
|
|
@@ -8,7 +8,7 @@ import classNames from "classnames";
|
|
|
8
8
|
* v2 卡片:复用 ProductCard 的结构能力(分类项 + IntersectionTrigger),
|
|
9
9
|
* 商品项内部渲染 PisellSalesProductCard。
|
|
10
10
|
*/
|
|
11
|
-
const ProductCardV2 = memo(({ item, index, context, className, value, onChange, decorateConfig = {}, cartElementId, requiresOptions = false }) => {
|
|
11
|
+
const ProductCardV2 = memo(({ item, index, context, className, value, onChange, decorateConfig = {}, cartElementId, requiresOptions = false, hideAction = false }) => {
|
|
12
12
|
var _item$product_id, _ref2, _item$product_id2, _item$item_rule_limit, _item$item_rule_limit2, _item$item_rule_limit3, _item$item_rule_limit4, _item$item_rule_limit5, _item$item_rule_limit6;
|
|
13
13
|
const { __typename } = item;
|
|
14
14
|
if (__typename === "category") return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -42,6 +42,7 @@ const ProductCardV2 = memo(({ item, index, context, className, value, onChange,
|
|
|
42
42
|
}),
|
|
43
43
|
product: item,
|
|
44
44
|
requiresOptions,
|
|
45
|
+
hideAction,
|
|
45
46
|
style: salesCardStyle,
|
|
46
47
|
stepperProps: {
|
|
47
48
|
min: item === null || item === void 0 || (_item$item_rule_limit = item.item_rule_limit) === null || _item$item_rule_limit === void 0 ? void 0 : _item$item_rule_limit.min,
|
|
@@ -38,6 +38,30 @@ const useDeviceLinking = ({ utils, onLinked, reloadDevices, setStoredIotDevice,
|
|
|
38
38
|
metadata: { error }
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
try {
|
|
42
|
+
var _app$plugins3, _app$plugins4, _app$plugins5;
|
|
43
|
+
yield app === null || app === void 0 || (_app$plugins3 = app.plugins) === null || _app$plugins3 === void 0 || (_app$plugins3 = _app$plugins3.get("mqtt")) === null || _app$plugins3 === void 0 ? void 0 : _app$plugins3.stopHeartbeat();
|
|
44
|
+
yield app === null || app === void 0 || (_app$plugins4 = app.plugins) === null || _app$plugins4 === void 0 || (_app$plugins4 = _app$plugins4.get("mqtt")) === null || _app$plugins4 === void 0 ? void 0 : _app$plugins4.disconnect();
|
|
45
|
+
yield app === null || app === void 0 || (_app$plugins5 = app.plugins) === null || _app$plugins5 === void 0 || (_app$plugins5 = _app$plugins5.get("mqtt")) === null || _app$plugins5 === void 0 ? void 0 : _app$plugins5.clearCredentials();
|
|
46
|
+
} catch (error) {
|
|
47
|
+
var _app$logger2;
|
|
48
|
+
app === null || app === void 0 || (_app$logger2 = app.logger) === null || _app$logger2 === void 0 || _app$logger2.addLog({
|
|
49
|
+
type: "error",
|
|
50
|
+
title: "销毁老的mqtt失败",
|
|
51
|
+
metadata: { error }
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
var _app$plugins6, _app$plugins6$saveCre;
|
|
56
|
+
yield app === null || app === void 0 || (_app$plugins6 = app.plugins) === null || _app$plugins6 === void 0 || (_app$plugins6 = _app$plugins6.get("mqtt")) === null || _app$plugins6 === void 0 || (_app$plugins6$saveCre = _app$plugins6.saveCredentials) === null || _app$plugins6$saveCre === void 0 ? void 0 : _app$plugins6$saveCre.call(_app$plugins6, linkedDevice);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
var _app$logger3;
|
|
59
|
+
app === null || app === void 0 || (_app$logger3 = app.logger) === null || _app$logger3 === void 0 || _app$logger3.addLog({
|
|
60
|
+
type: "error",
|
|
61
|
+
title: "将凭证信息存入 mqtt 失败",
|
|
62
|
+
metadata: { error }
|
|
63
|
+
});
|
|
64
|
+
}
|
|
41
65
|
setStoredIotDevice({
|
|
42
66
|
id: typeof (linkedDevice === null || linkedDevice === void 0 ? void 0 : linkedDevice.id) === "number" ? linkedDevice.id : void 0,
|
|
43
67
|
number: (linkedDevice === null || linkedDevice === void 0 ? void 0 : linkedDevice.number) ? String(linkedDevice.number) : ""
|
|
@@ -56,14 +80,14 @@ const useDeviceLinking = ({ utils, onLinked, reloadDevices, setStoredIotDevice,
|
|
|
56
80
|
var _localStorage, _localStorage$setItem;
|
|
57
81
|
(_localStorage = localStorage) === null || _localStorage === void 0 || (_localStorage$setItem = _localStorage.setItem) === null || _localStorage$setItem === void 0 || _localStorage$setItem.call(_localStorage, "pisell_app_channel", channel);
|
|
58
82
|
try {
|
|
59
|
-
var _app$
|
|
60
|
-
yield app === null || app === void 0 || (_app$
|
|
83
|
+
var _app$plugins7, _app$plugins7$set;
|
|
84
|
+
yield app === null || app === void 0 || (_app$plugins7 = app.plugins) === null || _app$plugins7 === void 0 || (_app$plugins7 = _app$plugins7.get("nativeStorage")) === null || _app$plugins7 === void 0 || (_app$plugins7$set = _app$plugins7.set) === null || _app$plugins7$set === void 0 ? void 0 : _app$plugins7$set.call(_app$plugins7, {
|
|
61
85
|
key: "pisell_app_channel",
|
|
62
86
|
value: channel
|
|
63
87
|
});
|
|
64
88
|
} catch (error) {
|
|
65
|
-
var _app$
|
|
66
|
-
app === null || app === void 0 || (_app$
|
|
89
|
+
var _app$logger4;
|
|
90
|
+
app === null || app === void 0 || (_app$logger4 = app.logger) === null || _app$logger4 === void 0 || _app$logger4.addLog({
|
|
67
91
|
type: "error",
|
|
68
92
|
title: "将渠道信息存入 nativeStorage 失败",
|
|
69
93
|
metadata: { error }
|
package/es/plus/saasDevice/appDevicePlanning/modules/devices/components/DeviceTable/index.js
CHANGED
|
@@ -19,9 +19,12 @@ const DeviceTable = ({ data, loading, search, page, pageSize, linkingDeviceId, g
|
|
|
19
19
|
const isLinking = linkingDeviceId === record.id;
|
|
20
20
|
const isDisabled = Boolean(linkingDeviceId);
|
|
21
21
|
if (record.isCurrent) return /* @__PURE__ */ React.createElement(Button$1, {
|
|
22
|
+
type: "primary",
|
|
22
23
|
className: "saas-app-device-planning-device-table__current-button",
|
|
23
24
|
icon: /* @__PURE__ */ React.createElement(CheckOutlined, null),
|
|
24
|
-
|
|
25
|
+
loading: isLinking,
|
|
26
|
+
disabled: isDisabled,
|
|
27
|
+
onClick: () => onLink(record)
|
|
25
28
|
}, getText("pisell2.saas.device-planning.action.current-device"));
|
|
26
29
|
if (record.isLastUsed) return /* @__PURE__ */ React.createElement(Button$1, {
|
|
27
30
|
type: "primary",
|
package/es/plus/saasDevice/appDevicePlanning/modules/devices/components/DeviceTable/index.less
CHANGED
|
@@ -140,9 +140,29 @@
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
&__current-button {
|
|
143
|
-
color:
|
|
144
|
-
background: #
|
|
145
|
-
border-color: #
|
|
143
|
+
color: #fff !important;
|
|
144
|
+
background: #16a34a !important;
|
|
145
|
+
border-color: #16a34a !important;
|
|
146
|
+
|
|
147
|
+
&:not(:disabled):hover,
|
|
148
|
+
&:not(:disabled):focus {
|
|
149
|
+
color: #fff;
|
|
150
|
+
background: #15803d;
|
|
151
|
+
border-color: #15803d;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&:not(:disabled):active {
|
|
155
|
+
color: #fff;
|
|
156
|
+
background: #166534;
|
|
157
|
+
border-color: #166534;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:disabled {
|
|
161
|
+
color: rgba(0, 0, 0, 0.25);
|
|
162
|
+
background: #f0f0f0;
|
|
163
|
+
border-color: #d9d9d9;
|
|
164
|
+
box-shadow: none;
|
|
165
|
+
}
|
|
146
166
|
}
|
|
147
167
|
|
|
148
168
|
&__empty {
|
|
@@ -815,8 +815,8 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
815
815
|
return promise;
|
|
816
816
|
});
|
|
817
817
|
const addProductToOrderFromCacheImpl = useMemoizedFn(function() {
|
|
818
|
-
var
|
|
819
|
-
var _flowCtx$date;
|
|
818
|
+
var _ref8 = _asyncToGenerator(function* (item, cacheItem, options) {
|
|
819
|
+
var _flowCtx$date, _ref7, _cacheItemForTransfor, _cacheItemForTransfor2;
|
|
820
820
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
821
821
|
if (typeof bookingTicket.transformDetailToProductAndBooking !== "function") throw new Error("[SalesSdk] Cart: bookingTicket.transformDetailToProductAndBooking 不可用");
|
|
822
822
|
const flowCtx = getAddFlowContext();
|
|
@@ -829,6 +829,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
829
829
|
date: (_flowCtx$date = flowCtx.date) !== null && _flowCtx$date !== void 0 ? _flowCtx$date : void 0
|
|
830
830
|
}
|
|
831
831
|
});
|
|
832
|
+
orderLine.note = (_ref7 = (_cacheItemForTransfor = cacheItemForTransform === null || cacheItemForTransform === void 0 || (_cacheItemForTransfor2 = cacheItemForTransform._extend) === null || _cacheItemForTransfor2 === void 0 ? void 0 : _cacheItemForTransfor2.note) !== null && _cacheItemForTransfor !== void 0 ? _cacheItemForTransfor : orderLine.note) !== null && _ref7 !== void 0 ? _ref7 : "";
|
|
832
833
|
const productLineMergeEnabled = resolveProductLineMergeEnabled(shouldMergeProductLines);
|
|
833
834
|
const products = yield bookingTicket.addProductToOrder(orderLine, booking, productLineMergeEnabled ? void 0 : { disableMerge: true });
|
|
834
835
|
const deferredConsistencyRefresh = scheduleDeferredAddConsistencyRefresh();
|
|
@@ -837,7 +838,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
837
838
|
return products;
|
|
838
839
|
});
|
|
839
840
|
return function(_x5, _x6, _x7) {
|
|
840
|
-
return
|
|
841
|
+
return _ref8.apply(this, arguments);
|
|
841
842
|
};
|
|
842
843
|
}());
|
|
843
844
|
const addProductToOrderFromCache = useMemoizedFn((item, cacheItem, options) => trackPendingCartMutation(addProductToOrderFromCacheImpl(item, cacheItem, options)));
|
|
@@ -846,7 +847,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
846
847
|
* 直接复用其 cacheItem 加车,避免再次执行 decide/enrich 并重复弹窗。
|
|
847
848
|
*/
|
|
848
849
|
const addPreparedProduct = useMemoizedFn(function() {
|
|
849
|
-
var
|
|
850
|
+
var _ref9 = _asyncToGenerator(function* (cacheItem, options) {
|
|
850
851
|
const quantity = (options === null || options === void 0 ? void 0 : options.quantity) != null && options.quantity > 0 ? Math.floor(options.quantity) : 1;
|
|
851
852
|
const preparedCacheItem = applyExplicitAddQuantityToCacheItem(cacheItem, quantity);
|
|
852
853
|
const products = yield addProductToOrderFromCache(preparedCacheItem, preparedCacheItem, { quantity });
|
|
@@ -857,7 +858,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
857
858
|
};
|
|
858
859
|
});
|
|
859
860
|
return function(_x8, _x9) {
|
|
860
|
-
return
|
|
861
|
+
return _ref9.apply(this, arguments);
|
|
861
862
|
};
|
|
862
863
|
}());
|
|
863
864
|
/**
|
|
@@ -876,7 +877,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
876
877
|
* 加车:走 OS `decideAddProduct` 两阶段决策;直加路径可透传 preparedCacheItem 跳过二次决策。
|
|
877
878
|
*/
|
|
878
879
|
const addProduct = useMemoizedFn(function() {
|
|
879
|
-
var
|
|
880
|
+
var _ref12 = _asyncToGenerator(function* (product, options) {
|
|
880
881
|
var _flowCtx$date2;
|
|
881
882
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
882
883
|
if (typeof bookingTicket.decideAddProduct !== "function") throw new Error("[SalesSdk] Cart: bookingTicket.decideAddProduct 不可用,请升级 pisellos");
|
|
@@ -889,7 +890,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
889
890
|
* addProduct(p, { quantity: 1, preparedCacheItem: cacheItem });
|
|
890
891
|
*/
|
|
891
892
|
const runDirectAddFromCacheItem = function() {
|
|
892
|
-
var
|
|
893
|
+
var _ref10 = _asyncToGenerator(function* (rawCacheItem) {
|
|
893
894
|
const cacheItemForEnrich = mergeCatalogDurationIntoCacheItem(applyExplicitAddQuantityToCacheItem(rawCacheItem, addQty), product);
|
|
894
895
|
const shouldPrepareHolderOptions = shouldPromptHolderOnAddCart({
|
|
895
896
|
cacheItem: cacheItemForEnrich,
|
|
@@ -918,7 +919,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
918
919
|
};
|
|
919
920
|
});
|
|
920
921
|
return function runDirectAddFromCacheItem(_x10) {
|
|
921
|
-
return
|
|
922
|
+
return _ref10.apply(this, arguments);
|
|
922
923
|
};
|
|
923
924
|
}();
|
|
924
925
|
if ((options === null || options === void 0 ? void 0 : options.preparedCacheItem) != null) return runDirectAddFromCacheItem(options.preparedCacheItem);
|
|
@@ -958,12 +959,12 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
958
959
|
};
|
|
959
960
|
}
|
|
960
961
|
if (decision.action === "requiresBookingEdit") {
|
|
961
|
-
var _decision$payload2, _flowCtx$date5,
|
|
962
|
+
var _decision$payload2, _flowCtx$date5, _ref11, _flowCtx$date6, _decision$payload3, _flowCtx$customerId, _decision$payload4;
|
|
962
963
|
return {
|
|
963
964
|
status: "requiresBookingEdit",
|
|
964
965
|
payload: _objectSpread2(_objectSpread2({}, (_decision$payload2 = decision.payload) !== null && _decision$payload2 !== void 0 ? _decision$payload2 : { date: (_flowCtx$date5 = flowCtx.date) !== null && _flowCtx$date5 !== void 0 ? _flowCtx$date5 : null }), {}, {
|
|
965
966
|
cacheItem: decision.cacheItem,
|
|
966
|
-
date: (
|
|
967
|
+
date: (_ref11 = (_flowCtx$date6 = flowCtx.date) !== null && _flowCtx$date6 !== void 0 ? _flowCtx$date6 : (_decision$payload3 = decision.payload) === null || _decision$payload3 === void 0 ? void 0 : _decision$payload3.date) !== null && _ref11 !== void 0 ? _ref11 : null,
|
|
967
968
|
customerId: (_flowCtx$customerId = flowCtx.customerId) !== null && _flowCtx$customerId !== void 0 ? _flowCtx$customerId : (_decision$payload4 = decision.payload) === null || _decision$payload4 === void 0 ? void 0 : _decision$payload4.customerId
|
|
968
969
|
})
|
|
969
970
|
};
|
|
@@ -971,14 +972,14 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
971
972
|
return runDirectAddFromCacheItem(decision.cacheItem);
|
|
972
973
|
});
|
|
973
974
|
return function(_x11, _x12) {
|
|
974
|
-
return
|
|
975
|
+
return _ref12.apply(this, arguments);
|
|
975
976
|
};
|
|
976
977
|
}());
|
|
977
978
|
/**
|
|
978
979
|
* 规格弹窗 callback 完成后:先跑第二段 `decideAfterDetail`,再决定加车或开资源抽屉。
|
|
979
980
|
*/
|
|
980
981
|
const confirmDetail = useMemoizedFn(function() {
|
|
981
|
-
var
|
|
982
|
+
var _ref14 = _asyncToGenerator(function* (input) {
|
|
982
983
|
var _flowCtx$date7, _input$options, _input$options3;
|
|
983
984
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
984
985
|
if (typeof bookingTicket.transformDetailToProductAndBooking !== "function") throw new Error("[SalesSdk] Cart: bookingTicket.transformDetailToProductAndBooking 不可用");
|
|
@@ -1006,7 +1007,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1006
1007
|
bookingConfig: (_flowCtx$bookingConfi = flowCtx.bookingConfig) !== null && _flowCtx$bookingConfi !== void 0 ? _flowCtx$bookingConfi : void 0
|
|
1007
1008
|
});
|
|
1008
1009
|
if (decision.action === "requiresBookingEdit") {
|
|
1009
|
-
var _decision$payload5,
|
|
1010
|
+
var _decision$payload5, _ref13, _flowCtx$date9, _decision$payload6, _flowCtx$customerId2, _decision$payload7;
|
|
1010
1011
|
return {
|
|
1011
1012
|
status: "requiresBookingEdit",
|
|
1012
1013
|
payload: _objectSpread2(_objectSpread2({}, (_decision$payload5 = decision.payload) !== null && _decision$payload5 !== void 0 ? _decision$payload5 : {
|
|
@@ -1014,7 +1015,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1014
1015
|
date: flowCtx.date
|
|
1015
1016
|
}), {}, {
|
|
1016
1017
|
cacheItem: decision.cacheItem,
|
|
1017
|
-
date: (
|
|
1018
|
+
date: (_ref13 = (_flowCtx$date9 = flowCtx.date) !== null && _flowCtx$date9 !== void 0 ? _flowCtx$date9 : (_decision$payload6 = decision.payload) === null || _decision$payload6 === void 0 ? void 0 : _decision$payload6.date) !== null && _ref13 !== void 0 ? _ref13 : null,
|
|
1018
1019
|
customerId: (_flowCtx$customerId2 = flowCtx.customerId) !== null && _flowCtx$customerId2 !== void 0 ? _flowCtx$customerId2 : (_decision$payload7 = decision.payload) === null || _decision$payload7 === void 0 ? void 0 : _decision$payload7.customerId
|
|
1019
1020
|
})
|
|
1020
1021
|
};
|
|
@@ -1052,12 +1053,12 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1052
1053
|
};
|
|
1053
1054
|
});
|
|
1054
1055
|
return function(_x13) {
|
|
1055
|
-
return
|
|
1056
|
+
return _ref14.apply(this, arguments);
|
|
1056
1057
|
};
|
|
1057
1058
|
}());
|
|
1058
1059
|
/** 资源 / 时间抽屉确认后加车。 */
|
|
1059
1060
|
const confirmBookingEdit = useMemoizedFn(function() {
|
|
1060
|
-
var
|
|
1061
|
+
var _ref15 = _asyncToGenerator(function* (input) {
|
|
1061
1062
|
var _input$options4;
|
|
1062
1063
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1063
1064
|
const products = yield addProductToOrderFromCache(input.cacheItem, input.cacheItem, { quantity: resolveAddQuantityFromCacheItem(input.cacheItem, (_input$options4 = input.options) === null || _input$options4 === void 0 ? void 0 : _input$options4.quantity) });
|
|
@@ -1065,7 +1066,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1065
1066
|
return { products };
|
|
1066
1067
|
});
|
|
1067
1068
|
return function(_x14) {
|
|
1068
|
-
return
|
|
1069
|
+
return _ref15.apply(this, arguments);
|
|
1069
1070
|
};
|
|
1070
1071
|
}());
|
|
1071
1072
|
const syncCommittedBookingSelection = useMemoizedFn(_asyncToGenerator(function* () {
|
|
@@ -1073,7 +1074,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1073
1074
|
}));
|
|
1074
1075
|
/** 无防抖的加车编排(规格 / 资源弹窗链)。 */
|
|
1075
1076
|
const runAddProductFlowBase = useMemoizedFn(function() {
|
|
1076
|
-
var
|
|
1077
|
+
var _ref16 = _asyncToGenerator(function* (product, options) {
|
|
1077
1078
|
const holderOptionsForProduct = yield ensureHolderOptionsForSource(product);
|
|
1078
1079
|
return runAddProductFlow({
|
|
1079
1080
|
addProduct,
|
|
@@ -1085,7 +1086,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1085
1086
|
}));
|
|
1086
1087
|
});
|
|
1087
1088
|
return function(_x15, _x16) {
|
|
1088
|
-
return
|
|
1089
|
+
return _ref16.apply(this, arguments);
|
|
1089
1090
|
};
|
|
1090
1091
|
}());
|
|
1091
1092
|
const addProductRef = useRef(addProduct);
|
|
@@ -1121,7 +1122,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1121
1122
|
},
|
|
1122
1123
|
onBookingSelectionCommitted: syncCommittedBookingSelection,
|
|
1123
1124
|
confirmBookingSelection: function() {
|
|
1124
|
-
var
|
|
1125
|
+
var _ref17 = _asyncToGenerator(function* (cacheItem, opts) {
|
|
1125
1126
|
const result = yield confirmBookingEditRef.current({
|
|
1126
1127
|
cacheItem,
|
|
1127
1128
|
options: {
|
|
@@ -1135,7 +1136,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1135
1136
|
} : result;
|
|
1136
1137
|
});
|
|
1137
1138
|
return function confirmBookingSelection(_x17, _x18) {
|
|
1138
|
-
return
|
|
1139
|
+
return _ref17.apply(this, arguments);
|
|
1139
1140
|
};
|
|
1140
1141
|
}(),
|
|
1141
1142
|
reloadProductCatalog: () => reloadProductCatalogRef.current(),
|
|
@@ -1169,17 +1170,17 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1169
1170
|
* 仅 action=add 时首击立即加车、200ms 内连点合并追加;关闭商品行合并时每次调用立即独立加车。
|
|
1170
1171
|
*/
|
|
1171
1172
|
const addProductWithFlow = useMemoizedFn(function() {
|
|
1172
|
-
var
|
|
1173
|
+
var _ref18 = _asyncToGenerator(function* (product, options) {
|
|
1173
1174
|
if (!bookingTicketRef.current) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1174
1175
|
const productLineMergeEnabled = resolveProductLineMergeEnabled(shouldMergeProductLines);
|
|
1175
1176
|
return debouncedAddRef.current.addProductWithFlow(product, productLineMergeEnabled ? options : _objectSpread2(_objectSpread2({}, options), {}, { debounceMs: 0 }));
|
|
1176
1177
|
});
|
|
1177
1178
|
return function(_x19, _x20) {
|
|
1178
|
-
return
|
|
1179
|
+
return _ref18.apply(this, arguments);
|
|
1179
1180
|
};
|
|
1180
1181
|
}());
|
|
1181
1182
|
const removeItem = useMemoizedFn(function() {
|
|
1182
|
-
var
|
|
1183
|
+
var _ref19 = _asyncToGenerator(function* (item) {
|
|
1183
1184
|
var _extend$product, _extend2;
|
|
1184
1185
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1185
1186
|
const productItem = (_extend$product = item === null || item === void 0 || (_extend2 = item._extend) === null || _extend2 === void 0 ? void 0 : _extend2.product) !== null && _extend$product !== void 0 ? _extend$product : item;
|
|
@@ -1196,11 +1197,11 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1196
1197
|
return result;
|
|
1197
1198
|
});
|
|
1198
1199
|
return function(_x21) {
|
|
1199
|
-
return
|
|
1200
|
+
return _ref19.apply(this, arguments);
|
|
1200
1201
|
};
|
|
1201
1202
|
}());
|
|
1202
1203
|
const updateItem = useMemoizedFn(function() {
|
|
1203
|
-
var
|
|
1204
|
+
var _ref20 = _asyncToGenerator(function* (params) {
|
|
1204
1205
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1205
1206
|
if (typeof bookingTicket.updateOrderProduct !== "function") throw new Error("[SalesSdk] Cart: updateOrderProduct 不可用");
|
|
1206
1207
|
const result = yield bookingTicket.updateOrderProduct(params);
|
|
@@ -1208,11 +1209,11 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1208
1209
|
return result;
|
|
1209
1210
|
});
|
|
1210
1211
|
return function(_x22) {
|
|
1211
|
-
return
|
|
1212
|
+
return _ref20.apply(this, arguments);
|
|
1212
1213
|
};
|
|
1213
1214
|
}());
|
|
1214
1215
|
const updateItems = useMemoizedFn(function() {
|
|
1215
|
-
var
|
|
1216
|
+
var _ref21 = _asyncToGenerator(function* (paramsList, options) {
|
|
1216
1217
|
var _bookingTicket$getTem7, _bookingTicket$getTem8;
|
|
1217
1218
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1218
1219
|
if (!paramsList.length) return (_bookingTicket$getTem7 = (_bookingTicket$getTem8 = bookingTicket.getTempOrder) === null || _bookingTicket$getTem8 === void 0 || (_bookingTicket$getTem8 = _bookingTicket$getTem8.call(bookingTicket)) === null || _bookingTicket$getTem8 === void 0 ? void 0 : _bookingTicket$getTem8.products) !== null && _bookingTicket$getTem7 !== void 0 ? _bookingTicket$getTem7 : [];
|
|
@@ -1222,11 +1223,11 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1222
1223
|
return result;
|
|
1223
1224
|
});
|
|
1224
1225
|
return function(_x23, _x24) {
|
|
1225
|
-
return
|
|
1226
|
+
return _ref21.apply(this, arguments);
|
|
1226
1227
|
};
|
|
1227
1228
|
}());
|
|
1228
1229
|
const updateItemQuantity = useMemoizedFn(function() {
|
|
1229
|
-
var
|
|
1230
|
+
var _ref22 = _asyncToGenerator(function* (item, num) {
|
|
1230
1231
|
var _extend$product2, _extend3;
|
|
1231
1232
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1232
1233
|
if (typeof bookingTicket.updateOrderProductQuantity !== "function") throw new Error("[SalesSdk] Cart: updateOrderProductQuantity 不可用");
|
|
@@ -1247,11 +1248,11 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1247
1248
|
return result;
|
|
1248
1249
|
});
|
|
1249
1250
|
return function(_x25, _x26) {
|
|
1250
|
-
return
|
|
1251
|
+
return _ref22.apply(this, arguments);
|
|
1251
1252
|
};
|
|
1252
1253
|
}());
|
|
1253
1254
|
const editCartLineBooking$1 = useMemoizedFn(function() {
|
|
1254
|
-
var
|
|
1255
|
+
var _ref25 = _asyncToGenerator(function* (item) {
|
|
1255
1256
|
var _bookingTicket$getPro5;
|
|
1256
1257
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1257
1258
|
return editCartLineBooking({
|
|
@@ -1263,31 +1264,31 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1263
1264
|
bookingConfigParams: sales === null || sales === void 0 ? void 0 : sales.bookingConfigParams,
|
|
1264
1265
|
updateItem,
|
|
1265
1266
|
onSelectionCommitted: function() {
|
|
1266
|
-
var
|
|
1267
|
+
var _ref23 = _asyncToGenerator(function* () {
|
|
1267
1268
|
yield syncCartAfterMutation();
|
|
1268
1269
|
});
|
|
1269
1270
|
return function onSelectionCommitted() {
|
|
1270
|
-
return
|
|
1271
|
+
return _ref23.apply(this, arguments);
|
|
1271
1272
|
};
|
|
1272
1273
|
}(),
|
|
1273
1274
|
syncQuantityByRows: function() {
|
|
1274
|
-
var
|
|
1275
|
+
var _ref24 = _asyncToGenerator(function* (params) {
|
|
1275
1276
|
const result = yield syncBookingLineQuantityByRows(_objectSpread2({ bookingTicket }, params));
|
|
1276
1277
|
yield syncCartAfterMutation();
|
|
1277
1278
|
return result;
|
|
1278
1279
|
});
|
|
1279
1280
|
return function syncQuantityByRows(_x27) {
|
|
1280
|
-
return
|
|
1281
|
+
return _ref24.apply(this, arguments);
|
|
1281
1282
|
};
|
|
1282
1283
|
}()
|
|
1283
1284
|
});
|
|
1284
1285
|
});
|
|
1285
1286
|
return function(_x28) {
|
|
1286
|
-
return
|
|
1287
|
+
return _ref25.apply(this, arguments);
|
|
1287
1288
|
};
|
|
1288
1289
|
}());
|
|
1289
1290
|
const editCartLineProduct$1 = useMemoizedFn(function() {
|
|
1290
|
-
var
|
|
1291
|
+
var _ref26 = _asyncToGenerator(function* (item) {
|
|
1291
1292
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1292
1293
|
const result = yield editCartLineProduct({
|
|
1293
1294
|
item,
|
|
@@ -1303,18 +1304,18 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1303
1304
|
};
|
|
1304
1305
|
});
|
|
1305
1306
|
return function(_x29) {
|
|
1306
|
-
return
|
|
1307
|
+
return _ref26.apply(this, arguments);
|
|
1307
1308
|
};
|
|
1308
1309
|
}());
|
|
1309
1310
|
const editCartLine = useMemoizedFn(function() {
|
|
1310
|
-
var
|
|
1311
|
+
var _ref27 = _asyncToGenerator(function* (target) {
|
|
1311
1312
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1312
1313
|
const item = resolveEditCartLineTarget(target, snapshot.items);
|
|
1313
1314
|
if (shouldEditCartLineAsBooking(item)) return editCartLineBooking$1(item);
|
|
1314
1315
|
return editCartLineProduct$1(item);
|
|
1315
1316
|
});
|
|
1316
1317
|
return function(_x30) {
|
|
1317
|
-
return
|
|
1318
|
+
return _ref27.apply(this, arguments);
|
|
1318
1319
|
};
|
|
1319
1320
|
}());
|
|
1320
1321
|
/**
|
|
@@ -1324,7 +1325,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1324
1325
|
* await selectGiftForItem(bookingRow);
|
|
1325
1326
|
*/
|
|
1326
1327
|
const selectGiftForItem = useMemoizedFn(function() {
|
|
1327
|
-
var
|
|
1328
|
+
var _ref28 = _asyncToGenerator(function* (target) {
|
|
1328
1329
|
var _mainItem$metadata, _mainItem$metadata2, _giftInfo$giftOptions, _promotion$strategyMe, _mainItem$giftData, _mainItem$giftData2;
|
|
1329
1330
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1330
1331
|
const mainItem = resolveEditCartLineTarget(target, snapshot.items);
|
|
@@ -1352,7 +1353,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1352
1353
|
yield syncCartAfterMutation();
|
|
1353
1354
|
});
|
|
1354
1355
|
return function(_x31) {
|
|
1355
|
-
return
|
|
1356
|
+
return _ref28.apply(this, arguments);
|
|
1356
1357
|
};
|
|
1357
1358
|
}());
|
|
1358
1359
|
const setOrderNote = useMemoizedFn((note) => {
|
|
@@ -1362,24 +1363,24 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1362
1363
|
return result;
|
|
1363
1364
|
});
|
|
1364
1365
|
const setLineNote = useMemoizedFn(function() {
|
|
1365
|
-
var
|
|
1366
|
+
var _ref29 = _asyncToGenerator(function* (identity, note) {
|
|
1366
1367
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1367
1368
|
const result = yield bookingTicket.setOrderProductLineNote(identity, note);
|
|
1368
1369
|
yield syncCartAfterMutation({ skipSummarySync: true });
|
|
1369
1370
|
return result;
|
|
1370
1371
|
});
|
|
1371
1372
|
return function(_x32, _x33) {
|
|
1372
|
-
return
|
|
1373
|
+
return _ref29.apply(this, arguments);
|
|
1373
1374
|
};
|
|
1374
1375
|
}());
|
|
1375
1376
|
const setDiscount = useMemoizedFn(function() {
|
|
1376
|
-
var
|
|
1377
|
+
var _ref30 = _asyncToGenerator(function* (params) {
|
|
1377
1378
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1378
1379
|
yield bookingTicket.setDiscountSelected(params);
|
|
1379
1380
|
yield syncCartAfterMutation();
|
|
1380
1381
|
});
|
|
1381
1382
|
return function(_x34) {
|
|
1382
|
-
return
|
|
1383
|
+
return _ref30.apply(this, arguments);
|
|
1383
1384
|
};
|
|
1384
1385
|
}());
|
|
1385
1386
|
const bestDiscount = useMemoizedFn(_asyncToGenerator(function* () {
|
|
@@ -1411,7 +1412,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1411
1412
|
yield syncCartAfterMutation();
|
|
1412
1413
|
}));
|
|
1413
1414
|
const loadDiscountConfig = useMemoizedFn(function() {
|
|
1414
|
-
var
|
|
1415
|
+
var _ref31 = _asyncToGenerator(function* (params) {
|
|
1415
1416
|
var _bookingTicket$getTem9, _bookingTicket$getTem10, _params$customerId, _bookingTicket$getOrd3, _params$action, _bookingTicket$getOrd5, _bookingTicket$getDis5;
|
|
1416
1417
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1417
1418
|
const liveTempOrder = (_bookingTicket$getTem9 = (_bookingTicket$getTem10 = bookingTicket.getTempOrder) === null || _bookingTicket$getTem10 === void 0 ? void 0 : _bookingTicket$getTem10.call(bookingTicket)) !== null && _bookingTicket$getTem9 !== void 0 ? _bookingTicket$getTem9 : snapshot.tempOrder;
|
|
@@ -1436,22 +1437,22 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1436
1437
|
};
|
|
1437
1438
|
});
|
|
1438
1439
|
return function(_x35) {
|
|
1439
|
-
return
|
|
1440
|
+
return _ref31.apply(this, arguments);
|
|
1440
1441
|
};
|
|
1441
1442
|
}());
|
|
1442
1443
|
const scanCode = useMemoizedFn(function() {
|
|
1443
|
-
var
|
|
1444
|
+
var _ref32 = _asyncToGenerator(function* (code, customerId) {
|
|
1444
1445
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1445
1446
|
const result = yield bookingTicket.scanPromotionCode(code, customerId);
|
|
1446
1447
|
yield syncCartAfterMutation();
|
|
1447
1448
|
return result;
|
|
1448
1449
|
});
|
|
1449
1450
|
return function(_x36, _x37) {
|
|
1450
|
-
return
|
|
1451
|
+
return _ref32.apply(this, arguments);
|
|
1451
1452
|
};
|
|
1452
1453
|
}());
|
|
1453
1454
|
const submit = useMemoizedFn(function() {
|
|
1454
|
-
var
|
|
1455
|
+
var _ref33 = _asyncToGenerator(function* (params, options) {
|
|
1455
1456
|
if (!bookingTicket) throw new Error("[SalesSdk] Cart: bookingTicket 未初始化");
|
|
1456
1457
|
yield waitForCartConsistency();
|
|
1457
1458
|
if (options === null || options === void 0 ? void 0 : options.validateHolder) {
|
|
@@ -1464,7 +1465,7 @@ const SalesSdkCartProvider = ({ children, shouldMergeProductLines, mergeBookingL
|
|
|
1464
1465
|
return bookingTicket.submitSalesOrder(params);
|
|
1465
1466
|
});
|
|
1466
1467
|
return function(_x38, _x39) {
|
|
1467
|
-
return
|
|
1468
|
+
return _ref33.apply(this, arguments);
|
|
1468
1469
|
};
|
|
1469
1470
|
}());
|
|
1470
1471
|
const recalcSummary = useMemoizedFn(_asyncToGenerator(function* () {
|
|
@@ -38,12 +38,12 @@ const Example = ({ product }: { product: ProductData }) => {
|
|
|
38
38
|
```tsx
|
|
39
39
|
import type { SelectionFlowStepConfig } from '@pisell/private-materials';
|
|
40
40
|
|
|
41
|
-
const steps = [
|
|
41
|
+
const steps: readonly SelectionFlowStepConfig[] = [
|
|
42
42
|
{ key: 'date', title: 'Date', modules: ['date'] },
|
|
43
43
|
{ key: 'sku', title: 'SKU', modules: ['sku'] },
|
|
44
44
|
{ key: 'booking', title: 'Booking', modules: ['time', 'resource'] },
|
|
45
45
|
{ key: 'holder', title: 'Holder', modules: ['holder'] },
|
|
46
|
-
]
|
|
46
|
+
];
|
|
47
47
|
|
|
48
48
|
modalRef.current?.open({
|
|
49
49
|
id: product.id,
|