@shopify/ui-extensions 2023.4.2 → 2023.7.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/README.md +1 -1
- package/build/cjs/surfaces/admin/components/ResourceItem/ResourceItem.js +14 -0
- package/build/cjs/surfaces/admin/components/ResourceList/ResourceList.js +15 -0
- package/build/cjs/surfaces/admin/components/Thumbnail/Thumbnail.js +12 -0
- package/build/cjs/surfaces/admin.js +6 -0
- package/build/cjs/surfaces/checkout/extension.js +7 -28
- package/build/cjs/surfaces/checkout.js +0 -1
- package/build/esm/surfaces/admin/components/ResourceItem/ResourceItem.mjs +10 -0
- package/build/esm/surfaces/admin/components/ResourceList/ResourceList.mjs +11 -0
- package/build/esm/surfaces/admin/components/Thumbnail/Thumbnail.mjs +8 -0
- package/build/esm/surfaces/admin.mjs +3 -0
- package/build/esm/surfaces/checkout/extension.mjs +7 -27
- package/build/esm/surfaces/checkout.mjs +1 -1
- package/build/esnext/surfaces/admin/components/ResourceItem/ResourceItem.esnext +10 -0
- package/build/esnext/surfaces/admin/components/ResourceList/ResourceList.esnext +11 -0
- package/build/esnext/surfaces/admin/components/Thumbnail/Thumbnail.esnext +8 -0
- package/build/esnext/surfaces/admin.esnext +3 -0
- package/build/esnext/surfaces/checkout/extension.esnext +7 -27
- package/build/esnext/surfaces/checkout.esnext +1 -1
- package/build/ts/api.d.ts +0 -15
- package/build/ts/api.d.ts.map +1 -1
- package/build/ts/extension.d.ts +0 -3
- package/build/ts/extension.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/action/action.d.ts +5 -2
- package/build/ts/surfaces/admin/api/action/action.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api/block/block.d.ts +10 -0
- package/build/ts/surfaces/admin/api/block/block.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/block/block.doc.d.ts +4 -0
- package/build/ts/surfaces/admin/api/block/block.doc.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.d.ts +45 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.d.ts +46 -0
- package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/shared.d.ts +9 -0
- package/build/ts/surfaces/admin/api/shared.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api/standard/standard.d.ts +18 -2
- package/build/ts/surfaces/admin/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/admin/api.d.ts +4 -1
- package/build/ts/surfaces/admin/api.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Checkbox/Checkbox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Form/Form.d.ts +0 -10
- package/build/ts/surfaces/admin/components/Form/Form.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Form/Form.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/ResourceItem/ResourceItem.d.ts +17 -0
- package/build/ts/surfaces/admin/components/ResourceItem/ResourceItem.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/ResourceList/ResourceList.d.ts +26 -0
- package/build/ts/surfaces/admin/components/ResourceList/ResourceList.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components/Select/Select.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Thumbnail/Thumbnail.d.ts +19 -0
- package/build/ts/surfaces/admin/components/Thumbnail/Thumbnail.d.ts.map +1 -0
- package/build/ts/surfaces/admin/components.d.ts +6 -0
- package/build/ts/surfaces/admin/components.d.ts.map +1 -1
- package/build/ts/surfaces/admin/extension-targets.d.ts +10 -4
- package/build/ts/surfaces/admin/extension-targets.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts +9 -0
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-item.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts +67 -1
- package/build/ts/surfaces/checkout/api/checkout/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/{payment-method/render.d.ts → payment/payment-option-item.d.ts} +2 -2
- package/build/ts/surfaces/checkout/api/payment/payment-option-item.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/pickup/{pickup-points.d.ts → pickup-location-list.d.ts} +3 -3
- package/build/ts/surfaces/checkout/api/pickup/pickup-location-list.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/pickup/{pickup-locations.d.ts → pickup-point-list.d.ts} +3 -3
- package/build/ts/surfaces/checkout/api/pickup/pickup-point-list.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/redeemable/{render.d.ts → redeemable.d.ts} +2 -2
- package/build/ts/surfaces/checkout/api/redeemable/redeemable.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/shared.d.ts +91 -1
- package/build/ts/surfaces/checkout/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/shipping/{shipping-method-details.d.ts → shipping-option-item.d.ts} +4 -4
- package/build/ts/surfaces/checkout/api/shipping/shipping-option-item.d.ts.map +1 -0
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +171 -171
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api.d.ts +9 -9
- package/build/ts/surfaces/checkout/api.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/TextField/TextField.d.ts +1 -1
- package/build/ts/surfaces/checkout/components/shared.d.ts +11 -2
- package/build/ts/surfaces/checkout/components/shared.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/extension.d.ts +7 -28
- package/build/ts/surfaces/checkout/extension.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/globals.d.ts +2 -2
- package/build/ts/surfaces/checkout/globals.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/targets.d.ts +411 -0
- package/build/ts/surfaces/checkout/targets.d.ts.map +1 -0
- package/build/ts/surfaces/checkout.d.ts +1 -1
- package/build/ts/surfaces/checkout.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/cart-line/cart-line-item.d.ts +9 -0
- package/build/ts/surfaces/customer-account/api/cart-line/cart-line-item.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +1212 -0
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/api/shared.d.ts +126 -0
- package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/api.d.ts +4 -0
- package/build/ts/surfaces/customer-account/api.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/extension.d.ts +16 -0
- package/build/ts/surfaces/customer-account/extension.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/globals.d.ts +11 -0
- package/build/ts/surfaces/customer-account/globals.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account/targets.d.ts +78 -0
- package/build/ts/surfaces/customer-account/targets.d.ts.map +1 -0
- package/build/ts/surfaces/customer-account.d.ts +8 -0
- package/build/ts/surfaces/customer-account.d.ts.map +1 -0
- package/build/ts/utilities/registration.d.ts +5 -5
- package/build/ts/utilities/registration.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -8
- package/src/api.ts +0 -18
- package/src/extension.ts +0 -4
- package/src/surfaces/admin/api/action/action.ts +6 -4
- package/src/surfaces/admin/api/block/block.doc.ts +20 -0
- package/src/surfaces/admin/api/block/block.ts +11 -0
- package/src/surfaces/admin/api/product-configuration/product-details-configuration.ts +49 -0
- package/src/surfaces/admin/api/product-configuration/product-variant-details-configuration.ts +50 -0
- package/src/surfaces/admin/api/shared.ts +6 -0
- package/src/surfaces/admin/api/standard/standard.ts +20 -8
- package/src/surfaces/admin/api.ts +4 -1
- package/src/surfaces/admin/components/Checkbox/Checkbox.doc.ts +1 -7
- package/src/surfaces/admin/components/Form/Form.doc.ts +0 -5
- package/src/surfaces/admin/components/Form/Form.ts +0 -12
- package/src/surfaces/admin/components/HeadingGroup/HeadingGroup.doc.ts +0 -7
- package/src/surfaces/admin/components/ResourceItem/ResourceItem.ts +19 -0
- package/src/surfaces/admin/components/ResourceItem/examples/basic-ResourceItem.example.ts +22 -0
- package/src/surfaces/admin/components/ResourceList/ResourceList.ts +30 -0
- package/src/surfaces/admin/components/ResourceList/examples/basic-ResourceList.example.ts +29 -0
- package/src/surfaces/admin/components/Select/Select.doc.ts +1 -7
- package/src/surfaces/admin/components/Thumbnail/Thumbnail.ts +31 -0
- package/src/surfaces/admin/components/Thumbnail/examples/basic-Thumbnail.example.ts +13 -0
- package/src/surfaces/admin/components.ts +6 -0
- package/src/surfaces/admin/extension-targets.ts +38 -3
- package/src/surfaces/checkout/api/cart-line/cart-line-item.ts +10 -0
- package/src/surfaces/checkout/api/checkout/checkout.ts +83 -1
- package/src/surfaces/checkout/api/{payment-method/render.ts → payment/payment-option-item.ts} +1 -1
- package/src/surfaces/checkout/api/pickup/{pickup-points.ts → pickup-location-list.ts} +2 -2
- package/src/surfaces/checkout/api/pickup/{pickup-locations.ts → pickup-point-list.ts} +2 -2
- package/src/surfaces/checkout/api/redeemable/{render.ts → redeemable.ts} +1 -1
- package/src/surfaces/checkout/api/shared.ts +103 -0
- package/src/surfaces/checkout/api/shipping/{shipping-method-details.ts → shipping-option-item.ts} +3 -3
- package/src/surfaces/checkout/api/standard/README.md +12 -10
- package/src/surfaces/checkout/api/standard/standard.ts +180 -187
- package/src/surfaces/checkout/api.ts +18 -10
- package/src/surfaces/checkout/components/Banner/examples/basic-banner.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blockLayout.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockLayout/examples/basic-blocklayout.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockSpacer/examples/basic-blockspacer.example.ts +1 -1
- package/src/surfaces/checkout/components/BlockStack/examples/basic-blockstack.example.ts +1 -1
- package/src/surfaces/checkout/components/Button/examples/basic-button.example.ts +1 -1
- package/src/surfaces/checkout/components/Checkbox/examples/basic-checkbox.example.ts +1 -1
- package/src/surfaces/checkout/components/Choice/examples/basic-choice.example.ts +1 -1
- package/src/surfaces/checkout/components/ChoiceList/examples/basic-choicelist.example.ts +1 -1
- package/src/surfaces/checkout/components/DateField/examples/basic-datefield.example.ts +1 -1
- package/src/surfaces/checkout/components/DatePicker/examples/basic-datepicker.example.ts +1 -1
- package/src/surfaces/checkout/components/Disclosure/examples/basic-disclosure.example.ts +1 -1
- package/src/surfaces/checkout/components/Divider/examples/basic-divider.example.ts +1 -1
- package/src/surfaces/checkout/components/Form/examples/basic-form.example.ts +1 -1
- package/src/surfaces/checkout/components/Grid/examples/basic-grid.example.ts +1 -1
- package/src/surfaces/checkout/components/GridItem/examples/basic-griditem.example.ts +1 -1
- package/src/surfaces/checkout/components/Heading/examples/basic-heading.example.ts +1 -1
- package/src/surfaces/checkout/components/HeadingGroup/examples/basic-headinggroup.example.ts +1 -1
- package/src/surfaces/checkout/components/Icon/examples/basic-icon.example.ts +1 -1
- package/src/surfaces/checkout/components/Image/examples/basic-image.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlineLayout.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineLayout/examples/basic-inlinelayout.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineSpacer/examples/basic-inlinespacer.example.ts +1 -1
- package/src/surfaces/checkout/components/InlineStack/examples/basic-inlinestack.example.ts +1 -1
- package/src/surfaces/checkout/components/Link/examples/basic-link.example.ts +1 -1
- package/src/surfaces/checkout/components/List/examples/basic-list.example.ts +1 -1
- package/src/surfaces/checkout/components/ListItem/examples/basic-listitem.example.ts +1 -1
- package/src/surfaces/checkout/components/Modal/examples/basic-modal.example.ts +1 -1
- package/src/surfaces/checkout/components/PhoneField/PhoneField.ts +1 -1
- package/src/surfaces/checkout/components/PhoneField/examples/basic-phonefield.example.ts +1 -1
- package/src/surfaces/checkout/components/Popover/examples/basic-popover.example.ts +1 -1
- package/src/surfaces/checkout/components/Pressable/examples/basic-pressable.example.ts +1 -1
- package/src/surfaces/checkout/components/ScrollView/examples/basic-scrollview.example.ts +1 -1
- package/src/surfaces/checkout/components/Select/examples/basic-select.example.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonImage/examples/basic-skeletonimage.example.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonText/examples/basic-skeletontext.example.ts +1 -1
- package/src/surfaces/checkout/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts +1 -1
- package/src/surfaces/checkout/components/Spinner/examples/basic-spinner.example.ts +1 -1
- package/src/surfaces/checkout/components/Stepper/examples/basic-stepper.example.ts +1 -1
- package/src/surfaces/checkout/components/Tag/examples/basic-tag.example.ts +1 -1
- package/src/surfaces/checkout/components/Text/examples/basic-text.example.ts +1 -1
- package/src/surfaces/checkout/components/TextBlock/examples/basic-textblock.example.ts +1 -1
- package/src/surfaces/checkout/components/TextField/TextField.ts +1 -1
- package/src/surfaces/checkout/components/TextField/examples/basic-textfield.example.ts +1 -1
- package/src/surfaces/checkout/components/Tooltip/examples/basic-tooltip.example.ts +1 -1
- package/src/surfaces/checkout/components/View/examples/basic-view.example.ts +1 -1
- package/src/surfaces/checkout/components/shared.ts +22 -5
- package/src/surfaces/checkout/extension.ts +10 -56
- package/src/surfaces/checkout/globals.ts +7 -4
- package/src/surfaces/checkout/style/examples/style.example.ts +1 -1
- package/src/surfaces/checkout/style/examples/style.example.tsx +8 -2
- package/src/surfaces/checkout/targets.ts +701 -0
- package/src/surfaces/checkout.ts +1 -1
- package/src/surfaces/customer-account/api/cart-line/cart-line-item.ts +10 -0
- package/src/surfaces/customer-account/api/order-status/order-status.ts +1414 -0
- package/src/surfaces/customer-account/api/shared.ts +953 -0
- package/src/surfaces/customer-account/api.ts +66 -0
- package/src/surfaces/customer-account/extension.ts +21 -0
- package/src/surfaces/customer-account/globals.ts +18 -0
- package/src/surfaces/customer-account/targets.ts +116 -0
- package/src/surfaces/customer-account.ts +8 -0
- package/src/utilities/registration.ts +13 -12
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-details.d.ts +0 -9
- package/build/ts/surfaces/checkout/api/cart-line/cart-line-details.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/payment-method/render.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/pickup/pickup-locations.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/pickup/pickup-points.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/redeemable/render.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/api/shipping/shipping-method-details.d.ts.map +0 -1
- package/build/ts/surfaces/checkout/extension-points.d.ts +0 -220
- package/build/ts/surfaces/checkout/extension-points.d.ts.map +0 -1
- package/src/surfaces/checkout/api/cart-line/cart-line-details.ts +0 -10
- package/src/surfaces/checkout/components/Banner/README.md +0 -14
- package/src/surfaces/checkout/components/BlockLayout/README.md +0 -101
- package/src/surfaces/checkout/components/BlockSpacer/README.md +0 -14
- package/src/surfaces/checkout/components/BlockStack/README.md +0 -77
- package/src/surfaces/checkout/components/Button/README.md +0 -22
- package/src/surfaces/checkout/components/Checkbox/README.md +0 -18
- package/src/surfaces/checkout/components/Choice/README.md +0 -14
- package/src/surfaces/checkout/components/ChoiceList/README.md +0 -14
- package/src/surfaces/checkout/components/Divider/README.md +0 -13
- package/src/surfaces/checkout/components/Form/README.md +0 -21
- package/src/surfaces/checkout/components/Grid/README.md +0 -105
- package/src/surfaces/checkout/components/GridItem/README.md +0 -72
- package/src/surfaces/checkout/components/Heading/README.md +0 -19
- package/src/surfaces/checkout/components/HeadingGroup/README.md +0 -7
- package/src/surfaces/checkout/components/Icon/README.md +0 -15
- package/src/surfaces/checkout/components/Image/README.md +0 -53
- package/src/surfaces/checkout/components/InlineLayout/README.md +0 -103
- package/src/surfaces/checkout/components/InlineSpacer/README.md +0 -14
- package/src/surfaces/checkout/components/InlineStack/README.md +0 -87
- package/src/surfaces/checkout/components/Link/README.md +0 -18
- package/src/surfaces/checkout/components/List/README.md +0 -19
- package/src/surfaces/checkout/components/ListItem/README.md +0 -5
- package/src/surfaces/checkout/components/PhoneField/README.md +0 -49
- package/src/surfaces/checkout/components/Pressable/README.md +0 -74
- package/src/surfaces/checkout/components/ScrollView/README.md +0 -62
- package/src/surfaces/checkout/components/Select/README.md +0 -41
- package/src/surfaces/checkout/components/SkeletonImage/README.md +0 -13
- package/src/surfaces/checkout/components/SkeletonText/README.md +0 -13
- package/src/surfaces/checkout/components/SkeletonTextBlock/README.md +0 -13
- package/src/surfaces/checkout/components/Spinner/README.md +0 -14
- package/src/surfaces/checkout/components/Stepper/README.md +0 -28
- package/src/surfaces/checkout/components/Tag/README.md +0 -14
- package/src/surfaces/checkout/components/Text/README.md +0 -17
- package/src/surfaces/checkout/components/TextBlock/README.md +0 -15
- package/src/surfaces/checkout/components/TextField/README.md +0 -49
- package/src/surfaces/checkout/components/Tooltip/README.md +0 -8
- package/src/surfaces/checkout/components/View/README.md +0 -97
- package/src/surfaces/checkout/extension-points.ts +0 -369
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ A checkout extension using “vanilla” JavaScript would be written as follows
|
|
|
14
14
|
import {extension, TextField} from '@shopify/ui-extensions/checkout';
|
|
15
15
|
|
|
16
16
|
export default extension(
|
|
17
|
-
'
|
|
17
|
+
'purchase.checkout.block.render',
|
|
18
18
|
(root, {i18n, metafields, applyMetafieldChange}) => {
|
|
19
19
|
const metafield = metafields.current.find(
|
|
20
20
|
(metafield) =>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@remote-ui/core');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Resource items represent specific objects within a collection, such as products or orders. They provide contextual information on the resource type and link to the object’s detail page.
|
|
9
|
+
*
|
|
10
|
+
* A `ResourceItem` should be rendered within a `ResourceList`.
|
|
11
|
+
*/
|
|
12
|
+
const ResourceItem = core.createRemoteComponent('ResourceItem');
|
|
13
|
+
|
|
14
|
+
exports.ResourceItem = ResourceItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@remote-ui/core');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* `ResourceList` displays a filterable collection of objects of the same type, like products or customers.
|
|
9
|
+
*
|
|
10
|
+
* `ResourceList` should help merchants find an object and navigate to a full-page representation of it.
|
|
11
|
+
* A resource list should contain `ResourceItem` components.
|
|
12
|
+
*/
|
|
13
|
+
const ResourceList = core.createRemoteComponent('ResourceList');
|
|
14
|
+
|
|
15
|
+
exports.ResourceList = ResourceList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@remote-ui/core');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Thumbnails are used as a visual anchor and identifier for an object. They should be used along with text to provide context.
|
|
9
|
+
*/
|
|
10
|
+
const Thumbnail = core.createRemoteComponent('Thumbnail');
|
|
11
|
+
|
|
12
|
+
exports.Thumbnail = Thumbnail;
|
|
@@ -22,10 +22,13 @@ var Link = require('./admin/components/Link/Link.js');
|
|
|
22
22
|
var NumberField = require('./admin/components/NumberField/NumberField.js');
|
|
23
23
|
var PasswordField = require('./admin/components/PasswordField/PasswordField.js');
|
|
24
24
|
var Pressable = require('./admin/components/Pressable/Pressable.js');
|
|
25
|
+
var ResourceItem = require('./admin/components/ResourceItem/ResourceItem.js');
|
|
26
|
+
var ResourceList = require('./admin/components/ResourceList/ResourceList.js');
|
|
25
27
|
var Select = require('./admin/components/Select/Select.js');
|
|
26
28
|
var Text = require('./admin/components/Text/Text.js');
|
|
27
29
|
var TextArea = require('./admin/components/TextArea/TextArea.js');
|
|
28
30
|
var TextField = require('./admin/components/TextField/TextField.js');
|
|
31
|
+
var Thumbnail = require('./admin/components/Thumbnail/Thumbnail.js');
|
|
29
32
|
var URLField = require('./admin/components/URLField/URLField.js');
|
|
30
33
|
|
|
31
34
|
|
|
@@ -51,8 +54,11 @@ exports.Link = Link.Link;
|
|
|
51
54
|
exports.NumberField = NumberField.NumberField;
|
|
52
55
|
exports.PasswordField = PasswordField.PasswordField;
|
|
53
56
|
exports.Pressable = Pressable.Pressable;
|
|
57
|
+
exports.ResourceItem = ResourceItem.ResourceItem;
|
|
58
|
+
exports.ResourceList = ResourceList.ResourceList;
|
|
54
59
|
exports.Select = Select.Select;
|
|
55
60
|
exports.Text = Text.Text;
|
|
56
61
|
exports.TextArea = TextArea.TextArea;
|
|
57
62
|
exports.TextField = TextField.TextField;
|
|
63
|
+
exports.Thumbnail = Thumbnail.Thumbnail;
|
|
58
64
|
exports.URLField = URLField.URLField;
|
|
@@ -2,43 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @param target The extension point you are registering for.
|
|
9
|
-
*
|
|
10
|
-
* @param implementation The function that will be called when Checkout begins rendering
|
|
11
|
-
* your extension. This function is called with the API checkout provided to your
|
|
12
|
-
* extension.
|
|
13
|
-
*/
|
|
14
|
-
const extension = createExtensionRegistrationFunction();
|
|
5
|
+
var registration = require('../../utilities/registration.js');
|
|
6
|
+
|
|
7
|
+
const extension = registration.createExtensionRegistrationFunction();
|
|
15
8
|
|
|
16
9
|
/**
|
|
17
|
-
* Registers your UI Extension to run for the selected extension
|
|
10
|
+
* Registers your UI Extension to run for the selected extension target.
|
|
18
11
|
*
|
|
19
|
-
* @param target The extension
|
|
12
|
+
* @param target The extension target you are registering for.
|
|
20
13
|
*
|
|
21
14
|
* @param implementation The function that will be called when Checkout begins rendering
|
|
22
15
|
* your extension. This function is called with the API checkout provided to your
|
|
23
16
|
* extension.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated This is deprecated, use `extension` instead.
|
|
24
19
|
*/
|
|
25
20
|
const extend = extension;
|
|
26
|
-
/**
|
|
27
|
-
* This function takes an extension function that is expecting a `RemoteRoot` as its
|
|
28
|
-
* first argument, and returns a new function that accepts a `RemoteChannel` instead.
|
|
29
|
-
* This is a convenience that allows the raw UI extension API to only expose the simpler
|
|
30
|
-
* `RemoteChannel` type, while allowing the extension to use the more powerful `RemoteRoot`,
|
|
31
|
-
* provided by a version of `@remote-ui/core` that the extension controls.
|
|
32
|
-
*/
|
|
33
|
-
function createExtensionRegistrationFunction() {
|
|
34
|
-
const extensionWrapper = (target, implementation) => {
|
|
35
|
-
var _shopify;
|
|
36
|
-
(_shopify = globalThis.shopify) === null || _shopify === void 0 ? void 0 : _shopify.extend(target, implementation);
|
|
37
|
-
return implementation;
|
|
38
|
-
};
|
|
39
|
-
return extensionWrapper;
|
|
40
|
-
}
|
|
41
21
|
|
|
42
|
-
exports.createExtensionRegistrationFunction = createExtensionRegistrationFunction;
|
|
43
22
|
exports.extend = extend;
|
|
44
23
|
exports.extension = extension;
|
|
@@ -49,7 +49,6 @@ var style = require('./checkout/style/style.js');
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
exports.createExtensionRegistrationFunction = extension.createExtensionRegistrationFunction;
|
|
53
52
|
exports.extend = extension.extend;
|
|
54
53
|
exports.extension = extension.extension;
|
|
55
54
|
exports.Banner = Banner.Banner;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resource items represent specific objects within a collection, such as products or orders. They provide contextual information on the resource type and link to the object’s detail page.
|
|
5
|
+
*
|
|
6
|
+
* A `ResourceItem` should be rendered within a `ResourceList`.
|
|
7
|
+
*/
|
|
8
|
+
const ResourceItem = createRemoteComponent('ResourceItem');
|
|
9
|
+
|
|
10
|
+
export { ResourceItem };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `ResourceList` displays a filterable collection of objects of the same type, like products or customers.
|
|
5
|
+
*
|
|
6
|
+
* `ResourceList` should help merchants find an object and navigate to a full-page representation of it.
|
|
7
|
+
* A resource list should contain `ResourceItem` components.
|
|
8
|
+
*/
|
|
9
|
+
const ResourceList = createRemoteComponent('ResourceList');
|
|
10
|
+
|
|
11
|
+
export { ResourceList };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Thumbnails are used as a visual anchor and identifier for an object. They should be used along with text to provide context.
|
|
5
|
+
*/
|
|
6
|
+
const Thumbnail = createRemoteComponent('Thumbnail');
|
|
7
|
+
|
|
8
|
+
export { Thumbnail };
|
|
@@ -18,8 +18,11 @@ export { Link } from './admin/components/Link/Link.mjs';
|
|
|
18
18
|
export { NumberField } from './admin/components/NumberField/NumberField.mjs';
|
|
19
19
|
export { PasswordField } from './admin/components/PasswordField/PasswordField.mjs';
|
|
20
20
|
export { Pressable } from './admin/components/Pressable/Pressable.mjs';
|
|
21
|
+
export { ResourceItem } from './admin/components/ResourceItem/ResourceItem.mjs';
|
|
22
|
+
export { ResourceList } from './admin/components/ResourceList/ResourceList.mjs';
|
|
21
23
|
export { Select } from './admin/components/Select/Select.mjs';
|
|
22
24
|
export { Text } from './admin/components/Text/Text.mjs';
|
|
23
25
|
export { TextArea } from './admin/components/TextArea/TextArea.mjs';
|
|
24
26
|
export { TextField } from './admin/components/TextField/TextField.mjs';
|
|
27
|
+
export { Thumbnail } from './admin/components/Thumbnail/Thumbnail.mjs';
|
|
25
28
|
export { URLField } from './admin/components/URLField/URLField.mjs';
|
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* @param target The extension point you are registering for.
|
|
5
|
-
*
|
|
6
|
-
* @param implementation The function that will be called when Checkout begins rendering
|
|
7
|
-
* your extension. This function is called with the API checkout provided to your
|
|
8
|
-
* extension.
|
|
9
|
-
*/
|
|
1
|
+
import { createExtensionRegistrationFunction } from '../../utilities/registration.mjs';
|
|
2
|
+
|
|
10
3
|
const extension = createExtensionRegistrationFunction();
|
|
11
4
|
|
|
12
5
|
/**
|
|
13
|
-
* Registers your UI Extension to run for the selected extension
|
|
6
|
+
* Registers your UI Extension to run for the selected extension target.
|
|
14
7
|
*
|
|
15
|
-
* @param target The extension
|
|
8
|
+
* @param target The extension target you are registering for.
|
|
16
9
|
*
|
|
17
10
|
* @param implementation The function that will be called when Checkout begins rendering
|
|
18
11
|
* your extension. This function is called with the API checkout provided to your
|
|
19
12
|
* extension.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated This is deprecated, use `extension` instead.
|
|
20
15
|
*/
|
|
21
16
|
const extend = extension;
|
|
22
|
-
/**
|
|
23
|
-
* This function takes an extension function that is expecting a `RemoteRoot` as its
|
|
24
|
-
* first argument, and returns a new function that accepts a `RemoteChannel` instead.
|
|
25
|
-
* This is a convenience that allows the raw UI extension API to only expose the simpler
|
|
26
|
-
* `RemoteChannel` type, while allowing the extension to use the more powerful `RemoteRoot`,
|
|
27
|
-
* provided by a version of `@remote-ui/core` that the extension controls.
|
|
28
|
-
*/
|
|
29
|
-
function createExtensionRegistrationFunction() {
|
|
30
|
-
const extensionWrapper = (target, implementation) => {
|
|
31
|
-
var _shopify;
|
|
32
|
-
(_shopify = globalThis.shopify) === null || _shopify === void 0 ? void 0 : _shopify.extend(target, implementation);
|
|
33
|
-
return implementation;
|
|
34
|
-
};
|
|
35
|
-
return extensionWrapper;
|
|
36
|
-
}
|
|
37
17
|
|
|
38
|
-
export {
|
|
18
|
+
export { extend, extension };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { extend, extension } from './checkout/extension.mjs';
|
|
2
2
|
export { Banner } from './checkout/components/Banner/Banner.mjs';
|
|
3
3
|
export { BlockLayout } from './checkout/components/BlockLayout/BlockLayout.mjs';
|
|
4
4
|
export { BlockSpacer } from './checkout/components/BlockSpacer/BlockSpacer.mjs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resource items represent specific objects within a collection, such as products or orders. They provide contextual information on the resource type and link to the object’s detail page.
|
|
5
|
+
*
|
|
6
|
+
* A `ResourceItem` should be rendered within a `ResourceList`.
|
|
7
|
+
*/
|
|
8
|
+
const ResourceItem = createRemoteComponent('ResourceItem');
|
|
9
|
+
|
|
10
|
+
export { ResourceItem };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `ResourceList` displays a filterable collection of objects of the same type, like products or customers.
|
|
5
|
+
*
|
|
6
|
+
* `ResourceList` should help merchants find an object and navigate to a full-page representation of it.
|
|
7
|
+
* A resource list should contain `ResourceItem` components.
|
|
8
|
+
*/
|
|
9
|
+
const ResourceList = createRemoteComponent('ResourceList');
|
|
10
|
+
|
|
11
|
+
export { ResourceList };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRemoteComponent } from '@remote-ui/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Thumbnails are used as a visual anchor and identifier for an object. They should be used along with text to provide context.
|
|
5
|
+
*/
|
|
6
|
+
const Thumbnail = createRemoteComponent('Thumbnail');
|
|
7
|
+
|
|
8
|
+
export { Thumbnail };
|
|
@@ -18,8 +18,11 @@ export { Link } from './admin/components/Link/Link.esnext';
|
|
|
18
18
|
export { NumberField } from './admin/components/NumberField/NumberField.esnext';
|
|
19
19
|
export { PasswordField } from './admin/components/PasswordField/PasswordField.esnext';
|
|
20
20
|
export { Pressable } from './admin/components/Pressable/Pressable.esnext';
|
|
21
|
+
export { ResourceItem } from './admin/components/ResourceItem/ResourceItem.esnext';
|
|
22
|
+
export { ResourceList } from './admin/components/ResourceList/ResourceList.esnext';
|
|
21
23
|
export { Select } from './admin/components/Select/Select.esnext';
|
|
22
24
|
export { Text } from './admin/components/Text/Text.esnext';
|
|
23
25
|
export { TextArea } from './admin/components/TextArea/TextArea.esnext';
|
|
24
26
|
export { TextField } from './admin/components/TextField/TextField.esnext';
|
|
27
|
+
export { Thumbnail } from './admin/components/Thumbnail/Thumbnail.esnext';
|
|
25
28
|
export { URLField } from './admin/components/URLField/URLField.esnext';
|
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* @param target The extension point you are registering for.
|
|
5
|
-
*
|
|
6
|
-
* @param implementation The function that will be called when Checkout begins rendering
|
|
7
|
-
* your extension. This function is called with the API checkout provided to your
|
|
8
|
-
* extension.
|
|
9
|
-
*/
|
|
1
|
+
import { createExtensionRegistrationFunction } from '../../utilities/registration.esnext';
|
|
2
|
+
|
|
10
3
|
const extension = createExtensionRegistrationFunction();
|
|
11
4
|
|
|
12
5
|
/**
|
|
13
|
-
* Registers your UI Extension to run for the selected extension
|
|
6
|
+
* Registers your UI Extension to run for the selected extension target.
|
|
14
7
|
*
|
|
15
|
-
* @param target The extension
|
|
8
|
+
* @param target The extension target you are registering for.
|
|
16
9
|
*
|
|
17
10
|
* @param implementation The function that will be called when Checkout begins rendering
|
|
18
11
|
* your extension. This function is called with the API checkout provided to your
|
|
19
12
|
* extension.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated This is deprecated, use `extension` instead.
|
|
20
15
|
*/
|
|
21
16
|
const extend = extension;
|
|
22
|
-
/**
|
|
23
|
-
* This function takes an extension function that is expecting a `RemoteRoot` as its
|
|
24
|
-
* first argument, and returns a new function that accepts a `RemoteChannel` instead.
|
|
25
|
-
* This is a convenience that allows the raw UI extension API to only expose the simpler
|
|
26
|
-
* `RemoteChannel` type, while allowing the extension to use the more powerful `RemoteRoot`,
|
|
27
|
-
* provided by a version of `@remote-ui/core` that the extension controls.
|
|
28
|
-
*/
|
|
29
|
-
function createExtensionRegistrationFunction() {
|
|
30
|
-
const extensionWrapper = (target, implementation) => {
|
|
31
|
-
var _shopify;
|
|
32
|
-
(_shopify = globalThis.shopify) === null || _shopify === void 0 ? void 0 : _shopify.extend(target, implementation);
|
|
33
|
-
return implementation;
|
|
34
|
-
};
|
|
35
|
-
return extensionWrapper;
|
|
36
|
-
}
|
|
37
17
|
|
|
38
|
-
export {
|
|
18
|
+
export { extend, extension };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { extend, extension } from './checkout/extension.esnext';
|
|
2
2
|
export { Banner } from './checkout/components/Banner/Banner.esnext';
|
|
3
3
|
export { BlockLayout } from './checkout/components/BlockLayout/BlockLayout.esnext';
|
|
4
4
|
export { BlockSpacer } from './checkout/components/BlockSpacer/BlockSpacer.esnext';
|
package/build/ts/api.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export interface StandardApi {
|
|
2
|
-
readonly extensionPoint: string;
|
|
3
|
-
}
|
|
4
1
|
/**
|
|
5
2
|
* This defines the i18n.translate() signature.
|
|
6
3
|
*/
|
|
@@ -63,16 +60,4 @@ export interface I18n {
|
|
|
63
60
|
*/
|
|
64
61
|
translate: I18nTranslate;
|
|
65
62
|
}
|
|
66
|
-
export interface Intents {
|
|
67
|
-
/**
|
|
68
|
-
* The URL that was used to launch the intent.
|
|
69
|
-
*/
|
|
70
|
-
launchUrl?: string | URL;
|
|
71
|
-
}
|
|
72
|
-
export interface Navigation {
|
|
73
|
-
/**
|
|
74
|
-
* A method to navigate to a specific route.
|
|
75
|
-
*/
|
|
76
|
-
navigate: (url: string | URL) => void;
|
|
77
|
-
}
|
|
78
63
|
//# sourceMappingURL=api.d.ts.map
|
package/build/ts/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,CAAC,eAAe,GAAG,MAAM,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;QAAC,CAAC,cAAc,EAAE,MAAM,GAAG,eAAe,GAAG,MAAM,GAAG,MAAM,CAAA;KAAC,GACtE,eAAe,SAAS,MAAM,GAAG,MAAM,GACtC,MAAM,GACN,CAAC,MAAM,GAAG,eAAe,CAAC,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,IAAI;IACnB;;;;;;;OAOG;IACH,YAAY,EAAE,CACZ,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,CAAC,EAAE;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI,CAAC,mBAAmB,KAC/D,MAAM,CAAC;IAEZ;;;;;;;OAOG;IACH,cAAc,EAAE,CACd,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,CAAC,EAAE;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI,CAAC,mBAAmB,KAC/D,MAAM,CAAC;IAEZ;;;;;;;;;;;OAWG;IACH,UAAU,EAAE,CACV,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,IAAI,CAAC,qBAAqB,KACjE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,SAAS,EAAE,aAAa,CAAC;CAC1B"}
|
package/build/ts/extension.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { RemoteRoot, RemoteChannel, RemoteComponentType } from '@remote-ui/core';
|
|
2
|
-
export interface Extension<Api, Result> {
|
|
3
|
-
(api: Api): Result;
|
|
4
|
-
}
|
|
5
2
|
export interface RenderExtensionConnection<AllowedComponents extends RemoteComponentType<string, any, any> = RemoteComponentType<any, any, any>> {
|
|
6
3
|
readonly channel: RemoteChannel;
|
|
7
4
|
readonly components: AllowedComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,yBAAyB,CACxC,iBAAiB,SAAS,mBAAmB,CAC3C,MAAM,EACN,GAAG,EACH,GAAG,CACJ,GAAG,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAEtC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;CACxC;AAED,MAAM,WAAW,eAAe,CAC9B,GAAG,EACH,iBAAiB,SAAS,mBAAmB,CAC3C,MAAM,EACN,GAAG,EACH,GAAG,CACJ,GAAG,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAEtC,CACE,UAAU,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,EACxD,GAAG,EAAE,GAAG,GACP,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,6BAA6B,CAC5C,GAAG,EACH,iBAAiB,SAAS,mBAAmB,CAC3C,MAAM,EACN,GAAG,EACH,GAAG,CACJ,GAAG,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAEtC,CACE,IAAI,EAAE,UAAU,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,EACtD,GAAG,EAAE,GAAG,GACP,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { StandardApi } from '../standard/standard';
|
|
2
|
-
import type { I18n } from '../../../../api';
|
|
3
2
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
|
+
import type { Data } from '../shared';
|
|
4
4
|
export interface ActionExtensionApi<ExtensionTarget extends AnyExtensionTarget> extends StandardApi<ExtensionTarget> {
|
|
5
|
-
i18n: I18n;
|
|
6
5
|
/**
|
|
7
6
|
* Closes the extension. Calling this method is equivalent to the merchant clicking the "x" in the corner of the overlay.
|
|
8
7
|
*/
|
|
9
8
|
close: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Information about the currently viewed or selected items.
|
|
11
|
+
*/
|
|
12
|
+
data: Data;
|
|
10
13
|
}
|
|
11
14
|
//# sourceMappingURL=action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,kBAAkB,CAAC,eAAe,SAAS,kBAAkB,CAC5E,SAAQ,WAAW,CAAC,eAAe,CAAC;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StandardApi } from '../standard/standard';
|
|
2
|
+
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
|
+
import type { Data } from '../shared';
|
|
4
|
+
export interface BlockExtensionApi<ExtensionTarget extends AnyExtensionTarget> extends StandardApi<ExtensionTarget> {
|
|
5
|
+
/**
|
|
6
|
+
* Information about the currently viewed or selected items.
|
|
7
|
+
*/
|
|
8
|
+
data: Data;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/block/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,iBAAiB,CAAC,eAAe,SAAS,kBAAkB,CAC3E,SAAQ,WAAW,CAAC,eAAe,CAAC;IACpC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/block/block.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAeX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { StandardApi } from '../standard/standard';
|
|
2
|
+
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
|
+
interface Product {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
handle: string;
|
|
7
|
+
status: 'ACTIVE' | 'ARCHIVED' | 'DRAFT';
|
|
8
|
+
totalVariants: number;
|
|
9
|
+
totalInventory: number;
|
|
10
|
+
hasOnlyDefaultVariant: boolean;
|
|
11
|
+
onlineStoreUrl?: string;
|
|
12
|
+
options: {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
position: number;
|
|
16
|
+
values: string[];
|
|
17
|
+
}[];
|
|
18
|
+
productType: string;
|
|
19
|
+
productCategory?: string;
|
|
20
|
+
productComponents: ProductComponent[];
|
|
21
|
+
}
|
|
22
|
+
export interface ProductComponent {
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
featuredImage?: {
|
|
26
|
+
id?: string | null;
|
|
27
|
+
url?: string | null;
|
|
28
|
+
altText?: string | null;
|
|
29
|
+
} | null;
|
|
30
|
+
totalVariants: number;
|
|
31
|
+
productUrl: string;
|
|
32
|
+
componentVariantsCount: number;
|
|
33
|
+
nonComponentVariantsCount: number;
|
|
34
|
+
}
|
|
35
|
+
export interface ProductDetailsConfigurationApi<ExtensionTarget extends AnyExtensionTarget> extends StandardApi<ExtensionTarget> {
|
|
36
|
+
data: {
|
|
37
|
+
product: Product;
|
|
38
|
+
app: {
|
|
39
|
+
launchUrl: string;
|
|
40
|
+
applicationUrl: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=product-details-configuration.d.ts.map
|
package/build/ts/surfaces/admin/api/product-configuration/product-details-configuration.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-details-configuration.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/product-configuration/product-details-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,EAAE,CAAC;IACJ,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE;QACd,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,GAAG,IAAI,CAAC;IACT,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,8BAA8B,CAC7C,eAAe,SAAS,kBAAkB,CAC1C,SAAQ,WAAW,CAAC,eAAe,CAAC;IACpC,IAAI,EAAE;QAEJ,OAAO,EAAE,OAAO,CAAC;QACjB,GAAG,EAAE;YACH,SAAS,EAAE,MAAM,CAAC;YAClB,cAAc,EAAE,MAAM,CAAC;SACxB,CAAC;KACH,CAAC;CACH"}
|
package/build/ts/surfaces/admin/api/product-configuration/product-variant-details-configuration.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { StandardApi } from '../standard/standard';
|
|
2
|
+
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
|
+
interface ProductVariant {
|
|
4
|
+
id: string;
|
|
5
|
+
sku: string;
|
|
6
|
+
barcode: string;
|
|
7
|
+
title: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
price: string;
|
|
10
|
+
compareAtPrice: string;
|
|
11
|
+
taxable: boolean;
|
|
12
|
+
taxCode: string;
|
|
13
|
+
weight: number;
|
|
14
|
+
selectedOptions: {
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
18
|
+
productVariantComponents: ProductVariantComponent[];
|
|
19
|
+
}
|
|
20
|
+
export interface ProductVariantComponent {
|
|
21
|
+
id: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
title: string;
|
|
24
|
+
sku?: string;
|
|
25
|
+
image?: {
|
|
26
|
+
id?: string | null;
|
|
27
|
+
url?: string | null;
|
|
28
|
+
altText?: string | null;
|
|
29
|
+
} | null;
|
|
30
|
+
productVariantUrl: string;
|
|
31
|
+
selectedOptions: {
|
|
32
|
+
name: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}[];
|
|
35
|
+
}
|
|
36
|
+
export interface ProductVariantDetailsConfigurationApi<ExtensionTarget extends AnyExtensionTarget> extends StandardApi<ExtensionTarget> {
|
|
37
|
+
data: {
|
|
38
|
+
variant: ProductVariant;
|
|
39
|
+
app: {
|
|
40
|
+
launchUrl: string;
|
|
41
|
+
applicationUrl: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=product-variant-details-configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-variant-details-configuration.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/product-configuration/product-variant-details-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,wBAAwB,EAAE,uBAAuB,EAAE,CAAC;CACrD;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QACN,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,GAAG,IAAI,CAAC;IACT,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,MAAM,WAAW,qCAAqC,CACpD,eAAe,SAAS,kBAAkB,CAC1C,SAAQ,WAAW,CAAC,eAAe,CAAC;IACpC,IAAI,EAAE;QAEJ,OAAO,EAAE,cAAc,CAAC;QACxB,GAAG,EAAE;YACH,SAAS,EAAE,MAAM,CAAC;YAClB,cAAc,EAAE,MAAM,CAAC;SACxB,CAAC;KACH,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/surfaces/admin/api/shared.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,QAAQ,EAAE;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CAC1B"}
|
|
@@ -1,15 +1,31 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { I18n } from '../../../../api';
|
|
2
2
|
import type { ExtensionTarget as AnyExtensionTarget } from '../../extension-targets';
|
|
3
|
+
export interface Intents {
|
|
4
|
+
/**
|
|
5
|
+
* The URL that was used to launch the intent.
|
|
6
|
+
*/
|
|
7
|
+
launchUrl?: string | URL;
|
|
8
|
+
}
|
|
9
|
+
export interface Navigation {
|
|
10
|
+
/**
|
|
11
|
+
* A method to navigate to a specific route.
|
|
12
|
+
*/
|
|
13
|
+
navigate: (url: string | URL) => void;
|
|
14
|
+
}
|
|
3
15
|
/**
|
|
4
16
|
* The following APIs are provided to all extension targets.
|
|
5
17
|
*/
|
|
6
|
-
export interface StandardApi<ExtensionTarget extends AnyExtensionTarget>
|
|
18
|
+
export interface StandardApi<ExtensionTarget extends AnyExtensionTarget> {
|
|
7
19
|
/**
|
|
8
20
|
* The identifier of the running extension target.
|
|
9
21
|
*/
|
|
10
22
|
extension: {
|
|
11
23
|
target: ExtensionTarget;
|
|
12
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Utilities for translating content according to the current localization of the admin.
|
|
27
|
+
* More info - https://shopify.dev/docs/apps/checkout/best-practices/localizing-ui-extensions
|
|
28
|
+
*/
|
|
13
29
|
i18n: I18n;
|
|
14
30
|
/**
|
|
15
31
|
* Provides information to the receiver the of an intent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/standard/standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/api/standard/standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAEnF,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,KAAK,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,eAAe,SAAS,kBAAkB;IACrE;;OAEG;IACH,SAAS,EAAE;QACT,MAAM,EAAE,eAAe,CAAC;KACzB,CAAC;IACF;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export type { I18n, I18nTranslate } from '../../api';
|
|
2
|
-
export type { StandardApi } from './api/standard/standard';
|
|
2
|
+
export type { StandardApi, Navigation, Intents } from './api/standard/standard';
|
|
3
3
|
export type { CustomerSegmentationTemplateApi } from './api/customer-segmentation-template/customer-segmentation-template';
|
|
4
4
|
export type { ActionExtensionApi } from './api/action/action';
|
|
5
|
+
export type { BlockExtensionApi } from './api/block/block';
|
|
6
|
+
export type { ProductDetailsConfigurationApi } from './api/product-configuration/product-details-configuration';
|
|
7
|
+
export type { ProductVariantDetailsConfigurationApi } from './api/product-configuration/product-variant-details-configuration';
|
|
5
8
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/admin/api.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,WAAW,CAAC;AACnD,YAAY,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/admin/api.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,WAAW,CAAC;AACnD,YAAY,EAAC,WAAW,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,yBAAyB,CAAC;AAC9E,YAAY,EAAC,+BAA+B,EAAC,MAAM,qEAAqE,CAAC;AACzH,YAAY,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAC,8BAA8B,EAAC,MAAM,2DAA2D,CAAC;AAC9G,YAAY,EAAC,qCAAqC,EAAC,MAAM,mEAAmE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/components/Checkbox/Checkbox.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Checkbox.doc.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/admin/components/Checkbox/Checkbox.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAsCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|