@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
@@ -9,8 +9,130 @@ const cjs = require('./cjs-1066ec21.js');
9
9
  const JSS = require('./JSS-8503a151.js');
10
10
  const utils = require('./utils-6847bc06.js');
11
11
  const sqmTextSpanView = require('./sqm-text-span-view-e1cd9bd3.js');
12
- require('./keys-cff24974.js');
13
- const useEmailVerification = require('./useEmailVerification-30a1c7f6.js');
12
+ const keys = require('./keys-cff24974.js');
13
+ const useVerificationEmail = require('./useVerificationEmail-6aacdb71.js');
14
+
15
+ const UpsertUserEmailMutation = index_module.dist.gql `
16
+ mutation upsertUser($userInput: UserInput!) {
17
+ upsertUser(userInput: $userInput) {
18
+ id
19
+ accountId
20
+ email
21
+ }
22
+ }
23
+ `;
24
+ const UserLookupQuery = index_module.dist.gql `
25
+ query user {
26
+ viewer {
27
+ ... on User {
28
+ id
29
+ accountId
30
+ email
31
+ impactConnection {
32
+ user {
33
+ id
34
+ email
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ `;
41
+ function useUpsertUserEmail() {
42
+ const user = index_module.K();
43
+ const [request, { loading: loading, data, errors }] = index_module.xe(UpsertUserEmailMutation);
44
+ const upsertUserEmail = async (email) => {
45
+ try {
46
+ const result = await request({
47
+ userInput: {
48
+ id: user.id,
49
+ accountId: user.accountId,
50
+ email,
51
+ },
52
+ });
53
+ if (result instanceof Error || !result)
54
+ throw new Error();
55
+ return result;
56
+ }
57
+ catch (e) {
58
+ console.error("Could not set email on user", e);
59
+ return undefined;
60
+ }
61
+ };
62
+ return [
63
+ upsertUserEmail,
64
+ {
65
+ loading,
66
+ data,
67
+ errors,
68
+ },
69
+ ];
70
+ }
71
+ function useWidgetEmailVerification(props) {
72
+ const [_, setShowCode] = index_module.Mn(keys.SHOW_CODE_NAMESPACE);
73
+ const [email, setEmail] = index_module.Mn(keys.VERIFICATION_EMAIL_NAMESPACE);
74
+ const [emailExists, setEmailExists] = stencilHooks_module.useState(false);
75
+ const [error, setError] = stencilHooks_module.useState(false);
76
+ const [mutationError, setMutationError] = stencilHooks_module.useState(false);
77
+ const { initialized, send: [sendEmail, { loading: sendLoading, errors }], } = useVerificationEmail.useVerificationEmail();
78
+ const [upsertUserEmail] = useUpsertUserEmail();
79
+ const [loading, setLoading] = stencilHooks_module.useState(true);
80
+ const { data, loading: initialLoading } = index_module.En(UserLookupQuery, {});
81
+ 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,}))$/;
82
+ stencilHooks_module.useEffect(() => {
83
+ if (!(data === null || data === void 0 ? void 0 : data.viewer))
84
+ return;
85
+ setEmailExists(!!data.viewer.email);
86
+ }, [data]);
87
+ stencilHooks_module.useEffect(() => {
88
+ if (initialized)
89
+ setLoading(false);
90
+ }, [initialized]);
91
+ const submitEmail = async (e) => {
92
+ e.preventDefault();
93
+ if (!(data === null || data === void 0 ? void 0 : data.viewer))
94
+ return;
95
+ setLoading(true);
96
+ const toAddress = data.viewer.email;
97
+ if (!toAddress) {
98
+ // If no email on the user, set one
99
+ const formData = e.detail.formData;
100
+ const newEmail = formData.get("email").toString();
101
+ if (!emailRegex.test(newEmail)) {
102
+ setError(true);
103
+ return;
104
+ }
105
+ const result = await upsertUserEmail(newEmail);
106
+ if (!result || !result.user.email)
107
+ setError(true);
108
+ }
109
+ // UI should not allow this call til initialisation is done
110
+ if (!initialized)
111
+ return;
112
+ const result = await sendEmail();
113
+ if (!result || !result.success)
114
+ setMutationError(true);
115
+ else {
116
+ // This is used to let the code verification widget know an email was already sent
117
+ setEmail(toAddress);
118
+ setShowCode(true);
119
+ }
120
+ setLoading(false);
121
+ };
122
+ return {
123
+ callbacks: {
124
+ submitEmail,
125
+ },
126
+ states: {
127
+ loading,
128
+ initialLoading: initialLoading && !initialized,
129
+ error,
130
+ email: data === null || data === void 0 ? void 0 : data.viewer.email,
131
+ sendCodeError: mutationError,
132
+ },
133
+ text: props.getTextProps(),
134
+ };
135
+ }
14
136
 
15
137
  const style = {
16
138
  Wrapper: {
@@ -26,6 +148,16 @@ const style = {
26
148
  flexDirection: "column",
27
149
  maxWidth: "320px",
28
150
  },
151
+ ErrorAlertContainer: {
152
+ "&::part(base)": {
153
+ backgroundColor: "var(--sl-color-red-100)",
154
+ borderTop: "none",
155
+ },
156
+ "&::part(message)": {
157
+ display: "flex",
158
+ flexDirection: "column",
159
+ },
160
+ },
29
161
  ContinueButton: {
30
162
  width: "100%",
31
163
  maxWidth: "100px",
@@ -74,15 +206,18 @@ function WidgetEmailVerificationView(props) {
74
206
  index.h("style", { type: "text/css" },
75
207
  vanillaStyle,
76
208
  styleString),
77
- states.loading ? (renderLoadingSkeleton()) : (index.h("div", { class: sheet.classes.Wrapper },
78
- " ",
209
+ states.sendCodeError && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", class: sheet.classes.ErrorAlertContainer, open: true },
210
+ index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
211
+ index.h("b", null, text.sendCodeErrorHeader),
212
+ text.sendCodeErrorDescription)),
213
+ states.initialLoading ? (renderLoadingSkeleton()) : (index.h("div", { class: sheet.classes.Wrapper },
79
214
  index.h(sqmTextSpanView.TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
80
215
  index.h("sl-form", { "onSl-submit": callbacks.submitEmail },
81
216
  index.h("div", { class: sheet.classes.InputsContainer },
82
- index.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
217
+ index.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
83
218
  ? {
84
219
  class: sheet.classes.ErrorInput,
85
- helpText: "Please enter a valid email",
220
+ helpText: text.emailValidationErrorText,
86
221
  }
87
222
  : {}))),
88
223
  index.h("sl-button", { submit: true, class: sheet.classes.ContinueButton, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, text.sendCodeText)))))));
@@ -96,9 +231,13 @@ const WidgetEmailVerification = class {
96
231
  */
97
232
  this.verifyEmailHeaderText = "Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";
98
233
  /**
99
- * @uiName Verify email error text
234
+ * @uiName Send code to email alert header
235
+ */
236
+ this.sendCodeErrorHeader = "There was an error sending your code.";
237
+ /**
238
+ * @uiName Send code to email alert description
100
239
  */
101
- this.errorText = "Failed to send an email. If this continues, contact Support with impact.com";
240
+ this.sendCodeErrorDescription = "Please try again. If this problem continues, contact our program support team.";
102
241
  /**
103
242
  * @uiName Email input label
104
243
  */
@@ -107,6 +246,10 @@ const WidgetEmailVerification = class {
107
246
  * @uiName Send code button text
108
247
  */
109
248
  this.sendCodeText = "Send code";
249
+ /**
250
+ * @uiName Send code button text
251
+ */
252
+ this.emailValidationErrorText = "Please enter a valid email";
110
253
  stencilHooks_module.h$1(this);
111
254
  }
112
255
  disconnectedCallback() { }
@@ -116,19 +259,22 @@ const WidgetEmailVerification = class {
116
259
  render() {
117
260
  const props = index_module.isDemo()
118
261
  ? useDemoWidgetEmailVerification(this)
119
- : useEmailVerification.useWidgetEmailVerification(this);
262
+ : useWidgetEmailVerification(this);
120
263
  return index.h(WidgetEmailVerificationView, Object.assign({}, props));
121
264
  }
122
265
  };
123
266
  function useDemoWidgetEmailVerification(props) {
267
+ const setShowCode = index_module.Sn(keys.SHOW_CODE_NAMESPACE);
124
268
  return cjs.cjs({
125
269
  states: {
126
- error: "",
270
+ error: true,
271
+ initialLoading: false,
127
272
  loading: false,
128
- email: "",
273
+ email: "test@example.com",
274
+ sendCodeError: true,
129
275
  },
130
276
  callbacks: {
131
- submitEmail: async () => { },
277
+ submitEmail: async () => setShowCode(true),
132
278
  },
133
279
  text: props.getTextProps(),
134
280
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
@@ -714,6 +714,7 @@ const stepFourProps = {
714
714
  },
715
715
  },
716
716
  callbacks: {
717
+ onVerification: () => { },
717
718
  onSubmit: async () => console.log("Submit"),
718
719
  setPaymentMethodChecked: () => { },
719
720
  setPaymentScheduleChecked: () => { },
@@ -750,6 +751,8 @@ const docusignFormProps = {
750
751
  };
751
752
  const dashboardProps = {
752
753
  states: {
754
+ showVerifyIdentity: false,
755
+ payoutStatus: "DONE",
753
756
  canEditPayoutInfo: true,
754
757
  disabled: false,
755
758
  status: "ACTIVE",
@@ -761,6 +764,7 @@ const dashboardProps = {
761
764
  indirectTaxNumber: "123456",
762
765
  indirectTaxType: "VAT",
763
766
  showNewFormDialog: false,
767
+ hasHold: false,
764
768
  },
765
769
  slots: {
766
770
  payoutDetailsCardSlot: (index.h("sqm-payout-details-card", { demoData: {
@@ -1267,6 +1271,8 @@ const TaxAndCashDashboardActiveW8BENForm = () => {
1267
1271
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1268
1272
  ...dashboardProps,
1269
1273
  states: {
1274
+ payoutStatus: "DONE",
1275
+ showVerifyIdentity: false,
1270
1276
  noFormNeeded: false,
1271
1277
  canEditPayoutInfo: true,
1272
1278
  documentType: "W8BEN",
@@ -1275,6 +1281,7 @@ const TaxAndCashDashboardActiveW8BENForm = () => {
1275
1281
  indirectTaxType: "VAT",
1276
1282
  indirectTaxNumber: "123456",
1277
1283
  showNewFormDialog: false,
1284
+ hasHold: false,
1278
1285
  },
1279
1286
  } }));
1280
1287
  };
@@ -1282,6 +1289,8 @@ const TaxAndCashDashboardActiveW8BENEForm = () => {
1282
1289
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1283
1290
  ...dashboardProps,
1284
1291
  states: {
1292
+ payoutStatus: "DONE",
1293
+ showVerifyIdentity: false,
1285
1294
  noFormNeeded: false,
1286
1295
  canEditPayoutInfo: true,
1287
1296
  documentType: "W8BENE",
@@ -1290,6 +1299,7 @@ const TaxAndCashDashboardActiveW8BENEForm = () => {
1290
1299
  indirectTaxType: "VAT",
1291
1300
  indirectTaxNumber: "123456",
1292
1301
  showNewFormDialog: false,
1302
+ hasHold: false,
1293
1303
  },
1294
1304
  } }));
1295
1305
  };
@@ -1297,6 +1307,8 @@ const TaxAndCashDashboardNotActiveW9Form = () => {
1297
1307
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1298
1308
  ...dashboardProps,
1299
1309
  states: {
1310
+ payoutStatus: "DONE",
1311
+ showVerifyIdentity: false,
1300
1312
  noFormNeeded: false,
1301
1313
  canEditPayoutInfo: true,
1302
1314
  status: "INACTIVE",
@@ -1306,6 +1318,7 @@ const TaxAndCashDashboardNotActiveW9Form = () => {
1306
1318
  indirectTaxType: "VAT",
1307
1319
  indirectTaxNumber: "123456",
1308
1320
  showNewFormDialog: false,
1321
+ hasHold: false,
1309
1322
  },
1310
1323
  } }));
1311
1324
  };
@@ -1313,6 +1326,8 @@ const TaxAndCashDashboardNotVerifiedW9Form = () => {
1313
1326
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1314
1327
  ...dashboardProps,
1315
1328
  states: {
1329
+ payoutStatus: "DONE",
1330
+ showVerifyIdentity: false,
1316
1331
  canEditPayoutInfo: true,
1317
1332
  disabled: false,
1318
1333
  status: "NOT_VERIFIED",
@@ -1323,6 +1338,7 @@ const TaxAndCashDashboardNotVerifiedW9Form = () => {
1323
1338
  indirectTaxType: "VAT",
1324
1339
  indirectTaxNumber: "123456",
1325
1340
  showNewFormDialog: false,
1341
+ hasHold: false,
1326
1342
  },
1327
1343
  } }));
1328
1344
  };
@@ -1330,6 +1346,8 @@ const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
1330
1346
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1331
1347
  ...dashboardProps,
1332
1348
  states: {
1349
+ payoutStatus: "DONE",
1350
+ showVerifyIdentity: false,
1333
1351
  canEditPayoutInfo: true,
1334
1352
  disabled: false,
1335
1353
  status: "NOT_VERIFIED",
@@ -1341,6 +1359,7 @@ const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
1341
1359
  indirectTaxType: "VAT",
1342
1360
  indirectTaxNumber: "123456",
1343
1361
  showNewFormDialog: false,
1362
+ hasHold: false,
1344
1363
  },
1345
1364
  } }));
1346
1365
  };
@@ -1348,6 +1367,8 @@ const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
1348
1367
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1349
1368
  ...dashboardProps,
1350
1369
  states: {
1370
+ payoutStatus: "DONE",
1371
+ showVerifyIdentity: false,
1351
1372
  canEditPayoutInfo: true,
1352
1373
  disabled: false,
1353
1374
  status: "NOT_VERIFIED",
@@ -1359,6 +1380,7 @@ const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
1359
1380
  indirectTaxType: "VAT",
1360
1381
  indirectTaxNumber: "123456",
1361
1382
  showNewFormDialog: false,
1383
+ hasHold: false,
1362
1384
  },
1363
1385
  } }));
1364
1386
  };
@@ -1366,6 +1388,8 @@ const TaxAndCashDashboardNotActiveW8BENEForm = () => {
1366
1388
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1367
1389
  ...dashboardProps,
1368
1390
  states: {
1391
+ payoutStatus: "DONE",
1392
+ showVerifyIdentity: false,
1369
1393
  canEditPayoutInfo: true,
1370
1394
  disabled: false,
1371
1395
  status: "NOT_ACTIVE",
@@ -1377,6 +1401,7 @@ const TaxAndCashDashboardNotActiveW8BENEForm = () => {
1377
1401
  indirectTaxType: "VAT",
1378
1402
  country: "United Kingdom",
1379
1403
  showNewFormDialog: false,
1404
+ hasHold: false,
1380
1405
  },
1381
1406
  } }));
1382
1407
  };
@@ -1384,6 +1409,8 @@ const TaxAndCashDashboardNoFormNeeded = () => {
1384
1409
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1385
1410
  ...dashboardProps,
1386
1411
  states: {
1412
+ payoutStatus: "DONE",
1413
+ showVerifyIdentity: false,
1387
1414
  canEditPayoutInfo: true,
1388
1415
  disabled: false,
1389
1416
  documentType: "W9",
@@ -1395,6 +1422,7 @@ const TaxAndCashDashboardNoFormNeeded = () => {
1395
1422
  indirectTaxNumber: "123456",
1396
1423
  indirectTaxType: "GST",
1397
1424
  showNewFormDialog: false,
1425
+ hasHold: false,
1398
1426
  },
1399
1427
  } }));
1400
1428
  };
@@ -1402,6 +1430,8 @@ const TaxAndCashDashboardIndirectTaxCanada = () => {
1402
1430
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1403
1431
  ...dashboardProps,
1404
1432
  states: {
1433
+ payoutStatus: "DONE",
1434
+ showVerifyIdentity: false,
1405
1435
  canEditPayoutInfo: true,
1406
1436
  status: "ACTIVE",
1407
1437
  disabled: false,
@@ -1414,6 +1444,7 @@ const TaxAndCashDashboardIndirectTaxCanada = () => {
1414
1444
  indirectTaxType: "GST",
1415
1445
  indirectTaxNumber: "123456",
1416
1446
  showNewFormDialog: false,
1447
+ hasHold: false,
1417
1448
  },
1418
1449
  } }));
1419
1450
  };
@@ -1421,6 +1452,8 @@ const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
1421
1452
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1422
1453
  ...dashboardProps,
1423
1454
  states: {
1455
+ payoutStatus: "DONE",
1456
+ showVerifyIdentity: false,
1424
1457
  canEditPayoutInfo: true,
1425
1458
  status: "ACTIVE",
1426
1459
  disabled: false,
@@ -1434,6 +1467,7 @@ const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
1434
1467
  indirectTaxNumber: "123456",
1435
1468
  qstNumber: "44212",
1436
1469
  showNewFormDialog: false,
1470
+ hasHold: false,
1437
1471
  },
1438
1472
  } }));
1439
1473
  };
@@ -1441,6 +1475,8 @@ const TaxAndCashDashboardIndirectTaxSpain = () => {
1441
1475
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1442
1476
  ...dashboardProps,
1443
1477
  states: {
1478
+ payoutStatus: "DONE",
1479
+ showVerifyIdentity: false,
1444
1480
  canEditPayoutInfo: true,
1445
1481
  status: "ACTIVE",
1446
1482
  disabled: false,
@@ -1454,6 +1490,7 @@ const TaxAndCashDashboardIndirectTaxSpain = () => {
1454
1490
  indirectTaxNumber: "123456",
1455
1491
  subRegionTaxNumber: "44212",
1456
1492
  showNewFormDialog: false,
1493
+ hasHold: false,
1457
1494
  },
1458
1495
  } }));
1459
1496
  };
@@ -1461,6 +1498,8 @@ const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
1461
1498
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1462
1499
  ...dashboardProps,
1463
1500
  states: {
1501
+ payoutStatus: "DONE",
1502
+ showVerifyIdentity: false,
1464
1503
  canEditPayoutInfo: true,
1465
1504
  status: "ACTIVE",
1466
1505
  documentType: "W8BEN",
@@ -1469,6 +1508,7 @@ const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
1469
1508
  noFormNeeded: false,
1470
1509
  notRegistered: true,
1471
1510
  showNewFormDialog: false,
1511
+ hasHold: false,
1472
1512
  },
1473
1513
  } }));
1474
1514
  };
@@ -1476,6 +1516,8 @@ const TaxAndCashDashboardIdentityVerifcationRequired = () => {
1476
1516
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1477
1517
  ...dashboardProps,
1478
1518
  states: {
1519
+ payoutStatus: "VERIFICATION_NEEDED",
1520
+ showVerifyIdentity: true,
1479
1521
  showIdentityVerificationDialog: true,
1480
1522
  identiyRequired: true,
1481
1523
  canEditPayoutInfo: true,
@@ -1486,6 +1528,7 @@ const TaxAndCashDashboardIdentityVerifcationRequired = () => {
1486
1528
  noFormNeeded: false,
1487
1529
  notRegistered: true,
1488
1530
  showNewFormDialog: false,
1531
+ hasHold: false,
1489
1532
  },
1490
1533
  } }));
1491
1534
  };
@@ -1493,6 +1536,8 @@ const TaxAndCashDashboardNewTaxForm = () => {
1493
1536
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1494
1537
  ...dashboardProps,
1495
1538
  states: {
1539
+ payoutStatus: "DONE",
1540
+ showVerifyIdentity: false,
1496
1541
  canEditPayoutInfo: true,
1497
1542
  status: "ACTIVE",
1498
1543
  documentType: "W8BEN",
@@ -1501,6 +1546,27 @@ const TaxAndCashDashboardNewTaxForm = () => {
1501
1546
  noFormNeeded: false,
1502
1547
  notRegistered: true,
1503
1548
  showNewFormDialog: true,
1549
+ hasHold: false,
1550
+ },
1551
+ } }));
1552
+ };
1553
+ const TaxAndCashDashboardPayoutsOnHold = () => {
1554
+ return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1555
+ ...dashboardProps,
1556
+ states: {
1557
+ payoutStatus: "DONE",
1558
+ showVerifyIdentity: false,
1559
+ canEditPayoutInfo: true,
1560
+ disabled: true,
1561
+ status: "ACTIVE",
1562
+ documentType: "W8BEN",
1563
+ documentTypeString: taxTypeToName("W8BEN"),
1564
+ dateSubmitted: "Jan 18th, 2025",
1565
+ noFormNeeded: false,
1566
+ indirectTaxNumber: "123456",
1567
+ country: "Slovania",
1568
+ showNewFormDialog: false,
1569
+ hasHold: true,
1504
1570
  },
1505
1571
  } }));
1506
1572
  };
@@ -1508,6 +1574,8 @@ const TaxAndCashDashboardLoading = () => {
1508
1574
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1509
1575
  ...dashboardProps,
1510
1576
  states: {
1577
+ payoutStatus: "DONE",
1578
+ showVerifyIdentity: false,
1511
1579
  canEditPayoutInfo: true,
1512
1580
  disabled: false,
1513
1581
  status: "ACTIVE",
@@ -1517,6 +1585,7 @@ const TaxAndCashDashboardLoading = () => {
1517
1585
  noFormNeeded: false,
1518
1586
  loading: true,
1519
1587
  showNewFormDialog: false,
1588
+ hasHold: false,
1520
1589
  },
1521
1590
  } }));
1522
1591
  };
@@ -1524,6 +1593,8 @@ const TaxAndCashDashboardWithLoadingError = () => {
1524
1593
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1525
1594
  ...dashboardProps,
1526
1595
  states: {
1596
+ payoutStatus: "DONE",
1597
+ showVerifyIdentity: false,
1527
1598
  disabled: false,
1528
1599
  canEditPayoutInfo: true,
1529
1600
  status: "ACTIVE",
@@ -1534,6 +1605,7 @@ const TaxAndCashDashboardWithLoadingError = () => {
1534
1605
  loading: true,
1535
1606
  loadingError: true,
1536
1607
  showNewFormDialog: false,
1608
+ hasHold: false,
1537
1609
  },
1538
1610
  } }));
1539
1611
  };
@@ -1541,6 +1613,8 @@ const TaxAndCashDashboardWithGeneralError = () => {
1541
1613
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1542
1614
  ...dashboardProps,
1543
1615
  states: {
1616
+ payoutStatus: "DONE",
1617
+ showVerifyIdentity: false,
1544
1618
  canEditPayoutInfo: true,
1545
1619
  disabled: false,
1546
1620
  status: "ACTIVE",
@@ -1552,6 +1626,7 @@ const TaxAndCashDashboardWithGeneralError = () => {
1552
1626
  indirectTaxType: "VAT",
1553
1627
  country: "Slovania",
1554
1628
  showNewFormDialog: false,
1629
+ hasHold: false,
1555
1630
  errors: {
1556
1631
  general: true,
1557
1632
  },
@@ -1562,6 +1637,8 @@ const TaxAndCashDashboardDisabled = () => {
1562
1637
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
1563
1638
  ...dashboardProps,
1564
1639
  states: {
1640
+ payoutStatus: "DONE",
1641
+ showVerifyIdentity: false,
1565
1642
  canEditPayoutInfo: true,
1566
1643
  disabled: true,
1567
1644
  status: "ACTIVE",
@@ -1572,6 +1649,7 @@ const TaxAndCashDashboardDisabled = () => {
1572
1649
  indirectTaxNumber: "123456",
1573
1650
  country: "Slovania",
1574
1651
  showNewFormDialog: false,
1652
+ hasHold: false,
1575
1653
  },
1576
1654
  } }));
1577
1655
  };
@@ -1640,6 +1718,7 @@ const TaxForm = /*#__PURE__*/Object.freeze({
1640
1718
  TaxAndCashDashboardIndirectTaxNotRegistered: TaxAndCashDashboardIndirectTaxNotRegistered,
1641
1719
  TaxAndCashDashboardIdentityVerifcationRequired: TaxAndCashDashboardIdentityVerifcationRequired,
1642
1720
  TaxAndCashDashboardNewTaxForm: TaxAndCashDashboardNewTaxForm,
1721
+ TaxAndCashDashboardPayoutsOnHold: TaxAndCashDashboardPayoutsOnHold,
1643
1722
  TaxAndCashDashboardLoading: TaxAndCashDashboardLoading,
1644
1723
  TaxAndCashDashboardWithLoadingError: TaxAndCashDashboardWithLoadingError,
1645
1724
  TaxAndCashDashboardWithGeneralError: TaxAndCashDashboardWithGeneralError,