@zonos/elements 1.3.208 → 1.3.209

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 (215) hide show
  1. package/dist/cjs/{cart-47c17ebf.js → cart-2ec8cac2.js} +285 -40
  2. package/dist/cjs/{debounce-0b9c0f8a.js → debounce-465a4328.js} +1 -1
  3. package/dist/cjs/{getBorderRadius-c424eb05.js → getBorderRadius-1b5e33cf.js} +1 -1
  4. package/dist/cjs/{handleFetch-969d05d8.js → handleFetch-05227713.js} +2 -6
  5. package/dist/cjs/index.cjs.js +8 -8
  6. package/dist/cjs/{isDarkColor-35e8daec.js → isDarkColor-428965f4.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{localization-e9089be5.js → localization-9b43376c.js} +2 -2
  9. package/dist/cjs/{paypal-3a803d21.js → paypal-6449314e.js} +5 -5
  10. package/dist/cjs/{updateCheckoutSessionAttributes-d0332530.js → updateCheckoutSessionAttributes-a31bb681.js} +2 -2
  11. package/dist/cjs/zonos-address_11.cjs.entry.js +104 -84
  12. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  15. package/dist/cjs/zonos-card.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-cart-items_14.cjs.entry.js +91 -41
  17. package/dist/cjs/zonos-checkout.cjs.entry.js +45 -21
  18. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  20. package/dist/cjs/zonos-country-flag.cjs.entry.js +3 -3
  21. package/dist/cjs/zonos-country-select_4.cjs.entry.js +13 -9
  22. package/dist/cjs/zonos-elements.cjs.js +1 -1
  23. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +7 -7
  24. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  25. package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
  26. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  27. package/dist/cjs/zonos-language-select_2.cjs.entry.js +3 -3
  28. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  30. package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
  31. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  32. package/dist/cjs/zonos-toggle.cjs.entry.js +1 -1
  33. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  34. package/dist/cjs/{zonosStore-7c1e1bc1.js → zonosStore-f8ee56aa.js} +1 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +36 -12
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +63 -25
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +33 -11
  38. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +2 -2
  39. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +9 -5
  40. package/dist/collection/components/store/checkout/cart.js +9 -2
  41. package/dist/collection/components/store/checkout/stripe.js +266 -31
  42. package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
  43. package/dist/collection/components/stripe/zonos-address/zonos-address.js +24 -3
  44. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +2 -1
  45. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +7 -5
  46. package/dist/collection/components/utils/api/cartCalculateLandedCost.js +3 -2
  47. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -2
  48. package/dist/collection/components/utils/handleFetch.js +2 -1
  49. package/dist/collection/components/utils/logging/log.js +0 -5
  50. package/dist/collection/types/checkout/api/CreateParty.js +1 -0
  51. package/dist/collection/types/generated/graphql.internal.types.js +3 -0
  52. package/dist/collection/types/index.js +1 -0
  53. package/dist/esm/{cart-5b417c0d.js → cart-2f84f632.js} +284 -41
  54. package/dist/esm/{debounce-7ebfa15b.js → debounce-0e42da22.js} +1 -1
  55. package/dist/esm/{getBorderRadius-174305ff.js → getBorderRadius-71b3b8ab.js} +1 -1
  56. package/dist/esm/{handleFetch-621e45bc.js → handleFetch-7dd4622b.js} +2 -6
  57. package/dist/esm/index.js +8 -8
  58. package/dist/esm/{isDarkColor-915b06b8.js → isDarkColor-3a9d6108.js} +1 -1
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/{localization-669a1714.js → localization-e17c211b.js} +2 -2
  61. package/dist/esm/{paypal-3a0cf86b.js → paypal-1cf701aa.js} +6 -6
  62. package/dist/esm/{updateCheckoutSessionAttributes-183ca6c1.js → updateCheckoutSessionAttributes-5097e715.js} +2 -2
  63. package/dist/esm/zonos-address_11.entry.js +104 -84
  64. package/dist/esm/zonos-badge.entry.js +1 -1
  65. package/dist/esm/zonos-banner.entry.js +1 -1
  66. package/dist/esm/zonos-button_3.entry.js +3 -3
  67. package/dist/esm/zonos-card.entry.js +2 -2
  68. package/dist/esm/zonos-cart-items_14.entry.js +91 -41
  69. package/dist/esm/zonos-checkout.entry.js +45 -21
  70. package/dist/esm/zonos-collapse.entry.js +1 -1
  71. package/dist/esm/zonos-controller.entry.js +6 -6
  72. package/dist/esm/zonos-country-flag.entry.js +3 -3
  73. package/dist/esm/zonos-country-select_4.entry.js +13 -9
  74. package/dist/esm/zonos-elements.js +1 -1
  75. package/dist/esm/zonos-empty-state-payment_4.entry.js +7 -7
  76. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  77. package/dist/esm/zonos-hello.entry.js +4 -4
  78. package/dist/esm/zonos-input.entry.js +2 -2
  79. package/dist/esm/zonos-language-select_2.entry.js +3 -3
  80. package/dist/esm/zonos-logo.entry.js +1 -1
  81. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  82. package/dist/esm/zonos-stripe-input.entry.js +3 -3
  83. package/dist/esm/zonos-text.entry.js +1 -1
  84. package/dist/esm/zonos-toggle.entry.js +1 -1
  85. package/dist/esm/zonos-v-stack.entry.js +1 -1
  86. package/dist/esm/{zonosStore-504a7030.js → zonosStore-00975763.js} +1 -1
  87. package/dist/esm-es5/cart-2f84f632.js +1 -0
  88. package/dist/esm-es5/{debounce-7ebfa15b.js → debounce-0e42da22.js} +1 -1
  89. package/dist/esm-es5/{getBorderRadius-174305ff.js → getBorderRadius-71b3b8ab.js} +1 -1
  90. package/dist/esm-es5/handleFetch-7dd4622b.js +1 -0
  91. package/dist/esm-es5/index.js +1 -1
  92. package/dist/esm-es5/{isDarkColor-915b06b8.js → isDarkColor-3a9d6108.js} +1 -1
  93. package/dist/esm-es5/loader.js +1 -1
  94. package/dist/esm-es5/{localization-669a1714.js → localization-e17c211b.js} +1 -1
  95. package/dist/esm-es5/{paypal-3a0cf86b.js → paypal-1cf701aa.js} +2 -2
  96. package/dist/esm-es5/{updateCheckoutSessionAttributes-183ca6c1.js → updateCheckoutSessionAttributes-5097e715.js} +1 -1
  97. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  98. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  99. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  100. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  101. package/dist/esm-es5/zonos-card.entry.js +1 -1
  102. package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -1
  103. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  104. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  105. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  106. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  107. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  108. package/dist/esm-es5/zonos-elements.js +1 -1
  109. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  110. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  111. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  112. package/dist/esm-es5/zonos-input.entry.js +1 -1
  113. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  114. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  115. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  116. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  117. package/dist/esm-es5/zonos-text.entry.js +1 -1
  118. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  119. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  120. package/dist/esm-es5/{zonosStore-504a7030.js → zonosStore-00975763.js} +1 -1
  121. package/dist/scripts/index.d.ts +8 -0
  122. package/dist/scripts/index.js +1 -1
  123. package/dist/scripts/loadZonos.js +1 -1
  124. package/dist/scripts/zonos.js +1 -1
  125. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +8 -4
  126. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +3 -0
  127. package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +1 -0
  128. package/dist/types/components/store/checkout/cart.d.ts +6 -2
  129. package/dist/types/components/store/checkout/stripe.d.ts +33 -6
  130. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +6 -0
  131. package/dist/types/types/checkout/api/CheckoutSession.d.ts +2 -0
  132. package/dist/types/types/checkout/api/CreateParty.d.ts +34 -0
  133. package/dist/types/types/generated/graphql.internal.types.d.ts +21 -5
  134. package/dist/types/types/generated/graphql.internal.types.ts +26 -3
  135. package/dist/types/types/index.d.ts +1 -0
  136. package/dist/types/types/utils/ZonosSettings.d.ts +6 -0
  137. package/dist/zonos-elements/index.esm.js +1 -1
  138. package/dist/zonos-elements/{p-c5455a34.system.js → p-0751b878.system.js} +1 -1
  139. package/dist/zonos-elements/{p-39039ab7.system.entry.js → p-08b29f73.system.entry.js} +1 -1
  140. package/dist/zonos-elements/{p-0731fbba.entry.js → p-0ca1d6dd.entry.js} +1 -1
  141. package/dist/zonos-elements/{p-e1c2b8f8.entry.js → p-144b5006.entry.js} +1 -1
  142. package/dist/zonos-elements/{p-d5bdbbb3.system.js → p-19182dc7.system.js} +1 -1
  143. package/dist/zonos-elements/{p-066afca1.system.entry.js → p-1dc78af3.system.entry.js} +1 -1
  144. package/dist/zonos-elements/{p-5f2a2ca7.js → p-207bd04a.js} +1 -1
  145. package/dist/zonos-elements/p-20839c46.js +1 -0
  146. package/dist/zonos-elements/{p-63ca1242.system.entry.js → p-2122d2cc.system.entry.js} +1 -1
  147. package/dist/zonos-elements/{p-a09bdd20.system.entry.js → p-239695e8.system.entry.js} +1 -1
  148. package/dist/zonos-elements/{p-6b406abd.entry.js → p-23fe7661.entry.js} +1 -1
  149. package/dist/zonos-elements/p-2652198d.js +1 -0
  150. package/dist/zonos-elements/p-30a9f802.system.entry.js +1 -0
  151. package/dist/zonos-elements/{p-4451a598.system.js → p-3633a952.system.js} +1 -1
  152. package/dist/zonos-elements/{p-6be43ba8.entry.js → p-36b686b6.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-b7a5b367.js → p-371d91d1.js} +2 -2
  154. package/dist/zonos-elements/{p-081fa4a8.entry.js → p-3934b38a.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-a4d995a2.system.js → p-3c752420.system.js} +1 -1
  156. package/dist/zonos-elements/p-3ee44728.system.js +1 -1
  157. package/dist/zonos-elements/{p-7f568108.system.js → p-44c0a584.system.js} +2 -2
  158. package/dist/zonos-elements/{p-cd376c7a.system.entry.js → p-45a2f9b1.system.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-0d908c15.system.js → p-4a1b4a2d.system.js} +1 -1
  160. package/dist/zonos-elements/p-4c70fd75.entry.js +1 -0
  161. package/dist/zonos-elements/{p-07905246.entry.js → p-4d62f3de.entry.js} +1 -1
  162. package/dist/zonos-elements/{p-bb850bb7.entry.js → p-4dbaa2c2.entry.js} +1 -1
  163. package/dist/zonos-elements/{p-0fb14108.entry.js → p-4ed73ff8.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-ef594c0c.entry.js → p-4f5513dc.entry.js} +1 -1
  165. package/dist/zonos-elements/p-542acc2c.js +1 -0
  166. package/dist/zonos-elements/p-5711e187.system.js +1 -0
  167. package/dist/zonos-elements/{p-c607d026.entry.js → p-5956a9e0.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-d096d7f2.entry.js → p-5b7686f8.entry.js} +1 -1
  169. package/dist/zonos-elements/{p-67f807bc.entry.js → p-63a4dac5.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-51d596a0.system.entry.js → p-695bf400.system.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-d35d17f3.js → p-6aa728f2.js} +1 -1
  172. package/dist/zonos-elements/{p-4bf54953.js → p-71c6bdc3.js} +1 -1
  173. package/dist/zonos-elements/{p-0f368368.system.js → p-738a49c0.system.js} +1 -1
  174. package/dist/zonos-elements/{p-7e346632.system.entry.js → p-74276b82.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-d1a31577.entry.js → p-77e22be4.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-a3a8ba10.entry.js → p-78dd1c53.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-3d6f6367.system.entry.js → p-7f9bbbb3.system.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-ea30d92d.system.entry.js → p-896f2358.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-a63bac79.system.entry.js → p-8f41d864.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-1f706fc9.system.entry.js → p-964e2587.system.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-1530f958.system.entry.js → p-97831744.system.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-160da12a.system.entry.js → p-9d95c896.system.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-4f04b499.entry.js → p-a24870af.entry.js} +1 -1
  184. package/dist/zonos-elements/p-a411ce2a.system.js +1 -0
  185. package/dist/zonos-elements/{p-5c772fab.system.entry.js → p-a4686344.system.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-a158b406.js → p-a6f77d44.js} +1 -1
  187. package/dist/zonos-elements/{p-fc3a6495.entry.js → p-a8f421ac.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-da304b78.entry.js → p-aa40d402.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-6c991320.entry.js → p-ad1e1dbc.entry.js} +1 -1
  190. package/dist/zonos-elements/p-b1bfeec9.system.entry.js +1 -0
  191. package/dist/zonos-elements/{p-ab6efb03.system.entry.js → p-baa88176.system.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-963fa567.system.entry.js → p-bf9cb85f.system.entry.js} +1 -1
  193. package/dist/zonos-elements/p-bfdb4e7a.entry.js +1 -0
  194. package/dist/zonos-elements/{p-803e59d2.system.entry.js → p-c345b306.system.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-a958c4f0.system.entry.js → p-d1697144.system.entry.js} +1 -1
  196. package/dist/zonos-elements/p-d1c0bf92.entry.js +1 -0
  197. package/dist/zonos-elements/{p-b3fa7f19.js → p-d6a53ea6.js} +1 -1
  198. package/dist/zonos-elements/{p-02463cc1.system.entry.js → p-db424e02.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-39428328.system.js → p-eb77c0bf.system.js} +1 -1
  200. package/dist/zonos-elements/{p-f49834d4.system.entry.js → p-ef1ccec6.system.entry.js} +1 -1
  201. package/dist/zonos-elements/{p-5d909d3d.entry.js → p-fdf5b8f4.entry.js} +1 -1
  202. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  203. package/package.json +1 -1
  204. package/dist/esm-es5/cart-5b417c0d.js +0 -1
  205. package/dist/esm-es5/handleFetch-621e45bc.js +0 -1
  206. package/dist/zonos-elements/p-0794c530.entry.js +0 -1
  207. package/dist/zonos-elements/p-0fc02cde.js +0 -1
  208. package/dist/zonos-elements/p-1b3e92ea.system.entry.js +0 -1
  209. package/dist/zonos-elements/p-1b75aa35.system.js +0 -1
  210. package/dist/zonos-elements/p-2d4e0280.entry.js +0 -1
  211. package/dist/zonos-elements/p-40a2a649.js +0 -1
  212. package/dist/zonos-elements/p-5539386e.system.entry.js +0 -1
  213. package/dist/zonos-elements/p-91553cf0.system.js +0 -1
  214. package/dist/zonos-elements/p-c740353c.js +0 -1
  215. package/dist/zonos-elements/p-f1f3a846.entry.js +0 -1
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-c424eb05.js');
9
- const cart = require('./cart-47c17ebf.js');
10
- const localization = require('./localization-e9089be5.js');
11
- const handleFetch = require('./handleFetch-969d05d8.js');
12
- const paypal = require('./paypal-3a803d21.js');
8
+ const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
9
+ const cart = require('./cart-2ec8cac2.js');
10
+ const localization = require('./localization-9b43376c.js');
11
+ const handleFetch = require('./handleFetch-05227713.js');
12
+ const paypal = require('./paypal-6449314e.js');
13
13
  require('./VarianceTest-0cb1e118.js');
14
- require('./isDarkColor-35e8daec.js');
14
+ require('./isDarkColor-428965f4.js');
15
15
 
16
16
  const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
17
17
  <mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const localization = require('./localization-e9089be5.js');
7
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const localization = require('./localization-9b43376c.js');
7
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
11
11
  const TaxId = require('./TaxId-12acedde.js');
12
- require('./handleFetch-969d05d8.js');
12
+ require('./handleFetch-05227713.js');
13
13
  require('./VarianceTest-0cb1e118.js');
14
14
 
15
15
  const getHasMoreSpaceAbove = (ref) => {
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const debounce = require('./debounce-0b9c0f8a.js');
7
- const localization = require('./localization-e9089be5.js');
8
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const debounce = require('./debounce-465a4328.js');
7
+ const localization = require('./localization-9b43376c.js');
8
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
- const handleFetch = require('./handleFetch-969d05d8.js');
10
+ const handleFetch = require('./handleFetch-05227713.js');
11
11
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
12
12
  require('./VarianceTest-0cb1e118.js');
13
13
 
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-c424eb05.js');
8
+ const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
9
9
  require('./VarianceTest-0cb1e118.js');
10
10
 
11
11
  const zonosInputCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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(--zonos--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(--zonos--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(--zonos--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}";
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const localization = require('./localization-e9089be5.js');
7
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const localization = require('./localization-9b43376c.js');
7
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
- require('./handleFetch-969d05d8.js');
9
+ require('./handleFetch-05227713.js');
10
10
  require('./VarianceTest-0cb1e118.js');
11
11
 
12
12
  const GreenCheckDuotoneIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  require('./VarianceTest-0cb1e118.js');
9
9
 
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-c424eb05.js');
8
+ const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
9
9
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
10
10
  require('./VarianceTest-0cb1e118.js');
11
11
 
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const helpers = require('./helpers-5bdbb68c.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- const getBorderRadius = require('./getBorderRadius-c424eb05.js');
10
- const isDarkColor = require('./isDarkColor-35e8daec.js');
9
+ const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
10
+ const isDarkColor = require('./isDarkColor-428965f4.js');
11
11
  require('./VarianceTest-0cb1e118.js');
12
12
 
13
13
  const zonosStripeInputCss = ".sc-zonos-stripe-input-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-stripe-input-h *.sc-zonos-stripe-input{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-stripe-input-h img.sc-zonos-stripe-input{max-width:100%}.sc-zonos-stripe-input-h dl.sc-zonos-stripe-input,.sc-zonos-stripe-input-h dd.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h1.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h2.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h3.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h4.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h5.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h6.sc-zonos-stripe-input,.sc-zonos-stripe-input-h hr.sc-zonos-stripe-input,.sc-zonos-stripe-input-h figure.sc-zonos-stripe-input,.sc-zonos-stripe-input-h p.sc-zonos-stripe-input,.sc-zonos-stripe-input-h pre.sc-zonos-stripe-input{margin:0}.sc-zonos-stripe-input-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-stripe-input-h{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}.dark.sc-zonos-stripe-input-h{color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}.sc-zonos-stripe-input-h{margin:1px}.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px;height:calc(var(--zonos-elements-size-xl) - 2px)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-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(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected+label.sc-zonos-stripe-input+div.sc-zonos-stripe-input{background-color:#e8f0fe}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.sc-zonos-stripe-input{padding:24px 4px 2px 16px}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input{padding-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{margin-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus{outline:none;border:var(--zonos--border)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}.sc-zonos-stripe-input-h .zonos--floated-input.has-error.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-webkit-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-moz-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input:-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-webkit-autofill,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;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% - 8px);z-index:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input::after{content:\"\";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input{pointer-events:inherit}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input::after{cursor:not-allowed;z-index:1}.dark.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{background:#30313d}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
9
9
  const styles = require('./styles-d1e64fb9.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  require('./VarianceTest-0cb1e118.js');
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1c710d00.js');
6
- const zonosStore = require('./zonosStore-7c1e1bc1.js');
6
+ const zonosStore = require('./zonosStore-f8ee56aa.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  require('./VarianceTest-0cb1e118.js');
9
9
 
@@ -2932,3 +2932,4 @@ exports.mergeConfig = mergeConfig;
2932
2932
  exports.zonosStore = zonosStore;
2933
2933
  exports.zonosStoreFontFamily = zonosStoreFontFamily;
2934
2934
  exports.zonosStoreInitSetting = zonosStoreInitSetting;
2935
+ exports.zonosStoreOnChange = zonosStoreOnChange;
@@ -1070,6 +1070,7 @@ export class ZonosCheckout {
1070
1070
  }
1071
1071
  }
1072
1072
  async handleCustomerInfoContinue() {
1073
+ var _a, _b, _c, _d;
1073
1074
  // submit google tag when the form is complete
1074
1075
  submitGtag('zonos-checkout-customer-info');
1075
1076
  const checkoutSessionId = storageStore.checkoutSessionId;
@@ -1079,10 +1080,26 @@ export class ZonosCheckout {
1079
1080
  });
1080
1081
  this.submitLoading = true;
1081
1082
  // fetch landed cost data if we not fetching.
1082
- await stripeStorePrefetchLandedCost();
1083
- // keep checking landed cost data until it's ready to move to next screen
1084
- const interval = setInterval(() => {
1085
- if (cartStore.landedCostData || !stripeStore.isFetchingLandedCost) {
1083
+ const { isRequestNotReady } = await stripeStorePrefetchLandedCost();
1084
+ // If the request is not ready at the time user click Continue, logging it out so we can investigate the issue
1085
+ if (isRequestNotReady && cartStore.addressFormRenderType === 'stripe') {
1086
+ void sendErrorLog({
1087
+ endpoint: 'ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE',
1088
+ errors: ['Address not ready at customer info continue'],
1089
+ metadata: {
1090
+ address: (_b = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.address,
1091
+ billingAddress: (_d = (_c = stripeStore.stripeBillingAddressEventData) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.address,
1092
+ cartId: window.Zonos.cartId,
1093
+ },
1094
+ });
1095
+ }
1096
+ const moveToNextStep = (interval) => {
1097
+ if (cartStore.step !== 'customer-info') {
1098
+ // stop interval if the step is not customer-info
1099
+ clearInterval(interval);
1100
+ return;
1101
+ }
1102
+ if (!stripeStore.isFetchingLandedCost) {
1086
1103
  if (cartStore.landedCostData) {
1087
1104
  // start init paypal with the presentment currency when landed cost is fetched
1088
1105
  void paypalInitScript({
@@ -1092,17 +1109,24 @@ export class ZonosCheckout {
1092
1109
  cartStoreNextStep();
1093
1110
  }
1094
1111
  this.submitLoading = false;
1095
- clearInterval(interval);
1112
+ if (interval) {
1113
+ clearInterval(interval);
1114
+ }
1096
1115
  }
1097
- }, 500);
1116
+ };
1117
+ // Immediately move to the next step
1118
+ moveToNextStep();
1119
+ // keep checking landed cost data until it's ready to move to next screen
1120
+ const interval = setInterval(() => {
1121
+ moveToNextStep(interval);
1122
+ }, 20);
1123
+ // cleanup interval if no data is fetched after 10 seconds
1124
+ setTimeout(() => {
1125
+ clearInterval(interval);
1126
+ }, 10000);
1098
1127
  }
1099
1128
  async handleShippingContinue() {
1100
- this.submitLoading = true;
1101
- // show loading for the button for a bit
1102
- setTimeout(() => {
1103
- cartStoreNextStep();
1104
- this.submitLoading = false;
1105
- }, 500);
1129
+ cartStoreNextStep();
1106
1130
  }
1107
1131
  handleInventoryCheckDialogConfirm() {
1108
1132
  // reset inventory check message to close the inventory check alert
@@ -1,9 +1,10 @@
1
1
  import { h, Host, } from "@stencil/core";
2
+ import { cartStore, cartStoreOnChange, } from "../../../store/checkout/cart";
2
3
  import { stripeStore, stripeStoreTranslateAddressToLatin, } from "../../../store/checkout/stripe";
3
- import { localizationStore } from "../../../store/hello/localization";
4
+ import { localizationStore, localizationStoreOnChange, } from "../../../store/hello/localization";
4
5
  import { storageStore } from "../../../store/storageStore";
5
6
  import { translate } from "../../../store/translationStore";
6
- import { getZonosStoreTheme, zonosStore, } from "../../../store/zonosStore";
7
+ import { getZonosStoreTheme, zonosStore, zonosStoreOnChange, } from "../../../store/zonosStore";
7
8
  import { updateCheckoutSessionAttributes } from "../../../utils/api/updateCheckoutSessionAttributes";
8
9
  import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
9
10
  import { log } from "../../../utils/logging/log";
@@ -11,6 +12,7 @@ import { sendErrorLog } from "../../../utils/logging/sendErrorLog";
11
12
  import { taxIdValidationResult } from "../../../utils/taxIdValidationResult";
12
13
  export class ZonosCustomerInfo {
13
14
  constructor() {
15
+ this.storeUnsubscribeList = [];
14
16
  /**
15
17
  * Whether or not the continue button is loading
16
18
  */
@@ -53,10 +55,6 @@ export class ZonosCustomerInfo {
53
55
  * Handler for the dialog close button
54
56
  */
55
57
  this.openAddressValidationDialog = false;
56
- /**
57
- * Whether or not the custom address form is enabled
58
- */
59
- this.shouldEnabledCustomAddress = false;
60
58
  /**
61
59
  * Handler for the email error state
62
60
  */
@@ -65,6 +63,9 @@ export class ZonosCustomerInfo {
65
63
  * Whether or not the custom address form is used
66
64
  */
67
65
  this.recordedFormTypeUsed = false;
66
+ this.selectedCountryCode = localizationStore.selectedCountryCode;
67
+ this.genericSettings = zonosStore.genericSettings;
68
+ this.addressFormRenderType = cartStore.addressFormRenderType;
68
69
  /**
69
70
  * Handler for invalid characters in the address
70
71
  */
@@ -184,7 +185,7 @@ export class ZonosCustomerInfo {
184
185
  };
185
186
  };
186
187
  this.handleValidate = () => {
187
- var _a, _b, _c, _d;
188
+ var _a, _b;
188
189
  const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
189
190
  const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
190
191
  const stripeLinkEventData = stripeStore.stripeLinkEventData;
@@ -198,11 +199,11 @@ export class ZonosCustomerInfo {
198
199
  void ((_a = stripeStore.stripeAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
199
200
  void ((_b = stripeStore.stripeBillingAddressElement) === null || _b === void 0 ? void 0 : _b.getValue());
200
201
  // if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
201
- const isValidBilling = ((_c = zonosStore.genericSettings) === null || _c === void 0 ? void 0 : _c.shouldEnabledCustomAddress)
202
+ const isValidBilling = this.addressFormRenderType === 'zonos'
202
203
  ? this.validateCustomAddressForm('billing').isValid
203
204
  : isValidStripeBilling;
204
205
  // if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
205
- const isValidShipping = ((_d = zonosStore.genericSettings) === null || _d === void 0 ? void 0 : _d.shouldEnabledCustomAddress)
206
+ const isValidShipping = this.addressFormRenderType === 'zonos'
206
207
  ? this.validateCustomAddressForm('shipping').isValid
207
208
  : isValidStripeShipping;
208
209
  if (!isValidLink && (stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.empty)) {
@@ -254,8 +255,7 @@ export class ZonosCustomerInfo {
254
255
  };
255
256
  };
256
257
  this.renderAddressComponent = (type) => {
257
- var _a, _b;
258
- if (!localizationStore.selectedCountryCode) {
258
+ if (!this.selectedCountryCode) {
259
259
  void sendErrorLog({
260
260
  endpoint: 'NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT',
261
261
  errors: ['No country selected when rendering address component'],
@@ -267,9 +267,6 @@ export class ZonosCustomerInfo {
267
267
  }
268
268
  // Only use the default address for shipping address
269
269
  const defaultAddress = type === 'shipping' ? this.defaultAddress : [];
270
- const shouldUseCustomAddressForm = !!localizationStore.selectedCountryCode &&
271
- this.shouldEnabledCustomAddress &&
272
- !!((_b = (_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.countryCustomAddressEnabled) === null || _b === void 0 ? void 0 : _b.includes(localizationStore.selectedCountryCode));
273
270
  // Should only record the form type used once
274
271
  if (type === 'shipping' &&
275
272
  storageStore.checkoutSessionId &&
@@ -278,7 +275,7 @@ export class ZonosCustomerInfo {
278
275
  attributes: [
279
276
  {
280
277
  key: 'ZONOS_FORM_TYPE_USING',
281
- value: shouldUseCustomAddressForm ? 'custom' : 'stripe',
278
+ value: this.addressFormRenderType === 'zonos' ? 'custom' : 'stripe',
282
279
  },
283
280
  ],
284
281
  checkoutSessionId: storageStore.checkoutSessionId,
@@ -286,7 +283,7 @@ export class ZonosCustomerInfo {
286
283
  this.recordedFormTypeUsed = true;
287
284
  }
288
285
  // Render custom address component if the custom address form is enabled
289
- if (shouldUseCustomAddressForm) {
286
+ if (this.addressFormRenderType === 'zonos') {
290
287
  return (h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }));
291
288
  }
292
289
  // Render Stripe address component by default
@@ -324,8 +321,41 @@ export class ZonosCustomerInfo {
324
321
  }
325
322
  return invalidList;
326
323
  }
324
+ watchShouldEnabledCustomAddress() {
325
+ var _a, _b, _c;
326
+ const shouldEnabledCustomAddress = this.shouldUseCustomAddressFormOverride ||
327
+ !!((_a = this.genericSettings) === null || _a === void 0 ? void 0 : _a.shouldEnabledCustomAddress);
328
+ const shouldUseCustomAddressForm = !!this.selectedCountryCode &&
329
+ shouldEnabledCustomAddress &&
330
+ !!((_c = (_b = this.genericSettings) === null || _b === void 0 ? void 0 : _b.countryCustomAddressEnabled) === null || _c === void 0 ? void 0 : _c.includes(this.selectedCountryCode));
331
+ // Update the address form render type in the cart store
332
+ cartStore.addressFormRenderType = shouldUseCustomAddressForm
333
+ ? 'zonos'
334
+ : 'stripe';
335
+ }
336
+ disconnectedCallback() {
337
+ // unsubscribe from store subscriptions
338
+ try {
339
+ this.storeUnsubscribeList.forEach(subscription => subscription());
340
+ }
341
+ catch (_a) { }
342
+ }
343
+ componentWillLoad() {
344
+ this.watchShouldEnabledCustomAddress();
345
+ this.storeUnsubscribeList = [
346
+ zonosStoreOnChange('genericSettings', () => {
347
+ this.genericSettings = zonosStore.genericSettings;
348
+ }),
349
+ localizationStoreOnChange('selectedCountryCode', () => {
350
+ this.selectedCountryCode = localizationStore.selectedCountryCode;
351
+ }),
352
+ cartStoreOnChange('addressFormRenderType', () => {
353
+ this.addressFormRenderType = cartStore.addressFormRenderType;
354
+ }),
355
+ ];
356
+ }
327
357
  render() {
328
- var _a, _b, _c, _d, _e, _f, _g;
358
+ var _a, _b, _c, _d, _e, _f;
329
359
  if (!stripeStore.stripeElements) {
330
360
  return null;
331
361
  }
@@ -341,16 +371,13 @@ export class ZonosCustomerInfo {
341
371
  this.shippingCountry =
342
372
  stripeStore.stripeAddressEventData.value.address.country;
343
373
  }
344
- this.shouldEnabledCustomAddress =
345
- this.shouldUseCustomAddressFormOverride ||
346
- !!((_b = zonosStore.genericSettings) === null || _b === void 0 ? void 0 : _b.shouldEnabledCustomAddress);
347
374
  const showBilling = !stripeStore.stripeShippingSameAsBilling;
348
375
  // Get theme for the update dialog, inherit from the theme, no from this component theme
349
376
  const theme = getZonosStoreTheme(zonosStore.appearance.theme);
350
377
  // Attempt to get the email from email from customer profile's locations, if not provided, just use the email from root customer profile
351
- const defaultEmail = ((_c = this.defaultAddress.find(Boolean)) === null || _c === void 0 ? void 0 : _c.email) ||
352
- ((_f = (_e = (_d = stripeStore.customerProfile) === null || _d === void 0 ? void 0 : _d.locations) === null || _e === void 0 ? void 0 : _e.find(Boolean)) === null || _f === void 0 ? void 0 : _f.email) ||
353
- ((_g = stripeStore.customerProfile) === null || _g === void 0 ? void 0 : _g.email);
378
+ const defaultEmail = ((_b = this.defaultAddress.find(Boolean)) === null || _b === void 0 ? void 0 : _b.email) ||
379
+ ((_e = (_d = (_c = stripeStore.customerProfile) === null || _c === void 0 ? void 0 : _c.locations) === null || _d === void 0 ? void 0 : _d.find(Boolean)) === null || _e === void 0 ? void 0 : _e.email) ||
380
+ ((_f = stripeStore.customerProfile) === null || _f === void 0 ? void 0 : _f.email);
354
381
  return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: defaultEmail, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: translate('Contact') }), this.renderAddressComponent('shipping'), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
355
382
  stripeStore.stripeShippingSameAsBilling = e.detail;
356
383
  } }), h("zonos-collapse", { collapsed: !showBilling }, this.renderAddressComponent('billing')), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
@@ -523,9 +550,11 @@ export class ZonosCustomerInfo {
523
550
  "invalidShippingCharacterList": {},
524
551
  "invalidBillingCharacterList": {},
525
552
  "openAddressValidationDialog": {},
526
- "shouldEnabledCustomAddress": {},
527
553
  "isEmailError": {},
528
- "recordedFormTypeUsed": {}
554
+ "recordedFormTypeUsed": {},
555
+ "selectedCountryCode": {},
556
+ "genericSettings": {},
557
+ "addressFormRenderType": {}
529
558
  };
530
559
  }
531
560
  static get events() {
@@ -578,6 +607,15 @@ export class ZonosCustomerInfo {
578
607
  return [{
579
608
  "propName": "showErrorBanner",
580
609
  "methodName": "watchShowErrorBanner"
610
+ }, {
611
+ "propName": "shouldUseCustomAddressFormOverride",
612
+ "methodName": "watchShouldEnabledCustomAddress"
613
+ }, {
614
+ "propName": "genericSettings",
615
+ "methodName": "watchShouldEnabledCustomAddress"
616
+ }, {
617
+ "propName": "selectedCountryCode",
618
+ "methodName": "watchShouldEnabledCustomAddress"
581
619
  }];
582
620
  }
583
621
  }
@@ -1,6 +1,6 @@
1
1
  import { Fragment, h, Host, } from "@stencil/core";
2
- import { cartStore, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
3
- import { stripeStore } from "../../../store/checkout/stripe";
2
+ import { cartStore, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreOnChange, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
3
+ import { stripeStore, stripeStoreAsyncAddressUpdate, } from "../../../store/checkout/stripe";
4
4
  import { storageStore } from "../../../store/storageStore";
5
5
  import { translate } from "../../../store/translationStore";
6
6
  import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
@@ -12,6 +12,7 @@ import { submitGtag } from "../../../utils/submitGtag";
12
12
  import ChevronUpIcon from "./assets/ChevronUpIcon.svg";
13
13
  export class ZonosShipping {
14
14
  constructor() {
15
+ this.storeUnsubscribeList = [];
15
16
  /**
16
17
  * Whether or not the continue button is loading
17
18
  */
@@ -32,6 +33,7 @@ export class ZonosShipping {
32
33
  this.serviceLevelsOther = [];
33
34
  this.serviceLevelsAll = [];
34
35
  this.displayBaseCurrency = false;
36
+ this.shippingData = [];
35
37
  this.handleRadioSelected = async (e) => {
36
38
  var _a;
37
39
  this.selectedShippingMethod = e.detail;
@@ -43,6 +45,8 @@ export class ZonosShipping {
43
45
  return;
44
46
  }
45
47
  this.isSelecting = true;
48
+ // update the address async if we already got landed cost data
49
+ await stripeStoreAsyncAddressUpdate();
46
50
  // save selected shipping option to store
47
51
  await cartStoreUpdateSelectedShippingOption(selectedShippingOption, e.detail.landedCostId);
48
52
  this.isSelecting = false;
@@ -97,6 +101,7 @@ export class ZonosShipping {
97
101
  };
98
102
  this.initServiceLevels = () => {
99
103
  var _a;
104
+ this.collapsedDAPOptions = true;
100
105
  const serviceLevels = ((_a = cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.flatMap(item => {
101
106
  var _a;
102
107
  const transitData = cartStoreGetShippingTransitInfo(item);
@@ -154,12 +159,14 @@ export class ZonosShipping {
154
159
  }
155
160
  return false;
156
161
  };
157
- this.preselectFirstShippingMethod = () => {
162
+ this.preselectFirstShippingMethod = async () => {
158
163
  this.initServiceLevels();
159
164
  const selectedServiceLevel = this.serviceLevelsAll.find(item => { var _a; return item.shipmentRatingId === ((_a = cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
160
165
  if (selectedServiceLevel) {
161
166
  // keep the selected shipping method
162
- this.selectedShippingMethod = selectedServiceLevel;
167
+ void this.handleRadioSelected({
168
+ detail: selectedServiceLevel,
169
+ });
163
170
  return;
164
171
  }
165
172
  const firstServiceLevel = this.serviceLevelsAll.find(Boolean);
@@ -171,16 +178,30 @@ export class ZonosShipping {
171
178
  }
172
179
  };
173
180
  }
181
+ disconnectedCallback() {
182
+ // unsubscribe from store subscriptions
183
+ this.storeUnsubscribeList.forEach(subscription => subscription());
184
+ }
174
185
  componentWillLoad() {
175
- this.preselectFirstShippingMethod();
186
+ void this.preselectFirstShippingMethod();
187
+ this.storeUnsubscribeList = [
188
+ cartStoreOnChange('shippingData', () => {
189
+ if (this.isOutdatedShippingData()) {
190
+ // re-init service levels if the shipping data is outdated (promo code applied)
191
+ void this.preselectFirstShippingMethod();
192
+ }
193
+ }),
194
+ cartStoreOnChange('landedCostData', () => {
195
+ if (this.isOutdatedShippingData()) {
196
+ // re-init service levels if the shipping data is outdated (promo code applied)
197
+ void this.preselectFirstShippingMethod();
198
+ }
199
+ }),
200
+ ];
176
201
  }
177
202
  render() {
178
- if (this.isOutdatedShippingData()) {
179
- // re-init service levels if the shipping data is outdated (promo code applied)
180
- this.preselectFirstShippingMethod();
181
- }
182
203
  // re-init service levels if the currency is toggled
183
- else if (this.isCurrencyToggled()) {
204
+ if (this.isCurrencyToggled()) {
184
205
  this.initServiceLevels();
185
206
  }
186
207
  const defaultShownServiceLevels = [
@@ -300,7 +321,8 @@ export class ZonosShipping {
300
321
  "serviceLevelsDAP": {},
301
322
  "serviceLevelsOther": {},
302
323
  "serviceLevelsAll": {},
303
- "displayBaseCurrency": {}
324
+ "displayBaseCurrency": {},
325
+ "shippingData": {}
304
326
  };
305
327
  }
306
328
  static get events() {
@@ -82,12 +82,12 @@ export class ZonosCheckoutProgressTabs {
82
82
  '--zonos--progress-percent': this.getTotalSuccessStep(),
83
83
  } }, h("div", { key: 'd173893ab0da684a189127ab511db90ba3a0985c', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
84
84
  const isSelected = tab.value === selectedStep;
85
- return (h("button", { class: classes([
85
+ return (h("button", { "aria-label": `Tab ${tab.label}`, class: classes([
86
86
  'zonos--tab-item',
87
87
  tab.value === selectedStep && 'selected',
88
88
  tab.isDone && 'done',
89
89
  ]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => this.setTabSelected(tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, translate(tab.label))));
90
- })), h("div", { key: '1e8dbcee0cc21837b030760250755fe5292bd261', class: "zonos--tab-progress" }, h("div", { key: 'a9250c1ca7b7a40f5b6d0bbbeca24f657471cda1', class: "zonos--progress-bar-fill" }))));
90
+ })), h("div", { key: 'e424eda69e8338599446f71f407c76617d2b79cf', class: "zonos--tab-progress" }, h("div", { key: 'acccc44ce950da71c8c0ee0798dc2086d9656ed2', class: "zonos--progress-bar-fill" }))));
91
91
  }
92
92
  static get is() { return "zonos-checkout-progress-tabs"; }
93
93
  static get encapsulation() { return "shadow"; }
@@ -31,9 +31,9 @@ export class ZonosCountrySelect {
31
31
  };
32
32
  }
33
33
  componentDidRender() {
34
- var _a, _b;
35
- // focus the input on render
36
- (_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-input')) === null || _b === void 0 ? void 0 : _b.focus();
34
+ var _a;
35
+ this.inputRef.autocomplete = 'off';
36
+ (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
37
37
  }
38
38
  render() {
39
39
  const { helloCountryList } = localizationStore;
@@ -48,9 +48,13 @@ export class ZonosCountrySelect {
48
48
  ? fuseObject.map(country => country.item)
49
49
  : countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
50
50
  const isEmpty = !filteredCountries.length;
51
- return (h(Host, { key: '25c360767efe1c48edde5401a6c0929ceb7bd47c', class: "zonos--elements", style: {
51
+ return (h(Host, { key: '83c9005b99e1dc8d3b4a4d50e6edbed0f17ce6e0', class: "zonos--elements", style: {
52
52
  '--zonos--font-family': zonosStoreFontFamily(),
53
- } }, h("div", { key: 'ee63b18e0504ffe1d6a6a50fdfea00e8cf808211', class: "zonos--country-select" }, h("zonos-v-stack", { key: '448a30acc483e5b945435a5650c222180a3159d4', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'f4ed039f14059db21ad325372f300e742191588c', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '40f772868810c96b27dfa8bab56a01d5c9385599', autocomplete: "off", autofocus: "autofocus", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), value: this.inputValue }))), h("div", { key: 'f752f5426257f0538041597e2a76f92c6754835f', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: 'febbe41e09b452430e1a03d33732c9cc3710701b', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: 'afec99a75a3a0cd3450a539154670508aed8c57e', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
53
+ } }, h("div", { key: '173d6c9d1808e80cdcb808b6418a9e3928e6a971', class: "zonos--country-select" }, h("zonos-v-stack", { key: '47118836d03e8505f9bd87e795387ea19cf67843', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'c5be83953dd01e47dbe814cbe83a114d700de830', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '2afe5eed1f156b8923a10564cf2b96d2cd6eb9bb', autoComplete: "off", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), ref: el => {
54
+ if (el) {
55
+ this.inputRef = el;
56
+ }
57
+ }, type: "text", value: this.inputValue }))), h("div", { key: '4d64a4d3c08292ae1f574973c09aa9ec42b48c37', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: 'dc30685daa60063cb9e6c6e7730f54cc5a25249b', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '69f6d39cf40abd951857542d734424623cbd7031', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
54
58
  const country = filteredCountries[index];
55
59
  if (!country) {
56
60
  return null;