@incodetech/welcome 1.85.0-20251120160251.0 → 1.85.0-20251121102600.0
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/incode-welcome/src/create.d.ts +2 -1
- package/dist/incode-welcome/src/flow/Flow.d.ts +2 -1
- package/dist/incode-welcome/src/flow/executeFlow.d.ts +2 -1
- package/dist/incode-welcome/src/flow/modules/Authentication.d.ts +1 -1
- package/dist/incode-welcome/src/flow/modules/index.d.ts +2 -1
- package/dist/incode-welcome/src/flow/modules/types.d.ts +1 -0
- package/dist/incode-welcome/src/redirect/FlowRedirect.d.ts +1 -0
- package/dist/incode-welcome/src/workflows/modules/RedirectToMobile.d.ts +2 -1
- package/dist/onBoarding.mjs +67 -55
- package/dist/onBoarding.umd.js +5 -5
- package/package.json +1 -1
|
@@ -537,7 +537,7 @@ tokboxApiKey, darkMode, hostingApp, unsafeMode, customHeaders, fingerprintApiKey
|
|
|
537
537
|
getPhone: typeof getPhone;
|
|
538
538
|
renderCaptureFace: typeof renderCaptureFace;
|
|
539
539
|
renderAuthFace: typeof renderAuthFace;
|
|
540
|
-
executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, }: {
|
|
540
|
+
executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, authHint, }: {
|
|
541
541
|
element: HTMLElement;
|
|
542
542
|
token: string;
|
|
543
543
|
onSuccess: ({ redirectionUrl }: {
|
|
@@ -548,6 +548,7 @@ tokboxApiKey, darkMode, hostingApp, unsafeMode, customHeaders, fingerprintApiKey
|
|
|
548
548
|
flow?: import('.').Flow;
|
|
549
549
|
uiConfig?: import('./ui/types').UiConfig;
|
|
550
550
|
config?: import('./flow/Flow').FlowConfig;
|
|
551
|
+
authHint?: string;
|
|
551
552
|
}) => Promise<void>;
|
|
552
553
|
executeWorkflow: ({ element, token, workflowId, apiURL, customModuleCallback, onSuccess, onError, wfConfig, authHint, qrUuid, uuid, redirectUrl, clientId, showFinishScreen, skipDesktopRedirect, }: import('./workflows/executeWorkflow').WorkflowPropsWithToken | import('./workflows/executeWorkflow').WorkflowPropsWithoutToken) => Promise<void>;
|
|
553
554
|
getWorkflowConfig: ({ token }: {
|
|
@@ -17,5 +17,6 @@ type FlowRendererProps = {
|
|
|
17
17
|
flow?: Flow;
|
|
18
18
|
uiConfig?: UiConfig;
|
|
19
19
|
config?: FlowConfig;
|
|
20
|
+
authHint?: string;
|
|
20
21
|
};
|
|
21
|
-
export declare function FlowRenderer({ token, onError, onSuccess, onEvent, flow: flowFromProps, uiConfig, config, }: FlowRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function FlowRenderer({ token, onError, onSuccess, onEvent, flow: flowFromProps, uiConfig, config, authHint, }: FlowRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,6 +14,7 @@ type ExecuteFlowProps = {
|
|
|
14
14
|
flow?: Flow;
|
|
15
15
|
uiConfig?: UiConfig;
|
|
16
16
|
config?: FlowConfig;
|
|
17
|
+
authHint?: string;
|
|
17
18
|
};
|
|
18
|
-
declare const executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, }: ExecuteFlowProps) => Promise<void>;
|
|
19
|
+
declare const executeFlow: ({ element, token, onSuccess, onError, onEvent, flow, uiConfig, config, authHint, }: ExecuteFlowProps) => Promise<void>;
|
|
19
20
|
export default executeFlow;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FlowModuleConfig } from '../services/flowService';
|
|
2
2
|
import { ModuleProps } from './types';
|
|
3
3
|
|
|
4
|
-
export default function AuthenticationModule({ onSuccess, token, finishWithError, }: ModuleProps<FlowModuleConfig['AUTHENTICATION']>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default function AuthenticationModule({ onSuccess, token, finishWithError, authHint, }: ModuleProps<FlowModuleConfig['AUTHENTICATION']>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,7 @@ type ModuleRendererProps<K extends keyof FlowModuleConfig> = {
|
|
|
13
13
|
flow: Flow;
|
|
14
14
|
uiConfig?: UiConfig;
|
|
15
15
|
finishWithError: (err: FlowRendererError) => void;
|
|
16
|
+
authHint?: string;
|
|
16
17
|
};
|
|
17
|
-
declare function ModuleRenderer<K extends keyof FlowModuleConfig>({ module, onSuccess, emit, token, onError, flow, uiConfig, finishWithError, }: ModuleRendererProps<K>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ModuleRenderer<K extends keyof FlowModuleConfig>({ module, onSuccess, emit, token, onError, flow, uiConfig, finishWithError, authHint, }: ModuleRendererProps<K>): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export { ModuleRenderer };
|
|
@@ -16,6 +16,7 @@ type Props = {
|
|
|
16
16
|
qrPhishingResistance?: boolean;
|
|
17
17
|
url?: string;
|
|
18
18
|
showFinishScreen?: boolean;
|
|
19
|
+
authHint?: string;
|
|
19
20
|
};
|
|
20
|
-
declare const RedirectToMobile: ({ session, disableSmsOption, skipDesktopRedirect, allowSkipRedirect, expired, allowReEnrollment, displayOnboardingResultOnDesktop, qrPhishingResistance, url, showFinishScreen, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const RedirectToMobile: ({ session, disableSmsOption, skipDesktopRedirect, allowSkipRedirect, expired, allowReEnrollment, displayOnboardingResultOnDesktop, qrPhishingResistance, url, showFinishScreen, authHint, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export default RedirectToMobile;
|
package/dist/onBoarding.mjs
CHANGED
|
@@ -8374,7 +8374,7 @@ class MlWasmJSApi {
|
|
|
8374
8374
|
);
|
|
8375
8375
|
}
|
|
8376
8376
|
}
|
|
8377
|
-
const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-
|
|
8377
|
+
const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251121102600.0";
|
|
8378
8378
|
function e$2(Be, Le) {
|
|
8379
8379
|
return function(Ye, tt) {
|
|
8380
8380
|
return Object.prototype.hasOwnProperty.call(Ye, tt);
|
|
@@ -299482,7 +299482,8 @@ const FlowRedirect = ({
|
|
|
299482
299482
|
token: Le,
|
|
299483
299483
|
onSuccess: Ye,
|
|
299484
299484
|
onSkip: tt,
|
|
299485
|
-
mobileQrRedirectUrl: nt
|
|
299485
|
+
mobileQrRedirectUrl: nt,
|
|
299486
|
+
authHint: ft
|
|
299486
299487
|
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
299487
299488
|
Redirect,
|
|
299488
299489
|
{
|
|
@@ -299494,7 +299495,8 @@ const FlowRedirect = ({
|
|
|
299494
299495
|
allowSkipRedirect: Be.addContinueToDesktop,
|
|
299495
299496
|
expired: !1,
|
|
299496
299497
|
url: nt,
|
|
299497
|
-
qrPhishingResistance: Be.qrPhishingResistance
|
|
299498
|
+
qrPhishingResistance: Be.qrPhishingResistance,
|
|
299499
|
+
authHint: ft
|
|
299498
299500
|
}
|
|
299499
299501
|
), shouldShowFlowRedirect = (Be) => Be ? Be.redirectDesktopToMobile && mobile.isDesktop() : !1, useFlowRedirect = ({
|
|
299500
299502
|
flow: Be,
|
|
@@ -299853,9 +299855,9 @@ function AntifraudModule({
|
|
|
299853
299855
|
function AuthenticationModule({
|
|
299854
299856
|
onSuccess: Be,
|
|
299855
299857
|
token: Le,
|
|
299856
|
-
finishWithError: Ye
|
|
299858
|
+
finishWithError: Ye,
|
|
299859
|
+
authHint: tt
|
|
299857
299860
|
}) {
|
|
299858
|
-
const nt = new URLSearchParams(window.location.search).get("auth_hint");
|
|
299859
299861
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
299860
299862
|
AuthFace,
|
|
299861
299863
|
{
|
|
@@ -299867,7 +299869,7 @@ function AuthenticationModule({
|
|
|
299867
299869
|
});
|
|
299868
299870
|
},
|
|
299869
299871
|
session: { token: Le },
|
|
299870
|
-
authHint:
|
|
299872
|
+
authHint: tt
|
|
299871
299873
|
}
|
|
299872
299874
|
);
|
|
299873
299875
|
}
|
|
@@ -364812,11 +364814,12 @@ function ModuleRenderer({
|
|
|
364812
364814
|
onError: nt,
|
|
364813
364815
|
flow: ft,
|
|
364814
364816
|
uiConfig: ht,
|
|
364815
|
-
finishWithError: gt
|
|
364817
|
+
finishWithError: gt,
|
|
364818
|
+
authHint: At
|
|
364816
364819
|
}) {
|
|
364817
|
-
const
|
|
364820
|
+
const xt = moduleComponents[Be.key] || SkipModule;
|
|
364818
364821
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
364819
|
-
|
|
364822
|
+
xt,
|
|
364820
364823
|
{
|
|
364821
364824
|
config: Be.configuration,
|
|
364822
364825
|
onSuccess: Le,
|
|
@@ -364825,7 +364828,8 @@ function ModuleRenderer({
|
|
|
364825
364828
|
onError: nt,
|
|
364826
364829
|
flow: ft,
|
|
364827
364830
|
uiConfig: ht,
|
|
364828
|
-
finishWithError: gt
|
|
364831
|
+
finishWithError: gt,
|
|
364832
|
+
authHint: At
|
|
364829
364833
|
},
|
|
364830
364834
|
Be.key
|
|
364831
364835
|
);
|
|
@@ -364838,60 +364842,63 @@ function FlowRenderer({
|
|
|
364838
364842
|
},
|
|
364839
364843
|
flow: nt,
|
|
364840
364844
|
uiConfig: ft,
|
|
364841
|
-
config: ht
|
|
364845
|
+
config: ht,
|
|
364846
|
+
authHint: gt
|
|
364842
364847
|
}) {
|
|
364843
|
-
const { flow:
|
|
364844
|
-
flow:
|
|
364848
|
+
const { flow: At, loading: xt, error: Et } = useFlow(Be, nt), [kt, Ct] = useState(0), [yt, vt] = useState(!1), bt = useMemo(() => new FlowLogger(tt), [tt]), { showRedirect: It, onSkip: wt } = useFlowRedirect({
|
|
364849
|
+
flow: At,
|
|
364845
364850
|
forceSkipRedirect: ht == null ? void 0 : ht.forceSkipRedirect
|
|
364846
364851
|
});
|
|
364847
364852
|
if (useEffect(() => {
|
|
364848
|
-
|
|
364849
|
-
}, [
|
|
364850
|
-
if (
|
|
364851
|
-
const
|
|
364853
|
+
At && (bt.flowStarted(At.flowModules.length), It ? bt.flowRedirected() : bt.stepStarted(At.flowModules[0].key, 0, At.flowModules.length));
|
|
364854
|
+
}, [At, bt, It]), xt) return null;
|
|
364855
|
+
if (Et) {
|
|
364856
|
+
const Dt = {
|
|
364852
364857
|
type: "FLOW_LOAD_FAILED",
|
|
364853
|
-
message:
|
|
364858
|
+
message: Et
|
|
364854
364859
|
};
|
|
364855
|
-
return Le(
|
|
364856
|
-
}
|
|
364857
|
-
if (!
|
|
364858
|
-
const
|
|
364859
|
-
const
|
|
364860
|
-
|
|
364861
|
-
const
|
|
364862
|
-
if (
|
|
364863
|
-
|
|
364860
|
+
return Le(Dt), bt.flowError(Dt), null;
|
|
364861
|
+
}
|
|
364862
|
+
if (!At) return null;
|
|
364863
|
+
const Tt = At.flowModules, Rt = Tt[kt], Bt = async () => {
|
|
364864
|
+
const Dt = Tt.length;
|
|
364865
|
+
bt.stepCompleted(Rt.key, kt, Dt);
|
|
364866
|
+
const Pt = kt + 1;
|
|
364867
|
+
if (Pt < Dt)
|
|
364868
|
+
bt.stepStarted(Tt[Pt].key, Pt, Dt), Ct(Pt);
|
|
364864
364869
|
else {
|
|
364865
|
-
|
|
364866
|
-
const { redirectionUrl:
|
|
364867
|
-
|
|
364870
|
+
vt(!0);
|
|
364871
|
+
const { redirectionUrl: Nt } = await getFinishStatus(void 0, { token: Be });
|
|
364872
|
+
bt.flowCompleted(Dt), Ye({ redirectionUrl: Nt });
|
|
364868
364873
|
}
|
|
364869
364874
|
};
|
|
364870
|
-
return
|
|
364875
|
+
return yt ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner$6, {}) : It ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
364871
364876
|
FlowRedirect,
|
|
364872
364877
|
{
|
|
364873
|
-
flow:
|
|
364878
|
+
flow: At,
|
|
364874
364879
|
token: Be,
|
|
364875
|
-
onSuccess:
|
|
364876
|
-
onSkip:
|
|
364877
|
-
mobileQrRedirectUrl: ht == null ? void 0 : ht.mobileQrRedirectUrl
|
|
364880
|
+
onSuccess: Bt,
|
|
364881
|
+
onSkip: wt,
|
|
364882
|
+
mobileQrRedirectUrl: ht == null ? void 0 : ht.mobileQrRedirectUrl,
|
|
364883
|
+
authHint: gt
|
|
364878
364884
|
}
|
|
364879
364885
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
364880
364886
|
App$1,
|
|
364881
364887
|
{
|
|
364882
364888
|
token: Be,
|
|
364883
|
-
disableUnsupportedBrowserScreen:
|
|
364889
|
+
disableUnsupportedBrowserScreen: At == null ? void 0 : At.disableUnsupportedBrowserScreen,
|
|
364884
364890
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FlowDataProvider, { token: Be, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
364885
364891
|
ModuleRenderer,
|
|
364886
364892
|
{
|
|
364887
|
-
module:
|
|
364888
|
-
onSuccess:
|
|
364889
|
-
emit: (
|
|
364893
|
+
module: Rt,
|
|
364894
|
+
onSuccess: Bt,
|
|
364895
|
+
emit: (Dt) => bt.emit(Dt),
|
|
364890
364896
|
token: Be,
|
|
364891
|
-
onError:
|
|
364892
|
-
flow:
|
|
364897
|
+
onError: Bt,
|
|
364898
|
+
flow: At,
|
|
364893
364899
|
uiConfig: ft,
|
|
364894
|
-
finishWithError: (
|
|
364900
|
+
finishWithError: (Dt) => Le(Dt),
|
|
364901
|
+
authHint: gt
|
|
364895
364902
|
}
|
|
364896
364903
|
) })
|
|
364897
364904
|
}
|
|
@@ -364905,9 +364912,10 @@ const executeFlow = async ({
|
|
|
364905
364912
|
onEvent: nt,
|
|
364906
364913
|
flow: ft,
|
|
364907
364914
|
uiConfig: ht,
|
|
364908
|
-
config: gt
|
|
364915
|
+
config: gt,
|
|
364916
|
+
authHint: At
|
|
364909
364917
|
}) => {
|
|
364910
|
-
const
|
|
364918
|
+
const xt = createRoot$1(Be);
|
|
364911
364919
|
customRender(
|
|
364912
364920
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
364913
364921
|
FlowRenderer,
|
|
@@ -364918,11 +364926,12 @@ const executeFlow = async ({
|
|
|
364918
364926
|
onEvent: nt,
|
|
364919
364927
|
flow: ft,
|
|
364920
364928
|
uiConfig: ht,
|
|
364921
|
-
config: gt
|
|
364929
|
+
config: gt,
|
|
364930
|
+
authHint: At
|
|
364922
364931
|
}
|
|
364923
364932
|
),
|
|
364924
364933
|
Be,
|
|
364925
|
-
|
|
364934
|
+
xt
|
|
364926
364935
|
);
|
|
364927
364936
|
};
|
|
364928
364937
|
function renderForms(Be, { onSuccess: Le, onError: Ye, token: tt, interviewId: nt, flowId: ft, screens: ht }) {
|
|
@@ -374917,30 +374926,32 @@ const RedirectToMobile = ({
|
|
|
374917
374926
|
displayOnboardingResultOnDesktop: ht,
|
|
374918
374927
|
qrPhishingResistance: gt,
|
|
374919
374928
|
url: At,
|
|
374920
|
-
showFinishScreen: xt = !0
|
|
374929
|
+
showFinishScreen: xt = !0,
|
|
374930
|
+
authHint: Et
|
|
374921
374931
|
}) => {
|
|
374922
|
-
const { t:
|
|
374923
|
-
return
|
|
374932
|
+
const { t: kt } = i18n, { nextStep: Ct, currentStep: yt } = useSteps(), { assets: vt } = useAssets({ startSuccess: !0, token: Be });
|
|
374933
|
+
return vt ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Steps, { currentStep: yt, children: [
|
|
374924
374934
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
374925
374935
|
Redirect,
|
|
374926
374936
|
{
|
|
374927
374937
|
session: Be,
|
|
374928
|
-
onSuccess: xt ?
|
|
374938
|
+
onSuccess: xt ? Ct : emptyFunc,
|
|
374929
374939
|
showSms: !Le,
|
|
374930
374940
|
skipDesktopRedirect: Ye,
|
|
374931
374941
|
allowSkipRedirect: tt,
|
|
374932
374942
|
allowReEnrollment: ft,
|
|
374933
374943
|
expired: nt,
|
|
374934
|
-
assets:
|
|
374944
|
+
assets: vt,
|
|
374935
374945
|
qrPhishingResistance: gt,
|
|
374936
|
-
url: At
|
|
374946
|
+
url: At,
|
|
374947
|
+
authHint: Et
|
|
374937
374948
|
}
|
|
374938
374949
|
),
|
|
374939
374950
|
xt && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
374940
374951
|
RedirectedCallFinished,
|
|
374941
374952
|
{
|
|
374942
|
-
title: Be.endScreenTitle ||
|
|
374943
|
-
subtitle: Be.endScreenText ||
|
|
374953
|
+
title: Be.endScreenTitle || kt("support.thanks"),
|
|
374954
|
+
subtitle: Be.endScreenText || kt("support.successFinish"),
|
|
374944
374955
|
displayOnboardingResultOnDesktop: ht,
|
|
374945
374956
|
token: Be.token
|
|
374946
374957
|
}
|
|
@@ -375447,7 +375458,8 @@ const RedirectToMobile = ({
|
|
|
375447
375458
|
disableSmsOption: (Tt == null ? void 0 : Tt.disableSmsOption) ?? !1,
|
|
375448
375459
|
qrPhishingResistance: (Tt == null ? void 0 : Tt.qrPhishingResistance) ?? !1,
|
|
375449
375460
|
url: gt,
|
|
375450
|
-
showFinishScreen: Et
|
|
375461
|
+
showFinishScreen: Et,
|
|
375462
|
+
authHint: ht
|
|
375451
375463
|
}
|
|
375452
375464
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: getModule({
|
|
375453
375465
|
currentNode: It,
|