@shopify/ui-extensions 2026.10.0-rc.8 → 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 +61 -107
- package/build/ts/surfaces/admin/components/AdminBlock.d.ts +22 -107
- package/build/ts/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
- package/build/ts/surfaces/admin/components/AppNav.d.ts +38 -1
- package/build/ts/surfaces/admin/components/Avatar.d.ts +100 -139
- package/build/ts/surfaces/admin/components/Badge.d.ts +107 -156
- package/build/ts/surfaces/admin/components/Banner.d.ts +102 -127
- package/build/ts/surfaces/admin/components/Box.d.ts +145 -234
- package/build/ts/surfaces/admin/components/Button.d.ts +156 -266
- package/build/ts/surfaces/admin/components/ButtonGroup.d.ts +89 -117
- package/build/ts/surfaces/admin/components/Checkbox.d.ts +140 -175
- package/build/ts/surfaces/admin/components/Chip.d.ts +117 -15
- package/build/ts/surfaces/admin/components/Choice.d.ts +88 -113
- package/build/ts/surfaces/admin/components/ChoiceList.d.ts +120 -129
- package/build/ts/surfaces/admin/components/Clickable.d.ts +227 -209
- package/build/ts/surfaces/admin/components/ClickableChip.d.ts +117 -153
- package/build/ts/surfaces/admin/components/ColorField.d.ts +111 -215
- package/build/ts/surfaces/admin/components/ColorPicker.d.ts +82 -137
- package/build/ts/surfaces/admin/components/DateField.d.ts +140 -230
- package/build/ts/surfaces/admin/components/DatePicker.d.ts +178 -181
- package/build/ts/surfaces/admin/components/Divider.d.ts +50 -118
- package/build/ts/surfaces/admin/components/DropZone.d.ts +153 -12
- package/build/ts/surfaces/admin/components/EmailField.d.ts +100 -197
- package/build/ts/surfaces/admin/components/EmptyState.d.ts +144 -0
- package/build/ts/surfaces/admin/components/Form.d.ts +25 -118
- package/build/ts/surfaces/admin/components/FunctionSettings.d.ts +26 -132
- package/build/ts/surfaces/admin/components/Grid.d.ts +165 -299
- package/build/ts/surfaces/admin/components/GridItem.d.ts +145 -261
- package/build/ts/surfaces/admin/components/Heading.d.ts +117 -117
- package/build/ts/surfaces/admin/components/Icon.d.ts +91 -129
- package/build/ts/surfaces/admin/components/Image.d.ts +216 -251
- package/build/ts/surfaces/admin/components/Link.d.ts +125 -126
- package/build/ts/surfaces/admin/components/ListItem.d.ts +63 -102
- package/build/ts/surfaces/admin/components/Menu.d.ts +82 -150
- package/build/ts/surfaces/admin/components/Modal.d.ts +232 -26
- package/build/ts/surfaces/admin/components/MoneyField.d.ts +103 -196
- package/build/ts/surfaces/admin/components/Number.d.ts +193 -0
- package/build/ts/surfaces/admin/components/NumberField.d.ts +114 -208
- package/build/ts/surfaces/admin/components/Option.d.ts +67 -108
- package/build/ts/surfaces/admin/components/OptionGroup.d.ts +69 -105
- package/build/ts/surfaces/admin/components/OrderedList.d.ts +56 -102
- package/build/ts/surfaces/admin/components/Page.d.ts +93 -13
- package/build/ts/surfaces/admin/components/Paragraph.d.ts +126 -138
- package/build/ts/surfaces/admin/components/PasswordField.d.ts +109 -203
- package/build/ts/surfaces/admin/components/Popover.d.ts +26 -8
- package/build/ts/surfaces/admin/components/Progress.d.ts +155 -0
- package/build/ts/surfaces/admin/components/QueryContainer.d.ts +77 -116
- package/build/ts/surfaces/admin/components/SearchField.d.ts +103 -191
- package/build/ts/surfaces/admin/components/Section.d.ts +139 -127
- package/build/ts/surfaces/admin/components/Select.d.ts +144 -193
- package/build/ts/surfaces/admin/components/Spinner.d.ts +60 -113
- package/build/ts/surfaces/admin/components/Stack.d.ts +156 -282
- 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 +76 -166
- package/build/ts/surfaces/admin/components/Table.d.ts +100 -210
- package/build/ts/surfaces/admin/components/TableBody.d.ts +70 -106
- package/build/ts/surfaces/admin/components/TableCell.d.ts +70 -107
- package/build/ts/surfaces/admin/components/TableHeader.d.ts +79 -119
- package/build/ts/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
- package/build/ts/surfaces/admin/components/TableRow.d.ts +81 -109
- package/build/ts/surfaces/admin/components/Text.d.ts +123 -164
- package/build/ts/surfaces/admin/components/TextArea.d.ts +100 -195
- package/build/ts/surfaces/admin/components/TextField.d.ts +120 -204
- package/build/ts/surfaces/admin/components/Thumbnail.d.ts +83 -133
- package/build/ts/surfaces/admin/components/Tooltip.d.ts +78 -146
- package/build/ts/surfaces/admin/components/URLField.d.ts +107 -209
- package/build/ts/surfaces/admin/components/UnorderedList.d.ts +58 -110
- package/build/ts/surfaces/admin/components/shared.d.ts +4233 -1203
- 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/Box.d.ts +56 -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/Box.d.ts +56 -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 +61 -107
- package/src/surfaces/admin/components/AdminBlock.d.ts +22 -107
- package/src/surfaces/admin/components/AdminPrintAction.d.ts +20 -101
- package/src/surfaces/admin/components/AppNav.d.ts +38 -1
- package/src/surfaces/admin/components/Avatar.d.ts +100 -139
- package/src/surfaces/admin/components/Badge.d.ts +107 -156
- package/src/surfaces/admin/components/Banner.d.ts +102 -127
- package/src/surfaces/admin/components/Box.d.ts +145 -234
- package/src/surfaces/admin/components/Button.d.ts +156 -266
- package/src/surfaces/admin/components/ButtonGroup.d.ts +89 -117
- package/src/surfaces/admin/components/Checkbox.d.ts +140 -175
- package/src/surfaces/admin/components/Chip.d.ts +117 -15
- package/src/surfaces/admin/components/Choice.d.ts +88 -113
- package/src/surfaces/admin/components/ChoiceList.d.ts +120 -129
- package/src/surfaces/admin/components/Clickable.d.ts +227 -209
- package/src/surfaces/admin/components/ClickableChip.d.ts +117 -153
- package/src/surfaces/admin/components/ColorField.d.ts +111 -215
- package/src/surfaces/admin/components/ColorPicker.d.ts +82 -137
- package/src/surfaces/admin/components/DateField.d.ts +140 -230
- package/src/surfaces/admin/components/DatePicker.d.ts +178 -181
- package/src/surfaces/admin/components/Divider.d.ts +50 -118
- package/src/surfaces/admin/components/DropZone.d.ts +153 -12
- package/src/surfaces/admin/components/EmailField.d.ts +100 -197
- package/src/surfaces/admin/components/EmptyState.d.ts +144 -0
- package/src/surfaces/admin/components/Form.d.ts +25 -118
- package/src/surfaces/admin/components/FunctionSettings.d.ts +26 -132
- package/src/surfaces/admin/components/Grid.d.ts +165 -299
- package/src/surfaces/admin/components/GridItem.d.ts +145 -261
- package/src/surfaces/admin/components/Heading.d.ts +117 -117
- package/src/surfaces/admin/components/Icon.d.ts +91 -129
- package/src/surfaces/admin/components/Image.d.ts +216 -251
- package/src/surfaces/admin/components/Link.d.ts +125 -126
- package/src/surfaces/admin/components/ListItem.d.ts +63 -102
- package/src/surfaces/admin/components/Menu.d.ts +82 -150
- package/src/surfaces/admin/components/Modal.d.ts +232 -26
- package/src/surfaces/admin/components/MoneyField.d.ts +103 -196
- package/src/surfaces/admin/components/Number.d.ts +193 -0
- package/src/surfaces/admin/components/NumberField.d.ts +114 -208
- package/src/surfaces/admin/components/Option.d.ts +67 -108
- package/src/surfaces/admin/components/OptionGroup.d.ts +69 -105
- package/src/surfaces/admin/components/OrderedList.d.ts +56 -102
- package/src/surfaces/admin/components/Page.d.ts +93 -13
- package/src/surfaces/admin/components/Paragraph.d.ts +126 -138
- package/src/surfaces/admin/components/PasswordField.d.ts +109 -203
- package/src/surfaces/admin/components/Popover.d.ts +26 -8
- package/src/surfaces/admin/components/Progress.d.ts +155 -0
- package/src/surfaces/admin/components/QueryContainer.d.ts +77 -116
- package/src/surfaces/admin/components/SearchField.d.ts +103 -191
- package/src/surfaces/admin/components/Section.d.ts +139 -127
- package/src/surfaces/admin/components/Select.d.ts +144 -193
- package/src/surfaces/admin/components/Spinner.d.ts +60 -113
- package/src/surfaces/admin/components/Stack.d.ts +156 -282
- package/src/surfaces/admin/components/StandardComponents.ts +3 -0
- package/src/surfaces/admin/components/Switch.d.ts +76 -166
- package/src/surfaces/admin/components/Table.d.ts +100 -210
- package/src/surfaces/admin/components/TableBody.d.ts +70 -106
- package/src/surfaces/admin/components/TableCell.d.ts +70 -107
- package/src/surfaces/admin/components/TableHeader.d.ts +79 -119
- package/src/surfaces/admin/components/TableHeaderRow.d.ts +71 -107
- package/src/surfaces/admin/components/TableRow.d.ts +81 -109
- package/src/surfaces/admin/components/Text.d.ts +123 -164
- package/src/surfaces/admin/components/TextArea.d.ts +100 -195
- package/src/surfaces/admin/components/TextField.d.ts +120 -204
- package/src/surfaces/admin/components/Thumbnail.d.ts +83 -133
- package/src/surfaces/admin/components/Tooltip.d.ts +78 -146
- package/src/surfaces/admin/components/URLField.d.ts +107 -209
- package/src/surfaces/admin/components/UnorderedList.d.ts +58 -110
- package/src/surfaces/admin/components/shared.d.ts +4233 -1203
- 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/Box.d.ts +56 -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
|
@@ -45,7 +45,7 @@ export interface NavigationCurrentEntryChangeEvent {
|
|
|
45
45
|
*/
|
|
46
46
|
export interface Navigation {
|
|
47
47
|
/**
|
|
48
|
-
* Navigates to a specific URL, updating any provided state in the history entries list.
|
|
48
|
+
* Navigates to a specific URL, updating any provided state in the history entries list. The promise does not wait for the native screen transition to finish; listen for `navigatesuccess` on the screen that becomes active to know when it has finished appearing. Use for programmatic navigation between screens, implementing custom navigation controls, or deep-linking to specific modal states.
|
|
49
49
|
*/
|
|
50
50
|
navigate: (url: string, options?: NavigationNavigateOptions) => Promise<void>;
|
|
51
51
|
/**
|
|
@@ -57,23 +57,38 @@ export interface Navigation {
|
|
|
57
57
|
*/
|
|
58
58
|
back(): void;
|
|
59
59
|
/**
|
|
60
|
-
* Registers
|
|
61
|
-
* @param type - The event type to listen for.
|
|
62
|
-
* @param cb -
|
|
60
|
+
* Registers a listener for `currententrychange`, which fires when the active history entry changes. This can happen before the screen finishes appearing.
|
|
61
|
+
* @param type - The event type to listen for.
|
|
62
|
+
* @param cb - Receives the previous history entry in `event.from`.
|
|
63
63
|
*/
|
|
64
64
|
addEventListener(
|
|
65
65
|
type: 'currententrychange',
|
|
66
66
|
cb: (event: NavigationCurrentEntryChangeEvent) => void,
|
|
67
67
|
): void;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
70
|
-
* @param type - The event type to
|
|
71
|
-
* @param cb -
|
|
69
|
+
* Registers a listener for `navigatesuccess`, which fires after the extension screen becomes active and finishes its native transition. The callback receives a standard `Event`, not a history entry. When navigating back, register the listener on the screen that will reappear: the departing screen is removed and cannot receive the completion event. Older POS builds without support for this event do not emit it.
|
|
70
|
+
* @param type - The event type to listen for.
|
|
71
|
+
* @param cb - Called after the screen finishes appearing.
|
|
72
|
+
*/
|
|
73
|
+
addEventListener(type: 'navigatesuccess', cb: (event: Event) => void): void;
|
|
74
|
+
/**
|
|
75
|
+
* Removes a `currententrychange` listener. Pass the same callback reference used with `addEventListener`.
|
|
76
|
+
* @param type - The event type to stop listening for.
|
|
77
|
+
* @param cb - The previously registered callback.
|
|
72
78
|
*/
|
|
73
79
|
removeEventListener(
|
|
74
80
|
type: 'currententrychange',
|
|
75
81
|
cb: (event: NavigationCurrentEntryChangeEvent) => void,
|
|
76
82
|
): void;
|
|
83
|
+
/**
|
|
84
|
+
* Removes a `navigatesuccess` listener. Pass the same callback reference used with `addEventListener`.
|
|
85
|
+
* @param type - The event type to stop listening for.
|
|
86
|
+
* @param cb - The previously registered callback.
|
|
87
|
+
*/
|
|
88
|
+
removeEventListener(
|
|
89
|
+
type: 'navigatesuccess',
|
|
90
|
+
cb: (event: Event) => void,
|
|
91
|
+
): void;
|
|
77
92
|
}
|
|
78
93
|
|
|
79
94
|
/**
|
|
@@ -8,17 +8,44 @@ import type {ReadonlySignalLike} from '../../../../shared';
|
|
|
8
8
|
* @private
|
|
9
9
|
*/
|
|
10
10
|
export interface ResolutionApi<TEventData> {
|
|
11
|
+
/** The intercepted event data and save handler for the active resolution target. */
|
|
11
12
|
resolution: ResolutionApiContent<TEventData>;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Runs when staff advance the resolution flow. Return a promise to have POS
|
|
17
|
+
* wait for pending work to finish before it re-runs validation.
|
|
18
|
+
*
|
|
19
|
+
* @publicDocs
|
|
20
|
+
*/
|
|
21
|
+
export type ResolutionSaveHandler = () => void | Promise<void>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The intercepted event data and save handler available to a validation
|
|
25
|
+
* resolution target through `shopify.resolution`.
|
|
26
|
+
*
|
|
27
|
+
* @publicDocs
|
|
16
28
|
*/
|
|
17
29
|
export interface ResolutionApiContent<TEventData> {
|
|
18
30
|
/**
|
|
19
31
|
* The data of the intercepted event this resolution target was opened for.
|
|
20
|
-
* The `value` property provides the current data, and `subscribe`
|
|
21
|
-
*
|
|
32
|
+
* The `value` property provides the current data, and `subscribe` receives
|
|
33
|
+
* Shopify POS revalidation updates.
|
|
22
34
|
*/
|
|
23
35
|
event: ReadonlySignalLike<TEventData>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Registers a handler that runs when staff advance the resolution flow
|
|
39
|
+
* (Save, Next, or Done). POS awaits the handler before it re-runs the
|
|
40
|
+
* intercepted validation, so use it to commit any pending work, for example
|
|
41
|
+
* cart updates or storage writes, and `await` those calls inside the handler.
|
|
42
|
+
* A rejected promise does not stop the flow; POS still re-runs validation and
|
|
43
|
+
* the interceptor result decides what happens next.
|
|
44
|
+
*
|
|
45
|
+
* Only the most recent handler is kept.
|
|
46
|
+
*
|
|
47
|
+
* @returns A promise that resolves to an async cleanup function that
|
|
48
|
+
* unregisters the handler.
|
|
49
|
+
*/
|
|
50
|
+
onSave(handler: ResolutionSaveHandler): Promise<() => Promise<void>>;
|
|
24
51
|
}
|
|
@@ -7,7 +7,7 @@ import type {Session, StaffMember} from '../../types/session';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface SessionApiContent {
|
|
9
9
|
/**
|
|
10
|
-
* Provides
|
|
10
|
+
* Provides information about the current POS session including shop details, user authentication, location data, currency settings, and POS version. Use `session.staffMember` to access the staff member currently pinned into POS and subscribe to staff member changes.
|
|
11
11
|
*/
|
|
12
12
|
currentSession: Session;
|
|
13
13
|
/**
|
|
@@ -24,11 +24,13 @@ export type {DataTargetApi} from './api/data-target-api/data-target-api';
|
|
|
24
24
|
export type {
|
|
25
25
|
ResolutionApi,
|
|
26
26
|
ResolutionApiContent,
|
|
27
|
+
ResolutionSaveHandler,
|
|
27
28
|
} from './api/resolution-api/resolution-api';
|
|
28
29
|
export type {
|
|
29
30
|
TransactionCompleteEvent,
|
|
30
31
|
CashTrackingSessionStartEvent,
|
|
31
32
|
CashTrackingSessionCompleteEvent,
|
|
33
|
+
ScanEvent,
|
|
32
34
|
ShopifyEventMap,
|
|
33
35
|
} from './events';
|
|
34
36
|
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/** VERSION: undefined **/
|
|
2
|
+
/* eslint-disable import-x/extensions */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
4
|
+
/* eslint-disable @typescript-eslint/member-ordering */
|
|
5
|
+
/* eslint-disable line-comment-position */
|
|
6
|
+
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
7
|
+
/* eslint-disable no-var */
|
|
8
|
+
/* eslint-disable import-x/namespace */
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference, spaced-comment
|
|
10
|
+
/// <reference lib="DOM" />
|
|
11
|
+
import type {Key, Ref, ComponentChild} from './components-shared.d.ts';
|
|
12
|
+
|
|
13
|
+
export type ComponentChildren = any;
|
|
14
|
+
/**
|
|
15
|
+
* Used when an element does not have children.
|
|
16
|
+
*/
|
|
17
|
+
export interface BaseElementProps<TClass = HTMLElement> {
|
|
18
|
+
key?: Key;
|
|
19
|
+
ref?: Ref<TClass>;
|
|
20
|
+
slot?: Lowercase<string>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Used when an element has children.
|
|
24
|
+
*/
|
|
25
|
+
export interface BaseElementPropsWithChildren<TClass = HTMLElement>
|
|
26
|
+
extends BaseElementProps<TClass> {
|
|
27
|
+
children?: ComponentChildren;
|
|
28
|
+
}
|
|
29
|
+
export type IntrinsicElementProps<T> = T &
|
|
30
|
+
BaseElementPropsWithChildren<T & HTMLElement>;
|
|
31
|
+
export type HtmlElementTagNameProps<T> = T & HTMLElement;
|
|
32
|
+
export type ElementForTag<T extends string> =
|
|
33
|
+
T extends keyof HTMLElementTagNameMap
|
|
34
|
+
? HTMLElementTagNameMap[T]
|
|
35
|
+
: HTMLElement;
|
|
36
|
+
export interface CallbackEvent<T extends string> {
|
|
37
|
+
currentTarget: ElementForTag<T>;
|
|
38
|
+
bubbles?: boolean;
|
|
39
|
+
cancelable?: boolean;
|
|
40
|
+
composed?: boolean;
|
|
41
|
+
detail?: any;
|
|
42
|
+
eventPhase: number;
|
|
43
|
+
target: ElementForTag<T> | null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The serialized template AST carried by `s-pos-list`'s `itemTemplates`
|
|
48
|
+
* property.
|
|
49
|
+
*
|
|
50
|
+
* Templates are authored in the extension sandbox with the `posListTemplate`
|
|
51
|
+
* tagged template, compiled once into this plain-JSON shape, and shipped
|
|
52
|
+
* across the bridge as a single property. The host hydrates the AST per
|
|
53
|
+
* visible row, so no RemoteDOM nodes exist for template content and no
|
|
54
|
+
* extension code runs while scrolling.
|
|
55
|
+
*/
|
|
56
|
+
/** A literal string piece or a row-field lookup within interpolated text. */
|
|
57
|
+
export type POSListTemplateSegment =
|
|
58
|
+
| string
|
|
59
|
+
| {
|
|
60
|
+
path: string;
|
|
61
|
+
};
|
|
62
|
+
export type POSListTemplateProp =
|
|
63
|
+
/** A static value. Web component attributes yield strings, or `true` when valueless. */
|
|
64
|
+
| {
|
|
65
|
+
kind: 'literal';
|
|
66
|
+
value: string | boolean;
|
|
67
|
+
}
|
|
68
|
+
/** The row field at `path`, passed through with its original type (`bind:prop="path"`). */
|
|
69
|
+
| {
|
|
70
|
+
kind: 'field';
|
|
71
|
+
path: string;
|
|
72
|
+
}
|
|
73
|
+
/** A string built from literal pieces and `{{path}}` lookups. */
|
|
74
|
+
| {
|
|
75
|
+
kind: 'segments';
|
|
76
|
+
segments: POSListTemplateSegment[];
|
|
77
|
+
};
|
|
78
|
+
export type POSListTemplateNode =
|
|
79
|
+
| {
|
|
80
|
+
kind: 'element';
|
|
81
|
+
tag: string;
|
|
82
|
+
props?: Record<string, POSListTemplateProp>;
|
|
83
|
+
children?: POSListTemplateNode[];
|
|
84
|
+
}
|
|
85
|
+
/** Literal text, possibly interpolated with `{{path}}` lookups. */
|
|
86
|
+
| {
|
|
87
|
+
kind: 'text';
|
|
88
|
+
segments: POSListTemplateSegment[];
|
|
89
|
+
}
|
|
90
|
+
/** `{{#if path}}…{{/if}}`: children render only when the field is truthy. */
|
|
91
|
+
| {
|
|
92
|
+
kind: 'if';
|
|
93
|
+
path: string;
|
|
94
|
+
children: POSListTemplateNode[];
|
|
95
|
+
};
|
|
96
|
+
/** One `<s-pos-list-item templateId="…">` root. */
|
|
97
|
+
export interface POSListItemTemplate {
|
|
98
|
+
templateId: string;
|
|
99
|
+
/** `button` rows fire `rowclick`; `text` rows are static content. */
|
|
100
|
+
type: 'button' | 'text';
|
|
101
|
+
children: POSListTemplateNode[];
|
|
102
|
+
}
|
|
103
|
+
export interface POSListTemplates {
|
|
104
|
+
templates: POSListItemTemplate[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare const tagName = 's-pos-list';
|
|
108
|
+
/**
|
|
109
|
+
* A row supplied to `s-pos-list`. Rows are plain data; every member other than `id` and
|
|
110
|
+
* `templateFor` is available to the row's item template through `{{path}}`, `bind:prop`,
|
|
111
|
+
* and `{{#if path}}` bindings.
|
|
112
|
+
*/
|
|
113
|
+
export interface POSListRow {
|
|
114
|
+
/** A unique identifier for the row. Keys virtualization and identity across incremental loads. */
|
|
115
|
+
id: string;
|
|
116
|
+
/** The `templateId` of the item template that renders this row. */
|
|
117
|
+
templateFor: string;
|
|
118
|
+
/** Any additional data the row's template reads. */
|
|
119
|
+
[field: string]: unknown;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The event fired when a `button` row is activated. `event.detail.item` is the activated row, and
|
|
123
|
+
* `event.detail.index` is its position in `rows`.
|
|
124
|
+
*/
|
|
125
|
+
export type POSListRowClickEvent = CallbackEvent<'s-pos-list'> & {
|
|
126
|
+
detail: {
|
|
127
|
+
item: POSListRow;
|
|
128
|
+
index: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Displays a virtualized list of rows rendered from plain data and item templates compiled with
|
|
133
|
+
* `posListTemplate`.
|
|
134
|
+
*
|
|
135
|
+
* @publicDocs
|
|
136
|
+
*/
|
|
137
|
+
export interface POSListJSXProps {
|
|
138
|
+
/** A unique identifier for the element. */
|
|
139
|
+
id?: string;
|
|
140
|
+
/** An array of POSListRow objects that define the content of each row in the list. */
|
|
141
|
+
rows?: POSListRow[];
|
|
142
|
+
/**
|
|
143
|
+
* Reusable templates that define the layout of list rows. Use `posListTemplate` to define one or
|
|
144
|
+
* more `<s-pos-list-item>` templates.
|
|
145
|
+
*/
|
|
146
|
+
itemTemplates?: POSListTemplates;
|
|
147
|
+
/**
|
|
148
|
+
* Whether more data is being loaded. Set to `true` when paginating and fetching additional data
|
|
149
|
+
* for the list. POS shows a progress indicator after the last row.
|
|
150
|
+
*
|
|
151
|
+
* @default false
|
|
152
|
+
*/
|
|
153
|
+
loadingMore?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Callback when a `button` row is activated. `event.detail.item` is the row and
|
|
156
|
+
* `event.detail.index` its position in `rows`. Rows rendered by a `text` template never fire it.
|
|
157
|
+
*/
|
|
158
|
+
onRowClick?: ((event: POSListRowClickEvent) => void) | null;
|
|
159
|
+
/** Callback when the list has scrolled near its end and more rows should be loaded. */
|
|
160
|
+
onLoadMore?: ((event: CallbackEvent<typeof tagName>) => void) | null;
|
|
161
|
+
/** Content displayed before the rows as part of the list's scrollable content. */
|
|
162
|
+
header?: ComponentChild;
|
|
163
|
+
}
|
|
164
|
+
export type ElementProps = Omit<POSListJSXProps, 'header'>;
|
|
165
|
+
declare global {
|
|
166
|
+
interface HTMLElementTagNameMap {
|
|
167
|
+
[tagName]: HtmlElementTagNameProps<ElementProps>;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
declare module 'preact' {
|
|
171
|
+
namespace createElement.JSX {
|
|
172
|
+
interface IntrinsicElements {
|
|
173
|
+
[tagName]: IntrinsicElementProps<ElementProps>;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export {tagName};
|
|
179
|
+
export type {ElementProps, POSListJSXProps, POSListRow, POSListRowClickEvent};
|
|
@@ -7,15 +7,11 @@ export type BlockExtensionComponents =
|
|
|
7
7
|
| 'Button'
|
|
8
8
|
| 'DatePicker'
|
|
9
9
|
| 'DateSpinner'
|
|
10
|
-
| 'Dialog'
|
|
11
10
|
| 'Heading'
|
|
12
11
|
| 'Icon'
|
|
13
12
|
| 'Image'
|
|
14
13
|
| 'Modal'
|
|
15
|
-
| 'POSBlock'
|
|
16
14
|
| 'PosBlock' // Case is important in 2025-10
|
|
17
|
-
| 'POSBlockRow'
|
|
18
|
-
| 'PrintPreview'
|
|
19
15
|
| 'Section'
|
|
20
16
|
| 'Stack'
|
|
21
17
|
| 'Text'
|
|
@@ -5435,6 +5435,138 @@ declare module 'preact' {
|
|
|
5435
5435
|
}
|
|
5436
5436
|
}
|
|
5437
5437
|
|
|
5438
|
+
/**
|
|
5439
|
+
* The serialized template AST carried by `s-pos-list`'s `itemTemplates`
|
|
5440
|
+
* property.
|
|
5441
|
+
*
|
|
5442
|
+
* Templates are authored in the extension sandbox with the `posListTemplate`
|
|
5443
|
+
* tagged template, compiled once into this plain-JSON shape, and shipped
|
|
5444
|
+
* across the bridge as a single property. The host hydrates the AST per
|
|
5445
|
+
* visible row, so no RemoteDOM nodes exist for template content and no
|
|
5446
|
+
* extension code runs while scrolling.
|
|
5447
|
+
*/
|
|
5448
|
+
/** A literal string piece or a row-field lookup within interpolated text. */
|
|
5449
|
+
type POSListTemplateSegment =
|
|
5450
|
+
| string
|
|
5451
|
+
| {
|
|
5452
|
+
path: string;
|
|
5453
|
+
};
|
|
5454
|
+
type POSListTemplateProp =
|
|
5455
|
+
/** A static value. Web component attributes yield strings, or `true` when valueless. */
|
|
5456
|
+
| {
|
|
5457
|
+
kind: 'literal';
|
|
5458
|
+
value: string | boolean;
|
|
5459
|
+
}
|
|
5460
|
+
/** The row field at `path`, passed through with its original type (`bind:prop="path"`). */
|
|
5461
|
+
| {
|
|
5462
|
+
kind: 'field';
|
|
5463
|
+
path: string;
|
|
5464
|
+
}
|
|
5465
|
+
/** A string built from literal pieces and `{{path}}` lookups. */
|
|
5466
|
+
| {
|
|
5467
|
+
kind: 'segments';
|
|
5468
|
+
segments: POSListTemplateSegment[];
|
|
5469
|
+
};
|
|
5470
|
+
type POSListTemplateNode =
|
|
5471
|
+
| {
|
|
5472
|
+
kind: 'element';
|
|
5473
|
+
tag: string;
|
|
5474
|
+
props?: Record<string, POSListTemplateProp>;
|
|
5475
|
+
children?: POSListTemplateNode[];
|
|
5476
|
+
}
|
|
5477
|
+
/** Literal text, possibly interpolated with `{{path}}` lookups. */
|
|
5478
|
+
| {
|
|
5479
|
+
kind: 'text';
|
|
5480
|
+
segments: POSListTemplateSegment[];
|
|
5481
|
+
}
|
|
5482
|
+
/** `{{#if path}}…{{/if}}`: children render only when the field is truthy. */
|
|
5483
|
+
| {
|
|
5484
|
+
kind: 'if';
|
|
5485
|
+
path: string;
|
|
5486
|
+
children: POSListTemplateNode[];
|
|
5487
|
+
};
|
|
5488
|
+
/** One `<s-pos-list-item templateId="…">` root. */
|
|
5489
|
+
interface POSListItemTemplate {
|
|
5490
|
+
templateId: string;
|
|
5491
|
+
/** `button` rows fire `rowclick`; `text` rows are static content. */
|
|
5492
|
+
type: 'button' | 'text';
|
|
5493
|
+
children: POSListTemplateNode[];
|
|
5494
|
+
}
|
|
5495
|
+
interface POSListTemplates {
|
|
5496
|
+
templates: POSListItemTemplate[];
|
|
5497
|
+
}
|
|
5498
|
+
|
|
5499
|
+
declare const posListTagName = 's-pos-list';
|
|
5500
|
+
/**
|
|
5501
|
+
* A row supplied to `s-pos-list`. Rows are plain data; every member other than `id` and
|
|
5502
|
+
* `templateFor` is available to the row's item template through `{{path}}`, `bind:prop`,
|
|
5503
|
+
* and `{{#if path}}` bindings.
|
|
5504
|
+
*/
|
|
5505
|
+
interface POSListRow {
|
|
5506
|
+
/** A unique identifier for the row. Keys virtualization and identity across incremental loads. */
|
|
5507
|
+
id: string;
|
|
5508
|
+
/** The `templateId` of the item template that renders this row. */
|
|
5509
|
+
templateFor: string;
|
|
5510
|
+
/** Any additional data the row's template reads. */
|
|
5511
|
+
[field: string]: unknown;
|
|
5512
|
+
}
|
|
5513
|
+
/**
|
|
5514
|
+
* The event fired when a `button` row is activated. `event.detail.item` is the activated row, and
|
|
5515
|
+
* `event.detail.index` is its position in `rows`.
|
|
5516
|
+
*/
|
|
5517
|
+
type POSListRowClickEvent = CallbackEvent<'s-pos-list'> & {
|
|
5518
|
+
detail: {
|
|
5519
|
+
item: POSListRow;
|
|
5520
|
+
index: number;
|
|
5521
|
+
};
|
|
5522
|
+
};
|
|
5523
|
+
/**
|
|
5524
|
+
* Displays a virtualized list of rows rendered from plain data and item templates compiled with
|
|
5525
|
+
* `posListTemplate`.
|
|
5526
|
+
*
|
|
5527
|
+
* @publicDocs
|
|
5528
|
+
*/
|
|
5529
|
+
interface POSListJSXProps {
|
|
5530
|
+
/** A unique identifier for the element. */
|
|
5531
|
+
id?: string;
|
|
5532
|
+
/** An array of POSListRow objects that define the content of each row in the list. */
|
|
5533
|
+
rows?: POSListRow[];
|
|
5534
|
+
/**
|
|
5535
|
+
* Reusable templates that define the layout of list rows. Use `posListTemplate` to define one or
|
|
5536
|
+
* more `<s-pos-list-item>` templates.
|
|
5537
|
+
*/
|
|
5538
|
+
itemTemplates?: POSListTemplates;
|
|
5539
|
+
/**
|
|
5540
|
+
* Whether more data is being loaded. Set to `true` when paginating and fetching additional data
|
|
5541
|
+
* for the list. POS shows a progress indicator after the last row.
|
|
5542
|
+
*
|
|
5543
|
+
* @default false
|
|
5544
|
+
*/
|
|
5545
|
+
loadingMore?: boolean;
|
|
5546
|
+
/**
|
|
5547
|
+
* Callback when a `button` row is activated. `event.detail.item` is the row and
|
|
5548
|
+
* `event.detail.index` its position in `rows`. Rows rendered by a `text` template never fire it.
|
|
5549
|
+
*/
|
|
5550
|
+
onRowClick?: ((event: POSListRowClickEvent) => void) | null;
|
|
5551
|
+
/** Callback when the list has scrolled near its end and more rows should be loaded. */
|
|
5552
|
+
onLoadMore?: ((event: CallbackEvent<typeof posListTagName>) => void) | null;
|
|
5553
|
+
/** Content displayed before the rows as part of the list's scrollable content. */
|
|
5554
|
+
header?: ComponentChild;
|
|
5555
|
+
}
|
|
5556
|
+
type POSListElementProps = Omit<POSListJSXProps, 'header'>;
|
|
5557
|
+
declare global {
|
|
5558
|
+
interface HTMLElementTagNameMap {
|
|
5559
|
+
[posListTagName]: HtmlElementTagNameProps<POSListElementProps>;
|
|
5560
|
+
}
|
|
5561
|
+
}
|
|
5562
|
+
declare module 'preact' {
|
|
5563
|
+
namespace createElement.JSX {
|
|
5564
|
+
interface IntrinsicElements {
|
|
5565
|
+
[posListTagName]: IntrinsicElementProps<POSListElementProps>;
|
|
5566
|
+
}
|
|
5567
|
+
}
|
|
5568
|
+
}
|
|
5569
|
+
|
|
5438
5570
|
export type {
|
|
5439
5571
|
BadgeJSXProps,
|
|
5440
5572
|
BannerJSXProps,
|
|
@@ -5457,6 +5589,7 @@ export type {
|
|
|
5457
5589
|
ModalJSXProps,
|
|
5458
5590
|
NumberFieldJSXProps,
|
|
5459
5591
|
PageJSXProps,
|
|
5592
|
+
POSListJSXProps,
|
|
5460
5593
|
PosBlockJSXProps,
|
|
5461
5594
|
QrCodeJSXProps,
|
|
5462
5595
|
ScrollBoxJSXProps,
|
|
@@ -5477,6 +5610,52 @@ export type {
|
|
|
5477
5610
|
TimePickerJSXProps,
|
|
5478
5611
|
};
|
|
5479
5612
|
|
|
5613
|
+
/**
|
|
5614
|
+
* The POS list component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
|
|
5615
|
+
* @publicDocs
|
|
5616
|
+
*/
|
|
5617
|
+
interface POSListEvents {
|
|
5618
|
+
/**
|
|
5619
|
+
* Callback when a `button` row is activated. `event.detail.item` is the row and
|
|
5620
|
+
* `event.detail.index` its position in `rows`. Rows rendered by a `text` template never fire it.
|
|
5621
|
+
*/
|
|
5622
|
+
rowclick?: (event: POSListRowClickEvent) => void;
|
|
5623
|
+
/** Callback when the list has scrolled near its end and more rows should be loaded. */
|
|
5624
|
+
loadmore?: (event: CallbackEvent<typeof posListTagName>) => void;
|
|
5625
|
+
}
|
|
5626
|
+
|
|
5627
|
+
/**
|
|
5628
|
+
* Content slots for the POS list.
|
|
5629
|
+
* @publicDocs
|
|
5630
|
+
*/
|
|
5631
|
+
interface POSListSlots {
|
|
5632
|
+
/** Content displayed before the rows as part of the list's scrollable content. */
|
|
5633
|
+
header?: HTMLElement;
|
|
5634
|
+
}
|
|
5635
|
+
|
|
5636
|
+
/**
|
|
5637
|
+
* Displays a virtualized list of rows rendered from plain data and item templates compiled with
|
|
5638
|
+
* `posListTemplate`.
|
|
5639
|
+
* @publicDocs
|
|
5640
|
+
*/
|
|
5641
|
+
interface POSList {
|
|
5642
|
+
/** A unique identifier for the element. */
|
|
5643
|
+
id?: string;
|
|
5644
|
+
/** An array of POSListRow objects that define the content of each row in the list. */
|
|
5645
|
+
rows?: POSListRow[];
|
|
5646
|
+
/**
|
|
5647
|
+
* Reusable templates that define the layout of list rows. Use `posListTemplate` to define one or
|
|
5648
|
+
* more `<s-pos-list-item>` templates.
|
|
5649
|
+
*/
|
|
5650
|
+
itemTemplates?: POSListTemplates;
|
|
5651
|
+
/**
|
|
5652
|
+
* Whether more data is being loaded. Set to `true` when paginating and fetching additional data
|
|
5653
|
+
* for the list. POS shows a progress indicator after the last row.
|
|
5654
|
+
* @default false
|
|
5655
|
+
*/
|
|
5656
|
+
loadingMore?: boolean;
|
|
5657
|
+
}
|
|
5658
|
+
|
|
5480
5659
|
/**
|
|
5481
5660
|
* The link component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
|
|
5482
5661
|
* @publicDocs
|
|
@@ -7809,3 +7988,18 @@ declare global {
|
|
|
7809
7988
|
}
|
|
7810
7989
|
}
|
|
7811
7990
|
}
|
|
7991
|
+
|
|
7992
|
+
declare module 'react' {
|
|
7993
|
+
namespace JSX {
|
|
7994
|
+
interface IntrinsicElements {
|
|
7995
|
+
[posListTagName]: IntrinsicElementProps<POSListElementProps>;
|
|
7996
|
+
}
|
|
7997
|
+
}
|
|
7998
|
+
}
|
|
7999
|
+
declare global {
|
|
8000
|
+
namespace JSX {
|
|
8001
|
+
interface IntrinsicElements {
|
|
8002
|
+
[posListTagName]: IntrinsicElementProps<POSListElementProps>;
|
|
8003
|
+
}
|
|
8004
|
+
}
|
|
8005
|
+
}
|
|
@@ -4,6 +4,18 @@ import type {
|
|
|
4
4
|
Session,
|
|
5
5
|
} from '../../../point-of-sale';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* A snapshot of the POS session provided to receipt targets.
|
|
9
|
+
* @publicDocs
|
|
10
|
+
*/
|
|
11
|
+
export interface BaseDataSession extends Session {
|
|
12
|
+
/**
|
|
13
|
+
* The ID of the staff member pinned into POS for this receipt event. This
|
|
14
|
+
* snapshot is separate from the reactive `session.staffMember` on the Session API.
|
|
15
|
+
*/
|
|
16
|
+
staffMemberId?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
7
19
|
/**
|
|
8
20
|
* Base data object provided to all extension targets containing device information, session context, and connectivity state. This data is available at extension initialization and provides essential context about the runtime environment.
|
|
9
21
|
* @publicDocs
|
|
@@ -24,5 +36,5 @@ export interface BaseData {
|
|
|
24
36
|
/**
|
|
25
37
|
* Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members.
|
|
26
38
|
*/
|
|
27
|
-
session:
|
|
39
|
+
session: BaseDataSession;
|
|
28
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type {BaseData} from './data/BaseData';
|
|
1
|
+
export type {BaseData, BaseDataSession} from './data/BaseData';
|
|
2
2
|
export type {BaseApi} from './data/BaseApi';
|
|
3
3
|
export type {ReprintReceiptData} from './data/ReprintReceiptData';
|
|
4
4
|
export type {TransactionCompleteWithReprintData} from './data/TransactionCompleteData';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type {ScannerSource} from '../api/scanner-api/scanner-api';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dispatched once for each successful scan captured by a camera, external,
|
|
5
|
+
* or embedded scanner. Every event carries a decoded `data` value and its
|
|
6
|
+
* `source`; no event is dispatched for initial or empty scanner state.
|
|
7
|
+
*
|
|
8
|
+
* The event is delivered only after POS has finished handling the scan
|
|
9
|
+
* itself.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* shopify.addEventListener('scan', (event) => {
|
|
14
|
+
* handleScan(event.data, event.source);
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
* @publicDocs
|
|
18
|
+
*/
|
|
19
|
+
export interface ScanEvent {
|
|
20
|
+
/** The event name. */
|
|
21
|
+
readonly type: 'scan';
|
|
22
|
+
/**
|
|
23
|
+
* The decoded string captured by the scan. Contains the scanned barcode, QR code, or other scannable data. Always present: an event is only dispatched for a successful scan.
|
|
24
|
+
*/
|
|
25
|
+
readonly data: string;
|
|
26
|
+
/**
|
|
27
|
+
* The scanner source that captured the scan. One of the following scanner types:
|
|
28
|
+
*
|
|
29
|
+
* • `'camera'` - Built-in device camera used for scanning
|
|
30
|
+
* • `'external'` - External scanner hardware connected to the device
|
|
31
|
+
* • `'embedded'` - Embedded scanner hardware built into the device
|
|
32
|
+
*/
|
|
33
|
+
readonly source: ScannerSource;
|
|
34
|
+
}
|