@saasquatch/mint-components 2.3.0-5 → 2.3.0-7

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 (67) hide show
  1. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +28 -721
  2. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +4 -4
  3. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +17 -32
  4. package/dist/cjs/{sqm-partner-info-modal-view-2eb52318.js → sqm-partner-info-modal-view-65cc677a.js} +1 -0
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +254 -77
  6. package/dist/cjs/{sqm-user-info-form-view-0e1ddbe4.js → sqm-user-info-form-view-42323dc5.js} +743 -38
  7. package/dist/cjs/{useIndirectTaxForm-c3c1ec56.js → useIndirectTaxForm-d1cd23f7.js} +5 -5
  8. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +1 -0
  9. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +16 -31
  10. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  11. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +6 -0
  12. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +13 -2
  13. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +151 -0
  14. package/dist/esm/sqm-banking-info-form_10.entry.js +16 -709
  15. package/dist/esm/sqm-big-stat_47.entry.js +2 -2
  16. package/dist/esm/sqm-email-verification_2.entry.js +17 -32
  17. package/dist/esm/{sqm-partner-info-modal-view-e8efbef1.js → sqm-partner-info-modal-view-136c443d.js} +1 -0
  18. package/dist/esm/sqm-stencilbook.entry.js +218 -41
  19. package/dist/esm/{sqm-user-info-form-view-e1ba6009.js → sqm-user-info-form-view-dc473cb8.js} +721 -17
  20. package/dist/esm/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  21. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  22. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  23. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  24. package/dist/esm-es5/sqm-partner-info-modal-view-136c443d.js +1 -0
  25. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  26. package/dist/esm-es5/sqm-user-info-form-view-dc473cb8.js +1 -0
  27. package/dist/esm-es5/subregions-24c1c137.js +1 -0
  28. package/dist/esm-es5/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  29. package/dist/mint-components/mint-components.esm.js +1 -1
  30. package/dist/mint-components/p-1f387c7b.system.js +1 -1
  31. package/dist/mint-components/{p-abe9f5b1.js → p-2e462dd9.js} +5 -5
  32. package/dist/mint-components/{p-b419f9ac.entry.js → p-3c052d3d.entry.js} +1 -1
  33. package/dist/mint-components/p-3f68e4e3.js +1 -0
  34. package/dist/mint-components/{p-a38eece5.system.entry.js → p-4575f71b.system.entry.js} +1 -1
  35. package/dist/mint-components/{p-fa227290.entry.js → p-459c4251.entry.js} +6 -31
  36. package/dist/mint-components/p-4c6ab282.js +1 -0
  37. package/dist/mint-components/p-547f8243.system.entry.js +1 -0
  38. package/dist/mint-components/p-66cb8bec.system.js +1 -0
  39. package/dist/mint-components/p-b21c53cb.system.entry.js +1 -0
  40. package/dist/mint-components/p-b24bb1ee.system.js +1 -0
  41. package/dist/mint-components/p-c2903e7d.entry.js +83 -0
  42. package/dist/mint-components/p-cb58a2c6.js +1 -0
  43. package/dist/mint-components/p-d30c8cb3.entry.js +9 -0
  44. package/dist/mint-components/p-df74f653.system.entry.js +1 -0
  45. package/dist/mint-components/p-ec58628f.system.js +1 -0
  46. package/dist/mint-components/{p-58c24352.system.js → p-ed945efe.system.js} +1 -1
  47. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -1
  48. package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +1 -0
  49. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +19 -0
  50. package/docs/docs.docx +0 -0
  51. package/package.json +1 -1
  52. package/dist/esm-es5/sqm-partner-info-modal-view-e8efbef1.js +0 -1
  53. package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +0 -1
  54. package/dist/esm-es5/utils-4f5cd04c.js +0 -1
  55. package/dist/mint-components/p-1e6a2945.js +0 -1
  56. package/dist/mint-components/p-25b32748.system.entry.js +0 -1
  57. package/dist/mint-components/p-41415f9a.system.entry.js +0 -1
  58. package/dist/mint-components/p-58c525ce.system.js +0 -1
  59. package/dist/mint-components/p-7f1bc92b.entry.js +0 -9
  60. package/dist/mint-components/p-b0177b7f.js +0 -1
  61. package/dist/mint-components/p-b222bace.system.entry.js +0 -1
  62. package/dist/mint-components/p-b96ed8eb.js +0 -1
  63. package/dist/mint-components/p-cdabd9de.system.js +0 -1
  64. package/dist/mint-components/p-ebc519bc.system.js +0 -1
  65. package/dist/mint-components/p-ffcebe78.entry.js +0 -83
  66. package/dist/cjs/{utils-a3b3d05b.js → subregions-e7273457.js} +44 -44
  67. package/dist/esm/{utils-4f5cd04c.js → subregions-24c1c137.js} +44 -44
@@ -3,7 +3,7 @@
3
3
  const index = require('./index-8277cbb3.js');
4
4
  const global = require('./global-b7b1b8fe.js');
5
5
  const JSS = require('./JSS-8503a151.js');
6
- const utils = require('./utils-a3b3d05b.js');
6
+ const subregions = require('./subregions-e7273457.js');
7
7
  const data = require('./data-89ac73dd.js');
8
8
 
9
9
  const style = {
@@ -60,6 +60,710 @@ function InvoiceTableView(props, children) {
60
60
  children))));
61
61
  }
62
62
 
63
+ const style$1 = {
64
+ ErrorAlertContainer: {
65
+ "&::part(base)": {
66
+ backgroundColor: "var(--sl-color-red-100)",
67
+ borderTop: "none",
68
+ },
69
+ },
70
+ WarningAlertContainer: {
71
+ "&::part(base)": {
72
+ backgroundColor: "var(--sl-color-yellow-100)",
73
+ borderTop: "none",
74
+ maxWidth: "600px",
75
+ },
76
+ },
77
+ WarningHoldAlertContainer: {
78
+ marginLeft: "-20px",
79
+ "&::part(base)": {
80
+ maxWidth: "850px",
81
+ border: "none",
82
+ backgroundColor: "transparent",
83
+ color: "var(--sqm-text)",
84
+ },
85
+ "& sl-icon::part(base)": {
86
+ color: "var(--sqm-warning-color-icon)",
87
+ },
88
+ },
89
+ ErrorHoldAlertContainer: {
90
+ marginLeft: "-20px",
91
+ "&::part(base)": {
92
+ maxWidth: "850px",
93
+ border: "none",
94
+ backgroundColor: "transparent",
95
+ color: "var(--sqm-text)",
96
+ },
97
+ "& sl-icon::part(base)": {
98
+ color: "var(--sqm-danger-color-icon)",
99
+ },
100
+ },
101
+ ExpiringSoonAlertContainer: {
102
+ "&::part(base)": {
103
+ backgroundColor: "var(--sl-color-yellow-100)",
104
+ borderTop: "none",
105
+ },
106
+ },
107
+ BankingInformationContainer: {
108
+ maxWidth: "700px",
109
+ },
110
+ IndirectTaxPreviewContainer: {
111
+ marginTop: "var(--sl-spacing-x-large)",
112
+ borderTop: "1px solid var(--sl-color-neutral-200)",
113
+ },
114
+ IndirectTaxPreviewHeaderContainer: {
115
+ marginTop: "var(--sl-spacing-large)",
116
+ marginBottom: "var(--sl-spacing-xx-small)",
117
+ margin: "0",
118
+ display: "flex",
119
+ alignItems: "center",
120
+ gap: "var(--sl-spacing-x-small)",
121
+ "&::part(base)": {
122
+ color: "var(--sqm-text)",
123
+ },
124
+ },
125
+ IndirectTaxPreviewDetails: {
126
+ gap: "var(--sl-spacing-x-small)",
127
+ display: "flex",
128
+ flexDirection: "column",
129
+ lineHeight: "var(--sl-spacing-medium)",
130
+ fontSize: "var(--sl-font-size-small)",
131
+ color: "var(--sqm-text-subdued)",
132
+ },
133
+ InvoiceTableContainer: {
134
+ marginTop: "var(--sl-spacing-medium)",
135
+ },
136
+ NotRegisteredIndirectTaxText: {
137
+ color: "var(--sqm-text-subdued)",
138
+ },
139
+ TaxDocumentsContainer: {
140
+ marginTop: "var(--sl-spacing-xx-large)",
141
+ borderTop: "1px solid var(--sl-color-neutral-200)",
142
+ },
143
+ TaxDocumentsSectionHeaderContainer: {
144
+ marginTop: "var(--sl-spacing-x-large)",
145
+ marginBottom: "var(--sl-spacing-xx-small)",
146
+ },
147
+ StatusContainer: {
148
+ marginTop: "var(--sl-spacing-x-large)",
149
+ display: "flex",
150
+ flexDirection: "column",
151
+ gap: "var(--sl-spacing-x-small)",
152
+ "& h3": {
153
+ margin: "0",
154
+ },
155
+ "& p": {
156
+ margin: "0",
157
+ paddingTop: "2px",
158
+ },
159
+ },
160
+ StatusAlert: {
161
+ fontSize: "var(--sl-font-size-small)",
162
+ },
163
+ TaxFormDetailsContainer: {
164
+ display: "flex",
165
+ gap: "var(--sl-spacing-small)",
166
+ alignItems: "center",
167
+ },
168
+ NewFormButton: {
169
+ marginTop: "var(--sl-spacing-large)",
170
+ maxWidth: "300px",
171
+ },
172
+ EditBankDetailsButton: {
173
+ marginTop: "var(--sl-spacing-large)",
174
+ },
175
+ TaxSectionSkeletonContainer: {
176
+ display: "flex",
177
+ flexDirection: "column",
178
+ marginTop: "var(--sl-spacing-x-large)",
179
+ },
180
+ TaxDocSubtext: {
181
+ margin: "0",
182
+ color: "var(--sqm-text-subdued)",
183
+ lineHeight: "var(--sl-spacing-medium)",
184
+ fontSize: "var(--sl-font-size-small)",
185
+ marginLeft: "1px",
186
+ },
187
+ TooltipContainer: {
188
+ display: "flex",
189
+ textAlign: "center",
190
+ width: "250px",
191
+ "&::part(body)": {
192
+ pointerEvents: "auto",
193
+ },
194
+ },
195
+ ToolTip: {
196
+ top: "6px",
197
+ width: "16px",
198
+ height: "16px",
199
+ },
200
+ TaxNumberContainer: {
201
+ display: "flex",
202
+ flexDirection: "column",
203
+ gap: "6px",
204
+ },
205
+ DescriptionText: {
206
+ color: "var(--sqm-text-subdued)",
207
+ fontSize: "var(--sl-font-size-x-small)",
208
+ marginBottom: "none",
209
+ maxWidth: "492px",
210
+ },
211
+ PageDescriptionText: {
212
+ color: "var(--sqm-text-subdued)",
213
+ fontSize: "var(--sl-font-size-medium)",
214
+ marginTop: "0",
215
+ },
216
+ Dialog: {
217
+ "&::part(panel)": {
218
+ maxWidth: "420px",
219
+ },
220
+ "&::part(close-button)": {
221
+ marginBottom: "var(--sl-spacing-xx-large)",
222
+ },
223
+ "&::part(title)": {
224
+ fontSize: "var(--sl-font-size-x-large)",
225
+ fontWeight: "600",
226
+ marginTop: "var(--sl-spacing-xxx-large)",
227
+ padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
228
+ },
229
+ "&::part(body)": {
230
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
231
+ fontSize: "var(--sl-font-size-small)",
232
+ },
233
+ "&::part(footer)": {
234
+ display: "flex",
235
+ flexDirection: "column",
236
+ gap: "var(--sl-spacing-small)",
237
+ marginBottom: "var(--sl-spacing-xx-small)",
238
+ alignItems: "center",
239
+ flex: "1",
240
+ },
241
+ },
242
+ DialogButton: { margin: "auto", width: "100%" },
243
+ SuccessBadge: {
244
+ "&::part(base)": {
245
+ textAlign: "center",
246
+ whiteSpace: "pre-line",
247
+ background: "var(--sqm-success-color-icon)",
248
+ },
249
+ },
250
+ WarningBadge: {
251
+ "&::part(base)": {
252
+ textAlign: "center",
253
+ whiteSpace: "pre-line",
254
+ background: "var(--sqm-warning-color-icon)",
255
+ },
256
+ },
257
+ ErrorBadge: {
258
+ "&::part(base)": {
259
+ textAlign: "center",
260
+ whiteSpace: "pre-line",
261
+ background: "var(--sqm-danger-color-icon)",
262
+ },
263
+ },
264
+ SubduedText: {
265
+ color: "var(--sqm-text-subdued)",
266
+ },
267
+ ButtonContainer: {
268
+ display: "flex",
269
+ gap: "var(--sl-spacing-medium)",
270
+ flexWrap: "wrap",
271
+ },
272
+ DropdownTooltipContainer: {
273
+ top: "-4px",
274
+ "&::part(panel)": {
275
+ boxShadow: "none",
276
+ border: "none",
277
+ marginTop: "var(--sl-spacing-x-small)",
278
+ },
279
+ },
280
+ DropdownContent: {
281
+ padding: "var(--sl-spacing-xxx-small) var(--sl-spacing-x-small)",
282
+ fontSize: "var(--sl-font-size-small)",
283
+ fontFamily: "var(--sl-font-sans)",
284
+ fontWeight: "var(--sl-font-weight-normal)",
285
+ lineHeight: "var(--sl-line-height-dense)",
286
+ minWidth: "225px",
287
+ backgroundColor: "var(--sl-color-gray-900)",
288
+ color: "var(--sl-color-white)",
289
+ borderRadius: "var(--sl-border-radius-medium)",
290
+ position: "relative",
291
+ marginLeft: "5px",
292
+ },
293
+ DropdownArrow: {
294
+ position: "absolute",
295
+ left: "-5px",
296
+ top: "50%",
297
+ transform: "translateY(-50%)",
298
+ width: "0",
299
+ height: "0",
300
+ borderTop: "5px solid transparent",
301
+ borderBottom: "5px solid transparent",
302
+ borderRight: "5px solid var(--sl-color-gray-900)",
303
+ zIndex: "1",
304
+ },
305
+ DropdownLink: {
306
+ color: "var(--sl-color-white)",
307
+ textDecoration: "underline",
308
+ },
309
+ };
310
+ const sheet = JSS.createStyleSheet(style$1);
311
+ const styleString = sheet.toString();
312
+ const vanillaStyle = `
313
+ :host{
314
+ display: block;
315
+ }
316
+
317
+ sl-button[type="secondary"]::part(base) {
318
+ font-family: var(--sqm-primary-font);
319
+ background-color: var(--sqm-secondary-button-background);
320
+ color: var(--sqm-secondary-button-color);
321
+ border-color: var(--sqm-secondary-button-color-border);
322
+ border-radius: var(--sqm-secondary-button-radius);
323
+ }
324
+
325
+ sl-button[type="secondary"]::part(base):hover {
326
+ background-color: var(--sqm-secondary-button-background-hover);
327
+ color: var(--sqm-secondary-button-color-hover);
328
+ border-color: var(--sqm-secondary-button-border-color-hover);
329
+ }
330
+
331
+ `;
332
+ const TaxAndCashDashboardView = (props) => {
333
+ var _a;
334
+ const { states, text, callbacks, slots } = props;
335
+ function getAlert(status) {
336
+ switch (status) {
337
+ case "OVER_W9_THRESHOLD":
338
+ if (states.enforceUsTaxComplianceOption === "CASH_ONLY_DEFER_W9") {
339
+ return {
340
+ header: text.w9RequiredHeader,
341
+ description: global.intl.formatMessage({
342
+ id: "w9RequiredDescription",
343
+ defaultMessage: text.w9RequiredDescription,
344
+ }, {
345
+ termsAndConditions: (index.h("a", { target: "_blank", href: `https://terms.advocate.impact.com/PayoutTermsAndConditions.html` }, text.termsAndConditions)),
346
+ }),
347
+ button: (index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", onClick: callbacks.onNewFormClick }, text.w9RequiredButtonText)),
348
+ alertType: "warning",
349
+ icon: "info-circle",
350
+ class: sheet.classes.WarningHoldAlertContainer,
351
+ };
352
+ }
353
+ else {
354
+ return {
355
+ header: text.payoutHoldAlertHeader,
356
+ description: global.intl.formatMessage({
357
+ id: "payoutHoldAlertDescription",
358
+ defaultMessage: text.payoutHoldAlertDescription,
359
+ }, {
360
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
361
+ }),
362
+ buttonText: null,
363
+ alertType: "warning",
364
+ icon: "exclamation-triangle",
365
+ class: sheet.classes.WarningHoldAlertContainer,
366
+ };
367
+ }
368
+ case "VERIFICATION:REQUIRED":
369
+ return {
370
+ header: text.verificationRequiredHeader,
371
+ description: global.intl.formatMessage({
372
+ id: "verificationRequiredDescription",
373
+ defaultMessage: text.verificationRequiredDescription,
374
+ }, {
375
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
376
+ }),
377
+ buttonText: text.verificationRequiredButtonText,
378
+ alertType: "warning",
379
+ icon: "exclamation-triangle",
380
+ class: sheet.classes.WarningHoldAlertContainer,
381
+ };
382
+ case "VERIFICATION:INTERNAL":
383
+ return {
384
+ header: text.verificationRequiredInternalHeader,
385
+ description: global.intl.formatMessage({
386
+ id: "verificationRequiredInternalDescription",
387
+ defaultMessage: text.verificationRequiredInternalDescription,
388
+ }, {
389
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
390
+ }),
391
+ alertType: "warning",
392
+ icon: "exclamation-triangle",
393
+ class: sheet.classes.WarningHoldAlertContainer,
394
+ };
395
+ case "VERIFICATION:REVIEW":
396
+ return {
397
+ header: text.verificationReviewInternalHeader,
398
+ description: global.intl.formatMessage({
399
+ id: "verificationReviewInternalDescription",
400
+ defaultMessage: text.verificationReviewInternalDescription,
401
+ }, {
402
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
403
+ }),
404
+ alertType: "warning",
405
+ icon: "exclamation-triangle",
406
+ class: sheet.classes.WarningHoldAlertContainer,
407
+ };
408
+ case "VERIFICATION:FAILED":
409
+ return {
410
+ header: text.verificationFailedInternalHeader,
411
+ description: global.intl.formatMessage({
412
+ id: "verificationFailedInternalDescription",
413
+ defaultMessage: text.verificationFailedInternalDescription,
414
+ }, {
415
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
416
+ }),
417
+ alertType: "error",
418
+ icon: "exclamation-octagon",
419
+ class: sheet.classes.ErrorHoldAlertContainer,
420
+ };
421
+ case "NEW_PAYEE_REVIEW":
422
+ return {
423
+ header: text.accountReviewHeader,
424
+ description: global.intl.formatMessage({
425
+ id: "accountReviewDescription",
426
+ defaultMessage: text.accountReviewDescription,
427
+ }, {
428
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
429
+ }),
430
+ buttonText: null,
431
+ alertType: "warning",
432
+ icon: "exclamation-triangle",
433
+ class: sheet.classes.WarningHoldAlertContainer,
434
+ };
435
+ case "PAYMENT_HOLD_ON_CHANGE":
436
+ return {
437
+ header: text.paymentHoldOnChangeHeader,
438
+ description: global.intl.formatMessage({
439
+ id: "accountReviewDescription",
440
+ defaultMessage: text.paymentHoldOnChangeDescription,
441
+ }, {
442
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
443
+ }),
444
+ buttonText: null,
445
+ alertType: "warning",
446
+ icon: "exclamation-triangle",
447
+ class: sheet.classes.WarningHoldAlertContainer,
448
+ };
449
+ case "BENEFICIARY_NAME_INVALID":
450
+ return {
451
+ header: text.beneficiaryNameInvalidHeader,
452
+ description: global.intl.formatMessage({
453
+ id: "accountReviewDescription",
454
+ defaultMessage: text.beneficiaryNameInvalidDescription,
455
+ }, {
456
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
457
+ }),
458
+ button: (index.h("div", { class: sheet.classes.ButtonContainer },
459
+ index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
460
+ index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
461
+ alertType: "warning",
462
+ icon: "exclamation-triangle",
463
+ class: sheet.classes.WarningHoldAlertContainer,
464
+ };
465
+ case "BENEFICIARY_NAME_MISMATCH":
466
+ return {
467
+ header: text.beneficiaryNameMismatchHeader,
468
+ description: global.intl.formatMessage({
469
+ id: "accountReviewDescription",
470
+ defaultMessage: text.beneficiaryNameMismatchDescription,
471
+ }, {
472
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
473
+ }),
474
+ button: (index.h("div", { class: sheet.classes.ButtonContainer },
475
+ index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
476
+ index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
477
+ alertType: "warning",
478
+ icon: "exclamation-triangle",
479
+ class: sheet.classes.WarningHoldAlertContainer,
480
+ };
481
+ case "BANK_TAX_NAME_MISMATCH":
482
+ return {
483
+ header: text.bankTaxNameMismatchHeader,
484
+ description: global.intl.formatMessage({
485
+ id: "accountReviewDescription",
486
+ defaultMessage: text.bankTaxNameMismatchDescription,
487
+ }, {
488
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
489
+ }),
490
+ button: (index.h("div", { class: sheet.classes.ButtonContainer },
491
+ index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
492
+ index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
493
+ alertType: "warning",
494
+ icon: "exclamation-triangle",
495
+ class: sheet.classes.WarningHoldAlertContainer,
496
+ };
497
+ case "WITHDRAWAL_SETTINGS_INVALID":
498
+ return {
499
+ header: text.withdrawalSettingsInvalidHeader,
500
+ description: global.intl.formatMessage({
501
+ id: "accountReviewDescription",
502
+ defaultMessage: text.withdrawalSettingsInvalidDescription,
503
+ }, {
504
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
505
+ }),
506
+ button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
507
+ alertType: "warning",
508
+ icon: "exclamation-triangle",
509
+ class: sheet.classes.WarningHoldAlertContainer,
510
+ };
511
+ case "PAYMENT_RETURNED":
512
+ return {
513
+ header: text.paymentReturnedHeader,
514
+ description: global.intl.formatMessage({
515
+ id: "accountReviewDescription",
516
+ defaultMessage: text.paymentReturnedDescription,
517
+ }, {
518
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
519
+ }),
520
+ button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
521
+ alertType: "error",
522
+ icon: "exclamation-triangle",
523
+ class: sheet.classes.WarningHoldAlertContainer,
524
+ };
525
+ case "HOLD":
526
+ return {
527
+ header: text.payoutHoldAlertHeader,
528
+ description: global.intl.formatMessage({
529
+ id: "payoutHoldAlertDescription",
530
+ defaultMessage: text.payoutHoldAlertDescription,
531
+ }, {
532
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
533
+ }),
534
+ buttonText: null,
535
+ alertType: "warning",
536
+ icon: "exclamation-triangle",
537
+ class: sheet.classes.WarningHoldAlertContainer,
538
+ };
539
+ default:
540
+ return;
541
+ }
542
+ }
543
+ const statusMap = {
544
+ NOT_VERIFIED: (index.h("div", { class: sheet.classes.TaxFormDetailsContainer },
545
+ index.h("sl-badge", { class: sheet.classes.WarningBadge, type: "warning", pill: true }, text.statusTextNotVerified),
546
+ index.h("p", { class: sheet.classes.SubduedText }, global.intl.formatMessage({
547
+ id: `badgeTextAwaitingReview`,
548
+ defaultMessage: text.badgeTextAwaitingReview,
549
+ }, {
550
+ dateSubmitted: states.dateSubmitted,
551
+ })))),
552
+ ACTIVE: (index.h("div", { class: sheet.classes.TaxFormDetailsContainer },
553
+ index.h("sl-badge", { class: sheet.classes.SuccessBadge, type: "success", pill: true }, text.statusTextActive),
554
+ index.h("p", { class: sheet.classes.SubduedText }, global.intl.formatMessage({
555
+ id: `badgeTextSubmittedOn`,
556
+ defaultMessage: states.documentType === "W9" || !states.documentType
557
+ ? text.badgeTextSubmittedOn
558
+ : text.badgeTextSubmittedOnW8,
559
+ }, {
560
+ dateSubmitted: states.dateSubmitted,
561
+ })))),
562
+ INACTIVE: (index.h("div", { class: sheet.classes.TaxFormDetailsContainer },
563
+ index.h("sl-badge", { class: sheet.classes.ErrorBadge, type: "danger", pill: true }, text.statusTextNotActive),
564
+ index.h("p", { class: sheet.classes.SubduedText }, text.invalidForm))),
565
+ undefined: (index.h("div", { class: sheet.classes.TaxFormDetailsContainer },
566
+ index.h("sl-badge", { type: "danger", pill: true }, text.statusTextRequired),
567
+ index.h("p", null, global.intl.formatMessage({
568
+ id: `requiredTaxForm`,
569
+ defaultMessage: text.requiredTaxForm,
570
+ }, {
571
+ taxFormType: states.documentType,
572
+ })))),
573
+ };
574
+ const alertMap = {
575
+ INACTIVE: (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", class: sheet.classes.ErrorHoldAlertContainer, type: "danger", open: true },
576
+ index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
577
+ index.h("strong", null, global.intl.formatMessage({
578
+ id: `taxAlertHeaderNotActive`,
579
+ defaultMessage: states.documentType === "W9"
580
+ ? text.taxAlertHeaderNotActiveW9
581
+ : text.taxAlertHeaderNotActiveW8,
582
+ }, {
583
+ documentType: states.documentType || "Your",
584
+ })),
585
+ index.h("br", null),
586
+ global.intl.formatMessage({
587
+ id: `taxAlertMessage`,
588
+ defaultMessage: states.documentType === "W9"
589
+ ? text.taxAlertNotActiveMessageW9
590
+ : text.taxAlertNotActiveMessageW8,
591
+ }, {
592
+ documentType: states.documentTypeString || "tax",
593
+ }))),
594
+ };
595
+ const getIndirectTaxRegisteredIn = () => {
596
+ if (states.province) {
597
+ return global.intl.formatMessage({
598
+ id: `indirectTaxInfoCanada`,
599
+ defaultMessage: text.indirectTaxInfoCanada,
600
+ }, {
601
+ country: "Canada",
602
+ province: states.province,
603
+ });
604
+ }
605
+ else if (states.subRegion) {
606
+ return global.intl.formatMessage({
607
+ id: `indirectTaxInfoSpain`,
608
+ defaultMessage: text.indirectTaxInfoSpain,
609
+ }, {
610
+ country: states.country,
611
+ subRegion: states.subRegion,
612
+ });
613
+ }
614
+ else {
615
+ return global.intl.formatMessage({
616
+ id: `indirectTaxInfoOtherCountry`,
617
+ defaultMessage: text.indirectTaxInfoOtherCountry,
618
+ }, {
619
+ country: states.country,
620
+ });
621
+ }
622
+ };
623
+ const alertInfo = getAlert(states.payoutStatus);
624
+ const dropdownHover = (el) => {
625
+ var _a;
626
+ if (!el)
627
+ return;
628
+ const trigger = el.querySelector('[slot="trigger"]');
629
+ const panel = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dropdown__panel");
630
+ if (!trigger || !panel)
631
+ return;
632
+ let hideTimeout;
633
+ const show = () => {
634
+ clearTimeout(hideTimeout);
635
+ el.show();
636
+ };
637
+ const scheduleHide = () => {
638
+ hideTimeout = setTimeout(() => el.hide(), 100);
639
+ };
640
+ trigger.addEventListener("mouseenter", show);
641
+ trigger.addEventListener("mouseleave", scheduleHide);
642
+ panel.addEventListener("mouseenter", show);
643
+ panel.addEventListener("mouseleave", scheduleHide);
644
+ return () => {
645
+ trigger.removeEventListener("mouseenter", show);
646
+ trigger.removeEventListener("mouseleave", scheduleHide);
647
+ panel.removeEventListener("mouseenter", show);
648
+ panel.removeEventListener("mouseleave", scheduleHide);
649
+ clearTimeout(hideTimeout);
650
+ };
651
+ };
652
+ return (index.h("div", null,
653
+ index.h("div", null,
654
+ index.h("style", { type: "text/css" },
655
+ styleString,
656
+ vanillaStyle),
657
+ states.loadingError && (index.h("div", null,
658
+ index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.ErrorAlertContainer },
659
+ index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
660
+ index.h("strong", null, text.error.loadingErrorAlertHeader),
661
+ index.h("br", null),
662
+ global.intl.formatMessage({
663
+ id: "loadingErrorAlertDescription",
664
+ defaultMessage: text.error.loadingErrorAlertDescription,
665
+ }, {
666
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
667
+ })))),
668
+ ((_a = states.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.ErrorAlertContainer },
669
+ index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
670
+ index.h("strong", null, text.error.generalTitle),
671
+ index.h("br", null),
672
+ global.intl.formatMessage({
673
+ id: "generalDescription",
674
+ defaultMessage: text.error.generalDescription,
675
+ }, {
676
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
677
+ }))),
678
+ alertInfo && (index.h("sqm-form-message", { loading: states.loading, exportparts: "base: alert-base, icon:alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
679
+ index.h("strong", null, alertInfo.header),
680
+ index.h("p", { style: { margin: "0" } }, alertInfo.description),
681
+ alertInfo.buttonText && (index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
682
+ alertInfo.button ? (alertInfo.button) : (index.h("div", { style: { display: "none" } })))),
683
+ index.h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
684
+ index.h("p", null, text.replaceTaxFormModalBodyText),
685
+ index.h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
686
+ index.h("sl-button", { slot: "footer", type: "default", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
687
+ states.status === "INACTIVE" && alertMap[states.status],
688
+ index.h("div", null,
689
+ index.h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
690
+ index.h("div", { class: sheet.classes.BankingInformationContainer },
691
+ slots.payoutDetailsCardSlot,
692
+ !states.loading && (index.h("p", { class: sheet.classes.DescriptionText }, text.payoutFromImpact)),
693
+ states.canEditPayoutInfo && (index.h("sl-button", { disabled: states.disabled || states.loading, exportparts: "base: secondarybutton-base", type: "secondary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
694
+ (!states.noFormNeeded || !!states.status) && (index.h("div", { class: sheet.classes.TaxDocumentsContainer },
695
+ index.h("div", null, states.loading ? (index.h("div", { class: sheet.classes.TaxSectionSkeletonContainer },
696
+ index.h("sqm-skeleton", { width: "15%", height: "10px" }),
697
+ index.h("sqm-skeleton", { width: "25%", height: "24px" }))) : (index.h("div", null,
698
+ index.h("div", null,
699
+ index.h("span", { class: sheet.classes.TaxFormDetailsContainer },
700
+ index.h("div", { class: sheet.classes.StatusContainer },
701
+ index.h("h3", null, states.documentType
702
+ ? global.intl.formatMessage({
703
+ id: "section-subheader",
704
+ defaultMessage: text.taxDocumentSectionSubHeader,
705
+ }, {
706
+ documentType: states.documentTypeString,
707
+ })
708
+ : text.taxDocumentSectionSubHeaderNoDocument),
709
+ index.h("span", { class: sheet.classes.StatusAlert }, statusMap[states.status]))),
710
+ (!states.noFormNeeded || !!states.status) &&
711
+ states.status !== "NOT_VERIFIED" && (index.h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
712
+ index.h("div", { class: sheet.classes.IndirectTaxPreviewContainer }, states.loading ? (index.h("div", { class: sheet.classes.TaxSectionSkeletonContainer },
713
+ index.h("sqm-skeleton", { width: "15%", height: "10px" }),
714
+ index.h("sqm-skeleton", { width: "25%", height: "24px" }))) : (index.h("div", null,
715
+ index.h("h3", { class: sheet.classes.IndirectTaxPreviewHeaderContainer },
716
+ text.indirectTaxInfoSectionHeader,
717
+ index.h("sl-dropdown", { placement: "right", distance: 1, ref: dropdownHover, class: sheet.classes.DropdownTooltipContainer },
718
+ index.h("sl-icon", { slot: "trigger", name: "info-circle", class: sheet.classes.ToolTip, style: { cursor: "pointer" } }),
719
+ index.h("div", { class: sheet.classes.DropdownContent },
720
+ index.h("div", { class: sheet.classes.DropdownArrow }),
721
+ global.intl.formatMessage({
722
+ id: "indirectTaxTooltipSupport",
723
+ defaultMessage: text.indirectTaxTooltipSupport,
724
+ }, {
725
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet.classes.DropdownLink }, text.supportLink)),
726
+ })))),
727
+ index.h("div", { class: sheet.classes.IndirectTaxPreviewDetails },
728
+ index.h("span", null, states.notRegistered ? (index.h("span", { class: sheet.classes.NotRegisteredIndirectTaxText }, global.intl.formatMessage({
729
+ id: "notRegisteredForTax",
730
+ defaultMessage: text.notRegisteredForTax,
731
+ }, {
732
+ supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
733
+ }))) : (getIndirectTaxRegisteredIn())),
734
+ !states.notRegistered && (index.h("div", { class: sheet.classes.TaxNumberContainer },
735
+ index.h("span", null, global.intl.formatMessage({
736
+ id: `indirectTaxDetails`,
737
+ defaultMessage: text.indirectTaxDetails,
738
+ }, {
739
+ indirectTaxType: states.indirectTaxType,
740
+ indirectTaxNumber: states.indirectTaxNumber,
741
+ })),
742
+ index.h("span", null,
743
+ states.qstNumber &&
744
+ global.intl.formatMessage({
745
+ id: `qstNumber`,
746
+ defaultMessage: text.qstNumber,
747
+ }, {
748
+ qstNumber: states.qstNumber,
749
+ }),
750
+ states.subRegionTaxNumber &&
751
+ global.intl.formatMessage({
752
+ id: `subRegionTaxNumber`,
753
+ defaultMessage: text.subRegionTaxNumber,
754
+ }, {
755
+ subRegionTaxNumber: states.subRegionTaxNumber,
756
+ })))),
757
+ !states.notRegistered && (index.h("div", { class: sheet.classes.InvoiceTableContainer },
758
+ index.h("sqm-invoice-table", { description: text.invoiceDescription, "prev-label": text.invoicePrevLabel, "more-label": text.invoiceMoreLabel, header: text.invoiceHeader, "empty-state-header": text.invoiceEmptyStateHeader, "empty-state-text": text.invoiceEmptyStateText },
759
+ index.h("sqm-invoice-table-download-column", null),
760
+ index.h("sqm-invoice-table-date-column", { "column-title": text.dateColumnTitle }),
761
+ index.h("sqm-invoice-table-data-column", { "column-title": text.invoiceColumnTitle, property: "invoiceId" }),
762
+ index.h("sqm-invoice-table-data-column", { "column-title": text.earningsColumnTitle, property: "earnings" }),
763
+ index.h("sqm-invoice-table-data-column", { "column-title": text.indirectTaxColumnTitle, property: "indirectTax" }),
764
+ index.h("sqm-invoice-table-data-column", { "column-title": text.earningsAfterTaxColumnTitle, property: "netEarnings" })))))))))));
765
+ };
766
+
63
767
  const vatLabels = {
64
768
  GB: "VAT",
65
769
  AU: "GST",
@@ -111,7 +815,7 @@ const vatLabels = {
111
815
  RU: "VAT",
112
816
  };
113
817
 
114
- const style$1 = {
818
+ const style$2 = {
115
819
  Container: {
116
820
  width: "100%",
117
821
  },
@@ -155,9 +859,9 @@ const style$1 = {
155
859
  },
156
860
  },
157
861
  };
158
- const sheet = JSS.createStyleSheet(style$1);
159
- const styleString = sheet.toString();
160
- const vanillaStyle = `
862
+ const sheet$1 = JSS.createStyleSheet(style$2);
863
+ const styleString$1 = sheet$1.toString();
864
+ const vanillaStyle$1 = `
161
865
  :host{
162
866
  display: block;
163
867
  }
@@ -184,7 +888,7 @@ const vanillaStyle = `
184
888
  const OtherRegionSlotView = (props) => {
185
889
  var _a, _b, _c;
186
890
  const { states, states: { formState }, callbacks, text, } = props;
187
- const { classes } = sheet;
891
+ const { classes } = sheet$1;
188
892
  const getTaxFieldLabel = (taxType) => {
189
893
  return global.intl.formatMessage({
190
894
  id: `tax-field-label${taxType}`,
@@ -209,29 +913,29 @@ const OtherRegionSlotView = (props) => {
209
913
  return (index.h("div", { class: classes.ConditionalInputsContainer },
210
914
  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) && {
211
915
  class: classes.ErrorInput,
212
- helpText: utils.formatErrorMessage(text.subRegion, text.error.fieldRequiredError),
916
+ helpText: subregions.formatErrorMessage(text.subRegion, text.error.fieldRequiredError),
213
917
  }), { id: "subRegion", name: "/subRegion" }), props.data.esRegions.map((r) => (index.h("sl-menu-item", { value: r.regionCode }, r.displayName)))),
214
918
  index.h(IndirectTaxNumberInput, { name: "indirectTaxNumber", label: getTaxFieldLabel("VAT"), error: getTaxFieldError("VAT") }),
215
919
  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),
216
920
  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) && {
217
921
  class: classes.ErrorInput,
218
- helpText: utils.formatErrorMessage(text.subRegionTaxNumberLabel, text.error.fieldRequiredError),
922
+ helpText: subregions.formatErrorMessage(text.subRegionTaxNumberLabel, text.error.fieldRequiredError),
219
923
  }), { id: "subRegionTaxNumber", name: "/subRegionTaxNumber" })))));
220
924
  };
221
925
  const CanadaFields = () => {
222
926
  var _a, _b;
223
- const { classes } = sheet;
224
- const currentTaxType = (_a = utils.INDIRECT_TAX_PROVINCES === null || utils.INDIRECT_TAX_PROVINCES === void 0 ? void 0 : utils.INDIRECT_TAX_PROVINCES.find((p) => p.regionCode === formState.province)) === null || _a === void 0 ? void 0 : _a.taxType;
927
+ const { classes } = sheet$1;
928
+ const currentTaxType = (_a = subregions.INDIRECT_TAX_PROVINCES === null || subregions.INDIRECT_TAX_PROVINCES === void 0 ? void 0 : subregions.INDIRECT_TAX_PROVINCES.find((p) => p.regionCode === formState.province)) === null || _a === void 0 ? void 0 : _a.taxType;
225
929
  return (index.h("div", { class: classes.ConditionalInputsContainer },
226
930
  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) && {
227
931
  class: classes.ErrorInput,
228
- helpText: utils.formatErrorMessage(text.province, text.error.fieldRequiredError),
932
+ helpText: subregions.formatErrorMessage(text.province, text.error.fieldRequiredError),
229
933
  }), { id: "province", name: "/province" }), props.data.provinces.map((p) => (index.h("sl-menu-item", { value: p.regionCode }, p.displayName)))),
230
934
  currentTaxType === "GST" && (index.h(IndirectTaxNumberInput, { label: getTaxFieldLabel("GST"), error: getTaxFieldError("GST"), name: "indirectTaxNumber" })),
231
935
  currentTaxType === "HST" && (index.h(IndirectTaxNumberInput, { label: getTaxFieldLabel("HST"), error: getTaxFieldError("HST"), name: "indirectTaxNumber" })),
232
936
  formState.province === "QUEBEC" && (index.h("div", { class: classes.ConditionalInputsContainer },
233
937
  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),
234
- formState.hasQst && (index.h(IndirectTaxNumberInput, { name: "qstNumber", label: text.qstNumber, error: utils.formatErrorMessage(text.qstNumber, text.error.fieldRequiredError) }))))));
938
+ formState.hasQst && (index.h(IndirectTaxNumberInput, { name: "qstNumber", label: text.qstNumber, error: subregions.formatErrorMessage(text.qstNumber, text.error.fieldRequiredError) }))))));
235
939
  };
236
940
  const getActiveForm = (selectedRegion) => {
237
941
  var _a;
@@ -251,13 +955,13 @@ const OtherRegionSlotView = (props) => {
251
955
  return (index.h("div", { style: states.hide ? { display: "none" } : {} },
252
956
  index.h("form", { class: classes.Container },
253
957
  index.h("style", { type: "text/css" },
254
- styleString,
255
- vanillaStyle),
958
+ styleString$1,
959
+ vanillaStyle$1),
256
960
  index.h("hr", { class: classes.HR }),
257
961
  index.h("div", { class: classes.InputContainer },
258
962
  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) && {
259
963
  class: classes.ErrorInput,
260
- helpText: utils.formatErrorMessage(text.selectedRegion, text.error.fieldRequiredError),
964
+ helpText: subregions.formatErrorMessage(text.selectedRegion, text.error.fieldRequiredError),
261
965
  }), { id: "selectedRegion", name: "/selectedRegion" }),
262
966
  index.h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCountryText, onKeyDown: (e) => {
263
967
  // Stop shoelace intercepting key presses
@@ -1242,7 +1946,7 @@ const PHONE_EXTENSIONS = {
1242
1946
  },
1243
1947
  };
1244
1948
 
1245
- const style$2 = {
1949
+ const style$3 = {
1246
1950
  FormWrapper: {},
1247
1951
  ErrorInput: {
1248
1952
  "&::part(base)": {
@@ -1317,9 +2021,9 @@ const style$2 = {
1317
2021
  },
1318
2022
  },
1319
2023
  };
1320
- const sheet$1 = JSS.createStyleSheet(style$2);
1321
- const styleString$1 = sheet$1.toString();
1322
- const vanillaStyle$1 = `
2024
+ const sheet$2 = JSS.createStyleSheet(style$3);
2025
+ const styleString$2 = sheet$2.toString();
2026
+ const vanillaStyle$2 = `
1323
2027
  :host{
1324
2028
  display: block;
1325
2029
  }
@@ -1503,7 +2207,7 @@ const vanillaStyle$1 = `
1503
2207
  const UserInfoFormView = (props) => {
1504
2208
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1505
2209
  const { states, states: { formState }, callbacks, text, refs, data: data$1, } = props;
1506
- const { classes } = sheet$1;
2210
+ const { classes } = sheet$2;
1507
2211
  const bankingCollectionText = global.intl.formatMessage({
1508
2212
  id: "bankingCollectionText",
1509
2213
  defaultMessage: text.allowBankingCollection,
@@ -1539,8 +2243,8 @@ const UserInfoFormView = (props) => {
1539
2243
  }
1540
2244
  return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
1541
2245
  index.h("style", { type: "text/css" },
1542
- styleString$1,
1543
- vanillaStyle$1),
2246
+ styleString$2,
2247
+ vanillaStyle$2),
1544
2248
  states.loadingError && (index.h("div", null,
1545
2249
  index.h("sqm-form-message", { type: "error" },
1546
2250
  index.h("p", { part: "alert-title" }, text.error.loadingErrorAlertHeader),
@@ -1550,7 +2254,7 @@ const UserInfoFormView = (props) => {
1550
2254
  }, {
1551
2255
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
1552
2256
  }))))),
1553
- states.loading ? (index.h(utils.LoadingView, null)) : (index.h("div", null,
2257
+ states.loading ? (index.h(subregions.LoadingView, null)) : (index.h("div", null,
1554
2258
  index.h("div", { class: classes.TextContainer },
1555
2259
  index.h("div", null,
1556
2260
  !states.hideSteps && (index.h("p", null, global.intl.formatMessage({
@@ -1571,18 +2275,18 @@ const UserInfoFormView = (props) => {
1571
2275
  index.h("div", { class: classes.InputContainer },
1572
2276
  index.h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || isDisabledUserInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
1573
2277
  class: classes.ErrorInput,
1574
- helpText: utils.formatErrorMessage(text.firstName, formState.errors.firstName),
2278
+ helpText: subregions.formatErrorMessage(text.firstName, formState.errors.firstName),
1575
2279
  }
1576
2280
  : {}), { id: "firstName", name: "/firstName", required: true })),
1577
2281
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || isDisabledUserInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
1578
2282
  class: classes.ErrorInput,
1579
- helpText: utils.formatErrorMessage(text.lastName, formState.errors.lastName),
2283
+ helpText: subregions.formatErrorMessage(text.lastName, formState.errors.lastName),
1580
2284
  }
1581
2285
  : {}), { id: "lastName", name: "/lastName", required: true })),
1582
2286
  index.h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
1583
2287
  index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledPartnerInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
1584
2288
  class: classes.ErrorInput,
1585
- helpText: utils.formatErrorMessage(text.country, formState.errors.countryCode),
2289
+ helpText: subregions.formatErrorMessage(text.country, formState.errors.countryCode),
1586
2290
  }
1587
2291
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("countryCode", e) }),
1588
2292
  index.h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCountryText, onKeyDown: (e) => {
@@ -1621,42 +2325,42 @@ const UserInfoFormView = (props) => {
1621
2325
  })),
1622
2326
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: ({ value }) => {
1623
2327
  // Naive phone number validation
1624
- utils.validateBillingField(/[a-zA-Z]+/, value) &&
1625
- utils.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
2328
+ subregions.validateBillingField(/[a-zA-Z]+/, value) &&
2329
+ subregions.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
1626
2330
  }, disabled: states.disabled || isDisabledPartnerInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
1627
2331
  class: classes.ErrorInput,
1628
- helpText: utils.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
2332
+ helpText: subregions.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
1629
2333
  }
1630
2334
  : {}), { required: true })))),
1631
2335
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
1632
2336
  // Checks for non-ASCII characters
1633
- !utils.validateBillingField(/^[\x20-\xFF]+$/, value) &&
1634
- utils.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
2337
+ !subregions.validateBillingField(/^[\x20-\xFF]+$/, value) &&
2338
+ subregions.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
1635
2339
  class: classes.ErrorInput,
1636
- helpText: utils.formatErrorMessage(text.address, formState.errors.address),
2340
+ helpText: subregions.formatErrorMessage(text.address, formState.errors.address),
1637
2341
  }
1638
2342
  : {}), { required: true })),
1639
2343
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
1640
2344
  // Checks for non-ASCII characters
1641
- !utils.validateBillingField(/^[\x20-\xFF]+$/, value) &&
1642
- utils.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
2345
+ !subregions.validateBillingField(/^[\x20-\xFF]+$/, value) &&
2346
+ subregions.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
1643
2347
  class: classes.ErrorInput,
1644
- helpText: utils.formatErrorMessage(text.city, formState.errors.city),
2348
+ helpText: subregions.formatErrorMessage(text.city, formState.errors.city),
1645
2349
  }
1646
2350
  : {}), { required: true })),
1647
2351
  !states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledPartnerInput("billingState") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
1648
2352
  class: classes.ErrorInput,
1649
- helpText: utils.formatErrorMessage(text.state, formState.errors.state),
2353
+ helpText: subregions.formatErrorMessage(text.state, formState.errors.state),
1650
2354
  }
1651
2355
  : {}), { required: true }), (_p = data$1.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
1652
2356
  index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledPartnerInput("billingPostalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
1653
2357
  class: classes.ErrorInput,
1654
- helpText: utils.formatErrorMessage(text.postalCode, formState.errors.postalCode),
2358
+ helpText: subregions.formatErrorMessage(text.postalCode, formState.errors.postalCode),
1655
2359
  }
1656
2360
  : {}), { required: true })),
1657
2361
  index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledPartnerInput("currency") }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
1658
2362
  class: classes.ErrorInput,
1659
- helpText: utils.formatErrorMessage(text.currency, formState.errors.currency),
2363
+ helpText: subregions.formatErrorMessage(text.currency, formState.errors.currency),
1660
2364
  }
1661
2365
  : {}), { required: true, ref: (el) => (refs.currencyRef.current = el) }),
1662
2366
  index.h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCurrencyText, onKeyDown: (e) => {
@@ -1678,5 +2382,6 @@ const UserInfoFormView = (props) => {
1678
2382
 
1679
2383
  exports.InvoiceTableView = InvoiceTableView;
1680
2384
  exports.OtherRegionSlotView = OtherRegionSlotView;
2385
+ exports.TaxAndCashDashboardView = TaxAndCashDashboardView;
1681
2386
  exports.UserInfoFormView = UserInfoFormView;
1682
2387
  exports.vatLabels = vatLabels;