@saasquatch/mint-components 1.12.0-11 → 1.12.0-13

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 (112) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mint-components.cjs.js +1 -1
  3. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +165 -61
  4. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +55 -15
  5. package/dist/cjs/sqm-code-verification.cjs.entry.js +5 -5
  6. package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
  7. package/dist/cjs/{sqm-invoice-table-view-c58966f8.js → sqm-invoice-table-view-e92c557a.js} +79 -23
  8. package/dist/cjs/sqm-stencilbook.cjs.entry.js +12 -21
  9. package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +7 -1
  10. package/dist/cjs/usePayoutStatus-5ac536a3.js +1045 -0
  11. package/dist/cjs/{useVerificationEmail-6aacdb71.js → useVerificationEmail-2eb28c2a.js} +5 -1
  12. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +1 -1
  13. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +3 -3
  14. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +7 -1
  15. package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +5 -1
  16. package/dist/collection/components/tax-and-cash/BankingForm.stories.js +1 -0
  17. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +76 -23
  18. package/dist/collection/components/tax-and-cash/eventKeys.js +1 -0
  19. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +32 -10
  20. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +6 -1
  21. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +3 -0
  22. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +3 -0
  23. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +0 -7
  24. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +0 -5
  25. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +0 -56
  26. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +5 -9
  27. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +28 -11
  28. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +155 -6
  29. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +20 -9
  30. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +87 -23
  31. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +153 -2
  32. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +13 -5
  33. package/dist/collection/components/tax-and-cash/useVeriffApp.js +64 -0
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/mint-components.js +1 -1
  36. package/dist/esm/sqm-banking-info-form_16.entry.js +165 -61
  37. package/dist/esm/sqm-big-stat_39.entry.js +55 -15
  38. package/dist/esm/sqm-code-verification.entry.js +5 -5
  39. package/dist/esm/sqm-email-verification.entry.js +1 -1
  40. package/dist/esm/{sqm-invoice-table-view-d1cfdaf4.js → sqm-invoice-table-view-c184248a.js} +79 -23
  41. package/dist/esm/sqm-stencilbook.entry.js +12 -21
  42. package/dist/esm/sqm-widget-verification-internal.entry.js +7 -1
  43. package/dist/esm/usePayoutStatus-d613ff10.js +1039 -0
  44. package/dist/esm/{useVerificationEmail-c32696ba.js → useVerificationEmail-2a21d0e3.js} +5 -1
  45. package/dist/esm-es5/loader.js +1 -1
  46. package/dist/esm-es5/mint-components.js +1 -1
  47. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  48. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  49. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  50. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  51. package/dist/esm-es5/sqm-invoice-table-view-c184248a.js +1 -0
  52. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  53. package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
  54. package/dist/esm-es5/usePayoutStatus-d613ff10.js +6 -0
  55. package/dist/esm-es5/useVerificationEmail-2a21d0e3.js +1 -0
  56. package/dist/mint-components/mint-components.esm.js +1 -1
  57. package/dist/mint-components/{p-1712a9fd.entry.js → p-02892b2a.entry.js} +2 -2
  58. package/dist/mint-components/p-03e1ac96.system.entry.js +1 -0
  59. package/dist/mint-components/p-13ce67a3.js +1 -0
  60. package/dist/mint-components/p-209eab38.system.js +6 -0
  61. package/dist/mint-components/p-2584baa5.entry.js +16 -0
  62. package/dist/mint-components/p-2c99add0.js +31 -0
  63. package/dist/mint-components/{p-24092973.entry.js → p-4e21de5f.entry.js} +2 -2
  64. package/dist/mint-components/p-8c26c4ce.entry.js +195 -0
  65. package/dist/mint-components/{p-e45a8501.system.entry.js → p-8fa2809f.system.entry.js} +1 -1
  66. package/dist/mint-components/{p-b62faaa5.system.entry.js → p-9266a8fc.system.entry.js} +1 -1
  67. package/dist/mint-components/p-9379ee08.js +48 -0
  68. package/dist/mint-components/p-a567ba84.system.entry.js +1 -0
  69. package/dist/mint-components/p-a8c28561.system.js +1 -0
  70. package/dist/mint-components/{p-5f766d09.entry.js → p-a9b7e11f.entry.js} +2 -2
  71. package/dist/mint-components/p-b7836281.system.js +1 -0
  72. package/dist/mint-components/{p-331d060e.entry.js → p-b9e863d0.entry.js} +14 -14
  73. package/dist/mint-components/p-c520d10d.system.entry.js +1 -0
  74. package/dist/mint-components/{p-aabab609.system.entry.js → p-c5d26757.system.entry.js} +1 -1
  75. package/dist/mint-components/p-ca809fdd.system.js +1 -1
  76. package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +1 -0
  77. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +3 -0
  78. package/dist/types/components/tax-and-cash/eventKeys.d.ts +1 -0
  79. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +2 -0
  80. package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +0 -1
  81. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.d.ts +0 -4
  82. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +1 -16
  83. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +3 -1
  84. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +7 -2
  85. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +25 -0
  86. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -4
  87. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +8 -4
  88. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +24 -0
  89. package/dist/types/components/tax-and-cash/useVeriffApp.d.ts +6 -0
  90. package/dist/types/components.d.ts +98 -22
  91. package/docs/docs.docx +0 -0
  92. package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
  93. package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
  94. package/docs/raisins.json +1 -1
  95. package/grapesjs/grapesjs.js +1 -1
  96. package/package.json +2 -1
  97. package/dist/cjs/usePayoutStatus-b9fb7399.js +0 -70
  98. package/dist/esm/usePayoutStatus-1a635054.js +0 -67
  99. package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +0 -1
  100. package/dist/esm-es5/usePayoutStatus-1a635054.js +0 -1
  101. package/dist/esm-es5/useVerificationEmail-c32696ba.js +0 -1
  102. package/dist/mint-components/p-0e45bc0e.system.entry.js +0 -1
  103. package/dist/mint-components/p-1e616d45.system.js +0 -1
  104. package/dist/mint-components/p-282a7d85.entry.js +0 -195
  105. package/dist/mint-components/p-4364001c.entry.js +0 -12
  106. package/dist/mint-components/p-4bd7a472.js +0 -1
  107. package/dist/mint-components/p-517224ef.js +0 -19
  108. package/dist/mint-components/p-8300d8c8.system.js +0 -1
  109. package/dist/mint-components/p-8bddb468.system.entry.js +0 -1
  110. package/dist/mint-components/p-974070c4.system.entry.js +0 -1
  111. package/dist/mint-components/p-d7806f31.js +0 -48
  112. package/dist/mint-components/p-e990dc21.system.js +0 -1
@@ -26,16 +26,6 @@ export class PayoutDetailsCard {
26
26
  * @uiName Bank account field label
27
27
  */
28
28
  this.accountText = "Account";
29
- /**
30
- * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
31
- * @uiName Payout error message title
32
- */
33
- this.errorTitleText = "Your payout is on hold ";
34
- /**
35
- * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
36
- * @uiName Payout error message description
37
- */
38
- this.errorDescriptionText = "If you’ve recently added your payout information, please wait while we verify your information. If it’s still on hold after a few days, please contact Support or check your inbox for an email from our referral program provider, impact.com.";
39
29
  /**
40
30
  * Text displayed for existing publishers that do not have saved banking information.
41
31
  * @uiName Payout missing information subtext
@@ -48,10 +38,6 @@ export class PayoutDetailsCard {
48
38
  const props = getProps(this);
49
39
  return {
50
40
  ...props,
51
- error: {
52
- errorTitleText: this.errorTitleText,
53
- errorDescriptionText: this.errorDescriptionText,
54
- },
55
41
  };
56
42
  }
57
43
  render() {
@@ -127,48 +113,6 @@ export class PayoutDetailsCard {
127
113
  "reflect": false,
128
114
  "defaultValue": "\"Account\""
129
115
  },
130
- "errorTitleText": {
131
- "type": "string",
132
- "mutable": false,
133
- "complexType": {
134
- "original": "string",
135
- "resolved": "string",
136
- "references": {}
137
- },
138
- "required": false,
139
- "optional": false,
140
- "docs": {
141
- "tags": [{
142
- "text": "Payout error message title",
143
- "name": "uiName"
144
- }],
145
- "text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
146
- },
147
- "attribute": "error-title-text",
148
- "reflect": false,
149
- "defaultValue": "\"Your payout is on hold \""
150
- },
151
- "errorDescriptionText": {
152
- "type": "string",
153
- "mutable": false,
154
- "complexType": {
155
- "original": "string",
156
- "resolved": "string",
157
- "references": {}
158
- },
159
- "required": false,
160
- "optional": false,
161
- "docs": {
162
- "tags": [{
163
- "text": "Payout error message description",
164
- "name": "uiName"
165
- }],
166
- "text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
167
- },
168
- "attribute": "error-description-text",
169
- "reflect": false,
170
- "defaultValue": "\"If you\u2019ve recently added your payout information, please wait while we verify your information. If it\u2019s still on hold after a few days, please contact Support or check your inbox for an email from our referral program provider, impact.com.\""
171
- },
172
116
  "payoutMissingInformationText": {
173
117
  "type": "string",
174
118
  "mutable": false,
@@ -6,17 +6,13 @@ const defaultProps = {
6
6
  error: false,
7
7
  status: "INFORMATION_REQUIRED",
8
8
  loading: false,
9
- showVerifyIdentity: false,
9
+ veriffLoading: false,
10
10
  };
11
11
  export const InformationRequired = () => (h("sqm-payout-status-alert", { demoData: { states: defaultProps } }));
12
- export const VerifyIdentity = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "VERIFICATION_NEEDED" } } }));
13
- export const VerifyIdentityOpen = () => (h("sqm-payout-status-alert", { demoData: {
14
- states: {
15
- ...defaultProps,
16
- status: "VERIFICATION_NEEDED",
17
- showVerifyIdentity: true,
18
- },
19
- } }));
12
+ export const VerifyIdentity = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "VERIFICATION:REQUIRED" } } }));
13
+ export const VerifyIdentityRequiredInternal = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "VERIFICATION:INTERNAL" } } }));
14
+ export const VerifyIdentityReviewInternal = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "VERIFICATION:REVIEW" } } }));
15
+ export const VerifyIdentityFailedInternal = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "VERIFICATION:FAILED" } } }));
20
16
  export const Hold = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "HOLD" } } }));
21
17
  export const Loading = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, loading: true } } }));
22
18
  export const Error = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, error: true } } }));
@@ -82,7 +82,7 @@ export function PayoutStatusAlertView(props) {
82
82
  icon: "info-circle",
83
83
  class: sheet.classes.InfoAlertContainer,
84
84
  };
85
- case "VERIFICATION_NEEDED":
85
+ case "VERIFICATION:REQUIRED":
86
86
  return {
87
87
  header: text.verificationRequiredHeader,
88
88
  description: text.verificationRequiredDescription,
@@ -91,6 +91,30 @@ export function PayoutStatusAlertView(props) {
91
91
  icon: "exclamation-triangle",
92
92
  class: sheet.classes.WarningAlertContainer,
93
93
  };
94
+ case "VERIFICATION:INTERNAL":
95
+ return {
96
+ header: text.verificationRequiredInternalHeader,
97
+ description: text.verificationRequiredInternalDescription,
98
+ alertType: "warning",
99
+ icon: "exclamation-triangle",
100
+ class: sheet.classes.WarningAlertContainer,
101
+ };
102
+ case "VERIFICATION:REVIEW":
103
+ return {
104
+ header: text.verificationReviewInternalHeader,
105
+ description: text.verificationReviewInternalDescription,
106
+ alertType: "warning",
107
+ icon: "exclamation-triangle",
108
+ class: sheet.classes.WarningAlertContainer,
109
+ };
110
+ case "VERIFICATION:FAILED":
111
+ return {
112
+ header: text.verificationFailedInternalHeader,
113
+ description: text.verificationFailedInternalDescription,
114
+ alertType: "critical",
115
+ icon: "exclamation-octagon",
116
+ class: sheet.classes.ErrorAlertContainer,
117
+ };
94
118
  case "HOLD":
95
119
  return {
96
120
  header: text.holdHeader,
@@ -104,15 +128,12 @@ export function PayoutStatusAlertView(props) {
104
128
  return;
105
129
  }
106
130
  }
107
- //AL: TODO hookup ID
108
131
  function getButton(status) {
109
132
  switch (status) {
110
133
  case "INFORMATION_REQUIRED":
111
134
  return data.type === "SquatchJS2" ? (h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.informationRequiredButtonText, "scroll-animation": "smooth" })) : data.type === "SquatchPortal" ? (h("sl-button", { type: "default", onClick: callbacks.onTermsClick }, text.informationRequiredButtonText)) : (h("sl-button", { type: "default" }, text.informationRequiredButtonText));
112
- case "VERIFICATION_NEEDED":
113
- return (h("sl-button", { type: "default", loading: states.loading,
114
- //AL: TODO callback to open verification form
115
- onClick: () => callbacks.onClick }, text.verificationRequiredButtonText));
135
+ case "VERIFICATION:REQUIRED":
136
+ return (h("sl-button", { type: "default", loading: states.veriffLoading, onClick: callbacks.onClick }, text.verificationRequiredButtonText));
116
137
  default:
117
138
  return;
118
139
  }
@@ -123,9 +144,5 @@ export function PayoutStatusAlertView(props) {
123
144
  h("sl-icon", { slot: "icon", name: (_c = getAlert(states.status)) === null || _c === void 0 ? void 0 : _c.icon }),
124
145
  h("strong", null, (_d = getAlert(states.status)) === null || _d === void 0 ? void 0 : _d.header),
125
146
  h("p", { class: sheet.classes.AlertDescriptionText }, (_e = getAlert(states.status)) === null || _e === void 0 ? void 0 : _e.description),
126
- getButton(states.status)),
127
- h("sl-dialog", { noDismiss: true, class: sheet.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onCancel },
128
- h("iframe", {
129
- // AL: TODO replace iframe URL with verification url when available
130
- scrolling: "yes", frameBorder: "0", width: "100%", height: "100%", src: "https://impacttech.complytaxforms.com/ServiceRedirect.aspx?Language=eng&Param1=UxBORV4bOIrqNb4gbpNmtvW3wjdZJyx4gPElIGMJNR8=&UUID=B576EA3E-80FD-4D85-AA59-653D23A7CCE8" }))));
147
+ getButton(states.status))));
131
148
  }
@@ -36,14 +36,39 @@ export class PayoutStatusAlert {
36
36
  * @uiName Verification required alert button text
37
37
  */
38
38
  this.verificationRequiredButtonText = "Start Verification";
39
+ /**
40
+ * @uiName Verification required internal alert header
41
+ */
42
+ this.verificationRequiredInternalHeader = "Identity Verification in Progress";
43
+ /**
44
+ * @uiName Verification required internal alert description
45
+ */
46
+ this.verificationRequiredInternalDescription = "Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortley.";
47
+ /**
48
+ * @uiName Verification review internal alert header
49
+ */
50
+ this.verificationReviewInternalHeader = "Identity Verification Under Review";
51
+ /**
52
+ * @uiName Verification review internal alert description
53
+ */
54
+ this.verificationReviewInternalDescription = "Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly.";
55
+ /**
56
+ * @uiName Verification failed internal alert header
57
+ */
58
+ this.verificationFailedInternalHeader = "Identity Verification Unsuccessful";
59
+ /**
60
+ * @uiName Verification failed internal alert description
61
+ */
62
+ this.verificationFailedInternalDescription = "Identity verification has failed. Our team is reviewing the report and will contact you with further information.";
39
63
  /**
40
64
  * @uiName Payout on hold alert header
41
65
  */
42
66
  this.holdHeader = "Your payouts and account are on hold";
43
67
  /**
44
68
  * @uiName Payout on hold alert description
69
+ * AL: TODO copy not finalized for support section
45
70
  */
46
- this.holdDescription = "Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to {support email}.";
71
+ this.holdDescription = "Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our support team.";
47
72
  /**
48
73
  * @uiName Cash & Payouts Terms and Conditions url
49
74
  */
@@ -66,7 +91,6 @@ export class PayoutStatusAlert {
66
91
  const props = isDemo()
67
92
  ? useDemoPayoutStatusAlert(this)
68
93
  : usePayoutStatus(this);
69
- console.log({ props });
70
94
  return h(PayoutStatusAlertView, Object.assign({}, props));
71
95
  }
72
96
  static get is() { return "sqm-payout-status-alert"; }
@@ -198,6 +222,132 @@ export class PayoutStatusAlert {
198
222
  "reflect": false,
199
223
  "defaultValue": "\"Start Verification\""
200
224
  },
225
+ "verificationRequiredInternalHeader": {
226
+ "type": "string",
227
+ "mutable": false,
228
+ "complexType": {
229
+ "original": "string",
230
+ "resolved": "string",
231
+ "references": {}
232
+ },
233
+ "required": false,
234
+ "optional": false,
235
+ "docs": {
236
+ "tags": [{
237
+ "text": "Verification required internal alert header",
238
+ "name": "uiName"
239
+ }],
240
+ "text": ""
241
+ },
242
+ "attribute": "verification-required-internal-header",
243
+ "reflect": false,
244
+ "defaultValue": "\"Identity Verification in Progress\""
245
+ },
246
+ "verificationRequiredInternalDescription": {
247
+ "type": "string",
248
+ "mutable": false,
249
+ "complexType": {
250
+ "original": "string",
251
+ "resolved": "string",
252
+ "references": {}
253
+ },
254
+ "required": false,
255
+ "optional": false,
256
+ "docs": {
257
+ "tags": [{
258
+ "text": "Verification required internal alert description",
259
+ "name": "uiName"
260
+ }],
261
+ "text": ""
262
+ },
263
+ "attribute": "verification-required-internal-description",
264
+ "reflect": false,
265
+ "defaultValue": "\"Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortley.\""
266
+ },
267
+ "verificationReviewInternalHeader": {
268
+ "type": "string",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "string",
272
+ "resolved": "string",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": false,
277
+ "docs": {
278
+ "tags": [{
279
+ "text": "Verification review internal alert header",
280
+ "name": "uiName"
281
+ }],
282
+ "text": ""
283
+ },
284
+ "attribute": "verification-review-internal-header",
285
+ "reflect": false,
286
+ "defaultValue": "\"Identity Verification Under Review\""
287
+ },
288
+ "verificationReviewInternalDescription": {
289
+ "type": "string",
290
+ "mutable": false,
291
+ "complexType": {
292
+ "original": "string",
293
+ "resolved": "string",
294
+ "references": {}
295
+ },
296
+ "required": false,
297
+ "optional": false,
298
+ "docs": {
299
+ "tags": [{
300
+ "text": "Verification review internal alert description",
301
+ "name": "uiName"
302
+ }],
303
+ "text": ""
304
+ },
305
+ "attribute": "verification-review-internal-description",
306
+ "reflect": false,
307
+ "defaultValue": "\"Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly.\""
308
+ },
309
+ "verificationFailedInternalHeader": {
310
+ "type": "string",
311
+ "mutable": false,
312
+ "complexType": {
313
+ "original": "string",
314
+ "resolved": "string",
315
+ "references": {}
316
+ },
317
+ "required": false,
318
+ "optional": false,
319
+ "docs": {
320
+ "tags": [{
321
+ "text": "Verification failed internal alert header",
322
+ "name": "uiName"
323
+ }],
324
+ "text": ""
325
+ },
326
+ "attribute": "verification-failed-internal-header",
327
+ "reflect": false,
328
+ "defaultValue": "\"Identity Verification Unsuccessful\""
329
+ },
330
+ "verificationFailedInternalDescription": {
331
+ "type": "string",
332
+ "mutable": false,
333
+ "complexType": {
334
+ "original": "string",
335
+ "resolved": "string",
336
+ "references": {}
337
+ },
338
+ "required": false,
339
+ "optional": false,
340
+ "docs": {
341
+ "tags": [{
342
+ "text": "Verification failed internal alert description",
343
+ "name": "uiName"
344
+ }],
345
+ "text": ""
346
+ },
347
+ "attribute": "verification-failed-internal-description",
348
+ "reflect": false,
349
+ "defaultValue": "\"Identity verification has failed. Our team is reviewing the report and will contact you with further information.\""
350
+ },
201
351
  "holdHeader": {
202
352
  "type": "string",
203
353
  "mutable": false,
@@ -231,14 +381,14 @@ export class PayoutStatusAlert {
231
381
  "optional": false,
232
382
  "docs": {
233
383
  "tags": [{
234
- "text": "Payout on hold alert description",
384
+ "text": "Payout on hold alert description\nAL: TODO copy not finalized for support section",
235
385
  "name": "uiName"
236
386
  }],
237
387
  "text": ""
238
388
  },
239
389
  "attribute": "hold-description",
240
390
  "reflect": false,
241
- "defaultValue": "\"Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to {support email}.\""
391
+ "defaultValue": "\"Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our support team.\""
242
392
  },
243
393
  "termsUrl": {
244
394
  "type": "string",
@@ -308,7 +458,7 @@ export class PayoutStatusAlert {
308
458
  "mutable": false,
309
459
  "complexType": {
310
460
  "original": "DemoData<PayoutStatusAlertViewProps>",
311
- "resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; showVerifyIdentity: boolean; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
461
+ "resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; veriffLoading: boolean; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
312
462
  "references": {
313
463
  "DemoData": {
314
464
  "location": "import",
@@ -348,7 +498,6 @@ function useDemoPayoutStatusAlert(props) {
348
498
  callbacks: {
349
499
  onTermsClick: () => { },
350
500
  onClick: () => console.log("show"),
351
- onCancel: () => console.log("hide"),
352
501
  },
353
502
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
354
503
  }
@@ -1,6 +1,8 @@
1
1
  import { getEnvironmentSDK, useQuery } from "@saasquatch/component-boilerplate";
2
- import { useState, useEffect } from "@saasquatch/stencil-hooks";
2
+ import { useEffect, useState } from "@saasquatch/stencil-hooks";
3
3
  import { gql } from "graphql-request";
4
+ import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
5
+ import { useVeriffApp, VERIFF_COMPLETE_EVENT_KEY } from "../useVeriffApp";
4
6
  const GET_USER_STATUS = gql `
5
7
  query getUserStatus {
6
8
  user: viewer {
@@ -21,12 +23,18 @@ const GET_USER_STATUS = gql `
21
23
  }
22
24
  `;
23
25
  export function getStatus(data) {
24
- var _a, _b, _c, _d, _e;
26
+ var _a, _b, _c, _d, _e, _f, _g, _h;
25
27
  const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
26
28
  if (!((_d = (_c = data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.connected) || !account)
27
29
  return "INFORMATION_REQUIRED";
28
30
  if ((_e = account.holdReasons) === null || _e === void 0 ? void 0 : _e.includes("IDV_CHECK_REQUIRED"))
29
- return "VERIFICATION_NEEDED";
31
+ return "VERIFICATION:REQUIRED";
32
+ if ((_f = account.holdReasons) === null || _f === void 0 ? void 0 : _f.includes("IDV_CHECK_REQUIRED_INTERNAL"))
33
+ return "VERIFICATION:INTERNAL";
34
+ if ((_g = account.holdReasons) === null || _g === void 0 ? void 0 : _g.includes("IDV_CHECK_REVIEW_INTERNAL"))
35
+ return "VERIFICATION:REVIEW";
36
+ if ((_h = account.holdReasons) === null || _h === void 0 ? void 0 : _h.includes("IDV_CHECK_FAILED_INTERNAL"))
37
+ return "VERIFICATION:FAILED";
30
38
  if (account.hold)
31
39
  return "HOLD";
32
40
  return "DONE";
@@ -34,8 +42,8 @@ export function getStatus(data) {
34
42
  export function usePayoutStatus(props) {
35
43
  const { type } = getEnvironmentSDK();
36
44
  const { loading, data, errors, refetch } = useQuery(GET_USER_STATUS, {});
45
+ const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
37
46
  const [status, setStatus] = useState(undefined);
38
- const [showDialog, setShowDialog] = useState(false);
39
47
  useEffect(() => {
40
48
  if (!data)
41
49
  return;
@@ -44,22 +52,25 @@ export function usePayoutStatus(props) {
44
52
  }, [data]);
45
53
  useEffect(() => {
46
54
  const cb = () => refetch();
47
- window.addEventListener("sqm:tax-form-updated", cb);
48
- return () => window.removeEventListener("sqm:tax-form-updated", cb);
55
+ window.addEventListener(TAX_FORM_UPDATED_EVENT_KEY, cb);
56
+ window.addEventListener(VERIFF_COMPLETE_EVENT_KEY, cb);
57
+ return () => {
58
+ window.removeEventListener(TAX_FORM_UPDATED_EVENT_KEY, cb);
59
+ window.removeEventListener(VERIFF_COMPLETE_EVENT_KEY, cb);
60
+ };
49
61
  }, []);
50
62
  return {
51
63
  states: {
52
64
  loading,
65
+ veriffLoading,
53
66
  status,
54
- showVerifyIdentity: showDialog,
55
67
  error: !!errors,
56
68
  },
57
69
  data: { type },
58
70
  text: props.getTextProps(),
59
71
  callbacks: {
60
72
  onTermsClick: () => window.open(props.termsUrl, "_blank").focus(),
61
- onClick: () => setShowDialog(true),
62
- onCancel: () => setShowDialog(false),
73
+ onClick: render,
63
74
  },
64
75
  };
65
76
  }
@@ -2,17 +2,43 @@ import { h } from "@stencil/core";
2
2
  import { intl } from "../../../global/global";
3
3
  import { createStyleSheet } from "../../../styling/JSS";
4
4
  const style = {
5
- WarningAlertContainer: {
5
+ ErrorAlertContainer: {
6
6
  "&::part(base)": {
7
7
  backgroundColor: "var(--sl-color-red-100)",
8
8
  borderTop: "none",
9
9
  },
10
+ "& sl-icon::part(base)": {
11
+ color: "var(--sl-color-danger-500)",
12
+ },
13
+ },
14
+ WarningAlertContainer: {
15
+ "&::part(base)": {
16
+ backgroundColor: "var(--sl-color-yellow-100)",
17
+ borderTop: "none",
18
+ },
19
+ "& sl-icon::part(base)": {
20
+ color: "var(--sl-color-warning-500)",
21
+ },
10
22
  },
11
- HoldAlertContainer: {
23
+ WarningHoldAlertContainer: {
24
+ marginLeft: "-20px",
12
25
  "&::part(base)": {
13
26
  border: "none",
14
27
  backgroundColor: "transparent",
15
28
  },
29
+ "& sl-icon::part(base)": {
30
+ color: "var(--sl-color-warning-500)",
31
+ },
32
+ },
33
+ ErrorHoldAlertContainer: {
34
+ marginLeft: "-20px",
35
+ "&::part(base)": {
36
+ border: "none",
37
+ backgroundColor: "transparent",
38
+ },
39
+ "& sl-icon::part(base)": {
40
+ color: "var(--sl-color-danger-500)",
41
+ },
16
42
  },
17
43
  ExpiringSoonAlertContainer: {
18
44
  "&::part(base)": {
@@ -133,6 +159,7 @@ const style = {
133
159
  PageDescriptionText: {
134
160
  color: "var(--sl-color-neutral-500)",
135
161
  fontSize: "var(--sl-font-size-medium)",
162
+ marginTop: "0",
136
163
  },
137
164
  Dialog: {
138
165
  "&::part(panel)": {
@@ -165,8 +192,56 @@ const style = {
165
192
  const sheet = createStyleSheet(style);
166
193
  const styleString = sheet.toString();
167
194
  export const TaxAndCashDashboardView = (props) => {
168
- var _a;
195
+ var _a, _b, _c, _d;
169
196
  const { states, text, callbacks, slots } = props;
197
+ function getAlert(status) {
198
+ switch (status) {
199
+ case "VERIFICATION:REQUIRED":
200
+ return {
201
+ header: text.verificationRequiredHeader,
202
+ description: text.verificationRequiredDescription,
203
+ buttonText: text.verificationRequiredButtonText,
204
+ alertType: "warning",
205
+ icon: "exclamation-triangle",
206
+ class: sheet.classes.WarningHoldAlertContainer,
207
+ };
208
+ case "VERIFICATION:INTERNAL":
209
+ return {
210
+ header: text.verificationRequiredInternalHeader,
211
+ description: text.verificationRequiredInternalDescription,
212
+ alertType: "warning",
213
+ icon: "exclamation-triangle",
214
+ class: sheet.classes.WarningHoldAlertContainer,
215
+ };
216
+ case "VERIFICATION:REVIEW":
217
+ return {
218
+ header: text.verificationReviewInternalHeader,
219
+ description: text.verificationReviewInternalDescription,
220
+ alertType: "warning",
221
+ icon: "exclamation-triangle",
222
+ class: sheet.classes.WarningHoldAlertContainer,
223
+ };
224
+ case "VERIFICATION:FAILED":
225
+ return {
226
+ header: text.verificationFailedInternalHeader,
227
+ description: text.verificationFailedInternalDescription,
228
+ alertType: "critical",
229
+ icon: "exclamation-octagon",
230
+ class: sheet.classes.ErrorHoldAlertContainer,
231
+ };
232
+ case "HOLD":
233
+ return {
234
+ header: text.payoutHoldAlertHeader,
235
+ description: text.payoutHoldAlertDescription,
236
+ buttonText: null,
237
+ alertType: "warning",
238
+ icon: "exclamation-triangle",
239
+ class: sheet.classes.WarningHoldAlertContainer,
240
+ };
241
+ default:
242
+ return;
243
+ }
244
+ }
170
245
  const statusMap = {
171
246
  NOT_VERIFIED: (h("div", { class: sheet.classes.TaxFormDetailsContainer },
172
247
  h("sl-badge", { type: "warning", pill: true }, text.statusTextNotVerified),
@@ -191,7 +266,7 @@ export const TaxAndCashDashboardView = (props) => {
191
266
  h("p", null, text.invalidForm))),
192
267
  };
193
268
  const alertMap = {
194
- INACTIVE: (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.WarningAlertContainer },
269
+ INACTIVE: (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.ErrorAlertContainer },
195
270
  h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
196
271
  h("strong", null, intl.formatMessage({
197
272
  id: `taxAlertHeaderNotActive`,
@@ -243,39 +318,28 @@ export const TaxAndCashDashboardView = (props) => {
243
318
  h("div", null,
244
319
  h("style", { type: "text/css" }, styleString),
245
320
  states.loadingError && (h("div", null,
246
- h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.WarningAlertContainer },
321
+ h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.ErrorAlertContainer },
247
322
  h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
248
323
  h("strong", null, text.error.loadingErrorAlertHeader),
249
324
  h("br", null),
250
325
  text.error.loadingErrorAlertDescription))),
251
- ((_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.WarningAlertContainer },
326
+ ((_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 },
252
327
  h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
253
328
  h("strong", null, text.error.generalTitle),
254
329
  h("br", null),
255
330
  text.error.generalDescription)),
256
- states.hasHold && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet.classes.HoldAlertContainer },
257
- h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
258
- h("strong", null, text.payoutHoldAlertHeader),
259
- h("br", null),
260
- text.payoutHoldAlertDescription)),
261
- states.payoutStatus === "VERIFICATION_NEEDED" && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet.classes.HoldAlertContainer },
262
- h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
263
- h("strong", null, text.verificationRequiredHeader),
264
- h("p", { style: { margin: "0" } }, text.verificationRequiredDescription),
265
- h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.loading,
266
- //AL: TODO hooks
267
- onClick: () => callbacks.onClick }, text.verificationRequiredButtonText))),
268
- h("sl-dialog", { noDismiss: true, class: sheet.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onVerifyIdentityCancel },
269
- h("iframe", {
270
- // AL: TODO replace iframe URL with verification url when available
271
- scrolling: "yes", frameBorder: "0", width: "100%", height: "100%", src: "https://impacttech.complytaxforms.com/ServiceRedirect.aspx?Language=eng&Param1=UxBORV4bOIrqNb4gbpNmtvW3wjdZJyx4gPElIGMJNR8=&UUID=B576EA3E-80FD-4D85-AA59-653D23A7CCE8" })),
331
+ getAlert(states.payoutStatus) && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", name: (_b = getAlert(states.payoutStatus)) === null || _b === void 0 ? void 0 : _b.alertType, open: true, class: (_c = getAlert(states.payoutStatus)) === null || _c === void 0 ? void 0 : _c.class },
332
+ h("sl-icon", { slot: "icon", name: (_d = getAlert(states.payoutStatus)) === null || _d === void 0 ? void 0 : _d.icon }),
333
+ h("strong", null, getAlert(states.payoutStatus).header),
334
+ h("p", { style: { margin: "0" } }, getAlert(states.payoutStatus).description),
335
+ getAlert(states.payoutStatus).buttonText && (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, getAlert(states.payoutStatus).buttonText)))),
272
336
  h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
273
337
  h("p", null, text.replaceTaxFormModalBodyText),
274
338
  h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
275
339
  h("sl-button", { slot: "footer", type: "default", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
276
340
  states.status === "INACTIVE" && alertMap[states.status],
277
341
  h("div", null,
278
- h("h3", null, text.bankingInformationSectionHeader),
342
+ h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
279
343
  h("p", { class: sheet.classes.PageDescriptionText }, text.taxAndPayoutsDescription),
280
344
  h("div", { class: sheet.classes.BankingInformationContainer },
281
345
  slots.payoutDetailsCardSlot,