@saasquatch/mint-components 1.13.5-0 → 1.14.0-0

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 (147) hide show
  1. package/dist/cjs/{ShadowViewAddon-14a02da4.js → AutoColor-3b59126f.js} +1137 -1137
  2. package/dist/cjs/ErrorView-b2fcf954.js +35 -0
  3. package/dist/cjs/IndirectTaxDetailsView-409dae6f.js +646 -0
  4. package/dist/cjs/data-6d96b89c.js +137 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/mint-components.cjs.js +1 -1
  7. package/dist/cjs/parseStates-d1effc19.js +16 -0
  8. package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +209 -1885
  9. package/dist/cjs/sqm-big-stat_41.cjs.entry.js +30 -30
  10. package/dist/cjs/sqm-code-verification.cjs.entry.js +349 -0
  11. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
  12. package/dist/cjs/sqm-stencilbook.cjs.entry.js +12390 -11094
  13. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1221 -0
  14. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +11 -3
  15. package/dist/cjs/sqm-widget-verification.cjs.entry.js +17 -6
  16. package/dist/cjs/utils-8257e7ab.js +105 -0
  17. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +78 -78
  18. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +37 -3
  19. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
  20. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +41 -6
  21. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +12 -8
  22. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  23. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  24. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  25. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  26. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
  27. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  28. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
  29. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  30. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  31. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
  32. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  33. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +75 -41
  34. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  35. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +62 -3
  36. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  37. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -4
  38. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +49 -11
  39. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  40. package/dist/collection/utils/parseStates.js +12 -0
  41. package/dist/esm/{ShadowViewAddon-23a6afab.js → AutoColor-d8d7f31d.js} +1141 -1141
  42. package/dist/esm/ErrorView-48e2b969.js +33 -0
  43. package/dist/esm/IndirectTaxDetailsView-c321099a.js +639 -0
  44. package/dist/esm/data-a05c78ae.js +121 -0
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/esm/mint-components.js +1 -1
  47. package/dist/esm/parseStates-ed75e224.js +14 -0
  48. package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +133 -1802
  49. package/dist/esm/sqm-big-stat_41.entry.js +1 -1
  50. package/dist/esm/sqm-code-verification.entry.js +345 -0
  51. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
  52. package/dist/esm/sqm-stencilbook.entry.js +10501 -9205
  53. package/dist/esm/sqm-tax-and-cash.entry.js +1217 -0
  54. package/dist/esm/sqm-widget-verification-controller.entry.js +12 -4
  55. package/dist/esm/sqm-widget-verification.entry.js +17 -6
  56. package/dist/esm/utils-7c96856c.js +97 -0
  57. package/dist/esm-es5/AutoColor-d8d7f31d.js +1 -0
  58. package/dist/esm-es5/ErrorView-48e2b969.js +1 -0
  59. package/dist/esm-es5/IndirectTaxDetailsView-c321099a.js +1 -0
  60. package/dist/esm-es5/data-a05c78ae.js +1 -0
  61. package/dist/esm-es5/loader.js +1 -1
  62. package/dist/esm-es5/mint-components.js +1 -1
  63. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  64. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
  65. package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
  66. package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
  67. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
  68. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  69. package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
  70. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  71. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  72. package/dist/esm-es5/utils-7c96856c.js +1 -0
  73. package/dist/mint-components/mint-components.esm.js +1 -1
  74. package/dist/mint-components/p-0603a39f.js +1 -0
  75. package/dist/mint-components/p-0a37a288.system.entry.js +1 -0
  76. package/dist/mint-components/p-0b8f6a39.entry.js +11 -0
  77. package/dist/mint-components/p-115dfc03.system.js +1 -0
  78. package/dist/mint-components/p-13f3a647.js +1 -0
  79. package/dist/mint-components/p-1a7453c6.system.js +1 -0
  80. package/dist/mint-components/p-33d79be3.entry.js +93 -0
  81. package/dist/mint-components/p-37996351.system.js +1 -1
  82. package/dist/mint-components/p-3a62a7e2.system.js +1 -0
  83. package/dist/mint-components/p-4a46897f.system.js +1 -0
  84. package/dist/mint-components/p-4d11920f.entry.js +1 -0
  85. package/dist/mint-components/p-5510be1e.system.entry.js +1 -0
  86. package/dist/mint-components/p-6ef506ba.entry.js +16 -0
  87. package/dist/mint-components/{p-33ed6f1c.system.entry.js → p-70adcf4f.system.entry.js} +1 -1
  88. package/dist/mint-components/p-70d3d873.system.entry.js +1 -0
  89. package/dist/mint-components/p-7e0bf3de.system.entry.js +1 -0
  90. package/dist/mint-components/p-83acd617.js +1 -0
  91. package/dist/mint-components/p-84a78d09.entry.js +1 -0
  92. package/dist/mint-components/{p-01010af0.entry.js → p-84ed9923.entry.js} +5 -5
  93. package/dist/mint-components/p-889ec1df.system.entry.js +1 -0
  94. package/dist/mint-components/p-8a784f2a.system.entry.js +1 -0
  95. package/dist/mint-components/p-93e4a3c3.system.js +1 -0
  96. package/dist/mint-components/p-98a48fc4.system.entry.js +1 -0
  97. package/dist/mint-components/p-9acb5038.js +1 -0
  98. package/dist/mint-components/p-a38ca165.entry.js +9 -0
  99. package/dist/mint-components/p-c75a3b4a.js +103 -0
  100. package/dist/mint-components/p-d75c462c.entry.js +1 -0
  101. package/dist/mint-components/p-ea7f379d.js +394 -0
  102. package/dist/mint-components/p-f8175201.system.js +1 -0
  103. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +6 -0
  104. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
  105. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
  106. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -1
  107. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  108. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  109. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
  110. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  111. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +11 -10
  112. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  113. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  114. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +10 -0
  115. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  116. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +7 -0
  117. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  118. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  119. package/dist/types/components.d.ts +96 -89
  120. package/dist/types/global/android.d.ts +7 -0
  121. package/dist/types/global/demo.d.ts +2 -0
  122. package/dist/types/stories/features.d.ts +4 -0
  123. package/dist/types/stories/templates.d.ts +4 -0
  124. package/dist/types/utils/parseStates.d.ts +1 -0
  125. package/docs/docs.docx +0 -0
  126. package/docs/raisins.json +1 -1
  127. package/grapesjs/grapesjs.js +1 -1
  128. package/package.json +2 -1
  129. package/dist/cjs/sqm-invoice-table-view-baded4af.js +0 -2067
  130. package/dist/esm/sqm-invoice-table-view-af69cd33.js +0 -2050
  131. package/dist/esm-es5/ShadowViewAddon-23a6afab.js +0 -1
  132. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
  133. package/dist/esm-es5/sqm-invoice-table-view-af69cd33.js +0 -1
  134. package/dist/mint-components/p-33c96e14.entry.js +0 -16
  135. package/dist/mint-components/p-38b5f028.system.entry.js +0 -1
  136. package/dist/mint-components/p-6427e963.entry.js +0 -1
  137. package/dist/mint-components/p-7e7cbccf.system.js +0 -1
  138. package/dist/mint-components/p-9320582e.system.js +0 -1
  139. package/dist/mint-components/p-962f3200.js +0 -1
  140. package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
  141. package/dist/mint-components/p-b93fd99c.system.entry.js +0 -1
  142. package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
  143. package/dist/mint-components/p-d3d74266.js +0 -394
  144. package/dist/mint-components/p-f29eda2f.entry.js +0 -205
  145. package/dist/mint-components/p-f2cc6a6f.entry.js +0 -9
  146. /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
  147. /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
@@ -1,2050 +0,0 @@
1
- import { h } from './index-91e7729f.js';
2
- import { i as intl } from './global-be1f9992.js';
3
- import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
-
5
- const INDIRECT_TAX_PROVINCES = [
6
- { regionCode: "ALBERTA", taxType: "GST", displayName: "Alberta" },
7
- {
8
- regionCode: "BRITISHCOLUMBIA",
9
- taxType: "HST",
10
- displayName: "British Columbia",
11
- },
12
- { regionCode: "MANITOBA", taxType: "HST", displayName: "Manitoba" },
13
- {
14
- regionCode: "NEWBRUNSWICK",
15
- taxType: "HST",
16
- displayName: "New Brunswick",
17
- },
18
- {
19
- regionCode: "NEWFOUNDLANDLABRADOR",
20
- taxType: "HST",
21
- displayName: "Newfoundland",
22
- },
23
- {
24
- regionCode: "NORTHWESTTERRITORIES",
25
- taxType: "GST",
26
- displayName: "North West Territories",
27
- },
28
- { regionCode: "NOVASCOTIA", taxType: "HST", displayName: "Nova Scotia" },
29
- { regionCode: "NUNAVUT", taxType: "HST", displayName: "Nunavut" },
30
- { regionCode: "ONTARIO", taxType: "HST", displayName: "Ontario" },
31
- {
32
- regionCode: "PRINCEEDWARDISLAND",
33
- taxType: "HST",
34
- displayName: "Prince Edward Island",
35
- },
36
- { regionCode: "QUEBEC", taxType: "GST", displayName: "Quebec" },
37
- { regionCode: "SASKATCHEWAN", taxType: "HST", displayName: "Saskatchewan" },
38
- { regionCode: "YUKON", taxType: "GST", displayName: "Yukon" },
39
- ];
40
- const INDIRECT_TAX_SPAIN_REGIONS = [
41
- { regionCode: "SPAINPROPER", taxType: "VAT", displayName: "Spain Proper" },
42
- {
43
- regionCode: "CANARYISLANDS",
44
- taxType: "VAT",
45
- displayName: "Canary Islands",
46
- },
47
- ];
48
- const ADDRESS_REGIONS = {
49
- CA: {
50
- labelEnum: "PROVINCE",
51
- regions: [
52
- {
53
- label: "Alberta",
54
- value: "ALBERTA",
55
- },
56
- {
57
- label: "British Columbia",
58
- value: "BRITISHCOLUMBIA",
59
- },
60
- {
61
- label: "Manitoba",
62
- value: "MANITOBA",
63
- },
64
- {
65
- label: "New Brunswick",
66
- value: "NEWBRUNSWICK",
67
- },
68
- {
69
- label: "Newfoundland & Labrador",
70
- value: "NEWFOUNDLANDANDLABRADOR",
71
- },
72
- {
73
- label: "Northwest Territories",
74
- value: "NORTHWESTTERRITORIES",
75
- },
76
- {
77
- label: "Nova Scotia",
78
- value: "NOVASCOTIA",
79
- },
80
- {
81
- label: "Nunavut",
82
- value: "NUNAVUT",
83
- },
84
- {
85
- label: "Ontario",
86
- value: "ONTARIO",
87
- },
88
- {
89
- label: "Prince Edward Island",
90
- value: "PRINCEEDWARDISLAND",
91
- },
92
- {
93
- label: "Quebec",
94
- value: "QUEBEC",
95
- },
96
- {
97
- label: "Saskatchewan",
98
- value: "SASKATCHEWAN",
99
- },
100
- {
101
- label: "Yukon",
102
- value: "YUKON",
103
- },
104
- ],
105
- },
106
- ES: {
107
- labelEnum: "REGION",
108
- regions: [
109
- {
110
- label: "Canary Islands",
111
- value: "CANARYISLANDS",
112
- },
113
- {
114
- label: "Spain Proper",
115
- value: "SPAINPROPER",
116
- },
117
- ],
118
- },
119
- AU: {
120
- labelEnum: "STATE",
121
- regions: [
122
- {
123
- label: "Australian Capital Territory",
124
- value: "CAPITALTERRITORY",
125
- },
126
- {
127
- label: "New South Wales",
128
- value: "NEWSOUTHWALES",
129
- },
130
- {
131
- label: "Northern Territory",
132
- value: "NORTHERNTERRITORY",
133
- },
134
- {
135
- label: "Queensland",
136
- value: "QUEENSLAND",
137
- },
138
- {
139
- label: "South Australia",
140
- value: "SOUTHAUSTRALIA",
141
- },
142
- {
143
- label: "Tasmania",
144
- value: "TASMANIA",
145
- },
146
- {
147
- label: "Victoria",
148
- value: "VICTORIA",
149
- },
150
- {
151
- label: "Western Australia",
152
- value: "WESTERNAUSTRALIA",
153
- },
154
- ],
155
- },
156
- US: {
157
- labelEnum: "STATE",
158
- regions: [
159
- {
160
- label: "Alabama",
161
- value: "ALABAMA",
162
- },
163
- {
164
- label: "Alaska",
165
- value: "ALASKA",
166
- },
167
- {
168
- label: "Arizona",
169
- value: "ARIZONA",
170
- },
171
- {
172
- label: "Arkansas",
173
- value: "ARKANSAS",
174
- },
175
- {
176
- label: "California",
177
- value: "CALIFORNIA",
178
- },
179
- {
180
- label: "Colorado",
181
- value: "COLORADO",
182
- },
183
- {
184
- label: "Connecticut",
185
- value: "CONNECTICUT",
186
- },
187
- {
188
- label: "Delaware",
189
- value: "DELAWARE",
190
- },
191
- {
192
- label: "District of Columbia",
193
- value: "DISTRICTOFCOLUMBIA",
194
- },
195
- {
196
- label: "Florida",
197
- value: "FLORIDA",
198
- },
199
- {
200
- label: "Georgia",
201
- value: "GEORGIA",
202
- },
203
- {
204
- label: "Hawaii",
205
- value: "HAWAII",
206
- },
207
- {
208
- label: "Idaho",
209
- value: "IDAHO",
210
- },
211
- {
212
- label: "Illinois",
213
- value: "ILLINOIS",
214
- },
215
- {
216
- label: "Indiana",
217
- value: "INDIANA",
218
- },
219
- {
220
- label: "Iowa",
221
- value: "IOWA",
222
- },
223
- {
224
- label: "Kansas",
225
- value: "KANSAS",
226
- },
227
- {
228
- label: "Kentucky",
229
- value: "KENTUCKY",
230
- },
231
- {
232
- label: "Louisiana",
233
- value: "LOUISIANA",
234
- },
235
- {
236
- label: "Maine",
237
- value: "MAINE",
238
- },
239
- {
240
- label: "Maryland",
241
- value: "MARYLAND",
242
- },
243
- {
244
- label: "Massachusetts",
245
- value: "MASSACHUSETTS",
246
- },
247
- {
248
- label: "Michigan",
249
- value: "MICHIGAN",
250
- },
251
- {
252
- label: "Minnesota",
253
- value: "MINNESOTA",
254
- },
255
- {
256
- label: "Mississippi",
257
- value: "MISSISSIPPI",
258
- },
259
- {
260
- label: "Missouri",
261
- value: "MISSOURI",
262
- },
263
- {
264
- label: "Montana",
265
- value: "MONTANA",
266
- },
267
- {
268
- label: "Nebraska",
269
- value: "NEBRASKA",
270
- },
271
- {
272
- label: "Nevada",
273
- value: "NEVADA",
274
- },
275
- {
276
- label: "New Hampshire",
277
- value: "NEWHAMPSHIRE",
278
- },
279
- {
280
- label: "New Jersey",
281
- value: "NEWJERSEY",
282
- },
283
- {
284
- label: "New Mexico",
285
- value: "NEWMEXICO",
286
- },
287
- {
288
- label: "New York",
289
- value: "NEWYORK",
290
- },
291
- {
292
- label: "North Carolina",
293
- value: "NORTHCAROLINA",
294
- },
295
- {
296
- label: "North Dakota",
297
- value: "NORTHDAKOTA",
298
- },
299
- {
300
- label: "Ohio",
301
- value: "OHIO",
302
- },
303
- {
304
- label: "Oklahoma",
305
- value: "OKLAHOMA",
306
- },
307
- {
308
- label: "Oregon",
309
- value: "OREGON",
310
- },
311
- {
312
- label: "Pennsylvania",
313
- value: "PENNSYLVANIA",
314
- },
315
- {
316
- label: "Rhode Island",
317
- value: "RHODEISLAND",
318
- },
319
- {
320
- label: "South Carolina",
321
- value: "SOUTHCAROLINA",
322
- },
323
- {
324
- label: "South Dakota",
325
- value: "SOUTHDAKOTA",
326
- },
327
- {
328
- label: "Tennessee",
329
- value: "TENNESSEE",
330
- },
331
- {
332
- label: "Texas",
333
- value: "TEXAS",
334
- },
335
- {
336
- label: "Utah",
337
- value: "UTAH",
338
- },
339
- {
340
- label: "Vermont",
341
- value: "VERMONT",
342
- },
343
- {
344
- label: "Virgin Islands",
345
- value: "VIRGINISLANDS",
346
- },
347
- {
348
- label: "Virginia",
349
- value: "VIRGINIA",
350
- },
351
- {
352
- label: "Washington",
353
- value: "WASHINGTON",
354
- },
355
- {
356
- label: "West Virginia",
357
- value: "WESTVIRGINIA",
358
- },
359
- {
360
- label: "Wisconsin",
361
- value: "WISCONSIN",
362
- },
363
- {
364
- label: "Wyoming",
365
- value: "WYOMING",
366
- },
367
- {
368
- label: "Americas Forces",
369
- value: "AAMILITARY",
370
- },
371
- {
372
- label: "Europe, Middle East, Canada, Africa and Canada Forces",
373
- value: "AEMILITARY",
374
- },
375
- {
376
- label: "Pacific Forces",
377
- value: "APMILITARY",
378
- },
379
- {
380
- label: "Other",
381
- value: "OTHER",
382
- },
383
- ],
384
- },
385
- };
386
-
387
- const style = {
388
- Container: {
389
- display: "flex",
390
- flexDirection: "column",
391
- gap: "24px",
392
- },
393
- HeaderContainer: {
394
- display: "flex",
395
- flexDirection: "column",
396
- gap: "10px",
397
- },
398
- TitleSkeleton: {
399
- width: "45%",
400
- height: "40px !important",
401
- },
402
- StepSkeleton: {
403
- width: "15%",
404
- },
405
- HeaderSkeleton: {
406
- width: "25%",
407
- height: "30px !important",
408
- },
409
- InputSkeleton: {
410
- width: "75%",
411
- },
412
- ButtonSkeleton: {
413
- width: "80px",
414
- height: "30px !important",
415
- },
416
- };
417
- const sheet = createStyleSheet(style);
418
- const styleString = sheet.toString();
419
- const LoadingView = () => {
420
- return (h("div", { class: sheet.classes.Container },
421
- h("style", { type: "text/css" }, styleString),
422
- h("sl-skeleton", { class: sheet.classes.TitleSkeleton }),
423
- h("div", { class: sheet.classes.HeaderContainer },
424
- h("sl-skeleton", { class: sheet.classes.StepSkeleton }),
425
- h("sl-skeleton", { class: sheet.classes.HeaderSkeleton })),
426
- h("sl-skeleton", { class: sheet.classes.InputSkeleton }),
427
- h("sl-skeleton", { class: sheet.classes.InputSkeleton }),
428
- h("sl-skeleton", { class: sheet.classes.InputSkeleton }),
429
- h("sl-skeleton", { class: sheet.classes.InputSkeleton }),
430
- h("sl-skeleton", { class: sheet.classes.InputSkeleton }),
431
- h("sl-skeleton", { class: sheet.classes.StepSkeleton }),
432
- h("sl-skeleton", { class: sheet.classes.ButtonSkeleton })));
433
- };
434
-
435
- function validTaxDocument(requiredType) {
436
- const validTypes = ["W9", "W8BENE", "W8BEN"];
437
- if (validTypes.includes(requiredType))
438
- return true;
439
- return false;
440
- }
441
- const objectIsFull = (obj) => {
442
- return !Object.keys(obj).find((k) => obj[k] == undefined);
443
- };
444
- const taxTypeToName = (taxType) => {
445
- switch (taxType) {
446
- case "W9":
447
- return "W-9";
448
- case "W8BEN":
449
- case "W8BENE":
450
- return "W-8";
451
- default:
452
- return "";
453
- }
454
- };
455
- function validateBillingField(regex, value) {
456
- const trimmed = value.trim();
457
- const idx = trimmed.search(regex);
458
- return idx > -1;
459
- }
460
- const formatErrorMessage = (fieldName, errorMessage) => {
461
- return intl.formatMessage({
462
- id: fieldName,
463
- defaultMessage: errorMessage,
464
- }, {
465
- fieldName,
466
- });
467
- };
468
- function getCountryObj({ countryCode, locale, }) {
469
- // @ts-ignore DisplayNames not in Intl type
470
- const displayName = new Intl.DisplayNames([locale], {
471
- type: "region",
472
- }).of(countryCode);
473
- return {
474
- countryCode,
475
- displayName,
476
- };
477
- }
478
-
479
- const styles = {
480
- Alert: {
481
- "&::part(base)": {
482
- backgroundColor: "var(--sl-color-danger-100)",
483
- border: "1px solid var(--sl-color-danger-200)",
484
- padding: "0 16px",
485
- },
486
- "& sl-icon": {
487
- margin: 0,
488
- },
489
- "& sl-icon::part(base)": {
490
- color: "var(--sl-color-danger-500)",
491
- margin: 0,
492
- },
493
- },
494
- };
495
- const ErrorView = (props) => {
496
- const sheet = createStyleSheet(styles);
497
- const styleString = sheet.toString();
498
- const { classes } = sheet;
499
- return (h("div", null,
500
- h("style", null, styleString),
501
- h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: classes.Alert },
502
- h("sl-icon", { slot: "icon", name: "exclamation-octagon", class: "Error" }),
503
- h("strong", null, props.loadingErrorAlertHeader),
504
- h("br", null),
505
- props.loadingErrorAlertDescription)));
506
- };
507
-
508
- const TaxForm_stories = {
509
- title: "Components/Tax Form",
510
- };
511
- const stepOneProps = {
512
- states: {
513
- step: "1",
514
- hideSteps: false,
515
- hideState: false,
516
- loading: false,
517
- disabled: false,
518
- isPartner: false,
519
- isUser: false,
520
- loadingError: false,
521
- formState: {
522
- firstName: "Bob",
523
- lastName: "Testerson",
524
- email: "bobtesterson@example.com",
525
- phoneNumberCountryCode: "US",
526
- phoneNumber: "555 555 5555",
527
- countryCode: "US",
528
- currency: "CAD",
529
- address: "2/1337 Johnson Street",
530
- city: "Vancouver",
531
- state: "BC",
532
- postalCode: "555 555",
533
- errors: {},
534
- },
535
- },
536
- data: {
537
- regionLabelEnum: "STATE",
538
- regions: [],
539
- phoneCountries: [
540
- {
541
- countryCode: "CA",
542
- displayName: "Canada",
543
- },
544
- ],
545
- countries: [
546
- {
547
- countryCode: "CA",
548
- displayName: "Canada",
549
- },
550
- {
551
- countryCode: "ES",
552
- displayName: "Spain",
553
- },
554
- {
555
- countryCode: "UK",
556
- displayName: "United Kingdom",
557
- },
558
- {
559
- countryCode: "US",
560
- displayName: "United States",
561
- },
562
- {
563
- countryCode: "AR",
564
- displayName: "Argentina",
565
- },
566
- {
567
- countryCode: "AU",
568
- displayName: "Australia",
569
- },
570
- {
571
- countryCode: "ZW",
572
- displayName: "Zimbabwe",
573
- },
574
- ],
575
- currencies: [
576
- {
577
- currencyCode: "CAD",
578
- displayName: "CAD",
579
- },
580
- {
581
- currencyCode: "GBP",
582
- displayName: "GBP",
583
- },
584
- {
585
- currencyCode: "USD",
586
- displayName: "USD",
587
- },
588
- ],
589
- allCountries: [
590
- {
591
- countryCode: "CA",
592
- displayName: "Canada",
593
- },
594
- {
595
- countryCode: "ES",
596
- displayName: "Spain",
597
- },
598
- {
599
- countryCode: "UK",
600
- displayName: "United Kingdom",
601
- },
602
- {
603
- countryCode: "US",
604
- displayName: "United States",
605
- },
606
- ],
607
- allCurrencies: [
608
- {
609
- currencyCode: "CAD",
610
- displayName: "CAD",
611
- },
612
- {
613
- currencyCode: "GBP",
614
- displayName: "GBP",
615
- },
616
- {
617
- currencyCode: "USD",
618
- displayName: "USD",
619
- },
620
- ],
621
- },
622
- refs: {
623
- formRef: { current: null },
624
- currencyRef: { current: null },
625
- phoneCountryRef: { current: null },
626
- },
627
- };
628
- const stepTwoProps = {
629
- states: {
630
- step: "2",
631
- hideSteps: false,
632
- disabled: false,
633
- loading: false,
634
- isPartner: false,
635
- loadingError: false,
636
- formState: {
637
- checked: undefined,
638
- errors: {},
639
- },
640
- },
641
- callbacks: {
642
- onSubmit: async () => console.log("Submit"),
643
- onChange: () => console.log("Submit"),
644
- onBack: () => console.log("Submit"),
645
- onFormChange: (field, e) => console.log(field, e),
646
- onQstToggle: () => { },
647
- onSpainToggle: () => { },
648
- setCountrySearch: (c) => console.log(c),
649
- },
650
- data: {
651
- esRegions: INDIRECT_TAX_SPAIN_REGIONS,
652
- countries: [
653
- {
654
- countryCode: "CA",
655
- displayName: "Canada",
656
- },
657
- {
658
- countryCode: "ES",
659
- displayName: "Spain",
660
- },
661
- {
662
- countryCode: "UK",
663
- displayName: "United Kingdom",
664
- },
665
- {
666
- countryCode: "US",
667
- displayName: "United States",
668
- },
669
- ],
670
- allCountries: [
671
- {
672
- countryCode: "CA",
673
- displayName: "Canada",
674
- },
675
- {
676
- countryCode: "ES",
677
- displayName: "Spain",
678
- },
679
- {
680
- countryCode: "UK",
681
- displayName: "United Kingdom",
682
- },
683
- {
684
- countryCode: "US",
685
- displayName: "United States",
686
- },
687
- ],
688
- provinces: INDIRECT_TAX_PROVINCES,
689
- },
690
- slotProps: {
691
- formState: {
692
- errors: {},
693
- },
694
- },
695
- refs: { formRef: { current: null } },
696
- };
697
- const stepFourProps = {
698
- states: {
699
- showVerification: false,
700
- step: "4",
701
- hideSteps: false,
702
- disabled: false,
703
- loading: false,
704
- hasPayPal: false,
705
- isPartner: false,
706
- hideBackButton: false,
707
- saveDisabled: false,
708
- thresholds: [],
709
- loadingError: false,
710
- email: "test@example.com",
711
- formState: {
712
- paymentMethodChecked: "toBankAccount",
713
- },
714
- },
715
- callbacks: {
716
- onVerificationHide: () => { },
717
- onVerification: () => { },
718
- onSubmit: async () => console.log("Submit"),
719
- setPaymentMethodChecked: () => { },
720
- setPaymentScheduleChecked: () => { },
721
- onBack: async () => console.log("back"),
722
- setCountrySearch: () => { },
723
- },
724
- refs: { formRef: { current: null } },
725
- };
726
- const docusignFormProps = {
727
- states: {
728
- showExitButton: true,
729
- step: "3",
730
- urlLoading: false,
731
- docusignStatus: undefined,
732
- hideSteps: false,
733
- documentType: "W9",
734
- documentTypeString: "W9",
735
- loading: false,
736
- disabled: false,
737
- participantTypeDisabled: false,
738
- loadingError: false,
739
- formState: {
740
- participantType: "individualParticipant",
741
- errors: {},
742
- taxFormExpired: false,
743
- },
744
- },
745
- callbacks: {
746
- onExit: () => { },
747
- completeDocument: async () => { },
748
- setParticipantType: (p) => console.log({ p }),
749
- setDocusignStatus: (status) => console.log(status),
750
- },
751
- };
752
- const dashboardProps = {
753
- states: {
754
- veriffLoading: false,
755
- payoutStatus: "DONE",
756
- canEditPayoutInfo: true,
757
- disabled: false,
758
- status: "ACTIVE",
759
- documentType: "W9",
760
- documentTypeString: taxTypeToName("W9"),
761
- dateSubmitted: "Jan 18th, 2025",
762
- noFormNeeded: false,
763
- country: "United Kingdom",
764
- indirectTaxNumber: "123456",
765
- indirectTaxType: "VAT",
766
- showNewFormDialog: false,
767
- hasHold: false,
768
- },
769
- slots: {
770
- payoutDetailsCardSlot: (h("sqm-payout-details-card", { demoData: {
771
- states: {
772
- badgeStatus: "nextPayout",
773
- },
774
- } })),
775
- },
776
- };
777
- const GeneralLoadingView = () => {
778
- return h(LoadingView, null);
779
- };
780
- const GeneralErrorView = () => {
781
- return (h(ErrorView, { loadingErrorAlertHeader: "There was a problem loading your form", loadingErrorAlertDescription: "Please refresh the page and try again. If this problem continues, contact our support team." }));
782
- };
783
- // STEP ONE
784
- const StepOne = () => {
785
- return h("sqm-user-info-form", { demoData: stepOneProps });
786
- };
787
- const StepOneLoading = () => {
788
- return (h("sqm-user-info-form", { demoData: {
789
- states: { ...stepOneProps.states, loading: true },
790
- } }));
791
- };
792
- const StepOneDisabled = () => {
793
- return (h("sqm-user-info-form", { demoData: {
794
- states: { ...stepOneProps.states, disabled: true },
795
- } }));
796
- };
797
- const StepOneIsUser = () => {
798
- return (h("sqm-user-info-form", { demoData: {
799
- states: { ...stepOneProps.states, isUser: true },
800
- } }));
801
- };
802
- const StepOneIsPartner = () => {
803
- return (h("sqm-user-info-form", { demoData: {
804
- states: { ...stepOneProps.states, disabled: true, isPartner: true },
805
- } }));
806
- };
807
- const StepOneWithErrors = () => {
808
- return (h("sqm-user-info-form", { demoData: {
809
- states: {
810
- ...stepOneProps.states,
811
- formState: {
812
- ...stepOneProps.states.formState,
813
- errors: {
814
- firstName: true,
815
- lastName: true,
816
- email: true,
817
- countryCode: true,
818
- currency: true,
819
- participantType: true,
820
- allowBankingCollection: true,
821
- },
822
- },
823
- },
824
- } }));
825
- };
826
- const StepOneWithGeneralError = () => {
827
- return (h("sqm-user-info-form", { demoData: {
828
- states: {
829
- ...stepOneProps.states,
830
- formState: {
831
- ...stepOneProps.states.formState,
832
- errors: {
833
- general: true,
834
- },
835
- },
836
- },
837
- } }));
838
- };
839
- const StepOneWithLoadingError = () => {
840
- return (h("sqm-user-info-form", { demoData: {
841
- states: {
842
- ...stepOneProps.states,
843
- loadingError: true,
844
- loading: true,
845
- formState: {
846
- ...stepOneProps.states.formState,
847
- },
848
- },
849
- } }));
850
- };
851
- // STEP TWO
852
- const StepTwoLoading = () => {
853
- return (h("sqm-indirect-tax-form", { demoData: {
854
- states: {
855
- ...stepTwoProps.states,
856
- loading: true,
857
- },
858
- } }));
859
- };
860
- const StepTwoLoadingError = () => {
861
- return (h("sqm-indirect-tax-form", { demoData: {
862
- states: {
863
- ...stepTwoProps.states,
864
- loading: true,
865
- loadingError: true,
866
- },
867
- } }));
868
- };
869
- const StepTwoDisabled = () => {
870
- return (h("sqm-indirect-tax-form", { demoData: {
871
- states: {
872
- ...stepTwoProps.states,
873
- disabled: true,
874
- },
875
- } }));
876
- };
877
- const StepTwoIsPartner = () => {
878
- return (h("sqm-indirect-tax-form", { demoData: {
879
- states: {
880
- ...stepTwoProps.states,
881
- isPartner: true,
882
- },
883
- } }));
884
- };
885
- const StepTwoWithGeneralError = () => {
886
- return (h("sqm-indirect-tax-form", { demoData: {
887
- states: {
888
- ...stepTwoProps.states,
889
- formState: {
890
- ...stepTwoProps.states.formState,
891
- errors: {
892
- general: true,
893
- },
894
- },
895
- },
896
- } }));
897
- };
898
- const StepTwoOtherRegionChecked = () => {
899
- return (h("sqm-indirect-tax-form", { demoData: {
900
- states: {
901
- ...stepTwoProps.states,
902
- formState: {
903
- ...stepTwoProps.states.formState,
904
- checked: "otherRegion",
905
- },
906
- },
907
- slotProps: {
908
- formState: {
909
- selectedRegion: "UK",
910
- indirectTaxNumber: "123456",
911
- errors: {},
912
- },
913
- },
914
- } }));
915
- };
916
- const StepTwoOtherRegionCheckedCanada = () => {
917
- return (h("sqm-indirect-tax-form", { demoData: {
918
- states: {
919
- ...stepTwoProps.states,
920
- formState: {
921
- ...stepTwoProps.states.formState,
922
- checked: "otherRegion",
923
- },
924
- },
925
- slotProps: {
926
- formState: {
927
- selectedRegion: "CA",
928
- province: "BRITISHCOLUMBIA",
929
- indirectTaxNumber: "123456",
930
- errors: {},
931
- },
932
- },
933
- } }));
934
- };
935
- const StepTwoOtherRegionCheckedCanadaGST = () => {
936
- return (h("sqm-indirect-tax-form", { demoData: {
937
- states: {
938
- ...stepTwoProps.states,
939
- formState: {
940
- ...stepTwoProps.states.formState,
941
- checked: "otherRegion",
942
- },
943
- },
944
- slotProps: {
945
- formState: {
946
- selectedRegion: "CA",
947
- province: "QUEBEC",
948
- indirectTaxNumber: "123456",
949
- errors: {},
950
- },
951
- },
952
- } }));
953
- };
954
- const StepTwoOtherRegionCheckedCanadaGSTAndQST = () => {
955
- return (h("sqm-indirect-tax-form", { demoData: {
956
- states: {
957
- ...stepTwoProps.states,
958
- formState: {
959
- ...stepTwoProps.states.formState,
960
- checked: "otherRegion",
961
- },
962
- },
963
- slotProps: {
964
- formState: {
965
- selectedRegion: "CA",
966
- province: "QUEBEC",
967
- qstNumber: "654321",
968
- hasQst: true,
969
- errors: {},
970
- },
971
- },
972
- } }));
973
- };
974
- const StepTwoOtherRegionCheckedOtherCountrySubRegion = () => {
975
- return (h("sqm-indirect-tax-form", { demoData: {
976
- states: {
977
- ...stepTwoProps.states,
978
- formState: {
979
- ...stepTwoProps.states.formState,
980
- checked: "otherRegion",
981
- },
982
- },
983
- slotProps: {
984
- formState: {
985
- selectedRegion: "ES",
986
- subRegion: "CANARYISLANDS",
987
- errors: {},
988
- },
989
- },
990
- } }));
991
- };
992
- const StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax = () => {
993
- return (h("sqm-indirect-tax-form", { demoData: {
994
- states: {
995
- ...stepTwoProps.states,
996
- formState: {
997
- ...stepTwoProps.states.formState,
998
- checked: "otherRegion",
999
- },
1000
- },
1001
- slotProps: {
1002
- formState: {
1003
- selectedRegion: "ES",
1004
- subRegion: "CANARYISLANDS",
1005
- hasSubRegionTaxNumber: true,
1006
- subRegionTaxNumber: "654321",
1007
- errors: {},
1008
- },
1009
- },
1010
- } }));
1011
- };
1012
- const StepTwoOtherRegionCheckedWithInputErrors = () => {
1013
- return (h("sqm-indirect-tax-form", { demoData: {
1014
- states: {
1015
- ...stepTwoProps.states,
1016
- formState: {
1017
- checked: "otherRegion",
1018
- errors: {},
1019
- },
1020
- },
1021
- slotProps: {
1022
- formState: {
1023
- province: "",
1024
- selectedRegion: "GB",
1025
- errors: {
1026
- selectedRegion: true,
1027
- indirectTaxNumber: true,
1028
- },
1029
- },
1030
- },
1031
- } }));
1032
- };
1033
- const StepTwoOtherRegionCheckedCanadaWithProvinceError = () => {
1034
- return (h("sqm-indirect-tax-form", { demoData: {
1035
- states: {
1036
- ...stepTwoProps.states,
1037
- formState: {
1038
- ...stepTwoProps.states.formState,
1039
- checked: "otherRegion",
1040
- },
1041
- },
1042
- slotProps: {
1043
- formState: {
1044
- selectedRegion: "CA",
1045
- province: "BC",
1046
- errors: {
1047
- province: true,
1048
- indirectTaxNumber: true,
1049
- },
1050
- },
1051
- },
1052
- } }));
1053
- };
1054
- const StepTwoOtherRegionCheckedCanadaGSTAndQSTError = () => {
1055
- return (h("sqm-indirect-tax-form", { demoData: {
1056
- states: {
1057
- ...stepTwoProps.states,
1058
- formState: {
1059
- ...stepTwoProps.states.formState,
1060
- checked: "otherRegion",
1061
- },
1062
- },
1063
- slotProps: {
1064
- formState: {
1065
- selectedRegion: "CA",
1066
- province: "QUEBEC",
1067
- hasQst: true,
1068
- errors: {
1069
- province: true,
1070
- indirectTaxNumber: true,
1071
- qstNumber: true,
1072
- },
1073
- },
1074
- },
1075
- } }));
1076
- };
1077
- const StepTwoOtherRegionCheckedOtherCountrySubRegionErrors = () => {
1078
- return (h("sqm-indirect-tax-form", { demoData: {
1079
- states: {
1080
- ...stepTwoProps.states,
1081
- formState: {
1082
- ...stepTwoProps.states.formState,
1083
- checked: "otherRegion",
1084
- },
1085
- },
1086
- slotProps: {
1087
- formState: {
1088
- selectedRegion: "ES",
1089
- hasSubRegionTaxNumber: true,
1090
- errors: {
1091
- indirectTaxNumber: true,
1092
- subRegionTaxNumberError: true,
1093
- subRegion: true,
1094
- },
1095
- },
1096
- },
1097
- } }));
1098
- };
1099
- const StepTwoNotRegisteredChecked = () => {
1100
- return (h("sqm-indirect-tax-form", { demoData: {
1101
- states: {
1102
- ...stepTwoProps.states,
1103
- formState: {
1104
- ...stepTwoProps.states.formState,
1105
- checked: "notRegistered",
1106
- },
1107
- },
1108
- } }));
1109
- };
1110
- // STEP THREE
1111
- const StepThreeWithDocusign = () => {
1112
- return (h("sqm-docusign-form", { demoData: {
1113
- states: {
1114
- documentType: "W9",
1115
- documentTypeString: taxTypeToName("W9"),
1116
- ...docusignFormProps.states,
1117
- },
1118
- } }));
1119
- };
1120
- const StepThreeWithDocusignW8BEN = () => {
1121
- return (h("sqm-docusign-form", { demoData: {
1122
- states: {
1123
- ...docusignFormProps.states,
1124
- documentType: "W8BEN",
1125
- documentTypeString: taxTypeToName("W8BEN"),
1126
- },
1127
- } }));
1128
- };
1129
- const StepThreeWithDocusignW8BENE = () => {
1130
- return (h("sqm-docusign-form", { demoData: {
1131
- states: {
1132
- ...docusignFormProps.states,
1133
- documentType: "W8BENE",
1134
- documentTypeString: taxTypeToName("W8BENE"),
1135
- formState: {
1136
- taxFormExpired: false,
1137
- participantType: "businessEntity",
1138
- errors: {
1139
- participantType: "",
1140
- general: false,
1141
- },
1142
- },
1143
- },
1144
- } }));
1145
- };
1146
- const StepThreeWithDocusignExpired = () => {
1147
- return (h("sqm-docusign-form", { demoData: {
1148
- states: {
1149
- ...docusignFormProps.states,
1150
- docusignStatus: "ttl_expired",
1151
- formState: {
1152
- participantType: "individualParticipant",
1153
- taxFormExpired: true,
1154
- errors: {},
1155
- },
1156
- },
1157
- } }));
1158
- };
1159
- const StepThreeWithDocusignCompleted = () => {
1160
- return (h("sqm-docusign-form", { demoData: {
1161
- states: {
1162
- ...docusignFormProps.states,
1163
- docusignStatus: "signing_complete",
1164
- formState: {
1165
- participantType: "individualParticipant",
1166
- taxFormExpired: false,
1167
- errors: {},
1168
- },
1169
- },
1170
- } }));
1171
- };
1172
- const StepThreeDocusignWithError = () => {
1173
- return (h("sqm-docusign-form", { demoData: {
1174
- states: {
1175
- ...docusignFormProps.states,
1176
- docusignStatus: "exception",
1177
- formState: {
1178
- ...docusignFormProps.states.formState,
1179
- errors: {
1180
- formSubmission: true,
1181
- },
1182
- },
1183
- },
1184
- } }));
1185
- };
1186
- const StepThreeDocusignWithGeneralError = () => {
1187
- return (h("sqm-docusign-form", { demoData: {
1188
- states: {
1189
- ...docusignFormProps.states,
1190
- formState: {
1191
- ...docusignFormProps.states.formState,
1192
- errors: {
1193
- general: true,
1194
- },
1195
- },
1196
- },
1197
- } }));
1198
- };
1199
- const StepThreeDocusignWithLoadingError = () => {
1200
- return (h("sqm-docusign-form", { demoData: {
1201
- states: {
1202
- ...docusignFormProps.states,
1203
- loadingError: true,
1204
- formState: {
1205
- ...docusignFormProps.states.formState,
1206
- },
1207
- },
1208
- } }));
1209
- };
1210
- const StepThreeDocusignLoading = () => {
1211
- return (h("sqm-docusign-form", { demoData: {
1212
- states: {
1213
- ...docusignFormProps.states,
1214
- loading: true,
1215
- },
1216
- } }));
1217
- };
1218
- const StepThreeDocusignDisabled = () => {
1219
- return (h("sqm-docusign-form", { demoData: {
1220
- states: {
1221
- ...docusignFormProps.states,
1222
- disabled: true,
1223
- },
1224
- } }));
1225
- };
1226
- // STEP 4
1227
- const StepFourDefault = () => {
1228
- return h("sqm-banking-info-form", null);
1229
- };
1230
- const StepFourIsPartner = () => {
1231
- return (h("sqm-banking-info-form", { demoData: {
1232
- ...stepFourProps,
1233
- states: {
1234
- ...stepFourProps.states,
1235
- isPartner: true,
1236
- formState: {
1237
- ...stepFourProps.states.formState,
1238
- },
1239
- },
1240
- } }));
1241
- };
1242
- const StepFourDirectToBankChecked = () => {
1243
- return (h("sqm-banking-info-form", { demoData: {
1244
- ...stepFourProps,
1245
- states: {
1246
- ...stepFourProps.states,
1247
- formState: {
1248
- ...stepFourProps.states.formState,
1249
- },
1250
- },
1251
- } }));
1252
- };
1253
- const StepFourToPaypalChecked = () => {
1254
- return (h("sqm-banking-info-form", { demoData: {
1255
- ...stepFourProps,
1256
- states: {
1257
- ...stepFourProps.states,
1258
- formState: {
1259
- ...stepFourProps.states.formState,
1260
- paymentMethodChecked: "toPayPalAccount",
1261
- },
1262
- },
1263
- } }));
1264
- };
1265
- const StepFourReVerifyEmail = () => {
1266
- return (h("sqm-banking-info-form", { demoData: {
1267
- ...stepFourProps,
1268
- states: {
1269
- ...stepFourProps.states,
1270
- showVerification: true,
1271
- isPartner: true,
1272
- formState: {
1273
- ...stepFourProps.states.formState,
1274
- paymentMethodChecked: "toPayPalAccount",
1275
- },
1276
- },
1277
- } }));
1278
- };
1279
- const TaxAndCashDashboardActiveW9Form = () => {
1280
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1281
- ...dashboardProps,
1282
- } }));
1283
- };
1284
- const TaxAndCashDashboardActiveW8BENForm = () => {
1285
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1286
- ...dashboardProps,
1287
- states: {
1288
- payoutStatus: "DONE",
1289
- veriffLoading: false,
1290
- noFormNeeded: false,
1291
- canEditPayoutInfo: true,
1292
- documentType: "W8BEN",
1293
- documentTypeString: taxTypeToName("W8BEN"),
1294
- country: "United Kingdom",
1295
- indirectTaxType: "VAT",
1296
- indirectTaxNumber: "123456",
1297
- showNewFormDialog: false,
1298
- hasHold: false,
1299
- },
1300
- } }));
1301
- };
1302
- const TaxAndCashDashboardActiveW8BENEForm = () => {
1303
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1304
- ...dashboardProps,
1305
- states: {
1306
- payoutStatus: "DONE",
1307
- veriffLoading: false,
1308
- noFormNeeded: false,
1309
- canEditPayoutInfo: true,
1310
- documentType: "W8BENE",
1311
- documentTypeString: taxTypeToName("W8BENE"),
1312
- country: "United Kingdom",
1313
- indirectTaxType: "VAT",
1314
- indirectTaxNumber: "123456",
1315
- showNewFormDialog: false,
1316
- hasHold: false,
1317
- },
1318
- } }));
1319
- };
1320
- const TaxAndCashDashboardNotActiveW9Form = () => {
1321
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1322
- ...dashboardProps,
1323
- states: {
1324
- payoutStatus: "DONE",
1325
- veriffLoading: false,
1326
- noFormNeeded: false,
1327
- canEditPayoutInfo: true,
1328
- status: "INACTIVE",
1329
- documentType: "W9",
1330
- documentTypeString: taxTypeToName("W9"),
1331
- country: "United Kingdom",
1332
- indirectTaxType: "VAT",
1333
- indirectTaxNumber: "123456",
1334
- showNewFormDialog: false,
1335
- hasHold: false,
1336
- },
1337
- } }));
1338
- };
1339
- const TaxAndCashDashboardNotVerifiedW9Form = () => {
1340
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1341
- ...dashboardProps,
1342
- states: {
1343
- payoutStatus: "DONE",
1344
- canEditPayoutInfo: true,
1345
- disabled: false,
1346
- status: "NOT_VERIFIED",
1347
- documentType: "W9",
1348
- documentTypeString: taxTypeToName("W9"),
1349
- noFormNeeded: false,
1350
- country: "United States",
1351
- indirectTaxType: "VAT",
1352
- indirectTaxNumber: "123456",
1353
- showNewFormDialog: false,
1354
- hasHold: false,
1355
- veriffLoading: false,
1356
- },
1357
- } }));
1358
- };
1359
- const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
1360
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1361
- ...dashboardProps,
1362
- states: {
1363
- payoutStatus: "DONE",
1364
- veriffLoading: false,
1365
- canEditPayoutInfo: true,
1366
- disabled: false,
1367
- status: "NOT_VERIFIED",
1368
- documentType: "W8BEN",
1369
- documentTypeString: taxTypeToName("W8BEN"),
1370
- dateSubmitted: "Jan 18th, 2025",
1371
- noFormNeeded: false,
1372
- country: "United Kingdom",
1373
- indirectTaxType: "VAT",
1374
- indirectTaxNumber: "123456",
1375
- showNewFormDialog: false,
1376
- hasHold: false,
1377
- },
1378
- } }));
1379
- };
1380
- const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
1381
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1382
- ...dashboardProps,
1383
- states: {
1384
- payoutStatus: "DONE",
1385
- veriffLoading: false,
1386
- canEditPayoutInfo: true,
1387
- disabled: false,
1388
- status: "NOT_VERIFIED",
1389
- documentType: "W8BENE",
1390
- documentTypeString: taxTypeToName("W8BENE"),
1391
- dateSubmitted: "Jan 18th, 2025",
1392
- noFormNeeded: false,
1393
- country: "United Kingdom",
1394
- indirectTaxType: "VAT",
1395
- indirectTaxNumber: "123456",
1396
- showNewFormDialog: false,
1397
- hasHold: false,
1398
- },
1399
- } }));
1400
- };
1401
- const TaxAndCashDashboardNotActiveW8BENEForm = () => {
1402
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1403
- ...dashboardProps,
1404
- states: {
1405
- payoutStatus: "DONE",
1406
- veriffLoading: false,
1407
- canEditPayoutInfo: true,
1408
- disabled: false,
1409
- status: "NOT_ACTIVE",
1410
- documentType: "W8BENE",
1411
- documentTypeString: taxTypeToName("W8BENE"),
1412
- dateSubmitted: "Jan 18th, 2025",
1413
- noFormNeeded: false,
1414
- indirectTaxNumber: "123456",
1415
- indirectTaxType: "VAT",
1416
- country: "United Kingdom",
1417
- showNewFormDialog: false,
1418
- hasHold: false,
1419
- },
1420
- } }));
1421
- };
1422
- const TaxAndCashDashboardNoFormNeeded = () => {
1423
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1424
- ...dashboardProps,
1425
- states: {
1426
- payoutStatus: "DONE",
1427
- veriffLoading: false,
1428
- canEditPayoutInfo: true,
1429
- disabled: false,
1430
- documentType: "W9",
1431
- documentTypeString: taxTypeToName("W9"),
1432
- dateSubmitted: "Jan 18th, 2025",
1433
- noFormNeeded: true,
1434
- province: "Ontario",
1435
- country: "Canada",
1436
- indirectTaxNumber: "123456",
1437
- indirectTaxType: "GST",
1438
- showNewFormDialog: false,
1439
- hasHold: false,
1440
- },
1441
- } }));
1442
- };
1443
- const TaxAndCashDashboardIndirectTaxCanada = () => {
1444
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1445
- ...dashboardProps,
1446
- states: {
1447
- payoutStatus: "DONE",
1448
- veriffLoading: false,
1449
- canEditPayoutInfo: true,
1450
- status: "ACTIVE",
1451
- disabled: false,
1452
- documentType: "W8BENE",
1453
- documentTypeString: taxTypeToName("W8BENE"),
1454
- dateSubmitted: "Jan 18th, 2025",
1455
- noFormNeeded: false,
1456
- province: "Ontario",
1457
- country: "Canada",
1458
- indirectTaxType: "GST",
1459
- indirectTaxNumber: "123456",
1460
- showNewFormDialog: false,
1461
- hasHold: false,
1462
- },
1463
- } }));
1464
- };
1465
- const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
1466
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1467
- ...dashboardProps,
1468
- states: {
1469
- payoutStatus: "DONE",
1470
- veriffLoading: false,
1471
- canEditPayoutInfo: true,
1472
- status: "ACTIVE",
1473
- disabled: false,
1474
- documentType: "W8BENE",
1475
- documentTypeString: taxTypeToName("W8BENE"),
1476
- dateSubmitted: "Jan 18th, 2025",
1477
- noFormNeeded: false,
1478
- province: "Quebec",
1479
- country: "Canada",
1480
- indirectTaxType: "GST",
1481
- indirectTaxNumber: "123456",
1482
- qstNumber: "44212",
1483
- showNewFormDialog: false,
1484
- hasHold: false,
1485
- },
1486
- } }));
1487
- };
1488
- const TaxAndCashDashboardIndirectTaxSpain = () => {
1489
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1490
- ...dashboardProps,
1491
- states: {
1492
- payoutStatus: "DONE",
1493
- veriffLoading: false,
1494
- canEditPayoutInfo: true,
1495
- status: "ACTIVE",
1496
- disabled: false,
1497
- documentType: "W8BENE",
1498
- documentTypeString: taxTypeToName("W8BENE"),
1499
- dateSubmitted: "Jan 18th, 2025",
1500
- noFormNeeded: false,
1501
- country: "Spain",
1502
- subRegion: "Spain Proper",
1503
- indirectTaxType: "VAT",
1504
- indirectTaxNumber: "123456",
1505
- subRegionTaxNumber: "44212",
1506
- showNewFormDialog: false,
1507
- hasHold: false,
1508
- },
1509
- } }));
1510
- };
1511
- const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
1512
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1513
- ...dashboardProps,
1514
- states: {
1515
- payoutStatus: "DONE",
1516
- veriffLoading: false,
1517
- canEditPayoutInfo: true,
1518
- status: "ACTIVE",
1519
- documentType: "W8BEN",
1520
- documentTypeString: taxTypeToName("W8BEN"),
1521
- dateSubmitted: "Jan 18th, 2025",
1522
- noFormNeeded: false,
1523
- notRegistered: true,
1524
- showNewFormDialog: false,
1525
- hasHold: false,
1526
- },
1527
- } }));
1528
- };
1529
- const TaxAndCashDashboardIdentityVerifcationRequired = () => {
1530
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1531
- ...dashboardProps,
1532
- states: {
1533
- payoutStatus: "VERIFICATION:REQUIRED",
1534
- veriffLoading: false,
1535
- canEditPayoutInfo: true,
1536
- status: "ACTIVE",
1537
- documentType: "W8BEN",
1538
- documentTypeString: taxTypeToName("W8BEN"),
1539
- dateSubmitted: "Jan 18th, 2025",
1540
- noFormNeeded: false,
1541
- notRegistered: true,
1542
- showNewFormDialog: false,
1543
- hasHold: false,
1544
- },
1545
- } }));
1546
- };
1547
- const TaxAndCashDashboardIdentityVerifcationRequiredInternal = () => {
1548
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1549
- ...dashboardProps,
1550
- states: {
1551
- payoutStatus: "VERIFICATION:INTERNAL",
1552
- veriffLoading: false,
1553
- canEditPayoutInfo: true,
1554
- status: "ACTIVE",
1555
- documentType: "W8BEN",
1556
- documentTypeString: taxTypeToName("W8BEN"),
1557
- dateSubmitted: "Jan 18th, 2025",
1558
- noFormNeeded: false,
1559
- notRegistered: true,
1560
- showNewFormDialog: false,
1561
- hasHold: false,
1562
- },
1563
- } }));
1564
- };
1565
- const TaxAndCashDashboardIdentityVerifcationReviewInternal = () => {
1566
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1567
- ...dashboardProps,
1568
- states: {
1569
- payoutStatus: "VERIFICATION:REVIEW",
1570
- veriffLoading: false,
1571
- canEditPayoutInfo: true,
1572
- status: "ACTIVE",
1573
- documentType: "W8BEN",
1574
- documentTypeString: taxTypeToName("W8BEN"),
1575
- dateSubmitted: "Jan 18th, 2025",
1576
- noFormNeeded: false,
1577
- notRegistered: true,
1578
- showNewFormDialog: false,
1579
- hasHold: false,
1580
- },
1581
- } }));
1582
- };
1583
- const TaxAndCashDashboardIdentityVerifcationFailedInternal = () => {
1584
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1585
- ...dashboardProps,
1586
- states: {
1587
- payoutStatus: "VERIFICATION:FAILED",
1588
- veriffLoading: false,
1589
- canEditPayoutInfo: true,
1590
- status: "ACTIVE",
1591
- documentType: "W8BEN",
1592
- documentTypeString: taxTypeToName("W8BEN"),
1593
- dateSubmitted: "Jan 18th, 2025",
1594
- noFormNeeded: false,
1595
- notRegistered: true,
1596
- showNewFormDialog: false,
1597
- hasHold: false,
1598
- },
1599
- } }));
1600
- };
1601
- const TaxAndCashDashboardNewTaxForm = () => {
1602
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1603
- ...dashboardProps,
1604
- states: {
1605
- payoutStatus: "DONE",
1606
- veriffLoading: false,
1607
- canEditPayoutInfo: true,
1608
- status: "ACTIVE",
1609
- documentType: "W8BEN",
1610
- documentTypeString: taxTypeToName("W8BEN"),
1611
- dateSubmitted: "Jan 18th, 2025",
1612
- noFormNeeded: false,
1613
- notRegistered: true,
1614
- showNewFormDialog: true,
1615
- hasHold: false,
1616
- },
1617
- } }));
1618
- };
1619
- const TaxAndCashDashboardPayoutsOnHold = () => {
1620
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1621
- ...dashboardProps,
1622
- states: {
1623
- payoutStatus: "DONE",
1624
- veriffLoading: false,
1625
- canEditPayoutInfo: true,
1626
- disabled: true,
1627
- status: "ACTIVE",
1628
- documentType: "W8BEN",
1629
- documentTypeString: taxTypeToName("W8BEN"),
1630
- dateSubmitted: "Jan 18th, 2025",
1631
- noFormNeeded: false,
1632
- indirectTaxNumber: "123456",
1633
- country: "Slovania",
1634
- showNewFormDialog: false,
1635
- hasHold: true,
1636
- },
1637
- } }));
1638
- };
1639
- const TaxAndCashDashboardLoading = () => {
1640
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1641
- ...dashboardProps,
1642
- states: {
1643
- payoutStatus: "DONE",
1644
- veriffLoading: false,
1645
- canEditPayoutInfo: true,
1646
- disabled: false,
1647
- status: "ACTIVE",
1648
- documentType: "W9",
1649
- documentTypeString: taxTypeToName("W9"),
1650
- dateSubmitted: "Jan 18th, 2025",
1651
- noFormNeeded: false,
1652
- loading: true,
1653
- showNewFormDialog: false,
1654
- hasHold: false,
1655
- },
1656
- } }));
1657
- };
1658
- const TaxAndCashDashboardWithLoadingError = () => {
1659
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1660
- ...dashboardProps,
1661
- states: {
1662
- payoutStatus: "DONE",
1663
- veriffLoading: false,
1664
- disabled: false,
1665
- canEditPayoutInfo: true,
1666
- status: "ACTIVE",
1667
- documentType: "W9",
1668
- documentTypeString: taxTypeToName("W9"),
1669
- dateSubmitted: "Jan 18th, 2025",
1670
- noFormNeeded: false,
1671
- loading: true,
1672
- loadingError: true,
1673
- showNewFormDialog: false,
1674
- hasHold: false,
1675
- },
1676
- } }));
1677
- };
1678
- const TaxAndCashDashboardWithGeneralError = () => {
1679
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1680
- ...dashboardProps,
1681
- states: {
1682
- payoutStatus: "DONE",
1683
- veriffLoading: false,
1684
- canEditPayoutInfo: true,
1685
- disabled: false,
1686
- status: "ACTIVE",
1687
- documentType: "W9",
1688
- documentTypeString: taxTypeToName("W9"),
1689
- dateSubmitted: "Jan 18th, 2025",
1690
- noFormNeeded: false,
1691
- indirectTaxNumber: "123456",
1692
- indirectTaxType: "VAT",
1693
- country: "Slovania",
1694
- showNewFormDialog: false,
1695
- hasHold: false,
1696
- errors: {
1697
- general: true,
1698
- },
1699
- },
1700
- } }));
1701
- };
1702
- const TaxAndCashDashboardDisabled = () => {
1703
- return (h("sqm-tax-and-cash-dashboard", { demoData: {
1704
- ...dashboardProps,
1705
- states: {
1706
- payoutStatus: "DONE",
1707
- veriffLoading: false,
1708
- canEditPayoutInfo: true,
1709
- disabled: true,
1710
- status: "ACTIVE",
1711
- documentType: "W8BEN",
1712
- documentTypeString: taxTypeToName("W8BEN"),
1713
- dateSubmitted: "Jan 18th, 2025",
1714
- noFormNeeded: false,
1715
- indirectTaxNumber: "123456",
1716
- country: "Slovania",
1717
- showNewFormDialog: false,
1718
- hasHold: false,
1719
- },
1720
- } }));
1721
- };
1722
- const TaxAndCashTextProps = () => {
1723
- return (h("sqm-tax-and-cash", { demoData: {
1724
- // @ts-ignore
1725
- showTextProps: true,
1726
- } }));
1727
- };
1728
-
1729
- const TaxForm = /*#__PURE__*/Object.freeze({
1730
- __proto__: null,
1731
- 'default': TaxForm_stories,
1732
- GeneralLoadingView: GeneralLoadingView,
1733
- GeneralErrorView: GeneralErrorView,
1734
- StepOne: StepOne,
1735
- StepOneLoading: StepOneLoading,
1736
- StepOneDisabled: StepOneDisabled,
1737
- StepOneIsUser: StepOneIsUser,
1738
- StepOneIsPartner: StepOneIsPartner,
1739
- StepOneWithErrors: StepOneWithErrors,
1740
- StepOneWithGeneralError: StepOneWithGeneralError,
1741
- StepOneWithLoadingError: StepOneWithLoadingError,
1742
- StepTwoLoading: StepTwoLoading,
1743
- StepTwoLoadingError: StepTwoLoadingError,
1744
- StepTwoDisabled: StepTwoDisabled,
1745
- StepTwoIsPartner: StepTwoIsPartner,
1746
- StepTwoWithGeneralError: StepTwoWithGeneralError,
1747
- StepTwoOtherRegionChecked: StepTwoOtherRegionChecked,
1748
- StepTwoOtherRegionCheckedCanada: StepTwoOtherRegionCheckedCanada,
1749
- StepTwoOtherRegionCheckedCanadaGST: StepTwoOtherRegionCheckedCanadaGST,
1750
- StepTwoOtherRegionCheckedCanadaGSTAndQST: StepTwoOtherRegionCheckedCanadaGSTAndQST,
1751
- StepTwoOtherRegionCheckedOtherCountrySubRegion: StepTwoOtherRegionCheckedOtherCountrySubRegion,
1752
- StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax: StepTwoOtherRegionCheckedOtherCountrySubRegionIncomeTax,
1753
- StepTwoOtherRegionCheckedWithInputErrors: StepTwoOtherRegionCheckedWithInputErrors,
1754
- StepTwoOtherRegionCheckedCanadaWithProvinceError: StepTwoOtherRegionCheckedCanadaWithProvinceError,
1755
- StepTwoOtherRegionCheckedCanadaGSTAndQSTError: StepTwoOtherRegionCheckedCanadaGSTAndQSTError,
1756
- StepTwoOtherRegionCheckedOtherCountrySubRegionErrors: StepTwoOtherRegionCheckedOtherCountrySubRegionErrors,
1757
- StepTwoNotRegisteredChecked: StepTwoNotRegisteredChecked,
1758
- StepThreeWithDocusign: StepThreeWithDocusign,
1759
- StepThreeWithDocusignW8BEN: StepThreeWithDocusignW8BEN,
1760
- StepThreeWithDocusignW8BENE: StepThreeWithDocusignW8BENE,
1761
- StepThreeWithDocusignExpired: StepThreeWithDocusignExpired,
1762
- StepThreeWithDocusignCompleted: StepThreeWithDocusignCompleted,
1763
- StepThreeDocusignWithError: StepThreeDocusignWithError,
1764
- StepThreeDocusignWithGeneralError: StepThreeDocusignWithGeneralError,
1765
- StepThreeDocusignWithLoadingError: StepThreeDocusignWithLoadingError,
1766
- StepThreeDocusignLoading: StepThreeDocusignLoading,
1767
- StepThreeDocusignDisabled: StepThreeDocusignDisabled,
1768
- StepFourDefault: StepFourDefault,
1769
- StepFourIsPartner: StepFourIsPartner,
1770
- StepFourDirectToBankChecked: StepFourDirectToBankChecked,
1771
- StepFourToPaypalChecked: StepFourToPaypalChecked,
1772
- StepFourReVerifyEmail: StepFourReVerifyEmail,
1773
- TaxAndCashDashboardActiveW9Form: TaxAndCashDashboardActiveW9Form,
1774
- TaxAndCashDashboardActiveW8BENForm: TaxAndCashDashboardActiveW8BENForm,
1775
- TaxAndCashDashboardActiveW8BENEForm: TaxAndCashDashboardActiveW8BENEForm,
1776
- TaxAndCashDashboardNotActiveW9Form: TaxAndCashDashboardNotActiveW9Form,
1777
- TaxAndCashDashboardNotVerifiedW9Form: TaxAndCashDashboardNotVerifiedW9Form,
1778
- TaxAndCashDashboardNotVerifiedW8BENForm: TaxAndCashDashboardNotVerifiedW8BENForm,
1779
- TaxAndCashDashboardNotVerifiedW8BENEForm: TaxAndCashDashboardNotVerifiedW8BENEForm,
1780
- TaxAndCashDashboardNotActiveW8BENEForm: TaxAndCashDashboardNotActiveW8BENEForm,
1781
- TaxAndCashDashboardNoFormNeeded: TaxAndCashDashboardNoFormNeeded,
1782
- TaxAndCashDashboardIndirectTaxCanada: TaxAndCashDashboardIndirectTaxCanada,
1783
- TaxAndCashDashboardIndirectTaxCanadaQuebec: TaxAndCashDashboardIndirectTaxCanadaQuebec,
1784
- TaxAndCashDashboardIndirectTaxSpain: TaxAndCashDashboardIndirectTaxSpain,
1785
- TaxAndCashDashboardIndirectTaxNotRegistered: TaxAndCashDashboardIndirectTaxNotRegistered,
1786
- TaxAndCashDashboardIdentityVerifcationRequired: TaxAndCashDashboardIdentityVerifcationRequired,
1787
- TaxAndCashDashboardIdentityVerifcationRequiredInternal: TaxAndCashDashboardIdentityVerifcationRequiredInternal,
1788
- TaxAndCashDashboardIdentityVerifcationReviewInternal: TaxAndCashDashboardIdentityVerifcationReviewInternal,
1789
- TaxAndCashDashboardIdentityVerifcationFailedInternal: TaxAndCashDashboardIdentityVerifcationFailedInternal,
1790
- TaxAndCashDashboardNewTaxForm: TaxAndCashDashboardNewTaxForm,
1791
- TaxAndCashDashboardPayoutsOnHold: TaxAndCashDashboardPayoutsOnHold,
1792
- TaxAndCashDashboardLoading: TaxAndCashDashboardLoading,
1793
- TaxAndCashDashboardWithLoadingError: TaxAndCashDashboardWithLoadingError,
1794
- TaxAndCashDashboardWithGeneralError: TaxAndCashDashboardWithGeneralError,
1795
- TaxAndCashDashboardDisabled: TaxAndCashDashboardDisabled,
1796
- TaxAndCashTextProps: TaxAndCashTextProps
1797
- });
1798
-
1799
- const vatLabels = {
1800
- GB: "VAT",
1801
- AU: "GST",
1802
- NZ: "GST",
1803
- CA: "HST",
1804
- AT: "VAT",
1805
- BE: "VAT",
1806
- BG: "VAT",
1807
- HR: "VAT",
1808
- CY: "VAT",
1809
- CZ: "VAT",
1810
- DK: "VAT",
1811
- EE: "VAT",
1812
- FI: "VAT",
1813
- FR: "VAT",
1814
- DE: "VAT",
1815
- GR: "VAT",
1816
- HU: "VAT",
1817
- IE: "VAT",
1818
- IT: "VAT",
1819
- LV: "VAT",
1820
- LT: "VAT",
1821
- LU: "VAT",
1822
- MT: "VAT",
1823
- NL: "VAT",
1824
- PL: "VAT",
1825
- PT: "VAT",
1826
- RO: "VAT",
1827
- SK: "VAT",
1828
- SI: "VAT",
1829
- ES: "VAT",
1830
- SE: "VAT",
1831
- IS: "VAT",
1832
- IN: "GST",
1833
- IL: "VAT",
1834
- JP: "CT",
1835
- MX: "VAT",
1836
- NO: "VAT",
1837
- SG: "GST",
1838
- ZA: "VAT",
1839
- KR: "VAT",
1840
- CH: "VAT",
1841
- TW: "VAT",
1842
- TH: "VAT",
1843
- PH: "VAT",
1844
- MY: "SST",
1845
- AE: "VAT",
1846
- TR: "VAT",
1847
- RU: "VAT",
1848
- };
1849
-
1850
- const style$1 = {
1851
- Container: {
1852
- width: "100%",
1853
- },
1854
- InputContainer: {
1855
- width: "100%",
1856
- display: "flex",
1857
- justifyContent: "flex-start",
1858
- flexDirection: "column",
1859
- gap: "16px",
1860
- padding: "16px",
1861
- maxWidth: "450px",
1862
- },
1863
- ConditionalInputsContainer: {
1864
- width: "100%",
1865
- display: "flex",
1866
- justifyContent: "flex-start",
1867
- flexDirection: "column",
1868
- gap: "16px",
1869
- },
1870
- HR: {
1871
- border: "1px solid #E0E0E0",
1872
- margin: "10px 0",
1873
- },
1874
- Input: { maxWidth: "500px" },
1875
- Checkbox: {
1876
- "&::part(control)": {
1877
- borderRadius: "0 !important",
1878
- },
1879
- },
1880
- SearchInput: {
1881
- padding: "var(--sl-spacing-x-small)",
1882
- },
1883
- ErrorInput: {
1884
- maxWidth: "500px",
1885
- "&::part(base)": {
1886
- border: "1px solid var(--sl-color-danger-500)",
1887
- borderRadius: "var(--sl-input-border-radius-medium)",
1888
- },
1889
- "&::part(help-text)": {
1890
- color: "var(--sl-color-danger-500)",
1891
- },
1892
- },
1893
- };
1894
- const sheet$1 = createStyleSheet(style$1);
1895
- const styleString$1 = sheet$1.toString();
1896
- const vanillaStyle = `
1897
- :host{
1898
- display: block;
1899
- }
1900
- * {
1901
- margin: 0;
1902
- padding: 0;
1903
- box-sizing: border-box;
1904
- }
1905
- `;
1906
- const OtherRegionSlotView = (props) => {
1907
- var _a, _b, _c;
1908
- const { states, states: { formState }, callbacks, text, } = props;
1909
- const { classes } = sheet$1;
1910
- const getTaxFieldLabel = (taxType) => {
1911
- return intl.formatMessage({
1912
- id: `tax-field-label${taxType}`,
1913
- defaultMessage: text.indirectTaxNumber,
1914
- }, { taxType });
1915
- };
1916
- const getTaxFieldError = (taxType) => {
1917
- return intl.formatMessage({
1918
- id: `tax-field-label${taxType}`,
1919
- defaultMessage: text.error.indirectTaxNumber,
1920
- }, { taxType });
1921
- };
1922
- const IndirectTaxNumberInput = ({ label, error, name, }) => {
1923
- var _a;
1924
- return (h("sl-input", Object.assign({ required: true, exportparts: "label: input-label, base: input-base", class: classes.Input, label: label, disabled: states.loading || states.disabled, value: formState[name] }, (((_a = formState.errors) === null || _a === void 0 ? void 0 : _a[name]) && {
1925
- class: classes.ErrorInput,
1926
- helpText: error,
1927
- }), { id: name, name: `/${name}` })));
1928
- };
1929
- const SpainFields = () => {
1930
- var _a, _b;
1931
- return (h("div", { class: classes.ConditionalInputsContainer },
1932
- h("sl-select", Object.assign({ required: true, exportparts: "label: input-label, base: input-base", class: classes.Input, value: formState.subRegion, label: text.subRegion, disabled: states.loading || states.disabled }, (((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.indirectTaxNumber) && {
1933
- class: classes.ErrorInput,
1934
- helpText: formatErrorMessage(text.subRegion, text.error.fieldRequiredError),
1935
- }), { id: "subRegion", name: "/subRegion" }), props.data.esRegions.map((r) => (h("sl-menu-item", { value: r.regionCode }, r.displayName)))),
1936
- h(IndirectTaxNumberInput, { name: "indirectTaxNumber", label: getTaxFieldLabel("VAT"), error: getTaxFieldError("VAT") }),
1937
- h("sl-checkbox", { class: classes.Checkbox, exportparts: "label: input-label, base: input-base", checked: formState.hasSubRegionTaxNumber, "onSl-change": callbacks.onSpainToggle, disabled: states.disabled || states.isPartner }, text.isRegisteredSubRegionIncomeTax),
1938
- formState.hasSubRegionTaxNumber && (h("sl-input", Object.assign({ required: true, exportparts: "label: input-label, base: input-base", class: classes.Input, label: text.subRegionTaxNumberLabel, disabled: states.loading || states.disabled, value: formState.subRegionTaxNumber }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.subRegionTaxNumber) && {
1939
- class: classes.ErrorInput,
1940
- helpText: formatErrorMessage(text.subRegionTaxNumberLabel, text.error.fieldRequiredError),
1941
- }), { id: "subRegionTaxNumber", name: "/subRegionTaxNumber" })))));
1942
- };
1943
- const CanadaFields = () => {
1944
- var _a, _b;
1945
- const { classes } = sheet$1;
1946
- const currentTaxType = (_a = INDIRECT_TAX_PROVINCES === null || INDIRECT_TAX_PROVINCES === void 0 ? void 0 : INDIRECT_TAX_PROVINCES.find((p) => p.regionCode === formState.province)) === null || _a === void 0 ? void 0 : _a.taxType;
1947
- return (h("div", { class: classes.ConditionalInputsContainer },
1948
- h("sl-select", Object.assign({ required: true, value: formState.province, exportparts: "label: input-label, base: input-base", class: classes.Input, label: text.province, disabled: states.loading || states.disabled, "onSl-select": (e) => callbacks.onFormChange("province", e) }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.province) && {
1949
- class: classes.ErrorInput,
1950
- helpText: formatErrorMessage(text.province, text.error.fieldRequiredError),
1951
- }), { id: "province", name: "/province" }), props.data.provinces.map((p) => (h("sl-menu-item", { value: p.regionCode }, p.displayName)))),
1952
- currentTaxType === "GST" && (h(IndirectTaxNumberInput, { label: getTaxFieldLabel("GST"), error: getTaxFieldError("GST"), name: "indirectTaxNumber" })),
1953
- currentTaxType === "HST" && (h(IndirectTaxNumberInput, { label: getTaxFieldLabel("HST"), error: getTaxFieldError("HST"), name: "indirectTaxNumber" })),
1954
- formState.province === "QUEBEC" && (h("div", { class: classes.ConditionalInputsContainer },
1955
- h("sl-checkbox", { class: classes.Checkbox, exportparts: "label: input-label, base: input-base", "onSl-change": callbacks.onQstToggle, checked: formState.hasQst, disabled: states.isPartner || states.disabled }, text.isRegisteredQST),
1956
- formState.hasQst && (h(IndirectTaxNumberInput, { name: "qstNumber", label: text.qstNumber, error: formatErrorMessage(text.qstNumber, text.error.fieldRequiredError) }))))));
1957
- };
1958
- const getActiveForm = (selectedRegion) => {
1959
- var _a;
1960
- switch (selectedRegion) {
1961
- case "CA":
1962
- return h(CanadaFields, null);
1963
- case "ES":
1964
- return h(SpainFields, null);
1965
- default:
1966
- return (h("sl-input", Object.assign({ required: true, exportparts: "label: input-label, base: input-base", class: classes.Input, value: formState.indirectTaxNumber, label: getTaxFieldLabel(vatLabels[selectedRegion] || "GENERAL"), disabled: states.loading || states.disabled }, (((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.indirectTaxNumber) && {
1967
- class: classes.ErrorInput,
1968
- helpText: getTaxFieldError(vatLabels[selectedRegion] || "GENERAL"),
1969
- }), { id: "indirectTaxNumber", name: "/indirectTaxNumber" })));
1970
- }
1971
- };
1972
- const activeForm = getActiveForm(formState.selectedRegion);
1973
- return (h("div", { style: states.hide ? { display: "none" } : {} },
1974
- h("form", { class: classes.Container },
1975
- h("style", { type: "text/css" },
1976
- styleString$1,
1977
- vanillaStyle),
1978
- h("hr", { class: classes.HR }),
1979
- h("div", { class: classes.InputContainer },
1980
- h("sl-select", Object.assign({ required: true, class: classes.Input, value: formState.selectedRegion, exportparts: "label: input-label, base: input-base", label: text.selectedRegion, disabled: states.loading || states.disabled, "onSl-select": (e) => callbacks.onFormChange("selectedRegion", e) }, (((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.selectedRegion) && {
1981
- class: classes.ErrorInput,
1982
- helpText: formatErrorMessage(text.selectedRegion, text.error.fieldRequiredError),
1983
- }), { id: "selectedRegion", name: "/selectedRegion" }),
1984
- h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCountryText, onKeyDown: (e) => {
1985
- // Stop shoelace intercepting key presses
1986
- e.stopPropagation();
1987
- }, "onSl-input": (e) => {
1988
- callbacks.setCountrySearch(e.target.value);
1989
- } }), (_b = props.data.countries) === null || _b === void 0 ? void 0 :
1990
- _b.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_c = props.data.allCountries) === null || _c === void 0 ? void 0 :
1991
- _c.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
1992
- activeForm),
1993
- h("hr", { class: classes.HR }))));
1994
- };
1995
-
1996
- const style$2 = {
1997
- Description: {
1998
- fontSize: "var(--sl-font-size-small)",
1999
- marginTop: "var(--sl-spacing-small)",
2000
- margin: "0 0 var(--sl-spacing-large)",
2001
- color: "var(--sl-color-gray-500)",
2002
- },
2003
- Header: {
2004
- fontSize: "var(--sl-font-size-large)",
2005
- fontWeight: "var(-sl-font-weight-semibold)",
2006
- margin: "0 0 var(--sl-spacing-xxx-small)",
2007
- },
2008
- Container: {},
2009
- InvoiceTableContaier: {
2010
- "& sl-details::part(base)": {
2011
- border: "none",
2012
- },
2013
- "& sl-details::part(content)": {
2014
- padding: 0,
2015
- },
2016
- "& sl-details::part(header)": {
2017
- fontSize: "var(--sl-font-size-medium)",
2018
- padding: "0px",
2019
- },
2020
- "& sl-details::part(summary)": {
2021
- fontWeight: "var(-sl-font-weight-semibold)",
2022
- },
2023
- "& sl-details::part(summary-icon)": {
2024
- marginRight: "100%",
2025
- marginLeft: "var(--sl-spacing-x-small)",
2026
- transform: "rotate(90deg)",
2027
- },
2028
- "& sl-details[open]::part(summary-icon)": {
2029
- transform: "rotate(270deg)",
2030
- },
2031
- },
2032
- };
2033
- function InvoiceTableView(props, children) {
2034
- const sheet = createStyleSheet(style$2);
2035
- const styleString = sheet.toString();
2036
- const vanillaStyle = `
2037
- :host{
2038
- display: block;
2039
- }`;
2040
- return (h("div", { class: sheet.classes.Container },
2041
- h("style", { type: "text/css" },
2042
- vanillaStyle,
2043
- styleString),
2044
- h("div", { class: sheet.classes.InvoiceTableContaier },
2045
- h("sl-details", { summary: props.header },
2046
- h("p", { class: sheet.classes.Description }, props.description),
2047
- children))));
2048
- }
2049
-
2050
- export { ADDRESS_REGIONS as A, ErrorView as E, GeneralLoadingView as G, InvoiceTableView as I, LoadingView as L, OtherRegionSlotView as O, TaxForm as T, INDIRECT_TAX_SPAIN_REGIONS as a, INDIRECT_TAX_PROVINCES as b, vatLabels as c, validateBillingField as d, formatErrorMessage as f, getCountryObj as g, objectIsFull as o, taxTypeToName as t, validTaxDocument as v };