@pisell/private-materials 6.12.223 → 6.12.224

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 (35) 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.css +1 -1
  6. package/build/lowcode/render/default/view.js +10 -10
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +10 -10
  9. package/es/components/bigSale/Base.js +2 -1
  10. package/es/components/bigSale/components/KioskCartCapsule/index.js +9 -7
  11. package/es/components/bigSale/components/KioskCartCapsule/index.less +14 -7
  12. package/es/components/bigSale/components/KioskCartCapsule/viewModel.js +2 -1
  13. package/es/components/bigSale/index.js +2 -0
  14. package/es/components/bigSale/templates/Kiosk/index.js +33 -33
  15. package/es/components/bigSale/templates/Kiosk/index.less +15 -2
  16. package/es/components/bigSale/templates/Kiosk/layout.js +23 -11
  17. package/es/components/bigSale/templates/index.js +3 -1
  18. package/es/components/bigSale/types.d.ts +3 -0
  19. package/es/components/kioskSale/resolveKioskPresentation.d.ts +4 -0
  20. package/es/components/kioskSale/resolveKioskPresentation.js +6 -2
  21. package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
  22. package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
  23. package/lib/components/bigSale/Base.js +2 -1
  24. package/lib/components/bigSale/components/KioskCartCapsule/index.js +9 -7
  25. package/lib/components/bigSale/components/KioskCartCapsule/index.less +14 -7
  26. package/lib/components/bigSale/components/KioskCartCapsule/viewModel.js +2 -1
  27. package/lib/components/bigSale/index.js +2 -0
  28. package/lib/components/bigSale/templates/Kiosk/index.js +32 -32
  29. package/lib/components/bigSale/templates/Kiosk/index.less +15 -2
  30. package/lib/components/bigSale/templates/Kiosk/layout.js +24 -10
  31. package/lib/components/bigSale/templates/index.js +3 -1
  32. package/lib/components/bigSale/types.d.ts +3 -0
  33. package/lib/components/kioskSale/resolveKioskPresentation.d.ts +4 -0
  34. package/lib/components/kioskSale/resolveKioskPresentation.js +6 -2
  35. package/package.json +4 -4
@@ -417,7 +417,8 @@
417
417
  }
418
418
 
419
419
  @media (max-width: 720px) {
420
- .pisell-kiosk-cart-capsule--floating.pisell-kiosk-cart-capsule--catalog {
420
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen']
421
+ .pisell-kiosk-cart-capsule--floating.pisell-kiosk-cart-capsule--catalog {
421
422
  gap: 8px;
422
423
  padding: 6px 14px;
423
424
 
@@ -492,7 +493,8 @@
492
493
  }
493
494
 
494
495
  @media (max-width: 560px) {
495
- .pisell-kiosk-cart-capsule--floating.pisell-kiosk-cart-capsule--cart {
496
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen']
497
+ .pisell-kiosk-cart-capsule--floating.pisell-kiosk-cart-capsule--cart {
496
498
  gap: 8px;
497
499
  padding: 6px 14px;
498
500
 
@@ -527,7 +529,8 @@
527
529
  }
528
530
 
529
531
  @media (max-width: 390px) {
530
- .pisell-kiosk-cart-capsule {
532
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen']
533
+ .pisell-kiosk-cart-capsule {
531
534
  &__back-button {
532
535
  width: 48px;
533
536
  justify-content: center;
@@ -539,7 +542,8 @@
539
542
  }
540
543
  }
541
544
 
542
- .pisell-kiosk-cart-capsule--catalog {
545
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen']
546
+ .pisell-kiosk-cart-capsule--catalog {
543
547
  .pisell-kiosk-cart-capsule {
544
548
  &__back-button {
545
549
  width: auto;
@@ -554,13 +558,15 @@
554
558
  }
555
559
 
556
560
  @media (max-width: 340px) {
557
- .pisell-kiosk-cart-capsule {
561
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen']
562
+ .pisell-kiosk-cart-capsule {
558
563
  gap: 4px;
559
564
  padding-right: 6px;
560
565
  padding-left: 6px;
561
566
  }
562
567
 
563
- .pisell-kiosk-cart-capsule--cart {
568
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen']
569
+ .pisell-kiosk-cart-capsule--cart {
564
570
  .pisell-kiosk-cart-capsule {
565
571
  &__note-button {
566
572
  width: 48px;
@@ -575,7 +581,8 @@
575
581
  }
576
582
  }
577
583
 
578
- .pisell-kiosk-sale[data-variant='phone'] .pisell-kiosk-cart-capsule {
584
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen']
585
+ .pisell-kiosk-cart-capsule--floating {
579
586
  &__back-button,
580
587
  &__promotion-button,
581
588
  &__note-button {
@@ -2,12 +2,13 @@
2
2
  function resolveKioskCartCapsuleViewModel(options) {
3
3
  const normalizedPromotionAppliedCount = Number.isFinite(options.promotionAppliedCount) ? Math.max(0, Math.floor(options.promotionAppliedCount)) : 0;
4
4
  const isSidebarPresentation = options.presentation === "sidebar";
5
+ const shouldShowCatalogNoteAction = Boolean(options.showCatalogNoteAction) && !options.isCartActive;
5
6
  const shouldShowPromotionBadge = !options.isPromotionVisible && normalizedPromotionAppliedCount > 0;
6
7
  return {
7
8
  isSidebarPresentation,
8
9
  normalizedPromotionAppliedCount,
9
10
  shouldShowTotal: !options.isCartActive || isSidebarPresentation,
10
- shouldShowNoteButton: Boolean(options.onAddNote) && (options.isCartActive || isSidebarPresentation),
11
+ shouldShowNoteButton: Boolean(options.onAddNote) && (options.isCartActive || isSidebarPresentation || shouldShowCatalogNoteAction),
11
12
  shouldShowPromotionButton: Boolean(options.onTogglePromotion) && (options.isCartActive || isSidebarPresentation),
12
13
  shouldShowPromotionBadge
13
14
  };
@@ -81,6 +81,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, enableMultiCurrencySettlement = false
81
81
  variant
82
82
  ]);
83
83
  const resolvedVariant = resolvedTemplate === "kiosk" ? kioskPresentation.variant || variant : variant;
84
+ const resolvedKioskShellLayout = resolvedTemplate === "kiosk" ? kioskPresentation.kioskShellLayout : void 0;
84
85
  const resolvedNormalProductDetailConfig = (0, react.useMemo)(() => {
85
86
  var _selectionFlowConfig$;
86
87
  const selectionFlowConfig = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, require_selectionFlowConfig.resolveBigSaleSelectionFlowConfig(selectionFlowScene, normalProductDetailConfig)), {}, { enableMultiCurrencySettlement });
@@ -175,6 +176,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, enableMultiCurrencySettlement = false
175
176
  osKey,
176
177
  mode,
177
178
  variant: resolvedVariant,
179
+ kioskShellLayout: resolvedKioskShellLayout,
178
180
  template: resolvedTemplate,
179
181
  productLoadParams,
180
182
  productDisplayConfig,
@@ -226,7 +226,7 @@ function createKioskLoginContinuationHandler(options) {
226
226
  });
227
227
  };
228
228
  }
229
- function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant, productLoadParams, businessCode, productDisplayConfig, productCatalogSessionKey, orderId, saleDetailModuleConfig, locale, onOrderComplete }) {
229
+ function KioskBigSaleTemplate({ isActive = true, osKey, productListPreferencesChannel, context, mode, variant, kioskShellLayout = "single-screen", productLoadParams, businessCode, productDisplayConfig, productCatalogSessionKey, orderId, saleDetailModuleConfig, locale, onOrderComplete }) {
230
230
  var _context$sales$bookin, _engineContext$appHel, _utils$getApp, _engineContext$appHel2;
231
231
  _pisell_utils.locales.init(require_index$2.default, locale || "en");
232
232
  const engineContext = require_useEngineContext.default();
@@ -241,7 +241,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
241
241
  const shouldUseConsumerPayment = hostChannel === "pc" || hostChannel === "h5";
242
242
  const shouldRequireLogin = require_useSalesUserLogin.isRequireLoginChannel(hostChannel);
243
243
  const { isLoggedIn, openLoginModal } = require_useSalesUserLogin.default();
244
- const [view, setView] = (0, react.useState)(() => readKioskSessionView(context.sales.bookingTicket));
244
+ const [view, setView] = (0, react.useState)(() => require_layout.normalizeKioskNavigableView(kioskShellLayout, readKioskSessionView(context.sales.bookingTicket)));
245
245
  const [isCatalogPromotionVisible, setIsCatalogPromotionVisible] = (0, react.useState)(false);
246
246
  const [isCartPromotionVisible, setIsCartPromotionVisible] = (0, react.useState)(true);
247
247
  const [isCatalogProductListScrolling, setIsCatalogProductListScrolling] = (0, react.useState)(false);
@@ -287,10 +287,12 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
287
287
  modalClassName: "pisell-kiosk-modal pisell-kiosk-note-modal"
288
288
  });
289
289
  const setNavigableView = (nextView) => {
290
- persistKioskSessionView(context.sales.bookingTicket, nextView);
291
- setView(nextView);
290
+ const normalizedView = require_layout.normalizeKioskNavigableView(kioskShellLayout, nextView);
291
+ persistKioskSessionView(context.sales.bookingTicket, normalizedView);
292
+ setView(normalizedView);
292
293
  };
293
- const layoutState = require_layout.resolveKioskLayoutState(variant, view);
294
+ const layoutState = require_layout.resolveKioskLayoutState(kioskShellLayout, view);
295
+ const resolvedProductListPreferencesChannel = require_layout.resolveKioskProductListPreferencesChannel(kioskShellLayout, productListPreferencesChannel);
294
296
  const requestRemoveItemConfirmation = (0, react.useCallback)(() => new Promise((resolve) => {
295
297
  var _removeItemConfirmRes;
296
298
  (_removeItemConfirmRes = removeItemConfirmResolverRef.current) === null || _removeItemConfirmRes === void 0 || _removeItemConfirmRes.call(removeItemConfirmResolverRef, false);
@@ -330,13 +332,14 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
330
332
  if (!bookingTicket || context.sales.status !== "ready" || !context.sales.tempOrder) return;
331
333
  if (restoredSessionHandleRef.current === bookingTicket) return;
332
334
  restoredSessionHandleRef.current = bookingTicket;
333
- const restoredView = resolveRestoredKioskSessionView(bookingTicket);
335
+ const restoredView = require_layout.normalizeKioskNavigableView(kioskShellLayout, resolveRestoredKioskSessionView(bookingTicket));
334
336
  persistKioskSessionView(bookingTicket, restoredView);
335
337
  setView(restoredView);
336
338
  }, [
337
339
  context.sales.bookingTicket,
338
340
  context.sales.status,
339
- context.sales.tempOrder
341
+ context.sales.tempOrder,
342
+ kioskShellLayout
340
343
  ]);
341
344
  const defaultProductListPreferences = (0, react.useMemo)(() => {
342
345
  const autoPreferences = require_productListPreferences.resolveBigSaleAutoProductListPreferences({
@@ -415,14 +418,14 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
415
418
  const previousRevision = previousPromotionItemIncreaseRevisionRef.current;
416
419
  previousPromotionItemIncreaseRevisionRef.current = nextRevision;
417
420
  if (nextRevision !== previousRevision && isActive) {
418
- const target = require_layout.resolveKioskPromotionRevealTarget(variant, view);
421
+ const target = require_layout.resolveKioskPromotionRevealTarget(kioskShellLayout, view);
419
422
  if (target === "catalog") setIsCatalogPromotionVisible(true);
420
423
  else if (target === "cart") setIsCartPromotionVisible(true);
421
424
  }
422
425
  }, [
423
426
  context.sales.promotionScanItemIncreaseRevision,
424
427
  isActive,
425
- variant,
428
+ kioskShellLayout,
426
429
  view
427
430
  ]);
428
431
  const catalogPromotionSlot = (0, react.useMemo)(() => layoutState.showCatalogPromotion ? /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-sale__catalog-promotions" }, /* @__PURE__ */ react.default.createElement(require_Base.default, {
@@ -518,12 +521,17 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
518
521
  }, 0);
519
522
  };
520
523
  const handleCapsuleBack = () => {
521
- if (layoutState.isDesktop || view === "catalog") {
524
+ if (layoutState.isPcWideSidebar || view === "catalog") {
522
525
  setIsExitConfirmOpen(true);
523
526
  return;
524
527
  }
525
528
  setNavigableView("catalog");
526
529
  };
530
+ const handleFloatingCartToggle = () => {
531
+ const nextView = view === "cart" ? "catalog" : "cart";
532
+ if (nextView === "cart") setIsCartPromotionVisible(true);
533
+ setNavigableView(nextView);
534
+ };
527
535
  const showCheckoutFailure = (failureReason) => {
528
536
  var _ref2, _context$sales$tempOr, _context$sales$bookin2, _context$sales$bookin3, _ref3, _ref4, _resolveVirtualSettle;
529
537
  const tempOrder = (_ref2 = (_context$sales$tempOr = context.sales.tempOrder) !== null && _context$sales$tempOr !== void 0 ? _context$sales$tempOr : (_context$sales$bookin2 = context.sales.bookingTicket) === null || _context$sales$bookin2 === void 0 || (_context$sales$bookin3 = _context$sales$bookin2.getTempOrder) === null || _context$sales$bookin3 === void 0 ? void 0 : _context$sales$bookin3.call(_context$sales$bookin2)) !== null && _ref2 !== void 0 ? _ref2 : null;
@@ -861,18 +869,20 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
861
869
  }]];
862
870
  return /* @__PURE__ */ react.default.createElement("section", {
863
871
  className: "pisell-kiosk-sale",
864
- "data-catalog-promotion": view === "catalog" && isCatalogPromotionVisible ? "visible" : "hidden",
872
+ "data-catalog-promotion": layoutState.showCatalogPromotion && isCatalogPromotionVisible ? "visible" : "hidden",
865
873
  "data-catalog-scrolling": view === "catalog" && isCatalogProductListScrolling ? "true" : "false",
874
+ "data-kiosk-shell": kioskShellLayout,
866
875
  "data-variant": variant,
867
876
  "data-view": view
868
877
  }, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-sale__content" }, layoutState.showCatalog ? /* @__PURE__ */ react.default.createElement("div", {
869
- "aria-hidden": !layoutState.isDesktop && view !== "catalog",
878
+ "aria-hidden": !layoutState.isPcWideSidebar && view !== "catalog",
870
879
  className: "pisell-kiosk-sale__catalog"
871
880
  }, /* @__PURE__ */ react.default.createElement(require_index$3.BigSaleProductList, {
872
881
  addToCartToastIcon: variant === "phone" ? KIOSK_PHONE_ADD_TO_CART_TOAST_ICON : void 0,
873
882
  addToCartToastOptions: variant === "phone" ? KIOSK_PHONE_ADD_TO_CART_TOAST_OPTIONS : void 0,
874
- isActive: isActive && (layoutState.isDesktop || view === "catalog"),
883
+ isActive: isActive && (layoutState.isPcWideSidebar || view === "catalog"),
875
884
  osKey,
885
+ productListPreferencesChannel: resolvedProductListPreferencesChannel,
876
886
  mode,
877
887
  context,
878
888
  businessCode,
@@ -892,29 +902,23 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
892
902
  showActiveCategoryTitle: catalogVariant !== "phone",
893
903
  showSettings: true,
894
904
  variant: catalogVariant
895
- })) : null, layoutState.showCart ? /* @__PURE__ */ react.default.createElement("section", { className: "pisell-kiosk-sale__screen pisell-kiosk-sale__cart-screen" }, /* @__PURE__ */ react.default.createElement("header", { className: "pisell-kiosk-sale__cart-header" }, /* @__PURE__ */ react.default.createElement("h1", null, _pisell_utils.locales.getText("pisell2.big-sale.kiosk.your-order"), " ", "(", cartItemCount, ")")), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-sale__cart-body" }, /* @__PURE__ */ react.default.createElement(require_Base.default, {
905
+ })) : null, layoutState.showCart ? /* @__PURE__ */ react.default.createElement("section", {
906
+ "aria-label": _pisell_utils.locales.getText("pisell2.big-sale.kiosk.your-order"),
907
+ className: "pisell-kiosk-sale__screen pisell-kiosk-sale__cart-screen"
908
+ }, /* @__PURE__ */ react.default.createElement("header", { className: "pisell-kiosk-sale__cart-header" }, /* @__PURE__ */ react.default.createElement("h1", null, _pisell_utils.locales.getText("pisell2.big-sale.kiosk.your-order"), " ", "(", cartItemCount, ")")), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-sale__cart-body" }, /* @__PURE__ */ react.default.createElement(require_Base.default, {
896
909
  context: saleDetailContext,
897
910
  mobilePresentation: "inline",
898
911
  moduleConfig: kioskSaleDetailModuleConfig,
899
912
  renderType: "current",
900
913
  template: "A",
901
914
  variant
902
- })), layoutState.showSidebarCapsule ? /* @__PURE__ */ react.default.createElement(require_index$4.default, {
903
- presentation: "sidebar",
904
- context,
905
- isCartActive: true,
906
- isPromotionVisible: isCartPromotionVisible,
907
- promotionAppliedCount: selectedCustomerVoucherCount,
908
- onAddNote: openOrderNoteModal,
909
- onBack: handleCapsuleBack,
910
- checkoutLoading: isCheckoutLoading,
911
- onCheckout: handleCheckout,
912
- onTogglePromotion: () => setIsCartPromotionVisible((visible) => !visible),
913
- onToggleCart: () => setNavigableView("cart")
914
- }) : null) : null), view === "cart" && isCheckoutLoading ? /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-sale__checkout-loading" }, /* @__PURE__ */ react.default.createElement(antd.Spin, { size: "large" })) : null, catalogPromotionSlot, layoutState.showFloatingCapsule ? /* @__PURE__ */ react.default.createElement(require_index$4.default, {
915
+ }))) : null), view === "cart" && isCheckoutLoading ? /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-sale__checkout-loading" }, /* @__PURE__ */ react.default.createElement(antd.Spin, { size: "large" })) : null, catalogPromotionSlot, layoutState.showFloatingCapsule ? /* @__PURE__ */ react.default.createElement(require_index$4.default, {
915
916
  presentation: "floating",
916
917
  context,
917
918
  isCartActive: layoutState.cartIsActive,
919
+ catalogPrimaryAction: layoutState.catalogPrimaryAction,
920
+ showCatalogCartAction: !layoutState.isPcWideSidebar,
921
+ showCatalogNoteAction: layoutState.isPcWideSidebar,
918
922
  isPromotionVisible: isCartPromotionVisible,
919
923
  locale,
920
924
  promotionAppliedCount: selectedCustomerVoucherCount,
@@ -923,11 +927,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
923
927
  checkoutLoading: isCheckoutLoading,
924
928
  onCheckout: handleCheckout,
925
929
  onTogglePromotion: isVirtualSettlementOrder ? void 0 : () => setIsCartPromotionVisible((visible) => !visible),
926
- onToggleCart: () => {
927
- const nextView = view === "cart" ? "catalog" : "cart";
928
- if (nextView === "cart") setIsCartPromotionVisible(true);
929
- setNavigableView(nextView);
930
- }
930
+ onToggleCart: handleFloatingCartToggle
931
931
  }) : null, orderNoteModal, /* @__PURE__ */ react.default.createElement(antd.Modal, {
932
932
  centered: true,
933
933
  closable: false,
@@ -12,6 +12,7 @@
12
12
  );
13
13
 
14
14
  position: relative;
15
+ box-sizing: border-box;
15
16
  width: 100%;
16
17
  height: 100%;
17
18
  min-height: 0;
@@ -302,7 +303,7 @@
302
303
 
303
304
  // 手机版商品列表滚动时,底部 catalog 胶囊与顶部搜索框同时让出可视区域。
304
305
  // 只改变视觉和点击状态,不删除原来的底部预留空间;滚动停止后可无跳动恢复。
305
- .pisell-kiosk-sale[data-variant='phone'][data-view='catalog'][data-catalog-scrolling='true']
306
+ .pisell-kiosk-sale[data-kiosk-shell='single-screen'][data-view='catalog'][data-catalog-scrolling='true']
306
307
  .pisell-kiosk-cart-capsule--catalog {
307
308
  opacity: 0;
308
309
  pointer-events: none;
@@ -379,7 +380,19 @@
379
380
  min-height: 0;
380
381
  }
381
382
 
382
- .pisell-kiosk-sale[data-variant='desktop'] {
383
+ .pisell-kiosk-sale[data-kiosk-shell='pc-wide-sidebar'] {
384
+ max-width: 1200px;
385
+ margin-right: auto;
386
+ margin-left: auto;
387
+
388
+ > .pisell-kiosk-cart-capsule--floating {
389
+ width: 100%;
390
+ }
391
+
392
+ .pisell-kiosk-sale__content {
393
+ height: calc(100% - var(--pisell-kiosk-cart-capsule-reserved-space));
394
+ }
395
+
383
396
  .pisell-kiosk-sale__catalog .list-content-vertical {
384
397
  padding-bottom: 0;
385
398
  }
@@ -1,21 +1,35 @@
1
1
  //#region src/components/bigSale/templates/Kiosk/layout.ts
2
- function resolveKioskLayoutState(variant, view) {
3
- const isDesktop = variant === "desktop";
2
+ function resolveKioskLayoutState(shellLayout, view) {
3
+ const isPcWideSidebar = shellLayout === "pc-wide-sidebar";
4
4
  const isNavigableView = view === "catalog" || view === "cart";
5
5
  return {
6
- isDesktop,
6
+ isPcWideSidebar,
7
7
  showCatalog: isNavigableView,
8
- showCart: isDesktop ? isNavigableView : view === "cart",
9
- showCatalogPromotion: !isDesktop && view === "catalog",
10
- showFloatingCapsule: !isDesktop && isNavigableView,
11
- showSidebarCapsule: isDesktop && isNavigableView,
12
- cartIsActive: isDesktop || view === "cart"
8
+ showCart: isPcWideSidebar ? isNavigableView : view === "cart",
9
+ showCatalogPromotion: !isPcWideSidebar && view === "catalog",
10
+ showFloatingCapsule: isNavigableView,
11
+ cartIsActive: !isPcWideSidebar && view === "cart",
12
+ catalogPrimaryAction: isPcWideSidebar ? "checkout" : "toggle-cart"
13
13
  };
14
14
  }
15
- function resolveKioskPromotionRevealTarget(variant, view) {
15
+ function resolveKioskPromotionRevealTarget(shellLayout, view) {
16
16
  if (view !== "catalog" && view !== "cart") return null;
17
- return variant === "desktop" ? "cart" : view;
17
+ return shellLayout === "pc-wide-sidebar" ? "cart" : view;
18
+ }
19
+ /** PC 的购物车常驻在右栏,不再恢复或持久化全屏 cart 视图。 */
20
+ function normalizeKioskNavigableView(shellLayout, view) {
21
+ return shellLayout === "pc-wide-sidebar" ? "catalog" : view;
22
+ }
23
+ /**
24
+ * PC 新版 H5 内容布局使用独立偏好 key,避免旧 desktop 配置回流或污染 H5。
25
+ * H5 / 实体 Kiosk 返回 undefined,继续沿用升级前的存储 key。
26
+ */
27
+ function resolveKioskProductListPreferencesChannel(shellLayout, channel) {
28
+ if (shellLayout !== "pc-wide-sidebar") return void 0;
29
+ return `${String(channel || "").trim() || "pos"}:kiosk-pc-phone`;
18
30
  }
19
31
  //#endregion
32
+ exports.normalizeKioskNavigableView = normalizeKioskNavigableView;
20
33
  exports.resolveKioskLayoutState = resolveKioskLayoutState;
34
+ exports.resolveKioskProductListPreferencesChannel = resolveKioskProductListPreferencesChannel;
21
35
  exports.resolveKioskPromotionRevealTarget = resolveKioskPromotionRevealTarget;
@@ -9,7 +9,7 @@ react = require_runtime.__toESM(react);
9
9
  /**
10
10
  * BigSale 模板渲染器:Base 负责外层容器与数据组装,模板只负责区域组合。
11
11
  */
12
- function BigSaleTemplateRenderer({ tmpl = "standard", isActive = true, osKey, productListPreferencesChannel, context, mode, variant, productLoadParams, businessCode, bookingConfigParams, hideSelectFloorMapResourceAction, productDisplayConfig, productCatalogSessionKey, productCatalogReady, saleDetailTemplate, saleDetailModuleConfig, orderId, locale, saleDetailWrapperProps, saleDetailHeaderSlot, rightActionBarClose, onOrderComplete, externalActionRequest, onExternalActionAccepted, onExternalPaymentSettled }) {
12
+ function BigSaleTemplateRenderer({ tmpl = "standard", isActive = true, osKey, productListPreferencesChannel, context, mode, variant, productLoadParams, businessCode, bookingConfigParams, hideSelectFloorMapResourceAction, productDisplayConfig, productCatalogSessionKey, productCatalogReady, kioskShellLayout, saleDetailTemplate, saleDetailModuleConfig, orderId, locale, saleDetailWrapperProps, saleDetailHeaderSlot, rightActionBarClose, onOrderComplete, externalActionRequest, onExternalActionAccepted, onExternalPaymentSettled }) {
13
13
  switch (tmpl) {
14
14
  case "HDLKiosk": return /* @__PURE__ */ react.default.createElement(require_index$3.default, {
15
15
  isActive,
@@ -26,6 +26,7 @@ function BigSaleTemplateRenderer({ tmpl = "standard", isActive = true, osKey, pr
26
26
  case "kiosk": return /* @__PURE__ */ react.default.createElement(require_index$2.default, {
27
27
  isActive,
28
28
  osKey,
29
+ productListPreferencesChannel,
29
30
  context,
30
31
  mode,
31
32
  variant,
@@ -36,6 +37,7 @@ function BigSaleTemplateRenderer({ tmpl = "standard", isActive = true, osKey, pr
36
37
  productDisplayConfig,
37
38
  productCatalogSessionKey,
38
39
  productCatalogReady,
40
+ kioskShellLayout,
39
41
  saleDetailTemplate,
40
42
  saleDetailModuleConfig,
41
43
  orderId,
@@ -4,6 +4,7 @@ import { BaseResponsiveProps } from "../../responsive/type.js";
4
4
  import { ILoadProductsParams, SalesSdkCartContextValue, SalesSdkContextValue, SalesSdkCustomerContextValue, SalesSdkProductsContextValue, SalesSdkProviderProps, SalesSdkSummaryContextValue } from "../../plus/salesSdk/types.js";
5
5
  import { SalesSdkBookingContextValue } from "../../plus/salesSdk/context/SalesSdkBookingContext.js";
6
6
  import { SaleDetailModuleConfig, SaleDetailOrderCompletePayload, SaleDetailTemplate, SaleOrderExternalPaymentResult } from "../../plus/saleDetail/types.js";
7
+ import { KioskShellLayout } from "../kioskSale/resolveKioskPresentation.js";
7
8
  import { BigSaleSelectionFlowScene } from "./selectionFlowConfig.js";
8
9
  import React from "react";
9
10
 
@@ -55,6 +56,8 @@ interface BigSaleBaseProps extends BaseResponsiveProps {
55
56
  productCatalogSessionKey?: string;
56
57
  /** 当前业务的商品目录配置是否已就绪;false 时只渲染 UI,不发商品请求。 */
57
58
  productCatalogReady?: boolean;
59
+ /** Kiosk 模板的页面外壳布局;只影响容器结构,不改变内容 variant。 */
60
+ kioskShellLayout?: KioskShellLayout;
58
61
  saleDetailTemplate?: SaleDetailTemplate;
59
62
  saleDetailModuleConfig?: SaleDetailModuleConfig;
60
63
  autoCreate?: boolean;
@@ -0,0 +1,4 @@
1
+ //#region src/components/kioskSale/resolveKioskPresentation.d.ts
2
+ type KioskShellLayout = 'single-screen' | 'pc-wide-sidebar';
3
+ //#endregion
4
+ export { KioskShellLayout };
@@ -17,8 +17,9 @@ function resolveKioskPresentation(platform, requestedVariant) {
17
17
  switch (normalizedPlatform) {
18
18
  case "pc": return {
19
19
  platform: "pc",
20
- variant: "desktop",
21
- productDetailVariant: "desktop",
20
+ variant: "phone",
21
+ productDetailVariant: "phone",
22
+ kioskShellLayout: "pc-wide-sidebar",
22
23
  productDetailPresentationPlatform: "default",
23
24
  mergeBookingLinesForDisplay: true,
24
25
  enableCustomerAuthHost: false
@@ -27,6 +28,7 @@ function resolveKioskPresentation(platform, requestedVariant) {
27
28
  platform: "h5",
28
29
  variant: "phone",
29
30
  productDetailVariant: "phone",
31
+ kioskShellLayout: "single-screen",
30
32
  productDetailPresentationPlatform: "default",
31
33
  mergeBookingLinesForDisplay: true,
32
34
  enableCustomerAuthHost: false
@@ -35,6 +37,7 @@ function resolveKioskPresentation(platform, requestedVariant) {
35
37
  platform: "kiosk",
36
38
  variant: "phone",
37
39
  productDetailVariant: "phone",
40
+ kioskShellLayout: "single-screen",
38
41
  productDetailPresentationPlatform: "kiosk",
39
42
  mergeBookingLinesForDisplay: false,
40
43
  enableCustomerAuthHost: true
@@ -42,6 +45,7 @@ function resolveKioskPresentation(platform, requestedVariant) {
42
45
  default: return {
43
46
  variant: normalizedVariant,
44
47
  productDetailVariant: normalizedVariant,
48
+ kioskShellLayout: "single-screen",
45
49
  productDetailPresentationPlatform: "kiosk",
46
50
  mergeBookingLinesForDisplay: false,
47
51
  enableCustomerAuthHost: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.12.223",
3
+ "version": "6.12.224",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -69,11 +69,11 @@
69
69
  "react-zoom-pan-pinch": "^3.7.0",
70
70
  "styled-components": "^6.0.0-rc.3",
71
71
  "use-sync-external-store": "^1.6.0",
72
- "@pisell/pi-payment-sdk": "0.0.3",
73
72
  "@pisell/utils": "3.0.4",
74
73
  "@pisell/date-picker": "3.0.10",
75
- "@pisell/icon": "0.0.11",
76
- "@pisell/materials": "6.12.61"
74
+ "@pisell/pi-payment-sdk": "0.0.3",
75
+ "@pisell/materials": "6.12.61",
76
+ "@pisell/icon": "0.0.11"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "react": "^18.0.0",