@saasquatch/mint-components 1.12.0-5 → 1.12.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 (124) 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 +47 -18
  4. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +33 -6
  5. package/dist/cjs/sqm-code-verification.cjs.entry.js +34 -48
  6. package/dist/cjs/sqm-email-verification.cjs.entry.js +143 -21
  7. package/dist/cjs/{sqm-invoice-table-view-dbba9bb4.js → sqm-invoice-table-view-e530775f.js} +39 -0
  8. package/dist/cjs/sqm-stencilbook.cjs.entry.js +19 -1
  9. package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +55 -7
  10. package/dist/cjs/sqm-widget-verification.cjs.entry.js +15 -18
  11. package/dist/cjs/useVerificationEmail-35aea294.js +170 -0
  12. package/dist/collection/collection-manifest.json +1 -1
  13. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +7 -0
  14. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +1 -1
  15. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +20 -2
  16. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +33 -24
  17. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +19 -42
  18. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +56 -7
  19. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +17 -20
  20. package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +165 -0
  21. package/dist/collection/components/tax-and-cash/BankingForm.stories.js +1 -0
  22. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +38 -0
  23. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -1
  24. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +7 -0
  25. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +8 -0
  26. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +10 -5
  27. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +33 -1
  28. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +13 -2
  29. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +5 -0
  30. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +8 -8
  31. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +11 -0
  32. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +10 -9
  33. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +2 -1
  34. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +14 -11
  35. package/dist/esm/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  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_16.entry.js +48 -19
  39. package/dist/esm/sqm-big-stat_39.entry.js +34 -7
  40. package/dist/esm/sqm-code-verification.entry.js +36 -50
  41. package/dist/esm/sqm-email-verification.entry.js +127 -5
  42. package/dist/esm/{sqm-invoice-table-view-663674f2.js → sqm-invoice-table-view-22bb7240.js} +39 -0
  43. package/dist/esm/sqm-stencilbook.entry.js +19 -1
  44. package/dist/esm/sqm-widget-verification-internal.entry.js +55 -7
  45. package/dist/esm/sqm-widget-verification.entry.js +17 -20
  46. package/dist/esm/useVerificationEmail-02b78bd7.js +168 -0
  47. package/dist/esm-es5/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  48. package/dist/esm-es5/loader.js +1 -1
  49. package/dist/esm-es5/mint-components.js +1 -1
  50. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  51. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  52. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  53. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  54. package/dist/esm-es5/sqm-invoice-table-view-22bb7240.js +1 -0
  55. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  56. package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
  57. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  58. package/dist/esm-es5/useVerificationEmail-02b78bd7.js +1 -0
  59. package/dist/mint-components/mint-components.esm.js +1 -1
  60. package/dist/mint-components/{p-53d9df5e.entry.js → p-0aebee07.entry.js} +8 -3
  61. package/dist/mint-components/p-0e2d876d.entry.js +240 -0
  62. package/dist/mint-components/p-116c1809.entry.js +11 -0
  63. package/dist/mint-components/{p-99a09fab.entry.js → p-126a4f24.entry.js} +2 -2
  64. package/dist/mint-components/p-22b7bd75.system.entry.js +1 -0
  65. package/dist/mint-components/{p-d4138847.system.entry.js → p-28450e40.system.entry.js} +1 -1
  66. package/dist/mint-components/p-2b5b2586.system.js +1 -0
  67. package/dist/mint-components/p-39840341.js +1 -0
  68. package/dist/mint-components/p-4a43ffbd.js +1 -0
  69. package/dist/mint-components/p-55fe2ec0.system.entry.js +1 -0
  70. package/dist/mint-components/p-6fb496ac.entry.js +12 -0
  71. package/dist/mint-components/p-71b8adf7.system.js +1 -0
  72. package/dist/mint-components/p-7666cd3d.js +48 -0
  73. package/dist/mint-components/p-87bf9880.entry.js +25 -0
  74. package/dist/mint-components/p-8a7d2170.system.entry.js +1 -0
  75. package/dist/mint-components/p-a5eedbe2.system.entry.js +1 -0
  76. package/dist/mint-components/p-a60ec391.system.entry.js +1 -0
  77. package/dist/mint-components/p-b2a99637.system.js +1 -0
  78. package/dist/mint-components/p-ca423ca2.system.entry.js +1 -0
  79. package/dist/mint-components/p-e05ff098.system.js +1 -1
  80. package/dist/mint-components/p-e373b78a.entry.js +1 -0
  81. package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +1 -0
  82. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +1 -0
  83. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +4 -0
  84. package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +2 -1
  85. package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +0 -6
  86. package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +14 -0
  87. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  88. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
  89. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +1 -0
  90. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +9 -0
  91. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +4 -0
  92. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +9 -0
  93. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +5 -0
  94. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -2
  95. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +3 -0
  96. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +2 -2
  97. package/dist/types/components.d.ts +68 -52
  98. package/docs/docs.docx +0 -0
  99. package/docs/raisins.json +1 -1
  100. package/grapesjs/grapesjs.js +1 -1
  101. package/package.json +1 -1
  102. package/dist/cjs/useEmailVerification-33465f36.js +0 -155
  103. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +0 -3
  104. package/dist/esm/useEmailVerification-8f2dc2bd.js +0 -152
  105. package/dist/esm-es5/sqm-invoice-table-view-663674f2.js +0 -1
  106. package/dist/esm-es5/useEmailVerification-8f2dc2bd.js +0 -1
  107. package/dist/mint-components/p-158e9d3a.entry.js +0 -1
  108. package/dist/mint-components/p-20c5ce3d.system.entry.js +0 -1
  109. package/dist/mint-components/p-219be817.system.entry.js +0 -1
  110. package/dist/mint-components/p-2c03096f.system.entry.js +0 -1
  111. package/dist/mint-components/p-4c9b6fbe.system.js +0 -1
  112. package/dist/mint-components/p-4d060f15.js +0 -1
  113. package/dist/mint-components/p-5810e318.entry.js +0 -1
  114. package/dist/mint-components/p-6029c42d.entry.js +0 -8
  115. package/dist/mint-components/p-6cae44d7.js +0 -1
  116. package/dist/mint-components/p-78c1bd77.system.js +0 -1
  117. package/dist/mint-components/p-80a32fe9.system.entry.js +0 -1
  118. package/dist/mint-components/p-a2baff3e.entry.js +0 -1
  119. package/dist/mint-components/p-b52b7e60.system.entry.js +0 -1
  120. package/dist/mint-components/p-f4dff47a.system.entry.js +0 -1
  121. package/dist/mint-components/p-faf019cf.system.js +0 -1
  122. package/dist/mint-components/p-fcb224ab.js +0 -25
  123. package/dist/mint-components/p-ff77d11f.entry.js +0 -240
  124. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -1
@@ -32,7 +32,7 @@ const sheet = createStyleSheet(style);
32
32
  const styleString = sheet.toString();
33
33
  export function PayoutStatusAlertView(props) {
34
34
  var _a, _b, _c, _d, _e;
35
- const { text, states } = props;
35
+ const { text, states, data, callbacks } = props;
36
36
  if (states.loading) {
37
37
  return h("sl-skeleton", { class: sheet.classes.SkeletonOne });
38
38
  }
@@ -45,7 +45,7 @@ export function PayoutStatusAlertView(props) {
45
45
  return {
46
46
  header: text.informationRequiredHeader,
47
47
  description: text.informationRequiredDescription,
48
- buttonText: text.verificationRequiredButtonText,
48
+ buttonText: text.informationRequiredButtonText,
49
49
  alertType: "info",
50
50
  icon: "info-circle",
51
51
  class: sheet.classes.InfoAlertContainer,
@@ -76,9 +76,11 @@ export function PayoutStatusAlertView(props) {
76
76
  function getButton(status) {
77
77
  switch (status) {
78
78
  case "INFORMATION_REQUIRED":
79
- return (h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": "Payout and tax settings", "scroll-animation": "smooth" }));
79
+ 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));
80
80
  case "VERIFICATION_NEEDED":
81
- return (h("sl-button", { type: "default", loading: states.loading }, text.verificationRequiredButtonText));
81
+ return (h("sl-button", { type: "default", loading: states.loading,
82
+ //AL: TODO callback to open verification form
83
+ onClick: () => callbacks.onClick }, text.verificationRequiredButtonText));
82
84
  default:
83
85
  return;
84
86
  }
@@ -89,5 +91,8 @@ export function PayoutStatusAlertView(props) {
89
91
  h("sl-icon", { slot: "icon", name: (_c = getAlert(states.status)) === null || _c === void 0 ? void 0 : _c.icon }),
90
92
  h("strong", null, (_d = getAlert(states.status)) === null || _d === void 0 ? void 0 : _d.header),
91
93
  h("p", { class: sheet.classes.AlertDescriptionText }, (_e = getAlert(states.status)) === null || _e === void 0 ? void 0 : _e.description),
92
- getButton(states.status))));
94
+ getButton(states.status)),
95
+ h("sl-dialog", {
96
+ // class={sheet.classes.Dialog}
97
+ open: states.showVerifyIdentity, "onSl-hide": callbacks.onCancel }, "AL: TODO add IFRAME URL")));
93
98
  }
@@ -44,6 +44,10 @@ export class PayoutStatusAlert {
44
44
  * @uiName Payout on hold alert description
45
45
  */
46
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}.";
47
+ /**
48
+ * @uiName Cash & Payouts Terms and Conditions url
49
+ */
50
+ this.termsUrl = "https://terms.advocate.impact.com/PayoutTermsAndConditions.html";
47
51
  withHooks(this);
48
52
  }
49
53
  disconnectedCallback() { }
@@ -227,12 +231,33 @@ export class PayoutStatusAlert {
227
231
  "reflect": false,
228
232
  "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}.\""
229
233
  },
234
+ "termsUrl": {
235
+ "type": "string",
236
+ "mutable": false,
237
+ "complexType": {
238
+ "original": "string",
239
+ "resolved": "string",
240
+ "references": {}
241
+ },
242
+ "required": false,
243
+ "optional": false,
244
+ "docs": {
245
+ "tags": [{
246
+ "text": "Cash & Payouts Terms and Conditions url",
247
+ "name": "uiName"
248
+ }],
249
+ "text": ""
250
+ },
251
+ "attribute": "terms-url",
252
+ "reflect": false,
253
+ "defaultValue": "\"https://terms.advocate.impact.com/PayoutTermsAndConditions.html\""
254
+ },
230
255
  "demoData": {
231
256
  "type": "unknown",
232
257
  "mutable": false,
233
258
  "complexType": {
234
259
  "original": "DemoData<PayoutStatusAlertViewProps>",
235
- "resolved": "{ states?: { loading: boolean; status: PayoutStatus; }; }",
260
+ "resolved": "{ states?: { loading: boolean; status: PayoutStatus; showVerifyIdentity: boolean; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
236
261
  "references": {
237
262
  "DemoData": {
238
263
  "location": "import",
@@ -264,7 +289,14 @@ function useDemoPayoutStatusAlert(props) {
264
289
  states: {
265
290
  status: "INFORMATION_REQUIRED",
266
291
  loading: false,
292
+ showVerifyIdentity: false,
267
293
  },
294
+ data: { type: "SquatchAdmin" },
268
295
  text: props.getTextProps(),
296
+ callbacks: {
297
+ onTermsClick: () => { },
298
+ onClick: () => console.log("show"),
299
+ onCancel: () => console.log("hide"),
300
+ },
269
301
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
270
302
  }
@@ -1,4 +1,4 @@
1
- import { useQuery } from "@saasquatch/component-boilerplate";
1
+ import { getEnvironmentSDK, useQuery } from "@saasquatch/component-boilerplate";
2
2
  import { useState, useEffect } from "@saasquatch/stencil-hooks";
3
3
  import { gql } from "graphql-request";
4
4
  const GET_USER_STATUS = gql `
@@ -20,8 +20,10 @@ const GET_USER_STATUS = gql `
20
20
  }
21
21
  `;
22
22
  export function usePayoutStatus(props) {
23
+ const { type } = getEnvironmentSDK();
23
24
  const { loading, data, errors, refetch } = useQuery(GET_USER_STATUS, {});
24
25
  const [status, setStatus] = useState(undefined);
26
+ const [showDialog, setShowDialog] = useState(false);
25
27
  useEffect(() => {
26
28
  if (!data)
27
29
  return;
@@ -45,5 +47,14 @@ export function usePayoutStatus(props) {
45
47
  window.addEventListener("sqm:tax-form-updated", cb);
46
48
  return () => window.removeEventListener("sqm:tax-form-updated", cb);
47
49
  }, []);
48
- return { states: { loading, status }, text: props.getTextProps() };
50
+ return {
51
+ states: { loading, status, showVerifyIdentity: showDialog },
52
+ data: { type },
53
+ text: props.getTextProps(),
54
+ callbacks: {
55
+ onTermsClick: () => window.open(props.termsUrl, "_blank").focus(),
56
+ onClick: () => setShowDialog(true),
57
+ onCancel: () => setShowDialog(false),
58
+ },
59
+ };
49
60
  }
@@ -19,6 +19,11 @@ export const GET_USER = gql `
19
19
  email
20
20
  countryCode
21
21
  customFields
22
+ managedIdentity {
23
+ uid
24
+ email
25
+ emailVerified
26
+ }
22
27
  impactConnection {
23
28
  connected
24
29
  user {
@@ -748,14 +748,14 @@ export class TaxAndCashMonolith {
748
748
  * @uiGroup Dashboard Properties
749
749
  * @uiWidget textArea
750
750
  */
751
- this.dashboard_errorTitleText = "Your payout is on hold ";
751
+ this.payoutHoldAlertHeader = "Your payout is on hold";
752
752
  /**
753
753
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
754
754
  * @uiName Payout error message description
755
755
  * @uiGroup Dashboard Properties
756
756
  * @uiWidget textArea
757
757
  */
758
- this.dashboard_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.";
758
+ this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
759
759
  /**
760
760
  * Text displayed for existing publishers that do not have saved banking information.
761
761
  * @uiName Payout missing information subtext
@@ -3972,7 +3972,7 @@ export class TaxAndCashMonolith {
3972
3972
  "reflect": false,
3973
3973
  "defaultValue": "\"Earnings after tax\""
3974
3974
  },
3975
- "dashboard_errorTitleText": {
3975
+ "payoutHoldAlertHeader": {
3976
3976
  "type": "string",
3977
3977
  "mutable": false,
3978
3978
  "complexType": {
@@ -3995,11 +3995,11 @@ export class TaxAndCashMonolith {
3995
3995
  }],
3996
3996
  "text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
3997
3997
  },
3998
- "attribute": "dashboard_error-title-text",
3998
+ "attribute": "payout-hold-alert-header",
3999
3999
  "reflect": false,
4000
- "defaultValue": "\"Your payout is on hold \""
4000
+ "defaultValue": "\"Your payout is on hold\""
4001
4001
  },
4002
- "dashboard_errorDescriptionText": {
4002
+ "payoutHoldAlertDescription": {
4003
4003
  "type": "string",
4004
4004
  "mutable": false,
4005
4005
  "complexType": {
@@ -4022,9 +4022,9 @@ export class TaxAndCashMonolith {
4022
4022
  }],
4023
4023
  "text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
4024
4024
  },
4025
- "attribute": "dashboard_error-description-text",
4025
+ "attribute": "payout-hold-alert-description",
4026
4026
  "reflect": false,
4027
- "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.\""
4027
+ "defaultValue": "\"Please contact Support or check your inbox for an email from our referral program provider, impact.com.\""
4028
4028
  },
4029
4029
  "dashboard_payoutMissingInformationText": {
4030
4030
  "type": "string",
@@ -8,6 +8,12 @@ const style = {
8
8
  borderTop: "none",
9
9
  },
10
10
  },
11
+ HoldAlertContainer: {
12
+ "&::part(base)": {
13
+ border: "none",
14
+ backgroundColor: "transparent",
15
+ },
16
+ },
11
17
  ExpiringSoonAlertContainer: {
12
18
  "&::part(base)": {
13
19
  backgroundColor: "var(--sl-color-yellow-100)",
@@ -247,6 +253,11 @@ export const TaxAndCashDashboardView = (props) => {
247
253
  h("strong", null, text.error.generalTitle),
248
254
  h("br", null),
249
255
  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)),
250
261
  h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
251
262
  h("p", null, text.replaceTaxFormModalBodyText),
252
263
  h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
@@ -173,13 +173,13 @@ export class TaxAndCashDashboard {
173
173
  * @uiName Payout error message title
174
174
  * @uiWidget textArea
175
175
  */
176
- this.errorTitleText = "Your payout is on hold ";
176
+ this.payoutHoldAlertHeader = "Your payout is on hold";
177
177
  /**
178
178
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
179
179
  * @uiName Payout error message description
180
180
  * @uiWidget textArea
181
181
  */
182
- 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.";
182
+ this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
183
183
  /**
184
184
  * Text displayed for existing publishers that do not have saved banking information.
185
185
  * @uiName Payout missing information subtext
@@ -926,7 +926,7 @@ export class TaxAndCashDashboard {
926
926
  "reflect": false,
927
927
  "defaultValue": "\"Account\""
928
928
  },
929
- "errorTitleText": {
929
+ "payoutHoldAlertHeader": {
930
930
  "type": "string",
931
931
  "mutable": false,
932
932
  "complexType": {
@@ -946,11 +946,11 @@ export class TaxAndCashDashboard {
946
946
  }],
947
947
  "text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
948
948
  },
949
- "attribute": "error-title-text",
949
+ "attribute": "payout-hold-alert-header",
950
950
  "reflect": false,
951
- "defaultValue": "\"Your payout is on hold \""
951
+ "defaultValue": "\"Your payout is on hold\""
952
952
  },
953
- "errorDescriptionText": {
953
+ "payoutHoldAlertDescription": {
954
954
  "type": "string",
955
955
  "mutable": false,
956
956
  "complexType": {
@@ -970,9 +970,9 @@ export class TaxAndCashDashboard {
970
970
  }],
971
971
  "text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
972
972
  },
973
- "attribute": "error-description-text",
973
+ "attribute": "payout-hold-alert-description",
974
974
  "reflect": false,
975
- "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.\""
975
+ "defaultValue": "\"Please contact Support or check your inbox for an email from our referral program provider, impact.com.\""
976
976
  },
977
977
  "payoutMissingInformationText": {
978
978
  "type": "string",
@@ -1435,7 +1435,7 @@ export class TaxAndCashDashboard {
1435
1435
  "mutable": false,
1436
1436
  "complexType": {
1437
1437
  "original": "DemoData<UseTaxAndCashDashboardResult>",
1438
- "resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; showIdentityVerificationDialog?: boolean; identiyRequired?: boolean; errors?: { general?: boolean; }; }; }",
1438
+ "resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; showIdentityVerificationDialog?: boolean; identiyRequired?: boolean; hasHold: boolean; errors?: { general?: boolean; }; }; }",
1439
1439
  "references": {
1440
1440
  "DemoData": {
1441
1441
  "location": "import",
@@ -1476,6 +1476,7 @@ function useDemoTaxAndCashDashboard(props) {
1476
1476
  disabled: false,
1477
1477
  loading: false,
1478
1478
  showNewFormDialog: false,
1479
+ hasHold: false,
1479
1480
  },
1480
1481
  callbacks: {
1481
1482
  onClick: () => console.debug("check step"),
@@ -40,7 +40,7 @@ function getIndirectTaxType(taxInformation) {
40
40
  return "Indirect Tax";
41
41
  }
42
42
  export const useTaxAndCashDashboard = (props) => {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
44
44
  const setStep = useSetParent(TAX_CONTEXT_NAMESPACE);
45
45
  const setContext = useSetParent(TAX_FORM_CONTEXT_NAMESPACE);
46
46
  const [showDialog, setShowDialog] = useState(false);
@@ -95,6 +95,7 @@ export const useTaxAndCashDashboard = (props) => {
95
95
  loading,
96
96
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
97
97
  showNewFormDialog: showDialog,
98
+ hasHold: !!((_m = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _m === void 0 ? void 0 : _m.hold),
98
99
  },
99
100
  callbacks: {
100
101
  onClick: () => setShowDialog(true),
@@ -24,17 +24,20 @@ export function useUserInfoForm(props) {
24
24
  const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
25
25
  const [formErrors, setErrors] = useState({});
26
26
  useEffect(() => {
27
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
27
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
28
28
  const user = data === null || data === void 0 ? void 0 : data.user;
29
29
  if (!user || step !== "/1")
30
30
  return;
31
31
  // If form already filled out, skip initialising it
32
32
  if (objectIsFull(userFormContext))
33
33
  return;
34
- if (((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) && ((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.user)) {
34
+ // Prefer MI email if it was verified before this
35
+ const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
36
+ : user.email;
37
+ if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
35
38
  // Initialise with partner information
36
39
  setUserFormContext({
37
- email: user.email,
40
+ email,
38
41
  firstName: user.impactConnection.user.firstName,
39
42
  lastName: user.impactConnection.user.lastName,
40
43
  countryCode: user.impactConnection.publisher.countryCode,
@@ -50,17 +53,17 @@ export function useUserInfoForm(props) {
50
53
  else if (!(userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.email)) {
51
54
  // Initialise with user information
52
55
  setUserFormContext({
53
- email: user.email,
56
+ email,
54
57
  firstName: user.firstName,
55
58
  lastName: user.lastName,
56
59
  countryCode: user.countryCode || "US",
57
- currency: (_c = user.customFields) === null || _c === void 0 ? void 0 : _c.currency,
58
- phoneNumberCountryCode: ((_d = user.customFields) === null || _d === void 0 ? void 0 : _d.phoneNumberCountryCode) || "US",
59
- phoneNumber: (_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumber,
60
- address: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.address,
61
- city: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.city,
62
- state: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.state,
63
- postalCode: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.postalCode,
60
+ currency: (_d = user.customFields) === null || _d === void 0 ? void 0 : _d.currency,
61
+ phoneNumberCountryCode: ((_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumberCountryCode) || "US",
62
+ phoneNumber: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.phoneNumber,
63
+ address: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.address,
64
+ city: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.city,
65
+ state: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.state,
66
+ postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
64
67
  });
65
68
  }
66
69
  }, [data, step, userFormContext]);
@@ -3,4 +3,4 @@ const VERIFICATION_EMAIL_NAMESPACE = "sq:verification-email";
3
3
  const VERIFICATION_PARENT_NAMESPACE = "sq:verification-context";
4
4
  const VERIFICATION_EVENT_KEY = "sq:code-verified";
5
5
 
6
- export { SHOW_CODE_NAMESPACE as S, VERIFICATION_EVENT_KEY as V, VERIFICATION_PARENT_NAMESPACE as a, VERIFICATION_EMAIL_NAMESPACE as b };
6
+ export { SHOW_CODE_NAMESPACE as S, VERIFICATION_PARENT_NAMESPACE as V, VERIFICATION_EMAIL_NAMESPACE as a, VERIFICATION_EVENT_KEY as b };