@shopify/ui-extensions 2026.10.0-rc.9 → 2026.10.1

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