@pisell/private-materials 6.12.161 → 6.12.163
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/preview.js +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.js +18 -18
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
- package/es/components/bigSale/components/ProductList/index.js +30 -19
- package/es/components/bigSale/components/TimeBar/index.js +0 -1
- package/es/components/bigSale/dialog.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
- package/es/components/bigSale/index.js +1 -2
- package/es/components/bigSale/templates/Kiosk/index.js +0 -1
- package/es/components/kioskSale/index.js +7 -2
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/index.js +0 -2
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/saleDetail/Base.js +0 -1
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
- package/es/plus/saleDetail/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/index.js +0 -1
- package/es/plus/salesSdk/context/SalesSdkCartContext.js +1 -1
- package/es/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +2 -2
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/customerAuthGate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/plus/salesSdk/utils/runAddProductFlow.js +8 -4
- package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +1 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/es/pro/skuDetailModal/flow/presets.js +1 -1
- package/es/pro/skuDetailModal/index.js +14 -7
- package/es/pro/skuDetailModal/types.d.ts +5 -0
- package/es/pro/skuDetailModal/utils.js +2 -1
- package/lib/components/bigSale/components/ProductList/index.js +30 -19
- package/lib/components/bigSale/index.js +1 -1
- package/lib/components/kioskSale/index.js +7 -2
- package/lib/plus/salesSdk/context/SalesSdkCartContext.js +1 -1
- package/lib/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +2 -2
- package/lib/plus/salesSdk/utils/runAddProductFlow.js +8 -4
- package/lib/pro/skuDetailModal/flow/presets.js +1 -0
- package/lib/pro/skuDetailModal/index.js +13 -6
- package/lib/pro/skuDetailModal/types.d.ts +5 -0
- package/lib/pro/skuDetailModal/utils.js +2 -0
- package/package.json +3 -3
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -51
|
@@ -7,6 +7,7 @@ const require_useInitLocalesOnce = require("../../../../hooks/useInitLocalesOnce
|
|
|
7
7
|
const require_index = require("../../../../plus/productSelect/ProductCard/index.js");
|
|
8
8
|
const require_ProductCardV2 = require("../../../../plus/productSelect/ProductCard/ProductCardV2.js");
|
|
9
9
|
const require_useLocale = require("../../../../hooks/useLocale.js");
|
|
10
|
+
const require_useLogger = require("../../../../hooks/useLogger.js");
|
|
10
11
|
const require_List = require("../../../list/List.js");
|
|
11
12
|
const require_utils$1 = require("../../../ticketBooking/components/ProductDisplayAdapter/utils.js");
|
|
12
13
|
const require_showAddToCartToast = require("../../../../plus/salesSdk/components/showAddToCartToast.js");
|
|
@@ -136,6 +137,7 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
136
137
|
addToCartToastOptions === null || addToCartToastOptions === void 0 ? void 0 : addToCartToastOptions.duration
|
|
137
138
|
]);
|
|
138
139
|
const locale = require_useLocale.default();
|
|
140
|
+
const logger = require_useLogger.default();
|
|
139
141
|
const { sales, products, cart } = context;
|
|
140
142
|
const { load } = products;
|
|
141
143
|
const [keyword, setKeyword] = (0, react.useState)("");
|
|
@@ -303,17 +305,26 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
303
305
|
* handleSelectProduct(productItem);
|
|
304
306
|
*/
|
|
305
307
|
const handleSelectProduct = (0, ahooks.useMemoizedFn)(function() {
|
|
306
|
-
var
|
|
308
|
+
var _ref5 = require_asyncToGenerator._asyncToGenerator(function* (product) {
|
|
307
309
|
var _ref3, _product$id;
|
|
308
310
|
const handlesKioskToastAfterResult = productCardVersion === "v2" && !usesV2ProductCard;
|
|
309
311
|
const productId = String((_ref3 = (_product$id = product === null || product === void 0 ? void 0 : product.id) !== null && _product$id !== void 0 ? _product$id : product === null || product === void 0 ? void 0 : product.product_id) !== null && _ref3 !== void 0 ? _ref3 : "");
|
|
310
312
|
const baselineQuantity = phoneCartProductEntries.filter((entry) => resolvePhoneCartProductId(entry.value) === productId).reduce((total, entry) => total + entry.quantity, 0);
|
|
311
313
|
try {
|
|
312
|
-
var _sales$tempOrder3;
|
|
314
|
+
var _sales$tempOrder3, _logger$addLog, _ref4, _sales$tempOrder$orde, _sales$tempOrder4;
|
|
313
315
|
if (!sales.isReady) return;
|
|
314
316
|
if (requiredOrderId !== void 0 && Number((_sales$tempOrder3 = sales.tempOrder) === null || _sales$tempOrder3 === void 0 ? void 0 : _sales$tempOrder3.order_id) !== Number(requiredOrderId)) return;
|
|
315
317
|
const latestProduct = currentProducts.find((currentProduct) => currentProduct.id === product.id);
|
|
316
318
|
latestProduct && require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, product), {}, { cartDetailValue: latestProduct.cartDetailValue });
|
|
319
|
+
logger === null || logger === void 0 || (_logger$addLog = logger.addLog) === null || _logger$addLog === void 0 || _logger$addLog.call(logger, {
|
|
320
|
+
type: "info",
|
|
321
|
+
title: "[BigSaleProductList] 用户点击商品卡片加入购物车",
|
|
322
|
+
metadata: {
|
|
323
|
+
product_id: productId,
|
|
324
|
+
product_title: resolvePhoneProductTitle(product),
|
|
325
|
+
order_id: (_ref4 = (_sales$tempOrder$orde = (_sales$tempOrder4 = sales.tempOrder) === null || _sales$tempOrder4 === void 0 ? void 0 : _sales$tempOrder4.order_id) !== null && _sales$tempOrder$orde !== void 0 ? _sales$tempOrder$orde : requiredOrderId) !== null && _ref4 !== void 0 ? _ref4 : null
|
|
326
|
+
}
|
|
327
|
+
});
|
|
317
328
|
const result = yield cart.addProductWithFlow(product, {
|
|
318
329
|
quantity: 1,
|
|
319
330
|
notShowToast: handlesKioskToastAfterResult
|
|
@@ -325,7 +336,7 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
325
336
|
}
|
|
326
337
|
});
|
|
327
338
|
return function(_x) {
|
|
328
|
-
return
|
|
339
|
+
return _ref5.apply(this, arguments);
|
|
329
340
|
};
|
|
330
341
|
}());
|
|
331
342
|
const phoneCartProductEntries = (0, react.useMemo)(() => {
|
|
@@ -339,8 +350,8 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
339
350
|
const productUid = resolvePhoneCartLineUid(booking === null || booking === void 0 || (_booking$_extend = booking._extend) === null || _booking$_extend === void 0 ? void 0 : _booking$_extend.product);
|
|
340
351
|
if (productUid) bookingProductUids.add(productUid);
|
|
341
352
|
((booking === null || booking === void 0 || (_booking$_extend2 = booking._extend) === null || _booking$_extend2 === void 0 ? void 0 : _booking$_extend2.mergedFrom) || []).forEach((source) => {
|
|
342
|
-
var
|
|
343
|
-
const sourceUid = (
|
|
353
|
+
var _ref6, _source$booking$produ, _source$booking, _source$booking2;
|
|
354
|
+
const sourceUid = (_ref6 = (_source$booking$produ = source === null || source === void 0 || (_source$booking = source.booking) === null || _source$booking === void 0 ? void 0 : _source$booking.product_uid) !== null && _source$booking$produ !== void 0 ? _source$booking$produ : source === null || source === void 0 || (_source$booking2 = source.booking) === null || _source$booking2 === void 0 || (_source$booking2 = _source$booking2.metadata) === null || _source$booking2 === void 0 ? void 0 : _source$booking2.product_uid) !== null && _ref6 !== void 0 ? _ref6 : resolvePhoneCartLineUid(source === null || source === void 0 ? void 0 : source.product);
|
|
344
355
|
if (sourceUid !== void 0 && sourceUid !== null && sourceUid !== "") bookingProductUids.add(String(sourceUid));
|
|
345
356
|
});
|
|
346
357
|
});
|
|
@@ -354,10 +365,10 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
354
365
|
quantity: resolvePhoneCartEntryQuantity(item)
|
|
355
366
|
}));
|
|
356
367
|
displayBookings.forEach((booking) => {
|
|
357
|
-
var _booking$_extend3,
|
|
368
|
+
var _booking$_extend3, _ref7, _booking$_extend$disp, _booking$_extend4, _product$_extend, _product$product_id;
|
|
358
369
|
const product = booking === null || booking === void 0 || (_booking$_extend3 = booking._extend) === null || _booking$_extend3 === void 0 ? void 0 : _booking$_extend3.product;
|
|
359
370
|
if (!product || (product === null || product === void 0 ? void 0 : product._isGiftPromotion)) return;
|
|
360
|
-
const displayQuantity = (
|
|
371
|
+
const displayQuantity = (_ref7 = (_booking$_extend$disp = booking === null || booking === void 0 || (_booking$_extend4 = booking._extend) === null || _booking$_extend4 === void 0 ? void 0 : _booking$_extend4.displayQuantity) !== null && _booking$_extend$disp !== void 0 ? _booking$_extend$disp : product === null || product === void 0 || (_product$_extend = product._extend) === null || _product$_extend === void 0 ? void 0 : _product$_extend.displayQuantity) !== null && _ref7 !== void 0 ? _ref7 : product === null || product === void 0 ? void 0 : product.num;
|
|
361
372
|
const displayValue = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, product), {}, {
|
|
362
373
|
product_id: (_product$product_id = product === null || product === void 0 ? void 0 : product.product_id) !== null && _product$product_id !== void 0 ? _product$product_id : product === null || product === void 0 ? void 0 : product.id,
|
|
363
374
|
num: displayQuantity
|
|
@@ -401,9 +412,9 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
401
412
|
show();
|
|
402
413
|
});
|
|
403
414
|
const addPhoneProductWithToast = (0, ahooks.useMemoizedFn)(function() {
|
|
404
|
-
var
|
|
405
|
-
var
|
|
406
|
-
const productId = String((
|
|
415
|
+
var _ref9 = require_asyncToGenerator._asyncToGenerator(function* (product, quantity, type = "select", delayUntilModalClosed = false) {
|
|
416
|
+
var _ref8, _product$id2;
|
|
417
|
+
const productId = String((_ref8 = (_product$id2 = product === null || product === void 0 ? void 0 : product.id) !== null && _product$id2 !== void 0 ? _product$id2 : product === null || product === void 0 ? void 0 : product.product_id) !== null && _ref8 !== void 0 ? _ref8 : "");
|
|
407
418
|
const currentQuantity = phoneCartProductEntries.filter((entry) => resolvePhoneCartProductId(entry.value) === productId).reduce((total, entry) => total + entry.quantity, 0);
|
|
408
419
|
const result = yield cart.addProductWithFlow(product, {
|
|
409
420
|
type,
|
|
@@ -414,7 +425,7 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
414
425
|
return result;
|
|
415
426
|
});
|
|
416
427
|
return function(_x2, _x3) {
|
|
417
|
-
return
|
|
428
|
+
return _ref9.apply(this, arguments);
|
|
418
429
|
};
|
|
419
430
|
}());
|
|
420
431
|
/**
|
|
@@ -425,10 +436,10 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
425
436
|
* 这样不会为了“判断商品类型”预先渲染抽屉,同时保留异常商品数据的兜底能力。
|
|
426
437
|
*/
|
|
427
438
|
const addPhoneQuantityProductWithToast = (0, ahooks.useMemoizedFn)(function() {
|
|
428
|
-
var
|
|
429
|
-
var
|
|
439
|
+
var _ref11 = require_asyncToGenerator._asyncToGenerator(function* (product, quantity) {
|
|
440
|
+
var _ref10, _product$id3;
|
|
430
441
|
if (!require_utils.isNormalProductByDurationSchedule(product)) return addPhoneProductWithToast(product, quantity);
|
|
431
|
-
const productId = String((
|
|
442
|
+
const productId = String((_ref10 = (_product$id3 = product === null || product === void 0 ? void 0 : product.id) !== null && _product$id3 !== void 0 ? _product$id3 : product === null || product === void 0 ? void 0 : product.product_id) !== null && _ref10 !== void 0 ? _ref10 : "");
|
|
432
443
|
const result = yield cart.addProduct(product, {
|
|
433
444
|
type: "select",
|
|
434
445
|
quantity
|
|
@@ -440,11 +451,11 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
440
451
|
return addPhoneProductWithToast(product, quantity);
|
|
441
452
|
});
|
|
442
453
|
return function(_x4, _x5) {
|
|
443
|
-
return
|
|
454
|
+
return _ref11.apply(this, arguments);
|
|
444
455
|
};
|
|
445
456
|
}());
|
|
446
457
|
const handlePhoneProductCardChange = (0, ahooks.useMemoizedFn)(function() {
|
|
447
|
-
var
|
|
458
|
+
var _ref12 = require_asyncToGenerator._asyncToGenerator(function* (nextValue, _intent, meta) {
|
|
448
459
|
var _product$id4;
|
|
449
460
|
const product = meta === null || meta === void 0 ? void 0 : meta.product;
|
|
450
461
|
if (!product) return;
|
|
@@ -499,7 +510,7 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
499
510
|
}
|
|
500
511
|
});
|
|
501
512
|
return function(_x6, _x7, _x8) {
|
|
502
|
-
return
|
|
513
|
+
return _ref12.apply(this, arguments);
|
|
503
514
|
};
|
|
504
515
|
}());
|
|
505
516
|
const { data: listData, listProps: configuredListProps, skuCardAllConfig } = productListConfig;
|
|
@@ -674,9 +685,9 @@ const BigSaleProductListInner = ({ isActive = true, osKey, productListPreference
|
|
|
674
685
|
setActiveTab([]);
|
|
675
686
|
});
|
|
676
687
|
const handleKioskSearchClose = (0, ahooks.useMemoizedFn)(() => {
|
|
677
|
-
var
|
|
688
|
+
var _ref13, _kioskSearchCategoryT;
|
|
678
689
|
cancelPendingCategoryTransition();
|
|
679
|
-
const categoryTabBeforeSearch = (
|
|
690
|
+
const categoryTabBeforeSearch = (_ref13 = (_kioskSearchCategoryT = kioskSearchCategoryTabRef.current) !== null && _kioskSearchCategoryT !== void 0 ? _kioskSearchCategoryT : lastCategoryTabRef.current) !== null && _ref13 !== void 0 ? _ref13 : defaultActiveTab;
|
|
680
691
|
kioskSearchCategoryTabRef.current = void 0;
|
|
681
692
|
lastCategoryTabRef.current = categoryTabBeforeSearch;
|
|
682
693
|
setKeyword("");
|
|
@@ -75,7 +75,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, osModuleName, selectionFlowScene, lif
|
|
|
75
75
|
return resolvedTemplate === "kiosk" ? require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, selectionFlowConfig), {}, {
|
|
76
76
|
initializeFullBookingContext: false,
|
|
77
77
|
variant: "phone",
|
|
78
|
-
selectorColumns:
|
|
78
|
+
selectorColumns: (selectionFlowConfig === null || selectionFlowConfig === void 0 ? void 0 : selectionFlowConfig.presentationPlatform) === "kiosk" ? 2 : 1,
|
|
79
79
|
isShowProductSummary: true,
|
|
80
80
|
isShowCollapsibleSections: true,
|
|
81
81
|
isShowMobileWeighing: true,
|
|
@@ -63,12 +63,17 @@ function KioskSale(props) {
|
|
|
63
63
|
return require_objectWithoutProperties._objectWithoutProperties(productLoadParams, _excluded2);
|
|
64
64
|
}, [productLoadParams]);
|
|
65
65
|
const resolvedOtherParams = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, otherParams || {}), channel ? { channel } : {}), [channel, otherParams]);
|
|
66
|
-
const
|
|
66
|
+
const isH5 = [otherParams === null || otherParams === void 0 ? void 0 : otherParams.platform, channel].some((value) => String(value || "").trim().toLowerCase() === "h5");
|
|
67
|
+
const productDetailPresentationPlatform = isH5 ? "default" : "kiosk";
|
|
67
68
|
const isPosChannel = String(channel || "").trim().toLowerCase() === "pos";
|
|
68
69
|
const resolvedNormalProductDetailConfig = (0, react.useMemo)(() => require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, normalProductDetailConfig), isPosChannel ? {
|
|
69
70
|
allowUnavailableBookingSelection: true,
|
|
70
71
|
allowNoResourceBookingSelection: true
|
|
71
|
-
} : {}), {}, {
|
|
72
|
+
} : {}), {}, {
|
|
73
|
+
presentationPlatform: productDetailPresentationPlatform,
|
|
74
|
+
hideQuantityForBookingProducts: isH5 || (normalProductDetailConfig === null || normalProductDetailConfig === void 0 ? void 0 : normalProductDetailConfig.hideQuantityForBookingProducts)
|
|
75
|
+
}), [
|
|
76
|
+
isH5,
|
|
72
77
|
isPosChannel,
|
|
73
78
|
normalProductDetailConfig,
|
|
74
79
|
productDetailPresentationPlatform
|
|
@@ -298,7 +298,7 @@ function readSnapshot(bookingTicket, getHolderOptionsForSource = () => [], shoul
|
|
|
298
298
|
salesDetail,
|
|
299
299
|
bookings: shouldMergeBookingsForDisplay ? require_mergeBookingsForDisplay.mergeBookingsForDisplay(bookings) : bookings,
|
|
300
300
|
items,
|
|
301
|
-
displayLines: [...productLineMergeEnabled ? require_mergeBookingsForDisplay.mergeCartLinesForDisplay(enrichedLines, shouldMergeBookingsForDisplay ? void 0 : isRuntimeNewBookingLine) : enrichedLines].reverse(),
|
|
301
|
+
displayLines: [...productLineMergeEnabled ? require_mergeBookingsForDisplay.mergeCartLinesForDisplay(enrichedLines, shouldMergeBookingsForDisplay ? void 0 : mergeBookingLinesForDisplay ? isRuntimeNewBookingLine : () => false) : enrichedLines].reverse(),
|
|
302
302
|
productLineMergeEnabled,
|
|
303
303
|
discountList: ((_bookingTicket$getDis = bookingTicket.getDiscountList) === null || _bookingTicket$getDis === void 0 ? void 0 : _bookingTicket$getDis.call(bookingTicket)) || EMPTY_DISCOUNT_LIST
|
|
304
304
|
};
|
|
@@ -106,7 +106,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
|
|
|
106
106
|
const pending = require_useSyncExternalStoreCompat.useSyncExternalStoreCompat(bridge.subscribe, bridge.getSnapshot, () => null);
|
|
107
107
|
const dismissRevision = require_useSyncExternalStoreCompat.useSyncExternalStoreCompat(bridge.subscribe, bridge.getDismissRevision, () => 0);
|
|
108
108
|
const { bookingTicket, salesModule, solution, bookingConfigParams, tempOrder, productLoadChannel, businessCode } = require_useSalesSdk.useSalesSdk();
|
|
109
|
-
const {
|
|
109
|
+
const { recalcSummary } = require_useSalesSdkCart.useSalesSdkCart();
|
|
110
110
|
const usesUnifiedBookingSales = solution === "unifiedBookingSales";
|
|
111
111
|
const initializeFullBookingContext = (defaultSkuDetailConfig === null || defaultSkuDetailConfig === void 0 ? void 0 : defaultSkuDetailConfig.initializeFullBookingContext) === true;
|
|
112
112
|
const { ensureHolderOptionsForSource, getHolderOptionsForSource } = require_SalesSdkHolderContext.useSalesSdkHolderOptional();
|
|
@@ -148,7 +148,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
|
|
|
148
148
|
const reason = (_committed$validation2 = committed.validation.conflicts) === null || _committed$validation2 === void 0 ? void 0 : _committed$validation2.map((item) => item.message || item.code).filter(Boolean).join("; ");
|
|
149
149
|
throw new Error(reason || "预约可用性校验失败。");
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
yield recalcSummary();
|
|
152
152
|
return salesModule.getCart().items;
|
|
153
153
|
});
|
|
154
154
|
return function(_x2, _x3, _x4) {
|
|
@@ -154,10 +154,14 @@ function _runAddProductFlow() {
|
|
|
154
154
|
initialHolderIds: (_flowOptions$initialH = flowOptions.initialHolderIds) !== null && _flowOptions$initialH !== void 0 ? _flowOptions$initialH : result.payload.initialHolderIds
|
|
155
155
|
}));
|
|
156
156
|
if (!detailResult) return { status: "cancelled" };
|
|
157
|
-
if (detailResult._committedProducts)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
if (detailResult._committedProducts) {
|
|
158
|
+
var _flowOptions$onBookin2;
|
|
159
|
+
yield (_flowOptions$onBookin2 = flowOptions.onBookingSelectionCommitted) === null || _flowOptions$onBookin2 === void 0 ? void 0 : _flowOptions$onBookin2.call(flowOptions);
|
|
160
|
+
return {
|
|
161
|
+
status: "added",
|
|
162
|
+
products: detailResult._committedProducts
|
|
163
|
+
};
|
|
164
|
+
}
|
|
161
165
|
const catalog = (_result$payload$produ = (_result$payload = result.payload) === null || _result$payload === void 0 ? void 0 : _result$payload.productData) !== null && _result$payload$produ !== void 0 ? _result$payload$produ : product;
|
|
162
166
|
const detailExtend = (_detailResult$detail = detailResult.detail) === null || _detailResult$detail === void 0 ? void 0 : _detailResult$detail._extend;
|
|
163
167
|
const hasFlowSelectedMultiDayRange = require_resolveIsMultiDayProduct.resolveIsMultiDayProduct(detailResult.detail, catalog, product) && (detailExtend === null || detailExtend === void 0 ? void 0 : detailExtend.start_date) && (detailExtend === null || detailExtend === void 0 ? void 0 : detailExtend.end_date);
|
|
@@ -252,6 +252,7 @@ const selectionFlowPresets = {
|
|
|
252
252
|
//#endregion
|
|
253
253
|
exports.bookingSelectionFlowSteps = bookingSelectionFlowSteps;
|
|
254
254
|
exports.customerSteps = customerSteps;
|
|
255
|
+
exports.isBookingProduct = isBookingProduct;
|
|
255
256
|
exports.posSteps = posSteps;
|
|
256
257
|
exports.resolveBookingSelectionFlowSteps = resolveBookingSelectionFlowSteps;
|
|
257
258
|
exports.resolveKioskBookingSelectionFlowSteps = resolveKioskBookingSelectionFlowSteps;
|
|
@@ -28,6 +28,7 @@ const require_index$6 = require("./components/weighing/index.js");
|
|
|
28
28
|
const require_useWeighing = require("./components/weighing/useWeighing.js");
|
|
29
29
|
const require_mergeSkuOther = require("./flow/mergeSkuOther.js");
|
|
30
30
|
const require_i18n = require("./flow/i18n.js");
|
|
31
|
+
const require_presets = require("./flow/presets.js");
|
|
31
32
|
const require_draftAdapter = require("./flow/draftAdapter.js");
|
|
32
33
|
const require_buildConfirmProductData = require("./flow/buildConfirmProductData.js");
|
|
33
34
|
const require_bookingPrice = require("./flow/bookingPrice.js");
|
|
@@ -718,7 +719,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
718
719
|
(0, react.useImperativeHandle)(ref, () => ({
|
|
719
720
|
open: function() {
|
|
720
721
|
var _ref16 = require_asyncToGenerator._asyncToGenerator(function* (data) {
|
|
721
|
-
var _skuDetailConfig$isSh, _skuDetailConfig$isSh2, _skuDetailConfig$isSh3, _skuDetailConfig$isSh4, _skuDetailConfig$isSh5, _skuDetailConfig$isSh6, _skuDetailConfig$isSh7, _skuDetailConfig$isSh8, _skuDetailConfig$exte, _skuDetailConfig$useC, _skuDetailConfig$cust, _skuDetailConfig$isCa, _skuDetailConfig, _skuDetailConfig2, _data$bundle_group, _data$_extend, _data$_extend2, _data$discount_list, _ref14, _data$_extend3, _data$_extend4, _data$_extend5, _data$discount_list$f, _data$discount_list2, _ref15, _data$_extend$priceOv, _data$_extend7;
|
|
722
|
+
var _skuDetailConfig$isSh, _skuDetailConfig$isSh2, _skuDetailConfig$isSh3, _skuDetailConfig$isSh4, _skuDetailConfig$isSh5, _skuDetailConfig$hide, _skuDetailConfig$isSh6, _skuDetailConfig$isSh7, _skuDetailConfig$isSh8, _skuDetailConfig$exte, _skuDetailConfig$useC, _skuDetailConfig$cust, _skuDetailConfig$isCa, _skuDetailConfig, _skuDetailConfig2, _data$bundle_group, _data$_extend, _data$_extend2, _data$discount_list, _ref14, _data$_extend3, _data$_extend4, _data$_extend5, _data$discount_list$f, _data$discount_list2, _ref15, _data$_extend$priceOv, _data$_extend7;
|
|
722
723
|
const currentTaskId = openTaskIdRef.current + 1;
|
|
723
724
|
openTaskIdRef.current = currentTaskId;
|
|
724
725
|
flowDateHydrationVersionRef.current += 1;
|
|
@@ -767,6 +768,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
767
768
|
isShowMobileWeighing: (_skuDetailConfig$isSh3 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowMobileWeighing) !== null && _skuDetailConfig$isSh3 !== void 0 ? _skuDetailConfig$isSh3 : false,
|
|
768
769
|
isShowProcedureSteps: (_skuDetailConfig$isSh4 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== null && _skuDetailConfig$isSh4 !== void 0 ? _skuDetailConfig$isSh4 : true,
|
|
769
770
|
isShowStepper: (_skuDetailConfig$isSh5 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowStepper) !== null && _skuDetailConfig$isSh5 !== void 0 ? _skuDetailConfig$isSh5 : true,
|
|
771
|
+
hideQuantityForBookingProducts: (_skuDetailConfig$hide = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.hideQuantityForBookingProducts) !== null && _skuDetailConfig$hide !== void 0 ? _skuDetailConfig$hide : false,
|
|
770
772
|
isShowNote: (_skuDetailConfig$isSh6 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowNote) !== null && _skuDetailConfig$isSh6 !== void 0 ? _skuDetailConfig$isSh6 : true,
|
|
771
773
|
isShowManualPriceChange: (_skuDetailConfig$isSh7 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowManualPriceChange) !== null && _skuDetailConfig$isSh7 !== void 0 ? _skuDetailConfig$isSh7 : true,
|
|
772
774
|
isShowRemove: (_skuDetailConfig$isSh8 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowRemove) !== null && _skuDetailConfig$isSh8 !== void 0 ? _skuDetailConfig$isSh8 : true,
|
|
@@ -1103,7 +1105,12 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1103
1105
|
readySelectionFlowBookingPrice,
|
|
1104
1106
|
unitPrice
|
|
1105
1107
|
]);
|
|
1106
|
-
const showQuantityStepper =
|
|
1108
|
+
const showQuantityStepper = require_utils$3.shouldShowQuantityStepper({
|
|
1109
|
+
isShowStepper: skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowStepper,
|
|
1110
|
+
isWeighingProduct: isWeighingProduct$1,
|
|
1111
|
+
hideQuantityForBookingProducts: skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.hideQuantityForBookingProducts,
|
|
1112
|
+
isBookingProduct: require_presets.isBookingProduct(productData)
|
|
1113
|
+
});
|
|
1107
1114
|
/**
|
|
1108
1115
|
* @title 售价小计
|
|
1109
1116
|
* @description
|
|
@@ -1679,7 +1686,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1679
1686
|
}, isMobile && (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProductSummary) ? showProductDetailsCollapsible ? /* @__PURE__ */ react.default.createElement(require_index$5.default, {
|
|
1680
1687
|
key: `details-${selectionFlowInstanceKey}`,
|
|
1681
1688
|
title: _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.section.details"),
|
|
1682
|
-
defaultExpanded:
|
|
1689
|
+
defaultExpanded: isKioskPlatform
|
|
1683
1690
|
}, renderProductDetails()) : renderProductSummary() : null, shouldRenderMobileWeighing ? /* @__PURE__ */ react.default.createElement("div", { className: "sku-detail-mobile-weighing" }, renderWeighingSection()) : null, /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellSelectionFlow, {
|
|
1684
1691
|
key: selectionFlowInstanceKey,
|
|
1685
1692
|
ref: selectionFlowRef,
|
|
@@ -1764,7 +1771,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1764
1771
|
key: `details-${selectionFlowInstanceKey}`,
|
|
1765
1772
|
className: "sku-detail-collapsible-section--product-details",
|
|
1766
1773
|
title: _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.section.details"),
|
|
1767
|
-
defaultExpanded:
|
|
1774
|
+
defaultExpanded: isKioskPlatform
|
|
1768
1775
|
}, renderProductDetails()) : mobileProductDetails, shouldRenderMobileWeighing ? /* @__PURE__ */ react.default.createElement("div", { className: "sku-detail-mobile-weighing" }, renderWeighingSection()) : null, shouldRenderSkuSelection ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(require_index$4.default, {
|
|
1769
1776
|
ref: skuOptionsSelectionRef,
|
|
1770
1777
|
dataSource: productData,
|
|
@@ -1827,8 +1834,8 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1827
1834
|
footer: variant === "phone" ? leftContent({ showTop: false }) : null,
|
|
1828
1835
|
closable: false,
|
|
1829
1836
|
destroyOnClose: true,
|
|
1830
|
-
style: { maxHeight: variant === "phone" ? "99dvh" : void 0 },
|
|
1831
|
-
height: variant === "phone" ? "auto" : void 0,
|
|
1837
|
+
style: { maxHeight: isKioskPlatform ? "100%" : variant === "phone" ? "99dvh" : void 0 },
|
|
1838
|
+
height: isKioskPlatform ? "100%" : variant === "phone" ? "auto" : void 0,
|
|
1832
1839
|
styles: isKioskPlatform ? { content: { height: "100%" } } : void 0,
|
|
1833
1840
|
width: variant === "phone" ? "100%" : "80%",
|
|
1834
1841
|
className: (0, classnames.default)({
|
|
@@ -446,6 +446,11 @@ interface ConfigProps {
|
|
|
446
446
|
isShowProcedureSteps?: boolean;
|
|
447
447
|
/** 是否显示数量步进器 */
|
|
448
448
|
isShowStepper?: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* 是否仅对预约/Session 门票商品隐藏数量步进器。
|
|
451
|
+
* KioskSale 的 H5 宿主使用该开关;普通零售商品仍保留数量选择。
|
|
452
|
+
*/
|
|
453
|
+
hideQuantityForBookingProducts?: boolean;
|
|
449
454
|
/** 是否显示备注 */
|
|
450
455
|
isShowNote?: boolean;
|
|
451
456
|
/** 是否显示手动改价入口 */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require("../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
let _pisell_utils = require("@pisell/utils");
|
|
3
3
|
//#region src/pro/skuDetailModal/utils.ts
|
|
4
|
+
const shouldShowQuantityStepper = (params) => Boolean(params.isShowStepper && !params.isWeighingProduct && !(params.hideQuantityForBookingProducts && params.isBookingProduct));
|
|
4
5
|
const canUseLocalProductData = (params) => {
|
|
5
6
|
var _params$productData, _params$productData2;
|
|
6
7
|
const isUserPlatform = params.platform === "pc" || params.platform === "h5";
|
|
@@ -168,3 +169,4 @@ exports.canUseLocalProductData = canUseLocalProductData;
|
|
|
168
169
|
exports.formatSelectedSkuItems = formatSelectedSkuItems;
|
|
169
170
|
exports.getStockValidationResult = getStockValidationResult;
|
|
170
171
|
exports.setHiddenStockAlertForToday = setHiddenStockAlertForToday;
|
|
172
|
+
exports.shouldShowQuantityStepper = shouldShowQuantityStepper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.163",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
72
|
"@pisell/pi-payment-sdk": "0.0.3",
|
|
73
73
|
"@pisell/icon": "0.0.11",
|
|
74
|
-
"@pisell/
|
|
74
|
+
"@pisell/date-picker": "3.0.10",
|
|
75
75
|
"@pisell/utils": "3.0.4",
|
|
76
|
-
"@pisell/
|
|
76
|
+
"@pisell/materials": "6.12.47"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "./serve/formResourcePage.js";
|
|
2
|
-
import "./floorRoomCard/mapRowToFloorRoomCardData.js";
|
|
3
|
-
import "./floorRoomCard/ReservationFloorRoomCard.js";
|
|
4
|
-
import "./floorMap/reservationMock.js";
|
|
5
|
-
import "./floorMap/floorPlanApi.js";
|
|
6
|
-
import "./reservationConstants.js";
|
|
7
|
-
import "./data/bookingToReservationTables.js";
|
|
8
|
-
import "./data/formResourceToReservationTables.js";
|
|
9
|
-
import "./data/salesEmbeddedResourceToTableRows.js";
|
|
10
|
-
import "./floorMap/reservationCards.js";
|
|
11
|
-
import "./PisellReservation.js";
|
|
12
|
-
import "./PisellReservationBookingPage.js";
|
|
13
|
-
import "./PisellVenueControlPage.js";
|
|
14
|
-
import "./PisellVenueWallPage.js";
|
|
15
|
-
import "./PisellReservationTablePage.js";
|
|
16
|
-
import "./components/SelectFloorMapResourceDialog.js";
|
|
17
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import "./hosts/createInstanceHostBridge.js";
|
|
2
|
-
import "./holderConfirm/createHolderConfirmBridge.js";
|
|
3
|
-
import "./giftSelect/createGiftSelectBridge.js";
|
|
4
|
-
import "./context/SalesSdkHostBridgesContext.js";
|
|
5
|
-
import "./utils/formatHolderOptions.js";
|
|
6
|
-
import "./utils/enrichCartLineHolderDisplay.js";
|
|
7
|
-
import "./context/SalesSdkHolderContext.js";
|
|
8
|
-
import "./utils/appendPromotionTags.js";
|
|
9
|
-
import "./context/SalesSdkUIHostsContext.js";
|
|
10
|
-
import "./utils/runAddProductFlow.js";
|
|
11
|
-
import "./components/showAddToCartToast.js";
|
|
12
|
-
import "./utils/resolveAddProductDebounceKey.js";
|
|
13
|
-
import "./utils/productSkuOptions.js";
|
|
14
|
-
import "./utils/identity.js";
|
|
15
|
-
import "./utils/resolveInCartQuantityForAddToast.js";
|
|
16
|
-
import "./utils/addProductWithFlowDebounced.js";
|
|
17
|
-
import "./utils/customerAuthGate.js";
|
|
18
|
-
import "./utils/bookingDate.js";
|
|
19
|
-
import "./utils/holderSubmitValidation.js";
|
|
20
|
-
import "./utils/removeOrderProducts.js";
|
|
21
|
-
import "./selectors.js";
|
|
22
|
-
import "./utils/enrich.js";
|
|
23
|
-
import "./giftSelect/createOpenGiftSelectHost.js";
|
|
24
|
-
import "./utils/ensureHoldersBeforeSubmit.js";
|
|
25
|
-
import "./hooks/useSalesSdk.js";
|
|
26
|
-
import "./bookingEditService/BookingEditServiceDrawer.js";
|
|
27
|
-
import "./hosts/BookingEditHostRenderer.js";
|
|
28
|
-
import "./hosts/CustomerAuthHostRenderer.js";
|
|
29
|
-
import "./hooks/useSalesSdkCart.js";
|
|
30
|
-
import "./hooks/useSalesSdkCustomer.js";
|
|
31
|
-
import "./normalProductDetail/NormalProductDetailHostRenderer.js";
|
|
32
|
-
import "./hosts/createOpenBookingEditHost.js";
|
|
33
|
-
import "./hosts/createOpenMultiDaySelectHost.js";
|
|
34
|
-
import "./hosts/createOpenHolderSelectHost.js";
|
|
35
|
-
import "./hosts/createOpenCustomerAuthHost.js";
|
|
36
|
-
import "./demo/hosts/legacyOpenProductDetail.js";
|
|
37
|
-
import "./hosts/createCompositeOpenProductDetailHost.js";
|
|
38
|
-
import "./normalProductDetail/createOpenNormalProductDetailHost.js";
|
|
39
|
-
import "./normalProductDetail/createOpenBookingSelectionFlowHost.js";
|
|
40
|
-
import "./giftSelect/GiftSelectModal.js";
|
|
41
|
-
import "./giftSelect/GiftSelectHostRenderer.js";
|
|
42
|
-
import "./context/SalesSdkProvider.js";
|
|
43
|
-
import "./context/SalesSdkDishContext.js";
|
|
44
|
-
import "./context/SalesSdkBookingContext.js";
|
|
45
|
-
import "./hooks/useSalesSdkSummary.js";
|
|
46
|
-
import "./hooks/useSalesSdkProducts.js";
|
|
47
|
-
import "./demo/index.js";
|
|
48
|
-
import "./hooks/useSalesSdkDish.js";
|
|
49
|
-
import "./hooks/useCurrentSalesSdkDish.js";
|
|
50
|
-
import "./hooks/useSyncOsModule.js";
|
|
51
|
-
export {};
|