@shopify/ui-extensions 2024.10.2 → 2025.1.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.
Files changed (591) hide show
  1. package/build/cjs/surfaces/checkout/components/ClipboardItem/ClipboardItem.js +16 -0
  2. package/build/cjs/surfaces/checkout.js +2 -0
  3. package/build/cjs/surfaces/customer-account.js +2 -0
  4. package/build/cjs/surfaces/point-of-sale/{components/Image/Image.js → render/components/Box/Box.js} +2 -2
  5. package/build/cjs/surfaces/point-of-sale/render/components/Image/Image.js +15 -0
  6. package/build/cjs/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.js +9 -0
  7. package/build/cjs/surfaces/point-of-sale/{components → render/components}/Stack/Stack.js +5 -0
  8. package/build/cjs/surfaces/point-of-sale/render/components/TextField/TextField.js +9 -0
  9. package/build/cjs/surfaces/point-of-sale.js +37 -35
  10. package/build/esm/surfaces/checkout/components/ClipboardItem/ClipboardItem.mjs +12 -0
  11. package/build/esm/surfaces/checkout.mjs +1 -0
  12. package/build/esm/surfaces/customer-account.mjs +1 -0
  13. package/build/esm/surfaces/point-of-sale/render/components/Box/Box.mjs +5 -0
  14. package/build/esm/surfaces/point-of-sale/render/components/Image/Image.mjs +11 -0
  15. package/build/esm/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.mjs +5 -0
  16. package/build/esm/surfaces/point-of-sale/{components → render/components}/Stack/Stack.mjs +5 -0
  17. package/build/esm/surfaces/point-of-sale/render/components/TextField/TextField.mjs +5 -0
  18. package/build/esm/surfaces/point-of-sale.mjs +35 -34
  19. package/build/esnext/surfaces/checkout/components/ClipboardItem/ClipboardItem.esnext +12 -0
  20. package/build/esnext/surfaces/checkout.esnext +1 -0
  21. package/build/esnext/surfaces/customer-account.esnext +1 -0
  22. package/build/esnext/surfaces/point-of-sale/render/components/Box/Box.esnext +5 -0
  23. package/build/esnext/surfaces/point-of-sale/render/components/Image/Image.esnext +11 -0
  24. package/build/esnext/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.esnext +5 -0
  25. package/build/esnext/surfaces/point-of-sale/{components → render/components}/Stack/Stack.esnext +5 -0
  26. package/build/esnext/surfaces/point-of-sale/render/components/TextField/TextField.esnext +5 -0
  27. package/build/esnext/surfaces/point-of-sale.esnext +35 -34
  28. package/build/ts/shared.d.ts +7 -3
  29. package/build/ts/shared.d.ts.map +1 -1
  30. package/build/ts/surfaces/admin/api/action/action.d.ts +10 -0
  31. package/build/ts/surfaces/admin/api/action/action.d.ts.map +1 -1
  32. package/build/ts/surfaces/admin/api/action/action.doc.d.ts.map +1 -1
  33. package/build/ts/surfaces/admin/api/block/block.d.ts +6 -1
  34. package/build/ts/surfaces/admin/api/block/block.d.ts.map +1 -1
  35. package/build/ts/surfaces/admin/api/block/block.doc.d.ts.map +1 -1
  36. package/build/ts/surfaces/admin/api/checkout-rules/launch-options.d.ts.map +1 -1
  37. package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts +1 -2
  38. package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts.map +1 -1
  39. package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.doc.d.ts.map +1 -1
  40. package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts +1 -3
  41. package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts.map +1 -1
  42. package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.d.ts.map +1 -1
  43. package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts +12 -0
  44. package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts.map +1 -0
  45. package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.d.ts +4 -0
  46. package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.d.ts.map +1 -0
  47. package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts +28 -0
  48. package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts.map +1 -0
  49. package/build/ts/surfaces/admin/api/discount-function-settings/metafields.d.ts +25 -0
  50. package/build/ts/surfaces/admin/api/discount-function-settings/metafields.d.ts.map +1 -0
  51. package/build/ts/surfaces/admin/api/picker/picker.d.ts +81 -0
  52. package/build/ts/surfaces/admin/api/picker/picker.d.ts.map +1 -0
  53. package/build/ts/surfaces/admin/api/picker/picker.doc.d.ts +4 -0
  54. package/build/ts/surfaces/admin/api/picker/picker.doc.d.ts.map +1 -0
  55. package/build/ts/surfaces/admin/api/print-action/print-action.d.ts +10 -0
  56. package/build/ts/surfaces/admin/api/print-action/print-action.d.ts.map +1 -1
  57. package/build/ts/surfaces/admin/api/print-action/print-action.doc.d.ts.map +1 -1
  58. package/build/ts/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.d.ts +11 -0
  59. package/build/ts/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.d.ts.map +1 -0
  60. package/build/ts/surfaces/admin/api/resource-picker/resource-picker.doc.d.ts +4 -0
  61. package/build/ts/surfaces/admin/api/resource-picker/resource-picker.doc.d.ts.map +1 -0
  62. package/build/ts/surfaces/admin/api/shared.d.ts +1 -0
  63. package/build/ts/surfaces/admin/api/shared.d.ts.map +1 -1
  64. package/build/ts/surfaces/admin/api/should-render/should-render.d.ts +10 -0
  65. package/build/ts/surfaces/admin/api/should-render/should-render.d.ts.map +1 -0
  66. package/build/ts/surfaces/admin/api/should-render/should-render.doc.d.ts +4 -0
  67. package/build/ts/surfaces/admin/api/should-render/should-render.doc.d.ts.map +1 -0
  68. package/build/ts/surfaces/admin/api.d.ts +1 -0
  69. package/build/ts/surfaces/admin/api.d.ts.map +1 -1
  70. package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.d.ts +2 -4
  71. package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.d.ts.map +1 -1
  72. package/build/ts/surfaces/admin/components/InternalCustomerSegmentTemplate/InternalCustomerSegmentTemplate.d.ts +1 -1
  73. package/build/ts/surfaces/admin/components/InternalCustomerSegmentTemplate/InternalCustomerSegmentTemplate.d.ts.map +1 -1
  74. package/build/ts/surfaces/admin/components/shared/index.d.ts +1 -1
  75. package/build/ts/surfaces/admin/components/shared/index.d.ts.map +1 -1
  76. package/build/ts/surfaces/admin/extension-targets.d.ts +134 -2
  77. package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
  78. package/build/ts/surfaces/admin/globals.d.ts +3 -0
  79. package/build/ts/surfaces/admin/globals.d.ts.map +1 -1
  80. package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +1 -1
  81. package/build/ts/surfaces/checkout/api/docs.d.ts +2 -0
  82. package/build/ts/surfaces/checkout/api/docs.d.ts.map +1 -1
  83. package/build/ts/surfaces/checkout/api/standard/standard.d.ts +27 -11
  84. package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
  85. package/build/ts/surfaces/checkout/components/Badge/Badge.d.ts +1 -1
  86. package/build/ts/surfaces/checkout/components/Button/Button.d.ts +3 -3
  87. package/build/ts/surfaces/checkout/components/Button/Button.d.ts.map +1 -1
  88. package/build/ts/surfaces/checkout/components/Chat/Chat.d.ts +2 -2
  89. package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.d.ts +30 -0
  90. package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.d.ts.map +1 -0
  91. package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.doc.d.ts +4 -0
  92. package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.doc.d.ts.map +1 -0
  93. package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts +2 -2
  94. package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts.map +1 -1
  95. package/build/ts/surfaces/checkout/components/Link/Link.d.ts +2 -2
  96. package/build/ts/surfaces/checkout/components/Link/Link.d.ts.map +1 -1
  97. package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts +2 -2
  98. package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts.map +1 -1
  99. package/build/ts/surfaces/checkout/components/QRCode/QRCode.doc.d.ts.map +1 -1
  100. package/build/ts/surfaces/checkout/components/shared.d.ts +21 -0
  101. package/build/ts/surfaces/checkout/components/shared.d.ts.map +1 -1
  102. package/build/ts/surfaces/checkout/components.d.ts +2 -0
  103. package/build/ts/surfaces/checkout/components.d.ts.map +1 -1
  104. package/build/ts/surfaces/checkout/globals.d.ts +1 -3
  105. package/build/ts/surfaces/checkout/globals.d.ts.map +1 -1
  106. package/build/ts/surfaces/checkout/helper.docs.d.ts.map +1 -1
  107. package/build/ts/surfaces/checkout/targets.d.ts +0 -66
  108. package/build/ts/surfaces/checkout/targets.d.ts.map +1 -1
  109. package/build/ts/surfaces/checkout.d.ts +2 -2
  110. package/build/ts/surfaces/checkout.d.ts.map +1 -1
  111. package/build/ts/surfaces/customer-account/api/standard-api/standard-api.d.ts +1 -1
  112. package/build/ts/surfaces/customer-account/components/shared-checkout-components.d.ts +1 -1
  113. package/build/ts/surfaces/customer-account/components/shared-checkout-components.d.ts.map +1 -1
  114. package/build/ts/surfaces/customer-account/globals.d.ts +1 -3
  115. package/build/ts/surfaces/customer-account/globals.d.ts.map +1 -1
  116. package/build/ts/surfaces/point-of-sale/api.d.ts +23 -23
  117. package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
  118. package/build/ts/surfaces/point-of-sale/components.d.ts +76 -71
  119. package/build/ts/surfaces/point-of-sale/components.d.ts.map +1 -1
  120. package/build/ts/surfaces/point-of-sale/globals.d.ts +1 -3
  121. package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
  122. package/build/ts/surfaces/point-of-sale/input.d.ts +3 -0
  123. package/build/ts/surfaces/point-of-sale/input.d.ts.map +1 -0
  124. package/build/ts/surfaces/point-of-sale/intent.d.ts +2 -0
  125. package/build/ts/surfaces/point-of-sale/intent.d.ts.map +1 -0
  126. package/build/ts/surfaces/point-of-sale/render/api/action-api/action-api.d.ts.map +1 -0
  127. package/build/ts/surfaces/point-of-sale/render/api/action-target-api/action-target-api.d.ts.map +1 -0
  128. package/build/ts/surfaces/point-of-sale/{api → render/api}/cart-api/cart-api.d.ts +10 -9
  129. package/build/ts/surfaces/point-of-sale/render/api/cart-api/cart-api.d.ts.map +1 -0
  130. package/build/ts/surfaces/point-of-sale/render/api/connectivity-api/connectivity-api.d.ts.map +1 -0
  131. package/build/ts/surfaces/point-of-sale/render/api/customer-api/customer-api.d.ts.map +1 -0
  132. package/build/ts/surfaces/point-of-sale/render/api/device-api/device-api.d.ts.map +1 -0
  133. package/build/ts/surfaces/point-of-sale/render/api/draft-order-api/draft-order-api.d.ts.map +1 -0
  134. package/build/ts/surfaces/point-of-sale/render/api/locale-api/locale-api.d.ts.map +1 -0
  135. package/build/ts/surfaces/point-of-sale/render/api/navigation-api/navigation-api.d.ts.map +1 -0
  136. package/build/ts/surfaces/point-of-sale/render/api/order-api/order-api.d.ts.map +1 -0
  137. package/build/ts/surfaces/point-of-sale/render/api/print-api/print-api.d.ts +18 -0
  138. package/build/ts/surfaces/point-of-sale/render/api/print-api/print-api.d.ts.map +1 -0
  139. package/build/ts/surfaces/point-of-sale/render/api/product-api/product-api.d.ts.map +1 -0
  140. package/build/ts/surfaces/point-of-sale/{api → render/api}/product-search-api/product-search-api.d.ts +3 -3
  141. package/build/ts/surfaces/point-of-sale/render/api/product-search-api/product-search-api.d.ts.map +1 -0
  142. package/build/ts/surfaces/point-of-sale/render/api/scanner-api/scanner-api.d.ts.map +1 -0
  143. package/build/ts/surfaces/point-of-sale/{api → render/api}/session-api/session-api.d.ts +1 -1
  144. package/build/ts/surfaces/point-of-sale/render/api/session-api/session-api.d.ts.map +1 -0
  145. package/build/ts/surfaces/point-of-sale/render/api/standard/standard-api.d.ts +13 -0
  146. package/build/ts/surfaces/point-of-sale/render/api/standard/standard-api.d.ts.map +1 -0
  147. package/build/ts/surfaces/point-of-sale/render/api/toast-api/toast-api.d.ts.map +1 -0
  148. package/build/ts/surfaces/point-of-sale/render/components/Badge/Badge.d.ts.map +1 -0
  149. package/build/ts/surfaces/point-of-sale/render/components/Banner/Banner.d.ts.map +1 -0
  150. package/build/ts/surfaces/point-of-sale/render/components/Box/Box.d.ts +9 -0
  151. package/build/ts/surfaces/point-of-sale/render/components/Box/Box.d.ts.map +1 -0
  152. package/build/ts/surfaces/point-of-sale/render/components/Button/Button.d.ts.map +1 -0
  153. package/build/ts/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.d.ts.map +1 -0
  154. package/build/ts/surfaces/point-of-sale/render/components/DateField/DateField.d.ts.map +1 -0
  155. package/build/ts/surfaces/point-of-sale/render/components/DatePicker/DatePicker.d.ts.map +1 -0
  156. package/build/ts/surfaces/point-of-sale/render/components/Dialog/Dialog.d.ts.map +1 -0
  157. package/build/ts/surfaces/point-of-sale/render/components/EmailField/EmailField.d.ts.map +1 -0
  158. package/build/ts/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.d.ts +0 -9
  159. package/build/ts/surfaces/point-of-sale/render/components/FormattedTextField/FormattedTextField.d.ts.map +1 -0
  160. package/build/ts/surfaces/point-of-sale/render/components/Icon/Icon.d.ts.map +1 -0
  161. package/build/ts/surfaces/point-of-sale/render/components/Image/Image.d.ts +25 -0
  162. package/build/ts/surfaces/point-of-sale/render/components/Image/Image.d.ts.map +1 -0
  163. package/build/ts/surfaces/point-of-sale/{components → render/components}/List/List.d.ts +0 -6
  164. package/build/ts/surfaces/point-of-sale/render/components/List/List.d.ts.map +1 -0
  165. package/build/ts/surfaces/point-of-sale/render/components/Navigator/Navigator.d.ts.map +1 -0
  166. package/build/ts/surfaces/point-of-sale/render/components/NumberField/NumberField.d.ts.map +1 -0
  167. package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlock.d.ts.map +1 -0
  168. package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.d.ts.map +1 -0
  169. package/build/ts/surfaces/point-of-sale/render/components/PinPad/PinPad.d.ts.map +1 -0
  170. package/build/ts/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.d.ts +12 -0
  171. package/build/ts/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.d.ts.map +1 -0
  172. package/build/ts/surfaces/point-of-sale/render/components/RadioButtonList/RadioButtonList.d.ts.map +1 -0
  173. package/build/ts/surfaces/point-of-sale/render/components/Screen/Screen.d.ts.map +1 -0
  174. package/build/ts/surfaces/point-of-sale/render/components/ScrollView/ScrollView.d.ts.map +1 -0
  175. package/build/ts/surfaces/point-of-sale/render/components/SearchBar/SearchBar.d.ts.map +1 -0
  176. package/build/ts/surfaces/point-of-sale/render/components/Section/Section.d.ts.map +1 -0
  177. package/build/ts/surfaces/point-of-sale/render/components/SectionHeader/SectionHeader.d.ts.map +1 -0
  178. package/build/ts/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
  179. package/build/ts/surfaces/point-of-sale/render/components/Selectable/Selectable.d.ts.map +1 -0
  180. package/build/ts/surfaces/point-of-sale/render/components/Stack/Stack.d.ts +102 -0
  181. package/build/ts/surfaces/point-of-sale/render/components/Stack/Stack.d.ts.map +1 -0
  182. package/build/ts/surfaces/point-of-sale/render/components/Stepper/Stepper.d.ts.map +1 -0
  183. package/build/ts/surfaces/point-of-sale/render/components/Text/Text.d.ts.map +1 -0
  184. package/build/ts/surfaces/point-of-sale/render/components/TextArea/TextArea.d.ts.map +1 -0
  185. package/build/ts/surfaces/point-of-sale/{components → render/components}/TextField/TextField.d.ts +1 -10
  186. package/build/ts/surfaces/point-of-sale/render/components/TextField/TextField.d.ts.map +1 -0
  187. package/build/ts/surfaces/point-of-sale/render/components/Tile/Tile.d.ts.map +1 -0
  188. package/build/ts/surfaces/point-of-sale/render/components/TimeField/TimeField.d.ts.map +1 -0
  189. package/build/ts/surfaces/point-of-sale/render/components/TimePicker/TimePicker.d.ts.map +1 -0
  190. package/build/ts/surfaces/point-of-sale/render/components/shared/BaseTextField.d.ts.map +1 -0
  191. package/build/ts/surfaces/point-of-sale/render/components/shared/InputField.d.ts.map +1 -0
  192. package/build/ts/surfaces/point-of-sale/render/components/shared/auto-capitalization-type.d.ts.map +1 -0
  193. package/build/ts/surfaces/point-of-sale/render/components/shared/box.d.ts +117 -0
  194. package/build/ts/surfaces/point-of-sale/render/components/shared/box.d.ts.map +1 -0
  195. package/build/ts/surfaces/point-of-sale/{components/Spacing/Spacing.d.ts → render/components/shared/deprecated-types.d.ts} +2 -1
  196. package/build/ts/surfaces/point-of-sale/render/components/shared/deprecated-types.d.ts.map +1 -0
  197. package/build/ts/surfaces/point-of-sale/render/components/shared/inner-layouts.d.ts +28 -0
  198. package/build/ts/surfaces/point-of-sale/render/components/shared/inner-layouts.d.ts.map +1 -0
  199. package/build/ts/surfaces/point-of-sale/render/components/shared/sizes.d.ts +5 -0
  200. package/build/ts/surfaces/point-of-sale/render/components/shared/sizes.d.ts.map +1 -0
  201. package/build/ts/surfaces/point-of-sale/run/input/BaseInput.d.ts +8 -0
  202. package/build/ts/surfaces/point-of-sale/run/input/BaseInput.d.ts.map +1 -0
  203. package/build/ts/surfaces/point-of-sale/run/intent/BaseIntent.d.ts +9 -0
  204. package/build/ts/surfaces/point-of-sale/run/intent/BaseIntent.d.ts.map +1 -0
  205. package/build/ts/surfaces/point-of-sale/targets.d.ts +8 -8
  206. package/build/ts/surfaces/point-of-sale/targets.d.ts.map +1 -1
  207. package/build/ts/surfaces/point-of-sale/{api/types → types}/cart.d.ts +1 -4
  208. package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -0
  209. package/build/ts/surfaces/point-of-sale/{api/types → types}/country-code.d.ts.map +1 -1
  210. package/build/ts/surfaces/point-of-sale/types/device.d.ts +15 -0
  211. package/build/ts/surfaces/point-of-sale/types/device.d.ts.map +1 -0
  212. package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts.map +1 -0
  213. package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts.map +1 -0
  214. package/build/ts/surfaces/point-of-sale/types/product.d.ts.map +1 -0
  215. package/build/ts/surfaces/point-of-sale/{api/types → types}/session.d.ts +5 -0
  216. package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -0
  217. package/build/ts/surfaces/point-of-sale.d.ts +2 -0
  218. package/build/ts/surfaces/point-of-sale.d.ts.map +1 -1
  219. package/build/tsconfig.tsbuildinfo +1 -1
  220. package/package.json +1 -1
  221. package/src/shared.ts +46 -1
  222. package/src/surfaces/admin/api/action/action.doc.ts +1 -0
  223. package/src/surfaces/admin/api/action/action.ts +12 -0
  224. package/src/surfaces/admin/api/block/block.doc.ts +1 -0
  225. package/src/surfaces/admin/api/block/block.ts +7 -1
  226. package/src/surfaces/admin/api/checkout-rules/launch-options.ts +0 -1
  227. package/src/surfaces/admin/api/checkout-rules/metafields.ts +1 -46
  228. package/src/surfaces/admin/api/checkout-rules/validation-settings.doc.ts +1 -0
  229. package/src/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.ts +1 -0
  230. package/src/surfaces/admin/api/customer-segment-template/customer-segment-template.ts +1 -6
  231. package/src/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.ts +27 -0
  232. package/src/surfaces/admin/api/discount-function-settings/discount-function-settings.ts +15 -0
  233. package/src/surfaces/admin/api/discount-function-settings/launch-options.ts +29 -0
  234. package/src/surfaces/admin/api/discount-function-settings/metafields.ts +31 -0
  235. package/src/surfaces/admin/api/picker/examples/direct-api.js +73 -0
  236. package/src/surfaces/admin/api/picker/examples/disabled.js +16 -0
  237. package/src/surfaces/admin/api/picker/examples/minimal.js +16 -0
  238. package/src/surfaces/admin/api/picker/examples/multiple-limit.js +21 -0
  239. package/src/surfaces/admin/api/picker/examples/multiple-true.js +21 -0
  240. package/src/surfaces/admin/api/picker/examples/preselected.js +16 -0
  241. package/src/surfaces/admin/api/picker/examples/template-picker.js +37 -0
  242. package/src/surfaces/admin/api/picker/picker.doc.ts +113 -0
  243. package/src/surfaces/admin/api/picker/picker.ts +83 -0
  244. package/src/surfaces/admin/api/print-action/print-action.doc.ts +1 -0
  245. package/src/surfaces/admin/api/print-action/print-action.ts +12 -0
  246. package/src/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.ts +10 -0
  247. package/src/surfaces/admin/api/resource-picker/examples/action.js +4 -0
  248. package/src/surfaces/admin/api/resource-picker/examples/collection-picker.js +1 -0
  249. package/src/surfaces/admin/api/resource-picker/examples/filter-query.js +6 -0
  250. package/src/surfaces/admin/api/resource-picker/examples/filters.js +9 -0
  251. package/src/surfaces/admin/api/resource-picker/examples/multiple-limited.js +4 -0
  252. package/src/surfaces/admin/api/resource-picker/examples/multiple-unlimited.js +4 -0
  253. package/src/surfaces/admin/api/resource-picker/examples/product-picker.js +3 -0
  254. package/src/surfaces/admin/api/resource-picker/examples/product-variant-picker.js +1 -0
  255. package/src/surfaces/admin/api/resource-picker/examples/query.js +4 -0
  256. package/src/surfaces/admin/api/resource-picker/examples/selection-ids.js +16 -0
  257. package/src/surfaces/admin/api/resource-picker/examples/selection.js +7 -0
  258. package/src/surfaces/admin/api/resource-picker/resource-picker.doc.ts +163 -0
  259. package/src/surfaces/admin/api/shared.ts +44 -0
  260. package/src/surfaces/admin/api/should-render/should-render.doc.ts +20 -0
  261. package/src/surfaces/admin/api/should-render/should-render.ts +11 -0
  262. package/src/surfaces/admin/api/standard/standard.doc.ts +1 -1
  263. package/src/surfaces/admin/api.ts +1 -0
  264. package/src/surfaces/admin/components/AdminBlock/AdminBlock.ts +2 -4
  265. package/src/surfaces/admin/components/InternalCustomerSegmentTemplate/InternalCustomerSegmentTemplate.ts +1 -0
  266. package/src/surfaces/admin/components/shared/index.ts +1 -1
  267. package/src/surfaces/admin/extension-targets.ts +260 -1
  268. package/src/surfaces/admin/globals.ts +7 -0
  269. package/src/surfaces/checkout/api/address-autocomplete/standard.ts +1 -1
  270. package/src/surfaces/checkout/api/docs.ts +3 -0
  271. package/src/surfaces/checkout/api/standard/standard.ts +30 -12
  272. package/src/surfaces/checkout/components/Badge/Badge.ts +1 -1
  273. package/src/surfaces/checkout/components/Button/Button.ts +3 -1
  274. package/src/surfaces/checkout/components/Chat/AppBridge.ts +4 -4
  275. package/src/surfaces/checkout/components/Chat/Chat.doc.ts +2 -2
  276. package/src/surfaces/checkout/components/Chat/Chat.ts +2 -2
  277. package/src/surfaces/checkout/components/Chat/examples/app-bridge-communication.example.js +4 -1
  278. package/src/surfaces/checkout/components/Chat/examples/app-bridge-resize.example.html +2 -2
  279. package/src/surfaces/checkout/components/Chat/examples/chat-custom-properties-css.example.css +2 -4
  280. package/src/surfaces/checkout/components/Chat/examples/include-app-bridge.example.html +1 -1
  281. package/src/surfaces/checkout/components/ClipboardItem/ClipboardItem.doc.ts +74 -0
  282. package/src/surfaces/checkout/components/ClipboardItem/ClipboardItem.ts +34 -0
  283. package/src/surfaces/checkout/components/ClipboardItem/examples/basic-clipboarditem.example.ts +21 -0
  284. package/src/surfaces/checkout/components/Icon/Icon.ts +2 -0
  285. package/src/surfaces/checkout/components/Link/Link.ts +3 -1
  286. package/src/surfaces/checkout/components/Pressable/Pressable.ts +2 -0
  287. package/src/surfaces/checkout/components/QRCode/QRCode.doc.ts +13 -2
  288. package/src/surfaces/checkout/components/QRCode/examples/basic-qrcode.example.ts +12 -1
  289. package/src/surfaces/checkout/components/shared.ts +22 -0
  290. package/src/surfaces/checkout/components.ts +3 -0
  291. package/src/surfaces/checkout/globals.ts +4 -6
  292. package/src/surfaces/checkout/helper.docs.ts +18 -0
  293. package/src/surfaces/checkout/style/examples/defaultstyle.example.tsx +1 -1
  294. package/src/surfaces/checkout/style/examples/hiding.example.tsx +1 -1
  295. package/src/surfaces/checkout/style/examples/simplecondition.example.tsx +1 -1
  296. package/src/surfaces/checkout/targets.ts +0 -133
  297. package/src/surfaces/checkout.ts +6 -1
  298. package/src/surfaces/customer-account/api/standard-api/standard-api.ts +1 -1
  299. package/src/surfaces/customer-account/components/shared-checkout-components.ts +2 -0
  300. package/src/surfaces/customer-account/globals.ts +4 -6
  301. package/src/surfaces/point-of-sale/api.ts +34 -28
  302. package/src/surfaces/point-of-sale/components.ts +107 -73
  303. package/src/surfaces/point-of-sale/globals.ts +4 -6
  304. package/src/surfaces/point-of-sale/input.ts +3 -0
  305. package/src/surfaces/point-of-sale/intent.ts +1 -0
  306. package/src/surfaces/point-of-sale/{api → render/api}/cart-api/cart-api.ts +12 -14
  307. package/src/surfaces/point-of-sale/render/api/print-api/print-api.ts +18 -0
  308. package/src/surfaces/point-of-sale/{api → render/api}/product-search-api/product-search-api.ts +3 -3
  309. package/src/surfaces/point-of-sale/{api → render/api}/session-api/session-api.ts +1 -1
  310. package/src/surfaces/point-of-sale/render/api/standard/standard-api.ts +17 -0
  311. package/src/surfaces/point-of-sale/render/components/Box/Box.ts +6 -0
  312. package/src/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.ts +0 -9
  313. package/src/surfaces/point-of-sale/render/components/Image/Image.ts +31 -0
  314. package/src/surfaces/point-of-sale/{components → render/components}/List/List.ts +0 -6
  315. package/src/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.ts +13 -0
  316. package/src/surfaces/point-of-sale/render/components/Stack/Stack.ts +122 -0
  317. package/src/surfaces/point-of-sale/{components → render/components}/TextField/TextField.ts +2 -13
  318. package/src/surfaces/point-of-sale/render/components/shared/box.ts +131 -0
  319. package/src/surfaces/point-of-sale/{components/Spacing/Spacing.ts → render/components/shared/deprecated-types.ts} +16 -0
  320. package/src/surfaces/point-of-sale/render/components/shared/inner-layouts.ts +35 -0
  321. package/src/surfaces/point-of-sale/render/components/shared/sizes.ts +25 -0
  322. package/src/surfaces/point-of-sale/run/input/BaseInput.ts +8 -0
  323. package/src/surfaces/point-of-sale/run/intent/BaseIntent.ts +8 -0
  324. package/src/surfaces/point-of-sale/targets.ts +8 -17
  325. package/src/surfaces/point-of-sale/{api/types → types}/cart.ts +5 -4
  326. package/src/surfaces/point-of-sale/types/device.ts +14 -0
  327. package/src/surfaces/point-of-sale/{api/types → types}/session.ts +7 -0
  328. package/src/surfaces/point-of-sale.ts +2 -0
  329. package/build/cjs/surfaces/point-of-sale/components/ActionItem/ActionItem.js +0 -16
  330. package/build/cjs/surfaces/point-of-sale/components/TextField/TextField.js +0 -15
  331. package/build/esm/surfaces/point-of-sale/components/ActionItem/ActionItem.mjs +0 -12
  332. package/build/esm/surfaces/point-of-sale/components/Image/Image.mjs +0 -5
  333. package/build/esm/surfaces/point-of-sale/components/TextField/TextField.mjs +0 -11
  334. package/build/esnext/surfaces/point-of-sale/components/ActionItem/ActionItem.esnext +0 -12
  335. package/build/esnext/surfaces/point-of-sale/components/Image/Image.esnext +0 -5
  336. package/build/esnext/surfaces/point-of-sale/components/TextField/TextField.esnext +0 -11
  337. package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts.map +0 -1
  338. package/build/ts/surfaces/point-of-sale/api/action-target-api/action-target-api.d.ts.map +0 -1
  339. package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +0 -1
  340. package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts.map +0 -1
  341. package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts.map +0 -1
  342. package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts.map +0 -1
  343. package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts.map +0 -1
  344. package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts.map +0 -1
  345. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +0 -1
  346. package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts.map +0 -1
  347. package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts.map +0 -1
  348. package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts.map +0 -1
  349. package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts.map +0 -1
  350. package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts.map +0 -1
  351. package/build/ts/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.d.ts +0 -17
  352. package/build/ts/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.d.ts.map +0 -1
  353. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts +0 -12
  354. package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts.map +0 -1
  355. package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts.map +0 -1
  356. package/build/ts/surfaces/point-of-sale/api/types/cart.d.ts.map +0 -1
  357. package/build/ts/surfaces/point-of-sale/api/types/multiple-resource-result.d.ts.map +0 -1
  358. package/build/ts/surfaces/point-of-sale/api/types/paginated-result.d.ts.map +0 -1
  359. package/build/ts/surfaces/point-of-sale/api/types/product.d.ts.map +0 -1
  360. package/build/ts/surfaces/point-of-sale/api/types/session.d.ts.map +0 -1
  361. package/build/ts/surfaces/point-of-sale/components/ActionItem/ActionItem.d.ts +0 -24
  362. package/build/ts/surfaces/point-of-sale/components/ActionItem/ActionItem.d.ts.map +0 -1
  363. package/build/ts/surfaces/point-of-sale/components/Badge/Badge.d.ts.map +0 -1
  364. package/build/ts/surfaces/point-of-sale/components/Banner/Banner.d.ts.map +0 -1
  365. package/build/ts/surfaces/point-of-sale/components/Button/Button.d.ts.map +0 -1
  366. package/build/ts/surfaces/point-of-sale/components/CameraScanner/CameraScanner.d.ts.map +0 -1
  367. package/build/ts/surfaces/point-of-sale/components/DateField/DateField.d.ts.map +0 -1
  368. package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.d.ts.map +0 -1
  369. package/build/ts/surfaces/point-of-sale/components/Dialog/Dialog.d.ts.map +0 -1
  370. package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.d.ts.map +0 -1
  371. package/build/ts/surfaces/point-of-sale/components/FormattedTextField/FormattedTextField.d.ts.map +0 -1
  372. package/build/ts/surfaces/point-of-sale/components/Icon/Icon.d.ts.map +0 -1
  373. package/build/ts/surfaces/point-of-sale/components/Image/Image.d.ts +0 -12
  374. package/build/ts/surfaces/point-of-sale/components/Image/Image.d.ts.map +0 -1
  375. package/build/ts/surfaces/point-of-sale/components/List/List.d.ts.map +0 -1
  376. package/build/ts/surfaces/point-of-sale/components/Navigator/Navigator.d.ts.map +0 -1
  377. package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.d.ts.map +0 -1
  378. package/build/ts/surfaces/point-of-sale/components/POSBlock/POSBlock.d.ts.map +0 -1
  379. package/build/ts/surfaces/point-of-sale/components/POSBlock/POSBlockRow.d.ts.map +0 -1
  380. package/build/ts/surfaces/point-of-sale/components/PinPad/PinPad.d.ts.map +0 -1
  381. package/build/ts/surfaces/point-of-sale/components/RadioButtonList/RadioButtonList.d.ts.map +0 -1
  382. package/build/ts/surfaces/point-of-sale/components/Screen/Screen.d.ts.map +0 -1
  383. package/build/ts/surfaces/point-of-sale/components/ScrollView/ScrollView.d.ts.map +0 -1
  384. package/build/ts/surfaces/point-of-sale/components/SearchBar/SearchBar.d.ts.map +0 -1
  385. package/build/ts/surfaces/point-of-sale/components/Section/Section.d.ts.map +0 -1
  386. package/build/ts/surfaces/point-of-sale/components/SectionHeader/SectionHeader.d.ts.map +0 -1
  387. package/build/ts/surfaces/point-of-sale/components/SegmentedControl/SegmentedControl.d.ts.map +0 -1
  388. package/build/ts/surfaces/point-of-sale/components/Selectable/Selectable.d.ts.map +0 -1
  389. package/build/ts/surfaces/point-of-sale/components/Spacing/Spacing.d.ts.map +0 -1
  390. package/build/ts/surfaces/point-of-sale/components/Stack/Stack.d.ts +0 -44
  391. package/build/ts/surfaces/point-of-sale/components/Stack/Stack.d.ts.map +0 -1
  392. package/build/ts/surfaces/point-of-sale/components/Stepper/Stepper.d.ts.map +0 -1
  393. package/build/ts/surfaces/point-of-sale/components/Text/Text.d.ts.map +0 -1
  394. package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.d.ts.map +0 -1
  395. package/build/ts/surfaces/point-of-sale/components/TextField/TextField.d.ts.map +0 -1
  396. package/build/ts/surfaces/point-of-sale/components/Tile/Tile.d.ts.map +0 -1
  397. package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.d.ts.map +0 -1
  398. package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.d.ts.map +0 -1
  399. package/build/ts/surfaces/point-of-sale/components/shared/BaseTextField.d.ts.map +0 -1
  400. package/build/ts/surfaces/point-of-sale/components/shared/InputField.d.ts.map +0 -1
  401. package/build/ts/surfaces/point-of-sale/components/shared/auto-capitalization-type.d.ts.map +0 -1
  402. package/src/surfaces/checkout/components/Chat/examples/chat-media-query.example.css +0 -9
  403. package/src/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.ts +0 -17
  404. package/src/surfaces/point-of-sale/api/standard/standard-api.ts +0 -15
  405. package/src/surfaces/point-of-sale/components/ActionItem/ActionItem.ts +0 -24
  406. package/src/surfaces/point-of-sale/components/Image/Image.ts +0 -10
  407. package/src/surfaces/point-of-sale/components/Stack/Stack.ts +0 -63
  408. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Badge/Badge.js +0 -0
  409. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Banner/Banner.js +0 -0
  410. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Button/Button.js +0 -0
  411. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.js +0 -0
  412. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/DateField/DateField.js +0 -0
  413. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.js +0 -0
  414. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.js +0 -0
  415. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.js +0 -0
  416. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.js +0 -0
  417. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Icon/Icon.js +0 -0
  418. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/List/List.js +0 -0
  419. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.js +0 -0
  420. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.js +0 -0
  421. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.js +0 -0
  422. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.js +0 -0
  423. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.js +0 -0
  424. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.js +0 -0
  425. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Screen/Screen.js +0 -0
  426. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.js +0 -0
  427. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.js +0 -0
  428. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Section/Section.js +0 -0
  429. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.js +0 -0
  430. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.js +0 -0
  431. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.js +0 -0
  432. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.js +0 -0
  433. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Text/Text.js +0 -0
  434. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.js +0 -0
  435. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Tile/Tile.js +0 -0
  436. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.js +0 -0
  437. /package/build/cjs/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.js +0 -0
  438. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Badge/Badge.mjs +0 -0
  439. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Banner/Banner.mjs +0 -0
  440. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Button/Button.mjs +0 -0
  441. /package/build/esm/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.mjs +0 -0
  442. /package/build/esm/surfaces/point-of-sale/{components → render/components}/DateField/DateField.mjs +0 -0
  443. /package/build/esm/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.mjs +0 -0
  444. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.mjs +0 -0
  445. /package/build/esm/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.mjs +0 -0
  446. /package/build/esm/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.mjs +0 -0
  447. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Icon/Icon.mjs +0 -0
  448. /package/build/esm/surfaces/point-of-sale/{components → render/components}/List/List.mjs +0 -0
  449. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.mjs +0 -0
  450. /package/build/esm/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.mjs +0 -0
  451. /package/build/esm/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.mjs +0 -0
  452. /package/build/esm/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.mjs +0 -0
  453. /package/build/esm/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.mjs +0 -0
  454. /package/build/esm/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.mjs +0 -0
  455. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Screen/Screen.mjs +0 -0
  456. /package/build/esm/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.mjs +0 -0
  457. /package/build/esm/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.mjs +0 -0
  458. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Section/Section.mjs +0 -0
  459. /package/build/esm/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.mjs +0 -0
  460. /package/build/esm/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.mjs +0 -0
  461. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.mjs +0 -0
  462. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.mjs +0 -0
  463. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Text/Text.mjs +0 -0
  464. /package/build/esm/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.mjs +0 -0
  465. /package/build/esm/surfaces/point-of-sale/{components → render/components}/Tile/Tile.mjs +0 -0
  466. /package/build/esm/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.mjs +0 -0
  467. /package/build/esm/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.mjs +0 -0
  468. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Badge/Badge.esnext +0 -0
  469. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Banner/Banner.esnext +0 -0
  470. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Button/Button.esnext +0 -0
  471. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.esnext +0 -0
  472. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/DateField/DateField.esnext +0 -0
  473. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.esnext +0 -0
  474. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.esnext +0 -0
  475. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.esnext +0 -0
  476. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.esnext +0 -0
  477. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Icon/Icon.esnext +0 -0
  478. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/List/List.esnext +0 -0
  479. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.esnext +0 -0
  480. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.esnext +0 -0
  481. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.esnext +0 -0
  482. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.esnext +0 -0
  483. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.esnext +0 -0
  484. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.esnext +0 -0
  485. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Screen/Screen.esnext +0 -0
  486. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.esnext +0 -0
  487. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.esnext +0 -0
  488. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Section/Section.esnext +0 -0
  489. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.esnext +0 -0
  490. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.esnext +0 -0
  491. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.esnext +0 -0
  492. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.esnext +0 -0
  493. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Text/Text.esnext +0 -0
  494. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.esnext +0 -0
  495. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Tile/Tile.esnext +0 -0
  496. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.esnext +0 -0
  497. /package/build/esnext/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.esnext +0 -0
  498. /package/build/ts/surfaces/point-of-sale/{api → render/api}/action-api/action-api.d.ts +0 -0
  499. /package/build/ts/surfaces/point-of-sale/{api → render/api}/action-target-api/action-target-api.d.ts +0 -0
  500. /package/build/ts/surfaces/point-of-sale/{api → render/api}/connectivity-api/connectivity-api.d.ts +0 -0
  501. /package/build/ts/surfaces/point-of-sale/{api → render/api}/customer-api/customer-api.d.ts +0 -0
  502. /package/build/ts/surfaces/point-of-sale/{api → render/api}/device-api/device-api.d.ts +0 -0
  503. /package/build/ts/surfaces/point-of-sale/{api → render/api}/draft-order-api/draft-order-api.d.ts +0 -0
  504. /package/build/ts/surfaces/point-of-sale/{api → render/api}/locale-api/locale-api.d.ts +0 -0
  505. /package/build/ts/surfaces/point-of-sale/{api → render/api}/navigation-api/navigation-api.d.ts +0 -0
  506. /package/build/ts/surfaces/point-of-sale/{api → render/api}/order-api/order-api.d.ts +0 -0
  507. /package/build/ts/surfaces/point-of-sale/{api → render/api}/product-api/product-api.d.ts +0 -0
  508. /package/build/ts/surfaces/point-of-sale/{api → render/api}/scanner-api/scanner-api.d.ts +0 -0
  509. /package/build/ts/surfaces/point-of-sale/{api → render/api}/toast-api/toast-api.d.ts +0 -0
  510. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Badge/Badge.d.ts +0 -0
  511. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Banner/Banner.d.ts +0 -0
  512. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Button/Button.d.ts +0 -0
  513. /package/build/ts/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.d.ts +0 -0
  514. /package/build/ts/surfaces/point-of-sale/{components → render/components}/DateField/DateField.d.ts +0 -0
  515. /package/build/ts/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.d.ts +0 -0
  516. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.d.ts +0 -0
  517. /package/build/ts/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.d.ts +0 -0
  518. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Icon/Icon.d.ts +0 -0
  519. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.d.ts +0 -0
  520. /package/build/ts/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.d.ts +0 -0
  521. /package/build/ts/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.d.ts +0 -0
  522. /package/build/ts/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.d.ts +0 -0
  523. /package/build/ts/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.d.ts +0 -0
  524. /package/build/ts/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.d.ts +0 -0
  525. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Screen/Screen.d.ts +0 -0
  526. /package/build/ts/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.d.ts +0 -0
  527. /package/build/ts/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.d.ts +0 -0
  528. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Section/Section.d.ts +0 -0
  529. /package/build/ts/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.d.ts +0 -0
  530. /package/build/ts/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.d.ts +0 -0
  531. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.d.ts +0 -0
  532. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.d.ts +0 -0
  533. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Text/Text.d.ts +0 -0
  534. /package/build/ts/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.d.ts +0 -0
  535. /package/build/ts/surfaces/point-of-sale/{components → render/components}/Tile/Tile.d.ts +0 -0
  536. /package/build/ts/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.d.ts +0 -0
  537. /package/build/ts/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.d.ts +0 -0
  538. /package/build/ts/surfaces/point-of-sale/{components → render/components}/shared/BaseTextField.d.ts +0 -0
  539. /package/build/ts/surfaces/point-of-sale/{components → render/components}/shared/InputField.d.ts +0 -0
  540. /package/build/ts/surfaces/point-of-sale/{components → render/components}/shared/auto-capitalization-type.d.ts +0 -0
  541. /package/build/ts/surfaces/point-of-sale/{api/types → types}/country-code.d.ts +0 -0
  542. /package/build/ts/surfaces/point-of-sale/{api/types → types}/multiple-resource-result.d.ts +0 -0
  543. /package/build/ts/surfaces/point-of-sale/{api/types → types}/paginated-result.d.ts +0 -0
  544. /package/build/ts/surfaces/point-of-sale/{api/types → types}/product.d.ts +0 -0
  545. /package/src/surfaces/point-of-sale/{api → render/api}/action-api/action-api.ts +0 -0
  546. /package/src/surfaces/point-of-sale/{api → render/api}/action-target-api/action-target-api.ts +0 -0
  547. /package/src/surfaces/point-of-sale/{api → render/api}/connectivity-api/connectivity-api.ts +0 -0
  548. /package/src/surfaces/point-of-sale/{api → render/api}/customer-api/customer-api.ts +0 -0
  549. /package/src/surfaces/point-of-sale/{api → render/api}/device-api/device-api.ts +0 -0
  550. /package/src/surfaces/point-of-sale/{api → render/api}/draft-order-api/draft-order-api.ts +0 -0
  551. /package/src/surfaces/point-of-sale/{api → render/api}/locale-api/locale-api.ts +0 -0
  552. /package/src/surfaces/point-of-sale/{api → render/api}/navigation-api/navigation-api.ts +0 -0
  553. /package/src/surfaces/point-of-sale/{api/order-api/order-api.tsx → render/api/order-api/order-api.ts} +0 -0
  554. /package/src/surfaces/point-of-sale/{api → render/api}/product-api/product-api.ts +0 -0
  555. /package/src/surfaces/point-of-sale/{api → render/api}/scanner-api/scanner-api.ts +0 -0
  556. /package/src/surfaces/point-of-sale/{api → render/api}/toast-api/toast-api.ts +0 -0
  557. /package/src/surfaces/point-of-sale/{components → render/components}/Badge/Badge.ts +0 -0
  558. /package/src/surfaces/point-of-sale/{components → render/components}/Banner/Banner.ts +0 -0
  559. /package/src/surfaces/point-of-sale/{components → render/components}/Button/Button.ts +0 -0
  560. /package/src/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.ts +0 -0
  561. /package/src/surfaces/point-of-sale/{components → render/components}/DateField/DateField.ts +0 -0
  562. /package/src/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.ts +0 -0
  563. /package/src/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.ts +0 -0
  564. /package/src/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.ts +0 -0
  565. /package/src/surfaces/point-of-sale/{components → render/components}/Icon/Icon.ts +0 -0
  566. /package/src/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.ts +0 -0
  567. /package/src/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.ts +0 -0
  568. /package/src/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.ts +0 -0
  569. /package/src/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.ts +0 -0
  570. /package/src/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.ts +0 -0
  571. /package/src/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.ts +0 -0
  572. /package/src/surfaces/point-of-sale/{components → render/components}/Screen/Screen.ts +0 -0
  573. /package/src/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.ts +0 -0
  574. /package/src/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.ts +0 -0
  575. /package/src/surfaces/point-of-sale/{components → render/components}/Section/Section.ts +0 -0
  576. /package/src/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.ts +0 -0
  577. /package/src/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.ts +0 -0
  578. /package/src/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.ts +0 -0
  579. /package/src/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.ts +0 -0
  580. /package/src/surfaces/point-of-sale/{components → render/components}/Text/Text.ts +0 -0
  581. /package/src/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.ts +0 -0
  582. /package/src/surfaces/point-of-sale/{components → render/components}/Tile/Tile.ts +0 -0
  583. /package/src/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.ts +0 -0
  584. /package/src/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.ts +0 -0
  585. /package/src/surfaces/point-of-sale/{components → render/components}/shared/BaseTextField.ts +0 -0
  586. /package/src/surfaces/point-of-sale/{components → render/components}/shared/InputField.ts +0 -0
  587. /package/src/surfaces/point-of-sale/{components → render/components}/shared/auto-capitalization-type.ts +0 -0
  588. /package/src/surfaces/point-of-sale/{api/types → types}/country-code.ts +0 -0
  589. /package/src/surfaces/point-of-sale/{api/types → types}/multiple-resource-result.ts +0 -0
  590. /package/src/surfaces/point-of-sale/{api/types → types}/paginated-result.ts +0 -0
  591. /package/src/surfaces/point-of-sale/{api/types → types}/product.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/ui-extensions",
3
- "version": "2024.10.2",
3
+ "version": "2025.1.0",
4
4
  "scripts": {
5
5
  "docs:admin": "bash ./docs/surfaces/admin/build-docs.sh",
6
6
  "gen-docs:admin": "bash ./docs/surfaces/admin/create-doc-files.sh \"admin\"",
package/src/shared.ts CHANGED
@@ -23,6 +23,7 @@ export type ApiVersion =
23
23
  | '2024-04'
24
24
  | '2024-07'
25
25
  | '2024-10'
26
+ | '2025-01'
26
27
  | 'unstable';
27
28
 
28
29
  /**
@@ -38,7 +39,7 @@ export type ApiVersion =
38
39
  *
39
40
  * * [`collect_buyer_consent.customer_privacy`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#collect-buyer-consent): the extension can register buyer consent decisions that will be honored on Shopify-managed services.
40
41
  *
41
- * * `iframe.sources`: the extension can embed an external URL in an iframe.
42
+ * * [`iframe.sources`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#iframe): the extension can embed an external URL in an iframe.
42
43
  */
43
44
 
44
45
  export type Capability =
@@ -858,6 +859,49 @@ export type CountryCode =
858
859
  | 'ZW'
859
860
  | 'ZZ';
860
861
 
862
+ // For instructions on how to update this list see: https://github.com/Shopify/checkout-web/pull/39534
863
+ /**
864
+ * A union of keys for the localized fields that are required by certain countries.
865
+ */
866
+ export type LocalizedFieldKey =
867
+ | 'SHIPPING_CREDENTIAL_BR'
868
+ | 'SHIPPING_CREDENTIAL_CL'
869
+ | 'SHIPPING_CREDENTIAL_CN'
870
+ | 'SHIPPING_CREDENTIAL_CO'
871
+ | 'SHIPPING_CREDENTIAL_CR'
872
+ | 'SHIPPING_CREDENTIAL_EC'
873
+ | 'SHIPPING_CREDENTIAL_ES'
874
+ | 'SHIPPING_CREDENTIAL_GT'
875
+ | 'SHIPPING_CREDENTIAL_ID'
876
+ | 'SHIPPING_CREDENTIAL_KR'
877
+ | 'SHIPPING_CREDENTIAL_MY'
878
+ | 'SHIPPING_CREDENTIAL_MX'
879
+ | 'SHIPPING_CREDENTIAL_PE'
880
+ | 'SHIPPING_CREDENTIAL_PT'
881
+ | 'SHIPPING_CREDENTIAL_PY'
882
+ | 'SHIPPING_CREDENTIAL_TR'
883
+ | 'SHIPPING_CREDENTIAL_TW'
884
+ | 'SHIPPING_CREDENTIAL_TYPE_CO'
885
+ | 'TAX_CREDENTIAL_BR'
886
+ | 'TAX_CREDENTIAL_CL'
887
+ | 'TAX_CREDENTIAL_CO'
888
+ | 'TAX_CREDENTIAL_CR'
889
+ | 'TAX_CREDENTIAL_EC'
890
+ | 'TAX_CREDENTIAL_ES'
891
+ | 'TAX_CREDENTIAL_GT'
892
+ | 'TAX_CREDENTIAL_ID'
893
+ | 'TAX_CREDENTIAL_IT'
894
+ | 'TAX_CREDENTIAL_MX'
895
+ | 'TAX_CREDENTIAL_MY'
896
+ | 'TAX_CREDENTIAL_PE'
897
+ | 'TAX_CREDENTIAL_PT'
898
+ | 'TAX_CREDENTIAL_PY'
899
+ | 'TAX_CREDENTIAL_TR'
900
+ | 'TAX_CREDENTIAL_TYPE_CO'
901
+ | 'TAX_CREDENTIAL_TYPE_MX'
902
+ | 'TAX_CREDENTIAL_USE_MX'
903
+ | 'TAX_EMAIL_IT';
904
+
861
905
  /**
862
906
  * Union of supported storefront API versions
863
907
  */
@@ -872,6 +916,7 @@ export type StorefrontApiVersion =
872
916
  | '2024-04'
873
917
  | '2024-07'
874
918
  | '2024-10'
919
+ | '2025-01'
875
920
  | 'unstable';
876
921
 
877
922
  /**
@@ -14,6 +14,7 @@ const data: ReferenceEntityTemplateSchema = {
14
14
  },
15
15
  ],
16
16
  category: 'API',
17
+ subCategory: 'Target APIs',
17
18
  related: [],
18
19
  };
19
20
 
@@ -1,6 +1,8 @@
1
1
  import type {StandardApi} from '../standard/standard';
2
2
  import type {ExtensionTarget as AnyExtensionTarget} from '../../extension-targets';
3
3
  import type {Data} from '../shared';
4
+ import type {ResourcePickerApi} from '../resource-picker/resource-picker';
5
+ import type {PickerApi} from '../picker/picker';
4
6
 
5
7
  export interface ActionExtensionApi<ExtensionTarget extends AnyExtensionTarget>
6
8
  extends StandardApi<ExtensionTarget> {
@@ -13,4 +15,14 @@ export interface ActionExtensionApi<ExtensionTarget extends AnyExtensionTarget>
13
15
  * Information about the currently viewed or selected items.
14
16
  */
15
17
  data: Data;
18
+
19
+ /**
20
+ * Renders the [Resource Picker](resource-picker), allowing users to select a resource for the extension to use as part of its flow.
21
+ */
22
+ resourcePicker: ResourcePickerApi;
23
+
24
+ /**
25
+ * Renders a custom [Picker](picker) dialog allowing users to select values from a list.
26
+ */
27
+ picker: PickerApi;
16
28
  }
@@ -14,6 +14,7 @@ const data: ReferenceEntityTemplateSchema = {
14
14
  },
15
15
  ],
16
16
  category: 'API',
17
+ subCategory: 'Target APIs',
17
18
  related: [],
18
19
  };
19
20
 
@@ -2,6 +2,7 @@ import type {StandardApi} from '../standard/standard';
2
2
  import type {ExtensionTarget as AnyExtensionTarget} from '../../extension-targets';
3
3
  import type {Data} from '../shared';
4
4
  import type {ResourcePickerApi} from '../resource-picker/resource-picker';
5
+ import type {PickerApi} from '../picker/picker';
5
6
 
6
7
  export interface Navigation {
7
8
  /**
@@ -26,7 +27,12 @@ export interface BlockExtensionApi<ExtensionTarget extends AnyExtensionTarget>
26
27
  navigation: Navigation;
27
28
 
28
29
  /**
29
- * Renders the [Resource Picker](/docs/api/app-bridge-library/apis/resource-picker), allowing users to select a resource for the extension to use as part of its flow.
30
+ * Renders the [Resource Picker](resource-picker), allowing users to select a resource for the extension to use as part of its flow.
30
31
  */
31
32
  resourcePicker: ResourcePickerApi;
33
+
34
+ /**
35
+ * Renders a custom [Picker](picker) dialog allowing users to select values from a list.
36
+ */
37
+ picker: PickerApi;
32
38
  }
@@ -6,7 +6,6 @@ interface Metafield {
6
6
  value: string;
7
7
  type: string;
8
8
  }
9
-
10
9
  interface Validation {
11
10
  /**
12
11
  * the validation's gid when active in a shop
@@ -1,49 +1,4 @@
1
- const supportedDefinitionTypes = [
2
- 'boolean',
3
- 'collection_reference',
4
- 'color',
5
- 'date',
6
- 'date_time',
7
- 'dimension',
8
- 'file_reference',
9
- 'json',
10
- 'metaobject_reference',
11
- 'mixed_reference',
12
- 'money',
13
- 'multi_line_text_field',
14
- 'number_decimal',
15
- 'number_integer',
16
- 'page_reference',
17
- 'product_reference',
18
- 'rating',
19
- 'rich_text_field',
20
- 'single_line_text_field',
21
- 'product_taxonomy_value_reference',
22
- 'url',
23
- 'variant_reference',
24
- 'volume',
25
- 'weight',
26
- 'list.collection_reference',
27
- 'list.color',
28
- 'list.date',
29
- 'list.date_time',
30
- 'list.dimension',
31
- 'list.file_reference',
32
- 'list.metaobject_reference',
33
- 'list.mixed_reference',
34
- 'list.number_decimal',
35
- 'list.number_integer',
36
- 'list.page_reference',
37
- 'list.product_reference',
38
- 'list.rating',
39
- 'list.single_line_text_field',
40
- 'list.url',
41
- 'list.variant_reference',
42
- 'list.volume',
43
- 'list.weight',
44
- ] as const;
45
-
46
- export type SupportedDefinitionType = (typeof supportedDefinitionTypes)[number];
1
+ import {SupportedDefinitionType} from '../shared';
47
2
 
48
3
  interface MetafieldUpdateChange {
49
4
  type: 'updateMetafield';
@@ -19,6 +19,7 @@ const data: ReferenceEntityTemplateSchema = {
19
19
  },
20
20
  ],
21
21
  category: 'API',
22
+ subCategory: 'Target APIs',
22
23
  related: [],
23
24
  };
24
25
 
@@ -14,6 +14,7 @@ const data: ReferenceEntityTemplateSchema = {
14
14
  },
15
15
  ],
16
16
  category: 'API',
17
+ subCategory: 'Target APIs',
17
18
  related: [],
18
19
  };
19
20
 
@@ -2,16 +2,11 @@ import type {StandardApi} from '../standard/standard';
2
2
  import type {I18n} from '../../../../api';
3
3
  import type {ExtensionTarget as AnyExtensionTarget} from '../../extension-targets';
4
4
 
5
- /* List of enabled query language features during a progressive rollout */
6
- type CustomerSegmentationFeature =
7
- /* Enables templates using filters only available when B2B is enabled. For example: companies IS NOT NULL */
8
- 'b2bEnabled';
9
-
10
5
  export interface CustomerSegmentTemplateApi<
11
6
  ExtensionTarget extends AnyExtensionTarget,
12
7
  > extends StandardApi<ExtensionTarget> {
13
8
  /* Utilities for translating content according to the current `localization` of the admin. */
14
9
  i18n: I18n;
15
10
  /** @private */
16
- __enabledFeatures: CustomerSegmentationFeature[];
11
+ __enabledFeatures: string[];
17
12
  }
@@ -0,0 +1,27 @@
1
+ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
2
+
3
+ const data: ReferenceEntityTemplateSchema = {
4
+ name: 'Discount Function Settings API',
5
+ description:
6
+ 'This API is available to Discount Function Settings extensions. Refer to the [tutorial](/docs/apps/build/discounts/build-ui-extension) for more information. Note that the [`FunctionSettings`](/docs/api/admin-extensions/components/forms/functionsettings) component is required to build Discount Function Settings extensions.',
7
+ isVisualComponent: false,
8
+ type: 'API',
9
+ definitions: [
10
+ {
11
+ title: 'applyMetafieldChange',
12
+ description: 'Applies a change to the discount function settings.',
13
+ type: 'ApplyMetafieldChange',
14
+ },
15
+ {
16
+ title: 'data',
17
+ description:
18
+ 'The object exposed to the extension that contains the discount function settings.',
19
+ type: 'DiscountFunctionSettingsData',
20
+ },
21
+ ],
22
+ category: 'API',
23
+ subCategory: 'Target APIs',
24
+ related: [],
25
+ };
26
+
27
+ export default data;
@@ -0,0 +1,15 @@
1
+ import type {StandardApi} from '../standard/standard';
2
+ import type {ExtensionTarget as AnyExtensionTarget} from '../../extension-targets';
3
+
4
+ import {ApplyMetafieldChange} from './metafields';
5
+ import {DiscountFunctionSettingsData} from './launch-options';
6
+
7
+ export interface DiscountFunctionSettingsApi<
8
+ ExtensionTarget extends AnyExtensionTarget,
9
+ > extends StandardApi<ExtensionTarget> {
10
+ /**
11
+ * Applies a change to the discount function settings.
12
+ */
13
+ applyMetafieldChange: ApplyMetafieldChange;
14
+ data: DiscountFunctionSettingsData;
15
+ }
@@ -0,0 +1,29 @@
1
+ interface Metafield {
2
+ description?: string;
3
+ id: string;
4
+ namespace: string;
5
+ key: string;
6
+ value: string;
7
+ type: string;
8
+ }
9
+
10
+ export enum DiscountClass {
11
+ Product = 'PRODUCT',
12
+ Order = 'ORDER',
13
+ Shipping = 'SHIPPING',
14
+ }
15
+
16
+ interface Discount {
17
+ /**
18
+ * the discount's gid
19
+ */
20
+ id: string;
21
+ }
22
+
23
+ /**
24
+ * The object that exposes the validation with its settings.
25
+ */
26
+ export interface DiscountFunctionSettingsData {
27
+ id: Discount;
28
+ metafields: Metafield[];
29
+ }
@@ -0,0 +1,31 @@
1
+ import {SupportedDefinitionType} from '../shared';
2
+
3
+ interface MetafieldUpdateChange {
4
+ type: 'updateMetafield';
5
+ key: string;
6
+ namespace?: string;
7
+ value: string | number;
8
+ valueType?: SupportedDefinitionType;
9
+ }
10
+
11
+ interface MetafieldRemoveChange {
12
+ type: 'removeMetafield';
13
+ key: string;
14
+ namespace: string;
15
+ }
16
+
17
+ type MetafieldChange = MetafieldUpdateChange | MetafieldRemoveChange;
18
+ interface MetafieldChangeResultError {
19
+ type: 'error';
20
+ message: string;
21
+ }
22
+ interface MetafieldChangeSuccess {
23
+ type: 'success';
24
+ }
25
+ type MetafieldChangeResult =
26
+ | MetafieldChangeSuccess
27
+ | MetafieldChangeResultError;
28
+
29
+ export type ApplyMetafieldChange = (
30
+ change: MetafieldChange,
31
+ ) => Promise<MetafieldChangeResult>;
@@ -0,0 +1,73 @@
1
+ const r = await fetch('shopify:admin/api/graphql.json', {
2
+ method: 'POST',
3
+ body: JSON.stringify({
4
+ query: `
5
+ query GetOrders($first: Int!) {
6
+ orders(first: $first) {
7
+ edges {
8
+ node {
9
+ id
10
+ name
11
+ customer {
12
+ displayName
13
+ }
14
+ originalTotalPriceSet {
15
+ shopMoney {
16
+ amount
17
+ }
18
+ }
19
+ displayFulfillmentStatus
20
+ displayFinancialStatus
21
+ unpaid
22
+ }
23
+ }
24
+ }
25
+ }
26
+ `,
27
+ variables: {first: 10},
28
+ }),
29
+ });
30
+ const {data} = await r.json();
31
+ const orderData = data.orders.edges;
32
+
33
+ const selected = await picker({
34
+ heading: 'Select orders',
35
+ multiple: true,
36
+ headers: [
37
+ {title: 'Order'},
38
+ {title: 'Customer'},
39
+ {title: 'Total', type: 'number'},
40
+ ],
41
+ items: orderData.map((order) => {
42
+ const {
43
+ id,
44
+ name,
45
+ customer,
46
+ originalTotalPriceSet: {shopMoney},
47
+ displayFulfillmentStatus,
48
+ displayFinancialStatus,
49
+ } = order.node;
50
+
51
+ return {
52
+ id,
53
+ heading: name,
54
+ data: [customer.displayName, `$${shopMoney.amount}`],
55
+ badges: [
56
+ {
57
+ content: displayFulfillmentStatus,
58
+ tone: displayFulfillmentStatus === 'FULFILLED' ? '' : 'attention',
59
+ progress:
60
+ displayFulfillmentStatus === 'FULFILLED'
61
+ ? 'complete'
62
+ : 'incomplete',
63
+ },
64
+ {
65
+ content: displayFinancialStatus,
66
+ tone: displayFinancialStatus === 'PENDING' ? 'warning' : '',
67
+ progress:
68
+ displayFinancialStatus === 'PENDING' ? 'incomplete' : 'complete',
69
+ },
70
+ ],
71
+ };
72
+ }),
73
+ });
@@ -0,0 +1,16 @@
1
+ const pickerInstance = await picker({
2
+ heading: 'Disabled items',
3
+ items: [
4
+ {
5
+ id: '1',
6
+ heading: 'Item 1',
7
+ disabled: true,
8
+ },
9
+ {
10
+ id: '2',
11
+ heading: 'Item 2',
12
+ },
13
+ ],
14
+ });
15
+
16
+ const selected = await pickerInstance.selected;
@@ -0,0 +1,16 @@
1
+ const pickerInstance = await picker({
2
+ heading: 'Select an item',
3
+ headers: [{title: 'Main heading'}],
4
+ items: [
5
+ {
6
+ id: '1',
7
+ heading: 'Item 1',
8
+ },
9
+ {
10
+ id: '2',
11
+ heading: 'Item 2',
12
+ },
13
+ ],
14
+ });
15
+
16
+ const selected = await pickerInstance.selected;
@@ -0,0 +1,21 @@
1
+ const pickerInstance = await picker({
2
+ heading: 'Select items (up to 2)',
3
+ multiple: 2,
4
+ headers: [{title: 'Main heading'}],
5
+ items: [
6
+ {
7
+ id: '1',
8
+ heading: 'Item 1',
9
+ },
10
+ {
11
+ id: '2',
12
+ heading: 'Item 2',
13
+ },
14
+ {
15
+ id: '3',
16
+ heading: 'Item 3',
17
+ },
18
+ ],
19
+ });
20
+
21
+ const selected = await pickerInstance.selected;
@@ -0,0 +1,21 @@
1
+ const pickerInstance = await picker({
2
+ heading: 'Select items',
3
+ multiple: true,
4
+ headers: [{title: 'Main heading'}],
5
+ items: [
6
+ {
7
+ id: '1',
8
+ heading: 'Item 1',
9
+ },
10
+ {
11
+ id: '2',
12
+ heading: 'Item 2',
13
+ },
14
+ {
15
+ id: '3',
16
+ heading: 'Item 3',
17
+ },
18
+ ],
19
+ });
20
+
21
+ const selected = await pickerInstance.selected;
@@ -0,0 +1,16 @@
1
+ const pickerInstance = await picker({
2
+ heading: 'Preselected items',
3
+ items: [
4
+ {
5
+ id: '1',
6
+ heading: 'Item 1',
7
+ selected: true,
8
+ },
9
+ {
10
+ id: '2',
11
+ heading: 'Item 2',
12
+ },
13
+ ],
14
+ });
15
+
16
+ const selected = await pickerInstance.selected;
@@ -0,0 +1,37 @@
1
+ const {picker} = useApi(TARGET);
2
+
3
+ const pickerInstance = await picker({
4
+ heading: 'Select a template',
5
+ multiple: false,
6
+ headers: [
7
+ {title: 'Templates'},
8
+ {title: 'Created by'},
9
+ {title: 'Times used', type: 'number'},
10
+ ],
11
+ items: [
12
+ {
13
+ id: '1',
14
+ heading: 'Full width, 1 column',
15
+ data: ['Karine Ruby', '0'],
16
+ badges: [{content: 'Draft', tone: 'info'}, {content: 'Marketing'}],
17
+ },
18
+ {
19
+ id: '2',
20
+ heading: 'Large graphic, 3 column',
21
+ data: ['Russell Winfield', '5'],
22
+ badges: [
23
+ {content: 'Published', tone: 'success'},
24
+ {content: 'New feature'},
25
+ ],
26
+ selected: true,
27
+ },
28
+ {
29
+ id: '3',
30
+ heading: 'Promo header, 2 column',
31
+ data: ['Russel Winfield', '10'],
32
+ badges: [{content: 'Published', tone: 'success'}],
33
+ },
34
+ ],
35
+ });
36
+
37
+ const selected = await pickerInstance.selected;
@@ -0,0 +1,113 @@
1
+ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
2
+
3
+ const data: ReferenceEntityTemplateSchema = {
4
+ name: 'Picker',
5
+ overviewPreviewDescription: 'Opens a Picker in your app',
6
+ description: `The Picker API provides a search-based interface to help users find and select one or more resources that you provide, such as product reviews, email templates, or subscription options, and then returns the selected resource ids to your extension.
7
+
8
+ > Tip:
9
+ > If you are picking products, product variants, or collections, you should use the [Resource Picker](resource-picker) API instead.`,
10
+ isVisualComponent: true,
11
+ category: 'API',
12
+ thumbnail: 'picker.png',
13
+ requires:
14
+ 'an Admin [block](/docs/api/admin-extensions/unstable/extension-targets#block-locations), [action](/docs/api/admin-extensions/unstable/extension-targets#action-locations), or [print](/docs/api/admin-extensions/unstable/extension-targets#print-locations) extension.',
15
+ defaultExample: {
16
+ image: 'picker.png',
17
+ codeblock: {
18
+ title: 'Picker',
19
+ tabs: [
20
+ {
21
+ code: './examples/template-picker.js',
22
+ language: 'js',
23
+ },
24
+ ],
25
+ },
26
+ },
27
+ definitions: [
28
+ {
29
+ title: 'picker',
30
+ description: `The \`picker\` API is a function that accepts an options argument for configuration and returns a Promise that resolves to the picker instance once the picker modal is opened.`,
31
+ type: 'PickerApi',
32
+ },
33
+ ],
34
+ examples: {
35
+ description: 'Pickers with different options',
36
+ examples: [
37
+ {
38
+ description:
39
+ "Minimal required fields picker configuration.\n\nIf you don't provide the required options (`heading` and `items`), the picker will not open and an error will be logged.",
40
+ codeblock: {
41
+ title: 'Simple picker',
42
+ tabs: [
43
+ {
44
+ code: './examples/minimal.js',
45
+ language: 'js',
46
+ },
47
+ ],
48
+ },
49
+ },
50
+ {
51
+ description:
52
+ 'Setting a specific number of selectable items. In this example, the user can select up to 2 items.',
53
+ codeblock: {
54
+ title: 'Limited selectable items',
55
+ tabs: [
56
+ {
57
+ code: './examples/multiple-limit.js',
58
+ language: 'js',
59
+ },
60
+ ],
61
+ },
62
+ },
63
+ {
64
+ description: 'Setting an unlimited number of selectable items.',
65
+ codeblock: {
66
+ title: 'Unlimited selectable items',
67
+ tabs: [
68
+ {
69
+ code: './examples/multiple-true.js',
70
+ language: 'js',
71
+ },
72
+ ],
73
+ },
74
+ },
75
+ {
76
+ description:
77
+ 'Providing preselected items in the picker. These will be selected when the picker opens but can be deselected by the user.',
78
+ codeblock: {
79
+ title: 'Preselected items',
80
+ tabs: [
81
+ {
82
+ code: './examples/preselected.js',
83
+ language: 'js',
84
+ },
85
+ ],
86
+ },
87
+ },
88
+ {
89
+ description:
90
+ 'Providing disabled items in the picker. These will be disabled and cannot be selected by the user.',
91
+ codeblock: {
92
+ title: 'Disabled items',
93
+ tabs: [
94
+ {
95
+ code: './examples/disabled.js',
96
+ language: 'js',
97
+ },
98
+ ],
99
+ },
100
+ },
101
+ ],
102
+ },
103
+ related: [
104
+ {
105
+ name: 'Resource Picker',
106
+ subtitle: 'APIs',
107
+ url: 'resource-picker',
108
+ type: 'pickaxe-3',
109
+ },
110
+ ],
111
+ };
112
+
113
+ export default data;