@saasquatch/mint-components 1.12.0-9 → 1.12.1-1
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-040cffad.js → ShadowViewAddon-88821c64.js} +3 -6
- 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 +79 -202
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +160 -281
- package/dist/cjs/{sqm-invoice-table-view-c58966f8.js → sqm-invoice-table-view-a9133a11.js} +0 -98
- package/dist/cjs/sqm-portal-registration-form-view-621348a6.js +85 -0
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +12 -81
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +323 -334
- package/dist/collection/collection-manifest.json +1 -6
- package/dist/collection/components/sqm-big-stat/useBigStat.js +3 -6
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +5 -5
- package/dist/collection/components/sqm-marketing-emails-checkbox/MarketingEmailsCheckbox.stories.js +11 -0
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +160 -0
- package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +5 -1
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +1 -1
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +3 -2
- package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +6 -0
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -8
- package/dist/collection/components/tax-and-cash/BankingForm.stories.js +0 -2
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -96
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +1 -5
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +38 -101
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +2 -15
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +0 -7
- 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 +0 -22
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +9 -99
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +1 -8
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +11 -14
- package/dist/esm/{ShadowViewAddon-69b61037.js → ShadowViewAddon-65c8679e.js} +3 -6
- 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 +79 -202
- package/dist/esm/sqm-big-stat_39.entry.js +159 -280
- package/dist/esm/{sqm-invoice-table-view-d1cfdaf4.js → sqm-invoice-table-view-71915a5e.js} +0 -98
- package/dist/esm/sqm-portal-registration-form-view-1d3066e1.js +83 -0
- package/dist/esm/sqm-portal-registration-form.entry.js +18 -87
- package/dist/esm/sqm-stencilbook.entry.js +323 -334
- package/dist/esm/stencil-hooks.module-ac12ca1c.js +1 -1
- package/dist/esm-es5/ShadowViewAddon-65c8679e.js +1 -0
- 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-invoice-table-view-71915a5e.js +1 -0
- package/dist/esm-es5/sqm-portal-registration-form-view-1d3066e1.js +1 -0
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/stencil-hooks.module-ac12ca1c.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-1279f7a3.system.entry.js +1 -0
- package/dist/mint-components/p-15a64357.entry.js +13 -0
- package/dist/mint-components/p-17f56865.entry.js +9 -0
- package/dist/mint-components/p-2a414b2e.system.js +2 -2
- package/dist/mint-components/p-3cb18382.system.js +1 -0
- package/dist/mint-components/p-40b1de58.js +1 -0
- package/dist/mint-components/p-4112e198.system.js +1 -0
- package/dist/mint-components/p-5cd917db.js +1 -0
- package/dist/mint-components/p-6792c8d8.system.entry.js +1 -0
- package/dist/mint-components/p-a02afa72.system.js +1 -0
- package/dist/mint-components/p-acd77a6e.entry.js +223 -0
- package/dist/mint-components/p-b3e97f8a.system.entry.js +1 -0
- package/dist/mint-components/{p-9eae245f.js → p-b651706a.js} +3 -6
- package/dist/mint-components/p-b8233366.entry.js +174 -0
- package/dist/mint-components/p-ca809fdd.system.js +1 -1
- package/dist/mint-components/p-cb38b9b0.system.entry.js +1 -0
- package/dist/mint-components/p-fd2c5407.js +2 -2
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field-view.d.ts +1 -1
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +4 -4
- package/dist/types/components/sqm-marketing-emails-checkbox/MarketingEmailsCheckbox.stories.d.ts +8 -0
- package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +34 -0
- package/dist/types/components/sqm-portal-registration-form/PortalRegistrationForm.stories.d.ts +1 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form.d.ts +1 -1
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +0 -6
- 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 +0 -12
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +2 -19
- package/dist/types/components.d.ts +108 -625
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/extractProps-fd93ba62.js +0 -21
- package/dist/cjs/keys-cff24974.js +0 -11
- package/dist/cjs/sqm-code-verification.cjs.entry.js +0 -342
- package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -283
- package/dist/cjs/sqm-scroll.cjs.entry.js +0 -109
- package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +0 -103
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -210
- package/dist/cjs/usePayoutStatus-b9fb7399.js +0 -70
- package/dist/cjs/useVerificationEmail-6aacdb71.js +0 -169
- package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +0 -8
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +0 -23
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +0 -118
- package/dist/collection/components/sqm-payout-button-scroll/usePayoutButton.js +0 -44
- package/dist/collection/components/sqm-widget-verification/keys.js +0 -4
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +0 -36
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +0 -128
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +0 -301
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +0 -153
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +0 -42
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +0 -91
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +0 -226
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +0 -126
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +0 -339
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +0 -557
- package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +0 -165
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +0 -22
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +0 -131
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -354
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +0 -65
- package/dist/esm/extractProps-ae1afbb3.js +0 -19
- package/dist/esm/keys-db1897ae.js +0 -6
- package/dist/esm/sqm-code-verification.entry.js +0 -338
- package/dist/esm/sqm-email-verification.entry.js +0 -279
- package/dist/esm/sqm-scroll.entry.js +0 -105
- package/dist/esm/sqm-widget-verification-internal.entry.js +0 -99
- package/dist/esm/sqm-widget-verification.entry.js +0 -206
- package/dist/esm/usePayoutStatus-1a635054.js +0 -67
- package/dist/esm/useVerificationEmail-c32696ba.js +0 -167
- package/dist/esm-es5/ShadowViewAddon-69b61037.js +0 -1
- package/dist/esm-es5/extractProps-ae1afbb3.js +0 -1
- package/dist/esm-es5/keys-db1897ae.js +0 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +0 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +0 -1
- package/dist/esm-es5/sqm-scroll.entry.js +0 -1
- package/dist/esm-es5/sqm-widget-verification-internal.entry.js +0 -1
- package/dist/esm-es5/sqm-widget-verification.entry.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-1712a9fd.entry.js +0 -11
- package/dist/mint-components/p-1e616d45.system.js +0 -1
- package/dist/mint-components/p-24092973.entry.js +0 -9
- package/dist/mint-components/p-26468242.js +0 -1
- package/dist/mint-components/p-331d060e.entry.js +0 -223
- package/dist/mint-components/p-3925bcd6.entry.js +0 -13
- package/dist/mint-components/p-39840341.js +0 -1
- 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-5a23b560.system.entry.js +0 -1
- package/dist/mint-components/p-64491210.system.entry.js +0 -1
- 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-9596e97c.system.entry.js +0 -1
- package/dist/mint-components/p-974070c4.system.entry.js +0 -1
- package/dist/mint-components/p-a85f57bb.entry.js +0 -1
- package/dist/mint-components/p-a8645c1b.system.js +0 -1
- package/dist/mint-components/p-b2a99637.system.js +0 -1
- package/dist/mint-components/p-b62faaa5.system.entry.js +0 -1
- package/dist/mint-components/p-c05e7b9f.entry.js +0 -195
- package/dist/mint-components/p-c510fb88.entry.js +0 -1
- package/dist/mint-components/p-c7057066.system.entry.js +0 -1
- package/dist/mint-components/p-d7806f31.js +0 -48
- package/dist/mint-components/p-e01ac27c.system.js +0 -1
- package/dist/mint-components/p-e45a8501.system.entry.js +0 -1
- package/dist/mint-components/p-e990dc21.system.js +0 -1
- package/dist/mint-components/p-ead27698.system.entry.js +0 -1
- package/dist/mint-components/p-f340214f.entry.js +0 -25
- package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +0 -5
- package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.d.ts +0 -10
- package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll.d.ts +0 -26
- package/dist/types/components/sqm-payout-button-scroll/usePayoutButton.d.ts +0 -7
- package/dist/types/components/sqm-widget-verification/keys.d.ts +0 -4
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +0 -9
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +0 -26
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +0 -54
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +0 -25
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.d.ts +0 -10
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +0 -21
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +0 -40
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +0 -10
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +0 -20
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +0 -87
- package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +0 -14
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +0 -10
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -30
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -62
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +0 -21
package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js
DELETED
|
@@ -1,339 +0,0 @@
|
|
|
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
|
-
}
|
|
58
|
-
export class WidgetVerificationInternal {
|
|
59
|
-
constructor() {
|
|
60
|
-
withHooks(this);
|
|
61
|
-
}
|
|
62
|
-
disconnectedCallback() { }
|
|
63
|
-
getStepTextProps(prefix) {
|
|
64
|
-
const props = getProps(this);
|
|
65
|
-
return extractProps(props, prefix);
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
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
|
-
// }
|
|
77
|
-
if (showCode) {
|
|
78
|
-
return (h("sqm-code-verification", Object.assign({ onVerification: onVerification }, this.getStepTextProps("codeStep_"))));
|
|
79
|
-
}
|
|
80
|
-
return (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"))));
|
|
81
|
-
}
|
|
82
|
-
static get is() { return "sqm-widget-verification-internal"; }
|
|
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 };
|
|
339
|
-
}
|