@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.
Files changed (110) 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/HDLKiosk/components/common/HDLKioskSkuOptionsSelection/index.less +1 -1
  10. package/es/components/HDLKiosk/components/overlays/HDLKioskModal/index.less +1 -1
  11. package/es/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +4 -1
  12. 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
  13. package/es/components/HDLKiosk/index.js +10 -2
  14. package/es/components/HDLKiosk/index.less +7 -2
  15. package/es/components/HDLKiosk/slices/identity/Screen/index.less +1 -1
  16. package/es/components/HDLKiosk/slices/payment/Screen/index.less +1 -1
  17. package/es/components/HDLKiosk/ui/HDLKioskWorkflowView.js +26 -1
  18. package/es/components/HDLKiosk/ui/collaborationStatus.js +11 -0
  19. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
  20. package/es/components/bigSale/components/TimeBar/index.js +0 -1
  21. package/es/components/bigSale/dialog.js +0 -1
  22. package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
  23. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
  24. package/es/components/bigSale/index.js +0 -1
  25. package/es/components/bigSale/templates/HDLKiosk/README.md +43 -0
  26. package/es/components/bigSale/templates/HDLKiosk/adapter/createHost.js +7 -7
  27. package/es/components/bigSale/templates/HDLKiosk/adapter/{devices.js → devices/devicePort.js} +10 -38
  28. package/es/components/bigSale/templates/HDLKiosk/adapter/{capabilities.js → host/capabilities.js} +1 -1
  29. package/es/components/bigSale/templates/HDLKiosk/adapter/{fulfillment.js → host/fulfillmentWriter.js} +3 -3
  30. package/es/components/bigSale/templates/HDLKiosk/adapter/{projection.js → host/projection.js} +3 -3
  31. package/es/components/bigSale/templates/HDLKiosk/adapter/{telemetry.js → host/telemetry.js} +1 -1
  32. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/cart.js +187 -0
  33. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/catalog.js +160 -0
  34. package/es/components/bigSale/templates/HDLKiosk/adapter/{customizationProduct.js → sales/customizationProduct.js} +3 -3
  35. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/fulfillment.js +31 -0
  36. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/identity.js +57 -0
  37. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/index.js +18 -0
  38. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/payment.js +123 -0
  39. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/session.js +71 -0
  40. package/es/components/bigSale/templates/HDLKiosk/adapter/sales/weightedOperations.js +124 -0
  41. package/es/components/bigSale/templates/HDLKiosk/adapter/{weightedProduct.js → sales/weightedProduct.js} +2 -2
  42. package/es/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskAdapter.js +41 -0
  43. package/es/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +7 -7
  44. package/es/components/bigSale/templates/HDLKiosk/cart/useBigSaleHDLKioskCart.js +122 -0
  45. package/es/components/bigSale/templates/HDLKiosk/{adapter → hooks}/useHDLKioskEntryPreparationToast.js +2 -1
  46. package/es/components/bigSale/templates/HDLKiosk/index.js +40 -146
  47. package/es/components/bigSale/templates/HDLKiosk/{adapter/scaleTrigger.js → runtime/BigSaleScaleRuntimeOwner.js} +15 -59
  48. package/es/components/bigSale/templates/HDLKiosk/{adapter → runtime}/HDLKioskPaymentRuntime.js +2 -2
  49. package/es/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.js +44 -0
  50. package/es/components/bigSale/templates/Kiosk/index.js +0 -1
  51. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
  52. package/es/index.js +0 -2
  53. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  54. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  55. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  56. package/es/plus/saleDetail/Base.js +0 -1
  57. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
  58. package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
  59. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
  60. package/es/plus/saleDetail/index.js +0 -1
  61. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
  62. package/es/plus/saleDetail/tmpl/B/index.js +0 -1
  63. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  64. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  65. package/es/plus/salesSdk/utils/customerAuthGate.js +1 -1
  66. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  67. package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
  68. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  69. package/es/pro/Login2.0/index.d.ts +1 -2
  70. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  71. package/lib/components/HDLKiosk/components/common/HDLKioskSkuOptionsSelection/index.less +1 -1
  72. package/lib/components/HDLKiosk/components/overlays/HDLKioskModal/index.less +1 -1
  73. package/lib/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +4 -1
  74. 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
  75. package/lib/components/HDLKiosk/index.js +10 -2
  76. package/lib/components/HDLKiosk/index.less +7 -2
  77. package/lib/components/HDLKiosk/slices/identity/Screen/index.less +1 -1
  78. package/lib/components/HDLKiosk/slices/payment/Screen/index.less +1 -1
  79. package/lib/components/HDLKiosk/ui/HDLKioskWorkflowView.js +26 -1
  80. package/lib/components/HDLKiosk/ui/collaborationStatus.js +11 -0
  81. package/lib/components/bigSale/templates/HDLKiosk/README.md +43 -0
  82. package/lib/components/bigSale/templates/HDLKiosk/adapter/createHost.js +9 -9
  83. package/lib/components/bigSale/templates/HDLKiosk/adapter/{devices.js → devices/devicePort.js} +10 -38
  84. package/lib/components/bigSale/templates/HDLKiosk/adapter/{capabilities.js → host/capabilities.js} +1 -1
  85. package/lib/components/bigSale/templates/HDLKiosk/adapter/{fulfillment.js → host/fulfillmentWriter.js} +3 -3
  86. package/lib/components/bigSale/templates/HDLKiosk/adapter/{projection.js → host/projection.js} +4 -4
  87. package/lib/components/bigSale/templates/HDLKiosk/adapter/{telemetry.js → host/telemetry.js} +1 -1
  88. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/cart.js +189 -0
  89. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/catalog.js +162 -0
  90. package/lib/components/bigSale/templates/HDLKiosk/adapter/{customizationProduct.js → sales/customizationProduct.js} +4 -4
  91. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/fulfillment.js +31 -0
  92. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/identity.js +57 -0
  93. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/index.js +18 -0
  94. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/payment.js +123 -0
  95. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/session.js +71 -0
  96. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/weightedOperations.js +126 -0
  97. package/lib/components/bigSale/templates/HDLKiosk/adapter/{weightedProduct.js → sales/weightedProduct.js} +3 -3
  98. package/lib/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskAdapter.js +42 -0
  99. package/lib/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +7 -7
  100. package/lib/components/bigSale/templates/HDLKiosk/cart/useBigSaleHDLKioskCart.js +124 -0
  101. package/lib/components/bigSale/templates/HDLKiosk/{adapter → hooks}/useHDLKioskEntryPreparationToast.js +2 -1
  102. package/lib/components/bigSale/templates/HDLKiosk/index.js +41 -147
  103. package/lib/components/bigSale/templates/HDLKiosk/{adapter/scaleTrigger.js → runtime/BigSaleScaleRuntimeOwner.js} +14 -59
  104. package/lib/components/bigSale/templates/HDLKiosk/{adapter → runtime}/HDLKioskPaymentRuntime.js +2 -2
  105. package/lib/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.js +44 -0
  106. package/package.json +3 -3
  107. package/es/components/bigSale/templates/HDLKiosk/adapter/sales.js +0 -710
  108. package/es/plus/pisellReservation/index.js +0 -17
  109. package/es/plus/salesSdk/index.js +0 -52
  110. package/lib/components/bigSale/templates/HDLKiosk/adapter/sales.js +0 -712
@@ -1,51 +1,13 @@
1
1
  import { _defineProperty } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/defineProperty.js";
2
2
  import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
3
3
  import React, { Component, useCallback, useEffect, useRef, useState } from "react";
4
- //#region src/components/bigSale/templates/HDLKiosk/adapter/scaleTrigger.tsx
4
+ //#region src/components/bigSale/templates/HDLKiosk/runtime/BigSaleScaleRuntimeOwner.tsx
5
5
  /**
6
6
  * 文件角色:拥有 BigSale 的 useNativeScale Hook,并桥接到 HDLKiosk 全局 Scale Runtime。
7
- * 运行机制:顶层 owner 在整个物料生命周期持续监听真秤/Web 模拟器,将读数发布给 Runtime
8
- * 和入口 TriggerHub;Screen 只订阅共享快照。
7
+ * 运行机制:顶层 owner 在整个物料生命周期持续监听真秤/Web 模拟器,将读数统一发布给
8
+ * ScaleBridge;Screen 读取 Snapshot,入口消费离散设备事件。
9
9
  * 边界:不复用旧 Weighing UI,不在本文件决定进入流程或更新购物车。
10
10
  */
11
- function createScaleTriggerHub() {
12
- const weightListeners = /* @__PURE__ */ new Set();
13
- const connectionListeners = /* @__PURE__ */ new Set();
14
- const activityListeners = /* @__PURE__ */ new Set();
15
- let lastConnection;
16
- const notifyActivity = () => activityListeners.forEach((listener) => listener());
17
- return {
18
- subscribeWeightChange: (listener) => {
19
- weightListeners.add(listener);
20
- notifyActivity();
21
- return () => {
22
- weightListeners.delete(listener);
23
- notifyActivity();
24
- };
25
- },
26
- subscribeConnection: (listener) => {
27
- connectionListeners.add(listener);
28
- if (lastConnection) listener(lastConnection);
29
- notifyActivity();
30
- return () => {
31
- connectionListeners.delete(listener);
32
- notifyActivity();
33
- };
34
- },
35
- publishWeightChange: (payload) => weightListeners.forEach((listener) => listener(payload)),
36
- publishConnection: (payload) => {
37
- lastConnection = payload;
38
- connectionListeners.forEach((listener) => listener(payload));
39
- },
40
- hasSubscribers: () => weightListeners.size > 0 || connectionListeners.size > 0,
41
- subscribeActivity: (listener) => {
42
- activityListeners.add(listener);
43
- return () => {
44
- activityListeners.delete(listener);
45
- };
46
- }
47
- };
48
- }
49
11
  function inspectScaleEntrySnapshot(scale, minimumWeightKg) {
50
12
  var _ref, _scale$connectionStat, _scale$rawData;
51
13
  const nativeConnectionState = (_ref = (_scale$connectionStat = scale.connectionState) !== null && _scale$connectionStat !== void 0 ? _scale$connectionStat : (_scale$rawData = scale.rawData) === null || _scale$rawData === void 0 ? void 0 : _scale$rawData.connectionState) !== null && _ref !== void 0 ? _ref : null;
@@ -76,13 +38,13 @@ function BigSaleScaleRuntimeOwner(props) {
76
38
  var _props$nativeScaleToo;
77
39
  const useNativeScale = (_props$nativeScaleToo = props.nativeScaleTools) === null || _props$nativeScaleToo === void 0 ? void 0 : _props$nativeScaleToo.useNativeScale;
78
40
  if (!props.active || typeof useNativeScale !== "function") return null;
79
- return /* @__PURE__ */ React.createElement(MonitorBoundary, { onError: () => props.hub.publishConnection({
41
+ return /* @__PURE__ */ React.createElement(MonitorBoundary, { onError: () => props.bridge.publishConnection({
80
42
  connected: false,
81
43
  state: "error",
82
44
  occurredAt: Date.now()
83
45
  }) }, /* @__PURE__ */ React.createElement(ActiveScaleRuntimeOwner, _objectSpread2(_objectSpread2({}, props), {}, { useNativeScale })));
84
46
  }
85
- function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtime, useNativeScale }) {
47
+ function ActiveScaleRuntimeOwner({ active, bridge, minimumWeightKg, useNativeScale }) {
86
48
  const consumedReadingRef = useRef(false);
87
49
  const lastConnectionStateRef = useRef();
88
50
  const eventSequenceRef = useRef(0);
@@ -105,15 +67,11 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
105
67
  const inspection = inspectScaleEntrySnapshot(scale, minimumWeightKg);
106
68
  useEffect(() => {
107
69
  if (!active) return void 0;
108
- return runtime.activate(ownerId);
109
- }, [
110
- active,
111
- ownerId,
112
- runtime
113
- ]);
70
+ return bridge.runtime.activate(bridge.ownerId);
71
+ }, [active, bridge]);
114
72
  useEffect(() => {
115
73
  if (!active) return;
116
- runtime.publish(ownerId, {
74
+ bridge.runtime.publish(bridge.ownerId, {
117
75
  grossWeightKg: scale.grossWeight,
118
76
  status: scale.status,
119
77
  connectionState: scale.connectionState,
@@ -124,8 +82,7 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
124
82
  });
125
83
  }, [
126
84
  active,
127
- ownerId,
128
- runtime,
85
+ bridge,
129
86
  scale.connectionState,
130
87
  scale.error,
131
88
  scale.grossWeight,
@@ -142,7 +99,7 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
142
99
  const state = inspection.connectionState;
143
100
  if (lastConnectionStateRef.current !== state) {
144
101
  lastConnectionStateRef.current = state;
145
- hub.publishConnection({
102
+ bridge.publishConnection({
146
103
  connected: state === "connected",
147
104
  state,
148
105
  occurredAt: Date.now()
@@ -150,7 +107,7 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
150
107
  }
151
108
  }, [
152
109
  active,
153
- hub,
110
+ bridge,
154
111
  inspection.connectionState
155
112
  ]);
156
113
  useEffect(() => {
@@ -160,13 +117,13 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
160
117
  return;
161
118
  }
162
119
  if (consumedReadingRef.current) return;
163
- if (!runtime.getSnapshot().hasLiveSample) return;
120
+ if (!bridge.runtime.getSnapshot().hasLiveSample) return;
164
121
  const grossWeight = inspection.validGrossWeightKg;
165
122
  if (grossWeight === void 0) return;
166
123
  consumedReadingRef.current = true;
167
124
  eventSequenceRef.current += 1;
168
125
  const occurredAt = sample.receivedAt || Date.now();
169
- hub.publishWeightChange({
126
+ bridge.publishWeightChange({
170
127
  eventId: `native-scale-change:${occurredAt}:${eventSequenceRef.current}`,
171
128
  occurredAt,
172
129
  weight: {
@@ -178,14 +135,13 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
178
135
  });
179
136
  }, [
180
137
  active,
181
- hub,
138
+ bridge,
182
139
  inspection.belowTriggerThreshold,
183
140
  inspection.validGrossWeightKg,
184
- runtime,
185
141
  sample.receivedAt,
186
142
  scale.status
187
143
  ]);
188
144
  return null;
189
145
  }
190
146
  //#endregion
191
- export { BigSaleScaleRuntimeOwner, createScaleTriggerHub };
147
+ export { BigSaleScaleRuntimeOwner };
@@ -5,9 +5,9 @@ import { CHECKOUT_VISIBLE_PAYMENT_CODES, resolvePiPaymentProvider } from "../../
5
5
  import PaymentMethodRuntime_default from "../../../../checkout/paymentRuntime/PaymentMethodRuntime.js";
6
6
  import { completePendingEftposPayment, discardPendingEftposPayment, preparePendingEftposPayment } from "../../../../checkout/paymentRuntime/pendingEftposLifecycle.js";
7
7
  import { getCurrentDeviceNumber, reorderPaymentMethodList } from "../../../../checkout/utils.js";
8
- import { failed, unknown } from "./normalize.js";
8
+ import { failed, unknown } from "../adapter/normalize.js";
9
9
  import React, { useEffect, useMemo, useRef } from "react";
10
- //#region src/components/bigSale/templates/HDLKiosk/adapter/HDLKioskPaymentRuntime.tsx
10
+ //#region src/components/bigSale/templates/HDLKiosk/runtime/HDLKioskPaymentRuntime.tsx
11
11
  /**
12
12
  * BigSale 模板内的 Kiosk 支付桥。它持有需要 React/设备 UI 的 PaymentMethodRuntime,
13
13
  * 再把窄命令交给独立 HDLKiosk Host;Core 不感知 BigSale、PiPayment 或 window.app。
@@ -0,0 +1,44 @@
1
+ import { createHDLScaleRuntime } from "../../../../HDLKiosk/runtime/devices/scaleStore.js";
2
+ //#region src/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.ts
3
+ function createBigSaleScaleBridge({ now = Date.now } = {}) {
4
+ const listeners = /* @__PURE__ */ new Set();
5
+ const runtime = createHDLScaleRuntime();
6
+ const ownerId = `hdl-kiosk-scale-runtime:${now()}`;
7
+ let eventSequence = 0;
8
+ let lastConnection;
9
+ const emit = (event) => {
10
+ listeners.forEach((listener) => listener(event));
11
+ };
12
+ return Object.freeze({
13
+ ownerId,
14
+ runtime,
15
+ subscribeDeviceEvents: (listener) => {
16
+ listeners.add(listener);
17
+ if (lastConnection) listener(lastConnection);
18
+ return () => {
19
+ listeners.delete(listener);
20
+ };
21
+ },
22
+ publishWeightChange: ({ weight, eventId, occurredAt = now() }) => {
23
+ eventSequence += 1;
24
+ emit({
25
+ type: "weightChanged",
26
+ eventId: eventId !== null && eventId !== void 0 ? eventId : `big-sale-scale:${occurredAt}:${eventSequence}`,
27
+ weight,
28
+ occurredAt
29
+ });
30
+ },
31
+ publishConnection: ({ connected, state, occurredAt = now() }) => {
32
+ lastConnection = {
33
+ type: "connectionChanged",
34
+ device: "scale",
35
+ connected,
36
+ state,
37
+ occurredAt
38
+ };
39
+ emit(lastConnection);
40
+ }
41
+ });
42
+ }
43
+ //#endregion
44
+ export { createBigSaleScaleBridge };
@@ -6,7 +6,6 @@ import useSalesUserLogin, { isRequireLoginChannel } from "../../../../hooks/useS
6
6
  import { resolvePaymentResultToastV2ViewModel } from "../../../checkout/components/PaymentResultToastV2/resolve.js";
7
7
  import PaymentResultToastV2_default from "../../../checkout/components/PaymentResultToastV2/index.js";
8
8
  import { useSalesSdk } from "../../../../plus/salesSdk/hooks/useSalesSdk.js";
9
- import "../../../../plus/salesSdk/index.js";
10
9
  import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
11
10
  import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
12
11
  import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
@@ -2,7 +2,6 @@ import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/
2
2
  import useEngineContext from "../../hooks/useEngineContext.js";
3
3
  import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
4
4
  import { getTempOrderSyncPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
5
- import "../../plus/salesSdk/index.js";
6
5
  import { useEffect, useRef } from "react";
7
6
  import { useMemoizedFn } from "ahooks";
8
7
  //#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
package/es/index.js CHANGED
@@ -86,7 +86,6 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
86
86
  import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
87
87
  import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
88
88
  import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
89
- import "./plus/salesSdk/index.js";
90
89
  import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
91
90
  import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
92
91
  import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
@@ -139,7 +138,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
139
138
  import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
140
139
  import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
141
140
  import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
142
- import "./plus/pisellReservation/index.js";
143
141
  import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
144
142
  import cupProject_default from "./components/ecocup/cupProject/index.js";
145
143
  import CupList from "./components/ecocup/cupList/index.js";
@@ -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 };
@@ -11,7 +11,6 @@ import { useSalesSdkCart } from "../salesSdk/hooks/useSalesSdkCart.js";
11
11
  import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
12
12
  import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
13
13
  import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
14
- import "../salesSdk/index.js";
15
14
  import locales_default from "./locales.js";
16
15
  import locales_default$1 from "./components/LineItem/locales.js";
17
16
  import { SaleOrderActionBoundary } from "./actions/index.js";
@@ -1,7 +1,6 @@
1
1
  import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
2
2
  import useEngineContext from "../../../../../hooks/useEngineContext.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
@@ -9,7 +9,6 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
9
9
  import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
10
10
  import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
11
11
  import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
12
- import "../../../salesSdk/index.js";
13
12
  import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
14
13
  import { getRemotePrintActions, getWristbandList } from "../../serve.js";
15
14
  import { deriveSaleOrderSubmitState } from "../../actions/state.js";
@@ -3,7 +3,6 @@ import { resolvePaymentMethodName, usePaymentMethodNameMap } from "../../../pise
3
3
  import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
4
4
  import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
5
5
  import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
6
- import "../../../salesSdk/index.js";
7
6
  import React, { memo, useMemo } from "react";
8
7
  import { formatAmount, locales } from "@pisell/utils";
9
8
  import Decimal from "decimal.js";
@@ -4,7 +4,6 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
4
4
  import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
5
5
  import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
6
6
  import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
7
- import "../salesSdk/index.js";
8
7
  import Base_default from "./Base.js";
9
8
  import React, { forwardRef, useImperativeHandle } from "react";
10
9
  //#region src/plus/saleDetail/index.tsx
@@ -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 { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
2
2
  import useEngineContext from "../../../../hooks/useEngineContext.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";
@@ -342,4 +342,4 @@ function createAddProductWithFlowDebounced(deps) {
342
342
  };
343
343
  }
344
344
  //#endregion
345
- export { createAddProductWithFlowDebounced, shouldBypassAddProductDebounce };
345
+ 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 };
@@ -62,4 +62,4 @@ function normalizeCustomerAuthCustomer(value) {
62
62
  return null;
63
63
  }
64
64
  //#endregion
65
- export { isHolderRequiredProduct, isKioskRuntime, isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
65
+ export { isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
@@ -71,4 +71,4 @@ function buildHolderListRequestKey(params) {
71
71
  });
72
72
  }
73
73
  //#endregion
74
- export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, pickHolderIdFromBooking, resolveHolderDisplayConfig };
74
+ export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, 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,3 @@
1
- import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
2
1
  import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
3
2
  import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
4
- import { AuthModal } from "./AuthModal.js";
3
+ 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 };
@@ -6,7 +6,7 @@
6
6
  }
7
7
 
8
8
  .hdl-kiosk-sku-options.is-disabled {
9
- opacity: 0.62;
9
+ opacity: 1;
10
10
  }
11
11
 
12
12
  .hdl-kiosk-sku-options .pisell-batch-selector__content {
@@ -158,7 +158,7 @@
158
158
  .hdl-kiosk-dialog input:disabled,
159
159
  .hdl-kiosk-dialog textarea:disabled {
160
160
  cursor: not-allowed;
161
- opacity: 0.45;
161
+ opacity: 1;
162
162
  }
163
163
 
164
164
  .hdl-kiosk-dialog button:focus-visible,
@@ -58,7 +58,7 @@ function resolveHDLKioskBottomBarState(mode, screenOverlayActive = false) {
58
58
  /**
59
59
  * Shell 内唯一的底栏与购物车抽屉挂载点。
60
60
  */
61
- function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverlayActions, promotionsAvailable = false }) {
61
+ function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverlayActions, promotionsAvailable = false, onCartOpenChange }) {
62
62
  var _declaration$leading, _cartBarDeclaration$s;
63
63
  const [active, setActive] = (0, react.useState)();
64
64
  const [cartOpen, setCartOpen] = (0, react.useState)(false);
@@ -122,6 +122,9 @@ function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverl
122
122
  (0, react.useEffect)(() => {
123
123
  if (presentation.drawerBlocked || !drawerAvailable) setCartOpen(false);
124
124
  }, [drawerAvailable, presentation.drawerBlocked]);
125
+ (0, react.useEffect)(() => {
126
+ onCartOpenChange === null || onCartOpenChange === void 0 || onCartOpenChange(cartController.open);
127
+ }, [cartController.open, onCartOpenChange]);
125
128
  return /* @__PURE__ */ react.default.createElement(HDLKioskBottomBarContext.Provider, { value: context }, /* @__PURE__ */ react.default.createElement(HDLKioskCartDrawerContext.Provider, { value: cartController }, children, presentation.renderBar && floatingBarDeclaration ? /* @__PURE__ */ react.default.createElement(require_index.HDLKioskFloatingBar, floatingBarDeclaration) : null));
126
129
  }
127
130
  //#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、创建 Scale Hub/Runtime、装配 Host 和 Core | Workflow 节点、购物车操作 |
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) | 将当前真实方法/bridge 组合为能力位 | 猜测业务成功 |
64
- | [`adapter/projection.ts`](../../bigSale/templates/HDLKiosk/adapter/projection.ts) | Cart/Customer/Summary/Payment 标准化、lineId、fingerprint | 发命令、主动修订单 |
65
- | [`adapter/sales.ts`](../../bigSale/templates/HDLKiosk/adapter/sales.ts) | 实现全部 `HDLSalesPort` query/command,转换结果 | 决定 target Screen |
66
- | [`adapter/weightedProduct.ts`](../../bigSale/templates/HDLKiosk/adapter/weightedProduct.ts) | 解析称重商品、单位价格换算、验证重量、生成 prepared product | 原生秤监听、页面状态 |
67
- | [`adapter/customizationProduct.ts`](../../bigSale/templates/HDLKiosk/adapter/customizationProduct.ts) | 安全投影单选 options、验证 selection、合成 SKU/options payload | 通用商品详情 Flow |
68
- | [`adapter/devices.ts`](../../bigSale/templates/HDLKiosk/adapter/devices.ts) | 扫码/称重原始订阅转 `HDLDeviceEvent`,管理连接与释放 | 判断当前 Workflow 是否消费 |
69
- | [`adapter/scaleTrigger.tsx`](../../bigSale/templates/HDLKiosk/adapter/scaleTrigger.tsx) | 隔离 `useNativeScale`、入口触发边沿、连接状态、共享 Scale Runtime | 称重商品价格计算 |
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) | 当前 no-op Telemetry Port,保留正式 sink 接口 | `console` 散落埋点 |
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\ncurrent: scale hub subscriptions\nreserved: member / fulfillment"]
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["devices.ts + scaleTrigger.tsx\nHDLDevicePort / ScaleRuntime"]
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
- 创建 ScaleTriggerHub + HDLScaleRuntime
124
+ 创建 ScaleBridge(内部统一 ownerId + HDLScaleRuntime + device events)
124
125
  ↓
125
126
  创建模板内部 internalBridge
126
- └─ weight/connection 订阅来自 ScaleTriggerHub
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
- - 发布完整 Scale Snapshot 给 Core `HDLScaleRuntime`;
342
- - 发布连接状态和首次有效正重给 `ScaleTriggerHub`;
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 的 `subscribeWeightChange/subscribeScaleConnection` 只承接 ScaleTriggerHub 的入口事件;当前详情实时读数和 capability 仍要求 `nativeScaleTools.useNativeScale`,不能把一个只发入口事件的 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
- 当前装配提供称重 Hub 订阅和 Identity H5 认证客户读取;履约字段仍是模板适配层的待接能力描述,并不存在外部调用方:
354
+ 当前装配提供 ScaleBridge 事件订阅和 Identity H5 认证客户读取;履约字段仍是模板适配层的待接能力描述,并不存在外部调用方:
354
355
 
355
356
  | Bridge | 契约要求 |
356
357
  | ---------------------------------- | ------------------------------------------- |
357
358
  | `getAuthenticatedCustomer` | 按 customerId 读取模板内认证结果;只读,不在 UI 中写订单客户 |
358
359
  | `writeFulfillment` | 真正写入堂食/外带订单事实,不能只改 UI 参数 |
359
- | `subscribeWeightChange/Connection` | 可选入口触发覆盖,不替代详情 Scale Runtime |
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 有读数但不自动进入 | `scaleTrigger` + Core ScaleIngress | 阈值、connection、重复边沿、当前 session lock |
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 事实与员工处置入口 |
@@ -33,7 +33,7 @@ function HDLKiosk(_ref) {
33
33
  const localScaleRuntime = (0, react.useMemo)(require_scaleStore.createHDLScaleRuntime, []);
34
34
  return /* @__PURE__ */ react.default.createElement(require_scale.HDLScaleRuntimeProvider, { runtime: scaleRuntime !== null && scaleRuntime !== void 0 ? scaleRuntime : localScaleRuntime }, /* @__PURE__ */ react.default.createElement(HDLKioskContent, props));
35
35
  }
36
- function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = false, locale, onLocaleChange, onTechnicalSupportClick, renderIdentityAuth, renderCartContent, cartOverlayActions }) {
36
+ function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = false, locale, onLocaleChange, onCollaborationStatusChange, onTechnicalSupportClick, renderIdentityAuth, renderCartContent, cartOverlayActions }) {
37
37
  const [activeLocale, setActiveLocale] = (0, react.useState)(locale || "en");
38
38
  const [scaleSimulatorAuthOpen, setScaleSimulatorAuthOpen] = (0, react.useState)(false);
39
39
  const sales = require_snapshots.useHostSnapshot(host);
@@ -53,6 +53,13 @@ function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = f
53
53
  config,
54
54
  isActive
55
55
  });
56
+ (0, react.useEffect)(() => {
57
+ if (isActive && !session) onCollaborationStatusChange === null || onCollaborationStatusChange === void 0 || onCollaborationStatusChange("home");
58
+ }, [
59
+ isActive,
60
+ onCollaborationStatusChange,
61
+ session
62
+ ]);
56
63
  const { scaleConnectionState } = require_useHDLKioskDeviceController.useHDLKioskDeviceController({
57
64
  host,
58
65
  isActive
@@ -75,7 +82,8 @@ function HDLKioskContent({ host, config, isActive = true, entryDataPreparing = f
75
82
  returnToEntry,
76
83
  renderIdentityAuth,
77
84
  renderCartContent,
78
- cartOverlayActions
85
+ cartOverlayActions,
86
+ onCollaborationStatusChange
79
87
  }) : /* @__PURE__ */ react.default.createElement("div", { className: "hdl-entry-shell" }, /* @__PURE__ */ react.default.createElement(require_index$1.EntryScreen, {
80
88
  locale: activeLocale,
81
89
  model: require_model.createEntryScreenModel(config, host.capabilities, scaleConnectionState, sales.hostStatus, entryDataPreparing),
@@ -64,9 +64,14 @@
64
64
  outline-offset: 3px;
65
65
  }
66
66
 
67
- button:disabled {
67
+ // 异步操作会短暂切换 disabled;禁用态只负责阻止交互,不改变视觉透明度,
68
+ // 避免按钮(尤其是右上角会员入口)在请求前后产生闪烁。
69
+ button:disabled,
70
+ input:disabled,
71
+ textarea:disabled {
68
72
  cursor: not-allowed;
69
- opacity: 0.45;
73
+ // 覆盖嵌入的 Login2/Register2 等旧物料自带的 disabled 透明度。
74
+ opacity: 1 !important;
70
75
  }
71
76
  }
72
77
 
@@ -131,7 +131,7 @@
131
131
 
132
132
  .hdl-identity-auth-panel[aria-busy='true'] {
133
133
  pointer-events: none;
134
- opacity: 0.72;
134
+ opacity: 1;
135
135
  }
136
136
 
137
137
  .hdl-identity-auth-panel--disabled {
@@ -114,7 +114,7 @@
114
114
  .hdl-content-restart-order-button:disabled,
115
115
  .hdl-payment-method:disabled,
116
116
  .hdl-checkout-screen .hdl-floating-bar__button:disabled {
117
- opacity: 0.48;
117
+ opacity: 1;
118
118
  cursor: not-allowed;
119
119
  transform: none;
120
120
  }