@saasquatch/mint-components 2.0.0-67 → 2.0.0-69

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 (184) hide show
  1. package/dist/cjs/{IndirectTaxDetailsView-e5f70b8b.js → IndirectTaxDetailsView-3e88d710.js} +2 -2
  2. package/dist/cjs/{ShadowViewAddon-cd5c186c.js → ShadowViewAddon-646dec73.js} +10 -4
  3. package/dist/cjs/{global-8bba5b3a.js → global-39cb0afc.js} +745 -2
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/mint-components.cjs.js +2 -2
  6. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +3 -3
  7. package/dist/cjs/{sqm-base-registration-form-view-7b95ae7a.js → sqm-base-registration-form-view-69a4b615.js} +9 -4
  8. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +13 -6
  9. package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
  10. package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
  11. package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
  12. package/dist/cjs/{sqm-lead-checkbox-field-view-340acad0.js → sqm-lead-checkbox-field-view-f1c46d4b.js} +1 -1
  13. package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
  14. package/dist/cjs/{sqm-lead-input-field-view-06ed3632.js → sqm-lead-input-field-view-6d388092.js} +1 -1
  15. package/dist/cjs/sqm-lead-input-field.cjs.entry.js +3 -3
  16. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
  17. package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
  18. package/dist/cjs/{sqm-portal-email-verification-view-5518eb0d.js → sqm-portal-email-verification-view-6b17e545.js} +1 -1
  19. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
  20. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +25 -18
  21. package/dist/cjs/{sqm-portal-profile-view-615e6975.js → sqm-portal-profile-view-845367bb.js} +1 -1
  22. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  23. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
  24. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
  25. package/dist/cjs/sqm-stencilbook.cjs.entry.js +14 -11
  26. package/dist/cjs/{useLeadFormState-fd0445f9.js → useLeadFormState-b355759b.js} +1 -1
  27. package/dist/cjs/{utils-83d125fa.js → utils-ac82f977.js} +1 -1
  28. package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
  29. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +9 -4
  30. package/dist/collection/components/sqm-big-stat/useBigStat.js +7 -1
  31. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
  32. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
  33. package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
  34. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
  35. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -0
  36. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -2
  37. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +31 -1
  38. package/dist/collection/components/sqm-name-fields/useNameFields.js +1 -0
  39. package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
  40. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +1 -0
  41. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +4 -4
  42. package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +22 -15
  43. package/dist/collection/components/sqm-task-card/sqm-task-card.js +2 -2
  44. package/dist/collection/global/global.js +14 -3
  45. package/dist/collection/global/styles.v1.js +733 -0
  46. package/dist/collection/global/styles.v1.ts +735 -0
  47. package/dist/esm/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-e5d8767d.js} +2 -2
  48. package/dist/esm/{ShadowViewAddon-11ffa85d.js → ShadowViewAddon-5928ca9d.js} +10 -4
  49. package/dist/esm/{global-1099f20d.js → global-943536b9.js} +745 -2
  50. package/dist/esm/loader.js +2 -2
  51. package/dist/esm/mint-components.js +2 -2
  52. package/dist/esm/sqm-banking-info-form_10.entry.js +3 -3
  53. package/dist/esm/{sqm-base-registration-form-view-1a6bb4b4.js → sqm-base-registration-form-view-9e97d8b4.js} +9 -4
  54. package/dist/esm/sqm-big-stat_47.entry.js +13 -6
  55. package/dist/esm/sqm-code-verification.entry.js +1 -1
  56. package/dist/esm/sqm-email-verification.entry.js +1 -1
  57. package/dist/esm/sqm-empty_4.entry.js +1 -1
  58. package/dist/esm/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-adcc49c0.js} +1 -1
  59. package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
  60. package/dist/esm/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-c0b5aed5.js} +1 -1
  61. package/dist/esm/sqm-lead-input-field.entry.js +3 -3
  62. package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
  63. package/dist/esm/sqm-pagination_3.entry.js +1 -1
  64. package/dist/esm/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-8ceb6302.js} +1 -1
  65. package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
  66. package/dist/esm/sqm-portal-google-registration-form.entry.js +25 -18
  67. package/dist/esm/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-2ec60449.js} +1 -1
  68. package/dist/esm/sqm-portal-profile.entry.js +2 -2
  69. package/dist/esm/sqm-referral-table_11.entry.js +1 -1
  70. package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
  71. package/dist/esm/sqm-stencilbook.entry.js +14 -11
  72. package/dist/esm/{useLeadFormState-c379e5d7.js → useLeadFormState-9a652a42.js} +1 -1
  73. package/dist/esm/{utils-6122971b.js → utils-f27e62dc.js} +1 -1
  74. package/dist/esm-es5/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-e5d8767d.js} +1 -1
  75. package/dist/esm-es5/{ShadowViewAddon-11ffa85d.js → ShadowViewAddon-5928ca9d.js} +1 -1
  76. package/dist/esm-es5/{global-1099f20d.js → global-943536b9.js} +4 -4
  77. package/dist/esm-es5/loader.js +1 -1
  78. package/dist/esm-es5/mint-components.js +1 -1
  79. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  80. package/dist/esm-es5/sqm-base-registration-form-view-9e97d8b4.js +1 -0
  81. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  82. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  83. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  84. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  85. package/dist/esm-es5/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-adcc49c0.js} +1 -1
  86. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  87. package/dist/esm-es5/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-c0b5aed5.js} +1 -1
  88. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  89. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  90. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  91. package/dist/esm-es5/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-8ceb6302.js} +1 -1
  92. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  93. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  94. package/dist/esm-es5/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-2ec60449.js} +1 -1
  95. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  96. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  97. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  98. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  99. package/dist/esm-es5/{useLeadFormState-c379e5d7.js → useLeadFormState-9a652a42.js} +1 -1
  100. package/dist/esm-es5/{utils-6122971b.js → utils-f27e62dc.js} +1 -1
  101. package/dist/mint-components/global/styles.v1.ts +735 -0
  102. package/dist/mint-components/mint-components.esm.js +1 -1
  103. package/dist/mint-components/mint-components.js +1 -1
  104. package/dist/mint-components/{p-4adf23e7.entry.js → p-06b4fa6a.entry.js} +3 -3
  105. package/dist/mint-components/{p-aa08457e.system.js → p-08b373b9.system.js} +1 -1
  106. package/dist/mint-components/{p-6445e926.system.entry.js → p-0ac84da5.system.entry.js} +1 -1
  107. package/dist/mint-components/{p-14e813a7.system.entry.js → p-0cb51ea1.system.entry.js} +1 -1
  108. package/dist/mint-components/{p-d2bb770d.system.entry.js → p-11927355.system.entry.js} +1 -1
  109. package/dist/mint-components/{p-a5c63310.entry.js → p-124af9d6.entry.js} +1 -1
  110. package/dist/mint-components/{p-d3120982.system.entry.js → p-19de8749.system.entry.js} +1 -1
  111. package/dist/mint-components/{p-4ce51b1c.system.entry.js → p-1e406d04.system.entry.js} +1 -1
  112. package/dist/mint-components/{p-010957a1.entry.js → p-20f8e7ca.entry.js} +1 -1
  113. package/dist/mint-components/{p-6d5bd95a.js → p-252465eb.js} +1 -1
  114. package/dist/mint-components/{p-aefaec37.entry.js → p-2fd2f22b.entry.js} +1 -1
  115. package/dist/mint-components/p-37ef2ce1.entry.js +1 -0
  116. package/dist/mint-components/{p-aa8c6332.js → p-38c4653d.js} +1 -1
  117. package/dist/mint-components/{p-511c87ce.system.entry.js → p-3fa99fea.system.entry.js} +1 -1
  118. package/dist/mint-components/p-51a6a779.js +1 -0
  119. package/dist/mint-components/{p-967a9040.system.js → p-53b49d27.system.js} +1 -1
  120. package/dist/mint-components/{p-f401ef19.system.entry.js → p-54c250de.system.entry.js} +1 -1
  121. package/dist/mint-components/{p-e658929b.js → p-58b668a0.js} +4 -4
  122. package/dist/mint-components/{p-60c14cec.entry.js → p-58f4bf7a.entry.js} +1 -1
  123. package/dist/mint-components/{p-4c811d12.entry.js → p-5a3e2966.entry.js} +1 -1
  124. package/dist/mint-components/{p-bec87ac9.system.entry.js → p-5bb24669.system.entry.js} +1 -1
  125. package/dist/mint-components/{p-c85f204b.system.js → p-6b55555b.system.js} +1 -1
  126. package/dist/mint-components/{p-f0eae4e6.system.js → p-6dd86003.system.js} +1 -1
  127. package/dist/mint-components/{p-16ac4d4f.entry.js → p-735c9185.entry.js} +1 -1
  128. package/dist/mint-components/p-80569911.system.js +1 -0
  129. package/dist/mint-components/{p-5d059c95.entry.js → p-8677688c.entry.js} +1 -1
  130. package/dist/mint-components/{p-a217cc8d.entry.js → p-8e913ce5.entry.js} +1 -1
  131. package/dist/mint-components/p-8ea16fb6.js +1233 -0
  132. package/dist/mint-components/{p-ed16b35a.js → p-946f8a2c.js} +1 -1
  133. package/dist/mint-components/{p-ea0bc627.entry.js → p-94ae86fc.entry.js} +1 -1
  134. package/dist/mint-components/p-95b6e903.entry.js +1 -0
  135. package/dist/mint-components/{p-56009bf0.system.entry.js → p-9f57e731.system.entry.js} +1 -1
  136. package/dist/mint-components/{p-00bc7211.js → p-a1b3f61a.js} +1 -1
  137. package/dist/mint-components/{p-74f43a08.system.js → p-a275725a.system.js} +1 -1
  138. package/dist/mint-components/{p-22a9114f.system.entry.js → p-a30d7069.system.entry.js} +1 -1
  139. package/dist/mint-components/{p-c994512c.system.js → p-b5fd4fb6.system.js} +1 -1
  140. package/dist/mint-components/{p-47c83656.entry.js → p-bef123be.entry.js} +1 -1
  141. package/dist/mint-components/{p-79a3344f.js → p-c44b3725.js} +1 -1
  142. package/dist/mint-components/p-c4f275db.system.entry.js +1 -0
  143. package/dist/mint-components/p-c5f92183.system.entry.js +1 -0
  144. package/dist/mint-components/{p-18720462.system.entry.js → p-c67ffd25.system.entry.js} +1 -1
  145. package/dist/mint-components/{p-60465a2d.system.js → p-c90fcb02.system.js} +1 -1
  146. package/dist/mint-components/{p-7a268047.js → p-d181b17c.js} +1 -1
  147. package/dist/mint-components/p-d69c0a32.system.entry.js +1 -0
  148. package/dist/mint-components/{p-6c006998.entry.js → p-db64c957.entry.js} +2 -2
  149. package/dist/mint-components/{p-4fed8672.js → p-dbb79392.js} +1 -1
  150. package/dist/mint-components/{p-6d9ce4e5.entry.js → p-e4017ba5.entry.js} +1 -1
  151. package/dist/mint-components/{p-ad4348c3.system.js → p-ee290b30.system.js} +1 -1
  152. package/dist/mint-components/{p-b377570a.system.js → p-ee3d2ae4.system.js} +1 -1
  153. package/dist/mint-components/{p-e0a724dd.system.js → p-f3ccba80.system.js} +19 -19
  154. package/dist/mint-components/{p-717b6730.system.entry.js → p-fc86ba65.system.entry.js} +1 -1
  155. package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +2 -1
  156. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
  157. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
  158. package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
  159. package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
  160. package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +1 -0
  161. package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +5 -0
  162. package/dist/types/components/sqm-name-fields/useNameFields.d.ts +1 -0
  163. package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
  164. package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +2 -1
  165. package/dist/types/components.d.ts +10 -0
  166. package/dist/types/global/styles.v1.d.ts +2 -0
  167. package/docs/docs.docx +0 -0
  168. package/docs/raisins.json +1 -1
  169. package/grapesjs/grapesjs.js +1 -1
  170. package/package.json +2 -2
  171. package/dist/esm-es5/sqm-base-registration-form-view-1a6bb4b4.js +0 -1
  172. package/dist/mint-components/p-1522a7d1.js +0 -1
  173. package/dist/mint-components/p-71a6e549.system.entry.js +0 -1
  174. package/dist/mint-components/p-8b5b2acc.entry.js +0 -1
  175. package/dist/mint-components/p-b21c5311.system.js +0 -1
  176. package/dist/mint-components/p-c2ac14b7.entry.js +0 -1
  177. package/dist/mint-components/p-db1a0db1.js +0 -1233
  178. package/dist/mint-components/p-e9a596ad.system.entry.js +0 -1
  179. package/dist/mint-components/p-f66e02c7.system.entry.js +0 -1
  180. package/shoelace/assets/icons/twitter-x.svg +0 -4
  181. /package/dist/collection/global/{styles.js → styles.v2.js} +0 -0
  182. /package/dist/collection/global/{styles.ts → styles.v2.ts} +0 -0
  183. /package/dist/mint-components/global/{styles.ts → styles.v2.ts} +0 -0
  184. /package/dist/types/global/{styles.d.ts → styles.v2.d.ts} +0 -0
@@ -1,12 +1,12 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-b3a06de8.js';
2
- import './global-1099f20d.js';
2
+ import './global-943536b9.js';
3
3
  import { i as d, n as h } from './dom-context-hooks.module-63370afd.js';
4
4
  import { i as isDemo } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
6
6
  import { a as getMissingProps, g as getProps } from './utils-334c1e34.js';
7
7
  import './JSS-67b5cff8.js';
8
- import { L as LEAD_FORM_STATE_CONTEXT, R as RequiredPropsError } from './useLeadFormState-c379e5d7.js';
9
- import { L as LeadCheckboxFieldView } from './sqm-lead-checkbox-field-view-cbafee07.js';
8
+ import { L as LEAD_FORM_STATE_CONTEXT, R as RequiredPropsError } from './useLeadFormState-9a652a42.js';
9
+ import { L as LeadCheckboxFieldView } from './sqm-lead-checkbox-field-view-adcc49c0.js';
10
10
 
11
11
  function useLeadCheckboxField() {
12
12
  const leadFormState = d(LEAD_FORM_STATE_CONTEXT);
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { j as jss, a as create } from './JSS-67b5cff8.js';
4
4
  import { E as ErrorStyles } from './mixins-f750863a.js';
5
5
 
@@ -1,13 +1,13 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-b3a06de8.js';
2
- import './global-1099f20d.js';
2
+ import './global-943536b9.js';
3
3
  import { i as d, n as h } from './dom-context-hooks.module-63370afd.js';
4
4
  import { i as isDemo } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
6
6
  import { g as getProps, a as getMissingProps } from './utils-334c1e34.js';
7
7
  import './JSS-67b5cff8.js';
8
8
  import './mixins-f750863a.js';
9
- import { L as LEAD_FORM_STATE_CONTEXT, R as RequiredPropsError } from './useLeadFormState-c379e5d7.js';
10
- import { L as LeadInputFieldView } from './sqm-lead-input-field-view-f3775c28.js';
9
+ import { L as LEAD_FORM_STATE_CONTEXT, R as RequiredPropsError } from './useLeadFormState-9a652a42.js';
10
+ import { L as LeadInputFieldView } from './sqm-lead-input-field-view-c0b5aed5.js';
11
11
 
12
12
  function useLeadInputField() {
13
13
  const leadFormState = d(LEAD_FORM_STATE_CONTEXT);
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { n as h } from './dom-context-hooks.module-63370afd.js';
4
4
  import { d as dist, H, J, w as wn, i as isDemo } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
@@ -1,5 +1,5 @@
1
1
  import { h, F as Fragment, r as registerInstance } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { n as h$1, k as useState } from './dom-context-hooks.module-63370afd.js';
4
4
  import { F as Fn, i as isDemo, d as dist, H, J, B, w as wn, $ as $e } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
4
  import { A as AuthWrapper, a as AuthColumn } from './mixins-f750863a.js';
5
5
  import { T as TextSpanView } from './sqm-text-span-view-4c17b8c9.js';
@@ -1,12 +1,12 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-b3a06de8.js';
2
- import './global-1099f20d.js';
2
+ import './global-943536b9.js';
3
3
  import { k as useState, m as useRef, f as useEffect, n as h } from './dom-context-hooks.module-63370afd.js';
4
4
  import { l as ln, n as nn, J, j as jn, u as useCallback, i as isDemo } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
6
6
  import './JSS-67b5cff8.js';
7
7
  import './mixins-f750863a.js';
8
8
  import './sqm-text-span-view-4c17b8c9.js';
9
- import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-7d86299c.js';
9
+ import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-8ceb6302.js';
10
10
 
11
11
  function usePortalEmailVerification(props) {
12
12
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
@@ -7,7 +7,7 @@ import { c as createStyleSheet } from './JSS-67b5cff8.js';
7
7
  import './mixins-f750863a.js';
8
8
  import './sqm-text-span-view-4c17b8c9.js';
9
9
  import { a as useRegistrationForm } from './useRegistrationFormState-24d594ea.js';
10
- import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-1a6bb4b4.js';
10
+ import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-9e97d8b4.js';
11
11
  import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-8bdc3804.js';
12
12
  import './AsYouType-46f67d0d.js';
13
13
  import { u as usePortalRegistrationForm } from './usePortalRegistrationForm-1eb3cd72.js';
@@ -71,7 +71,6 @@ function jwtDecode(token, options) {
71
71
  }
72
72
 
73
73
  function usePortalGoogleRegistrationForm(props) {
74
- const [emailValidationError, setEmailValidationError] = useState(null);
75
74
  const [registrationFormState, setRegistrationFormState] = useRegistrationForm();
76
75
  const [showRegistrationForm, setShowRegistrationForm] = useState({
77
76
  mode: "base",
@@ -79,33 +78,40 @@ function usePortalGoogleRegistrationForm(props) {
79
78
  const handleEmailSubmit = async (event) => {
80
79
  const formControls = event.target.getFormControls();
81
80
  let formData = {};
82
- let errorMessage = null;
81
+ let validationErrors = {};
83
82
  formControls.forEach((control) => {
84
83
  if (!control.name)
85
84
  return;
86
- jsonpointer.set(formData, control.name, control.value);
87
- // only validate email field
88
- if (control.name !== "/email")
89
- return;
90
- if (control.required && !control.value)
91
- errorMessage = props.requiredFieldErrorMessage;
85
+ const key = control.name;
86
+ const value = control.value;
87
+ jsonpointer.set(formData, key, value);
88
+ if (control.required && !value) {
89
+ jsonpointer.set(validationErrors, key, props.requiredFieldErrorMessage);
90
+ }
92
91
  if (typeof control.validationError === "function") {
93
92
  const validate = control.validationError;
94
93
  const validationError = validate({
95
94
  control,
96
- key: "email",
97
- value: control.value,
95
+ key,
96
+ value,
98
97
  });
99
98
  if (validationError)
100
- errorMessage = validationError;
99
+ jsonpointer.set(validationErrors, key, validationError);
101
100
  }
102
101
  });
103
- if (errorMessage) {
104
- setEmailValidationError(errorMessage);
102
+ if (Object.keys(validationErrors).length) {
103
+ // early return for validation errors
104
+ setRegistrationFormState({
105
+ ...registrationFormState,
106
+ loading: false,
107
+ error: "",
108
+ validationErrors,
109
+ });
105
110
  return;
106
111
  }
107
112
  setRegistrationFormState({
108
113
  ...registrationFormState,
114
+ validationErrors: {},
109
115
  initialData: {
110
116
  ...registrationFormState === null || registrationFormState === void 0 ? void 0 : registrationFormState.initialData,
111
117
  ...formData,
@@ -135,8 +141,9 @@ function usePortalGoogleRegistrationForm(props) {
135
141
  }
136
142
  };
137
143
  return {
144
+ registrationFormState,
138
145
  showRegistrationForm,
139
- emailValidationError,
146
+ validationErrors: registrationFormState.validationErrors,
140
147
  handleGoogleInit,
141
148
  handleEmailSubmit,
142
149
  };
@@ -292,7 +299,7 @@ const PortalGoogleRegistrationForm = class {
292
299
  };
293
300
  const sheet = createStyleSheet(styles);
294
301
  const styleString = sheet.toString();
295
- const { handleGoogleInit, handleEmailSubmit, showRegistrationForm, emailValidationError, } = isDemo() ? useGoogleDemo(this) : usePortalGoogleRegistrationForm(this);
302
+ const { handleGoogleInit, handleEmailSubmit, showRegistrationForm, validationErrors, } = isDemo() ? useGoogleDemo(this) : usePortalGoogleRegistrationForm(this);
296
303
  const content = {
297
304
  formData: h$1("slot", { name: "formData" }),
298
305
  googleButton: (h$1("sqm-google-sign-in", { text: this.googleButtonText, onInitComplete: handleGoogleInit })),
@@ -317,7 +324,7 @@ const PortalGoogleRegistrationForm = class {
317
324
  };
318
325
  if (showRegistrationForm.mode === "base") {
319
326
  return (h$1(BaseRegistrationFormView, { states: {
320
- error: emailValidationError,
327
+ validationErrors,
321
328
  }, callbacks: { handleEmailSubmit }, content: content }));
322
329
  }
323
330
  return (h$1(PortalRegistrationFormView, { states: {
@@ -360,7 +367,7 @@ function useGoogleDemo(props) {
360
367
  mode: "base",
361
368
  });
362
369
  return cjs({
363
- emailValidationError: false,
370
+ validationErrors: {},
364
371
  handleEmailSubmit: () => setShowRegistrationForm({ mode: "manual" }),
365
372
  showRegistrationForm,
366
373
  handleGoogleInit: () => setShowRegistrationForm({ mode: "google" }),
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
4
  import { T as TextSpanView } from './sqm-text-span-view-4c17b8c9.js';
5
5
 
@@ -1,12 +1,12 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-b3a06de8.js';
2
- import './global-1099f20d.js';
2
+ import './global-943536b9.js';
3
3
  import { k as useState, f as useEffect, n as h } from './dom-context-hooks.module-63370afd.js';
4
4
  import { d as dist, J, w as wn, $ as $e, i as isDemo } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
6
6
  import { g as getProps } from './utils-334c1e34.js';
7
7
  import './JSS-67b5cff8.js';
8
8
  import './sqm-text-span-view-4c17b8c9.js';
9
- import { P as PortalProfileView } from './sqm-portal-profile-view-3ed13e4d.js';
9
+ import { P as PortalProfileView } from './sqm-portal-profile-view-2ec60449.js';
10
10
  import { i as isEmpty } from './utilities-72c07b09.js';
11
11
 
12
12
  const GET_USER = dist.gql `
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h as h$1, g as getElement, c as Host } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { n as h, j as useReducer, u as useMemo, f as useEffect } from './dom-context-hooks.module-63370afd.js';
4
4
  import { i as isDemo } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
@@ -1,5 +1,5 @@
1
1
  import { h, r as registerInstance, c as Host } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { b as browser, j as useReducer, f as useEffect, n as h$1, u as useMemo } from './dom-context-hooks.module-63370afd.js';
4
4
  import { d as dist, J, H, L, w as wn, R as Rn, i as isDemo } from './index.module-c9811a48.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
@@ -1,5 +1,5 @@
1
1
  import { h, r as registerInstance, c as Host } from './index-b3a06de8.js';
2
- import './global-1099f20d.js';
2
+ import './global-943536b9.js';
3
3
  import { a as commonjsGlobal, u as useMemo, k as useState, c as createCommonjsModule, f as useEffect, n as h$1 } from './dom-context-hooks.module-63370afd.js';
4
4
  import { j as jn, b as setUserIdentity, o as setProgramId, k as kn, d as dist, X as Xe } from './index.module-c9811a48.js';
5
5
  import './cjs-bdfb4486.js';
@@ -15,26 +15,26 @@ import './sqm-text-span-view-4c17b8c9.js';
15
15
  import { C as CloseButtonView } from './sqm-close-button-view-2fa57229.js';
16
16
  import './index-ffa26b43.js';
17
17
  import { E as EmailRegistrationView } from './email-registration-view-1f587f8b.js';
18
- import { L as LeadCheckboxFieldView } from './sqm-lead-checkbox-field-view-cbafee07.js';
18
+ import { L as LeadCheckboxFieldView } from './sqm-lead-checkbox-field-view-adcc49c0.js';
19
19
  import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-18baae5b.js';
20
20
  import { L as LogoutCurrentUserView } from './sqm-logout-current-user-view-f21e54e3.js';
21
21
  import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-0a2ec560.js';
22
22
  import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-5a452423.js';
23
- import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-7d86299c.js';
23
+ import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-8ceb6302.js';
24
24
  import { P as PortalLoginView } from './sqm-portal-login-view-7670cd86.js';
25
- import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-1a6bb4b4.js';
25
+ import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-9e97d8b4.js';
26
26
  import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-8bdc3804.js';
27
- import { P as PortalProfileView } from './sqm-portal-profile-view-3ed13e4d.js';
27
+ import { P as PortalProfileView } from './sqm-portal-profile-view-2ec60449.js';
28
28
  import './utilities-72c07b09.js';
29
29
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-abef7286.js';
30
30
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-33805220.js';
31
31
  import './ErrorView-bbf0a042.js';
32
32
  import { Q as QrCodeView } from './sqm-qr-code-view-ea505213.js';
33
- import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, c as CheckboxFieldView, d as PortalRegisterView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalForgotPasswordView, i as PortalFrameView, R as ReferralIframeView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as useShareButton, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as LeadFormView, U as LeadDropdownFieldView, V as ShadowViewAddon } from './ShadowViewAddon-11ffa85d.js';
33
+ import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, c as CheckboxFieldView, d as PortalRegisterView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalForgotPasswordView, i as PortalFrameView, R as ReferralIframeView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as useShareButton, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as LeadFormView, U as LeadDropdownFieldView, V as ShadowViewAddon } from './ShadowViewAddon-5928ca9d.js';
34
34
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-176e92e3.js';
35
- import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView } from './IndirectTaxDetailsView-0a57b622.js';
36
- import { t as taxTypeToName, L as LoadingView } from './utils-6122971b.js';
37
- import { L as LeadInputFieldView } from './sqm-lead-input-field-view-f3775c28.js';
35
+ import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView } from './IndirectTaxDetailsView-e5d8767d.js';
36
+ import { t as taxTypeToName, L as LoadingView } from './utils-f27e62dc.js';
37
+ import { L as LeadInputFieldView } from './sqm-lead-input-field-view-c0b5aed5.js';
38
38
 
39
39
  /**
40
40
  * lodash (Custom Build) <https://lodash.com/>
@@ -5040,7 +5040,7 @@ const BaseRegistrationForm_stories = {
5040
5040
  };
5041
5041
  const defaultProps = {
5042
5042
  states: {
5043
- error: "",
5043
+ validationErrors: {},
5044
5044
  },
5045
5045
  callbacks: {
5046
5046
  handleEmailSubmit: () => console.log("Submit!"),
@@ -5060,7 +5060,7 @@ const defaultProps = {
5060
5060
  const errorProps = {
5061
5061
  ...defaultProps,
5062
5062
  states: {
5063
- error: "Something went wrong. Please try again.",
5063
+ validationErrors: { error: "Something went wrong. Please try again." },
5064
5064
  },
5065
5065
  };
5066
5066
  const Default$1 = () => {
@@ -8246,6 +8246,7 @@ const NameFields_stories = {
8246
8246
  };
8247
8247
  const props = {
8248
8248
  states: {
8249
+ optional: false,
8249
8250
  registrationFormState: {
8250
8251
  validationErrors: undefined,
8251
8252
  },
@@ -8257,6 +8258,7 @@ const props = {
8257
8258
  };
8258
8259
  const errorProps$1 = {
8259
8260
  states: {
8261
+ optional: false,
8260
8262
  registrationFormState: {
8261
8263
  validationErrors: {
8262
8264
  firstName: "Cannot be empty",
@@ -9186,6 +9188,7 @@ const defaultProps$g = {
9186
9188
  formData: (h("div", null,
9187
9189
  " ",
9188
9190
  h(NameFieldsView, { states: {
9191
+ optional: false,
9189
9192
  registrationFormState: {
9190
9193
  validationErrors: undefined,
9191
9194
  disabled: true,
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { k as useState, y } from './dom-context-hooks.module-63370afd.js';
4
4
  import { _ } from './index.module-c9811a48.js';
5
5
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-b3a06de8.js';
2
- import { i as intl } from './global-1099f20d.js';
2
+ import { i as intl } from './global-943536b9.js';
3
3
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
4
 
5
5
  const style = {
@@ -1 +1 @@
1
- import{h}from"./index-b3a06de8.js";import{i as intl}from"./global-1099f20d.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{f as formatErrorMessage}from"./utils-6122971b.js";var style={Description:{fontSize:"var(--sl-font-size-small)",marginTop:"var(--sl-spacing-small)",margin:"0 0 var(--sl-spacing-large)",color:"var(--sqm-text-subdued)"},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(-sl-font-weight-semibold)",margin:"0 0 var(--sl-spacing-xxx-small)"},Container:{},InvoiceTableContaier:{"& sl-details::part(base)":{border:"none"},"& sl-details::part(content)":{padding:0},"& sl-details::part(header)":{fontSize:"var(--sl-font-size-medium)",padding:"0px"},"& sl-details::part(summary)":{fontWeight:"var(-sl-font-weight-semibold)"},"& sl-details::part(summary-icon)":{marginRight:"100%",marginLeft:"var(--sl-spacing-x-small)",transform:"rotate(90deg)"},"& sl-details[open]::part(summary-icon)":{transform:"rotate(270deg)"}}};function InvoiceTableView(e,a){var l=createStyleSheet(style);var r=l.toString();var n="\n :host{\n display: block;\n }";return h("div",{class:l.classes.Container},h("style",{type:"text/css"},n,r),h("div",{class:l.classes.InvoiceTableContaier},h("sl-details",{summary:e.header},h("p",{class:l.classes.Description},e.description),a)))}var INDIRECT_TAX_PROVINCES=[{regionCode:"ALBERTA",taxType:"GST",displayName:"Alberta"},{regionCode:"BRITISHCOLUMBIA",taxType:"HST",displayName:"British Columbia"},{regionCode:"MANITOBA",taxType:"HST",displayName:"Manitoba"},{regionCode:"NEWBRUNSWICK",taxType:"HST",displayName:"New Brunswick"},{regionCode:"NEWFOUNDLANDLABRADOR",taxType:"HST",displayName:"Newfoundland"},{regionCode:"NORTHWESTTERRITORIES",taxType:"GST",displayName:"North West Territories"},{regionCode:"NOVASCOTIA",taxType:"HST",displayName:"Nova Scotia"},{regionCode:"NUNAVUT",taxType:"HST",displayName:"Nunavut"},{regionCode:"ONTARIO",taxType:"HST",displayName:"Ontario"},{regionCode:"PRINCEEDWARDISLAND",taxType:"HST",displayName:"Prince Edward Island"},{regionCode:"QUEBEC",taxType:"GST",displayName:"Quebec"},{regionCode:"SASKATCHEWAN",taxType:"HST",displayName:"Saskatchewan"},{regionCode:"YUKON",taxType:"GST",displayName:"Yukon"}];var INDIRECT_TAX_SPAIN_REGIONS=[{regionCode:"SPAINPROPER",taxType:"VAT",displayName:"Spain Proper"},{regionCode:"CANARYISLANDS",taxType:"VAT",displayName:"Canary Islands"}];var ADDRESS_REGIONS={CA:{labelEnum:"PROVINCE",regions:[{label:"Alberta",value:"ALBERTA"},{label:"British Columbia",value:"BRITISHCOLUMBIA"},{label:"Manitoba",value:"MANITOBA"},{label:"New Brunswick",value:"NEWBRUNSWICK"},{label:"Newfoundland & Labrador",value:"NEWFOUNDLANDANDLABRADOR"},{label:"Northwest Territories",value:"NORTHWESTTERRITORIES"},{label:"Nova Scotia",value:"NOVASCOTIA"},{label:"Nunavut",value:"NUNAVUT"},{label:"Ontario",value:"ONTARIO"},{label:"Prince Edward Island",value:"PRINCEEDWARDISLAND"},{label:"Quebec",value:"QUEBEC"},{label:"Saskatchewan",value:"SASKATCHEWAN"},{label:"Yukon",value:"YUKON"}]},ES:{labelEnum:"REGION",regions:[{label:"Canary Islands",value:"CANARYISLANDS"},{label:"Spain Proper",value:"SPAINPROPER"}]},AU:{labelEnum:"STATE",regions:[{label:"Australian Capital Territory",value:"CAPITALTERRITORY"},{label:"New South Wales",value:"NEWSOUTHWALES"},{label:"Northern Territory",value:"NORTHERNTERRITORY"},{label:"Queensland",value:"QUEENSLAND"},{label:"South Australia",value:"SOUTHAUSTRALIA"},{label:"Tasmania",value:"TASMANIA"},{label:"Victoria",value:"VICTORIA"},{label:"Western Australia",value:"WESTERNAUSTRALIA"}]},US:{labelEnum:"STATE",regions:[{label:"Alabama",value:"ALABAMA"},{label:"Alaska",value:"ALASKA"},{label:"Arizona",value:"ARIZONA"},{label:"Arkansas",value:"ARKANSAS"},{label:"California",value:"CALIFORNIA"},{label:"Colorado",value:"COLORADO"},{label:"Connecticut",value:"CONNECTICUT"},{label:"Delaware",value:"DELAWARE"},{label:"District of Columbia",value:"DISTRICTOFCOLUMBIA"},{label:"Florida",value:"FLORIDA"},{label:"Georgia",value:"GEORGIA"},{label:"Hawaii",value:"HAWAII"},{label:"Idaho",value:"IDAHO"},{label:"Illinois",value:"ILLINOIS"},{label:"Indiana",value:"INDIANA"},{label:"Iowa",value:"IOWA"},{label:"Kansas",value:"KANSAS"},{label:"Kentucky",value:"KENTUCKY"},{label:"Louisiana",value:"LOUISIANA"},{label:"Maine",value:"MAINE"},{label:"Maryland",value:"MARYLAND"},{label:"Massachusetts",value:"MASSACHUSETTS"},{label:"Michigan",value:"MICHIGAN"},{label:"Minnesota",value:"MINNESOTA"},{label:"Mississippi",value:"MISSISSIPPI"},{label:"Missouri",value:"MISSOURI"},{label:"Montana",value:"MONTANA"},{label:"Nebraska",value:"NEBRASKA"},{label:"Nevada",value:"NEVADA"},{label:"New Hampshire",value:"NEWHAMPSHIRE"},{label:"New Jersey",value:"NEWJERSEY"},{label:"New Mexico",value:"NEWMEXICO"},{label:"New York",value:"NEWYORK"},{label:"North Carolina",value:"NORTHCAROLINA"},{label:"North Dakota",value:"NORTHDAKOTA"},{label:"Ohio",value:"OHIO"},{label:"Oklahoma",value:"OKLAHOMA"},{label:"Oregon",value:"OREGON"},{label:"Pennsylvania",value:"PENNSYLVANIA"},{label:"Rhode Island",value:"RHODEISLAND"},{label:"South Carolina",value:"SOUTHCAROLINA"},{label:"South Dakota",value:"SOUTHDAKOTA"},{label:"Tennessee",value:"TENNESSEE"},{label:"Texas",value:"TEXAS"},{label:"Utah",value:"UTAH"},{label:"Vermont",value:"VERMONT"},{label:"Virgin Islands",value:"VIRGINISLANDS"},{label:"Virginia",value:"VIRGINIA"},{label:"Washington",value:"WASHINGTON"},{label:"West Virginia",value:"WESTVIRGINIA"},{label:"Wisconsin",value:"WISCONSIN"},{label:"Wyoming",value:"WYOMING"},{label:"Americas Forces",value:"AAMILITARY"},{label:"Europe, Middle East, Canada, Africa and Canada Forces",value:"AEMILITARY"},{label:"Pacific Forces",value:"APMILITARY"},{label:"Other",value:"OTHER"}]}};var vatLabels={GB:"VAT",AU:"GST",NZ:"GST",CA:"HST",AT:"VAT",BE:"VAT",BG:"VAT",HR:"VAT",CY:"VAT",CZ:"VAT",DK:"VAT",EE:"VAT",FI:"VAT",FR:"VAT",DE:"VAT",GR:"VAT",HU:"VAT",IE:"VAT",IT:"VAT",LV:"VAT",LT:"VAT",LU:"VAT",MT:"VAT",NL:"VAT",PL:"VAT",PT:"VAT",RO:"VAT",SK:"VAT",SI:"VAT",ES:"VAT",SE:"VAT",IS:"VAT",IN:"GST",IL:"VAT",JP:"CT",MX:"VAT",NO:"VAT",SG:"GST",ZA:"VAT",KR:"VAT",CH:"VAT",TW:"VAT",TH:"VAT",PH:"VAT",MY:"SST",AE:"VAT",TR:"VAT",RU:"VAT"};var style$1={Container:{width:"100%"},InputContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px",padding:"16px",maxWidth:"450px"},ConditionalInputsContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},HR:{border:"var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)",margin:"10px 0"},Input:{maxWidth:"500px"},Checkbox:{"&::part(control)":{borderRadius:"0 !important"}},SearchInput:{padding:"var(--sl-spacing-x-small)"},ErrorInput:{maxWidth:"500px","&::part(base)":{border:"var(--sqm-border-thickness, 1px) solid var(--sqm-danger-color-border)",borderRadius:"var(--sl-input-border-radius-medium)"},"&::part(help-text)":{color:"var(--sqm-danger-color-text)"}}};var sheet=createStyleSheet(style$1);var styleString=sheet.toString();var vanillaStyle="\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n sl-menu-item::part(base) {\n color: var(--sqm-input-color);\n }\n\n sl-menu-item::part(base):hover {\n background-color: var(--sqm-input-border-color-hover);\n }\n sl-checkbox[checked]::part(control){\n background-color: var(--sqm-input-border-color-focus);\n }\n\n sl-checkbox[checked]::part(checked-icon){\n color: var(--sqm-input-background);\n }\n ";var OtherRegionSlotView=function(e){var a,l,r;var n=e.states,i=e.states.formState,s=e.callbacks,t=e.text;var o=sheet.classes;var u=function(e){return intl.formatMessage({id:"tax-field-label"+e,defaultMessage:t.indirectTaxNumber},{taxType:e})};var d=function(e){return intl.formatMessage({id:"tax-field-label"+e,defaultMessage:t.error.indirectTaxNumber},{taxType:e})};var b=function(e){var a=e.label,l=e.error,r=e.name;var s;return h("sl-input",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,label:a,disabled:n.loading||n.disabled,value:i[r]},((s=i.errors)===null||s===void 0?void 0:s[r])&&{class:o.ErrorInput,helpText:l},{id:r,name:"/"+r}))};var T=function(){var a,l;return h("div",{class:o.ConditionalInputsContainer},h("sl-select",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,value:i.subRegion,label:t.subRegion,disabled:n.loading||n.disabled},((a=i.errors)===null||a===void 0?void 0:a.indirectTaxNumber)&&{class:o.ErrorInput,helpText:formatErrorMessage(t.subRegion,t.error.fieldRequiredError)},{id:"subRegion",name:"/subRegion"}),e.data.esRegions.map((function(e){return h("sl-menu-item",{value:e.regionCode},e.displayName)}))),h(b,{name:"indirectTaxNumber",label:u("VAT"),error:d("VAT")}),h("sl-checkbox",{class:o.Checkbox,exportparts:"label: input-label, base: input-base",checked:i.hasSubRegionTaxNumber,"onSl-change":s.onSpainToggle,disabled:n.disabled||n.isPartner},t.isRegisteredSubRegionIncomeTax),i.hasSubRegionTaxNumber&&h("sl-input",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,label:t.subRegionTaxNumberLabel,disabled:n.loading||n.disabled,value:i.subRegionTaxNumber},((l=i.errors)===null||l===void 0?void 0:l.subRegionTaxNumber)&&{class:o.ErrorInput,helpText:formatErrorMessage(t.subRegionTaxNumberLabel,t.error.fieldRequiredError)},{id:"subRegionTaxNumber",name:"/subRegionTaxNumber"})))};var A=function(){var a,l;var r=sheet.classes;var o=(a=INDIRECT_TAX_PROVINCES===null||INDIRECT_TAX_PROVINCES===void 0?void 0:INDIRECT_TAX_PROVINCES.find((function(e){return e.regionCode===i.province})))===null||a===void 0?void 0:a.taxType;return h("div",{class:r.ConditionalInputsContainer},h("sl-select",Object.assign({required:true,value:i.province,exportparts:"label: input-label, base: input-base",class:r.Input,label:t.province,disabled:n.loading||n.disabled,"onSl-select":function(e){return s.onFormChange("province",e)}},((l=i.errors)===null||l===void 0?void 0:l.province)&&{class:r.ErrorInput,helpText:formatErrorMessage(t.province,t.error.fieldRequiredError)},{id:"province",name:"/province"}),e.data.provinces.map((function(e){return h("sl-menu-item",{value:e.regionCode},e.displayName)}))),o==="GST"&&h(b,{label:u("GST"),error:d("GST"),name:"indirectTaxNumber"}),o==="HST"&&h(b,{label:u("HST"),error:d("HST"),name:"indirectTaxNumber"}),i.province==="QUEBEC"&&h("div",{class:r.ConditionalInputsContainer},h("sl-checkbox",{class:r.Checkbox,exportparts:"label: input-label, base: input-base","onSl-change":s.onQstToggle,checked:i.hasQst,disabled:n.isPartner||n.disabled},t.isRegisteredQST),i.hasQst&&h(b,{name:"qstNumber",label:t.qstNumber,error:formatErrorMessage(t.qstNumber,t.error.fieldRequiredError)})))};var c=function(e){var a;switch(e){case"CA":return h(A,null);case"ES":return h(T,null);default:return h("sl-input",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,value:i.indirectTaxNumber,label:u(vatLabels[e]||"GENERAL"),disabled:n.loading||n.disabled},((a=i.errors)===null||a===void 0?void 0:a.indirectTaxNumber)&&{class:o.ErrorInput,helpText:d(vatLabels[e]||"GENERAL")},{id:"indirectTaxNumber",name:"/indirectTaxNumber"}))}};var v=c(i.selectedRegion);return h("div",{style:n.hide?{display:"none"}:{}},h("form",{class:o.Container},h("style",{type:"text/css"},styleString,vanillaStyle),h("hr",{class:o.HR}),h("div",{class:o.InputContainer},h("sl-select",Object.assign({required:true,class:o.Input,value:i.selectedRegion,exportparts:"label: input-label, base: input-base",label:t.selectedRegion,disabled:n.loading||n.disabled,"onSl-select":function(e){return s.onFormChange("selectedRegion",e)}},((a=i.errors)===null||a===void 0?void 0:a.selectedRegion)&&{class:o.ErrorInput,helpText:formatErrorMessage(t.selectedRegion,t.error.fieldRequiredError)},{id:"selectedRegion",name:"/selectedRegion"}),h("sl-input",{class:o.SearchInput,placeholder:t.searchForCountryText,onKeyDown:function(e){e.stopPropagation()},"onSl-input":function(e){s.setCountrySearch(e.target.value)}}),(l=e.data.countries)===null||l===void 0?void 0:l.map((function(e){return h("sl-menu-item",{value:e.countryCode},e.displayName)})),(r=e.data.allCountries)===null||r===void 0?void 0:r.map((function(e){return h("sl-menu-item",{value:e.countryCode,style:{display:"none"}},e.displayName)}))),v),h("hr",{class:o.HR})))};export{ADDRESS_REGIONS as A,InvoiceTableView as I,OtherRegionSlotView as O,INDIRECT_TAX_SPAIN_REGIONS as a,INDIRECT_TAX_PROVINCES as b,vatLabels as v};
1
+ import{h}from"./index-b3a06de8.js";import{i as intl}from"./global-943536b9.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{f as formatErrorMessage}from"./utils-f27e62dc.js";var style={Description:{fontSize:"var(--sl-font-size-small)",marginTop:"var(--sl-spacing-small)",margin:"0 0 var(--sl-spacing-large)",color:"var(--sqm-text-subdued)"},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(-sl-font-weight-semibold)",margin:"0 0 var(--sl-spacing-xxx-small)"},Container:{},InvoiceTableContaier:{"& sl-details::part(base)":{border:"none"},"& sl-details::part(content)":{padding:0},"& sl-details::part(header)":{fontSize:"var(--sl-font-size-medium)",padding:"0px"},"& sl-details::part(summary)":{fontWeight:"var(-sl-font-weight-semibold)"},"& sl-details::part(summary-icon)":{marginRight:"100%",marginLeft:"var(--sl-spacing-x-small)",transform:"rotate(90deg)"},"& sl-details[open]::part(summary-icon)":{transform:"rotate(270deg)"}}};function InvoiceTableView(e,a){var l=createStyleSheet(style);var r=l.toString();var n="\n :host{\n display: block;\n }";return h("div",{class:l.classes.Container},h("style",{type:"text/css"},n,r),h("div",{class:l.classes.InvoiceTableContaier},h("sl-details",{summary:e.header},h("p",{class:l.classes.Description},e.description),a)))}var INDIRECT_TAX_PROVINCES=[{regionCode:"ALBERTA",taxType:"GST",displayName:"Alberta"},{regionCode:"BRITISHCOLUMBIA",taxType:"HST",displayName:"British Columbia"},{regionCode:"MANITOBA",taxType:"HST",displayName:"Manitoba"},{regionCode:"NEWBRUNSWICK",taxType:"HST",displayName:"New Brunswick"},{regionCode:"NEWFOUNDLANDLABRADOR",taxType:"HST",displayName:"Newfoundland"},{regionCode:"NORTHWESTTERRITORIES",taxType:"GST",displayName:"North West Territories"},{regionCode:"NOVASCOTIA",taxType:"HST",displayName:"Nova Scotia"},{regionCode:"NUNAVUT",taxType:"HST",displayName:"Nunavut"},{regionCode:"ONTARIO",taxType:"HST",displayName:"Ontario"},{regionCode:"PRINCEEDWARDISLAND",taxType:"HST",displayName:"Prince Edward Island"},{regionCode:"QUEBEC",taxType:"GST",displayName:"Quebec"},{regionCode:"SASKATCHEWAN",taxType:"HST",displayName:"Saskatchewan"},{regionCode:"YUKON",taxType:"GST",displayName:"Yukon"}];var INDIRECT_TAX_SPAIN_REGIONS=[{regionCode:"SPAINPROPER",taxType:"VAT",displayName:"Spain Proper"},{regionCode:"CANARYISLANDS",taxType:"VAT",displayName:"Canary Islands"}];var ADDRESS_REGIONS={CA:{labelEnum:"PROVINCE",regions:[{label:"Alberta",value:"ALBERTA"},{label:"British Columbia",value:"BRITISHCOLUMBIA"},{label:"Manitoba",value:"MANITOBA"},{label:"New Brunswick",value:"NEWBRUNSWICK"},{label:"Newfoundland & Labrador",value:"NEWFOUNDLANDANDLABRADOR"},{label:"Northwest Territories",value:"NORTHWESTTERRITORIES"},{label:"Nova Scotia",value:"NOVASCOTIA"},{label:"Nunavut",value:"NUNAVUT"},{label:"Ontario",value:"ONTARIO"},{label:"Prince Edward Island",value:"PRINCEEDWARDISLAND"},{label:"Quebec",value:"QUEBEC"},{label:"Saskatchewan",value:"SASKATCHEWAN"},{label:"Yukon",value:"YUKON"}]},ES:{labelEnum:"REGION",regions:[{label:"Canary Islands",value:"CANARYISLANDS"},{label:"Spain Proper",value:"SPAINPROPER"}]},AU:{labelEnum:"STATE",regions:[{label:"Australian Capital Territory",value:"CAPITALTERRITORY"},{label:"New South Wales",value:"NEWSOUTHWALES"},{label:"Northern Territory",value:"NORTHERNTERRITORY"},{label:"Queensland",value:"QUEENSLAND"},{label:"South Australia",value:"SOUTHAUSTRALIA"},{label:"Tasmania",value:"TASMANIA"},{label:"Victoria",value:"VICTORIA"},{label:"Western Australia",value:"WESTERNAUSTRALIA"}]},US:{labelEnum:"STATE",regions:[{label:"Alabama",value:"ALABAMA"},{label:"Alaska",value:"ALASKA"},{label:"Arizona",value:"ARIZONA"},{label:"Arkansas",value:"ARKANSAS"},{label:"California",value:"CALIFORNIA"},{label:"Colorado",value:"COLORADO"},{label:"Connecticut",value:"CONNECTICUT"},{label:"Delaware",value:"DELAWARE"},{label:"District of Columbia",value:"DISTRICTOFCOLUMBIA"},{label:"Florida",value:"FLORIDA"},{label:"Georgia",value:"GEORGIA"},{label:"Hawaii",value:"HAWAII"},{label:"Idaho",value:"IDAHO"},{label:"Illinois",value:"ILLINOIS"},{label:"Indiana",value:"INDIANA"},{label:"Iowa",value:"IOWA"},{label:"Kansas",value:"KANSAS"},{label:"Kentucky",value:"KENTUCKY"},{label:"Louisiana",value:"LOUISIANA"},{label:"Maine",value:"MAINE"},{label:"Maryland",value:"MARYLAND"},{label:"Massachusetts",value:"MASSACHUSETTS"},{label:"Michigan",value:"MICHIGAN"},{label:"Minnesota",value:"MINNESOTA"},{label:"Mississippi",value:"MISSISSIPPI"},{label:"Missouri",value:"MISSOURI"},{label:"Montana",value:"MONTANA"},{label:"Nebraska",value:"NEBRASKA"},{label:"Nevada",value:"NEVADA"},{label:"New Hampshire",value:"NEWHAMPSHIRE"},{label:"New Jersey",value:"NEWJERSEY"},{label:"New Mexico",value:"NEWMEXICO"},{label:"New York",value:"NEWYORK"},{label:"North Carolina",value:"NORTHCAROLINA"},{label:"North Dakota",value:"NORTHDAKOTA"},{label:"Ohio",value:"OHIO"},{label:"Oklahoma",value:"OKLAHOMA"},{label:"Oregon",value:"OREGON"},{label:"Pennsylvania",value:"PENNSYLVANIA"},{label:"Rhode Island",value:"RHODEISLAND"},{label:"South Carolina",value:"SOUTHCAROLINA"},{label:"South Dakota",value:"SOUTHDAKOTA"},{label:"Tennessee",value:"TENNESSEE"},{label:"Texas",value:"TEXAS"},{label:"Utah",value:"UTAH"},{label:"Vermont",value:"VERMONT"},{label:"Virgin Islands",value:"VIRGINISLANDS"},{label:"Virginia",value:"VIRGINIA"},{label:"Washington",value:"WASHINGTON"},{label:"West Virginia",value:"WESTVIRGINIA"},{label:"Wisconsin",value:"WISCONSIN"},{label:"Wyoming",value:"WYOMING"},{label:"Americas Forces",value:"AAMILITARY"},{label:"Europe, Middle East, Canada, Africa and Canada Forces",value:"AEMILITARY"},{label:"Pacific Forces",value:"APMILITARY"},{label:"Other",value:"OTHER"}]}};var vatLabels={GB:"VAT",AU:"GST",NZ:"GST",CA:"HST",AT:"VAT",BE:"VAT",BG:"VAT",HR:"VAT",CY:"VAT",CZ:"VAT",DK:"VAT",EE:"VAT",FI:"VAT",FR:"VAT",DE:"VAT",GR:"VAT",HU:"VAT",IE:"VAT",IT:"VAT",LV:"VAT",LT:"VAT",LU:"VAT",MT:"VAT",NL:"VAT",PL:"VAT",PT:"VAT",RO:"VAT",SK:"VAT",SI:"VAT",ES:"VAT",SE:"VAT",IS:"VAT",IN:"GST",IL:"VAT",JP:"CT",MX:"VAT",NO:"VAT",SG:"GST",ZA:"VAT",KR:"VAT",CH:"VAT",TW:"VAT",TH:"VAT",PH:"VAT",MY:"SST",AE:"VAT",TR:"VAT",RU:"VAT"};var style$1={Container:{width:"100%"},InputContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px",padding:"16px",maxWidth:"450px"},ConditionalInputsContainer:{width:"100%",display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"16px"},HR:{border:"var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)",margin:"10px 0"},Input:{maxWidth:"500px"},Checkbox:{"&::part(control)":{borderRadius:"0 !important"}},SearchInput:{padding:"var(--sl-spacing-x-small)"},ErrorInput:{maxWidth:"500px","&::part(base)":{border:"var(--sqm-border-thickness, 1px) solid var(--sqm-danger-color-border)",borderRadius:"var(--sl-input-border-radius-medium)"},"&::part(help-text)":{color:"var(--sqm-danger-color-text)"}}};var sheet=createStyleSheet(style$1);var styleString=sheet.toString();var vanillaStyle="\n :host{\n display: block; \n }\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n sl-menu-item::part(base) {\n color: var(--sqm-input-color);\n }\n\n sl-menu-item::part(base):hover {\n background-color: var(--sqm-input-border-color-hover);\n }\n sl-checkbox[checked]::part(control){\n background-color: var(--sqm-input-border-color-focus);\n }\n\n sl-checkbox[checked]::part(checked-icon){\n color: var(--sqm-input-background);\n }\n ";var OtherRegionSlotView=function(e){var a,l,r;var n=e.states,i=e.states.formState,s=e.callbacks,t=e.text;var o=sheet.classes;var u=function(e){return intl.formatMessage({id:"tax-field-label"+e,defaultMessage:t.indirectTaxNumber},{taxType:e})};var d=function(e){return intl.formatMessage({id:"tax-field-label"+e,defaultMessage:t.error.indirectTaxNumber},{taxType:e})};var b=function(e){var a=e.label,l=e.error,r=e.name;var s;return h("sl-input",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,label:a,disabled:n.loading||n.disabled,value:i[r]},((s=i.errors)===null||s===void 0?void 0:s[r])&&{class:o.ErrorInput,helpText:l},{id:r,name:"/"+r}))};var T=function(){var a,l;return h("div",{class:o.ConditionalInputsContainer},h("sl-select",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,value:i.subRegion,label:t.subRegion,disabled:n.loading||n.disabled},((a=i.errors)===null||a===void 0?void 0:a.indirectTaxNumber)&&{class:o.ErrorInput,helpText:formatErrorMessage(t.subRegion,t.error.fieldRequiredError)},{id:"subRegion",name:"/subRegion"}),e.data.esRegions.map((function(e){return h("sl-menu-item",{value:e.regionCode},e.displayName)}))),h(b,{name:"indirectTaxNumber",label:u("VAT"),error:d("VAT")}),h("sl-checkbox",{class:o.Checkbox,exportparts:"label: input-label, base: input-base",checked:i.hasSubRegionTaxNumber,"onSl-change":s.onSpainToggle,disabled:n.disabled||n.isPartner},t.isRegisteredSubRegionIncomeTax),i.hasSubRegionTaxNumber&&h("sl-input",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,label:t.subRegionTaxNumberLabel,disabled:n.loading||n.disabled,value:i.subRegionTaxNumber},((l=i.errors)===null||l===void 0?void 0:l.subRegionTaxNumber)&&{class:o.ErrorInput,helpText:formatErrorMessage(t.subRegionTaxNumberLabel,t.error.fieldRequiredError)},{id:"subRegionTaxNumber",name:"/subRegionTaxNumber"})))};var A=function(){var a,l;var r=sheet.classes;var o=(a=INDIRECT_TAX_PROVINCES===null||INDIRECT_TAX_PROVINCES===void 0?void 0:INDIRECT_TAX_PROVINCES.find((function(e){return e.regionCode===i.province})))===null||a===void 0?void 0:a.taxType;return h("div",{class:r.ConditionalInputsContainer},h("sl-select",Object.assign({required:true,value:i.province,exportparts:"label: input-label, base: input-base",class:r.Input,label:t.province,disabled:n.loading||n.disabled,"onSl-select":function(e){return s.onFormChange("province",e)}},((l=i.errors)===null||l===void 0?void 0:l.province)&&{class:r.ErrorInput,helpText:formatErrorMessage(t.province,t.error.fieldRequiredError)},{id:"province",name:"/province"}),e.data.provinces.map((function(e){return h("sl-menu-item",{value:e.regionCode},e.displayName)}))),o==="GST"&&h(b,{label:u("GST"),error:d("GST"),name:"indirectTaxNumber"}),o==="HST"&&h(b,{label:u("HST"),error:d("HST"),name:"indirectTaxNumber"}),i.province==="QUEBEC"&&h("div",{class:r.ConditionalInputsContainer},h("sl-checkbox",{class:r.Checkbox,exportparts:"label: input-label, base: input-base","onSl-change":s.onQstToggle,checked:i.hasQst,disabled:n.isPartner||n.disabled},t.isRegisteredQST),i.hasQst&&h(b,{name:"qstNumber",label:t.qstNumber,error:formatErrorMessage(t.qstNumber,t.error.fieldRequiredError)})))};var c=function(e){var a;switch(e){case"CA":return h(A,null);case"ES":return h(T,null);default:return h("sl-input",Object.assign({required:true,exportparts:"label: input-label, base: input-base",class:o.Input,value:i.indirectTaxNumber,label:u(vatLabels[e]||"GENERAL"),disabled:n.loading||n.disabled},((a=i.errors)===null||a===void 0?void 0:a.indirectTaxNumber)&&{class:o.ErrorInput,helpText:d(vatLabels[e]||"GENERAL")},{id:"indirectTaxNumber",name:"/indirectTaxNumber"}))}};var v=c(i.selectedRegion);return h("div",{style:n.hide?{display:"none"}:{}},h("form",{class:o.Container},h("style",{type:"text/css"},styleString,vanillaStyle),h("hr",{class:o.HR}),h("div",{class:o.InputContainer},h("sl-select",Object.assign({required:true,class:o.Input,value:i.selectedRegion,exportparts:"label: input-label, base: input-base",label:t.selectedRegion,disabled:n.loading||n.disabled,"onSl-select":function(e){return s.onFormChange("selectedRegion",e)}},((a=i.errors)===null||a===void 0?void 0:a.selectedRegion)&&{class:o.ErrorInput,helpText:formatErrorMessage(t.selectedRegion,t.error.fieldRequiredError)},{id:"selectedRegion",name:"/selectedRegion"}),h("sl-input",{class:o.SearchInput,placeholder:t.searchForCountryText,onKeyDown:function(e){e.stopPropagation()},"onSl-input":function(e){s.setCountrySearch(e.target.value)}}),(l=e.data.countries)===null||l===void 0?void 0:l.map((function(e){return h("sl-menu-item",{value:e.countryCode},e.displayName)})),(r=e.data.allCountries)===null||r===void 0?void 0:r.map((function(e){return h("sl-menu-item",{value:e.countryCode,style:{display:"none"}},e.displayName)}))),v),h("hr",{class:o.HR})))};export{ADDRESS_REGIONS as A,InvoiceTableView as I,OtherRegionSlotView as O,INDIRECT_TAX_SPAIN_REGIONS as a,INDIRECT_TAX_PROVINCES as b,vatLabels as v};