@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
|
@@ -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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @publicDocs
|
|
3
3
|
*/
|
|
4
|
-
export type BlockExtensionComponents = 'Badge' | 'Box' | 'Button' | 'DatePicker' | 'DateSpinner' | '
|
|
4
|
+
export type BlockExtensionComponents = 'Badge' | 'Box' | 'Button' | 'DatePicker' | 'DateSpinner' | 'Heading' | 'Icon' | 'Image' | 'Modal' | 'PosBlock' | 'Section' | 'Stack' | 'Text' | 'TimePicker';
|
|
5
5
|
//# sourceMappingURL=BlockExtensionComponents.d.ts.map
|
package/build/ts/surfaces/point-of-sale/components/targets/BlockExtensionComponents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockExtensionComponents.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC,OAAO,GACP,KAAK,GACL,QAAQ,GACR,YAAY,GACZ,aAAa,GACb,
|
|
1
|
+
{"version":3,"file":"BlockExtensionComponents.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC,OAAO,GACP,KAAK,GACL,QAAQ,GACR,YAAY,GACZ,aAAa,GACb,SAAS,GACT,MAAM,GACN,OAAO,GACP,OAAO,GACP,UAAU,GACV,SAAS,GACT,OAAO,GACP,MAAM,GACN,YAAY,CAAC"}
|
|
@@ -6,5 +6,5 @@ import type { StandardComponents } from './StandardComponents';
|
|
|
6
6
|
*
|
|
7
7
|
* @private
|
|
8
8
|
*/
|
|
9
|
-
export type ResolutionComponents = Exclude<StandardComponents, 'Page' | '
|
|
9
|
+
export type ResolutionComponents = Exclude<StandardComponents, 'Page' | 'PosBlock' | 'Tile'>;
|
|
10
10
|
//# sourceMappingURL=ResolutionComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolutionComponents.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/targets/ResolutionComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,kBAAkB,EAClB,MAAM,GAAG,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"ResolutionComponents.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/targets/ResolutionComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,kBAAkB,EAClB,MAAM,GAAG,UAAU,GAAG,MAAM,CAC7B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @publicDocs
|
|
3
3
|
*/
|
|
4
|
-
export type StandardComponents = 'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | '
|
|
4
|
+
export type StandardComponents = 'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | 'POSList' | 'PosBlock' | 'ScrollBox' | 'SearchField' | 'Section' | 'Spinner' | 'Stack' | 'Switch' | 'Tab' | 'TabList' | 'TabPanel' | 'Tabs' | 'Text' | 'TextArea' | 'TextField' | 'Tile' | 'TimeField' | 'TimePicker';
|
|
5
5
|
export default StandardComponents;
|
|
6
6
|
//# sourceMappingURL=StandardComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardComponents.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/targets/StandardComponents.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,aAAa,GACb,SAAS,GACT,YAAY,GACZ,OAAO,GACP,YAAY,GACZ,SAAS,GACT,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,aAAa,GACb,MAAM,GACN,
|
|
1
|
+
{"version":3,"file":"StandardComponents.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/components/targets/StandardComponents.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,aAAa,GACb,SAAS,GACT,YAAY,GACZ,OAAO,GACP,YAAY,GACZ,SAAS,GACT,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,aAAa,GACb,MAAM,GACN,SAAS,GACT,UAAU,GACV,WAAW,GACX,aAAa,GACb,SAAS,GACT,SAAS,GACT,OAAO,GACP,QAAQ,GACR,KAAK,GACL,SAAS,GACT,UAAU,GACV,MAAM,GACN,MAAM,GACN,UAAU,GACV,WAAW,GACX,MAAM,GACN,WAAW,GACX,YAAY,CAAC;AAEjB,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { ConnectivityApiContent, Device, Session } from '../../../point-of-sale';
|
|
2
|
+
/**
|
|
3
|
+
* A snapshot of the POS session provided to receipt targets.
|
|
4
|
+
* @publicDocs
|
|
5
|
+
*/
|
|
6
|
+
export interface BaseDataSession extends Session {
|
|
7
|
+
/**
|
|
8
|
+
* The ID of the staff member pinned into POS for this receipt event. This
|
|
9
|
+
* snapshot is separate from the reactive `session.staffMember` on the Session API.
|
|
10
|
+
*/
|
|
11
|
+
staffMemberId?: number;
|
|
12
|
+
}
|
|
2
13
|
/**
|
|
3
14
|
* 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.
|
|
4
15
|
* @publicDocs
|
|
@@ -19,6 +30,6 @@ export interface BaseData {
|
|
|
19
30
|
/**
|
|
20
31
|
* 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.
|
|
21
32
|
*/
|
|
22
|
-
session:
|
|
33
|
+
session: BaseDataSession;
|
|
23
34
|
}
|
|
24
35
|
//# sourceMappingURL=BaseData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseData.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/event/data/BaseData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,MAAM,EACN,OAAO,EACR,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,YAAY,EAAE,sBAAsB,CAAC;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BaseData.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/point-of-sale/event/data/BaseData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,MAAM,EACN,OAAO,EACR,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,OAAO;IAC9C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,YAAY,EAAE,sBAAsB,CAAC;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/event/data.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/event/data.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAC/D,YAAY,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAC,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAC,kCAAkC,EAAC,MAAM,gCAAgC,CAAC;AACvF,YAAY,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AACpE,YAAY,EAAC,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAC,uBAAuB,EAAC,MAAM,gCAAgC,CAAC;AAE5E,YAAY,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ScannerSource } from '../api/scanner-api/scanner-api';
|
|
2
|
+
/**
|
|
3
|
+
* Dispatched once for each successful scan captured by a camera, external,
|
|
4
|
+
* or embedded scanner. Every event carries a decoded `data` value and its
|
|
5
|
+
* `source`; no event is dispatched for initial or empty scanner state.
|
|
6
|
+
*
|
|
7
|
+
* The event is delivered only after POS has finished handling the scan
|
|
8
|
+
* itself.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* shopify.addEventListener('scan', (event) => {
|
|
13
|
+
* handleScan(event.data, event.source);
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
* @publicDocs
|
|
17
|
+
*/
|
|
18
|
+
export interface ScanEvent {
|
|
19
|
+
/** The event name. */
|
|
20
|
+
readonly type: 'scan';
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
readonly data: string;
|
|
25
|
+
/**
|
|
26
|
+
* The scanner source that captured the scan. One of the following scanner types:
|
|
27
|
+
*
|
|
28
|
+
* • `'camera'` - Built-in device camera used for scanning
|
|
29
|
+
* • `'external'` - External scanner hardware connected to the device
|
|
30
|
+
* • `'embedded'` - Embedded scanner hardware built into the device
|
|
31
|
+
*/
|
|
32
|
+
readonly source: ScannerSource;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=scan-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-event.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/point-of-sale/events/scan-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,SAAS;IACxB,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TransactionCompleteEvent } from './events/transaction-complete-event';
|
|
2
2
|
import type { CashTrackingSessionStartEvent, CashTrackingSessionCompleteEvent } from './events/cash-tracking-session-events';
|
|
3
|
+
import type { ScanEvent } from './events/scan-event';
|
|
3
4
|
import type { Cart } from './types/cart';
|
|
4
5
|
import type { MoneyV2 } from './types/money';
|
|
5
6
|
/**
|
|
@@ -12,6 +13,7 @@ export declare const POS_EVENT_NAMES: {
|
|
|
12
13
|
readonly TRANSACTION_COMPLETE: "transactioncomplete";
|
|
13
14
|
readonly CASH_TRACKING_SESSION_START: "cashtrackingsessionstart";
|
|
14
15
|
readonly CASH_TRACKING_SESSION_COMPLETE: "cashtrackingsessioncomplete";
|
|
16
|
+
readonly SCAN: "scan";
|
|
15
17
|
};
|
|
16
18
|
/**
|
|
17
19
|
* Canonical workflow-name constants for POS host interceptions. Prefer these
|
|
@@ -41,13 +43,19 @@ export interface ShopifyEventMap {
|
|
|
41
43
|
[POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;
|
|
42
44
|
/** Dispatched when a cash tracking session closes after reconciliation. */
|
|
43
45
|
[POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;
|
|
46
|
+
/**
|
|
47
|
+
* Dispatched once for each successful scan captured by a camera, external,
|
|
48
|
+
* or embedded scanner, after POS has finished handling the scan itself.
|
|
49
|
+
* Every event carries decoded `data` and its `source`.
|
|
50
|
+
*/
|
|
51
|
+
[POS_EVENT_NAMES.SCAN]: ScanEvent;
|
|
44
52
|
}
|
|
45
53
|
/**
|
|
46
54
|
* Maps POS interceptable workflow names to their corresponding `Event` types.
|
|
47
55
|
*
|
|
48
56
|
* Used as the generic type parameter for `shopify.intercept`.
|
|
49
57
|
*
|
|
50
|
-
* @
|
|
58
|
+
* @publicDocs
|
|
51
59
|
*/
|
|
52
60
|
export interface ShopifyInterceptMap {
|
|
53
61
|
[POS_INTERCEPT_NAMES.CART_VALIDATIONS]: CartValidationsEvent;
|
|
@@ -56,7 +64,7 @@ export interface ShopifyInterceptMap {
|
|
|
56
64
|
/**
|
|
57
65
|
* The data carried by a `cartvalidations` event.
|
|
58
66
|
*
|
|
59
|
-
* @
|
|
67
|
+
* @publicDocs
|
|
60
68
|
*/
|
|
61
69
|
export interface CartValidationsEventData {
|
|
62
70
|
/** A snapshot of the POS cart taken when the event was produced. */
|
|
@@ -66,15 +74,16 @@ export interface CartValidationsEventData {
|
|
|
66
74
|
* The event a `cartvalidations` interceptor receives. Carries a snapshot of
|
|
67
75
|
* the POS cart taken when the event was produced.
|
|
68
76
|
*
|
|
69
|
-
* @
|
|
77
|
+
* @publicDocs
|
|
70
78
|
*/
|
|
71
79
|
export interface CartValidationsEvent extends CartValidationsEventData {
|
|
80
|
+
/** The event name, always `'cartvalidations'`. */
|
|
72
81
|
readonly type: typeof POS_INTERCEPT_NAMES.CART_VALIDATIONS;
|
|
73
82
|
}
|
|
74
83
|
/**
|
|
75
84
|
* The kind of payment method being attempted.
|
|
76
85
|
*
|
|
77
|
-
* @
|
|
86
|
+
* @publicDocs
|
|
78
87
|
*/
|
|
79
88
|
export type InterceptedPaymentMethodType = 'cash';
|
|
80
89
|
/**
|
|
@@ -84,7 +93,7 @@ export type InterceptedPaymentMethodType = 'cash';
|
|
|
84
93
|
* disambiguates method types a shop can have several of (for example custom
|
|
85
94
|
* payment methods) as they become interceptable.
|
|
86
95
|
*
|
|
87
|
-
* @
|
|
96
|
+
* @publicDocs
|
|
88
97
|
*/
|
|
89
98
|
export interface InterceptedPaymentMethod {
|
|
90
99
|
readonly type: InterceptedPaymentMethodType;
|
|
@@ -96,105 +105,126 @@ export interface InterceptedPaymentMethod {
|
|
|
96
105
|
* attempt's payment method and amount; split payments produce one event per
|
|
97
106
|
* tender, each with its own amount.
|
|
98
107
|
*
|
|
99
|
-
* @
|
|
108
|
+
* @publicDocs
|
|
100
109
|
*/
|
|
101
110
|
export interface PaymentValidationsEvent extends PaymentValidationsEventData {
|
|
111
|
+
/** The event name, always `'paymentvalidations'`. */
|
|
102
112
|
readonly type: typeof POS_INTERCEPT_NAMES.PAYMENT_VALIDATIONS;
|
|
103
113
|
}
|
|
104
114
|
/**
|
|
105
115
|
* The data carried by a `paymentvalidations` event.
|
|
106
116
|
*
|
|
107
|
-
* @
|
|
117
|
+
* @publicDocs
|
|
108
118
|
*/
|
|
109
119
|
export interface PaymentValidationsEventData {
|
|
110
120
|
/** The payment method staff selected. */
|
|
111
121
|
readonly paymentMethod: InterceptedPaymentMethod;
|
|
112
|
-
/** The amount this tender
|
|
122
|
+
/** The cash amount received for this tender, in presentment currency. */
|
|
113
123
|
readonly amount: MoneyV2;
|
|
114
124
|
}
|
|
115
125
|
/**
|
|
116
126
|
* Targets the whole cart rather than a specific line item.
|
|
117
127
|
*
|
|
118
|
-
* @
|
|
128
|
+
* @publicDocs
|
|
119
129
|
*/
|
|
120
130
|
export type CartTarget = '$.cart';
|
|
121
131
|
/**
|
|
122
132
|
* Targets one cart line item by its `uuid` from this event's `cart` snapshot,
|
|
123
133
|
* for example `$.cart.lineItems['adfd6b06-4a24-4f5f-9f4b-ea21f4432dd4']`.
|
|
124
134
|
*
|
|
125
|
-
* @
|
|
135
|
+
* @publicDocs
|
|
126
136
|
*/
|
|
127
137
|
export type CartLineItemTarget = `$.cart.lineItems['${string}']`;
|
|
128
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* A target that a `cartvalidations` interceptor can use: the whole cart or
|
|
140
|
+
* one cart line item.
|
|
141
|
+
*
|
|
142
|
+
* @publicDocs
|
|
143
|
+
*/
|
|
129
144
|
export type CartValidationTarget = CartTarget | CartLineItemTarget;
|
|
130
145
|
/**
|
|
131
146
|
* Targets the payment attempt being intercepted.
|
|
132
147
|
*
|
|
133
|
-
* @
|
|
148
|
+
* @publicDocs
|
|
134
149
|
*/
|
|
135
150
|
export type PaymentTarget = '$.payment';
|
|
136
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* A target that a `paymentvalidations` interceptor can use. The only
|
|
153
|
+
* supported target is the payment attempt.
|
|
154
|
+
*
|
|
155
|
+
* @publicDocs
|
|
156
|
+
*/
|
|
137
157
|
export type PaymentValidationTarget = PaymentTarget;
|
|
138
158
|
/**
|
|
139
159
|
* Where a validation applies, as an enumerated token. Targets are matched
|
|
140
160
|
* as exact strings, never evaluated as JSON paths.
|
|
141
161
|
*
|
|
142
|
-
* @
|
|
162
|
+
* @publicDocs
|
|
143
163
|
*/
|
|
144
164
|
export type ValidationTarget = CartValidationTarget | PaymentValidationTarget;
|
|
145
165
|
/**
|
|
146
166
|
* Maps POS interceptable workflow names to their valid validation targets.
|
|
147
167
|
*
|
|
148
|
-
* @
|
|
168
|
+
* @publicDocs
|
|
149
169
|
*/
|
|
150
170
|
interface ValidationTargetMap {
|
|
171
|
+
/** The targets that a `cartvalidations` interceptor can return. */
|
|
151
172
|
[POS_INTERCEPT_NAMES.CART_VALIDATIONS]: CartValidationTarget;
|
|
173
|
+
/** The targets that a `paymentvalidations` interceptor can return. */
|
|
152
174
|
[POS_INTERCEPT_NAMES.PAYMENT_VALIDATIONS]: PaymentValidationTarget;
|
|
153
175
|
}
|
|
154
176
|
/**
|
|
155
177
|
* The interceptor callback for a POS interceptable workflow, keyed by the
|
|
156
178
|
* workflow name so the event and its valid validation targets stay paired.
|
|
157
179
|
*
|
|
158
|
-
* @
|
|
180
|
+
* @publicDocs
|
|
159
181
|
*/
|
|
160
182
|
export type ShopifyInterceptor<K extends keyof ShopifyInterceptMap> = (event: ShopifyInterceptMap[K]) => InterceptResult<ValidationTargetMap[K]>;
|
|
161
183
|
/**
|
|
162
|
-
* The result an interceptor returns. An empty `operations` list
|
|
163
|
-
*
|
|
184
|
+
* The result an interceptor returns. An empty `operations` list adds no
|
|
185
|
+
* findings from this interceptor and doesn't remove or override findings from
|
|
186
|
+
* other interceptors.
|
|
164
187
|
*
|
|
165
|
-
* @
|
|
188
|
+
* @publicDocs
|
|
166
189
|
*/
|
|
167
190
|
export interface InterceptResult<TTarget extends ValidationTarget = ValidationTarget> {
|
|
191
|
+
/** The operations to apply. Each operation can add one validation finding. */
|
|
168
192
|
operations: Operation<TTarget>[];
|
|
169
193
|
}
|
|
170
194
|
/**
|
|
171
195
|
* A single host operation produced by an interceptor.
|
|
172
196
|
*
|
|
173
|
-
* @
|
|
197
|
+
* @publicDocs
|
|
174
198
|
*/
|
|
175
199
|
export interface Operation<TTarget extends ValidationTarget = ValidationTarget> {
|
|
176
200
|
validationAdd?: ValidationAdd<TTarget>;
|
|
177
201
|
}
|
|
178
|
-
/**
|
|
202
|
+
/**
|
|
203
|
+
* The severity of a validation. `ERROR` can block the workflow when blocking
|
|
204
|
+
* is declared and allowed by the store. `WARNING` never blocks.
|
|
205
|
+
*
|
|
206
|
+
* @publicDocs
|
|
207
|
+
*/
|
|
179
208
|
export type ValidationLevel = 'WARNING' | 'ERROR';
|
|
180
209
|
/**
|
|
181
210
|
* Adds a validation to the workflow being intercepted.
|
|
182
211
|
*
|
|
183
|
-
* @
|
|
212
|
+
* @publicDocs
|
|
184
213
|
*/
|
|
185
214
|
export interface ValidationAdd<TTarget extends ValidationTarget = ValidationTarget> {
|
|
186
|
-
/** `ERROR`
|
|
215
|
+
/** `ERROR` creates a finding labeled `Required` only when blocking is declared and allowed by the store. Otherwise, it creates a finding labeled `Recommended`. `WARNING` always creates a finding labeled `Recommended`. */
|
|
187
216
|
level: ValidationLevel;
|
|
188
217
|
/**
|
|
189
|
-
* Stable identifier for this validation
|
|
190
|
-
*
|
|
191
|
-
*
|
|
218
|
+
* Stable identifier for this validation, namespaced per extension. Each
|
|
219
|
+
* handle must be unique within one `operations` array, even across
|
|
220
|
+
* different targets. A result that repeats a handle is rejected. To flag
|
|
221
|
+
* several line items, include the line item `uuid` in each handle.
|
|
192
222
|
*/
|
|
193
223
|
handle: string;
|
|
194
224
|
/**
|
|
195
225
|
* Locates the data the validation applies to; the host decides where it
|
|
196
226
|
* renders. Omitted or unrecognized targets fall back to the event's root
|
|
197
|
-
* scope (`$.cart` / `$.payment`)
|
|
227
|
+
* scope (`$.cart` / `$.payment`). The validation still applies, rendered
|
|
198
228
|
* less specifically.
|
|
199
229
|
*
|
|
200
230
|
* Line item uuids are only valid within the event that delivered them:
|
|
@@ -204,5 +234,5 @@ export interface ValidationAdd<TTarget extends ValidationTarget = ValidationTarg
|
|
|
204
234
|
*/
|
|
205
235
|
target?: TTarget;
|
|
206
236
|
}
|
|
207
|
-
export type { TransactionCompleteEvent, CashTrackingSessionStartEvent, CashTrackingSessionCompleteEvent, };
|
|
237
|
+
export type { TransactionCompleteEvent, CashTrackingSessionStartEvent, CashTrackingSessionCompleteEvent, ScanEvent, };
|
|
208
238
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,qCAAqC,CAAC;AAClF,OAAO,KAAK,EACV,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,qCAAqC,CAAC;AAClF,OAAO,KAAK,EACV,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,CAAC,eAAe,CAAC,oBAAoB,CAAC,EAAE,wBAAwB,CAAC;IACjE,qDAAqD;IACrD,CAAC,eAAe,CAAC,2BAA2B,CAAC,EAAE,6BAA6B,CAAC;IAC7E,2EAA2E;IAC3E,CAAC,eAAe,CA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AAY,EACV,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EAChC,SAAS,GACV,CAAC"}
|
|
@@ -27,15 +27,15 @@ export interface RenderExtensionTargets {
|
|
|
27
27
|
/**
|
|
28
28
|
* Renders a single interactive tile component on the POS home screen's smart grid. The tile appears once during home screen initialization and remains persistent until navigation occurs. Use this target for high-frequency actions, status displays, or entry points to workflows that merchants need daily.
|
|
29
29
|
*
|
|
30
|
-
* Extensions at this target can dynamically update properties like enabled state and badge values in response to cart changes or device conditions. Tiles typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows.
|
|
30
|
+
* Extensions at this target can dynamically update properties like enabled state and badge values in response to cart changes or device conditions. Tiles typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows. Tiles can also open the connected cash drawer through the Cash Drawer API.
|
|
31
31
|
*/
|
|
32
|
-
'pos.home.tile.render': RenderExtension<StandardApi<'pos.home.tile.render'> & ActionApi & CartApi, SmartGridComponents>;
|
|
32
|
+
'pos.home.tile.render': RenderExtension<StandardApi<'pos.home.tile.render'> & ActionApi & CartApi & CashDrawerApi, SmartGridComponents>;
|
|
33
33
|
/**
|
|
34
34
|
* Renders a full-screen modal interface launched from smart grid tiles. The modal appears when users tap a companion tile. Use this target for complete workflow experiences that require more space and functionality than the tile interface provides, such as multi-step processes, detailed information displays, or complex user interactions.
|
|
35
35
|
*
|
|
36
|
-
* Extensions at this target support full navigation hierarchies with multiple screens, scroll views, and interactive components to handle sophisticated workflows.
|
|
36
|
+
* Extensions at this target support full navigation hierarchies with multiple screens, scroll views, and interactive components to handle sophisticated workflows, and can open the connected cash drawer through the Cash Drawer API.
|
|
37
37
|
*/
|
|
38
|
-
'pos.home.modal.render': RenderExtension<ActionTargetApi<'pos.home.modal.render'> & CartApi, BasicComponents>;
|
|
38
|
+
'pos.home.modal.render': RenderExtension<ActionTargetApi<'pos.home.modal.render'> & CartApi & CashDrawerApi, BasicComponents>;
|
|
39
39
|
/**
|
|
40
40
|
* Renders a single interactive button component as a menu item in the post-return action menu. Use this target for post-return operations like generating return receipts, processing restocking workflows, or collecting return feedback.
|
|
41
41
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-targets.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/extension-targets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AAEzE,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,aAAa,EACb,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACd,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,gDAAgD,CAAC;AAC9F,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,+CAA+C,CAAC;AAC5F,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAC,kCAAkC,EAAC,MAAM,cAAc,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,oBAAoB,EAAE,iBAAiB,CACrC,aAAa,CAAC,oBAAoB,CAAC,EACnC,SAAS,CACV,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,sBAAsB,EAAE,eAAe,CACrC,WAAW,CAAC,sBAAsB,CAAC,GAAG,SAAS,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"extension-targets.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/extension-targets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AAEzE,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,OAAO,EACP,eAAe,EACf,WAAW,EACX,aAAa,EACb,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACd,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,gDAAgD,CAAC;AAC9F,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,+CAA+C,CAAC;AAC5F,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAClF,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAC,kCAAkC,EAAC,MAAM,cAAc,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,oBAAoB,EAAE,iBAAiB,CACrC,aAAa,CAAC,oBAAoB,CAAC,EACnC,SAAS,CACV,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,sBAAsB,EAAE,eAAe,CACrC,WAAW,CAAC,sBAAsB,CAAC,GAAG,SAAS,GAAG,OAA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,wBAAwB,CACzB,CAAC;IACF;;;;OAIG;IACH,wCAAwC,EAAE,eAAe,CACvD,WAAW,CAAC,wCAAwC,CAAC,GACnD,UAAU,GACV,OAAO,GACP,aAAa,CAAC,wBAAwB,CAAC,EACzC,oBAAoB,CACrB,CAAC;IACF;;;;OAIG;IACH,2CAA2C,EAAE,eAAe,CAC1D,WAAW,CAAC,2CAA2C,CAAC,GACtD,UAAU,GACV,eAAe,GACf,aAAa,CAAC,2BAA2B,CAAC,EAC5C,oBAAoB,CACrB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBACf,SAAQ,sBAAsB,EAC5B,oBAAoB;CAAG;AAE3B;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,sBAAsB,CAAC;AACjE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,oBAAoB,CAAC;AAC7D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,gBAAgB,CAAC"}
|
|
@@ -31,8 +31,6 @@ export interface BackgroundShopifyGlobal extends ShopifyGlobal {
|
|
|
31
31
|
/**
|
|
32
32
|
* Register an interceptor for a POS host workflow that can be blocked.
|
|
33
33
|
* Returns a function that unregisters the interceptor.
|
|
34
|
-
*
|
|
35
|
-
* @private
|
|
36
34
|
*/
|
|
37
35
|
intercept<K extends keyof ShopifyInterceptMap>(type: K, interceptor: ShopifyInterceptor<K>): () => void;
|
|
38
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/point-of-sale/globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB;;;;;GAKG;AACH,MAAM,WAAW,aAAa;CAAG;AAEjC;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAwB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