@zonos/elements 1.3.25-alpha.0 → 1.3.26
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/{cart-ab3b679e.js → cart-7e817cad.js} +192 -8
- package/dist/cjs/{getBorderRadius-ea0984bb.js → getBorderRadius-074b46ef.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{isDarkColor-b14d5752.js → isDarkColor-371a3b1a.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-1471da9f.js → submitGtag-7e0065da.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +29 -12
- package/dist/cjs/zonos-checkout.cjs.entry.js +52 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +19 -12
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-3958bbeb.js → zonosStore-4c6c85da.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +20 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +49 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +8 -8
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +15 -8
- package/dist/collection/components/store/hello/localization.js +9 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/types/generated/graphql.customer.types.js +45 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +6 -0
- package/dist/esm/{cart-564ab33a.js → cart-13e6a811.js} +192 -8
- package/dist/esm/{getBorderRadius-5e5a5800.js → getBorderRadius-947c24de.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{isDarkColor-5185b62c.js → isDarkColor-f8324c10.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-90ebe7d0.js → submitGtag-c8bb6f2e.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +4 -4
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_12.entry.js +29 -12
- package/dist/esm/zonos-checkout.entry.js +52 -6
- package/dist/esm/zonos-controller.entry.js +4 -4
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +4 -4
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +19 -12
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +4 -4
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-8b9ea19c.js → zonosStore-ba9e541e.js} +1 -0
- package/dist/esm-es5/cart-13e6a811.js +1 -0
- package/dist/esm-es5/{getBorderRadius-5e5a5800.js → getBorderRadius-947c24de.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-5185b62c.js → isDarkColor-f8324c10.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-90ebe7d0.js → submitGtag-c8bb6f2e.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.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_3.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-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-8b9ea19c.js → zonosStore-ba9e541e.js} +1 -1
- package/dist/scripts/index.d.ts +60 -5
- 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 +2 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
- package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +2 -2
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -1
- package/dist/types/components/store/checkout/cart.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components.d.ts +4 -4
- package/dist/types/types/checkout/CheckoutConfig.d.ts +40 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +61 -1
- package/dist/types/types/generated/graphql.customer.types.ts +83 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +7 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +7 -1
- package/dist/types/types/hello/HelloConfig.d.ts +9 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-088d6460.system.entry.js → p-01304a58.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e2301200.system.entry.js → p-089c3737.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-07fe47f2.system.entry.js → p-094c7343.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-be14323b.system.js → p-0b538ed4.system.js} +1 -1
- package/dist/zonos-elements/p-121be462.system.js +1 -0
- package/dist/zonos-elements/{p-1e2fbb1d.system.entry.js → p-13454044.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e815af26.entry.js → p-1f2077df.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b2a2f68.entry.js → p-2011cb03.entry.js} +1 -1
- package/dist/zonos-elements/{p-b79753bb.system.entry.js → p-27d648c3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c0859b5.entry.js → p-2aa72606.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf9dca26.js → p-31b3d26b.js} +1 -1
- package/dist/zonos-elements/{p-c0ddef11.entry.js → p-3541e6dd.entry.js} +1 -1
- package/dist/zonos-elements/p-3baf7a18.entry.js +1 -0
- package/dist/zonos-elements/{p-d6796b73.system.entry.js → p-3dc59d89.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aaba6f75.entry.js → p-3e488bff.entry.js} +1 -1
- package/dist/zonos-elements/p-43c1dd27.system.entry.js +1 -0
- package/dist/zonos-elements/p-452ed1a7.entry.js +1 -0
- package/dist/zonos-elements/{p-87c4a2af.entry.js → p-492b8e12.entry.js} +1 -1
- package/dist/zonos-elements/{p-f3feed11.entry.js → p-5441b729.entry.js} +1 -1
- package/dist/zonos-elements/{p-c53cef11.js → p-5821856c.js} +1 -1
- package/dist/zonos-elements/{p-0ea19a4d.entry.js → p-5857ad65.entry.js} +1 -1
- package/dist/zonos-elements/{p-4d36edfd.system.entry.js → p-58edaab6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-474719c5.entry.js → p-60621085.entry.js} +1 -1
- package/dist/zonos-elements/{p-1752853e.entry.js → p-699a5376.entry.js} +1 -1
- package/dist/zonos-elements/{p-5992c6fb.system.entry.js → p-73ba4398.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e2bdba42.system.js → p-74488e31.system.js} +1 -1
- package/dist/zonos-elements/{p-84791c5c.entry.js → p-75ba695c.entry.js} +1 -1
- package/dist/zonos-elements/p-875a311d.js +1 -0
- package/dist/zonos-elements/{p-b45db572.system.entry.js → p-8f8baabf.system.entry.js} +1 -1
- package/dist/zonos-elements/p-99da2348.entry.js +1 -0
- package/dist/zonos-elements/{p-a5e9d372.js → p-9a1c0d02.js} +1 -1
- package/dist/zonos-elements/p-a5d823d3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-33b054d9.system.js → p-a8cb25de.system.js} +1 -1
- package/dist/zonos-elements/{p-02a01106.system.entry.js → p-a90393e0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8e83577.system.entry.js → p-acfb9be6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ba066673.entry.js → p-b88e52b5.entry.js} +1 -1
- package/dist/zonos-elements/{p-bfc30599.entry.js → p-bb5a9eaa.entry.js} +1 -1
- package/dist/zonos-elements/{p-d7e6cad0.system.entry.js → p-c0fcc0fa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7fa5a6ea.entry.js → p-c4e38b85.entry.js} +1 -1
- package/dist/zonos-elements/{p-a164ea90.system.entry.js → p-cab01f64.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d1771035.system.js +1 -0
- package/dist/zonos-elements/{p-1b76a929.system.entry.js → p-d3e61deb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c8705ac.entry.js → p-d4724ac8.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-8853e051.system.js → p-e37440ad.system.js} +1 -1
- package/dist/zonos-elements/{p-233c2599.system.entry.js → p-e80a5ed7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b7e4a6b0.entry.js → p-e975b187.entry.js} +1 -1
- package/dist/zonos-elements/{p-9912a954.js → p-eabe2abc.js} +1 -1
- package/dist/zonos-elements/{p-f1223c14.system.entry.js → p-eea8111c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8b58cf8.system.entry.js → p-f7e2d33b.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-564ab33a.js +0 -1
- package/dist/zonos-elements/p-63b0aef9.system.entry.js +0 -1
- package/dist/zonos-elements/p-6ed78fba.entry.js +0 -1
- package/dist/zonos-elements/p-6f154d66.system.js +0 -1
- package/dist/zonos-elements/p-9a0c5589.system.entry.js +0 -1
- package/dist/zonos-elements/p-b44de1c3.entry.js +0 -1
- package/dist/zonos-elements/p-c2688c49.system.js +0 -1
- package/dist/zonos-elements/p-d170253b.entry.js +0 -1
- package/dist/zonos-elements/p-fc4f1e0c.js +0 -1
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-074b46ef.js');
|
|
9
9
|
|
|
10
10
|
const zonosInputCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin:1px;}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:\"\";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}";
|
|
11
11
|
const ZonosInputStyle0 = zonosInputCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosLogoCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosNotificationCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-7e817cad.js');
|
|
7
7
|
const logError = require('./logError-4e2f2020.js');
|
|
8
|
-
require('./zonosStore-
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
8
|
+
require('./zonosStore-4c6c85da.js');
|
|
9
|
+
require('./isDarkColor-371a3b1a.js');
|
|
10
|
+
require('./getBorderRadius-074b46ef.js');
|
|
11
11
|
|
|
12
12
|
const zonosPaymentCss = ".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}";
|
|
13
13
|
const ZonosPaymentStyle0 = zonosPaymentCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-074b46ef.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
10
10
|
|
|
11
11
|
const zonosShippingRichRadioCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
9
9
|
|
|
@@ -2824,6 +2824,7 @@ const { dispose: zonosStoreDispose, reset, state: zonosStore, } = createStore(()
|
|
|
2824
2824
|
productListUrlPattern: '',
|
|
2825
2825
|
productTitleElementSelector: '',
|
|
2826
2826
|
restrictionBehavior: 'DISABLED',
|
|
2827
|
+
showForCountries: 'ONLY_SHIPPABLE',
|
|
2827
2828
|
},
|
|
2828
2829
|
loadedConfig: false,
|
|
2829
2830
|
organizationId: '',
|
|
@@ -84,6 +84,19 @@ export class ZonosCheckoutFinish {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
+
// If user provide override notification text, use it
|
|
88
|
+
this.useOverrideSuccessNotification = () => {
|
|
89
|
+
const { successPageActionText, successPageSubtitleText, successPageTitleText, } = zonosStore.checkoutSettings;
|
|
90
|
+
if (successPageTitleText) {
|
|
91
|
+
this.notificationTitle = successPageTitleText;
|
|
92
|
+
}
|
|
93
|
+
if (successPageSubtitleText) {
|
|
94
|
+
this.notificationMessages = successPageSubtitleText;
|
|
95
|
+
}
|
|
96
|
+
if (successPageActionText) {
|
|
97
|
+
this.notificationActionText = successPageActionText;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
87
100
|
this.checkPaymentStatus = async () => {
|
|
88
101
|
this.isLoading = true;
|
|
89
102
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || stripeStore.clientSecret;
|
|
@@ -97,6 +110,9 @@ export class ZonosCheckoutFinish {
|
|
|
97
110
|
this.notificationTitle = error
|
|
98
111
|
? translate('Payment failed')
|
|
99
112
|
: translate("You're all set!");
|
|
113
|
+
this.notificationActionText = translate('Keep shopping');
|
|
114
|
+
// override title if notification type is success
|
|
115
|
+
this.useOverrideSuccessNotification();
|
|
100
116
|
if (error) {
|
|
101
117
|
submitGtag('zonos-checkout-payment-fail');
|
|
102
118
|
}
|
|
@@ -135,6 +151,7 @@ export class ZonosCheckoutFinish {
|
|
|
135
151
|
this.notificationType = 'success';
|
|
136
152
|
this.notificationTitle = '';
|
|
137
153
|
this.notificationMessages = [];
|
|
154
|
+
this.notificationActionText = '';
|
|
138
155
|
this.order = null;
|
|
139
156
|
}
|
|
140
157
|
componentDidLoad() {
|
|
@@ -156,11 +173,11 @@ export class ZonosCheckoutFinish {
|
|
|
156
173
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
157
174
|
// return acc + item.quantity;
|
|
158
175
|
// }, 0);
|
|
159
|
-
return (h(Host, { key: '
|
|
176
|
+
return (h(Host, { key: '24b1aac6cd07e3981e29bb401a8e1afeba45bf4a', class: "zonos--checkout-finish zonos--elements", style: {
|
|
160
177
|
'--border-radius': getBorderRadius({
|
|
161
178
|
overrideBorderStyle: this.borderRadius,
|
|
162
179
|
}),
|
|
163
|
-
} }, this.isLoading && (h("div", { key: '
|
|
180
|
+
} }, this.isLoading && (h("div", { key: '8ddf7d87472a65b9e48504459a67b904611a6207', class: "loading-wrapper" }, h("zonos-spinner", { key: '01106349e974c8dccfab50c97875b5031c7becec' }))), !this.isLoading && (h(Fragment, null, h("div", { key: '9a274bcc2ce21bd5e14b22f0bb17cc75519bf67e', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '6b8e0ff98659d87a474142766e8debd84bbcf357', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '204c517f0cb91a2a7f029cbb51ec4dbc73f7fbdb' }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: '540dbea2ab328655fccdd7ac24ee996b1041c222', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))))));
|
|
164
181
|
}
|
|
165
182
|
static get is() { return "zonos-checkout-finish"; }
|
|
166
183
|
static get encapsulation() { return "shadow"; }
|
|
@@ -247,6 +264,7 @@ export class ZonosCheckoutFinish {
|
|
|
247
264
|
"notificationType": {},
|
|
248
265
|
"notificationTitle": {},
|
|
249
266
|
"notificationMessages": {},
|
|
267
|
+
"notificationActionText": {},
|
|
250
268
|
"order": {}
|
|
251
269
|
};
|
|
252
270
|
}
|
|
@@ -73,6 +73,7 @@ export class ZonosCheckout {
|
|
|
73
73
|
this.confirmDialogOpen = false;
|
|
74
74
|
this.showSessionTimoutScreen = false;
|
|
75
75
|
this.checkoutTimeoutInterval = null;
|
|
76
|
+
this.inventoryCheckErrorMessage = null;
|
|
76
77
|
}
|
|
77
78
|
/**
|
|
78
79
|
* Init cart info handler event
|
|
@@ -384,10 +385,47 @@ export class ZonosCheckout {
|
|
|
384
385
|
this.submitLoading = false;
|
|
385
386
|
}, 500);
|
|
386
387
|
}
|
|
388
|
+
handleInventoryCheckDialogCancel() {
|
|
389
|
+
// reset inventory check message to close the inventory check alert
|
|
390
|
+
this.inventoryCheckErrorMessage = null;
|
|
391
|
+
}
|
|
392
|
+
handleInventoryCheckDialogConfirm() {
|
|
393
|
+
// reset inventory check message to close the inventory check alert
|
|
394
|
+
this.inventoryCheckErrorMessage = null;
|
|
395
|
+
// close the dialog
|
|
396
|
+
void this.closeDialogHandler({ confirmed: true });
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Handle inventory check and returns error message if the callback provided.
|
|
400
|
+
*/
|
|
401
|
+
async handleInventoryCheck() {
|
|
402
|
+
const { onInventoryCheck } = zonosStore.checkoutSettings;
|
|
403
|
+
if (typeof onInventoryCheck !== 'function') {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
const message = await onInventoryCheck({ items: cartStore.items });
|
|
407
|
+
return message;
|
|
408
|
+
}
|
|
387
409
|
async handleCheckoutPaymentContinue() {
|
|
388
410
|
// reset error state
|
|
389
411
|
this.paymentError = false;
|
|
390
412
|
this.submitLoading = true;
|
|
413
|
+
// reset inventory check message
|
|
414
|
+
this.inventoryCheckErrorMessage = null;
|
|
415
|
+
try {
|
|
416
|
+
// check inventory before proceeding to payment
|
|
417
|
+
this.inventoryCheckErrorMessage = await this.handleInventoryCheck();
|
|
418
|
+
}
|
|
419
|
+
catch (err) {
|
|
420
|
+
// If user provide callback and it throw an exception, default to this message and stop the payment.
|
|
421
|
+
this.inventoryCheckErrorMessage = translate('Unable to check inventory. Please try again.');
|
|
422
|
+
}
|
|
423
|
+
// Don't proceed to payment if there's an error message
|
|
424
|
+
if (this.inventoryCheckErrorMessage) {
|
|
425
|
+
// stop the submit loading state
|
|
426
|
+
this.submitLoading = false;
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
391
429
|
try {
|
|
392
430
|
await stripeStoreConfirmPayment();
|
|
393
431
|
cartStoreNextStep();
|
|
@@ -539,7 +577,15 @@ export class ZonosCheckout {
|
|
|
539
577
|
this.confirmDialogOpen = false;
|
|
540
578
|
},
|
|
541
579
|
// Mark user selected confirm to close the dialog
|
|
542
|
-
onConfirmClicked: () => this.closeDialogHandler({ confirmed: true }) }))
|
|
580
|
+
onConfirmClicked: () => this.closeDialogHandler({ confirmed: true }) }), h("zonos-confirm-dialog", { class: "zonos--inventory-check-failure-dialog", dialogConfirmBtnText: translate('Return to cart'), dialogIntent: "danger",
|
|
581
|
+
// Show dialog if inventory check error message is not null
|
|
582
|
+
dialogOpen: !!this.inventoryCheckErrorMessage,
|
|
583
|
+
// If diallog is in open state, the message should not be null
|
|
584
|
+
dialogSubtitle: this.inventoryCheckErrorMessage, dialogTitle: translate("Couldn't place order"), dialogType: "alert", onCancelClicked: () => {
|
|
585
|
+
this.handleInventoryCheckDialogCancel();
|
|
586
|
+
},
|
|
587
|
+
// Mark user selected confirm to close the dialog
|
|
588
|
+
onConfirmClicked: () => this.handleInventoryCheckDialogConfirm() })));
|
|
543
589
|
}
|
|
544
590
|
static get is() { return "zonos-checkout"; }
|
|
545
591
|
static get encapsulation() { return "scoped"; }
|
|
@@ -675,7 +721,8 @@ export class ZonosCheckout {
|
|
|
675
721
|
"isLegacyCheckout": {},
|
|
676
722
|
"confirmDialogOpen": {},
|
|
677
723
|
"showSessionTimoutScreen": {},
|
|
678
|
-
"checkoutTimeoutInterval": {}
|
|
724
|
+
"checkoutTimeoutInterval": {},
|
|
725
|
+
"inventoryCheckErrorMessage": {}
|
|
679
726
|
};
|
|
680
727
|
}
|
|
681
728
|
static get methods() {
|
|
@@ -18,7 +18,7 @@ export class ZonosConfirmDialog {
|
|
|
18
18
|
};
|
|
19
19
|
this.dialogTitle = translate('Are you sure?');
|
|
20
20
|
this.dialogIntent = 'info';
|
|
21
|
-
this.dialogSubtitle =
|
|
21
|
+
this.dialogSubtitle = null;
|
|
22
22
|
this.submitBtnColor = undefined;
|
|
23
23
|
this.dialogConfirmBtnText = undefined;
|
|
24
24
|
this.dialogCancelBtnText = undefined;
|
|
@@ -82,12 +82,12 @@ export class ZonosConfirmDialog {
|
|
|
82
82
|
const borderStyle = getBorderRadius();
|
|
83
83
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
84
84
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: '4e762dd84a3a04a61e855cdb8dc019d1138b5b64', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-dialog-type": this.dialogType, "data-theme": theme, style: {
|
|
86
86
|
'--border-radius': borderStyle,
|
|
87
87
|
'--font-family': zonosStoreFontFamily(),
|
|
88
|
-
} }, h("div", { key: '
|
|
88
|
+
} }, h("div", { key: '0fab667a9f930b1418a8c920e5766e03f3c01858', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: '914885bd702f46c207c74eb32581eacf2f3817cd', "aria-hidden": "true", class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: 'dcdc0d3896153b47afbe38abc5fd4c491b8aea92', class: "zonos--confirm-dialog", onBlur: () => {
|
|
89
89
|
this.focusDialog();
|
|
90
|
-
} }, h("div", { key: '
|
|
90
|
+
} }, h("div", { key: 'acf0d24f523eb255de78e76390295ce8ff9562b8', class: "wrapper" }, h("div", { key: '10d665c1f9724c0c22c898d35af1c73ea089ee0e', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: '9dd6b11b1dce47f53f39f89a2e337fc8f59aeb9c', class: "content" }, h("div", { key: '959227525b723a7d5083d8ede947772b90c6fd4b', class: "title" }, h("zonos-text", { key: '1f33ee07f6e480692911120a6fc8d071897c9d14', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: 'e8b142d67e72c4eb8613ebfe8961e51a1ea8c0c8', class: "subtitle" }, h("zonos-text", { key: 'a263e3da97c750c3271bf9f5b70515e298f2215f', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: '5e8c54999ab9012372dd8510d14e2f1858543e26', class: "footer" }, this.dialogType === 'confirm' && (h("zonos-button", { key: 'd35774f8d45f9184634bb4a4aa204a35e35a3e54', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText || translate('Cancel'))), h("zonos-button", { key: '3f98eff1184c61d163a1f9484e69ea0fca02bc1c', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "zonos-confirm-dialog"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -150,8 +150,8 @@ export class ZonosConfirmDialog {
|
|
|
150
150
|
"type": "string",
|
|
151
151
|
"mutable": false,
|
|
152
152
|
"complexType": {
|
|
153
|
-
"original": "string",
|
|
154
|
-
"resolved": "string",
|
|
153
|
+
"original": "string | null",
|
|
154
|
+
"resolved": "null | string",
|
|
155
155
|
"references": {}
|
|
156
156
|
},
|
|
157
157
|
"required": false,
|
|
@@ -159,13 +159,13 @@ export class ZonosConfirmDialog {
|
|
|
159
159
|
"docs": {
|
|
160
160
|
"tags": [{
|
|
161
161
|
"name": "default",
|
|
162
|
-
"text": "
|
|
162
|
+
"text": "null No subtitle"
|
|
163
163
|
}],
|
|
164
164
|
"text": "Dialog subtitle text"
|
|
165
165
|
},
|
|
166
166
|
"attribute": "dialog-subtitle",
|
|
167
167
|
"reflect": false,
|
|
168
|
-
"defaultValue": "
|
|
168
|
+
"defaultValue": "null"
|
|
169
169
|
},
|
|
170
170
|
"submitBtnColor": {
|
|
171
171
|
"type": "string",
|
|
@@ -171,18 +171,25 @@ export class ZonosHello {
|
|
|
171
171
|
return hasMoreSpaceOnRight;
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
-
this.
|
|
174
|
+
this.shouldRenderHello = (showLog = true) => {
|
|
175
175
|
if (!localizationStore.localizationLoaded) {
|
|
176
176
|
return false;
|
|
177
177
|
}
|
|
178
|
-
|
|
179
|
-
if (
|
|
180
|
-
if (
|
|
181
|
-
log(`Hello: not shippable country`);
|
|
178
|
+
const { showForCountries } = zonosStore.helloSettings;
|
|
179
|
+
if (showLog) {
|
|
180
|
+
if (!localizationStore.isShippableCountry) {
|
|
181
|
+
log(`Hello: not shippable country - Show for countries: ${showForCountries}`);
|
|
182
182
|
}
|
|
183
|
-
return false;
|
|
184
183
|
}
|
|
185
|
-
|
|
184
|
+
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
185
|
+
if (showForCountries === 'ONLY_SHIPPABLE') {
|
|
186
|
+
return localizationStore.isShippableCountry;
|
|
187
|
+
}
|
|
188
|
+
// if user wants to show hello for all countries
|
|
189
|
+
if (showForCountries === 'ALL') {
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
return showForCountries === null || showForCountries === void 0 ? void 0 : showForCountries.includes(localizationStore.selectedCountryCode || '');
|
|
186
193
|
};
|
|
187
194
|
this.mobileLocationOverride = undefined;
|
|
188
195
|
this.animateFromLeftOverride = undefined;
|
|
@@ -285,7 +292,7 @@ export class ZonosHello {
|
|
|
285
292
|
// The organization name can be changed after init with the updateOrganizationName method.
|
|
286
293
|
// This will cause the element to rerender with the new org name when it changes. (used for preview on dashboard)
|
|
287
294
|
this.peekMessage = this.getHelloPeekMessage(zonosStore.organizationName);
|
|
288
|
-
const showHello = this.
|
|
295
|
+
const showHello = this.shouldRenderHello() && !!selectedCountryCode;
|
|
289
296
|
return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
|
|
290
297
|
'zonos--hello-widget',
|
|
291
298
|
this.showPeekMessage && 'zonos--hello-show-peek-message',
|
|
@@ -100,6 +100,7 @@ const addInternationalHideClass = () => {
|
|
|
100
100
|
const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
|
|
101
101
|
var _a, _b;
|
|
102
102
|
log('update selected country code');
|
|
103
|
+
const isFirstTime = !localizationStore.selectedCountryCode;
|
|
103
104
|
localizationStore.selectedCountryCode = newSelectedCountryCode;
|
|
104
105
|
const { selectedCountryCode, shippingZoneCountries } = localizationStore;
|
|
105
106
|
const isShippableCountry = shippingZoneCountries &&
|
|
@@ -125,11 +126,14 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
|
|
|
125
126
|
setZCountryUrlParam(selectedCountryCode);
|
|
126
127
|
(_a = document
|
|
127
128
|
.querySelector('zonos-hello')) === null || _a === void 0 ? void 0 : _a.setAttribute('z-country', selectedCountryCode);
|
|
128
|
-
//
|
|
129
|
-
(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
// Only trigger callback onCountryChange if the country code has been set before
|
|
130
|
+
if (!isFirstTime) {
|
|
131
|
+
// Trigger callback onCountryChange
|
|
132
|
+
(_b = zonosStore.onCountryChange) === null || _b === void 0 ? void 0 : _b.call(zonosStore, {
|
|
133
|
+
countryCode: selectedCountryCode,
|
|
134
|
+
currencyCode,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
133
137
|
};
|
|
134
138
|
const initLocalizationStore = async () => {
|
|
135
139
|
// all countries from countries.json, shipping zone and localization
|
|
@@ -41,6 +41,9 @@ export const stringsArabic = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: 'متابعة إلى الشحن',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: 'تعذر تقديم الطلب',
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: 'بلد',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsArabic = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: 'تم العثور على عناصر مقيدة',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: 'العودة إلى العربة',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: 'ابحث عن الدول',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsArabic = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: 'العنوان المترجم',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: 'تعذر التحقق من المخزون. حاول مرة أخرى.',
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: 'تحديث العنوان',
|
|
232
241
|
},
|
|
@@ -41,6 +41,9 @@ export const stringsBase = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: 'Continue to shipping',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: "Couldn't place order",
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: 'Country',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsBase = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: 'Restricted items found',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: 'Return to cart',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: 'Search countries',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsBase = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: 'Translated address',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: 'Unable to check inventory. Please try again.',
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: 'Update address',
|
|
232
241
|
},
|
|
@@ -41,6 +41,9 @@ export const stringsChinese = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: '继续运送',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: '无法下单',
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: '国家',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsChinese = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: '发现受限制的商品',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: '返回购物车',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: '搜索国家',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsChinese = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: '翻译地址',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: '无法检查库存。请再试一次。',
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: '更新地址',
|
|
232
241
|
},
|
|
@@ -41,6 +41,9 @@ export const stringsDanish = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: 'Fortsæt til levering',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: 'Kunne ikke placere ordre',
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: 'Land',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsDanish = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: 'Begrænsede varer fundet',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: 'Tilbage til kurven',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: 'Søg lande',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsDanish = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: 'Oversat adresse',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: 'Kunne ikke tjekke lagerbeholdningen. Prøv venligst igen.',
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: 'Opdater adresse',
|
|
232
241
|
},
|
|
@@ -41,6 +41,9 @@ export const stringsDutch = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: 'Ga verder naar verzending',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: 'Kon bestelling niet plaatsen',
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: 'Land',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsDutch = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: 'Beperkte items gevonden',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: 'Terug naar winkelwagen',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: 'Zoek landen',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsDutch = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: 'Vertaald adres',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: 'Kon de voorraad niet controleren. Probeer het opnieuw.',
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: 'Adres bijwerken',
|
|
232
241
|
},
|
|
@@ -41,6 +41,9 @@ export const stringsFrench = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: 'Continuer vers la livraison',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: 'Impossible de passer la commande',
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: 'Pays',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsFrench = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: 'Articles restreints trouvés',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: 'Retour au panier',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: 'Rechercher des pays',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsFrench = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: 'Adresse traduite',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: "Impossible de vérifier l'inventaire. Veuillez réessayer.",
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: "Mettre à jour l'adresse",
|
|
232
241
|
},
|
|
@@ -41,6 +41,9 @@ export const stringsGerman = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: 'Weiter zur Lieferung',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: 'Bestellung konnte nicht aufgegeben werden',
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: 'Land',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsGerman = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: 'Eingeschränkte Artikel gefunden',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: 'Zurück zum Warenkorb',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: 'Länder durchsuchen',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsGerman = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: 'Übersetzte Adresse',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: 'Inventar konnte nicht überprüft werden. Bitte versuchen Sie es erneut.',
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: 'Adresse aktualisieren',
|
|
232
241
|
},
|
|
@@ -41,6 +41,9 @@ export const stringsHebrew = {
|
|
|
41
41
|
'Continue to shipping': {
|
|
42
42
|
value: 'המשך למשלוח',
|
|
43
43
|
},
|
|
44
|
+
"Couldn't place order": {
|
|
45
|
+
value: 'לא ניתן היה לבצע הזמנה',
|
|
46
|
+
},
|
|
44
47
|
Country: {
|
|
45
48
|
value: 'מדינה',
|
|
46
49
|
},
|
|
@@ -170,6 +173,9 @@ export const stringsHebrew = {
|
|
|
170
173
|
'Restricted items found': {
|
|
171
174
|
value: 'נמצאו פריטים מוגבלים',
|
|
172
175
|
},
|
|
176
|
+
'Return to cart': {
|
|
177
|
+
value: 'חזרה לעגלה',
|
|
178
|
+
},
|
|
173
179
|
'Search countries': {
|
|
174
180
|
value: 'חיפוש מדינות',
|
|
175
181
|
},
|
|
@@ -227,6 +233,9 @@ export const stringsHebrew = {
|
|
|
227
233
|
'Translated address': {
|
|
228
234
|
value: 'כתובת מתורגמת',
|
|
229
235
|
},
|
|
236
|
+
'Unable to check inventory. Please try again.': {
|
|
237
|
+
value: 'לא ניתן היה לבדוק את המלאי. אנא נסה שוב.',
|
|
238
|
+
},
|
|
230
239
|
'Update address': {
|
|
231
240
|
value: 'עדכון כתובת',
|
|
232
241
|
},
|