@aglyn/plugins-commerce 1.0.0-beta.230 → 1.0.0-beta.232
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/package.json +13 -13
- package/src/index.d.ts +0 -1
- package/src/index.js +0 -1
- package/src/index.js.map +1 -1
- package/src/lib/barcode/barcode-decode.d.ts +71 -0
- package/src/lib/barcode/barcode-decode.js +498 -0
- package/src/lib/barcode/barcode-decode.js.map +1 -0
- package/src/lib/barcode/barcode-encode.d.ts +44 -0
- package/src/lib/barcode/barcode-encode.js +138 -0
- package/src/lib/barcode/barcode-encode.js.map +1 -0
- package/src/lib/barcode/barcode-scanner.component.d.ts +23 -0
- package/src/lib/barcode/barcode-scanner.component.js +260 -0
- package/src/lib/barcode/barcode-scanner.component.js.map +1 -0
- package/src/lib/barcode/scan-button.component.d.ts +10 -0
- package/src/lib/barcode/scan-button.component.js +62 -0
- package/src/lib/barcode/scan-button.component.js.map +1 -0
- package/src/lib/barcode/scanner-wedge.d.ts +35 -0
- package/src/lib/barcode/scanner-wedge.js +108 -0
- package/src/lib/barcode/scanner-wedge.js.map +1 -0
- package/src/lib/components/account.js +10 -1
- package/src/lib/components/account.js.map +1 -1
- package/src/lib/components/cart-extras.d.ts +45 -0
- package/src/lib/components/cart-extras.js +127 -0
- package/src/lib/components/cart-extras.js.map +1 -0
- package/src/lib/components/cart.js +82 -15
- package/src/lib/components/cart.js.map +1 -1
- package/src/lib/components/checkout-return-notice.d.ts +26 -0
- package/src/lib/components/checkout-return-notice.js +48 -0
- package/src/lib/components/checkout-return-notice.js.map +1 -0
- package/src/lib/components/commerce-console-page.js +124 -0
- package/src/lib/components/commerce-console-page.js.map +1 -1
- package/src/lib/components/commerce-console-sections.d.ts +1 -1
- package/src/lib/components/commerce-console-sections.js +4 -0
- package/src/lib/components/commerce-console-sections.js.map +1 -1
- package/src/lib/components/console/bulk-fulfill.d.ts +44 -0
- package/src/lib/components/console/bulk-fulfill.js +84 -0
- package/src/lib/components/console/bulk-fulfill.js.map +1 -0
- package/src/lib/components/console/catalog-organization-card.component.js +1 -0
- package/src/lib/components/console/catalog-organization-card.component.js.map +1 -1
- package/src/lib/components/console/customer-notifications-card.component.d.ts +19 -0
- package/src/lib/components/console/customer-notifications-card.component.js +149 -0
- package/src/lib/components/console/customer-notifications-card.component.js.map +1 -0
- package/src/lib/components/console/host-orders-card.component.js +88 -6
- package/src/lib/components/console/host-orders-card.component.js.map +1 -1
- package/src/lib/components/console/locations-card.component.js +164 -57
- package/src/lib/components/console/locations-card.component.js.map +1 -1
- package/src/lib/components/console/order-detail-dialog.component.js +209 -61
- package/src/lib/components/console/order-detail-dialog.component.js.map +1 -1
- package/src/lib/components/console/order-fulfillment-panel.component.d.ts +48 -0
- package/src/lib/components/console/order-fulfillment-panel.component.js +542 -0
- package/src/lib/components/console/order-fulfillment-panel.component.js.map +1 -0
- package/src/lib/components/console/order-invoice.component.d.ts +33 -0
- package/src/lib/components/console/order-invoice.component.js +81 -0
- package/src/lib/components/console/order-invoice.component.js.map +1 -0
- package/src/lib/components/console/order-receipt-resend.component.d.ts +21 -0
- package/src/lib/components/console/order-receipt-resend.component.js +203 -0
- package/src/lib/components/console/order-receipt-resend.component.js.map +1 -0
- package/src/lib/components/console/order-returns.component.d.ts +36 -0
- package/src/lib/components/console/order-returns.component.js +142 -0
- package/src/lib/components/console/order-returns.component.js.map +1 -0
- package/src/lib/components/console/order-shipping-actions.component.d.ts +54 -0
- package/src/lib/components/console/order-shipping-actions.component.js +149 -0
- package/src/lib/components/console/order-shipping-actions.component.js.map +1 -0
- package/src/lib/components/console/order-webhooks-card.component.d.ts +50 -0
- package/src/lib/components/console/order-webhooks-card.component.js +623 -0
- package/src/lib/components/console/order-webhooks-card.component.js.map +1 -0
- package/src/lib/components/console/order-zones.d.ts +155 -0
- package/src/lib/components/console/order-zones.js +40 -0
- package/src/lib/components/console/order-zones.js.map +1 -0
- package/src/lib/components/console/payment-methods-card.component.d.ts +67 -0
- package/src/lib/components/console/payment-methods-card.component.js +395 -0
- package/src/lib/components/console/payment-methods-card.component.js.map +1 -0
- package/src/lib/components/console/pos/pos-api.d.ts +124 -0
- package/src/lib/components/console/pos/pos-api.js +101 -0
- package/src/lib/components/console/pos/pos-api.js.map +1 -0
- package/src/lib/components/console/pos/pos-cart-panel.component.d.ts +36 -0
- package/src/lib/components/console/pos/pos-cart-panel.component.js +160 -0
- package/src/lib/components/console/pos/pos-cart-panel.component.js.map +1 -0
- package/src/lib/components/console/pos/pos-item-dialog.component.d.ts +39 -0
- package/src/lib/components/console/pos/pos-item-dialog.component.js +352 -0
- package/src/lib/components/console/pos/pos-item-dialog.component.js.map +1 -0
- package/src/lib/components/console/pos/pos-product-grid.component.d.ts +47 -0
- package/src/lib/components/console/pos/pos-product-grid.component.js +272 -0
- package/src/lib/components/console/pos/pos-product-grid.component.js.map +1 -0
- package/src/lib/components/console/pos/pos-receipt-panel.component.d.ts +27 -0
- package/src/lib/components/console/pos/pos-receipt-panel.component.js +282 -0
- package/src/lib/components/console/pos/pos-receipt-panel.component.js.map +1 -0
- package/src/lib/components/console/pos/pos-tender-dialogs.component.d.ts +53 -0
- package/src/lib/components/console/pos/pos-tender-dialogs.component.js +445 -0
- package/src/lib/components/console/pos/pos-tender-dialogs.component.js.map +1 -0
- package/src/lib/components/console/pos/pos-tender-panel.component.d.ts +31 -0
- package/src/lib/components/console/pos/pos-tender-panel.component.js +640 -0
- package/src/lib/components/console/pos/pos-tender-panel.component.js.map +1 -0
- package/src/lib/components/console/pos/use-pos-display.d.ts +43 -0
- package/src/lib/components/console/pos/use-pos-display.js +161 -0
- package/src/lib/components/console/pos/use-pos-display.js.map +1 -0
- package/src/lib/components/console/pos-devices-card.component.d.ts +14 -0
- package/src/lib/components/console/pos-devices-card.component.js +546 -0
- package/src/lib/components/console/pos-devices-card.component.js.map +1 -0
- package/src/lib/components/console/pos-display/brand-screen.d.ts +33 -0
- package/src/lib/components/console/pos-display/brand-screen.js +85 -0
- package/src/lib/components/console/pos-display/brand-screen.js.map +1 -0
- package/src/lib/components/console/pos-display/cart-screen.d.ts +29 -0
- package/src/lib/components/console/pos-display/cart-screen.js +166 -0
- package/src/lib/components/console/pos-display/cart-screen.js.map +1 -0
- package/src/lib/components/console/pos-display/pairing-screen.d.ts +24 -0
- package/src/lib/components/console/pos-display/pairing-screen.js +127 -0
- package/src/lib/components/console/pos-display/pairing-screen.js.map +1 -0
- package/src/lib/components/console/pos-display/pos-display-api.d.ts +90 -0
- package/src/lib/components/console/pos-display/pos-display-api.js +140 -0
- package/src/lib/components/console/pos-display/pos-display-api.js.map +1 -0
- package/src/lib/components/console/pos-display/receipt-screen.d.ts +35 -0
- package/src/lib/components/console/pos-display/receipt-screen.js +200 -0
- package/src/lib/components/console/pos-display/receipt-screen.js.map +1 -0
- package/src/lib/components/console/pos-display/tip-screen.d.ts +36 -0
- package/src/lib/components/console/pos-display/tip-screen.js +211 -0
- package/src/lib/components/console/pos-display/tip-screen.js.map +1 -0
- package/src/lib/components/console/pos-display-page.component.d.ts +16 -0
- package/src/lib/components/console/pos-display-page.component.js +407 -0
- package/src/lib/components/console/pos-display-page.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-customer-lookup.component.d.ts +40 -0
- package/src/lib/components/console/pos-ops/pos-customer-lookup.component.js +289 -0
- package/src/lib/components/console/pos-ops/pos-customer-lookup.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-last-receipt.component.d.ts +34 -0
- package/src/lib/components/console/pos-ops/pos-last-receipt.component.js +61 -0
- package/src/lib/components/console/pos-ops/pos-last-receipt.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-operations-bar.component.d.ts +38 -0
- package/src/lib/components/console/pos-ops/pos-operations-bar.component.js +129 -0
- package/src/lib/components/console/pos-ops/pos-operations-bar.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-ops-api.d.ts +37 -0
- package/src/lib/components/console/pos-ops/pos-ops-api.js +60 -0
- package/src/lib/components/console/pos-ops/pos-ops-api.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-pin-pad.component.d.ts +48 -0
- package/src/lib/components/console/pos-ops/pos-pin-pad.component.js +220 -0
- package/src/lib/components/console/pos-ops/pos-pin-pad.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-receipt-actions.component.d.ts +63 -0
- package/src/lib/components/console/pos-ops/pos-receipt-actions.component.js +186 -0
- package/src/lib/components/console/pos-ops/pos-receipt-actions.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-receipt.d.ts +39 -0
- package/src/lib/components/console/pos-ops/pos-receipt.js +182 -0
- package/src/lib/components/console/pos-ops/pos-receipt.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-return-dialog.component.d.ts +40 -0
- package/src/lib/components/console/pos-ops/pos-return-dialog.component.js +465 -0
- package/src/lib/components/console/pos-ops/pos-return-dialog.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-shift-history-card.component.d.ts +29 -0
- package/src/lib/components/console/pos-ops/pos-shift-history-card.component.js +253 -0
- package/src/lib/components/console/pos-ops/pos-shift-history-card.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-shift-panel.component.d.ts +34 -0
- package/src/lib/components/console/pos-ops/pos-shift-panel.component.js +494 -0
- package/src/lib/components/console/pos-ops/pos-shift-panel.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-shift-report.component.d.ts +37 -0
- package/src/lib/components/console/pos-ops/pos-shift-report.component.js +102 -0
- package/src/lib/components/console/pos-ops/pos-shift-report.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/pos-staff-pins-card.component.d.ts +30 -0
- package/src/lib/components/console/pos-ops/pos-staff-pins-card.component.js +277 -0
- package/src/lib/components/console/pos-ops/pos-staff-pins-card.component.js.map +1 -0
- package/src/lib/components/console/pos-ops/register-ops.d.ts +28 -0
- package/src/lib/components/console/pos-ops/register-ops.js +28 -0
- package/src/lib/components/console/pos-ops/register-ops.js.map +1 -0
- package/src/lib/components/console/pos-ops/use-pos-cashier.d.ts +46 -0
- package/src/lib/components/console/pos-ops/use-pos-cashier.js +128 -0
- package/src/lib/components/console/pos-ops/use-pos-cashier.js.map +1 -0
- package/src/lib/components/console/pos-ops/use-pos-sale-receipt.d.ts +36 -0
- package/src/lib/components/console/pos-ops/use-pos-sale-receipt.js +64 -0
- package/src/lib/components/console/pos-ops/use-pos-sale-receipt.js.map +1 -0
- package/src/lib/components/console/pos-page.component.d.ts +13 -5
- package/src/lib/components/console/pos-page.component.js +756 -654
- package/src/lib/components/console/pos-page.component.js.map +1 -1
- package/src/lib/components/console/pos-zones.d.ts +23 -0
- package/src/lib/components/console/pos-zones.js +31 -0
- package/src/lib/components/console/pos-zones.js.map +1 -0
- package/src/lib/components/console/product-editor-dialog.component.js +61 -71
- package/src/lib/components/console/product-editor-dialog.component.js.map +1 -1
- package/src/lib/components/console/product-labels-dialog.component.d.ts +13 -0
- package/src/lib/components/console/product-labels-dialog.component.js +197 -0
- package/src/lib/components/console/product-labels-dialog.component.js.map +1 -0
- package/src/lib/components/console/product-register-fields.component.d.ts +19 -0
- package/src/lib/components/console/product-register-fields.component.js +241 -0
- package/src/lib/components/console/product-register-fields.component.js.map +1 -0
- package/src/lib/components/console/product-zones.d.ts +44 -0
- package/src/lib/components/console/product-zones.js.map +1 -1
- package/src/lib/components/console/products-hub-card.component.js +23 -20
- package/src/lib/components/console/products-hub-card.component.js.map +1 -1
- package/src/lib/components/console/register-hardware-card.component.d.ts +33 -0
- package/src/lib/components/console/register-hardware-card.component.js +826 -0
- package/src/lib/components/console/register-hardware-card.component.js.map +1 -0
- package/src/lib/components/console/registers-card.component.js +24 -5
- package/src/lib/components/console/registers-card.component.js.map +1 -1
- package/src/lib/components/console/return-actions.d.ts +38 -0
- package/src/lib/components/console/return-actions.js +76 -0
- package/src/lib/components/console/return-actions.js.map +1 -0
- package/src/lib/components/console/return-detail-dialog.component.d.ts +34 -0
- package/src/lib/components/console/return-detail-dialog.component.js +718 -0
- package/src/lib/components/console/return-detail-dialog.component.js.map +1 -0
- package/src/lib/components/console/return-settings-card.component.d.ts +34 -0
- package/src/lib/components/console/return-settings-card.component.js +195 -0
- package/src/lib/components/console/return-settings-card.component.js.map +1 -0
- package/src/lib/components/console/return-zones.d.ts +87 -0
- package/src/lib/components/console/return-zones.js +31 -0
- package/src/lib/components/console/return-zones.js.map +1 -0
- package/src/lib/components/console/returns-card.component.d.ts +45 -0
- package/src/lib/components/console/returns-card.component.js +159 -0
- package/src/lib/components/console/returns-card.component.js.map +1 -0
- package/src/lib/components/console/shipping-settings-card.component.js +161 -5
- package/src/lib/components/console/shipping-settings-card.component.js.map +1 -1
- package/src/lib/components/console/shippingeasy-card.component.d.ts +59 -0
- package/src/lib/components/console/shippingeasy-card.component.js +378 -0
- package/src/lib/components/console/shippingeasy-card.component.js.map +1 -0
- package/src/lib/components/console/shipstation-card.component.d.ts +35 -0
- package/src/lib/components/console/shipstation-card.component.js +345 -0
- package/src/lib/components/console/shipstation-card.component.js.map +1 -0
- package/src/lib/components/console/start-return-dialog.component.d.ts +40 -0
- package/src/lib/components/console/start-return-dialog.component.js +243 -0
- package/src/lib/components/console/start-return-dialog.component.js.map +1 -0
- package/src/lib/components/console/stock-movements-card.component.js +2 -1
- package/src/lib/components/console/stock-movements-card.component.js.map +1 -1
- package/src/lib/components/console/store-settings-card.component.js +2 -66
- package/src/lib/components/console/store-settings-card.component.js.map +1 -1
- package/src/lib/components/console/store-zones.d.ts +42 -0
- package/src/lib/components/console/store-zones.js +39 -0
- package/src/lib/components/console/store-zones.js.map +1 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.js +1 -0
- package/src/lib/components/console/storefront-tax-summary-card.component.js.map +1 -1
- package/src/lib/components/order-status.d.ts +36 -0
- package/src/lib/components/order-status.js +502 -0
- package/src/lib/components/order-status.js.map +1 -0
- package/src/lib/components/product-detail.js +41 -2
- package/src/lib/components/product-detail.js.map +1 -1
- package/src/lib/components/return-request.d.ts +32 -0
- package/src/lib/components/return-request.js +576 -0
- package/src/lib/components/return-request.js.map +1 -0
- package/src/lib/components/storefront-payment-appearance.d.ts +32 -0
- package/src/lib/components/storefront-payment-appearance.js +114 -0
- package/src/lib/components/storefront-payment-appearance.js.map +1 -0
- package/src/lib/components/storefront-payment-element.d.ts +57 -1
- package/src/lib/components/storefront-payment-element.js +332 -33
- package/src/lib/components/storefront-payment-element.js.map +1 -1
- package/src/lib/constants/order-status.d.ts +22 -0
- package/src/lib/constants/order-status.js +22 -0
- package/src/lib/constants/order-status.js.map +1 -0
- package/src/lib/constants/return-request.d.ts +27 -0
- package/src/lib/constants/return-request.js +32 -0
- package/src/lib/constants/return-request.js.map +1 -0
- package/src/lib/constants/stock-movement-query.js +2 -1
- package/src/lib/constants/stock-movement-query.js.map +1 -1
- package/src/lib/declarations.console-server.js +9 -0
- package/src/lib/declarations.console-server.js.map +1 -1
- package/src/lib/declarations.server.d.ts +2 -1
- package/src/lib/declarations.server.js +68 -1
- package/src/lib/declarations.server.js.map +1 -1
- package/src/lib/model/buyer-notifications.d.ts +59 -0
- package/src/lib/model/buyer-notifications.js +97 -0
- package/src/lib/model/buyer-notifications.js.map +1 -0
- package/src/lib/model/commerce-orders.d.ts +171 -2
- package/src/lib/model/commerce-orders.js +26 -16
- package/src/lib/model/commerce-orders.js.map +1 -1
- package/src/lib/model/commerce-payment-methods.d.ts +146 -0
- package/src/lib/model/commerce-payment-methods.js +247 -0
- package/src/lib/model/commerce-payment-methods.js.map +1 -0
- package/src/lib/model/commerce-pos-ops.d.ts +437 -0
- package/src/lib/model/commerce-pos-ops.js +721 -0
- package/src/lib/model/commerce-pos-ops.js.map +1 -0
- package/src/lib/model/commerce-pos.d.ts +263 -0
- package/src/lib/model/commerce-pos.js +375 -0
- package/src/lib/model/commerce-pos.js.map +1 -0
- package/src/lib/model/commerce-printers.d.ts +211 -0
- package/src/lib/model/commerce-printers.js +181 -0
- package/src/lib/model/commerce-printers.js.map +1 -0
- package/src/lib/model/commerce-receipt.d.ts +97 -0
- package/src/lib/model/commerce-receipt.js +180 -0
- package/src/lib/model/commerce-receipt.js.map +1 -0
- package/src/lib/model/commerce-returns.d.ts +207 -0
- package/src/lib/model/commerce-returns.js +300 -0
- package/src/lib/model/commerce-returns.js.map +1 -0
- package/src/lib/model/commerce-shipping.d.ts +44 -1
- package/src/lib/model/commerce-shipping.js +53 -9
- package/src/lib/model/commerce-shipping.js.map +1 -1
- package/src/lib/model/commerce-tax-engine.d.ts +90 -0
- package/src/lib/model/commerce-tax-engine.js +129 -0
- package/src/lib/model/commerce-tax-engine.js.map +1 -0
- package/src/lib/model/commerce.d.ts +91 -2
- package/src/lib/model/commerce.js +89 -1
- package/src/lib/model/commerce.js.map +1 -1
- package/src/lib/model/index.d.ts +16 -0
- package/src/lib/model/index.js +16 -0
- package/src/lib/model/index.js.map +1 -1
- package/src/lib/model/order-events.d.ts +154 -0
- package/src/lib/model/order-events.js +153 -0
- package/src/lib/model/order-events.js.map +1 -0
- package/src/lib/model/order-fulfillment.d.ts +117 -0
- package/src/lib/model/order-fulfillment.js +217 -0
- package/src/lib/model/order-fulfillment.js.map +1 -0
- package/src/lib/model/order-history.d.ts +58 -0
- package/src/lib/model/order-history.js +22 -0
- package/src/lib/model/order-history.js.map +1 -0
- package/src/lib/model/order-list-fields.d.ts +9 -1
- package/src/lib/model/order-list-fields.js +7 -1
- package/src/lib/model/order-list-fields.js.map +1 -1
- package/src/lib/model/order-shipping-export.d.ts +91 -0
- package/src/lib/model/order-shipping-export.js +192 -0
- package/src/lib/model/order-shipping-export.js.map +1 -0
- package/src/lib/model/order-status-view.d.ts +103 -0
- package/src/lib/model/order-status-view.js +156 -0
- package/src/lib/model/order-status-view.js.map +1 -0
- package/src/lib/model/order-webhooks.d.ts +142 -0
- package/src/lib/model/order-webhooks.js +91 -0
- package/src/lib/model/order-webhooks.js.map +1 -0
- package/src/lib/model/product-channel.d.ts +56 -0
- package/src/lib/model/product-channel.js +86 -0
- package/src/lib/model/product-channel.js.map +1 -0
- package/src/lib/model/product-modifiers.d.ts +80 -0
- package/src/lib/model/product-modifiers.js +140 -0
- package/src/lib/model/product-modifiers.js.map +1 -0
- package/src/lib/model/product-write.d.ts +186 -0
- package/src/lib/model/product-write.js +116 -0
- package/src/lib/model/product-write.js.map +1 -0
- package/src/lib/model/shippingeasy.d.ts +94 -0
- package/src/lib/model/shippingeasy.js +267 -0
- package/src/lib/model/shippingeasy.js.map +1 -0
- package/src/lib/model/shipstation.d.ts +125 -0
- package/src/lib/model/shipstation.js +399 -0
- package/src/lib/model/shipstation.js.map +1 -0
- package/src/lib/model/smart-collection-reads.d.ts +32 -0
- package/src/lib/model/smart-collection-reads.js +63 -0
- package/src/lib/model/smart-collection-reads.js.map +1 -0
- package/src/lib/model/tracking-url.d.ts +74 -0
- package/src/lib/model/tracking-url.js +159 -0
- package/src/lib/model/tracking-url.js.map +1 -0
- package/src/lib/plugin-config.d.ts +13 -0
- package/src/lib/plugin-config.js +77 -5
- package/src/lib/plugin-config.js.map +1 -1
- package/src/lib/plugin.js +26 -0
- package/src/lib/plugin.js.map +1 -1
- package/src/lib/pos-ops-config.d.ts +39 -0
- package/src/lib/pos-ops-config.js +88 -0
- package/src/lib/pos-ops-config.js.map +1 -0
- package/src/lib/printing/print-document.d.ts +106 -0
- package/src/lib/printing/print-document.js +464 -0
- package/src/lib/printing/print-document.js.map +1 -0
- package/src/lib/printing/product-labels.d.ts +58 -0
- package/src/lib/printing/product-labels.js +116 -0
- package/src/lib/printing/product-labels.js.map +1 -0
- package/src/lib/printing/render-epson.d.ts +57 -0
- package/src/lib/printing/render-epson.js +135 -0
- package/src/lib/printing/render-epson.js.map +1 -0
- package/src/lib/printing/render-star.d.ts +45 -0
- package/src/lib/printing/render-star.js +100 -0
- package/src/lib/printing/render-star.js.map +1 -0
- package/src/lib/printing/render-text.d.ts +25 -0
- package/src/lib/printing/render-text.js +53 -0
- package/src/lib/printing/render-text.js.map +1 -0
- package/src/lib/server/api-v1/openapi.js +27 -4
- package/src/lib/server/api-v1/openapi.js.map +1 -1
- package/src/lib/server/api-v1/order-view.d.ts +67 -0
- package/src/lib/server/api-v1/order-view.js +120 -0
- package/src/lib/server/api-v1/order-view.js.map +1 -0
- package/src/lib/server/api-v1/orders-and-products.js +58 -65
- package/src/lib/server/api-v1/orders-and-products.js.map +1 -1
- package/src/lib/server/billing-webhook.js +135 -28
- package/src/lib/server/billing-webhook.js.map +1 -1
- package/src/lib/server/cancel-order.js +29 -0
- package/src/lib/server/cancel-order.js.map +1 -1
- package/src/lib/server/carrier-rates-availability.d.ts +26 -0
- package/src/lib/server/carrier-rates-availability.js +76 -0
- package/src/lib/server/carrier-rates-availability.js.map +1 -0
- package/src/lib/server/carrier-shipping.d.ts +84 -0
- package/src/lib/server/carrier-shipping.js +135 -0
- package/src/lib/server/carrier-shipping.js.map +1 -0
- package/src/lib/server/cart-checkout.d.ts +2 -0
- package/src/lib/server/cart-checkout.js +226 -22
- package/src/lib/server/cart-checkout.js.map +1 -1
- package/src/lib/server/channel-order-updates.d.ts +50 -0
- package/src/lib/server/channel-order-updates.js +290 -0
- package/src/lib/server/channel-order-updates.js.map +1 -0
- package/src/lib/server/channel-orders.d.ts +85 -0
- package/src/lib/server/channel-orders.js +543 -0
- package/src/lib/server/channel-orders.js.map +1 -0
- package/src/lib/server/checkout-extras.d.ts +64 -0
- package/src/lib/server/checkout-extras.js +157 -0
- package/src/lib/server/checkout-extras.js.map +1 -0
- package/src/lib/server/{feed.d.ts → checkout-status.d.ts} +2 -7
- package/src/lib/server/checkout-status.js +111 -0
- package/src/lib/server/checkout-status.js.map +1 -0
- package/src/lib/server/checkout.js +86 -9
- package/src/lib/server/checkout.js.map +1 -1
- package/src/lib/server/draft-order.js +34 -5
- package/src/lib/server/draft-order.js.map +1 -1
- package/src/lib/server/fulfill-order.d.ts +127 -10
- package/src/lib/server/fulfill-order.js +451 -49
- package/src/lib/server/fulfill-order.js.map +1 -1
- package/src/lib/server/legacy-feed.d.ts +28 -0
- package/src/lib/server/legacy-feed.js +52 -0
- package/src/lib/server/legacy-feed.js.map +1 -0
- package/src/lib/server/native-checkout.d.ts +34 -15
- package/src/lib/server/native-checkout.js +32 -17
- package/src/lib/server/native-checkout.js.map +1 -1
- package/src/lib/server/order-event-host-emit.d.ts +23 -0
- package/src/lib/server/order-event-host-emit.js +30 -0
- package/src/lib/server/order-event-host-emit.js.map +1 -0
- package/src/lib/server/order-event-triggers.d.ts +37 -0
- package/src/lib/server/order-event-triggers.js +119 -0
- package/src/lib/server/order-event-triggers.js.map +1 -0
- package/src/lib/server/order-events.d.ts +62 -0
- package/src/lib/server/order-events.js +109 -0
- package/src/lib/server/order-events.js.map +1 -0
- package/src/lib/server/order-history.d.ts +23 -0
- package/src/lib/server/order-history.js +65 -0
- package/src/lib/server/order-history.js.map +1 -0
- package/src/lib/server/order-notifications.d.ts +185 -0
- package/src/lib/server/order-notifications.js +567 -0
- package/src/lib/server/order-notifications.js.map +1 -0
- package/src/lib/server/order-receipt-send.d.ts +39 -0
- package/src/lib/server/order-receipt-send.js +151 -0
- package/src/lib/server/order-receipt-send.js.map +1 -0
- package/src/lib/server/order-status-token.d.ts +31 -0
- package/src/lib/server/order-status-token.js +75 -0
- package/src/lib/server/order-status-token.js.map +1 -0
- package/src/lib/server/order-status.d.ts +58 -0
- package/src/lib/server/order-status.js +141 -0
- package/src/lib/server/order-status.js.map +1 -0
- package/src/lib/server/order-webhooks.d.ts +108 -0
- package/src/lib/server/order-webhooks.js +622 -0
- package/src/lib/server/order-webhooks.js.map +1 -0
- package/src/lib/server/orders-shipping-prepare.d.ts +26 -0
- package/src/lib/server/orders-shipping-prepare.js +121 -0
- package/src/lib/server/orders-shipping-prepare.js.map +1 -0
- package/src/lib/server/payment-method-domains.d.ts +209 -0
- package/src/lib/server/payment-method-domains.js +444 -0
- package/src/lib/server/payment-method-domains.js.map +1 -0
- package/src/lib/server/payment-methods.d.ts +77 -0
- package/src/lib/server/payment-methods.js +284 -0
- package/src/lib/server/payment-methods.js.map +1 -0
- package/src/lib/server/pos-auth.d.ts +50 -0
- package/src/lib/server/pos-auth.js +121 -0
- package/src/lib/server/pos-auth.js.map +1 -0
- package/src/lib/server/pos-customer.d.ts +49 -0
- package/src/lib/server/pos-customer.js +257 -0
- package/src/lib/server/pos-customer.js.map +1 -0
- package/src/lib/server/pos-display.d.ts +57 -0
- package/src/lib/server/pos-display.js +419 -0
- package/src/lib/server/pos-display.js.map +1 -0
- package/src/lib/server/pos-fee-month.d.ts +34 -0
- package/src/lib/server/pos-fee-month.js +36 -0
- package/src/lib/server/pos-fee-month.js.map +1 -0
- package/src/lib/server/pos-ops-gate.d.ts +161 -0
- package/src/lib/server/pos-ops-gate.js +295 -0
- package/src/lib/server/pos-ops-gate.js.map +1 -0
- package/src/lib/server/pos-ops-routes.d.ts +22 -0
- package/src/lib/server/pos-ops-routes.js +36 -0
- package/src/lib/server/pos-ops-routes.js.map +1 -0
- package/src/lib/server/pos-order.d.ts +1 -18
- package/src/lib/server/pos-order.js +222 -42
- package/src/lib/server/pos-order.js.map +1 -1
- package/src/lib/server/pos-payment.d.ts +39 -0
- package/src/lib/server/pos-payment.js +922 -0
- package/src/lib/server/pos-payment.js.map +1 -0
- package/src/lib/server/pos-print.d.ts +82 -0
- package/src/lib/server/pos-print.js +193 -0
- package/src/lib/server/pos-print.js.map +1 -0
- package/src/lib/server/pos-readers.d.ts +27 -0
- package/src/lib/server/pos-readers.js +276 -0
- package/src/lib/server/pos-readers.js.map +1 -0
- package/src/lib/server/pos-refund-authority.d.ts +60 -0
- package/src/lib/server/pos-refund-authority.js +72 -0
- package/src/lib/server/pos-refund-authority.js.map +1 -0
- package/src/lib/server/pos-return.d.ts +58 -0
- package/src/lib/server/pos-return.js +891 -0
- package/src/lib/server/pos-return.js.map +1 -0
- package/src/lib/server/pos-sale-stamp.d.ts +66 -0
- package/src/lib/server/pos-sale-stamp.js +84 -0
- package/src/lib/server/pos-sale-stamp.js.map +1 -0
- package/src/lib/server/pos-sale.d.ts +170 -0
- package/src/lib/server/pos-sale.js +461 -0
- package/src/lib/server/pos-sale.js.map +1 -0
- package/src/lib/server/pos-shift.d.ts +45 -0
- package/src/lib/server/pos-shift.js +484 -0
- package/src/lib/server/pos-shift.js.map +1 -0
- package/src/lib/server/pos-staff-pin.d.ts +26 -0
- package/src/lib/server/pos-staff-pin.js +339 -0
- package/src/lib/server/pos-staff-pin.js.map +1 -0
- package/src/lib/server/pos-stripe.d.ts +91 -0
- package/src/lib/server/pos-stripe.js +129 -0
- package/src/lib/server/pos-stripe.js.map +1 -0
- package/src/lib/server/pos-terminal-connection-token.d.ts +48 -0
- package/src/lib/server/pos-terminal-connection-token.js +166 -0
- package/src/lib/server/pos-terminal-connection-token.js.map +1 -0
- package/src/lib/server/pos-terminal.d.ts +218 -0
- package/src/lib/server/pos-terminal.js +1014 -0
- package/src/lib/server/pos-terminal.js.map +1 -0
- package/src/lib/server/print-queue.d.ts +124 -0
- package/src/lib/server/print-queue.js +301 -0
- package/src/lib/server/print-queue.js.map +1 -0
- package/src/lib/server/printer-poll.d.ts +75 -0
- package/src/lib/server/printer-poll.js +325 -0
- package/src/lib/server/printer-poll.js.map +1 -0
- package/src/lib/server/printer-secret.d.ts +39 -0
- package/src/lib/server/printer-secret.js +56 -0
- package/src/lib/server/printer-secret.js.map +1 -0
- package/src/lib/server/printers.d.ts +114 -0
- package/src/lib/server/printers.js +546 -0
- package/src/lib/server/printers.js.map +1 -0
- package/src/lib/server/product-catalog.d.ts +42 -0
- package/src/lib/server/product-catalog.js +309 -0
- package/src/lib/server/product-catalog.js.map +1 -0
- package/src/lib/server/product-drafts.d.ts +5 -1
- package/src/lib/server/product-drafts.js +3 -3
- package/src/lib/server/product-drafts.js.map +1 -1
- package/src/lib/server/product-writer.d.ts +19 -0
- package/src/lib/server/product-writer.js +261 -0
- package/src/lib/server/product-writer.js.map +1 -0
- package/src/lib/server/products-write.d.ts +61 -0
- package/src/lib/server/products-write.js +375 -0
- package/src/lib/server/products-write.js.map +1 -0
- package/src/lib/server/refund.js +110 -45
- package/src/lib/server/refund.js.map +1 -1
- package/src/lib/server/reserve.js +2 -0
- package/src/lib/server/reserve.js.map +1 -1
- package/src/lib/server/return-status-action.d.ts +37 -0
- package/src/lib/server/return-status-action.js +57 -0
- package/src/lib/server/return-status-action.js.map +1 -0
- package/src/lib/server/returns.d.ts +119 -0
- package/src/lib/server/returns.js +938 -0
- package/src/lib/server/returns.js.map +1 -0
- package/src/lib/server/shipment-records.d.ts +36 -0
- package/src/lib/server/shipment-records.js +289 -0
- package/src/lib/server/shipment-records.js.map +1 -0
- package/src/lib/server/shipping-connector-gates.d.ts +40 -0
- package/src/lib/server/shipping-connector-gates.js +97 -0
- package/src/lib/server/shipping-connector-gates.js.map +1 -0
- package/src/lib/server/shipping-connectors.d.ts +29 -0
- package/src/lib/server/shipping-connectors.js +236 -0
- package/src/lib/server/shipping-connectors.js.map +1 -0
- package/src/lib/server/shippingeasy.d.ts +238 -0
- package/src/lib/server/shippingeasy.js +787 -0
- package/src/lib/server/shippingeasy.js.map +1 -0
- package/src/lib/server/shipstation.d.ts +129 -0
- package/src/lib/server/shipstation.js +483 -0
- package/src/lib/server/shipstation.js.map +1 -0
- package/src/lib/server/site-page-resolver.d.ts +5 -0
- package/src/lib/server/site-page-resolver.js +156 -1
- package/src/lib/server/site-page-resolver.js.map +1 -1
- package/src/lib/server/stock-levels.d.ts +21 -0
- package/src/lib/server/stock-levels.js +263 -0
- package/src/lib/server/stock-levels.js.map +1 -0
- package/src/lib/server/stripe-refund.d.ts +47 -0
- package/src/lib/server/stripe-refund.js +87 -0
- package/src/lib/server/stripe-refund.js.map +1 -0
- package/src/lib/server/supplier-update.js +46 -5
- package/src/lib/server/supplier-update.js.map +1 -1
- package/src/lib/server/tax-engine-quote.d.ts +47 -0
- package/src/lib/server/tax-engine-quote.js +105 -0
- package/src/lib/server/tax-engine-quote.js.map +1 -0
- package/src/lib/server.js +143 -2
- package/src/lib/server.js.map +1 -1
- package/src/lib/site.js +12 -0
- package/src/lib/site.js.map +1 -1
- package/src/lib/subprocessors.d.ts +26 -0
- package/src/lib/subprocessors.js +50 -0
- package/src/lib/subprocessors.js.map +1 -0
- package/src/lib/tenant-emails.js +461 -3
- package/src/lib/tenant-emails.js.map +1 -1
- package/src/lib/testing/fake-firestore.d.ts +45 -0
- package/src/lib/testing/fake-firestore.js +189 -0
- package/src/lib/testing/fake-firestore.js.map +1 -0
- package/src/lib/testing/memory-firestore.d.ts +136 -0
- package/src/lib/testing/memory-firestore.js +282 -0
- package/src/lib/testing/memory-firestore.js.map +1 -0
- package/src/lib/testing/pos-ops-harness.d.ts +50 -0
- package/src/lib/testing/pos-ops-harness.js +184 -0
- package/src/lib/testing/pos-ops-harness.js.map +1 -0
- package/src/lib/testing/pos-ops-memory-firestore.d.ts +55 -0
- package/src/lib/testing/pos-ops-memory-firestore.js +376 -0
- package/src/lib/testing/pos-ops-memory-firestore.js.map +1 -0
- package/src/lib/transfer/products.server.d.ts +5 -0
- package/src/lib/transfer/products.server.js +2 -2
- package/src/lib/transfer/products.server.js.map +1 -1
- package/src/lib/transfer/records-transfer.d.ts +11 -1
- package/src/lib/transfer/records-transfer.js +127 -5
- package/src/lib/transfer/records-transfer.js.map +1 -1
- package/src/lib/transfer/records.server.d.ts +9 -2
- package/src/lib/transfer/records.server.js +58 -7
- package/src/lib/transfer/records.server.js.map +1 -1
- package/src/lib/transfer/register-transfer-resources.js +40 -1
- package/src/lib/transfer/register-transfer-resources.js.map +1 -1
- package/src/lib/transfer/register-transfer-ui.js +4 -1
- package/src/lib/transfer/register-transfer-ui.js.map +1 -1
- package/src/lib/transfer/shipping-presets.d.ts +23 -0
- package/src/lib/transfer/shipping-presets.js +156 -0
- package/src/lib/transfer/shipping-presets.js.map +1 -0
- package/src/lib/transfer/tracking-transfer.d.ts +101 -0
- package/src/lib/transfer/tracking-transfer.js +546 -0
- package/src/lib/transfer/tracking-transfer.js.map +1 -0
- package/src/lib/transfer/tracking.server.d.ts +37 -0
- package/src/lib/transfer/tracking.server.js +393 -0
- package/src/lib/transfer/tracking.server.js.map +1 -0
- package/src/lib/transfer/transfer-keys.d.ts +2 -1
- package/src/lib/transfer/transfer-keys.js +6 -2
- package/src/lib/transfer/transfer-keys.js.map +1 -1
- package/src/lib/utils/code128.d.ts +37 -0
- package/src/lib/utils/code128.js +199 -0
- package/src/lib/utils/code128.js.map +1 -0
- package/src/lib/utils/order-invoice.d.ts +55 -0
- package/src/lib/utils/order-invoice.js +127 -0
- package/src/lib/utils/order-invoice.js.map +1 -0
- package/src/lib/utils/use-checkout-return-notice.d.ts +34 -0
- package/src/lib/utils/use-checkout-return-notice.js +78 -0
- package/src/lib/utils/use-checkout-return-notice.js.map +1 -0
- package/src/lib/server/feed.js +0 -69
- package/src/lib/server/feed.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import Box from "@mui/material/Box";
|
|
18
|
+
import CircularProgress from "@mui/material/CircularProgress";
|
|
19
|
+
import Stack from "@mui/material/Stack";
|
|
20
|
+
import { useColorScheme } from "@mui/material/styles";
|
|
21
|
+
import Typography from "@mui/material/Typography";
|
|
22
|
+
/** The store's logo for the scheme in use, its name when it has none. */ export function PosDisplayBrandMark({ branding }) {
|
|
23
|
+
const { mode, systemMode } = useColorScheme();
|
|
24
|
+
const dark = (mode === 'system' ? systemMode : mode) === 'dark';
|
|
25
|
+
const logo = dark && (branding == null ? void 0 : branding.logoDarkUrl) || (branding == null ? void 0 : branding.logoUrl) || null;
|
|
26
|
+
if (logo) {
|
|
27
|
+
var _ref;
|
|
28
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
29
|
+
component: "img",
|
|
30
|
+
src: logo,
|
|
31
|
+
alt: (_ref = branding == null ? void 0 : branding.name) != null ? _ref : '',
|
|
32
|
+
sx: (theme)=>({
|
|
33
|
+
maxWidth: '80%',
|
|
34
|
+
maxHeight: theme.spacing(24),
|
|
35
|
+
objectFit: 'contain'
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/ _jsx(Typography, {
|
|
40
|
+
variant: "h2",
|
|
41
|
+
component: "p",
|
|
42
|
+
sx: {
|
|
43
|
+
textAlign: 'center'
|
|
44
|
+
},
|
|
45
|
+
children: (branding == null ? void 0 : branding.name) || 'Welcome'
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A centered full-screen message under the store's mark: the idle screen,
|
|
50
|
+
* the thank-you, the card reader prompt and "the cashier will finish up".
|
|
51
|
+
*/ export function PosDisplayBrandScreen({ branding, title, message, busy, children }) {
|
|
52
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
53
|
+
spacing: 4,
|
|
54
|
+
sx: {
|
|
55
|
+
minHeight: '100dvh',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
textAlign: 'center',
|
|
59
|
+
px: 2
|
|
60
|
+
},
|
|
61
|
+
children: [
|
|
62
|
+
/*#__PURE__*/ _jsx(PosDisplayBrandMark, {
|
|
63
|
+
branding: branding
|
|
64
|
+
}),
|
|
65
|
+
title ? /*#__PURE__*/ _jsx(Typography, {
|
|
66
|
+
variant: "h3",
|
|
67
|
+
component: "h1",
|
|
68
|
+
children: title
|
|
69
|
+
}) : null,
|
|
70
|
+
message ? /*#__PURE__*/ _jsx(Typography, {
|
|
71
|
+
variant: "h5",
|
|
72
|
+
component: "p",
|
|
73
|
+
color: "text.secondary",
|
|
74
|
+
children: message
|
|
75
|
+
}) : null,
|
|
76
|
+
busy ? /*#__PURE__*/ _jsx(CircularProgress, {
|
|
77
|
+
size: 64,
|
|
78
|
+
"aria-label": "Waiting for the card reader"
|
|
79
|
+
}) : null,
|
|
80
|
+
children
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=brand-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/plugins/commerce/src/lib/components/console/pos-display/brand-screen.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@mui/material/Box'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Stack from '@mui/material/Stack'\nimport { useColorScheme } from '@mui/material/styles'\nimport Typography from '@mui/material/Typography'\nimport type { ReactNode } from 'react'\nimport type { PosDisplayBranding } from './pos-display-api'\n\n/** The store's logo for the scheme in use, its name when it has none. */\nexport function PosDisplayBrandMark({ branding }: { branding: PosDisplayBranding | null }) {\n const { mode, systemMode } = useColorScheme()\n const dark = (mode === 'system' ? systemMode : mode) === 'dark'\n const logo = (dark && branding?.logoDarkUrl) || branding?.logoUrl || null\n if (logo) {\n return (\n <Box\n component=\"img\"\n src={logo}\n alt={branding?.name ?? ''}\n sx={(theme) => ({\n maxWidth: '80%',\n maxHeight: theme.spacing(24),\n objectFit: 'contain',\n })}\n />\n )\n }\n return (\n <Typography variant=\"h2\" component=\"p\" sx={{ textAlign: 'center' }}>\n {branding?.name || 'Welcome'}\n </Typography>\n )\n}\n\n/**\n * A centered full-screen message under the store's mark: the idle screen,\n * the thank-you, the card reader prompt and \"the cashier will finish up\".\n */\nexport function PosDisplayBrandScreen({\n branding,\n title,\n message,\n busy,\n children,\n}: {\n branding: PosDisplayBranding | null\n title?: string\n message?: string\n busy?: boolean\n children?: ReactNode\n}) {\n return (\n <Stack\n spacing={4}\n sx={{\n minHeight: '100dvh',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n px: 2,\n }}\n >\n <PosDisplayBrandMark branding={branding} />\n {title ? (\n <Typography variant=\"h3\" component=\"h1\">\n {title}\n </Typography>\n ) : null}\n {message ? (\n <Typography variant=\"h5\" component=\"p\" color=\"text.secondary\">\n {message}\n </Typography>\n ) : null}\n {busy ? <CircularProgress size={64} aria-label=\"Waiting for the card reader\" /> : null}\n {children}\n </Stack>\n )\n}\n"],"names":["Box","CircularProgress","Stack","useColorScheme","Typography","PosDisplayBrandMark","branding","mode","systemMode","dark","logo","logoDarkUrl","logoUrl","component","src","alt","name","sx","theme","maxWidth","maxHeight","spacing","objectFit","variant","textAlign","PosDisplayBrandScreen","title","message","busy","children","minHeight","alignItems","justifyContent","px","color","size","aria-label"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,SAAS,oBAAmB;AACnC,OAAOC,sBAAsB,iCAAgC;AAC7D,OAAOC,WAAW,sBAAqB;AACvC,SAASC,cAAc,QAAQ,uBAAsB;AACrD,OAAOC,gBAAgB,2BAA0B;AAIjD,uEAAuE,GACvE,OAAO,SAASC,oBAAoB,EAAEC,QAAQ,EAA2C;IACvF,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE,GAAGL;IAC7B,MAAMM,OAAO,AAACF,CAAAA,SAAS,WAAWC,aAAaD,IAAG,MAAO;IACzD,MAAMG,OAAO,AAACD,SAAQH,4BAAAA,SAAUK,WAAW,MAAKL,4BAAAA,SAAUM,OAAO,KAAI;IACrE,IAAIF,MAAM;;QACR,qBACE,KAACV;YACCa,WAAU;YACVC,KAAKJ;YACLK,GAAG,UAAET,4BAAAA,SAAUU,IAAI,mBAAI;YACvBC,IAAI,CAACC,QAAW,CAAA;oBACdC,UAAU;oBACVC,WAAWF,MAAMG,OAAO,CAAC;oBACzBC,WAAW;gBACb,CAAA;;IAGN;IACA,qBACE,KAAClB;QAAWmB,SAAQ;QAAKV,WAAU;QAAII,IAAI;YAAEO,WAAW;QAAS;kBAC9DlB,CAAAA,4BAAAA,SAAUU,IAAI,KAAI;;AAGzB;AAEA;;;CAGC,GACD,OAAO,SAASS,sBAAsB,EACpCnB,QAAQ,EACRoB,KAAK,EACLC,OAAO,EACPC,IAAI,EACJC,QAAQ,EAOT;IACC,qBACE,MAAC3B;QACCmB,SAAS;QACTJ,IAAI;YACFa,WAAW;YACXC,YAAY;YACZC,gBAAgB;YAChBR,WAAW;YACXS,IAAI;QACN;;0BAEA,KAAC5B;gBAAoBC,UAAUA;;YAC9BoB,sBACC,KAACtB;gBAAWmB,SAAQ;gBAAKV,WAAU;0BAChCa;iBAED;YACHC,wBACC,KAACvB;gBAAWmB,SAAQ;gBAAKV,WAAU;gBAAIqB,OAAM;0BAC1CP;iBAED;YACHC,qBAAO,KAAC3B;gBAAiBkC,MAAM;gBAAIC,cAAW;iBAAmC;YACjFP;;;AAGP"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type * as CommerceModel from '../../../model';
|
|
18
|
+
/**
|
|
19
|
+
* The basket as the cashier builds it, with what is paid and still due.
|
|
20
|
+
*
|
|
21
|
+
* `totalCents` is the SALE: a tip rides beside it and never inside it (the
|
|
22
|
+
* ledger's rule, `posTipCents`), and so do `paidCents` and `dueCents`. Once a
|
|
23
|
+
* tip is on the sale the customer sees it as its own line and the total they
|
|
24
|
+
* are actually paying under it, so the screen never reads short by the tip.
|
|
25
|
+
*/
|
|
26
|
+
export declare function PosDisplayCartView({ cart, currency, }: {
|
|
27
|
+
cart: CommerceModel.PosDisplayCart;
|
|
28
|
+
currency?: string;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import Divider from "@mui/material/Divider";
|
|
18
|
+
import List from "@mui/material/List";
|
|
19
|
+
import ListItem from "@mui/material/ListItem";
|
|
20
|
+
import ListItemText from "@mui/material/ListItemText";
|
|
21
|
+
import Stack from "@mui/material/Stack";
|
|
22
|
+
import Typography from "@mui/material/Typography";
|
|
23
|
+
import { displayMoney } from "./pos-display-api.js";
|
|
24
|
+
function TotalRow({ label, cents, currency, negative, strong }) {
|
|
25
|
+
const variant = strong ? 'h3' : 'h6';
|
|
26
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
27
|
+
direction: "row",
|
|
28
|
+
sx: {
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
alignItems: 'baseline'
|
|
31
|
+
},
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
34
|
+
variant: variant,
|
|
35
|
+
component: "span",
|
|
36
|
+
children: label
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
39
|
+
variant: variant,
|
|
40
|
+
component: "span",
|
|
41
|
+
children: negative ? `−${displayMoney(cents, currency)}` : displayMoney(cents, currency)
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The basket as the cashier builds it, with what is paid and still due.
|
|
48
|
+
*
|
|
49
|
+
* `totalCents` is the SALE: a tip rides beside it and never inside it (the
|
|
50
|
+
* ledger's rule, `posTipCents`), and so do `paidCents` and `dueCents`. Once a
|
|
51
|
+
* tip is on the sale the customer sees it as its own line and the total they
|
|
52
|
+
* are actually paying under it, so the screen never reads short by the tip.
|
|
53
|
+
*/ export function PosDisplayCartView({ cart, currency }) {
|
|
54
|
+
var _cart_tipCents;
|
|
55
|
+
const tipCents = (_cart_tipCents = cart.tipCents) != null ? _cart_tipCents : 0;
|
|
56
|
+
// The register prices tax when the cashier charges; until then the basket
|
|
57
|
+
// has no tax figure, and a "Tax $0.00" row would be a promise.
|
|
58
|
+
const priced = cart.dueCents != null;
|
|
59
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
60
|
+
spacing: 2,
|
|
61
|
+
sx: {
|
|
62
|
+
width: '100%'
|
|
63
|
+
},
|
|
64
|
+
children: [
|
|
65
|
+
/*#__PURE__*/ _jsx(List, {
|
|
66
|
+
"aria-label": "Items",
|
|
67
|
+
sx: {
|
|
68
|
+
overflowY: 'auto'
|
|
69
|
+
},
|
|
70
|
+
children: cart.lines.map((line, index)=>/*#__PURE__*/ _jsx(ListItem, {
|
|
71
|
+
divider: true,
|
|
72
|
+
secondaryAction: /*#__PURE__*/ _jsx(Typography, {
|
|
73
|
+
variant: "h6",
|
|
74
|
+
component: "span",
|
|
75
|
+
children: displayMoney(line.amountCents, currency)
|
|
76
|
+
}),
|
|
77
|
+
children: /*#__PURE__*/ _jsx(ListItemText, {
|
|
78
|
+
primary: `${line.quantity} × ${line.name}`,
|
|
79
|
+
secondary: line.variantLabel || undefined,
|
|
80
|
+
slotProps: {
|
|
81
|
+
primary: {
|
|
82
|
+
variant: 'h6'
|
|
83
|
+
},
|
|
84
|
+
secondary: {
|
|
85
|
+
variant: 'body1'
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
}, `${index}:${line.name}`))
|
|
90
|
+
}),
|
|
91
|
+
cart.lines.length === 0 ? /*#__PURE__*/ _jsx(Typography, {
|
|
92
|
+
variant: "h6",
|
|
93
|
+
color: "text.secondary",
|
|
94
|
+
sx: {
|
|
95
|
+
textAlign: 'center'
|
|
96
|
+
},
|
|
97
|
+
children: "Your items will show here"
|
|
98
|
+
}) : null,
|
|
99
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
100
|
+
spacing: 1,
|
|
101
|
+
children: [
|
|
102
|
+
/*#__PURE__*/ _jsx(TotalRow, {
|
|
103
|
+
label: "Subtotal",
|
|
104
|
+
cents: cart.itemsCents,
|
|
105
|
+
currency: currency
|
|
106
|
+
}),
|
|
107
|
+
cart.discountCents > 0 ? /*#__PURE__*/ _jsx(TotalRow, {
|
|
108
|
+
label: "Discount",
|
|
109
|
+
cents: cart.discountCents,
|
|
110
|
+
currency: currency,
|
|
111
|
+
negative: true
|
|
112
|
+
}) : null,
|
|
113
|
+
priced ? /*#__PURE__*/ _jsx(TotalRow, {
|
|
114
|
+
label: "Tax",
|
|
115
|
+
cents: cart.taxCents,
|
|
116
|
+
currency: currency
|
|
117
|
+
}) : null,
|
|
118
|
+
/*#__PURE__*/ _jsx(Divider, {}),
|
|
119
|
+
tipCents > 0 ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
120
|
+
children: [
|
|
121
|
+
/*#__PURE__*/ _jsx(TotalRow, {
|
|
122
|
+
label: "Total",
|
|
123
|
+
cents: cart.totalCents,
|
|
124
|
+
currency: currency
|
|
125
|
+
}),
|
|
126
|
+
/*#__PURE__*/ _jsx(TotalRow, {
|
|
127
|
+
label: "Tip",
|
|
128
|
+
cents: tipCents,
|
|
129
|
+
currency: currency
|
|
130
|
+
}),
|
|
131
|
+
/*#__PURE__*/ _jsx(TotalRow, {
|
|
132
|
+
label: "Total with tip",
|
|
133
|
+
cents: cart.totalCents + tipCents,
|
|
134
|
+
currency: currency,
|
|
135
|
+
strong: true
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}) : /*#__PURE__*/ _jsx(TotalRow, {
|
|
139
|
+
label: "Total",
|
|
140
|
+
cents: cart.totalCents,
|
|
141
|
+
currency: currency,
|
|
142
|
+
strong: true
|
|
143
|
+
}),
|
|
144
|
+
priced ? null : /*#__PURE__*/ _jsx(Typography, {
|
|
145
|
+
variant: "body1",
|
|
146
|
+
color: "text.secondary",
|
|
147
|
+
children: "Any tax is added when you pay."
|
|
148
|
+
}),
|
|
149
|
+
cart.paidCents ? /*#__PURE__*/ _jsx(TotalRow, {
|
|
150
|
+
label: "Paid",
|
|
151
|
+
cents: cart.paidCents,
|
|
152
|
+
currency: currency
|
|
153
|
+
}) : null,
|
|
154
|
+
cart.dueCents != null && cart.paidCents ? /*#__PURE__*/ _jsx(TotalRow, {
|
|
155
|
+
label: "Due",
|
|
156
|
+
cents: cart.dueCents,
|
|
157
|
+
currency: currency,
|
|
158
|
+
strong: true
|
|
159
|
+
}) : null
|
|
160
|
+
]
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
//# sourceMappingURL=cart-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/plugins/commerce/src/lib/components/console/pos-display/cart-screen.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Divider from '@mui/material/Divider'\nimport List from '@mui/material/List'\nimport ListItem from '@mui/material/ListItem'\nimport ListItemText from '@mui/material/ListItemText'\nimport Stack from '@mui/material/Stack'\nimport Typography from '@mui/material/Typography'\nimport type * as CommerceModel from '../../../model'\nimport { displayMoney } from './pos-display-api'\n\nfunction TotalRow({\n label,\n cents,\n currency,\n negative,\n strong,\n}: {\n label: string\n cents: number\n currency?: string\n negative?: boolean\n strong?: boolean\n}) {\n const variant = strong ? 'h3' : 'h6'\n return (\n <Stack direction=\"row\" sx={{ justifyContent: 'space-between', alignItems: 'baseline' }}>\n <Typography variant={variant} component=\"span\">\n {label}\n </Typography>\n <Typography variant={variant} component=\"span\">\n {negative ? `−${displayMoney(cents, currency)}` : displayMoney(cents, currency)}\n </Typography>\n </Stack>\n )\n}\n\n/**\n * The basket as the cashier builds it, with what is paid and still due.\n *\n * `totalCents` is the SALE: a tip rides beside it and never inside it (the\n * ledger's rule, `posTipCents`), and so do `paidCents` and `dueCents`. Once a\n * tip is on the sale the customer sees it as its own line and the total they\n * are actually paying under it, so the screen never reads short by the tip.\n */\nexport function PosDisplayCartView({\n cart,\n currency,\n}: {\n cart: CommerceModel.PosDisplayCart\n currency?: string\n}) {\n const tipCents = cart.tipCents ?? 0\n // The register prices tax when the cashier charges; until then the basket\n // has no tax figure, and a \"Tax $0.00\" row would be a promise.\n const priced = cart.dueCents != null\n return (\n <Stack spacing={2} sx={{ width: '100%' }}>\n <List aria-label=\"Items\" sx={{ overflowY: 'auto' }}>\n {cart.lines.map((line, index) => (\n <ListItem\n key={`${index}:${line.name}`}\n divider\n secondaryAction={\n <Typography variant=\"h6\" component=\"span\">\n {displayMoney(line.amountCents, currency)}\n </Typography>\n }\n >\n <ListItemText\n primary={`${line.quantity} × ${line.name}`}\n secondary={line.variantLabel || undefined}\n slotProps={{\n primary: { variant: 'h6' },\n secondary: { variant: 'body1' },\n }}\n />\n </ListItem>\n ))}\n </List>\n {cart.lines.length === 0 ? (\n <Typography variant=\"h6\" color=\"text.secondary\" sx={{ textAlign: 'center' }}>\n Your items will show here\n </Typography>\n ) : null}\n <Stack spacing={1}>\n <TotalRow label=\"Subtotal\" cents={cart.itemsCents} currency={currency} />\n {cart.discountCents > 0 ? (\n <TotalRow label=\"Discount\" cents={cart.discountCents} currency={currency} negative />\n ) : null}\n {priced ? <TotalRow label=\"Tax\" cents={cart.taxCents} currency={currency} /> : null}\n <Divider />\n {tipCents > 0 ? (\n <>\n <TotalRow label=\"Total\" cents={cart.totalCents} currency={currency} />\n <TotalRow label=\"Tip\" cents={tipCents} currency={currency} />\n <TotalRow\n label=\"Total with tip\"\n cents={cart.totalCents + tipCents}\n currency={currency}\n strong\n />\n </>\n ) : (\n <TotalRow label=\"Total\" cents={cart.totalCents} currency={currency} strong />\n )}\n {priced ? null : (\n <Typography variant=\"body1\" color=\"text.secondary\">\n Any tax is added when you pay.\n </Typography>\n )}\n {cart.paidCents ? (\n <TotalRow label=\"Paid\" cents={cart.paidCents} currency={currency} />\n ) : null}\n {cart.dueCents != null && cart.paidCents ? (\n <TotalRow label=\"Due\" cents={cart.dueCents} currency={currency} strong />\n ) : null}\n </Stack>\n </Stack>\n )\n}\n"],"names":["Divider","List","ListItem","ListItemText","Stack","Typography","displayMoney","TotalRow","label","cents","currency","negative","strong","variant","direction","sx","justifyContent","alignItems","component","PosDisplayCartView","cart","tipCents","priced","dueCents","spacing","width","aria-label","overflowY","lines","map","line","index","divider","secondaryAction","amountCents","primary","quantity","name","secondary","variantLabel","undefined","slotProps","length","color","textAlign","itemsCents","discountCents","taxCents","totalCents","paidCents"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,aAAa,wBAAuB;AAC3C,OAAOC,UAAU,qBAAoB;AACrC,OAAOC,cAAc,yBAAwB;AAC7C,OAAOC,kBAAkB,6BAA4B;AACrD,OAAOC,WAAW,sBAAqB;AACvC,OAAOC,gBAAgB,2BAA0B;AAEjD,SAASC,YAAY,QAAQ,uBAAmB;AAEhD,SAASC,SAAS,EAChBC,KAAK,EACLC,KAAK,EACLC,QAAQ,EACRC,QAAQ,EACRC,MAAM,EAOP;IACC,MAAMC,UAAUD,SAAS,OAAO;IAChC,qBACE,MAACR;QAAMU,WAAU;QAAMC,IAAI;YAAEC,gBAAgB;YAAiBC,YAAY;QAAW;;0BACnF,KAACZ;gBAAWQ,SAASA;gBAASK,WAAU;0BACrCV;;0BAEH,KAACH;gBAAWQ,SAASA;gBAASK,WAAU;0BACrCP,WAAW,CAAC,CAAC,EAAEL,aAAaG,OAAOC,WAAW,GAAGJ,aAAaG,OAAOC;;;;AAI9E;AAEA;;;;;;;CAOC,GACD,OAAO,SAASS,mBAAmB,EACjCC,IAAI,EACJV,QAAQ,EAIT;QACkBU;IAAjB,MAAMC,YAAWD,iBAAAA,KAAKC,QAAQ,YAAbD,iBAAiB;IAClC,0EAA0E;IAC1E,+DAA+D;IAC/D,MAAME,SAASF,KAAKG,QAAQ,IAAI;IAChC,qBACE,MAACnB;QAAMoB,SAAS;QAAGT,IAAI;YAAEU,OAAO;QAAO;;0BACrC,KAACxB;gBAAKyB,cAAW;gBAAQX,IAAI;oBAAEY,WAAW;gBAAO;0BAC9CP,KAAKQ,KAAK,CAACC,GAAG,CAAC,CAACC,MAAMC,sBACrB,KAAC7B;wBAEC8B,OAAO;wBACPC,+BACE,KAAC5B;4BAAWQ,SAAQ;4BAAKK,WAAU;sCAChCZ,aAAawB,KAAKI,WAAW,EAAExB;;kCAIpC,cAAA,KAACP;4BACCgC,SAAS,GAAGL,KAAKM,QAAQ,CAAC,GAAG,EAAEN,KAAKO,IAAI,EAAE;4BAC1CC,WAAWR,KAAKS,YAAY,IAAIC;4BAChCC,WAAW;gCACTN,SAAS;oCAAEtB,SAAS;gCAAK;gCACzByB,WAAW;oCAAEzB,SAAS;gCAAQ;4BAChC;;uBAdG,GAAGkB,MAAM,CAAC,EAAED,KAAKO,IAAI,EAAE;;YAmBjCjB,KAAKQ,KAAK,CAACc,MAAM,KAAK,kBACrB,KAACrC;gBAAWQ,SAAQ;gBAAK8B,OAAM;gBAAiB5B,IAAI;oBAAE6B,WAAW;gBAAS;0BAAG;iBAG3E;0BACJ,MAACxC;gBAAMoB,SAAS;;kCACd,KAACjB;wBAASC,OAAM;wBAAWC,OAAOW,KAAKyB,UAAU;wBAAEnC,UAAUA;;oBAC5DU,KAAK0B,aAAa,GAAG,kBACpB,KAACvC;wBAASC,OAAM;wBAAWC,OAAOW,KAAK0B,aAAa;wBAAEpC,UAAUA;wBAAUC,QAAQ;yBAChF;oBACHW,uBAAS,KAACf;wBAASC,OAAM;wBAAMC,OAAOW,KAAK2B,QAAQ;wBAAErC,UAAUA;yBAAe;kCAC/E,KAACV;oBACAqB,WAAW,kBACV;;0CACE,KAACd;gCAASC,OAAM;gCAAQC,OAAOW,KAAK4B,UAAU;gCAAEtC,UAAUA;;0CAC1D,KAACH;gCAASC,OAAM;gCAAMC,OAAOY;gCAAUX,UAAUA;;0CACjD,KAACH;gCACCC,OAAM;gCACNC,OAAOW,KAAK4B,UAAU,GAAG3B;gCACzBX,UAAUA;gCACVE,MAAM;;;uCAIV,KAACL;wBAASC,OAAM;wBAAQC,OAAOW,KAAK4B,UAAU;wBAAEtC,UAAUA;wBAAUE,MAAM;;oBAE3EU,SAAS,qBACR,KAACjB;wBAAWQ,SAAQ;wBAAQ8B,OAAM;kCAAiB;;oBAIpDvB,KAAK6B,SAAS,iBACb,KAAC1C;wBAASC,OAAM;wBAAOC,OAAOW,KAAK6B,SAAS;wBAAEvC,UAAUA;yBACtD;oBACHU,KAAKG,QAAQ,IAAI,QAAQH,KAAK6B,SAAS,iBACtC,KAAC1C;wBAASC,OAAM;wBAAMC,OAAOW,KAAKG,QAAQ;wBAAEb,UAAUA;wBAAUE,MAAM;yBACpE;;;;;AAIZ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type PosDisplayBranding } from './pos-display-api';
|
|
18
|
+
/**
|
|
19
|
+
* The unpaired display (AGL-3608): six digits from the register's Customer
|
|
20
|
+
* display menu, exchanged once for this device's token.
|
|
21
|
+
*/
|
|
22
|
+
export declare function PosDisplayPairingScreen({ onPaired, }: {
|
|
23
|
+
onPaired: (token: string, branding: PosDisplayBranding) => void;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2026 Aglyn LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/ import Alert from "@mui/material/Alert";
|
|
19
|
+
import Button from "@mui/material/Button";
|
|
20
|
+
import Stack from "@mui/material/Stack";
|
|
21
|
+
import TextField from "@mui/material/TextField";
|
|
22
|
+
import Typography from "@mui/material/Typography";
|
|
23
|
+
import { useState } from "react";
|
|
24
|
+
import { pairDisplay } from "./pos-display-api.js";
|
|
25
|
+
/**
|
|
26
|
+
* The unpaired display (AGL-3608): six digits from the register's Customer
|
|
27
|
+
* display menu, exchanged once for this device's token.
|
|
28
|
+
*/ export function PosDisplayPairingScreen({ onPaired }) {
|
|
29
|
+
const [code, setCode] = useState('');
|
|
30
|
+
const [busy, setBusy] = useState(false);
|
|
31
|
+
const [error, setError] = useState(null);
|
|
32
|
+
const ready = code.length === 6;
|
|
33
|
+
const submit = async (event)=>{
|
|
34
|
+
var _result_error;
|
|
35
|
+
var _result_value;
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
if (!ready || busy) return;
|
|
38
|
+
setBusy(true);
|
|
39
|
+
setError(null);
|
|
40
|
+
const result = await pairDisplay(code);
|
|
41
|
+
setBusy(false);
|
|
42
|
+
const token = result.ok ? (_result_value = result.value) == null ? void 0 : _result_value.token : undefined;
|
|
43
|
+
setCode('');
|
|
44
|
+
if (token) {
|
|
45
|
+
var _result_value1;
|
|
46
|
+
onPaired(token, (_result_value1 = result.value) == null ? void 0 : _result_value1.branding);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
setError((_result_error = result.error) != null ? _result_error : 'That code is not valid. Show a new code on the register.');
|
|
50
|
+
};
|
|
51
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
52
|
+
component: "form",
|
|
53
|
+
onSubmit: submit,
|
|
54
|
+
spacing: 4,
|
|
55
|
+
sx: {
|
|
56
|
+
minHeight: '100dvh',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
justifyContent: 'center',
|
|
59
|
+
px: 2
|
|
60
|
+
},
|
|
61
|
+
children: [
|
|
62
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
63
|
+
variant: "h3",
|
|
64
|
+
component: "h1",
|
|
65
|
+
sx: {
|
|
66
|
+
textAlign: 'center'
|
|
67
|
+
},
|
|
68
|
+
children: "Pair this display"
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
71
|
+
variant: "h6",
|
|
72
|
+
color: "text.secondary",
|
|
73
|
+
sx: {
|
|
74
|
+
textAlign: 'center'
|
|
75
|
+
},
|
|
76
|
+
children: "Enter the code shown on the register"
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ _jsx(TextField, {
|
|
79
|
+
value: code,
|
|
80
|
+
onChange: (event)=>setCode(event.target.value.replace(/\D/g, '').slice(0, 6)),
|
|
81
|
+
autoFocus: true,
|
|
82
|
+
autoComplete: "one-time-code",
|
|
83
|
+
placeholder: "000000",
|
|
84
|
+
slotProps: {
|
|
85
|
+
htmlInput: {
|
|
86
|
+
inputMode: 'numeric',
|
|
87
|
+
pattern: '[0-9]*',
|
|
88
|
+
maxLength: 6,
|
|
89
|
+
'aria-label': 'Pairing code',
|
|
90
|
+
style: {
|
|
91
|
+
textAlign: 'center'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
sx: (theme)=>({
|
|
96
|
+
width: '100%',
|
|
97
|
+
maxWidth: theme.spacing(48),
|
|
98
|
+
'& input': _extends({}, theme.typography.h3, {
|
|
99
|
+
letterSpacing: theme.spacing(1)
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
error ? /*#__PURE__*/ _jsx(Alert, {
|
|
104
|
+
severity: "error",
|
|
105
|
+
sx: {
|
|
106
|
+
width: '100%',
|
|
107
|
+
maxWidth: (theme)=>theme.spacing(48)
|
|
108
|
+
},
|
|
109
|
+
children: error
|
|
110
|
+
}) : null,
|
|
111
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
112
|
+
type: "submit",
|
|
113
|
+
variant: "contained",
|
|
114
|
+
size: "large",
|
|
115
|
+
disabled: !ready || busy,
|
|
116
|
+
sx: (theme)=>_extends({
|
|
117
|
+
width: '100%',
|
|
118
|
+
maxWidth: theme.spacing(48),
|
|
119
|
+
minHeight: theme.spacing(8)
|
|
120
|
+
}, theme.typography.h6),
|
|
121
|
+
children: busy ? 'Pairing…' : 'Pair display'
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
//# sourceMappingURL=pairing-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/plugins/commerce/src/lib/components/console/pos-display/pairing-screen.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Alert from '@mui/material/Alert'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport TextField from '@mui/material/TextField'\nimport Typography from '@mui/material/Typography'\nimport { type FormEvent, useState } from 'react'\nimport { pairDisplay, type PosDisplayBranding } from './pos-display-api'\n\n/**\n * The unpaired display (AGL-3608): six digits from the register's Customer\n * display menu, exchanged once for this device's token.\n */\nexport function PosDisplayPairingScreen({\n onPaired,\n}: {\n onPaired: (token: string, branding: PosDisplayBranding) => void\n}) {\n const [code, setCode] = useState('')\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const ready = code.length === 6\n\n const submit = async (event: FormEvent) => {\n event.preventDefault()\n if (!ready || busy) return\n setBusy(true)\n setError(null)\n const result = await pairDisplay(code)\n setBusy(false)\n const token = result.ok ? result.value?.token : undefined\n setCode('')\n if (token) {\n onPaired(token, result.value?.branding)\n return\n }\n setError(result.error ?? 'That code is not valid. Show a new code on the register.')\n }\n\n return (\n <Stack\n component=\"form\"\n onSubmit={submit}\n spacing={4}\n sx={{ minHeight: '100dvh', alignItems: 'center', justifyContent: 'center', px: 2 }}\n >\n <Typography variant=\"h3\" component=\"h1\" sx={{ textAlign: 'center' }}>\n Pair this display\n </Typography>\n <Typography variant=\"h6\" color=\"text.secondary\" sx={{ textAlign: 'center' }}>\n Enter the code shown on the register\n </Typography>\n <TextField\n value={code}\n onChange={(event) => setCode(event.target.value.replace(/\\D/g, '').slice(0, 6))}\n autoFocus\n autoComplete=\"one-time-code\"\n placeholder=\"000000\"\n slotProps={{\n htmlInput: {\n inputMode: 'numeric',\n pattern: '[0-9]*',\n maxLength: 6,\n 'aria-label': 'Pairing code',\n style: { textAlign: 'center' },\n },\n }}\n sx={(theme) => ({\n width: '100%',\n maxWidth: theme.spacing(48),\n '& input': { ...theme.typography.h3, letterSpacing: theme.spacing(1) },\n })}\n />\n {error ? (\n <Alert severity=\"error\" sx={{ width: '100%', maxWidth: (theme) => theme.spacing(48) }}>\n {error}\n </Alert>\n ) : null}\n <Button\n type=\"submit\"\n variant=\"contained\"\n size=\"large\"\n disabled={!ready || busy}\n sx={(theme) => ({\n width: '100%',\n maxWidth: theme.spacing(48),\n minHeight: theme.spacing(8),\n ...theme.typography.h6,\n })}\n >\n {busy ? 'Pairing…' : 'Pair display'}\n </Button>\n </Stack>\n )\n}\n"],"names":["Alert","Button","Stack","TextField","Typography","useState","pairDisplay","PosDisplayPairingScreen","onPaired","code","setCode","busy","setBusy","error","setError","ready","length","submit","event","result","preventDefault","token","ok","value","undefined","branding","component","onSubmit","spacing","sx","minHeight","alignItems","justifyContent","px","variant","textAlign","color","onChange","target","replace","slice","autoFocus","autoComplete","placeholder","slotProps","htmlInput","inputMode","pattern","maxLength","style","theme","width","maxWidth","typography","h3","letterSpacing","severity","type","size","disabled","h6"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,WAAW,sBAAqB;AACvC,OAAOC,YAAY,uBAAsB;AACzC,OAAOC,WAAW,sBAAqB;AACvC,OAAOC,eAAe,0BAAyB;AAC/C,OAAOC,gBAAgB,2BAA0B;AACjD,SAAyBC,QAAQ,QAAQ,QAAO;AAChD,SAASC,WAAW,QAAiC,uBAAmB;AAExE;;;CAGC,GACD,OAAO,SAASC,wBAAwB,EACtCC,QAAQ,EAGT;IACC,MAAM,CAACC,MAAMC,QAAQ,GAAGL,SAAS;IACjC,MAAM,CAACM,MAAMC,QAAQ,GAAGP,SAAS;IACjC,MAAM,CAACQ,OAAOC,SAAS,GAAGT,SAAwB;IAClD,MAAMU,QAAQN,KAAKO,MAAM,KAAK;IAE9B,MAAMC,SAAS,OAAOC;YAaXC;YANiBA;QAN1BD,MAAME,cAAc;QACpB,IAAI,CAACL,SAASJ,MAAM;QACpBC,QAAQ;QACRE,SAAS;QACT,MAAMK,SAAS,MAAMb,YAAYG;QACjCG,QAAQ;QACR,MAAMS,QAAQF,OAAOG,EAAE,IAAGH,gBAAAA,OAAOI,KAAK,qBAAZJ,cAAcE,KAAK,GAAGG;QAChDd,QAAQ;QACR,IAAIW,OAAO;gBACOF;YAAhBX,SAASa,QAAOF,iBAAAA,OAAOI,KAAK,qBAAZJ,eAAcM,QAAQ;YACtC;QACF;QACAX,UAASK,gBAAAA,OAAON,KAAK,YAAZM,gBAAgB;IAC3B;IAEA,qBACE,MAACjB;QACCwB,WAAU;QACVC,UAAUV;QACVW,SAAS;QACTC,IAAI;YAAEC,WAAW;YAAUC,YAAY;YAAUC,gBAAgB;YAAUC,IAAI;QAAE;;0BAEjF,KAAC7B;gBAAW8B,SAAQ;gBAAKR,WAAU;gBAAKG,IAAI;oBAAEM,WAAW;gBAAS;0BAAG;;0BAGrE,KAAC/B;gBAAW8B,SAAQ;gBAAKE,OAAM;gBAAiBP,IAAI;oBAAEM,WAAW;gBAAS;0BAAG;;0BAG7E,KAAChC;gBACCoB,OAAOd;gBACP4B,UAAU,CAACnB,QAAUR,QAAQQ,MAAMoB,MAAM,CAACf,KAAK,CAACgB,OAAO,CAAC,OAAO,IAAIC,KAAK,CAAC,GAAG;gBAC5EC,SAAS;gBACTC,cAAa;gBACbC,aAAY;gBACZC,WAAW;oBACTC,WAAW;wBACTC,WAAW;wBACXC,SAAS;wBACTC,WAAW;wBACX,cAAc;wBACdC,OAAO;4BAAEd,WAAW;wBAAS;oBAC/B;gBACF;gBACAN,IAAI,CAACqB,QAAW,CAAA;wBACdC,OAAO;wBACPC,UAAUF,MAAMtB,OAAO,CAAC;wBACxB,WAAW,aAAKsB,MAAMG,UAAU,CAACC,EAAE;4BAAEC,eAAeL,MAAMtB,OAAO,CAAC;;oBACpE,CAAA;;YAEDf,sBACC,KAACb;gBAAMwD,UAAS;gBAAQ3B,IAAI;oBAAEsB,OAAO;oBAAQC,UAAU,CAACF,QAAUA,MAAMtB,OAAO,CAAC;gBAAI;0BACjFf;iBAED;0BACJ,KAACZ;gBACCwD,MAAK;gBACLvB,SAAQ;gBACRwB,MAAK;gBACLC,UAAU,CAAC5C,SAASJ;gBACpBkB,IAAI,CAACqB,QAAW;wBACdC,OAAO;wBACPC,UAAUF,MAAMtB,OAAO,CAAC;wBACxBE,WAAWoB,MAAMtB,OAAO,CAAC;uBACtBsB,MAAMG,UAAU,CAACO,EAAE;0BAGvBjD,OAAO,aAAa;;;;AAI7B"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type * as CommerceModel from '../../../model';
|
|
18
|
+
/**
|
|
19
|
+
* The customer display's half of `/api/commerce/pos-display` (AGL-3608).
|
|
20
|
+
*
|
|
21
|
+
* Every call carries the DISPLAY token, never a staff session: the screen
|
|
22
|
+
* faces the public, and the token opens one register's display state and
|
|
23
|
+
* nothing else. The route answers 401 when the token is unknown or revoked,
|
|
24
|
+
* which the page reads as "pair again".
|
|
25
|
+
*/
|
|
26
|
+
export declare const POS_DISPLAY_ENDPOINT = "/api/commerce/pos-display";
|
|
27
|
+
/** Where the paired token lives on the device. */
|
|
28
|
+
export declare const POS_DISPLAY_TOKEN_KEY = "aglyn.posDisplayToken";
|
|
29
|
+
export declare const POS_DISPLAY_TOKEN_HEADER = "X-Pos-Display-Token";
|
|
30
|
+
/** The store's look for the idle and thank-you screens. */
|
|
31
|
+
export interface PosDisplayBranding {
|
|
32
|
+
name: string;
|
|
33
|
+
logoUrl: string | null;
|
|
34
|
+
logoDarkUrl: string | null;
|
|
35
|
+
message: string;
|
|
36
|
+
}
|
|
37
|
+
/** The state as the route hands it to the display. */
|
|
38
|
+
export type PosDisplayPublicState = Omit<CommerceModel.PosDisplayState, 'response'> & {
|
|
39
|
+
answered: boolean;
|
|
40
|
+
};
|
|
41
|
+
/** What the customer sends back for the current prompt. */
|
|
42
|
+
export interface PosDisplayAnswer {
|
|
43
|
+
promptId: string;
|
|
44
|
+
tipChoice?: 'percent' | 'custom' | 'none';
|
|
45
|
+
tipPercent?: number;
|
|
46
|
+
tipCents?: number;
|
|
47
|
+
receiptChannel?: CommerceModel.PosReceiptChannel;
|
|
48
|
+
email?: string;
|
|
49
|
+
phone?: string;
|
|
50
|
+
marketingOptIn?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A call's outcome, with the status the page branches on: `value` when `ok`,
|
|
54
|
+
* `error` when not. One flat shape rather than a union, because the
|
|
55
|
+
* workspace compiles without `strict` and an `ok` check would not narrow one.
|
|
56
|
+
*/
|
|
57
|
+
export interface PosDisplayResult<T> {
|
|
58
|
+
ok: boolean;
|
|
59
|
+
/** The HTTP status, or 0 when the request never landed. */
|
|
60
|
+
status: number;
|
|
61
|
+
value?: T;
|
|
62
|
+
error?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function readStoredToken(): string | null;
|
|
65
|
+
export declare function storeToken(token: string | null): void;
|
|
66
|
+
export declare function pairDisplay(code: string): Promise<PosDisplayResult<{
|
|
67
|
+
token: string;
|
|
68
|
+
branding: PosDisplayBranding;
|
|
69
|
+
}>>;
|
|
70
|
+
export declare function pollDisplay(token: string, withBranding: boolean): Promise<PosDisplayResult<{
|
|
71
|
+
state: PosDisplayPublicState;
|
|
72
|
+
branding?: PosDisplayBranding;
|
|
73
|
+
}>>;
|
|
74
|
+
export declare function respondToDisplay(token: string, response: PosDisplayAnswer): Promise<PosDisplayResult<{
|
|
75
|
+
ok: true;
|
|
76
|
+
}>>;
|
|
77
|
+
export declare function forgetDisplay(token: string): Promise<PosDisplayResult<{
|
|
78
|
+
ok: true;
|
|
79
|
+
}>>;
|
|
80
|
+
/**
|
|
81
|
+
* Minor units as the register shows them, in the store's currency (the
|
|
82
|
+
* display state's `currency`; US dollars when a state predates it). A
|
|
83
|
+
* zero-decimal currency (JPY) has no minor unit to divide out.
|
|
84
|
+
*/
|
|
85
|
+
export declare function displayMoney(cents: number, currency?: string | null): string;
|
|
86
|
+
/**
|
|
87
|
+
* Dollars typed on the display as whole cents, or null when the entry is not
|
|
88
|
+
* an amount (`12`, `12.5` and `$12.50` are; `12.505` and `abc` are not).
|
|
89
|
+
*/
|
|
90
|
+
export declare function dollarsToCents(input: string): number | null;
|