@pisell/private-materials 6.12.374 → 6.12.375

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 (53) 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 +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
  8. package/es/components/bigSale/components/ProductList/index.js +0 -1
  9. package/es/components/bigSale/components/TimeBar/index.js +0 -1
  10. package/es/components/bigSale/dialog.js +0 -1
  11. package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
  12. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
  13. package/es/components/bigSale/index.js +1 -6
  14. package/es/components/bigSale/templates/Kiosk/index.js +0 -1
  15. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
  16. package/es/components/vendingMachine/DispensePage.js +5 -3
  17. package/es/components/vendingMachine/README.md +4 -2
  18. package/es/components/vendingMachine/VendingCatalog.js +2 -9
  19. package/es/components/vendingMachine/VendingSale.js +10 -4
  20. package/es/components/vendingMachine/VoucherSkuList.js +4 -3
  21. package/es/components/vendingMachine/locales.d.ts +2 -0
  22. package/es/components/vendingMachine/locales.js +11 -1
  23. package/es/index.js +0 -2
  24. package/es/plus/multiCurrencySettlement/index.js +1 -1
  25. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  26. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  27. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  28. package/es/plus/saleDetail/Base.js +0 -1
  29. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
  30. package/es/plus/saleDetail/components/DetailActions/PrintAction.js +0 -1
  31. package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
  32. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
  33. package/es/plus/saleDetail/index.js +0 -1
  34. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
  35. package/es/plus/saleDetail/tmpl/B/index.js +0 -1
  36. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  37. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  38. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  39. package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
  40. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  41. package/es/pro/Login2.0/index.d.ts +2 -2
  42. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  43. package/lib/components/bigSale/index.js +1 -5
  44. package/lib/components/vendingMachine/DispensePage.js +5 -3
  45. package/lib/components/vendingMachine/README.md +4 -2
  46. package/lib/components/vendingMachine/VendingCatalog.js +1 -8
  47. package/lib/components/vendingMachine/VendingSale.js +10 -4
  48. package/lib/components/vendingMachine/VoucherSkuList.js +4 -3
  49. package/lib/components/vendingMachine/locales.d.ts +2 -0
  50. package/lib/components/vendingMachine/locales.js +11 -1
  51. package/package.json +3 -3
  52. package/es/plus/pisellReservation/index.js +0 -17
  53. package/es/plus/salesSdk/index.js +0 -54
@@ -1,6 +1,5 @@
1
1
  import useEngineContext from "../../../../hooks/useEngineContext.js";
2
2
  import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
3
- import "../../../../plus/salesSdk/index.js";
4
3
  import dayjs from "dayjs";
5
4
  import { useCallback, useEffect, useState } from "react";
6
5
  //#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
@@ -18,7 +18,6 @@ import { showAddToCartToast } from "../../../../plus/salesSdk/components/showAdd
18
18
  import { mergeBookingsForDisplay } from "../../../../plus/salesSdk/utils/mergeBookingsForDisplay.js";
19
19
  import useSalesSdkGlobalScanHandler from "../../../../plus/salesSdk/hooks/useSalesSdkGlobalScanHandler.js";
20
20
  import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
21
- import "../../../../plus/salesSdk/index.js";
22
21
  import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
23
22
  import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
24
23
  import { showSalesGuardErrorToast } from "../../../../plus/salesSdk/utils/salesGuard.js";
@@ -5,7 +5,6 @@ import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
5
5
  import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
6
6
  import { setBookingTimeSelectionIntent } from "../../../../plus/salesSdk/utils/bookingTimeSelection.js";
7
7
  import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
8
- import "../../../../plus/salesSdk/index.js";
9
8
  import locales_default from "../../locales/index.js";
10
9
  import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
11
10
  import dayjs from "dayjs";
@@ -6,7 +6,6 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
6
6
  import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
7
7
  import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
8
8
  import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
9
- import "../../plus/salesSdk/index.js";
10
9
  import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
11
10
  import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
12
11
  import BigSale from "./index.js";
@@ -4,7 +4,6 @@ import { useSalesSdkCustomer } from "../../../plus/salesSdk/hooks/useSalesSdkCus
4
4
  import { useSalesSdkBookingContext } from "../../../plus/salesSdk/context/SalesSdkBookingContext.js";
5
5
  import { useSalesSdkSummary } from "../../../plus/salesSdk/hooks/useSalesSdkSummary.js";
6
6
  import { useSalesSdkProducts } from "../../../plus/salesSdk/hooks/useSalesSdkProducts.js";
7
- import "../../../plus/salesSdk/index.js";
8
7
  import { useMemo } from "react";
9
8
  //#region src/components/bigSale/hooks/useBigSaleContext.ts
10
9
  /**
@@ -3,7 +3,6 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
3
3
  import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from "../../../plus/salesSdk/utils/buildDefaultLoadProductsParams.js";
4
4
  import { useSalesSdkUIHosts } from "../../../plus/salesSdk/context/SalesSdkUIHostsContext.js";
5
5
  import { SalesSdkRootRefreshContext } from "../../../plus/salesSdk/context/SalesSdkProvider.js";
6
- import "../../../plus/salesSdk/index.js";
7
6
  import { isPersistedBigSaleOrderId } from "../utils/orderIdentity.js";
8
7
  import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
9
8
  import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
@@ -8,7 +8,6 @@ import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
8
8
  import { useSalesSdkCustomer } from "../../plus/salesSdk/hooks/useSalesSdkCustomer.js";
9
9
  import { SalesSdkProvider } from "../../plus/salesSdk/context/SalesSdkProvider.js";
10
10
  import { SalesSdkBookingContextProvider } from "../../plus/salesSdk/context/SalesSdkBookingContext.js";
11
- import "../../plus/salesSdk/index.js";
12
11
  import { resolveKioskPlatformSource, resolveKioskPresentation } from "../kioskSale/resolveKioskPresentation.js";
13
12
  import { resolveCustomerDetailAppearance } from "../../pro/skuDetailModal/customerDetailPolicy.js";
14
13
  import { ResponsiveBigSaleBase } from "./Base.js";
@@ -59,11 +58,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, enableMultiCurrencySettlement = false
59
58
  const pisellos = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.pisellos;
60
59
  const isProductMergeDisabled = context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.utils) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.businessUtils) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.isProductMergeDisabled;
61
60
  const shouldMergeProductLines = useMemo(() => () => typeof isProductMergeDisabled !== "function" || !isProductMergeDisabled(), [isProductMergeDisabled]);
62
- const defaultProviderOsKey = [
63
- osKey,
64
- mode,
65
- businessCode
66
- ].filter(Boolean).join("-");
61
+ const defaultProviderOsKey = businessCode ? `bookingTicket-${osKey}-${businessCode}` : [osKey, mode].filter(Boolean).join("-");
67
62
  const providerOsKey = osModuleName || defaultProviderOsKey;
68
63
  const providerModuleName = providerOsKey;
69
64
  const { runtime } = useRuntime();
@@ -13,7 +13,6 @@ import { useSalesSdkBusinessAvailability } from "../../../../plus/salesSdk/conte
13
13
  import { collectUnassignedHolderLines } from "../../../../plus/salesSdk/utils/holderSubmitValidation.js";
14
14
  import { isFulfillmentTimingBooking } from "../../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
15
15
  import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
16
- import "../../../../plus/salesSdk/index.js";
17
16
  import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
18
17
  import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
19
18
  import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
@@ -2,7 +2,6 @@ import useEngineContext from "../../hooks/useEngineContext.js";
2
2
  import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
3
3
  import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
4
4
  import { TEMP_ORDER_SYNC_REQUEST_MESSAGE_TYPE, getTempOrderSyncPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
5
- import "../../plus/salesSdk/index.js";
6
5
  import { useEffect, useRef, useState } from "react";
7
6
  //#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
8
7
  function createRequestId() {
@@ -18,7 +18,7 @@ const statusIcons = {
18
18
  uncertain: "circle-alert"
19
19
  };
20
20
  const itemDisplayStatus = (item) => item.status === "failed" && item.uncertain ? "uncertain" : item.status;
21
- function DispensePage({ brand, sale, progress, error, stage, seconds, onHome }) {
21
+ function DispensePage({ brand, sale, isRedemption, progress, error, stage, seconds, onHome }) {
22
22
  var _items, _progress$inventorySy;
23
23
  const { text: t, localized } = useVendingLocale();
24
24
  const contentRef = useRef(null);
@@ -32,6 +32,8 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
32
32
  const scrollTargetKey = (_items = items[currentIndex >= 0 ? currentIndex : processed - 1]) === null || _items === void 0 ? void 0 : _items.key;
33
33
  const currentNumber = currentIndex >= 0 ? currentIndex + 1 : Math.min(processed + 1, items.length);
34
34
  const complete = stage === "result";
35
+ const collectionErrorKey = isRedemption ? "redemptionCollectionError" : "postPaymentError";
36
+ const partialDescriptionKey = isRedemption ? "redemptionPartialDescription" : "partialDescription";
35
37
  const allSuccess = complete && !error && (progress === null || progress === void 0 ? void 0 : progress.status) === "complete" && items.length > 0 && success === items.length;
36
38
  useLayoutEffect(() => {
37
39
  const content = contentRef.current;
@@ -62,7 +64,7 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
62
64
  return /* @__PURE__ */ React.createElement("section", { className: "vm-dispense-screen" }, /* @__PURE__ */ React.createElement("header", { className: "vm-dispense-brand" }, /* @__PURE__ */ React.createElement(Brand, {
63
65
  name: brand,
64
66
  compact: true
65
- })), /* @__PURE__ */ React.createElement("div", { className: "vm-dispense-heading" }, /* @__PURE__ */ React.createElement("h1", null, t(complete ? allSuccess ? "complete" : "partial" : "dispensing")), /* @__PURE__ */ React.createElement("p", null, t(error ? "postPaymentError" : complete ? allSuccess ? "completeDescription" : "partialDescription" : "dispenseDescription", { brand }))), /* @__PURE__ */ React.createElement("div", {
67
+ })), /* @__PURE__ */ React.createElement("div", { className: "vm-dispense-heading" }, /* @__PURE__ */ React.createElement("h1", null, t(complete ? allSuccess ? "complete" : "partial" : "dispensing")), /* @__PURE__ */ React.createElement("p", null, t(error ? collectionErrorKey : complete ? allSuccess ? "completeDescription" : partialDescriptionKey : "dispenseDescription", { brand }))), /* @__PURE__ */ React.createElement("div", {
66
68
  className: "vm-dispense-content",
67
69
  ref: contentRef
68
70
  }, !!items.length ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("section", {
@@ -94,7 +96,7 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
94
96
  }, /* @__PURE__ */ React.createElement(Icon, { name: "loader-circle" }), t("preparing")) : null, complete && /* @__PURE__ */ React.createElement("div", {
95
97
  className: "vm-dispense-collection-note" + (allSuccess ? "" : " vm-dispense-attention"),
96
98
  role: allSuccess ? "note" : "alert"
97
- }, /* @__PURE__ */ React.createElement("span", { className: "vm-dispense-note-icon" }, /* @__PURE__ */ React.createElement(Icon, { name: allSuccess ? "hand" : "circle-alert" })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", null, t(allSuccess ? "collectDescription" : "postPaymentError")), !allSuccess && !!items.length && /* @__PURE__ */ React.createElement("p", { className: "vm-dispense-summary" }, t(uncertain ? "summaryUncertain" : "summary", {
99
+ }, /* @__PURE__ */ React.createElement("span", { className: "vm-dispense-note-icon" }, /* @__PURE__ */ React.createElement(Icon, { name: allSuccess ? "hand" : "circle-alert" })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", null, t(allSuccess ? "collectDescription" : collectionErrorKey)), !allSuccess && !!items.length && /* @__PURE__ */ React.createElement("p", { className: "vm-dispense-summary" }, t(uncertain ? "summaryUncertain" : "summary", {
98
100
  success,
99
101
  failed: items.length - success - uncertain,
100
102
  uncertain
@@ -32,7 +32,7 @@ Home 右上角参照 `webpos/beta` 的 HDLKiosk 提供地球图标与语言下
32
32
 
33
33
  购买列表和兑换列表的主按钮直接进入现有结账流程,不再先进入购物车确认页;购买列表的购物车按钮和金额入口可主动打开完整购物车,兑换列表底栏仅保留已选数量/额度摘要,不显示购物车按钮。支付返回到发起结账时的列表或购物车,保留本单选择。普通 Kiosk 同样支持列表直接结账,H5/PC 保留各自既有结账入口。共享 Kiosk 模板在所有平台移除结账前的“Do you have a coupon or card?”询问弹窗,手动打开优惠面板、扫码和输入优惠码的入口仍保留;登录、库存预检、零元确认与出货继续沿用原逻辑。
34
34
 
35
- 购买列表与兑换列表通过内部 `useVendingCartInteraction` 共用防重复操作、扫码/支付锁检查、购物车同步等待、会话失效校验及忙碌状态上报。页面分别保留购买 SKU 库存判断和兑换券额度规则;自动选中与平铺规格选择同样不能绕过扫码、支付或订单切换锁。购买卡片的延迟进度提示保持不变。此 hook 仅由两个售货机列表使用,不接入普通 Kiosk、H5 或 POS。
35
+ 购买列表与兑换列表通过内部 `useVendingCartInteraction` 共用防重复操作、扫码/支付锁检查、购物车同步等待、会话失效校验及忙碌状态上报。页面分别保留购买 SKU 库存判断和兑换券额度规则;自动选中与平铺规格选择同样不能绕过扫码、支付或订单切换锁。购买卡片调整数量期间保留原数量文案,不显示延迟 Loading 提示;处理锁和无障碍忙碌状态仍保留。此 hook 仅由两个售货机列表使用,不接入普通 Kiosk、H5 或 POS。
36
36
 
37
37
  兑换页的自动选中、详情加购与平铺 SKU 选择共用内部 `addVoucherProduct`,统一商品数据清理、动态券额度、持有人参数和加购后的券恢复。平铺数量直接读取购物车,各次操作即时提交;失败或取消保留此前已成功的选择。入口扫码只向已有销售实例交接请求,初始化由首页准备流程负责。
38
38
 
@@ -44,7 +44,7 @@ Home 右上角参照 `webpos/beta` 的 HDLKiosk 提供地球图标与语言下
44
44
 
45
45
  购买卡片和兑换平铺选项均支持点击整块区域加一,包含独立的键盘可访问按钮;加减控件及数量区域不冒泡触发卡片加购。点击沿用加号的库存、可用状态和处理锁,兑换还受剩余券额度约束;兑换选择即时同步购物车,不再需要额外的确认或取消步骤。
46
46
 
47
- 不可用 SKU 使用浅白色整卡遮罩,灰色邮戳式状态印章按整张卡片绝对居中,不因数量控件偏移;印章以矢量双圆环、倾斜字牌和波纹构成,文字随语言切换。仅库存状态 ready 且原始可售数量为 0 时显示 Sold Out,其它不可用情况显示 Unavailable。购物车已占满库存、券额度已用完分别提示 Limit reached、No redemptions left,均不显示遮罩;读取库存时显示 Loading。已选数量仍可减少或清零。
47
+ 不可用 SKU 使用浅白色整卡遮罩,灰色邮戳式状态印章按整张卡片绝对居中,不因数量控件偏移;印章以矢量双圆环、倾斜字牌和波纹构成,文字随语言切换。仅库存状态 ready 且原始可售数量为 0 时显示 Sold Out,其它不可用情况显示 Unavailable。购物车已占满库存时提示 Limit reached;券额度已用完时不显示 No redemptions left,仍禁止继续增加,且不显示遮罩。读取库存时显示 Loading。已选数量仍可减少或清零。
48
48
 
49
49
  宿主销售模块的 `otherParams.platform` 与 `otherParams.channel` 使用 `vending`,页面仍复用 `template="kiosk"`。共享自助场景判断支持 kiosk/vending,保留商品布局、客户验证、预约选择及零元订单完成方式;实际商品、定价与订单渠道保持 `vending`。需配套使用支持 vending 云端结账的 PisellOS;非零元使用独立支付页,售货机始终排除现金支付。
50
50
 
@@ -65,6 +65,8 @@ Home 的 Redeem Socks 入口打开独立 `RedeemPage`,展示扫码指引、扫
65
65
 
66
66
  宿主应提供稳定的服务回调引用。租户、业务、门店或设备变化会重置组件会话并取消旧队列订阅;单纯切换语言保留当前页面状态。出货全部成功后 30 秒返回 Idle,失败由用户主动返回;出货和结果页底部始终显示联系工作人员文案。
67
67
 
68
+ 出货交接时随订单快照保存本单是否来自兑换列表。兑换流程的出货失败或部分出货结果只提示工作人员协助,不显示 Your order is paid 或顶部的 Your payment is complete;普通购买仍保留付款完成文案。对应提示覆盖全部五种界面语言。
69
+
68
70
  单件结果可附带 `message`、`code` 和 `uncertain`。宿主无法确认物理出货结果时返回 `success: false, uncertain: true`;队列仍以 `failed` 标识已处理的非成功项,展示时单独标记为“需要核对”,不计入明确未出货数量、不启动成功倒计时。`message` 展示宿主提供的本地化原因。硬件调用、结果分类与是否重试由宿主管理,物料不调用原生插件。
69
71
 
70
72
  队列快照可附带 `inventorySync`(`syncing / synced / review`),独立于物理出货结果。宿主汇总扣库存后可更新此状态;待核对时结果页提示工作人员处理,但不会改变成功件数或重新启动 30 秒倒计时。物料不发起扣库存或自动补偿。
@@ -11,7 +11,7 @@ import { buildVendingCatalog, buildVendingSkuProduct } from "./catalogModel.js";
11
11
  import { groupVendingSkuRows } from "./catalogSkuGroups.js";
12
12
  import SkuStatusOverlay from "./SkuStatusOverlay.js";
13
13
  import useVendingCartInteraction from "./useVendingCartInteraction.js";
14
- import React, { useEffect, useRef, useState } from "react";
14
+ import React, { useRef } from "react";
15
15
  import { useToast } from "@pisell/materials";
16
16
  import { useMemoizedFn } from "ahooks";
17
17
  import "./vendingCatalog.less";
@@ -35,13 +35,6 @@ function VendingCatalog({ brand, context, products, loading, isActive, inventory
35
35
  onBusyChange,
36
36
  errorMessage: t("catalogUpdateFailed")
37
37
  });
38
- const [showMutationProgress, setShowMutationProgress] = useState(false);
39
- useEffect(() => {
40
- setShowMutationProgress(false);
41
- if (!mutatingRowKey) return;
42
- const timer = setTimeout(() => setShowMutationProgress(true), 200);
43
- return () => clearTimeout(timer);
44
- }, [mutatingRowKey]);
45
38
  const ticket = context.sales.bookingTicket;
46
39
  const productsRef = useRef(products);
47
40
  productsRef.current = products;
@@ -197,7 +190,7 @@ function VendingCatalog({ brand, context, products, loading, isActive, inventory
197
190
  }), /* @__PURE__ */ React.createElement("div", { className: "vm-catalog-card-heading" }, /* @__PURE__ */ React.createElement(Heading, null, label), /* @__PURE__ */ React.createElement("strong", null, formatTempOrderSettlementAmount(order, row.price))), showStatusOverlay && /* @__PURE__ */ React.createElement(SkuStatusOverlay, { label: t(soldOut ? "catalogSoldOut" : "catalogUnavailableLabel") }), checkingStock && /* @__PURE__ */ React.createElement("span", {
198
191
  className: "vm-catalog-stock-loading",
199
192
  role: "status"
200
- }, t("loading")), (!unavailable || row.quantity > 0) && /* @__PURE__ */ React.createElement("div", { className: "vm-catalog-quantity" }, /* @__PURE__ */ React.createElement("span", null, showMutationProgress && mutatingRowKey === row.key ? t("loading") : limitReached ? t("catalogLimitReached") : t(row.quantity > 0 ? "catalogAdded" : "catalogQuantity")), /* @__PURE__ */ React.createElement("div", {
193
+ }, t("loading")), (!unavailable || row.quantity > 0) && /* @__PURE__ */ React.createElement("div", { className: "vm-catalog-quantity" }, /* @__PURE__ */ React.createElement("span", null, limitReached ? t("catalogLimitReached") : t(row.quantity > 0 ? "catalogAdded" : "catalogQuantity")), /* @__PURE__ */ React.createElement("div", {
201
194
  role: "group",
202
195
  "aria-label": name,
203
196
  "aria-disabled": busy,
@@ -23,7 +23,7 @@ const RESULT_RETURN_SECONDS = 30;
23
23
  const DEFAULT_HOME_IDLE_TIMEOUT_MS = 3e4;
24
24
  const SALE_DETAIL_MODULE_CONFIG = { cartItems: { renderProductLineItemStatus: renderVendingCartItemStatus } };
25
25
  function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource, scanEnabled = true, isActive = true, isVisible = true, idleRequest = 0, homeIdleTimeoutMs = DEFAULT_HOME_IDLE_TIMEOUT_MS, onHomePageActiveChange, onLocaleChange, brand, subtitle, machine, onRequestSettings, onRequestStaff, onPrerenderComplete, className, style }) {
26
- var _scan$pending2;
26
+ var _scan$pending2, _sale$snapshot, _sale$isRedemption;
27
27
  const { text: t } = useVendingLocale();
28
28
  const themeStyle = useVendingTheme();
29
29
  const toast = useToast();
@@ -327,6 +327,10 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
327
327
  }, [onPrerenderComplete]);
328
328
  const onPaidCheckout = useCallback((payload) => {
329
329
  const snapshot = cloneDeep(payload);
330
+ const completedSale = {
331
+ snapshot,
332
+ isRedemption: catalogView === "vouchers"
333
+ };
330
334
  const saleContext = _objectSpread2(_objectSpread2({}, context), {}, { businessCode: payload.businessCode || context.businessCode });
331
335
  const isCurrentScope = () => mounted.current && active.current && isCurrentContext(context);
332
336
  return _asyncToGenerator(function* () {
@@ -335,7 +339,7 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
335
339
  var _unsubscribeJob$curre3;
336
340
  if (!(yield shouldDispenseAfterSale(saleContext))) return false;
337
341
  if (!isCurrentScope()) return true;
338
- setSale(snapshot);
342
+ setSale(completedSale);
339
343
  setProgress(null);
340
344
  setDispenseError(false);
341
345
  setStage("dispense");
@@ -358,7 +362,7 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
358
362
  update(nextJob.getSnapshot());
359
363
  } catch (_unused) {
360
364
  if (isCurrentScope()) {
361
- setSale(snapshot);
365
+ setSale(completedSale);
362
366
  setDispenseError(true);
363
367
  setStage("result");
364
368
  }
@@ -366,6 +370,7 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
366
370
  return true;
367
371
  })();
368
372
  }, [
373
+ catalogView,
369
374
  context,
370
375
  isCurrentContext,
371
376
  setIdlePaused,
@@ -586,7 +591,8 @@ function VendingSale({ context, sales, fulfillment, blockNavigation, scanSource,
586
591
  }
587
592
  })), isFulfillment && /* @__PURE__ */ React.createElement(CustomerViewport, null, /* @__PURE__ */ React.createElement(DispensePage, {
588
593
  brand,
589
- sale,
594
+ sale: (_sale$snapshot = sale === null || sale === void 0 ? void 0 : sale.snapshot) !== null && _sale$snapshot !== void 0 ? _sale$snapshot : null,
595
+ isRedemption: (_sale$isRedemption = sale === null || sale === void 0 ? void 0 : sale.isRedemption) !== null && _sale$isRedemption !== void 0 ? _sale$isRedemption : false,
590
596
  progress,
591
597
  error: dispenseError,
592
598
  stage,
@@ -22,6 +22,7 @@ function VoucherSkuList({ choices, busy, disabled, blocked, inventoryRefreshing,
22
22
  }, group.label && /* @__PURE__ */ React.createElement("legend", { className: "vm-voucher-sku-group-title" }, group.dimensionName && /* @__PURE__ */ React.createElement("span", { className: "vm-sku-group-dimension" }, group.dimensionName), /* @__PURE__ */ React.createElement("h3", null, group.label)), /* @__PURE__ */ React.createElement("div", { className: "vm-voucher-sku-options" }, group.rows.map(({ row, label }) => {
23
23
  const { quantity, maxQuantity, available, soldOut, loading, limitReason } = choicesByKey.get(row.key);
24
24
  const checkingStock = inventoryRefreshing || loading;
25
+ const statusText = checkingStock ? t("loading") : limitReason === "stock" ? t("catalogLimitReached") : null;
25
26
  const showStatusOverlay = (!available || soldOut) && !checkingStock;
26
27
  const canIncrease = !disabled && !blocked && !checkingStock && available && !soldOut && quantity < maxQuantity;
27
28
  const Heading = group.label ? "h4" : "h3";
@@ -48,9 +49,9 @@ function VoucherSkuList({ choices, busy, disabled, blocked, inventoryRefreshing,
48
49
  "aria-hidden": "true"
49
50
  }), /* @__PURE__ */ React.createElement("div", { className: "vm-voucher-sku-label" }, /* @__PURE__ */ React.createElement(Heading, null, label), !group.label && row.specification && label !== row.specification && /* @__PURE__ */ React.createElement("p", null, row.specification), /* @__PURE__ */ React.createElement("p", {
50
51
  className: "vm-voucher-sku-status",
51
- role: checkingStock || limitReason ? "status" : void 0,
52
- "aria-hidden": !checkingStock && !limitReason
53
- }, checkingStock ? t("loading") : limitReason ? t(limitReason === "voucher" ? "collectQuotaReached" : "catalogLimitReached") : null)), showStatusOverlay && /* @__PURE__ */ React.createElement(SkuStatusOverlay, { label: t(soldOut ? "catalogSoldOut" : "catalogUnavailableLabel") }), /* @__PURE__ */ React.createElement("div", {
52
+ role: statusText ? "status" : void 0,
53
+ "aria-hidden": !statusText
54
+ }, statusText)), showStatusOverlay && /* @__PURE__ */ React.createElement(SkuStatusOverlay, { label: t(soldOut ? "catalogSoldOut" : "catalogUnavailableLabel") }), /* @__PURE__ */ React.createElement("div", {
54
55
  className: `vm-voucher-sku-quantity${showStatusOverlay && quantity === 0 ? " is-hidden" : ""}`,
55
56
  role: "group",
56
57
  "aria-label": row.label,
@@ -215,6 +215,8 @@ declare const en: {
215
215
  partial: string;
216
216
  partialDescription: string;
217
217
  postPaymentError: string;
218
+ redemptionPartialDescription: string;
219
+ redemptionCollectionError: string;
218
220
  summary: string;
219
221
  returning: string;
220
222
  itemNumber: string;
@@ -112,7 +112,7 @@ const en = {
112
112
  scanPreparingHint: "Please wait. The shopping page will open automatically.",
113
113
  scanPrepareFailed: "Unable to open the shopping page",
114
114
  scanPrepareFailedHint: "Please try again, or go back to start over.",
115
- scanResolveFailed: "the code is invalid",
115
+ scanResolveFailed: "The code is invalid",
116
116
  scanProcessing: "Processing…",
117
117
  scanNoVouchers: "No valid product vouchers were found.",
118
118
  scanVoucherNotStarted: "Your product vouchers are not valid yet.",
@@ -215,6 +215,8 @@ const en = {
215
215
  partial: "Some items need attention",
216
216
  partialDescription: "Your payment is complete. A staff member can help with the remaining items.",
217
217
  postPaymentError: "Your order is paid. Please contact a staff member to complete collection.",
218
+ redemptionPartialDescription: "A staff member can help with the remaining items.",
219
+ redemptionCollectionError: "Please contact a staff member to complete collection.",
218
220
  summary: "{success} dispensed · {failed} not dispensed",
219
221
  returning: "Back to start in {seconds}s",
220
222
  itemNumber: "Item {number}",
@@ -442,6 +444,8 @@ const translations = {
442
444
  partial: "部分商品需要工作人员协助",
443
445
  partialDescription: "订单已支付,请联系工作人员处理未出货的商品。",
444
446
  postPaymentError: "订单已支付,请联系工作人员协助取货。",
447
+ redemptionPartialDescription: "请联系工作人员处理未出货的商品。",
448
+ redemptionCollectionError: "请联系工作人员协助取货。",
445
449
  summary: "成功 {success} 件 · 未出货 {failed} 件",
446
450
  returning: "{seconds} 秒后返回首页",
447
451
  itemNumber: "第 {number} 件",
@@ -667,6 +671,8 @@ const translations = {
667
671
  partial: "部分商品需要工作人員協助",
668
672
  partialDescription: "訂單已付款,請聯絡工作人員處理未出貨的商品。",
669
673
  postPaymentError: "訂單已付款,請聯絡工作人員協助取貨。",
674
+ redemptionPartialDescription: "請聯絡工作人員處理未出貨的商品。",
675
+ redemptionCollectionError: "請聯絡工作人員協助取貨。",
670
676
  summary: "成功 {success} 件 · 未出貨 {failed} 件",
671
677
  returning: "{seconds} 秒後返回首頁",
672
678
  itemNumber: "第 {number} 件",
@@ -892,6 +898,8 @@ const translations = {
892
898
  partial: "スタッフの確認が必要です",
893
899
  partialDescription: "お支払いは完了しています。未排出の商品についてスタッフにお問い合わせください。",
894
900
  postPaymentError: "お支払いは完了しています。スタッフにお問い合わせください。",
901
+ redemptionPartialDescription: "未排出の商品についてスタッフにお問い合わせください。",
902
+ redemptionCollectionError: "スタッフにお問い合わせください。",
895
903
  summary: "排出済み {success} 点 · 未排出 {failed} 点",
896
904
  returning: "{seconds} 秒後にホームに戻ります",
897
905
  itemNumber: "商品 {number}",
@@ -1117,6 +1125,8 @@ const translations = {
1117
1125
  partial: "Alguns produtos precisam de atenção",
1118
1126
  partialDescription: "O pagamento foi concluído. Procure um funcionário para os produtos restantes.",
1119
1127
  postPaymentError: "Seu pedido está pago. Procure um funcionário para concluir a retirada.",
1128
+ redemptionPartialDescription: "Procure um funcionário para os produtos restantes.",
1129
+ redemptionCollectionError: "Procure um funcionário para concluir a retirada.",
1120
1130
  summary: "{success} entregues · {failed} não entregues",
1121
1131
  returning: "Voltando ao início em {seconds}s",
1122
1132
  itemNumber: "Item {number}",
package/es/index.js CHANGED
@@ -90,7 +90,6 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
90
90
  import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
91
91
  import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
92
92
  import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
93
- import "./plus/salesSdk/index.js";
94
93
  import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
95
94
  import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
96
95
  import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
@@ -152,7 +151,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
152
151
  import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
153
152
  import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
154
153
  import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
155
- import "./plus/pisellReservation/index.js";
156
154
  import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
157
155
  import cupProject_default from "./components/ecocup/cupProject/index.js";
158
156
  import CupList from "./components/ecocup/cupList/index.js";
@@ -280,4 +280,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
280
280
  });
281
281
  }
282
282
  //#endregion
283
- export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, findFirstVirtualCurrencyAsset, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getReservedVirtualSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
283
+ export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
259
259
  return rows;
260
260
  }
261
261
  //#endregion
262
- export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
262
+ export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
@@ -78,4 +78,4 @@ function toastFloorPlanLoadError(err) {
78
78
  PisellToast({ content: err instanceof Error ? err.message : String(err) });
79
79
  }
80
80
  //#endregion
81
- export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
81
+ export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
927
927
  ];
928
928
  }
929
929
  //#endregion
930
- export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
930
+ export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
@@ -13,7 +13,6 @@ import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
13
13
  import locales_default from "./locales.js";
14
14
  import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
15
15
  import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
16
- import "../salesSdk/index.js";
17
16
  import locales_default$1 from "./components/LineItem/locales.js";
18
17
  import { SaleOrderActionBoundary } from "./actions/index.js";
19
18
  import { SaleDetailTemplateRenderer } from "./tmpl/index.js";
@@ -1,7 +1,6 @@
1
1
  import useEngineContext from "../../../../../hooks/useEngineContext.js";
2
2
  import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
3
3
  import { useSalesSdkBookingContext } from "../../../../salesSdk/context/SalesSdkBookingContext.js";
4
- import "../../../../salesSdk/index.js";
5
4
  import { useMemo } from "react";
6
5
  import { useMemoizedFn } from "ahooks";
7
6
  //#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
@@ -4,7 +4,6 @@ import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.
4
4
  import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
5
5
  import useLogger from "../../../../hooks/useLogger.js";
6
6
  import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
7
- import "../../../salesSdk/index.js";
8
7
  import { invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales } from "./utils.js";
9
8
  import { getRemotePrintActions, getWristbandList } from "../../serve.js";
10
9
  import { EBizPrintType } from "./types.js";
@@ -10,7 +10,6 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
10
10
  import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
11
11
  import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
12
12
  import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
13
- import "../../../salesSdk/index.js";
14
13
  import { resolveSaleDetailTempOrder } from "../../utils.js";
15
14
  import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
16
15
  import { deriveSaleOrderSubmitState } from "../../actions/state.js";
@@ -5,7 +5,6 @@ import { isAppliedPaymentRecord } from "../../../salesSdk/utils/paymentStatus.js
5
5
  import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
6
6
  import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
7
7
  import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
8
- import "../../../salesSdk/index.js";
9
8
  import { resolveSaleDetailTempOrder } from "../../utils.js";
10
9
  import React, { memo, useMemo } from "react";
11
10
  import { formatAmount, locales } from "@pisell/utils";
@@ -5,7 +5,6 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
5
5
  import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
6
6
  import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
7
7
  import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
8
- import "../salesSdk/index.js";
9
8
  import Base_default from "./Base.js";
10
9
  import { resolveSaleDetailOsProps } from "./osProps.js";
11
10
  import React, { forwardRef, useImperativeHandle } from "react";
@@ -1,7 +1,6 @@
1
1
  import useStableInstanceId from "../../../../../../hooks/useStableInstanceId.js";
2
2
  import { useSalesSdkDish } from "../../../../../salesSdk/hooks/useSalesSdkDish.js";
3
3
  import { useCurrentSalesSdkDish } from "../../../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
4
- import "../../../../../salesSdk/index.js";
5
4
  import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
6
5
  import { DishGroupView } from "./DishGroupView.js";
7
6
  import dayjs from "dayjs";
@@ -1,7 +1,6 @@
1
1
  import useEngineContext from "../../../../hooks/useEngineContext.js";
2
2
  import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
3
3
  import { useCurrentSalesSdkDish } from "../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
4
- import "../../../salesSdk/index.js";
5
4
  import { getInternalNotesByScheduleEvent } from "../../serve.js";
6
5
  import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
7
6
  import { DetailActions } from "../../components/DetailActions/index.js";
@@ -407,4 +407,4 @@ function createAddProductWithFlowDebounced(deps) {
407
407
  };
408
408
  }
409
409
  //#endregion
410
- export { createAddProductWithFlowDebounced, shouldBypassAddProductDebounce };
410
+ export { createAddProductWithFlowDebounced };
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
31
31
  return typeof off === "function" ? off : () => {};
32
32
  }
33
33
  //#endregion
34
- export { BOOKING_CONTEXT_DATE_EVENT, formatBookingDateTime, subscribeBookingDateChange };
34
+ export { formatBookingDateTime, subscribeBookingDateChange };
@@ -102,4 +102,4 @@ function buildHolderListRequestKey(params) {
102
102
  });
103
103
  }
104
104
  //#endregion
105
- export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay, pickHolderIdFromBooking, resolveHolderDisplayConfig };
105
+ export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay, resolveHolderDisplayConfig };
@@ -0,0 +1 @@
1
+ export { };
@@ -14,4 +14,4 @@ interface AuthModalProps {
14
14
  */
15
15
  declare const AuthModal: React.FC<AuthModalProps>;
16
16
  //#endregion
17
- export { AuthModal };
17
+ export { AuthModal, AuthModalProps };
@@ -1,4 +1,4 @@
1
- import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
1
+ import { AuthMethodType, VerificationMethod } from "./shared/types.js";
2
2
  import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
3
3
  import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
4
- import { AuthModal } from "./AuthModal.js";
4
+ import { AuthModal, AuthModalProps } from "./AuthModal.js";
@@ -226,4 +226,4 @@ interface RegisterFormData {
226
226
  verification_token?: string;
227
227
  }
228
228
  //#endregion
229
- export { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
229
+ export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
@@ -61,11 +61,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, enableMultiCurrencySettlement = false
61
61
  const pisellos = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.pisellos;
62
62
  const isProductMergeDisabled = context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.utils) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.businessUtils) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.isProductMergeDisabled;
63
63
  const shouldMergeProductLines = (0, react.useMemo)(() => () => typeof isProductMergeDisabled !== "function" || !isProductMergeDisabled(), [isProductMergeDisabled]);
64
- const defaultProviderOsKey = [
65
- osKey,
66
- mode,
67
- businessCode
68
- ].filter(Boolean).join("-");
64
+ const defaultProviderOsKey = businessCode ? `bookingTicket-${osKey}-${businessCode}` : [osKey, mode].filter(Boolean).join("-");
69
65
  const providerOsKey = osModuleName || defaultProviderOsKey;
70
66
  const providerModuleName = providerOsKey;
71
67
  const { runtime } = require_useRuntime.useRuntime();
@@ -20,7 +20,7 @@ const statusIcons = {
20
20
  uncertain: "circle-alert"
21
21
  };
22
22
  const itemDisplayStatus = (item) => item.status === "failed" && item.uncertain ? "uncertain" : item.status;
23
- function DispensePage({ brand, sale, progress, error, stage, seconds, onHome }) {
23
+ function DispensePage({ brand, sale, isRedemption, progress, error, stage, seconds, onHome }) {
24
24
  var _items, _progress$inventorySy;
25
25
  const { text: t, localized } = require_locales.useVendingLocale();
26
26
  const contentRef = (0, react.useRef)(null);
@@ -34,6 +34,8 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
34
34
  const scrollTargetKey = (_items = items[currentIndex >= 0 ? currentIndex : processed - 1]) === null || _items === void 0 ? void 0 : _items.key;
35
35
  const currentNumber = currentIndex >= 0 ? currentIndex + 1 : Math.min(processed + 1, items.length);
36
36
  const complete = stage === "result";
37
+ const collectionErrorKey = isRedemption ? "redemptionCollectionError" : "postPaymentError";
38
+ const partialDescriptionKey = isRedemption ? "redemptionPartialDescription" : "partialDescription";
37
39
  const allSuccess = complete && !error && (progress === null || progress === void 0 ? void 0 : progress.status) === "complete" && items.length > 0 && success === items.length;
38
40
  (0, react.useLayoutEffect)(() => {
39
41
  const content = contentRef.current;
@@ -64,7 +66,7 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
64
66
  return /* @__PURE__ */ react.default.createElement("section", { className: "vm-dispense-screen" }, /* @__PURE__ */ react.default.createElement("header", { className: "vm-dispense-brand" }, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Brand, {
65
67
  name: brand,
66
68
  compact: true
67
- })), /* @__PURE__ */ react.default.createElement("div", { className: "vm-dispense-heading" }, /* @__PURE__ */ react.default.createElement("h1", null, t(complete ? allSuccess ? "complete" : "partial" : "dispensing")), /* @__PURE__ */ react.default.createElement("p", null, t(error ? "postPaymentError" : complete ? allSuccess ? "completeDescription" : "partialDescription" : "dispenseDescription", { brand }))), /* @__PURE__ */ react.default.createElement("div", {
69
+ })), /* @__PURE__ */ react.default.createElement("div", { className: "vm-dispense-heading" }, /* @__PURE__ */ react.default.createElement("h1", null, t(complete ? allSuccess ? "complete" : "partial" : "dispensing")), /* @__PURE__ */ react.default.createElement("p", null, t(error ? collectionErrorKey : complete ? allSuccess ? "completeDescription" : partialDescriptionKey : "dispenseDescription", { brand }))), /* @__PURE__ */ react.default.createElement("div", {
68
70
  className: "vm-dispense-content",
69
71
  ref: contentRef
70
72
  }, !!items.length ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("section", {
@@ -96,7 +98,7 @@ function DispensePage({ brand, sale, progress, error, stage, seconds, onHome })
96
98
  }, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Icon, { name: "loader-circle" }), t("preparing")) : null, complete && /* @__PURE__ */ react.default.createElement("div", {
97
99
  className: "vm-dispense-collection-note" + (allSuccess ? "" : " vm-dispense-attention"),
98
100
  role: allSuccess ? "note" : "alert"
99
- }, /* @__PURE__ */ react.default.createElement("span", { className: "vm-dispense-note-icon" }, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Icon, { name: allSuccess ? "hand" : "circle-alert" })), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("p", null, t(allSuccess ? "collectDescription" : "postPaymentError")), !allSuccess && !!items.length && /* @__PURE__ */ react.default.createElement("p", { className: "vm-dispense-summary" }, t(uncertain ? "summaryUncertain" : "summary", {
101
+ }, /* @__PURE__ */ react.default.createElement("span", { className: "vm-dispense-note-icon" }, /* @__PURE__ */ react.default.createElement(require_CustomerScreens.Icon, { name: allSuccess ? "hand" : "circle-alert" })), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("p", null, t(allSuccess ? "collectDescription" : collectionErrorKey)), !allSuccess && !!items.length && /* @__PURE__ */ react.default.createElement("p", { className: "vm-dispense-summary" }, t(uncertain ? "summaryUncertain" : "summary", {
100
102
  success,
101
103
  failed: items.length - success - uncertain,
102
104
  uncertain