@saasquatch/mint-components 1.15.5-5 → 1.15.6

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 (125) hide show
  1. package/dist/cjs/{ShadowViewAddon-28865623.js → ShadowViewAddon-e9dc77e3.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 +234 -384
  5. package/dist/cjs/{sqm-base-registration-form-view-8029d30e.js → sqm-base-registration-form-view-66f99821.js} +9 -4
  6. package/dist/cjs/sqm-big-stat_43.cjs.entry.js +10 -150
  7. package/dist/cjs/sqm-header-logo.cjs.entry.js +1 -8
  8. package/dist/cjs/{sqm-invoice-table-view-3f60fba9.js → sqm-invoice-table-view-5c74607f.js} +0 -1
  9. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +25 -18
  10. package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -5
  11. package/dist/cjs/{usePayoutStatus-7892433f.js → usePayoutStatus-1ffd1cd4.js} +4 -176
  12. package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
  13. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +9 -4
  14. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
  15. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
  16. package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +3 -73
  17. package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
  18. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
  19. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -0
  20. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +3 -3
  21. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +31 -1
  22. package/dist/collection/components/sqm-name-fields/useNameFields.js +1 -0
  23. package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
  24. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +1 -0
  25. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +4 -4
  26. package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +22 -15
  27. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
  28. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +40 -46
  29. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +2 -90
  30. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -353
  31. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +5 -36
  32. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +0 -300
  33. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +2 -92
  34. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +0 -300
  35. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -23
  36. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
  37. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -92
  38. package/dist/esm/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +2 -2
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/mint-components.js +1 -1
  41. package/dist/esm/sqm-banking-info-form_17.entry.js +189 -339
  42. package/dist/esm/{sqm-base-registration-form-view-dafba287.js → sqm-base-registration-form-view-d81e316a.js} +9 -4
  43. package/dist/esm/sqm-big-stat_43.entry.js +11 -151
  44. package/dist/esm/sqm-header-logo.entry.js +1 -8
  45. package/dist/esm/{sqm-invoice-table-view-01453fa3.js → sqm-invoice-table-view-3491dd80.js} +0 -1
  46. package/dist/esm/sqm-portal-google-registration-form.entry.js +25 -18
  47. package/dist/esm/sqm-stencilbook.entry.js +8 -5
  48. package/dist/esm/{usePayoutStatus-c21ef382.js → usePayoutStatus-f09f2ec8.js} +6 -163
  49. package/dist/esm-es5/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +1 -1
  50. package/dist/esm-es5/loader.js +1 -1
  51. package/dist/esm-es5/mint-components.js +1 -1
  52. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  53. package/dist/esm-es5/sqm-base-registration-form-view-d81e316a.js +1 -0
  54. package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
  55. package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
  56. package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +1 -0
  57. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  58. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  59. package/dist/esm-es5/usePayoutStatus-f09f2ec8.js +6 -0
  60. package/dist/mint-components/mint-components.esm.js +1 -1
  61. package/dist/mint-components/p-15364635.entry.js +273 -0
  62. package/dist/mint-components/{p-4a731079.entry.js → p-1edebab1.entry.js} +2 -2
  63. package/dist/mint-components/p-2d8045c2.entry.js +220 -0
  64. package/dist/mint-components/p-3439af2f.system.entry.js +1 -0
  65. package/dist/mint-components/p-37996351.system.js +1 -1
  66. package/dist/mint-components/{p-02832118.system.entry.js → p-3ac8613d.system.entry.js} +1 -1
  67. package/dist/mint-components/{p-c1b074b6.js → p-3b6dccec.js} +1 -1
  68. package/dist/mint-components/p-3df72337.js +46 -0
  69. package/dist/mint-components/p-43e274e9.entry.js +1 -0
  70. package/dist/mint-components/p-49932f12.system.js +1 -0
  71. package/dist/mint-components/p-5cda9960.system.entry.js +1 -0
  72. package/dist/mint-components/p-7dabdca6.system.entry.js +1 -0
  73. package/dist/mint-components/p-8db18561.system.entry.js +1 -0
  74. package/dist/mint-components/p-9308221f.js +1 -0
  75. package/dist/mint-components/p-bc021969.system.js +1 -0
  76. package/dist/mint-components/{p-0d939b73.system.js → p-d15b642f.system.js} +1 -1
  77. package/dist/mint-components/p-e8e48982.js +1 -0
  78. package/dist/mint-components/p-f82e3152.system.js +6 -0
  79. package/dist/mint-components/p-faba3198.entry.js +1 -0
  80. package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +2 -1
  81. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
  82. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
  83. package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +1 -14
  84. package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
  85. package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
  86. package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +1 -0
  87. package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +5 -0
  88. package/dist/types/components/sqm-name-fields/useNameFields.d.ts +1 -0
  89. package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
  90. package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +2 -1
  91. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -23
  92. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -16
  93. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -57
  94. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -3
  95. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -48
  96. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +0 -12
  97. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +0 -48
  98. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -2
  99. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +0 -1
  100. package/dist/types/components.d.ts +11 -331
  101. package/dist/types/global/android.d.ts +7 -0
  102. package/dist/types/global/demo.d.ts +2 -0
  103. package/dist/types/stories/features.d.ts +4 -0
  104. package/dist/types/stories/templates.d.ts +4 -0
  105. package/docs/docs.docx +0 -0
  106. package/docs/raisins.json +1 -1
  107. package/grapesjs/grapesjs.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/esm-es5/sqm-base-registration-form-view-dafba287.js +0 -1
  110. package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +0 -1
  111. package/dist/esm-es5/usePayoutStatus-c21ef382.js +0 -6
  112. package/dist/mint-components/p-2651ef99.system.js +0 -1
  113. package/dist/mint-components/p-35701119.js +0 -1
  114. package/dist/mint-components/p-48552798.system.entry.js +0 -1
  115. package/dist/mint-components/p-498bbce7.system.entry.js +0 -1
  116. package/dist/mint-components/p-59fe6066.js +0 -1
  117. package/dist/mint-components/p-67035b70.system.entry.js +0 -1
  118. package/dist/mint-components/p-86a5db85.system.js +0 -1
  119. package/dist/mint-components/p-9c4f4cd6.entry.js +0 -1
  120. package/dist/mint-components/p-a3647f70.system.entry.js +0 -1
  121. package/dist/mint-components/p-aa595246.system.js +0 -6
  122. package/dist/mint-components/p-bdbf26da.entry.js +0 -273
  123. package/dist/mint-components/p-cb87eadd.entry.js +0 -1
  124. package/dist/mint-components/p-d289d251.entry.js +0 -109
  125. package/dist/mint-components/p-d9da598f.js +0 -157
@@ -1,9 +1,8 @@
1
1
  import { useState } from "@saasquatch/universal-hooks";
2
2
  import jsonpointer from "jsonpointer";
3
- import { useRegistrationForm } from "../sqm-portal-registration-form/useRegistrationFormState";
4
3
  import { jwtDecode } from "jwt-decode";
4
+ import { useRegistrationForm } from "../sqm-portal-registration-form/useRegistrationFormState";
5
5
  export function usePortalGoogleRegistrationForm(props) {
6
- const [emailValidationError, setEmailValidationError] = useState(null);
7
6
  const [registrationFormState, setRegistrationFormState] = useRegistrationForm();
8
7
  const [showRegistrationForm, setShowRegistrationForm] = useState({
9
8
  mode: "base",
@@ -11,33 +10,40 @@ export function usePortalGoogleRegistrationForm(props) {
11
10
  const handleEmailSubmit = async (event) => {
12
11
  const formControls = event.target.getFormControls();
13
12
  let formData = {};
14
- let errorMessage = null;
13
+ let validationErrors = {};
15
14
  formControls.forEach((control) => {
16
15
  if (!control.name)
17
16
  return;
18
- jsonpointer.set(formData, control.name, control.value);
19
- // only validate email field
20
- if (control.name !== "/email")
21
- return;
22
- if (control.required && !control.value)
23
- errorMessage = props.requiredFieldErrorMessage;
17
+ const key = control.name;
18
+ const value = control.value;
19
+ jsonpointer.set(formData, key, value);
20
+ if (control.required && !value) {
21
+ jsonpointer.set(validationErrors, key, props.requiredFieldErrorMessage);
22
+ }
24
23
  if (typeof control.validationError === "function") {
25
24
  const validate = control.validationError;
26
25
  const validationError = validate({
27
26
  control,
28
- key: "email",
29
- value: control.value,
27
+ key,
28
+ value,
30
29
  });
31
30
  if (validationError)
32
- errorMessage = validationError;
31
+ jsonpointer.set(validationErrors, key, validationError);
33
32
  }
34
33
  });
35
- if (errorMessage) {
36
- setEmailValidationError(errorMessage);
34
+ if (Object.keys(validationErrors).length) {
35
+ // early return for validation errors
36
+ setRegistrationFormState({
37
+ ...registrationFormState,
38
+ loading: false,
39
+ error: "",
40
+ validationErrors,
41
+ });
37
42
  return;
38
43
  }
39
44
  setRegistrationFormState({
40
45
  ...registrationFormState,
46
+ validationErrors: {},
41
47
  initialData: {
42
48
  ...registrationFormState === null || registrationFormState === void 0 ? void 0 : registrationFormState.initialData,
43
49
  ...formData,
@@ -67,8 +73,9 @@ export function usePortalGoogleRegistrationForm(props) {
67
73
  }
68
74
  };
69
75
  return {
76
+ registrationFormState,
70
77
  showRegistrationForm,
71
- emailValidationError,
78
+ validationErrors: registrationFormState.validationErrors,
72
79
  handleGoogleInit,
73
80
  handleEmailSubmit,
74
81
  };
@@ -32,7 +32,6 @@ const stepOneProps = {
32
32
  },
33
33
  },
34
34
  data: {
35
- partnerData: {},
36
35
  regionLabelEnum: "STATE",
37
36
  regions: [],
38
37
  phoneCountries: [
@@ -6,7 +6,7 @@ import { COUNTRIES_QUERY_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAME
6
6
  import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
7
7
  import { getCountryObj, validTaxDocument } from "../utils";
8
8
  import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
9
- export const CONNECT_PARTNER = gql `
9
+ const CONNECT_PARTNER = gql `
10
10
  mutation createImpactConnection($vars: ImpactConnectionInput!) {
11
11
  createImpactConnection(impactConnectionInput: $vars) {
12
12
  success
@@ -111,51 +111,8 @@ export function useIndirectTaxForm(props) {
111
111
  console.error("Could not detect select change");
112
112
  setFormState((p) => ({ ...p, [field]: value }));
113
113
  };
114
- async function connectPartner(formData) {
115
- var _a, _b, _c, _d, _e;
116
- const vars = {
117
- user: {
118
- id: user.id,
119
- accountId: user.accountId,
120
- },
121
- firstName: userForm.firstName,
122
- lastName: userForm.lastName,
123
- countryCode: userForm.countryCode,
124
- currency: userForm.currency,
125
- address: userForm.address,
126
- city: userForm.city,
127
- state: userForm.state,
128
- postalCode: userForm.postalCode,
129
- phoneNumber: userForm.phoneNumber,
130
- phoneNumberCountryCode: userForm.phoneNumberCountryCode,
131
- indirectTaxCountryCode: formData.selectedRegion,
132
- indirectTaxRegion: formData.province || formData.subRegion,
133
- indirectTaxId: formData.indirectTaxNumber,
134
- additionalTaxId: formData.qstNumber,
135
- withholdingTaxId: formData.subRegionTaxNumber,
136
- };
137
- const result = await connectImpactPartner({
138
- vars,
139
- });
140
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
141
- throw new Error();
142
- if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
143
- // Output backend errors to console for now
144
- console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
145
- throw new Error();
146
- }
147
- await refetch();
148
- const resultPublisher = (_e = (_d = (_c = result
149
- .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
150
- const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
151
- // Fire form change event
152
- window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
153
- return {
154
- resultPublisher,
155
- hasValidCurrentDocument,
156
- };
157
- }
158
114
  const onSubmit = async (event) => {
115
+ var _a, _b, _c, _d, _e;
159
116
  if (!option) {
160
117
  setErrors({ taxDetails: true });
161
118
  return;
@@ -181,7 +138,44 @@ export function useIndirectTaxForm(props) {
181
138
  }
182
139
  setLoading(true);
183
140
  try {
184
- const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
141
+ const vars = {
142
+ user: {
143
+ id: user.id,
144
+ accountId: user.accountId,
145
+ },
146
+ firstName: userForm.firstName,
147
+ lastName: userForm.lastName,
148
+ countryCode: userForm.countryCode,
149
+ currency: userForm.currency,
150
+ address: userForm.address,
151
+ city: userForm.city,
152
+ state: userForm.state,
153
+ postalCode: userForm.postalCode,
154
+ phoneNumber: userForm.phoneNumber,
155
+ phoneNumberCountryCode: userForm.phoneNumberCountryCode,
156
+ indirectTaxCountryCode: formData.selectedRegion,
157
+ indirectTaxRegion: formData.province || formData.subRegion,
158
+ indirectTaxId: formData.indirectTaxNumber,
159
+ additionalTaxId: formData.qstNumber,
160
+ withholdingTaxId: formData.subRegionTaxNumber,
161
+ };
162
+ const result = await connectImpactPartner({
163
+ vars,
164
+ });
165
+ if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
166
+ throw new Error();
167
+ if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
168
+ // Output backend errors to console for now
169
+ console.error("Failed to create Impact connection: ", result.createImpactConnection
170
+ .validationErrors);
171
+ throw new Error();
172
+ }
173
+ await refetch();
174
+ const resultPublisher = (_e = (_d = (_c = result
175
+ .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
176
+ const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
177
+ // Fire form change event
178
+ window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
185
179
  if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
186
180
  !hasValidCurrentDocument) {
187
181
  // Go to docusign form
@@ -1,4 +1,4 @@
1
- import { Fragment, h } from "@stencil/core";
1
+ import { h } from "@stencil/core";
2
2
  import { intl } from "../../../global/global";
3
3
  import { createStyleSheet } from "../../../styling/JSS";
4
4
  const style = {
@@ -160,7 +160,7 @@ export function PayoutStatusAlertView(props) {
160
160
  class: sheet.classes.WarningAlertContainer,
161
161
  };
162
162
  }
163
- case "NEW_PAYEE_REVIEW":
163
+ case "ACCOUNT_REVIEW":
164
164
  return {
165
165
  header: text.accountReviewHeader,
166
166
  description: intl.formatMessage({
@@ -174,92 +174,6 @@ export function PayoutStatusAlertView(props) {
174
174
  icon: "exclamation-triangle",
175
175
  class: sheet.classes.WarningAlertContainer,
176
176
  };
177
- case "PAYMENT_HOLD_ON_CHANGE":
178
- return {
179
- header: text.paymentHoldOnChangeHeader,
180
- description: intl.formatMessage({
181
- id: "accountReviewDescription",
182
- defaultMessage: text.paymentHoldOnChangeDescription,
183
- }, {
184
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
185
- }),
186
- buttonText: null,
187
- alertType: "warning",
188
- icon: "exclamation-triangle",
189
- class: sheet.classes.WarningAlertContainer,
190
- };
191
- case "BENEFICIARY_NAME_INVALID":
192
- return {
193
- header: text.beneficiaryNameInvalidHeader,
194
- description: intl.formatMessage({
195
- id: "accountReviewDescription",
196
- defaultMessage: text.beneficiaryNameInvalidDescription,
197
- }, {
198
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
199
- }),
200
- buttonText: text.editPaymentInformationButton,
201
- alertType: "warning",
202
- icon: "exclamation-triangle",
203
- class: sheet.classes.WarningAlertContainer,
204
- };
205
- case "BENEFICIARY_NAME_MISMATCH":
206
- return {
207
- header: text.beneficiaryNameMismatchHeader,
208
- description: intl.formatMessage({
209
- id: "accountReviewDescription",
210
- defaultMessage: text.beneficiaryNameMismatchDescription,
211
- }, {
212
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
213
- }),
214
- buttonText: text.editPaymentInformationButton,
215
- alertType: "warning",
216
- icon: "exclamation-triangle",
217
- class: sheet.classes.WarningAlertContainer,
218
- };
219
- case "BANK_TAX_NAME_MISMATCH":
220
- return {
221
- header: text.bankTaxNameMismatchHeader,
222
- description: intl.formatMessage({
223
- id: "accountReviewDescription",
224
- defaultMessage: text.bankTaxNameMismatchDescription,
225
- }, {
226
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
227
- }),
228
- buttonText: text.editPaymentInformationButton,
229
- alertType: "warning",
230
- icon: "exclamation-triangle",
231
- class: sheet.classes.WarningAlertContainer,
232
- };
233
- case "WITHDRAWAL_SETTINGS_INVALID":
234
- return {
235
- header: text.withdrawalSettingsInvalidHeader,
236
- description: intl.formatMessage({
237
- id: "accountReviewDescription",
238
- defaultMessage: text.withdrawalSettingsInvalidDescription,
239
- }, {
240
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
241
- }),
242
- buttonText: text.editPaymentInformationButton,
243
- alertType: "warning",
244
- icon: "exclamation-triangle",
245
- class: sheet.classes.WarningAlertContainer,
246
- };
247
- case "PAYMENT_RETURNED":
248
- return {
249
- header: text.paymentReturnedHeader,
250
- description: intl.formatMessage({
251
- id: "accountReviewDescription",
252
- defaultMessage: text.paymentReturnedDescription,
253
- }, {
254
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
255
- }),
256
- button: (h(Fragment, null,
257
- h("sl-button", { disabled: states.loading, type: "default", onClick: callbacks.onPaymentInfoClick }, text.editPaymentInformationButton),
258
- h("sl-button", { disabled: states.loading, type: "default", onClick: callbacks.onNewFormClick }, text.newFormButton))),
259
- alertType: "warning",
260
- icon: "exclamation-triangle",
261
- class: sheet.classes.WarningAlertContainer,
262
- };
263
177
  case "HOLD":
264
178
  return {
265
179
  header: text.holdHeader,
@@ -293,8 +207,6 @@ export function PayoutStatusAlertView(props) {
293
207
  case "VERIFICATION:REQUIRED":
294
208
  return (h("sl-button", { type: "default", loading: states.veriffLoading, onClick: callbacks.onClick }, text.verificationRequiredButtonText));
295
209
  default:
296
- if (alertDetails.button)
297
- return alertDetails.button;
298
210
  return;
299
211
  }
300
212
  }