@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.
- package/build/cjs/surfaces/checkout/components/ClipboardItem/ClipboardItem.js +16 -0
- package/build/cjs/surfaces/checkout.js +2 -0
- package/build/cjs/surfaces/customer-account.js +2 -0
- package/build/cjs/surfaces/point-of-sale/{components/Image/Image.js → render/components/Box/Box.js} +2 -2
- package/build/cjs/surfaces/point-of-sale/render/components/Image/Image.js +15 -0
- package/build/cjs/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.js +9 -0
- package/build/cjs/surfaces/point-of-sale/{components → render/components}/Stack/Stack.js +5 -0
- package/build/cjs/surfaces/point-of-sale/render/components/TextField/TextField.js +9 -0
- package/build/cjs/surfaces/point-of-sale.js +37 -35
- package/build/esm/surfaces/checkout/components/ClipboardItem/ClipboardItem.mjs +12 -0
- package/build/esm/surfaces/checkout.mjs +1 -0
- package/build/esm/surfaces/customer-account.mjs +1 -0
- package/build/esm/surfaces/point-of-sale/render/components/Box/Box.mjs +5 -0
- package/build/esm/surfaces/point-of-sale/render/components/Image/Image.mjs +11 -0
- package/build/esm/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.mjs +5 -0
- package/build/esm/surfaces/point-of-sale/{components → render/components}/Stack/Stack.mjs +5 -0
- package/build/esm/surfaces/point-of-sale/render/components/TextField/TextField.mjs +5 -0
- package/build/esm/surfaces/point-of-sale.mjs +35 -34
- package/build/esnext/surfaces/checkout/components/ClipboardItem/ClipboardItem.esnext +12 -0
- package/build/esnext/surfaces/checkout.esnext +1 -0
- package/build/esnext/surfaces/customer-account.esnext +1 -0
- package/build/esnext/surfaces/point-of-sale/render/components/Box/Box.esnext +5 -0
- package/build/esnext/surfaces/point-of-sale/render/components/Image/Image.esnext +11 -0
- package/build/esnext/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.esnext +5 -0
- package/build/esnext/surfaces/point-of-sale/{components → render/components}/Stack/Stack.esnext +5 -0
- package/build/esnext/surfaces/point-of-sale/render/components/TextField/TextField.esnext +5 -0
- package/build/esnext/surfaces/point-of-sale.esnext +35 -34
- package/build/ts/shared.d.ts +7 -3
- package/build/ts/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/action/action.d.ts +10 -0
- package/build/ts/surfaces/admin/api/action/action.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/action/action.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/block/block.d.ts +6 -1
- package/build/ts/surfaces/admin/api/block/block.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/block/block.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/launch-options.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts +1 -2
- package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts +1 -3
- package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts +12 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts +28 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/launch-options.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/metafields.d.ts +25 -0
- package/build/ts/surfaces/admin/api/discount-function-settings/metafields.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/picker/picker.d.ts +81 -0
- package/build/ts/surfaces/admin/api/picker/picker.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/picker/picker.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/picker/picker.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/print-action/print-action.d.ts +10 -0
- package/build/ts/surfaces/admin/api/print-action/print-action.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/print-action/print-action.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.d.ts +11 -0
- package/build/ts/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/resource-picker/resource-picker.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/resource-picker/resource-picker.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/shared.d.ts +1 -0
- package/build/ts/surfaces/admin/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/should-render/should-render.d.ts +10 -0
- package/build/ts/surfaces/admin/api/should-render/should-render.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/should-render/should-render.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/should-render/should-render.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api.d.ts +1 -0
- package/build/ts/surfaces/admin/api.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.d.ts +2 -4
- package/build/ts/surfaces/admin/components/AdminBlock/AdminBlock.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/InternalCustomerSegmentTemplate/InternalCustomerSegmentTemplate.d.ts +1 -1
- package/build/ts/surfaces/admin/components/InternalCustomerSegmentTemplate/InternalCustomerSegmentTemplate.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/shared/index.d.ts +1 -1
- package/build/ts/surfaces/admin/components/shared/index.d.ts.map +1 -1
- package/build/ts/surfaces/admin/extension-targets.d.ts +134 -2
- package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/admin/globals.d.ts +3 -0
- package/build/ts/surfaces/admin/globals.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +1 -1
- package/build/ts/surfaces/checkout/api/docs.d.ts +2 -0
- package/build/ts/surfaces/checkout/api/docs.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +27 -11
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Badge/Badge.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Button/Button.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Chat/Chat.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.d.ts +30 -0
- package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Link/Link.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/QRCode/QRCode.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/shared.d.ts +21 -0
- package/build/ts/surfaces/checkout/components/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components.d.ts +2 -0
- package/build/ts/surfaces/checkout/components.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/globals.d.ts +1 -3
- package/build/ts/surfaces/checkout/globals.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/helper.docs.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/targets.d.ts +0 -66
- package/build/ts/surfaces/checkout/targets.d.ts.map +1 -1
- package/build/ts/surfaces/checkout.d.ts +2 -2
- package/build/ts/surfaces/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/standard-api/standard-api.d.ts +1 -1
- package/build/ts/surfaces/customer-account/components/shared-checkout-components.d.ts +1 -1
- package/build/ts/surfaces/customer-account/components/shared-checkout-components.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/globals.d.ts +1 -3
- package/build/ts/surfaces/customer-account/globals.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api.d.ts +23 -23
- package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components.d.ts +76 -71
- package/build/ts/surfaces/point-of-sale/components.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/globals.d.ts +1 -3
- package/build/ts/surfaces/point-of-sale/globals.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/input.d.ts +3 -0
- package/build/ts/surfaces/point-of-sale/input.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/intent.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale/intent.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/action-api/action-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/action-target-api/action-target-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{api → render/api}/cart-api/cart-api.d.ts +10 -9
- package/build/ts/surfaces/point-of-sale/render/api/cart-api/cart-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/connectivity-api/connectivity-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/customer-api/customer-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/device-api/device-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/draft-order-api/draft-order-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/locale-api/locale-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/navigation-api/navigation-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/order-api/order-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/print-api/print-api.d.ts +18 -0
- package/build/ts/surfaces/point-of-sale/render/api/print-api/print-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/product-api/product-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{api → render/api}/product-search-api/product-search-api.d.ts +3 -3
- package/build/ts/surfaces/point-of-sale/render/api/product-search-api/product-search-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/scanner-api/scanner-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{api → render/api}/session-api/session-api.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/render/api/session-api/session-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/standard/standard-api.d.ts +13 -0
- package/build/ts/surfaces/point-of-sale/render/api/standard/standard-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/api/toast-api/toast-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Badge/Badge.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Banner/Banner.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Box/Box.d.ts +9 -0
- package/build/ts/surfaces/point-of-sale/render/components/Box/Box.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Button/Button.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/CameraScanner/CameraScanner.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/DateField/DateField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Dialog/Dialog.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/EmailField/EmailField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.d.ts +0 -9
- package/build/ts/surfaces/point-of-sale/render/components/FormattedTextField/FormattedTextField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Icon/Icon.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Image/Image.d.ts +25 -0
- package/build/ts/surfaces/point-of-sale/render/components/Image/Image.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{components → render/components}/List/List.d.ts +0 -6
- package/build/ts/surfaces/point-of-sale/render/components/List/List.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Navigator/Navigator.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/NumberField/NumberField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlock.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/POSBlock/POSBlockRow.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/PinPad/PinPad.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.d.ts +12 -0
- package/build/ts/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/RadioButtonList/RadioButtonList.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Screen/Screen.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/ScrollView/ScrollView.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/SearchBar/SearchBar.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Section/Section.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Selectable/Selectable.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Stack/Stack.d.ts +102 -0
- package/build/ts/surfaces/point-of-sale/render/components/Stack/Stack.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Stepper/Stepper.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Text/Text.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/TextArea/TextArea.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{components → render/components}/TextField/TextField.d.ts +1 -10
- package/build/ts/surfaces/point-of-sale/render/components/TextField/TextField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/Tile/Tile.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/TimeField/TimeField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/TimePicker/TimePicker.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/BaseTextField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/InputField.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/auto-capitalization-type.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/box.d.ts +117 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/box.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{components/Spacing/Spacing.d.ts → render/components/shared/deprecated-types.d.ts} +2 -1
- package/build/ts/surfaces/point-of-sale/render/components/shared/deprecated-types.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/inner-layouts.d.ts +28 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/inner-layouts.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/sizes.d.ts +5 -0
- package/build/ts/surfaces/point-of-sale/render/components/shared/sizes.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/run/input/BaseInput.d.ts +8 -0
- package/build/ts/surfaces/point-of-sale/run/input/BaseInput.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/run/intent/BaseIntent.d.ts +9 -0
- package/build/ts/surfaces/point-of-sale/run/intent/BaseIntent.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/targets.d.ts +8 -8
- package/build/ts/surfaces/point-of-sale/targets.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/{api/types → types}/cart.d.ts +1 -4
- package/build/ts/surfaces/point-of-sale/types/cart.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{api/types → types}/country-code.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/device.d.ts +15 -0
- package/build/ts/surfaces/point-of-sale/types/device.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/types/multiple-resource-result.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/types/paginated-result.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/types/product.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/{api/types → types}/session.d.ts +5 -0
- package/build/ts/surfaces/point-of-sale/types/session.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale.d.ts +2 -0
- package/build/ts/surfaces/point-of-sale.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/shared.ts +46 -1
- package/src/surfaces/admin/api/action/action.doc.ts +1 -0
- package/src/surfaces/admin/api/action/action.ts +12 -0
- package/src/surfaces/admin/api/block/block.doc.ts +1 -0
- package/src/surfaces/admin/api/block/block.ts +7 -1
- package/src/surfaces/admin/api/checkout-rules/launch-options.ts +0 -1
- package/src/surfaces/admin/api/checkout-rules/metafields.ts +1 -46
- package/src/surfaces/admin/api/checkout-rules/validation-settings.doc.ts +1 -0
- package/src/surfaces/admin/api/customer-segment-template/customer-segment-template.doc.ts +1 -0
- package/src/surfaces/admin/api/customer-segment-template/customer-segment-template.ts +1 -6
- package/src/surfaces/admin/api/discount-function-settings/discount-function-settings.doc.ts +27 -0
- package/src/surfaces/admin/api/discount-function-settings/discount-function-settings.ts +15 -0
- package/src/surfaces/admin/api/discount-function-settings/launch-options.ts +29 -0
- package/src/surfaces/admin/api/discount-function-settings/metafields.ts +31 -0
- package/src/surfaces/admin/api/picker/examples/direct-api.js +73 -0
- package/src/surfaces/admin/api/picker/examples/disabled.js +16 -0
- package/src/surfaces/admin/api/picker/examples/minimal.js +16 -0
- package/src/surfaces/admin/api/picker/examples/multiple-limit.js +21 -0
- package/src/surfaces/admin/api/picker/examples/multiple-true.js +21 -0
- package/src/surfaces/admin/api/picker/examples/preselected.js +16 -0
- package/src/surfaces/admin/api/picker/examples/template-picker.js +37 -0
- package/src/surfaces/admin/api/picker/picker.doc.ts +113 -0
- package/src/surfaces/admin/api/picker/picker.ts +83 -0
- package/src/surfaces/admin/api/print-action/print-action.doc.ts +1 -0
- package/src/surfaces/admin/api/print-action/print-action.ts +12 -0
- package/src/surfaces/admin/api/purchase-options-card-action/purchase-options-card-action.ts +10 -0
- package/src/surfaces/admin/api/resource-picker/examples/action.js +4 -0
- package/src/surfaces/admin/api/resource-picker/examples/collection-picker.js +1 -0
- package/src/surfaces/admin/api/resource-picker/examples/filter-query.js +6 -0
- package/src/surfaces/admin/api/resource-picker/examples/filters.js +9 -0
- package/src/surfaces/admin/api/resource-picker/examples/multiple-limited.js +4 -0
- package/src/surfaces/admin/api/resource-picker/examples/multiple-unlimited.js +4 -0
- package/src/surfaces/admin/api/resource-picker/examples/product-picker.js +3 -0
- package/src/surfaces/admin/api/resource-picker/examples/product-variant-picker.js +1 -0
- package/src/surfaces/admin/api/resource-picker/examples/query.js +4 -0
- package/src/surfaces/admin/api/resource-picker/examples/selection-ids.js +16 -0
- package/src/surfaces/admin/api/resource-picker/examples/selection.js +7 -0
- package/src/surfaces/admin/api/resource-picker/resource-picker.doc.ts +163 -0
- package/src/surfaces/admin/api/shared.ts +44 -0
- package/src/surfaces/admin/api/should-render/should-render.doc.ts +20 -0
- package/src/surfaces/admin/api/should-render/should-render.ts +11 -0
- package/src/surfaces/admin/api/standard/standard.doc.ts +1 -1
- package/src/surfaces/admin/api.ts +1 -0
- package/src/surfaces/admin/components/AdminBlock/AdminBlock.ts +2 -4
- package/src/surfaces/admin/components/InternalCustomerSegmentTemplate/InternalCustomerSegmentTemplate.ts +1 -0
- package/src/surfaces/admin/components/shared/index.ts +1 -1
- package/src/surfaces/admin/extension-targets.ts +260 -1
- package/src/surfaces/admin/globals.ts +7 -0
- package/src/surfaces/checkout/api/address-autocomplete/standard.ts +1 -1
- package/src/surfaces/checkout/api/docs.ts +3 -0
- package/src/surfaces/checkout/api/standard/standard.ts +30 -12
- package/src/surfaces/checkout/components/Badge/Badge.ts +1 -1
- package/src/surfaces/checkout/components/Button/Button.ts +3 -1
- package/src/surfaces/checkout/components/Chat/AppBridge.ts +4 -4
- package/src/surfaces/checkout/components/Chat/Chat.doc.ts +2 -2
- package/src/surfaces/checkout/components/Chat/Chat.ts +2 -2
- package/src/surfaces/checkout/components/Chat/examples/app-bridge-communication.example.js +4 -1
- package/src/surfaces/checkout/components/Chat/examples/app-bridge-resize.example.html +2 -2
- package/src/surfaces/checkout/components/Chat/examples/chat-custom-properties-css.example.css +2 -4
- package/src/surfaces/checkout/components/Chat/examples/include-app-bridge.example.html +1 -1
- package/src/surfaces/checkout/components/ClipboardItem/ClipboardItem.doc.ts +74 -0
- package/src/surfaces/checkout/components/ClipboardItem/ClipboardItem.ts +34 -0
- package/src/surfaces/checkout/components/ClipboardItem/examples/basic-clipboarditem.example.ts +21 -0
- package/src/surfaces/checkout/components/Icon/Icon.ts +2 -0
- package/src/surfaces/checkout/components/Link/Link.ts +3 -1
- package/src/surfaces/checkout/components/Pressable/Pressable.ts +2 -0
- package/src/surfaces/checkout/components/QRCode/QRCode.doc.ts +13 -2
- package/src/surfaces/checkout/components/QRCode/examples/basic-qrcode.example.ts +12 -1
- package/src/surfaces/checkout/components/shared.ts +22 -0
- package/src/surfaces/checkout/components.ts +3 -0
- package/src/surfaces/checkout/globals.ts +4 -6
- package/src/surfaces/checkout/helper.docs.ts +18 -0
- package/src/surfaces/checkout/style/examples/defaultstyle.example.tsx +1 -1
- package/src/surfaces/checkout/style/examples/hiding.example.tsx +1 -1
- package/src/surfaces/checkout/style/examples/simplecondition.example.tsx +1 -1
- package/src/surfaces/checkout/targets.ts +0 -133
- package/src/surfaces/checkout.ts +6 -1
- package/src/surfaces/customer-account/api/standard-api/standard-api.ts +1 -1
- package/src/surfaces/customer-account/components/shared-checkout-components.ts +2 -0
- package/src/surfaces/customer-account/globals.ts +4 -6
- package/src/surfaces/point-of-sale/api.ts +34 -28
- package/src/surfaces/point-of-sale/components.ts +107 -73
- package/src/surfaces/point-of-sale/globals.ts +4 -6
- package/src/surfaces/point-of-sale/input.ts +3 -0
- package/src/surfaces/point-of-sale/intent.ts +1 -0
- package/src/surfaces/point-of-sale/{api → render/api}/cart-api/cart-api.ts +12 -14
- package/src/surfaces/point-of-sale/render/api/print-api/print-api.ts +18 -0
- package/src/surfaces/point-of-sale/{api → render/api}/product-search-api/product-search-api.ts +3 -3
- package/src/surfaces/point-of-sale/{api → render/api}/session-api/session-api.ts +1 -1
- package/src/surfaces/point-of-sale/render/api/standard/standard-api.ts +17 -0
- package/src/surfaces/point-of-sale/render/components/Box/Box.ts +6 -0
- package/src/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.ts +0 -9
- package/src/surfaces/point-of-sale/render/components/Image/Image.ts +31 -0
- package/src/surfaces/point-of-sale/{components → render/components}/List/List.ts +0 -6
- package/src/surfaces/point-of-sale/render/components/PrintPreview/PrintPreview.ts +13 -0
- package/src/surfaces/point-of-sale/render/components/Stack/Stack.ts +122 -0
- package/src/surfaces/point-of-sale/{components → render/components}/TextField/TextField.ts +2 -13
- package/src/surfaces/point-of-sale/render/components/shared/box.ts +131 -0
- package/src/surfaces/point-of-sale/{components/Spacing/Spacing.ts → render/components/shared/deprecated-types.ts} +16 -0
- package/src/surfaces/point-of-sale/render/components/shared/inner-layouts.ts +35 -0
- package/src/surfaces/point-of-sale/render/components/shared/sizes.ts +25 -0
- package/src/surfaces/point-of-sale/run/input/BaseInput.ts +8 -0
- package/src/surfaces/point-of-sale/run/intent/BaseIntent.ts +8 -0
- package/src/surfaces/point-of-sale/targets.ts +8 -17
- package/src/surfaces/point-of-sale/{api/types → types}/cart.ts +5 -4
- package/src/surfaces/point-of-sale/types/device.ts +14 -0
- package/src/surfaces/point-of-sale/{api/types → types}/session.ts +7 -0
- package/src/surfaces/point-of-sale.ts +2 -0
- package/build/cjs/surfaces/point-of-sale/components/ActionItem/ActionItem.js +0 -16
- package/build/cjs/surfaces/point-of-sale/components/TextField/TextField.js +0 -15
- package/build/esm/surfaces/point-of-sale/components/ActionItem/ActionItem.mjs +0 -12
- package/build/esm/surfaces/point-of-sale/components/Image/Image.mjs +0 -5
- package/build/esm/surfaces/point-of-sale/components/TextField/TextField.mjs +0 -11
- package/build/esnext/surfaces/point-of-sale/components/ActionItem/ActionItem.esnext +0 -12
- package/build/esnext/surfaces/point-of-sale/components/Image/Image.esnext +0 -5
- package/build/esnext/surfaces/point-of-sale/components/TextField/TextField.esnext +0 -11
- package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/action-target-api/action-target-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/connectivity-api/connectivity-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/customer-api/customer-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/device-api/device-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/draft-order-api/draft-order-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/locale-api/locale-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/product-api/product-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/scanner-api/scanner-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/session-api/session-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.d.ts +0 -17
- package/build/ts/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts +0 -12
- package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/toast-api/toast-api.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/types/cart.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/types/multiple-resource-result.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/types/paginated-result.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/types/product.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/api/types/session.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/ActionItem/ActionItem.d.ts +0 -24
- package/build/ts/surfaces/point-of-sale/components/ActionItem/ActionItem.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Badge/Badge.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Banner/Banner.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Button/Button.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/CameraScanner/CameraScanner.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/DateField/DateField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/DatePicker/DatePicker.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Dialog/Dialog.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/FormattedTextField/FormattedTextField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Icon/Icon.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Image/Image.d.ts +0 -12
- package/build/ts/surfaces/point-of-sale/components/Image/Image.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/List/List.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Navigator/Navigator.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/POSBlock/POSBlock.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/POSBlock/POSBlockRow.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/PinPad/PinPad.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/RadioButtonList/RadioButtonList.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Screen/Screen.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/ScrollView/ScrollView.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/SearchBar/SearchBar.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Section/Section.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/SectionHeader/SectionHeader.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/SegmentedControl/SegmentedControl.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Selectable/Selectable.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Spacing/Spacing.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Stack/Stack.d.ts +0 -44
- package/build/ts/surfaces/point-of-sale/components/Stack/Stack.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Stepper/Stepper.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Text/Text.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/TextField/TextField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/Tile/Tile.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/TimeField/TimeField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/TimePicker/TimePicker.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/shared/BaseTextField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/shared/InputField.d.ts.map +0 -1
- package/build/ts/surfaces/point-of-sale/components/shared/auto-capitalization-type.d.ts.map +0 -1
- package/src/surfaces/checkout/components/Chat/examples/chat-media-query.example.css +0 -9
- package/src/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.ts +0 -17
- package/src/surfaces/point-of-sale/api/standard/standard-api.ts +0 -15
- package/src/surfaces/point-of-sale/components/ActionItem/ActionItem.ts +0 -24
- package/src/surfaces/point-of-sale/components/Image/Image.ts +0 -10
- package/src/surfaces/point-of-sale/components/Stack/Stack.ts +0 -63
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Badge/Badge.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Banner/Banner.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Button/Button.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/DateField/DateField.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Icon/Icon.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/List/List.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Screen/Screen.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Section/Section.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Text/Text.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/Tile/Tile.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.js +0 -0
- /package/build/cjs/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.js +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Badge/Badge.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Banner/Banner.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Button/Button.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/DateField/DateField.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Icon/Icon.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/List/List.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Screen/Screen.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Section/Section.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Text/Text.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/Tile/Tile.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.mjs +0 -0
- /package/build/esm/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.mjs +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Badge/Badge.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Banner/Banner.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Button/Button.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/DateField/DateField.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/FormattedTextField/FormattedTextField.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Icon/Icon.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/List/List.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Screen/Screen.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Section/Section.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Text/Text.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/Tile/Tile.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.esnext +0 -0
- /package/build/esnext/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.esnext +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/action-api/action-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/action-target-api/action-target-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/connectivity-api/connectivity-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/customer-api/customer-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/device-api/device-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/draft-order-api/draft-order-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/locale-api/locale-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/navigation-api/navigation-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/order-api/order-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/product-api/product-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/scanner-api/scanner-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api → render/api}/toast-api/toast-api.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Badge/Badge.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Banner/Banner.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Button/Button.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/DateField/DateField.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Icon/Icon.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Screen/Screen.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Section/Section.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Text/Text.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/Tile/Tile.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/shared/BaseTextField.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/shared/InputField.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{components → render/components}/shared/auto-capitalization-type.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api/types → types}/country-code.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api/types → types}/multiple-resource-result.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api/types → types}/paginated-result.d.ts +0 -0
- /package/build/ts/surfaces/point-of-sale/{api/types → types}/product.d.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/action-api/action-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/action-target-api/action-target-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/connectivity-api/connectivity-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/customer-api/customer-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/device-api/device-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/draft-order-api/draft-order-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/locale-api/locale-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/navigation-api/navigation-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api/order-api/order-api.tsx → render/api/order-api/order-api.ts} +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/product-api/product-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/scanner-api/scanner-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{api → render/api}/toast-api/toast-api.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Badge/Badge.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Banner/Banner.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Button/Button.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/CameraScanner/CameraScanner.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/DateField/DateField.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/DatePicker/DatePicker.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Dialog/Dialog.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/EmailField/EmailField.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Icon/Icon.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Navigator/Navigator.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/NumberField/NumberField.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlock.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/POSBlock/POSBlockRow.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/PinPad/PinPad.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/RadioButtonList/RadioButtonList.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Screen/Screen.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/ScrollView/ScrollView.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/SearchBar/SearchBar.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Section/Section.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/SectionHeader/SectionHeader.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/SegmentedControl/SegmentedControl.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Selectable/Selectable.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Stepper/Stepper.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Text/Text.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/TextArea/TextArea.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/Tile/Tile.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/TimeField/TimeField.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/TimePicker/TimePicker.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/shared/BaseTextField.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/shared/InputField.ts +0 -0
- /package/src/surfaces/point-of-sale/{components → render/components}/shared/auto-capitalization-type.ts +0 -0
- /package/src/surfaces/point-of-sale/{api/types → types}/country-code.ts +0 -0
- /package/src/surfaces/point-of-sale/{api/types → types}/multiple-resource-result.ts +0 -0
- /package/src/surfaces/point-of-sale/{api/types → types}/paginated-result.ts +0 -0
- /package/src/surfaces/point-of-sale/{api/types → types}/product.ts +0 -0
package/package.json
CHANGED
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
|
|
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
|
/**
|
|
@@ -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
|
}
|
|
@@ -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](
|
|
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
|
}
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
|
|
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';
|
|
@@ -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:
|
|
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: '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;
|