@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
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
|
+
import { failed, partialFailure, unknown } from "../normalize.js";
|
|
4
|
+
import { projectBigSaleCartLine, resolveBigSaleLineId } from "../host/projection.js";
|
|
5
|
+
import { findCatalogProduct } from "./catalog.js";
|
|
6
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/cart.ts
|
|
7
|
+
function cancelled(reason) {
|
|
8
|
+
return {
|
|
9
|
+
status: "cancelled",
|
|
10
|
+
reason
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function findCartLine(context, lineId) {
|
|
14
|
+
var _context$cart$display;
|
|
15
|
+
return ((_context$cart$display = context.cart.displayLines) !== null && _context$cart$display !== void 0 ? _context$cart$display : context.cart.items).find((line) => resolveBigSaleLineId(line) === lineId);
|
|
16
|
+
}
|
|
17
|
+
function projectConfirmedMutationLine(product) {
|
|
18
|
+
var _projectBigSaleCartLi;
|
|
19
|
+
return product ? (_projectBigSaleCartLi = projectBigSaleCartLine(product)) !== null && _projectBigSaleCartLi !== void 0 ? _projectBigSaleCartLi : void 0 : void 0;
|
|
20
|
+
}
|
|
21
|
+
function projectConfirmedCartLineById(products, lineId) {
|
|
22
|
+
return projectConfirmedMutationLine(products.find((candidate) => resolveBigSaleLineId(candidate) === lineId));
|
|
23
|
+
}
|
|
24
|
+
function createBigSaleCartOperations({ getContext, getSnapshot, executeScan }) {
|
|
25
|
+
return {
|
|
26
|
+
consumeBarcode: function() {
|
|
27
|
+
var _ref = _asyncToGenerator(function* (code, signal) {
|
|
28
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
29
|
+
if (!code.trim()) return failed("barcodeEmpty", "back");
|
|
30
|
+
try {
|
|
31
|
+
var _scanResult$meta$coun, _scanResult$meta;
|
|
32
|
+
const execution = yield executeScan(code);
|
|
33
|
+
if (signal.aborted) return unknown("barcodeAbortedAfterDispatch");
|
|
34
|
+
const scanResult = execution.scanResult;
|
|
35
|
+
if (!scanResult) return failed("barcodeUnavailable", "staff");
|
|
36
|
+
if (scanResult.status === "cancelled") return {
|
|
37
|
+
status: "cancelled",
|
|
38
|
+
reason: scanResult.reason
|
|
39
|
+
};
|
|
40
|
+
if (scanResult.status === "failed") return failed("barcodeNotResolved", "retry");
|
|
41
|
+
return {
|
|
42
|
+
status: "succeeded",
|
|
43
|
+
data: {
|
|
44
|
+
code: scanResult.status === "pending" ? "requiresSelection" : "added",
|
|
45
|
+
cartChangeConfirmed: scanResult.status === "success" && Number((_scanResult$meta$coun = (_scanResult$meta = scanResult.meta) === null || _scanResult$meta === void 0 ? void 0 : _scanResult$meta.count) !== null && _scanResult$meta$coun !== void 0 ? _scanResult$meta$coun : 0) > 0
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
} catch (error) {
|
|
49
|
+
return partialFailure("barcodeDispatchFailed", error);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return function consumeBarcode(_x, _x2) {
|
|
53
|
+
return _ref.apply(this, arguments);
|
|
54
|
+
};
|
|
55
|
+
}(),
|
|
56
|
+
addProduct: function() {
|
|
57
|
+
var _ref2 = _asyncToGenerator(function* (input, signal) {
|
|
58
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
59
|
+
const productId = Number(input.productId);
|
|
60
|
+
const quantity = Number(input.quantity);
|
|
61
|
+
if (!Number.isFinite(productId) || !Number.isFinite(quantity) || quantity <= 0) return failed("productInputInvalid", "back");
|
|
62
|
+
try {
|
|
63
|
+
const context = getContext();
|
|
64
|
+
const product = findCatalogProduct(context, String(productId));
|
|
65
|
+
if (!product) return failed("productNotFound", "back");
|
|
66
|
+
const result = yield context.cart.addProductWithFlow(product, {
|
|
67
|
+
quantity,
|
|
68
|
+
notShowToast: true
|
|
69
|
+
});
|
|
70
|
+
if (signal.aborted) return unknown("addProductAbortedAfterDispatch");
|
|
71
|
+
if (result.status === "cancelled") return cancelled("userCancelled");
|
|
72
|
+
if (result.status !== "added") return failed("productRequiresUnsupportedSelection", "back");
|
|
73
|
+
const confirmedLine = projectConfirmedMutationLine([...Array.isArray(result.products) ? result.products : []].reverse().find((candidate) => {
|
|
74
|
+
var _candidate$product_id;
|
|
75
|
+
return String((_candidate$product_id = candidate.product_id) !== null && _candidate$product_id !== void 0 ? _candidate$product_id : "") === input.productId;
|
|
76
|
+
}));
|
|
77
|
+
return {
|
|
78
|
+
status: "succeeded",
|
|
79
|
+
data: confirmedLine ? {
|
|
80
|
+
affectedLineId: confirmedLine.lineId,
|
|
81
|
+
confirmedLine
|
|
82
|
+
} : {}
|
|
83
|
+
};
|
|
84
|
+
} catch (error) {
|
|
85
|
+
return partialFailure("addProductFailed", error);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
return function addProduct(_x3, _x4) {
|
|
89
|
+
return _ref2.apply(this, arguments);
|
|
90
|
+
};
|
|
91
|
+
}(),
|
|
92
|
+
updateQuantity: function() {
|
|
93
|
+
var _ref3 = _asyncToGenerator(function* (input, signal) {
|
|
94
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
95
|
+
const quantity = Number(input.quantity);
|
|
96
|
+
if (!Number.isFinite(quantity) || quantity <= 0) return failed("quantityInvalid", "back");
|
|
97
|
+
const context = getContext();
|
|
98
|
+
const line = findCartLine(context, input.lineId);
|
|
99
|
+
if (!line) return failed("cartLineNotFound", "back");
|
|
100
|
+
try {
|
|
101
|
+
const updatedProducts = yield context.cart.updateItemQuantity(line, quantity);
|
|
102
|
+
if (signal.aborted) return unknown("updateQuantityAbortedAfterDispatch");
|
|
103
|
+
const confirmedLine = projectConfirmedCartLineById(Array.isArray(updatedProducts) ? updatedProducts : [], input.lineId);
|
|
104
|
+
return {
|
|
105
|
+
status: "succeeded",
|
|
106
|
+
data: _objectSpread2({ affectedLineId: input.lineId }, confirmedLine ? { confirmedLine } : {})
|
|
107
|
+
};
|
|
108
|
+
} catch (error) {
|
|
109
|
+
return partialFailure("updateQuantityFailed", error);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return function updateQuantity(_x5, _x6) {
|
|
113
|
+
return _ref3.apply(this, arguments);
|
|
114
|
+
};
|
|
115
|
+
}(),
|
|
116
|
+
removeLine: function() {
|
|
117
|
+
var _ref4 = _asyncToGenerator(function* (input, signal) {
|
|
118
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
119
|
+
const context = getContext();
|
|
120
|
+
const line = findCartLine(context, input.lineId);
|
|
121
|
+
if (!line) return failed("cartLineNotFound", "back");
|
|
122
|
+
try {
|
|
123
|
+
const remainingProducts = yield context.cart.removeItem(line);
|
|
124
|
+
if (signal.aborted) return unknown("removeLineAbortedAfterDispatch");
|
|
125
|
+
return {
|
|
126
|
+
status: "succeeded",
|
|
127
|
+
data: _objectSpread2({ affectedLineId: input.lineId }, Array.isArray(remainingProducts) && !remainingProducts.some((candidate) => resolveBigSaleLineId(candidate) === input.lineId) ? { removedLineId: input.lineId } : {})
|
|
128
|
+
};
|
|
129
|
+
} catch (error) {
|
|
130
|
+
return partialFailure("removeLineFailed", error);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
return function removeLine(_x7, _x8) {
|
|
134
|
+
return _ref4.apply(this, arguments);
|
|
135
|
+
};
|
|
136
|
+
}(),
|
|
137
|
+
waitForCartConsistency: function() {
|
|
138
|
+
var _ref5 = _asyncToGenerator(function* (signal) {
|
|
139
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
140
|
+
try {
|
|
141
|
+
yield getContext().cart.waitForCartConsistency();
|
|
142
|
+
if (signal.aborted) return unknown("consistencyAbortedAfterWait");
|
|
143
|
+
return {
|
|
144
|
+
status: "succeeded",
|
|
145
|
+
data: { observationId: getSnapshot().observationId }
|
|
146
|
+
};
|
|
147
|
+
} catch (error) {
|
|
148
|
+
return failed("cartConsistencyFailed", "retry", error);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
return function waitForCartConsistency(_x9) {
|
|
152
|
+
return _ref5.apply(this, arguments);
|
|
153
|
+
};
|
|
154
|
+
}(),
|
|
155
|
+
recalculateSummary: function() {
|
|
156
|
+
var _ref6 = _asyncToGenerator(function* (signal) {
|
|
157
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
158
|
+
try {
|
|
159
|
+
var _getContext$sales$tem, _getContext$sales$tem2, _getContext$sales$tem3, _getContext$sales$tem4;
|
|
160
|
+
const summary = yield getContext().cart.recalcSummary();
|
|
161
|
+
if (signal.aborted) return unknown("summaryAbortedAfterDispatch");
|
|
162
|
+
if (!summary) return failed("summaryMissing", "retry");
|
|
163
|
+
return {
|
|
164
|
+
status: "succeeded",
|
|
165
|
+
data: {
|
|
166
|
+
observationId: getSnapshot().observationId,
|
|
167
|
+
confirmedSummary: {
|
|
168
|
+
status: "ready",
|
|
169
|
+
currency: String((_getContext$sales$tem = (_getContext$sales$tem2 = getContext().sales.tempOrder) === null || _getContext$sales$tem2 === void 0 ? void 0 : _getContext$sales$tem2.currency_code) !== null && _getContext$sales$tem !== void 0 ? _getContext$sales$tem : ""),
|
|
170
|
+
currencySymbol: String((_getContext$sales$tem3 = (_getContext$sales$tem4 = getContext().sales.tempOrder) === null || _getContext$sales$tem4 === void 0 ? void 0 : _getContext$sales$tem4.currency_symbol) !== null && _getContext$sales$tem3 !== void 0 ? _getContext$sales$tem3 : ""),
|
|
171
|
+
total: String(summary.total_amount),
|
|
172
|
+
due: String(summary.expect_amount)
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
} catch (error) {
|
|
177
|
+
return failed("summaryRecalculationFailed", "retry", error);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
return function recalculateSummary(_x10) {
|
|
181
|
+
return _ref6.apply(this, arguments);
|
|
182
|
+
};
|
|
183
|
+
}()
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
export { createBigSaleCartOperations, findCartLine, projectConfirmedMutationLine };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
|
+
import { resolveProductPricePresentation } from "../../../../../../plus/productSelect/pricing/pricePresentation.js";
|
|
4
|
+
import { failed, partialFailure } from "../normalize.js";
|
|
5
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/catalog.ts
|
|
6
|
+
function findCatalogProduct(context, productId) {
|
|
7
|
+
return context.products.products.find((product) => String(product.id) === productId);
|
|
8
|
+
}
|
|
9
|
+
function resolveProductQuery(context) {
|
|
10
|
+
var _bookingTicket$store;
|
|
11
|
+
if (typeof context.products.queryProducts === "function") return function() {
|
|
12
|
+
var _ref = _asyncToGenerator(function* (params) {
|
|
13
|
+
return (yield context.products.queryProducts.call(context.products, params)) || [];
|
|
14
|
+
});
|
|
15
|
+
return function(_x) {
|
|
16
|
+
return _ref.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
}();
|
|
19
|
+
const bookingTicket = context.sales.bookingTicket;
|
|
20
|
+
if (typeof (bookingTicket === null || bookingTicket === void 0 ? void 0 : bookingTicket.queryProducts) === "function") return function() {
|
|
21
|
+
var _ref2 = _asyncToGenerator(function* (params) {
|
|
22
|
+
return (yield bookingTicket.queryProducts(params)) || [];
|
|
23
|
+
});
|
|
24
|
+
return function(_x2) {
|
|
25
|
+
return _ref2.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
}();
|
|
28
|
+
const productListStore = bookingTicket === null || bookingTicket === void 0 || (_bookingTicket$store = bookingTicket.store) === null || _bookingTicket$store === void 0 ? void 0 : _bookingTicket$store.products;
|
|
29
|
+
if (typeof (productListStore === null || productListStore === void 0 ? void 0 : productListStore.queryProducts) === "function") return function() {
|
|
30
|
+
var _ref3 = _asyncToGenerator(function* (params) {
|
|
31
|
+
return (yield productListStore.queryProducts.call(productListStore, params)) || [];
|
|
32
|
+
});
|
|
33
|
+
return function(_x3) {
|
|
34
|
+
return _ref3.apply(this, arguments);
|
|
35
|
+
};
|
|
36
|
+
}();
|
|
37
|
+
}
|
|
38
|
+
function queryPrimaryProduct(_x4, _x5, _x6) {
|
|
39
|
+
return _queryPrimaryProduct.apply(this, arguments);
|
|
40
|
+
}
|
|
41
|
+
function _queryPrimaryProduct() {
|
|
42
|
+
_queryPrimaryProduct = _asyncToGenerator(function* (context, productId, signal) {
|
|
43
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
44
|
+
const queryProducts = resolveProductQuery(context);
|
|
45
|
+
if (!queryProducts) return failed("primaryProductQueryUnavailable", "staff");
|
|
46
|
+
try {
|
|
47
|
+
let products = yield queryProducts({ includeIds: [productId] });
|
|
48
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
49
|
+
let product = products.find((candidate) => String(candidate.id) === productId);
|
|
50
|
+
const numericProductId = Number(productId);
|
|
51
|
+
if (!product && Number.isSafeInteger(numericProductId) && numericProductId > 0 && typeof context.products.findByIds === "function") {
|
|
52
|
+
yield context.products.findByIds([numericProductId], {
|
|
53
|
+
loadMissing: true,
|
|
54
|
+
refreshCatalog: false
|
|
55
|
+
});
|
|
56
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
57
|
+
products = yield queryProducts({ includeIds: [productId] });
|
|
58
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
59
|
+
product = products.find((candidate) => String(candidate.id) === productId);
|
|
60
|
+
}
|
|
61
|
+
return product ? {
|
|
62
|
+
status: "succeeded",
|
|
63
|
+
data: product
|
|
64
|
+
} : failed("primaryProductNotFound", "staff");
|
|
65
|
+
} catch (error) {
|
|
66
|
+
return partialFailure("primaryProductQueryFailed", error);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return _queryPrimaryProduct.apply(this, arguments);
|
|
70
|
+
}
|
|
71
|
+
function readProductName(product) {
|
|
72
|
+
const rawName = product.title;
|
|
73
|
+
if (typeof rawName === "string") return rawName || void 0;
|
|
74
|
+
if (!rawName || typeof rawName !== "object") return void 0;
|
|
75
|
+
return Object.values(rawName).find((value) => typeof value === "string" && value.length > 0);
|
|
76
|
+
}
|
|
77
|
+
function readLocalizedText(value) {
|
|
78
|
+
if (typeof value === "string") return value || void 0;
|
|
79
|
+
if (!value || typeof value !== "object") return void 0;
|
|
80
|
+
return Object.values(value).find((item) => typeof item === "string" && item.length > 0);
|
|
81
|
+
}
|
|
82
|
+
function projectProductCategories(product) {
|
|
83
|
+
const directCategories = Array.isArray(product.category) ? product.category : [];
|
|
84
|
+
const categories = /* @__PURE__ */ new Map();
|
|
85
|
+
const visit = (category, direct) => {
|
|
86
|
+
var _category$name, _ref4, _category$parent_id;
|
|
87
|
+
if (!category || category.id === void 0 || category.id === null) return;
|
|
88
|
+
const parent = category.parent_category;
|
|
89
|
+
visit(parent, false);
|
|
90
|
+
const categoryId = String(category.id);
|
|
91
|
+
const name = readLocalizedText((_category$name = category.name) !== null && _category$name !== void 0 ? _category$name : category.title);
|
|
92
|
+
if (!name) return;
|
|
93
|
+
const parentId = (_ref4 = (_category$parent_id = category.parent_id) !== null && _category$parent_id !== void 0 ? _category$parent_id : parent === null || parent === void 0 ? void 0 : parent.id) !== null && _ref4 !== void 0 ? _ref4 : void 0;
|
|
94
|
+
const previous = categories.get(categoryId);
|
|
95
|
+
categories.set(categoryId, Object.freeze({
|
|
96
|
+
categoryId,
|
|
97
|
+
name,
|
|
98
|
+
parentId: parentId === void 0 || parentId === null || parentId === 0 ? void 0 : String(parentId),
|
|
99
|
+
sort: Number.isFinite(Number(category.sort)) ? Number(category.sort) : void 0,
|
|
100
|
+
direct: direct || (previous === null || previous === void 0 ? void 0 : previous.direct) === true
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
103
|
+
directCategories.forEach((category) => visit(category, true));
|
|
104
|
+
return Object.freeze(Array.from(categories.values()));
|
|
105
|
+
}
|
|
106
|
+
function projectCatalogProduct(product, currency, currencySymbol) {
|
|
107
|
+
var _ref5, _ref6, _product$price, _product$variants, _product$variants2;
|
|
108
|
+
const name = readProductName(product);
|
|
109
|
+
if (!name) return void 0;
|
|
110
|
+
const rawPrice = (_ref5 = (_ref6 = (_product$price = product.price) !== null && _product$price !== void 0 ? _product$price : product.selling_price) !== null && _ref6 !== void 0 ? _ref6 : (_product$variants = product.variants) === null || _product$variants === void 0 || (_product$variants = _product$variants[0]) === null || _product$variants === void 0 ? void 0 : _product$variants.selling_price) !== null && _ref5 !== void 0 ? _ref5 : (_product$variants2 = product.variants) === null || _product$variants2 === void 0 || (_product$variants2 = _product$variants2[0]) === null || _product$variants2 === void 0 ? void 0 : _product$variants2.price;
|
|
111
|
+
const pricePresentation = resolveProductPricePresentation(product, rawPrice === void 0 || rawPrice === null ? void 0 : { price: rawPrice });
|
|
112
|
+
const categories = projectProductCategories(product);
|
|
113
|
+
return Object.freeze(_objectSpread2({
|
|
114
|
+
productId: String(product.id),
|
|
115
|
+
name,
|
|
116
|
+
imageUrl: product.cover || void 0,
|
|
117
|
+
currency: currency || void 0,
|
|
118
|
+
currencySymbol: currencySymbol || void 0,
|
|
119
|
+
pricePresentation: pricePresentation ? Object.freeze({
|
|
120
|
+
amount: String(pricePresentation.amount),
|
|
121
|
+
originalAmount: pricePresentation.originalAmount === void 0 ? void 0 : String(pricePresentation.originalAmount),
|
|
122
|
+
qualifier: pricePresentation.qualifier,
|
|
123
|
+
unit: pricePresentation.unit,
|
|
124
|
+
precision: pricePresentation.precision
|
|
125
|
+
}) : void 0,
|
|
126
|
+
available: product.status !== "disabled" && product.status !== "sold_out" && product.is_sold_out !== true
|
|
127
|
+
}, categories.length ? { categories } : {}));
|
|
128
|
+
}
|
|
129
|
+
function createBigSaleCatalogOperations({ getContext }) {
|
|
130
|
+
return {
|
|
131
|
+
getCatalogSnapshot: () => {
|
|
132
|
+
var _context$sales$tempOr, _context$sales$tempOr2, _context$sales$tempOr3, _context$sales$tempOr4;
|
|
133
|
+
const context = getContext();
|
|
134
|
+
const currency = String((_context$sales$tempOr = (_context$sales$tempOr2 = context.sales.tempOrder) === null || _context$sales$tempOr2 === void 0 ? void 0 : _context$sales$tempOr2.currency_code) !== null && _context$sales$tempOr !== void 0 ? _context$sales$tempOr : "");
|
|
135
|
+
const currencySymbol = String((_context$sales$tempOr3 = (_context$sales$tempOr4 = context.sales.tempOrder) === null || _context$sales$tempOr4 === void 0 ? void 0 : _context$sales$tempOr4.currency_symbol) !== null && _context$sales$tempOr3 !== void 0 ? _context$sales$tempOr3 : "");
|
|
136
|
+
const products = context.products.products.map((product) => projectCatalogProduct(product, currency, currencySymbol)).filter((product) => product !== void 0);
|
|
137
|
+
return Object.freeze({
|
|
138
|
+
status: context.products.error ? "error" : context.products.loading || context.sales.catalogState === "pending" ? "loading" : "ready",
|
|
139
|
+
products: Object.freeze(products)
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
loadPrimaryProduct: function() {
|
|
143
|
+
var _ref7 = _asyncToGenerator(function* (rawProductId, signal) {
|
|
144
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
145
|
+
const productId = Number(rawProductId);
|
|
146
|
+
if (!Number.isFinite(productId)) return failed("primaryProductIdInvalid", "staff");
|
|
147
|
+
try {
|
|
148
|
+
return yield queryPrimaryProduct(getContext(), String(productId), signal);
|
|
149
|
+
} catch (error) {
|
|
150
|
+
return partialFailure("primaryProductLoadFailed", error);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
return function loadPrimaryProduct(_x7, _x8) {
|
|
154
|
+
return _ref7.apply(this, arguments);
|
|
155
|
+
};
|
|
156
|
+
}()
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { createBigSaleCatalogOperations, findCatalogProduct, queryPrimaryProduct };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _objectSpread2 } from "
|
|
2
|
-
import { validateAndNormalizeSkuValue } from "
|
|
1
|
+
import { _objectSpread2 } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import { validateAndNormalizeSkuValue } from "../../../../../../plus/skuOptionsSelection/utils/validateSkuValue.js";
|
|
3
3
|
import { createHDLWeightedPreparedProduct } from "./weightedProduct.js";
|
|
4
4
|
import Decimal from "decimal.js";
|
|
5
|
-
//#region src/components/bigSale/templates/HDLKiosk/adapter/customizationProduct.ts
|
|
5
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/customizationProduct.ts
|
|
6
6
|
/**
|
|
7
7
|
* 文件角色:将 HDLKiosk 选中结果写入 OS 标准称重商品。
|
|
8
8
|
* 运行机制:提交时按 SKUOptionsSelection 的标准 ProductData 约束校验 SkuValue,并将
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
2
|
+
import { failed, partialFailure } from "../normalize.js";
|
|
3
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/fulfillment.ts
|
|
4
|
+
function createBigSaleFulfillmentOperations({ writeFulfillment, getWriteFulfillment, allowSimulatedFulfillment = false, onSimulatedFulfillment }) {
|
|
5
|
+
return { setFulfillment: function() {
|
|
6
|
+
var _ref = _asyncToGenerator(function* (input, signal) {
|
|
7
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
8
|
+
const currentWriteFulfillment = getWriteFulfillment ? getWriteFulfillment() : writeFulfillment;
|
|
9
|
+
if (!currentWriteFulfillment) {
|
|
10
|
+
if (allowSimulatedFulfillment) {
|
|
11
|
+
onSimulatedFulfillment === null || onSimulatedFulfillment === void 0 || onSimulatedFulfillment(input);
|
|
12
|
+
return {
|
|
13
|
+
status: "succeeded",
|
|
14
|
+
data: void 0
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return failed("fulfillmentHostWriterUnavailable", "staff");
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
return yield currentWriteFulfillment(input, signal);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
return partialFailure("fulfillmentWriteFailed", error);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return function setFulfillment(_x, _x2) {
|
|
26
|
+
return _ref.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
}() };
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { createBigSaleFulfillmentOperations };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
|
+
import { failed, partialFailure, unknown } from "../normalize.js";
|
|
4
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/identity.ts
|
|
5
|
+
function projectConfirmedCustomer(customer) {
|
|
6
|
+
var _customer$id;
|
|
7
|
+
if (!customer || [
|
|
8
|
+
"0",
|
|
9
|
+
"1",
|
|
10
|
+
""
|
|
11
|
+
].includes(String((_customer$id = customer.id) !== null && _customer$id !== void 0 ? _customer$id : ""))) return;
|
|
12
|
+
return Object.freeze(_objectSpread2(_objectSpread2({
|
|
13
|
+
customerId: String(customer.id),
|
|
14
|
+
displayName: typeof customer.name === "string" ? customer.name : void 0
|
|
15
|
+
}, typeof customer.avatar === "string" && customer.avatar.trim() ? { avatarUrl: customer.avatar.trim() } : {}), {}, { member: true }));
|
|
16
|
+
}
|
|
17
|
+
function createBigSaleIdentityOperations({ getContext, getAuthenticatedCustomer }) {
|
|
18
|
+
return { selectIdentity: function() {
|
|
19
|
+
var _ref = _asyncToGenerator(function* (input, signal) {
|
|
20
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
21
|
+
try {
|
|
22
|
+
var _input$customerId, _currentCustomer$id, _selected$id;
|
|
23
|
+
const context = getContext();
|
|
24
|
+
const customerId = (_input$customerId = input.customerId) === null || _input$customerId === void 0 ? void 0 : _input$customerId.trim();
|
|
25
|
+
if (!customerId) {
|
|
26
|
+
context.customer.select(null);
|
|
27
|
+
if (signal.aborted) return unknown("identityAbortedAfterDispatch");
|
|
28
|
+
return {
|
|
29
|
+
status: "succeeded",
|
|
30
|
+
data: {}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const authenticatedCustomer = getAuthenticatedCustomer === null || getAuthenticatedCustomer === void 0 ? void 0 : getAuthenticatedCustomer(customerId);
|
|
34
|
+
const currentCustomer = context.customer.selected;
|
|
35
|
+
const selected = authenticatedCustomer !== null && authenticatedCustomer !== void 0 ? authenticatedCustomer : String((_currentCustomer$id = currentCustomer === null || currentCustomer === void 0 ? void 0 : currentCustomer.id) !== null && _currentCustomer$id !== void 0 ? _currentCustomer$id : "") === customerId ? currentCustomer : void 0;
|
|
36
|
+
if (!selected || String(selected.id) !== customerId || [
|
|
37
|
+
"0",
|
|
38
|
+
"1",
|
|
39
|
+
""
|
|
40
|
+
].includes(String((_selected$id = selected.id) !== null && _selected$id !== void 0 ? _selected$id : ""))) return failed("authenticatedCustomerUnavailable", "back");
|
|
41
|
+
context.customer.select(selected);
|
|
42
|
+
if (signal.aborted) return unknown("identityAbortedAfterDispatch");
|
|
43
|
+
return {
|
|
44
|
+
status: "succeeded",
|
|
45
|
+
data: { customer: projectConfirmedCustomer(selected) }
|
|
46
|
+
};
|
|
47
|
+
} catch (error) {
|
|
48
|
+
return partialFailure("identitySelectionFailed", error);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return function selectIdentity(_x, _x2) {
|
|
52
|
+
return _ref.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
}() };
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { createBigSaleIdentityOperations };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import { createBigSaleCatalogOperations } from "./catalog.js";
|
|
3
|
+
import { createBigSaleCartOperations } from "./cart.js";
|
|
4
|
+
import { createBigSaleFulfillmentOperations } from "./fulfillment.js";
|
|
5
|
+
import { createBigSaleIdentityOperations } from "./identity.js";
|
|
6
|
+
import { createBigSalePaymentOperations } from "./payment.js";
|
|
7
|
+
import { createBigSaleSessionOperations } from "./session.js";
|
|
8
|
+
import { createBigSaleWeightedProductOperations } from "./weightedOperations.js";
|
|
9
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/index.ts
|
|
10
|
+
function createBigSaleSalesPort(dependencies) {
|
|
11
|
+
const { getContext, getSnapshot, subscribeProjection } = dependencies;
|
|
12
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({ getObservedSnapshot: getSnapshot }, createBigSaleCatalogOperations({ getContext })), {}, { subscribe: (listener) => {
|
|
13
|
+
var _subscribeProjection;
|
|
14
|
+
return (_subscribeProjection = subscribeProjection === null || subscribeProjection === void 0 ? void 0 : subscribeProjection(listener)) !== null && _subscribeProjection !== void 0 ? _subscribeProjection : (() => void 0);
|
|
15
|
+
} }, createBigSaleSessionOperations({ getContext })), createBigSaleIdentityOperations(dependencies)), createBigSaleFulfillmentOperations(dependencies)), createBigSaleWeightedProductOperations({ getContext })), createBigSaleCartOperations(dependencies)), createBigSalePaymentOperations(dependencies));
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { createBigSaleSalesPort };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
2
|
+
import { failed, isRecord, readPath, unknown } from "../normalize.js";
|
|
3
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/payment.ts
|
|
4
|
+
function cancelled(reason) {
|
|
5
|
+
return {
|
|
6
|
+
status: "cancelled",
|
|
7
|
+
reason
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function normalizeCheckoutResult(result, snapshot) {
|
|
11
|
+
var _readPath, _result$orderId, _snapshot$orderId, _snapshot$customer;
|
|
12
|
+
const status = isRecord(result) ? result.status : void 0;
|
|
13
|
+
const reason = isRecord(result) ? result.reason : void 0;
|
|
14
|
+
const type = isRecord(result) ? result.type : void 0;
|
|
15
|
+
if (status === "cancelled" || reason === "back" || reason === "cancel") return {
|
|
16
|
+
status: "cancelled",
|
|
17
|
+
reason: String(reason !== null && reason !== void 0 ? reason : "cancelled")
|
|
18
|
+
};
|
|
19
|
+
const paymentStatus = (_readPath = readPath(result, [
|
|
20
|
+
"payload",
|
|
21
|
+
"paymentResult",
|
|
22
|
+
"paymentResultViewModel",
|
|
23
|
+
"status"
|
|
24
|
+
])) !== null && _readPath !== void 0 ? _readPath : readPath(result, [
|
|
25
|
+
"data",
|
|
26
|
+
"paymentResult",
|
|
27
|
+
"paymentResultViewModel",
|
|
28
|
+
"status"
|
|
29
|
+
]);
|
|
30
|
+
if (paymentStatus === "failed" || paymentStatus === "wallet-pass-failed") return failed("checkoutFailed", "retry");
|
|
31
|
+
if (type === "error" || status === "failed") return failed("checkoutFailed", "retry");
|
|
32
|
+
if (!(paymentStatus === "success" || paymentStatus === "paid" || paymentStatus === "deposit-paid" || status === "success" || status === "paid")) return unknown("checkoutResultAmbiguous");
|
|
33
|
+
const resultOrderId = isRecord(result) && ((_result$orderId = result.orderId) !== null && _result$orderId !== void 0 ? _result$orderId : result.order_id) || readPath(result, ["payload", "order_id"]) || readPath(result, ["payload", "orderId"]);
|
|
34
|
+
const orderId = (_snapshot$orderId = snapshot.orderId) !== null && _snapshot$orderId !== void 0 ? _snapshot$orderId : resultOrderId;
|
|
35
|
+
if (!orderId || snapshot.summary.status !== "ready") return unknown("checkoutSuccessMissingOrderFacts");
|
|
36
|
+
return {
|
|
37
|
+
status: "succeeded",
|
|
38
|
+
data: {
|
|
39
|
+
orderId: String(orderId),
|
|
40
|
+
amount: snapshot.summary.due,
|
|
41
|
+
member: ((_snapshot$customer = snapshot.customer) === null || _snapshot$customer === void 0 ? void 0 : _snapshot$customer.member) === true
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function refreshCheckoutOrderProjection(_x, _x2, _x3) {
|
|
46
|
+
return _refreshCheckoutOrderProjection.apply(this, arguments);
|
|
47
|
+
}
|
|
48
|
+
function _refreshCheckoutOrderProjection() {
|
|
49
|
+
_refreshCheckoutOrderProjection = _asyncToGenerator(function* (getContext, getSnapshot, result) {
|
|
50
|
+
if (result.status !== "succeeded" || getSnapshot().pickupNumber) return;
|
|
51
|
+
const loadDetail = getContext().sales.loadDetail;
|
|
52
|
+
if (typeof loadDetail !== "function") return;
|
|
53
|
+
try {
|
|
54
|
+
yield loadDetail({
|
|
55
|
+
orderId: result.data.orderId,
|
|
56
|
+
forceRemote: true
|
|
57
|
+
});
|
|
58
|
+
} catch (_unused) {}
|
|
59
|
+
});
|
|
60
|
+
return _refreshCheckoutOrderProjection.apply(this, arguments);
|
|
61
|
+
}
|
|
62
|
+
function createBigSalePaymentOperations({ getContext, getSnapshot, getPaymentController }) {
|
|
63
|
+
return {
|
|
64
|
+
loadPaymentMethods: function() {
|
|
65
|
+
var _ref = _asyncToGenerator(function* (signal) {
|
|
66
|
+
if (signal.aborted) return cancelled("paymentMethodsAborted");
|
|
67
|
+
const controller = getPaymentController === null || getPaymentController === void 0 ? void 0 : getPaymentController();
|
|
68
|
+
return controller ? controller.loadPaymentMethods() : failed("paymentRuntimeUnavailable", "staff");
|
|
69
|
+
});
|
|
70
|
+
return function loadPaymentMethods(_x4) {
|
|
71
|
+
return _ref.apply(this, arguments);
|
|
72
|
+
};
|
|
73
|
+
}(),
|
|
74
|
+
payEftpos: function() {
|
|
75
|
+
var _ref2 = _asyncToGenerator(function* (input, signal) {
|
|
76
|
+
if (signal.aborted) return cancelled("eftposAborted");
|
|
77
|
+
const controller = getPaymentController === null || getPaymentController === void 0 ? void 0 : getPaymentController();
|
|
78
|
+
return controller ? controller.payEftpos(input) : failed("paymentRuntimeUnavailable", "staff");
|
|
79
|
+
});
|
|
80
|
+
return function payEftpos(_x5, _x6) {
|
|
81
|
+
return _ref2.apply(this, arguments);
|
|
82
|
+
};
|
|
83
|
+
}(),
|
|
84
|
+
requestStaffPaymentApproval: function() {
|
|
85
|
+
var _ref3 = _asyncToGenerator(function* (input, signal) {
|
|
86
|
+
if (signal.aborted) return cancelled("staffPaymentApprovalAborted");
|
|
87
|
+
const controller = getPaymentController === null || getPaymentController === void 0 ? void 0 : getPaymentController();
|
|
88
|
+
return controller ? controller.requestStaffPaymentApproval(input) : failed("paymentRuntimeUnavailable", "staff");
|
|
89
|
+
});
|
|
90
|
+
return function requestStaffPaymentApproval(_x7, _x8) {
|
|
91
|
+
return _ref3.apply(this, arguments);
|
|
92
|
+
};
|
|
93
|
+
}(),
|
|
94
|
+
subscribeStaffPaymentAuthorizationResult: (listener) => {
|
|
95
|
+
var _controller$subscribe;
|
|
96
|
+
const controller = getPaymentController === null || getPaymentController === void 0 ? void 0 : getPaymentController();
|
|
97
|
+
return (_controller$subscribe = controller === null || controller === void 0 ? void 0 : controller.subscribeStaffPaymentAuthorizationResult(listener)) !== null && _controller$subscribe !== void 0 ? _controller$subscribe : (() => void 0);
|
|
98
|
+
},
|
|
99
|
+
openCheckout: function() {
|
|
100
|
+
var _ref4 = _asyncToGenerator(function* (signal) {
|
|
101
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
102
|
+
try {
|
|
103
|
+
const snapshotBeforeCheckout = getSnapshot();
|
|
104
|
+
const result = yield getContext().sales.openCheckout({
|
|
105
|
+
paymentResultDisplayMode: "page",
|
|
106
|
+
walletPassMode: "shared"
|
|
107
|
+
});
|
|
108
|
+
if (signal.aborted) return unknown("checkoutAbortedAfterDispatch");
|
|
109
|
+
const checkoutResult = normalizeCheckoutResult(result, snapshotBeforeCheckout);
|
|
110
|
+
yield refreshCheckoutOrderProjection(getContext, getSnapshot, checkoutResult);
|
|
111
|
+
return checkoutResult;
|
|
112
|
+
} catch (error) {
|
|
113
|
+
return unknown("checkoutInvocationFailed", error);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return function openCheckout(_x9) {
|
|
117
|
+
return _ref4.apply(this, arguments);
|
|
118
|
+
};
|
|
119
|
+
}()
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
export { createBigSalePaymentOperations };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { _asyncToGenerator } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
2
|
+
import { partialFailure, unknown } from "../normalize.js";
|
|
3
|
+
import { resolveBigSaleLiveTempOrder } from "../host/projection.js";
|
|
4
|
+
//#region src/components/bigSale/templates/HDLKiosk/adapter/sales/session.ts
|
|
5
|
+
const PAYMENT_WRITE_FROZEN_STATUSES = new Set(["payment_pending", "processing"]);
|
|
6
|
+
function readPaymentStatus(order) {
|
|
7
|
+
var _order$payment_status;
|
|
8
|
+
return String((_order$payment_status = order === null || order === void 0 ? void 0 : order.payment_status) !== null && _order$payment_status !== void 0 ? _order$payment_status : "").trim().toLowerCase();
|
|
9
|
+
}
|
|
10
|
+
function hasCommittedOrderIdentity(order) {
|
|
11
|
+
const orderId = order === null || order === void 0 ? void 0 : order.order_id;
|
|
12
|
+
return orderId !== null && orderId !== void 0 && String(orderId).trim() !== "";
|
|
13
|
+
}
|
|
14
|
+
function isCommittedPaidOrder(order) {
|
|
15
|
+
return readPaymentStatus(order) === "paid" && hasCommittedOrderIdentity(order);
|
|
16
|
+
}
|
|
17
|
+
function createBigSaleSessionOperations({ getContext }) {
|
|
18
|
+
return {
|
|
19
|
+
ensureSession: function() {
|
|
20
|
+
var _ref = _asyncToGenerator(function* (signal) {
|
|
21
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
22
|
+
const context = getContext();
|
|
23
|
+
const currentOrder = resolveBigSaleLiveTempOrder(context);
|
|
24
|
+
const currentPaymentStatus = readPaymentStatus(currentOrder);
|
|
25
|
+
if (PAYMENT_WRITE_FROZEN_STATUSES.has(currentPaymentStatus)) return unknown("ensureSessionPaymentInProgress");
|
|
26
|
+
if (currentOrder && !isCommittedPaidOrder(currentOrder)) return {
|
|
27
|
+
status: "succeeded",
|
|
28
|
+
data: void 0
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
const createdOrder = isCommittedPaidOrder(currentOrder) ? yield context.sales.clearCartAndReset() : yield context.sales.createNew();
|
|
32
|
+
if (signal.aborted) return unknown("ensureSessionAbortedAfterDispatch");
|
|
33
|
+
const liveCreatedOrder = resolveBigSaleLiveTempOrder(getContext());
|
|
34
|
+
const createdPaymentStatus = readPaymentStatus(liveCreatedOrder !== null && liveCreatedOrder !== void 0 ? liveCreatedOrder : createdOrder);
|
|
35
|
+
if (isCommittedPaidOrder(liveCreatedOrder !== null && liveCreatedOrder !== void 0 ? liveCreatedOrder : createdOrder) || PAYMENT_WRITE_FROZEN_STATUSES.has(createdPaymentStatus)) return unknown("ensureSessionNotWritable");
|
|
36
|
+
return {
|
|
37
|
+
status: "succeeded",
|
|
38
|
+
data: void 0
|
|
39
|
+
};
|
|
40
|
+
} catch (error) {
|
|
41
|
+
return partialFailure("ensureSessionFailed", error);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return function ensureSession(_x) {
|
|
45
|
+
return _ref.apply(this, arguments);
|
|
46
|
+
};
|
|
47
|
+
}(),
|
|
48
|
+
clearAndReset: function() {
|
|
49
|
+
var _ref2 = _asyncToGenerator(function* (signal) {
|
|
50
|
+
if (signal.aborted) return { status: "cancelled" };
|
|
51
|
+
try {
|
|
52
|
+
var _resetOrder$products$, _resetOrder$products, _resetOrder$bookings$, _resetOrder$bookings;
|
|
53
|
+
const resetOrder = yield getContext().sales.clearCartAndReset();
|
|
54
|
+
if (signal.aborted) return unknown("resetAbortedAfterDispatch");
|
|
55
|
+
if (!(((_resetOrder$products$ = (_resetOrder$products = resetOrder.products) === null || _resetOrder$products === void 0 ? void 0 : _resetOrder$products.length) !== null && _resetOrder$products$ !== void 0 ? _resetOrder$products$ : 0) === 0 && ((_resetOrder$bookings$ = (_resetOrder$bookings = resetOrder.bookings) === null || _resetOrder$bookings === void 0 ? void 0 : _resetOrder$bookings.length) !== null && _resetOrder$bookings$ !== void 0 ? _resetOrder$bookings$ : 0) === 0)) return unknown("resetHostResultNotEmpty");
|
|
56
|
+
return {
|
|
57
|
+
status: "succeeded",
|
|
58
|
+
data: { cartEmpty: true }
|
|
59
|
+
};
|
|
60
|
+
} catch (error) {
|
|
61
|
+
return partialFailure("resetFailed", error);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return function clearAndReset(_x2) {
|
|
65
|
+
return _ref2.apply(this, arguments);
|
|
66
|
+
};
|
|
67
|
+
}()
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { createBigSaleSessionOperations };
|