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

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 (159) hide show
  1. package/dist/cjs/{ShadowViewAddon-88821c64.js → ShadowViewAddon-040cffad.js} +6 -3
  2. package/dist/cjs/extractProps-fd93ba62.js +21 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/mint-components.cjs.js +1 -1
  5. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +92 -78
  6. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +128 -63
  7. package/dist/cjs/sqm-code-verification.cjs.entry.js +67 -77
  8. package/dist/cjs/sqm-email-verification.cjs.entry.js +158 -12
  9. package/dist/cjs/{sqm-invoice-table-view-ce9a34ac.js → sqm-invoice-table-view-c58966f8.js} +79 -0
  10. package/dist/cjs/sqm-stencilbook.cjs.entry.js +56 -14
  11. package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +81 -11
  12. package/dist/cjs/sqm-widget-verification.cjs.entry.js +102 -19
  13. package/dist/cjs/usePayoutStatus-b9fb7399.js +70 -0
  14. package/dist/cjs/useVerificationEmail-6aacdb71.js +169 -0
  15. package/dist/collection/collection-manifest.json +1 -1
  16. package/dist/collection/components/sqm-big-stat/useBigStat.js +6 -3
  17. package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -2
  18. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -0
  19. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +16 -3
  20. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +9 -2
  21. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +20 -10
  22. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +34 -63
  23. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +38 -29
  24. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +23 -3
  25. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +17 -4
  26. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +65 -11
  27. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +77 -21
  28. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +327 -15
  29. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +447 -22
  30. package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +165 -0
  31. package/dist/collection/components/tax-and-cash/BankingForm.stories.js +1 -0
  32. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +78 -0
  33. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -1
  34. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +7 -0
  35. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +0 -1
  36. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +10 -0
  37. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +72 -13
  38. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +146 -9
  39. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +30 -15
  40. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +6 -0
  41. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +8 -8
  42. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +2 -2
  43. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +22 -16
  44. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +99 -88
  45. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +8 -1
  46. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +1 -6
  47. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +16 -11
  48. package/dist/esm/{ShadowViewAddon-65c8679e.js → ShadowViewAddon-69b61037.js} +6 -3
  49. package/dist/esm/extractProps-ae1afbb3.js +19 -0
  50. package/dist/esm/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  51. package/dist/esm/loader.js +1 -1
  52. package/dist/esm/mint-components.js +1 -1
  53. package/dist/esm/sqm-banking-info-form_16.entry.js +92 -78
  54. package/dist/esm/sqm-big-stat_39.entry.js +127 -62
  55. package/dist/esm/sqm-code-verification.entry.js +69 -79
  56. package/dist/esm/sqm-email-verification.entry.js +159 -13
  57. package/dist/esm/{sqm-invoice-table-view-08c03ba7.js → sqm-invoice-table-view-d1cfdaf4.js} +79 -0
  58. package/dist/esm/sqm-stencilbook.entry.js +56 -14
  59. package/dist/esm/sqm-widget-verification-internal.entry.js +84 -14
  60. package/dist/esm/sqm-widget-verification.entry.js +104 -21
  61. package/dist/esm/usePayoutStatus-1a635054.js +67 -0
  62. package/dist/esm/useVerificationEmail-c32696ba.js +167 -0
  63. package/dist/esm-es5/ShadowViewAddon-69b61037.js +1 -0
  64. package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
  65. package/dist/esm-es5/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  66. package/dist/esm-es5/loader.js +1 -1
  67. package/dist/esm-es5/mint-components.js +1 -1
  68. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  69. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  70. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  71. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  72. package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +1 -0
  73. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  74. package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
  75. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  76. package/dist/esm-es5/usePayoutStatus-1a635054.js +1 -0
  77. package/dist/esm-es5/useVerificationEmail-c32696ba.js +1 -0
  78. package/dist/mint-components/mint-components.esm.js +1 -1
  79. package/dist/mint-components/p-0e45bc0e.system.entry.js +1 -0
  80. package/dist/mint-components/p-1712a9fd.entry.js +11 -0
  81. package/dist/mint-components/p-1e616d45.system.js +1 -0
  82. package/dist/mint-components/{p-721a89c6.entry.js → p-24092973.entry.js} +2 -2
  83. package/dist/mint-components/p-26468242.js +1 -0
  84. package/dist/mint-components/p-282a7d85.entry.js +195 -0
  85. package/dist/mint-components/p-331d060e.entry.js +223 -0
  86. package/dist/mint-components/p-39840341.js +1 -0
  87. package/dist/mint-components/p-4364001c.entry.js +12 -0
  88. package/dist/mint-components/p-4bd7a472.js +1 -0
  89. package/dist/mint-components/p-517224ef.js +19 -0
  90. package/dist/mint-components/p-5f766d09.entry.js +25 -0
  91. package/dist/mint-components/p-8300d8c8.system.js +1 -0
  92. package/dist/mint-components/p-8bddb468.system.entry.js +1 -0
  93. package/dist/mint-components/p-9596e97c.system.entry.js +1 -0
  94. package/dist/mint-components/p-974070c4.system.entry.js +1 -0
  95. package/dist/mint-components/{p-b651706a.js → p-9eae245f.js} +6 -3
  96. package/dist/mint-components/p-a8645c1b.system.js +1 -0
  97. package/dist/mint-components/p-aabab609.system.entry.js +1 -0
  98. package/dist/mint-components/p-b2a99637.system.js +1 -0
  99. package/dist/mint-components/{p-66a04cca.system.entry.js → p-b62faaa5.system.entry.js} +1 -1
  100. package/dist/mint-components/p-c510fb88.entry.js +1 -0
  101. package/dist/mint-components/p-ca809fdd.system.js +1 -1
  102. package/dist/mint-components/p-d7806f31.js +48 -0
  103. package/dist/mint-components/p-e01ac27c.system.js +1 -0
  104. package/dist/mint-components/p-e45a8501.system.entry.js +1 -0
  105. package/dist/mint-components/p-e990dc21.system.js +1 -0
  106. package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +0 -1
  107. package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll.d.ts +7 -0
  108. package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +1 -0
  109. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +3 -3
  110. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +4 -10
  111. package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +2 -0
  112. package/dist/types/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.d.ts +4 -1
  113. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +6 -1
  114. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +10 -2
  115. package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +3 -2
  116. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +15 -0
  117. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +79 -0
  118. package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +14 -0
  119. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  120. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
  121. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +2 -0
  122. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +12 -0
  123. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +41 -0
  124. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +12 -0
  125. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +6 -0
  126. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -2
  127. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +10 -3
  128. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +19 -18
  129. package/dist/types/components.d.ts +366 -92
  130. package/docs/docs.docx +0 -0
  131. package/docs/raisins.json +1 -1
  132. package/grapesjs/grapesjs.js +1 -1
  133. package/package.json +1 -1
  134. package/dist/cjs/useEmailVerification-30a1c7f6.js +0 -75
  135. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +0 -3
  136. package/dist/esm/useEmailVerification-7135732c.js +0 -72
  137. package/dist/esm-es5/ShadowViewAddon-65c8679e.js +0 -1
  138. package/dist/esm-es5/sqm-invoice-table-view-08c03ba7.js +0 -1
  139. package/dist/esm-es5/useEmailVerification-7135732c.js +0 -1
  140. package/dist/mint-components/p-117b4705.system.js +0 -1
  141. package/dist/mint-components/p-1bd0cda8.system.entry.js +0 -1
  142. package/dist/mint-components/p-1ee62d9f.system.entry.js +0 -1
  143. package/dist/mint-components/p-1f9a9b70.system.entry.js +0 -1
  144. package/dist/mint-components/p-23fdd44e.entry.js +0 -1
  145. package/dist/mint-components/p-36f7caec.system.entry.js +0 -1
  146. package/dist/mint-components/p-39397731.entry.js +0 -1
  147. package/dist/mint-components/p-39af4acd.entry.js +0 -240
  148. package/dist/mint-components/p-4c9b6fbe.system.js +0 -1
  149. package/dist/mint-components/p-65e2c043.system.js +0 -1
  150. package/dist/mint-components/p-663303b7.entry.js +0 -8
  151. package/dist/mint-components/p-6cae44d7.js +0 -1
  152. package/dist/mint-components/p-7f5c7bf7.system.entry.js +0 -1
  153. package/dist/mint-components/p-8a337864.js +0 -7
  154. package/dist/mint-components/p-a02afa72.system.js +0 -1
  155. package/dist/mint-components/p-a5a9aa07.entry.js +0 -189
  156. package/dist/mint-components/p-c763c0b2.js +0 -1
  157. package/dist/mint-components/p-e93e5740.entry.js +0 -1
  158. package/dist/mint-components/p-e9ca48fc.system.entry.js +0 -1
  159. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -1
@@ -1,12 +1,134 @@
1
1
  import { h, r as registerInstance } from './index-17b4da69.js';
2
- import { n as h$1 } from './stencil-hooks.module-ac12ca1c.js';
3
- import { i as isDemo } from './index.module-6c840c4e.js';
2
+ import { k as useState, f as useEffect, n as h$1 } from './stencil-hooks.module-ac12ca1c.js';
3
+ import { d as dist, M as Mn, E as En, K, c as xe, i as isDemo, S as Sn } from './index.module-6c840c4e.js';
4
4
  import { c as cjs } from './cjs-bdfb4486.js';
5
5
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
6
6
  import { g as getProps } from './utils-334c1e34.js';
7
7
  import { T as TextSpanView } from './sqm-text-span-view-8d140661.js';
8
- import './keys-a1496e39.js';
9
- import { u as useWidgetEmailVerification } from './useEmailVerification-7135732c.js';
8
+ import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE } from './keys-db1897ae.js';
9
+ import { u as useVerificationEmail } from './useVerificationEmail-c32696ba.js';
10
+
11
+ const UpsertUserEmailMutation = dist.gql `
12
+ mutation upsertUser($userInput: UserInput!) {
13
+ upsertUser(userInput: $userInput) {
14
+ id
15
+ accountId
16
+ email
17
+ }
18
+ }
19
+ `;
20
+ const UserLookupQuery = dist.gql `
21
+ query user {
22
+ viewer {
23
+ ... on User {
24
+ id
25
+ accountId
26
+ email
27
+ impactConnection {
28
+ user {
29
+ id
30
+ email
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ `;
37
+ function useUpsertUserEmail() {
38
+ const user = K();
39
+ const [request, { loading: loading, data, errors }] = xe(UpsertUserEmailMutation);
40
+ const upsertUserEmail = async (email) => {
41
+ try {
42
+ const result = await request({
43
+ userInput: {
44
+ id: user.id,
45
+ accountId: user.accountId,
46
+ email,
47
+ },
48
+ });
49
+ if (result instanceof Error || !result)
50
+ throw new Error();
51
+ return result;
52
+ }
53
+ catch (e) {
54
+ console.error("Could not set email on user", e);
55
+ return undefined;
56
+ }
57
+ };
58
+ return [
59
+ upsertUserEmail,
60
+ {
61
+ loading,
62
+ data,
63
+ errors,
64
+ },
65
+ ];
66
+ }
67
+ function useWidgetEmailVerification(props) {
68
+ const [_, setShowCode] = Mn(SHOW_CODE_NAMESPACE);
69
+ const [email, setEmail] = Mn(VERIFICATION_EMAIL_NAMESPACE);
70
+ const [emailExists, setEmailExists] = useState(false);
71
+ const [error, setError] = useState(false);
72
+ const [mutationError, setMutationError] = useState(false);
73
+ const { initialized, send: [sendEmail, { loading: sendLoading, errors }], } = useVerificationEmail();
74
+ const [upsertUserEmail] = useUpsertUserEmail();
75
+ const [loading, setLoading] = useState(true);
76
+ const { data, loading: initialLoading } = En(UserLookupQuery, {});
77
+ const emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
78
+ useEffect(() => {
79
+ if (!(data === null || data === void 0 ? void 0 : data.viewer))
80
+ return;
81
+ setEmailExists(!!data.viewer.email);
82
+ }, [data]);
83
+ useEffect(() => {
84
+ if (initialized)
85
+ setLoading(false);
86
+ }, [initialized]);
87
+ const submitEmail = async (e) => {
88
+ e.preventDefault();
89
+ if (!(data === null || data === void 0 ? void 0 : data.viewer))
90
+ return;
91
+ setLoading(true);
92
+ const toAddress = data.viewer.email;
93
+ if (!toAddress) {
94
+ // If no email on the user, set one
95
+ const formData = e.detail.formData;
96
+ const newEmail = formData.get("email").toString();
97
+ if (!emailRegex.test(newEmail)) {
98
+ setError(true);
99
+ return;
100
+ }
101
+ const result = await upsertUserEmail(newEmail);
102
+ if (!result || !result.user.email)
103
+ setError(true);
104
+ }
105
+ // UI should not allow this call til initialisation is done
106
+ if (!initialized)
107
+ return;
108
+ const result = await sendEmail();
109
+ if (!result || !result.success)
110
+ setMutationError(true);
111
+ else {
112
+ // This is used to let the code verification widget know an email was already sent
113
+ setEmail(toAddress);
114
+ setShowCode(true);
115
+ }
116
+ setLoading(false);
117
+ };
118
+ return {
119
+ callbacks: {
120
+ submitEmail,
121
+ },
122
+ states: {
123
+ loading,
124
+ initialLoading: initialLoading && !initialized,
125
+ error,
126
+ email: data === null || data === void 0 ? void 0 : data.viewer.email,
127
+ sendCodeError: mutationError,
128
+ },
129
+ text: props.getTextProps(),
130
+ };
131
+ }
10
132
 
11
133
  const style = {
12
134
  Wrapper: {
@@ -22,6 +144,16 @@ const style = {
22
144
  flexDirection: "column",
23
145
  maxWidth: "320px",
24
146
  },
147
+ ErrorAlertContainer: {
148
+ "&::part(base)": {
149
+ backgroundColor: "var(--sl-color-red-100)",
150
+ borderTop: "none",
151
+ },
152
+ "&::part(message)": {
153
+ display: "flex",
154
+ flexDirection: "column",
155
+ },
156
+ },
25
157
  ContinueButton: {
26
158
  width: "100%",
27
159
  maxWidth: "100px",
@@ -70,15 +202,18 @@ function WidgetEmailVerificationView(props) {
70
202
  h("style", { type: "text/css" },
71
203
  vanillaStyle,
72
204
  styleString),
73
- states.loading ? (renderLoadingSkeleton()) : (h("div", { class: sheet.classes.Wrapper },
74
- " ",
205
+ states.sendCodeError && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", class: sheet.classes.ErrorAlertContainer, open: true },
206
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
207
+ h("b", null, text.sendCodeErrorHeader),
208
+ text.sendCodeErrorDescription)),
209
+ states.initialLoading ? (renderLoadingSkeleton()) : (h("div", { class: sheet.classes.Wrapper },
75
210
  h(TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
76
211
  h("sl-form", { "onSl-submit": callbacks.submitEmail },
77
212
  h("div", { class: sheet.classes.InputsContainer },
78
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email, type: "email", id: "email", name: "email", required: true }, (states.error
213
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email || "", type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
79
214
  ? {
80
215
  class: sheet.classes.ErrorInput,
81
- helpText: "Please enter a valid email",
216
+ helpText: text.emailValidationErrorText,
82
217
  }
83
218
  : {}))),
84
219
  h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)))))));
@@ -92,9 +227,13 @@ const WidgetEmailVerification = class {
92
227
  */
93
228
  this.verifyEmailHeaderText = "Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";
94
229
  /**
95
- * @uiName Verify email error text
230
+ * @uiName Send code to email alert header
231
+ */
232
+ this.sendCodeErrorHeader = "There was an error sending your code.";
233
+ /**
234
+ * @uiName Send code to email alert description
96
235
  */
97
- this.errorText = "Failed to send an email. If this continues, contact Support with impact.com";
236
+ this.sendCodeErrorDescription = "Please try again. If this problem continues, contact our program support team.";
98
237
  /**
99
238
  * @uiName Email input label
100
239
  */
@@ -103,6 +242,10 @@ const WidgetEmailVerification = class {
103
242
  * @uiName Send code button text
104
243
  */
105
244
  this.sendCodeText = "Send code";
245
+ /**
246
+ * @uiName Send code button text
247
+ */
248
+ this.emailValidationErrorText = "Please enter a valid email";
106
249
  h$1(this);
107
250
  }
108
251
  disconnectedCallback() { }
@@ -117,14 +260,17 @@ const WidgetEmailVerification = class {
117
260
  }
118
261
  };
119
262
  function useDemoWidgetEmailVerification(props) {
263
+ const setShowCode = Sn(SHOW_CODE_NAMESPACE);
120
264
  return cjs({
121
265
  states: {
122
- error: "",
266
+ error: true,
267
+ initialLoading: false,
123
268
  loading: false,
124
- email: "",
269
+ email: "test@example.com",
270
+ sendCodeError: true,
125
271
  },
126
272
  callbacks: {
127
- submitEmail: async () => { },
273
+ submitEmail: async () => setShowCode(true),
128
274
  },
129
275
  text: props.getTextProps(),
130
276
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
@@ -712,6 +712,7 @@ const stepFourProps = {
712
712
  },
713
713
  },
714
714
  callbacks: {
715
+ onVerification: () => { },
715
716
  onSubmit: async () => console.log("Submit"),
716
717
  setPaymentMethodChecked: () => { },
717
718
  setPaymentScheduleChecked: () => { },
@@ -748,6 +749,8 @@ const docusignFormProps = {
748
749
  };
749
750
  const dashboardProps = {
750
751
  states: {
752
+ showVerifyIdentity: false,
753
+ payoutStatus: "DONE",
751
754
  canEditPayoutInfo: true,
752
755
  disabled: false,
753
756
  status: "ACTIVE",
@@ -759,6 +762,7 @@ const dashboardProps = {
759
762
  indirectTaxNumber: "123456",
760
763
  indirectTaxType: "VAT",
761
764
  showNewFormDialog: false,
765
+ hasHold: false,
762
766
  },
763
767
  slots: {
764
768
  payoutDetailsCardSlot: (h("sqm-payout-details-card", { demoData: {
@@ -1265,6 +1269,8 @@ const TaxAndCashDashboardActiveW8BENForm = () => {
1265
1269
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1266
1270
  ...dashboardProps,
1267
1271
  states: {
1272
+ payoutStatus: "DONE",
1273
+ showVerifyIdentity: false,
1268
1274
  noFormNeeded: false,
1269
1275
  canEditPayoutInfo: true,
1270
1276
  documentType: "W8BEN",
@@ -1273,6 +1279,7 @@ const TaxAndCashDashboardActiveW8BENForm = () => {
1273
1279
  indirectTaxType: "VAT",
1274
1280
  indirectTaxNumber: "123456",
1275
1281
  showNewFormDialog: false,
1282
+ hasHold: false,
1276
1283
  },
1277
1284
  } }));
1278
1285
  };
@@ -1280,6 +1287,8 @@ const TaxAndCashDashboardActiveW8BENEForm = () => {
1280
1287
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1281
1288
  ...dashboardProps,
1282
1289
  states: {
1290
+ payoutStatus: "DONE",
1291
+ showVerifyIdentity: false,
1283
1292
  noFormNeeded: false,
1284
1293
  canEditPayoutInfo: true,
1285
1294
  documentType: "W8BENE",
@@ -1288,6 +1297,7 @@ const TaxAndCashDashboardActiveW8BENEForm = () => {
1288
1297
  indirectTaxType: "VAT",
1289
1298
  indirectTaxNumber: "123456",
1290
1299
  showNewFormDialog: false,
1300
+ hasHold: false,
1291
1301
  },
1292
1302
  } }));
1293
1303
  };
@@ -1295,6 +1305,8 @@ const TaxAndCashDashboardNotActiveW9Form = () => {
1295
1305
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1296
1306
  ...dashboardProps,
1297
1307
  states: {
1308
+ payoutStatus: "DONE",
1309
+ showVerifyIdentity: false,
1298
1310
  noFormNeeded: false,
1299
1311
  canEditPayoutInfo: true,
1300
1312
  status: "INACTIVE",
@@ -1304,6 +1316,7 @@ const TaxAndCashDashboardNotActiveW9Form = () => {
1304
1316
  indirectTaxType: "VAT",
1305
1317
  indirectTaxNumber: "123456",
1306
1318
  showNewFormDialog: false,
1319
+ hasHold: false,
1307
1320
  },
1308
1321
  } }));
1309
1322
  };
@@ -1311,6 +1324,8 @@ const TaxAndCashDashboardNotVerifiedW9Form = () => {
1311
1324
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1312
1325
  ...dashboardProps,
1313
1326
  states: {
1327
+ payoutStatus: "DONE",
1328
+ showVerifyIdentity: false,
1314
1329
  canEditPayoutInfo: true,
1315
1330
  disabled: false,
1316
1331
  status: "NOT_VERIFIED",
@@ -1321,6 +1336,7 @@ const TaxAndCashDashboardNotVerifiedW9Form = () => {
1321
1336
  indirectTaxType: "VAT",
1322
1337
  indirectTaxNumber: "123456",
1323
1338
  showNewFormDialog: false,
1339
+ hasHold: false,
1324
1340
  },
1325
1341
  } }));
1326
1342
  };
@@ -1328,6 +1344,8 @@ const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
1328
1344
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1329
1345
  ...dashboardProps,
1330
1346
  states: {
1347
+ payoutStatus: "DONE",
1348
+ showVerifyIdentity: false,
1331
1349
  canEditPayoutInfo: true,
1332
1350
  disabled: false,
1333
1351
  status: "NOT_VERIFIED",
@@ -1339,6 +1357,7 @@ const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
1339
1357
  indirectTaxType: "VAT",
1340
1358
  indirectTaxNumber: "123456",
1341
1359
  showNewFormDialog: false,
1360
+ hasHold: false,
1342
1361
  },
1343
1362
  } }));
1344
1363
  };
@@ -1346,6 +1365,8 @@ const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
1346
1365
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1347
1366
  ...dashboardProps,
1348
1367
  states: {
1368
+ payoutStatus: "DONE",
1369
+ showVerifyIdentity: false,
1349
1370
  canEditPayoutInfo: true,
1350
1371
  disabled: false,
1351
1372
  status: "NOT_VERIFIED",
@@ -1357,6 +1378,7 @@ const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
1357
1378
  indirectTaxType: "VAT",
1358
1379
  indirectTaxNumber: "123456",
1359
1380
  showNewFormDialog: false,
1381
+ hasHold: false,
1360
1382
  },
1361
1383
  } }));
1362
1384
  };
@@ -1364,6 +1386,8 @@ const TaxAndCashDashboardNotActiveW8BENEForm = () => {
1364
1386
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1365
1387
  ...dashboardProps,
1366
1388
  states: {
1389
+ payoutStatus: "DONE",
1390
+ showVerifyIdentity: false,
1367
1391
  canEditPayoutInfo: true,
1368
1392
  disabled: false,
1369
1393
  status: "NOT_ACTIVE",
@@ -1375,6 +1399,7 @@ const TaxAndCashDashboardNotActiveW8BENEForm = () => {
1375
1399
  indirectTaxType: "VAT",
1376
1400
  country: "United Kingdom",
1377
1401
  showNewFormDialog: false,
1402
+ hasHold: false,
1378
1403
  },
1379
1404
  } }));
1380
1405
  };
@@ -1382,6 +1407,8 @@ const TaxAndCashDashboardNoFormNeeded = () => {
1382
1407
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1383
1408
  ...dashboardProps,
1384
1409
  states: {
1410
+ payoutStatus: "DONE",
1411
+ showVerifyIdentity: false,
1385
1412
  canEditPayoutInfo: true,
1386
1413
  disabled: false,
1387
1414
  documentType: "W9",
@@ -1393,6 +1420,7 @@ const TaxAndCashDashboardNoFormNeeded = () => {
1393
1420
  indirectTaxNumber: "123456",
1394
1421
  indirectTaxType: "GST",
1395
1422
  showNewFormDialog: false,
1423
+ hasHold: false,
1396
1424
  },
1397
1425
  } }));
1398
1426
  };
@@ -1400,6 +1428,8 @@ const TaxAndCashDashboardIndirectTaxCanada = () => {
1400
1428
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1401
1429
  ...dashboardProps,
1402
1430
  states: {
1431
+ payoutStatus: "DONE",
1432
+ showVerifyIdentity: false,
1403
1433
  canEditPayoutInfo: true,
1404
1434
  status: "ACTIVE",
1405
1435
  disabled: false,
@@ -1412,6 +1442,7 @@ const TaxAndCashDashboardIndirectTaxCanada = () => {
1412
1442
  indirectTaxType: "GST",
1413
1443
  indirectTaxNumber: "123456",
1414
1444
  showNewFormDialog: false,
1445
+ hasHold: false,
1415
1446
  },
1416
1447
  } }));
1417
1448
  };
@@ -1419,6 +1450,8 @@ const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
1419
1450
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1420
1451
  ...dashboardProps,
1421
1452
  states: {
1453
+ payoutStatus: "DONE",
1454
+ showVerifyIdentity: false,
1422
1455
  canEditPayoutInfo: true,
1423
1456
  status: "ACTIVE",
1424
1457
  disabled: false,
@@ -1432,6 +1465,7 @@ const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
1432
1465
  indirectTaxNumber: "123456",
1433
1466
  qstNumber: "44212",
1434
1467
  showNewFormDialog: false,
1468
+ hasHold: false,
1435
1469
  },
1436
1470
  } }));
1437
1471
  };
@@ -1439,6 +1473,8 @@ const TaxAndCashDashboardIndirectTaxSpain = () => {
1439
1473
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1440
1474
  ...dashboardProps,
1441
1475
  states: {
1476
+ payoutStatus: "DONE",
1477
+ showVerifyIdentity: false,
1442
1478
  canEditPayoutInfo: true,
1443
1479
  status: "ACTIVE",
1444
1480
  disabled: false,
@@ -1452,6 +1488,7 @@ const TaxAndCashDashboardIndirectTaxSpain = () => {
1452
1488
  indirectTaxNumber: "123456",
1453
1489
  subRegionTaxNumber: "44212",
1454
1490
  showNewFormDialog: false,
1491
+ hasHold: false,
1455
1492
  },
1456
1493
  } }));
1457
1494
  };
@@ -1459,6 +1496,8 @@ const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
1459
1496
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1460
1497
  ...dashboardProps,
1461
1498
  states: {
1499
+ payoutStatus: "DONE",
1500
+ showVerifyIdentity: false,
1462
1501
  canEditPayoutInfo: true,
1463
1502
  status: "ACTIVE",
1464
1503
  documentType: "W8BEN",
@@ -1467,6 +1506,7 @@ const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
1467
1506
  noFormNeeded: false,
1468
1507
  notRegistered: true,
1469
1508
  showNewFormDialog: false,
1509
+ hasHold: false,
1470
1510
  },
1471
1511
  } }));
1472
1512
  };
@@ -1474,6 +1514,8 @@ const TaxAndCashDashboardIdentityVerifcationRequired = () => {
1474
1514
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1475
1515
  ...dashboardProps,
1476
1516
  states: {
1517
+ payoutStatus: "VERIFICATION_NEEDED",
1518
+ showVerifyIdentity: true,
1477
1519
  showIdentityVerificationDialog: true,
1478
1520
  identiyRequired: true,
1479
1521
  canEditPayoutInfo: true,
@@ -1484,6 +1526,7 @@ const TaxAndCashDashboardIdentityVerifcationRequired = () => {
1484
1526
  noFormNeeded: false,
1485
1527
  notRegistered: true,
1486
1528
  showNewFormDialog: false,
1529
+ hasHold: false,
1487
1530
  },
1488
1531
  } }));
1489
1532
  };
@@ -1491,6 +1534,8 @@ const TaxAndCashDashboardNewTaxForm = () => {
1491
1534
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1492
1535
  ...dashboardProps,
1493
1536
  states: {
1537
+ payoutStatus: "DONE",
1538
+ showVerifyIdentity: false,
1494
1539
  canEditPayoutInfo: true,
1495
1540
  status: "ACTIVE",
1496
1541
  documentType: "W8BEN",
@@ -1499,6 +1544,27 @@ const TaxAndCashDashboardNewTaxForm = () => {
1499
1544
  noFormNeeded: false,
1500
1545
  notRegistered: true,
1501
1546
  showNewFormDialog: true,
1547
+ hasHold: false,
1548
+ },
1549
+ } }));
1550
+ };
1551
+ const TaxAndCashDashboardPayoutsOnHold = () => {
1552
+ return (h("sqm-tax-and-cash-dashboard", { demoData: {
1553
+ ...dashboardProps,
1554
+ states: {
1555
+ payoutStatus: "DONE",
1556
+ showVerifyIdentity: false,
1557
+ canEditPayoutInfo: true,
1558
+ disabled: true,
1559
+ status: "ACTIVE",
1560
+ documentType: "W8BEN",
1561
+ documentTypeString: taxTypeToName("W8BEN"),
1562
+ dateSubmitted: "Jan 18th, 2025",
1563
+ noFormNeeded: false,
1564
+ indirectTaxNumber: "123456",
1565
+ country: "Slovania",
1566
+ showNewFormDialog: false,
1567
+ hasHold: true,
1502
1568
  },
1503
1569
  } }));
1504
1570
  };
@@ -1506,6 +1572,8 @@ const TaxAndCashDashboardLoading = () => {
1506
1572
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1507
1573
  ...dashboardProps,
1508
1574
  states: {
1575
+ payoutStatus: "DONE",
1576
+ showVerifyIdentity: false,
1509
1577
  canEditPayoutInfo: true,
1510
1578
  disabled: false,
1511
1579
  status: "ACTIVE",
@@ -1515,6 +1583,7 @@ const TaxAndCashDashboardLoading = () => {
1515
1583
  noFormNeeded: false,
1516
1584
  loading: true,
1517
1585
  showNewFormDialog: false,
1586
+ hasHold: false,
1518
1587
  },
1519
1588
  } }));
1520
1589
  };
@@ -1522,6 +1591,8 @@ const TaxAndCashDashboardWithLoadingError = () => {
1522
1591
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1523
1592
  ...dashboardProps,
1524
1593
  states: {
1594
+ payoutStatus: "DONE",
1595
+ showVerifyIdentity: false,
1525
1596
  disabled: false,
1526
1597
  canEditPayoutInfo: true,
1527
1598
  status: "ACTIVE",
@@ -1532,6 +1603,7 @@ const TaxAndCashDashboardWithLoadingError = () => {
1532
1603
  loading: true,
1533
1604
  loadingError: true,
1534
1605
  showNewFormDialog: false,
1606
+ hasHold: false,
1535
1607
  },
1536
1608
  } }));
1537
1609
  };
@@ -1539,6 +1611,8 @@ const TaxAndCashDashboardWithGeneralError = () => {
1539
1611
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1540
1612
  ...dashboardProps,
1541
1613
  states: {
1614
+ payoutStatus: "DONE",
1615
+ showVerifyIdentity: false,
1542
1616
  canEditPayoutInfo: true,
1543
1617
  disabled: false,
1544
1618
  status: "ACTIVE",
@@ -1550,6 +1624,7 @@ const TaxAndCashDashboardWithGeneralError = () => {
1550
1624
  indirectTaxType: "VAT",
1551
1625
  country: "Slovania",
1552
1626
  showNewFormDialog: false,
1627
+ hasHold: false,
1553
1628
  errors: {
1554
1629
  general: true,
1555
1630
  },
@@ -1560,6 +1635,8 @@ const TaxAndCashDashboardDisabled = () => {
1560
1635
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1561
1636
  ...dashboardProps,
1562
1637
  states: {
1638
+ payoutStatus: "DONE",
1639
+ showVerifyIdentity: false,
1563
1640
  canEditPayoutInfo: true,
1564
1641
  disabled: true,
1565
1642
  status: "ACTIVE",
@@ -1570,6 +1647,7 @@ const TaxAndCashDashboardDisabled = () => {
1570
1647
  indirectTaxNumber: "123456",
1571
1648
  country: "Slovania",
1572
1649
  showNewFormDialog: false,
1650
+ hasHold: false,
1573
1651
  },
1574
1652
  } }));
1575
1653
  };
@@ -1638,6 +1716,7 @@ const TaxForm = /*#__PURE__*/Object.freeze({
1638
1716
  TaxAndCashDashboardIndirectTaxNotRegistered: TaxAndCashDashboardIndirectTaxNotRegistered,
1639
1717
  TaxAndCashDashboardIdentityVerifcationRequired: TaxAndCashDashboardIdentityVerifcationRequired,
1640
1718
  TaxAndCashDashboardNewTaxForm: TaxAndCashDashboardNewTaxForm,
1719
+ TaxAndCashDashboardPayoutsOnHold: TaxAndCashDashboardPayoutsOnHold,
1641
1720
  TaxAndCashDashboardLoading: TaxAndCashDashboardLoading,
1642
1721
  TaxAndCashDashboardWithLoadingError: TaxAndCashDashboardWithLoadingError,
1643
1722
  TaxAndCashDashboardWithGeneralError: TaxAndCashDashboardWithGeneralError,