@pisell/private-materials 6.12.167 → 6.12.169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/HDLKiosk/{contracts → app/contracts}/config.js +1 -1
- package/es/components/HDLKiosk/app/manifest.js +11 -11
- package/es/components/HDLKiosk/app/operations.js +92 -0
- package/es/components/HDLKiosk/app/workflow/barcode.js +11 -13
- package/es/components/HDLKiosk/app/workflow/index.js +16 -0
- package/es/components/HDLKiosk/app/workflow/predicates.js +1 -1
- package/es/components/HDLKiosk/app/workflow/quick.js +1 -1
- package/es/components/HDLKiosk/app/workflow/registry.js +4 -4
- package/es/components/HDLKiosk/app/workflow/scale.js +5 -1
- package/es/components/HDLKiosk/docs/00-/346/226/207/344/273/266/345/257/274/350/210/252.md +104 -167
- 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 +105 -101
- 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/04-/350/256/276/345/244/207/344/270/216/347/247/260/351/207/215.md +43 -26
- package/es/components/HDLKiosk/docs/05-/344/272/244/346/230/223/345/256/211/345/205/250.md +2 -0
- 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/08-/346/227/240/345/244/264Application/350/277/220/350/241/214/346/227/266/351/207/215/346/236/204/350/256/276/350/256/241.md +719 -0
- package/es/components/HDLKiosk/docs/09-Entry/350/256/276/345/244/207/344/272/213/344/273/266/351/207/215/346/236/204/344/277/256/345/244/215/346/212/245/345/221/212.md +187 -0
- package/es/components/HDLKiosk/docs/README.md +6 -2
- package/es/components/HDLKiosk/docs//345/256/236/346/226/275/350/277/233/345/272/246.md +8 -7
- package/es/components/HDLKiosk/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +16 -18
- package/es/components/HDLKiosk/index.js +22 -28
- package/es/components/HDLKiosk/index.less +1 -1
- package/es/components/HDLKiosk/kernel/README.md +14 -13
- package/es/components/HDLKiosk/kernel/application/defineApplication.js +63 -24
- package/es/components/HDLKiosk/kernel/application/defineSlice.js +6 -6
- package/es/components/HDLKiosk/kernel/application/runtime.js +237 -0
- package/es/components/HDLKiosk/kernel/operations/coordinator.js +1 -1
- package/es/components/HDLKiosk/kernel/operations/registry.js +3 -3
- package/es/components/HDLKiosk/kernel/operations/sessionEpoch.js +1 -1
- package/es/components/HDLKiosk/kernel/operations/types.js +7 -3
- package/es/components/HDLKiosk/kernel/workflow/actor.js +51 -22
- package/es/components/HDLKiosk/kernel/workflow/compiler.js +23 -30
- package/es/components/HDLKiosk/runtime/createRuntime.js +238 -0
- package/es/components/HDLKiosk/{devices → runtime/devices}/dedupeStore.js +1 -1
- package/es/components/HDLKiosk/{devices → runtime/devices}/scaleIngress.js +1 -1
- package/es/components/HDLKiosk/{devices/scale/runtime.js → runtime/devices/scaleStore.js} +18 -24
- package/es/components/HDLKiosk/{devices → runtime/devices}/scannerIngress.js +1 -1
- package/es/components/HDLKiosk/runtime/devices/scannerSessionPort.js +60 -0
- package/es/components/HDLKiosk/runtime/devices/scannerSessionRouter.js +212 -0
- package/es/components/HDLKiosk/runtime/operations/barcode.js +18 -0
- package/es/components/HDLKiosk/runtime/operations/cart.js +44 -0
- package/es/components/HDLKiosk/{app → runtime}/operations/cartConsistency.js +1 -1
- package/es/components/HDLKiosk/{app → runtime}/operations/checkout.js +95 -110
- package/es/components/HDLKiosk/{app → runtime}/operations/checkoutRequirements.js +1 -1
- package/es/components/HDLKiosk/{app → runtime}/operations/checkoutSafety.js +1 -1
- package/es/components/HDLKiosk/{app → runtime}/operations/coordinator.js +2 -2
- package/es/components/HDLKiosk/runtime/operations/customization.js +70 -0
- package/es/components/HDLKiosk/{app → runtime}/operations/errors.js +1 -1
- package/es/components/HDLKiosk/runtime/operations/fulfillment.js +6 -0
- package/es/components/HDLKiosk/runtime/operations/identity.js +55 -0
- package/es/components/HDLKiosk/runtime/operations/registry.js +34 -0
- package/es/components/HDLKiosk/runtime/operations/session.js +29 -0
- package/es/components/HDLKiosk/runtime/operations/types.js +13 -0
- package/es/components/HDLKiosk/runtime/session/blockPolicy.js +14 -0
- package/es/components/HDLKiosk/runtime/{createWorkflowSession.js → session/createSession.js} +67 -17
- package/es/components/HDLKiosk/runtime/{domainTransitionRunner.js → session/transitionRunner.js} +10 -5
- package/es/components/HDLKiosk/runtime/{workflowContext.js → session/workflowContext.js} +2 -2
- package/es/components/HDLKiosk/runtime/{workflowLifecycle.js → session/workflowLifecycle.js} +2 -2
- package/es/components/HDLKiosk/runtime/triggers.js +28 -0
- package/es/components/HDLKiosk/slices/catalog/Screen/index.js +15 -8
- package/es/components/HDLKiosk/slices/catalog/Screen/index.less +74 -13
- package/es/components/HDLKiosk/slices/catalog/slice.js +2 -2
- package/es/components/HDLKiosk/slices/customization/Screen/index.js +37 -38
- package/es/components/HDLKiosk/slices/customization/Screen/index.less +5 -0
- package/es/components/HDLKiosk/slices/customization/slice.js +3 -4
- package/es/components/HDLKiosk/slices/fulfillment/slice.js +2 -2
- package/es/components/HDLKiosk/slices/fulfillment/view.js +1 -1
- package/es/components/HDLKiosk/slices/identity/Screen/index.js +2 -2
- package/es/components/HDLKiosk/slices/identity/slice.js +3 -3
- package/es/components/HDLKiosk/slices/identity/view.js +1 -1
- package/es/components/HDLKiosk/slices/payment/slice.js +3 -3
- package/es/components/HDLKiosk/slices/primaryProductPrompt/slice.js +2 -2
- package/es/components/HDLKiosk/slices/primaryProductPrompt/view.js +2 -2
- package/es/components/HDLKiosk/{runtime → ui}/HDLKioskWorkflowView.js +45 -131
- package/es/components/HDLKiosk/ui/ScaleSimulatorConsole/index.js +387 -0
- package/es/components/HDLKiosk/ui/ScaleSimulatorConsole/index.less +621 -0
- package/es/components/HDLKiosk/{app → ui}/ScreenRenderer.js +7 -7
- package/es/components/HDLKiosk/ui/controllers/useHDLKioskActionDispatcher.js +66 -0
- package/es/components/HDLKiosk/{runtime → ui}/controllers/useHDLKioskCustomerController.js +1 -1
- package/es/components/HDLKiosk/ui/controllers/useHDLKioskDeviceController.js +25 -0
- package/es/components/HDLKiosk/ui/controllers/useHDLKioskExitController.js +53 -0
- package/es/components/HDLKiosk/{runtime → ui}/controllers/useHDLKioskScreenData.js +1 -1
- package/es/components/HDLKiosk/ui/controllers/useHDLKioskSessionController.js +39 -0
- package/es/components/HDLKiosk/{app → ui}/entry/Screen/index.js +8 -6
- package/es/components/HDLKiosk/{app → ui}/entry/model.js +2 -2
- package/es/components/HDLKiosk/ui/scale.js +20 -0
- package/es/components/HDLKiosk/{runtime/useHostSnapshot.js → ui/snapshots.js} +6 -8
- package/es/components/HDLKiosk/{app → ui}/views.js +1 -1
- package/es/components/HDLKiosk/{runtime → ui}/workflowEvent.js +1 -1
- package/es/components/HDLKiosk/utils.js +4 -4
- package/es/components/bigSale/templates/HDLKiosk/adapter/HDLKioskPaymentRuntime.js +2 -1
- package/es/components/bigSale/templates/HDLKiosk/adapter/capabilities.js +1 -1
- package/es/components/bigSale/templates/HDLKiosk/adapter/projection.js +21 -11
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales.js +21 -3
- package/es/components/bigSale/templates/HDLKiosk/adapter/scaleTrigger.js +20 -5
- package/es/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +3 -0
- package/es/components/bigSale/templates/HDLKiosk/index.js +3 -3
- package/lib/components/HDLKiosk/{contracts → app/contracts}/config.js +1 -1
- package/lib/components/HDLKiosk/app/manifest.js +18 -19
- package/lib/components/HDLKiosk/app/operations.js +105 -0
- package/lib/components/HDLKiosk/app/workflow/barcode.js +11 -13
- package/lib/components/HDLKiosk/app/workflow/index.js +16 -0
- package/lib/components/HDLKiosk/app/workflow/predicates.js +1 -0
- package/lib/components/HDLKiosk/app/workflow/quick.js +1 -1
- package/lib/components/HDLKiosk/app/workflow/registry.js +3 -3
- package/lib/components/HDLKiosk/app/workflow/scale.js +5 -1
- package/lib/components/HDLKiosk/docs/00-/346/226/207/344/273/266/345/257/274/350/210/252.md +104 -167
- 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 +105 -101
- 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/04-/350/256/276/345/244/207/344/270/216/347/247/260/351/207/215.md +43 -26
- package/lib/components/HDLKiosk/docs/05-/344/272/244/346/230/223/345/256/211/345/205/250.md +2 -0
- 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/08-/346/227/240/345/244/264Application/350/277/220/350/241/214/346/227/266/351/207/215/346/236/204/350/256/276/350/256/241.md +719 -0
- package/lib/components/HDLKiosk/docs/09-Entry/350/256/276/345/244/207/344/272/213/344/273/266/351/207/215/346/236/204/344/277/256/345/244/215/346/212/245/345/221/212.md +187 -0
- package/lib/components/HDLKiosk/docs/README.md +6 -2
- package/lib/components/HDLKiosk/docs//345/256/236/346/226/275/350/277/233/345/272/246.md +8 -7
- package/lib/components/HDLKiosk/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +16 -18
- package/lib/components/HDLKiosk/index.js +25 -31
- package/lib/components/HDLKiosk/index.less +1 -1
- package/lib/components/HDLKiosk/kernel/README.md +14 -13
- package/lib/components/HDLKiosk/kernel/application/defineApplication.js +65 -25
- package/lib/components/HDLKiosk/kernel/application/defineSlice.js +6 -6
- package/lib/components/HDLKiosk/kernel/application/runtime.js +237 -0
- package/lib/components/HDLKiosk/kernel/operations/coordinator.js +1 -1
- package/lib/components/HDLKiosk/kernel/operations/registry.js +3 -3
- package/lib/components/HDLKiosk/kernel/operations/sessionEpoch.js +1 -1
- package/lib/components/HDLKiosk/kernel/operations/types.js +8 -3
- package/lib/components/HDLKiosk/kernel/workflow/actor.js +51 -22
- package/lib/components/HDLKiosk/kernel/workflow/compiler.js +23 -30
- package/lib/components/HDLKiosk/runtime/createRuntime.js +239 -0
- package/lib/components/HDLKiosk/{devices → runtime/devices}/dedupeStore.js +1 -1
- package/lib/components/HDLKiosk/{devices → runtime/devices}/scaleIngress.js +1 -1
- package/lib/components/HDLKiosk/{devices/scale/runtime.js → runtime/devices/scaleStore.js} +17 -27
- package/lib/components/HDLKiosk/{devices → runtime/devices}/scannerIngress.js +1 -1
- package/lib/components/HDLKiosk/runtime/devices/scannerSessionPort.js +60 -0
- package/lib/components/HDLKiosk/runtime/devices/scannerSessionRouter.js +212 -0
- package/lib/components/HDLKiosk/runtime/operations/barcode.js +17 -0
- package/lib/components/HDLKiosk/runtime/operations/cart.js +46 -0
- package/lib/components/HDLKiosk/{app → runtime}/operations/cartConsistency.js +1 -1
- package/lib/components/HDLKiosk/{app → runtime}/operations/checkout.js +97 -112
- package/lib/components/HDLKiosk/{app → runtime}/operations/checkoutRequirements.js +1 -1
- package/lib/components/HDLKiosk/{app → runtime}/operations/checkoutSafety.js +1 -1
- package/lib/components/HDLKiosk/{app → runtime}/operations/coordinator.js +2 -2
- package/lib/components/HDLKiosk/runtime/operations/customization.js +73 -0
- package/lib/components/HDLKiosk/{app → runtime}/operations/errors.js +1 -1
- package/lib/components/HDLKiosk/runtime/operations/fulfillment.js +5 -0
- package/lib/components/HDLKiosk/runtime/operations/identity.js +55 -0
- package/lib/components/HDLKiosk/runtime/operations/registry.js +34 -0
- package/lib/components/HDLKiosk/runtime/operations/session.js +30 -0
- package/lib/components/HDLKiosk/runtime/operations/types.js +14 -0
- package/lib/components/HDLKiosk/runtime/session/blockPolicy.js +14 -0
- package/lib/components/HDLKiosk/runtime/{createWorkflowSession.js → session/createSession.js} +71 -21
- package/lib/components/HDLKiosk/runtime/{domainTransitionRunner.js → session/transitionRunner.js} +10 -5
- package/lib/components/HDLKiosk/runtime/{workflowContext.js → session/workflowContext.js} +2 -2
- package/lib/components/HDLKiosk/runtime/{workflowLifecycle.js → session/workflowLifecycle.js} +2 -2
- package/lib/components/HDLKiosk/runtime/triggers.js +28 -0
- package/lib/components/HDLKiosk/slices/catalog/Screen/index.js +15 -8
- package/lib/components/HDLKiosk/slices/catalog/Screen/index.less +74 -13
- package/lib/components/HDLKiosk/slices/catalog/slice.js +3 -3
- package/lib/components/HDLKiosk/slices/customization/Screen/index.js +38 -39
- package/lib/components/HDLKiosk/slices/customization/Screen/index.less +5 -0
- package/lib/components/HDLKiosk/slices/customization/slice.js +5 -6
- package/lib/components/HDLKiosk/slices/fulfillment/slice.js +3 -3
- package/lib/components/HDLKiosk/slices/fulfillment/view.js +1 -1
- package/lib/components/HDLKiosk/slices/identity/Screen/index.js +2 -2
- package/lib/components/HDLKiosk/slices/identity/slice.js +4 -4
- package/lib/components/HDLKiosk/slices/identity/view.js +1 -1
- package/lib/components/HDLKiosk/slices/payment/slice.js +5 -5
- package/lib/components/HDLKiosk/slices/primaryProductPrompt/slice.js +2 -2
- package/lib/components/HDLKiosk/slices/primaryProductPrompt/view.js +2 -2
- package/lib/components/HDLKiosk/{runtime → ui}/HDLKioskWorkflowView.js +46 -132
- package/lib/components/HDLKiosk/ui/ScaleSimulatorConsole/index.js +390 -0
- package/lib/components/HDLKiosk/ui/ScaleSimulatorConsole/index.less +621 -0
- package/lib/components/HDLKiosk/{app → ui}/ScreenRenderer.js +7 -7
- package/lib/components/HDLKiosk/ui/controllers/useHDLKioskActionDispatcher.js +67 -0
- package/lib/components/HDLKiosk/{runtime → ui}/controllers/useHDLKioskCustomerController.js +1 -1
- package/lib/components/HDLKiosk/ui/controllers/useHDLKioskDeviceController.js +26 -0
- package/lib/components/HDLKiosk/ui/controllers/useHDLKioskExitController.js +54 -0
- package/lib/components/HDLKiosk/{runtime → ui}/controllers/useHDLKioskScreenData.js +1 -1
- package/lib/components/HDLKiosk/ui/controllers/useHDLKioskSessionController.js +40 -0
- package/lib/components/HDLKiosk/{app → ui}/entry/Screen/index.js +8 -6
- package/lib/components/HDLKiosk/{app → ui}/entry/model.js +2 -2
- package/lib/components/HDLKiosk/ui/scale.js +24 -0
- package/lib/components/HDLKiosk/{runtime/useHostSnapshot.js → ui/snapshots.js} +6 -7
- package/lib/components/HDLKiosk/{app → ui}/views.js +1 -1
- package/lib/components/HDLKiosk/{runtime → ui}/workflowEvent.js +1 -1
- package/lib/components/HDLKiosk/utils.js +4 -4
- package/lib/components/bigSale/templates/HDLKiosk/adapter/HDLKioskPaymentRuntime.js +2 -1
- package/lib/components/bigSale/templates/HDLKiosk/adapter/capabilities.js +1 -1
- package/lib/components/bigSale/templates/HDLKiosk/adapter/projection.js +21 -10
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales.js +20 -2
- package/lib/components/bigSale/templates/HDLKiosk/adapter/scaleTrigger.js +19 -4
- package/lib/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +3 -0
- package/lib/components/bigSale/templates/HDLKiosk/index.js +4 -4
- package/package.json +2 -2
- package/es/components/HDLKiosk/app/constants.js +0 -9
- package/es/components/HDLKiosk/app/operations/barcode.js +0 -22
- package/es/components/HDLKiosk/app/operations/cart.js +0 -60
- package/es/components/HDLKiosk/app/operations/fulfillment.js +0 -11
- package/es/components/HDLKiosk/app/operations/session.js +0 -41
- package/es/components/HDLKiosk/app/operations/types.js +0 -11
- package/es/components/HDLKiosk/devices/entryArbiter.js +0 -33
- package/es/components/HDLKiosk/runtime/controllers/useHDLKioskDeviceController.js +0 -75
- package/es/components/HDLKiosk/runtime/controllers/useHDLKioskScannerController.js +0 -160
- package/es/components/HDLKiosk/runtime/controllers/useHDLKioskSessionController.js +0 -185
- package/es/components/HDLKiosk/runtime/useWorkflowSnapshot.js +0 -12
- package/es/components/HDLKiosk/slices/customization/operation.js +0 -80
- package/es/components/HDLKiosk/slices/identity/operation.js +0 -60
- package/lib/components/HDLKiosk/app/constants.js +0 -9
- package/lib/components/HDLKiosk/app/operations/barcode.js +0 -21
- package/lib/components/HDLKiosk/app/operations/cart.js +0 -62
- package/lib/components/HDLKiosk/app/operations/fulfillment.js +0 -10
- package/lib/components/HDLKiosk/app/operations/session.js +0 -42
- package/lib/components/HDLKiosk/app/operations/types.js +0 -12
- package/lib/components/HDLKiosk/devices/entryArbiter.js +0 -33
- package/lib/components/HDLKiosk/runtime/controllers/useHDLKioskDeviceController.js +0 -76
- package/lib/components/HDLKiosk/runtime/controllers/useHDLKioskScannerController.js +0 -161
- package/lib/components/HDLKiosk/runtime/controllers/useHDLKioskSessionController.js +0 -186
- package/lib/components/HDLKiosk/runtime/useWorkflowSnapshot.js +0 -13
- package/lib/components/HDLKiosk/slices/customization/operation.js +0 -83
- package/lib/components/HDLKiosk/slices/identity/operation.js +0 -60
- /package/es/components/HDLKiosk/{app → ui}/entry/Screen/index.less +0 -0
- /package/lib/components/HDLKiosk/{app → ui}/entry/Screen/index.less +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
.pisell-hdl-kiosk {
|
|
2
2
|
.hdl-catalog-screen {
|
|
3
|
+
--hdl-catalog-menu-font-level-1: 24px;
|
|
4
|
+
--hdl-catalog-menu-font-level-2: 20px;
|
|
5
|
+
--hdl-catalog-menu-font-level-3: 18px;
|
|
3
6
|
position: relative;
|
|
4
7
|
width: 100%;
|
|
5
8
|
height: 100%;
|
|
@@ -9,16 +12,14 @@
|
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
.hdl-catalog-layout {
|
|
12
|
-
display:
|
|
15
|
+
display: flex;
|
|
13
16
|
width: 100%;
|
|
14
17
|
height: 100%;
|
|
15
18
|
min-height: 0;
|
|
16
|
-
grid-template-columns: clamp(96px, 18vw, 180px) minmax(0, 1fr);
|
|
17
19
|
overflow: hidden;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
.hdl-catalog-layout > .pisell-kiosk-category-sidebar {
|
|
21
|
-
width: 100%;
|
|
22
23
|
border-right-color: rgba(255, 255, 255, 0.1);
|
|
23
24
|
background: #202735;
|
|
24
25
|
--pisell-kiosk-cart-capsule-reserved-space: max(
|
|
@@ -49,14 +50,17 @@
|
|
|
49
50
|
.pisell-kiosk-category-sidebar__tabbar
|
|
50
51
|
.text-card {
|
|
51
52
|
box-sizing: border-box;
|
|
53
|
+
min-height: 80px !important;
|
|
52
54
|
justify-content: flex-start !important;
|
|
55
|
+
gap: 10px !important;
|
|
53
56
|
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
54
57
|
border-radius: 14px !important;
|
|
58
|
+
padding: 10px 16px !important;
|
|
55
59
|
background: rgba(255, 255, 255, 0.06) !important;
|
|
56
60
|
color: rgba(255, 255, 255, 0.78) !important;
|
|
57
|
-
font-size:
|
|
58
|
-
font-weight:
|
|
59
|
-
line-height: 1.
|
|
61
|
+
font-size: var(--hdl-catalog-menu-font-level-1);
|
|
62
|
+
font-weight: 850;
|
|
63
|
+
line-height: 1.15;
|
|
60
64
|
text-align: left;
|
|
61
65
|
}
|
|
62
66
|
|
|
@@ -65,9 +69,9 @@
|
|
|
65
69
|
.text-card
|
|
66
70
|
.text-card__content {
|
|
67
71
|
color: rgba(255, 255, 255, 0.78) !important;
|
|
68
|
-
font-size:
|
|
69
|
-
font-weight:
|
|
70
|
-
line-height: 1.
|
|
72
|
+
font-size: var(--hdl-catalog-menu-font-level-1) !important;
|
|
73
|
+
font-weight: 850 !important;
|
|
74
|
+
line-height: 1.15;
|
|
71
75
|
text-align: left !important;
|
|
72
76
|
}
|
|
73
77
|
|
|
@@ -84,6 +88,16 @@
|
|
|
84
88
|
.text-card
|
|
85
89
|
.anticon {
|
|
86
90
|
color: rgba(255, 255, 255, 0.86) !important;
|
|
91
|
+
font-size: 24px !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.hdl-catalog-layout
|
|
95
|
+
.pisell-kiosk-category-sidebar__tabbar
|
|
96
|
+
.text-card
|
|
97
|
+
.text-card__icon
|
|
98
|
+
img {
|
|
99
|
+
width: 24px !important;
|
|
100
|
+
height: 24px !important;
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
.hdl-catalog-layout
|
|
@@ -130,10 +144,14 @@
|
|
|
130
144
|
.pisell-kiosk-category-sidebar__tabbar
|
|
131
145
|
.pisell-tabbar__level--2
|
|
132
146
|
.text-card {
|
|
147
|
+
min-height: 68px !important;
|
|
148
|
+
gap: 8px !important;
|
|
133
149
|
border-radius: 12px !important;
|
|
150
|
+
padding: 8px 14px !important;
|
|
134
151
|
background: transparent !important;
|
|
135
|
-
font-size:
|
|
152
|
+
font-size: var(--hdl-catalog-menu-font-level-2);
|
|
136
153
|
font-weight: 850;
|
|
154
|
+
line-height: 1.15;
|
|
137
155
|
}
|
|
138
156
|
|
|
139
157
|
.hdl-catalog-layout
|
|
@@ -141,18 +159,23 @@
|
|
|
141
159
|
.pisell-tabbar__level--2
|
|
142
160
|
.text-card
|
|
143
161
|
.text-card__content {
|
|
144
|
-
font-size:
|
|
162
|
+
font-size: var(--hdl-catalog-menu-font-level-2) !important;
|
|
145
163
|
font-weight: 850 !important;
|
|
164
|
+
line-height: 1.15;
|
|
146
165
|
}
|
|
147
166
|
|
|
148
167
|
.hdl-catalog-layout
|
|
149
168
|
.pisell-kiosk-category-sidebar__tabbar
|
|
150
169
|
.pisell-tabbar__level--3
|
|
151
170
|
.text-card {
|
|
171
|
+
min-height: 60px !important;
|
|
172
|
+
gap: 8px !important;
|
|
152
173
|
border-radius: 10px !important;
|
|
174
|
+
padding: 7px 12px !important;
|
|
153
175
|
background: transparent !important;
|
|
154
|
-
font-size:
|
|
176
|
+
font-size: var(--hdl-catalog-menu-font-level-3);
|
|
155
177
|
font-weight: 800;
|
|
178
|
+
line-height: 1.15;
|
|
156
179
|
}
|
|
157
180
|
|
|
158
181
|
.hdl-catalog-layout
|
|
@@ -160,8 +183,45 @@
|
|
|
160
183
|
.pisell-tabbar__level--3
|
|
161
184
|
.text-card
|
|
162
185
|
.text-card__content {
|
|
163
|
-
font-size:
|
|
186
|
+
font-size: var(--hdl-catalog-menu-font-level-3) !important;
|
|
164
187
|
font-weight: 800 !important;
|
|
188
|
+
line-height: 1.15;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.hdl-catalog-layout
|
|
192
|
+
.pisell-kiosk-category-sidebar__tabbar
|
|
193
|
+
.pisell-tabbar__level--2
|
|
194
|
+
.text-card
|
|
195
|
+
:is(.pisell-icon, .iconfont, .anticon) {
|
|
196
|
+
font-size: 20px !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.hdl-catalog-layout
|
|
200
|
+
.pisell-kiosk-category-sidebar__tabbar
|
|
201
|
+
.pisell-tabbar__level--2
|
|
202
|
+
.text-card
|
|
203
|
+
.text-card__icon
|
|
204
|
+
img {
|
|
205
|
+
width: 20px !important;
|
|
206
|
+
height: 20px !important;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.hdl-catalog-layout
|
|
210
|
+
.pisell-kiosk-category-sidebar__tabbar
|
|
211
|
+
.pisell-tabbar__level--3
|
|
212
|
+
.text-card
|
|
213
|
+
:is(.pisell-icon, .iconfont, .anticon) {
|
|
214
|
+
font-size: 18px !important;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.hdl-catalog-layout
|
|
218
|
+
.pisell-kiosk-category-sidebar__tabbar
|
|
219
|
+
.pisell-tabbar__level--3
|
|
220
|
+
.text-card
|
|
221
|
+
.text-card__icon
|
|
222
|
+
img {
|
|
223
|
+
width: 18px !important;
|
|
224
|
+
height: 18px !important;
|
|
165
225
|
}
|
|
166
226
|
|
|
167
227
|
.hdl-catalog-layout
|
|
@@ -206,6 +266,7 @@
|
|
|
206
266
|
.hdl-catalog-main {
|
|
207
267
|
position: relative;
|
|
208
268
|
display: flex;
|
|
269
|
+
flex: 1 1 0;
|
|
209
270
|
min-width: 0;
|
|
210
271
|
min-height: 0;
|
|
211
272
|
flex-direction: column;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_defineSlice = require("../../kernel/application/defineSlice.js");
|
|
2
|
-
const
|
|
2
|
+
const require_operations = require("../../app/operations.js");
|
|
3
3
|
//#region src/components/HDLKiosk/slices/catalog/slice.ts
|
|
4
4
|
/** Catalog Slice:声明补充商品加购;商品浏览动作不进入 Workflow。 */
|
|
5
5
|
const catalogSlice = require_defineSlice.defineSlice({
|
|
6
6
|
id: "catalog",
|
|
7
|
-
|
|
8
|
-
commands: { addProduct:
|
|
7
|
+
surface: { id: "catalog" },
|
|
8
|
+
commands: { addProduct: require_operations.cartAddProductOperation },
|
|
9
9
|
intents: { complete: require_defineSlice.intentPrecondition("cart.notEmpty", { navigate: "next" }) }
|
|
10
10
|
});
|
|
11
11
|
//#endregion
|
|
@@ -1,12 +1,12 @@
|
|
|
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
3
|
const require_asyncToGenerator = require("../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js");
|
|
4
|
-
const require_runtime$1 = require("../../../devices/scale/runtime.js");
|
|
5
4
|
const require_index = require("../../../components/shell/HDLKioskBottomBarHost/index.js");
|
|
6
5
|
const require_index$1 = require("../../../components/shell/HDLKioskOrderSummary/index.js");
|
|
7
6
|
const require_model = require("../../../components/common/HDLKioskSkuOptionsSelection/model.js");
|
|
8
7
|
const require_index$2 = require("../../../components/common/HDLKioskSkuOptionsSelection/index.js");
|
|
9
8
|
const require_product = require("../../../product.js");
|
|
9
|
+
const require_scale = require("../../../ui/scale.js");
|
|
10
10
|
let react = require("react");
|
|
11
11
|
react = require_runtime.__toESM(react);
|
|
12
12
|
let _pisell_utils = require("@pisell/utils");
|
|
@@ -30,13 +30,10 @@ function getScaleStatusText(scale) {
|
|
|
30
30
|
if (scale.error) return _pisell_utils.locales.getText("pisell2.hdl-kiosk.scale-reading-error");
|
|
31
31
|
if (scale.connectionState === "disconnected") return _pisell_utils.locales.getText("pisell2.hdl-kiosk.scale-disconnected");
|
|
32
32
|
if (scale.connectionState !== "connected" || !scale.isListening) return _pisell_utils.locales.getText("pisell2.hdl-kiosk.scale-connecting");
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
case "unstable":
|
|
38
|
-
case null: return _pisell_utils.locales.getText("pisell2.hdl-kiosk.scale-unstable");
|
|
39
|
-
}
|
|
33
|
+
if (scale.status === "overload") return _pisell_utils.locales.getText("pisell2.hdl-kiosk.scale-overload");
|
|
34
|
+
if (scale.status === "negative") return _pisell_utils.locales.getText("pisell2.hdl-kiosk.scale-negative");
|
|
35
|
+
if (!scale.hasLiveSample) return _pisell_utils.locales.getText("pisell2.hdl-kiosk.scale-connecting");
|
|
36
|
+
return _pisell_utils.locales.getText(scale.status === "stable" ? "pisell2.hdl-kiosk.scale-stable" : "pisell2.hdl-kiosk.scale-unstable");
|
|
40
37
|
}
|
|
41
38
|
function initialSelections(product) {
|
|
42
39
|
if (!product) return [];
|
|
@@ -74,6 +71,19 @@ function formatMoney(value, currencySymbol) {
|
|
|
74
71
|
const amount = value.toDecimalPlaces(2).toNumber();
|
|
75
72
|
return String((0, _pisell_utils.formatAmount)(amount, 2, currencySymbol || ""));
|
|
76
73
|
}
|
|
74
|
+
function resolveScaleMeasurement(scale, productFacts, minimumWeightKg) {
|
|
75
|
+
var _scale$grossWeightKg, _productFacts$fixedTa, _productFacts$fixedTa2;
|
|
76
|
+
const gross = new decimal_js.default((_scale$grossWeightKg = scale.grossWeightKg) !== null && _scale$grossWeightKg !== void 0 ? _scale$grossWeightKg : NaN);
|
|
77
|
+
const tare = (_productFacts$fixedTa = productFacts === null || productFacts === void 0 || (_productFacts$fixedTa2 = productFacts.fixedTare) === null || _productFacts$fixedTa2 === void 0 ? void 0 : _productFacts$fixedTa2.valueKg) !== null && _productFacts$fixedTa !== void 0 ? _productFacts$fixedTa : new decimal_js.default(0);
|
|
78
|
+
const numbersValid = gross.isFinite() && tare.isFinite() && !gross.isNegative() && !tare.isNegative();
|
|
79
|
+
const net = numbersValid ? decimal_js.default.max(gross.minus(tare), 0) : new decimal_js.default(0);
|
|
80
|
+
return {
|
|
81
|
+
gross,
|
|
82
|
+
tare,
|
|
83
|
+
net,
|
|
84
|
+
valid: numbersValid && scale.active && scale.hasLiveSample && scale.isListening && scale.connectionState === "connected" && scale.status === "stable" && !scale.error && net.greaterThanOrEqualTo(minimumWeightKg) && (productFacts === null || productFacts === void 0 ? void 0 : productFacts.available) === true
|
|
85
|
+
};
|
|
86
|
+
}
|
|
77
87
|
function BackIcon() {
|
|
78
88
|
return /* @__PURE__ */ react.default.createElement("svg", {
|
|
79
89
|
viewBox: "0 0 24 24",
|
|
@@ -162,7 +172,8 @@ function ProductFallback() {
|
|
|
162
172
|
}
|
|
163
173
|
function CustomizationScreen({ product, loading, errorReference, errorMessage, busy, syncing, canGoBack, minimumWeightKg, orderBar, send }) {
|
|
164
174
|
var _productFacts$product, _orderBar$primaryLine, _orderBar$primaryLine2, _orderBar$primaryLine3, _orderBar$primaryLine4, _orderBar$primaryLine7, _productFacts$unitPri, _orderBar$primaryLine9, _orderBar$primaryLine11;
|
|
165
|
-
const
|
|
175
|
+
const scaleRuntime = require_scale.useHDLScaleRuntime();
|
|
176
|
+
const scale = require_scale.useHDLScaleSnapshot();
|
|
166
177
|
const skuOptionsRef = (0, react.useRef)(null);
|
|
167
178
|
const hydratedDraftKeyRef = (0, react.useRef)();
|
|
168
179
|
const [skuValue, setSkuValue] = (0, react.useState)(() => initialSkuValue(product));
|
|
@@ -182,30 +193,21 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
|
|
|
182
193
|
(_orderBar$primaryLine7 = orderBar.primaryLine) === null || _orderBar$primaryLine7 === void 0 ? void 0 : _orderBar$primaryLine7.skuValue,
|
|
183
194
|
product
|
|
184
195
|
]);
|
|
185
|
-
const measurement = (0, react.useMemo)(() =>
|
|
186
|
-
var _scale$grossWeightKg, _productFacts$fixedTa, _productFacts$fixedTa2;
|
|
187
|
-
const gross = new decimal_js.default((_scale$grossWeightKg = scale.grossWeightKg) !== null && _scale$grossWeightKg !== void 0 ? _scale$grossWeightKg : NaN);
|
|
188
|
-
const tare = (_productFacts$fixedTa = productFacts === null || productFacts === void 0 || (_productFacts$fixedTa2 = productFacts.fixedTare) === null || _productFacts$fixedTa2 === void 0 ? void 0 : _productFacts$fixedTa2.valueKg) !== null && _productFacts$fixedTa !== void 0 ? _productFacts$fixedTa : new decimal_js.default(0);
|
|
189
|
-
const numbersValid = gross.isFinite() && tare.isFinite() && !gross.isNegative() && !tare.isNegative();
|
|
190
|
-
const net = numbersValid ? decimal_js.default.max(gross.minus(tare), 0) : new decimal_js.default(0);
|
|
191
|
-
return {
|
|
192
|
-
gross,
|
|
193
|
-
tare,
|
|
194
|
-
net,
|
|
195
|
-
valid: numbersValid && scale.active && scale.isListening && scale.connectionState === "connected" && scale.status === "stable" && !scale.error && net.greaterThanOrEqualTo(minimumWeightKg) && (productFacts === null || productFacts === void 0 ? void 0 : productFacts.available) === true
|
|
196
|
-
};
|
|
197
|
-
}, [
|
|
196
|
+
const measurement = (0, react.useMemo)(() => resolveScaleMeasurement(scale, productFacts, minimumWeightKg), [
|
|
198
197
|
minimumWeightKg,
|
|
199
198
|
productFacts,
|
|
200
199
|
scale
|
|
201
200
|
]);
|
|
202
201
|
const statusText = getScaleStatusText(scale);
|
|
203
|
-
const
|
|
202
|
+
const readingInvalid = scale.status === "overload" || scale.status === "negative";
|
|
203
|
+
const stable = scale.status === "stable" && scale.hasLiveSample && scale.connectionState === "connected" && scale.isListening && !scale.error;
|
|
204
204
|
const unitPricePerStandardWeight = (_productFacts$unitPri = productFacts === null || productFacts === void 0 ? void 0 : productFacts.unitPricePerKg) !== null && _productFacts$unitPri !== void 0 ? _productFacts$unitPri : new decimal_js.default(0);
|
|
205
205
|
const amountText = orderBar.confirmedAmount !== void 0 ? formatMoney(new decimal_js.default(orderBar.confirmedAmount), orderBar.currencySymbol) : "—";
|
|
206
206
|
const submit = (0, react.useCallback)(require_asyncToGenerator._asyncToGenerator(function* () {
|
|
207
|
-
var _skuOptionsRef$curren2, _skuOptionsRef$curren3, _orderBar$primaryLine8,
|
|
208
|
-
|
|
207
|
+
var _skuOptionsRef$curren2, _skuOptionsRef$curren3, _orderBar$primaryLine8, _currentScale$updated;
|
|
208
|
+
const currentScale = scaleRuntime.getSnapshot();
|
|
209
|
+
const currentMeasurement = resolveScaleMeasurement(currentScale, productFacts, minimumWeightKg);
|
|
210
|
+
if (!productFacts || !currentMeasurement.valid || busy || syncing) return;
|
|
209
211
|
try {
|
|
210
212
|
var _skuOptionsRef$curren;
|
|
211
213
|
yield (_skuOptionsRef$curren = skuOptionsRef.current) === null || _skuOptionsRef$curren === void 0 ? void 0 : _skuOptionsRef$curren.validate();
|
|
@@ -222,33 +224,30 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
|
|
|
222
224
|
existingLineId: (_orderBar$primaryLine8 = orderBar.primaryLine) === null || _orderBar$primaryLine8 === void 0 ? void 0 : _orderBar$primaryLine8.lineId,
|
|
223
225
|
skuValue: submittedSkuValue,
|
|
224
226
|
measurement: {
|
|
225
|
-
grossWeightKg: formatWeight(
|
|
226
|
-
tareWeightKg: formatWeight(
|
|
227
|
-
netWeightKg: formatWeight(
|
|
227
|
+
grossWeightKg: formatWeight(currentMeasurement.gross),
|
|
228
|
+
tareWeightKg: formatWeight(currentMeasurement.tare),
|
|
229
|
+
netWeightKg: formatWeight(currentMeasurement.net),
|
|
228
230
|
source: "auto",
|
|
229
231
|
status: "stable",
|
|
230
|
-
measuredAt: (
|
|
232
|
+
measuredAt: (_currentScale$updated = currentScale.updatedAt) !== null && _currentScale$updated !== void 0 ? _currentScale$updated : Date.now()
|
|
231
233
|
}
|
|
232
234
|
}
|
|
233
235
|
});
|
|
234
236
|
}), [
|
|
235
237
|
busy,
|
|
236
|
-
|
|
237
|
-
measurement.gross,
|
|
238
|
-
measurement.net,
|
|
239
|
-
measurement.tare,
|
|
238
|
+
minimumWeightKg,
|
|
240
239
|
(_orderBar$primaryLine9 = orderBar.primaryLine) === null || _orderBar$primaryLine9 === void 0 ? void 0 : _orderBar$primaryLine9.lineId,
|
|
241
240
|
productFacts,
|
|
242
|
-
|
|
241
|
+
scaleRuntime,
|
|
243
242
|
skuValue,
|
|
244
243
|
send,
|
|
245
244
|
syncing
|
|
246
245
|
]);
|
|
247
|
-
const
|
|
246
|
+
const omitPrimaryProduct = (0, react.useCallback)(() => {
|
|
248
247
|
var _orderBar$primaryLine10;
|
|
249
248
|
send({
|
|
250
249
|
kind: "intent",
|
|
251
|
-
intent: "
|
|
250
|
+
intent: "omit",
|
|
252
251
|
operationInput: { lineId: (_orderBar$primaryLine10 = orderBar.primaryLine) === null || _orderBar$primaryLine10 === void 0 ? void 0 : _orderBar$primaryLine10.lineId }
|
|
253
252
|
});
|
|
254
253
|
}, [(_orderBar$primaryLine11 = orderBar.primaryLine) === null || _orderBar$primaryLine11 === void 0 ? void 0 : _orderBar$primaryLine11.lineId, send]);
|
|
@@ -317,9 +316,9 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
|
|
|
317
316
|
src: productFacts.imageUrl,
|
|
318
317
|
alt: ""
|
|
319
318
|
}) : /* @__PURE__ */ react.default.createElement(ProductFallback, null)), /* @__PURE__ */ react.default.createElement("div", { className: "hdl-customization-product__copy" }, /* @__PURE__ */ react.default.createElement("p", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.customization-product-eyebrow")), /* @__PURE__ */ react.default.createElement("h1", { id: "hdl-customization-title" }, (productFacts === null || productFacts === void 0 ? void 0 : productFacts.name) || _pisell_utils.locales.getText("pisell2.hdl-kiosk.weighted-product-loading")), /* @__PURE__ */ react.default.createElement("strong", null, productFacts ? formatMoney(unitPricePerStandardWeight, orderBar.currencySymbol) : "—", " ", /* @__PURE__ */ react.default.createElement("small", null, "/", STANDARD_WEIGHT_UNIT_LABEL)))), /* @__PURE__ */ react.default.createElement("aside", { className: "hdl-customization-weight" }, /* @__PURE__ */ react.default.createElement("div", { className: "hdl-customization-weight__status" }, /* @__PURE__ */ react.default.createElement("span", {
|
|
320
|
-
className: `hdl-customization-weight__dot${stable ? " is-stable" : ""}`,
|
|
319
|
+
className: `hdl-customization-weight__dot${readingInvalid ? " is-error" : stable ? " is-stable" : ""}`,
|
|
321
320
|
"aria-hidden": "true"
|
|
322
|
-
}), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("strong", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.customization-weighing")), /* @__PURE__ */ react.default.createElement("small", null, statusText)), /* @__PURE__ */ react.default.createElement(ScaleIcon, null)), /* @__PURE__ */ react.default.createElement("dl", null, /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("dt", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.customization-unit-price")), /* @__PURE__ */ react.default.createElement("dd", null, productFacts ? formatMoney(unitPricePerStandardWeight, orderBar.currencySymbol) : "—", " ", /* @__PURE__ */ react.default.createElement("small", null, "/", STANDARD_WEIGHT_UNIT_LABEL))), /* @__PURE__ */ react.default.createElement("div", { className: "is-featured" }, /* @__PURE__ */ react.default.createElement("dt", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.gross-weight")), /* @__PURE__ */ react.default.createElement("dd", null, measurement.gross.isFinite() ? formatWeight(measurement.gross) : "—"
|
|
321
|
+
}), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("strong", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.customization-weighing")), /* @__PURE__ */ react.default.createElement("small", null, statusText)), /* @__PURE__ */ react.default.createElement(ScaleIcon, null)), /* @__PURE__ */ react.default.createElement("dl", null, /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("dt", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.customization-unit-price")), /* @__PURE__ */ react.default.createElement("dd", null, productFacts ? formatMoney(unitPricePerStandardWeight, orderBar.currencySymbol) : "—", " ", /* @__PURE__ */ react.default.createElement("small", null, "/", STANDARD_WEIGHT_UNIT_LABEL))), /* @__PURE__ */ react.default.createElement("div", { className: "is-featured" }, /* @__PURE__ */ react.default.createElement("dt", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.gross-weight")), /* @__PURE__ */ react.default.createElement("dd", null, readingInvalid ? "Err." : `${measurement.gross.isFinite() ? formatWeight(measurement.gross) : "—"} kg`)), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("dt", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.tare-weight")), /* @__PURE__ */ react.default.createElement("dd", null, formatWeight(measurement.tare), " kg")), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("dt", null, _pisell_utils.locales.getText("pisell2.hdl-kiosk.net-weight")), /* @__PURE__ */ react.default.createElement("dd", null, readingInvalid ? "Err." : `${formatWeight(measurement.net)} kg`))))), /* @__PURE__ */ react.default.createElement("div", { className: "hdl-customization-options" }, product && productFacts ? /* @__PURE__ */ react.default.createElement(require_index$2.default, {
|
|
323
322
|
ref: skuOptionsRef,
|
|
324
323
|
product,
|
|
325
324
|
value: skuValue,
|
|
@@ -335,7 +334,7 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
|
|
|
335
334
|
type: "button",
|
|
336
335
|
className: "hdl-customization-skip",
|
|
337
336
|
disabled: busy || syncing,
|
|
338
|
-
onClick:
|
|
337
|
+
onClick: omitPrimaryProduct
|
|
339
338
|
}, _pisell_utils.locales.getText("pisell2.hdl-kiosk.customization-skip")));
|
|
340
339
|
}
|
|
341
340
|
//#endregion
|
|
@@ -122,6 +122,11 @@
|
|
|
122
122
|
box-shadow: 0 0 0 5px rgba(18, 183, 106, 0.16);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
.hdl-customization-weight__dot.is-error {
|
|
126
|
+
background: #f04438;
|
|
127
|
+
box-shadow: 0 0 0 5px rgba(240, 68, 56, 0.16);
|
|
128
|
+
}
|
|
129
|
+
|
|
125
130
|
.hdl-customization-weight__status > div {
|
|
126
131
|
min-width: 0;
|
|
127
132
|
flex: 1;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
const require_defineSlice = require("../../kernel/application/defineSlice.js");
|
|
2
|
-
const
|
|
3
|
-
const require_operation = require("./operation.js");
|
|
2
|
+
const require_operations = require("../../app/operations.js");
|
|
4
3
|
//#region src/components/HDLKiosk/slices/customization/slice.ts
|
|
5
4
|
/** Customization Slice:Next 时才提交本地称重草稿;加购成功后才离开。 */
|
|
6
5
|
const customizationSlice = require_defineSlice.defineSlice({
|
|
7
6
|
id: "customization",
|
|
8
|
-
|
|
9
|
-
commands: { removePrimaryProduct:
|
|
7
|
+
surface: { id: "customization" },
|
|
8
|
+
commands: { removePrimaryProduct: require_operations.cartRemoveLineOperation },
|
|
10
9
|
intents: {
|
|
11
|
-
complete: require_defineSlice.effect(
|
|
12
|
-
|
|
10
|
+
complete: require_defineSlice.effect(require_operations.productSyncPrimaryWeightedProductOperation, { navigate: "next" }),
|
|
11
|
+
omit: require_defineSlice.effect(require_operations.productRemovePrimaryProductOperation, { navigate: "next" })
|
|
13
12
|
}
|
|
14
13
|
});
|
|
15
14
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const require_defineSlice = require("../../kernel/application/defineSlice.js");
|
|
2
|
-
const
|
|
2
|
+
const require_operations = require("../../app/operations.js");
|
|
3
3
|
//#region src/components/HDLKiosk/slices/fulfillment/slice.ts
|
|
4
4
|
/** Fulfillment Slice:声明就餐方式完成条件与回退语义;不依赖 React 或 Host 实现。 */
|
|
5
5
|
const fulfillmentSlice = require_defineSlice.defineSlice({
|
|
6
6
|
id: "fulfillment",
|
|
7
|
-
|
|
8
|
-
intents: { complete: require_defineSlice.effect(
|
|
7
|
+
surface: { id: "fulfillment" },
|
|
8
|
+
intents: { complete: require_defineSlice.effect(require_operations.setFulfillmentOperation, {
|
|
9
9
|
precondition: "fulfillment.selected",
|
|
10
10
|
navigate: "next"
|
|
11
11
|
}) }
|
|
@@ -6,7 +6,7 @@ react = require_runtime.__toESM(react);
|
|
|
6
6
|
//#region src/components/HDLKiosk/slices/fulfillment/view.tsx
|
|
7
7
|
/** Fulfillment 展示装配:组合页面、订单摘要与购物车投影;不执行订单写入。 */
|
|
8
8
|
const renderFulfillment = ({ node, viewSnapshot, sales, businessMode, send }) => /* @__PURE__ */ react.default.createElement(require_index.FulfillmentScreen, {
|
|
9
|
-
model: require_utils.createActivityScreenModel(node.
|
|
9
|
+
model: require_utils.createActivityScreenModel(node.surfaceId, viewSnapshot, node, sales, businessMode),
|
|
10
10
|
orderBar: require_utils.createOrderBarModel(sales),
|
|
11
11
|
send
|
|
12
12
|
});
|
|
@@ -10,7 +10,7 @@ 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.
|
|
13
|
+
* identity.omit Intent,由本地 Exit Policy 同步访客后进入下一步。
|
|
14
14
|
*/
|
|
15
15
|
function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
|
|
16
16
|
const [authBusy, setAuthBusy] = (0, react.useState)(false);
|
|
@@ -82,7 +82,7 @@ function IdentityScreen({ model, orderBar, send, renderIdentityAuth }) {
|
|
|
82
82
|
disabled: busy,
|
|
83
83
|
onClick: () => send({
|
|
84
84
|
kind: "intent",
|
|
85
|
-
intent: "
|
|
85
|
+
intent: "omit",
|
|
86
86
|
operationInput: {}
|
|
87
87
|
})
|
|
88
88
|
}, _pisell_utils.locales.getText("pisell2.hdl-kiosk.skip")), model.errorReference ? /* @__PURE__ */ react.default.createElement("div", {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require_defineSlice = require("../../kernel/application/defineSlice.js");
|
|
2
|
-
const
|
|
2
|
+
const require_operations = require("../../app/operations.js");
|
|
3
3
|
//#region src/components/HDLKiosk/slices/identity/slice.ts
|
|
4
4
|
/** Identity Slice:声明身份节点的 Intent 与客户同步 Effect;不依赖 React 或 Host 实现。 */
|
|
5
5
|
const identitySlice = require_defineSlice.defineSlice({
|
|
6
6
|
id: "identity",
|
|
7
|
-
|
|
7
|
+
surface: { id: "identity" },
|
|
8
8
|
intents: {
|
|
9
|
-
complete: require_defineSlice.effect(
|
|
10
|
-
|
|
9
|
+
complete: require_defineSlice.effect(require_operations.identitySyncOperation, { navigate: "next" }),
|
|
10
|
+
omit: require_defineSlice.effect(require_operations.identitySyncOperation, { navigate: "next" })
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
@@ -6,7 +6,7 @@ react = require_runtime.__toESM(react);
|
|
|
6
6
|
//#region src/components/HDLKiosk/slices/identity/view.tsx
|
|
7
7
|
/** Identity 展示装配:把统一 View Context 转为本 Slice Screen props;不决定流程目标。 */
|
|
8
8
|
const renderIdentity = ({ node, viewSnapshot, sales, businessMode, renderIdentityAuth, send }) => /* @__PURE__ */ react.default.createElement(require_index.IdentityScreen, {
|
|
9
|
-
model: require_utils.createActivityScreenModel(node.
|
|
9
|
+
model: require_utils.createActivityScreenModel(node.surfaceId, viewSnapshot, node, sales, businessMode),
|
|
10
10
|
orderBar: require_utils.createOrderBarModel(sales),
|
|
11
11
|
send,
|
|
12
12
|
renderIdentityAuth
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
const require_defineSlice = require("../../kernel/application/defineSlice.js");
|
|
2
|
-
const
|
|
2
|
+
const require_operations = require("../../app/operations.js");
|
|
3
3
|
//#region src/components/HDLKiosk/slices/payment/slice.ts
|
|
4
4
|
/** Payment Slice:声明卡/现金选择、支付派发与 Host 成功确认;支付不确定不作成功处理。 */
|
|
5
5
|
const paymentMethodSlice = require_defineSlice.defineSlice({
|
|
6
6
|
id: "paymentMethod",
|
|
7
|
-
|
|
7
|
+
surface: { id: "checkout" },
|
|
8
8
|
commands: {
|
|
9
|
-
payEftpos:
|
|
10
|
-
requestStaffPaymentApproval:
|
|
9
|
+
payEftpos: require_operations.checkoutPayEftposOperation,
|
|
10
|
+
requestStaffPaymentApproval: require_operations.checkoutRequestStaffPaymentApprovalOperation
|
|
11
11
|
},
|
|
12
12
|
intents: { complete: require_defineSlice.intentPrecondition("payment.succeeded", { navigate: "next" }) }
|
|
13
13
|
});
|
|
14
14
|
/** 支付完成仍复用 Checkout Screen,仅作为 Workflow 的成功终态。 */
|
|
15
15
|
const paymentCompletedSlice = require_defineSlice.defineSlice({
|
|
16
16
|
id: "paymentCompleted",
|
|
17
|
-
|
|
17
|
+
surface: { id: "checkout" },
|
|
18
18
|
intents: {}
|
|
19
19
|
});
|
|
20
20
|
//#endregion
|
|
@@ -3,11 +3,11 @@ const require_defineSlice = require("../../kernel/application/defineSlice.js");
|
|
|
3
3
|
/** 主商品询问 Slice:只表达是否进入称重定制,不承担 Catalog 页面职责。 */
|
|
4
4
|
const primaryProductPromptSlice = require_defineSlice.defineSlice({
|
|
5
5
|
id: "primaryProductPrompt",
|
|
6
|
-
|
|
6
|
+
surface: { id: "primaryProductPrompt" },
|
|
7
7
|
presentation: "modal",
|
|
8
8
|
intents: {
|
|
9
9
|
complete: require_defineSlice.intentPrecondition("cart.notEmpty", { navigate: "next" }),
|
|
10
|
-
|
|
10
|
+
omit: require_defineSlice.intentPrecondition("cart.notEmpty")
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
@@ -3,13 +3,13 @@ const require_index = require("../catalog/PrimaryProductPromptDialog/index.js");
|
|
|
3
3
|
let react = require("react");
|
|
4
4
|
react = require_runtime.__toESM(react);
|
|
5
5
|
//#region src/components/HDLKiosk/slices/primaryProductPrompt/view.tsx
|
|
6
|
-
/** 主商品询问展示:将用户选择转换为标准
|
|
6
|
+
/** 主商品询问展示:将用户选择转换为标准 complete/omit 结果。 */
|
|
7
7
|
function PrimaryProductPromptView({ busy, send }) {
|
|
8
8
|
return /* @__PURE__ */ react.default.createElement(require_index.PrimaryProductPromptDialog, {
|
|
9
9
|
busy,
|
|
10
10
|
onDecline: () => send({
|
|
11
11
|
kind: "intent",
|
|
12
|
-
intent: "
|
|
12
|
+
intent: "omit"
|
|
13
13
|
}),
|
|
14
14
|
onAccept: () => send({
|
|
15
15
|
kind: "intent",
|