@pisell/private-materials 6.12.168 → 6.12.170
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/HDLKiosk/{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 +7 -3
- 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/components/common/HDLKioskSkuOptionsSelection/index.less +1 -1
- package/es/components/HDLKiosk/components/overlays/HDLKioskModal/index.less +1 -1
- package/es/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +4 -1
- package/es/components/HDLKiosk/docs/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 +95 -89
- package/es/components/HDLKiosk/docs/02-Host/351/200/202/351/205/215/344/270/216/344/270/232/345/212/241/346/225/260/346/215/256.md +20 -19
- package/es/components/HDLKiosk/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/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 +32 -30
- package/es/components/HDLKiosk/index.less +8 -3
- package/es/components/HDLKiosk/kernel/README.md +13 -12
- 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 +16 -17
- package/es/components/HDLKiosk/kernel/workflow/compiler.js +14 -16
- 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 +34 -35
- package/es/components/HDLKiosk/slices/customization/Screen/index.less +5 -0
- package/es/components/HDLKiosk/slices/customization/slice.js +2 -3
- 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.less +1 -1
- package/es/components/HDLKiosk/slices/identity/slice.js +2 -2
- package/es/components/HDLKiosk/slices/identity/view.js +1 -1
- package/es/components/HDLKiosk/slices/payment/Screen/index.less +1 -1
- package/es/components/HDLKiosk/slices/payment/slice.js +3 -3
- package/es/components/HDLKiosk/slices/primaryProductPrompt/slice.js +1 -1
- package/es/components/HDLKiosk/{runtime → ui}/HDLKioskWorkflowView.js +68 -129
- 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 +1 -1
- package/es/components/HDLKiosk/ui/collaborationStatus.js +11 -0
- 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/README.md +43 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/createHost.js +7 -7
- package/es/components/bigSale/templates/HDLKiosk/adapter/{devices.js → devices/devicePort.js} +10 -38
- package/es/components/bigSale/templates/HDLKiosk/adapter/{capabilities.js → host/capabilities.js} +2 -2
- package/es/components/bigSale/templates/HDLKiosk/adapter/{fulfillment.js → host/fulfillmentWriter.js} +3 -3
- package/es/components/bigSale/templates/HDLKiosk/adapter/{projection.js → host/projection.js} +24 -14
- package/es/components/bigSale/templates/HDLKiosk/adapter/{telemetry.js → host/telemetry.js} +1 -1
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/cart.js +187 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/catalog.js +160 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/{customizationProduct.js → sales/customizationProduct.js} +3 -3
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/fulfillment.js +31 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/identity.js +57 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/index.js +18 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/payment.js +123 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/session.js +71 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/sales/weightedOperations.js +124 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/{weightedProduct.js → sales/weightedProduct.js} +2 -2
- package/es/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskAdapter.js +41 -0
- package/es/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +10 -7
- package/es/components/bigSale/templates/HDLKiosk/cart/useBigSaleHDLKioskCart.js +122 -0
- package/es/components/bigSale/templates/HDLKiosk/{adapter → hooks}/useHDLKioskEntryPreparationToast.js +2 -1
- package/es/components/bigSale/templates/HDLKiosk/index.js +42 -148
- package/es/components/bigSale/templates/HDLKiosk/{adapter/scaleTrigger.js → runtime/BigSaleScaleRuntimeOwner.js} +33 -62
- package/es/components/bigSale/templates/HDLKiosk/{adapter → runtime}/HDLKioskPaymentRuntime.js +4 -3
- package/es/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.js +44 -0
- 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 +7 -3
- 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/components/common/HDLKioskSkuOptionsSelection/index.less +1 -1
- package/lib/components/HDLKiosk/components/overlays/HDLKioskModal/index.less +1 -1
- package/lib/components/HDLKiosk/components/shell/HDLKioskBottomBarHost/index.js +4 -1
- package/lib/components/HDLKiosk/docs/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 +95 -89
- package/lib/components/HDLKiosk/docs/02-Host/351/200/202/351/205/215/344/270/216/344/270/232/345/212/241/346/225/260/346/215/256.md +20 -19
- package/lib/components/HDLKiosk/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/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 +35 -33
- package/lib/components/HDLKiosk/index.less +8 -3
- package/lib/components/HDLKiosk/kernel/README.md +13 -12
- 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 +16 -17
- package/lib/components/HDLKiosk/kernel/workflow/compiler.js +14 -16
- 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 +35 -36
- 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.less +1 -1
- 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/Screen/index.less +1 -1
- package/lib/components/HDLKiosk/slices/payment/slice.js +5 -5
- package/lib/components/HDLKiosk/slices/primaryProductPrompt/slice.js +1 -1
- package/lib/components/HDLKiosk/{runtime → ui}/HDLKioskWorkflowView.js +69 -130
- 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 +1 -1
- package/lib/components/HDLKiosk/ui/collaborationStatus.js +11 -0
- 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/README.md +43 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/createHost.js +9 -9
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{devices.js → devices/devicePort.js} +10 -38
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{capabilities.js → host/capabilities.js} +2 -2
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{fulfillment.js → host/fulfillmentWriter.js} +3 -3
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{projection.js → host/projection.js} +25 -14
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{telemetry.js → host/telemetry.js} +1 -1
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/cart.js +189 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/catalog.js +162 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{customizationProduct.js → sales/customizationProduct.js} +4 -4
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/fulfillment.js +31 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/identity.js +57 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/index.js +18 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/payment.js +123 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/session.js +71 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/sales/weightedOperations.js +126 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/{weightedProduct.js → sales/weightedProduct.js} +3 -3
- package/lib/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskAdapter.js +42 -0
- package/lib/components/bigSale/templates/HDLKiosk/adapter/useBigSaleHDLKioskHost.js +10 -7
- package/lib/components/bigSale/templates/HDLKiosk/cart/useBigSaleHDLKioskCart.js +124 -0
- package/lib/components/bigSale/templates/HDLKiosk/{adapter → hooks}/useHDLKioskEntryPreparationToast.js +2 -1
- package/lib/components/bigSale/templates/HDLKiosk/index.js +43 -149
- package/lib/components/bigSale/templates/HDLKiosk/{adapter/scaleTrigger.js → runtime/BigSaleScaleRuntimeOwner.js} +31 -61
- package/lib/components/bigSale/templates/HDLKiosk/{adapter → runtime}/HDLKioskPaymentRuntime.js +4 -3
- package/lib/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.js +44 -0
- 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/es/components/bigSale/templates/HDLKiosk/adapter/sales.js +0 -692
- 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/lib/components/bigSale/templates/HDLKiosk/adapter/sales.js +0 -694
- /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,51 +1,13 @@
|
|
|
1
1
|
import { _defineProperty } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/defineProperty.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
|
-
import React, { Component, useEffect, useRef } from "react";
|
|
4
|
-
//#region src/components/bigSale/templates/HDLKiosk/
|
|
3
|
+
import React, { Component, useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
//#region src/components/bigSale/templates/HDLKiosk/runtime/BigSaleScaleRuntimeOwner.tsx
|
|
5
5
|
/**
|
|
6
6
|
* 文件角色:拥有 BigSale 的 useNativeScale Hook,并桥接到 HDLKiosk 全局 Scale Runtime。
|
|
7
|
-
* 运行机制:顶层 owner 在整个物料生命周期持续监听真秤/Web
|
|
8
|
-
*
|
|
7
|
+
* 运行机制:顶层 owner 在整个物料生命周期持续监听真秤/Web 模拟器,将读数统一发布给
|
|
8
|
+
* ScaleBridge;Screen 读取 Snapshot,入口消费离散设备事件。
|
|
9
9
|
* 边界:不复用旧 Weighing UI,不在本文件决定进入流程或更新购物车。
|
|
10
10
|
*/
|
|
11
|
-
function createScaleTriggerHub() {
|
|
12
|
-
const weightListeners = /* @__PURE__ */ new Set();
|
|
13
|
-
const connectionListeners = /* @__PURE__ */ new Set();
|
|
14
|
-
const activityListeners = /* @__PURE__ */ new Set();
|
|
15
|
-
let lastConnection;
|
|
16
|
-
const notifyActivity = () => activityListeners.forEach((listener) => listener());
|
|
17
|
-
return {
|
|
18
|
-
subscribeWeightChange: (listener) => {
|
|
19
|
-
weightListeners.add(listener);
|
|
20
|
-
notifyActivity();
|
|
21
|
-
return () => {
|
|
22
|
-
weightListeners.delete(listener);
|
|
23
|
-
notifyActivity();
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
subscribeConnection: (listener) => {
|
|
27
|
-
connectionListeners.add(listener);
|
|
28
|
-
if (lastConnection) listener(lastConnection);
|
|
29
|
-
notifyActivity();
|
|
30
|
-
return () => {
|
|
31
|
-
connectionListeners.delete(listener);
|
|
32
|
-
notifyActivity();
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
publishWeightChange: (payload) => weightListeners.forEach((listener) => listener(payload)),
|
|
36
|
-
publishConnection: (payload) => {
|
|
37
|
-
lastConnection = payload;
|
|
38
|
-
connectionListeners.forEach((listener) => listener(payload));
|
|
39
|
-
},
|
|
40
|
-
hasSubscribers: () => weightListeners.size > 0 || connectionListeners.size > 0,
|
|
41
|
-
subscribeActivity: (listener) => {
|
|
42
|
-
activityListeners.add(listener);
|
|
43
|
-
return () => {
|
|
44
|
-
activityListeners.delete(listener);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
11
|
function inspectScaleEntrySnapshot(scale, minimumWeightKg) {
|
|
50
12
|
var _ref, _scale$connectionStat, _scale$rawData;
|
|
51
13
|
const nativeConnectionState = (_ref = (_scale$connectionStat = scale.connectionState) !== null && _scale$connectionStat !== void 0 ? _scale$connectionStat : (_scale$rawData = scale.rawData) === null || _scale$rawData === void 0 ? void 0 : _scale$rawData.connectionState) !== null && _ref !== void 0 ? _ref : null;
|
|
@@ -76,51 +38,58 @@ function BigSaleScaleRuntimeOwner(props) {
|
|
|
76
38
|
var _props$nativeScaleToo;
|
|
77
39
|
const useNativeScale = (_props$nativeScaleToo = props.nativeScaleTools) === null || _props$nativeScaleToo === void 0 ? void 0 : _props$nativeScaleToo.useNativeScale;
|
|
78
40
|
if (!props.active || typeof useNativeScale !== "function") return null;
|
|
79
|
-
return /* @__PURE__ */ React.createElement(MonitorBoundary, { onError: () => props.
|
|
41
|
+
return /* @__PURE__ */ React.createElement(MonitorBoundary, { onError: () => props.bridge.publishConnection({
|
|
80
42
|
connected: false,
|
|
81
43
|
state: "error",
|
|
82
44
|
occurredAt: Date.now()
|
|
83
45
|
}) }, /* @__PURE__ */ React.createElement(ActiveScaleRuntimeOwner, _objectSpread2(_objectSpread2({}, props), {}, { useNativeScale })));
|
|
84
46
|
}
|
|
85
|
-
function ActiveScaleRuntimeOwner({ active,
|
|
47
|
+
function ActiveScaleRuntimeOwner({ active, bridge, minimumWeightKg, useNativeScale }) {
|
|
86
48
|
const consumedReadingRef = useRef(false);
|
|
87
49
|
const lastConnectionStateRef = useRef();
|
|
88
50
|
const eventSequenceRef = useRef(0);
|
|
51
|
+
const [sample, setSample] = useState({
|
|
52
|
+
sequence: 0,
|
|
53
|
+
receivedAt: 0
|
|
54
|
+
});
|
|
89
55
|
const scale = useNativeScale({
|
|
90
56
|
unit: "KILOGRAMS",
|
|
91
57
|
precision: 3,
|
|
92
58
|
tareWeight: 0,
|
|
93
|
-
autoStart: active
|
|
59
|
+
autoStart: active,
|
|
60
|
+
onChange: useCallback(() => {
|
|
61
|
+
setSample((current) => ({
|
|
62
|
+
sequence: current.sequence + 1,
|
|
63
|
+
receivedAt: Date.now()
|
|
64
|
+
}));
|
|
65
|
+
}, [])
|
|
94
66
|
});
|
|
95
67
|
const inspection = inspectScaleEntrySnapshot(scale, minimumWeightKg);
|
|
96
68
|
useEffect(() => {
|
|
97
69
|
if (!active) return void 0;
|
|
98
|
-
return runtime.activate(ownerId);
|
|
99
|
-
}, [
|
|
100
|
-
active,
|
|
101
|
-
ownerId,
|
|
102
|
-
runtime
|
|
103
|
-
]);
|
|
70
|
+
return bridge.runtime.activate(bridge.ownerId);
|
|
71
|
+
}, [active, bridge]);
|
|
104
72
|
useEffect(() => {
|
|
105
73
|
if (!active) return;
|
|
106
|
-
runtime.publish(ownerId, {
|
|
74
|
+
bridge.runtime.publish(bridge.ownerId, {
|
|
107
75
|
grossWeightKg: scale.grossWeight,
|
|
108
76
|
status: scale.status,
|
|
109
77
|
connectionState: scale.connectionState,
|
|
110
78
|
rawData: scale.rawData,
|
|
111
79
|
isListening: scale.isListening,
|
|
112
|
-
error: scale.error
|
|
80
|
+
error: scale.error,
|
|
81
|
+
sampleSequence: sample.sequence
|
|
113
82
|
});
|
|
114
83
|
}, [
|
|
115
84
|
active,
|
|
116
|
-
|
|
117
|
-
runtime,
|
|
85
|
+
bridge,
|
|
118
86
|
scale.connectionState,
|
|
119
87
|
scale.error,
|
|
120
88
|
scale.grossWeight,
|
|
121
89
|
scale.isListening,
|
|
122
90
|
scale.rawData,
|
|
123
|
-
scale.status
|
|
91
|
+
scale.status,
|
|
92
|
+
sample.sequence
|
|
124
93
|
]);
|
|
125
94
|
useEffect(() => {
|
|
126
95
|
if (!active) {
|
|
@@ -130,7 +99,7 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
|
|
|
130
99
|
const state = inspection.connectionState;
|
|
131
100
|
if (lastConnectionStateRef.current !== state) {
|
|
132
101
|
lastConnectionStateRef.current = state;
|
|
133
|
-
|
|
102
|
+
bridge.publishConnection({
|
|
134
103
|
connected: state === "connected",
|
|
135
104
|
state,
|
|
136
105
|
occurredAt: Date.now()
|
|
@@ -138,7 +107,7 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
|
|
|
138
107
|
}
|
|
139
108
|
}, [
|
|
140
109
|
active,
|
|
141
|
-
|
|
110
|
+
bridge,
|
|
142
111
|
inspection.connectionState
|
|
143
112
|
]);
|
|
144
113
|
useEffect(() => {
|
|
@@ -148,12 +117,13 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
|
|
|
148
117
|
return;
|
|
149
118
|
}
|
|
150
119
|
if (consumedReadingRef.current) return;
|
|
120
|
+
if (!bridge.runtime.getSnapshot().hasLiveSample) return;
|
|
151
121
|
const grossWeight = inspection.validGrossWeightKg;
|
|
152
122
|
if (grossWeight === void 0) return;
|
|
153
123
|
consumedReadingRef.current = true;
|
|
154
124
|
eventSequenceRef.current += 1;
|
|
155
|
-
const occurredAt = Date.now();
|
|
156
|
-
|
|
125
|
+
const occurredAt = sample.receivedAt || Date.now();
|
|
126
|
+
bridge.publishWeightChange({
|
|
157
127
|
eventId: `native-scale-change:${occurredAt}:${eventSequenceRef.current}`,
|
|
158
128
|
occurredAt,
|
|
159
129
|
weight: {
|
|
@@ -165,12 +135,13 @@ function ActiveScaleRuntimeOwner({ active, hub, minimumWeightKg, ownerId, runtim
|
|
|
165
135
|
});
|
|
166
136
|
}, [
|
|
167
137
|
active,
|
|
168
|
-
|
|
138
|
+
bridge,
|
|
169
139
|
inspection.belowTriggerThreshold,
|
|
170
140
|
inspection.validGrossWeightKg,
|
|
141
|
+
sample.receivedAt,
|
|
171
142
|
scale.status
|
|
172
143
|
]);
|
|
173
144
|
return null;
|
|
174
145
|
}
|
|
175
146
|
//#endregion
|
|
176
|
-
export { BigSaleScaleRuntimeOwner
|
|
147
|
+
export { BigSaleScaleRuntimeOwner };
|
package/es/components/bigSale/templates/HDLKiosk/{adapter → runtime}/HDLKioskPaymentRuntime.js
RENAMED
|
@@ -5,9 +5,9 @@ import { CHECKOUT_VISIBLE_PAYMENT_CODES, resolvePiPaymentProvider } from "../../
|
|
|
5
5
|
import PaymentMethodRuntime_default from "../../../../checkout/paymentRuntime/PaymentMethodRuntime.js";
|
|
6
6
|
import { completePendingEftposPayment, discardPendingEftposPayment, preparePendingEftposPayment } from "../../../../checkout/paymentRuntime/pendingEftposLifecycle.js";
|
|
7
7
|
import { getCurrentDeviceNumber, reorderPaymentMethodList } from "../../../../checkout/utils.js";
|
|
8
|
-
import { failed, unknown } from "
|
|
8
|
+
import { failed, unknown } from "../adapter/normalize.js";
|
|
9
9
|
import React, { useEffect, useMemo, useRef } from "react";
|
|
10
|
-
//#region src/components/bigSale/templates/HDLKiosk/
|
|
10
|
+
//#region src/components/bigSale/templates/HDLKiosk/runtime/HDLKioskPaymentRuntime.tsx
|
|
11
11
|
/**
|
|
12
12
|
* BigSale 模板内的 Kiosk 支付桥。它持有需要 React/设备 UI 的 PaymentMethodRuntime,
|
|
13
13
|
* 再把窄命令交给独立 HDLKiosk Host;Core 不感知 BigSale、PiPayment 或 window.app。
|
|
@@ -105,7 +105,7 @@ function HDLKioskPaymentRuntime({ context, controllerRef }) {
|
|
|
105
105
|
const amount = currentAmount(context);
|
|
106
106
|
if (amount <= 0) return failed("paymentAmountInvalid", "back");
|
|
107
107
|
const runtime = runtimeRef.current;
|
|
108
|
-
if (!runtime) return
|
|
108
|
+
if (!runtime) return failed("paymentRuntimeUnavailable", "retry");
|
|
109
109
|
const piProvider = resolvePiPaymentProvider(method.code, Boolean((_engineContext$appHel2 = engineContext.appHelper) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.utils) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.businessUtils) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel3 = _engineContext$appHel2.isPiPaymentEnabled) === null || _engineContext$appHel3 === void 0 ? void 0 : _engineContext$appHel3.call(_engineContext$appHel2)));
|
|
110
110
|
let prepared;
|
|
111
111
|
let shouldDiscardPrepared = false;
|
|
@@ -182,6 +182,7 @@ function HDLKioskPaymentRuntime({ context, controllerRef }) {
|
|
|
182
182
|
} catch (discardError) {
|
|
183
183
|
return unknown("eftposPendingRollbackFailed", discardError);
|
|
184
184
|
}
|
|
185
|
+
if (prepared && !shouldDiscardPrepared) return unknown("eftposPaymentFinalizationUnresolved", error);
|
|
185
186
|
return failed("eftposPaymentFailed", "retry", error);
|
|
186
187
|
}
|
|
187
188
|
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createHDLScaleRuntime } from "../../../../HDLKiosk/runtime/devices/scaleStore.js";
|
|
2
|
+
//#region src/components/bigSale/templates/HDLKiosk/runtime/scaleBridge.ts
|
|
3
|
+
function createBigSaleScaleBridge({ now = Date.now } = {}) {
|
|
4
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
+
const runtime = createHDLScaleRuntime();
|
|
6
|
+
const ownerId = `hdl-kiosk-scale-runtime:${now()}`;
|
|
7
|
+
let eventSequence = 0;
|
|
8
|
+
let lastConnection;
|
|
9
|
+
const emit = (event) => {
|
|
10
|
+
listeners.forEach((listener) => listener(event));
|
|
11
|
+
};
|
|
12
|
+
return Object.freeze({
|
|
13
|
+
ownerId,
|
|
14
|
+
runtime,
|
|
15
|
+
subscribeDeviceEvents: (listener) => {
|
|
16
|
+
listeners.add(listener);
|
|
17
|
+
if (lastConnection) listener(lastConnection);
|
|
18
|
+
return () => {
|
|
19
|
+
listeners.delete(listener);
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
publishWeightChange: ({ weight, eventId, occurredAt = now() }) => {
|
|
23
|
+
eventSequence += 1;
|
|
24
|
+
emit({
|
|
25
|
+
type: "weightChanged",
|
|
26
|
+
eventId: eventId !== null && eventId !== void 0 ? eventId : `big-sale-scale:${occurredAt}:${eventSequence}`,
|
|
27
|
+
weight,
|
|
28
|
+
occurredAt
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
publishConnection: ({ connected, state, occurredAt = now() }) => {
|
|
32
|
+
lastConnection = {
|
|
33
|
+
type: "connectionChanged",
|
|
34
|
+
device: "scale",
|
|
35
|
+
connected,
|
|
36
|
+
state,
|
|
37
|
+
occurredAt
|
|
38
|
+
};
|
|
39
|
+
emit(lastConnection);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { createBigSaleScaleBridge };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
const require_defineApplication = require("../kernel/application/defineApplication.js");
|
|
2
|
-
const
|
|
3
|
-
const require_barcode = require("./operations/barcode.js");
|
|
4
|
-
const require_cart = require("./operations/cart.js");
|
|
5
|
-
const require_checkout = require("./operations/checkout.js");
|
|
6
|
-
const require_session = require("./operations/session.js");
|
|
2
|
+
const require_operations = require("./operations.js");
|
|
7
3
|
const require_index = require("../slices/index.js");
|
|
8
|
-
const require_barcode
|
|
4
|
+
const require_barcode = require("./workflow/barcode.js");
|
|
9
5
|
const require_quick = require("./workflow/quick.js");
|
|
10
6
|
const require_scale = require("./workflow/scale.js");
|
|
11
7
|
//#region src/components/HDLKiosk/app/manifest.ts
|
|
@@ -15,27 +11,30 @@ const require_scale = require("./workflow/scale.js");
|
|
|
15
11
|
* session/device 等不归属于具体 Slice 的 Operation,并绑定三条 Workflow。
|
|
16
12
|
* 边界:Runtime 只消费 Manifest,不再分别创建 Activity/Operation/Workflow 注册表。
|
|
17
13
|
*/
|
|
18
|
-
const hdlKioskApplication = require_defineApplication.
|
|
14
|
+
const hdlKioskApplication = require_defineApplication.defineApplication({
|
|
19
15
|
id: "hdl-kiosk",
|
|
20
16
|
slices: require_index.hdlKioskSlices,
|
|
21
17
|
workflows: {
|
|
22
18
|
quick: require_quick.quickOrderWorkflow,
|
|
23
|
-
barcode: require_barcode
|
|
19
|
+
barcode: require_barcode.barcodeWorkflow,
|
|
24
20
|
scale: require_scale.scaleWorkflow
|
|
25
21
|
},
|
|
22
|
+
triggers: [require_defineApplication.defineTrigger({
|
|
23
|
+
id: "onScan",
|
|
24
|
+
mode: "automatic"
|
|
25
|
+
}), require_defineApplication.defineTrigger({
|
|
26
|
+
id: "onWeight",
|
|
27
|
+
mode: "automatic"
|
|
28
|
+
})],
|
|
26
29
|
operations: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
require_operations.sessionEnsureOperation,
|
|
31
|
+
require_operations.sessionResetOperation,
|
|
32
|
+
require_operations.barcodeConsumeOperation,
|
|
33
|
+
require_operations.cartUpdateQuantityOperation,
|
|
34
|
+
require_operations.cartRemoveLineOperation,
|
|
35
|
+
require_operations.checkoutOpenOperation,
|
|
36
|
+
require_operations.checkoutPrepareOperation
|
|
34
37
|
]
|
|
35
38
|
});
|
|
36
|
-
function createHDLKioskOperationRegistry() {
|
|
37
|
-
return require_types.createOperationRegistry([...hdlKioskApplication.operations.values()]);
|
|
38
|
-
}
|
|
39
39
|
//#endregion
|
|
40
|
-
exports.createHDLKioskOperationRegistry = createHDLKioskOperationRegistry;
|
|
41
40
|
exports.hdlKioskApplication = hdlKioskApplication;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const require_types = require("../kernel/operations/types.js");
|
|
2
|
+
//#region src/components/HDLKiosk/app/operations.ts
|
|
3
|
+
function defineOperationContract(contract) {
|
|
4
|
+
return require_types.defineKernelOperationContract(contract);
|
|
5
|
+
}
|
|
6
|
+
const identitySyncOperation = defineOperationContract({
|
|
7
|
+
id: "identity.sync",
|
|
8
|
+
conflictScope: "customer",
|
|
9
|
+
timeoutMs: 15e3,
|
|
10
|
+
retry: "explicit-user"
|
|
11
|
+
});
|
|
12
|
+
const productRemovePrimaryProductOperation = defineOperationContract({
|
|
13
|
+
id: "product.removePrimaryProduct",
|
|
14
|
+
conflictScope: "cart",
|
|
15
|
+
timeoutMs: 15e3,
|
|
16
|
+
retry: "explicit-user"
|
|
17
|
+
});
|
|
18
|
+
const productSyncPrimaryWeightedProductOperation = defineOperationContract({
|
|
19
|
+
id: "product.syncPrimaryWeightedProduct",
|
|
20
|
+
conflictScope: "cart",
|
|
21
|
+
retry: "explicit-user"
|
|
22
|
+
});
|
|
23
|
+
const barcodeConsumeOperation = defineOperationContract({
|
|
24
|
+
id: "barcode.consume",
|
|
25
|
+
conflictScope: "cart",
|
|
26
|
+
retry: "explicit-user"
|
|
27
|
+
});
|
|
28
|
+
const cartAddProductOperation = defineOperationContract({
|
|
29
|
+
id: "cart.addProduct",
|
|
30
|
+
conflictScope: "cart",
|
|
31
|
+
retry: "explicit-user"
|
|
32
|
+
});
|
|
33
|
+
const cartUpdateQuantityOperation = defineOperationContract({
|
|
34
|
+
id: "cart.updateQuantity",
|
|
35
|
+
conflictScope: "cart",
|
|
36
|
+
timeoutMs: 15e3,
|
|
37
|
+
retry: "explicit-user"
|
|
38
|
+
});
|
|
39
|
+
const cartRemoveLineOperation = defineOperationContract({
|
|
40
|
+
id: "cart.removeLine",
|
|
41
|
+
conflictScope: "cart",
|
|
42
|
+
timeoutMs: 15e3,
|
|
43
|
+
retry: "explicit-user"
|
|
44
|
+
});
|
|
45
|
+
const setFulfillmentOperation = defineOperationContract({
|
|
46
|
+
id: "fulfillment.set",
|
|
47
|
+
conflictScope: "cart",
|
|
48
|
+
timeoutMs: 2e4,
|
|
49
|
+
retry: "explicit-user"
|
|
50
|
+
});
|
|
51
|
+
const sessionEnsureOperation = defineOperationContract({
|
|
52
|
+
id: "session.ensure",
|
|
53
|
+
conflictScope: "session",
|
|
54
|
+
timeoutMs: 15e3,
|
|
55
|
+
retry: "explicit-user"
|
|
56
|
+
});
|
|
57
|
+
const sessionResetOperation = defineOperationContract({
|
|
58
|
+
id: "session.reset",
|
|
59
|
+
tags: ["session-reset"],
|
|
60
|
+
conflictScope: "session",
|
|
61
|
+
timeoutMs: 15e3,
|
|
62
|
+
retry: "never"
|
|
63
|
+
});
|
|
64
|
+
const checkoutPrepareOperation = defineOperationContract({
|
|
65
|
+
id: "checkout.prepare",
|
|
66
|
+
conflictScope: "checkout",
|
|
67
|
+
timeoutMs: 2e4,
|
|
68
|
+
retry: "explicit-user"
|
|
69
|
+
});
|
|
70
|
+
const checkoutOpenOperation = defineOperationContract({
|
|
71
|
+
id: "checkout.open",
|
|
72
|
+
tags: ["checkout-dispatch"],
|
|
73
|
+
conflictScope: "checkout",
|
|
74
|
+
timeoutMs: 12e4,
|
|
75
|
+
retry: "never"
|
|
76
|
+
});
|
|
77
|
+
const checkoutPayEftposOperation = defineOperationContract({
|
|
78
|
+
id: "checkout.payEftpos",
|
|
79
|
+
tags: ["checkout-dispatch"],
|
|
80
|
+
conflictScope: "checkout",
|
|
81
|
+
timeoutMs: 12e4,
|
|
82
|
+
retry: "never"
|
|
83
|
+
});
|
|
84
|
+
const checkoutRequestStaffPaymentApprovalOperation = defineOperationContract({
|
|
85
|
+
id: "checkout.requestStaffPaymentApproval",
|
|
86
|
+
tags: ["checkout-authorization"],
|
|
87
|
+
conflictScope: "checkout",
|
|
88
|
+
timeoutMs: 2e4,
|
|
89
|
+
retry: "explicit-user"
|
|
90
|
+
});
|
|
91
|
+
//#endregion
|
|
92
|
+
exports.barcodeConsumeOperation = barcodeConsumeOperation;
|
|
93
|
+
exports.cartAddProductOperation = cartAddProductOperation;
|
|
94
|
+
exports.cartRemoveLineOperation = cartRemoveLineOperation;
|
|
95
|
+
exports.cartUpdateQuantityOperation = cartUpdateQuantityOperation;
|
|
96
|
+
exports.checkoutOpenOperation = checkoutOpenOperation;
|
|
97
|
+
exports.checkoutPayEftposOperation = checkoutPayEftposOperation;
|
|
98
|
+
exports.checkoutPrepareOperation = checkoutPrepareOperation;
|
|
99
|
+
exports.checkoutRequestStaffPaymentApprovalOperation = checkoutRequestStaffPaymentApprovalOperation;
|
|
100
|
+
exports.identitySyncOperation = identitySyncOperation;
|
|
101
|
+
exports.productRemovePrimaryProductOperation = productRemovePrimaryProductOperation;
|
|
102
|
+
exports.productSyncPrimaryWeightedProductOperation = productSyncPrimaryWeightedProductOperation;
|
|
103
|
+
exports.sessionEnsureOperation = sessionEnsureOperation;
|
|
104
|
+
exports.sessionResetOperation = sessionResetOperation;
|
|
105
|
+
exports.setFulfillmentOperation = setFulfillmentOperation;
|
|
@@ -7,14 +7,18 @@ const require_slice$4 = require("../../slices/primaryProductPrompt/slice.js");
|
|
|
7
7
|
//#region src/components/HDLKiosk/app/workflow/barcode.ts
|
|
8
8
|
/**
|
|
9
9
|
* 文件角色:声明 Barcode 入口的有序业务步骤。
|
|
10
|
-
* 运行机制:
|
|
11
|
-
*
|
|
10
|
+
* 运行机制:onScan Trigger 创建并发布 Session,再在 readyForCommands 后消费首码。
|
|
11
|
+
* Workflow 从 Catalog 开始,完成补充购物后进入独立的主商品询问 Modal,需要时进入
|
|
12
12
|
* Customization;无论选择或拒绝,最终都直接进入 Fulfillment。
|
|
13
13
|
* 边界:设备扫码属于 Session 输入,不是可前进/后退的 Activity;支付 prepare 由支付
|
|
14
14
|
* Operation 在 dispatch 前统一保证,不绑定 Catalog transition。
|
|
15
15
|
*/
|
|
16
16
|
const barcodeWorkflow = require_defineApplication.defineWorkflow({
|
|
17
17
|
id: "hdl.barcode",
|
|
18
|
+
start: {
|
|
19
|
+
trigger: "onScan",
|
|
20
|
+
channel: "product"
|
|
21
|
+
},
|
|
18
22
|
steps: [
|
|
19
23
|
require_slice.catalogSlice,
|
|
20
24
|
{
|
|
@@ -28,7 +32,7 @@ const barcodeWorkflow = require_defineApplication.defineWorkflow({
|
|
|
28
32
|
require_slice$3.paymentMethodSlice,
|
|
29
33
|
{
|
|
30
34
|
slice: require_slice$3.paymentCompletedSlice,
|
|
31
|
-
|
|
35
|
+
isTerminal: true
|
|
32
36
|
}
|
|
33
37
|
]
|
|
34
38
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require("./barcode.js");
|
|
2
|
+
require("./quick.js");
|
|
3
|
+
require("./scale.js");
|
|
4
|
+
require("./registry.js");
|
|
5
|
+
require("./predicates.js");
|
|
6
|
+
require("./navigationGuards.js");
|
|
7
|
+
require("./policy.js");
|
|
8
|
+
//#region src/components/HDLKiosk/app/workflow/index.ts
|
|
9
|
+
/** 允许注册到本应用的内建 Workflow ID。 */
|
|
10
|
+
const HDL_WORKFLOW_IDS = Object.freeze([
|
|
11
|
+
"hdl.quick",
|
|
12
|
+
"hdl.barcode",
|
|
13
|
+
"hdl.scale"
|
|
14
|
+
]);
|
|
15
|
+
//#endregion
|
|
16
|
+
exports.HDL_WORKFLOW_IDS = HDL_WORKFLOW_IDS;
|
|
@@ -10,9 +10,9 @@ const defaultActivityRegistry = Object.freeze({
|
|
|
10
10
|
accepts: (id, intent) => manifestRegistry.require(id).intents.some((availableIntent) => availableIntent === intent)
|
|
11
11
|
});
|
|
12
12
|
const BUILT_IN_WORKFLOW_DEFINITIONS = Object.freeze({
|
|
13
|
-
quick: require_defineApplication.
|
|
14
|
-
barcode: require_defineApplication.
|
|
15
|
-
scale: require_defineApplication.
|
|
13
|
+
quick: require_defineApplication.normalizeApplicationWorkflow(require_manifest.hdlKioskApplication.workflows.quick),
|
|
14
|
+
barcode: require_defineApplication.normalizeApplicationWorkflow(require_manifest.hdlKioskApplication.workflows.barcode),
|
|
15
|
+
scale: require_defineApplication.normalizeApplicationWorkflow(require_manifest.hdlKioskApplication.workflows.scale)
|
|
16
16
|
});
|
|
17
17
|
function getBuiltInWorkflowDefinition(entry) {
|
|
18
18
|
return BUILT_IN_WORKFLOW_DEFINITIONS[entry];
|
|
@@ -13,6 +13,10 @@ const require_slice$3 = require("../../slices/payment/slice.js");
|
|
|
13
13
|
*/
|
|
14
14
|
const scaleWorkflow = require_defineApplication.defineWorkflow({
|
|
15
15
|
id: "hdl.scale",
|
|
16
|
+
start: {
|
|
17
|
+
trigger: "onWeight",
|
|
18
|
+
channel: "weighing-product"
|
|
19
|
+
},
|
|
16
20
|
steps: [
|
|
17
21
|
require_slice$1.customizationSlice,
|
|
18
22
|
require_slice.catalogSlice,
|
|
@@ -20,7 +24,7 @@ const scaleWorkflow = require_defineApplication.defineWorkflow({
|
|
|
20
24
|
require_slice$3.paymentMethodSlice,
|
|
21
25
|
{
|
|
22
26
|
slice: require_slice$3.paymentCompletedSlice,
|
|
23
|
-
|
|
27
|
+
isTerminal: true
|
|
24
28
|
}
|
|
25
29
|
]
|
|
26
30
|
});
|
|
@@ -58,7 +58,7 @@ function resolveHDLKioskBottomBarState(mode, screenOverlayActive = false) {
|
|
|
58
58
|
/**
|
|
59
59
|
* Shell 内唯一的底栏与购物车抽屉挂载点。
|
|
60
60
|
*/
|
|
61
|
-
function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverlayActions, promotionsAvailable = false }) {
|
|
61
|
+
function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverlayActions, promotionsAvailable = false, onCartOpenChange }) {
|
|
62
62
|
var _declaration$leading, _cartBarDeclaration$s;
|
|
63
63
|
const [active, setActive] = (0, react.useState)();
|
|
64
64
|
const [cartOpen, setCartOpen] = (0, react.useState)(false);
|
|
@@ -122,6 +122,9 @@ function HDLKioskBottomBarHost({ children, mode = "visible", fallback, cartOverl
|
|
|
122
122
|
(0, react.useEffect)(() => {
|
|
123
123
|
if (presentation.drawerBlocked || !drawerAvailable) setCartOpen(false);
|
|
124
124
|
}, [drawerAvailable, presentation.drawerBlocked]);
|
|
125
|
+
(0, react.useEffect)(() => {
|
|
126
|
+
onCartOpenChange === null || onCartOpenChange === void 0 || onCartOpenChange(cartController.open);
|
|
127
|
+
}, [cartController.open, onCartOpenChange]);
|
|
125
128
|
return /* @__PURE__ */ react.default.createElement(HDLKioskBottomBarContext.Provider, { value: context }, /* @__PURE__ */ react.default.createElement(HDLKioskCartDrawerContext.Provider, { value: cartController }, children, presentation.renderBar && floatingBarDeclaration ? /* @__PURE__ */ react.default.createElement(require_index.HDLKioskFloatingBar, floatingBarDeclaration) : null));
|
|
126
129
|
}
|
|
127
130
|
//#endregion
|