@pisell/private-materials 6.12.372 → 6.12.374

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +2 -2
  6. package/build/lowcode/view.js +2 -2
  7. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
  8. package/es/components/bigSale/components/ProductList/index.js +1 -0
  9. package/es/components/bigSale/components/TimeBar/index.js +1 -0
  10. package/es/components/bigSale/dialog.js +1 -0
  11. package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
  12. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
  13. package/es/components/bigSale/index.js +1 -0
  14. package/es/components/bigSale/templates/Kiosk/index.js +5 -4
  15. package/es/components/bigSale/templates/Kiosk/zeroAmountCheckout.js +14 -6
  16. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
  17. package/es/index.js +2 -0
  18. package/es/plus/multiCurrencySettlement/index.js +1 -1
  19. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  20. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  21. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  22. package/es/plus/pisellReservation/index.js +17 -0
  23. package/es/plus/saleDetail/Base.js +1 -0
  24. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
  25. package/es/plus/saleDetail/components/DetailActions/PrintAction.js +1 -0
  26. package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
  27. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
  28. package/es/plus/saleDetail/index.js +1 -0
  29. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
  30. package/es/plus/saleDetail/tmpl/B/index.js +1 -0
  31. package/es/plus/salesSdk/index.js +54 -0
  32. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  33. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  34. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  35. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  36. package/es/pro/Login2.0/index.d.ts +2 -2
  37. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  38. package/es/pro/compensatedPisellContainer/floatingLayer/index.js +74 -59
  39. package/es/pro/compensatedPisellContainer/floatingLayer/observeTransitions.js +65 -0
  40. package/es/pro/skuDetailModal/index.js +53 -65
  41. package/lib/components/bigSale/templates/Kiosk/index.js +3 -3
  42. package/lib/components/bigSale/templates/Kiosk/zeroAmountCheckout.js +15 -7
  43. package/lib/pro/compensatedPisellContainer/floatingLayer/index.js +73 -58
  44. package/lib/pro/compensatedPisellContainer/floatingLayer/observeTransitions.js +65 -0
  45. package/lib/pro/skuDetailModal/index.js +53 -65
  46. package/package.json +2 -2
  47. package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
@@ -75,16 +75,6 @@ const getBodyScaleY = () => {
75
75
  const matrix = new DOMMatrixReadOnly(transform);
76
76
  return Math.sqrt(matrix.c * matrix.c + matrix.d * matrix.d) || 1;
77
77
  };
78
- const waitForModalEntranceFrame = () => {
79
- if (typeof window === "undefined") return Promise.resolve();
80
- return new Promise((resolve) => {
81
- requestAnimationFrame(() => {
82
- requestAnimationFrame(() => {
83
- window.setTimeout(() => resolve(), 10);
84
- });
85
- });
86
- });
87
- };
88
78
  const toValidDayjs = (value) => {
89
79
  if (!value) return null;
90
80
  const parsed = dayjs(value);
@@ -198,6 +188,8 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
198
188
  const inventory = useContext(SalesInventoryContext);
199
189
  const [baseProductData, setProductData] = useState(null);
200
190
  const [detailLoading, setDetailLoading] = useState(false);
191
+ const [modalEntered, setModalEntered] = useState(false);
192
+ const detailContentLoading = detailLoading || !modalEntered;
201
193
  const [appearanceConfirmPending, setAppearanceConfirmPending] = useState(false);
202
194
  const appearanceConfirmTaskRef = useRef(null);
203
195
  const [note, setNote] = useState("");
@@ -514,7 +506,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
514
506
  updateSelectionFlowCanScrollDown(canScrollDown);
515
507
  }, [resolveSelectionFlowScrollContainer, updateSelectionFlowCanScrollDown]);
516
508
  useLayoutEffect(() => {
517
- if (!open || !isMobile || detailLoading || !productData) {
509
+ if (!open || !isMobile || detailContentLoading || !productData) {
518
510
  updateSelectionFlowCanScrollDown(false);
519
511
  return;
520
512
  }
@@ -564,7 +556,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
564
556
  };
565
557
  }, [
566
558
  currentStep,
567
- detailLoading,
559
+ detailContentLoading,
568
560
  isCustomSelectionFlow,
569
561
  isKioskPlatform,
570
562
  isMobile,
@@ -980,8 +972,8 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
980
972
  });
981
973
  },
982
974
  open: function() {
983
- var _ref19 = _asyncToGenerator(function* (data) {
984
- var _product_id, _selectionFlowService2, _noteDiagnosticsRef$c2, _product_id2, _enrichmentAbortRef$c2, _skuDetailConfig$enab, _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, _ref17, _data$_extend3, _data$_extend4, _data$_extend5, _data$discount_list$f, _data$discount_list2, _ref18, _data$_extend$priceOv, _data$_extend7;
975
+ var _ref18 = _asyncToGenerator(function* (data) {
976
+ var _product_id, _selectionFlowService2, _noteDiagnosticsRef$c2, _product_id2, _enrichmentAbortRef$c2, _skuDetailConfig$enab, _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, _ref16, _data$_extend3, _data$_extend4, _data$_extend5, _data$discount_list$f, _data$discount_list2, _ref17, _data$_extend$priceOv, _data$_extend7;
985
977
  const shownLog = {
986
978
  product_id: String((_product_id = data.product_id) !== null && _product_id !== void 0 ? _product_id : data.id),
987
979
  mode: ((_selectionFlowService2 = data.selectionFlowServices) === null || _selectionFlowService2 === void 0 ? void 0 : _selectionFlowService2.selectionFlowMode) || ("date" in data && !("_extend" in data) ? "create" : "edit"),
@@ -1005,18 +997,12 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1005
997
  setInventorySelectorSnapshot(null);
1006
998
  flowDateHydrationVersionRef.current += 1;
1007
999
  const isCurrentOpenTask = () => openTaskIdRef.current === currentTaskId;
1008
- const showModalShellBeforeHydration = function() {
1009
- var _ref8 = _asyncToGenerator(function* () {
1010
- setProductData(null);
1011
- setDetailLoading(true);
1012
- setOpen(true);
1013
- yield waitForModalEntranceFrame();
1014
- return isCurrentOpenTask();
1015
- });
1016
- return function showModalShellBeforeHydration() {
1017
- return _ref8.apply(this, arguments);
1018
- };
1019
- }();
1000
+ if (!open) setModalEntered(false);
1001
+ const showModalShellBeforeHydration = () => {
1002
+ setProductData(null);
1003
+ setDetailLoading(true);
1004
+ setOpen(true);
1005
+ };
1020
1006
  setCurrentStep(0);
1021
1007
  lateQuantityReviewStepIndexRef.current = null;
1022
1008
  lateQuantityRevalidationTaskRef.current = null;
@@ -1077,7 +1063,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1077
1063
  };
1078
1064
  setSkuDetailConfig(config);
1079
1065
  if ("date" in data && !("_extend" in data)) {
1080
- var _data$is_eject2, _ref9, _ref10, _initialExtend$price, _data$productData2, _apiData$duration, _apiData$schedules, _apiData$scheduleIds, _apiData$extension_ty, _ref11, _variantData$variant_, _ref12, _variantData$variant, _apiData$option_group, _apiData$bundle_group, _apiData$product_reso, _apiData$holder_confi, _ref13, _data$initialQuantity, _initialExtend$price2, _initialExtend$total, _initialExtend$origin, _ref14, _initialExtend$note, _ref15, _is_eject, _ref16, _hydratedExtend$quant, _hydratedExtend$price;
1066
+ var _data$is_eject2, _ref8, _ref9, _initialExtend$price, _data$productData2, _apiData$duration, _apiData$schedules, _apiData$scheduleIds, _apiData$extension_ty, _ref10, _variantData$variant_, _ref11, _variantData$variant, _apiData$option_group, _apiData$bundle_group, _apiData$product_reso, _apiData$holder_confi, _ref12, _data$initialQuantity, _initialExtend$price2, _initialExtend$total, _initialExtend$origin, _ref13, _initialExtend$note, _ref14, _is_eject, _ref15, _hydratedExtend$quant, _hydratedExtend$price;
1081
1067
  logger === null || logger === void 0 || logger.addLog({
1082
1068
  type: "info",
1083
1069
  title: "sku_detail_modal_open_create",
@@ -1085,9 +1071,8 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1085
1071
  });
1086
1072
  openParamsRef.current = data;
1087
1073
  const shouldOpenBeforeHydration = hasConfiguredSelectionFlow || Number((_data$is_eject2 = data.is_eject) !== null && _data$is_eject2 !== void 0 ? _data$is_eject2 : 0) === 1 || isWeighingProduct(data.productData);
1088
- if (shouldOpenBeforeHydration) {
1089
- if (!(yield showModalShellBeforeHydration())) return;
1090
- } else {
1074
+ if (shouldOpenBeforeHydration) showModalShellBeforeHydration();
1075
+ else {
1091
1076
  setOpen(false);
1092
1077
  setProductData(null);
1093
1078
  setDetailLoading(false);
@@ -1108,7 +1093,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1108
1093
  if ((config === null || config === void 0 ? void 0 : config.useCustomData) && (config === null || config === void 0 ? void 0 : config.customData)) apiData = _objectSpread2(_objectSpread2({}, apiData), (config === null || config === void 0 ? void 0 : config.customData) || {});
1109
1094
  const initialCacheItem = data.initialCacheItem;
1110
1095
  const initialExtend = (initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem._extend) || {};
1111
- const basePrice = Number((_ref9 = (_ref10 = (_initialExtend$price = initialExtend.price) !== null && _initialExtend$price !== void 0 ? _initialExtend$price : apiData === null || apiData === void 0 ? void 0 : apiData.price) !== null && _ref10 !== void 0 ? _ref10 : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.price) !== null && _ref9 !== void 0 ? _ref9 : 0);
1096
+ const basePrice = Number((_ref8 = (_ref9 = (_initialExtend$price = initialExtend.price) !== null && _initialExtend$price !== void 0 ? _initialExtend$price : apiData === null || apiData === void 0 ? void 0 : apiData.price) !== null && _ref9 !== void 0 ? _ref9 : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.price) !== null && _ref8 !== void 0 ? _ref8 : 0);
1112
1097
  let variantData = formatVariant(config, data === null || data === void 0 || (_data$productData2 = data.productData) === null || _data$productData2 === void 0 ? void 0 : _data$productData2.variant, apiData);
1113
1098
  const initialSkuValue = resolveSkuValueCandidates([
1114
1099
  initialExtend.skuValue,
@@ -1128,8 +1113,8 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1128
1113
  schedules: (_apiData$schedules = apiData === null || apiData === void 0 ? void 0 : apiData.schedules) !== null && _apiData$schedules !== void 0 ? _apiData$schedules : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.schedules,
1129
1114
  "schedule.ids": (_apiData$scheduleIds = apiData === null || apiData === void 0 ? void 0 : apiData["schedule.ids"]) !== null && _apiData$scheduleIds !== void 0 ? _apiData$scheduleIds : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem["schedule.ids"],
1130
1115
  extension_type: (_apiData$extension_ty = apiData === null || apiData === void 0 ? void 0 : apiData.extension_type) !== null && _apiData$extension_ty !== void 0 ? _apiData$extension_ty : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.extension_type,
1131
- variant_group: (_ref11 = (_variantData$variant_ = variantData === null || variantData === void 0 ? void 0 : variantData.variant_group) !== null && _variantData$variant_ !== void 0 ? _variantData$variant_ : apiData === null || apiData === void 0 ? void 0 : apiData.variant_group) !== null && _ref11 !== void 0 ? _ref11 : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.variant_group,
1132
- variant: (_ref12 = (_variantData$variant = variantData === null || variantData === void 0 ? void 0 : variantData.variant) !== null && _variantData$variant !== void 0 ? _variantData$variant : apiData === null || apiData === void 0 ? void 0 : apiData.variant) !== null && _ref12 !== void 0 ? _ref12 : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.variant,
1116
+ variant_group: (_ref10 = (_variantData$variant_ = variantData === null || variantData === void 0 ? void 0 : variantData.variant_group) !== null && _variantData$variant_ !== void 0 ? _variantData$variant_ : apiData === null || apiData === void 0 ? void 0 : apiData.variant_group) !== null && _ref10 !== void 0 ? _ref10 : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.variant_group,
1117
+ variant: (_ref11 = (_variantData$variant = variantData === null || variantData === void 0 ? void 0 : variantData.variant) !== null && _variantData$variant !== void 0 ? _variantData$variant : apiData === null || apiData === void 0 ? void 0 : apiData.variant) !== null && _ref11 !== void 0 ? _ref11 : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.variant,
1133
1118
  option_group: (_apiData$option_group = apiData === null || apiData === void 0 ? void 0 : apiData.option_group) !== null && _apiData$option_group !== void 0 ? _apiData$option_group : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.option_group,
1134
1119
  bundle_group: (_apiData$bundle_group = apiData === null || apiData === void 0 ? void 0 : apiData.bundle_group) !== null && _apiData$bundle_group !== void 0 ? _apiData$bundle_group : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.bundle_group,
1135
1120
  product_resource: (_apiData$product_reso = apiData === null || apiData === void 0 ? void 0 : apiData.product_resource) !== null && _apiData$product_reso !== void 0 ? _apiData$product_reso : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.product_resource
@@ -1137,11 +1122,11 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1137
1122
  _data: _objectSpread2(_objectSpread2({}, (apiData === null || apiData === void 0 ? void 0 : apiData._data) || {}), (initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem._data) || {}),
1138
1123
  _extend: _objectSpread2(_objectSpread2(_objectSpread2({}, (apiData === null || apiData === void 0 ? void 0 : apiData._extend) || {}), initialExtend), {}, {
1139
1124
  product_name: resolveDisplayText(initialExtend.product_name || (apiData === null || apiData === void 0 ? void 0 : apiData.title) || (apiData === null || apiData === void 0 ? void 0 : apiData.product_name)),
1140
- quantity: (_ref13 = (_data$initialQuantity = data.initialQuantity) !== null && _data$initialQuantity !== void 0 ? _data$initialQuantity : initialExtend.quantity) !== null && _ref13 !== void 0 ? _ref13 : 1,
1125
+ quantity: (_ref12 = (_data$initialQuantity = data.initialQuantity) !== null && _data$initialQuantity !== void 0 ? _data$initialQuantity : initialExtend.quantity) !== null && _ref12 !== void 0 ? _ref12 : 1,
1141
1126
  price: (_initialExtend$price2 = initialExtend.price) !== null && _initialExtend$price2 !== void 0 ? _initialExtend$price2 : basePrice,
1142
1127
  total: (_initialExtend$total = initialExtend.total) !== null && _initialExtend$total !== void 0 ? _initialExtend$total : basePrice,
1143
1128
  origin_total: (_initialExtend$origin = initialExtend.origin_total) !== null && _initialExtend$origin !== void 0 ? _initialExtend$origin : basePrice,
1144
- note: (_ref14 = (_initialExtend$note = initialExtend.note) !== null && _initialExtend$note !== void 0 ? _initialExtend$note : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.note) !== null && _ref14 !== void 0 ? _ref14 : "",
1129
+ note: (_ref13 = (_initialExtend$note = initialExtend.note) !== null && _initialExtend$note !== void 0 ? _initialExtend$note : initialCacheItem === null || initialCacheItem === void 0 ? void 0 : initialCacheItem.note) !== null && _ref13 !== void 0 ? _ref13 : "",
1145
1130
  skuValue: initialSkuValue
1146
1131
  })
1147
1132
  });
@@ -1191,7 +1176,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1191
1176
  return;
1192
1177
  }
1193
1178
  }
1194
- if (!(Number((_ref15 = (_is_eject = apiData === null || apiData === void 0 ? void 0 : apiData.is_eject) !== null && _is_eject !== void 0 ? _is_eject : data.is_eject) !== null && _ref15 !== void 0 ? _ref15 : 0) === 1 || Number(data.is_eject) === 1 && Boolean(resolveDetailAppearance(config, hydratedData)) || isWeighingProduct(apiData)) && !hasEffectiveSelectionFlow && !confirmDisabledRef.current) {
1179
+ if (!(Number((_ref14 = (_is_eject = apiData === null || apiData === void 0 ? void 0 : apiData.is_eject) !== null && _is_eject !== void 0 ? _is_eject : data.is_eject) !== null && _ref14 !== void 0 ? _ref14 : 0) === 1 || Number(data.is_eject) === 1 && Boolean(resolveDetailAppearance(config, hydratedData)) || isWeighingProduct(apiData)) && !hasEffectiveSelectionFlow && !confirmDisabledRef.current) {
1195
1180
  var _extend, _bookingState$booking2;
1196
1181
  const stockResult = getStockValidationResult({
1197
1182
  value: hydratedData === null || hydratedData === void 0 || (_extend = hydratedData._extend) === null || _extend === void 0 ? void 0 : _extend.skuValue,
@@ -1227,7 +1212,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1227
1212
  setProductData(hydratedData);
1228
1213
  const hydratedExtend = hydratedData._extend || {};
1229
1214
  setNote(hydratedExtend.note || "");
1230
- setQuantity(isWeighingProduct(apiData) ? 1 : (_ref16 = (_hydratedExtend$quant = hydratedExtend.quantity) !== null && _hydratedExtend$quant !== void 0 ? _hydratedExtend$quant : apiData === null || apiData === void 0 ? void 0 : apiData.min_num_unit) !== null && _ref16 !== void 0 ? _ref16 : 1);
1215
+ setQuantity(isWeighingProduct(apiData) ? 1 : (_ref15 = (_hydratedExtend$quant = hydratedExtend.quantity) !== null && _hydratedExtend$quant !== void 0 ? _hydratedExtend$quant : apiData === null || apiData === void 0 ? void 0 : apiData.min_num_unit) !== null && _ref15 !== void 0 ? _ref15 : 1);
1231
1216
  setDiscounts(initialCacheItem ? (hydratedData.discount_list || []).filter((item) => item.type !== "product") : []);
1232
1217
  setWeighingData(getWeighingValueFromProductSku(initialCacheItem) || initialExtend.weighing || null);
1233
1218
  setSkuValue(initialSkuValue);
@@ -1254,7 +1239,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1254
1239
  });
1255
1240
  openParamsRef.current = null;
1256
1241
  if ((Array.isArray(data === null || data === void 0 || (_skuDetailConfig = data.skuDetailConfig) === null || _skuDetailConfig === void 0 ? void 0 : _skuDetailConfig.steps) || typeof (data === null || data === void 0 || (_skuDetailConfig2 = data.skuDetailConfig) === null || _skuDetailConfig2 === void 0 ? void 0 : _skuDetailConfig2.resolveSteps) === "function") && process.env.NODE_ENV !== "production") console.warn("[SkuDetailModal] 自定义 steps 一期仅在 create 模式生效,edit 继续使用旧流程。");
1257
- if (!(yield showModalShellBeforeHydration())) return;
1242
+ showModalShellBeforeHydration();
1258
1243
  shownLog.dataSource = "local";
1259
1244
  const _data = cloneDeep(data);
1260
1245
  if ((_data === null || _data === void 0 ? void 0 : _data.is_bundle) && !(_data === null || _data === void 0 || (_data$bundle_group = _data.bundle_group) === null || _data$bundle_group === void 0 || (_data$bundle_group = _data$bundle_group[0]) === null || _data$bundle_group === void 0 || (_data$bundle_group = _data$bundle_group.bundle_item) === null || _data$bundle_group === void 0 ? void 0 : _data$bundle_group[0].title)) {
@@ -1302,7 +1287,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1302
1287
  setNote((_data === null || _data === void 0 || (_data$_extend = _data._extend) === null || _data$_extend === void 0 ? void 0 : _data$_extend.note) || "");
1303
1288
  setQuantity(isWeighingProduct(_data) ? 1 : (_data === null || _data === void 0 || (_data$_extend2 = _data._extend) === null || _data$_extend2 === void 0 ? void 0 : _data$_extend2.quantity) || 1);
1304
1289
  setDiscounts((_data === null || _data === void 0 || (_data$discount_list = _data.discount_list) === null || _data$discount_list === void 0 ? void 0 : _data$discount_list.filter((item) => item.type !== "product")) || []);
1305
- setWeighingData(getWeighingValueFromProductSku(_data) || (_data === null || _data === void 0 || (_ref17 = _data._extend) === null || _ref17 === void 0 ? void 0 : _ref17.weighing) || null);
1290
+ setWeighingData(getWeighingValueFromProductSku(_data) || (_data === null || _data === void 0 || (_ref16 = _data._extend) === null || _ref16 === void 0 ? void 0 : _ref16.weighing) || null);
1306
1291
  const recordSkuValue = resolveSkuValueCandidates([
1307
1292
  _data === null || _data === void 0 || (_data$_extend3 = _data._extend) === null || _data$_extend3 === void 0 ? void 0 : _data$_extend3._skuValue,
1308
1293
  _data === null || _data === void 0 || (_data$_extend4 = _data._extend) === null || _data$_extend4 === void 0 ? void 0 : _data$_extend4.other,
@@ -1321,7 +1306,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1321
1306
  var _data$_extend6;
1322
1307
  discountListPriceOverride = new Decimal(_data === null || _data === void 0 || (_data$_extend6 = _data._extend) === null || _data$_extend6 === void 0 ? void 0 : _data$_extend6.origin_total).minus(new Decimal(discountListPriceOverride)).toNumber();
1323
1308
  }
1324
- setPriceOverride((_ref18 = (_data$_extend$priceOv = _data === null || _data === void 0 || (_data$_extend7 = _data._extend) === null || _data$_extend7 === void 0 ? void 0 : _data$_extend7.priceOverride) !== null && _data$_extend$priceOv !== void 0 ? _data$_extend$priceOv : discountListPriceOverride) !== null && _ref18 !== void 0 ? _ref18 : null);
1309
+ setPriceOverride((_ref17 = (_data$_extend$priceOv = _data === null || _data === void 0 || (_data$_extend7 = _data._extend) === null || _data$_extend7 === void 0 ? void 0 : _data$_extend7.priceOverride) !== null && _data$_extend$priceOv !== void 0 ? _data$_extend$priceOv : discountListPriceOverride) !== null && _ref17 !== void 0 ? _ref17 : null);
1325
1310
  setShowPriceAdjustModal(false);
1326
1311
  setDetailLoading(false);
1327
1312
  const dataAny = _data;
@@ -1334,7 +1319,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1334
1319
  });
1335
1320
  });
1336
1321
  return function open(_x7) {
1337
- return _ref19.apply(this, arguments);
1322
+ return _ref18.apply(this, arguments);
1338
1323
  };
1339
1324
  }(),
1340
1325
  close: () => {
@@ -1585,6 +1570,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1585
1570
  const resetModalStateAfterClose = useCallback(() => {
1586
1571
  var _noteDiagnosticsRef$c4;
1587
1572
  (_noteDiagnosticsRef$c4 = noteDiagnosticsRef.current) === null || _noteDiagnosticsRef$c4 === void 0 || _noteDiagnosticsRef$c4.stop();
1573
+ setModalEntered(false);
1588
1574
  setProductData(null);
1589
1575
  setDetailLoading(false);
1590
1576
  setNote("");
@@ -1624,6 +1610,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1624
1610
  setShowPriceAdjustModal(false);
1625
1611
  };
1626
1612
  const handleModalOpenChange = useCallback((nextOpen) => {
1613
+ if (nextOpen) setModalEntered(true);
1627
1614
  if (nextOpen && shownLogRef.current) {
1628
1615
  const _shownLogRef$current = shownLogRef.current, { startedAt } = _shownLogRef$current, metadata = _objectWithoutProperties(_shownLogRef$current, _excluded);
1629
1616
  shownLogRef.current = null;
@@ -1648,7 +1635,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1648
1635
  onClose === null || onClose === void 0 || onClose();
1649
1636
  };
1650
1637
  const handleConfirm = function() {
1651
- var _ref20 = _asyncToGenerator(function* (flowDraft) {
1638
+ var _ref19 = _asyncToGenerator(function* (flowDraft) {
1652
1639
  var _noteDiagnosticsRef$c6, _bookingState$booking3, _selectionFlowRef$cur8, _selectionFlowService4;
1653
1640
  (_noteDiagnosticsRef$c6 = noteDiagnosticsRef.current) === null || _noteDiagnosticsRef$c6 === void 0 || _noteDiagnosticsRef$c6.skuConfirm(note.length);
1654
1641
  if (confirmDisabledRef.current) return false;
@@ -1892,7 +1879,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1892
1879
  return false;
1893
1880
  });
1894
1881
  return function handleConfirm(_x8) {
1895
- return _ref20.apply(this, arguments);
1882
+ return _ref19.apply(this, arguments);
1896
1883
  };
1897
1884
  }();
1898
1885
  const handleStockAlertCancel = () => {
@@ -1901,7 +1888,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1901
1888
  setStockAlertDontShowAgainChecked(false);
1902
1889
  };
1903
1890
  const handleStockAlertContinue = function() {
1904
- var _ref21 = _asyncToGenerator(function* () {
1891
+ var _ref20 = _asyncToGenerator(function* () {
1905
1892
  if (confirmDisabledRef.current) return;
1906
1893
  const pendingData = pendingConfirmDataRef.current;
1907
1894
  if (!pendingData) {
@@ -1921,7 +1908,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1921
1908
  modalCloseAction();
1922
1909
  });
1923
1910
  return function handleStockAlertContinue() {
1924
- return _ref21.apply(this, arguments);
1911
+ return _ref20.apply(this, arguments);
1925
1912
  };
1926
1913
  }();
1927
1914
  const handleRemove = () => {
@@ -1975,7 +1962,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1975
1962
  * - 使用双 RAF 等待 Weighing 子组件渲染完成后再滚动
1976
1963
  */
1977
1964
  useEffect(() => {
1978
- if (!open) return;
1965
+ if (!open || detailContentLoading) return;
1979
1966
  if (isMobile) return;
1980
1967
  if (!isWeighingProduct$1) return;
1981
1968
  if (!productData) return;
@@ -1994,6 +1981,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
1994
1981
  };
1995
1982
  }, [
1996
1983
  open,
1984
+ detailContentLoading,
1997
1985
  isMobile,
1998
1986
  isWeighingProduct$1,
1999
1987
  productData === null || productData === void 0 ? void 0 : productData._id,
@@ -2128,7 +2116,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
2128
2116
  })) : null);
2129
2117
  };
2130
2118
  const handleEnrichmentRetry = function() {
2131
- var _ref22 = _asyncToGenerator(function* () {
2119
+ var _ref21 = _asyncToGenerator(function* () {
2132
2120
  if (!productData || enrichmentRetryingRef.current) return;
2133
2121
  const taskId = openTaskIdRef.current;
2134
2122
  enrichmentRetryingRef.current = true;
@@ -2146,7 +2134,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
2146
2134
  }
2147
2135
  });
2148
2136
  return function handleEnrichmentRetry() {
2149
- return _ref22.apply(this, arguments);
2137
+ return _ref21.apply(this, arguments);
2150
2138
  };
2151
2139
  }();
2152
2140
  const enrichmentRetryAction = /* @__PURE__ */ React.createElement(Button$1, {
@@ -2160,13 +2148,13 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
2160
2148
  value: quantity,
2161
2149
  min: 1,
2162
2150
  max: inventorySelection ? Math.max(1, inventorySelection.maxQuantity) : 99999,
2163
- disabled: appearanceConfirmPending || detailLoading || (inventorySelection === null || inventorySelection === void 0 ? void 0 : inventorySelection.maxQuantity) === 0,
2151
+ disabled: appearanceConfirmPending || detailContentLoading || (inventorySelection === null || inventorySelection === void 0 ? void 0 : inventorySelection.maxQuantity) === 0,
2164
2152
  enableInput: (inventorySelection === null || inventorySelection === void 0 ? void 0 : inventorySelection.maxQuantity) !== 0,
2165
2153
  onChange: handleQuantityChange
2166
2154
  }) : null;
2167
2155
  const leftContent = (options = {}) => {
2168
2156
  const { showTop = true, showBottom = true } = options;
2169
- if (detailLoading || !productData) {
2157
+ if (detailContentLoading || !productData) {
2170
2158
  if (!showTop) return null;
2171
2159
  return /* @__PURE__ */ React.createElement("div", { className: "sku-detail-left" }, renderLoadingPanel());
2172
2160
  }
@@ -2227,7 +2215,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
2227
2215
  })) : null);
2228
2216
  };
2229
2217
  const rightContent = () => {
2230
- if (detailLoading || !productData) return /* @__PURE__ */ React.createElement("div", { className: "sku-detail-right-content" }, renderLoadingPanel());
2218
+ if (detailContentLoading || !productData) return /* @__PURE__ */ React.createElement("div", { className: "sku-detail-right-content" }, renderLoadingPanel());
2231
2219
  if (isCustomSelectionFlow && selectionFlowInitialDraft) {
2232
2220
  var _compiledSelectionFlo;
2233
2221
  const showProductDetailsCollapsible = !detailAppearance && !!(skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowCollapsibleSections);
@@ -2464,7 +2452,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
2464
2452
  subtitle: productSubtitle,
2465
2453
  cover: productData === null || productData === void 0 ? void 0 : productData.cover,
2466
2454
  coverText,
2467
- loading: detailLoading || !productData,
2455
+ loading: detailContentLoading || !productData,
2468
2456
  pending: appearanceConfirmPending,
2469
2457
  confirmDisabled: confirmDisabled || salesSettingsPending || inventoryQuantityBlocked || posAutoResolutionConfirmPending || Boolean(hasReachedBookingPriceStep && (selectionFlowBookingPricePending || selectionFlowBookingPriceError)),
2470
2458
  unitPrice: isVirtualOnlySettlement ? renderVirtualSettlementUnitPrices() : productDetailPriceText,
@@ -2490,7 +2478,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, resolveProductData, reso
2490
2478
  removeControl: !isCreateMode && skuDetailConfig.isShowRemove !== false && onRemove && /* @__PURE__ */ React.createElement("button", {
2491
2479
  type: "button",
2492
2480
  className: "sku-detail-appearance__remove",
2493
- disabled: appearanceConfirmPending || detailLoading || isRemoveDisabled,
2481
+ disabled: appearanceConfirmPending || detailContentLoading || isRemoveDisabled,
2494
2482
  onClick: handleRemove
2495
2483
  }, locales.getText("pisell2.text.sku.detail.modal.btn.remove")),
2496
2484
  confirmLabel: isCreateMode && currentStep >= maxStepIndex ? locales.getText("pisell2.text.sku.detail.modal.btn.add.to.cart") : pcConfirmButtonText,
@@ -2613,16 +2601,16 @@ var skuDetailModal_default = withResponsive(ForwardedSkuDetailModal);
2613
2601
  * v2 主商品 source 单价(不含套餐子商品、不含单规格加价),供 _extend.price / transform 使用。
2614
2602
  */
2615
2603
  function getSourceUnitPrice(params) {
2616
- var _ref23, _ref24, _productData$base_pri, _productData$_extend3;
2604
+ var _ref22, _ref23, _productData$base_pri, _productData$_extend3;
2617
2605
  const { productData, skuValue } = params;
2618
2606
  if (!productData) return 0;
2619
- let price = new Decimal((_ref23 = (_ref24 = (_productData$base_pri = productData === null || productData === void 0 ? void 0 : productData.base_price) !== null && _productData$base_pri !== void 0 ? _productData$base_pri : productData === null || productData === void 0 ? void 0 : productData.price) !== null && _ref24 !== void 0 ? _ref24 : productData === null || productData === void 0 || (_productData$_extend3 = productData._extend) === null || _productData$_extend3 === void 0 ? void 0 : _productData$_extend3.price) !== null && _ref23 !== void 0 ? _ref23 : 0);
2607
+ let price = new Decimal((_ref22 = (_ref23 = (_productData$base_pri = productData === null || productData === void 0 ? void 0 : productData.base_price) !== null && _productData$base_pri !== void 0 ? _productData$base_pri : productData === null || productData === void 0 ? void 0 : productData.price) !== null && _ref23 !== void 0 ? _ref23 : productData === null || productData === void 0 || (_productData$_extend3 = productData._extend) === null || _productData$_extend3 === void 0 ? void 0 : _productData$_extend3.price) !== null && _ref22 !== void 0 ? _ref22 : 0);
2620
2608
  if (skuValue === null || skuValue === void 0 ? void 0 : skuValue.product_variant_id) {
2621
2609
  var _variant2;
2622
2610
  const variantItem = productData === null || productData === void 0 || (_variant2 = productData.variant) === null || _variant2 === void 0 ? void 0 : _variant2.find((item) => Number(item === null || item === void 0 ? void 0 : item.id) === Number(skuValue.product_variant_id));
2623
2611
  if (variantItem) {
2624
- var _ref25, _ref26, _variantItem$price;
2625
- price = new Decimal((_ref25 = (_ref26 = (_variantItem$price = variantItem === null || variantItem === void 0 ? void 0 : variantItem.price) !== null && _variantItem$price !== void 0 ? _variantItem$price : variantItem === null || variantItem === void 0 ? void 0 : variantItem.base_price) !== null && _ref26 !== void 0 ? _ref26 : variantItem === null || variantItem === void 0 ? void 0 : variantItem.original_price) !== null && _ref25 !== void 0 ? _ref25 : 0);
2612
+ var _ref24, _ref25, _variantItem$price;
2613
+ price = new Decimal((_ref24 = (_ref25 = (_variantItem$price = variantItem === null || variantItem === void 0 ? void 0 : variantItem.price) !== null && _variantItem$price !== void 0 ? _variantItem$price : variantItem === null || variantItem === void 0 ? void 0 : variantItem.base_price) !== null && _ref25 !== void 0 ? _ref25 : variantItem === null || variantItem === void 0 ? void 0 : variantItem.original_price) !== null && _ref24 !== void 0 ? _ref24 : 0);
2626
2614
  }
2627
2615
  }
2628
2616
  return price.toNumber();
@@ -2633,16 +2621,16 @@ function getSourceUnitPrice(params) {
2633
2621
  * 计算规则与 booking/utils.ts 的 getProductTotalPrice 保持一致。
2634
2622
  */
2635
2623
  function getSelectedUnitPrice(params) {
2636
- var _ref27, _productData$base_pri2, _productData$_extend4;
2624
+ var _ref26, _productData$base_pri2, _productData$_extend4;
2637
2625
  const { productData, skuValue } = params;
2638
2626
  if (!productData) return 0;
2639
- let price = new Decimal((_ref27 = (_productData$base_pri2 = productData === null || productData === void 0 ? void 0 : productData.base_price) !== null && _productData$base_pri2 !== void 0 ? _productData$base_pri2 : productData === null || productData === void 0 || (_productData$_extend4 = productData._extend) === null || _productData$_extend4 === void 0 ? void 0 : _productData$_extend4.price) !== null && _ref27 !== void 0 ? _ref27 : 0);
2627
+ let price = new Decimal((_ref26 = (_productData$base_pri2 = productData === null || productData === void 0 ? void 0 : productData.base_price) !== null && _productData$base_pri2 !== void 0 ? _productData$base_pri2 : productData === null || productData === void 0 || (_productData$_extend4 = productData._extend) === null || _productData$_extend4 === void 0 ? void 0 : _productData$_extend4.price) !== null && _ref26 !== void 0 ? _ref26 : 0);
2640
2628
  if (skuValue === null || skuValue === void 0 ? void 0 : skuValue.product_variant_id) {
2641
2629
  var _variant3;
2642
2630
  const variantItem = productData === null || productData === void 0 || (_variant3 = productData.variant) === null || _variant3 === void 0 ? void 0 : _variant3.find((item) => Number(item === null || item === void 0 ? void 0 : item.id) === Number(skuValue.product_variant_id));
2643
2631
  if (variantItem) {
2644
- var _ref28, _variantItem$base_pri;
2645
- price = new Decimal((_ref28 = (_variantItem$base_pri = variantItem === null || variantItem === void 0 ? void 0 : variantItem.base_price) !== null && _variantItem$base_pri !== void 0 ? _variantItem$base_pri : variantItem === null || variantItem === void 0 ? void 0 : variantItem.original_price) !== null && _ref28 !== void 0 ? _ref28 : 0);
2632
+ var _ref27, _variantItem$base_pri;
2633
+ price = new Decimal((_ref27 = (_variantItem$base_pri = variantItem === null || variantItem === void 0 ? void 0 : variantItem.base_price) !== null && _variantItem$base_pri !== void 0 ? _variantItem$base_pri : variantItem === null || variantItem === void 0 ? void 0 : variantItem.original_price) !== null && _ref27 !== void 0 ? _ref27 : 0);
2646
2634
  }
2647
2635
  }
2648
2636
  if (Array.isArray(skuValue === null || skuValue === void 0 ? void 0 : skuValue.bundle) && skuValue.bundle.length > 0) price = skuValue.bundle.reduce((accumulator, currentValue) => {
@@ -2651,8 +2639,8 @@ function getSelectedUnitPrice(params) {
2651
2639
  return accumulator.add(currentPrice.mul(currentNum));
2652
2640
  }, price);
2653
2641
  if (Array.isArray(skuValue === null || skuValue === void 0 ? void 0 : skuValue.option) && skuValue.option.length > 0) price = skuValue.option.reduce((accumulator, currentValue) => {
2654
- var _ref29, _currentValue$origina;
2655
- const currentPrice = new Decimal((_ref29 = (_currentValue$origina = currentValue === null || currentValue === void 0 ? void 0 : currentValue.original_price) !== null && _currentValue$origina !== void 0 ? _currentValue$origina : currentValue === null || currentValue === void 0 ? void 0 : currentValue.price) !== null && _ref29 !== void 0 ? _ref29 : 0);
2642
+ var _ref28, _currentValue$origina;
2643
+ const currentPrice = new Decimal((_ref28 = (_currentValue$origina = currentValue === null || currentValue === void 0 ? void 0 : currentValue.original_price) !== null && _currentValue$origina !== void 0 ? _currentValue$origina : currentValue === null || currentValue === void 0 ? void 0 : currentValue.price) !== null && _ref28 !== void 0 ? _ref28 : 0);
2656
2644
  const currentNum = new Decimal((currentValue === null || currentValue === void 0 ? void 0 : currentValue.num) || 0);
2657
2645
  return accumulator.add(currentPrice.mul(currentNum));
2658
2646
  }, price);
@@ -2673,8 +2661,8 @@ function getOtherFromSkuValue(params) {
2673
2661
  var _variant4;
2674
2662
  const variantItem = productData === null || productData === void 0 || (_variant4 = productData.variant) === null || _variant4 === void 0 ? void 0 : _variant4.find((item) => Number(item === null || item === void 0 ? void 0 : item.id) === Number(other.product_variant_id));
2675
2663
  if (variantItem) {
2676
- var _ref30, _variantItem$price2;
2677
- other.price = Number((_ref30 = (_variantItem$price2 = variantItem === null || variantItem === void 0 ? void 0 : variantItem.price) !== null && _variantItem$price2 !== void 0 ? _variantItem$price2 : variantItem === null || variantItem === void 0 ? void 0 : variantItem.base_price) !== null && _ref30 !== void 0 ? _ref30 : 0);
2664
+ var _ref29, _variantItem$price2;
2665
+ other.price = Number((_ref29 = (_variantItem$price2 = variantItem === null || variantItem === void 0 ? void 0 : variantItem.price) !== null && _variantItem$price2 !== void 0 ? _variantItem$price2 : variantItem === null || variantItem === void 0 ? void 0 : variantItem.base_price) !== null && _ref29 !== void 0 ? _ref29 : 0);
2678
2666
  }
2679
2667
  }
2680
2668
  return other;
@@ -1027,8 +1027,8 @@ function KioskBigSaleTemplate({ isActive = true, catalogPreparation, osKey, prod
1027
1027
  showCheckoutFailure(String(_pisell_utils.locales.getText("pisell2.big-sale.kiosk.payment-failure-description")));
1028
1028
  return;
1029
1029
  }
1030
- const shouldRedirectH5ZeroAmount = require_zeroAmountCheckout.isH5ZeroAmountValue(platform, totalAmount);
1031
- if (shouldUseConsumerPayment || shouldRedirectH5ZeroAmount) {
1030
+ const shouldRedirectOnlineOrderingZeroAmount = require_zeroAmountCheckout.isOnlineOrderingZeroAmountValue(platform, totalAmount);
1031
+ if (shouldUseConsumerPayment || shouldRedirectOnlineOrderingZeroAmount) {
1032
1032
  publishKioskCollaborationPreviewStatus(app, "checkout");
1033
1033
  yield launchKioskConsumerPaymentAfterReset({
1034
1034
  action: utils.action,
@@ -1051,7 +1051,7 @@ function KioskBigSaleTemplate({ isActive = true, catalogPreparation, osKey, prod
1051
1051
  persistKioskSessionView(context.sales.bookingTicket, "catalog");
1052
1052
  },
1053
1053
  recalcSummary: context.cart.recalcSummary,
1054
- redirectZeroAmount: shouldRedirectH5ZeroAmount,
1054
+ redirectZeroAmount: shouldRedirectOnlineOrderingZeroAmount,
1055
1055
  replace: (path) => {
1056
1056
  var _utils$history3, _app$history6;
1057
1057
  if (typeof (utils === null || utils === void 0 || (_utils$history3 = utils.history) === null || _utils$history3 === void 0 ? void 0 : _utils$history3.replace) === "function") {
@@ -9,6 +9,8 @@ function toFiniteKioskAmount(value) {
9
9
  function resolveKioskAmountDue(summary) {
10
10
  var _toFiniteKioskAmount;
11
11
  if (!summary) return null;
12
+ const serverWaitPayAmount = toFiniteKioskAmount(summary.order_wait_pay_amount);
13
+ if (serverWaitPayAmount !== null) return serverWaitPayAmount;
12
14
  const orderPaidAmount = toFiniteKioskAmount(summary.order_paid_amount);
13
15
  if (orderPaidAmount !== null && orderPaidAmount > 0) return toFiniteKioskAmount(summary.amount_gap);
14
16
  return (_toFiniteKioskAmount = toFiniteKioskAmount(summary.expect_amount)) !== null && _toFiniteKioskAmount !== void 0 ? _toFiniteKioskAmount : toFiniteKioskAmount(summary.total_amount);
@@ -16,17 +18,23 @@ function resolveKioskAmountDue(summary) {
16
18
  function isKioskZeroAmountCheckout(summary) {
17
19
  return resolveKioskAmountDue(summary) === 0;
18
20
  }
19
- function isH5ZeroAmountCheckout(platform, summary) {
20
- return isH5ZeroAmountValue(platform, resolveKioskAmountDue(summary));
21
+ /**
22
+ * Online ordering runs in both H5 and desktop (pc) containers. A zero due
23
+ * amount must submit directly in either container instead of opening the
24
+ * payment-method UI.
25
+ */
26
+ function isOnlineOrderingZeroAmountCheckout(platform, summary) {
27
+ return isOnlineOrderingZeroAmountValue(platform, resolveKioskAmountDue(summary));
21
28
  }
22
- function isH5ZeroAmountValue(platform, amount) {
23
- return String(platform || "").trim().toLowerCase() === "h5" && toFiniteKioskAmount(amount) === 0;
29
+ function isOnlineOrderingZeroAmountValue(platform, amount) {
30
+ const normalizedPlatform = String(platform || "").trim().toLowerCase();
31
+ return (normalizedPlatform === "h5" || normalizedPlatform === "pc") && toFiniteKioskAmount(amount) === 0;
24
32
  }
25
33
  function isKioskPlatformZeroAmountCheckout(platform, summary) {
26
34
  return require_platform.isSelfServicePlatform(platform) && isKioskZeroAmountCheckout(summary);
27
35
  }
28
36
  function shouldSubmitKioskOrderBeforeCheckout(options) {
29
- return options.shouldUseConsumerPayment || isH5ZeroAmountCheckout(options.platform, options.summary) || isKioskPlatformZeroAmountCheckout(options.platform, options.summary);
37
+ return options.shouldUseConsumerPayment || isOnlineOrderingZeroAmountCheckout(options.platform, options.summary) || isKioskPlatformZeroAmountCheckout(options.platform, options.summary);
30
38
  }
31
39
  function resolveKioskSubmittedPayableAmount(result, tempOrderSummary, contextSummary) {
32
40
  var _result$data, _result$data2, _result$data3;
@@ -83,9 +91,9 @@ function resolveKioskNoPaymentResultViewModel(options) {
83
91
  });
84
92
  }
85
93
  //#endregion
86
- exports.isH5ZeroAmountCheckout = isH5ZeroAmountCheckout;
87
- exports.isH5ZeroAmountValue = isH5ZeroAmountValue;
88
94
  exports.isKioskPlatformZeroAmountCheckout = isKioskPlatformZeroAmountCheckout;
95
+ exports.isOnlineOrderingZeroAmountCheckout = isOnlineOrderingZeroAmountCheckout;
96
+ exports.isOnlineOrderingZeroAmountValue = isOnlineOrderingZeroAmountValue;
89
97
  exports.resolveKioskAmountDue = resolveKioskAmountDue;
90
98
  exports.resolveKioskNoPaymentResultViewModel = resolveKioskNoPaymentResultViewModel;
91
99
  exports.resolveKioskNoPaymentSubmitParams = resolveKioskNoPaymentSubmitParams;