@pisell/private-materials 6.12.169 → 6.12.170
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/HDLKiosk/components/common/HDLKioskSkuOptionsSelection/index.less +1 -1
- package/es/components/HDLKiosk/components/overlays/HDLKioskModal/index.less +1 -1
- package/es/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +4 -1
- package/es/components/HDLKiosk/docs/02-Host/351/200/202/351/205/215/344/270/216/344/270/232/345/212/241/346/225/260/346/215/256.md +20 -19
- package/es/components/HDLKiosk/index.js +10 -2
- package/es/components/HDLKiosk/index.less +7 -2
- package/es/components/HDLKiosk/slices/identity/Screen/index.less +1 -1
- package/es/components/HDLKiosk/slices/payment/Screen/index.less +1 -1
- package/es/components/HDLKiosk/ui/HDLKioskWorkflowView.js +26 -1
- package/es/components/HDLKiosk/ui/collaborationStatus.js +11 -0
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
- package/es/components/bigSale/components/TimeBar/index.js +0 -1
- package/es/components/bigSale/dialog.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
- package/es/components/bigSale/index.js +0 -1
- package/es/components/bigSale/templates/HDLKiosk/README.md +43 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/createHost.js +7 -7
- package/es/components/bigSale/templates/HDLKiosk/adapter/{devices.js → devices/devicePort.js} +10 -38
- package/es/components/bigSale/templates/HDLKiosk/adapter/{capabilities.js → host/capabilities.js} +1 -1
- package/es/components/bigSale/templates/HDLKiosk/adapter/{fulfillment.js → host/fulfillmentWriter.js} +3 -3
- package/es/components/bigSale/templates/HDLKiosk/adapter/{projection.js → host/projection.js} +3 -3
- package/es/components/bigSale/templates/HDLKiosk/adapter/{telemetry.js → host/telemetry.js} +1 -1
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/cart.js +187 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/catalog.js +160 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/{customizationProduct.js → sales/customizationProduct.js} +3 -3
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/fulfillment.js +31 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/identity.js +57 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/index.js +18 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/payment.js +123 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/session.js +71 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/weightedOperations.js +124 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/{weightedProduct.js → sales/weightedProduct.js} +2 -2
- package/es/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskAdapter.js +41 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +7 -7
- package/es/components/bigSale/templates/HDLKiosk/cart/useBigSaleHDLKioskCart.js +122 -0
- package/es/components/bigSale/templates/HDLKiosk/{adapter → hooks}/useHDLKioskEntryPreparationToast.js +2 -1
- package/es/components/bigSale/templates/HDLKiosk/index.js +40 -146
- package/es/components/bigSale/templates/HDLKiosk/{adapter/scaleTrigger.js → runtime/BigSaleScaleRuntimeOwner.js} +15 -59
- package/es/components/bigSale/templates/HDLKiosk/{adapter → runtime}/HDLKioskPaymentRuntime.js +2 -2
- package/es/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.js +44 -0
- package/es/components/bigSale/templates/Kiosk/index.js +0 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/index.js +0 -2
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/saleDetail/Base.js +0 -1
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
- package/es/plus/saleDetail/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/index.js +0 -1
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/customerAuthGate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +1 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/lib/components/HDLKiosk/components/common/HDLKioskSkuOptionsSelection/index.less +1 -1
- package/lib/components/HDLKiosk/components/overlays/HDLKioskModal/index.less +1 -1
- package/lib/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +4 -1
- package/lib/components/HDLKiosk/docs/02-Host/351/200/202/351/205/215/344/270/216/344/270/232/345/212/241/346/225/260/346/215/256.md +20 -19
- package/lib/components/HDLKiosk/index.js +10 -2
- package/lib/components/HDLKiosk/index.less +7 -2
- package/lib/components/HDLKiosk/slices/identity/Screen/index.less +1 -1
- package/lib/components/HDLKiosk/slices/payment/Screen/index.less +1 -1
- package/lib/components/HDLKiosk/ui/HDLKioskWorkflowView.js +26 -1
- package/lib/components/HDLKiosk/ui/collaborationStatus.js +11 -0
- package/lib/components/bigSale/templates/HDLKiosk/README.md +43 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/createHost.js +9 -9
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{devices.js → devices/devicePort.js} +10 -38
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{capabilities.js → host/capabilities.js} +1 -1
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{fulfillment.js → host/fulfillmentWriter.js} +3 -3
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{projection.js → host/projection.js} +4 -4
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{telemetry.js → host/telemetry.js} +1 -1
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/cart.js +189 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/catalog.js +162 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{customizationProduct.js → sales/customizationProduct.js} +4 -4
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/fulfillment.js +31 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/identity.js +57 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/index.js +18 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/payment.js +123 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/session.js +71 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/weightedOperations.js +126 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{weightedProduct.js → sales/weightedProduct.js} +3 -3
- package/lib/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskAdapter.js +42 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +7 -7
- package/lib/components/bigSale/templates/HDLKiosk/cart/useBigSaleHDLKioskCart.js +124 -0
- package/lib/components/bigSale/templates/HDLKiosk/{adapter → hooks}/useHDLKioskEntryPreparationToast.js +2 -1
- package/lib/components/bigSale/templates/HDLKiosk/index.js +41 -147
- package/lib/components/bigSale/templates/HDLKiosk/{adapter/scaleTrigger.js → runtime/BigSaleScaleRuntimeOwner.js} +14 -59
- package/lib/components/bigSale/templates/HDLKiosk/{adapter → runtime}/HDLKioskPaymentRuntime.js +2 -2
- package/lib/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.js +44 -0
- package/package.json +3 -3
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales.js +0 -710
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -52
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales.js +0 -712
|
@@ -56,7 +56,7 @@ function resolveHDLKioskBottomBarState(mode, screenOverlayActive = false) {
|
|
|
56
56
|
/**
|
|
57
57
|
* Shell 内唯一的底栏与购物车抽屉挂载点。
|
|
58
58
|
*/
|
|
59
|
-
function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverlayActions, promotionsAvailable = false }) {
|
|
59
|
+
function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverlayActions, promotionsAvailable = false, onCartOpenChange }) {
|
|
60
60
|
var _declaration$leading, _cartBarDeclaration$s;
|
|
61
61
|
const [active, setActive] = useState();
|
|
62
62
|
const [cartOpen, setCartOpen] = useState(false);
|
|
@@ -120,6 +120,9 @@ function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverl
|
|
|
120
120
|
useEffect(() => {
|
|
121
121
|
if (presentation.drawerBlocked || !drawerAvailable) setCartOpen(false);
|
|
122
122
|
}, [drawerAvailable, presentation.drawerBlocked]);
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
onCartOpenChange === null || onCartOpenChange === void 0 || onCartOpenChange(cartController.open);
|
|
125
|
+
}, [cartController.open, onCartOpenChange]);
|
|
123
126
|
return /* @__PURE__ */ React.createElement(HDLKioskBottomBarContext.Provider, { value: context }, /* @__PURE__ */ React.createElement(HDLKioskCartDrawerContext.Provider, { value: cartController }, children, presentation.renderBar && floatingBarDeclaration ? /* @__PURE__ */ React.createElement(HDLKioskFloatingBar, floatingBarDeclaration) : null));
|
|
124
127
|
}
|
|
125
128
|
//#endregion
|
|
@@ -55,20 +55,21 @@ Core 不能反向 import BigSale;Adapter 不能决定下一个 Workflow 节点
|
|
|
55
55
|
|
|
56
56
|
| 文件 | 具体职责 | 不应放入的逻辑 |
|
|
57
57
|
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------- |
|
|
58
|
-
| [`index.tsx`](../../bigSale/templates/HDLKiosk/index.tsx) | 合并 config、读取 Engine plugin
|
|
58
|
+
| [`index.tsx`](../../bigSale/templates/HDLKiosk/index.tsx) | 合并 config、读取 Engine plugin、挂载 Scale Owner、装配 Host 和 Core | Workflow 节点、购物车操作 |
|
|
59
59
|
| [`primaryWeightedProduct.ts`](../../bigSale/templates/HDLKiosk/primaryWeightedProduct.ts) | 从 catalog list 的首条 data variant 解析称重主商品 | 商品查询、隐式 fallback |
|
|
60
60
|
| [`types.ts`](../../bigSale/templates/HDLKiosk/types.ts) | 声明模板内部 `HDLKioskBigSaleHostBridge`,隔离尚未标准化的宿主窄能力 | BigSale 公共 Props、通用 SalesSDK 类型 |
|
|
61
61
|
| [`adapter/useBigSaleHDLKioskHost.ts`](../../bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.ts) | 用 ref 持有最新 Context/bridge/scan handle,稳定 Host 引用 | DTO 字段转换 |
|
|
62
62
|
| [`adapter/createHost.ts`](../../bigSale/templates/HDLKiosk/adapter/createHost.ts) | 组合 Sales/Device/Telemetry Port 和动态 capabilities | React 页面逻辑 |
|
|
63
|
-
| [`adapter/capabilities.ts`](../../bigSale/templates/HDLKiosk/adapter/capabilities.ts)
|
|
64
|
-
| [`adapter/projection.ts`](../../bigSale/templates/HDLKiosk/adapter/projection.ts)
|
|
65
|
-
| [`adapter/sales
|
|
66
|
-
| [`adapter/weightedProduct.ts`](../../bigSale/templates/HDLKiosk/adapter/weightedProduct.ts)
|
|
67
|
-
| [`adapter/customizationProduct.ts`](../../bigSale/templates/HDLKiosk/adapter/customizationProduct.ts)
|
|
68
|
-
| [`adapter/devices.ts`](../../bigSale/templates/HDLKiosk/adapter/devices.ts)
|
|
69
|
-
| [`
|
|
63
|
+
| [`adapter/host/capabilities.ts`](../../bigSale/templates/HDLKiosk/adapter/host/capabilities.ts) | 将当前真实方法/bridge 组合为能力位 | 猜测业务成功 |
|
|
64
|
+
| [`adapter/host/projection.ts`](../../bigSale/templates/HDLKiosk/adapter/host/projection.ts) | Cart/Customer/Summary/Payment 标准化、lineId、fingerprint | 发命令、主动修订单 |
|
|
65
|
+
| [`adapter/sales/`](../../bigSale/templates/HDLKiosk/adapter/sales) | 按能力实现 `HDLSalesPort` query/command,并在 `index.ts` 组合 | 决定 target Screen |
|
|
66
|
+
| [`adapter/sales/weightedProduct.ts`](../../bigSale/templates/HDLKiosk/adapter/sales/weightedProduct.ts) | 解析称重商品、单位价格换算、验证重量、生成 prepared product | 原生秤监听、页面状态 |
|
|
67
|
+
| [`adapter/sales/customizationProduct.ts`](../../bigSale/templates/HDLKiosk/adapter/sales/customizationProduct.ts) | 安全投影单选 options、验证 selection、合成 SKU/options payload | 通用商品详情 Flow |
|
|
68
|
+
| [`adapter/devices/devicePort.ts`](../../bigSale/templates/HDLKiosk/adapter/devices/devicePort.ts) | 扫码原始事件与 ScaleBridge 标准事件汇入 `HDLDevicePort` | 判断当前 Workflow 是否消费 |
|
|
69
|
+
| [`runtime/scaleBridge.ts`](../../bigSale/templates/HDLKiosk/runtime/scaleBridge.ts) | 统一 Scale Snapshot、owner 身份与标准设备事件流 | React Hook、称重商品价格计算 |
|
|
70
|
+
| [`runtime/BigSaleScaleRuntimeOwner.tsx`](../../bigSale/templates/HDLKiosk/runtime/BigSaleScaleRuntimeOwner.tsx) | 隔离 `useNativeScale`,校验实时帧并发布给 ScaleBridge | Workflow 跳转、购物车写入 |
|
|
70
71
|
| [`adapter/normalize.ts`](../../bigSale/templates/HDLKiosk/adapter/normalize.ts) | Host 错误与未知结果标准化、安全路径读取 | 业务重试策略 |
|
|
71
|
-
| [`adapter/telemetry.ts`](../../bigSale/templates/HDLKiosk/adapter/telemetry.ts)
|
|
72
|
+
| [`adapter/host/telemetry.ts`](../../bigSale/templates/HDLKiosk/adapter/host/telemetry.ts) | 当前 no-op Telemetry Port,保留正式 sink 接口 | `console` 散落埋点 |
|
|
72
73
|
|
|
73
74
|
兼容层还扩展了 SalesSDK Products Context:
|
|
74
75
|
|
|
@@ -84,12 +85,12 @@ Core 不能反向 import BigSale;Adapter 不能决定下一个 Workflow 节点
|
|
|
84
85
|
```mermaid
|
|
85
86
|
flowchart LR
|
|
86
87
|
CTX["BigSaleContext\nsales / products / cart / customer / summary"]
|
|
87
|
-
BRIDGE["Internal HDLKioskBigSaleHostBridge\
|
|
88
|
+
BRIDGE["Internal HDLKioskBigSaleHostBridge\nscale event source / member / fulfillment"]
|
|
88
89
|
PLUGIN["Engine nativeScaleTools"]
|
|
89
90
|
REF["Stable source refs\nlatest context / bridge / scan"]
|
|
90
91
|
PROJECTION["projection.ts\nObservedSalesSnapshot"]
|
|
91
92
|
SALES["sales.ts\nHDLSalesPort"]
|
|
92
|
-
DEVICE["
|
|
93
|
+
DEVICE["devicePort.ts + ScaleBridge + ScaleOwner\nHDLDevicePort / ScaleRuntime"]
|
|
93
94
|
CAP["capabilities.ts\ndynamic capability getter"]
|
|
94
95
|
HOST["Stable HDLKioskHost"]
|
|
95
96
|
CORE["Independent HDLKiosk Core"]
|
|
@@ -120,10 +121,10 @@ resolveHDLKioskBigSaleConfig
|
|
|
120
121
|
↓
|
|
121
122
|
读取 Engine nativeScaleTools plugin
|
|
122
123
|
↓
|
|
123
|
-
创建
|
|
124
|
+
创建 ScaleBridge(内部统一 ownerId + HDLScaleRuntime + device events)
|
|
124
125
|
↓
|
|
125
126
|
创建模板内部 internalBridge
|
|
126
|
-
└─
|
|
127
|
+
└─ subscribeScaleEvents 来自 ScaleBridge
|
|
127
128
|
↓
|
|
128
129
|
useBigSaleHDLKioskHost → stable HDLKioskHost
|
|
129
130
|
↓
|
|
@@ -338,25 +339,25 @@ acquireScanFocus(handler, { priority: 100, id: 'hdl-kiosk' })
|
|
|
338
339
|
`useNativeScale` 是 Hook,不能直接塞进普通 Adapter 函数。`BigSaleScaleRuntimeOwner` 常驻模板顶层:
|
|
339
340
|
|
|
340
341
|
- Hook `autoStart` 随物料 active;
|
|
341
|
-
- 发布完整
|
|
342
|
-
-
|
|
342
|
+
- 通过 `ScaleBridge` 发布完整 Snapshot 给 Core `HDLScaleRuntime`;
|
|
343
|
+
- 通过同一个 Bridge 发布连接状态和首次有效正重标准事件;
|
|
343
344
|
- 重量回落到阈值下后才允许下一次入口触发;
|
|
344
345
|
- Error Boundary 将 Hook 异常转成 scale error,不炸毁 HDLKiosk;
|
|
345
346
|
- ownerId 防止多个发布者同时写同一 Runtime。
|
|
346
347
|
|
|
347
|
-
内部 Bridge
|
|
348
|
+
内部 Host Bridge 只暴露一个 `subscribeScaleEvents` 标准事件源;详情连续读数直接读取同一 `ScaleBridge.runtime`。Capability 仍要求 `nativeScaleTools.useNativeScale`,不能把一个没有真实 Hook 来源的 Bridge 冒充完整称重能力。
|
|
348
349
|
|
|
349
350
|
## 13. 模板内部 Narrow Host Bridge
|
|
350
351
|
|
|
351
352
|
[`HDLKioskBigSaleHostBridge`](../../bigSale/templates/HDLKiosk/types.ts) 只承接尚未由 SalesSDK 标准化的能力。它有意声明在 `bigSale/templates/HDLKiosk` 内部,不从 `bigSale/types.ts` 导出,也不通过 `BigSaleProps → BigSaleBaseProps → BigSaleTemplateRendererProps` 透传。
|
|
352
353
|
|
|
353
|
-
|
|
354
|
+
当前装配提供 ScaleBridge 事件订阅和 Identity H5 认证客户读取;履约字段仍是模板适配层的待接能力描述,并不存在外部调用方:
|
|
354
355
|
|
|
355
356
|
| Bridge | 契约要求 |
|
|
356
357
|
| ---------------------------------- | ------------------------------------------- |
|
|
357
358
|
| `getAuthenticatedCustomer` | 按 customerId 读取模板内认证结果;只读,不在 UI 中写订单客户 |
|
|
358
359
|
| `writeFulfillment` | 真正写入堂食/外带订单事实,不能只改 UI 参数 |
|
|
359
|
-
| `
|
|
360
|
+
| `subscribeScaleEvents` | ScaleBridge 的标准入口事件;连续详情读数来自同一 Bridge Runtime |
|
|
360
361
|
|
|
361
362
|
Bridge 使用 getter/ref 消费最新实例。新增字段前先判断它是否应成为 SalesSDK 正式能力;不要把业务对象塞进通用 metadata。
|
|
362
363
|
|
|
@@ -433,7 +434,7 @@ Abort 的时机很重要:dispatch 前可 cancelled;dispatch 后再 abort 通
|
|
|
433
434
|
| 连续加购进入 checking | Core cart consistency + SalesSDK barrier | Host 屏障与 React pending 展示态是否混淆 |
|
|
434
435
|
| Catalog 加购时闪动 | Shell/Screen busy presentation | 是否全屏遮罩或全部卡片透明度变化,不先怀疑数据丢失 |
|
|
435
436
|
| Scale 入口 unavailable | plugin + capability + bridge gating | `useNativeScale`、prepared product、queryProducts 是否齐全 |
|
|
436
|
-
| Scale 有读数但不自动进入 | `
|
|
437
|
+
| Scale 有读数但不自动进入 | `ScaleBridge` + Core ScaleIngress | 阈值、connection、重复边沿、当前 session lock |
|
|
437
438
|
| 登录成功但金额不变 | identity Operation + Summary Projection | customer 是否写入、consistency/重报价是否完成 |
|
|
438
439
|
| Checkout 后 blocked | callback normalizer + Payment Projection | 是明确 failed 还是 unknown,禁止直接放行 |
|
|
439
440
|
| 刷新后存在旧订单或支付状态 | Host/OS 订单与支付处置 | 当前 OS payment/cart 事实与员工处置入口 |
|
|
@@ -31,7 +31,7 @@ function HDLKiosk(_ref) {
|
|
|
31
31
|
const localScaleRuntime = useMemo(createHDLScaleRuntime, []);
|
|
32
32
|
return /* @__PURE__ */ React.createElement(HDLScaleRuntimeProvider, { runtime: scaleRuntime !== null && scaleRuntime !== void 0 ? scaleRuntime : localScaleRuntime }, /* @__PURE__ */ React.createElement(HDLKioskContent, props));
|
|
33
33
|
}
|
|
34
|
-
function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = false, locale, onLocaleChange, onTechnicalSupportClick, renderIdentityAuth, renderCartContent, cartOverlayActions }) {
|
|
34
|
+
function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = false, locale, onLocaleChange, onCollaborationStatusChange, onTechnicalSupportClick, renderIdentityAuth, renderCartContent, cartOverlayActions }) {
|
|
35
35
|
const [activeLocale, setActiveLocale] = useState(locale || "en");
|
|
36
36
|
const [scaleSimulatorAuthOpen, setScaleSimulatorAuthOpen] = useState(false);
|
|
37
37
|
const sales = useHostSnapshot(host);
|
|
@@ -51,6 +51,13 @@ function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = f
|
|
|
51
51
|
config,
|
|
52
52
|
isActive
|
|
53
53
|
});
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (isActive && !session) onCollaborationStatusChange === null || onCollaborationStatusChange === void 0 || onCollaborationStatusChange("home");
|
|
56
|
+
}, [
|
|
57
|
+
isActive,
|
|
58
|
+
onCollaborationStatusChange,
|
|
59
|
+
session
|
|
60
|
+
]);
|
|
54
61
|
const { scaleConnectionState } = useHDLKioskDeviceController({
|
|
55
62
|
host,
|
|
56
63
|
isActive
|
|
@@ -73,7 +80,8 @@ function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = f
|
|
|
73
80
|
returnToEntry,
|
|
74
81
|
renderIdentityAuth,
|
|
75
82
|
renderCartContent,
|
|
76
|
-
cartOverlayActions
|
|
83
|
+
cartOverlayActions,
|
|
84
|
+
onCollaborationStatusChange
|
|
77
85
|
}) : /* @__PURE__ */ React.createElement("div", { className: "hdl-entry-shell" }, /* @__PURE__ */ React.createElement(EntryScreen, {
|
|
78
86
|
locale: activeLocale,
|
|
79
87
|
model: createEntryScreenModel(config, host.capabilities, scaleConnectionState, sales.hostStatus, entryDataPreparing),
|
|
@@ -64,9 +64,14 @@
|
|
|
64
64
|
outline-offset: 3px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
// 异步操作会短暂切换 disabled;禁用态只负责阻止交互,不改变视觉透明度,
|
|
68
|
+
// 避免按钮(尤其是右上角会员入口)在请求前后产生闪烁。
|
|
69
|
+
button:disabled,
|
|
70
|
+
input:disabled,
|
|
71
|
+
textarea:disabled {
|
|
68
72
|
cursor: not-allowed;
|
|
69
|
-
|
|
73
|
+
// 覆盖嵌入的 Login2/Register2 等旧物料自带的 disabled 透明度。
|
|
74
|
+
opacity: 1 !important;
|
|
70
75
|
}
|
|
71
76
|
}
|
|
72
77
|
|
|
@@ -13,6 +13,7 @@ import { BlockingNotice } from "../components/common/BlockingNotice/index.js";
|
|
|
13
13
|
import { createCartDrawerModel } from "../utils.js";
|
|
14
14
|
import { ScreenRenderer } from "./ScreenRenderer.js";
|
|
15
15
|
import { useWorkflowSnapshot } from "./snapshots.js";
|
|
16
|
+
import { resolveHDLKioskCollaborationStatus } from "./collaborationStatus.js";
|
|
16
17
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
17
18
|
import { locales } from "@pisell/utils";
|
|
18
19
|
//#region src/components/HDLKiosk/ui/HDLKioskWorkflowView.tsx
|
|
@@ -53,7 +54,7 @@ function HDLKioskWorkflowBlockingSurface({ snapshot, title, description, referen
|
|
|
53
54
|
* 它把运行时控制器投影为 Screen/Dialog 所需的 props;具体页面不直接接触
|
|
54
55
|
* Host、Workflow Actor 或会话计时器。
|
|
55
56
|
*/
|
|
56
|
-
function HDLKioskWorkflowView({ session, host, sales, config, isActive, returning, returnError, renderIdentityAuth, renderCartContent, cartOverlayActions, returnToEntry }) {
|
|
57
|
+
function HDLKioskWorkflowView({ session, host, sales, config, isActive, returning, returnError, renderIdentityAuth, renderCartContent, cartOverlayActions, onCollaborationStatusChange, returnToEntry }) {
|
|
57
58
|
var _session$definition$n2, _customer$error, _activeNode$presentat;
|
|
58
59
|
const snapshot = useWorkflowSnapshot(session.actor);
|
|
59
60
|
const navigationSequence = useRef(0);
|
|
@@ -65,6 +66,29 @@ function HDLKioskWorkflowView({ session, host, sales, config, isActive, returnin
|
|
|
65
66
|
});
|
|
66
67
|
const screenDataNode = (_session$definition$n2 = session.definition.nodes[snapshot.surface.pageStepId]) !== null && _session$definition$n2 !== void 0 ? _session$definition$n2 : activeNode;
|
|
67
68
|
const paymentSafeForReset = sales.payment.status === "idle" || sales.payment.status === "failed";
|
|
69
|
+
const screenCollaborationStatus = resolveHDLKioskCollaborationStatus(screenDataNode.surfaceId);
|
|
70
|
+
const currentCollaborationStatus = useRef("home");
|
|
71
|
+
const statusBeforeCartOpen = useRef("home");
|
|
72
|
+
const cartOpenRef = useRef(false);
|
|
73
|
+
const publishCollaborationStatus = useCallback((status) => {
|
|
74
|
+
if (isActive) onCollaborationStatusChange === null || onCollaborationStatusChange === void 0 || onCollaborationStatusChange(status);
|
|
75
|
+
}, [isActive, onCollaborationStatusChange]);
|
|
76
|
+
const handleCartOpenChange = useCallback((open) => {
|
|
77
|
+
if (open) {
|
|
78
|
+
if (!cartOpenRef.current) statusBeforeCartOpen.current = currentCollaborationStatus.current;
|
|
79
|
+
cartOpenRef.current = true;
|
|
80
|
+
publishCollaborationStatus("cart");
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (!cartOpenRef.current) return;
|
|
84
|
+
cartOpenRef.current = false;
|
|
85
|
+
publishCollaborationStatus(statusBeforeCartOpen.current);
|
|
86
|
+
}, [publishCollaborationStatus]);
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (!screenCollaborationStatus) return;
|
|
89
|
+
currentCollaborationStatus.current = screenCollaborationStatus;
|
|
90
|
+
if (!cartOpenRef.current) publishCollaborationStatus(screenCollaborationStatus);
|
|
91
|
+
}, [publishCollaborationStatus, screenCollaborationStatus]);
|
|
68
92
|
const { endOrderConfirmationOpen, resetSession, requestEndOrder, cancelEndOrder, confirmEndOrder } = useHDLKioskExitController({
|
|
69
93
|
session,
|
|
70
94
|
snapshot,
|
|
@@ -158,6 +182,7 @@ function HDLKioskWorkflowView({ session, host, sales, config, isActive, returnin
|
|
|
158
182
|
memberAction,
|
|
159
183
|
variant: screenDataNode.surfaceId === "identity" ? "identityGate" : "default"
|
|
160
184
|
}, /* @__PURE__ */ React.createElement(HDLKioskBottomBarHost, {
|
|
185
|
+
onCartOpenChange: handleCartOpenChange,
|
|
161
186
|
mode: ((_activeNode$presentat = activeNode.presentation) === null || _activeNode$presentat === void 0 ? void 0 : _activeNode$presentat.mode) === "modal" || endOrderConfirmationOpen || memberLoginOpen ? "masked" : "visible",
|
|
162
187
|
fallback: endOrderBottomBar,
|
|
163
188
|
cartOverlayActions,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/components/HDLKiosk/ui/collaborationStatus.ts
|
|
2
|
+
/** 把当前可见 Screen 映射为主屏协同预览状态;购物车由 Shell 临时覆盖。 */
|
|
3
|
+
function resolveHDLKioskCollaborationStatus(screenId) {
|
|
4
|
+
if (screenId === "entry") return "home";
|
|
5
|
+
if (screenId === "identity") return "identity";
|
|
6
|
+
if (screenId === "customization" || screenId === "catalog") return "selling";
|
|
7
|
+
if (screenId === "fulfillment") return "fulfillment";
|
|
8
|
+
if (screenId === "checkout") return "checkout";
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { resolveHDLKioskCollaborationStatus };
|
|
@@ -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
|
|
@@ -4,7 +4,6 @@ import withResponsive from "../../../../responsive/withResponsive.js";
|
|
|
4
4
|
import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
|
|
5
5
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
6
6
|
import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
7
|
-
import "../../../../plus/salesSdk/index.js";
|
|
8
7
|
import locales_default from "../../locales/index.js";
|
|
9
8
|
import dayjs from "dayjs";
|
|
10
9
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -5,7 +5,6 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
5
5
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
8
|
-
import "../../plus/salesSdk/index.js";
|
|
9
8
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
10
9
|
import BigSale from "./index.js";
|
|
11
10
|
import dayjs from "dayjs";
|
|
@@ -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 useEngineContext from "../../../hooks/useEngineContext.js";
|
|
|
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 { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
8
7
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
9
8
|
import { seedDineInReservationToCart } from "../../../plus/pisellReservation/utils/seedDineInReservationToCart.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 { ResponsiveBigSaleBase } from "./Base.js";
|
|
13
12
|
import { isBigSaleProductSelectionFlowScene, resolveBigSaleSelectionFlowConfig } from "./selectionFlowConfig.js";
|
|
14
13
|
import { isKioskPresentation } from "./templateCapabilities.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# BigSale HDLKiosk integration
|
|
2
|
+
|
|
3
|
+
This directory is the compatibility boundary between BigSale/SalesSDK and the
|
|
4
|
+
independent `components/HDLKiosk` material.
|
|
5
|
+
|
|
6
|
+
## Structure
|
|
7
|
+
|
|
8
|
+
- `index.tsx`: outer composition only; renders device owners, HDLKiosk and the
|
|
9
|
+
embedded payment runtime.
|
|
10
|
+
- `adapter/useBigSaleHDLKioskAdapter.ts`: owns late React capabilities and the
|
|
11
|
+
stable Host assembly (payment controller, authenticated customer, scale and
|
|
12
|
+
fulfillment).
|
|
13
|
+
- `adapter/useBigSaleHDLKioskHost.ts`: bridges changing React Context into one
|
|
14
|
+
stable Host and publishes semantic Projection changes.
|
|
15
|
+
- `adapter/createHost.ts`: pure Host composition factory.
|
|
16
|
+
- `adapter/host/`: pure Host support: capabilities, Projection, telemetry and
|
|
17
|
+
the fulfillment writer.
|
|
18
|
+
- `adapter/devices/`: raw BigSale device sources converted to HDLKiosk ports.
|
|
19
|
+
- `adapter/sales/index.ts`: composition-only Sales Port entry.
|
|
20
|
+
- `adapter/sales/`: capability modules for session, catalog, identity,
|
|
21
|
+
fulfillment, cart, weighted products and payment.
|
|
22
|
+
- `runtime/scaleBridge.ts`: owns one Scale Snapshot runtime and one standard
|
|
23
|
+
device-event stream.
|
|
24
|
+
- `runtime/BigSaleScaleRuntimeOwner.tsx`: the only React owner of the native
|
|
25
|
+
scale Hook; publishes exclusively through ScaleBridge.
|
|
26
|
+
- `runtime/HDLKioskPaymentRuntime.tsx`: React-owned payment runtime.
|
|
27
|
+
- `hooks/`: template-level React effects that are not Host adapters.
|
|
28
|
+
- `cart/`: SaleDetail-based cart overlay presentation.
|
|
29
|
+
- `auth/`: BigSale login/register integration.
|
|
30
|
+
|
|
31
|
+
## Boundary rules
|
|
32
|
+
|
|
33
|
+
1. Raw BigSale, SalesSDK and OS objects stop in this directory.
|
|
34
|
+
2. HDLKiosk Core receives only contracts from `components/HDLKiosk/app`.
|
|
35
|
+
3. Reads use Projection snapshots; writes use explicit Host operations.
|
|
36
|
+
4. A stable Host must pair `getSnapshot` with semantic `subscribe`
|
|
37
|
+
notifications. Updating a ref without publishing is not a valid store.
|
|
38
|
+
5. React-owned capabilities are assembled in `useBigSaleHDLKioskAdapter`; do
|
|
39
|
+
not add new controller refs to `index.tsx`.
|
|
40
|
+
6. Add capability-specific code to `adapter/sales/` rather than growing the
|
|
41
|
+
Sales Port composition file with unrelated concerns.
|
|
42
|
+
7. Keep tests beside their capability. Shared BigSale test data belongs in
|
|
43
|
+
`adapter/testing/`, not in a new aggregate adapter suite.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { resolveBigSaleHDLKioskCapabilities } from "./capabilities.js";
|
|
2
|
-
import { createBigSaleDevicePort } from "./devices.js";
|
|
3
|
-
import { createBigSaleProjectionReader } from "./projection.js";
|
|
4
|
-
import { createBigSaleSalesPort } from "./sales.js";
|
|
5
|
-
import { createBigSaleTelemetryPort } from "./telemetry.js";
|
|
1
|
+
import { resolveBigSaleHDLKioskCapabilities } from "./host/capabilities.js";
|
|
2
|
+
import { createBigSaleDevicePort } from "./devices/devicePort.js";
|
|
3
|
+
import { createBigSaleProjectionReader } from "./host/projection.js";
|
|
4
|
+
import { createBigSaleSalesPort } from "./sales/index.js";
|
|
5
|
+
import { createBigSaleTelemetryPort } from "./host/telemetry.js";
|
|
6
6
|
//#region src/components/bigSale/templates/HDLKiosk/adapter/createHost.ts
|
|
7
7
|
function createBigSaleHDLKioskHost({ getContext, executeScan, hasScanExecutionSource, devices, writeFulfillment, getWriteFulfillment, getAuthenticatedCustomer, allowSimulatedFulfillment, subscribeProjection, getPickupReferenceMode, getPaymentController }) {
|
|
8
|
-
const
|
|
8
|
+
const resolveScaleEventSource = () => (devices === null || devices === void 0 ? void 0 : devices.getSubscribeScaleEvents) ? devices.getSubscribeScaleEvents() : devices === null || devices === void 0 ? void 0 : devices.subscribeScaleEvents;
|
|
9
9
|
const getSnapshot = createBigSaleProjectionReader(getContext, getPickupReferenceMode);
|
|
10
10
|
const telemetry = createBigSaleTelemetryPort();
|
|
11
11
|
let compatibilityFallbackSequence = 0;
|
|
@@ -37,7 +37,7 @@ function createBigSaleHDLKioskHost({ getContext, executeScan, hasScanExecutionSo
|
|
|
37
37
|
telemetry,
|
|
38
38
|
get capabilities() {
|
|
39
39
|
return resolveBigSaleHDLKioskCapabilities(getContext(), {
|
|
40
|
-
hasScaleWeightChangeSource: typeof
|
|
40
|
+
hasScaleWeightChangeSource: typeof resolveScaleEventSource() === "function",
|
|
41
41
|
hasScanExecutionSource: (hasScanExecutionSource === null || hasScanExecutionSource === void 0 ? void 0 : hasScanExecutionSource()) === true
|
|
42
42
|
});
|
|
43
43
|
}
|
package/es/components/bigSale/templates/HDLKiosk/adapter/{devices.js → devices/devicePort.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/components/bigSale/templates/HDLKiosk/adapter/devices.ts
|
|
1
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/devices/devicePort.ts
|
|
2
2
|
const SCAN_RESULT_EVENT = "nativeScanResult";
|
|
3
3
|
const FALLBACK_DEDUPE_WINDOW_MS = 350;
|
|
4
4
|
function fingerprint(value) {
|
|
@@ -13,7 +13,7 @@ function fingerprint(value) {
|
|
|
13
13
|
* BigSale/PisellOS 原始扫码协议只停留在本文件。缺少宿主 eventId 时使用
|
|
14
14
|
* 非明文 fingerprint + 短窗口合成降级 ID;capability 会保持 stableEventId=false。
|
|
15
15
|
*/
|
|
16
|
-
function createBigSaleDevicePort({ getPubsub, getAcquireScanFocus,
|
|
16
|
+
function createBigSaleDevicePort({ getPubsub, getAcquireScanFocus, subscribeScaleEvents, getSubscribeScaleEvents, now = Date.now } = {}) {
|
|
17
17
|
const listeners = /* @__PURE__ */ new Map();
|
|
18
18
|
let stopScanner;
|
|
19
19
|
let stopScale;
|
|
@@ -82,44 +82,16 @@ function createBigSaleDevicePort({ getPubsub, getAcquireScanFocus, subscribeWeig
|
|
|
82
82
|
} catch (_unused5) {}
|
|
83
83
|
};
|
|
84
84
|
const connectScale = () => {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const cleanup = currentSubscribeWeightChange((payload) => {
|
|
91
|
-
var _payload$occurredAt, _payload$eventId;
|
|
92
|
-
const occurredAt = (_payload$occurredAt = payload.occurredAt) !== null && _payload$occurredAt !== void 0 ? _payload$occurredAt : now();
|
|
93
|
-
eventSequence += 1;
|
|
94
|
-
emit("scale", {
|
|
95
|
-
type: "weightChanged",
|
|
96
|
-
eventId: (_payload$eventId = payload.eventId) !== null && _payload$eventId !== void 0 ? _payload$eventId : `big-sale-scale:${occurredAt}:${eventSequence}`,
|
|
97
|
-
weight: payload.weight,
|
|
98
|
-
occurredAt
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
if (typeof cleanup === "function") cleanups.push(cleanup);
|
|
102
|
-
} catch (_unused6) {}
|
|
103
|
-
if (currentSubscribeScaleConnection) try {
|
|
104
|
-
const cleanup = currentSubscribeScaleConnection((payload) => {
|
|
105
|
-
var _payload$occurredAt2;
|
|
106
|
-
emit("scale", {
|
|
107
|
-
type: "connectionChanged",
|
|
108
|
-
device: "scale",
|
|
109
|
-
connected: payload.connected,
|
|
110
|
-
state: payload.state,
|
|
111
|
-
occurredAt: (_payload$occurredAt2 = payload.occurredAt) !== null && _payload$occurredAt2 !== void 0 ? _payload$occurredAt2 : now()
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
if (typeof cleanup === "function") cleanups.push(cleanup);
|
|
115
|
-
} catch (_unused7) {}
|
|
116
|
-
stopScale = () => {
|
|
117
|
-
cleanups.forEach((cleanup) => {
|
|
85
|
+
const currentSubscribe = getSubscribeScaleEvents ? getSubscribeScaleEvents() : subscribeScaleEvents;
|
|
86
|
+
if (stopScale || !currentSubscribe) return;
|
|
87
|
+
try {
|
|
88
|
+
const cleanup = currentSubscribe((event) => emit("scale", event));
|
|
89
|
+
stopScale = () => {
|
|
118
90
|
try {
|
|
119
91
|
cleanup();
|
|
120
|
-
} catch (
|
|
121
|
-
}
|
|
122
|
-
}
|
|
92
|
+
} catch (_unused6) {}
|
|
93
|
+
};
|
|
94
|
+
} catch (_unused7) {}
|
|
123
95
|
};
|
|
124
96
|
const syncConnections = () => {
|
|
125
97
|
const scannerNeeded = Array.from(listeners.values()).some((sources) => sources.has("scanner"));
|
package/es/components/bigSale/templates/HDLKiosk/adapter/{capabilities.js → host/capabilities.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/components/bigSale/templates/HDLKiosk/adapter/capabilities.ts
|
|
1
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/host/capabilities.ts
|
|
2
2
|
function resolveBigSaleHDLKioskCapabilities(context, options = {}) {
|
|
3
3
|
var _bookingTicket$store;
|
|
4
4
|
const bookingTicket = context.sales.bookingTicket;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _asyncToGenerator } from "
|
|
2
|
-
import { partialFailure, unknown } from "
|
|
3
|
-
//#region src/components/bigSale/templates/HDLKiosk/adapter/
|
|
1
|
+
import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
2
|
+
import { partialFailure, unknown } from "../normalize.js";
|
|
3
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/host/fulfillmentWriter.ts
|
|
4
4
|
function createHDLKioskFulfillmentWriter(runtime) {
|
|
5
5
|
if (typeof (runtime === null || runtime === void 0 ? void 0 : runtime.setPickupReferenceMode) !== "function" || typeof (runtime === null || runtime === void 0 ? void 0 : runtime.setServiceType) !== "function") return;
|
|
6
6
|
const setPickupReferenceMode = runtime.setPickupReferenceMode.bind(runtime);
|
package/es/components/bigSale/templates/HDLKiosk/adapter/{projection.js → host/projection.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _objectSpread2 } from "
|
|
2
|
-
import { hasSkuSelection, resolveSkuValueCandidates } from "
|
|
1
|
+
import { _objectSpread2 } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import { hasSkuSelection, resolveSkuValueCandidates } from "../../../../../../plus/skuOptionsSelection/utils/resolveSkuValue.js";
|
|
3
3
|
import Decimal from "decimal.js";
|
|
4
|
-
//#region src/components/bigSale/templates/HDLKiosk/adapter/projection.ts
|
|
4
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/host/projection.ts
|
|
5
5
|
/**
|
|
6
6
|
* 文件角色:把 BigSale/SalesSDK 当前状态投影成 HDLKiosk 只读业务快照。
|
|
7
7
|
* 运行机制:归一化订单行、称重数量、Summary、Customer、Payment 和 fingerprint,
|