@zonos/elements 1.3.133 → 1.3.135
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/dist/cjs/{CheckoutConfig-1d38a21d.js → CheckoutConfig-165db6b6.js} +1 -1
- package/dist/cjs/{cart-1bab358a.js → cart-0f32f556.js} +1 -1
- package/dist/cjs/{handleFetch-a8dfb07c.js → handleFetch-4a90f091.js} +1 -1
- package/dist/cjs/index.cjs.js +43 -40
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-f1874626.js → paypal-045033fb.js} +2 -2
- package/dist/cjs/zonos-address_7.cjs.entry.js +11 -11
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +39 -22
- package/dist/cjs/zonos-checkout.cjs.entry.js +25 -5
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +25 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +22 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/logging/sendErrorLog.js +1 -1
- package/dist/collection/scripts/{_overrideWithTestPublicCredential.js → _getWithTestPublicCredential.js} +9 -9
- package/dist/collection/scripts/_zonosBase.js +5 -2
- package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
- package/dist/collection/types/generated/graphql.internal.types.js +1 -0
- package/dist/esm/{CheckoutConfig-56c63bdf.js → CheckoutConfig-930107d4.js} +1 -1
- package/dist/esm/{cart-a5a8ec74.js → cart-3e0e4d5c.js} +1 -1
- package/dist/esm/{handleFetch-40fc3562.js → handleFetch-22cb914b.js} +1 -1
- package/dist/esm/index.js +44 -41
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-828b4297.js → paypal-7f41ff20.js} +2 -2
- package/dist/esm/zonos-address_7.entry.js +11 -11
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +4 -4
- package/dist/esm/zonos-cart-items_13.entry.js +39 -22
- package/dist/esm/zonos-checkout.entry.js +25 -5
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +6 -6
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +6 -6
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +5 -5
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/{CheckoutConfig-56c63bdf.js → CheckoutConfig-930107d4.js} +1 -1
- package/dist/esm-es5/{cart-a5a8ec74.js → cart-3e0e4d5c.js} +1 -1
- package/dist/esm-es5/handleFetch-22cb914b.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-828b4297.js → paypal-7f41ff20.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +9 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/scripts/_getWithTestPublicCredential.d.ts +4 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +27 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +43 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.ts +2 -4
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-f0ea7e98.system.entry.js → p-05826697.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0082eefd.system.entry.js → p-1360c4b5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb6d1e26.system.entry.js → p-1393d259.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4953542e.system.entry.js → p-16e5df29.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4794c0ab.system.js → p-1856c3fa.system.js} +1 -1
- package/dist/zonos-elements/{p-22458c90.system.entry.js → p-1ac0f941.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3cfa90d1.system.entry.js → p-22d099fb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d963d9d4.entry.js → p-22e2f162.entry.js} +1 -1
- package/dist/zonos-elements/{p-92fbf9e6.entry.js → p-234b3f74.entry.js} +1 -1
- package/dist/zonos-elements/{p-c39dc3e9.system.entry.js → p-24488838.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a89fb48.system.entry.js → p-31a776aa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-31e85dce.system.entry.js → p-3a5fb01a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-937d08c1.entry.js → p-3f2ea446.entry.js} +1 -1
- package/dist/zonos-elements/{p-db70f65a.system.entry.js → p-49cecdf9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bdc7e244.system.entry.js → p-4b680c1e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3efbcf88.system.entry.js → p-5775cd68.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7b2ee5b0.js → p-69045ca3.js} +1 -1
- package/dist/zonos-elements/{p-f7f481be.entry.js → p-6b8db2d3.entry.js} +1 -1
- package/dist/zonos-elements/{p-0cf44851.entry.js → p-84df573a.entry.js} +1 -1
- package/dist/zonos-elements/{p-fe899c47.entry.js → p-856bf7a4.entry.js} +1 -1
- package/dist/zonos-elements/{p-adf7262a.entry.js → p-85fbb5f0.entry.js} +1 -1
- package/dist/zonos-elements/p-860e46ab.js +1 -0
- package/dist/zonos-elements/{p-dd517bcb.js → p-8759f66b.js} +1 -1
- package/dist/zonos-elements/{p-78227a4e.system.entry.js → p-887b05eb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-817741b7.entry.js → p-897c809a.entry.js} +1 -1
- package/dist/zonos-elements/{p-db5e0d2b.entry.js → p-95f26bc3.entry.js} +1 -1
- package/dist/zonos-elements/p-99d47e1c.entry.js +1 -0
- package/dist/zonos-elements/{p-4170b042.entry.js → p-a0cc4dd2.entry.js} +1 -1
- package/dist/zonos-elements/p-a0de6e0f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-b3edff32.system.entry.js → p-a28f3298.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f61c142c.system.entry.js → p-aaa3addd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0cfab69e.entry.js → p-acae88db.entry.js} +1 -1
- package/dist/zonos-elements/p-acb45eb6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-40579074.entry.js → p-b1bb00a8.entry.js} +1 -1
- package/dist/zonos-elements/{p-68cfdd01.system.entry.js → p-b500f0d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e067b2e.entry.js → p-b6fea87a.entry.js} +1 -1
- package/dist/zonos-elements/{p-942a0605.js → p-b7307c61.js} +1 -1
- package/dist/zonos-elements/{p-fb6cf324.entry.js → p-b9e4e410.entry.js} +1 -1
- package/dist/zonos-elements/{p-40596087.system.js → p-bb418544.system.js} +1 -1
- package/dist/zonos-elements/{p-6b00344a.entry.js → p-bbd5119f.entry.js} +1 -1
- package/dist/zonos-elements/{p-320e7cb9.system.entry.js → p-be468605.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c127846c.entry.js → p-bec4d2c7.entry.js} +1 -1
- package/dist/zonos-elements/{p-e5f27005.system.entry.js → p-c0719959.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-e933cbf0.system.entry.js → p-de020c11.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-311f6702.entry.js → p-e44ab8b8.entry.js} +1 -1
- package/dist/zonos-elements/p-e9db73d9.entry.js +1 -0
- package/dist/zonos-elements/{p-1da0c1cb.entry.js → p-f9f48476.entry.js} +1 -1
- package/dist/zonos-elements/p-fa41d3e4.system.js +1 -0
- package/dist/zonos-elements/{p-81bb0bde.system.js → p-fa790aaf.system.js} +1 -1
- package/dist/zonos-elements/p-fb7d8b52.entry.js +1 -0
- package/dist/zonos-elements/p-febc72e7.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/handleFetch-40fc3562.js +0 -1
- package/dist/types/scripts/_overrideWithTestPublicCredential.d.ts +0 -4
- package/dist/zonos-elements/p-0cfb97ae.js +0 -1
- package/dist/zonos-elements/p-3972da4c.entry.js +0 -1
- package/dist/zonos-elements/p-6305e92c.system.js +0 -1
- package/dist/zonos-elements/p-8aaada48.system.entry.js +0 -1
- package/dist/zonos-elements/p-b2641a83.entry.js +0 -1
- package/dist/zonos-elements/p-e052f141.system.entry.js +0 -1
- package/dist/zonos-elements/p-f5a5e20b.system.js +0 -1
- package/dist/zonos-elements/p-fa4b0119.entry.js +0 -1
|
@@ -52,7 +52,7 @@ export class ZonosDialog {
|
|
|
52
52
|
const borderStyle = getBorderRadius({
|
|
53
53
|
overrideBorderStyle: this.borderStyle,
|
|
54
54
|
});
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '506cffe43252a55397dc49ff230311ab38b7f049', class: classes([
|
|
56
56
|
'zonos--elements',
|
|
57
57
|
this.open && 'open',
|
|
58
58
|
this.isLoading && 'is-loading',
|
|
@@ -64,10 +64,10 @@ export class ZonosDialog {
|
|
|
64
64
|
'--zonos--height': this.height || 'initial',
|
|
65
65
|
'--zonos--min-height': this.minHeight || '500px',
|
|
66
66
|
'--zonos--width': this.width,
|
|
67
|
-
} }, h("div", { key: '
|
|
67
|
+
} }, h("div", { key: '42944e3338f04feca7cbc928bb12ebeba555c6a5', class: "zonos--backdrop" }), h("div", { key: 'b4e17568fbee4cbe15f745bf49efaab8d1be8b6e', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, h("div", { key: '255c11f4c3dc5d2f28703b35a774f1d63078f0b0', class: "zonos--dialog" }, this.isLoading && (h("div", { key: '48f1d08a3d2bbeb765be73f2c65dd566dbceebe4', class: "zonos--loading" }, h("zonos-spinner", { key: 'e0250720aefea8b5ac13000cd61a980e0e09e42f', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: 'bccb4783b92d4b90ab67faacbc6f888af3f52aa5', class: "zonos--header" }, this.headerText && (h("h3", { key: '79c0da7d43317142d177a03629cb3916d9f7923f', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: 'c835b4a928867c66aed65e0204503553cfe410eb', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, variant: "subtle" })))), h("div", { key: '2c9612b655676ac82fb6a7cec268dd12ad0bd8f0', class: classes([
|
|
68
68
|
'zonos--body',
|
|
69
69
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
70
|
-
]) }, h("slot", { key: '
|
|
70
|
+
]) }, h("slot", { key: '035123e25049b21951bcfd0a765dd1eca0c50c99' })), h("slot", { key: '3b40b61cb3a234348689f33ce2376d58fbc2f0e7', name: "dialog-footer" })))));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "zonos-dialog"; }
|
|
73
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,17 +17,17 @@ export class ZonosInput {
|
|
|
17
17
|
this.inputChange.emit(newValue);
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '70d14250b09b4c2e8e865c00d10015f6d0f9a8da', class: classes([
|
|
21
21
|
'zonos--input zonos--elements',
|
|
22
22
|
this.inputSize,
|
|
23
23
|
this.isError && 'has-error',
|
|
24
24
|
]), style: {
|
|
25
25
|
'--zonos--border-radius': getBorderRadius(),
|
|
26
26
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
27
|
-
} }, h("div", { key: '
|
|
27
|
+
} }, h("div", { key: '1a7020e339f23c1aba8004b613ac4252a51e0686', class: classes([
|
|
28
28
|
'zonos--label-wrapper',
|
|
29
29
|
this.isDisabled && 'disabled',
|
|
30
|
-
]) }, h("input", { key: '
|
|
30
|
+
]) }, h("input", { key: '6a4ffdb5c8f2d0058bc7ebde5427a749cedd62d1', class: classes([
|
|
31
31
|
'zonos--floated-input',
|
|
32
32
|
!!this.inputLabel && 'has-label',
|
|
33
33
|
this.inputValue && 'has-content',
|
|
@@ -35,7 +35,7 @@ export class ZonosInput {
|
|
|
35
35
|
]), disabled: this.isDisabled, onInput: e => {
|
|
36
36
|
const input = e.target;
|
|
37
37
|
this.inputChange.emit(input.value);
|
|
38
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: '
|
|
38
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: '62408e5b16c51f9ccb88066e384391fc7c96f0ec', class: "zonos--floated-label", "data-label": this.inputLabel }))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "zonos-input"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,9 +16,9 @@ export class ZonosLanguageSelect {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
const { selectedLocale } = localizationStore;
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '38bd8435fdeb1a017b9ed7253d599b99f370a0b6', class: "zonos--elements", style: {
|
|
20
20
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, h("div", { key: '
|
|
21
|
+
} }, h("div", { key: 'c7cffeecf5da28e323f60a5b4e3b292cfbe900bc', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '331f76a0a0a57cbd9dbd282ba854956c183a75dd', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: '15743243ddbfb50dd533cf91254d6e41db7597a5', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-language-select"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,7 +7,7 @@ export class ZonosLink {
|
|
|
7
7
|
this.linkTitle = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '9c08d2689b011f162ef47271bd50e9e1fc2d177f', class: "zonos--elements" }, h("a", { key: 'ad0a8003308783081a7070bb9f06cd2387bb3a78', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: 'd54f21f0f36196b9b5a0bf7f63a989e9dd1c411e' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "zonos-link"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,11 +10,11 @@ export class ZonosLogo {
|
|
|
10
10
|
const filterColor = this.theme === 'DARK'
|
|
11
11
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
12
12
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: 'ef19703a0588e4010e50c2e4bef5abe9eb48efc7', class: classes(['zonos--elements zonos--logo']), style: {
|
|
14
14
|
'--zonos--filter-color': filterColor,
|
|
15
15
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
16
16
|
'--zonos--width': this.width,
|
|
17
|
-
} }, h("img", { key: '
|
|
17
|
+
} }, h("img", { key: 'b14760baccb072ab399d11432fbc4c3c9c8ee876', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "zonos-logo"; }
|
|
20
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,11 +14,11 @@ export class ZonosRestState {
|
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
16
|
const imageUrl = this.getImageRestState();
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: 'f7c1a1268bff06d00acbc20d0fc0b2a16d01398c', class: classes(['zonos--elements zonos--restState']), style: {
|
|
18
18
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
19
|
-
} }, h("div", { key: '
|
|
19
|
+
} }, h("div", { key: '0b66ca94e47e24b49af7e92ba5b34f70a9fe7f6b', class: "zonos--restState-image" }, h("img", { key: '22cfd5958bd55f5ebe0373f8afc2c332b66ed57b', alt: this.restStateType, onError: () => {
|
|
20
20
|
this.isErrorImageLoad = true;
|
|
21
|
-
}, src: imageUrl })), h("div", { key: '
|
|
21
|
+
}, src: imageUrl })), h("div", { key: '90f11551b07b4cc3597b336b932e9968aac9cb78', class: "content" }, h("zonos-text", { key: '23195baa5b5850adf26c948b1f65aec5a267ab88', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '333cb489d5e0df33062f8c64976c77f6130e36c6', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: 'a1b7b14e0ca75914f4586bce93a93df767bc54e9', class: "action" }, h("slot", { key: '0edd004d97fc997147526ef56b581971eb1309f4' }))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-rest-state"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js
CHANGED
|
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
|
|
|
8
8
|
this.label = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '82ed89ddf7915df04bad887c887edb2cdd116ff8', class: "zonos--elements", style: {
|
|
12
12
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, h("zonos-v-stack", { key: '
|
|
13
|
+
} }, h("zonos-v-stack", { key: '6c91fb64db203a773f2fb375059173f2e0a4b7db', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'b26a23574556b119e27bf5fb0cb5308709b0eb73', class: "zonos--select-dialog-header" }, h("zonos-text", { key: '3347503084cae69ccfca1fe5a503174e2acecc3c', type: "boldLabel" }, this.label), h("zonos-button", { key: '66e91d6c0a46407cc88c4d269d880eaa27b650db', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), h("slot", { key: '2db7470d4893918939dd54d2f2e994f49517def9' }))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-select-dialog-header"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,9 +7,9 @@ export class ZonosToggle {
|
|
|
7
7
|
this.value = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '4b224821c94249757cbd19e27a75af29c9fbab25', class: classes(['zonos--elements zonos--toggle']), style: {
|
|
11
11
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
12
|
-
} }, h("div", { key: '
|
|
12
|
+
} }, h("div", { key: 'e8a3a44ccfebef2f06d94938c19aaf640d844d9e', class: "wrapper" }, this.options.map(option => {
|
|
13
13
|
const selected = option.value === this.value;
|
|
14
14
|
return (h("button", { class: classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
|
|
15
15
|
this.toggleChanged.emit(option.value);
|
|
@@ -7,10 +7,10 @@ export class ZonosTooltip {
|
|
|
7
7
|
this.showTooltip = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '091516a0a68f8b4ab2580a8118900c34b39e931c', class: "zonos--elements" }, h("div", { key: '77769b18201f87d601d5bdb860a4bc8c84bb4e90', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '139c1de415b94e12b8d575e3662cba9faf56cb2f' }), h("div", { key: '60c38adf74e9b776001844c2205ac87a4562b525', class: classes([
|
|
11
11
|
this.showTooltip && 'zonos--show-tooltip',
|
|
12
12
|
'zonos--tooltip-content',
|
|
13
|
-
]) }, h("zonos-text", { key: '
|
|
13
|
+
]) }, h("zonos-text", { key: 'bb87c44ee7831c24b47c43b17d2b04c79112e900', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '5d114d284a15a1661e926bfe5fae9251513c7370', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-tooltip"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,9 +7,9 @@ export class VStack {
|
|
|
7
7
|
this.spacing = 24;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '99d265d6cc1c8f746217f3f42d21b8d7d5ba70b6', style: {
|
|
11
11
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
12
|
-
} }, h("div", { key: '
|
|
12
|
+
} }, h("div", { key: 'f935f28aebb85434e71afcc52b7dc4463df8eb4a', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '53f2a34378fcd8b291446bf8293e89307bc15d1f' }))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "zonos-v-stack"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,12 +56,12 @@ export class ZonosVirtualScroll {
|
|
|
56
56
|
} }, this.renderItem(i)));
|
|
57
57
|
accHeight += itemHeight;
|
|
58
58
|
}
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '1aa49d98976b0856f960a6fc67ee7d04e1dd5317' }, h("div", { key: 'ede653037499e0b925e1cab13a632f8a6da6b9f4',
|
|
60
60
|
// to capture scroll action
|
|
61
61
|
class: "scroller", style: {
|
|
62
62
|
height: `${this.totalHeight}px`,
|
|
63
63
|
width: `${W}px`,
|
|
64
|
-
} }), h("div", { key: '
|
|
64
|
+
} }), h("div", { key: 'da2fb9c529a96b9f31c3604235e3a6913a145743',
|
|
65
65
|
// to display items
|
|
66
66
|
class: "item-container", ref: el => (this.container = el), style: {
|
|
67
67
|
height: `${this.totalHeight}px`,
|
|
@@ -10,7 +10,7 @@ export class ZonosComponent {
|
|
|
10
10
|
return format(this.first, this.middle, this.last);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return h("div", { key: '
|
|
13
|
+
return h("div", { key: '4781e3197d34a39d600c1eebc8ed97e801791c81' }, "Hello, World! I'm ", this.getText());
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-component"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,9 +18,9 @@ export class ZonosHelloDialogFooter {
|
|
|
18
18
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
19
19
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
20
20
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '3ec3d830c3818a9f3661eefe7da50520919e7800', class: "zonos--elements" }, h("div", { key: 'c52ee06e602c33012d37e3a3bae67ec470acecae', class: "zonos--hello-dialog-footer", style: {
|
|
22
22
|
'--zonos--primary-color': primaryColor,
|
|
23
|
-
} }, h("a", { key: '
|
|
23
|
+
} }, h("a", { key: '62b4898ad2704b97ad9845371434b34cef8d4041', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '97d1b95deded6d04d83b6f5728b82d8292a69b10', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: '1397ed4aa265a546dea81b492c9db676b2b7c506', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '6fb04fd6b8c1be8c555fac00850e77a66d8f5f42', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'e1cc202d6266137f4d289922031738cce0759a41', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "zonos-hello-dialog-footer"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -232,18 +232,18 @@ export class ZonosHelloDialog {
|
|
|
232
232
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
233
233
|
const currentPage = this.getCurrentPageEnum();
|
|
234
234
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
235
|
-
return (h(Host, { key: '
|
|
235
|
+
return (h(Host, { key: '7ff123654399aee05fd295c108e01d924a8964e5', class: "zonos--elements" }, h("div", { key: '316720cc18d1b9fbbf86cbfcde1f25106b1197e8', class: classes([
|
|
236
236
|
'zonos--hello-dialog',
|
|
237
237
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
238
238
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
239
239
|
!!this.mobileLocationOverride &&
|
|
240
240
|
'zonos--hello-dialog-mobile-override',
|
|
241
241
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
242
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
242
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '29a0018c2c8eb7fdde938e432ea783517d364ea8' }, h("div", { key: 'a882452996503ddb4feb3e431eaf9cc14dc2ff34', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '2c656e792daa59c0ce5770d71a779de270a8adc8', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '1dd3473645c5581fee41da086a478b6eb6f3104e', spacing: 24 }, h("zonos-country-flag", { key: '57bdcb6b5e2044b65868a53e91220b7eea5c389e', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '8f01898edbd5c30771a2c8d12e0919f6b41cc96c', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '75728fcc40efe82ff58e767b3c3c9f60f96f37b2', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: 'b82ebf2adacbb72637064b04957846ee79f10bd5', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '7a0ae96961883e1a55248d4163da3bed2e76d077', spacing: 8 }, this.restrictedItems.map(item => {
|
|
243
243
|
var _a;
|
|
244
244
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
245
|
-
}), h("zonos-card", { key: '
|
|
246
|
-
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '
|
|
245
|
+
}), h("zonos-card", { key: 'd6a1f8270f3b6c69febc04224e6a0fa7ada5e07a', spacing: "12px" }, h("zonos-v-stack", { key: '209eac48b847c3ac4c7e8eb9df35c95416d89536', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
246
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: 'e9444ec1c3c3616712faeba92734b4275d373da1', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'a612e3daa6de5e5f73422ed8ebed8b3a682c3c46' }, h("zonos-country-select", { key: 'b45c18d7feaf95e74da6e0540ea28325a24d287b', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'e50779d3c0e3c83587ae445e9ded8e108f893e31' }, h("zonos-language-select", { key: 'b502cef6095a0e9a57b3c81fa354ca3614060878', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
247
247
|
}
|
|
248
248
|
static get is() { return "zonos-hello-dialog"; }
|
|
249
249
|
static get encapsulation() { return "shadow"; }
|
|
@@ -206,7 +206,7 @@ export class ZonosController {
|
|
|
206
206
|
zonosStore.organizationName = organizationName;
|
|
207
207
|
}
|
|
208
208
|
render() {
|
|
209
|
-
return h(Host, { key: '
|
|
209
|
+
return h(Host, { key: '465ac6979654a38581aef4bdde509c5e57f34a74', class: "zonos--elements" });
|
|
210
210
|
}
|
|
211
211
|
static get is() { return "zonos-controller"; }
|
|
212
212
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,7 +41,7 @@ export class ZonosPaypalPayment {
|
|
|
41
41
|
void this.loadPaypal();
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '6bfc962de500edbb105b7eb899711e48def78167', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '92d1b1c416f5e233c54e50d47129be375ef0a68b', class: "zonos--payment-paypal-container" })));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "zonos-paypal-payment"; }
|
|
47
47
|
static get encapsulation() { return "scoped"; }
|
|
@@ -138,7 +138,7 @@ export class ZonosAddress {
|
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
140
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
141
|
-
return (h(Host, { key: '
|
|
141
|
+
return (h(Host, { key: '15074e6cf5021e2d583838eb866f92cb8dad0c1e', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '4203a4dffc101ba0667e975ff2ebe6125e023509', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '66add8724cb61193252e44b7a8179fbabc34d3d2', class: "zonos--address-component" })));
|
|
142
142
|
}
|
|
143
143
|
static get is() { return "zonos-address"; }
|
|
144
144
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js
CHANGED
|
@@ -47,9 +47,9 @@ export class ZonosLinkAuthentication {
|
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
49
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: '8f2a168814430480824ef48220dd9a06da6ab3df', class: "zonos--link-authentication zonos--elements", style: {
|
|
51
51
|
'--zonos--border-radius': getBorderRadius(),
|
|
52
|
-
} }, h("zonos-text", { key: '
|
|
52
|
+
} }, h("zonos-text", { key: '0325aa30e9dd91ceca034859d64e7454ef489ad0', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '282a18cec412a0cfe5bc473b42cdf1ff38beaf9b', class: `zonos--link-authentication-component ${this.isEmailError && 'zonos--input-invalid'}` }), this.isEmailError && (h("zonos-text", { key: '8d1f66444d6bb925d9b581dd15fe2a7e2acf88a5', textColor: "red-600" }, translate('Please enter a valid email address.')))));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "zonos-link-authentication"; }
|
|
55
55
|
static get encapsulation() { return "scoped"; }
|
|
@@ -36,7 +36,7 @@ export class ZonosPayment {
|
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '8688b2ce3087fb2265b1b84229a3af6f6cba39e6', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '7b6bc40043d7d14e55faa7e60b85cdc60d56d00a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '39df45805f365e761f0001c075f94e0bdf99fabb', class: "zonos--payment-component" }), h("div", { key: 'a9e7d56ba2b0050926121e3ab8a61cbace9a6a14', class: "zonos--payment-paypal-container" })));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "zonos-payment"; }
|
|
42
42
|
static get encapsulation() { return "scoped"; }
|
|
@@ -23,7 +23,7 @@ export const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostRelea
|
|
|
23
23
|
endpoint,
|
|
24
24
|
errors,
|
|
25
25
|
href: window.location.href,
|
|
26
|
-
metadata: Object.assign({ domain: window.Zonos.domain, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
26
|
+
metadata: Object.assign({ appVersion: window.Zonos.version, domain: window.Zonos.domain, publicCredential: window.Zonos.zonosApiKey, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
27
27
|
? userAgentData
|
|
28
28
|
: window.navigator.userAgent }, metadata),
|
|
29
29
|
};
|
|
@@ -2,31 +2,31 @@ import { handleFetch } from "../components/utils/handleFetch";
|
|
|
2
2
|
import { log } from "../components/utils/logging/log";
|
|
3
3
|
import { logError } from "../components/utils/logging/logError";
|
|
4
4
|
/**
|
|
5
|
-
* Attempt to get
|
|
5
|
+
* Attempt to get test public credential to window.Zonos.zonosApiKey if needed
|
|
6
6
|
*/
|
|
7
|
-
export const
|
|
7
|
+
export const getWithTestPublicCredential = async () => {
|
|
8
8
|
const isTestMode = window.location.search.includes('zonosTestMode=1');
|
|
9
9
|
// Do nothing if the test mode is not enabled or the public credential
|
|
10
10
|
if (!isTestMode || !window.Zonos.zonosApiKey) {
|
|
11
|
-
return;
|
|
11
|
+
return null;
|
|
12
12
|
}
|
|
13
13
|
log('[ZONOS - loadZonos] Attempt test public credential', 'info');
|
|
14
14
|
// Try to get the test public credential if the test mode is enabled and the public credential key is not a test key
|
|
15
|
-
if (!!window.Zonos.zonosApiKey.includes('
|
|
15
|
+
if (!!window.Zonos.zonosApiKey.includes('credential_test')) {
|
|
16
16
|
log('[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key', 'info');
|
|
17
|
-
return;
|
|
17
|
+
return null;
|
|
18
18
|
}
|
|
19
19
|
const { errors: testPublicCredErrors, json: testPublicCredResult } = await handleFetch('/api/get-test-public-credential');
|
|
20
20
|
if (testPublicCredErrors.length || !testPublicCredResult) {
|
|
21
21
|
logError(`[ZONOS - loadZonos] Failed to get test public credential. Keep using production key`, testPublicCredErrors);
|
|
22
|
-
return;
|
|
22
|
+
return null;
|
|
23
23
|
}
|
|
24
24
|
const testPublicCredential = testPublicCredResult.publicCredential;
|
|
25
25
|
if (!testPublicCredential) {
|
|
26
26
|
logError('[ZONOS - loadZonos] No test public key credential. Keep using production key');
|
|
27
|
-
return;
|
|
27
|
+
return null;
|
|
28
28
|
}
|
|
29
|
-
log(`[ZONOS - loadZonos] Using test API key: ${testPublicCredential} for test mode`, 'info');
|
|
30
29
|
// Set the test public credential to the window object
|
|
31
|
-
|
|
30
|
+
log(`[ZONOS - loadZonos] Retrieve new test public token ${testPublicCredential}`, 'info');
|
|
31
|
+
return testPublicCredential;
|
|
32
32
|
};
|
|
@@ -3,9 +3,9 @@ import { log } from "../components/utils/logging/log";
|
|
|
3
3
|
import { logError } from "../components/utils/logging/logError";
|
|
4
4
|
import { checkIfLoadVersionDomain } from "./_checkIfLoadVersionDomain";
|
|
5
5
|
import { getNextFallbackUrl, MAIN_LOAD_CDN_TYPE, } from "./_getNextFallbackUrl";
|
|
6
|
+
import { getWithTestPublicCredential } from "./_getWithTestPublicCredential";
|
|
6
7
|
import { getZonosQaUrl } from "./_getZonosQaUrl";
|
|
7
8
|
import { zonosLoadStripe } from "./_loadStripe";
|
|
8
|
-
import { overrideWithTestPublicCredential } from "./_overrideWithTestPublicCredential";
|
|
9
9
|
import { getCartIdFromQueryParam } from "./cart/_getCartIdFromParam";
|
|
10
10
|
import { setupCartData } from "./cart/_setupCartData";
|
|
11
11
|
import { checkoutHiddenBtnSelector, } from "../types/checkout/CheckoutConfig";
|
|
@@ -119,7 +119,10 @@ Zonos.init = async (params) => {
|
|
|
119
119
|
_a.zonosApiKey = cartinfo.zonosApiKey;
|
|
120
120
|
}
|
|
121
121
|
// Try to request for test API key if the API key is production but query param isTestMode is provided
|
|
122
|
-
await
|
|
122
|
+
const testPublicCredential = await getWithTestPublicCredential();
|
|
123
|
+
if (testPublicCredential) {
|
|
124
|
+
_a.zonosApiKey = testPublicCredential;
|
|
125
|
+
}
|
|
123
126
|
}
|
|
124
127
|
// inject hidden button to body to trigger checkout right away if we have cartData
|
|
125
128
|
if (_a.cartId && _a.cartData) {
|
|
@@ -488,6 +488,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
488
488
|
failToGetQuoteErrors(variables, requestHeaders) {
|
|
489
489
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'failToGetQuoteErrors', 'query');
|
|
490
490
|
},
|
|
491
|
+
failedToGetOrder(variables, requestHeaders) {
|
|
492
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'failedToGetOrder', 'query');
|
|
493
|
+
},
|
|
491
494
|
getAudienceByAspectKey(variables, requestHeaders) {
|
|
492
495
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getAudienceByAspectKey', 'query');
|
|
493
496
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as handleFetch, l as log, a as logError } from './handleFetch-
|
|
1
|
+
import { h as handleFetch, l as log, a as logError } from './handleFetch-22cb914b.js';
|
|
2
2
|
|
|
3
3
|
const getTempCartById = async ({ cartId, retries, }) => {
|
|
4
4
|
const urlParams = new URLSearchParams(window.location.search);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-c493c4fe.js';
|
|
2
|
-
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, s as sendErrorLog, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, s as sendErrorLog, j as jsonParse } from './handleFetch-22cb914b.js';
|
|
3
3
|
import { i as isDarkColor } from './isDarkColor-c6924924.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-bdd709e7.js';
|
|
5
5
|
|
|
@@ -139,7 +139,7 @@ const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostReleaseError
|
|
|
139
139
|
endpoint,
|
|
140
140
|
errors,
|
|
141
141
|
href: window.location.href,
|
|
142
|
-
metadata: Object.assign({ domain: window.Zonos.domain, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
142
|
+
metadata: Object.assign({ appVersion: window.Zonos.version, domain: window.Zonos.domain, publicCredential: window.Zonos.zonosApiKey, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
143
143
|
? userAgentData
|
|
144
144
|
: window.navigator.userAgent }, metadata),
|
|
145
145
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as log,
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { l as log, h as handleFetch, a as logError } from './handleFetch-22cb914b.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-930107d4.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-930107d4.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -53,6 +53,36 @@ const getNextFallbackUrl = (currentCdnType) => {
|
|
|
53
53
|
return nextFallbackCdnType || null;
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Attempt to get test public credential to window.Zonos.zonosApiKey if needed
|
|
58
|
+
*/
|
|
59
|
+
const getWithTestPublicCredential = async () => {
|
|
60
|
+
const isTestMode = window.location.search.includes('zonosTestMode=1');
|
|
61
|
+
// Do nothing if the test mode is not enabled or the public credential
|
|
62
|
+
if (!isTestMode || !window.Zonos.zonosApiKey) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
log('[ZONOS - loadZonos] Attempt test public credential', 'info');
|
|
66
|
+
// Try to get the test public credential if the test mode is enabled and the public credential key is not a test key
|
|
67
|
+
if (!!window.Zonos.zonosApiKey.includes('credential_test')) {
|
|
68
|
+
log('[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key', 'info');
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const { errors: testPublicCredErrors, json: testPublicCredResult } = await handleFetch('/api/get-test-public-credential');
|
|
72
|
+
if (testPublicCredErrors.length || !testPublicCredResult) {
|
|
73
|
+
logError(`[ZONOS - loadZonos] Failed to get test public credential. Keep using production key`, testPublicCredErrors);
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
const testPublicCredential = testPublicCredResult.publicCredential;
|
|
77
|
+
if (!testPublicCredential) {
|
|
78
|
+
logError('[ZONOS - loadZonos] No test public key credential. Keep using production key');
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
// Set the test public credential to the window object
|
|
82
|
+
log(`[ZONOS - loadZonos] Retrieve new test public token ${testPublicCredential}`, 'info');
|
|
83
|
+
return testPublicCredential;
|
|
84
|
+
};
|
|
85
|
+
|
|
56
86
|
/**
|
|
57
87
|
* Extracts the zonosQaUrl from the url
|
|
58
88
|
*
|
|
@@ -94,7 +124,7 @@ const getZonosQaUrl = () => {
|
|
|
94
124
|
return null;
|
|
95
125
|
}
|
|
96
126
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
97
|
-
const cdnUrl = "https://v1.3.
|
|
127
|
+
const cdnUrl = "https://v1.3.135.js.zonos.com";
|
|
98
128
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
99
129
|
if (!qaUrl &&
|
|
100
130
|
(cdnUrl.includes('test.') ||
|
|
@@ -251,36 +281,6 @@ const zonosLoadStripe = async (...args) => {
|
|
|
251
281
|
return stripePromise.then(maybeStripe => initStripe(maybeStripe, args, startTime));
|
|
252
282
|
};
|
|
253
283
|
|
|
254
|
-
/**
|
|
255
|
-
* Attempt to get and override test public credential to window.Zonos.zonosApiKey if needed
|
|
256
|
-
*/
|
|
257
|
-
const overrideWithTestPublicCredential = async () => {
|
|
258
|
-
const isTestMode = window.location.search.includes('zonosTestMode=1');
|
|
259
|
-
// Do nothing if the test mode is not enabled or the public credential
|
|
260
|
-
if (!isTestMode || !window.Zonos.zonosApiKey) {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
log('[ZONOS - loadZonos] Attempt test public credential', 'info');
|
|
264
|
-
// Try to get the test public credential if the test mode is enabled and the public credential key is not a test key
|
|
265
|
-
if (!!window.Zonos.zonosApiKey.includes('test')) {
|
|
266
|
-
log('[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key', 'info');
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
const { errors: testPublicCredErrors, json: testPublicCredResult } = await handleFetch('/api/get-test-public-credential');
|
|
270
|
-
if (testPublicCredErrors.length || !testPublicCredResult) {
|
|
271
|
-
logError(`[ZONOS - loadZonos] Failed to get test public credential. Keep using production key`, testPublicCredErrors);
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
const testPublicCredential = testPublicCredResult.publicCredential;
|
|
275
|
-
if (!testPublicCredential) {
|
|
276
|
-
logError('[ZONOS - loadZonos] No test public key credential. Keep using production key');
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
log(`[ZONOS - loadZonos] Using test API key: ${testPublicCredential} for test mode`, 'info');
|
|
280
|
-
// Set the test public credential to the window object
|
|
281
|
-
window.Zonos.zonosApiKey = testPublicCredential;
|
|
282
|
-
};
|
|
283
|
-
|
|
284
284
|
const TEMP_CART_ID_QUERY_PARAM = 'tempCartUUID';
|
|
285
285
|
/**
|
|
286
286
|
* Simple function to get the cart id from the query param.
|
|
@@ -308,10 +308,10 @@ const zonosLoadUrl = (() => {
|
|
|
308
308
|
}
|
|
309
309
|
return null;
|
|
310
310
|
})();
|
|
311
|
-
const ZONOS_URL = "https://v1.3.
|
|
312
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
313
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
314
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
311
|
+
const ZONOS_URL = "https://v1.3.135.js.zonos.com";
|
|
312
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.135";
|
|
313
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.135";
|
|
314
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.135";
|
|
315
315
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
316
316
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
317
317
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -326,7 +326,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
326
326
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
327
327
|
Zonos._paypalMockResponse = null;
|
|
328
328
|
Zonos.isBigCommerce = false;
|
|
329
|
-
Zonos.releaseDate = "
|
|
329
|
+
Zonos.releaseDate = "1732640550316";
|
|
330
330
|
Zonos.isLegacyCheckout = false;
|
|
331
331
|
Zonos.domain = typeof window !== 'undefined'
|
|
332
332
|
? // domain that embeds the iframe
|
|
@@ -342,7 +342,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
342
342
|
Zonos.isNpm = true;
|
|
343
343
|
Zonos.zonosQaUrl = null;
|
|
344
344
|
Zonos.zonosQaUrlApi = null;
|
|
345
|
-
Zonos.version = `v${"1.3.
|
|
345
|
+
Zonos.version = `v${"1.3.135"}`;
|
|
346
346
|
Zonos.modeAlerted = false;
|
|
347
347
|
Zonos.cartData = null;
|
|
348
348
|
Zonos.paypal = null;
|
|
@@ -402,7 +402,10 @@ Zonos.init = async (params) => {
|
|
|
402
402
|
_a.zonosApiKey = cartinfo.zonosApiKey;
|
|
403
403
|
}
|
|
404
404
|
// Try to request for test API key if the API key is production but query param isTestMode is provided
|
|
405
|
-
await
|
|
405
|
+
const testPublicCredential = await getWithTestPublicCredential();
|
|
406
|
+
if (testPublicCredential) {
|
|
407
|
+
_a.zonosApiKey = testPublicCredential;
|
|
408
|
+
}
|
|
406
409
|
}
|
|
407
410
|
// inject hidden button to body to trigger checkout right away if we have cartData
|
|
408
411
|
if (_a.cartId && _a.cartData) {
|