@pisell/private-materials 6.12.166 → 6.12.167

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 (144) 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 +11 -11
  6. package/build/lowcode/view.js +11 -11
  7. package/es/components/HDLKiosk/app/ScreenRenderer.js +1 -1
  8. package/es/components/HDLKiosk/app/views.js +2 -1
  9. package/es/components/HDLKiosk/app/workflow/barcode.js +15 -32
  10. package/es/components/HDLKiosk/app/workflow/{guards.js → predicates.js} +9 -9
  11. package/es/components/HDLKiosk/app/workflow/quick.js +3 -6
  12. package/es/components/HDLKiosk/app/workflow/registry.js +1 -1
  13. package/es/components/HDLKiosk/app/workflow/scale.js +3 -12
  14. package/es/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +12 -10
  15. package/es/components/HDLKiosk/components/shell/HDLKioskShell/index.js +1 -0
  16. package/es/components/HDLKiosk/docs/00-/346/226/207/344/273/266/345/257/274/350/210/252.md +7 -7
  17. package/es/components/HDLKiosk/docs/01-/346/240/270/345/277/203/350/277/220/350/241/214/346/234/272/345/210/266.md +46 -37
  18. package/es/components/HDLKiosk/docs/03-/344/270/232/345/212/241/346/265/201/347/250/213/344/270/216/344/272/244/344/272/222/350/247/204/345/210/231.md +2 -2
  19. package/es/components/HDLKiosk/docs/05-/344/272/244/346/230/223/345/256/211/345/205/250.md +1 -1
  20. package/es/components/HDLKiosk/docs/07-/345/220/216/347/273/255/345/267/245/344/275/234.md +1 -1
  21. package/es/components/HDLKiosk/docs/README.md +2 -2
  22. package/es/components/HDLKiosk/docs//345/256/236/346/226/275/350/277/233/345/272/246.md +3 -3
  23. package/es/components/HDLKiosk/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +11 -11
  24. package/es/components/HDLKiosk/index.js +0 -1
  25. package/es/components/HDLKiosk/kernel/README.md +8 -9
  26. package/es/components/HDLKiosk/kernel/application/defineApplication.js +18 -19
  27. package/es/components/HDLKiosk/kernel/application/defineSlice.js +8 -13
  28. package/es/components/HDLKiosk/kernel/workflow/actor.js +88 -28
  29. package/es/components/HDLKiosk/kernel/workflow/compiler.js +28 -29
  30. package/es/components/HDLKiosk/kernel/workflow/selectors.js +9 -0
  31. package/es/components/HDLKiosk/runtime/HDLKioskWorkflowView.js +8 -7
  32. package/es/components/HDLKiosk/runtime/controllers/useHDLKioskCustomerController.js +1 -1
  33. package/es/components/HDLKiosk/runtime/createWorkflowSession.js +3 -3
  34. package/es/components/HDLKiosk/runtime/domainTransitionRunner.js +9 -9
  35. package/es/components/HDLKiosk/runtime/workflowEvent.js +9 -4
  36. package/es/components/HDLKiosk/runtime/workflowLifecycle.js +3 -3
  37. package/es/components/HDLKiosk/slices/catalog/PrimaryProductPromptDialog/index.js +1 -2
  38. package/es/components/HDLKiosk/slices/catalog/Screen/index.js +11 -38
  39. package/es/components/HDLKiosk/slices/catalog/Screen/model.js +1 -5
  40. package/es/components/HDLKiosk/slices/catalog/slice.js +4 -16
  41. package/es/components/HDLKiosk/slices/catalog/view.js +4 -6
  42. package/es/components/HDLKiosk/slices/customization/Screen/index.js +7 -9
  43. package/es/components/HDLKiosk/slices/customization/operation.js +23 -4
  44. package/es/components/HDLKiosk/slices/customization/slice.js +5 -9
  45. package/es/components/HDLKiosk/slices/customization/view.js +3 -2
  46. package/es/components/HDLKiosk/slices/fulfillment/Screen/index.js +6 -6
  47. package/es/components/HDLKiosk/slices/fulfillment/slice.js +5 -8
  48. package/es/components/HDLKiosk/slices/identity/Screen/index.js +18 -12
  49. package/es/components/HDLKiosk/slices/identity/slice.js +4 -11
  50. package/es/components/HDLKiosk/slices/index.js +3 -2
  51. package/es/components/HDLKiosk/slices/payment/Screen/index.js +5 -5
  52. package/es/components/HDLKiosk/slices/payment/slice.js +7 -8
  53. package/es/components/HDLKiosk/slices/primaryProductPrompt/slice.js +14 -0
  54. package/es/components/HDLKiosk/slices/primaryProductPrompt/view.js +23 -0
  55. package/es/components/HDLKiosk/utils.js +3 -2
  56. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
  57. package/es/components/bigSale/components/TimeBar/index.js +1 -0
  58. package/es/components/bigSale/dialog.js +1 -0
  59. package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
  60. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
  61. package/es/components/bigSale/index.js +1 -0
  62. package/es/components/bigSale/templates/HDLKiosk/auth/HDLKioskIdentityAuthPanel.js +17 -2
  63. package/es/components/bigSale/templates/Kiosk/index.js +1 -0
  64. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
  65. package/es/index.js +2 -0
  66. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  67. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  68. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  69. package/es/plus/pisellReservation/index.js +17 -0
  70. package/es/plus/saleDetail/Base.js +1 -0
  71. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
  72. package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
  73. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
  74. package/es/plus/saleDetail/index.js +1 -0
  75. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
  76. package/es/plus/saleDetail/tmpl/B/index.js +1 -0
  77. package/es/plus/salesSdk/index.js +52 -0
  78. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  79. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  80. package/es/plus/salesSdk/utils/customerAuthGate.js +1 -1
  81. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  82. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  83. package/es/pro/Login2.0/Login2.d.ts +2 -0
  84. package/es/pro/Login2.0/Login2.js +9 -1
  85. package/es/pro/Login2.0/Register2.d.ts +2 -0
  86. package/es/pro/Login2.0/Register2.js +9 -1
  87. package/es/pro/Login2.0/index.d.ts +2 -1
  88. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  89. package/lib/components/HDLKiosk/app/ScreenRenderer.js +1 -1
  90. package/lib/components/HDLKiosk/app/views.js +2 -1
  91. package/lib/components/HDLKiosk/app/workflow/barcode.js +14 -31
  92. package/lib/components/HDLKiosk/app/workflow/{guards.js → predicates.js} +9 -9
  93. package/lib/components/HDLKiosk/app/workflow/quick.js +3 -6
  94. package/lib/components/HDLKiosk/app/workflow/registry.js +1 -1
  95. package/lib/components/HDLKiosk/app/workflow/scale.js +3 -12
  96. package/lib/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +12 -10
  97. package/lib/components/HDLKiosk/components/shell/HDLKioskShell/index.js +1 -0
  98. package/lib/components/HDLKiosk/docs/00-/346/226/207/344/273/266/345/257/274/350/210/252.md +7 -7
  99. package/lib/components/HDLKiosk/docs/01-/346/240/270/345/277/203/350/277/220/350/241/214/346/234/272/345/210/266.md +46 -37
  100. package/lib/components/HDLKiosk/docs/03-/344/270/232/345/212/241/346/265/201/347/250/213/344/270/216/344/272/244/344/272/222/350/247/204/345/210/231.md +2 -2
  101. package/lib/components/HDLKiosk/docs/05-/344/272/244/346/230/223/345/256/211/345/205/250.md +1 -1
  102. package/lib/components/HDLKiosk/docs/07-/345/220/216/347/273/255/345/267/245/344/275/234.md +1 -1
  103. package/lib/components/HDLKiosk/docs/README.md +2 -2
  104. package/lib/components/HDLKiosk/docs//345/256/236/346/226/275/350/277/233/345/272/246.md +3 -3
  105. package/lib/components/HDLKiosk/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +11 -11
  106. package/lib/components/HDLKiosk/index.js +0 -1
  107. package/lib/components/HDLKiosk/kernel/README.md +8 -9
  108. package/lib/components/HDLKiosk/kernel/application/defineApplication.js +18 -19
  109. package/lib/components/HDLKiosk/kernel/application/defineSlice.js +8 -14
  110. package/lib/components/HDLKiosk/kernel/workflow/actor.js +88 -28
  111. package/lib/components/HDLKiosk/kernel/workflow/compiler.js +28 -29
  112. package/lib/components/HDLKiosk/kernel/workflow/selectors.js +10 -0
  113. package/lib/components/HDLKiosk/runtime/HDLKioskWorkflowView.js +8 -7
  114. package/lib/components/HDLKiosk/runtime/controllers/useHDLKioskCustomerController.js +1 -1
  115. package/lib/components/HDLKiosk/runtime/createWorkflowSession.js +3 -3
  116. package/lib/components/HDLKiosk/runtime/domainTransitionRunner.js +9 -9
  117. package/lib/components/HDLKiosk/runtime/workflowEvent.js +9 -4
  118. package/lib/components/HDLKiosk/runtime/workflowLifecycle.js +3 -3
  119. package/lib/components/HDLKiosk/slices/catalog/PrimaryProductPromptDialog/index.js +1 -2
  120. package/lib/components/HDLKiosk/slices/catalog/Screen/index.js +13 -40
  121. package/lib/components/HDLKiosk/slices/catalog/Screen/model.js +0 -5
  122. package/lib/components/HDLKiosk/slices/catalog/slice.js +2 -15
  123. package/lib/components/HDLKiosk/slices/catalog/view.js +4 -6
  124. package/lib/components/HDLKiosk/slices/customization/Screen/index.js +7 -9
  125. package/lib/components/HDLKiosk/slices/customization/operation.js +23 -3
  126. package/lib/components/HDLKiosk/slices/customization/slice.js +3 -7
  127. package/lib/components/HDLKiosk/slices/customization/view.js +3 -2
  128. package/lib/components/HDLKiosk/slices/fulfillment/Screen/index.js +6 -6
  129. package/lib/components/HDLKiosk/slices/fulfillment/slice.js +4 -7
  130. package/lib/components/HDLKiosk/slices/identity/Screen/index.js +17 -11
  131. package/lib/components/HDLKiosk/slices/identity/slice.js +4 -11
  132. package/lib/components/HDLKiosk/slices/index.js +2 -1
  133. package/lib/components/HDLKiosk/slices/payment/Screen/index.js +5 -5
  134. package/lib/components/HDLKiosk/slices/payment/slice.js +6 -7
  135. package/lib/components/HDLKiosk/slices/primaryProductPrompt/slice.js +14 -0
  136. package/lib/components/HDLKiosk/slices/primaryProductPrompt/view.js +25 -0
  137. package/lib/components/HDLKiosk/utils.js +3 -2
  138. package/lib/components/bigSale/templates/HDLKiosk/auth/HDLKioskIdentityAuthPanel.js +16 -1
  139. package/lib/pro/Login2.0/Login2.d.ts +2 -0
  140. package/lib/pro/Login2.0/Login2.js +9 -1
  141. package/lib/pro/Login2.0/Register2.d.ts +2 -0
  142. package/lib/pro/Login2.0/Register2.js +9 -1
  143. package/package.json +3 -3
  144. package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
@@ -4,8 +4,7 @@ const require_index = require("../../../../../plus/productSelect/ProductCard/ind
4
4
  const require_List = require("../../../../list/List.js");
5
5
  const require_index$1 = require("../../../../bigSale/components/KioskCategorySidebar/index.js");
6
6
  const require_index$2 = require("../../../components/shell/HDLKioskBottomBarHost/index.js");
7
- const require_index$3 = require("../PrimaryProductPromptDialog/index.js");
8
- const require_index$4 = require("../../../components/shell/HDLKioskOrderSummary/index.js");
7
+ const require_index$3 = require("../../../components/shell/HDLKioskOrderSummary/index.js");
9
8
  const require_kioskCatalog = require("../../../../../plus/productSelect/ProductCard/presets/kioskCatalog.js");
10
9
  const require_model = require("./model.js");
11
10
  let react = require("react");
@@ -15,7 +14,7 @@ let _pisell_utils = require("@pisell/utils");
15
14
  /**
16
15
  * 文件角色:呈现 retail 风格补充商品目录、分类、搜索和加购反馈。
17
16
  * 运行机制:只消费已由 Host 筛选/报价的 Catalog Projection;加购走 Screen Command,
18
- * Back/Checkout 产生 Activity Outcome,购物车开合仅为局部 UI。
17
+ * Checkout 产生 Activity Intent,Back 产生 Navigation,购物车开合仅为局部 UI。
19
18
  * 边界:不调用 loadCatalog/queryProducts,不本地追加订单行,也不计算促销价。
20
19
  */
21
20
  /**
@@ -74,14 +73,13 @@ function PlusIcon() {
74
73
  "aria-hidden": "true"
75
74
  }, /* @__PURE__ */ react.default.createElement("path", { d: "M12 5v14M5 12h14" }));
76
75
  }
77
- function CatalogScreen({ products, loading, errorReference, errorMessage, busy, canReview, canGoBack, promptForPrimaryProduct = false, primaryAction = "checkout", orderBar, send }) {
76
+ function CatalogScreen({ products, loading, errorReference, errorMessage, busy, canReview, canGoBack, orderBar, send }) {
78
77
  var _categoryById$get;
79
78
  const categories = (0, react.useMemo)(() => require_model.createHDLCatalogCategories(products, _pisell_utils.locales.getText("pisell2.hdl-kiosk.catalog-other")), [_pisell_utils.locales.getText("pisell2.hdl-kiosk.catalog-other"), products]);
80
79
  const categoryMenuDataSource = (0, react.useMemo)(() => createCatalogCategoryMenuDataSource(categories), [categories]);
81
80
  const [activeCategoryPath, setActiveCategoryPath] = (0, react.useState)([]);
82
81
  const [query, setQuery] = (0, react.useState)("");
83
82
  const [sidebarSearchOpen, setSidebarSearchOpen] = (0, react.useState)(false);
84
- const [primaryProductPromptOpen, setPrimaryProductPromptOpen] = (0, react.useState)(false);
85
83
  const catalogMainRef = (0, react.useRef)(null);
86
84
  const categoryPathBeforeSearchRef = (0, react.useRef)([]);
87
85
  const categoryById = (0, react.useMemo)(() => indexCatalogCategories(categories), [categories]);
@@ -109,38 +107,31 @@ function CatalogScreen({ products, loading, errorReference, errorMessage, busy,
109
107
  const productListItems = (0, react.useMemo)(() => visibleProducts.map(createCatalogProductListItem), [visibleProducts]);
110
108
  const title = normalizedQuery ? _pisell_utils.locales.getText("pisell2.hdl-kiosk.catalog-search-results") : (activeCategory === null || activeCategory === void 0 ? void 0 : activeCategory.name) || _pisell_utils.locales.getText("pisell2.hdl-kiosk.catalog-title");
111
109
  const completeCatalog = (0, react.useCallback)(() => {
112
- if (!busy && canReview) {
113
- if (promptForPrimaryProduct) {
114
- setPrimaryProductPromptOpen(true);
115
- return;
116
- }
117
- send({
118
- kind: "outcome",
119
- outcome: "completed"
120
- });
121
- }
110
+ if (!busy && canReview) send({
111
+ kind: "intent",
112
+ intent: "complete"
113
+ });
122
114
  }, [
123
115
  busy,
124
116
  canReview,
125
- promptForPrimaryProduct,
126
117
  send
127
118
  ]);
128
- const primaryActionLabel = primaryAction === "checkout" ? _pisell_utils.locales.getText("pisell2.hdl-kiosk.checkout") : _pisell_utils.locales.getText("pisell2.hdl-kiosk.cart-drawer-next");
119
+ const primaryActionLabel = _pisell_utils.locales.getText("pisell2.hdl-kiosk.checkout");
129
120
  const { openCart } = require_index$2.useHDLKioskBottomBarController();
130
121
  require_index$2.useHDLKioskBottomBar((0, react.useMemo)(() => ({
131
122
  ariaLabel: _pisell_utils.locales.getText("pisell2.hdl-kiosk.catalog-actions-label"),
132
123
  cartEnabled: canReview,
133
- overlayActive: primaryProductPromptOpen || sidebarSearchOpen,
124
+ overlayActive: sidebarSearchOpen,
134
125
  leading: canGoBack ? /* @__PURE__ */ react.default.createElement("button", {
135
126
  type: "button",
136
127
  className: "hdl-floating-bar__button",
137
128
  disabled: busy,
138
129
  onClick: () => send({
139
- kind: "outcome",
140
- outcome: "back"
130
+ kind: "navigation",
131
+ direction: "back"
141
132
  })
142
133
  }, /* @__PURE__ */ react.default.createElement(BackIcon, null), /* @__PURE__ */ react.default.createElement("span", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.back"))) : void 0,
143
- summary: /* @__PURE__ */ react.default.createElement(require_index$4.HDLKioskOrderSummary, {
134
+ summary: /* @__PURE__ */ react.default.createElement(require_index$3.HDLKioskOrderSummary, {
144
135
  lineCount: orderBar.cartLineCount,
145
136
  totalText: orderBar.totalText,
146
137
  detailText: orderBar.totalText ? _pisell_utils.locales.getText("pisell2.hdl-kiosk.catalog-cart-hint") : orderBar.totalLabel,
@@ -178,10 +169,8 @@ function CatalogScreen({ products, loading, errorReference, errorMessage, busy,
178
169
  canReview,
179
170
  openCart,
180
171
  orderBar,
181
- primaryProductPromptOpen,
182
172
  sidebarSearchOpen,
183
173
  primaryActionLabel,
184
- primaryAction,
185
174
  completeCatalog,
186
175
  send
187
176
  ]));
@@ -272,23 +261,7 @@ function CatalogScreen({ products, loading, errorReference, errorMessage, busy,
272
261
  })
273
262
  });
274
263
  }
275
- }))))), primaryProductPromptOpen ? /* @__PURE__ */ react.default.createElement(require_index$3.PrimaryProductPromptDialog, {
276
- busy,
277
- onDecline: () => {
278
- setPrimaryProductPromptOpen(false);
279
- send({
280
- kind: "outcome",
281
- outcome: "completed"
282
- });
283
- },
284
- onAccept: () => {
285
- setPrimaryProductPromptOpen(false);
286
- send({
287
- kind: "outcome",
288
- outcome: "primaryProductRequested"
289
- });
290
- }
291
- }) : null);
264
+ }))))));
292
265
  }
293
266
  //#endregion
294
267
  exports.CatalogScreen = CatalogScreen;
@@ -1,10 +1,6 @@
1
1
  const require_objectSpread2 = require("../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
2
2
  //#region src/components/HDLKiosk/slices/catalog/Screen/model.ts
3
3
  const HDL_CATALOG_OTHER_CATEGORY_ID = "__other__";
4
- /** 扫码目录仍需继续确认主商品;普通目录的商品选择完成后可直接 Checkout。 */
5
- function resolveCatalogPrimaryAction(activity) {
6
- return activity === "catalogWithPrimaryProductPrompt" ? "next" : "checkout";
7
- }
8
4
  function bySortThenName(left, right) {
9
5
  return right.sort - left.sort || left.name.localeCompare(right.name);
10
6
  }
@@ -77,4 +73,3 @@ function filterHDLCatalogProducts(products, input) {
77
73
  //#endregion
78
74
  exports.createHDLCatalogCategories = createHDLCatalogCategories;
79
75
  exports.filterHDLCatalogProducts = filterHDLCatalogProducts;
80
- exports.resolveCatalogPrimaryAction = resolveCatalogPrimaryAction;
@@ -1,25 +1,12 @@
1
1
  const require_defineSlice = require("../../kernel/application/defineSlice.js");
2
2
  const require_cart = require("../../app/operations/cart.js");
3
3
  //#region src/components/HDLKiosk/slices/catalog/slice.ts
4
- /** Catalog Slice:声明补充商品加购与主商品询问分支;商品浏览动作不进入 Workflow。 */
4
+ /** Catalog Slice:声明补充商品加购;商品浏览动作不进入 Workflow。 */
5
5
  const catalogSlice = require_defineSlice.defineSlice({
6
6
  id: "catalog",
7
7
  screen: { id: "catalog" },
8
8
  commands: { addProduct: require_cart.cartAddProductOperation },
9
- outcomes: {
10
- completed: require_defineSlice.guard("cart.notEmpty", { navigate: "next" }),
11
- back: require_defineSlice.back()
12
- }
13
- });
14
- const catalogWithPrimaryProductPromptSlice = require_defineSlice.defineSlice({
15
- id: "catalogWithPrimaryProductPrompt",
16
- screen: { id: "catalog" },
17
- commands: { addProduct: require_cart.cartAddProductOperation },
18
- outcomes: {
19
- completed: require_defineSlice.guard("cart.notEmpty", { navigate: "next" }),
20
- primaryProductRequested: require_defineSlice.guard("cart.notEmpty", { navigate: "next" })
21
- }
9
+ intents: { complete: require_defineSlice.intentPrecondition("cart.notEmpty", { navigate: "next" }) }
22
10
  });
23
11
  //#endregion
24
12
  exports.catalogSlice = catalogSlice;
25
- exports.catalogWithPrimaryProductPromptSlice = catalogWithPrimaryProductPromptSlice;
@@ -1,7 +1,7 @@
1
1
  const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
2
2
  const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
3
+ const require_selectors = require("../../kernel/workflow/selectors.js");
3
4
  const require_utils = require("../../utils.js");
4
- const require_model = require("./Screen/model.js");
5
5
  const require_index = require("./Screen/index.js");
6
6
  let react = require("react");
7
7
  react = require_runtime.__toESM(react);
@@ -16,8 +16,8 @@ function createCatalogOrderBarModel(sales) {
16
16
  }, {});
17
17
  return Object.freeze(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, order), {}, { quantitiesByProduct: Object.freeze(quantitiesByProduct) }));
18
18
  }
19
- const renderCatalog = ({ node, snapshot, viewSnapshot, sales, commandState, catalog, send }) => {
20
- var _commandState$error, _node$on$back;
19
+ const renderCatalog = ({ snapshot, viewSnapshot, sales, commandState, catalog, send }) => {
20
+ var _commandState$error;
21
21
  const error = require_utils.resolveHDLKioskErrorPresentation({
22
22
  error: (_commandState$error = commandState.error) !== null && _commandState$error !== void 0 ? _commandState$error : snapshot.lastError,
23
23
  reference: catalog.errorReference,
@@ -30,9 +30,7 @@ const renderCatalog = ({ node, snapshot, viewSnapshot, sales, commandState, cata
30
30
  errorMessage: error === null || error === void 0 ? void 0 : error.message,
31
31
  busy: viewSnapshot.status === "running",
32
32
  canReview: sales.cart.lineCount > 0,
33
- canGoBack: Boolean(node.on.back) && ((_node$on$back = node.on.back) === null || _node$on$back === void 0 ? void 0 : _node$on$back.target) !== snapshot.nodeId,
34
- promptForPrimaryProduct: node.activity === "catalogWithPrimaryProductPrompt" && !sales.cart.lines.some((line) => line.productId === snapshot.context.primaryWeightedProductId),
35
- primaryAction: require_model.resolveCatalogPrimaryAction(node.activity),
33
+ canGoBack: require_selectors.canNavigateBack(snapshot),
36
34
  orderBar: createCatalogOrderBarModel(sales),
37
35
  send
38
36
  });
@@ -166,7 +166,6 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
166
166
  const skuOptionsRef = (0, react.useRef)(null);
167
167
  const hydratedDraftKeyRef = (0, react.useRef)();
168
168
  const [skuValue, setSkuValue] = (0, react.useState)(() => initialSkuValue(product));
169
- console.log("xxxxxxxxx", product, skuValue);
170
169
  const productFacts = (0, react.useMemo)(() => product ? require_product.resolveHDLWeightedProduct(product) : void 0, [product]);
171
170
  const draftHydrationKey = JSON.stringify([
172
171
  (_productFacts$product = productFacts === null || productFacts === void 0 ? void 0 : productFacts.productId) !== null && _productFacts$product !== void 0 ? _productFacts$product : "",
@@ -215,8 +214,8 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
215
214
  }
216
215
  const submittedSkuValue = (_skuOptionsRef$curren2 = (_skuOptionsRef$curren3 = skuOptionsRef.current) === null || _skuOptionsRef$curren3 === void 0 ? void 0 : _skuOptionsRef$curren3.getTransformValues()) !== null && _skuOptionsRef$curren2 !== void 0 ? _skuOptionsRef$curren2 : skuValue;
217
216
  send({
218
- kind: "outcome",
219
- outcome: "completed",
217
+ kind: "intent",
218
+ intent: "complete",
220
219
  operationInput: {
221
220
  productId: productFacts.productId,
222
221
  variantId: productFacts.variantId,
@@ -247,11 +246,10 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
247
246
  ]);
248
247
  const skipPrimaryProduct = (0, react.useCallback)(() => {
249
248
  var _orderBar$primaryLine10;
250
- const lineId = (_orderBar$primaryLine10 = orderBar.primaryLine) === null || _orderBar$primaryLine10 === void 0 ? void 0 : _orderBar$primaryLine10.lineId;
251
249
  send({
252
- kind: "outcome",
253
- outcome: "skipped",
254
- operationInput: lineId ? { lineId } : void 0
250
+ kind: "intent",
251
+ intent: "skip",
252
+ operationInput: { lineId: (_orderBar$primaryLine10 = orderBar.primaryLine) === null || _orderBar$primaryLine10 === void 0 ? void 0 : _orderBar$primaryLine10.lineId }
255
253
  });
256
254
  }, [(_orderBar$primaryLine11 = orderBar.primaryLine) === null || _orderBar$primaryLine11 === void 0 ? void 0 : _orderBar$primaryLine11.lineId, send]);
257
255
  const { openCart } = require_index.useHDLKioskBottomBarController();
@@ -263,8 +261,8 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
263
261
  className: "hdl-floating-bar__button",
264
262
  disabled: busy || syncing,
265
263
  onClick: () => send({
266
- kind: "outcome",
267
- outcome: "back"
264
+ kind: "navigation",
265
+ direction: "back"
268
266
  })
269
267
  }, /* @__PURE__ */ react.default.createElement(BackIcon, null), /* @__PURE__ */ react.default.createElement("span", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.back"))) : void 0,
270
268
  summary: /* @__PURE__ */ react.default.createElement(require_index$1.HDLKioskOrderSummary, {
@@ -13,6 +13,25 @@ decimal_js = require_runtime.__toESM(decimal_js);
13
13
  * SkuValue 和“新增或原行发生变化”的最小 receipt/Projection 事实。
14
14
  * 边界:页面输入变化不调用本 Operation;OS 内部的加购弹窗与业务判断不属于 HDLKiosk。
15
15
  */
16
+ const productRemovePrimaryProductOperation = require_types.defineOperation({
17
+ id: "product.removePrimaryProduct",
18
+ conflictScope: "cart",
19
+ timeoutMs: 15e3,
20
+ retry: "explicit-user",
21
+ execute: function() {
22
+ var _ref = require_asyncToGenerator._asyncToGenerator(function* (context, input, signal) {
23
+ if (!input.lineId) return {
24
+ status: "succeeded",
25
+ data: {}
26
+ };
27
+ const mutation = yield context.host.sales.removeLine({ lineId: input.lineId }, signal);
28
+ return require_cartConsistency.finalizeCartMutation(context, mutation, signal, () => mutation.status === "succeeded" && mutation.data.removedLineId === input.lineId || !context.host.sales.getObservedSnapshot().cart.lines.some((item) => item.lineId === input.lineId));
29
+ });
30
+ return function execute(_x, _x2, _x3) {
31
+ return _ref.apply(this, arguments);
32
+ };
33
+ }()
34
+ });
16
35
  function hasValidSkuValue(input) {
17
36
  const canonical = require_canonicalSkuValue.canonicalizeSkuValue(input.skuValue);
18
37
  return Boolean(input.productId && canonical && canonical.productId === input.productId);
@@ -31,7 +50,7 @@ const productSyncPrimaryWeightedProductOperation = require_types.defineOperation
31
50
  conflictScope: "cart",
32
51
  retry: "explicit-user",
33
52
  execute: function() {
34
- var _ref = require_asyncToGenerator._asyncToGenerator(function* (context, input, signal) {
53
+ var _ref2 = require_asyncToGenerator._asyncToGenerator(function* (context, input, signal) {
35
54
  if (!hasValidSkuValue(input)) return require_errors.operationFailed("customizationInputInvalid", "back");
36
55
  const beforeLines = new Map(context.host.sales.getObservedSnapshot().cart.lines.map((line) => [line.lineId, line.quantity]));
37
56
  const before = context.host.sales.getObservedSnapshot();
@@ -54,10 +73,11 @@ const productSyncPrimaryWeightedProductOperation = require_types.defineOperation
54
73
  return Boolean(confirmedLine && confirmedLine.productId === input.productId && (!(successfulOutcome === null || successfulOutcome === void 0 ? void 0 : successfulOutcome.affectedLineId) || confirmedLine.lineId === successfulOutcome.affectedLineId) && (!input.existingLineId || (successfulOutcome === null || successfulOutcome === void 0 ? void 0 : successfulOutcome.affectedLineId) === input.existingLineId && confirmedLine.lineId === input.existingLineId) && sameWeight(confirmedLine.quantity, input.measurement.netWeightKg) && sameSkuValue(input.skuValue, confirmedLine.skuValue) && (Boolean(input.existingLineId) || !beforeLines.has(confirmedLine.lineId) || beforeLines.get(confirmedLine.lineId) !== confirmedLine.quantity)) || projectionMatches;
55
74
  });
56
75
  });
57
- return function execute(_x, _x2, _x3) {
58
- return _ref.apply(this, arguments);
76
+ return function execute(_x4, _x5, _x6) {
77
+ return _ref2.apply(this, arguments);
59
78
  };
60
79
  }()
61
80
  });
62
81
  //#endregion
82
+ exports.productRemovePrimaryProductOperation = productRemovePrimaryProductOperation;
63
83
  exports.productSyncPrimaryWeightedProductOperation = productSyncPrimaryWeightedProductOperation;
@@ -7,13 +7,9 @@ const customizationSlice = require_defineSlice.defineSlice({
7
7
  id: "customization",
8
8
  screen: { id: "customization" },
9
9
  commands: { removePrimaryProduct: require_cart.cartRemoveLineOperation },
10
- outcomes: {
11
- completed: require_defineSlice.effect(require_operation.productSyncPrimaryWeightedProductOperation, { navigate: "next" }),
12
- skipped: require_defineSlice.effect(require_cart.cartRemoveLineOperation, {
13
- when: "inputPresent",
14
- navigate: "next"
15
- }),
16
- back: require_defineSlice.back()
10
+ intents: {
11
+ complete: require_defineSlice.effect(require_operation.productSyncPrimaryWeightedProductOperation, { navigate: "next" }),
12
+ skip: require_defineSlice.effect(require_operation.productRemovePrimaryProductOperation, { navigate: "next" })
17
13
  }
18
14
  });
19
15
  //#endregion
@@ -1,4 +1,5 @@
1
1
  const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
2
+ const require_selectors = require("../../kernel/workflow/selectors.js");
2
3
  const require_utils = require("../../utils.js");
3
4
  const require_index = require("./Screen/index.js");
4
5
  let react = require("react");
@@ -18,7 +19,7 @@ function createCustomizationOrderBarModel(sales, primaryProductId) {
18
19
  }))[0] : void 0
19
20
  });
20
21
  }
21
- const renderCustomization = ({ node, snapshot, viewSnapshot, sales, commandState, customization, scaleMinimumWeightKg, send }) => {
22
+ const renderCustomization = ({ snapshot, viewSnapshot, sales, commandState, customization, scaleMinimumWeightKg, send }) => {
22
23
  var _snapshot$activeOpera, _commandState$error, _customization$produc;
23
24
  const syncing = snapshot.status === "running" && ((_snapshot$activeOpera = snapshot.activeOperation) === null || _snapshot$activeOpera === void 0 ? void 0 : _snapshot$activeOpera.definitionId) === "product.syncPrimaryWeightedProduct";
24
25
  const error = require_utils.resolveHDLKioskErrorPresentation({
@@ -33,7 +34,7 @@ const renderCustomization = ({ node, snapshot, viewSnapshot, sales, commandState
33
34
  errorMessage: error === null || error === void 0 ? void 0 : error.message,
34
35
  busy: viewSnapshot.status === "running" && !syncing,
35
36
  syncing,
36
- canGoBack: Boolean(node.on.back),
37
+ canGoBack: require_selectors.canNavigateBack(snapshot),
37
38
  minimumWeightKg: scaleMinimumWeightKg,
38
39
  orderBar: createCustomizationOrderBarModel(sales, ((_customization$produc = customization.product) === null || _customization$produc === void 0 ? void 0 : _customization$produc.id) == null ? void 0 : String(customization.product.id)),
39
40
  send
@@ -188,8 +188,8 @@ function FulfillmentScreen({ model, orderBar, send }) {
188
188
  className: "hdl-floating-bar__button",
189
189
  disabled: model.busy,
190
190
  onClick: () => send({
191
- kind: "outcome",
192
- outcome: "back"
191
+ kind: "navigation",
192
+ direction: "back"
193
193
  })
194
194
  }, /* @__PURE__ */ react.default.createElement(BackIcon, null), /* @__PURE__ */ react.default.createElement("span", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.back"))) : void 0,
195
195
  summary: /* @__PURE__ */ react.default.createElement(require_index$1.HDLKioskOrderSummary, {
@@ -225,8 +225,8 @@ function FulfillmentScreen({ model, orderBar, send }) {
225
225
  className: "hdl-fulfillment-card",
226
226
  disabled: model.busy,
227
227
  onClick: () => send({
228
- kind: "outcome",
229
- outcome: "completed",
228
+ kind: "intent",
229
+ intent: "complete",
230
230
  contextPatch: { fulfillment: "dine_in" },
231
231
  operationInput: { mode: "dine_in" }
232
232
  })
@@ -235,8 +235,8 @@ function FulfillmentScreen({ model, orderBar, send }) {
235
235
  className: "hdl-fulfillment-card",
236
236
  disabled: model.busy,
237
237
  onClick: () => send({
238
- kind: "outcome",
239
- outcome: "completed",
238
+ kind: "intent",
239
+ intent: "complete",
240
240
  contextPatch: { fulfillment: "takeaway" },
241
241
  operationInput: { mode: "takeaway" }
242
242
  })
@@ -5,13 +5,10 @@ const require_fulfillment = require("../../app/operations/fulfillment.js");
5
5
  const fulfillmentSlice = require_defineSlice.defineSlice({
6
6
  id: "fulfillment",
7
7
  screen: { id: "fulfillment" },
8
- outcomes: {
9
- completed: require_defineSlice.effect(require_fulfillment.setFulfillmentOperation, {
10
- guard: "fulfillment.selected",
11
- navigate: "next"
12
- }),
13
- back: require_defineSlice.back()
14
- }
8
+ intents: { complete: require_defineSlice.effect(require_fulfillment.setFulfillmentOperation, {
9
+ precondition: "fulfillment.selected",
10
+ navigate: "next"
11
+ }) }
15
12
  });
16
13
  //#endregion
17
14
  exports.fulfillmentSlice = fulfillmentSlice;
@@ -10,21 +10,26 @@ const QR_CELLS = Object.freeze(Array.from({ length: 49 }, (_, index) => index *
10
10
  * Quick Order 的前置会员提示页。
11
11
  *
12
12
  * 宿主可注入认证 UI;未注入时保留 QR / SMS 视觉 fallback。Skip 继续产生
13
- * identity.skipped Outcome,由本地 Exit Policy 同步访客后进入下一步。
13
+ * identity.skip Intent,由本地 Exit Policy 同步访客后进入下一步。
14
14
  */
15
15
  function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
16
+ const [authBusy, setAuthBusy] = (0, react.useState)(false);
17
+ const busy = model.busy || authBusy;
18
+ const handleAuthBusyChange = (0, react.useCallback)((nextBusy) => {
19
+ setAuthBusy(nextBusy);
20
+ }, []);
16
21
  const hasOrder = Boolean(orderBar && orderBar.cartLineCount > 0);
17
22
  const { openCart } = require_index.useHDLKioskBottomBarController();
18
23
  require_index.useHDLKioskBottomBar((0, react.useMemo)(() => ({
19
24
  ariaLabel: _pisell_utils.locales.getText("pisell2.hdl-kiosk.identity-actions-label"),
20
- cartEnabled: hasOrder && !model.busy,
25
+ cartEnabled: hasOrder && !busy,
21
26
  variant: "composed",
22
27
  summary: orderBar ? /* @__PURE__ */ react.default.createElement(require_index$1.HDLKioskOrderSummary, {
23
28
  lineCount: orderBar.cartLineCount,
24
29
  totalText: orderBar.totalText,
25
30
  detailText: orderBar.totalText ? _pisell_utils.locales.getText("pisell2.hdl-kiosk.catalog-cart-hint") : orderBar.totalLabel,
26
31
  cartAriaLabel: _pisell_utils.locales.getText("pisell2.hdl-kiosk.cart-drawer-title"),
27
- disabled: model.busy || !hasOrder,
32
+ disabled: busy || !hasOrder,
28
33
  onOpenCart: openCart
29
34
  }) : void 0,
30
35
  cartOpenBar: hasOrder ? (controller) => ({
@@ -32,7 +37,7 @@ function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
32
37
  leading: /* @__PURE__ */ react.default.createElement("button", {
33
38
  type: "button",
34
39
  className: "hdl-floating-bar__button",
35
- disabled: model.busy,
40
+ disabled: busy,
36
41
  onClick: controller.onClose
37
42
  }, /* @__PURE__ */ react.default.createElement("svg", {
38
43
  viewBox: "0 0 24 24",
@@ -40,17 +45,18 @@ function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
40
45
  }, /* @__PURE__ */ react.default.createElement("path", { d: "m15 5-7 7 7 7M8 12h10" })), /* @__PURE__ */ react.default.createElement("span", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.back")))
41
46
  }) : void 0
42
47
  }), [
48
+ busy,
43
49
  hasOrder,
44
- model.busy,
45
50
  openCart,
46
51
  orderBar
47
52
  ]));
48
53
  const authContent = renderIdentityAuth === null || renderIdentityAuth === void 0 ? void 0 : renderIdentityAuth({
49
- busy: model.busy,
54
+ busy,
50
55
  disabled: model.busy,
56
+ onBusyChange: handleAuthBusyChange,
51
57
  onAuthenticated: (customerId) => send({
52
- kind: "outcome",
53
- outcome: "memberRecognized",
58
+ kind: "intent",
59
+ intent: "complete",
54
60
  operationInput: { customerId }
55
61
  })
56
62
  });
@@ -73,10 +79,10 @@ function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
73
79
  }, _pisell_utils.locales.getText("pisell2.hdl-kiosk.login-via-sms"))), /* @__PURE__ */ react.default.createElement("button", {
74
80
  type: "button",
75
81
  className: "hdl-identity-screen__skip",
76
- disabled: model.busy,
82
+ disabled: busy,
77
83
  onClick: () => send({
78
- kind: "outcome",
79
- outcome: "skipped",
84
+ kind: "intent",
85
+ intent: "skip",
80
86
  operationInput: {}
81
87
  })
82
88
  }, _pisell_utils.locales.getText("pisell2.hdl-kiosk.skip")), model.errorReference ? /* @__PURE__ */ react.default.createElement("div", {
@@ -1,20 +1,13 @@
1
1
  const require_defineSlice = require("../../kernel/application/defineSlice.js");
2
2
  const require_operation = require("./operation.js");
3
3
  //#region src/components/HDLKiosk/slices/identity/slice.ts
4
- /** Identity Slice:声明身份节点的 Outcome 与客户同步 Effect;不依赖 React 或 Host 实现。 */
4
+ /** Identity Slice:声明身份节点的 Intent 与客户同步 Effect;不依赖 React 或 Host 实现。 */
5
5
  const identitySlice = require_defineSlice.defineSlice({
6
6
  id: "identity",
7
7
  screen: { id: "identity" },
8
- guards: { beforeEnter: ({ to, completedStepIds, sales }) => {
9
- var _sales$customer;
10
- return !completedStepIds.includes(to.stepId) && ((_sales$customer = sales.customer) === null || _sales$customer === void 0 ? void 0 : _sales$customer.member) !== true ? { type: "allow" } : { type: "skip" };
11
- } },
12
- outcomes: {
13
- memberRecognized: require_defineSlice.effect(require_operation.identitySyncOperation, {
14
- when: "inputPresent",
15
- navigate: "next"
16
- }),
17
- skipped: require_defineSlice.effect(require_operation.identitySyncOperation, { navigate: "next" })
8
+ intents: {
9
+ complete: require_defineSlice.effect(require_operation.identitySyncOperation, { navigate: "next" }),
10
+ skip: require_defineSlice.effect(require_operation.identitySyncOperation, { navigate: "next" })
18
11
  }
19
12
  });
20
13
  //#endregion
@@ -3,13 +3,14 @@ const require_slice$1 = require("./customization/slice.js");
3
3
  const require_slice$2 = require("./fulfillment/slice.js");
4
4
  const require_slice$3 = require("./identity/slice.js");
5
5
  const require_slice$4 = require("./payment/slice.js");
6
+ const require_slice$5 = require("./primaryProductPrompt/slice.js");
6
7
  //#region src/components/HDLKiosk/slices/index.ts
7
8
  const hdlKioskSlices = Object.freeze([
8
9
  require_slice$3.identitySlice,
9
10
  require_slice$2.fulfillmentSlice,
10
11
  require_slice$1.customizationSlice,
11
12
  require_slice.catalogSlice,
12
- require_slice.catalogWithPrimaryProductPromptSlice,
13
+ require_slice$5.primaryProductPromptSlice,
13
14
  require_slice$4.paymentMethodSlice,
14
15
  require_slice$4.paymentCompletedSlice
15
16
  ]);
@@ -44,8 +44,8 @@ function PaymentMethodIcon({ code, type }) {
44
44
  function CheckoutScreen({ model, orderBar, send }) {
45
45
  var _model$paymentFeedbac;
46
46
  const goBack = (0, react.useCallback)(() => send({
47
- kind: "outcome",
48
- outcome: "back"
47
+ kind: "navigation",
48
+ direction: "back"
49
49
  }), [send]);
50
50
  const hasOrder = Boolean(orderBar && orderBar.cartLineCount > 0);
51
51
  const cartMutable = hasOrder && model.canLeavePayment;
@@ -176,9 +176,9 @@ function CheckoutScreen({ model, orderBar, send }) {
176
176
  dismissCurrentFeedback();
177
177
  if (eftpos) {
178
178
  send({
179
- kind: "outcome",
180
- outcome: "eftposSelected",
181
- operationInput: { paymentMethodId: method.id }
179
+ kind: "command",
180
+ command: "checkout.payEftpos",
181
+ input: { paymentMethodId: method.id }
182
182
  });
183
183
  return;
184
184
  }
@@ -5,18 +5,17 @@ const require_checkout = require("../../app/operations/checkout.js");
5
5
  const paymentMethodSlice = require_defineSlice.defineSlice({
6
6
  id: "paymentMethod",
7
7
  screen: { id: "checkout" },
8
- commands: { requestStaffPaymentApproval: require_checkout.checkoutRequestStaffPaymentApprovalOperation },
9
- outcomes: {
10
- eftposSelected: require_defineSlice.effect(require_checkout.checkoutPayEftposOperation),
11
- confirmed: require_defineSlice.guard("payment.succeeded", { navigate: "next" }),
12
- back: require_defineSlice.back()
13
- }
8
+ commands: {
9
+ payEftpos: require_checkout.checkoutPayEftposOperation,
10
+ requestStaffPaymentApproval: require_checkout.checkoutRequestStaffPaymentApprovalOperation
11
+ },
12
+ intents: { complete: require_defineSlice.intentPrecondition("payment.succeeded", { navigate: "next" }) }
14
13
  });
15
14
  /** 支付完成仍复用 Checkout Screen,仅作为 Workflow 的成功终态。 */
16
15
  const paymentCompletedSlice = require_defineSlice.defineSlice({
17
16
  id: "paymentCompleted",
18
17
  screen: { id: "checkout" },
19
- outcomes: {}
18
+ intents: {}
20
19
  });
21
20
  //#endregion
22
21
  exports.paymentCompletedSlice = paymentCompletedSlice;
@@ -0,0 +1,14 @@
1
+ const require_defineSlice = require("../../kernel/application/defineSlice.js");
2
+ //#region src/components/HDLKiosk/slices/primaryProductPrompt/slice.ts
3
+ /** 主商品询问 Slice:只表达是否进入称重定制,不承担 Catalog 页面职责。 */
4
+ const primaryProductPromptSlice = require_defineSlice.defineSlice({
5
+ id: "primaryProductPrompt",
6
+ screen: { id: "primaryProductPrompt" },
7
+ presentation: "modal",
8
+ intents: {
9
+ complete: require_defineSlice.intentPrecondition("cart.notEmpty", { navigate: "next" }),
10
+ skip: require_defineSlice.intentPrecondition("cart.notEmpty")
11
+ }
12
+ });
13
+ //#endregion
14
+ exports.primaryProductPromptSlice = primaryProductPromptSlice;
@@ -0,0 +1,25 @@
1
+ const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
2
+ const require_index = require("../catalog/PrimaryProductPromptDialog/index.js");
3
+ let react = require("react");
4
+ react = require_runtime.__toESM(react);
5
+ //#region src/components/HDLKiosk/slices/primaryProductPrompt/view.tsx
6
+ /** 主商品询问展示:将用户选择转换为标准 completed/skipped 结果。 */
7
+ function PrimaryProductPromptView({ busy, send }) {
8
+ return /* @__PURE__ */ react.default.createElement(require_index.PrimaryProductPromptDialog, {
9
+ busy,
10
+ onDecline: () => send({
11
+ kind: "intent",
12
+ intent: "skip"
13
+ }),
14
+ onAccept: () => send({
15
+ kind: "intent",
16
+ intent: "complete"
17
+ })
18
+ });
19
+ }
20
+ const renderPrimaryProductPrompt = ({ viewSnapshot, bindActivity }) => /* @__PURE__ */ react.default.createElement(PrimaryProductPromptView, {
21
+ busy: viewSnapshot.status === "running",
22
+ send: bindActivity("primaryProductPrompt")
23
+ });
24
+ //#endregion
25
+ exports.renderPrimaryProductPrompt = renderPrimaryProductPrompt;
@@ -1,4 +1,5 @@
1
1
  require("../../_virtual/_rolldown/runtime.js");
2
+ const require_selectors = require("./kernel/workflow/selectors.js");
2
3
  let _pisell_utils = require("@pisell/utils");
3
4
  //#region src/components/HDLKiosk/utils.ts
4
5
  function fallbackErrorMessage(surface) {
@@ -95,8 +96,8 @@ function createActivityScreenModel(screenId, snapshot, node, sales, businessMode
95
96
  title,
96
97
  description,
97
98
  busy: snapshot.status === "running",
98
- canContinue: snapshot.status === "idle" && canReviewCatalog && !placeholderBlocked && Boolean(node.on.completed || node.on.detected),
99
- canGoBack: snapshot.status === "idle" && Boolean(node.on.back),
99
+ canContinue: snapshot.status === "idle" && canReviewCatalog && !placeholderBlocked && Boolean(node.on.complete),
100
+ canGoBack: snapshot.status === "idle" && require_selectors.canNavigateBack(snapshot),
100
101
  placeholder,
101
102
  placeholderBlocked,
102
103
  errorMessage: error === null || error === void 0 ? void 0 : error.message,