@zonos/elements 1.3.200 → 1.3.202

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 (308) hide show
  1. package/dist/cjs/VarianceTest-0cb1e118.js +12 -0
  2. package/dist/cjs/cart-637ba3d0.js +1943 -0
  3. package/dist/cjs/{debounce-d393fafe.js → debounce-94e1b7ff.js} +1 -1
  4. package/dist/cjs/{getBorderRadius-3d0a563e.js → getBorderRadius-8d3b1049.js} +1 -1
  5. package/dist/cjs/index.cjs.js +10 -8
  6. package/dist/cjs/{isDarkColor-92a10a85.js → isDarkColor-bcf49625.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{cart-add8fe50.js → localization-2f17c95f.js} +74 -1926
  9. package/dist/cjs/{paypal-afc19dec.js → paypal-0eceff03.js} +10 -9
  10. package/dist/cjs/zonos-address_11.cjs.entry.js +98 -72
  11. package/dist/cjs/zonos-badge.cjs.entry.js +2 -1
  12. package/dist/cjs/zonos-banner.cjs.entry.js +2 -1
  13. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -3
  14. package/dist/cjs/zonos-card.cjs.entry.js +3 -2
  15. package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_14.cjs.entry.js} +99 -80
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +395 -50
  17. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -1
  18. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-controller.cjs.entry.js +13 -11
  20. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -5
  21. package/dist/cjs/zonos-country-select_4.cjs.entry.js +13 -13
  22. package/dist/cjs/zonos-elements.cjs.js +1 -1
  23. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +10 -8
  24. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +41 -42
  25. package/dist/cjs/zonos-hello.cjs.entry.js +30 -31
  26. package/dist/cjs/zonos-input.cjs.entry.js +3 -2
  27. package/dist/cjs/zonos-language-select_2.cjs.entry.js +8 -9
  28. package/dist/cjs/zonos-logo.cjs.entry.js +4 -3
  29. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -2
  30. package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -7
  31. package/dist/cjs/zonos-text.cjs.entry.js +2 -1
  32. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -3
  33. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -3
  35. package/dist/cjs/{zonosStore-c466b127.js → zonosStore-9264749e.js} +15 -5
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +18 -17
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +235 -15
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +3 -3
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +2 -1
  41. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.css +62 -0
  42. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +90 -0
  43. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  44. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  45. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  46. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
  47. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  48. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  49. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  50. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  51. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  52. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  53. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  54. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  55. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  56. package/dist/collection/components/main/zonos-controller.js +3 -3
  57. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  58. package/dist/collection/components/store/checkout/cart.js +15 -16
  59. package/dist/collection/components/store/checkout/paypal.js +2 -1
  60. package/dist/collection/components/store/checkout/stripe.js +33 -13
  61. package/dist/collection/components/store/hello/localization.js +5 -5
  62. package/dist/collection/components/store/storageStore.js +32 -0
  63. package/dist/collection/components/store/zonosStore.js +12 -6
  64. package/dist/collection/components/stripe/zonos-address/zonos-address.js +18 -6
  65. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  66. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +19 -7
  67. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -3
  68. package/dist/collection/components/utils/api/getCheckoutSession.js +3 -3
  69. package/dist/collection/components/utils/api/placeTestOrder.js +2 -1
  70. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +3 -2
  71. package/dist/collection/components/utils/api/selectVarianceTest.js +20 -0
  72. package/dist/collection/components/utils/buildCartUrl.js +44 -0
  73. package/dist/collection/components/utils/getLegacyQueryParams.js +42 -0
  74. package/dist/collection/components/utils/varianceTest/filterExpiredTests.js +6 -0
  75. package/dist/collection/components/utils/varianceTest/filterValidTests.js +23 -0
  76. package/dist/collection/components/utils/varianceTest/getSelectedTestVariant.js +6 -0
  77. package/dist/collection/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.js +14 -0
  78. package/dist/collection/components/utils/varianceTest/isInAvailableTestKey.js +4 -0
  79. package/dist/collection/components/utils/varianceTest/isTestEnabled.js +4 -0
  80. package/dist/collection/components/utils/varianceTest/isTestKeysAllVariantSelected.js +6 -0
  81. package/dist/collection/components/utils/varianceTest/mergeTest.js +13 -0
  82. package/dist/collection/scripts/_getZonosQaUrl.js +2 -2
  83. package/dist/collection/types/checkout/api/VarianceTest.js +8 -0
  84. package/dist/collection/types/generated/graphql.internal.types.js +12 -0
  85. package/dist/collection/types/index.js +1 -0
  86. package/dist/esm/VarianceTest-fef2d958.js +10 -0
  87. package/dist/esm/cart-b7c15b61.js +1907 -0
  88. package/dist/esm/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
  89. package/dist/esm/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
  90. package/dist/esm/index.js +9 -8
  91. package/dist/esm/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/{cart-e03d615e.js → localization-bf7224aa.js} +70 -1892
  94. package/dist/esm/{paypal-23dd5023.js → paypal-932fd3dd.js} +5 -4
  95. package/dist/esm/zonos-address_11.entry.js +54 -28
  96. package/dist/esm/zonos-badge.entry.js +2 -1
  97. package/dist/esm/zonos-banner.entry.js +2 -1
  98. package/dist/esm/zonos-button_3.entry.js +4 -3
  99. package/dist/esm/zonos-card.entry.js +3 -2
  100. package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_14.entry.js} +48 -30
  101. package/dist/esm/zonos-checkout.entry.js +363 -18
  102. package/dist/esm/zonos-collapse.entry.js +2 -1
  103. package/dist/esm/zonos-component.entry.js +1 -1
  104. package/dist/esm/zonos-controller.entry.js +8 -6
  105. package/dist/esm/zonos-country-flag.entry.js +3 -4
  106. package/dist/esm/zonos-country-select_4.entry.js +8 -8
  107. package/dist/esm/zonos-elements.js +1 -1
  108. package/dist/esm/zonos-empty-state-payment_4.entry.js +10 -8
  109. package/dist/esm/zonos-hello-dialog.entry.js +7 -8
  110. package/dist/esm/zonos-hello.entry.js +4 -5
  111. package/dist/esm/zonos-input.entry.js +3 -2
  112. package/dist/esm/zonos-language-select_2.entry.js +5 -6
  113. package/dist/esm/zonos-logo.entry.js +4 -3
  114. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -2
  115. package/dist/esm/zonos-stripe-input.entry.js +8 -7
  116. package/dist/esm/zonos-text.entry.js +2 -1
  117. package/dist/esm/zonos-toggle.entry.js +4 -3
  118. package/dist/esm/zonos-tooltip.entry.js +2 -2
  119. package/dist/esm/zonos-v-stack.entry.js +4 -3
  120. package/dist/esm/{zonosStore-cdabc848.js → zonosStore-d10a829f.js} +15 -5
  121. package/dist/esm-es5/VarianceTest-fef2d958.js +1 -0
  122. package/dist/esm-es5/cart-b7c15b61.js +1 -0
  123. package/dist/esm-es5/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
  124. package/dist/esm-es5/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
  125. package/dist/esm-es5/index.js +1 -1
  126. package/dist/esm-es5/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
  127. package/dist/esm-es5/loader.js +1 -1
  128. package/dist/esm-es5/localization-bf7224aa.js +1 -0
  129. package/dist/esm-es5/{paypal-23dd5023.js → paypal-932fd3dd.js} +2 -2
  130. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  131. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  132. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  133. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  134. package/dist/esm-es5/zonos-card.entry.js +1 -1
  135. package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -0
  136. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  137. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  138. package/dist/esm-es5/zonos-component.entry.js +1 -1
  139. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  140. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  141. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  142. package/dist/esm-es5/zonos-elements.js +1 -1
  143. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  144. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  145. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  146. package/dist/esm-es5/zonos-input.entry.js +1 -1
  147. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  148. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  149. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  150. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  151. package/dist/esm-es5/zonos-text.entry.js +1 -1
  152. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  153. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  154. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  155. package/dist/esm-es5/zonosStore-d10a829f.js +1 -0
  156. package/dist/scripts/index.d.ts +839 -765
  157. package/dist/scripts/index.js +1 -1
  158. package/dist/scripts/loadZonos.js +1 -1
  159. package/dist/scripts/zonos.js +1 -1
  160. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +16 -0
  161. package/dist/types/components/common/zonos-loading-overlay/zonos-loading-overlay.d.ts +16 -0
  162. package/dist/types/components/store/checkout/cart.d.ts +0 -1
  163. package/dist/types/components/store/checkout/stripe.d.ts +2 -2
  164. package/dist/types/components/store/hello/localization.d.ts +2 -2
  165. package/dist/types/components/store/storageStore.d.ts +13 -0
  166. package/dist/types/components/store/zonosStore.d.ts +7 -2
  167. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -0
  168. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +2 -0
  169. package/dist/types/components/utils/api/selectVarianceTest.d.ts +6 -0
  170. package/dist/types/components/utils/buildCartUrl.d.ts +10 -0
  171. package/dist/types/components/utils/getLegacyQueryParams.d.ts +2 -0
  172. package/dist/types/components/utils/varianceTest/filterExpiredTests.d.ts +2 -0
  173. package/dist/types/components/utils/varianceTest/filterValidTests.d.ts +9 -0
  174. package/dist/types/components/utils/varianceTest/getSelectedTestVariant.d.ts +2 -0
  175. package/dist/types/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.d.ts +8 -0
  176. package/dist/types/components/utils/varianceTest/isInAvailableTestKey.d.ts +2 -0
  177. package/dist/types/components/utils/varianceTest/isTestEnabled.d.ts +2 -0
  178. package/dist/types/components/utils/varianceTest/isTestKeysAllVariantSelected.d.ts +9 -0
  179. package/dist/types/components/utils/varianceTest/mergeTest.d.ts +5 -0
  180. package/dist/types/components.d.ts +51 -0
  181. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +7 -0
  182. package/dist/types/types/checkout/CheckoutConfig.d.ts +13 -1
  183. package/dist/types/types/checkout/api/CheckoutSession.d.ts +7 -0
  184. package/dist/types/types/checkout/api/VarianceTest.d.ts +30 -0
  185. package/dist/types/types/generated/graphql.internal.types.d.ts +163 -0
  186. package/dist/types/types/generated/graphql.internal.types.ts +199 -0
  187. package/dist/types/types/index.d.ts +1 -0
  188. package/dist/types/types/utils/ZonosSettings.d.ts +7 -6
  189. package/dist/zonos-elements/index.esm.js +1 -1
  190. package/dist/zonos-elements/{p-609c32a3.system.entry.js → p-01987cb2.system.entry.js} +1 -1
  191. package/dist/zonos-elements/p-04a01cb1.js +1 -0
  192. package/dist/zonos-elements/p-04b43dd5.entry.js +1 -0
  193. package/dist/zonos-elements/p-0f77d087.system.entry.js +1 -0
  194. package/dist/zonos-elements/{p-329efa8c.system.entry.js → p-1dcdb65f.system.entry.js} +1 -1
  195. package/dist/zonos-elements/p-26a634a5.system.entry.js +1 -0
  196. package/dist/zonos-elements/p-27987298.system.entry.js +1 -0
  197. package/dist/zonos-elements/p-2af2eb6f.system.entry.js +1 -0
  198. package/dist/zonos-elements/p-2b8f787a.entry.js +1 -0
  199. package/dist/zonos-elements/p-30cfa524.entry.js +1 -0
  200. package/dist/zonos-elements/p-32320d9a.system.js +1 -0
  201. package/dist/zonos-elements/p-3284f459.system.entry.js +1 -0
  202. package/dist/zonos-elements/{p-13796f98.js → p-3d82a352.js} +1 -1
  203. package/dist/zonos-elements/p-452070af.system.entry.js +1 -0
  204. package/dist/zonos-elements/p-45ebc788.entry.js +1 -0
  205. package/dist/zonos-elements/p-4c81112f.entry.js +1 -0
  206. package/dist/zonos-elements/p-4efa8187.js +1 -0
  207. package/dist/zonos-elements/p-5170bc41.entry.js +1 -0
  208. package/dist/zonos-elements/p-5a2dd041.system.js +1 -0
  209. package/dist/zonos-elements/p-5c74e5c9.system.entry.js +1 -0
  210. package/dist/zonos-elements/p-5d0f7364.system.js +1 -0
  211. package/dist/zonos-elements/p-6a52a2bc.system.entry.js +1 -0
  212. package/dist/zonos-elements/p-715d0f59.system.entry.js +1 -0
  213. package/dist/zonos-elements/{p-b8d87932.js → p-72f37935.js} +1 -1
  214. package/dist/zonos-elements/p-7ae5cd60.entry.js +1 -0
  215. package/dist/zonos-elements/p-80bbd9c0.system.entry.js +1 -0
  216. package/dist/zonos-elements/p-851c642e.system.entry.js +1 -0
  217. package/dist/zonos-elements/{p-623a30aa.entry.js → p-8d870d4c.entry.js} +1 -1
  218. package/dist/zonos-elements/p-98b65387.entry.js +1 -0
  219. package/dist/zonos-elements/p-9af5e93a.entry.js +1 -0
  220. package/dist/zonos-elements/p-aa1193bc.entry.js +1 -0
  221. package/dist/zonos-elements/{p-8fc08673.js → p-aae60057.js} +2 -2
  222. package/dist/zonos-elements/p-ab176281.system.entry.js +1 -0
  223. package/dist/zonos-elements/p-b52aba52.entry.js +1 -0
  224. package/dist/zonos-elements/p-bc220d35.system.js +1 -0
  225. package/dist/zonos-elements/p-bc8bda92.entry.js +1 -0
  226. package/dist/zonos-elements/p-be5afc91.system.entry.js +1 -0
  227. package/dist/zonos-elements/p-bec2a3ce.entry.js +1 -0
  228. package/dist/zonos-elements/p-c291bac1.entry.js +1 -0
  229. package/dist/zonos-elements/p-c3d2422e.entry.js +1 -0
  230. package/dist/zonos-elements/{p-f28eb1dd.system.js → p-c50b3100.system.js} +1 -1
  231. package/dist/zonos-elements/p-c58acd4c.system.entry.js +1 -0
  232. package/dist/zonos-elements/p-c5fcbc92.system.entry.js +1 -0
  233. package/dist/zonos-elements/p-c767242b.entry.js +1 -0
  234. package/dist/zonos-elements/p-c9aa902e.system.entry.js +1 -0
  235. package/dist/zonos-elements/p-cb823c4d.system.js +1 -0
  236. package/dist/zonos-elements/{p-24554580.system.js → p-d2466fbd.system.js} +2 -2
  237. package/dist/zonos-elements/{p-d422ad1d.system.js → p-d42dfd32.system.js} +1 -1
  238. package/dist/zonos-elements/p-d46349d3.system.entry.js +1 -0
  239. package/dist/zonos-elements/p-d60ca44b.system.entry.js +1 -0
  240. package/dist/zonos-elements/{p-b2241919.entry.js → p-d6a10007.entry.js} +1 -1
  241. package/dist/zonos-elements/p-db025dfc.system.entry.js +1 -0
  242. package/dist/zonos-elements/p-db3968a2.js +1 -0
  243. package/dist/zonos-elements/p-dcd6acd4.system.entry.js +1 -0
  244. package/dist/zonos-elements/p-dd1cfa74.entry.js +1 -0
  245. package/dist/zonos-elements/p-df4c46a6.entry.js +1 -0
  246. package/dist/zonos-elements/{p-4593324c.js → p-e26c9e83.js} +1 -1
  247. package/dist/zonos-elements/p-e68d5219.entry.js +1 -0
  248. package/dist/zonos-elements/p-ea6d87a1.system.js +1 -1
  249. package/dist/zonos-elements/p-ef3e05e5.system.js +1 -0
  250. package/dist/zonos-elements/p-f255e822.js +1 -0
  251. package/dist/zonos-elements/p-f655ec36.entry.js +1 -0
  252. package/dist/zonos-elements/{p-e91b244c.entry.js → p-f891d470.entry.js} +1 -1
  253. package/dist/zonos-elements/p-f8d0d488.system.entry.js +1 -0
  254. package/dist/zonos-elements/{p-240ee490.system.entry.js → p-fbe36bc8.system.entry.js} +1 -1
  255. package/dist/zonos-elements/p-fcc2e712.entry.js +1 -0
  256. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  257. package/package.json +1 -1
  258. package/dist/esm-es5/cart-e03d615e.js +0 -1
  259. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  260. package/dist/esm-es5/zonosStore-cdabc848.js +0 -1
  261. package/dist/zonos-elements/p-06ed3582.system.js +0 -1
  262. package/dist/zonos-elements/p-0a2101d4.system.js +0 -1
  263. package/dist/zonos-elements/p-0aa20875.system.entry.js +0 -1
  264. package/dist/zonos-elements/p-0bfd23da.entry.js +0 -1
  265. package/dist/zonos-elements/p-0f3568a7.entry.js +0 -1
  266. package/dist/zonos-elements/p-147ca395.entry.js +0 -1
  267. package/dist/zonos-elements/p-190398dd.entry.js +0 -1
  268. package/dist/zonos-elements/p-1eddec23.entry.js +0 -1
  269. package/dist/zonos-elements/p-1f2c3f5c.system.entry.js +0 -1
  270. package/dist/zonos-elements/p-24a2e899.system.entry.js +0 -1
  271. package/dist/zonos-elements/p-2882b9f4.entry.js +0 -1
  272. package/dist/zonos-elements/p-28ba5a6b.system.entry.js +0 -1
  273. package/dist/zonos-elements/p-33488109.system.entry.js +0 -1
  274. package/dist/zonos-elements/p-337fab4e.js +0 -1
  275. package/dist/zonos-elements/p-35573f66.entry.js +0 -1
  276. package/dist/zonos-elements/p-394d468f.system.js +0 -1
  277. package/dist/zonos-elements/p-3ddecaa4.system.entry.js +0 -1
  278. package/dist/zonos-elements/p-48f70043.system.entry.js +0 -1
  279. package/dist/zonos-elements/p-55711b80.system.entry.js +0 -1
  280. package/dist/zonos-elements/p-578bf5d7.entry.js +0 -1
  281. package/dist/zonos-elements/p-5b8e5d1a.entry.js +0 -1
  282. package/dist/zonos-elements/p-5c061a35.entry.js +0 -1
  283. package/dist/zonos-elements/p-6096c1c5.entry.js +0 -1
  284. package/dist/zonos-elements/p-6adc6e27.entry.js +0 -1
  285. package/dist/zonos-elements/p-7bb9c330.entry.js +0 -1
  286. package/dist/zonos-elements/p-7c6b8d3f.entry.js +0 -1
  287. package/dist/zonos-elements/p-85270076.system.entry.js +0 -1
  288. package/dist/zonos-elements/p-8a9d4605.system.entry.js +0 -1
  289. package/dist/zonos-elements/p-94e3e50d.system.entry.js +0 -1
  290. package/dist/zonos-elements/p-9f272e8e.system.entry.js +0 -1
  291. package/dist/zonos-elements/p-9f6dd86a.entry.js +0 -1
  292. package/dist/zonos-elements/p-a64ab131.system.entry.js +0 -1
  293. package/dist/zonos-elements/p-aac95779.system.entry.js +0 -1
  294. package/dist/zonos-elements/p-ad3c5358.entry.js +0 -1
  295. package/dist/zonos-elements/p-ad8a0584.entry.js +0 -1
  296. package/dist/zonos-elements/p-aeaba33e.system.entry.js +0 -1
  297. package/dist/zonos-elements/p-af6af82e.system.js +0 -1
  298. package/dist/zonos-elements/p-b2e76636.system.entry.js +0 -1
  299. package/dist/zonos-elements/p-b6afcf3f.system.entry.js +0 -1
  300. package/dist/zonos-elements/p-b8d91f99.entry.js +0 -1
  301. package/dist/zonos-elements/p-be8fa9a5.system.entry.js +0 -1
  302. package/dist/zonos-elements/p-c770044a.system.entry.js +0 -1
  303. package/dist/zonos-elements/p-d4842d10.system.entry.js +0 -1
  304. package/dist/zonos-elements/p-e390725f.js +0 -1
  305. package/dist/zonos-elements/p-eb85f0b6.system.entry.js +0 -1
  306. package/dist/zonos-elements/p-ef3d0394.entry.js +0 -1
  307. package/dist/zonos-elements/p-f6e587bb.entry.js +0 -1
  308. package/dist/zonos-elements/p-ff23980c.entry.js +0 -1
@@ -14,11 +14,11 @@ export class ZonosRestState {
14
14
  }
15
15
  render() {
16
16
  const imageUrl = this.getImageRestState();
17
- return (h(Host, { key: 'a06221e04e00bf733a37d00fdff2643714208eca', class: classes(['zonos--elements zonos--restState']), style: {
17
+ return (h(Host, { key: '754bdcff113a9ec5351d1053ddaea5e542111bbc', class: classes(['zonos--elements zonos--restState']), style: {
18
18
  '--zonos--font-family': zonosStoreFontFamily(),
19
- } }, h("div", { key: 'c889f042cb289876f3e6e002a5527a239ad69791', class: "zonos--restState-image" }, h("img", { key: '21b30e32ac86bd0f5e9f9dded3bcd4f3295c9637', alt: this.restStateType, onError: () => {
19
+ } }, h("div", { key: '3037acffd2d7da9bac11ada7cd4e06e2ae976f72', class: "zonos--restState-image" }, h("img", { key: 'd462d07f452caaaf87af20e1b2aad6ac45b43107', alt: this.restStateType, onError: () => {
20
20
  this.isErrorImageLoad = true;
21
- }, src: imageUrl })), h("div", { key: 'a28cfe4511fb4aa0f0c79b2e6cfaa78b6cbdb2a8', class: "content" }, h("zonos-text", { key: '20aa2a10a7617c96f99a6f653a5c1a8a0de85dbe', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '595b823c2e9c3270f510388b4ccbf544581453a9', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: '56a2514a6d170849ed87d1ab680e582a0f6e4b24', class: "action" }, h("slot", { key: 'b0e8f4dd2ff05929f4ffe7461e5dbe9aa4b5bfc5' }))));
21
+ }, src: imageUrl })), h("div", { key: '9acf78ef8358ad75df01bbbb1ed52b680f896255', class: "content" }, h("zonos-text", { key: '8310474f006a1fc1dcf96bac09c770572b20590a', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '623dc98d57eaae5fb1059c658391300aa41a13fb', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: 'f69613147698a147447a0aac330ad1c67739fed0', class: "action" }, h("slot", { key: '823ff6075ecac4598299c29ab2e44a6d5fb6a5d8' }))));
22
22
  }
23
23
  static get is() { return "zonos-rest-state"; }
24
24
  static get encapsulation() { return "shadow"; }
@@ -8,9 +8,9 @@ export class ZonosSelectDialogHeader {
8
8
  this.label = '';
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: '15035421483b079dde47eeb3ddcb4dcc6edffae4', class: "zonos--elements", style: {
11
+ return (h(Host, { key: '184508c2af24eedda1e4a59db89f787cd71a345f', class: "zonos--elements", style: {
12
12
  '--zonos--font-family': zonosStoreFontFamily(),
13
- } }, h("zonos-v-stack", { key: 'bf1bbdb1bb8a62841616893d8e9005002772adc4', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: 'a2593795816ceb851489c386231a1b90e6dd6261', class: "zonos--select-dialog-header" }, h("zonos-text", { key: 'e91d4a54ac0deb073c30272c5e9626168fea52b7', type: "boldLabel" }, this.label), h("zonos-button", { key: 'e8fdf75686b33e9958f64925ddf95fb5c89d74bb', 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: 'ede6d09a4f6900419bf16df0ca8a2b79882bf266' }))));
13
+ } }, h("zonos-v-stack", { key: '28bd290a2307c13e93036ee988f71bba87e76b19', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, h("div", { key: '49c2a1c0c44d9950907f47d90c9a34a83e5158da', class: "zonos--select-dialog-header" }, h("zonos-text", { key: '244ef10f5ee38d4a056ad6c076185d42ca3cd174', type: "boldLabel" }, this.label), h("zonos-button", { key: 'dab99b609f1a3250f73e2f25b837c9300a964090', 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: 'b2fdb25cdc7c6382ec8d171aa14f1f4b7f33a4e8' }))));
14
14
  }
15
15
  static get is() { return "zonos-select-dialog-header"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -50,7 +50,7 @@ export class ZonosStripeInput {
50
50
  const secondaryColor = this.overrideSecondaryColor || zonosStore.appearance.colorSecondary;
51
51
  const isDark = primaryColor && isDarkColor(primaryColor);
52
52
  const fontSize = zonosStore.appearance.fontSizeInputValue || 16;
53
- return (h(Host, { key: 'e6fbf3c60f08e70e9523f4d9fd38c757512af919', class: classes([
53
+ return (h(Host, { key: 'ce50e8c3f41abc7f7605a4423dc21c5fce755c9a', class: classes([
54
54
  'zonos--input zonos--elements',
55
55
  isDark && 'dark',
56
56
  (this.isError || !!this.error) && 'has-error',
@@ -59,10 +59,10 @@ export class ZonosStripeInput {
59
59
  '--zonos--font-family': zonosStoreFontFamily(),
60
60
  '--zonos--font-size': `${fontSize}px`,
61
61
  '--zonos--primary-color': secondaryColor,
62
- } }, h("div", { key: '0c10d623ec27ac18a321e2675e18cbb98224fe54', class: classes([
62
+ } }, h("div", { key: '8953c4cf31d9de771ef8f6351476d5db9de5655a', class: classes([
63
63
  'zonos--label-wrapper',
64
64
  this.isDisabled && 'disabled',
65
- ]) }, h("input", Object.assign({ key: '8eb4653690896a81ee5436303b8555c07038a579' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
65
+ ]) }, h("input", Object.assign({ key: 'c66c0e5787191ab6bb804755da7477e222b3ff40' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
66
66
  'zonos--floated-input',
67
67
  !!this.inputLabel && 'has-label',
68
68
  this.internalValue && 'has-content',
@@ -72,7 +72,7 @@ export class ZonosStripeInput {
72
72
  this.inputChange.emit(input.value);
73
73
  this.el.inputValue = input.value;
74
74
  this.el.dispatchEvent(new Event('change'));
75
- }, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), h("div", { key: '7388dd7c3ca24bd1a40246215fa9b51c76ab519f', class: "zonos--floated-label" }, h("label", { key: 'c975933f597d145c8b9edbeb9ac417603922de9a', htmlFor: this.inputId }, this.inputLabel))), this.error && (h("zonos-text", { key: '5fc0639cba176f02152bf689caec623c821abdeb', textColor: "red-600", type: "caption" }, this.error))));
75
+ }, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), h("div", { key: '17c7fa7ef87bf765203cadb3ff24ead25ac45332', class: "zonos--floated-label" }, h("label", { key: '4d7c8e503bd0dc0081b13a36c2a1c5f976ee93e3', htmlFor: this.inputId }, this.inputLabel))), this.error && (h("zonos-text", { key: '1352d1d09b05a25ced56d31b16cf1f203b0eaaec', textColor: "red-600", type: "caption" }, this.error))));
76
76
  }
77
77
  static get is() { return "zonos-stripe-input"; }
78
78
  static get encapsulation() { return "scoped"; }
@@ -196,24 +196,24 @@ export class ZonosStripePhoneInput {
196
196
  .filter(Boolean)
197
197
  .sort((a, b) => a.displayName.localeCompare(b.displayName))
198
198
  : [];
199
- return (h(Host, { key: 'c7ca4076eb70b166979d21074d068912af1496c5', class: classes([
199
+ return (h(Host, { key: '0d4501947787cbafe38acb60fb5ee7519b6d1c73', class: classes([
200
200
  'zonos--phone-input zonos--elements',
201
201
  isDark && 'dark',
202
- ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: '5460d79c86d34daf94538f063274c45ae3be2239', class: classes([
202
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: 'c3e0f9655a39a5bb3d838634754be2af60a24a10', class: classes([
203
203
  'zonos--label-wrapper',
204
204
  this.disabled && 'disabled',
205
205
  this.isFocused && 'focused',
206
206
  hasContent && 'has-content',
207
207
  this.error && 'has-error',
208
208
  this.inputLabel && 'has-label',
209
- ]) }, h("select", { key: '290d89088b9a800b31ed19cfe3de6831322a3f5a', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
209
+ ]) }, h("select", { key: '1a58471117f6748d511498e016814bd907e8775f', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
210
210
  var _a;
211
211
  return (h("option", { key: option.countryCode, selected: option.countryCode === ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode), value: option.countryCode }, option.displayName, " (+", option.phoneCode, ")"));
212
- })), h("div", { key: 'b0271d3453869ed79a36d62f5f6bacb22a509b46', class: "zonos--input-group" }, h("div", { key: '49486c915fa2f65878a6f8ab73c48997e4ba1461', class: "zonos--select-wrapper" }, h("div", { key: '63412e8077e062efef5f42c3a77e583ade435b53', class: "zonos--country-select" }, h("div", { key: '5c073598dfeaa0c8de68f07b1a7789f4a56a24c8', class: "zonos--country-select-content" }, this.selectedCountry && (h("div", { key: '8a32922d75343005fde7446736746cd531ff63f8', class: "zonos--country-select-selected" }, h("div", { key: '859cdbc4c1879c38f0c848ff42b38bc5492d3e96', class: "zonos--country-flag-wrapper" }, h("zonos-country-flag", { key: '9167a7c586e2d693bfdcad7773df60a324600be7', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), h("div", { key: 'b39dcadb22202d866fc8e1217bbe2e17704e2300', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), h("div", { key: '4b0a4ce8c94e6e3125cfde55542b38efb6a8a787', class: "zonos--select-chevron-wrapper" }, h("zonos-icon", { key: '25322152ca9550a8b2e667f8f993c38a972aa9ce', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))))), h("div", { key: 'c6a93ba0656e09a154c3d91327f3573e0288234b', class: classes([
212
+ })), h("div", { key: '9c785521e095aae0cfc8af3ea90e4924c97202ac', class: "zonos--input-group" }, h("div", { key: 'b7fdd9db255ce33f3b6d3a982162c8286963324c', class: "zonos--select-wrapper" }, h("div", { key: '5d378436580df53793b1508af5e34bd43ba33ddf', class: "zonos--country-select" }, h("div", { key: '94628459db88e355b1c62b74cfcb48ec03022d4e', class: "zonos--country-select-content" }, this.selectedCountry && (h("div", { key: '96b332ed9c62413887f96f38ce26cb05b81a3132', class: "zonos--country-select-selected" }, h("div", { key: 'b9e5bda55328f57e15afd349789233e3c28d2bf9', class: "zonos--country-flag-wrapper" }, h("zonos-country-flag", { key: 'fc595df21c09553dc8ffb7fe79c3043831e65298', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), h("div", { key: '6c792c383acf3ccac02be6b954a7eb18bcdda817', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), h("div", { key: '970b9f6e18152e04375a248669fd7314088bcd2e', class: "zonos--select-chevron-wrapper" }, h("zonos-icon", { key: '1da5919014eee0e34b60d1df08e83d44ad20d5c2', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))))), h("div", { key: '7f0c215ddfb59c8e3c4413e44941a477a8adc6d6', class: classes([
213
213
  'zonos--input-container',
214
214
  this.inputLabel && 'has-label',
215
215
  hasContent && 'has-content',
216
- ]) }, h("input", Object.assign({ key: '49246ff464685feaa9414d1e7b36f55b82fff564' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (h("div", { key: '653d278b7ffc634bc7892d54c8fcab7b7626f80e', class: "zonos--floated-label" }, h("label", { key: 'c637ddca7164396d57e8a5eaf98b0e523ee27258', htmlFor: this.inputId }, this.inputLabel || translate('Phone number'))))))), this.error && (h("zonos-text", { key: 'dcc70c068fef73e804eba1f134673168a0bbaf90', textColor: "red-600" }, this.error))));
216
+ ]) }, h("input", Object.assign({ key: 'e3ce0b598baf78452eddaab38c80bb4f0c548a5a' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (h("div", { key: 'a108f2796571f9d8a4201d1906b2381b89d14bc2', class: "zonos--floated-label" }, h("label", { key: '50d308311270bbd8635bb7848495ee4aaa2a0cac', htmlFor: this.inputId }, this.inputLabel || translate('Phone number'))))))), this.error && (h("zonos-text", { key: '27b0233f9241ce68348b2efd1c1b525d083363e5', textColor: "red-600" }, this.error))));
217
217
  }
218
218
  static get is() { return "zonos-stripe-phone-input"; }
219
219
  static get encapsulation() { return "scoped"; }
@@ -80,14 +80,14 @@ export class ZonosStripeSelect {
80
80
  const fontSize = zonosStore.appearance.fontSizeInputValue || 16;
81
81
  const hasContent = this.internalValue || this.selectPlaceholder;
82
82
  const showClearButton = this.isClearable && this.internalValue && !this.isDisabled;
83
- return (h(Host, { key: 'f5b178d5cbd48e9aff8701764a1fde4de03a6569', class: classes([
83
+ return (h(Host, { key: '18d7ba03b9136af8614874b13b9ac3ce85f7c0d0', class: classes([
84
84
  'zonos--select zonos--elements',
85
85
  isDark && 'dark',
86
86
  this.isError && 'has-error',
87
- ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: 'd7b3b8148777aa61f15c1489f44871589aadf00f', class: classes([
87
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: '88b8d885c11bc0776bd0c25b5f0a08f91cfb7c72', class: classes([
88
88
  'zonos--label-wrapper',
89
89
  this.isDisabled && 'disabled',
90
- ]) }, h("select", Object.assign({ key: '629f7437fa445634db0589f217acb59b59e558d3' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
90
+ ]) }, h("select", Object.assign({ key: 'd972a6a7b91bb51f2d5ed291a686d521c1bf82a3' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
91
91
  'zonos--floated-select',
92
92
  !!this.selectLabel && 'has-label',
93
93
  hasContent && 'has-content',
@@ -97,9 +97,9 @@ export class ZonosStripeSelect {
97
97
  this.selectChange.emit(select.value);
98
98
  this.selectedValue = select.value;
99
99
  this.el.dispatchEvent(new Event('change'));
100
- }, required: this.required }), h("option", { key: '9b50f769fc79f136b7b77916edd71acdcda199b7', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || translate('Select')), this.internalOptions.map(option => (h("option", { key: option.value, selected: this.internalValue === option.value ||
100
+ }, required: this.required }), h("option", { key: 'b67730b2c3e77ba60221320519f55e67d7d2b127', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || translate('Select')), this.internalOptions.map(option => (h("option", { key: option.value, selected: this.internalValue === option.value ||
101
101
  // Sometimes google returns the label not the code for some countries
102
- this.internalValue === option.label, value: option.value }, option.label)))), h("div", { key: '0ff44083dee7939d6f7bc2372990ccbef6066fed', class: "zonos--floated-label" }, h("label", { key: '8f9965fa3de61b705fa95e7ddc68013a3027464d', htmlFor: this.selectId }, this.selectLabel)), h("div", { key: '09aa1851295b86e30488ca69720d58d1246ad67c', class: "zonos--actions-wrapper" }, showClearButton && (h("button", { key: '1db5be171f74849cedc3a8804bac23fdfa43aaa5', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, h("zonos-icon", { key: '2ca7e2da61eef16d6feb74c4d6a6198f1762ad16', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), h("zonos-icon", { key: 'c0050a27a619cb9b844282be841a320648f9d008', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (h("zonos-text", { key: 'c0a3eb551533c4cb24f92ad6fd7a4b44cd24044c', textColor: "red-600" }, this.error))));
102
+ this.internalValue === option.label, value: option.value }, option.label)))), h("div", { key: '088c104006e983b5ec1680067af32c0479dde13b', class: "zonos--floated-label" }, h("label", { key: 'faf3bf337253d205265b181d65d8f8024ffd6124', htmlFor: this.selectId }, this.selectLabel)), h("div", { key: '7ce8d36b84b08df139877cd2e12a26b8157ce83b', class: "zonos--actions-wrapper" }, showClearButton && (h("button", { key: 'b0a1af08afd9792ba4e7989361219c5cf7d5d8bc', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, h("zonos-icon", { key: '50ae86d5e9d9722b5546997f9fd52a997cac3add', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), h("zonos-icon", { key: '30034030f97f7ed6b3027cbc5220c73cde4bbbc2', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (h("zonos-text", { key: 'cd02da8b1a1cb81581ac7285af84193000692eaa', textColor: "red-600" }, this.error))));
103
103
  }
104
104
  static get is() { return "zonos-stripe-select"; }
105
105
  static get encapsulation() { return "shadow"; }
@@ -7,9 +7,9 @@ export class ZonosToggle {
7
7
  this.value = undefined;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '8426e15a4596ecd6fc2cab945cdb2f0c4fe1ac79', class: classes(['zonos--elements zonos--toggle']), style: {
10
+ return (h(Host, { key: '9a526e8fee8e4c5af558442c82f7acbc634706c3', class: classes(['zonos--elements zonos--toggle']), style: {
11
11
  '--zonos--font-family': zonosStoreFontFamily(),
12
- } }, h("div", { key: 'e26f354255febe40918b30100ed5d42410a30413', class: "wrapper" }, this.options.map(option => {
12
+ } }, h("div", { key: '97ca281e8e782c3b08231c6ba705325bbf16d402', class: "wrapper" }, this.options.map(option => {
13
13
  const selected = option.value === this.value;
14
14
  return (h("button", { class: classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
15
15
  this.toggleChanged.emit(option.value);
@@ -7,10 +7,10 @@ export class ZonosTooltip {
7
7
  this.showTooltip = false;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: 'fbd7f669ae886586c2512b00975fc5acf1e40eca', class: "zonos--elements" }, h("div", { key: '618d6ff79308540f5eeb3d8a23e7c520fb35a91a', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '303eaf31b4b3dc9fd35ed0db252be84274b7d46c' }), h("div", { key: '7429949912c8e3fb683ab4cbc4958d8fb6b2fd81', class: classes([
10
+ return (h(Host, { key: 'd984faacc8d79f2001c84fb69c30f3665dca44aa', class: "zonos--elements" }, h("div", { key: '327f9d077f2400f05ff3c4337b566c461a2d05cf', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '24315359176ca625f18a856d781624850d05de17' }), h("div", { key: '296041bbebddd0250c6d5d9649e6502571a08533', class: classes([
11
11
  this.showTooltip && 'zonos--show-tooltip',
12
12
  'zonos--tooltip-content',
13
- ]) }, h("zonos-text", { key: '31704a564bb877fac16c1ab11a686e9ba72940ea', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '1e2cafbfaf769b30256c8d4609953961bcd10a06', size: "xs", textColor: "gray-0" }, this.subtitle)))));
13
+ ]) }, h("zonos-text", { key: '5a2828baf420acb666eb1f0029c8d0b9eadd55ce', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '1bd8bf5085edfdc3d42db03e460062bf744c174b', 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: 'b591378d641a09bac2c4fab00c8c1977ae21a14c', style: {
10
+ return (h(Host, { key: '558218f6135d5fcc9f3649b76c568a9f514aa8e8', style: {
11
11
  '--zonos--font-family': zonosStoreFontFamily(),
12
- } }, h("div", { key: 'c9f3b482ace4b36813fa5412dd497c0deea7e3c0', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '75cf9b483367945bc57279b76519205c8f0901eb' }))));
12
+ } }, h("div", { key: '86af63aa01214db20cc094ddcbfd05b3ee28f1ed', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '4786fb44cbf865a548c900b752f9b13709f1f935' }))));
13
13
  }
14
14
  static get is() { return "zonos-v-stack"; }
15
15
  static get encapsulation() { return "shadow"; }
@@ -56,12 +56,12 @@ export class ZonosVirtualScroll {
56
56
  } }, this.renderItem(i)));
57
57
  accHeight += itemHeight;
58
58
  }
59
- return (h(Host, { key: '294ce5251b10f4779b7113d16a98845153f50c72' }, h("div", { key: '4a8b0032df979568ebf1f20356cb0aa13e2a742a',
59
+ return (h(Host, { key: '6ccfd807912b51223f249543b66552e945859a1a' }, h("div", { key: '21f05d8e9082b54f484badc6e52c3006068df401',
60
60
  // to capture scroll action
61
61
  class: "scroller", style: {
62
62
  height: `${this.totalHeight}px`,
63
63
  width: `${W}px`,
64
- } }), h("div", { key: 'c162402da38f659edf5d8de18229a7a6eeed89db',
64
+ } }), h("div", { key: '3935dc009877c002047f41de3caeeb16e2d7c08d',
65
65
  // to display items
66
66
  class: "item-container", ref: el => (this.container = el), style: {
67
67
  height: `${this.totalHeight}px`,
@@ -10,7 +10,7 @@ export class ZonosComponent {
10
10
  return format(this.first, this.middle, this.last);
11
11
  }
12
12
  render() {
13
- return h("div", { key: 'c35d0331d2d3724792e82b1d0a22d096fbbcddb7' }, "Hello, World! I'm ", this.getText());
13
+ return h("div", { key: '725c727348687e663e6225837a2a135d177b6d4a' }, "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: 'c346c1f0dff9e6f5b4399ae9a82216d3804f6df5', class: "zonos--elements" }, h("div", { key: '928406c88c458360530d20f6d0dd1e0563c27c99', class: "zonos--hello-dialog-footer", style: {
21
+ return (h(Host, { key: 'd763a9977f7d39c71c15ec1c2b99376f02eab260', class: "zonos--elements" }, h("div", { key: 'e468a11cd1cdcdbbb2dde4768acb80e72afde1f3', class: "zonos--hello-dialog-footer", style: {
22
22
  '--zonos--primary-color': primaryColor,
23
- } }, h("a", { key: '273303784ffec118ac20e280e91c575bb1c002ac', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '50ac525028c2b4081a47cbec44c45448d9b2c1d4', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: '96118c74b078d06065e5cef80962ffb3ad3c5f3e', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'd30aec7d60dc9b67f4a3babfda89b2620c667224', 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: 'd64c7ae9af7d55057b580977750bf7f28c03710e', 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: '3f7e809bdbc493a8e0fb7d325a317f403a8b0f69', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '96cf205bfa3ba0118d119aeb63eb942eded07ac4', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: '9c59e0f24e551260353b547c69615614de04a80b', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '65eec8c3f59e89c6e4ab2d0bebbfcb0b07ef51f4', 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: '3c3bdccb4e8d588b6228e4e3c70711b352994c58', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
24
24
  }
25
25
  static get is() { return "zonos-hello-dialog-footer"; }
26
26
  static get encapsulation() { return "shadow"; }
@@ -232,18 +232,18 @@ export class ZonosHelloDialog {
232
232
  const defaultMessage = formatStringWithLinks(defaultMessageStr);
233
233
  const currentPage = this.getCurrentPageEnum();
234
234
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
235
- return (h(Host, { key: '0345651f8cf8b06b95b21e5ad2cc427339932229', class: "zonos--elements" }, h("div", { key: '4089308c6460f903130eb4d99b03a7e65937973d', class: classes([
235
+ return (h(Host, { key: '7b6752f327fdefb40d272d30d50a5fd208ff69a6', class: "zonos--elements" }, h("div", { key: 'b03b78ddfb3a0d6cedb156161fd82ebe45926773', class: classes([
236
236
  'zonos--hello-dialog',
237
237
  animateLeft && 'zonos--hello-dialog-animate-from-left',
238
238
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
239
239
  !!this.mobileLocationOverride &&
240
240
  'zonos--hello-dialog-mobile-override',
241
241
  this.isOpen && 'zonos--hello-dialog-open',
242
- ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '8f5dcc0f0bbd4e3f103105baab5b3d87636930f3' }, h("div", { key: '04b20f5394ddf48861ee97cde4d13000c5765348', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '176b0173785632b211affb603380f7fef9fa0027', 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: 'b21f5ab0438f8f5ab922800047bae222d6738e0e', spacing: 24 }, h("zonos-country-flag", { key: 'd153054f02852e8c565997a118f2bea8e5834bc0', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'b6f6f630f44ed19eca3ee62baaca9b22867635d5', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '47b5d0a2dd74f39337b4d5a5a968a94ead40a45e', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '9038333f6574e110b6f860ffa0e3b6ebdad81dc0', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '8afaf9eb87813ace65475467d422f150b487fe30', spacing: 8 }, this.restrictedItems.map(item => {
242
+ ]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '367b5a0158679001cb3004d5d965a518cdc3b8ce' }, h("div", { key: '01dd9b2df5b20e61764274a6405118a7b42019f3', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'ed49fe9a95fd6ace11669ee194d90eaae951d938', 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: '23d391b8f4a13a1b077333f7ac788306dbeb98d6', spacing: 24 }, h("zonos-country-flag", { key: '24c6682b66fe5aa5061bab0b260d6c6fed724f52', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: 'fcb2717fa3403337b507f64adb557bd300841a41', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '013fbda529816a2a1f22fc9d524d087fd69145c8', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '2134a015a6e22f6e02db8935150055b04620eed8', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '67030faaca46fea72230037b594eb3d0abb18acb', spacing: 8 }, this.restrictedItems.map(item => {
243
243
  var _a;
244
244
  return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
245
- }), h("zonos-card", { key: '522ba22b8709a962fd7c39ae4e1386b2a696072c', spacing: "12px" }, h("zonos-v-stack", { key: '86fa97265982e6ca5bf9aa078b845c99056d55bf', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
246
- additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '7421346614aed925f25e3571cbe935045e392615', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '35560fe611d0424186e79aa1ff56f15c89d122b6' }, h("zonos-country-select", { key: 'c437335dcbcfcf74dab7baeddf663cc216f0b377', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '4692f2be013dc35e821cf1ee9c20d05cf0de9d8e' }, h("zonos-language-select", { key: '19337a5bb390beb9f7629e577f296f2c9f806c98', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
245
+ }), h("zonos-card", { key: '21d50e218fd560e137b68e6d2a16edf118d18148', spacing: "12px" }, h("zonos-v-stack", { key: '70c333afd352aee4a92b47b58c267ec5c6ff122c', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
246
+ additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '7fa2a3e7646668c37ad2026dcfe0d59d6fd350b8', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '9a59a41f8ffbef2361ada0d5390708232c829026' }, h("zonos-country-select", { key: '3f10795b4eb5695e9848e2c69611f1a4953f5370', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'c4aa8b2d533e6735a587fc8c7eb217f52e1fc5c9' }, h("zonos-language-select", { key: 'eb75fbe3e7de95b0459d559ac7ee233b77873545', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
247
247
  }
248
248
  static get is() { return "zonos-hello-dialog"; }
249
249
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { h, Host, } from "@stencil/core";
2
- import { cartStore } from "../store/checkout/cart";
3
2
  import { stripeStore } from "../store/checkout/stripe";
4
3
  import { initLocalizationStore, localizationStoreUpdateSelectedCountryCode, } from "../store/hello/localization";
4
+ import { storageStore } from "../store/storageStore";
5
5
  import { zonosStore, zonosStoreFontFamily, zonosStoreInitSetting, } from "../store/zonosStore";
6
6
  import { getZonosSettings } from "../utils/api/getZonosSettings";
7
7
  import { initCheckout } from "../utils/checkout/initCheckout";
@@ -241,7 +241,7 @@ export class ZonosController {
241
241
  * Reset the Checkout session id and client secret (required for dashboard store switching)
242
242
  */
243
243
  async reset() {
244
- cartStore.checkoutSessionId = null;
244
+ storageStore.checkoutSessionId = null;
245
245
  stripeStore.clientSecret = '';
246
246
  }
247
247
  /**
@@ -274,7 +274,7 @@ export class ZonosController {
274
274
  zonosStore.organizationName = organizationName;
275
275
  }
276
276
  render() {
277
- return h(Host, { key: '525180de311aea6ffaf2ecaa3fc35befd6bd9142', class: "zonos--elements" });
277
+ return h(Host, { key: '62c0b3079d64f05800da24daa19e0e1e3a890bca', class: "zonos--elements" });
278
278
  }
279
279
  static get is() { return "zonos-controller"; }
280
280
  static get encapsulation() { return "shadow"; }
@@ -41,7 +41,7 @@ export class ZonosPaypalPayment {
41
41
  void this.loadPaypal();
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '093fd3a8fb9cc021243ca5feff2737f1b1c10b7c', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '686412f4de97c57a309e6134312641c481c5a9fe', class: "zonos--payment-paypal-container" })));
44
+ return (h(Host, { key: 'e8c839cc9d0286f5ae4643243b14fa66f9584833', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'cac06948de1ccca97ba65eca10b3e5d9f3a9a362', class: "zonos--payment-paypal-container" })));
45
45
  }
46
46
  static get is() { return "zonos-paypal-payment"; }
47
47
  static get encapsulation() { return "scoped"; }
@@ -1,17 +1,18 @@
1
1
  import { createStore } from "@stencil/store";
2
2
  import { stripeStore, stripeStoreInitCheckoutSession, stripeStoreReset, stripeStoreUpdateCheckoutSession, } from "./stripe";
3
3
  import { localizationStore } from "../hello/localization";
4
+ import { storageStore, storageStoreSetEnabledVariantTestKeys, } from "../storageStore";
4
5
  import { translate } from "../translationStore";
5
6
  import { zonosStore } from "../zonosStore";
6
7
  import { getIsStagingMode } from "../../utils/checkout/getIsStagingMode";
7
8
  import { allLogs, log } from "../../utils/logging/log";
8
9
  import { logError } from "../../utils/logging/logError";
9
10
  import { sendErrorLog } from "../../utils/logging/sendErrorLog";
10
- const { onChange, reset, state: cartStore, } = createStore(() => ({
11
+ import { filterValidTests } from "../../utils/varianceTest/filterValidTests";
12
+ const { reset, state: cartStore } = createStore(() => ({
11
13
  adjustmentTotal: 0,
12
14
  adjustments: [],
13
15
  checkoutSession: null,
14
- checkoutSessionId: sessionStorage.getItem('zonos--checkout-session-id') || null,
15
16
  checkoutSessionTimeoutShow: false,
16
17
  checkoutTimeoutInterval: null,
17
18
  currency: 'USD',
@@ -31,9 +32,9 @@ const { onChange, reset, state: cartStore, } = createStore(() => ({
31
32
  landedCostData: null,
32
33
  landedCostMethod: 'DDP',
33
34
  partiesData: [],
34
- promoCode: sessionStorage.getItem('promoCode') || '',
35
+ promoCode: sessionStorage.getItem('zonos--promo-code') || '',
35
36
  // When user clicked applied button, save promocode into session storage for later use. So if session has promocode, applied button is clicked
36
- promoCodeApplied: !!sessionStorage.getItem('promoCode'),
37
+ promoCodeApplied: !!sessionStorage.getItem('zonos--promo-code'),
37
38
  promoCodeError: false,
38
39
  restrictedItems: [],
39
40
  selectedLandedCost: null,
@@ -133,7 +134,7 @@ const cartStoreCheckItemRestrictions = (itemsWorkflow) => {
133
134
  };
134
135
  };
135
136
  const cartStoreReset = () => {
136
- sessionStorage.removeItem('zonos--checkout-session-id');
137
+ storageStore.checkoutSessionId = null;
137
138
  // reset cart store
138
139
  reset();
139
140
  };
@@ -188,8 +189,11 @@ const cartStoreSetCheckoutSession = (checkoutSession) => {
188
189
  }
189
190
  // Only update checkout session id if it's not empty
190
191
  if (checkoutSession.id) {
191
- cartStore.checkoutSessionId = checkoutSession.id;
192
+ storageStore.checkoutSessionId = checkoutSession.id;
192
193
  }
194
+ // Filter the response to only include test keys that we support and then save it to the session
195
+ const availableSelectedVariantTestKeys = filterValidTests(checkoutSession.varianceTestResults || []);
196
+ storageStoreSetEnabledVariantTestKeys(availableSelectedVariantTestKeys);
193
197
  // Check if there is a redirect URL in the metadata to override
194
198
  const externalConfirmationPageURL = ((_c = (_b = (_a = cartStore.checkoutSession) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.find(entry => (entry === null || entry === void 0 ? void 0 : entry.key) === 'externalConfirmationPageURL')) === null || _c === void 0 ? void 0 : _c.value) ||
195
199
  (
@@ -214,7 +218,7 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
214
218
  log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
215
219
  }
216
220
  // update checkout session
217
- if (!cartStore.checkoutSessionId) {
221
+ if (!storageStore.checkoutSessionId) {
218
222
  log('Could not update cart total without checkout session id', 'info');
219
223
  return false;
220
224
  }
@@ -222,10 +226,11 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
222
226
  adjustmentsAmount,
223
227
  cartId,
224
228
  currency,
225
- id: cartStore.checkoutSessionId,
229
+ id: storageStore.checkoutSessionId,
226
230
  itemsAmount,
227
231
  landedCostId,
228
232
  presentmentCountryCode: localizationStore.selectedCountryCode,
233
+ varianceTestInput: storageStore.enabledVariantTestKeys || [],
229
234
  });
230
235
  if (errors.length > 0 || !json) {
231
236
  logError('Error occurs when updating checkout session.');
@@ -300,6 +305,7 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
300
305
  cartId: window.Zonos.cartId,
301
306
  dutiesTaxesFeesEstimate: dutiesTaxesFeesEstimate,
302
307
  landedCostId: (_f = selectedLandedCost.landedCost) === null || _f === void 0 ? void 0 : _f.id,
308
+ varianceTestInput: storageStore.enabledVariantTestKeys || [],
303
309
  });
304
310
  // update conditionally render pay in USD button
305
311
  const firstItem = (_g = cartStore.items.find(Boolean)) === null || _g === void 0 ? void 0 : _g.currencyCode;
@@ -314,14 +320,6 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
314
320
  !!((_l = (_k = zonosStore.genericSettings) === null || _k === void 0 ? void 0 : _k.usdSettlementCountryEnabled) === null || _l === void 0 ? void 0 : _l.includes(shipToCountry));
315
321
  return updateCalculateStatus;
316
322
  };
317
- onChange('checkoutSessionId', () => {
318
- log('checkoutSessionId changed', 'info', cartStore.checkoutSessionId);
319
- if (!cartStore.checkoutSessionId) {
320
- sessionStorage.removeItem('zonos--checkout-session-id');
321
- return;
322
- }
323
- sessionStorage.setItem('zonos--checkout-session-id', cartStore.checkoutSessionId);
324
- });
325
323
  const cartStoreStartCheckoutInterval = ({ isPreview, sessionTimeout, }) => {
326
324
  // do nothing if in preview mode
327
325
  if (isPreview) {
@@ -375,6 +373,7 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
375
373
  itemsAmount: total,
376
374
  // attempt to init session on failure to update checkout session
377
375
  shouldInitSessionOnFailure: true,
376
+ varianceTestInput: storageStore.enabledVariantTestKeys || [],
378
377
  });
379
378
  stripeStore.isFetchingSession = false;
380
379
  };
@@ -2,6 +2,7 @@ import { loadScript, } from "@paypal/paypal-js";
2
2
  import { createStore } from "@stencil/store";
3
3
  import { cartStore, cartStoreClearCheckoutInterval, cartStoreNextStep, } from "./cart";
4
4
  import { stripeStore, stripeStoreHandleInventoryCheck, } from "./stripe";
5
+ import { storageStore } from "../storageStore";
5
6
  import { translate } from "../translationStore";
6
7
  import { zonosStore } from "../zonosStore";
7
8
  import { paypalCaptureOrder } from "../../utils/api/paypalCaptureOrder";
@@ -213,7 +214,7 @@ const paypalStoreInitButtons = (props) => {
213
214
  log('Paypal is not available');
214
215
  return null;
215
216
  }
216
- const checkoutSessionId = cartStore.checkoutSessionId;
217
+ const checkoutSessionId = storageStore.checkoutSessionId;
217
218
  if (!checkoutSessionId) {
218
219
  log('Paypal is not available due to checkoutSessionId is not available');
219
220
  return null;
@@ -1,6 +1,7 @@
1
1
  import { createStore } from "@stencil/store";
2
2
  import { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStorePreviousStep, cartStoreResetCartItems, cartStoreSetCheckoutSession, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, } from "./cart";
3
3
  import { localizationStore } from "../hello/localization";
4
+ import { storageStore } from "../storageStore";
4
5
  import { translate } from "../translationStore";
5
6
  import { zonosStore } from "../zonosStore";
6
7
  import { calculateLandedCostNormalized } from "../../utils/api/calculateLandedCostNormaliz";
@@ -16,7 +17,7 @@ import { sendErrorLog } from "../../utils/logging/sendErrorLog";
16
17
  import { validateCheckoutSession } from "../../utils/validateCheckoutSession";
17
18
  import { addressRuleStyle } from "../../../styles/stripe/addressRuleStyle";
18
19
  import { defaultVariable } from "../../../styles/stripe/defaultVariable";
19
- const { onChange, reset, state: stripeStore, } = createStore(() => ({
20
+ const { onChange: stripeStoreOnChange, reset, state: stripeStore, } = createStore(() => ({
20
21
  checkoutSettlementCurrency: 'USD',
21
22
  clientSecret: sessionStorage.getItem('zonos--client-secret') || '',
22
23
  companyName: '',
@@ -238,7 +239,7 @@ const stripeCalculateLandedCost = async () => {
238
239
  return Object.assign(Object.assign({}, checkoutSession), { landedCost: foundLandedCost });
239
240
  }).filter(Boolean)) || [];
240
241
  // Send event when we get the quote back after the customer clicked "Continue to shipping"
241
- const checkoutSessionId = cartStore.checkoutSessionId;
242
+ const checkoutSessionId = storageStore.checkoutSessionId;
242
243
  if (checkoutSessionWorkflow === null || checkoutSessionWorkflow === void 0 ? void 0 : checkoutSessionWorkflow.length) {
243
244
  void trackConversionEvent({
244
245
  checkoutSessionId,
@@ -255,7 +256,7 @@ const stripeCalculateLandedCost = async () => {
255
256
  cartStore.promoCodeError = isInvalidPromoCode;
256
257
  // When promocode is valid, set promoCode to session storage so if user close the modal, we can still reapply for them
257
258
  if (!isInvalidPromoCode) {
258
- sessionStorage.setItem('promoCode', cartStore.promoCode);
259
+ sessionStorage.setItem('zonos--promo-code', cartStore.promoCode);
259
260
  }
260
261
  };
261
262
  const stripeStorePrefetchLandedCost = async (params) => {
@@ -368,7 +369,7 @@ const stripeStoreApplyPromoCode = async () => {
368
369
  };
369
370
  const stripeStoreResetPromoCode = () => {
370
371
  cartStore.promoCode = '';
371
- sessionStorage.removeItem('promoCode');
372
+ sessionStorage.removeItem('zonos--promo-code');
372
373
  // reset promocode error state
373
374
  cartStore.promoCodeError = false;
374
375
  cartStore.promoCodeApplied = false;
@@ -465,8 +466,23 @@ const stripeStoreHandleInventoryCheck = async () => {
465
466
  if (typeof onInventoryCheck !== 'function') {
466
467
  return null;
467
468
  }
468
- const message = await onInventoryCheck({ items: cartStore.items });
469
- return message;
469
+ try {
470
+ const message = await onInventoryCheck({ items: cartStore.items });
471
+ return message;
472
+ }
473
+ catch (err) {
474
+ const message = err instanceof Error ? err.message : 'Unknown error';
475
+ void sendErrorLog({
476
+ endpoint: 'onInventoryCheck',
477
+ errors: [`cartId: ${window.Zonos.cartId} - ${message}`],
478
+ metadata: {
479
+ cartId: window.Zonos.cartId,
480
+ href: window.location.href,
481
+ items: cartStore.items,
482
+ },
483
+ });
484
+ throw err;
485
+ }
470
486
  };
471
487
  /**
472
488
  * Handle inventory check and returns error message if the callback provided.
@@ -526,7 +542,7 @@ const stripeStoreConfirmPayment = async () => {
526
542
  stripeStore.customErrorMessage = checkoutSessionStatus.errorMessage;
527
543
  throw new Error(checkoutSessionStatus.errorMessage);
528
544
  }
529
- const checkoutSessionId = cartStore.checkoutSessionId;
545
+ const checkoutSessionId = storageStore.checkoutSessionId;
530
546
  if (stripe &&
531
547
  stripeElements &&
532
548
  stripePaymentReady &&
@@ -572,6 +588,7 @@ const stripeStoreConfirmPayment = async () => {
572
588
  export const getCheckoutSessionBody = () => {
573
589
  var _a;
574
590
  const total = cartStore.items.reduce((amount, item) => amount + item.amount * item.quantity, 0);
591
+ const varianceTestInput = storageStore.enabledVariantTestKeys || [];
575
592
  const body = {
576
593
  adjustmentsAmount: cartStore.adjustments.reduce((prev, adj) => prev + adj.amount, 0),
577
594
  cartId: window.Zonos.cartId,
@@ -598,12 +615,13 @@ export const getCheckoutSessionBody = () => {
598
615
  ],
599
616
  presentmentCountryCode: localizationStore.selectedCountryCode,
600
617
  skipPaymentIntent: stripeStore.skipPaymentIntent,
618
+ varianceTestInput,
601
619
  };
602
620
  return body;
603
621
  };
604
622
  const stripeStoreGetPaymentIntent = async () => {
605
623
  var _a;
606
- if (!cartStore.checkoutSessionId) {
624
+ if (!storageStore.checkoutSessionId) {
607
625
  // We want to log the error anytime we fail to create a checkout session
608
626
  void sendErrorLog({
609
627
  endpoint: 'Error creating payment intent',
@@ -623,7 +641,7 @@ const stripeStoreGetPaymentIntent = async () => {
623
641
  }
624
642
  const { errors, json } = await handleFetch('/api/zonos-elements/create-payment-intent', {
625
643
  body: {
626
- checkoutSessionId: cartStore.checkoutSessionId,
644
+ checkoutSessionId: storageStore.checkoutSessionId,
627
645
  },
628
646
  method: 'POST',
629
647
  });
@@ -637,7 +655,7 @@ const stripeStoreGetPaymentIntent = async () => {
637
655
  metadata: {
638
656
  allLogs,
639
657
  cartId: window.Zonos.cartId,
640
- checkoutSessionId: cartStore.checkoutSessionId,
658
+ checkoutSessionId: storageStore.checkoutSessionId,
641
659
  clientSecret,
642
660
  },
643
661
  });
@@ -691,7 +709,7 @@ const stripeStoreInitCheckoutSession = async () => {
691
709
  return true;
692
710
  };
693
711
  const stripeStoreUpdateCheckoutSessionBaseCurrency = async () => {
694
- const checkoutSessionId = cartStore.checkoutSessionId;
712
+ const checkoutSessionId = storageStore.checkoutSessionId;
695
713
  // Checkout session id should be available at this point
696
714
  if (!checkoutSessionId) {
697
715
  logError('Failed to update checkout session base currency');
@@ -723,6 +741,7 @@ const stripeStoreUpdateCheckoutSessionBaseCurrency = async () => {
723
741
  * Update checkout session. Use for updating amount with landed cost id, or update session when cart items change
724
742
  */
725
743
  const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, currency, id, itemsAmount, landedCostId, presentmentCountryCode, }) => {
744
+ const varianceTestInput = storageStore.enabledVariantTestKeys || [];
726
745
  // No need to set loading state here because this function will be called under the hood to update
727
746
  // landed cost id for the section.
728
747
  const { errors, json } = await handleFetch('/api/zonos-elements/update-checkout-session', {
@@ -754,6 +773,7 @@ const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, cur
754
773
  ],
755
774
  presentmentCountryCode,
756
775
  skipPaymentIntent: stripeStore.skipPaymentIntent,
776
+ varianceTestInput,
757
777
  },
758
778
  method: 'POST',
759
779
  });
@@ -882,7 +902,7 @@ const stripeStoreTranslateAddressToLatin = async ({ addressInvalidCharactersList
882
902
  : {},
883
903
  };
884
904
  };
885
- onChange('clientSecret', clientSecret => {
905
+ stripeStoreOnChange('clientSecret', clientSecret => {
886
906
  // update stripe elements when client secret changes
887
907
  if (clientSecret && stripeStore.stripe) {
888
908
  sessionStorage.setItem('zonos--client-secret', clientSecret);
@@ -891,4 +911,4 @@ onChange('clientSecret', clientSecret => {
891
911
  sessionStorage.removeItem('zonos--client-secret');
892
912
  }
893
913
  });
894
- export { initStripeElements, stripeCalculateLandedCost, stripeStore, stripeStoreApplyPromoCode, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreGetPaymentIntent, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStoreMessageBasedOnStatus, stripeStorePrefetchLandedCost, stripeStoreRemovePromoCode, stripeStoreReset, stripeStoreResetPromoCode, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, stripeStoreUpdateCheckoutSessionBaseCurrency, };
914
+ export { initStripeElements, stripeCalculateLandedCost, stripeStore, stripeStoreApplyPromoCode, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreGetPaymentIntent, stripeStoreHandleInventoryCheck, stripeStoreHandleInventoryRefund, stripeStoreInitCheckoutSession, stripeStoreMessageBasedOnStatus, stripeStoreOnChange, stripeStorePrefetchLandedCost, stripeStoreRemovePromoCode, stripeStoreReset, stripeStoreResetPromoCode, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, stripeStoreUpdateCheckoutSessionBaseCurrency, };