@shopify/ui-extensions 2024.1.0 → 2024.4.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/admin/components/FunctionSettings/FunctionSettings.js +9 -0
- package/build/cjs/surfaces/admin/components/Section/Section.js +9 -0
- package/build/cjs/surfaces/admin.js +6 -2
- package/build/cjs/surfaces/checkout/components/Badge/Badge.js +12 -0
- package/build/cjs/surfaces/checkout/components/Disclosure/Disclosure.js +1 -2
- package/build/cjs/surfaces/checkout/components/Modal/Modal.js +1 -2
- package/build/cjs/surfaces/checkout/components/Popover/Popover.js +1 -2
- package/build/cjs/surfaces/checkout/components/Tooltip/Tooltip.js +2 -2
- package/build/cjs/surfaces/checkout/style/style.js +4 -0
- package/build/cjs/surfaces/checkout.js +6 -4
- package/build/cjs/surfaces/customer-account.js +10 -4
- package/build/cjs/surfaces/point-of-sale/components/Actiontem/ActionItem.js +9 -0
- package/build/cjs/surfaces/point-of-sale/components/SectionHeader/SectionHeader.js +9 -0
- package/build/cjs/surfaces/point-of-sale.js +4 -0
- package/build/esm/surfaces/admin/components/FunctionSettings/FunctionSettings.mjs +5 -0
- package/build/esm/surfaces/admin/components/Section/Section.mjs +5 -0
- package/build/esm/surfaces/admin.mjs +3 -1
- package/build/esm/surfaces/checkout/components/Badge/Badge.mjs +8 -0
- package/build/esm/surfaces/checkout/components/Disclosure/Disclosure.mjs +1 -2
- package/build/esm/surfaces/checkout/components/Modal/Modal.mjs +1 -2
- package/build/esm/surfaces/checkout/components/Popover/Popover.mjs +1 -2
- package/build/esm/surfaces/checkout/components/Tooltip/Tooltip.mjs +2 -2
- package/build/esm/surfaces/checkout/style/style.mjs +4 -0
- package/build/esm/surfaces/checkout.mjs +2 -1
- package/build/esm/surfaces/customer-account.mjs +4 -1
- package/build/esm/surfaces/point-of-sale/components/Actiontem/ActionItem.mjs +5 -0
- package/build/esm/surfaces/point-of-sale/components/SectionHeader/SectionHeader.mjs +5 -0
- package/build/esm/surfaces/point-of-sale.mjs +2 -0
- package/build/esnext/surfaces/admin/components/FunctionSettings/FunctionSettings.esnext +5 -0
- package/build/esnext/surfaces/admin/components/Section/Section.esnext +5 -0
- package/build/esnext/surfaces/admin.esnext +3 -1
- package/build/esnext/surfaces/checkout/components/Badge/Badge.esnext +8 -0
- package/build/esnext/surfaces/checkout/components/Disclosure/Disclosure.esnext +1 -2
- package/build/esnext/surfaces/checkout/components/Modal/Modal.esnext +1 -2
- package/build/esnext/surfaces/checkout/components/Popover/Popover.esnext +1 -2
- package/build/esnext/surfaces/checkout/components/Tooltip/Tooltip.esnext +2 -2
- package/build/esnext/surfaces/checkout/style/style.esnext +4 -0
- package/build/esnext/surfaces/checkout.esnext +2 -1
- package/build/esnext/surfaces/customer-account.esnext +4 -1
- package/build/esnext/surfaces/point-of-sale/components/Actiontem/ActionItem.esnext +5 -0
- package/build/esnext/surfaces/point-of-sale/components/SectionHeader/SectionHeader.esnext +5 -0
- package/build/esnext/surfaces/point-of-sale.esnext +2 -0
- package/build/ts/api.d.ts +1 -3
- package/build/ts/api.d.ts.map +1 -1
- package/build/ts/extension.d.ts +3 -0
- package/build/ts/extension.d.ts.map +1 -1
- package/build/ts/shared.d.ts +18 -1
- package/build/ts/shared.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/block/block.d.ts +13 -0
- package/build/ts/surfaces/admin/api/block/block.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/checkout-rules/launch-options.d.ts +33 -0
- package/build/ts/surfaces/admin/api/checkout-rules/launch-options.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts +26 -0
- package/build/ts/surfaces/admin/api/checkout-rules/metafields.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.d.ts +12 -0
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/checkout-rules/validation-settings.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +0 -10
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api.d.ts +3 -1
- package/build/ts/surfaces/admin/api.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/FunctionSettings/FunctionSettings.d.ts +47 -0
- package/build/ts/surfaces/admin/components/FunctionSettings/FunctionSettings.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/FunctionSettings/FunctionSettings.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/FunctionSettings/FunctionSettings.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Heading/Heading.d.ts +6 -1
- package/build/ts/surfaces/admin/components/Heading/Heading.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Section/Section.d.ts +33 -0
- package/build/ts/surfaces/admin/components/Section/Section.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Section/Section.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/components/Section/Section.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components.d.ts +5 -1
- package/build/ts/surfaces/admin/components.d.ts.map +1 -1
- package/build/ts/surfaces/admin/extension-targets.d.ts +81 -14
- package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/address-autocomplete.d.ts +76 -0
- package/build/ts/surfaces/checkout/api/address-autocomplete/address-autocomplete.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts +1 -1
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +3 -3
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/docs.d.ts +6 -1
- package/build/ts/surfaces/checkout/api/docs.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/order-confirmation/order-confirmation.d.ts +21 -0
- package/build/ts/surfaces/checkout/api/order-confirmation/order-confirmation.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/order-status/order-status.d.ts +6 -1
- package/build/ts/surfaces/checkout/api/order-status/order-status.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/payment/payment-option-item.d.ts +1 -1
- package/build/ts/surfaces/checkout/api/payment/payment-option-item.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/pickup/pickup-location-item.d.ts +13 -0
- package/build/ts/surfaces/checkout/api/pickup/pickup-location-item.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts +1 -18
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts +1 -1
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-list.d.ts +2 -2
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-list.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +166 -17
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Badge/Badge.d.ts +43 -0
- package/build/ts/surfaces/checkout/components/Badge/Badge.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Badge/Badge.doc.d.ts +4 -0
- package/build/ts/surfaces/checkout/components/Badge/Badge.doc.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/components/Banner/Banner.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Banner/Banner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/BlockLayout/BlockLayout.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts +2 -7
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/BlockSpacer/BlockSpacer.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/BlockStack/BlockStack.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Button/Button.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Button/Button.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/Choice/Choice.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Choice/Choice.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Choice/Choice.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/DateField/DateField.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/DateField/DateField.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/DateField/DateField.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/DateField/DateField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/DatePicker/DatePicker.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.d.ts +2 -3
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Disclosure/Disclosure.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Divider/Divider.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Divider/Divider.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Form/Form.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Form/Form.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Grid/Grid.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Grid/Grid.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Grid/Grid.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/GridItem/GridItem.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Heading/Heading.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Heading/Heading.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/HeadingGroup/HeadingGroup.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Icon/Icon.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Icon/Icon.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Icon/Icon.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Image/Image.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Image/Image.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Image/Image.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/InlineLayout/InlineLayout.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/InlineSpacer/InlineSpacer.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/InlineStack/InlineStack.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Link/Link.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Link/Link.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/List/List.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/List/List.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/List/List.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/List/List.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ListItem/ListItem.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Map/Map.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Map/Map.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/MapMarker/MapMarker.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/MapMarker/MapMarker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/MapPopover/MapPopover.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/MapPopover/MapPopover.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/MapPopover/MapPopover.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/MapPopover/MapPopover.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Modal/Modal.d.ts +1 -2
- package/build/ts/surfaces/checkout/components/Modal/Modal.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Modal/Modal.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Modal/Modal.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PaymentIcon/PaymentIcon.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/PaymentIcon/PaymentIcon.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Popover/Popover.d.ts +1 -2
- package/build/ts/surfaces/checkout/components/Popover/Popover.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Popover/Popover.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Popover/Popover.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Pressable/Pressable.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ProductThumbnail/ProductThumbnail.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/ProductThumbnail/ProductThumbnail.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ProductThumbnail/ProductThumbnail.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ProductThumbnail/ProductThumbnail.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ScrollView/ScrollView.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Select/Select.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Select/Select.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Select/Select.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts +4 -2
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonImage/SkeletonImage.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonText/SkeletonText.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Spinner/Spinner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Stepper/Stepper.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Tag/Tag.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Tag/Tag.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Tag/Tag.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Text/Text.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Text/Text.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/TextBlock/TextBlock.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/TextField/TextField.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/TextField/TextField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ToggleButton/ToggleButton.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ToggleButton/ToggleButton.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ToggleButtonGroup/ToggleButtonGroup.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/ToggleButtonGroup/ToggleButtonGroup.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/Tooltip/Tooltip.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/View/View.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/View/View.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/View/View.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/View/View.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/shared.d.ts +32 -8
- 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/helper.docs.d.ts +3 -4
- package/build/ts/surfaces/checkout/helper.docs.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/shared.d.ts +3 -4
- package/build/ts/surfaces/checkout/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/isEqual.d.ts +1 -3
- package/build/ts/surfaces/checkout/style/isEqual.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/style.d.ts +19 -3
- package/build/ts/surfaces/checkout/style/style.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/style.doc.d.ts +1 -1
- package/build/ts/surfaces/checkout/style/style.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/style/types.d.ts +39 -2
- package/build/ts/surfaces/checkout/style/types.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/targets.d.ts +68 -20
- package/build/ts/surfaces/checkout/targets.d.ts.map +1 -1
- package/build/ts/surfaces/checkout.d.ts +17 -2
- package/build/ts/surfaces/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +22 -0
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/shared.d.ts +2 -17
- package/build/ts/surfaces/customer-account/api/shared.d.ts.map +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/targets.d.ts +1 -1
- package/build/ts/surfaces/customer-account.d.ts +2 -1
- package/build/ts/surfaces/customer-account.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts +15 -0
- package/build/ts/surfaces/point-of-sale/api/action-api/action-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts +8 -0
- package/build/ts/surfaces/point-of-sale/api/cart-api/cart-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts +24 -0
- package/build/ts/surfaces/point-of-sale/api/order-api/order-api.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts +19 -10
- package/build/ts/surfaces/point-of-sale/api/product-search-api/product-search-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.d.ts +6 -1
- package/build/ts/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts +1 -2
- package/build/ts/surfaces/point-of-sale/api/standard/standard-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/types/cart.d.ts +1 -0
- package/build/ts/surfaces/point-of-sale/api/types/cart.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api.d.ts +3 -1
- package/build/ts/surfaces/point-of-sale/api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/Actiontem/ActionItem.d.ts +10 -0
- package/build/ts/surfaces/point-of-sale/components/Actiontem/ActionItem.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/components/CameraScanner/CameraScanner.d.ts +3 -0
- package/build/ts/surfaces/point-of-sale/components/CameraScanner/CameraScanner.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.d.ts +2 -2
- package/build/ts/surfaces/point-of-sale/components/EmailField/EmailField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/List/List.d.ts +5 -0
- package/build/ts/surfaces/point-of-sale/components/List/List.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.d.ts +2 -2
- package/build/ts/surfaces/point-of-sale/components/NumberField/NumberField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/SectionHeader/SectionHeader.d.ts +33 -0
- package/build/ts/surfaces/point-of-sale/components/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.d.ts +2 -2
- package/build/ts/surfaces/point-of-sale/components/TextArea/TextArea.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components/shared/InputField.d.ts +1 -15
- package/build/ts/surfaces/point-of-sale/components/shared/InputField.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/components.d.ts +5 -1
- package/build/ts/surfaces/point-of-sale/components.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/targets.d.ts +8 -4
- package/build/ts/surfaces/point-of-sale/targets.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/api.ts +1 -1
- package/src/extension.ts +4 -0
- package/src/shared.ts +841 -1
- package/src/surfaces/admin/api/action/action.doc.ts +1 -1
- package/src/surfaces/admin/api/block/block.ts +15 -0
- package/src/surfaces/admin/api/checkout-rules/launch-options.ts +34 -0
- package/src/surfaces/admin/api/checkout-rules/metafields.ts +76 -0
- package/src/surfaces/admin/api/checkout-rules/validation-settings.doc.ts +25 -0
- package/src/surfaces/admin/api/checkout-rules/validation-settings.ts +15 -0
- package/src/surfaces/admin/api/standard/standard.ts +0 -12
- package/src/surfaces/admin/api.ts +3 -1
- package/src/surfaces/admin/components/AdminAction/AdminAction.doc.ts +1 -1
- package/src/surfaces/admin/components/Badge/Badge.doc.ts +2 -2
- package/src/surfaces/admin/components/Banner/Banner.doc.ts +2 -2
- package/src/surfaces/admin/components/BlockStack/BlockStack.doc.ts +2 -2
- package/src/surfaces/admin/components/Box/Box.doc.ts +2 -2
- package/src/surfaces/admin/components/Button/Button.doc.ts +2 -2
- package/src/surfaces/admin/components/Checkbox/Checkbox.doc.ts +2 -2
- package/src/surfaces/admin/components/ChoiceList/ChoiceList.doc.ts +2 -2
- package/src/surfaces/admin/components/ColorPicker/ColorPicker.doc.ts +2 -2
- package/src/surfaces/admin/components/CustomerSegmentTemplate/CustomerSegmentTemplate.doc.ts +2 -2
- package/src/surfaces/admin/components/DateField/DateField.doc.ts +3 -3
- package/src/surfaces/admin/components/Divider/Divider.doc.ts +2 -2
- package/src/surfaces/admin/components/EmailField/EmailField.doc.ts +2 -2
- package/src/surfaces/admin/components/Form/Form.doc.ts +2 -2
- package/src/surfaces/admin/components/FunctionSettings/FunctionSettings.doc.ts +57 -0
- package/src/surfaces/admin/components/FunctionSettings/FunctionSettings.ts +52 -0
- package/src/surfaces/admin/components/FunctionSettings/examples/basic-functionsettings.example.ts +47 -0
- package/src/surfaces/admin/components/Heading/Heading.doc.ts +2 -2
- package/src/surfaces/admin/components/Heading/Heading.ts +6 -1
- package/src/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.ts +2 -2
- package/src/surfaces/admin/components/Icon/Icon.doc.ts +2 -2
- package/src/surfaces/admin/components/Image/Image.doc.ts +2 -2
- package/src/surfaces/admin/components/MoneyField/MoneyField.doc.ts +2 -2
- package/src/surfaces/admin/components/NumberField/NumberField.doc.ts +2 -2
- package/src/surfaces/admin/components/Paragraph/Paragraph.doc.ts +1 -1
- package/src/surfaces/admin/components/PasswordField/PasswordField.doc.ts +2 -2
- package/src/surfaces/admin/components/ProgressIndicator/ProgressIndicator.doc.ts +2 -2
- package/src/surfaces/admin/components/Section/README.md +95 -0
- package/src/surfaces/admin/components/Section/Section.doc.ts +41 -0
- package/src/surfaces/admin/components/Section/Section.ts +35 -0
- package/src/surfaces/admin/components/Section/examples/basic-Section.example.ts +19 -0
- package/src/surfaces/admin/components/Select/Select.doc.ts +2 -2
- package/src/surfaces/admin/components/Text/Text.doc.ts +2 -2
- package/src/surfaces/admin/components/TextArea/TextArea.doc.ts +2 -2
- package/src/surfaces/admin/components/TextField/TextField.doc.ts +2 -2
- package/src/surfaces/admin/components/URLField/URLField.doc.ts +2 -2
- package/src/surfaces/admin/components.ts +8 -1
- package/src/surfaces/admin/extension-targets.ts +125 -13
- package/src/surfaces/checkout/api/address-autocomplete/address-autocomplete.ts +87 -0
- package/src/surfaces/checkout/api/cart-line/cart-line-item.ts +1 -1
- package/src/surfaces/checkout/api/checkout/checkout.ts +3 -3
- package/src/surfaces/checkout/api/docs.ts +7 -6
- package/src/surfaces/checkout/api/order-confirmation/order-confirmation.ts +22 -0
- package/src/surfaces/checkout/api/order-status/order-status.ts +6 -1
- package/src/surfaces/checkout/api/payment/payment-option-item.ts +1 -1
- package/src/surfaces/checkout/api/pickup/pickup-location-item.ts +15 -0
- package/src/surfaces/checkout/api/shared.ts +1 -833
- package/src/surfaces/checkout/api/shipping/shipping-option-item.ts +1 -1
- package/src/surfaces/checkout/api/shipping/shipping-option-list.ts +2 -2
- package/src/surfaces/checkout/api/standard/standard.ts +203 -15
- package/src/surfaces/checkout/components/Badge/Badge.doc.ts +76 -0
- package/src/surfaces/checkout/components/Badge/Badge.ts +42 -0
- package/src/surfaces/checkout/components/Badge/content/guidelines.md +8 -0
- package/src/surfaces/checkout/components/Badge/examples/basic-badge.example.ts +7 -0
- package/src/surfaces/checkout/components/Badge/examples/status-badge.example.ts +39 -0
- package/src/surfaces/checkout/components/Banner/Banner.doc.ts +1 -1
- package/src/surfaces/checkout/components/BlockLayout/BlockLayout.doc.ts +1 -1
- package/src/surfaces/checkout/components/BlockLayout/BlockLayout.ts +1 -1
- package/src/surfaces/checkout/components/BlockSpacer/BlockSpacer.doc.ts +1 -1
- package/src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts +2 -2
- package/src/surfaces/checkout/components/BlockStack/BlockStack.doc.ts +1 -1
- package/src/surfaces/checkout/components/BlockStack/BlockStack.ts +1 -1
- package/src/surfaces/checkout/components/Button/Button.doc.ts +1 -1
- package/src/surfaces/checkout/components/Checkbox/Checkbox.doc.ts +1 -1
- package/src/surfaces/checkout/components/Checkbox/Checkbox.ts +1 -1
- package/src/surfaces/checkout/components/Choice/Choice.doc.ts +1 -1
- package/src/surfaces/checkout/components/Choice/Choice.ts +2 -1
- package/src/surfaces/checkout/components/ChoiceList/ChoiceList.doc.ts +1 -1
- package/src/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.ts +1 -1
- package/src/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.ts +1 -1
- package/src/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.ts +1 -1
- package/src/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.ts +1 -1
- package/src/surfaces/checkout/components/DateField/DateField.doc.ts +1 -1
- package/src/surfaces/checkout/components/DateField/DateField.ts +2 -2
- package/src/surfaces/checkout/components/DatePicker/DatePicker.doc.ts +1 -1
- package/src/surfaces/checkout/components/Disclosure/Disclosure.doc.ts +2 -2
- package/src/surfaces/checkout/components/Disclosure/Disclosure.ts +2 -3
- package/src/surfaces/checkout/components/Divider/Divider.doc.ts +1 -1
- package/src/surfaces/checkout/components/Form/Form.doc.ts +1 -1
- package/src/surfaces/checkout/components/Grid/Grid.doc.ts +1 -1
- package/src/surfaces/checkout/components/Grid/Grid.ts +1 -1
- package/src/surfaces/checkout/components/GridItem/GridItem.doc.ts +1 -1
- package/src/surfaces/checkout/components/GridItem/GridItem.ts +1 -1
- package/src/surfaces/checkout/components/Heading/Heading.doc.ts +1 -1
- package/src/surfaces/checkout/components/HeadingGroup/HeadingGroup.doc.ts +1 -1
- package/src/surfaces/checkout/components/Icon/Icon.doc.ts +1 -1
- package/src/surfaces/checkout/components/Icon/Icon.ts +3 -0
- package/src/surfaces/checkout/components/Image/Image.doc.ts +1 -1
- package/src/surfaces/checkout/components/Image/Image.ts +2 -2
- package/src/surfaces/checkout/components/Image/examples/basic-image.example.ts +1 -2
- package/src/surfaces/checkout/components/InlineLayout/InlineLayout.doc.ts +1 -1
- package/src/surfaces/checkout/components/InlineLayout/InlineLayout.ts +1 -1
- package/src/surfaces/checkout/components/InlineSpacer/InlineSpacer.doc.ts +1 -1
- package/src/surfaces/checkout/components/InlineSpacer/InlineSpacer.ts +1 -1
- package/src/surfaces/checkout/components/InlineStack/InlineStack.doc.ts +1 -1
- package/src/surfaces/checkout/components/InlineStack/InlineStack.ts +1 -1
- package/src/surfaces/checkout/components/Link/Link.doc.ts +1 -1
- package/src/surfaces/checkout/components/List/List.doc.ts +1 -1
- package/src/surfaces/checkout/components/List/List.ts +1 -1
- package/src/surfaces/checkout/components/ListItem/ListItem.doc.ts +1 -1
- package/src/surfaces/checkout/components/Map/Map.doc.ts +1 -1
- package/src/surfaces/checkout/components/MapMarker/MapMarker.doc.ts +1 -1
- package/src/surfaces/checkout/components/MapPopover/MapPopover.doc.ts +1 -1
- package/src/surfaces/checkout/components/MapPopover/MapPopover.ts +1 -1
- package/src/surfaces/checkout/components/Modal/Modal.doc.ts +2 -2
- package/src/surfaces/checkout/components/Modal/Modal.ts +1 -2
- package/src/surfaces/checkout/components/PaymentIcon/PaymentIcon.doc.ts +1 -1
- package/src/surfaces/checkout/components/PhoneField/PhoneField.doc.ts +1 -1
- package/src/surfaces/checkout/components/PhoneField/PhoneField.ts +4 -3
- package/src/surfaces/checkout/components/Popover/Popover.doc.ts +2 -2
- package/src/surfaces/checkout/components/Popover/Popover.ts +1 -2
- package/src/surfaces/checkout/components/Pressable/Pressable.doc.ts +1 -1
- package/src/surfaces/checkout/components/Pressable/Pressable.ts +1 -1
- package/src/surfaces/checkout/components/ProductThumbnail/ProductThumbnail.doc.ts +1 -1
- package/src/surfaces/checkout/components/ProductThumbnail/ProductThumbnail.ts +5 -2
- package/src/surfaces/checkout/components/ScrollView/ScrollView.doc.ts +1 -1
- package/src/surfaces/checkout/components/ScrollView/ScrollView.ts +1 -1
- package/src/surfaces/checkout/components/Select/Select.doc.ts +1 -1
- package/src/surfaces/checkout/components/Select/Select.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonImage/SkeletonImage.doc.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonImage/SkeletonImage.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonText/SkeletonText.doc.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonTextBlock/SkeletonTextBlock.doc.ts +1 -1
- package/src/surfaces/checkout/components/Spinner/Spinner.doc.ts +1 -1
- package/src/surfaces/checkout/components/Stepper/Stepper.doc.ts +1 -1
- package/src/surfaces/checkout/components/Stepper/Stepper.ts +1 -1
- package/src/surfaces/checkout/components/Tag/Tag.doc.ts +1 -1
- package/src/surfaces/checkout/components/Tag/Tag.ts +1 -1
- package/src/surfaces/checkout/components/Text/Text.doc.ts +1 -1
- package/src/surfaces/checkout/components/TextBlock/TextBlock.doc.ts +1 -1
- package/src/surfaces/checkout/components/TextField/TextField.doc.ts +1 -1
- package/src/surfaces/checkout/components/TextField/TextField.ts +4 -3
- package/src/surfaces/checkout/components/ToggleButton/ToggleButton.doc.ts +1 -1
- package/src/surfaces/checkout/components/ToggleButtonGroup/ToggleButtonGroup.doc.ts +1 -1
- package/src/surfaces/checkout/components/Tooltip/Tooltip.doc.ts +2 -2
- package/src/surfaces/checkout/components/Tooltip/Tooltip.ts +2 -2
- package/src/surfaces/checkout/components/View/View.doc.ts +1 -1
- package/src/surfaces/checkout/components/View/View.ts +1 -1
- package/src/surfaces/checkout/components/shared.ts +36 -11
- package/src/surfaces/checkout/components.ts +3 -0
- package/src/surfaces/checkout/helper.docs.ts +5 -4
- package/src/surfaces/checkout/shared.ts +3 -3
- package/src/surfaces/checkout/style/isEqual.ts +3 -3
- package/src/surfaces/checkout/style/style.doc.ts +1 -1
- package/src/surfaces/checkout/style/style.ts +30 -3
- package/src/surfaces/checkout/style/types.ts +55 -5
- package/src/surfaces/checkout/targets.ts +102 -36
- package/src/surfaces/checkout.ts +174 -2
- package/src/surfaces/customer-account/api/order-status/order-status.ts +25 -0
- package/src/surfaces/customer-account/api/shared.ts +18 -831
- package/src/surfaces/customer-account/components/shared-checkout-components.ts +6 -0
- package/src/surfaces/customer-account/targets.ts +1 -1
- package/src/surfaces/customer-account.ts +2 -1
- package/src/surfaces/point-of-sale/api/action-api/action-api.ts +15 -0
- package/src/surfaces/point-of-sale/api/cart-api/cart-api.ts +10 -0
- package/src/surfaces/point-of-sale/api/order-api/order-api.tsx +26 -0
- package/src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts +24 -10
- package/src/surfaces/point-of-sale/api/smartgrid-api/smartgrid-api.ts +6 -1
- package/src/surfaces/point-of-sale/api/standard/standard-api.ts +0 -2
- package/src/surfaces/point-of-sale/api/types/cart.ts +1 -0
- package/src/surfaces/point-of-sale/api.ts +5 -0
- package/src/surfaces/point-of-sale/components/Actiontem/ActionItem.ts +10 -0
- package/src/surfaces/point-of-sale/components/CameraScanner/CameraScanner.ts +9 -1
- package/src/surfaces/point-of-sale/components/EmailField/EmailField.ts +2 -2
- package/src/surfaces/point-of-sale/components/List/List.ts +5 -1
- package/src/surfaces/point-of-sale/components/NumberField/NumberField.ts +2 -2
- package/src/surfaces/point-of-sale/components/SectionHeader/SectionHeader.ts +34 -0
- package/src/surfaces/point-of-sale/components/TextArea/TextArea.ts +2 -2
- package/src/surfaces/point-of-sale/components/shared/InputField.ts +1 -17
- package/src/surfaces/point-of-sale/components.ts +5 -5
- package/src/surfaces/point-of-sale/targets.ts +24 -4
- package/build/ts/surfaces/checkout/api.d.ts +0 -12
- package/build/ts/surfaces/checkout/api.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/style/index.d.ts +0 -3
- package/build/ts/surfaces/checkout/style/index.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/style.d.ts +0 -3
- package/build/ts/surfaces/checkout/style.d.ts.map +0 -1
- package/src/surfaces/admin/components/CustomerSegmentTemplate/examples/CustomerSegmentTemplate.example.tsx +0 -15
- package/src/surfaces/checkout/api.ts +0 -141
- package/src/surfaces/checkout/style/index.ts +0 -16
- package/src/surfaces/checkout/style.ts +0 -16
- /package/src/surfaces/admin/components/Badge/examples/{basic-Badge.example.ts → basic-badge.example.ts} +0 -0
- /package/src/surfaces/admin/components/Banner/examples/{basic-Banner.example.ts → basic-banner.example.ts} +0 -0
- /package/src/surfaces/admin/components/ChoiceList/examples/{basic-ChoiceList.example.ts → basic-choicelist.example.ts} +0 -0
- /package/src/surfaces/admin/components/ColorPicker/examples/{basic-ColorPicker.example.ts → basic-colorpicker.example.ts} +0 -0
- /package/src/surfaces/admin/components/CustomerSegmentTemplate/examples/{CustomerSegmentTemplate.example.ts → customersegmenttemplate.example.ts} +0 -0
- /package/src/surfaces/admin/components/InternalCustomerSegmentTemplate/examples/{InternalCustomerSegmentTemplate.example.ts → internalcustomersegmenttemplate.example.ts} +0 -0
- /package/src/surfaces/admin/components/ProgressIndicator/examples/{basic-ProgressIndicator.example.ts → basic-progressindicator.example.ts} +0 -0
- /package/src/surfaces/admin/components/ResourceItem/examples/{basic-ResourceItem.example.ts → basic-resourceitem.example.ts} +0 -0
- /package/src/surfaces/admin/components/ResourceList/examples/{basic-ResourceList.example.ts → basic-resourcelist.example.ts} +0 -0
- /package/src/surfaces/admin/components/Thumbnail/examples/{basic-Thumbnail.example.ts → basic-thumbnail.example.ts} +0 -0
|
@@ -3,7 +3,7 @@ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
|
|
|
3
3
|
const data: ReferenceEntityTemplateSchema = {
|
|
4
4
|
name: 'Action Extension API',
|
|
5
5
|
description:
|
|
6
|
-
'This API is available to all action extension types. Refer to the [tutorial](/docs/apps/admin/admin-actions-and-blocks/build-an-admin-action) for more information.',
|
|
6
|
+
'This API is available to all action extension types. Refer to the [tutorial](/docs/apps/admin/admin-actions-and-blocks/build-an-admin-action) for more information. Note that the [`AdminAction`](/docs/api/admin-extensions/components/other/adminaction) component is required to build Admin action extensions.',
|
|
7
7
|
isVisualComponent: false,
|
|
8
8
|
type: 'API',
|
|
9
9
|
definitions: [
|
|
@@ -2,10 +2,25 @@ 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
|
|
|
5
|
+
export interface Navigation {
|
|
6
|
+
/**
|
|
7
|
+
* Navigate to a specific route.
|
|
8
|
+
*
|
|
9
|
+
* @example navigation.navigate('extension://my-admin-action-extension-handle')
|
|
10
|
+
*/
|
|
11
|
+
navigate: (url: string | URL) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
5
14
|
export interface BlockExtensionApi<ExtensionTarget extends AnyExtensionTarget>
|
|
6
15
|
extends StandardApi<ExtensionTarget> {
|
|
7
16
|
/**
|
|
8
17
|
* Information about the currently viewed or selected items.
|
|
9
18
|
*/
|
|
10
19
|
data: Data;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Provides methods to navigate to other features in the Admin. Currently, only navigation from an admin block to an admin action extension *on the same resource page* is supported.
|
|
23
|
+
* For example, you can navigate from an admin block on the product details page (`admin.product-details.block.render`) to an admin action on the product details page (`admin.product-details.action.render`).
|
|
24
|
+
*/
|
|
25
|
+
navigation: Navigation;
|
|
11
26
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface Metafield {
|
|
2
|
+
description?: string;
|
|
3
|
+
id: string;
|
|
4
|
+
namespace: string;
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
type: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Validation {
|
|
11
|
+
/**
|
|
12
|
+
* the validation's gid when active in a shop
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* the metafields owned by the validation
|
|
17
|
+
*/
|
|
18
|
+
metafields: Metafield[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ShopifyFunction {
|
|
22
|
+
/**
|
|
23
|
+
* the validation function's unique identifier
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The object that exposes the validation with its settings.
|
|
30
|
+
*/
|
|
31
|
+
export interface ValidationData {
|
|
32
|
+
validation?: Validation;
|
|
33
|
+
shopifyFunction: ShopifyFunction;
|
|
34
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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];
|
|
47
|
+
|
|
48
|
+
interface MetafieldUpdateChange {
|
|
49
|
+
type: 'updateMetafield';
|
|
50
|
+
key: string;
|
|
51
|
+
namespace?: string;
|
|
52
|
+
value: string | number;
|
|
53
|
+
valueType?: SupportedDefinitionType;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface MetafieldRemoveChange {
|
|
57
|
+
type: 'removeMetafield';
|
|
58
|
+
key: string;
|
|
59
|
+
namespace: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type MetafieldChange = MetafieldUpdateChange | MetafieldRemoveChange;
|
|
63
|
+
interface MetafieldChangeResultError {
|
|
64
|
+
type: 'error';
|
|
65
|
+
message: string;
|
|
66
|
+
}
|
|
67
|
+
interface MetafieldChangeSuccess {
|
|
68
|
+
type: 'success';
|
|
69
|
+
}
|
|
70
|
+
type MetafieldChangeResult =
|
|
71
|
+
| MetafieldChangeSuccess
|
|
72
|
+
| MetafieldChangeResultError;
|
|
73
|
+
|
|
74
|
+
export type ApplyMetafieldChange = (
|
|
75
|
+
change: MetafieldChange,
|
|
76
|
+
) => Promise<MetafieldChangeResult>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
|
|
2
|
+
|
|
3
|
+
const data: ReferenceEntityTemplateSchema = {
|
|
4
|
+
name: 'Validation Settings API',
|
|
5
|
+
description:
|
|
6
|
+
'This API is available Validation Settings extensions. Refer to the [tutorial](/docs/apps/checkout/validation/create-complex-validation-rules) for more information. Note that the [`FunctionSettings`](/docs/api/admin-extensions/components/forms/functionsettings) component is required to build Validation Settings extensions.',
|
|
7
|
+
isVisualComponent: false,
|
|
8
|
+
type: 'API',
|
|
9
|
+
definitions: [
|
|
10
|
+
{
|
|
11
|
+
title: 'applyMetafieldChange',
|
|
12
|
+
description: 'Applies a change to the validation settings.',
|
|
13
|
+
type: 'ApplyMetafieldChange',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: 'data',
|
|
17
|
+
description: 'The object that exposes the validation with its settings.',
|
|
18
|
+
type: 'ValidationData',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
category: 'API',
|
|
22
|
+
related: [],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
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 {ValidationData} from './launch-options';
|
|
6
|
+
|
|
7
|
+
export interface ValidationSettingsApi<
|
|
8
|
+
ExtensionTarget extends AnyExtensionTarget,
|
|
9
|
+
> extends StandardApi<ExtensionTarget> {
|
|
10
|
+
/**
|
|
11
|
+
* Applies a change to the validation settings.
|
|
12
|
+
*/
|
|
13
|
+
applyMetafieldChange: ApplyMetafieldChange;
|
|
14
|
+
data: ValidationData;
|
|
15
|
+
}
|
|
@@ -9,13 +9,6 @@ export interface Intents {
|
|
|
9
9
|
launchUrl?: string | URL;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export interface Navigation {
|
|
13
|
-
/**
|
|
14
|
-
* A method to navigate to a specific route.
|
|
15
|
-
*/
|
|
16
|
-
navigate: (url: string | URL) => void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
12
|
/**
|
|
20
13
|
* GraphQL error returned by the Shopify Admin API.
|
|
21
14
|
*/
|
|
@@ -49,11 +42,6 @@ export interface StandardApi<ExtensionTarget extends AnyExtensionTarget> {
|
|
|
49
42
|
*/
|
|
50
43
|
intents: Intents;
|
|
51
44
|
|
|
52
|
-
/**
|
|
53
|
-
* Provides methods to navigate to other features in the Admin.
|
|
54
|
-
*/
|
|
55
|
-
navigation: Navigation;
|
|
56
|
-
|
|
57
45
|
/**
|
|
58
46
|
* Used to query the Admin GraphQL API
|
|
59
47
|
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export type {I18n, I18nTranslate} from '../../api';
|
|
2
|
-
export type {StandardApi,
|
|
2
|
+
export type {StandardApi, Intents} from './api/standard/standard';
|
|
3
|
+
export type {Navigation} from './api/block/block';
|
|
3
4
|
export type {CustomerSegmentTemplateApi} from './api/customer-segment-template/customer-segment-template';
|
|
4
5
|
export type {ActionExtensionApi} from './api/action/action';
|
|
5
6
|
export type {BlockExtensionApi} from './api/block/block';
|
|
6
7
|
export type {ProductDetailsConfigurationApi} from './api/product-configuration/product-details-configuration';
|
|
7
8
|
export type {ProductVariantDetailsConfigurationApi} from './api/product-configuration/product-variant-details-configuration';
|
|
8
9
|
export type {OrderRoutingRuleApi} from './api/order-routing-rule/order-routing-rule';
|
|
10
|
+
export type {ValidationSettingsApi} from './api/checkout-rules/validation-settings';
|
|
@@ -3,7 +3,7 @@ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
|
|
|
3
3
|
const data: ReferenceEntityTemplateSchema = {
|
|
4
4
|
name: 'AdminAction',
|
|
5
5
|
description:
|
|
6
|
-
'AdminAction is a component used by Admin
|
|
6
|
+
'AdminAction is a component used by Admin action extensions to configure a primary and secondary action and title. Use of this component is required in order to use Admin action extensions.',
|
|
7
7
|
requires: '',
|
|
8
8
|
thumbnail: 'adminaction-thumbnail.png',
|
|
9
9
|
isVisualComponent: true,
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Badge/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Badge/examples/basic-badge.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-badge.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Banner/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Banner/examples/basic-banner.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-banner.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/BlockStack/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/BlockStack/examples/basic-blockstack.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-blockstack.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Box/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Box/examples/basic-box.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-box.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Button/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Button/examples/basic-button.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-button.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Checkbox/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Checkbox/examples/basic-checkbox.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-checkbox.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/ChoiceList/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/ChoiceList/examples/basic-choicelist.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-choicelist.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -23,12 +23,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
23
23
|
tabs: [
|
|
24
24
|
{
|
|
25
25
|
title: 'React',
|
|
26
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/ColorPicker/examples/basic-
|
|
26
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/ColorPicker/examples/basic-colorpicker.example.tsx',
|
|
27
27
|
language: 'tsx',
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
title: 'JS',
|
|
31
|
-
code: './examples/basic-
|
|
31
|
+
code: './examples/basic-colorpicker.example.ts',
|
|
32
32
|
language: 'js',
|
|
33
33
|
},
|
|
34
34
|
],
|
package/src/surfaces/admin/components/CustomerSegmentTemplate/CustomerSegmentTemplate.doc.ts
CHANGED
|
@@ -25,12 +25,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
25
25
|
tabs: [
|
|
26
26
|
{
|
|
27
27
|
title: 'React',
|
|
28
|
-
code: '
|
|
28
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/CustomerSegmentTemplate/examples/customersegmenttemplate.example.tsx',
|
|
29
29
|
language: 'tsx',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
title: 'JS',
|
|
33
|
-
code: './examples/
|
|
33
|
+
code: './examples/customersegmenttemplate.example.ts',
|
|
34
34
|
language: 'js',
|
|
35
35
|
},
|
|
36
36
|
],
|
|
@@ -3,7 +3,7 @@ import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
|
|
|
3
3
|
const data: ReferenceEntityTemplateSchema = {
|
|
4
4
|
name: 'DateField',
|
|
5
5
|
description:
|
|
6
|
-
'This is a form field that lets
|
|
6
|
+
'This is a form field that lets users select a date using the DatePicker component.',
|
|
7
7
|
requires: '',
|
|
8
8
|
thumbnail: 'datefield-thumbnail.png',
|
|
9
9
|
isVisualComponent: true,
|
|
@@ -39,7 +39,7 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
39
39
|
description: '',
|
|
40
40
|
examples: [
|
|
41
41
|
{
|
|
42
|
-
description: 'Use this when
|
|
42
|
+
description: 'Use this when users need to select multiple dates.',
|
|
43
43
|
codeblock: {
|
|
44
44
|
title: 'Add a multi-date DateField',
|
|
45
45
|
tabs: [
|
|
@@ -57,7 +57,7 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
description: 'Use this when
|
|
60
|
+
description: 'Use this when users need to select a range of dates.',
|
|
61
61
|
codeblock: {
|
|
62
62
|
title: 'Add a range DateField',
|
|
63
63
|
tabs: [
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Divider/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Divider/examples/basic-divider.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-divider.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -23,12 +23,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
23
23
|
tabs: [
|
|
24
24
|
{
|
|
25
25
|
title: 'React',
|
|
26
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/EmailField/examples/basic-
|
|
26
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/EmailField/examples/basic-emailfield.example.tsx',
|
|
27
27
|
language: 'tsx',
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
title: 'JS',
|
|
31
|
-
code: './examples/basic-
|
|
31
|
+
code: './examples/basic-emailfield.example.ts',
|
|
32
32
|
language: 'js',
|
|
33
33
|
},
|
|
34
34
|
],
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Form/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Form/examples/basic-form.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-form.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
|
|
2
|
+
|
|
3
|
+
const data: ReferenceEntityTemplateSchema = {
|
|
4
|
+
name: 'FunctionSettings',
|
|
5
|
+
description:
|
|
6
|
+
'FunctionSettings should be used when configuring the metafield configuration of a Shopify Function. It provides a structure for various input fields and controls, such as text fields, checkboxes, and selections. It also integrates with the native Contextual Save Bar to handle form submission and reset actions.',
|
|
7
|
+
requires: '',
|
|
8
|
+
thumbnail: 'form-thumbnail.png',
|
|
9
|
+
isVisualComponent: true,
|
|
10
|
+
type: '',
|
|
11
|
+
definitions: [
|
|
12
|
+
{
|
|
13
|
+
title: 'FunctionSettingsProps',
|
|
14
|
+
description: '',
|
|
15
|
+
type: 'FunctionSettingsProps',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
category: 'Components',
|
|
19
|
+
subCategory: 'Forms',
|
|
20
|
+
defaultExample: {
|
|
21
|
+
image: 'form-default.png',
|
|
22
|
+
codeblock: {
|
|
23
|
+
title: 'Simple function settings form implementation',
|
|
24
|
+
tabs: [
|
|
25
|
+
{
|
|
26
|
+
title: 'React',
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/FunctionSettings/examples/basic-functionsettings.example.tsx',
|
|
28
|
+
language: 'tsx',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: 'JS',
|
|
32
|
+
code: './examples/basic-functionsettings.example.ts',
|
|
33
|
+
language: 'js',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
related: [
|
|
39
|
+
{
|
|
40
|
+
type: 'component',
|
|
41
|
+
name: 'TextField',
|
|
42
|
+
url: '/docs/api/admin-extensions/components/forms/textfield',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'component',
|
|
46
|
+
name: 'NumberField',
|
|
47
|
+
url: '/docs/api/admin-extensions/components/forms/numberfield',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'component',
|
|
51
|
+
name: 'ChoiceList',
|
|
52
|
+
url: '/docs/api/admin-extensions/components/forms/choicelist',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export default data;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {createRemoteComponent} from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
export interface FunctionSettingsProps {
|
|
4
|
+
/**
|
|
5
|
+
* A unique identifier for the form.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An optional callback function that will be run by the admin when the user
|
|
11
|
+
* commits their changes in the admin-rendered part of the function settings
|
|
12
|
+
* experience. If this function returns a promise, the admin will wait for the
|
|
13
|
+
* promise to resolve before committing any changes to Shopify’s servers. If
|
|
14
|
+
* the promise rejects, the admin will abort the changes and display an error,
|
|
15
|
+
* using the `message` property of the error you reject with.
|
|
16
|
+
*/
|
|
17
|
+
onSave?(): void | Promise<void>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* An optional callback function that will be run by the admin when the
|
|
21
|
+
* committing the changes to Shopify’s servers fails. The errors you receive
|
|
22
|
+
* in the `errors` argument will only be those that were caused by data your
|
|
23
|
+
* extension provided; network errors and user errors that are out of your
|
|
24
|
+
* control will not be reported here.
|
|
25
|
+
*
|
|
26
|
+
* In the `onError` callback, you should update your extension’s UI to
|
|
27
|
+
* highlight the fields that caused the errors, and display the error messages
|
|
28
|
+
* to the user.
|
|
29
|
+
*/
|
|
30
|
+
onError?(errors: FunctionSettingsError[]): void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface FunctionSettingsError {
|
|
34
|
+
/**
|
|
35
|
+
* A unique identifier describing the “class” of error. These will match
|
|
36
|
+
* the GraphQL error codes as closely as possible. For example the enums
|
|
37
|
+
* returned by the `metafieldsSet` mutation
|
|
38
|
+
*
|
|
39
|
+
* @see https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldsSetUserErrorCode
|
|
40
|
+
*/
|
|
41
|
+
code: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A translated message describing the error.
|
|
45
|
+
*/
|
|
46
|
+
message: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const FunctionSettings = createRemoteComponent<
|
|
50
|
+
'FunctionSettings',
|
|
51
|
+
FunctionSettingsProps
|
|
52
|
+
>('FunctionSettings');
|
package/src/surfaces/admin/components/FunctionSettings/examples/basic-functionsettings.example.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extension,
|
|
3
|
+
FunctionSettings,
|
|
4
|
+
TextField,
|
|
5
|
+
Section,
|
|
6
|
+
} from '@shopify/ui-extensions/admin';
|
|
7
|
+
|
|
8
|
+
export default extension(
|
|
9
|
+
'admin.settings.validation.render',
|
|
10
|
+
async (root, api) => {
|
|
11
|
+
// Use Direct API access to fetch initial
|
|
12
|
+
// metafields from the server if we are
|
|
13
|
+
// rendering against a pre-existing `Validation`
|
|
14
|
+
const initialSettings = api.data.validation
|
|
15
|
+
? await fetchSettings(api.data.validation.id)
|
|
16
|
+
: {};
|
|
17
|
+
|
|
18
|
+
const textField = root.createComponent(TextField, {
|
|
19
|
+
value: initialSettings.name,
|
|
20
|
+
label: 'Name',
|
|
21
|
+
name: 'name',
|
|
22
|
+
onChange(value) {
|
|
23
|
+
textField.updateProps({value, error: undefined});
|
|
24
|
+
api.applyMetafieldsChange({
|
|
25
|
+
type: 'updateMetafield',
|
|
26
|
+
namespace: '$app:my_namespace',
|
|
27
|
+
key: 'name',
|
|
28
|
+
value,
|
|
29
|
+
valueType: 'single_line_text_field',
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const section = root.createComponent(Section, {
|
|
35
|
+
heading: 'Settings',
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const settings = root.createComponent(FunctionSettings, {
|
|
39
|
+
onError(errors) {
|
|
40
|
+
textField.updateProps({error: errors[0]?.message});
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
section.append(textField);
|
|
45
|
+
settings.append(section);
|
|
46
|
+
},
|
|
47
|
+
);
|
|
@@ -24,12 +24,12 @@ const data: ReferenceEntityTemplateSchema = {
|
|
|
24
24
|
tabs: [
|
|
25
25
|
{
|
|
26
26
|
title: 'React',
|
|
27
|
-
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Heading/examples/basic-
|
|
27
|
+
code: '../../../../../../ui-extensions-react/src/surfaces/admin/components/Heading/examples/basic-heading.example.tsx',
|
|
28
28
|
language: 'tsx',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: 'JS',
|
|
32
|
-
code: './examples/basic-
|
|
32
|
+
code: './examples/basic-heading.example.ts',
|
|
33
33
|
language: 'js',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
@@ -6,7 +6,12 @@ export interface HeadingProps {
|
|
|
6
6
|
/** A unique identifier for the field. */
|
|
7
7
|
id?: string;
|
|
8
8
|
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The visual size of the heading.
|
|
11
|
+
*
|
|
12
|
+
* There are no guarantee that the level set will render the same level in the HTML `<h*>` element.
|
|
13
|
+
* The heading level that gets rendered is determined by the parent `HeadingGroup` or `Section` component.
|
|
14
|
+
*/
|
|
10
15
|
size?: Level;
|
|
11
16
|
}
|
|
12
17
|
|