@saasquatch/mint-components 1.12.0-1 → 1.12.0-10
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/{ShadowViewAddon-88821c64.js → ShadowViewAddon-040cffad.js} +6 -3
- package/dist/cjs/extractProps-fd93ba62.js +21 -0
- 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 +91 -72
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +128 -63
- package/dist/cjs/sqm-code-verification.cjs.entry.js +67 -77
- package/dist/cjs/sqm-email-verification.cjs.entry.js +158 -12
- package/dist/cjs/{sqm-invoice-table-view-ce9a34ac.js → sqm-invoice-table-view-c58966f8.js} +79 -0
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +56 -14
- package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +81 -11
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +102 -19
- package/dist/cjs/usePayoutStatus-b9fb7399.js +70 -0
- package/dist/cjs/useVerificationEmail-6aacdb71.js +169 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sqm-big-stat/useBigStat.js +6 -3
- package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -2
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -0
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +16 -3
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +9 -2
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +20 -10
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +34 -63
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +38 -29
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +23 -3
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +17 -4
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +65 -11
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +76 -20
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +327 -15
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +447 -22
- package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +165 -0
- package/dist/collection/components/tax-and-cash/BankingForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +78 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +7 -0
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +10 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +72 -13
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +146 -9
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +30 -15
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +6 -0
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +8 -8
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +22 -16
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +99 -88
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +8 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +16 -11
- package/dist/esm/{ShadowViewAddon-65c8679e.js → ShadowViewAddon-69b61037.js} +6 -3
- package/dist/esm/extractProps-ae1afbb3.js +19 -0
- package/dist/esm/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
- 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 +91 -72
- package/dist/esm/sqm-big-stat_39.entry.js +127 -62
- package/dist/esm/sqm-code-verification.entry.js +69 -79
- package/dist/esm/sqm-email-verification.entry.js +159 -13
- package/dist/esm/{sqm-invoice-table-view-08c03ba7.js → sqm-invoice-table-view-d1cfdaf4.js} +79 -0
- package/dist/esm/sqm-stencilbook.entry.js +56 -14
- package/dist/esm/sqm-widget-verification-internal.entry.js +84 -14
- package/dist/esm/sqm-widget-verification.entry.js +104 -21
- package/dist/esm/usePayoutStatus-1a635054.js +67 -0
- package/dist/esm/useVerificationEmail-c32696ba.js +167 -0
- package/dist/esm-es5/ShadowViewAddon-69b61037.js +1 -0
- package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
- package/dist/esm-es5/{keys-a1496e39.js → keys-db1897ae.js} +1 -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-d1cfdaf4.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/sqm-widget-verification.entry.js +1 -1
- package/dist/esm-es5/usePayoutStatus-1a635054.js +1 -0
- package/dist/esm-es5/useVerificationEmail-c32696ba.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-15c7a1d2.system.entry.js +1 -0
- package/dist/mint-components/p-1712a9fd.entry.js +11 -0
- package/dist/mint-components/p-1e616d45.system.js +1 -0
- package/dist/mint-components/{p-721a89c6.entry.js → p-24092973.entry.js} +2 -2
- package/dist/mint-components/p-26468242.js +1 -0
- package/dist/mint-components/p-331d060e.entry.js +223 -0
- package/dist/mint-components/p-39840341.js +1 -0
- package/dist/mint-components/p-4364001c.entry.js +12 -0
- package/dist/mint-components/p-4bd7a472.js +1 -0
- package/dist/mint-components/p-517224ef.js +19 -0
- package/dist/mint-components/p-5a23b560.system.entry.js +1 -0
- package/dist/mint-components/p-8300d8c8.system.js +1 -0
- package/dist/mint-components/p-8bddb468.system.entry.js +1 -0
- package/dist/mint-components/p-9596e97c.system.entry.js +1 -0
- package/dist/mint-components/p-974070c4.system.entry.js +1 -0
- package/dist/mint-components/{p-b651706a.js → p-9eae245f.js} +6 -3
- package/dist/mint-components/p-a8645c1b.system.js +1 -0
- package/dist/mint-components/p-b2a99637.system.js +1 -0
- package/dist/mint-components/{p-66a04cca.system.entry.js → p-b62faaa5.system.entry.js} +1 -1
- package/dist/mint-components/p-c41e1df8.entry.js +195 -0
- package/dist/mint-components/p-c510fb88.entry.js +1 -0
- package/dist/mint-components/p-ca809fdd.system.js +1 -1
- package/dist/mint-components/p-d7806f31.js +48 -0
- package/dist/mint-components/p-e01ac27c.system.js +1 -0
- package/dist/mint-components/p-e45a8501.system.entry.js +1 -0
- package/dist/mint-components/p-e990dc21.system.js +1 -0
- package/dist/mint-components/p-f340214f.entry.js +25 -0
- package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +0 -1
- package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll.d.ts +7 -0
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +3 -3
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +4 -10
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +2 -0
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.d.ts +4 -1
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +6 -1
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +10 -2
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +3 -2
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +15 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +79 -0
- package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +14 -0
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +41 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +6 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +10 -3
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +19 -18
- package/dist/types/components.d.ts +366 -92
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/useEmailVerification-30a1c7f6.js +0 -75
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +0 -3
- package/dist/esm/useEmailVerification-7135732c.js +0 -72
- package/dist/esm-es5/ShadowViewAddon-65c8679e.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-08c03ba7.js +0 -1
- package/dist/esm-es5/useEmailVerification-7135732c.js +0 -1
- package/dist/mint-components/p-117b4705.system.js +0 -1
- package/dist/mint-components/p-1bd0cda8.system.entry.js +0 -1
- package/dist/mint-components/p-1ee62d9f.system.entry.js +0 -1
- package/dist/mint-components/p-1f9a9b70.system.entry.js +0 -1
- package/dist/mint-components/p-23fdd44e.entry.js +0 -1
- package/dist/mint-components/p-36f7caec.system.entry.js +0 -1
- package/dist/mint-components/p-39397731.entry.js +0 -1
- package/dist/mint-components/p-39af4acd.entry.js +0 -240
- package/dist/mint-components/p-4c9b6fbe.system.js +0 -1
- package/dist/mint-components/p-65e2c043.system.js +0 -1
- package/dist/mint-components/p-663303b7.entry.js +0 -8
- package/dist/mint-components/p-6cae44d7.js +0 -1
- package/dist/mint-components/p-7f5c7bf7.system.entry.js +0 -1
- package/dist/mint-components/p-8a337864.js +0 -7
- package/dist/mint-components/p-a02afa72.system.js +0 -1
- package/dist/mint-components/p-a5a9aa07.entry.js +0 -189
- package/dist/mint-components/p-c763c0b2.js +0 -1
- package/dist/mint-components/p-e93e5740.entry.js +0 -1
- package/dist/mint-components/p-e9ca48fc.system.entry.js +0 -1
- package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -1
package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js
CHANGED
|
@@ -1,27 +1,339 @@
|
|
|
1
|
-
import { useParentState, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
|
-
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
|
-
import { Component, h } from "@stencil/core";
|
|
4
|
-
import { SHOW_CODE_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE } from "./keys";
|
|
1
|
+
import { isDemo, useLazyQuery, useParentState, useSetParent, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
|
+
import { useState, withHooks } from "@saasquatch/stencil-hooks";
|
|
3
|
+
import { Component, h, Prop } from "@stencil/core";
|
|
4
|
+
import { SHOW_CODE_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE, VERIFICATION_PARENT_NAMESPACE, } from "./keys";
|
|
5
|
+
import { getProps } from "../../utils/utils";
|
|
6
|
+
import { extractProps } from "../tax-and-cash/sqm-tax-and-cash/extractProps";
|
|
7
|
+
import { gql } from "graphql-request";
|
|
8
|
+
import { useEffect } from "@saasquatch/universal-hooks";
|
|
9
|
+
const USER_LOOKUP = gql `
|
|
10
|
+
query checkUserVerification {
|
|
11
|
+
viewer {
|
|
12
|
+
... on User {
|
|
13
|
+
id
|
|
14
|
+
accountId
|
|
15
|
+
email
|
|
16
|
+
emailVerified
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
function useWidgetVerificationInternal() {
|
|
22
|
+
const userIdentity = useUserIdentity();
|
|
23
|
+
const [showCode, setShowCode] = useParentState({
|
|
24
|
+
namespace: SHOW_CODE_NAMESPACE,
|
|
25
|
+
initialValue: false,
|
|
26
|
+
});
|
|
27
|
+
const [email, setEmail] = useParentState({
|
|
28
|
+
namespace: VERIFICATION_EMAIL_NAMESPACE,
|
|
29
|
+
initialValue: userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.email,
|
|
30
|
+
});
|
|
31
|
+
const setContext = useSetParent(VERIFICATION_PARENT_NAMESPACE);
|
|
32
|
+
const [loading, setLoading] = useState(true);
|
|
33
|
+
const [fetch] = useLazyQuery(USER_LOOKUP);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
const checkUser = async () => {
|
|
36
|
+
var _a;
|
|
37
|
+
try {
|
|
38
|
+
const res = await fetch({});
|
|
39
|
+
if (!res || res instanceof Error)
|
|
40
|
+
throw new Error();
|
|
41
|
+
if ((_a = res === null || res === void 0 ? void 0 : res.viewer) === null || _a === void 0 ? void 0 : _a.emailVerified)
|
|
42
|
+
setContext(true);
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
console.error("Could not fetch user information:", e);
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
setLoading(false);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
checkUser();
|
|
52
|
+
}, []);
|
|
53
|
+
const onVerification = () => {
|
|
54
|
+
setContext(true);
|
|
55
|
+
};
|
|
56
|
+
return { showCode, onVerification, loading };
|
|
57
|
+
}
|
|
5
58
|
export class WidgetVerificationInternal {
|
|
6
59
|
constructor() {
|
|
7
60
|
withHooks(this);
|
|
8
61
|
}
|
|
9
62
|
disconnectedCallback() { }
|
|
63
|
+
getStepTextProps(prefix) {
|
|
64
|
+
const props = getProps(this);
|
|
65
|
+
return extractProps(props, prefix);
|
|
66
|
+
}
|
|
10
67
|
render() {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
68
|
+
const { showCode, onVerification, loading } = isDemo()
|
|
69
|
+
? useDemoWidgetVerificationInternal()
|
|
70
|
+
: useWidgetVerificationInternal();
|
|
71
|
+
// TODO: Shoelace spinner is throwing errors
|
|
72
|
+
if (loading)
|
|
73
|
+
return h("div", null);
|
|
74
|
+
// if (loading) {
|
|
75
|
+
// return <sl-spinner style="font-size: 2rem;"></sl-spinner>;
|
|
76
|
+
// }
|
|
20
77
|
if (showCode) {
|
|
21
|
-
return h("sqm-code-verification",
|
|
78
|
+
return (h("sqm-code-verification", Object.assign({ onVerification: onVerification }, this.getStepTextProps("codeStep_"))));
|
|
22
79
|
}
|
|
23
|
-
return h("sqm-email-verification",
|
|
80
|
+
return (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"))));
|
|
24
81
|
}
|
|
25
82
|
static get is() { return "sqm-widget-verification-internal"; }
|
|
26
83
|
static get encapsulation() { return "shadow"; }
|
|
84
|
+
static get properties() { return {
|
|
85
|
+
"emailStep_verifyEmailHeaderText": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"mutable": false,
|
|
88
|
+
"complexType": {
|
|
89
|
+
"original": "string",
|
|
90
|
+
"resolved": "string",
|
|
91
|
+
"references": {}
|
|
92
|
+
},
|
|
93
|
+
"required": false,
|
|
94
|
+
"optional": false,
|
|
95
|
+
"docs": {
|
|
96
|
+
"tags": [],
|
|
97
|
+
"text": ""
|
|
98
|
+
},
|
|
99
|
+
"attribute": "email-step_verify-email-header-text",
|
|
100
|
+
"reflect": false
|
|
101
|
+
},
|
|
102
|
+
"emailStep_sendCodeErrorHeader": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "string",
|
|
107
|
+
"resolved": "string",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": ""
|
|
115
|
+
},
|
|
116
|
+
"attribute": "email-step_send-code-error-header",
|
|
117
|
+
"reflect": false
|
|
118
|
+
},
|
|
119
|
+
"emailStep_sendCodeErrorDescription": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "string",
|
|
124
|
+
"resolved": "string",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": ""
|
|
132
|
+
},
|
|
133
|
+
"attribute": "email-step_send-code-error-description",
|
|
134
|
+
"reflect": false
|
|
135
|
+
},
|
|
136
|
+
"emailStep_emailLabel": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "string",
|
|
141
|
+
"resolved": "string",
|
|
142
|
+
"references": {}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": ""
|
|
149
|
+
},
|
|
150
|
+
"attribute": "email-step_email-label",
|
|
151
|
+
"reflect": false
|
|
152
|
+
},
|
|
153
|
+
"emailStep_sendCodeText": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string",
|
|
158
|
+
"resolved": "string",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": ""
|
|
166
|
+
},
|
|
167
|
+
"attribute": "email-step_send-code-text",
|
|
168
|
+
"reflect": false
|
|
169
|
+
},
|
|
170
|
+
"emailStep_emailValidationErrorText": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "string",
|
|
175
|
+
"resolved": "string",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": ""
|
|
183
|
+
},
|
|
184
|
+
"attribute": "email-step_email-validation-error-text",
|
|
185
|
+
"reflect": false
|
|
186
|
+
},
|
|
187
|
+
"codeStep_verifyCodeHeaderText": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"mutable": false,
|
|
190
|
+
"complexType": {
|
|
191
|
+
"original": "string",
|
|
192
|
+
"resolved": "string",
|
|
193
|
+
"references": {}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": false,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": ""
|
|
200
|
+
},
|
|
201
|
+
"attribute": "code-step_verify-code-header-text",
|
|
202
|
+
"reflect": false
|
|
203
|
+
},
|
|
204
|
+
"codeStep_reverifyCodeHeaderText": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"mutable": false,
|
|
207
|
+
"complexType": {
|
|
208
|
+
"original": "string",
|
|
209
|
+
"resolved": "string",
|
|
210
|
+
"references": {}
|
|
211
|
+
},
|
|
212
|
+
"required": false,
|
|
213
|
+
"optional": false,
|
|
214
|
+
"docs": {
|
|
215
|
+
"tags": [],
|
|
216
|
+
"text": ""
|
|
217
|
+
},
|
|
218
|
+
"attribute": "code-step_reverify-code-header-text",
|
|
219
|
+
"reflect": false
|
|
220
|
+
},
|
|
221
|
+
"codeStep_resendCodeText": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"mutable": false,
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "string",
|
|
226
|
+
"resolved": "string",
|
|
227
|
+
"references": {}
|
|
228
|
+
},
|
|
229
|
+
"required": false,
|
|
230
|
+
"optional": false,
|
|
231
|
+
"docs": {
|
|
232
|
+
"tags": [],
|
|
233
|
+
"text": ""
|
|
234
|
+
},
|
|
235
|
+
"attribute": "code-step_resend-code-text",
|
|
236
|
+
"reflect": false
|
|
237
|
+
},
|
|
238
|
+
"codeStep_resendCodeLabel": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "string",
|
|
243
|
+
"resolved": "string",
|
|
244
|
+
"references": {}
|
|
245
|
+
},
|
|
246
|
+
"required": false,
|
|
247
|
+
"optional": false,
|
|
248
|
+
"docs": {
|
|
249
|
+
"tags": [],
|
|
250
|
+
"text": ""
|
|
251
|
+
},
|
|
252
|
+
"attribute": "code-step_resend-code-label",
|
|
253
|
+
"reflect": false
|
|
254
|
+
},
|
|
255
|
+
"codeStep_codeResentSuccessfullyText": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"mutable": false,
|
|
258
|
+
"complexType": {
|
|
259
|
+
"original": "string",
|
|
260
|
+
"resolved": "string",
|
|
261
|
+
"references": {}
|
|
262
|
+
},
|
|
263
|
+
"required": false,
|
|
264
|
+
"optional": false,
|
|
265
|
+
"docs": {
|
|
266
|
+
"tags": [],
|
|
267
|
+
"text": ""
|
|
268
|
+
},
|
|
269
|
+
"attribute": "code-step_code-resent-successfully-text",
|
|
270
|
+
"reflect": false
|
|
271
|
+
},
|
|
272
|
+
"codeStep_invalidCodeText": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"mutable": false,
|
|
275
|
+
"complexType": {
|
|
276
|
+
"original": "string",
|
|
277
|
+
"resolved": "string",
|
|
278
|
+
"references": {}
|
|
279
|
+
},
|
|
280
|
+
"required": false,
|
|
281
|
+
"optional": false,
|
|
282
|
+
"docs": {
|
|
283
|
+
"tags": [],
|
|
284
|
+
"text": ""
|
|
285
|
+
},
|
|
286
|
+
"attribute": "code-step_invalid-code-text",
|
|
287
|
+
"reflect": false
|
|
288
|
+
},
|
|
289
|
+
"codeStep_verifyText": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"mutable": false,
|
|
292
|
+
"complexType": {
|
|
293
|
+
"original": "string",
|
|
294
|
+
"resolved": "string",
|
|
295
|
+
"references": {}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [],
|
|
301
|
+
"text": ""
|
|
302
|
+
},
|
|
303
|
+
"attribute": "code-step_verify-text",
|
|
304
|
+
"reflect": false
|
|
305
|
+
},
|
|
306
|
+
"codeStep_networkErrorMessage": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"mutable": false,
|
|
309
|
+
"complexType": {
|
|
310
|
+
"original": "string",
|
|
311
|
+
"resolved": "string",
|
|
312
|
+
"references": {}
|
|
313
|
+
},
|
|
314
|
+
"required": false,
|
|
315
|
+
"optional": false,
|
|
316
|
+
"docs": {
|
|
317
|
+
"tags": [],
|
|
318
|
+
"text": ""
|
|
319
|
+
},
|
|
320
|
+
"attribute": "code-step_network-error-message",
|
|
321
|
+
"reflect": false
|
|
322
|
+
}
|
|
323
|
+
}; }
|
|
324
|
+
}
|
|
325
|
+
function useDemoWidgetVerificationInternal() {
|
|
326
|
+
const [showCode, setShowCode] = useParentState({
|
|
327
|
+
namespace: SHOW_CODE_NAMESPACE,
|
|
328
|
+
initialValue: false,
|
|
329
|
+
});
|
|
330
|
+
const [email, setEmail] = useParentState({
|
|
331
|
+
namespace: VERIFICATION_EMAIL_NAMESPACE,
|
|
332
|
+
initialValue: undefined,
|
|
333
|
+
});
|
|
334
|
+
const setContext = useSetParent(VERIFICATION_PARENT_NAMESPACE);
|
|
335
|
+
const onVerification = () => {
|
|
336
|
+
setContext(true);
|
|
337
|
+
};
|
|
338
|
+
return { showCode, onVerification, loading: false };
|
|
27
339
|
}
|