@saasquatch/mint-components 1.12.0-11 → 1.12.0-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +165 -61
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +55 -15
- package/dist/cjs/sqm-code-verification.cjs.entry.js +5 -5
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-invoice-table-view-c58966f8.js → sqm-invoice-table-view-e92c557a.js} +79 -23
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +12 -21
- package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +7 -1
- package/dist/cjs/usePayoutStatus-5ac536a3.js +1045 -0
- package/dist/cjs/{useVerificationEmail-6aacdb71.js → useVerificationEmail-2eb28c2a.js} +5 -1
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +1 -1
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +3 -3
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +7 -1
- package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +5 -1
- package/dist/collection/components/tax-and-cash/BankingForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +76 -23
- package/dist/collection/components/tax-and-cash/eventKeys.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +32 -10
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +6 -1
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +3 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +3 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +0 -7
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +0 -5
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +0 -56
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +5 -9
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +28 -11
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +155 -6
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +20 -9
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +87 -23
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +153 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +13 -5
- package/dist/collection/components/tax-and-cash/useVeriffApp.js +64 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_16.entry.js +165 -61
- package/dist/esm/sqm-big-stat_39.entry.js +55 -15
- package/dist/esm/sqm-code-verification.entry.js +5 -5
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/{sqm-invoice-table-view-d1cfdaf4.js → sqm-invoice-table-view-c184248a.js} +79 -23
- package/dist/esm/sqm-stencilbook.entry.js +12 -21
- package/dist/esm/sqm-widget-verification-internal.entry.js +7 -1
- package/dist/esm/usePayoutStatus-d613ff10.js +1039 -0
- package/dist/esm/{useVerificationEmail-c32696ba.js → useVerificationEmail-2a21d0e3.js} +5 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-c184248a.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
- package/dist/esm-es5/usePayoutStatus-d613ff10.js +6 -0
- package/dist/esm-es5/useVerificationEmail-2a21d0e3.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-1712a9fd.entry.js → p-02892b2a.entry.js} +2 -2
- package/dist/mint-components/p-03e1ac96.system.entry.js +1 -0
- package/dist/mint-components/p-13ce67a3.js +1 -0
- package/dist/mint-components/p-209eab38.system.js +6 -0
- package/dist/mint-components/p-2584baa5.entry.js +16 -0
- package/dist/mint-components/p-2c99add0.js +31 -0
- package/dist/mint-components/{p-24092973.entry.js → p-4e21de5f.entry.js} +2 -2
- package/dist/mint-components/p-8c26c4ce.entry.js +195 -0
- package/dist/mint-components/{p-e45a8501.system.entry.js → p-8fa2809f.system.entry.js} +1 -1
- package/dist/mint-components/{p-b62faaa5.system.entry.js → p-9266a8fc.system.entry.js} +1 -1
- package/dist/mint-components/p-9379ee08.js +48 -0
- package/dist/mint-components/p-a567ba84.system.entry.js +1 -0
- package/dist/mint-components/p-a8c28561.system.js +1 -0
- package/dist/mint-components/{p-5f766d09.entry.js → p-a9b7e11f.entry.js} +2 -2
- package/dist/mint-components/p-b7836281.system.js +1 -0
- package/dist/mint-components/{p-331d060e.entry.js → p-b9e863d0.entry.js} +14 -14
- package/dist/mint-components/p-c520d10d.system.entry.js +1 -0
- package/dist/mint-components/{p-aabab609.system.entry.js → p-c5d26757.system.entry.js} +1 -1
- package/dist/mint-components/p-ca809fdd.system.js +1 -1
- package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +1 -0
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +3 -0
- package/dist/types/components/tax-and-cash/eventKeys.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +0 -1
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.d.ts +0 -4
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +1 -16
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +3 -1
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +7 -2
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +25 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -4
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +8 -4
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +24 -0
- package/dist/types/components/tax-and-cash/useVeriffApp.d.ts +6 -0
- package/dist/types/components.d.ts +98 -22
- package/docs/docs.docx +0 -0
- package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
- package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/usePayoutStatus-b9fb7399.js +0 -70
- package/dist/esm/usePayoutStatus-1a635054.js +0 -67
- package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +0 -1
- package/dist/esm-es5/usePayoutStatus-1a635054.js +0 -1
- package/dist/esm-es5/useVerificationEmail-c32696ba.js +0 -1
- package/dist/mint-components/p-0e45bc0e.system.entry.js +0 -1
- package/dist/mint-components/p-1e616d45.system.js +0 -1
- package/dist/mint-components/p-282a7d85.entry.js +0 -195
- package/dist/mint-components/p-4364001c.entry.js +0 -12
- package/dist/mint-components/p-4bd7a472.js +0 -1
- package/dist/mint-components/p-517224ef.js +0 -19
- package/dist/mint-components/p-8300d8c8.system.js +0 -1
- package/dist/mint-components/p-8bddb468.system.entry.js +0 -1
- package/dist/mint-components/p-974070c4.system.entry.js +0 -1
- package/dist/mint-components/p-d7806f31.js +0 -48
- package/dist/mint-components/p-e990dc21.system.js +0 -1
|
@@ -59,6 +59,7 @@ const SubmitImpactCodeMutation = index_module.dist.gql `
|
|
|
59
59
|
// ! is done before calling any mutations
|
|
60
60
|
function useVerificationEmail() {
|
|
61
61
|
const userIdentity = index_module.K();
|
|
62
|
+
const [verificationEmail, setVerificationEmail] = stencilHooks_module.useState(null);
|
|
62
63
|
const [hasEmails, setHasEmails] = stencilHooks_module.useState({
|
|
63
64
|
participant: false,
|
|
64
65
|
impact: false,
|
|
@@ -76,7 +77,7 @@ function useVerificationEmail() {
|
|
|
76
77
|
const verifyErrors = verifyMutationErrors || submitImpactCodeErrors;
|
|
77
78
|
const [initialized, setInitialized] = stencilHooks_module.useState(false);
|
|
78
79
|
const initialise = async () => {
|
|
79
|
-
var _a, _b, _c, _d;
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
80
81
|
try {
|
|
81
82
|
const lookup = await fetch({});
|
|
82
83
|
if (!lookup || lookup instanceof Error)
|
|
@@ -85,6 +86,8 @@ function useVerificationEmail() {
|
|
|
85
86
|
participant: !!((_a = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _a === void 0 ? void 0 : _a.email),
|
|
86
87
|
impact: !!((_d = (_c = (_b = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.email),
|
|
87
88
|
});
|
|
89
|
+
setVerificationEmail(((_g = (_f = (_e = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.user) === null || _g === void 0 ? void 0 : _g.email) || ((_h = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _h === void 0 ? void 0 : _h.email) ||
|
|
90
|
+
null);
|
|
88
91
|
setInitialized(true);
|
|
89
92
|
}
|
|
90
93
|
catch (e) {
|
|
@@ -155,6 +158,7 @@ function useVerificationEmail() {
|
|
|
155
158
|
}, []);
|
|
156
159
|
return {
|
|
157
160
|
initialized,
|
|
161
|
+
verificationEmail,
|
|
158
162
|
send: [
|
|
159
163
|
sendVerificationEmail,
|
|
160
164
|
{ loading: sendLoading, errors: sendErrors },
|
|
@@ -46,7 +46,7 @@ export function useWidgetCodeVerification(props) {
|
|
|
46
46
|
const [codeRef, setCodeRef] = useState(null);
|
|
47
47
|
const [validationError, setValidationError] = useState(false);
|
|
48
48
|
const [emailError, setEmailError] = useState(false);
|
|
49
|
-
const { initialized, send: [sendEmail, { loading: sendLoading, errors: sendErrors }], verify: [verifyEmail, { loading: verifyLoading, errors: verifyErrors }], } = useVerificationEmail();
|
|
49
|
+
const { initialized, verificationEmail, send: [sendEmail, { loading: sendLoading, errors: sendErrors }], verify: [verifyEmail, { loading: verifyLoading, errors: verifyErrors }], } = useVerificationEmail();
|
|
50
50
|
useEffect(() => {
|
|
51
51
|
if (!codeRef)
|
|
52
52
|
return;
|
|
@@ -66,7 +66,7 @@ export function useWidgetCodeVerification(props) {
|
|
|
66
66
|
if (!input)
|
|
67
67
|
return;
|
|
68
68
|
if (idx === codeElements.length - 1) {
|
|
69
|
-
e.target.value = input.slice(
|
|
69
|
+
e.target.value = input.slice(0, 1);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
if (input.length > 1) {
|
|
@@ -137,7 +137,7 @@ export function useWidgetCodeVerification(props) {
|
|
|
137
137
|
codeWrapperRef: setCodeRef,
|
|
138
138
|
},
|
|
139
139
|
states: {
|
|
140
|
-
email,
|
|
140
|
+
email: verificationEmail,
|
|
141
141
|
emailResent,
|
|
142
142
|
resendError: sendErrors || verifyErrors,
|
|
143
143
|
initialiseLoading: !initialized,
|
package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js
CHANGED
|
@@ -14,6 +14,10 @@ const USER_LOOKUP = gql `
|
|
|
14
14
|
accountId
|
|
15
15
|
email
|
|
16
16
|
emailVerified
|
|
17
|
+
managedIdentity {
|
|
18
|
+
email
|
|
19
|
+
emailVerified
|
|
20
|
+
}
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
}
|
|
@@ -33,13 +37,15 @@ function useWidgetVerificationInternal() {
|
|
|
33
37
|
const [fetch] = useLazyQuery(USER_LOOKUP);
|
|
34
38
|
useEffect(() => {
|
|
35
39
|
const checkUser = async () => {
|
|
36
|
-
var _a;
|
|
40
|
+
var _a, _b, _c;
|
|
37
41
|
try {
|
|
38
42
|
const res = await fetch({});
|
|
39
43
|
if (!res || res instanceof Error)
|
|
40
44
|
throw new Error();
|
|
41
45
|
if ((_a = res === null || res === void 0 ? void 0 : res.viewer) === null || _a === void 0 ? void 0 : _a.emailVerified)
|
|
42
46
|
setContext(true);
|
|
47
|
+
else if ((_c = (_b = res === null || res === void 0 ? void 0 : res.viewer) === null || _b === void 0 ? void 0 : _b.managedIdentity) === null || _c === void 0 ? void 0 : _c.emailVerified)
|
|
48
|
+
setContext(true);
|
|
43
49
|
}
|
|
44
50
|
catch (e) {
|
|
45
51
|
console.error("Could not fetch user information:", e);
|
|
@@ -57,6 +57,7 @@ const SubmitImpactCodeMutation = gql `
|
|
|
57
57
|
// ! is done before calling any mutations
|
|
58
58
|
export function useVerificationEmail() {
|
|
59
59
|
const userIdentity = useUserIdentity();
|
|
60
|
+
const [verificationEmail, setVerificationEmail] = useState(null);
|
|
60
61
|
const [hasEmails, setHasEmails] = useState({
|
|
61
62
|
participant: false,
|
|
62
63
|
impact: false,
|
|
@@ -74,7 +75,7 @@ export function useVerificationEmail() {
|
|
|
74
75
|
const verifyErrors = verifyMutationErrors || submitImpactCodeErrors;
|
|
75
76
|
const [initialized, setInitialized] = useState(false);
|
|
76
77
|
const initialise = async () => {
|
|
77
|
-
var _a, _b, _c, _d;
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
78
79
|
try {
|
|
79
80
|
const lookup = await fetch({});
|
|
80
81
|
if (!lookup || lookup instanceof Error)
|
|
@@ -83,6 +84,8 @@ export function useVerificationEmail() {
|
|
|
83
84
|
participant: !!((_a = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _a === void 0 ? void 0 : _a.email),
|
|
84
85
|
impact: !!((_d = (_c = (_b = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.email),
|
|
85
86
|
});
|
|
87
|
+
setVerificationEmail(((_g = (_f = (_e = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.user) === null || _g === void 0 ? void 0 : _g.email) || ((_h = lookup === null || lookup === void 0 ? void 0 : lookup.viewer) === null || _h === void 0 ? void 0 : _h.email) ||
|
|
88
|
+
null);
|
|
86
89
|
setInitialized(true);
|
|
87
90
|
}
|
|
88
91
|
catch (e) {
|
|
@@ -153,6 +156,7 @@ export function useVerificationEmail() {
|
|
|
153
156
|
}, []);
|
|
154
157
|
return {
|
|
155
158
|
initialized,
|
|
159
|
+
verificationEmail,
|
|
156
160
|
send: [
|
|
157
161
|
sendVerificationEmail,
|
|
158
162
|
{ loading: sendLoading, errors: sendErrors },
|
|
@@ -210,6 +210,7 @@ const stepFourProps = {
|
|
|
210
210
|
},
|
|
211
211
|
},
|
|
212
212
|
callbacks: {
|
|
213
|
+
onVerificationHide: () => { },
|
|
213
214
|
onVerification: () => { },
|
|
214
215
|
onSubmit: async () => console.log("Submit"),
|
|
215
216
|
setPaymentMethodChecked: () => { },
|
|
@@ -247,7 +248,7 @@ const docusignFormProps = {
|
|
|
247
248
|
};
|
|
248
249
|
const dashboardProps = {
|
|
249
250
|
states: {
|
|
250
|
-
|
|
251
|
+
veriffLoading: false,
|
|
251
252
|
payoutStatus: "DONE",
|
|
252
253
|
canEditPayoutInfo: true,
|
|
253
254
|
disabled: false,
|
|
@@ -768,7 +769,7 @@ export const TaxAndCashDashboardActiveW8BENForm = () => {
|
|
|
768
769
|
...dashboardProps,
|
|
769
770
|
states: {
|
|
770
771
|
payoutStatus: "DONE",
|
|
771
|
-
|
|
772
|
+
veriffLoading: false,
|
|
772
773
|
noFormNeeded: false,
|
|
773
774
|
canEditPayoutInfo: true,
|
|
774
775
|
documentType: "W8BEN",
|
|
@@ -786,7 +787,7 @@ export const TaxAndCashDashboardActiveW8BENEForm = () => {
|
|
|
786
787
|
...dashboardProps,
|
|
787
788
|
states: {
|
|
788
789
|
payoutStatus: "DONE",
|
|
789
|
-
|
|
790
|
+
veriffLoading: false,
|
|
790
791
|
noFormNeeded: false,
|
|
791
792
|
canEditPayoutInfo: true,
|
|
792
793
|
documentType: "W8BENE",
|
|
@@ -804,7 +805,7 @@ export const TaxAndCashDashboardNotActiveW9Form = () => {
|
|
|
804
805
|
...dashboardProps,
|
|
805
806
|
states: {
|
|
806
807
|
payoutStatus: "DONE",
|
|
807
|
-
|
|
808
|
+
veriffLoading: false,
|
|
808
809
|
noFormNeeded: false,
|
|
809
810
|
canEditPayoutInfo: true,
|
|
810
811
|
status: "INACTIVE",
|
|
@@ -823,7 +824,6 @@ export const TaxAndCashDashboardNotVerifiedW9Form = () => {
|
|
|
823
824
|
...dashboardProps,
|
|
824
825
|
states: {
|
|
825
826
|
payoutStatus: "DONE",
|
|
826
|
-
showVerifyIdentity: false,
|
|
827
827
|
canEditPayoutInfo: true,
|
|
828
828
|
disabled: false,
|
|
829
829
|
status: "NOT_VERIFIED",
|
|
@@ -835,6 +835,7 @@ export const TaxAndCashDashboardNotVerifiedW9Form = () => {
|
|
|
835
835
|
indirectTaxNumber: "123456",
|
|
836
836
|
showNewFormDialog: false,
|
|
837
837
|
hasHold: false,
|
|
838
|
+
veriffLoading: false,
|
|
838
839
|
},
|
|
839
840
|
} }));
|
|
840
841
|
};
|
|
@@ -843,7 +844,7 @@ export const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
|
|
|
843
844
|
...dashboardProps,
|
|
844
845
|
states: {
|
|
845
846
|
payoutStatus: "DONE",
|
|
846
|
-
|
|
847
|
+
veriffLoading: false,
|
|
847
848
|
canEditPayoutInfo: true,
|
|
848
849
|
disabled: false,
|
|
849
850
|
status: "NOT_VERIFIED",
|
|
@@ -864,7 +865,7 @@ export const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
|
|
|
864
865
|
...dashboardProps,
|
|
865
866
|
states: {
|
|
866
867
|
payoutStatus: "DONE",
|
|
867
|
-
|
|
868
|
+
veriffLoading: false,
|
|
868
869
|
canEditPayoutInfo: true,
|
|
869
870
|
disabled: false,
|
|
870
871
|
status: "NOT_VERIFIED",
|
|
@@ -885,7 +886,7 @@ export const TaxAndCashDashboardNotActiveW8BENEForm = () => {
|
|
|
885
886
|
...dashboardProps,
|
|
886
887
|
states: {
|
|
887
888
|
payoutStatus: "DONE",
|
|
888
|
-
|
|
889
|
+
veriffLoading: false,
|
|
889
890
|
canEditPayoutInfo: true,
|
|
890
891
|
disabled: false,
|
|
891
892
|
status: "NOT_ACTIVE",
|
|
@@ -906,7 +907,7 @@ export const TaxAndCashDashboardNoFormNeeded = () => {
|
|
|
906
907
|
...dashboardProps,
|
|
907
908
|
states: {
|
|
908
909
|
payoutStatus: "DONE",
|
|
909
|
-
|
|
910
|
+
veriffLoading: false,
|
|
910
911
|
canEditPayoutInfo: true,
|
|
911
912
|
disabled: false,
|
|
912
913
|
documentType: "W9",
|
|
@@ -927,7 +928,7 @@ export const TaxAndCashDashboardIndirectTaxCanada = () => {
|
|
|
927
928
|
...dashboardProps,
|
|
928
929
|
states: {
|
|
929
930
|
payoutStatus: "DONE",
|
|
930
|
-
|
|
931
|
+
veriffLoading: false,
|
|
931
932
|
canEditPayoutInfo: true,
|
|
932
933
|
status: "ACTIVE",
|
|
933
934
|
disabled: false,
|
|
@@ -949,7 +950,7 @@ export const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
|
|
|
949
950
|
...dashboardProps,
|
|
950
951
|
states: {
|
|
951
952
|
payoutStatus: "DONE",
|
|
952
|
-
|
|
953
|
+
veriffLoading: false,
|
|
953
954
|
canEditPayoutInfo: true,
|
|
954
955
|
status: "ACTIVE",
|
|
955
956
|
disabled: false,
|
|
@@ -972,7 +973,7 @@ export const TaxAndCashDashboardIndirectTaxSpain = () => {
|
|
|
972
973
|
...dashboardProps,
|
|
973
974
|
states: {
|
|
974
975
|
payoutStatus: "DONE",
|
|
975
|
-
|
|
976
|
+
veriffLoading: false,
|
|
976
977
|
canEditPayoutInfo: true,
|
|
977
978
|
status: "ACTIVE",
|
|
978
979
|
disabled: false,
|
|
@@ -995,7 +996,7 @@ export const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
|
|
|
995
996
|
...dashboardProps,
|
|
996
997
|
states: {
|
|
997
998
|
payoutStatus: "DONE",
|
|
998
|
-
|
|
999
|
+
veriffLoading: false,
|
|
999
1000
|
canEditPayoutInfo: true,
|
|
1000
1001
|
status: "ACTIVE",
|
|
1001
1002
|
documentType: "W8BEN",
|
|
@@ -1012,10 +1013,62 @@ export const TaxAndCashDashboardIdentityVerifcationRequired = () => {
|
|
|
1012
1013
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1013
1014
|
...dashboardProps,
|
|
1014
1015
|
states: {
|
|
1015
|
-
payoutStatus: "
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1016
|
+
payoutStatus: "VERIFICATION:REQUIRED",
|
|
1017
|
+
veriffLoading: false,
|
|
1018
|
+
canEditPayoutInfo: true,
|
|
1019
|
+
status: "ACTIVE",
|
|
1020
|
+
documentType: "W8BEN",
|
|
1021
|
+
documentTypeString: taxTypeToName("W8BEN"),
|
|
1022
|
+
dateSubmitted: "Jan 18th, 2025",
|
|
1023
|
+
noFormNeeded: false,
|
|
1024
|
+
notRegistered: true,
|
|
1025
|
+
showNewFormDialog: false,
|
|
1026
|
+
hasHold: false,
|
|
1027
|
+
},
|
|
1028
|
+
} }));
|
|
1029
|
+
};
|
|
1030
|
+
export const TaxAndCashDashboardIdentityVerifcationRequiredInternal = () => {
|
|
1031
|
+
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1032
|
+
...dashboardProps,
|
|
1033
|
+
states: {
|
|
1034
|
+
payoutStatus: "VERIFICATION:INTERNAL",
|
|
1035
|
+
veriffLoading: false,
|
|
1036
|
+
canEditPayoutInfo: true,
|
|
1037
|
+
status: "ACTIVE",
|
|
1038
|
+
documentType: "W8BEN",
|
|
1039
|
+
documentTypeString: taxTypeToName("W8BEN"),
|
|
1040
|
+
dateSubmitted: "Jan 18th, 2025",
|
|
1041
|
+
noFormNeeded: false,
|
|
1042
|
+
notRegistered: true,
|
|
1043
|
+
showNewFormDialog: false,
|
|
1044
|
+
hasHold: false,
|
|
1045
|
+
},
|
|
1046
|
+
} }));
|
|
1047
|
+
};
|
|
1048
|
+
export const TaxAndCashDashboardIdentityVerifcationReviewInternal = () => {
|
|
1049
|
+
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1050
|
+
...dashboardProps,
|
|
1051
|
+
states: {
|
|
1052
|
+
payoutStatus: "VERIFICATION:REVIEW",
|
|
1053
|
+
veriffLoading: false,
|
|
1054
|
+
canEditPayoutInfo: true,
|
|
1055
|
+
status: "ACTIVE",
|
|
1056
|
+
documentType: "W8BEN",
|
|
1057
|
+
documentTypeString: taxTypeToName("W8BEN"),
|
|
1058
|
+
dateSubmitted: "Jan 18th, 2025",
|
|
1059
|
+
noFormNeeded: false,
|
|
1060
|
+
notRegistered: true,
|
|
1061
|
+
showNewFormDialog: false,
|
|
1062
|
+
hasHold: false,
|
|
1063
|
+
},
|
|
1064
|
+
} }));
|
|
1065
|
+
};
|
|
1066
|
+
export const TaxAndCashDashboardIdentityVerifcationFailedInternal = () => {
|
|
1067
|
+
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1068
|
+
...dashboardProps,
|
|
1069
|
+
states: {
|
|
1070
|
+
payoutStatus: "VERIFICATION:FAILED",
|
|
1071
|
+
veriffLoading: false,
|
|
1019
1072
|
canEditPayoutInfo: true,
|
|
1020
1073
|
status: "ACTIVE",
|
|
1021
1074
|
documentType: "W8BEN",
|
|
@@ -1033,7 +1086,7 @@ export const TaxAndCashDashboardNewTaxForm = () => {
|
|
|
1033
1086
|
...dashboardProps,
|
|
1034
1087
|
states: {
|
|
1035
1088
|
payoutStatus: "DONE",
|
|
1036
|
-
|
|
1089
|
+
veriffLoading: false,
|
|
1037
1090
|
canEditPayoutInfo: true,
|
|
1038
1091
|
status: "ACTIVE",
|
|
1039
1092
|
documentType: "W8BEN",
|
|
@@ -1051,7 +1104,7 @@ export const TaxAndCashDashboardPayoutsOnHold = () => {
|
|
|
1051
1104
|
...dashboardProps,
|
|
1052
1105
|
states: {
|
|
1053
1106
|
payoutStatus: "DONE",
|
|
1054
|
-
|
|
1107
|
+
veriffLoading: false,
|
|
1055
1108
|
canEditPayoutInfo: true,
|
|
1056
1109
|
disabled: true,
|
|
1057
1110
|
status: "ACTIVE",
|
|
@@ -1071,7 +1124,7 @@ export const TaxAndCashDashboardLoading = () => {
|
|
|
1071
1124
|
...dashboardProps,
|
|
1072
1125
|
states: {
|
|
1073
1126
|
payoutStatus: "DONE",
|
|
1074
|
-
|
|
1127
|
+
veriffLoading: false,
|
|
1075
1128
|
canEditPayoutInfo: true,
|
|
1076
1129
|
disabled: false,
|
|
1077
1130
|
status: "ACTIVE",
|
|
@@ -1090,7 +1143,7 @@ export const TaxAndCashDashboardWithLoadingError = () => {
|
|
|
1090
1143
|
...dashboardProps,
|
|
1091
1144
|
states: {
|
|
1092
1145
|
payoutStatus: "DONE",
|
|
1093
|
-
|
|
1146
|
+
veriffLoading: false,
|
|
1094
1147
|
disabled: false,
|
|
1095
1148
|
canEditPayoutInfo: true,
|
|
1096
1149
|
status: "ACTIVE",
|
|
@@ -1110,7 +1163,7 @@ export const TaxAndCashDashboardWithGeneralError = () => {
|
|
|
1110
1163
|
...dashboardProps,
|
|
1111
1164
|
states: {
|
|
1112
1165
|
payoutStatus: "DONE",
|
|
1113
|
-
|
|
1166
|
+
veriffLoading: false,
|
|
1114
1167
|
canEditPayoutInfo: true,
|
|
1115
1168
|
disabled: false,
|
|
1116
1169
|
status: "ACTIVE",
|
|
@@ -1134,7 +1187,7 @@ export const TaxAndCashDashboardDisabled = () => {
|
|
|
1134
1187
|
...dashboardProps,
|
|
1135
1188
|
states: {
|
|
1136
1189
|
payoutStatus: "DONE",
|
|
1137
|
-
|
|
1190
|
+
veriffLoading: false,
|
|
1138
1191
|
canEditPayoutInfo: true,
|
|
1139
1192
|
disabled: true,
|
|
1140
1193
|
status: "ACTIVE",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const TAX_FORM_UPDATED_EVENT_KEY = "sqm:tax-form-updated";
|
package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js
CHANGED
|
@@ -10,6 +10,7 @@ import { getFormMap } from "./formDefinitions";
|
|
|
10
10
|
import { mockPaymentOptions } from "./mockData";
|
|
11
11
|
import { BankingInfoFormView, } from "./sqm-banking-info-form-view";
|
|
12
12
|
import { getFormInputs, paypalFeeMap, useBankingInfoForm, } from "./useBankingInfoForm";
|
|
13
|
+
import { createStyleSheet } from "../../../styling/JSS";
|
|
13
14
|
/**
|
|
14
15
|
* @uiName Banking Information Form
|
|
15
16
|
* @exampleGroup Common Components
|
|
@@ -308,25 +309,45 @@ export class BankingInfoForm {
|
|
|
308
309
|
bitset: props.states.bitset,
|
|
309
310
|
formMap,
|
|
310
311
|
});
|
|
311
|
-
const
|
|
312
|
+
const style = {
|
|
313
|
+
Dialog: {
|
|
314
|
+
"&::part(panel)": {
|
|
315
|
+
maxWidth: "420px",
|
|
316
|
+
},
|
|
317
|
+
"&::part(close-button)": {
|
|
318
|
+
marginBottom: "var(--sl-spacing-xx-large)",
|
|
319
|
+
},
|
|
320
|
+
"&::part(body)": {
|
|
321
|
+
padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
|
|
322
|
+
fontSize: "var(--sl-font-size-small)",
|
|
323
|
+
},
|
|
324
|
+
"&::part(footer)": {
|
|
325
|
+
display: "flex",
|
|
326
|
+
flexDirection: "column",
|
|
327
|
+
gap: "var(--sl-spacing-small)",
|
|
328
|
+
marginBottom: "var(--sl-spacing-xx-small)",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
flex: "1",
|
|
331
|
+
},
|
|
332
|
+
},
|
|
312
333
|
SearchInput: {
|
|
313
334
|
padding: "var(--sl-spacing-x-small)",
|
|
314
335
|
},
|
|
315
336
|
};
|
|
316
|
-
|
|
317
|
-
return (h("sqm-code-verification", { onVerification: props.callbacks.onVerification }));
|
|
318
|
-
}
|
|
337
|
+
const sheet = createStyleSheet(style);
|
|
319
338
|
return (h(Host, null,
|
|
339
|
+
props.states.isPartner && props.states.showVerification ? (h("sl-dialog", { class: sheet.classes.Dialog, open: true, "onSl-hide": props.callbacks.onVerificationHide },
|
|
340
|
+
h("sqm-code-verification", { onVerification: props.callbacks.onVerification }))) : null,
|
|
320
341
|
h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
|
|
321
342
|
formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
|
|
322
|
-
countryInputSlot: (h("sl-select", Object.assign({ label: props.text.bankLocationLabel, required: true, name: "/bankCountry", id: "bankCountry", value: props.states.formState.bankCountry || "", "onSl-select": (e) => { var _a, _b; return props.callbacks.setBankCountry((_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value); } }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.bankCountry) && {
|
|
343
|
+
countryInputSlot: (h("sl-select", Object.assign({ label: props.text.bankLocationLabel, disabled: props.states.saveLoading, required: true, name: "/bankCountry", id: "bankCountry", value: props.states.formState.bankCountry || "", "onSl-select": (e) => { var _a, _b; return props.callbacks.setBankCountry((_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value); } }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.bankCountry) && {
|
|
323
344
|
class: "error-input",
|
|
324
345
|
helpText: getValidationErrorMessage({
|
|
325
346
|
type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.bankCountry) === null || _c === void 0 ? void 0 : _c.type,
|
|
326
347
|
label: props.text.bankLocationLabel,
|
|
327
348
|
}),
|
|
328
349
|
})),
|
|
329
|
-
h("sl-input", { class:
|
|
350
|
+
h("sl-input", { disabled: props.states.saveLoading, class: sheet.classes.SearchInput, placeholder: this.searchForCountryText, onKeyDown: (e) => {
|
|
330
351
|
// Stop shoelace intercepting key presses
|
|
331
352
|
e.stopPropagation();
|
|
332
353
|
}, "onSl-input": (e) => {
|
|
@@ -337,14 +358,14 @@ export class BankingInfoForm {
|
|
|
337
358
|
}), (_f = (_e = props.states) === null || _e === void 0 ? void 0 : _e.allCountries) === null || _f === void 0 ? void 0 :
|
|
338
359
|
_f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName))))),
|
|
339
360
|
paymentMethodSlot: (h("sl-input", { key: "paymentMethod", label: props.text.paymentMethod, placeholder: props.states.paymentMethodFeeLabel, disabled: true })),
|
|
340
|
-
paymentThresholdSelectSlot: (h("sl-select", Object.assign({ required: true, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((_h = (_g = props.states) === null || _g === void 0 ? void 0 : _g.formState) === null || _h === void 0 ? void 0 : _h.paymentThreshold) || "" }, (((_j = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _j === void 0 ? void 0 : _j.paymentThreshold) && {
|
|
361
|
+
paymentThresholdSelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((_h = (_g = props.states) === null || _g === void 0 ? void 0 : _g.formState) === null || _h === void 0 ? void 0 : _h.paymentThreshold) || "" }, (((_j = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _j === void 0 ? void 0 : _j.paymentThreshold) && {
|
|
341
362
|
class: "error-input",
|
|
342
363
|
helpText: getValidationErrorMessage({
|
|
343
364
|
type: (_l = (_k = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _k === void 0 ? void 0 : _k.paymentThreshold) === null || _l === void 0 ? void 0 : _l.type,
|
|
344
365
|
label: props.text.paymentThresholdSelectLabel,
|
|
345
366
|
}),
|
|
346
367
|
})), props.states.thresholds.map((t) => (h("sl-menu-item", { value: t }, `${props.states.currency}${t}`))))),
|
|
347
|
-
paymentFixedDaySelectSlot: (h("sl-select", Object.assign({ required: true, label: props.text.paymentDaySelectLabel, value: ((_o = (_m = props.states) === null || _m === void 0 ? void 0 : _m.formState) === null || _o === void 0 ? void 0 : _o.paymentDay) || "", name: "/paymentDay", id: "paymentDay" }, (((_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.paymentDay) && {
|
|
368
|
+
paymentFixedDaySelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((_o = (_m = props.states) === null || _m === void 0 ? void 0 : _m.formState) === null || _o === void 0 ? void 0 : _o.paymentDay) || "", name: "/paymentDay", id: "paymentDay" }, (((_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.paymentDay) && {
|
|
348
369
|
class: "error-input",
|
|
349
370
|
helpText: getValidationErrorMessage({
|
|
350
371
|
type: (_r = (_q = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _q === void 0 ? void 0 : _q.paymentDay) === null || _r === void 0 ? void 0 : _r.type,
|
|
@@ -353,7 +374,7 @@ export class BankingInfoForm {
|
|
|
353
374
|
})),
|
|
354
375
|
h("sl-menu-item", { value: "1" }, props.text.paymentDayFirstOfMonthLabelText),
|
|
355
376
|
h("sl-menu-item", { value: "15" }, props.text.paymentDayFifteenthOfMonthLabelText))),
|
|
356
|
-
paypalInputSlot: (h("sl-input", Object.assign({ required: true, value: ((_t = (_s = props.states) === null || _s === void 0 ? void 0 : _s.formState) === null || _t === void 0 ? void 0 : _t.paypalEmailAddress) || "", label: props.text.payPalInputLabel, key: "paypalEmailAddress", name: "/paypalEmailAddress", id: "paypalEmailAddress", type: "text" }, (((_w = (_v = (_u = props.states.formState) === null || _u === void 0 ? void 0 : _u.errors) === null || _v === void 0 ? void 0 : _v.inputErrors) === null || _w === void 0 ? void 0 : _w.paypalEmailAddress) && {
|
|
377
|
+
paypalInputSlot: (h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((_t = (_s = props.states) === null || _s === void 0 ? void 0 : _s.formState) === null || _t === void 0 ? void 0 : _t.paypalEmailAddress) || "", label: props.text.payPalInputLabel, key: "paypalEmailAddress", name: "/paypalEmailAddress", id: "paypalEmailAddress", type: "text" }, (((_w = (_v = (_u = props.states.formState) === null || _u === void 0 ? void 0 : _u.errors) === null || _v === void 0 ? void 0 : _v.inputErrors) === null || _w === void 0 ? void 0 : _w.paypalEmailAddress) && {
|
|
357
378
|
class: "error-input",
|
|
358
379
|
helpText: getValidationErrorMessage({
|
|
359
380
|
type: (_0 = (_z = (_y = (_x = props.states.formState) === null || _x === void 0 ? void 0 : _x.errors) === null || _y === void 0 ? void 0 : _y.inputErrors) === null || _z === void 0 ? void 0 : _z.paypalEmailAddress) === null || _0 === void 0 ? void 0 : _0.type,
|
|
@@ -1500,7 +1521,7 @@ export class BankingInfoForm {
|
|
|
1500
1521
|
"mutable": false,
|
|
1501
1522
|
"complexType": {
|
|
1502
1523
|
"original": "DemoData<BankingInfoFormViewProps>",
|
|
1503
|
-
"resolved": "{ states?: { showVerification: boolean; step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { countryCode: string; displayName: string; }[]; allCountries?: { countryCode: string; displayName: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; countrySearch?: string; }; slots?: { formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
|
|
1524
|
+
"resolved": "{ states?: { showVerification: boolean; step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { countryCode: string; displayName: string; }[]; allCountries?: { countryCode: string; displayName: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; countrySearch?: string; }; slots?: { verificationDialogSlot?: VNode; formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
|
|
1504
1525
|
"references": {
|
|
1505
1526
|
"DemoData": {
|
|
1506
1527
|
"location": "import",
|
|
@@ -1611,6 +1632,7 @@ function useDemoBankingInfoForm(props) {
|
|
|
1611
1632
|
hasPayPal: true,
|
|
1612
1633
|
},
|
|
1613
1634
|
callbacks: {
|
|
1635
|
+
onVerificationHide: () => { },
|
|
1614
1636
|
onSubmit: async () => {
|
|
1615
1637
|
setStep("/dashboard");
|
|
1616
1638
|
},
|
|
@@ -5,6 +5,7 @@ import JSONPointer from "jsonpointer";
|
|
|
5
5
|
import { intl } from "../../../global/global";
|
|
6
6
|
import { FINANCE_NETWORK_SETTINGS_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
|
|
7
7
|
import { VERIFICATION_EVENT_KEY } from "../../sqm-widget-verification/keys";
|
|
8
|
+
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
8
9
|
// Hardcoded in Impact backend
|
|
9
10
|
export const paypalFeeMap = {
|
|
10
11
|
USD: "USD20.00",
|
|
@@ -244,6 +245,8 @@ export function useBankingInfoForm(props) {
|
|
|
244
245
|
});
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
248
|
+
// Fire form change event
|
|
249
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
247
250
|
await refetch();
|
|
248
251
|
setStep("/dashboard");
|
|
249
252
|
}
|
|
@@ -286,7 +289,8 @@ export function useBankingInfoForm(props) {
|
|
|
286
289
|
});
|
|
287
290
|
setShowVerification(false);
|
|
288
291
|
}
|
|
289
|
-
|
|
292
|
+
if (token)
|
|
293
|
+
await runMutation(formData, token);
|
|
290
294
|
};
|
|
291
295
|
const onVerification = async (token) => {
|
|
292
296
|
host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
|
|
@@ -319,6 +323,7 @@ export function useBankingInfoForm(props) {
|
|
|
319
323
|
onBack: () => setStep("/dashboard"),
|
|
320
324
|
setCountrySearch,
|
|
321
325
|
onVerification,
|
|
326
|
+
onVerificationHide: () => onVerification(null),
|
|
322
327
|
},
|
|
323
328
|
states: {
|
|
324
329
|
showVerification,
|
|
@@ -3,6 +3,7 @@ import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
4
|
import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
|
|
5
5
|
import { taxTypeToName, validTaxDocument } from "../utils";
|
|
6
|
+
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
6
7
|
const GET_TAX_DOCUMENT = gql `
|
|
7
8
|
mutation createImpactPublisherTaxDocument(
|
|
8
9
|
$vars: CreateImpactPublisherTaxDocumentInput!
|
|
@@ -101,6 +102,8 @@ export function useDocusignForm(props) {
|
|
|
101
102
|
// @ts-expect-error: no data type for result
|
|
102
103
|
if (!result.completeImpactPublisherTaxDocument.success)
|
|
103
104
|
throw new Error();
|
|
105
|
+
// Fire form change event
|
|
106
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
104
107
|
setShowExitButton(true);
|
|
105
108
|
}
|
|
106
109
|
catch (e) {
|
|
@@ -5,6 +5,7 @@ import JSONPointer from "jsonpointer";
|
|
|
5
5
|
import { COUNTRIES_QUERY_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
|
|
6
6
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
7
7
|
import { getCountryObj, validTaxDocument } from "../utils";
|
|
8
|
+
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
8
9
|
const CONNECT_PARTNER = gql `
|
|
9
10
|
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
10
11
|
createImpactConnection(impactConnectionInput: $vars) {
|
|
@@ -169,6 +170,8 @@ export function useIndirectTaxForm(props) {
|
|
|
169
170
|
const resultPublisher = (_e = (_d = (_c = result
|
|
170
171
|
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
171
172
|
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
173
|
+
// Fire form change event
|
|
174
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
172
175
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
173
176
|
!hasValidCurrentDocument) {
|
|
174
177
|
// Go to docusign form
|
package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js
CHANGED
|
@@ -9,13 +9,6 @@ export const Loading = () => {
|
|
|
9
9
|
},
|
|
10
10
|
} }));
|
|
11
11
|
};
|
|
12
|
-
export const Error = () => {
|
|
13
|
-
return (h("sqm-payout-details-card", { demoData: {
|
|
14
|
-
states: {
|
|
15
|
-
error: true,
|
|
16
|
-
},
|
|
17
|
-
} }));
|
|
18
|
-
};
|
|
19
12
|
export const NextPayout = () => {
|
|
20
13
|
return (h("sqm-payout-details-card", { demoData: {
|
|
21
14
|
states: {
|
|
@@ -166,11 +166,6 @@ export function PayoutDetailsCardView(props) {
|
|
|
166
166
|
});
|
|
167
167
|
return (h("div", { class: classes.Container },
|
|
168
168
|
h("style", { type: "text/css" }, styleString),
|
|
169
|
-
states.error && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", class: classes.Alert, type: "warning", open: true },
|
|
170
|
-
h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
|
|
171
|
-
h("div", { class: classes.AlertContent },
|
|
172
|
-
h("b", null, text.error.errorTitleText),
|
|
173
|
-
text.error.errorDescriptionText))),
|
|
174
169
|
states.loading ? (renderLoadingSkeleton()) : (h("div", { class: classes.CardContainer },
|
|
175
170
|
h("div", { class: classes.StatusContainer },
|
|
176
171
|
h("p", { class: classes.SubduedRegularText }, states.badgeStatus === "thresholdPayout"
|