@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.
- 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.js +11 -11
- package/build/lowcode/view.js +11 -11
- package/es/components/HDLKiosk/app/ScreenRenderer.js +1 -1
- package/es/components/HDLKiosk/app/views.js +2 -1
- package/es/components/HDLKiosk/app/workflow/barcode.js +15 -32
- package/es/components/HDLKiosk/app/workflow/{guards.js → predicates.js} +9 -9
- package/es/components/HDLKiosk/app/workflow/quick.js +3 -6
- package/es/components/HDLKiosk/app/workflow/registry.js +1 -1
- package/es/components/HDLKiosk/app/workflow/scale.js +3 -12
- package/es/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +12 -10
- package/es/components/HDLKiosk/components/shell/HDLKioskShell/index.js +1 -0
- package/es/components/HDLKiosk/docs/00-/346/226/207/344/273/266/345/257/274/350/210/252.md +7 -7
- 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
- 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
- package/es/components/HDLKiosk/docs/05-/344/272/244/346/230/223/345/256/211/345/205/250.md +1 -1
- package/es/components/HDLKiosk/docs/07-/345/220/216/347/273/255/345/267/245/344/275/234.md +1 -1
- package/es/components/HDLKiosk/docs/README.md +2 -2
- package/es/components/HDLKiosk/docs//345/256/236/346/226/275/350/277/233/345/272/246.md +3 -3
- package/es/components/HDLKiosk/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +11 -11
- package/es/components/HDLKiosk/index.js +0 -1
- package/es/components/HDLKiosk/kernel/README.md +8 -9
- package/es/components/HDLKiosk/kernel/application/defineApplication.js +18 -19
- package/es/components/HDLKiosk/kernel/application/defineSlice.js +8 -13
- package/es/components/HDLKiosk/kernel/workflow/actor.js +88 -28
- package/es/components/HDLKiosk/kernel/workflow/compiler.js +28 -29
- package/es/components/HDLKiosk/kernel/workflow/selectors.js +9 -0
- package/es/components/HDLKiosk/runtime/HDLKioskWorkflowView.js +8 -7
- package/es/components/HDLKiosk/runtime/controllers/useHDLKioskCustomerController.js +1 -1
- package/es/components/HDLKiosk/runtime/createWorkflowSession.js +3 -3
- package/es/components/HDLKiosk/runtime/domainTransitionRunner.js +9 -9
- package/es/components/HDLKiosk/runtime/workflowEvent.js +9 -4
- package/es/components/HDLKiosk/runtime/workflowLifecycle.js +3 -3
- package/es/components/HDLKiosk/slices/catalog/PrimaryProductPromptDialog/index.js +1 -2
- package/es/components/HDLKiosk/slices/catalog/Screen/index.js +11 -38
- package/es/components/HDLKiosk/slices/catalog/Screen/model.js +1 -5
- package/es/components/HDLKiosk/slices/catalog/slice.js +4 -16
- package/es/components/HDLKiosk/slices/catalog/view.js +4 -6
- package/es/components/HDLKiosk/slices/customization/Screen/index.js +7 -9
- package/es/components/HDLKiosk/slices/customization/operation.js +23 -4
- package/es/components/HDLKiosk/slices/customization/slice.js +5 -9
- package/es/components/HDLKiosk/slices/customization/view.js +3 -2
- package/es/components/HDLKiosk/slices/fulfillment/Screen/index.js +6 -6
- package/es/components/HDLKiosk/slices/fulfillment/slice.js +5 -8
- package/es/components/HDLKiosk/slices/identity/Screen/index.js +18 -12
- package/es/components/HDLKiosk/slices/identity/slice.js +4 -11
- package/es/components/HDLKiosk/slices/index.js +3 -2
- package/es/components/HDLKiosk/slices/payment/Screen/index.js +5 -5
- package/es/components/HDLKiosk/slices/payment/slice.js +7 -8
- package/es/components/HDLKiosk/slices/primaryProductPrompt/slice.js +14 -0
- package/es/components/HDLKiosk/slices/primaryProductPrompt/view.js +23 -0
- package/es/components/HDLKiosk/utils.js +3 -2
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
- package/es/components/bigSale/components/TimeBar/index.js +1 -0
- package/es/components/bigSale/dialog.js +1 -0
- package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
- package/es/components/bigSale/index.js +1 -0
- package/es/components/bigSale/templates/HDLKiosk/auth/HDLKioskIdentityAuthPanel.js +17 -2
- package/es/components/bigSale/templates/Kiosk/index.js +1 -0
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/index.js +2 -0
- 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/pisellReservation/index.js +17 -0
- package/es/plus/saleDetail/Base.js +1 -0
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
- package/es/plus/saleDetail/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/index.js +1 -0
- package/es/plus/salesSdk/index.js +52 -0
- 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/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/Login2.d.ts +2 -0
- package/es/pro/Login2.0/Login2.js +9 -1
- package/es/pro/Login2.0/Register2.d.ts +2 -0
- package/es/pro/Login2.0/Register2.js +9 -1
- package/es/pro/Login2.0/index.d.ts +2 -1
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/lib/components/HDLKiosk/app/ScreenRenderer.js +1 -1
- package/lib/components/HDLKiosk/app/views.js +2 -1
- package/lib/components/HDLKiosk/app/workflow/barcode.js +14 -31
- package/lib/components/HDLKiosk/app/workflow/{guards.js → predicates.js} +9 -9
- package/lib/components/HDLKiosk/app/workflow/quick.js +3 -6
- package/lib/components/HDLKiosk/app/workflow/registry.js +1 -1
- package/lib/components/HDLKiosk/app/workflow/scale.js +3 -12
- package/lib/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +12 -10
- package/lib/components/HDLKiosk/components/shell/HDLKioskShell/index.js +1 -0
- package/lib/components/HDLKiosk/docs/00-/346/226/207/344/273/266/345/257/274/350/210/252.md +7 -7
- 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
- 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
- package/lib/components/HDLKiosk/docs/05-/344/272/244/346/230/223/345/256/211/345/205/250.md +1 -1
- package/lib/components/HDLKiosk/docs/07-/345/220/216/347/273/255/345/267/245/344/275/234.md +1 -1
- package/lib/components/HDLKiosk/docs/README.md +2 -2
- package/lib/components/HDLKiosk/docs//345/256/236/346/226/275/350/277/233/345/272/246.md +3 -3
- package/lib/components/HDLKiosk/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +11 -11
- package/lib/components/HDLKiosk/index.js +0 -1
- package/lib/components/HDLKiosk/kernel/README.md +8 -9
- package/lib/components/HDLKiosk/kernel/application/defineApplication.js +18 -19
- package/lib/components/HDLKiosk/kernel/application/defineSlice.js +8 -14
- package/lib/components/HDLKiosk/kernel/workflow/actor.js +88 -28
- package/lib/components/HDLKiosk/kernel/workflow/compiler.js +28 -29
- package/lib/components/HDLKiosk/kernel/workflow/selectors.js +10 -0
- package/lib/components/HDLKiosk/runtime/HDLKioskWorkflowView.js +8 -7
- package/lib/components/HDLKiosk/runtime/controllers/useHDLKioskCustomerController.js +1 -1
- package/lib/components/HDLKiosk/runtime/createWorkflowSession.js +3 -3
- package/lib/components/HDLKiosk/runtime/domainTransitionRunner.js +9 -9
- package/lib/components/HDLKiosk/runtime/workflowEvent.js +9 -4
- package/lib/components/HDLKiosk/runtime/workflowLifecycle.js +3 -3
- package/lib/components/HDLKiosk/slices/catalog/PrimaryProductPromptDialog/index.js +1 -2
- package/lib/components/HDLKiosk/slices/catalog/Screen/index.js +13 -40
- package/lib/components/HDLKiosk/slices/catalog/Screen/model.js +0 -5
- package/lib/components/HDLKiosk/slices/catalog/slice.js +2 -15
- package/lib/components/HDLKiosk/slices/catalog/view.js +4 -6
- package/lib/components/HDLKiosk/slices/customization/Screen/index.js +7 -9
- package/lib/components/HDLKiosk/slices/customization/operation.js +23 -3
- package/lib/components/HDLKiosk/slices/customization/slice.js +3 -7
- package/lib/components/HDLKiosk/slices/customization/view.js +3 -2
- package/lib/components/HDLKiosk/slices/fulfillment/Screen/index.js +6 -6
- package/lib/components/HDLKiosk/slices/fulfillment/slice.js +4 -7
- package/lib/components/HDLKiosk/slices/identity/Screen/index.js +17 -11
- package/lib/components/HDLKiosk/slices/identity/slice.js +4 -11
- package/lib/components/HDLKiosk/slices/index.js +2 -1
- package/lib/components/HDLKiosk/slices/payment/Screen/index.js +5 -5
- package/lib/components/HDLKiosk/slices/payment/slice.js +6 -7
- package/lib/components/HDLKiosk/slices/primaryProductPrompt/slice.js +14 -0
- package/lib/components/HDLKiosk/slices/primaryProductPrompt/view.js +25 -0
- package/lib/components/HDLKiosk/utils.js +3 -2
- package/lib/components/bigSale/templates/HDLKiosk/auth/HDLKioskIdentityAuthPanel.js +16 -1
- package/lib/pro/Login2.0/Login2.d.ts +2 -0
- package/lib/pro/Login2.0/Login2.js +9 -1
- package/lib/pro/Login2.0/Register2.d.ts +2 -0
- package/lib/pro/Login2.0/Register2.js +9 -1
- package/package.json +3 -3
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -11,6 +11,25 @@ import Decimal from "decimal.js";
|
|
|
11
11
|
* SkuValue 和“新增或原行发生变化”的最小 receipt/Projection 事实。
|
|
12
12
|
* 边界:页面输入变化不调用本 Operation;OS 内部的加购弹窗与业务判断不属于 HDLKiosk。
|
|
13
13
|
*/
|
|
14
|
+
const productRemovePrimaryProductOperation = defineOperation({
|
|
15
|
+
id: "product.removePrimaryProduct",
|
|
16
|
+
conflictScope: "cart",
|
|
17
|
+
timeoutMs: 15e3,
|
|
18
|
+
retry: "explicit-user",
|
|
19
|
+
execute: function() {
|
|
20
|
+
var _ref = _asyncToGenerator(function* (context, input, signal) {
|
|
21
|
+
if (!input.lineId) return {
|
|
22
|
+
status: "succeeded",
|
|
23
|
+
data: {}
|
|
24
|
+
};
|
|
25
|
+
const mutation = yield context.host.sales.removeLine({ lineId: input.lineId }, signal);
|
|
26
|
+
return finalizeCartMutation(context, mutation, signal, () => mutation.status === "succeeded" && mutation.data.removedLineId === input.lineId || !context.host.sales.getObservedSnapshot().cart.lines.some((item) => item.lineId === input.lineId));
|
|
27
|
+
});
|
|
28
|
+
return function execute(_x, _x2, _x3) {
|
|
29
|
+
return _ref.apply(this, arguments);
|
|
30
|
+
};
|
|
31
|
+
}()
|
|
32
|
+
});
|
|
14
33
|
function hasValidSkuValue(input) {
|
|
15
34
|
const canonical = canonicalizeSkuValue(input.skuValue);
|
|
16
35
|
return Boolean(input.productId && canonical && canonical.productId === input.productId);
|
|
@@ -29,7 +48,7 @@ const productSyncPrimaryWeightedProductOperation = defineOperation({
|
|
|
29
48
|
conflictScope: "cart",
|
|
30
49
|
retry: "explicit-user",
|
|
31
50
|
execute: function() {
|
|
32
|
-
var
|
|
51
|
+
var _ref2 = _asyncToGenerator(function* (context, input, signal) {
|
|
33
52
|
if (!hasValidSkuValue(input)) return operationFailed("customizationInputInvalid", "back");
|
|
34
53
|
const beforeLines = new Map(context.host.sales.getObservedSnapshot().cart.lines.map((line) => [line.lineId, line.quantity]));
|
|
35
54
|
const before = context.host.sales.getObservedSnapshot();
|
|
@@ -52,10 +71,10 @@ const productSyncPrimaryWeightedProductOperation = defineOperation({
|
|
|
52
71
|
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;
|
|
53
72
|
});
|
|
54
73
|
});
|
|
55
|
-
return function execute(
|
|
56
|
-
return
|
|
74
|
+
return function execute(_x4, _x5, _x6) {
|
|
75
|
+
return _ref2.apply(this, arguments);
|
|
57
76
|
};
|
|
58
77
|
}()
|
|
59
78
|
});
|
|
60
79
|
//#endregion
|
|
61
|
-
export { productSyncPrimaryWeightedProductOperation };
|
|
80
|
+
export { productRemovePrimaryProductOperation, productSyncPrimaryWeightedProductOperation };
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineSlice, effect } from "../../kernel/application/defineSlice.js";
|
|
2
2
|
import { cartRemoveLineOperation } from "../../app/operations/cart.js";
|
|
3
|
-
import { productSyncPrimaryWeightedProductOperation } from "./operation.js";
|
|
3
|
+
import { productRemovePrimaryProductOperation, productSyncPrimaryWeightedProductOperation } from "./operation.js";
|
|
4
4
|
//#region src/components/HDLKiosk/slices/customization/slice.ts
|
|
5
5
|
/** Customization Slice:Next 时才提交本地称重草稿;加购成功后才离开。 */
|
|
6
6
|
const customizationSlice = defineSlice({
|
|
7
7
|
id: "customization",
|
|
8
8
|
screen: { id: "customization" },
|
|
9
9
|
commands: { removePrimaryProduct: cartRemoveLineOperation },
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
when: "inputPresent",
|
|
14
|
-
navigate: "next"
|
|
15
|
-
}),
|
|
16
|
-
back: back()
|
|
10
|
+
intents: {
|
|
11
|
+
complete: effect(productSyncPrimaryWeightedProductOperation, { navigate: "next" }),
|
|
12
|
+
skip: effect(productRemovePrimaryProductOperation, { navigate: "next" })
|
|
17
13
|
}
|
|
18
14
|
});
|
|
19
15
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { canNavigateBack } from "../../kernel/workflow/selectors.js";
|
|
1
2
|
import { resolveHDLKioskErrorPresentation } from "../../utils.js";
|
|
2
3
|
import { CustomizationScreen } from "./Screen/index.js";
|
|
3
4
|
import React from "react";
|
|
@@ -16,7 +17,7 @@ function createCustomizationOrderBarModel(sales, primaryProductId) {
|
|
|
16
17
|
}))[0] : void 0
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
const renderCustomization = ({
|
|
20
|
+
const renderCustomization = ({ snapshot, viewSnapshot, sales, commandState, customization, scaleMinimumWeightKg, send }) => {
|
|
20
21
|
var _snapshot$activeOpera, _commandState$error, _customization$produc;
|
|
21
22
|
const syncing = snapshot.status === "running" && ((_snapshot$activeOpera = snapshot.activeOperation) === null || _snapshot$activeOpera === void 0 ? void 0 : _snapshot$activeOpera.definitionId) === "product.syncPrimaryWeightedProduct";
|
|
22
23
|
const error = resolveHDLKioskErrorPresentation({
|
|
@@ -31,7 +32,7 @@ const renderCustomization = ({ node, snapshot, viewSnapshot, sales, commandState
|
|
|
31
32
|
errorMessage: error === null || error === void 0 ? void 0 : error.message,
|
|
32
33
|
busy: viewSnapshot.status === "running" && !syncing,
|
|
33
34
|
syncing,
|
|
34
|
-
canGoBack:
|
|
35
|
+
canGoBack: canNavigateBack(snapshot),
|
|
35
36
|
minimumWeightKg: scaleMinimumWeightKg,
|
|
36
37
|
orderBar: createCustomizationOrderBarModel(sales, ((_customization$produc = customization.product) === null || _customization$produc === void 0 ? void 0 : _customization$produc.id) == null ? void 0 : String(customization.product.id)),
|
|
37
38
|
send
|
|
@@ -186,8 +186,8 @@ function FulfillmentScreen({ model, orderBar, send }) {
|
|
|
186
186
|
className: "hdl-floating-bar__button",
|
|
187
187
|
disabled: model.busy,
|
|
188
188
|
onClick: () => send({
|
|
189
|
-
kind: "
|
|
190
|
-
|
|
189
|
+
kind: "navigation",
|
|
190
|
+
direction: "back"
|
|
191
191
|
})
|
|
192
192
|
}, /* @__PURE__ */ React.createElement(BackIcon, null), /* @__PURE__ */ React.createElement("span", null, locales.getText("pisell2.hdl-kiosk.back"))) : void 0,
|
|
193
193
|
summary: /* @__PURE__ */ React.createElement(HDLKioskOrderSummary, {
|
|
@@ -223,8 +223,8 @@ function FulfillmentScreen({ model, orderBar, send }) {
|
|
|
223
223
|
className: "hdl-fulfillment-card",
|
|
224
224
|
disabled: model.busy,
|
|
225
225
|
onClick: () => send({
|
|
226
|
-
kind: "
|
|
227
|
-
|
|
226
|
+
kind: "intent",
|
|
227
|
+
intent: "complete",
|
|
228
228
|
contextPatch: { fulfillment: "dine_in" },
|
|
229
229
|
operationInput: { mode: "dine_in" }
|
|
230
230
|
})
|
|
@@ -233,8 +233,8 @@ function FulfillmentScreen({ model, orderBar, send }) {
|
|
|
233
233
|
className: "hdl-fulfillment-card",
|
|
234
234
|
disabled: model.busy,
|
|
235
235
|
onClick: () => send({
|
|
236
|
-
kind: "
|
|
237
|
-
|
|
236
|
+
kind: "intent",
|
|
237
|
+
intent: "complete",
|
|
238
238
|
contextPatch: { fulfillment: "takeaway" },
|
|
239
239
|
operationInput: { mode: "takeaway" }
|
|
240
240
|
})
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineSlice, effect } from "../../kernel/application/defineSlice.js";
|
|
2
2
|
import { setFulfillmentOperation } from "../../app/operations/fulfillment.js";
|
|
3
3
|
//#region src/components/HDLKiosk/slices/fulfillment/slice.ts
|
|
4
4
|
/** Fulfillment Slice:声明就餐方式完成条件与回退语义;不依赖 React 或 Host 实现。 */
|
|
5
5
|
const fulfillmentSlice = defineSlice({
|
|
6
6
|
id: "fulfillment",
|
|
7
7
|
screen: { id: "fulfillment" },
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}),
|
|
13
|
-
back: back()
|
|
14
|
-
}
|
|
8
|
+
intents: { complete: effect(setFulfillmentOperation, {
|
|
9
|
+
precondition: "fulfillment.selected",
|
|
10
|
+
navigate: "next"
|
|
11
|
+
}) }
|
|
15
12
|
});
|
|
16
13
|
//#endregion
|
|
17
14
|
export { fulfillmentSlice };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHDLKioskBottomBar, useHDLKioskBottomBarController } from "../../../components/shell/HDLKioskBottomBarHost/index.js";
|
|
2
2
|
import { HDLKioskOrderSummary } from "../../../components/shell/HDLKioskOrderSummary/index.js";
|
|
3
|
-
import React, { useMemo } from "react";
|
|
3
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
4
4
|
import { locales } from "@pisell/utils";
|
|
5
5
|
//#region src/components/HDLKiosk/slices/identity/Screen/index.tsx
|
|
6
6
|
const QR_CELLS = Object.freeze(Array.from({ length: 49 }, (_, index) => index * 8 % 5 < 2));
|
|
@@ -8,21 +8,26 @@ const QR_CELLS = Object.freeze(Array.from({ length: 49 }, (_, index) => index *
|
|
|
8
8
|
* Quick Order 的前置会员提示页。
|
|
9
9
|
*
|
|
10
10
|
* 宿主可注入认证 UI;未注入时保留 QR / SMS 视觉 fallback。Skip 继续产生
|
|
11
|
-
* identity.
|
|
11
|
+
* identity.skip Intent,由本地 Exit Policy 同步访客后进入下一步。
|
|
12
12
|
*/
|
|
13
13
|
function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
|
|
14
|
+
const [authBusy, setAuthBusy] = useState(false);
|
|
15
|
+
const busy = model.busy || authBusy;
|
|
16
|
+
const handleAuthBusyChange = useCallback((nextBusy) => {
|
|
17
|
+
setAuthBusy(nextBusy);
|
|
18
|
+
}, []);
|
|
14
19
|
const hasOrder = Boolean(orderBar && orderBar.cartLineCount > 0);
|
|
15
20
|
const { openCart } = useHDLKioskBottomBarController();
|
|
16
21
|
useHDLKioskBottomBar(useMemo(() => ({
|
|
17
22
|
ariaLabel: locales.getText("pisell2.hdl-kiosk.identity-actions-label"),
|
|
18
|
-
cartEnabled: hasOrder && !
|
|
23
|
+
cartEnabled: hasOrder && !busy,
|
|
19
24
|
variant: "composed",
|
|
20
25
|
summary: orderBar ? /* @__PURE__ */ React.createElement(HDLKioskOrderSummary, {
|
|
21
26
|
lineCount: orderBar.cartLineCount,
|
|
22
27
|
totalText: orderBar.totalText,
|
|
23
28
|
detailText: orderBar.totalText ? locales.getText("pisell2.hdl-kiosk.catalog-cart-hint") : orderBar.totalLabel,
|
|
24
29
|
cartAriaLabel: locales.getText("pisell2.hdl-kiosk.cart-drawer-title"),
|
|
25
|
-
disabled:
|
|
30
|
+
disabled: busy || !hasOrder,
|
|
26
31
|
onOpenCart: openCart
|
|
27
32
|
}) : void 0,
|
|
28
33
|
cartOpenBar: hasOrder ? (controller) => ({
|
|
@@ -30,7 +35,7 @@ function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
|
|
|
30
35
|
leading: /* @__PURE__ */ React.createElement("button", {
|
|
31
36
|
type: "button",
|
|
32
37
|
className: "hdl-floating-bar__button",
|
|
33
|
-
disabled:
|
|
38
|
+
disabled: busy,
|
|
34
39
|
onClick: controller.onClose
|
|
35
40
|
}, /* @__PURE__ */ React.createElement("svg", {
|
|
36
41
|
viewBox: "0 0 24 24",
|
|
@@ -38,17 +43,18 @@ function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
|
|
|
38
43
|
}, /* @__PURE__ */ React.createElement("path", { d: "m15 5-7 7 7 7M8 12h10" })), /* @__PURE__ */ React.createElement("span", null, locales.getText("pisell2.hdl-kiosk.back")))
|
|
39
44
|
}) : void 0
|
|
40
45
|
}), [
|
|
46
|
+
busy,
|
|
41
47
|
hasOrder,
|
|
42
|
-
model.busy,
|
|
43
48
|
openCart,
|
|
44
49
|
orderBar
|
|
45
50
|
]));
|
|
46
51
|
const authContent = renderIdentityAuth === null || renderIdentityAuth === void 0 ? void 0 : renderIdentityAuth({
|
|
47
|
-
busy
|
|
52
|
+
busy,
|
|
48
53
|
disabled: model.busy,
|
|
54
|
+
onBusyChange: handleAuthBusyChange,
|
|
49
55
|
onAuthenticated: (customerId) => send({
|
|
50
|
-
kind: "
|
|
51
|
-
|
|
56
|
+
kind: "intent",
|
|
57
|
+
intent: "complete",
|
|
52
58
|
operationInput: { customerId }
|
|
53
59
|
})
|
|
54
60
|
});
|
|
@@ -71,10 +77,10 @@ function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
|
|
|
71
77
|
}, locales.getText("pisell2.hdl-kiosk.login-via-sms"))), /* @__PURE__ */ React.createElement("button", {
|
|
72
78
|
type: "button",
|
|
73
79
|
className: "hdl-identity-screen__skip",
|
|
74
|
-
disabled:
|
|
80
|
+
disabled: busy,
|
|
75
81
|
onClick: () => send({
|
|
76
|
-
kind: "
|
|
77
|
-
|
|
82
|
+
kind: "intent",
|
|
83
|
+
intent: "skip",
|
|
78
84
|
operationInput: {}
|
|
79
85
|
})
|
|
80
86
|
}, locales.getText("pisell2.hdl-kiosk.skip")), model.errorReference ? /* @__PURE__ */ React.createElement("div", {
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { defineSlice, effect } from "../../kernel/application/defineSlice.js";
|
|
2
2
|
import { identitySyncOperation } from "./operation.js";
|
|
3
3
|
//#region src/components/HDLKiosk/slices/identity/slice.ts
|
|
4
|
-
/** Identity Slice:声明身份节点的
|
|
4
|
+
/** Identity Slice:声明身份节点的 Intent 与客户同步 Effect;不依赖 React 或 Host 实现。 */
|
|
5
5
|
const identitySlice = defineSlice({
|
|
6
6
|
id: "identity",
|
|
7
7
|
screen: { id: "identity" },
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} },
|
|
12
|
-
outcomes: {
|
|
13
|
-
memberRecognized: effect(identitySyncOperation, {
|
|
14
|
-
when: "inputPresent",
|
|
15
|
-
navigate: "next"
|
|
16
|
-
}),
|
|
17
|
-
skipped: effect(identitySyncOperation, { navigate: "next" })
|
|
8
|
+
intents: {
|
|
9
|
+
complete: effect(identitySyncOperation, { navigate: "next" }),
|
|
10
|
+
skip: effect(identitySyncOperation, { navigate: "next" })
|
|
18
11
|
}
|
|
19
12
|
});
|
|
20
13
|
//#endregion
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { catalogSlice
|
|
1
|
+
import { catalogSlice } from "./catalog/slice.js";
|
|
2
2
|
import { customizationSlice } from "./customization/slice.js";
|
|
3
3
|
import { fulfillmentSlice } from "./fulfillment/slice.js";
|
|
4
4
|
import { identitySlice } from "./identity/slice.js";
|
|
5
5
|
import { paymentCompletedSlice, paymentMethodSlice } from "./payment/slice.js";
|
|
6
|
+
import { primaryProductPromptSlice } from "./primaryProductPrompt/slice.js";
|
|
6
7
|
//#region src/components/HDLKiosk/slices/index.ts
|
|
7
8
|
const hdlKioskSlices = Object.freeze([
|
|
8
9
|
identitySlice,
|
|
9
10
|
fulfillmentSlice,
|
|
10
11
|
customizationSlice,
|
|
11
12
|
catalogSlice,
|
|
12
|
-
|
|
13
|
+
primaryProductPromptSlice,
|
|
13
14
|
paymentMethodSlice,
|
|
14
15
|
paymentCompletedSlice
|
|
15
16
|
]);
|
|
@@ -42,8 +42,8 @@ function PaymentMethodIcon({ code, type }) {
|
|
|
42
42
|
function CheckoutScreen({ model, orderBar, send }) {
|
|
43
43
|
var _model$paymentFeedbac;
|
|
44
44
|
const goBack = useCallback(() => send({
|
|
45
|
-
kind: "
|
|
46
|
-
|
|
45
|
+
kind: "navigation",
|
|
46
|
+
direction: "back"
|
|
47
47
|
}), [send]);
|
|
48
48
|
const hasOrder = Boolean(orderBar && orderBar.cartLineCount > 0);
|
|
49
49
|
const cartMutable = hasOrder && model.canLeavePayment;
|
|
@@ -174,9 +174,9 @@ function CheckoutScreen({ model, orderBar, send }) {
|
|
|
174
174
|
dismissCurrentFeedback();
|
|
175
175
|
if (eftpos) {
|
|
176
176
|
send({
|
|
177
|
-
kind: "
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
kind: "command",
|
|
178
|
+
command: "checkout.payEftpos",
|
|
179
|
+
input: { paymentMethodId: method.id }
|
|
180
180
|
});
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineSlice, intentPrecondition } from "../../kernel/application/defineSlice.js";
|
|
2
2
|
import { checkoutPayEftposOperation, checkoutRequestStaffPaymentApprovalOperation } from "../../app/operations/checkout.js";
|
|
3
3
|
//#region src/components/HDLKiosk/slices/payment/slice.ts
|
|
4
4
|
/** Payment Slice:声明卡/现金选择、支付派发与 Host 成功确认;支付不确定不作成功处理。 */
|
|
5
5
|
const paymentMethodSlice = defineSlice({
|
|
6
6
|
id: "paymentMethod",
|
|
7
7
|
screen: { id: "checkout" },
|
|
8
|
-
commands: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
8
|
+
commands: {
|
|
9
|
+
payEftpos: checkoutPayEftposOperation,
|
|
10
|
+
requestStaffPaymentApproval: checkoutRequestStaffPaymentApprovalOperation
|
|
11
|
+
},
|
|
12
|
+
intents: { complete: intentPrecondition("payment.succeeded", { navigate: "next" }) }
|
|
14
13
|
});
|
|
15
14
|
/** 支付完成仍复用 Checkout Screen,仅作为 Workflow 的成功终态。 */
|
|
16
15
|
const paymentCompletedSlice = defineSlice({
|
|
17
16
|
id: "paymentCompleted",
|
|
18
17
|
screen: { id: "checkout" },
|
|
19
|
-
|
|
18
|
+
intents: {}
|
|
20
19
|
});
|
|
21
20
|
//#endregion
|
|
22
21
|
export { paymentCompletedSlice, paymentMethodSlice };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineSlice, intentPrecondition } from "../../kernel/application/defineSlice.js";
|
|
2
|
+
//#region src/components/HDLKiosk/slices/primaryProductPrompt/slice.ts
|
|
3
|
+
/** 主商品询问 Slice:只表达是否进入称重定制,不承担 Catalog 页面职责。 */
|
|
4
|
+
const primaryProductPromptSlice = defineSlice({
|
|
5
|
+
id: "primaryProductPrompt",
|
|
6
|
+
screen: { id: "primaryProductPrompt" },
|
|
7
|
+
presentation: "modal",
|
|
8
|
+
intents: {
|
|
9
|
+
complete: intentPrecondition("cart.notEmpty", { navigate: "next" }),
|
|
10
|
+
skip: intentPrecondition("cart.notEmpty")
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { primaryProductPromptSlice };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PrimaryProductPromptDialog } from "../catalog/PrimaryProductPromptDialog/index.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
//#region src/components/HDLKiosk/slices/primaryProductPrompt/view.tsx
|
|
4
|
+
/** 主商品询问展示:将用户选择转换为标准 completed/skipped 结果。 */
|
|
5
|
+
function PrimaryProductPromptView({ busy, send }) {
|
|
6
|
+
return /* @__PURE__ */ React.createElement(PrimaryProductPromptDialog, {
|
|
7
|
+
busy,
|
|
8
|
+
onDecline: () => send({
|
|
9
|
+
kind: "intent",
|
|
10
|
+
intent: "skip"
|
|
11
|
+
}),
|
|
12
|
+
onAccept: () => send({
|
|
13
|
+
kind: "intent",
|
|
14
|
+
intent: "complete"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const renderPrimaryProductPrompt = ({ viewSnapshot, bindActivity }) => /* @__PURE__ */ React.createElement(PrimaryProductPromptView, {
|
|
19
|
+
busy: viewSnapshot.status === "running",
|
|
20
|
+
send: bindActivity("primaryProductPrompt")
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { renderPrimaryProductPrompt };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { canNavigateBack } from "./kernel/workflow/selectors.js";
|
|
1
2
|
import { formatAmount, locales } from "@pisell/utils";
|
|
2
3
|
//#region src/components/HDLKiosk/utils.ts
|
|
3
4
|
function fallbackErrorMessage(surface) {
|
|
@@ -94,8 +95,8 @@ function createActivityScreenModel(screenId, snapshot, node, sales, businessMode
|
|
|
94
95
|
title,
|
|
95
96
|
description,
|
|
96
97
|
busy: snapshot.status === "running",
|
|
97
|
-
canContinue: snapshot.status === "idle" && canReviewCatalog && !placeholderBlocked && Boolean(node.on.
|
|
98
|
-
canGoBack: snapshot.status === "idle" &&
|
|
98
|
+
canContinue: snapshot.status === "idle" && canReviewCatalog && !placeholderBlocked && Boolean(node.on.complete),
|
|
99
|
+
canGoBack: snapshot.status === "idle" && canNavigateBack(snapshot),
|
|
99
100
|
placeholder,
|
|
100
101
|
placeholderBlocked,
|
|
101
102
|
errorMessage: error === null || error === void 0 ? void 0 : error.message,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
+
import "../../../../plus/salesSdk/index.js";
|
|
3
4
|
import dayjs from "dayjs";
|
|
4
5
|
import { useCallback, useEffect, useState } from "react";
|
|
5
6
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -4,6 +4,7 @@ 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";
|
|
7
8
|
import locales_default from "../../locales/index.js";
|
|
8
9
|
import dayjs from "dayjs";
|
|
9
10
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -5,6 +5,7 @@ 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";
|
|
8
9
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
9
10
|
import BigSale from "./index.js";
|
|
10
11
|
import dayjs from "dayjs";
|
|
@@ -4,6 +4,7 @@ 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";
|
|
7
8
|
import { useMemo } from "react";
|
|
8
9
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
9
10
|
/**
|
|
@@ -3,6 +3,7 @@ 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";
|
|
6
7
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
7
8
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
8
9
|
import { seedDineInReservationToCart } from "../../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
@@ -8,6 +8,7 @@ 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";
|
|
11
12
|
import { ResponsiveBigSaleBase } from "./Base.js";
|
|
12
13
|
import { isBigSaleProductSelectionFlowScene, resolveBigSaleSelectionFlowConfig } from "./selectionFlowConfig.js";
|
|
13
14
|
import { isKioskPresentation } from "./templateCapabilities.js";
|
|
@@ -3,7 +3,7 @@ import { _asyncToGenerator } from "../../../../../_virtual/_@oxc-project_runtime
|
|
|
3
3
|
import useEngineContext from "../../../../../hooks/useEngineContext.js";
|
|
4
4
|
import Login2 from "../../../../../pro/Login2.0/Login2.js";
|
|
5
5
|
import Register2 from "../../../../../pro/Login2.0/Register2.js";
|
|
6
|
-
import React, { useMemo, useState } from "react";
|
|
6
|
+
import React, { useEffect, useMemo, useState } from "react";
|
|
7
7
|
//#region src/components/bigSale/templates/HDLKiosk/auth/HDLKioskIdentityAuthPanel.tsx
|
|
8
8
|
/**
|
|
9
9
|
* 文件角色:把 BigSale 的 Login2/Register2 表单适配为 HDLKiosk Identity 认证 UI。
|
|
@@ -136,12 +136,25 @@ function _resolveCustomerFromAuthResult() {
|
|
|
136
136
|
});
|
|
137
137
|
return _resolveCustomerFromAuthResult.apply(this, arguments);
|
|
138
138
|
}
|
|
139
|
-
function HDLKioskIdentityAuthPanel({ context, registerAndLoginModuleName, disabled, onAuthenticated, onAuthError, onCustomerResolved }) {
|
|
139
|
+
function HDLKioskIdentityAuthPanel({ context, registerAndLoginModuleName, disabled, onAuthenticated, onAuthError, onBusyChange, onCustomerResolved }) {
|
|
140
140
|
const engineContext = useEngineContext();
|
|
141
141
|
const [view, setView] = useState("login");
|
|
142
142
|
const [submitting, setSubmitting] = useState(false);
|
|
143
|
+
const [authLoading, setAuthLoading] = useState(false);
|
|
143
144
|
const loginConfig = useMemo(buildLoginConfig, []);
|
|
144
145
|
const registerConfig = useMemo(buildRegisterConfig, []);
|
|
146
|
+
useEffect(() => {
|
|
147
|
+
onBusyChange === null || onBusyChange === void 0 || onBusyChange(submitting || authLoading);
|
|
148
|
+
}, [
|
|
149
|
+
authLoading,
|
|
150
|
+
onBusyChange,
|
|
151
|
+
submitting
|
|
152
|
+
]);
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
return () => {
|
|
155
|
+
onBusyChange === null || onBusyChange === void 0 || onBusyChange(false);
|
|
156
|
+
};
|
|
157
|
+
}, [onBusyChange]);
|
|
145
158
|
const completeWithCustomer = function() {
|
|
146
159
|
var _ref11 = _asyncToGenerator(function* (originResult, _method, authFormData) {
|
|
147
160
|
if (submitting || disabled || !registerAndLoginModuleName) return;
|
|
@@ -175,6 +188,7 @@ function HDLKioskIdentityAuthPanel({ context, registerAndLoginModuleName, disabl
|
|
|
175
188
|
config: loginConfig,
|
|
176
189
|
visible: true,
|
|
177
190
|
registerAndLoginModuleName,
|
|
191
|
+
onLoadingChange: setAuthLoading,
|
|
178
192
|
onSwitchToRegister: () => setView("register"),
|
|
179
193
|
onLogin: completeWithCustomer,
|
|
180
194
|
onError: onAuthError
|
|
@@ -182,6 +196,7 @@ function HDLKioskIdentityAuthPanel({ context, registerAndLoginModuleName, disabl
|
|
|
182
196
|
config: registerConfig,
|
|
183
197
|
visible: true,
|
|
184
198
|
registerAndLoginModuleName,
|
|
199
|
+
onLoadingChange: setAuthLoading,
|
|
185
200
|
onGoToLogin: () => setView("login"),
|
|
186
201
|
onRegister: completeWithCustomer,
|
|
187
202
|
onError: onAuthError
|
|
@@ -6,6 +6,7 @@ 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";
|
|
9
10
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
10
11
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
11
12
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -2,6 +2,7 @@ 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";
|
|
5
6
|
import { useEffect, useRef } from "react";
|
|
6
7
|
import { useMemoizedFn } from "ahooks";
|
|
7
8
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
package/es/index.js
CHANGED
|
@@ -86,6 +86,7 @@ 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";
|
|
89
90
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
90
91
|
import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
|
|
91
92
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
@@ -138,6 +139,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
138
139
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
139
140
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
140
141
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
142
|
+
import "./plus/pisellReservation/index.js";
|
|
141
143
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
142
144
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
143
145
|
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, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, 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, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, 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, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./serve/formResourcePage.js";
|
|
2
|
+
import "./floorRoomCard/mapRowToFloorRoomCardData.js";
|
|
3
|
+
import "./floorRoomCard/ReservationFloorRoomCard.js";
|
|
4
|
+
import "./floorMap/reservationMock.js";
|
|
5
|
+
import "./floorMap/floorPlanApi.js";
|
|
6
|
+
import "./reservationConstants.js";
|
|
7
|
+
import "./data/bookingToReservationTables.js";
|
|
8
|
+
import "./data/formResourceToReservationTables.js";
|
|
9
|
+
import "./data/salesEmbeddedResourceToTableRows.js";
|
|
10
|
+
import "./floorMap/reservationCards.js";
|
|
11
|
+
import "./PisellReservation.js";
|
|
12
|
+
import "./PisellReservationBookingPage.js";
|
|
13
|
+
import "./PisellVenueControlPage.js";
|
|
14
|
+
import "./PisellVenueWallPage.js";
|
|
15
|
+
import "./PisellReservationTablePage.js";
|
|
16
|
+
import "./components/SelectFloorMapResourceDialog.js";
|
|
17
|
+
export {};
|
|
@@ -11,6 +11,7 @@ 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";
|
|
14
15
|
import locales_default from "./locales.js";
|
|
15
16
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
16
17
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import { useMemo } from "react";
|
|
5
6
|
import { useMemoizedFn } from "ahooks";
|
|
6
7
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -9,6 +9,7 @@ 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";
|
|
12
13
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
13
14
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
14
15
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -3,6 +3,7 @@ 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";
|
|
6
7
|
import React, { memo, useMemo } from "react";
|
|
7
8
|
import { formatAmount, locales } from "@pisell/utils";
|
|
8
9
|
import Decimal from "decimal.js";
|