@shopify/ui-extensions 2026.10.0-rc.9 → 2026.10.0
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/cjs/surfaces/customer-account/preact/authenticated-account.js +1 -1
- package/build/cjs/surfaces/point-of-sale/events.js +39 -22
- package/build/cjs/surfaces/point-of-sale/pos-list-template.js +339 -0
- package/build/cjs/surfaces/point-of-sale.js +2 -0
- package/build/esm/surfaces/customer-account/preact/authenticated-account.mjs +1 -1
- package/build/esm/surfaces/point-of-sale/events.mjs +39 -22
- package/build/esm/surfaces/point-of-sale/pos-list-template.mjs +331 -0
- package/build/esm/surfaces/point-of-sale.mjs +1 -0
- package/build/esnext/surfaces/customer-account/preact/authenticated-account.esnext +1 -1
- package/build/esnext/surfaces/point-of-sale/events.esnext +39 -22
- package/build/esnext/surfaces/point-of-sale/pos-list-template.esnext +331 -0
- package/build/esnext/surfaces/point-of-sale.esnext +1 -0
- package/build/ts/shared.d.ts +6 -20
- package/build/ts/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/picker/picker.d.ts +2 -2
- package/build/ts/surfaces/admin/api/picker/picker.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/AdminAction.d.ts +2 -2
- package/build/ts/surfaces/admin/components/AdminBlock.d.ts +3 -3
- package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +2 -2
- package/build/ts/surfaces/admin/components/AppNav.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Avatar.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Badge.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Banner.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Box.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Button.d.ts +1 -1
- package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Checkbox.d.ts +3 -3
- package/build/ts/surfaces/admin/components/Chip.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Choice.d.ts +3 -3
- package/build/ts/surfaces/admin/components/ChoiceList.d.ts +3 -3
- package/build/ts/surfaces/admin/components/Clickable.d.ts +1 -1
- package/build/ts/surfaces/admin/components/ClickableChip.d.ts +1 -1
- package/build/ts/surfaces/admin/components/ColorField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/ColorPicker.d.ts +1 -1
- package/build/ts/surfaces/admin/components/DateField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/DatePicker.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Divider.d.ts +1 -1
- package/build/ts/surfaces/admin/components/DropZone.d.ts +1 -1
- package/build/ts/surfaces/admin/components/EmailField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/EmptyState.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Form.d.ts +1 -1
- package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Grid.d.ts +1 -1
- package/build/ts/surfaces/admin/components/GridItem.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Heading.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Icon.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Image.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Link.d.ts +1 -1
- package/build/ts/surfaces/admin/components/ListItem.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Menu.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Modal.d.ts +1 -1
- package/build/ts/surfaces/admin/components/MoneyField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Number.d.ts +1 -1
- package/build/ts/surfaces/admin/components/NumberField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Option.d.ts +3 -3
- package/build/ts/surfaces/admin/components/OptionGroup.d.ts +1 -1
- package/build/ts/surfaces/admin/components/OrderedList.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Page.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Paragraph.d.ts +1 -1
- package/build/ts/surfaces/admin/components/PasswordField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Popover.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Progress.d.ts +155 -0
- package/build/ts/surfaces/admin/components/QueryContainer.d.ts +1 -1
- package/build/ts/surfaces/admin/components/SearchField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Section.d.ts +11 -3
- package/build/ts/surfaces/admin/components/Select.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Spinner.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Stack.d.ts +1 -1
- package/build/ts/surfaces/admin/components/StandardComponents.d.ts +1 -1
- package/build/ts/surfaces/admin/components/StandardComponents.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Switch.d.ts +3 -3
- package/build/ts/surfaces/admin/components/Table.d.ts +1 -1
- package/build/ts/surfaces/admin/components/TableBody.d.ts +1 -1
- package/build/ts/surfaces/admin/components/TableCell.d.ts +1 -1
- package/build/ts/surfaces/admin/components/TableHeader.d.ts +1 -1
- package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
- package/build/ts/surfaces/admin/components/TableRow.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Text.d.ts +1 -1
- package/build/ts/surfaces/admin/components/TextArea.d.ts +1 -1
- package/build/ts/surfaces/admin/components/TextField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Thumbnail.d.ts +1 -1
- package/build/ts/surfaces/admin/components/Tooltip.d.ts +1 -1
- package/build/ts/surfaces/admin/components/URLField.d.ts +1 -1
- package/build/ts/surfaces/admin/components/UnorderedList.d.ts +1 -1
- package/build/ts/surfaces/admin/components/shared.d.ts +47 -7
- package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.abandoned-checkout-index.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.app.home.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.app.intent.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.catalog-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.catalog-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.collection-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.collection-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.collection-index.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.company-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.company-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.company-location-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.customer-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.customer-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.customer-index.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.customer-index.selection-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.customer-segment-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.discount-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.discount-details.function-settings.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.discount-index.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.discount-index.selection-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-index.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.draft-order-index.selection-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.gift-card-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.gift-card-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.order-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.order-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.order-details.print-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.order-fulfilled-card.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.order-index.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.order-index.selection-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.order-index.selection-print-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.configuration.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.print-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-details.reorder.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-index.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-index.selection-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-index.selection-print-action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-purchase-option.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-details.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-details.block.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-details.configuration.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.product-variant-purchase-option.action.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.settings.internal-order-routing-rule.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.settings.order-routing-rule.render.d.ts +3 -0
- package/build/ts/surfaces/admin/targets/admin.settings.validation.render.d.ts +3 -0
- package/build/ts/surfaces/checkout/api/address-autocomplete/format-suggestion.d.ts +7 -0
- package/build/ts/surfaces/checkout/api/address-autocomplete/format-suggestion.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/shared.d.ts +8 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +2 -2
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/suggest.d.ts +7 -0
- package/build/ts/surfaces/checkout/api/address-autocomplete/suggest.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +15 -4
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shared.d.ts +102 -1
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +8 -2
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/MoneyField.d.ts +3 -1
- package/build/ts/surfaces/checkout/components/NumberField.d.ts +3 -1
- package/build/ts/surfaces/checkout/components/components-shared.d.ts +1 -1
- package/build/ts/surfaces/checkout/preact/country.d.ts +1 -1
- package/build/ts/surfaces/checkout/preact/country.d.ts.map +1 -1
- package/build/ts/surfaces/checkout.d.ts +2 -2
- package/build/ts/surfaces/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/shared.d.ts +26 -7
- package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api.d.ts +1 -1
- package/build/ts/surfaces/customer-account/api.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/components/MoneyField.d.ts +3 -1
- package/build/ts/surfaces/customer-account/components/NumberField.d.ts +3 -1
- package/build/ts/surfaces/customer-account/components/components-shared.d.ts +1 -1
- package/build/ts/surfaces/customer-account/preact/authenticated-account.d.ts +3 -3
- package/build/ts/surfaces/customer-account/preact/authenticated-account.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +13 -0
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts +4 -0
- package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/docs.d.ts +7 -0
- package/build/ts/surfaces/point-of-sale/api/docs.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/extension-api/extension-api.d.ts +25 -5
- package/build/ts/surfaces/point-of-sale/api/extension-api/extension-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +19 -7
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts +28 -3
- package/build/ts/surfaces/point-of-sale/api/resolution-api/resolution-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/api.d.ts +2 -2
- package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/POSList.d.ts +179 -0
- package/build/ts/surfaces/point-of-sale/components/targets/BlockExtensionComponents.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/components/targets/BlockExtensionComponents.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/components/targets/ResolutionComponents.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/components/targets/StandardComponents.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts +12 -1
- package/build/ts/surfaces/point-of-sale/event/data/BaseData.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/event/data.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/event/data.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts +34 -0
- package/build/ts/surfaces/point-of-sale/events/scan-event.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/events.d.ts +58 -28
- package/build/ts/surfaces/point-of-sale/events.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts +4 -4
- package/build/ts/surfaces/point-of-sale/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/globals.d.ts +0 -2
- package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/pos-list-template.d.ts +36 -0
- package/build/ts/surfaces/point-of-sale/pos-list-template.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.cart.line-item-details.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.cart.validations.resolution.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.customer-details.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.draft-order-details.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.exchange.post.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.home.modal.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.order-details.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.payment.validations.resolution.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.product-details.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.purchase.post.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.register-details.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/targets/pos.return.post.action.render.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/types/session.d.ts +0 -6
- package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/src/shared.ts +22 -21
- package/src/surfaces/admin/api/picker/picker.ts +5 -2
- package/src/surfaces/admin/components/AdminAction.d.ts +2 -2
- package/src/surfaces/admin/components/AdminBlock.d.ts +3 -3
- package/src/surfaces/admin/components/AdminPrintAction.d.ts +2 -2
- package/src/surfaces/admin/components/AppNav.d.ts +1 -1
- package/src/surfaces/admin/components/Avatar.d.ts +1 -1
- package/src/surfaces/admin/components/Badge.d.ts +1 -1
- package/src/surfaces/admin/components/Banner.d.ts +1 -1
- package/src/surfaces/admin/components/Box.d.ts +1 -1
- package/src/surfaces/admin/components/Button.d.ts +1 -1
- package/src/surfaces/admin/components/ButtonGroup.d.ts +1 -1
- package/src/surfaces/admin/components/Checkbox.d.ts +3 -3
- package/src/surfaces/admin/components/Chip.d.ts +1 -1
- package/src/surfaces/admin/components/Choice.d.ts +3 -3
- package/src/surfaces/admin/components/ChoiceList.d.ts +3 -3
- package/src/surfaces/admin/components/Clickable.d.ts +1 -1
- package/src/surfaces/admin/components/ClickableChip.d.ts +1 -1
- package/src/surfaces/admin/components/ColorField.d.ts +1 -1
- package/src/surfaces/admin/components/ColorPicker.d.ts +1 -1
- package/src/surfaces/admin/components/DateField.d.ts +1 -1
- package/src/surfaces/admin/components/DatePicker.d.ts +1 -1
- package/src/surfaces/admin/components/Divider.d.ts +1 -1
- package/src/surfaces/admin/components/DropZone.d.ts +1 -1
- package/src/surfaces/admin/components/EmailField.d.ts +1 -1
- package/src/surfaces/admin/components/EmptyState.d.ts +1 -1
- package/src/surfaces/admin/components/Form.d.ts +1 -1
- package/src/surfaces/admin/components/FunctionSettings.d.ts +1 -1
- package/src/surfaces/admin/components/Grid.d.ts +1 -1
- package/src/surfaces/admin/components/GridItem.d.ts +1 -1
- package/src/surfaces/admin/components/Heading.d.ts +1 -1
- package/src/surfaces/admin/components/Icon.d.ts +1 -1
- package/src/surfaces/admin/components/Image.d.ts +1 -1
- package/src/surfaces/admin/components/Link.d.ts +1 -1
- package/src/surfaces/admin/components/ListItem.d.ts +1 -1
- package/src/surfaces/admin/components/Menu.d.ts +1 -1
- package/src/surfaces/admin/components/Modal.d.ts +1 -1
- package/src/surfaces/admin/components/MoneyField.d.ts +1 -1
- package/src/surfaces/admin/components/Number.d.ts +1 -1
- package/src/surfaces/admin/components/NumberField.d.ts +1 -1
- package/src/surfaces/admin/components/Option.d.ts +3 -3
- package/src/surfaces/admin/components/OptionGroup.d.ts +1 -1
- package/src/surfaces/admin/components/OrderedList.d.ts +1 -1
- package/src/surfaces/admin/components/Page.d.ts +1 -1
- package/src/surfaces/admin/components/Paragraph.d.ts +1 -1
- package/src/surfaces/admin/components/PasswordField.d.ts +1 -1
- package/src/surfaces/admin/components/Popover.d.ts +1 -1
- package/src/surfaces/admin/components/Progress.d.ts +155 -0
- package/src/surfaces/admin/components/QueryContainer.d.ts +1 -1
- package/src/surfaces/admin/components/SearchField.d.ts +1 -1
- package/src/surfaces/admin/components/Section.d.ts +11 -3
- package/src/surfaces/admin/components/Select.d.ts +1 -1
- package/src/surfaces/admin/components/Spinner.d.ts +1 -1
- package/src/surfaces/admin/components/Stack.d.ts +1 -1
- package/src/surfaces/admin/components/StandardComponents.ts +3 -0
- package/src/surfaces/admin/components/Switch.d.ts +3 -3
- package/src/surfaces/admin/components/Table.d.ts +1 -1
- package/src/surfaces/admin/components/TableBody.d.ts +1 -1
- package/src/surfaces/admin/components/TableCell.d.ts +1 -1
- package/src/surfaces/admin/components/TableHeader.d.ts +1 -1
- package/src/surfaces/admin/components/TableHeaderRow.d.ts +1 -1
- package/src/surfaces/admin/components/TableRow.d.ts +1 -1
- package/src/surfaces/admin/components/Text.d.ts +1 -1
- package/src/surfaces/admin/components/TextArea.d.ts +1 -1
- package/src/surfaces/admin/components/TextField.d.ts +1 -1
- package/src/surfaces/admin/components/Thumbnail.d.ts +1 -1
- package/src/surfaces/admin/components/Tooltip.d.ts +1 -1
- package/src/surfaces/admin/components/URLField.d.ts +1 -1
- package/src/surfaces/admin/components/UnorderedList.d.ts +1 -1
- package/src/surfaces/admin/components/shared.d.ts +47 -7
- package/src/surfaces/admin/components.d.ts +8216 -2635
- package/src/surfaces/checkout/api/address-autocomplete/format-suggestion.ts +9 -0
- package/src/surfaces/checkout/api/address-autocomplete/shared.ts +9 -0
- package/src/surfaces/checkout/api/address-autocomplete/standard.ts +1 -2
- package/src/surfaces/checkout/api/address-autocomplete/suggest.ts +8 -0
- package/src/surfaces/checkout/api/checkout/checkout.ts +19 -9
- package/src/surfaces/checkout/api/shared.ts +110 -1
- package/src/surfaces/checkout/api/standard/standard.ts +11 -1
- package/src/surfaces/checkout/components/MoneyField.d.ts +3 -1
- package/src/surfaces/checkout/components/NumberField.d.ts +3 -1
- package/src/surfaces/checkout/components/components-shared.d.ts +1 -1
- package/src/surfaces/checkout/preact/country.ts +1 -1
- package/src/surfaces/checkout.ts +3 -0
- package/src/surfaces/customer-account/api/shared.ts +25 -7
- package/src/surfaces/customer-account/api.ts +1 -0
- package/src/surfaces/customer-account/preact/authenticated-account.ts +3 -3
- package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +14 -0
- package/src/surfaces/point-of-sale/api/device-api/device-api.ts +4 -0
- package/src/surfaces/point-of-sale/api/docs.ts +8 -0
- package/src/surfaces/point-of-sale/api/extension-api/extension-api.ts +25 -5
- package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +22 -7
- package/src/surfaces/point-of-sale/api/resolution-api/resolution-api.ts +30 -3
- package/src/surfaces/point-of-sale/api/session-api/session-api.ts +1 -1
- package/src/surfaces/point-of-sale/api.ts +2 -0
- package/src/surfaces/point-of-sale/components/POSList.d.ts +179 -0
- package/src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts +0 -4
- package/src/surfaces/point-of-sale/components/targets/ResolutionComponents.ts +1 -1
- package/src/surfaces/point-of-sale/components/targets/StandardComponents.ts +1 -3
- package/src/surfaces/point-of-sale/components.d.ts +194 -0
- package/src/surfaces/point-of-sale/event/data/BaseData.ts +13 -1
- package/src/surfaces/point-of-sale/event/data.ts +1 -1
- package/src/surfaces/point-of-sale/events/scan-event.ts +34 -0
- package/src/surfaces/point-of-sale/events.ts +58 -27
- package/src/surfaces/point-of-sale/extension-targets.ts +4 -4
- package/src/surfaces/point-of-sale/globals.ts +0 -2
- package/src/surfaces/point-of-sale/pos-list-template.ts +351 -0
- package/src/surfaces/point-of-sale/tests/pos-list-template.test.ts +306 -0
- package/src/surfaces/point-of-sale/types/session.ts +0 -7
- package/src/surfaces/point-of-sale.ts +1 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import {posListTemplate} from '../pos-list-template';
|
|
2
|
+
import type {POSListTemplateNode} from '../pos-list-template';
|
|
3
|
+
|
|
4
|
+
function item(markup: string, attributes = 'templateId="p"') {
|
|
5
|
+
return `<s-pos-list-item ${attributes}>${markup}</s-pos-list-item>`;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function compileItem(markup: string, attributes?: string) {
|
|
9
|
+
return posListTemplate(
|
|
10
|
+
Object.assign([item(markup, attributes)], {
|
|
11
|
+
raw: [item(markup, attributes)],
|
|
12
|
+
}),
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function firstChild(markup: string): POSListTemplateNode {
|
|
17
|
+
const [template] = compileItem(markup).templates;
|
|
18
|
+
const [child] = template!.children;
|
|
19
|
+
return child!;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
describe('posListTemplate', () => {
|
|
23
|
+
describe('roots', () => {
|
|
24
|
+
it('compiles text with a path placeholder into text segments', () => {
|
|
25
|
+
const result = posListTemplate`<s-pos-list-item templateId="p"><s-text>Hi {{name}}</s-text></s-pos-list-item>`;
|
|
26
|
+
|
|
27
|
+
expect(result).toStrictEqual({
|
|
28
|
+
templates: [
|
|
29
|
+
{
|
|
30
|
+
templateId: 'p',
|
|
31
|
+
type: 'button',
|
|
32
|
+
children: [
|
|
33
|
+
{
|
|
34
|
+
kind: 'element',
|
|
35
|
+
tag: 's-text',
|
|
36
|
+
props: {},
|
|
37
|
+
children: [{kind: 'text', segments: ['Hi ', {path: 'name'}]}],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('compiles several roots and honours type="text"', () => {
|
|
46
|
+
const result = posListTemplate`
|
|
47
|
+
<s-pos-list-item templateId="header" type="text"><s-heading>{{title}}</s-heading></s-pos-list-item>
|
|
48
|
+
<s-pos-list-item templateId="product"><s-text>{{name}}</s-text></s-pos-list-item>
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
expect(
|
|
52
|
+
result.templates.map(({templateId, type}) => ({templateId, type})),
|
|
53
|
+
).toStrictEqual([
|
|
54
|
+
{templateId: 'header', type: 'text'},
|
|
55
|
+
{templateId: 'product', type: 'button'},
|
|
56
|
+
]);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('rejects an unknown type', () => {
|
|
60
|
+
expect(() =>
|
|
61
|
+
compileItem('<s-text>x</s-text>', 'templateId="p" type="link"'),
|
|
62
|
+
).toThrow(
|
|
63
|
+
'posListTemplate: <s-pos-list-item> type must be "button" or "text", got "link"',
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('rejects a missing, empty, or duplicate templateId', () => {
|
|
68
|
+
expect(() => compileItem('<s-text>x</s-text>', 'type="text"')).toThrow(
|
|
69
|
+
'posListTemplate: <s-pos-list-item> requires a literal, non-empty templateId',
|
|
70
|
+
);
|
|
71
|
+
expect(() => compileItem('<s-text>x</s-text>', 'templateId=""')).toThrow(
|
|
72
|
+
'posListTemplate: <s-pos-list-item> requires a literal, non-empty templateId',
|
|
73
|
+
);
|
|
74
|
+
expect(
|
|
75
|
+
() => posListTemplate`
|
|
76
|
+
<s-pos-list-item templateId="p"><s-text>a</s-text></s-pos-list-item>
|
|
77
|
+
<s-pos-list-item templateId="p"><s-text>b</s-text></s-pos-list-item>
|
|
78
|
+
`,
|
|
79
|
+
).toThrow('posListTemplate: duplicate templateId "p"');
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('rejects other root attributes, non-item roots, and nested items', () => {
|
|
83
|
+
expect(() =>
|
|
84
|
+
compileItem('<s-text>x</s-text>', 'templateId="p" id="x"'),
|
|
85
|
+
).toThrow(
|
|
86
|
+
'posListTemplate: <s-pos-list-item> does not accept a "id" attribute; only templateId and type are allowed',
|
|
87
|
+
);
|
|
88
|
+
expect(() => posListTemplate`<s-text>loose</s-text>`).toThrow(
|
|
89
|
+
'posListTemplate: every template root must be an <s-pos-list-item templateId="…"> element',
|
|
90
|
+
);
|
|
91
|
+
expect(() =>
|
|
92
|
+
compileItem(
|
|
93
|
+
'<s-pos-list-item templateId="q"><s-text>x</s-text></s-pos-list-item>',
|
|
94
|
+
),
|
|
95
|
+
).toThrow(
|
|
96
|
+
'posListTemplate: <s-pos-list-item> can only appear as a template root',
|
|
97
|
+
);
|
|
98
|
+
expect(() => compileItem('<s-pos-list rows="x"></s-pos-list>')).toThrow(
|
|
99
|
+
'posListTemplate: <s-pos-list> can only appear as a template root',
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('rejects text directly under the item root', () => {
|
|
104
|
+
expect(() => compileItem('{{label}}')).toThrow(
|
|
105
|
+
'posListTemplate: text must be inside a component such as <s-text>',
|
|
106
|
+
);
|
|
107
|
+
expect(() => compileItem('Plain text')).toThrow(
|
|
108
|
+
'posListTemplate: text must be inside a component such as <s-text>',
|
|
109
|
+
);
|
|
110
|
+
expect(() => compileItem('{{#if a}}{{label}}{{/if}}')).toThrow(
|
|
111
|
+
'posListTemplate: text must be inside a component such as <s-text>',
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('rejects interpolated values of any kind', () => {
|
|
116
|
+
// The tag's type already forbids interpolation; this exercises the runtime check JS callers hit.
|
|
117
|
+
const compileDynamic = posListTemplate as unknown as (
|
|
118
|
+
strings: TemplateStringsArray,
|
|
119
|
+
...values: unknown[]
|
|
120
|
+
) => unknown;
|
|
121
|
+
const dynamic = () => {};
|
|
122
|
+
const tag = 's-text';
|
|
123
|
+
expect(
|
|
124
|
+
() =>
|
|
125
|
+
compileDynamic`<s-pos-list-item templateId="p"><s-text onClick=${dynamic}>x</s-text></s-pos-list-item>`,
|
|
126
|
+
).toThrow(
|
|
127
|
+
'posListTemplate: interpolated values are not supported; templates must be static',
|
|
128
|
+
);
|
|
129
|
+
expect(
|
|
130
|
+
() =>
|
|
131
|
+
compileDynamic`<s-pos-list-item templateId="p"><${tag}>x</${tag}></s-pos-list-item>`,
|
|
132
|
+
).toThrow(
|
|
133
|
+
'posListTemplate: interpolated values are not supported; templates must be static',
|
|
134
|
+
);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
describe('conditionals', () => {
|
|
139
|
+
it('compiles {{#if}} blocks into if nodes wrapping the sibling elements between the markers', () => {
|
|
140
|
+
const stack = firstChild(
|
|
141
|
+
'<s-stack>{{#if onSale}}<s-badge tone="success">Sale</s-badge>{{/if}}</s-stack>',
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
expect(stack).toStrictEqual({
|
|
145
|
+
kind: 'element',
|
|
146
|
+
tag: 's-stack',
|
|
147
|
+
props: {},
|
|
148
|
+
children: [
|
|
149
|
+
{
|
|
150
|
+
kind: 'if',
|
|
151
|
+
path: 'onSale',
|
|
152
|
+
children: [
|
|
153
|
+
{
|
|
154
|
+
kind: 'element',
|
|
155
|
+
tag: 's-badge',
|
|
156
|
+
props: {tone: {kind: 'literal', value: 'success'}},
|
|
157
|
+
children: [{kind: 'text', segments: ['Sale']}],
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it('keeps text inside an if within a component', () => {
|
|
166
|
+
const text = firstChild(
|
|
167
|
+
'<s-text>{{#if a}}Yes {{label}}{{/if}} always</s-text>',
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
expect(text).toStrictEqual({
|
|
171
|
+
kind: 'element',
|
|
172
|
+
tag: 's-text',
|
|
173
|
+
props: {},
|
|
174
|
+
children: [
|
|
175
|
+
{
|
|
176
|
+
kind: 'if',
|
|
177
|
+
path: 'a',
|
|
178
|
+
children: [{kind: 'text', segments: ['Yes ', {path: 'label'}]}],
|
|
179
|
+
},
|
|
180
|
+
{kind: 'text', segments: [' always']},
|
|
181
|
+
],
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it('rejects a condition nested through component children', () => {
|
|
186
|
+
expect(() =>
|
|
187
|
+
compileItem(
|
|
188
|
+
'{{#if outer}}<s-box><s-stack>{{#if inner}}<s-text>Visible</s-text>{{/if}}</s-stack></s-box>{{/if}}',
|
|
189
|
+
),
|
|
190
|
+
).toThrow(/cannot be nested/);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it('allows a separate condition after an enclosing condition closes', () => {
|
|
194
|
+
const result = compileItem(
|
|
195
|
+
'{{#if first}}<s-box><s-text>First</s-text></s-box>{{/if}}<s-stack>{{#if second}}<s-text>Second</s-text>{{/if}}</s-stack>',
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
expect(result.templates[0]?.children).toMatchObject([
|
|
199
|
+
{
|
|
200
|
+
kind: 'if',
|
|
201
|
+
path: 'first',
|
|
202
|
+
children: [{kind: 'element', tag: 's-box'}],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
kind: 'element',
|
|
206
|
+
tag: 's-stack',
|
|
207
|
+
children: [{kind: 'if', path: 'second'}],
|
|
208
|
+
},
|
|
209
|
+
]);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it('rejects nested, unopened, unclosed, and unsupported block expressions', () => {
|
|
213
|
+
expect(() =>
|
|
214
|
+
compileItem(
|
|
215
|
+
'<s-stack>{{#if a}}{{#if b}}<s-text>x</s-text>{{/if}}{{/if}}</s-stack>',
|
|
216
|
+
),
|
|
217
|
+
).toThrow(
|
|
218
|
+
'posListTemplate: {{#if}} cannot be nested: {{#if b}} inside {{#if a}}',
|
|
219
|
+
);
|
|
220
|
+
expect(() => compileItem('<s-stack>{{/if}}</s-stack>')).toThrow(
|
|
221
|
+
'posListTemplate: {{/if}} without a matching {{#if}}',
|
|
222
|
+
);
|
|
223
|
+
expect(() =>
|
|
224
|
+
compileItem('<s-stack>{{#if a}}<s-text>x</s-text></s-stack>'),
|
|
225
|
+
).toThrow('posListTemplate: {{#if a}} is missing its {{/if}}');
|
|
226
|
+
expect(() =>
|
|
227
|
+
compileItem(
|
|
228
|
+
'<s-stack>{{#each x}}<s-text>x</s-text>{{/each}}</s-stack>',
|
|
229
|
+
),
|
|
230
|
+
).toThrow(
|
|
231
|
+
'posListTemplate: unsupported template expression "{{#each x}}"',
|
|
232
|
+
);
|
|
233
|
+
expect(() => compileItem('<s-text>{{a + b}}</s-text>')).toThrow(
|
|
234
|
+
'posListTemplate: unsupported template expression "{{a + b}}"',
|
|
235
|
+
);
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
describe('props', () => {
|
|
240
|
+
it('compiles bind: attributes into typed field bindings', () => {
|
|
241
|
+
expect(firstChild('<s-switch bind:checked="active" />')).toStrictEqual({
|
|
242
|
+
kind: 'element',
|
|
243
|
+
tag: 's-switch',
|
|
244
|
+
props: {checked: {kind: 'field', path: 'active'}},
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
it('compiles placeholders inside attributes into string segments', () => {
|
|
249
|
+
expect(
|
|
250
|
+
firstChild('<s-image src="{{image.src}}" alt="{{label}} image" />'),
|
|
251
|
+
).toStrictEqual({
|
|
252
|
+
kind: 'element',
|
|
253
|
+
tag: 's-image',
|
|
254
|
+
props: {
|
|
255
|
+
src: {kind: 'segments', segments: [{path: 'image.src'}]},
|
|
256
|
+
alt: {kind: 'segments', segments: [{path: 'label'}, ' image']},
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it('keeps literal strings and valueless attributes as literals', () => {
|
|
262
|
+
expect(firstChild('<s-switch checked label="Wifi" />')).toStrictEqual({
|
|
263
|
+
kind: 'element',
|
|
264
|
+
tag: 's-switch',
|
|
265
|
+
props: {
|
|
266
|
+
checked: {kind: 'literal', value: true},
|
|
267
|
+
label: {kind: 'literal', value: 'Wifi'},
|
|
268
|
+
},
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it.each([
|
|
273
|
+
'onClick="x"',
|
|
274
|
+
'onclick="x"',
|
|
275
|
+
'ONCLICK="{{handler}}"',
|
|
276
|
+
'OnClick="x"',
|
|
277
|
+
'bind:onClick="handler"',
|
|
278
|
+
'bind:onclick="handler"',
|
|
279
|
+
'bind:ONCLICK="handler"',
|
|
280
|
+
'bind:OnClick="handler"',
|
|
281
|
+
])('rejects the event handler attribute %s', (attribute) => {
|
|
282
|
+
expect(() => compileItem(`<s-button ${attribute}>Go</s-button>`)).toThrow(
|
|
283
|
+
'posListTemplate: event handlers are not supported in templates; use onRowClick on <s-pos-list>',
|
|
284
|
+
);
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it('rejects a bind: attribute that collides with a plain attribute or names an invalid path', () => {
|
|
288
|
+
expect(() =>
|
|
289
|
+
compileItem('<s-switch checked bind:checked="active" />'),
|
|
290
|
+
).toThrow(
|
|
291
|
+
'posListTemplate: "checked" is set both as an attribute and through bind:checked',
|
|
292
|
+
);
|
|
293
|
+
expect(() => compileItem('<s-switch bind:checked="a b" />')).toThrow(
|
|
294
|
+
'posListTemplate: bind:checked must name a row field path',
|
|
295
|
+
);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
it('rejects block expressions inside attribute values', () => {
|
|
299
|
+
expect(() =>
|
|
300
|
+
compileItem('<s-text tone="{{#if a}}critical{{/if}}">x</s-text>'),
|
|
301
|
+
).toThrow(
|
|
302
|
+
'posListTemplate: {{#if}} is not supported inside an attribute value: "{{#if a}}"',
|
|
303
|
+
);
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
});
|
|
@@ -36,13 +36,6 @@ export interface Session {
|
|
|
36
36
|
*/
|
|
37
37
|
locationId: number;
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.
|
|
41
|
-
*
|
|
42
|
-
* @deprecated Use `session.staffMember` on the Session API instead.
|
|
43
|
-
*/
|
|
44
|
-
staffMemberId?: number;
|
|
45
|
-
|
|
46
39
|
/**
|
|
47
40
|
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.
|
|
48
41
|
*/
|