@zonos/elements 1.3.23 → 1.3.24

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.
Files changed (197) hide show
  1. package/dist/cjs/{cart-c734e909.js → cart-31ad351d.js} +180 -0
  2. package/dist/cjs/index.cjs.js +3 -3
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{submitGtag-336b437c.js → submitGtag-d37af04d.js} +1 -1
  5. package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
  6. package/dist/cjs/zonos-badge_2.cjs.entry.js +2 -2
  7. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  8. package/dist/cjs/{zonos-cart-items_11.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +37 -8
  9. package/dist/cjs/zonos-checkout.cjs.entry.js +43 -3
  10. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-country-select_3.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-elements.cjs.js +1 -1
  15. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
  16. package/dist/cjs/zonos-hello.cjs.entry.js +9 -7
  17. package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +4 -4
  19. package/dist/collection/collection-manifest.json +1 -0
  20. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +1 -1
  21. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +44 -2
  22. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.css +2 -2
  23. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +31 -10
  24. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +4 -4
  25. package/dist/collection/components/common/zonos-rest-state/assets/Boxes.png +0 -0
  26. package/dist/collection/components/common/zonos-rest-state/assets/Earth.png +0 -0
  27. package/dist/collection/components/common/zonos-rest-state/assets/EmptyBox.png +0 -0
  28. package/dist/collection/components/common/zonos-rest-state/assets/Lock.png +0 -0
  29. package/dist/collection/components/common/zonos-rest-state/assets/PigBank.png +0 -0
  30. package/dist/collection/components/common/zonos-rest-state/assets/Scribble.png +0 -0
  31. package/dist/collection/components/common/zonos-rest-state/assets/Search.png +0 -0
  32. package/dist/collection/components/common/zonos-rest-state/assets/Settings.png +0 -0
  33. package/dist/collection/components/common/zonos-rest-state/assets/ShoppingCart.png +0 -0
  34. package/dist/collection/components/common/zonos-rest-state/assets/SpilledCup.png +0 -0
  35. package/dist/collection/components/common/zonos-rest-state/assets/Switch.png +0 -0
  36. package/dist/collection/components/common/zonos-rest-state/assets/TaxId.png +0 -0
  37. package/dist/collection/components/common/zonos-rest-state/assets/Truck.png +0 -0
  38. package/dist/collection/components/common/zonos-rest-state/assets/Warning.png +0 -0
  39. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.css +53 -0
  40. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +102 -0
  41. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  42. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  43. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  44. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  45. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  46. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
  47. package/dist/collection/components/main/zonos-controller.js +1 -1
  48. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  49. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  55. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  56. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  57. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  58. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  59. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  60. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  61. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  62. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  63. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  64. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  65. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  66. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  67. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  68. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  69. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  70. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  71. package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js +8 -6
  72. package/dist/collection/components/utils/restStateType.js +16 -0
  73. package/dist/esm/{cart-67471b37.js → cart-8662415b.js} +180 -0
  74. package/dist/esm/index.js +3 -3
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/{submitGtag-1f42c748.js → submitGtag-07553cf5.js} +1 -1
  77. package/dist/esm/zonos-address_8.entry.js +4 -4
  78. package/dist/esm/zonos-badge_2.entry.js +2 -2
  79. package/dist/esm/zonos-card_2.entry.js +1 -1
  80. package/dist/esm/{zonos-cart-items_11.entry.js → zonos-cart-items_12.entry.js} +37 -9
  81. package/dist/esm/zonos-checkout.entry.js +44 -4
  82. package/dist/esm/zonos-component.entry.js +1 -1
  83. package/dist/esm/zonos-controller.entry.js +2 -2
  84. package/dist/esm/zonos-country-flag.entry.js +1 -1
  85. package/dist/esm/zonos-country-select_3.entry.js +3 -3
  86. package/dist/esm/zonos-elements.js +1 -1
  87. package/dist/esm/zonos-hello-dialog.entry.js +4 -4
  88. package/dist/esm/zonos-hello.entry.js +9 -7
  89. package/dist/esm/zonos-payment.entry.js +2 -2
  90. package/dist/esm/zonos-select-dialog-header_2.entry.js +4 -4
  91. package/dist/esm-es5/cart-8662415b.js +1 -0
  92. package/dist/esm-es5/index.js +1 -1
  93. package/dist/esm-es5/loader.js +1 -1
  94. package/dist/esm-es5/{submitGtag-1f42c748.js → submitGtag-07553cf5.js} +1 -1
  95. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  96. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  97. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  98. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
  99. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  100. package/dist/esm-es5/zonos-component.entry.js +1 -1
  101. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  102. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  103. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  104. package/dist/esm-es5/zonos-elements.js +1 -1
  105. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  106. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  107. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  108. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  109. package/dist/scripts/index.d.ts +53 -3
  110. package/dist/scripts/index.js +1 -1
  111. package/dist/scripts/loadZonos.js +1 -1
  112. package/dist/scripts/zonos.js +1 -1
  113. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +12 -0
  114. package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +8 -1
  115. package/dist/types/components/common/zonos-rest-state/zonos-rest-state.d.ts +21 -0
  116. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  117. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  118. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  119. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  120. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  121. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  122. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  123. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  124. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  125. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  126. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  127. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  128. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  129. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  130. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  131. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  132. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  133. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  134. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  135. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  136. package/dist/types/components/store/translationStore.d.ts +1 -1
  137. package/dist/types/components/utils/restStateType.d.ts +2 -0
  138. package/dist/types/components.d.ts +52 -3
  139. package/dist/zonos-elements/assets/Boxes.png +0 -0
  140. package/dist/zonos-elements/assets/Earth.png +0 -0
  141. package/dist/zonos-elements/assets/EmptyBox.png +0 -0
  142. package/dist/zonos-elements/assets/Lock.png +0 -0
  143. package/dist/zonos-elements/assets/PigBank.png +0 -0
  144. package/dist/zonos-elements/assets/Scribble.png +0 -0
  145. package/dist/zonos-elements/assets/Search.png +0 -0
  146. package/dist/zonos-elements/assets/Settings.png +0 -0
  147. package/dist/zonos-elements/assets/ShoppingCart.png +0 -0
  148. package/dist/zonos-elements/assets/SpilledCup.png +0 -0
  149. package/dist/zonos-elements/assets/Switch.png +0 -0
  150. package/dist/zonos-elements/assets/TaxId.png +0 -0
  151. package/dist/zonos-elements/assets/Truck.png +0 -0
  152. package/dist/zonos-elements/assets/Warning.png +0 -0
  153. package/dist/zonos-elements/index.esm.js +1 -1
  154. package/dist/zonos-elements/p-144147f8.system.entry.js +1 -0
  155. package/dist/zonos-elements/{p-65671a64.system.entry.js → p-1620d0cc.system.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-0d30f36e.system.entry.js → p-1d7c9c24.system.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-065ada8a.system.js → p-1fed304e.system.js} +1 -1
  158. package/dist/zonos-elements/{p-498a0e18.entry.js → p-2701e08c.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-6f132cee.system.entry.js → p-299bceb7.system.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-52900b33.entry.js → p-33bcb4ab.entry.js} +1 -1
  161. package/dist/zonos-elements/{p-18464027.entry.js → p-41413c70.entry.js} +1 -1
  162. package/dist/zonos-elements/{p-44250644.entry.js → p-44c59c27.entry.js} +1 -1
  163. package/dist/zonos-elements/p-45969dde.system.entry.js +1 -0
  164. package/dist/zonos-elements/p-4f2986fa.system.entry.js +1 -0
  165. package/dist/zonos-elements/{p-8473827d.system.entry.js → p-5a11a235.system.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-607b5560.entry.js → p-6260d404.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-7d61e6e5.entry.js → p-687f1f62.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-234f8729.system.js → p-7d48c12c.system.js} +1 -1
  169. package/dist/zonos-elements/{p-c1879326.system.entry.js → p-7f08c0f4.system.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-8ed0769e.entry.js → p-81750812.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-cbf13745.entry.js → p-84791c5c.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-db9e87ec.entry.js → p-8e584524.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-8171d013.system.entry.js → p-941a01be.system.entry.js} +1 -1
  174. package/dist/zonos-elements/p-a67e5a9b.js +1 -0
  175. package/dist/zonos-elements/p-afc277d9.entry.js +1 -0
  176. package/dist/zonos-elements/{p-b9195764.system.entry.js → p-b45db572.system.entry.js} +1 -1
  177. package/dist/zonos-elements/p-b56c38a9.entry.js +1 -0
  178. package/dist/zonos-elements/{p-5437dd24.system.entry.js → p-c41d1708.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-92c64a9c.system.entry.js → p-c8e83577.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-713bb92e.system.entry.js → p-cbe5c7bb.system.entry.js} +1 -1
  181. package/dist/zonos-elements/p-d1b8bfce.system.js +1 -0
  182. package/dist/zonos-elements/p-d29b5bff.entry.js +1 -0
  183. package/dist/zonos-elements/{p-083850d3.js → p-d6307a6d.js} +1 -1
  184. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  185. package/dist/zonos-elements/{p-a18555c8.entry.js → p-f3feed11.entry.js} +1 -1
  186. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  187. package/package.json +7 -15
  188. package/dist/esm-es5/cart-67471b37.js +0 -1
  189. package/dist/esm-es5/zonos-cart-items_11.entry.js +0 -1
  190. package/dist/zonos-elements/p-08d1cfc4.entry.js +0 -1
  191. package/dist/zonos-elements/p-440ac320.js +0 -1
  192. package/dist/zonos-elements/p-4a3b5fc8.entry.js +0 -1
  193. package/dist/zonos-elements/p-9c3a036e.system.js +0 -1
  194. package/dist/zonos-elements/p-af3ee45d.system.entry.js +0 -1
  195. package/dist/zonos-elements/p-b1ee97d8.entry.js +0 -1
  196. package/dist/zonos-elements/p-f7468131.system.entry.js +0 -1
  197. package/dist/zonos-elements/p-fedafdd2.system.entry.js +0 -1
@@ -18,9 +18,9 @@ const ZonosSelectDialogHeader = class {
18
18
  this.label = '';
19
19
  }
20
20
  render() {
21
- return (index.h(index.Host, { key: '6bbc81e8045153c49da17c4b999bc1992aa9f01d', class: "zonos--elements", style: {
21
+ return (index.h(index.Host, { key: 'aee08db0e889bd5a5b9084180f6ee038c120a3b2', class: "zonos--elements", style: {
22
22
  '--font-family': zonosStore.zonosStoreFontFamily(),
23
- } }, index.h("zonos-v-stack", { key: 'c0184343c6cefd3c996695964800d242d1673ee1', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: 'ae13d39c8a0917df33aec34a10853892d9470a9c', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: '32e9af076b72f63cb1ec0c92b7e77d3196572106', type: "boldLabel" }, this.label), index.h("zonos-button", { key: 'eb4d2f0cef4a2b0eafe628c19d0fcbac4f3493e6', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), index.h("slot", { key: '98a6f0e4f44e74208b5e446ad8066b74b1f7beaa' }))));
23
+ } }, index.h("zonos-v-stack", { key: '565a273f0037418387c0868c74943c3325ab6c35', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: '0d994f27c948e49c092d016a0f1d6e453f80f00a', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: 'ee7bb796e921b2a14fa6201c8f17d0dfd9f3a3c2', type: "boldLabel" }, this.label), index.h("zonos-button", { key: '0e3a6c9c2cc4b67a51015b2fb7345c47a0e5ef23', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), index.h("slot", { key: 'ad9fb089fa4a571a5443431c0d686b4804d25b0a' }))));
24
24
  }
25
25
  };
26
26
  ZonosSelectDialogHeader.style = ZonosSelectDialogHeaderStyle0;
@@ -34,9 +34,9 @@ const VStack = class {
34
34
  this.spacing = 24;
35
35
  }
36
36
  render() {
37
- return (index.h(index.Host, { key: '3d0753111d525b29e1f36684c89b7216ee0b323f', style: {
37
+ return (index.h(index.Host, { key: '9b7115624d2e27b1c6da58ac16f6059d5cad71a9', style: {
38
38
  '--font-family': zonosStore.zonosStoreFontFamily(),
39
- } }, index.h("div", { key: '95b732681743abc1b08b1b8bc722855c3c8e967a', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: 'b93347c5fb986a70f9f1d67ce2216bba84db7ba4' }))));
39
+ } }, index.h("div", { key: 'bd3ccd8700897292fd1a9ad40825c851a484fcf2', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: '1c6fe3e6dc8eda9461eb90180535c9bd563a1840' }))));
40
40
  }
41
41
  };
42
42
  VStack.style = ZonosVStackStyle0;
@@ -33,6 +33,7 @@
33
33
  "components/common/zonos-language-select/zonos-language-select.js",
34
34
  "components/common/zonos-link/zonos-link.js",
35
35
  "components/common/zonos-logo/zonos-logo.js",
36
+ "components/common/zonos-rest-state/zonos-rest-state.js",
36
37
  "components/common/zonos-select-dialog-header/zonos-select-dialog-header.js",
37
38
  "components/common/zonos-text/zonos-text.js",
38
39
  "components/common/zonos-tooltip/zonos-tooltip.js",
@@ -90,7 +90,7 @@
90
90
  width: 360px;
91
91
  max-width: 100vw;
92
92
  max-height: 500px;
93
- z-index: 10005;
93
+ z-index: 2147483011;
94
94
  overflow: auto;
95
95
  transform: scale(0);
96
96
  transform-origin: bottom left;
@@ -22,6 +22,8 @@ import { submitGtag } from "../../utils/submitGtag";
22
22
  import MessageIcon from "./assets/MessageIcon.svg";
23
23
  // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
24
24
  import RemoveIcon from "./assets/RemoveIcon.svg";
25
+ // 90 minutes
26
+ const CHECKOUT_SESSION_TIMEOUT = 90 * 60 * 1000;
25
27
  export class ZonosCheckout {
26
28
  constructor() {
27
29
  /**
@@ -69,6 +71,8 @@ export class ZonosCheckout {
69
71
  this.legacyCheckoutHiddenBtnSelector = '#legacy-checkout-hidden-button';
70
72
  this.isLegacyCheckout = false;
71
73
  this.confirmDialogOpen = false;
74
+ this.showSessionTimoutScreen = false;
75
+ this.checkoutTimeoutInterval = null;
72
76
  }
73
77
  /**
74
78
  * Init cart info handler event
@@ -108,6 +112,8 @@ export class ZonosCheckout {
108
112
  cartStore.step = 'customer-info';
109
113
  // reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
110
114
  cartStoreResetTabItems();
115
+ // clear the checkout session timeout timer when checkout dialog close action is triggered
116
+ this.clearCheckoutTimeoutInterval();
111
117
  /**
112
118
  * Trigger callback when the checkout is closed
113
119
  */
@@ -140,6 +146,33 @@ export class ZonosCheckout {
140
146
  await this.applyStripeTheme();
141
147
  return true;
142
148
  }
149
+ clearCheckoutTimeoutInterval() {
150
+ if (this.checkoutTimeoutInterval) {
151
+ clearTimeout(this.checkoutTimeoutInterval);
152
+ this.checkoutTimeoutInterval = null;
153
+ }
154
+ }
155
+ startCheckoutTimeoutInterval() {
156
+ // do nothing if in preview mode
157
+ if (this.preview) {
158
+ return;
159
+ }
160
+ const timeoutQuery = new URLSearchParams(window.location.search).get('zonosCheckoutTimeout');
161
+ const timeout =
162
+ // timeout query is mainly for testing purpose
163
+ timeoutQuery && !isNaN(parseInt(timeoutQuery, 10))
164
+ ? parseInt(timeoutQuery, 10)
165
+ : CHECKOUT_SESSION_TIMEOUT;
166
+ log(`==START CHECKOUT TIMEOUT - ${timeout}==`);
167
+ // start a timer to validate the price
168
+ this.checkoutTimeoutInterval = setTimeout(() => {
169
+ // Show session timeout alert
170
+ this.showSessionTimoutScreen = true;
171
+ }, timeout);
172
+ }
173
+ reloadCheckoutSession() {
174
+ window.location.reload();
175
+ }
143
176
  attachCheckout() {
144
177
  const buttonAnchorSelector = zonosStore.checkoutSettings.placeOrderButtonSelector;
145
178
  log(`attach checkout ${buttonAnchorSelector}`);
@@ -173,6 +206,8 @@ export class ZonosCheckout {
173
206
  if (!result) {
174
207
  throw new Error('Error building cart');
175
208
  }
209
+ // start the timer to validate the price
210
+ this.startCheckoutTimeoutInterval();
176
211
  submitGtag('zonos-checkout-start');
177
212
  void trackConversionEvent('checkout_open');
178
213
  }
@@ -385,6 +420,8 @@ export class ZonosCheckout {
385
420
  try {
386
421
  await stripeStoreConfirmPayment();
387
422
  cartStoreNextStep();
423
+ // clear the checkout session timeout timer when purchase is complete
424
+ this.clearCheckoutTimeoutInterval();
388
425
  }
389
426
  catch (err) {
390
427
  logError(err);
@@ -497,6 +534,9 @@ export class ZonosCheckout {
497
534
  this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
498
535
  };
499
536
  const renderContent = () => {
537
+ if (this.showSessionTimoutScreen) {
538
+ return (h("zonos-rest-state", { class: "zonos--session-timeout", restStateSubtitle: translate('Your checkout session has expired. Please reload the page to continue.'), restStateTitle: translate('Session timed out'), restStateType: 'Warning' }, h("zonos-button", { onClick: () => this.reloadCheckoutSession(), variant: "primary" }, translate('Reload'))));
539
+ }
500
540
  return (h("div", { class: 'zonos--content', style: {
501
541
  '--border-radius': getBorderRadius({ overrideBorderStyle: style }),
502
542
  } }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
@@ -524,7 +564,7 @@ export class ZonosCheckout {
524
564
  hasFooter && 'has-footer',
525
565
  this.preview && 'preview',
526
566
  this.isMobile && 'mobile',
527
- ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-confirm-dialog", { dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
567
+ ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
528
568
  this.confirmDialogOpen = false;
529
569
  },
530
570
  // Mark user selected confirm to close the dialog
@@ -662,7 +702,9 @@ export class ZonosCheckout {
662
702
  "domesticRedirectedBtnSelector": {},
663
703
  "legacyCheckoutHiddenBtnSelector": {},
664
704
  "isLegacyCheckout": {},
665
- "confirmDialogOpen": {}
705
+ "confirmDialogOpen": {},
706
+ "showSessionTimoutScreen": {},
707
+ "checkoutTimeoutInterval": {}
666
708
  };
667
709
  }
668
710
  static get methods() {
@@ -115,11 +115,11 @@
115
115
  visibility: visible;
116
116
  }
117
117
  :host(.open) .zonos--backdrop {
118
- z-index: 10003;
118
+ z-index: 2147483009;
119
119
  opacity: 0.65;
120
120
  }
121
121
  :host(.open) .zonos--confirm-layout {
122
122
  opacity: 1;
123
- z-index: 10004;
123
+ z-index: 2147483010;
124
124
  transform: scale(1);
125
125
  }
@@ -22,8 +22,9 @@ export class ZonosConfirmDialog {
22
22
  this.submitBtnColor = undefined;
23
23
  this.dialogConfirmBtnText = undefined;
24
24
  this.dialogCancelBtnText = undefined;
25
+ this.dialogType = 'confirm';
25
26
  this.isMobile = false;
26
- this.dialogOpen = false;
27
+ this.dialogOpen = undefined;
27
28
  this.noClickOutside = false;
28
29
  }
29
30
  handleKeyDown(ev) {
@@ -81,12 +82,12 @@ export class ZonosConfirmDialog {
81
82
  const borderStyle = getBorderRadius();
82
83
  // Get theme for the update dialog, inherit from the theme, no from this component theme
83
84
  const theme = getZonosStoreTheme(zonosStore.appearance.theme);
84
- return (h(Host, { key: 'e52030ffc052c699daa87c5b62ee8b44ddad7f7f', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-theme": theme, style: {
85
+ return (h(Host, { key: '0adbea273e5504ac29ef8040fd968ded3f731f4b', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-dialog-type": this.dialogType, "data-theme": theme, style: {
85
86
  '--border-radius': borderStyle,
86
87
  '--font-family': zonosStoreFontFamily(),
87
- } }, h("div", { key: 'a34d31946f198b2593f142b582aec18f69fe74c5', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: '2f3dfa27dfbfbc4080eb710dd3db530521b63d36', "aria-hidden": "true", class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: '8f61424a8899c81f9510deda0adc3ff3e2da102b', class: "zonos--confirm-dialog", onBlur: () => {
88
+ } }, h("div", { key: '4dbb78a0d1fc37dbd573c23aee53838a4578e18e', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: '106e28d9bea08a332063cf8fe07f7e1db7ef3f0b', "aria-hidden": "true", class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: 'b296e7d2c30815147396b6e5c50207b40722d6f5', class: "zonos--confirm-dialog", onBlur: () => {
88
89
  this.focusDialog();
89
- } }, h("div", { key: '2fca3f071d7f9d2af628d909770bb12a3acabfe2', class: "wrapper" }, h("div", { key: 'fed312e492a9fcac175a9cac7501255aeb975c10', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: '131651e201a8d6b2ee9e0c82bd1990bc9a8dc702', class: "content" }, h("div", { key: 'a42e1a9271bdfb9fba133e9af330bdb8b16be230', class: "title" }, h("zonos-text", { key: '91461b9e572e3eb0e6e8616612cce56cf723678f', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: 'fde989f7ef37692173c1476b5cfd98f6cc71bb6e', class: "subtitle" }, h("zonos-text", { key: '2e273099ff036b1aa62bba923fff696d1d291867', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: '3b7f50adf490388feb759f2e09a626ece5f29c20', class: "footer" }, h("zonos-button", { key: '9686f10d831470273543cf3b5217a8e59bb5160a', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText), h("zonos-button", { key: '3781a86d62efe11e8dc08886e3b4ad885c64776a', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
90
+ } }, h("div", { key: 'ba8c7aa3f0a6c3753f2275b2fd9daac8181d8e05', class: "wrapper" }, h("div", { key: '60490f9e714881bd75c6fcad07aebf3ae9d9947b', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: 'd735c7e03bff1d41fdbc003c9628a4abaa4f9313', class: "content" }, h("div", { key: 'e085cea22f8036b3deec9fa9f51c977629e6cc74', class: "title" }, h("zonos-text", { key: '4e41e3b2fe012a8c28daa7ceab614b19299c7cdf', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: '5cc1fefbe7a551bf5ad7ff3744d7ecc6ecf5e73a', class: "subtitle" }, h("zonos-text", { key: '07afaf41a189f491db17d135cf074d4c6152e3cb', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: 'fbcfeb7f1a195ad928dea606f5085d8d2c1f2df6', class: "footer" }, this.dialogType === 'confirm' && (h("zonos-button", { key: 'eab37a4bf872bcde807ea50f33f2f082889a47c1', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText || translate('Cancel'))), h("zonos-button", { key: '21e66354e0eaa951fd68f86beda36c4a89f06e44', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
90
91
  }
91
92
  static get is() { return "zonos-confirm-dialog"; }
92
93
  static get encapsulation() { return "shadow"; }
@@ -205,11 +206,11 @@ export class ZonosConfirmDialog {
205
206
  "mutable": false,
206
207
  "complexType": {
207
208
  "original": "string",
208
- "resolved": "string",
209
+ "resolved": "string | undefined",
209
210
  "references": {}
210
211
  },
211
- "required": true,
212
- "optional": false,
212
+ "required": false,
213
+ "optional": true,
213
214
  "docs": {
214
215
  "tags": [],
215
216
  "text": "Cancel button text"
@@ -217,6 +218,27 @@ export class ZonosConfirmDialog {
217
218
  "attribute": "dialog-cancel-btn-text",
218
219
  "reflect": false
219
220
  },
221
+ "dialogType": {
222
+ "type": "string",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "'alert' | 'confirm'",
226
+ "resolved": "\"alert\" | \"confirm\"",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [{
233
+ "name": "default",
234
+ "text": "\"confirm\""
235
+ }],
236
+ "text": "Type of dialog\n- \"alert\" - Only confirm button\n- \"confirm\" - Both Confirm and cancel buttons"
237
+ },
238
+ "attribute": "dialog-type",
239
+ "reflect": false,
240
+ "defaultValue": "'confirm'"
241
+ },
220
242
  "isMobile": {
221
243
  "type": "boolean",
222
244
  "mutable": false,
@@ -243,15 +265,14 @@ export class ZonosConfirmDialog {
243
265
  "resolved": "boolean",
244
266
  "references": {}
245
267
  },
246
- "required": false,
268
+ "required": true,
247
269
  "optional": false,
248
270
  "docs": {
249
271
  "tags": [],
250
272
  "text": "Whether or not the dialog is open"
251
273
  },
252
274
  "attribute": "dialog-open",
253
- "reflect": false,
254
- "defaultValue": "false"
275
+ "reflect": false
255
276
  },
256
277
  "noClickOutside": {
257
278
  "type": "boolean",
@@ -55,7 +55,7 @@
55
55
  display: flex;
56
56
  align-items: center;
57
57
  justify-content: center;
58
- z-index: 10002;
58
+ z-index: 2147483009;
59
59
  background: var(--zonos-elements-gray-0);
60
60
  border-radius: var(--border-radius, var(--zonos-elements-radius-10));
61
61
  }
@@ -73,7 +73,7 @@
73
73
  }
74
74
  :host .zonos--dialog {
75
75
  position: relative;
76
- z-index: 10001;
76
+ z-index: 2147483008;
77
77
  background: var(--zonos-elements-gray-0);
78
78
  max-width: 90vw;
79
79
  max-height: 90vh;
@@ -127,12 +127,12 @@
127
127
  visibility: visible;
128
128
  }
129
129
  :host(.open) .zonos--backdrop {
130
- z-index: 10001;
130
+ z-index: 2147483008;
131
131
  opacity: 0.65;
132
132
  }
133
133
  :host(.open) .zonos--dialog-layout {
134
134
  opacity: 1;
135
- z-index: 10002;
135
+ z-index: 2147483009;
136
136
  transform: scale(1);
137
137
  }
138
138
 
@@ -0,0 +1,53 @@
1
+ :host {
2
+ font-family: var(--font-family, Inter), Inter;
3
+ display: block;
4
+ white-space: normal;
5
+ }
6
+ :host * {
7
+ font-family: var(--font-family, Inter), Inter;
8
+ }
9
+ :host img {
10
+ max-width: 100%;
11
+ }
12
+ :host dl,
13
+ :host dd,
14
+ :host h1,
15
+ :host h2,
16
+ :host h3,
17
+ :host h4,
18
+ :host h5,
19
+ :host h6,
20
+ :host hr,
21
+ :host figure,
22
+ :host p,
23
+ :host pre {
24
+ margin: 0;
25
+ }
26
+
27
+ /* All sets of variable are here */
28
+ /* smooth font rendering */
29
+ :host {
30
+ -moz-osx-font-smoothing: grayscale;
31
+ -webkit-font-smoothing: antialiased;
32
+ }
33
+
34
+ :host {
35
+ height: 100%;
36
+ width: 100%;
37
+ display: flex;
38
+ justify-content: center;
39
+ align-items: center;
40
+ flex-direction: column;
41
+ gap: 20px;
42
+ }
43
+ :host .zonos--restState-image {
44
+ width: 124px;
45
+ height: 124px;
46
+ margin-bottom: 15px;
47
+ }
48
+ :host .content {
49
+ display: flex;
50
+ flex-direction: column;
51
+ align-items: center;
52
+ gap: 8px;
53
+ }
@@ -0,0 +1,102 @@
1
+ import { getAssetPath, h, Host } from "@stencil/core";
2
+ import { zonosStoreFontFamily } from "../../store/zonosStore";
3
+ import { classes } from "../../utils/classes";
4
+ export class ZonosRestState {
5
+ constructor() {
6
+ this.getImageRestState = () => {
7
+ const imageSrc = getAssetPath(`./assets/${this.restStateType}.png`);
8
+ return imageSrc;
9
+ };
10
+ this.restStateSubtitle = undefined;
11
+ this.restStateTitle = undefined;
12
+ this.restStateType = undefined;
13
+ this.isErrorImageLoad = false;
14
+ }
15
+ render() {
16
+ const imageUrl = this.getImageRestState();
17
+ return (h(Host, { key: '1bfff1095ec5c517b04106972431ac2e7f6355d9', class: classes(['zonos--elements zonos--restState']), style: {
18
+ '--font-family': zonosStoreFontFamily(),
19
+ } }, h("div", { key: 'e4c9b3b63f73c8c9ed04e196369a888fdbece30a', class: "zonos--restState-image" }, h("img", { key: 'e7444fae5141035f415ae0255ce5ff1446910fa4', alt: this.restStateType, onError: () => {
20
+ this.isErrorImageLoad = true;
21
+ }, src: imageUrl })), h("div", { key: '2f1d1ac03dcf47d7fd7bc7014a8c4af0486d3a80', class: "content" }, h("zonos-text", { key: 'bf9fe66af7349c07c6fba5dd4e749a808b051fcc', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '2b9fc699b05557487ad8534f34857febb0defda8', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: 'fe7c44da5367b5b52abbbee2631a955544f41042', class: "action" }, h("slot", { key: '395e78af0e2dff6f0a98e7ac005509c3abb965fd' }))));
22
+ }
23
+ static get is() { return "zonos-rest-state"; }
24
+ static get encapsulation() { return "shadow"; }
25
+ static get originalStyleUrls() {
26
+ return {
27
+ "$": ["zonos-rest-state.scss"]
28
+ };
29
+ }
30
+ static get styleUrls() {
31
+ return {
32
+ "$": ["zonos-rest-state.css"]
33
+ };
34
+ }
35
+ static get assetsDirs() { return ["assets"]; }
36
+ static get properties() {
37
+ return {
38
+ "restStateSubtitle": {
39
+ "type": "string",
40
+ "mutable": false,
41
+ "complexType": {
42
+ "original": "string",
43
+ "resolved": "string",
44
+ "references": {}
45
+ },
46
+ "required": true,
47
+ "optional": false,
48
+ "docs": {
49
+ "tags": [],
50
+ "text": "The subtitle of the rest state"
51
+ },
52
+ "attribute": "rest-state-subtitle",
53
+ "reflect": false
54
+ },
55
+ "restStateTitle": {
56
+ "type": "string",
57
+ "mutable": false,
58
+ "complexType": {
59
+ "original": "string",
60
+ "resolved": "string",
61
+ "references": {}
62
+ },
63
+ "required": true,
64
+ "optional": false,
65
+ "docs": {
66
+ "tags": [],
67
+ "text": "The title of the rest state"
68
+ },
69
+ "attribute": "rest-state-title",
70
+ "reflect": false
71
+ },
72
+ "restStateType": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "RestStateType",
77
+ "resolved": "\"Boxes\" | \"Earth\" | \"EmptyBox\" | \"Lock\" | \"PigBank\" | \"Scribble\" | \"Search\" | \"Settings\" | \"ShoppingCart\" | \"SpilledCup\" | \"Switch\" | \"TaxId\" | \"Truck\" | \"Warning\"",
78
+ "references": {
79
+ "RestStateType": {
80
+ "location": "import",
81
+ "path": "src/components/utils/restStateType",
82
+ "id": "src/components/utils/restStateType.ts::RestStateType"
83
+ }
84
+ }
85
+ },
86
+ "required": true,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "The type of rest state"
91
+ },
92
+ "attribute": "rest-state-type",
93
+ "reflect": false
94
+ }
95
+ };
96
+ }
97
+ static get states() {
98
+ return {
99
+ "isErrorImageLoad": {}
100
+ };
101
+ }
102
+ }
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
8
8
  this.label = '';
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: '6bbc81e8045153c49da17c4b999bc1992aa9f01d', class: "zonos--elements", style: {
11
+ return (h(Host, { key: 'aee08db0e889bd5a5b9084180f6ee038c120a3b2', class: "zonos--elements", style: {
12
12
  '--font-family': zonosStoreFontFamily(),
13
- } }, h("zonos-v-stack", { key: 'c0184343c6cefd3c996695964800d242d1673ee1', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'ae13d39c8a0917df33aec34a10853892d9470a9c', class: "zonos--select-dialog-header" }, h("zonos-text", { key: '32e9af076b72f63cb1ec0c92b7e77d3196572106', type: "boldLabel" }, this.label), h("zonos-button", { key: 'eb4d2f0cef4a2b0eafe628c19d0fcbac4f3493e6', 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: '98a6f0e4f44e74208b5e446ad8066b74b1f7beaa' }))));
13
+ } }, h("zonos-v-stack", { key: '565a273f0037418387c0868c74943c3325ab6c35', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '0d994f27c948e49c092d016a0f1d6e453f80f00a', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'ee7bb796e921b2a14fa6201c8f17d0dfd9f3a3c2', type: "boldLabel" }, this.label), h("zonos-button", { key: '0e3a6c9c2cc4b67a51015b2fb7345c47a0e5ef23', 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: 'ad9fb089fa4a571a5443431c0d686b4804d25b0a' }))));
14
14
  }
15
15
  static get is() { return "zonos-select-dialog-header"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -7,10 +7,10 @@ export class ZonosTooltip {
7
7
  this.showTooltip = false;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: 'dd98e35a2295dd72209775ce1e63d6f653913466', class: "zonos--elements" }, h("div", { key: '4bee5ca82e3a493826b723f620baa6d7cf7af63a', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '1320496e6caed5f16d940f0e5119d5f19186f565' }), h("div", { key: '2a9b891c672d03cdbe8babf59312942e101704a7', class: classes([
10
+ return (h(Host, { key: '62f307eee14511a4d37aecd927a25f797e206d8f', class: "zonos--elements" }, h("div", { key: '8bcdbbbd4d9fffe487c975d2f42bc0e7ecc0d7a5', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '53413e70a522d44f044bf08154c933e8d2b6863e' }), h("div", { key: 'b3ff18f30520346abe71df2987763d08ccc21c3c', class: classes([
11
11
  this.showTooltip && 'zonos--show-tooltip',
12
12
  'zonos--tooltip-content',
13
- ]) }, h("zonos-text", { key: '0146fad3f70fa07e9eb644b26d6dd65963a70c3d', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '36e76d4624927255679107ee47022b7314479441', size: "xs", textColor: "gray-0" }, this.subtitle)))));
13
+ ]) }, h("zonos-text", { key: '72567e2ace426b1d45e46a7bb68aa17076fcf7d3', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '183b70f17a065b3eb3eef65df38bee2092c91582', 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: '3d0753111d525b29e1f36684c89b7216ee0b323f', style: {
10
+ return (h(Host, { key: '9b7115624d2e27b1c6da58ac16f6059d5cad71a9', style: {
11
11
  '--font-family': zonosStoreFontFamily(),
12
- } }, h("div", { key: '95b732681743abc1b08b1b8bc722855c3c8e967a', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: 'b93347c5fb986a70f9f1d67ce2216bba84db7ba4' }))));
12
+ } }, h("div", { key: 'bd3ccd8700897292fd1a9ad40825c851a484fcf2', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '1c6fe3e6dc8eda9461eb90180535c9bd563a1840' }))));
13
13
  }
14
14
  static get is() { return "zonos-v-stack"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -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: 'b51f2edddb50f8f6a868da28c73218fe6955d2e5' }, "Hello, World! I'm ", this.getText());
13
+ return h("div", { key: 'b2d57ce9356cd0d1454c7ef195fe0ac21f694b7b' }, "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: 'a43121c2a6e9410362a570f9270f0b32c587200b', class: "zonos--elements" }, h("div", { key: 'f8bf4003c536abd60a903b808f1cd136bcebbd0a', class: "zonos--hello-dialog-footer", style: {
21
+ return (h(Host, { key: 'f84d021e99271bd6a00da32edd35fdc5e0520c5a', class: "zonos--elements" }, h("div", { key: '96eeeb3df6698a18ae1439c3c35bc2337fe3e83c', class: "zonos--hello-dialog-footer", style: {
22
22
  '--primary-color': primaryColor,
23
- } }, h("a", { key: 'a3967d63fee336a53ede4dfe30f270d7c932dfed', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '72e918b1b6800d97df8f73487b7d72f8130312d7', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: '9614506f8b3eac485fa19a1743ac6fc0117f9611', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '2e72f28b9b08d9a729340f6c0999bf48381bfe00', 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: 'd4832d123d553b71eacda5f6ec66d0a36e1018d3', 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)))));
23
+ } }, h("a", { key: 'bb17cee42a3cb6d88e1b064649184c686ef41201', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '9183c662eb9d2dbb63b5149c338d013439767634', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: 'dd5bed89a4a2ae9386fa39fe15362c42fa7535ee', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'cbe6cb613fb2ca39f772363f8276cbc8c9e28b70', 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: 'e05876aa9b1e56f945f810b82163335cd14202d1', 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"; }
@@ -151,17 +151,17 @@ export class ZonosHelloDialog {
151
151
  const defaultMessage = formatStringWithLinks(defaultMessageStr);
152
152
  const currentPage = this.getCurrentPageEnum();
153
153
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
154
- return (h(Host, { key: 'c8f49239246e63e8df2a57b3349b8ad97e84a216', class: "zonos--elements" }, h("div", { key: '6fd4ac561ae03f823acdecce1a40e0164096b2df', "aria-hidden": "true", class: classes([
154
+ return (h(Host, { key: '354758888accf5c5f44e321cc36f3126fe161596', class: "zonos--elements" }, h("div", { key: 'b6e9ef3ac53035b578f1ccb6940e04561a6c7362', "aria-hidden": "true", class: classes([
155
155
  'zonos--hello-dialog',
156
156
  animateLeft && 'zonos--hello-dialog-animate-from-left',
157
157
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
158
158
  !!this.mobileLocationOverride &&
159
159
  'zonos--hello-dialog-mobile-override',
160
160
  this.isOpen && 'zonos--hello-dialog-open',
161
- ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '7c8fa46a42ca6b4bbaab68e25c77e56306120fbf' }, h("div", { key: 'c2cc19c362b09e6dfd56f62a63302e6d2dc6f500', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'b108faf0e9e997be2f6c497dc859f8f154c78c49', 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: '1f6ef6edbc73d4935fbfeed08dcbbcf31cf5dcd4', spacing: 24 }, h("zonos-country-flag", { key: '7f1d844bb5b39ecc7555abdda7d3be9f341b11d0', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '7df9a3867b69e90134565e4115df94f504f1d9f6', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '6c10ffcef44b13642496a4ee2d2740498d8c2742', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '5a455ba25cbe525df77c42f8db03c080f51ee1a5', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: 'b298a89bbbca53b32136093a386fc10d9d9aa39e', spacing: 8 }, this.restrictedItems.map(item => {
161
+ ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'cba389a7107bf0505743237a7e61e27988955a44' }, h("div", { key: '3cef5f247dca70671ad0c304f29980f7147cf21c', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '013764140f25f64ab52f4588a50b5148f4b170d0', 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: '099dc23581474e5167cfa8bd90be9987b3caa47f', spacing: 24 }, h("zonos-country-flag", { key: 'c545313157e3a488433619292306419588e20e50', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'f8be1b95571b28be7ed4fc3caee5d13177845150', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '9ac86d0f247cecd0bfa19ffc041eee89bd19b168', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '3234c9640aa1d484c6dcb78e7e3bf43e3545d67e', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '2f090b934ede76c8400b7891b6caa391e1f039b0', spacing: 8 }, this.restrictedItems.map(item => {
162
162
  var _a;
163
163
  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)))));
164
- }), h("zonos-card", { key: '0436fd5b2157162e41426b9a0723c3f94140a465', spacing: "12px" }, h("zonos-v-stack", { key: 'd673d38dee2d274cd0010d3f6ac265548374c238', spacing: 12 }, h("div", { key: 'ab44b5782f6a2d9d2fa0abe36feafbb1f9a56782', class: "zonos--flex-message" }, h("zonos-icon", { key: 'dc84c724a6f2354414ccba221ab7bc6849717534', "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", { key: '534fea4854e05f0550fe97fcdb2c133d21f7dfd7' }, dutyDeMinimisMessage)), h("div", { key: 'fb08aa1b5a63dc3170245e8ea14525da097c6f5f', class: "zonos--flex-message" }, h("zonos-icon", { key: '4e82ccee8a63d682ba818609e9eeb080d9ea2342', "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", { key: '00f4d5936b105247396fd45c91bc66bc034a2280' }, taxDeMinimisMessage)), additionalInformation && (h("div", { key: 'cb5126e6b7f0c4197dc3247948397b0298dce015', class: "zonos--flex-message" }, h("zonos-icon", { key: '555dfb42452e298c17718cd3cee2179abb9a5e2f', "aria-label": "Low value order shipping restriction", content: BagIcon }), h("zonos-text", { key: 'd1d29153de5ae3c2dcbca2622bc0cea3dc9b6fa5' }, additionalInformation))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '7e1d4b405972059bd759ba12a760e4037eb8a724', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '5e8adbd361831901f60687b243030ff20a55de42' }, h("zonos-country-select", { key: '3ac541296c02b366f10aace6a8497e06eded103a', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '37aa0ebdf43b0252c4fc3d249751bd6a7cd7341f' }, h("zonos-language-select", { key: '7394d663a509ff75fb5c79cd27403fda02d29877', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
164
+ }), h("zonos-card", { key: 'e7ec890c1673b4025e650ed737ee4ba0e37ceb5d', spacing: "12px" }, h("zonos-v-stack", { key: 'a09bc2634da2795a4f0e2ef8b66680db9b0e403d', spacing: 12 }, h("div", { key: '2182aac10dc9b654b81234188cf0ef4decb2328a', class: "zonos--flex-message" }, h("zonos-icon", { key: '362807633b9a55a4438e95a9150c4c80f5bd836b', "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", { key: '10bbbd399a255ad3a593b246d4b8b475e1c089e1' }, dutyDeMinimisMessage)), h("div", { key: '451c58a91d38413cc295a377e08ffa9947411112', class: "zonos--flex-message" }, h("zonos-icon", { key: '2eceeced9d2b0ab482c94b8edd768134ba936d2d', "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", { key: 'f4284b8e56522de93d5ca1160103ca2fac85250e' }, taxDeMinimisMessage)), additionalInformation && (h("div", { key: 'f9f0a09a1a7bfa85b2a70f843aabea7961250141', class: "zonos--flex-message" }, h("zonos-icon", { key: '147ee865b2708d662c185e4fe5d4dba7f099c310', "aria-label": "Low value order shipping restriction", content: BagIcon }), h("zonos-text", { key: 'ccb671b31672ebfd41369a9b0fda8e49ed3739cc' }, additionalInformation))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '16b584281762c987d375b15e5cd3b5784fce5cd4', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '1122d535ce9bf451aa823726764a1a662c0378df' }, h("zonos-country-select", { key: '73c417e435dcbb15be72879ecde8271cb5cc01a1', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '4555dcf5260fa976458f6d612efce72a39564abf' }, h("zonos-language-select", { key: 'c19ca73913d2b026976acc36c1d9eb68bf90f07c', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
165
165
  }
166
166
  static get is() { return "zonos-hello-dialog"; }
167
167
  static get encapsulation() { return "shadow"; }
@@ -178,7 +178,7 @@ export class ZonosController {
178
178
  zonosStore.organizationName = organizationName;
179
179
  }
180
180
  render() {
181
- return h(Host, { key: '5085618e4664aa12a2d48d289ae5b2c3ac15d83b', class: "zonos--elements" });
181
+ return h(Host, { key: 'a5a97e414d4be249a1d8a733356111a65623aaeb', class: "zonos--elements" });
182
182
  }
183
183
  static get is() { return "zonos-controller"; }
184
184
  static get encapsulation() { return "shadow"; }