@pisell/private-materials 6.12.162 → 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 +15 -15
- package/build/lowcode/view.js +15 -15
- package/es/components/kioskSale/index.js +7 -2
- package/es/plus/salesSdk/context/SalesSdkCartContext.js +1 -1
- package/es/plus/salesSdk/normalProductDetail/NormalProductDetailHostRenderer.js +2 -2
- package/es/pro/skuDetailModal/flow/presets.js +1 -1
- package/es/pro/skuDetailModal/index.js +10 -3
- package/es/pro/skuDetailModal/types.d.ts +5 -0
- package/es/pro/skuDetailModal/utils.js +2 -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/pro/skuDetailModal/flow/presets.js +1 -0
- package/lib/pro/skuDetailModal/index.js +9 -2
- package/lib/pro/skuDetailModal/types.d.ts +5 -0
- package/lib/pro/skuDetailModal/utils.js +2 -0
- package/package.json +4 -4
|
@@ -61,12 +61,17 @@ function KioskSale(props) {
|
|
|
61
61
|
return _objectWithoutProperties(productLoadParams, _excluded2);
|
|
62
62
|
}, [productLoadParams]);
|
|
63
63
|
const resolvedOtherParams = useMemo(() => _objectSpread2(_objectSpread2({}, otherParams || {}), channel ? { channel } : {}), [channel, otherParams]);
|
|
64
|
-
const
|
|
64
|
+
const isH5 = [otherParams === null || otherParams === void 0 ? void 0 : otherParams.platform, channel].some((value) => String(value || "").trim().toLowerCase() === "h5");
|
|
65
|
+
const productDetailPresentationPlatform = isH5 ? "default" : "kiosk";
|
|
65
66
|
const isPosChannel = String(channel || "").trim().toLowerCase() === "pos";
|
|
66
67
|
const resolvedNormalProductDetailConfig = useMemo(() => _objectSpread2(_objectSpread2(_objectSpread2({}, normalProductDetailConfig), isPosChannel ? {
|
|
67
68
|
allowUnavailableBookingSelection: true,
|
|
68
69
|
allowNoResourceBookingSelection: true
|
|
69
|
-
} : {}), {}, {
|
|
70
|
+
} : {}), {}, {
|
|
71
|
+
presentationPlatform: productDetailPresentationPlatform,
|
|
72
|
+
hideQuantityForBookingProducts: isH5 || (normalProductDetailConfig === null || normalProductDetailConfig === void 0 ? void 0 : normalProductDetailConfig.hideQuantityForBookingProducts)
|
|
73
|
+
}), [
|
|
74
|
+
isH5,
|
|
70
75
|
isPosChannel,
|
|
71
76
|
normalProductDetailConfig,
|
|
72
77
|
productDetailPresentationPlatform
|
|
@@ -295,7 +295,7 @@ function readSnapshot(bookingTicket, getHolderOptionsForSource = () => [], shoul
|
|
|
295
295
|
salesDetail,
|
|
296
296
|
bookings: shouldMergeBookingsForDisplay ? mergeBookingsForDisplay(bookings) : bookings,
|
|
297
297
|
items,
|
|
298
|
-
displayLines: [...productLineMergeEnabled ? mergeCartLinesForDisplay(enrichedLines, shouldMergeBookingsForDisplay ? void 0 : isRuntimeNewBookingLine) : enrichedLines].reverse(),
|
|
298
|
+
displayLines: [...productLineMergeEnabled ? mergeCartLinesForDisplay(enrichedLines, shouldMergeBookingsForDisplay ? void 0 : mergeBookingLinesForDisplay ? isRuntimeNewBookingLine : () => false) : enrichedLines].reverse(),
|
|
299
299
|
productLineMergeEnabled,
|
|
300
300
|
discountList: ((_bookingTicket$getDis = bookingTicket.getDiscountList) === null || _bookingTicket$getDis === void 0 ? void 0 : _bookingTicket$getDis.call(bookingTicket)) || EMPTY_DISCOUNT_LIST
|
|
301
301
|
};
|
|
@@ -103,7 +103,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
|
|
|
103
103
|
const pending = useSyncExternalStoreCompat(bridge.subscribe, bridge.getSnapshot, () => null);
|
|
104
104
|
const dismissRevision = useSyncExternalStoreCompat(bridge.subscribe, bridge.getDismissRevision, () => 0);
|
|
105
105
|
const { bookingTicket, salesModule, solution, bookingConfigParams, tempOrder, productLoadChannel, businessCode } = useSalesSdk();
|
|
106
|
-
const {
|
|
106
|
+
const { recalcSummary } = useSalesSdkCart();
|
|
107
107
|
const usesUnifiedBookingSales = solution === "unifiedBookingSales";
|
|
108
108
|
const initializeFullBookingContext = (defaultSkuDetailConfig === null || defaultSkuDetailConfig === void 0 ? void 0 : defaultSkuDetailConfig.initializeFullBookingContext) === true;
|
|
109
109
|
const { ensureHolderOptionsForSource, getHolderOptionsForSource } = useSalesSdkHolderOptional();
|
|
@@ -145,7 +145,7 @@ const NormalProductDetailHostRenderer = ({ defaultSkuDetailConfig }) => {
|
|
|
145
145
|
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("; ");
|
|
146
146
|
throw new Error(reason || "预约可用性校验失败。");
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
yield recalcSummary();
|
|
149
149
|
return salesModule.getCart().items;
|
|
150
150
|
});
|
|
151
151
|
return function(_x2, _x3, _x4) {
|
|
@@ -250,4 +250,4 @@ const selectionFlowPresets = {
|
|
|
250
250
|
pos: posSteps
|
|
251
251
|
};
|
|
252
252
|
//#endregion
|
|
253
|
-
export { bookingSelectionFlowSteps, customerSteps, posSteps, resolveBookingSelectionFlowSteps, resolveKioskBookingSelectionFlowSteps, resolveNormalProductSelectionFlowSteps, resolvePosSelectionFlowSteps, resolveProductSelectionFlowSteps, resolveUnifiedProductSelectionFlowSteps, selectionFlowPresets };
|
|
253
|
+
export { bookingSelectionFlowSteps, customerSteps, isBookingProduct, posSteps, resolveBookingSelectionFlowSteps, resolveKioskBookingSelectionFlowSteps, resolveNormalProductSelectionFlowSteps, resolvePosSelectionFlowSteps, resolveProductSelectionFlowSteps, resolveUnifiedProductSelectionFlowSteps, selectionFlowPresets };
|
|
@@ -17,7 +17,7 @@ import SKUOptionsSelection from "../../plus/skuOptionsSelection/index.js";
|
|
|
17
17
|
import locales_default from "./locales.js";
|
|
18
18
|
import locales_default$1 from "./flow/locales.js";
|
|
19
19
|
import useLocale from "../../hooks/useLocale.js";
|
|
20
|
-
import { canUseLocalProductData, formatSelectedSkuItems, getStockValidationResult, setHiddenStockAlertForToday } from "./utils.js";
|
|
20
|
+
import { canUseLocalProductData, formatSelectedSkuItems, getStockValidationResult, setHiddenStockAlertForToday, shouldShowQuantityStepper } from "./utils.js";
|
|
21
21
|
import useToast$1 from "../../hooks/useToast.js";
|
|
22
22
|
import useLogger from "../../hooks/useLogger.js";
|
|
23
23
|
import SkuDetailLoadingPanel from "./LoadingPanel.js";
|
|
@@ -27,6 +27,7 @@ import Weighing from "./components/weighing/index.js";
|
|
|
27
27
|
import { useWeighing } from "./components/weighing/useWeighing.js";
|
|
28
28
|
import mergeSelectionFlowSkuOther from "./flow/mergeSkuOther.js";
|
|
29
29
|
import { getSelectionFlowText, renderSelectionFlowCompileIssue, translateSelectionFlowMessage } from "./flow/i18n.js";
|
|
30
|
+
import { isBookingProduct } from "./flow/presets.js";
|
|
30
31
|
import { selectionFlowDraftAdapter } from "./flow/draftAdapter.js";
|
|
31
32
|
import buildConfirmProductData, { getReadySelectionFlowBookingPrice } from "./flow/buildConfirmProductData.js";
|
|
32
33
|
import { resolveSelectionFlowBookingPriceRequestKey } from "./flow/bookingPrice.js";
|
|
@@ -712,7 +713,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
712
713
|
useImperativeHandle(ref, () => ({
|
|
713
714
|
open: function() {
|
|
714
715
|
var _ref16 = _asyncToGenerator(function* (data) {
|
|
715
|
-
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;
|
|
716
|
+
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;
|
|
716
717
|
const currentTaskId = openTaskIdRef.current + 1;
|
|
717
718
|
openTaskIdRef.current = currentTaskId;
|
|
718
719
|
flowDateHydrationVersionRef.current += 1;
|
|
@@ -761,6 +762,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
761
762
|
isShowMobileWeighing: (_skuDetailConfig$isSh3 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowMobileWeighing) !== null && _skuDetailConfig$isSh3 !== void 0 ? _skuDetailConfig$isSh3 : false,
|
|
762
763
|
isShowProcedureSteps: (_skuDetailConfig$isSh4 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== null && _skuDetailConfig$isSh4 !== void 0 ? _skuDetailConfig$isSh4 : true,
|
|
763
764
|
isShowStepper: (_skuDetailConfig$isSh5 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowStepper) !== null && _skuDetailConfig$isSh5 !== void 0 ? _skuDetailConfig$isSh5 : true,
|
|
765
|
+
hideQuantityForBookingProducts: (_skuDetailConfig$hide = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.hideQuantityForBookingProducts) !== null && _skuDetailConfig$hide !== void 0 ? _skuDetailConfig$hide : false,
|
|
764
766
|
isShowNote: (_skuDetailConfig$isSh6 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowNote) !== null && _skuDetailConfig$isSh6 !== void 0 ? _skuDetailConfig$isSh6 : true,
|
|
765
767
|
isShowManualPriceChange: (_skuDetailConfig$isSh7 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowManualPriceChange) !== null && _skuDetailConfig$isSh7 !== void 0 ? _skuDetailConfig$isSh7 : true,
|
|
766
768
|
isShowRemove: (_skuDetailConfig$isSh8 = skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowRemove) !== null && _skuDetailConfig$isSh8 !== void 0 ? _skuDetailConfig$isSh8 : true,
|
|
@@ -1097,7 +1099,12 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1097
1099
|
readySelectionFlowBookingPrice,
|
|
1098
1100
|
unitPrice
|
|
1099
1101
|
]);
|
|
1100
|
-
const showQuantityStepper =
|
|
1102
|
+
const showQuantityStepper = shouldShowQuantityStepper({
|
|
1103
|
+
isShowStepper: skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowStepper,
|
|
1104
|
+
isWeighingProduct: isWeighingProduct$1,
|
|
1105
|
+
hideQuantityForBookingProducts: skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.hideQuantityForBookingProducts,
|
|
1106
|
+
isBookingProduct: isBookingProduct(productData)
|
|
1107
|
+
});
|
|
1101
1108
|
/**
|
|
1102
1109
|
* @title 售价小计
|
|
1103
1110
|
* @description
|
|
@@ -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,5 +1,6 @@
|
|
|
1
1
|
import { formatAmount } from "@pisell/utils";
|
|
2
2
|
//#region src/pro/skuDetailModal/utils.ts
|
|
3
|
+
const shouldShowQuantityStepper = (params) => Boolean(params.isShowStepper && !params.isWeighingProduct && !(params.hideQuantityForBookingProducts && params.isBookingProduct));
|
|
3
4
|
const canUseLocalProductData = (params) => {
|
|
4
5
|
var _params$productData, _params$productData2;
|
|
5
6
|
const isUserPlatform = params.platform === "pc" || params.platform === "h5";
|
|
@@ -163,4 +164,4 @@ function setHiddenStockAlertForToday(params) {
|
|
|
163
164
|
} catch (error) {}
|
|
164
165
|
}
|
|
165
166
|
//#endregion
|
|
166
|
-
export { canUseLocalProductData, formatSelectedSkuItems, getStockValidationResult, setHiddenStockAlertForToday };
|
|
167
|
+
export { canUseLocalProductData, formatSelectedSkuItems, getStockValidationResult, setHiddenStockAlertForToday, shouldShowQuantityStepper };
|
|
@@ -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) {
|
|
@@ -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
|
|
@@ -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",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"styled-components": "^6.0.0-rc.3",
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
72
|
"@pisell/pi-payment-sdk": "0.0.3",
|
|
73
|
-
"@pisell/utils": "3.0.4",
|
|
74
|
-
"@pisell/materials": "6.12.47",
|
|
75
73
|
"@pisell/icon": "0.0.11",
|
|
76
|
-
"@pisell/date-picker": "3.0.10"
|
|
74
|
+
"@pisell/date-picker": "3.0.10",
|
|
75
|
+
"@pisell/utils": "3.0.4",
|
|
76
|
+
"@pisell/materials": "6.12.47"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|