@saasquatch/mint-components 1.15.4-2 → 1.15.5-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 (110) hide show
  1. package/dist/cjs/{ShadowViewAddon-e9dc77e3.js → ShadowViewAddon-28865623.js} +2 -2
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +265 -193
  5. package/dist/cjs/{sqm-base-registration-form-view-66f99821.js → sqm-base-registration-form-view-8029d30e.js} +4 -9
  6. package/dist/cjs/sqm-big-stat_43.cjs.entry.js +143 -10
  7. package/dist/cjs/{sqm-invoice-table-view-5c74607f.js → sqm-invoice-table-view-3f60fba9.js} +1 -0
  8. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +19 -29
  9. package/dist/cjs/sqm-stencilbook.cjs.entry.js +5 -8
  10. package/dist/cjs/{usePayoutStatus-733ef29a.js → usePayoutStatus-fc4e609e.js} +167 -2
  11. package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
  12. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +4 -9
  13. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
  14. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
  15. package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
  16. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
  17. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +0 -2
  18. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +3 -3
  19. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -31
  20. package/dist/collection/components/sqm-name-fields/useNameFields.js +0 -1
  21. package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
  22. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +0 -1
  23. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +5 -7
  24. package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +15 -23
  25. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
  26. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +87 -1
  27. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +327 -0
  28. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +27 -3
  29. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +300 -0
  30. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +85 -1
  31. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +300 -0
  32. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +23 -12
  33. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
  34. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +19 -4
  35. package/dist/esm/{ShadowViewAddon-e0d5f1c9.js → ShadowViewAddon-f2176779.js} +2 -2
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/mint-components.js +1 -1
  38. package/dist/esm/sqm-banking-info-form_17.entry.js +218 -146
  39. package/dist/esm/{sqm-base-registration-form-view-d81e316a.js → sqm-base-registration-form-view-dafba287.js} +4 -9
  40. package/dist/esm/sqm-big-stat_43.entry.js +143 -10
  41. package/dist/esm/{sqm-invoice-table-view-3491dd80.js → sqm-invoice-table-view-01453fa3.js} +1 -0
  42. package/dist/esm/sqm-portal-google-registration-form.entry.js +19 -29
  43. package/dist/esm/sqm-stencilbook.entry.js +5 -8
  44. package/dist/esm/{usePayoutStatus-b89e8c49.js → usePayoutStatus-b4bdbfa7.js} +154 -4
  45. package/dist/esm-es5/{ShadowViewAddon-e0d5f1c9.js → ShadowViewAddon-f2176779.js} +1 -1
  46. package/dist/esm-es5/loader.js +1 -1
  47. package/dist/esm-es5/mint-components.js +1 -1
  48. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  49. package/dist/esm-es5/sqm-base-registration-form-view-dafba287.js +1 -0
  50. package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
  51. package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +1 -0
  52. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  53. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  54. package/dist/esm-es5/usePayoutStatus-b4bdbfa7.js +6 -0
  55. package/dist/mint-components/mint-components.esm.js +1 -1
  56. package/dist/mint-components/{p-3ac8613d.system.entry.js → p-02832118.system.entry.js} +1 -1
  57. package/dist/mint-components/{p-d15b642f.system.js → p-0d939b73.system.js} +1 -1
  58. package/dist/mint-components/p-2651ef99.system.js +1 -0
  59. package/dist/mint-components/p-28131538.entry.js +109 -0
  60. package/dist/mint-components/p-35701119.js +1 -0
  61. package/dist/mint-components/p-37996351.system.js +1 -1
  62. package/dist/mint-components/{p-1edebab1.entry.js → p-4a731079.entry.js} +2 -2
  63. package/dist/mint-components/p-59fe6066.js +1 -0
  64. package/dist/mint-components/p-86a5db85.system.js +1 -0
  65. package/dist/mint-components/p-93db61eb.system.js +6 -0
  66. package/dist/mint-components/p-9c4f4cd6.entry.js +1 -0
  67. package/dist/mint-components/p-a3647f70.system.entry.js +1 -0
  68. package/dist/mint-components/p-a4f494ee.system.entry.js +1 -0
  69. package/dist/mint-components/p-b24fae32.system.entry.js +1 -0
  70. package/dist/mint-components/{p-3b6dccec.js → p-c1b074b6.js} +1 -1
  71. package/dist/mint-components/p-e3deed72.entry.js +273 -0
  72. package/dist/mint-components/p-fde41ad1.js +157 -0
  73. package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +1 -2
  74. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
  75. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
  76. package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
  77. package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
  78. package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +0 -1
  79. package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +0 -5
  80. package/dist/types/components/sqm-name-fields/useNameFields.d.ts +0 -1
  81. package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
  82. package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +1 -2
  83. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +14 -0
  84. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +53 -0
  85. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -1
  86. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +48 -0
  87. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +12 -0
  88. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +48 -0
  89. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
  90. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -0
  91. package/dist/types/components.d.ts +296 -10
  92. package/docs/docs.docx +0 -0
  93. package/docs/raisins.json +1 -1
  94. package/grapesjs/grapesjs.js +1 -1
  95. package/package.json +1 -1
  96. package/dist/esm-es5/sqm-base-registration-form-view-d81e316a.js +0 -1
  97. package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +0 -1
  98. package/dist/esm-es5/usePayoutStatus-b89e8c49.js +0 -6
  99. package/dist/mint-components/p-021b0540.js +0 -46
  100. package/dist/mint-components/p-3d73cd84.entry.js +0 -220
  101. package/dist/mint-components/p-49932f12.system.js +0 -1
  102. package/dist/mint-components/p-7176a952.entry.js +0 -1
  103. package/dist/mint-components/p-8d0393d9.system.entry.js +0 -1
  104. package/dist/mint-components/p-9308221f.js +0 -1
  105. package/dist/mint-components/p-959c42b2.system.entry.js +0 -1
  106. package/dist/mint-components/p-a6494752.system.js +0 -6
  107. package/dist/mint-components/p-bc021969.system.js +0 -1
  108. package/dist/mint-components/p-c78e6066.entry.js +0 -273
  109. package/dist/mint-components/p-e64e8354.system.entry.js +0 -1
  110. package/dist/mint-components/p-e8e48982.js +0 -1
@@ -16,6 +16,11 @@ export class PayoutStatusAlert {
16
16
  * @uiName Info required alert header
17
17
  */
18
18
  this.informationRequiredHeader = "Payout and tax information required";
19
+ /**
20
+ *
21
+ * @uiName Edit payment info button label
22
+ */
23
+ this.editPaymentInformationButton = "Edit Payout Information";
19
24
  /**
20
25
  * @uiName Info required alert description
21
26
  */
@@ -68,6 +73,54 @@ export class PayoutStatusAlert {
68
73
  * @uiName Account review alert description
69
74
  */
70
75
  this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
76
+ /**
77
+ * @uiName Payment on hold alert header
78
+ */
79
+ this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
80
+ /**
81
+ * @uiName Payment on hold alert description
82
+ */
83
+ this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
84
+ /**
85
+ * @uiName Beneficiary name invalid alert header
86
+ */
87
+ this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
88
+ /**
89
+ * @uiName Beneficiary name invalid description
90
+ */
91
+ this.beneficiaryNameInvalidDescription = "The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
92
+ /**
93
+ * @uiName Beneficiary name mismatch alert header
94
+ */
95
+ this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
96
+ /**
97
+ * @uiName Beneficiary name mismatch alert description
98
+ */
99
+ this.beneficiaryNameMismatchDescription = "The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
100
+ /**
101
+ * @uiName Bank name mismatch alert header
102
+ */
103
+ this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
104
+ /**
105
+ * @uiName Bank name mismatch alert description
106
+ */
107
+ this.bankTaxNameMismatchDescription = "The bank name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
108
+ /**
109
+ * @uiName Withdrawal settings invalid alert header
110
+ */
111
+ this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
112
+ /**
113
+ * @uiName Withdrawal settings invalid alert description
114
+ */
115
+ this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct with no invalid characters. Your payouts are on hold until this is resolved.";
116
+ /**
117
+ * @uiName Payment returned alert header
118
+ */
119
+ this.paymentReturnedHeader = "Payout unsuccessful";
120
+ /**
121
+ * @uiName Payment returned alert description
122
+ */
123
+ this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
71
124
  /**
72
125
  * @uiName W-9 payment threshold alert header
73
126
  */
@@ -144,6 +197,27 @@ export class PayoutStatusAlert {
144
197
  "reflect": false,
145
198
  "defaultValue": "\"Payout and tax information required\""
146
199
  },
200
+ "editPaymentInformationButton": {
201
+ "type": "string",
202
+ "mutable": false,
203
+ "complexType": {
204
+ "original": "string",
205
+ "resolved": "string",
206
+ "references": {}
207
+ },
208
+ "required": false,
209
+ "optional": false,
210
+ "docs": {
211
+ "tags": [{
212
+ "text": "Edit payment info button label",
213
+ "name": "uiName"
214
+ }],
215
+ "text": ""
216
+ },
217
+ "attribute": "edit-payment-information-button",
218
+ "reflect": false,
219
+ "defaultValue": "\"Edit Payout Information\""
220
+ },
147
221
  "informationRequiredDescription": {
148
222
  "type": "string",
149
223
  "mutable": false,
@@ -417,6 +491,258 @@ export class PayoutStatusAlert {
417
491
  "reflect": false,
418
492
  "defaultValue": "\"This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.\""
419
493
  },
494
+ "paymentHoldOnChangeHeader": {
495
+ "type": "string",
496
+ "mutable": false,
497
+ "complexType": {
498
+ "original": "string",
499
+ "resolved": "string",
500
+ "references": {}
501
+ },
502
+ "required": false,
503
+ "optional": false,
504
+ "docs": {
505
+ "tags": [{
506
+ "text": "Payment on hold alert header",
507
+ "name": "uiName"
508
+ }],
509
+ "text": ""
510
+ },
511
+ "attribute": "payment-hold-on-change-header",
512
+ "reflect": false,
513
+ "defaultValue": "\"We are reviewing your new payout settings\""
514
+ },
515
+ "paymentHoldOnChangeDescription": {
516
+ "type": "string",
517
+ "mutable": false,
518
+ "complexType": {
519
+ "original": "string",
520
+ "resolved": "string",
521
+ "references": {}
522
+ },
523
+ "required": false,
524
+ "optional": false,
525
+ "docs": {
526
+ "tags": [{
527
+ "text": "Payment on hold alert description",
528
+ "name": "uiName"
529
+ }],
530
+ "text": ""
531
+ },
532
+ "attribute": "payment-hold-on-change-description",
533
+ "reflect": false,
534
+ "defaultValue": "\"Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.\""
535
+ },
536
+ "beneficiaryNameInvalidHeader": {
537
+ "type": "string",
538
+ "mutable": false,
539
+ "complexType": {
540
+ "original": "string",
541
+ "resolved": "string",
542
+ "references": {}
543
+ },
544
+ "required": false,
545
+ "optional": false,
546
+ "docs": {
547
+ "tags": [{
548
+ "text": "Beneficiary name invalid alert header",
549
+ "name": "uiName"
550
+ }],
551
+ "text": ""
552
+ },
553
+ "attribute": "beneficiary-name-invalid-header",
554
+ "reflect": false,
555
+ "defaultValue": "\"Your payment information does not match your tax form\""
556
+ },
557
+ "beneficiaryNameInvalidDescription": {
558
+ "type": "string",
559
+ "mutable": false,
560
+ "complexType": {
561
+ "original": "string",
562
+ "resolved": "string",
563
+ "references": {}
564
+ },
565
+ "required": false,
566
+ "optional": false,
567
+ "docs": {
568
+ "tags": [{
569
+ "text": "Beneficiary name invalid description",
570
+ "name": "uiName"
571
+ }],
572
+ "text": ""
573
+ },
574
+ "attribute": "beneficiary-name-invalid-description",
575
+ "reflect": false,
576
+ "defaultValue": "\"The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
577
+ },
578
+ "beneficiaryNameMismatchHeader": {
579
+ "type": "string",
580
+ "mutable": false,
581
+ "complexType": {
582
+ "original": "string",
583
+ "resolved": "string",
584
+ "references": {}
585
+ },
586
+ "required": false,
587
+ "optional": false,
588
+ "docs": {
589
+ "tags": [{
590
+ "text": "Beneficiary name mismatch alert header",
591
+ "name": "uiName"
592
+ }],
593
+ "text": ""
594
+ },
595
+ "attribute": "beneficiary-name-mismatch-header",
596
+ "reflect": false,
597
+ "defaultValue": "\"Your payment information does not match your tax form\""
598
+ },
599
+ "beneficiaryNameMismatchDescription": {
600
+ "type": "string",
601
+ "mutable": false,
602
+ "complexType": {
603
+ "original": "string",
604
+ "resolved": "string",
605
+ "references": {}
606
+ },
607
+ "required": false,
608
+ "optional": false,
609
+ "docs": {
610
+ "tags": [{
611
+ "text": "Beneficiary name mismatch alert description",
612
+ "name": "uiName"
613
+ }],
614
+ "text": ""
615
+ },
616
+ "attribute": "beneficiary-name-mismatch-description",
617
+ "reflect": false,
618
+ "defaultValue": "\"The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
619
+ },
620
+ "bankTaxNameMismatchHeader": {
621
+ "type": "string",
622
+ "mutable": false,
623
+ "complexType": {
624
+ "original": "string",
625
+ "resolved": "string",
626
+ "references": {}
627
+ },
628
+ "required": false,
629
+ "optional": false,
630
+ "docs": {
631
+ "tags": [{
632
+ "text": "Bank name mismatch alert header",
633
+ "name": "uiName"
634
+ }],
635
+ "text": ""
636
+ },
637
+ "attribute": "bank-tax-name-mismatch-header",
638
+ "reflect": false,
639
+ "defaultValue": "\"Your payment information does not match your tax form\""
640
+ },
641
+ "bankTaxNameMismatchDescription": {
642
+ "type": "string",
643
+ "mutable": false,
644
+ "complexType": {
645
+ "original": "string",
646
+ "resolved": "string",
647
+ "references": {}
648
+ },
649
+ "required": false,
650
+ "optional": false,
651
+ "docs": {
652
+ "tags": [{
653
+ "text": "Bank name mismatch alert description",
654
+ "name": "uiName"
655
+ }],
656
+ "text": ""
657
+ },
658
+ "attribute": "bank-tax-name-mismatch-description",
659
+ "reflect": false,
660
+ "defaultValue": "\"The bank name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
661
+ },
662
+ "withdrawalSettingsInvalidHeader": {
663
+ "type": "string",
664
+ "mutable": false,
665
+ "complexType": {
666
+ "original": "string",
667
+ "resolved": "string",
668
+ "references": {}
669
+ },
670
+ "required": false,
671
+ "optional": false,
672
+ "docs": {
673
+ "tags": [{
674
+ "text": "Withdrawal settings invalid alert header",
675
+ "name": "uiName"
676
+ }],
677
+ "text": ""
678
+ },
679
+ "attribute": "withdrawal-settings-invalid-header",
680
+ "reflect": false,
681
+ "defaultValue": "\"Your payment information includes invalid characters\""
682
+ },
683
+ "withdrawalSettingsInvalidDescription": {
684
+ "type": "string",
685
+ "mutable": false,
686
+ "complexType": {
687
+ "original": "string",
688
+ "resolved": "string",
689
+ "references": {}
690
+ },
691
+ "required": false,
692
+ "optional": false,
693
+ "docs": {
694
+ "tags": [{
695
+ "text": "Withdrawal settings invalid alert description",
696
+ "name": "uiName"
697
+ }],
698
+ "text": ""
699
+ },
700
+ "attribute": "withdrawal-settings-invalid-description",
701
+ "reflect": false,
702
+ "defaultValue": "\"There are invalid characters in your payment information. Please review your information and make sure it is correct with no invalid characters. Your payouts are on hold until this is resolved.\""
703
+ },
704
+ "paymentReturnedHeader": {
705
+ "type": "string",
706
+ "mutable": false,
707
+ "complexType": {
708
+ "original": "string",
709
+ "resolved": "string",
710
+ "references": {}
711
+ },
712
+ "required": false,
713
+ "optional": false,
714
+ "docs": {
715
+ "tags": [{
716
+ "text": "Payment returned alert header",
717
+ "name": "uiName"
718
+ }],
719
+ "text": ""
720
+ },
721
+ "attribute": "payment-returned-header",
722
+ "reflect": false,
723
+ "defaultValue": "\"Payout unsuccessful\""
724
+ },
725
+ "paymentReturnedDescription": {
726
+ "type": "string",
727
+ "mutable": false,
728
+ "complexType": {
729
+ "original": "string",
730
+ "resolved": "string",
731
+ "references": {}
732
+ },
733
+ "required": false,
734
+ "optional": false,
735
+ "docs": {
736
+ "tags": [{
737
+ "text": "Payment returned alert description",
738
+ "name": "uiName"
739
+ }],
740
+ "text": ""
741
+ },
742
+ "attribute": "payment-returned-description",
743
+ "reflect": false,
744
+ "defaultValue": "\"Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.\""
745
+ },
420
746
  "w9RequiredHeader": {
421
747
  "type": "string",
422
748
  "mutable": false,
@@ -672,6 +998,7 @@ function useDemoPayoutStatusAlert(props) {
672
998
  callbacks: {
673
999
  onTermsClick: () => { },
674
1000
  onClick: () => console.log("show"),
1001
+ onPaymentInfoClick: () => { },
675
1002
  },
676
1003
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
677
1004
  }
@@ -1,7 +1,8 @@
1
- import { getEnvironmentSDK, useQuery } from "@saasquatch/component-boilerplate";
1
+ import { getEnvironmentSDK, useQuery, useSetParent, } from "@saasquatch/component-boilerplate";
2
2
  import { useEffect, useState } from "@saasquatch/stencil-hooks";
3
3
  import { gql } from "graphql-request";
4
4
  import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
5
+ import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, } from "../sqm-tax-and-cash/data";
5
6
  import { useVeriffApp, VERIFF_COMPLETE_EVENT_KEY } from "../useVeriffApp";
6
7
  const GET_USER_STATUS = gql `
7
8
  query getUserStatus {
@@ -39,7 +40,7 @@ const GET_TAX_SETTING = gql `
39
40
  }
40
41
  `;
41
42
  export function getStatus(data) {
42
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
43
44
  const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
44
45
  const hasTransferredReward = (_e = (_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.rewards) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.find((reward) => reward.statuses.includes("REDEEMED") &&
45
46
  reward.partnerFundsTransfer.status === "TRANSFERRED");
@@ -57,7 +58,19 @@ export function getStatus(data) {
57
58
  if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
58
59
  return "VERIFICATION:FAILED";
59
60
  if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
60
- return "ACCOUNT_REVIEW";
61
+ return "NEW_PAYEE_REVIEW";
62
+ if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("PAYMENT_HOLD_ON_CHANGE"))
63
+ return "PAYMENT_HOLD_ON_CHANGE";
64
+ if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("BENEFICIARY_NAME_INVALID"))
65
+ return "BENEFICIARY_NAME_INVALID";
66
+ if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_MISMATCH"))
67
+ return "BENEFICIARY_NAME_MISMATCH";
68
+ if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BANK_TAX_NAME_MISMATCH"))
69
+ return "BANK_TAX_NAME_MISMATCH";
70
+ if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("WITHDRAWAL_SETTINGS_INVALID"))
71
+ return "WITHDRAWAL_SETTINGS_INVALID";
72
+ if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("PAYMENT_RETURNED"))
73
+ return "PAYMENT_RETURNED";
61
74
  if (account.hold)
62
75
  return "HOLD";
63
76
  return "DONE";
@@ -69,6 +82,8 @@ export function usePayoutStatus(props) {
69
82
  const { data: taxSettingRes } = useQuery(GET_TAX_SETTING, {});
70
83
  const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
71
84
  const [status, setStatus] = useState(undefined);
85
+ const setContext = useSetParent(TAX_FORM_CONTEXT_NAMESPACE);
86
+ const setStep = useSetParent(TAX_CONTEXT_NAMESPACE);
72
87
  const enforceUsTaxComplianceOption = (_a = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _a === void 0 ? void 0 : _a.enforceUsTaxCompliance;
73
88
  useEffect(() => {
74
89
  if (!data)
@@ -96,6 +111,14 @@ export function usePayoutStatus(props) {
96
111
  url += "#3";
97
112
  window.history.pushState(null, "", url);
98
113
  };
114
+ const onPaymentInfoClick = () => {
115
+ setContext({
116
+ overrideNextStep: "/dashboard",
117
+ overrideBackStep: "/dashboard",
118
+ hideSteps: true,
119
+ });
120
+ setStep("/4");
121
+ };
99
122
  return {
100
123
  states: {
101
124
  loading,
@@ -109,6 +132,7 @@ export function usePayoutStatus(props) {
109
132
  callbacks: {
110
133
  onTermsClick,
111
134
  onClick: render,
135
+ onPaymentInfoClick,
112
136
  },
113
137
  };
114
138
  }