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