@saasquatch/mint-components 2.3.0-6 → 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 (58) 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 +16 -31
  4. package/dist/cjs/sqm-stencilbook.cjs.entry.js +253 -76
  5. package/dist/cjs/{sqm-user-info-form-view-0e1ddbe4.js → sqm-user-info-form-view-42323dc5.js} +743 -38
  6. package/dist/cjs/{useIndirectTaxForm-c3c1ec56.js → useIndirectTaxForm-d1cd23f7.js} +5 -5
  7. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +16 -31
  8. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  9. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +6 -0
  10. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +13 -2
  11. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +151 -0
  12. package/dist/esm/sqm-banking-info-form_10.entry.js +16 -709
  13. package/dist/esm/sqm-big-stat_47.entry.js +2 -2
  14. package/dist/esm/sqm-email-verification_2.entry.js +16 -31
  15. package/dist/esm/sqm-stencilbook.entry.js +217 -40
  16. package/dist/esm/{sqm-user-info-form-view-e1ba6009.js → sqm-user-info-form-view-dc473cb8.js} +721 -17
  17. package/dist/esm/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  18. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  19. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  20. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  21. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  22. package/dist/esm-es5/sqm-user-info-form-view-dc473cb8.js +1 -0
  23. package/dist/esm-es5/subregions-24c1c137.js +1 -0
  24. package/dist/esm-es5/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  25. package/dist/mint-components/mint-components.esm.js +1 -1
  26. package/dist/mint-components/p-1f387c7b.system.js +1 -1
  27. package/dist/mint-components/{p-abe9f5b1.js → p-2e462dd9.js} +5 -5
  28. package/dist/mint-components/{p-b419f9ac.entry.js → p-3c052d3d.entry.js} +1 -1
  29. package/dist/mint-components/p-3f68e4e3.js +1 -0
  30. package/dist/mint-components/{p-a38eece5.system.entry.js → p-4575f71b.system.entry.js} +1 -1
  31. package/dist/mint-components/{p-e7f09044.entry.js → p-459c4251.entry.js} +6 -31
  32. package/dist/mint-components/p-547f8243.system.entry.js +1 -0
  33. package/dist/mint-components/p-66cb8bec.system.js +1 -0
  34. package/dist/mint-components/p-b21c53cb.system.entry.js +1 -0
  35. package/dist/mint-components/p-c2903e7d.entry.js +83 -0
  36. package/dist/mint-components/p-cb58a2c6.js +1 -0
  37. package/dist/mint-components/p-d30c8cb3.entry.js +9 -0
  38. package/dist/mint-components/p-df74f653.system.entry.js +1 -0
  39. package/dist/mint-components/p-ec58628f.system.js +1 -0
  40. package/dist/mint-components/{p-58c24352.system.js → p-ed945efe.system.js} +1 -1
  41. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -1
  42. package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +1 -0
  43. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +19 -0
  44. package/docs/docs.docx +0 -0
  45. package/package.json +1 -1
  46. package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +0 -1
  47. package/dist/esm-es5/utils-4f5cd04c.js +0 -1
  48. package/dist/mint-components/p-12d11abc.system.entry.js +0 -1
  49. package/dist/mint-components/p-1e6a2945.js +0 -1
  50. package/dist/mint-components/p-88e427ac.system.entry.js +0 -1
  51. package/dist/mint-components/p-a0eb0331.entry.js +0 -9
  52. package/dist/mint-components/p-b222bace.system.entry.js +0 -1
  53. package/dist/mint-components/p-b96ed8eb.js +0 -1
  54. package/dist/mint-components/p-cdabd9de.system.js +0 -1
  55. package/dist/mint-components/p-ebc519bc.system.js +0 -1
  56. package/dist/mint-components/p-ffcebe78.entry.js +0 -83
  57. package/dist/cjs/{utils-a3b3d05b.js → subregions-e7273457.js} +44 -44
  58. package/dist/esm/{utils-4f5cd04c.js → subregions-24c1c137.js} +44 -44
@@ -1,7 +1,7 @@
1
1
  import { h } from './index-38ad4957.js';
2
2
  import { i as intl } from './global-75e96214.js';
3
3
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
- import { f as formatErrorMessage, a as INDIRECT_TAX_PROVINCES, L as LoadingView, v as validateBillingField } from './utils-4f5cd04c.js';
4
+ import { f as formatErrorMessage, a as INDIRECT_TAX_PROVINCES, L as LoadingView, v as validateBillingField } from './subregions-24c1c137.js';
5
5
  import { F as FORM_STEPS } from './data-8698cbc6.js';
6
6
 
7
7
  const style = {
@@ -58,6 +58,710 @@ function InvoiceTableView(props, children) {
58
58
  children))));
59
59
  }
60
60
 
61
+ const style$1 = {
62
+ ErrorAlertContainer: {
63
+ "&::part(base)": {
64
+ backgroundColor: "var(--sl-color-red-100)",
65
+ borderTop: "none",
66
+ },
67
+ },
68
+ WarningAlertContainer: {
69
+ "&::part(base)": {
70
+ backgroundColor: "var(--sl-color-yellow-100)",
71
+ borderTop: "none",
72
+ maxWidth: "600px",
73
+ },
74
+ },
75
+ WarningHoldAlertContainer: {
76
+ marginLeft: "-20px",
77
+ "&::part(base)": {
78
+ maxWidth: "850px",
79
+ border: "none",
80
+ backgroundColor: "transparent",
81
+ color: "var(--sqm-text)",
82
+ },
83
+ "& sl-icon::part(base)": {
84
+ color: "var(--sqm-warning-color-icon)",
85
+ },
86
+ },
87
+ ErrorHoldAlertContainer: {
88
+ marginLeft: "-20px",
89
+ "&::part(base)": {
90
+ maxWidth: "850px",
91
+ border: "none",
92
+ backgroundColor: "transparent",
93
+ color: "var(--sqm-text)",
94
+ },
95
+ "& sl-icon::part(base)": {
96
+ color: "var(--sqm-danger-color-icon)",
97
+ },
98
+ },
99
+ ExpiringSoonAlertContainer: {
100
+ "&::part(base)": {
101
+ backgroundColor: "var(--sl-color-yellow-100)",
102
+ borderTop: "none",
103
+ },
104
+ },
105
+ BankingInformationContainer: {
106
+ maxWidth: "700px",
107
+ },
108
+ IndirectTaxPreviewContainer: {
109
+ marginTop: "var(--sl-spacing-x-large)",
110
+ borderTop: "1px solid var(--sl-color-neutral-200)",
111
+ },
112
+ IndirectTaxPreviewHeaderContainer: {
113
+ marginTop: "var(--sl-spacing-large)",
114
+ marginBottom: "var(--sl-spacing-xx-small)",
115
+ margin: "0",
116
+ display: "flex",
117
+ alignItems: "center",
118
+ gap: "var(--sl-spacing-x-small)",
119
+ "&::part(base)": {
120
+ color: "var(--sqm-text)",
121
+ },
122
+ },
123
+ IndirectTaxPreviewDetails: {
124
+ gap: "var(--sl-spacing-x-small)",
125
+ display: "flex",
126
+ flexDirection: "column",
127
+ lineHeight: "var(--sl-spacing-medium)",
128
+ fontSize: "var(--sl-font-size-small)",
129
+ color: "var(--sqm-text-subdued)",
130
+ },
131
+ InvoiceTableContainer: {
132
+ marginTop: "var(--sl-spacing-medium)",
133
+ },
134
+ NotRegisteredIndirectTaxText: {
135
+ color: "var(--sqm-text-subdued)",
136
+ },
137
+ TaxDocumentsContainer: {
138
+ marginTop: "var(--sl-spacing-xx-large)",
139
+ borderTop: "1px solid var(--sl-color-neutral-200)",
140
+ },
141
+ TaxDocumentsSectionHeaderContainer: {
142
+ marginTop: "var(--sl-spacing-x-large)",
143
+ marginBottom: "var(--sl-spacing-xx-small)",
144
+ },
145
+ StatusContainer: {
146
+ marginTop: "var(--sl-spacing-x-large)",
147
+ display: "flex",
148
+ flexDirection: "column",
149
+ gap: "var(--sl-spacing-x-small)",
150
+ "& h3": {
151
+ margin: "0",
152
+ },
153
+ "& p": {
154
+ margin: "0",
155
+ paddingTop: "2px",
156
+ },
157
+ },
158
+ StatusAlert: {
159
+ fontSize: "var(--sl-font-size-small)",
160
+ },
161
+ TaxFormDetailsContainer: {
162
+ display: "flex",
163
+ gap: "var(--sl-spacing-small)",
164
+ alignItems: "center",
165
+ },
166
+ NewFormButton: {
167
+ marginTop: "var(--sl-spacing-large)",
168
+ maxWidth: "300px",
169
+ },
170
+ EditBankDetailsButton: {
171
+ marginTop: "var(--sl-spacing-large)",
172
+ },
173
+ TaxSectionSkeletonContainer: {
174
+ display: "flex",
175
+ flexDirection: "column",
176
+ marginTop: "var(--sl-spacing-x-large)",
177
+ },
178
+ TaxDocSubtext: {
179
+ margin: "0",
180
+ color: "var(--sqm-text-subdued)",
181
+ lineHeight: "var(--sl-spacing-medium)",
182
+ fontSize: "var(--sl-font-size-small)",
183
+ marginLeft: "1px",
184
+ },
185
+ TooltipContainer: {
186
+ display: "flex",
187
+ textAlign: "center",
188
+ width: "250px",
189
+ "&::part(body)": {
190
+ pointerEvents: "auto",
191
+ },
192
+ },
193
+ ToolTip: {
194
+ top: "6px",
195
+ width: "16px",
196
+ height: "16px",
197
+ },
198
+ TaxNumberContainer: {
199
+ display: "flex",
200
+ flexDirection: "column",
201
+ gap: "6px",
202
+ },
203
+ DescriptionText: {
204
+ color: "var(--sqm-text-subdued)",
205
+ fontSize: "var(--sl-font-size-x-small)",
206
+ marginBottom: "none",
207
+ maxWidth: "492px",
208
+ },
209
+ PageDescriptionText: {
210
+ color: "var(--sqm-text-subdued)",
211
+ fontSize: "var(--sl-font-size-medium)",
212
+ marginTop: "0",
213
+ },
214
+ Dialog: {
215
+ "&::part(panel)": {
216
+ maxWidth: "420px",
217
+ },
218
+ "&::part(close-button)": {
219
+ marginBottom: "var(--sl-spacing-xx-large)",
220
+ },
221
+ "&::part(title)": {
222
+ fontSize: "var(--sl-font-size-x-large)",
223
+ fontWeight: "600",
224
+ marginTop: "var(--sl-spacing-xxx-large)",
225
+ padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
226
+ },
227
+ "&::part(body)": {
228
+ padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
229
+ fontSize: "var(--sl-font-size-small)",
230
+ },
231
+ "&::part(footer)": {
232
+ display: "flex",
233
+ flexDirection: "column",
234
+ gap: "var(--sl-spacing-small)",
235
+ marginBottom: "var(--sl-spacing-xx-small)",
236
+ alignItems: "center",
237
+ flex: "1",
238
+ },
239
+ },
240
+ DialogButton: { margin: "auto", width: "100%" },
241
+ SuccessBadge: {
242
+ "&::part(base)": {
243
+ textAlign: "center",
244
+ whiteSpace: "pre-line",
245
+ background: "var(--sqm-success-color-icon)",
246
+ },
247
+ },
248
+ WarningBadge: {
249
+ "&::part(base)": {
250
+ textAlign: "center",
251
+ whiteSpace: "pre-line",
252
+ background: "var(--sqm-warning-color-icon)",
253
+ },
254
+ },
255
+ ErrorBadge: {
256
+ "&::part(base)": {
257
+ textAlign: "center",
258
+ whiteSpace: "pre-line",
259
+ background: "var(--sqm-danger-color-icon)",
260
+ },
261
+ },
262
+ SubduedText: {
263
+ color: "var(--sqm-text-subdued)",
264
+ },
265
+ ButtonContainer: {
266
+ display: "flex",
267
+ gap: "var(--sl-spacing-medium)",
268
+ flexWrap: "wrap",
269
+ },
270
+ DropdownTooltipContainer: {
271
+ top: "-4px",
272
+ "&::part(panel)": {
273
+ boxShadow: "none",
274
+ border: "none",
275
+ marginTop: "var(--sl-spacing-x-small)",
276
+ },
277
+ },
278
+ DropdownContent: {
279
+ padding: "var(--sl-spacing-xxx-small) var(--sl-spacing-x-small)",
280
+ fontSize: "var(--sl-font-size-small)",
281
+ fontFamily: "var(--sl-font-sans)",
282
+ fontWeight: "var(--sl-font-weight-normal)",
283
+ lineHeight: "var(--sl-line-height-dense)",
284
+ minWidth: "225px",
285
+ backgroundColor: "var(--sl-color-gray-900)",
286
+ color: "var(--sl-color-white)",
287
+ borderRadius: "var(--sl-border-radius-medium)",
288
+ position: "relative",
289
+ marginLeft: "5px",
290
+ },
291
+ DropdownArrow: {
292
+ position: "absolute",
293
+ left: "-5px",
294
+ top: "50%",
295
+ transform: "translateY(-50%)",
296
+ width: "0",
297
+ height: "0",
298
+ borderTop: "5px solid transparent",
299
+ borderBottom: "5px solid transparent",
300
+ borderRight: "5px solid var(--sl-color-gray-900)",
301
+ zIndex: "1",
302
+ },
303
+ DropdownLink: {
304
+ color: "var(--sl-color-white)",
305
+ textDecoration: "underline",
306
+ },
307
+ };
308
+ const sheet = createStyleSheet(style$1);
309
+ const styleString = sheet.toString();
310
+ const vanillaStyle = `
311
+ :host{
312
+ display: block;
313
+ }
314
+
315
+ sl-button[type="secondary"]::part(base) {
316
+ font-family: var(--sqm-primary-font);
317
+ background-color: var(--sqm-secondary-button-background);
318
+ color: var(--sqm-secondary-button-color);
319
+ border-color: var(--sqm-secondary-button-color-border);
320
+ border-radius: var(--sqm-secondary-button-radius);
321
+ }
322
+
323
+ sl-button[type="secondary"]::part(base):hover {
324
+ background-color: var(--sqm-secondary-button-background-hover);
325
+ color: var(--sqm-secondary-button-color-hover);
326
+ border-color: var(--sqm-secondary-button-border-color-hover);
327
+ }
328
+
329
+ `;
330
+ const TaxAndCashDashboardView = (props) => {
331
+ var _a;
332
+ const { states, text, callbacks, slots } = props;
333
+ function getAlert(status) {
334
+ switch (status) {
335
+ case "OVER_W9_THRESHOLD":
336
+ if (states.enforceUsTaxComplianceOption === "CASH_ONLY_DEFER_W9") {
337
+ return {
338
+ header: text.w9RequiredHeader,
339
+ description: intl.formatMessage({
340
+ id: "w9RequiredDescription",
341
+ defaultMessage: text.w9RequiredDescription,
342
+ }, {
343
+ termsAndConditions: (h("a", { target: "_blank", href: `https://terms.advocate.impact.com/PayoutTermsAndConditions.html` }, text.termsAndConditions)),
344
+ }),
345
+ button: (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", onClick: callbacks.onNewFormClick }, text.w9RequiredButtonText)),
346
+ alertType: "warning",
347
+ icon: "info-circle",
348
+ class: sheet.classes.WarningHoldAlertContainer,
349
+ };
350
+ }
351
+ else {
352
+ return {
353
+ header: text.payoutHoldAlertHeader,
354
+ description: intl.formatMessage({
355
+ id: "payoutHoldAlertDescription",
356
+ defaultMessage: text.payoutHoldAlertDescription,
357
+ }, {
358
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
359
+ }),
360
+ buttonText: null,
361
+ alertType: "warning",
362
+ icon: "exclamation-triangle",
363
+ class: sheet.classes.WarningHoldAlertContainer,
364
+ };
365
+ }
366
+ case "VERIFICATION:REQUIRED":
367
+ return {
368
+ header: text.verificationRequiredHeader,
369
+ description: intl.formatMessage({
370
+ id: "verificationRequiredDescription",
371
+ defaultMessage: text.verificationRequiredDescription,
372
+ }, {
373
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
374
+ }),
375
+ buttonText: text.verificationRequiredButtonText,
376
+ alertType: "warning",
377
+ icon: "exclamation-triangle",
378
+ class: sheet.classes.WarningHoldAlertContainer,
379
+ };
380
+ case "VERIFICATION:INTERNAL":
381
+ return {
382
+ header: text.verificationRequiredInternalHeader,
383
+ description: intl.formatMessage({
384
+ id: "verificationRequiredInternalDescription",
385
+ defaultMessage: text.verificationRequiredInternalDescription,
386
+ }, {
387
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
388
+ }),
389
+ alertType: "warning",
390
+ icon: "exclamation-triangle",
391
+ class: sheet.classes.WarningHoldAlertContainer,
392
+ };
393
+ case "VERIFICATION:REVIEW":
394
+ return {
395
+ header: text.verificationReviewInternalHeader,
396
+ description: intl.formatMessage({
397
+ id: "verificationReviewInternalDescription",
398
+ defaultMessage: text.verificationReviewInternalDescription,
399
+ }, {
400
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
401
+ }),
402
+ alertType: "warning",
403
+ icon: "exclamation-triangle",
404
+ class: sheet.classes.WarningHoldAlertContainer,
405
+ };
406
+ case "VERIFICATION:FAILED":
407
+ return {
408
+ header: text.verificationFailedInternalHeader,
409
+ description: intl.formatMessage({
410
+ id: "verificationFailedInternalDescription",
411
+ defaultMessage: text.verificationFailedInternalDescription,
412
+ }, {
413
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
414
+ }),
415
+ alertType: "error",
416
+ icon: "exclamation-octagon",
417
+ class: sheet.classes.ErrorHoldAlertContainer,
418
+ };
419
+ case "NEW_PAYEE_REVIEW":
420
+ return {
421
+ header: text.accountReviewHeader,
422
+ description: intl.formatMessage({
423
+ id: "accountReviewDescription",
424
+ defaultMessage: text.accountReviewDescription,
425
+ }, {
426
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
427
+ }),
428
+ buttonText: null,
429
+ alertType: "warning",
430
+ icon: "exclamation-triangle",
431
+ class: sheet.classes.WarningHoldAlertContainer,
432
+ };
433
+ case "PAYMENT_HOLD_ON_CHANGE":
434
+ return {
435
+ header: text.paymentHoldOnChangeHeader,
436
+ description: intl.formatMessage({
437
+ id: "accountReviewDescription",
438
+ defaultMessage: text.paymentHoldOnChangeDescription,
439
+ }, {
440
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
441
+ }),
442
+ buttonText: null,
443
+ alertType: "warning",
444
+ icon: "exclamation-triangle",
445
+ class: sheet.classes.WarningHoldAlertContainer,
446
+ };
447
+ case "BENEFICIARY_NAME_INVALID":
448
+ return {
449
+ header: text.beneficiaryNameInvalidHeader,
450
+ description: intl.formatMessage({
451
+ id: "accountReviewDescription",
452
+ defaultMessage: text.beneficiaryNameInvalidDescription,
453
+ }, {
454
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
455
+ }),
456
+ button: (h("div", { class: sheet.classes.ButtonContainer },
457
+ h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
458
+ h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
459
+ alertType: "warning",
460
+ icon: "exclamation-triangle",
461
+ class: sheet.classes.WarningHoldAlertContainer,
462
+ };
463
+ case "BENEFICIARY_NAME_MISMATCH":
464
+ return {
465
+ header: text.beneficiaryNameMismatchHeader,
466
+ description: intl.formatMessage({
467
+ id: "accountReviewDescription",
468
+ defaultMessage: text.beneficiaryNameMismatchDescription,
469
+ }, {
470
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
471
+ }),
472
+ button: (h("div", { class: sheet.classes.ButtonContainer },
473
+ h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
474
+ h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
475
+ alertType: "warning",
476
+ icon: "exclamation-triangle",
477
+ class: sheet.classes.WarningHoldAlertContainer,
478
+ };
479
+ case "BANK_TAX_NAME_MISMATCH":
480
+ return {
481
+ header: text.bankTaxNameMismatchHeader,
482
+ description: intl.formatMessage({
483
+ id: "accountReviewDescription",
484
+ defaultMessage: text.bankTaxNameMismatchDescription,
485
+ }, {
486
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
487
+ }),
488
+ button: (h("div", { class: sheet.classes.ButtonContainer },
489
+ h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
490
+ h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
491
+ alertType: "warning",
492
+ icon: "exclamation-triangle",
493
+ class: sheet.classes.WarningHoldAlertContainer,
494
+ };
495
+ case "WITHDRAWAL_SETTINGS_INVALID":
496
+ return {
497
+ header: text.withdrawalSettingsInvalidHeader,
498
+ description: intl.formatMessage({
499
+ id: "accountReviewDescription",
500
+ defaultMessage: text.withdrawalSettingsInvalidDescription,
501
+ }, {
502
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
503
+ }),
504
+ button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
505
+ alertType: "warning",
506
+ icon: "exclamation-triangle",
507
+ class: sheet.classes.WarningHoldAlertContainer,
508
+ };
509
+ case "PAYMENT_RETURNED":
510
+ return {
511
+ header: text.paymentReturnedHeader,
512
+ description: intl.formatMessage({
513
+ id: "accountReviewDescription",
514
+ defaultMessage: text.paymentReturnedDescription,
515
+ }, {
516
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
517
+ }),
518
+ button: (h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
519
+ alertType: "error",
520
+ icon: "exclamation-triangle",
521
+ class: sheet.classes.WarningHoldAlertContainer,
522
+ };
523
+ case "HOLD":
524
+ return {
525
+ header: text.payoutHoldAlertHeader,
526
+ description: intl.formatMessage({
527
+ id: "payoutHoldAlertDescription",
528
+ defaultMessage: text.payoutHoldAlertDescription,
529
+ }, {
530
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
531
+ }),
532
+ buttonText: null,
533
+ alertType: "warning",
534
+ icon: "exclamation-triangle",
535
+ class: sheet.classes.WarningHoldAlertContainer,
536
+ };
537
+ default:
538
+ return;
539
+ }
540
+ }
541
+ const statusMap = {
542
+ NOT_VERIFIED: (h("div", { class: sheet.classes.TaxFormDetailsContainer },
543
+ h("sl-badge", { class: sheet.classes.WarningBadge, type: "warning", pill: true }, text.statusTextNotVerified),
544
+ h("p", { class: sheet.classes.SubduedText }, intl.formatMessage({
545
+ id: `badgeTextAwaitingReview`,
546
+ defaultMessage: text.badgeTextAwaitingReview,
547
+ }, {
548
+ dateSubmitted: states.dateSubmitted,
549
+ })))),
550
+ ACTIVE: (h("div", { class: sheet.classes.TaxFormDetailsContainer },
551
+ h("sl-badge", { class: sheet.classes.SuccessBadge, type: "success", pill: true }, text.statusTextActive),
552
+ h("p", { class: sheet.classes.SubduedText }, intl.formatMessage({
553
+ id: `badgeTextSubmittedOn`,
554
+ defaultMessage: states.documentType === "W9" || !states.documentType
555
+ ? text.badgeTextSubmittedOn
556
+ : text.badgeTextSubmittedOnW8,
557
+ }, {
558
+ dateSubmitted: states.dateSubmitted,
559
+ })))),
560
+ INACTIVE: (h("div", { class: sheet.classes.TaxFormDetailsContainer },
561
+ h("sl-badge", { class: sheet.classes.ErrorBadge, type: "danger", pill: true }, text.statusTextNotActive),
562
+ h("p", { class: sheet.classes.SubduedText }, text.invalidForm))),
563
+ undefined: (h("div", { class: sheet.classes.TaxFormDetailsContainer },
564
+ h("sl-badge", { type: "danger", pill: true }, text.statusTextRequired),
565
+ h("p", null, intl.formatMessage({
566
+ id: `requiredTaxForm`,
567
+ defaultMessage: text.requiredTaxForm,
568
+ }, {
569
+ taxFormType: states.documentType,
570
+ })))),
571
+ };
572
+ const alertMap = {
573
+ INACTIVE: (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", class: sheet.classes.ErrorHoldAlertContainer, type: "danger", open: true },
574
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
575
+ h("strong", null, intl.formatMessage({
576
+ id: `taxAlertHeaderNotActive`,
577
+ defaultMessage: states.documentType === "W9"
578
+ ? text.taxAlertHeaderNotActiveW9
579
+ : text.taxAlertHeaderNotActiveW8,
580
+ }, {
581
+ documentType: states.documentType || "Your",
582
+ })),
583
+ h("br", null),
584
+ intl.formatMessage({
585
+ id: `taxAlertMessage`,
586
+ defaultMessage: states.documentType === "W9"
587
+ ? text.taxAlertNotActiveMessageW9
588
+ : text.taxAlertNotActiveMessageW8,
589
+ }, {
590
+ documentType: states.documentTypeString || "tax",
591
+ }))),
592
+ };
593
+ const getIndirectTaxRegisteredIn = () => {
594
+ if (states.province) {
595
+ return intl.formatMessage({
596
+ id: `indirectTaxInfoCanada`,
597
+ defaultMessage: text.indirectTaxInfoCanada,
598
+ }, {
599
+ country: "Canada",
600
+ province: states.province,
601
+ });
602
+ }
603
+ else if (states.subRegion) {
604
+ return intl.formatMessage({
605
+ id: `indirectTaxInfoSpain`,
606
+ defaultMessage: text.indirectTaxInfoSpain,
607
+ }, {
608
+ country: states.country,
609
+ subRegion: states.subRegion,
610
+ });
611
+ }
612
+ else {
613
+ return intl.formatMessage({
614
+ id: `indirectTaxInfoOtherCountry`,
615
+ defaultMessage: text.indirectTaxInfoOtherCountry,
616
+ }, {
617
+ country: states.country,
618
+ });
619
+ }
620
+ };
621
+ const alertInfo = getAlert(states.payoutStatus);
622
+ const dropdownHover = (el) => {
623
+ var _a;
624
+ if (!el)
625
+ return;
626
+ const trigger = el.querySelector('[slot="trigger"]');
627
+ const panel = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dropdown__panel");
628
+ if (!trigger || !panel)
629
+ return;
630
+ let hideTimeout;
631
+ const show = () => {
632
+ clearTimeout(hideTimeout);
633
+ el.show();
634
+ };
635
+ const scheduleHide = () => {
636
+ hideTimeout = setTimeout(() => el.hide(), 100);
637
+ };
638
+ trigger.addEventListener("mouseenter", show);
639
+ trigger.addEventListener("mouseleave", scheduleHide);
640
+ panel.addEventListener("mouseenter", show);
641
+ panel.addEventListener("mouseleave", scheduleHide);
642
+ return () => {
643
+ trigger.removeEventListener("mouseenter", show);
644
+ trigger.removeEventListener("mouseleave", scheduleHide);
645
+ panel.removeEventListener("mouseenter", show);
646
+ panel.removeEventListener("mouseleave", scheduleHide);
647
+ clearTimeout(hideTimeout);
648
+ };
649
+ };
650
+ return (h("div", null,
651
+ h("div", null,
652
+ h("style", { type: "text/css" },
653
+ styleString,
654
+ vanillaStyle),
655
+ states.loadingError && (h("div", null,
656
+ h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.ErrorAlertContainer },
657
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
658
+ h("strong", null, text.error.loadingErrorAlertHeader),
659
+ h("br", null),
660
+ intl.formatMessage({
661
+ id: "loadingErrorAlertDescription",
662
+ defaultMessage: text.error.loadingErrorAlertDescription,
663
+ }, {
664
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
665
+ })))),
666
+ ((_a = states.errors) === null || _a === void 0 ? void 0 : _a.general) && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.ErrorAlertContainer },
667
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
668
+ h("strong", null, text.error.generalTitle),
669
+ h("br", null),
670
+ intl.formatMessage({
671
+ id: "generalDescription",
672
+ defaultMessage: text.error.generalDescription,
673
+ }, {
674
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
675
+ }))),
676
+ alertInfo && (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 },
677
+ h("strong", null, alertInfo.header),
678
+ h("p", { style: { margin: "0" } }, alertInfo.description),
679
+ alertInfo.buttonText && (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
680
+ alertInfo.button ? (alertInfo.button) : (h("div", { style: { display: "none" } })))),
681
+ h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
682
+ h("p", null, text.replaceTaxFormModalBodyText),
683
+ h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
684
+ h("sl-button", { slot: "footer", type: "default", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
685
+ states.status === "INACTIVE" && alertMap[states.status],
686
+ h("div", null,
687
+ h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
688
+ h("div", { class: sheet.classes.BankingInformationContainer },
689
+ slots.payoutDetailsCardSlot,
690
+ !states.loading && (h("p", { class: sheet.classes.DescriptionText }, text.payoutFromImpact)),
691
+ states.canEditPayoutInfo && (h("sl-button", { disabled: states.disabled || states.loading, exportparts: "base: secondarybutton-base", type: "secondary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
692
+ (!states.noFormNeeded || !!states.status) && (h("div", { class: sheet.classes.TaxDocumentsContainer },
693
+ h("div", null, states.loading ? (h("div", { class: sheet.classes.TaxSectionSkeletonContainer },
694
+ h("sqm-skeleton", { width: "15%", height: "10px" }),
695
+ h("sqm-skeleton", { width: "25%", height: "24px" }))) : (h("div", null,
696
+ h("div", null,
697
+ h("span", { class: sheet.classes.TaxFormDetailsContainer },
698
+ h("div", { class: sheet.classes.StatusContainer },
699
+ h("h3", null, states.documentType
700
+ ? intl.formatMessage({
701
+ id: "section-subheader",
702
+ defaultMessage: text.taxDocumentSectionSubHeader,
703
+ }, {
704
+ documentType: states.documentTypeString,
705
+ })
706
+ : text.taxDocumentSectionSubHeaderNoDocument),
707
+ h("span", { class: sheet.classes.StatusAlert }, statusMap[states.status]))),
708
+ (!states.noFormNeeded || !!states.status) &&
709
+ states.status !== "NOT_VERIFIED" && (h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
710
+ h("div", { class: sheet.classes.IndirectTaxPreviewContainer }, states.loading ? (h("div", { class: sheet.classes.TaxSectionSkeletonContainer },
711
+ h("sqm-skeleton", { width: "15%", height: "10px" }),
712
+ h("sqm-skeleton", { width: "25%", height: "24px" }))) : (h("div", null,
713
+ h("h3", { class: sheet.classes.IndirectTaxPreviewHeaderContainer },
714
+ text.indirectTaxInfoSectionHeader,
715
+ h("sl-dropdown", { placement: "right", distance: 1, ref: dropdownHover, class: sheet.classes.DropdownTooltipContainer },
716
+ h("sl-icon", { slot: "trigger", name: "info-circle", class: sheet.classes.ToolTip, style: { cursor: "pointer" } }),
717
+ h("div", { class: sheet.classes.DropdownContent },
718
+ h("div", { class: sheet.classes.DropdownArrow }),
719
+ intl.formatMessage({
720
+ id: "indirectTaxTooltipSupport",
721
+ defaultMessage: text.indirectTaxTooltipSupport,
722
+ }, {
723
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet.classes.DropdownLink }, text.supportLink)),
724
+ })))),
725
+ h("div", { class: sheet.classes.IndirectTaxPreviewDetails },
726
+ h("span", null, states.notRegistered ? (h("span", { class: sheet.classes.NotRegisteredIndirectTaxText }, intl.formatMessage({
727
+ id: "notRegisteredForTax",
728
+ defaultMessage: text.notRegisteredForTax,
729
+ }, {
730
+ supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
731
+ }))) : (getIndirectTaxRegisteredIn())),
732
+ !states.notRegistered && (h("div", { class: sheet.classes.TaxNumberContainer },
733
+ h("span", null, intl.formatMessage({
734
+ id: `indirectTaxDetails`,
735
+ defaultMessage: text.indirectTaxDetails,
736
+ }, {
737
+ indirectTaxType: states.indirectTaxType,
738
+ indirectTaxNumber: states.indirectTaxNumber,
739
+ })),
740
+ h("span", null,
741
+ states.qstNumber &&
742
+ intl.formatMessage({
743
+ id: `qstNumber`,
744
+ defaultMessage: text.qstNumber,
745
+ }, {
746
+ qstNumber: states.qstNumber,
747
+ }),
748
+ states.subRegionTaxNumber &&
749
+ intl.formatMessage({
750
+ id: `subRegionTaxNumber`,
751
+ defaultMessage: text.subRegionTaxNumber,
752
+ }, {
753
+ subRegionTaxNumber: states.subRegionTaxNumber,
754
+ })))),
755
+ !states.notRegistered && (h("div", { class: sheet.classes.InvoiceTableContainer },
756
+ 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 },
757
+ h("sqm-invoice-table-download-column", null),
758
+ h("sqm-invoice-table-date-column", { "column-title": text.dateColumnTitle }),
759
+ h("sqm-invoice-table-data-column", { "column-title": text.invoiceColumnTitle, property: "invoiceId" }),
760
+ h("sqm-invoice-table-data-column", { "column-title": text.earningsColumnTitle, property: "earnings" }),
761
+ h("sqm-invoice-table-data-column", { "column-title": text.indirectTaxColumnTitle, property: "indirectTax" }),
762
+ h("sqm-invoice-table-data-column", { "column-title": text.earningsAfterTaxColumnTitle, property: "netEarnings" })))))))))));
763
+ };
764
+
61
765
  const vatLabels = {
62
766
  GB: "VAT",
63
767
  AU: "GST",
@@ -109,7 +813,7 @@ const vatLabels = {
109
813
  RU: "VAT",
110
814
  };
111
815
 
112
- const style$1 = {
816
+ const style$2 = {
113
817
  Container: {
114
818
  width: "100%",
115
819
  },
@@ -153,9 +857,9 @@ const style$1 = {
153
857
  },
154
858
  },
155
859
  };
156
- const sheet = createStyleSheet(style$1);
157
- const styleString = sheet.toString();
158
- const vanillaStyle = `
860
+ const sheet$1 = createStyleSheet(style$2);
861
+ const styleString$1 = sheet$1.toString();
862
+ const vanillaStyle$1 = `
159
863
  :host{
160
864
  display: block;
161
865
  }
@@ -182,7 +886,7 @@ const vanillaStyle = `
182
886
  const OtherRegionSlotView = (props) => {
183
887
  var _a, _b, _c;
184
888
  const { states, states: { formState }, callbacks, text, } = props;
185
- const { classes } = sheet;
889
+ const { classes } = sheet$1;
186
890
  const getTaxFieldLabel = (taxType) => {
187
891
  return intl.formatMessage({
188
892
  id: `tax-field-label${taxType}`,
@@ -218,7 +922,7 @@ const OtherRegionSlotView = (props) => {
218
922
  };
219
923
  const CanadaFields = () => {
220
924
  var _a, _b;
221
- const { classes } = sheet;
925
+ const { classes } = sheet$1;
222
926
  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;
223
927
  return (h("div", { class: classes.ConditionalInputsContainer },
224
928
  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) && {
@@ -249,8 +953,8 @@ const OtherRegionSlotView = (props) => {
249
953
  return (h("div", { style: states.hide ? { display: "none" } : {} },
250
954
  h("form", { class: classes.Container },
251
955
  h("style", { type: "text/css" },
252
- styleString,
253
- vanillaStyle),
956
+ styleString$1,
957
+ vanillaStyle$1),
254
958
  h("hr", { class: classes.HR }),
255
959
  h("div", { class: classes.InputContainer },
256
960
  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) && {
@@ -1240,7 +1944,7 @@ const PHONE_EXTENSIONS = {
1240
1944
  },
1241
1945
  };
1242
1946
 
1243
- const style$2 = {
1947
+ const style$3 = {
1244
1948
  FormWrapper: {},
1245
1949
  ErrorInput: {
1246
1950
  "&::part(base)": {
@@ -1315,9 +2019,9 @@ const style$2 = {
1315
2019
  },
1316
2020
  },
1317
2021
  };
1318
- const sheet$1 = createStyleSheet(style$2);
1319
- const styleString$1 = sheet$1.toString();
1320
- const vanillaStyle$1 = `
2022
+ const sheet$2 = createStyleSheet(style$3);
2023
+ const styleString$2 = sheet$2.toString();
2024
+ const vanillaStyle$2 = `
1321
2025
  :host{
1322
2026
  display: block;
1323
2027
  }
@@ -1501,7 +2205,7 @@ const vanillaStyle$1 = `
1501
2205
  const UserInfoFormView = (props) => {
1502
2206
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1503
2207
  const { states, states: { formState }, callbacks, text, refs, data, } = props;
1504
- const { classes } = sheet$1;
2208
+ const { classes } = sheet$2;
1505
2209
  const bankingCollectionText = intl.formatMessage({
1506
2210
  id: "bankingCollectionText",
1507
2211
  defaultMessage: text.allowBankingCollection,
@@ -1537,8 +2241,8 @@ const UserInfoFormView = (props) => {
1537
2241
  }
1538
2242
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
1539
2243
  h("style", { type: "text/css" },
1540
- styleString$1,
1541
- vanillaStyle$1),
2244
+ styleString$2,
2245
+ vanillaStyle$2),
1542
2246
  states.loadingError && (h("div", null,
1543
2247
  h("sqm-form-message", { type: "error" },
1544
2248
  h("p", { part: "alert-title" }, text.error.loadingErrorAlertHeader),
@@ -1674,4 +2378,4 @@ const UserInfoFormView = (props) => {
1674
2378
  h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
1675
2379
  };
1676
2380
 
1677
- export { InvoiceTableView as I, OtherRegionSlotView as O, UserInfoFormView as U, vatLabels as v };
2381
+ export { InvoiceTableView as I, OtherRegionSlotView as O, TaxAndCashDashboardView as T, UserInfoFormView as U, vatLabels as v };