@tap-payments/auth-jsconnect 2.1.63-test → 2.1.66-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/build/@types/app.d.ts +4 -1
  2. package/build/app/rootReducer.d.ts +0 -1
  3. package/build/app/rootReducer.js +0 -2
  4. package/build/app/store.d.ts +0 -2
  5. package/build/constants/app.d.ts +0 -1
  6. package/build/constants/app.js +0 -14
  7. package/build/features/app/connectExpress/connectExpressStore.d.ts +5 -0
  8. package/build/features/app/connectExpress/connectExpressStore.js +24 -26
  9. package/build/features/bank/Bank.d.ts +1 -1
  10. package/build/features/bank/Bank.js +7 -4
  11. package/build/features/brand/Brand.d.ts +1 -1
  12. package/build/features/brand/Brand.js +8 -6
  13. package/build/features/business/Business.d.ts +1 -1
  14. package/build/features/business/Business.js +7 -4
  15. package/build/features/connect/Connect.d.ts +1 -2
  16. package/build/features/connect/Connect.js +11 -20
  17. package/build/features/connectExpress/ConnectExpress.d.ts +1 -1
  18. package/build/features/connectExpress/ConnectExpress.js +7 -4
  19. package/build/features/entity/Entity.d.ts +1 -1
  20. package/build/features/entity/Entity.js +7 -4
  21. package/build/features/featuresScreens.d.ts +0 -1
  22. package/build/features/featuresScreens.js +0 -12
  23. package/build/features/individual/Individual.d.ts +1 -1
  24. package/build/features/individual/Individual.js +7 -4
  25. package/build/features/password/Password.d.ts +1 -1
  26. package/build/features/password/Password.js +7 -4
  27. package/build/features/shared/Button/FlowsButtons.js +1 -1
  28. package/build/features/signIn/SignIn.d.ts +1 -1
  29. package/build/features/signIn/SignIn.js +7 -4
  30. package/build/features/tax/Tax.d.ts +1 -1
  31. package/build/features/tax/Tax.js +7 -4
  32. package/build/hooks/useAppDispatch.d.ts +0 -1
  33. package/build/index.d.ts +12 -13
  34. package/build/index.js +12 -15
  35. package/build/utils/html.d.ts +0 -1
  36. package/build/utils/html.js +2 -10
  37. package/package.json +129 -130
  38. package/build/features/app/auth/authStore.d.ts +0 -46
  39. package/build/features/app/auth/authStore.js +0 -256
  40. package/build/features/auth/Auth.d.ts +0 -11
  41. package/build/features/auth/Auth.js +0 -79
  42. package/build/features/auth/index.d.ts +0 -1
  43. package/build/features/auth/index.js +0 -1
  44. package/build/features/auth/screens/NID/DOB.d.ts +0 -7
  45. package/build/features/auth/screens/NID/DOB.js +0 -47
  46. package/build/features/auth/screens/NID/IDNumber.d.ts +0 -3
  47. package/build/features/auth/screens/NID/IDNumber.js +0 -64
  48. package/build/features/auth/screens/NID/NID.d.ts +0 -5
  49. package/build/features/auth/screens/NID/NID.js +0 -68
  50. package/build/features/auth/screens/NID/TAC.d.ts +0 -3
  51. package/build/features/auth/screens/NID/TAC.js +0 -85
  52. package/build/features/auth/screens/NID/index.d.ts +0 -3
  53. package/build/features/auth/screens/NID/index.js +0 -2
  54. package/build/features/auth/screens/NID/validation.d.ts +0 -27
  55. package/build/features/auth/screens/NID/validation.js +0 -19
  56. package/build/features/auth/screens/OTP/OTP.d.ts +0 -5
  57. package/build/features/auth/screens/OTP/OTP.js +0 -76
  58. package/build/features/auth/screens/OTP/OTPInput.d.ts +0 -5
  59. package/build/features/auth/screens/OTP/OTPInput.js +0 -51
  60. package/build/features/auth/screens/OTP/index.d.ts +0 -3
  61. package/build/features/auth/screens/OTP/index.js +0 -2
  62. package/build/features/auth/screens/OTP/validation.d.ts +0 -8
  63. package/build/features/auth/screens/OTP/validation.js +0 -4
@@ -161,7 +161,10 @@ interface LibCallbacks {
161
161
  onStepCompleted?: (name: string, info: any) => void;
162
162
  onReady?: () => void;
163
163
  onStepStarted?: (name: string) => void;
164
- onFlowButtonClick?: (item: any) => void;
164
+ onFlowButtonClick?: (item: {
165
+ name: string;
166
+ token: string;
167
+ }) => void;
165
168
  }
166
169
  export interface LibConfig extends LibCallbacks {
167
170
  publicKey: string;
@@ -8,7 +8,6 @@ declare const rootReducer: {
8
8
  password: import("redux").Reducer<import("../features/app/password/passwordStore").PasswordState, import("redux").AnyAction>;
9
9
  signIn: import("redux").Reducer<import("../features/app/signIn/signInStore").SignInState, import("redux").AnyAction>;
10
10
  entity: import("redux").Reducer<import("../features/app/entity/entityStore").EntityState, import("redux").AnyAction>;
11
- auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
12
11
  brand: import("redux").Reducer<import("../features/app/brand/brandStore").BrandState, import("redux").AnyAction>;
13
12
  connectExpress: import("redux").Reducer<import("../features/app/connectExpress/connectExpressStore").ConnectExpressState, import("redux").AnyAction>;
14
13
  };
@@ -7,7 +7,6 @@ import individual from '../features/app/individual/individualStore';
7
7
  import password from '../features/app/password/passwordStore';
8
8
  import signIn from '../features/app/signIn/signInStore';
9
9
  import entity from '../features/app/entity/entityStore';
10
- import auth from '../features/app/auth/authStore';
11
10
  import brand from '../features/app/brand/brandStore';
12
11
  import connectExpress from '../features/app/connectExpress/connectExpressStore';
13
12
  var rootReducer = {
@@ -20,7 +19,6 @@ var rootReducer = {
20
19
  password: password,
21
20
  signIn: signIn,
22
21
  entity: entity,
23
- auth: auth,
24
22
  brand: brand,
25
23
  connectExpress: connectExpress
26
24
  };
@@ -9,7 +9,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
9
9
  password: import("../features/app/password/passwordStore").PasswordState;
10
10
  signIn: import("../features/app/signIn/signInStore").SignInState;
11
11
  entity: import("../features/app/entity/entityStore").EntityState;
12
- auth: import("../features/app/auth/authStore").AuthState;
13
12
  brand: import("../features/app/brand/brandStore").BrandState;
14
13
  connectExpress: import("../features/app/connectExpress/connectExpressStore").ConnectExpressState;
15
14
  }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
@@ -22,7 +21,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
22
21
  password: import("../features/app/password/passwordStore").PasswordState;
23
22
  signIn: import("../features/app/signIn/signInStore").SignInState;
24
23
  entity: import("../features/app/entity/entityStore").EntityState;
25
- auth: import("../features/app/auth/authStore").AuthState;
26
24
  brand: import("../features/app/brand/brandStore").BrandState;
27
25
  connectExpress: import("../features/app/connectExpress/connectExpressStore").ConnectExpressState;
28
26
  }, import("redux").AnyAction, undefined>]>>;
@@ -24,7 +24,6 @@ export declare const BANK_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
24
24
  export declare const TAX_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
25
25
  export declare const SigIn_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
26
26
  export declare const ENTITY_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
27
- export declare const AUTH_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
28
27
  export declare const BRAND_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
29
28
  export declare const DefaultDeviceInfo: {
30
29
  source: string;
@@ -460,20 +460,6 @@ export var ENTITY_SCREENS_NAVIGATION = [
460
460
  order: 5
461
461
  }
462
462
  ];
463
- export var AUTH_SCREENS_NAVIGATION = [
464
- {
465
- name: 'AUTH_NID_STEP',
466
- next: 'AUTH_VERIFY_STEP',
467
- prev: '',
468
- order: 1
469
- },
470
- {
471
- name: 'AUTH_VERIFY_STEP',
472
- next: '',
473
- prev: 'AUTH_NID_STEP',
474
- order: 2
475
- }
476
- ];
477
463
  export var BRAND_SCREENS_NAVIGATION = [
478
464
  {
479
465
  name: 'BRAND_VERIFY_STEP',
@@ -2,6 +2,11 @@ import { RootState } from '../../../app/store';
2
2
  import { MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, FlowsTypes, ActionState, CountryCode, AuthForType, BusinessDataFormValues } from '../../../@types';
3
3
  import { CancelToken } from 'axios';
4
4
  export declare const retrieveLeadIdentityByIdAsync: import("@reduxjs/toolkit").AsyncThunk<{
5
+ data: any;
6
+ countryCode: CountryCode;
7
+ boardInfo?: undefined;
8
+ boardData?: undefined;
9
+ } | {
5
10
  data: any;
6
11
  countryCode: CountryCode;
7
12
  boardInfo: any;
@@ -63,44 +63,42 @@ import { CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHE
63
63
  import { defaultCountry } from '../../../constants';
64
64
  import { getIndividualName, capitalizeTheFirstLetterOfEachWord, getEighteenYearsAgo, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA } from '../../../utils';
65
65
  export var retrieveLeadIdentityByIdAsync = createAsyncThunk('expressConnect/retrieveLeadIdentityByIdAsync', function (leadId, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
- var settings, countryCode, boardInfo, boardData, leadData, data, phone, _a, boardInfoRes, boardDataRes, leadDataRes;
67
- var _b;
68
- return __generator(this, function (_c) {
69
- switch (_c.label) {
66
+ var _a, settings, connectExpress, countryCode, data, phone, status, board_id, board_info_id, _b, boardInfo, boardData, leadData;
67
+ var _c, _d;
68
+ return __generator(this, function (_e) {
69
+ switch (_e.label) {
70
70
  case 0:
71
- settings = thunkApi.getState().settings;
71
+ _a = thunkApi.getState(), settings = _a.settings, connectExpress = _a.connectExpress;
72
72
  countryCode = settings.data.businessCountry;
73
- leadData = undefined;
74
73
  return [4, API.leadService.retrieveLeadIdentity(leadId)];
75
74
  case 1:
76
- data = _c.sent();
75
+ data = _e.sent();
77
76
  phone = (data.contact || {}).phone;
78
77
  if (phone === null || phone === void 0 ? void 0 : phone.country_code)
79
78
  countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
80
- if (!(((_b = data === null || data === void 0 ? void 0 : data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'registered')) return [3, 5];
81
- if (!(data.board_id && data.board_info_id)) return [3, 3];
79
+ status = data.status, board_id = data.board_id, board_info_id = data.board_info_id;
80
+ if ((status === null || status === void 0 ? void 0 : status.toLowerCase()) === 'registered' && !connectExpress.data.showBoard) {
81
+ (_d = (_c = settings.data.appConfig).onFlowCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, data);
82
+ thunkApi.dispatch(handleOpen(false));
83
+ return [2, { data: data, countryCode: countryCode }];
84
+ }
85
+ if ((status === null || status === void 0 ? void 0 : status.toLowerCase()) !== 'registered') {
86
+ thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
87
+ return [2, { data: data, countryCode: countryCode }];
88
+ }
89
+ if (!(board_id && board_info_id)) {
90
+ thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP'));
91
+ return [2, { data: data, countryCode: countryCode }];
92
+ }
82
93
  return [4, Promise.all([
83
- API.boardService.retrieveBoardInfo({ id: data.board_id, infoId: data.board_info_id }),
84
- API.boardService.retrieveBoardDetails(data.board_id),
94
+ API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
95
+ API.boardService.retrieveBoardDetails(board_id),
85
96
  thunkApi.dispatch(getLeadByIdAsync(leadId)).unwrap()
86
97
  ])];
87
98
  case 2:
88
- _a = _c.sent(), boardInfoRes = _a[0], boardDataRes = _a[1], leadDataRes = _a[2];
89
- boardInfo = boardInfoRes;
90
- boardData = boardDataRes;
91
- leadData = leadDataRes === null || leadDataRes === void 0 ? void 0 : leadDataRes.data;
99
+ _b = _e.sent(), boardInfo = _b[0], boardData = _b[1], leadData = _b[2];
92
100
  thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP'));
93
- return [3, 4];
94
- case 3:
95
- thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP'));
96
- _c.label = 4;
97
- case 4: return [3, 6];
98
- case 5:
99
- if (!(data === null || data === void 0 ? void 0 : data.identification) && (data === null || data === void 0 ? void 0 : data.phone)) {
100
- thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_EXPRESS_MOBILE_STEP'));
101
- }
102
- _c.label = 6;
103
- case 6: return [2, { data: __assign(__assign({}, data), leadData), countryCode: countryCode, boardInfo: boardInfo, boardData: boardData }];
101
+ return [2, { data: __assign(__assign({}, data), leadData.data), countryCode: countryCode, boardInfo: boardInfo, boardData: boardData }];
104
102
  }
105
103
  });
106
104
  }); });
@@ -3,7 +3,7 @@ import { LibConfig } from '../../@types';
3
3
  export interface BankLibProps extends LibConfig {
4
4
  verifyToken?: string;
5
5
  }
6
- export declare function BankLib(props: BankLibProps): JSX.Element;
6
+ export declare function BankElement(props: BankLibProps): JSX.Element;
7
7
  export declare function renderBankLib(config: BankLibProps, elementId: string): {
8
8
  unmount: () => void;
9
9
  };
@@ -22,13 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { memo } from 'react';
25
+ import { createRoot } from 'react-dom/client';
25
26
  import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken } from '../../hooks';
26
27
  import { settingsSelector } from '../../app/settings';
27
28
  import AnimationFlow from '../../components/AnimationFlow';
28
29
  import { store } from '../../app/store';
29
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
30
31
  import Collapse from '../../components/Collapse';
31
- import { reactElement } from '../../utils';
32
+ import { createElementAndInject } from '../../utils';
32
33
  import { FeatureContainer } from '../shared/Containers';
33
34
  import { BANK_SCREENS_NAVIGATION } from '../../constants';
34
35
  import { bankFeatureScreens } from '../featuresScreens';
@@ -59,11 +60,13 @@ var Bank = memo(function (_a) {
59
60
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
60
61
  }) }) })) })) })));
61
62
  });
62
- export function BankLib(props) {
63
+ export function BankElement(props) {
63
64
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Bank, __assign({}, props)) })));
64
65
  }
65
66
  export function renderBankLib(config, elementId) {
66
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
67
- render(_jsx(BankLib, __assign({}, config)));
67
+ var element = createElementAndInject(elementId);
68
+ var root = createRoot(element);
69
+ root.render(_jsx(BankElement, __assign({}, config)));
70
+ var unmount = function () { return root.unmount(); };
68
71
  return { unmount: unmount };
69
72
  }
@@ -3,7 +3,7 @@ import { LibConfig } from '../../@types';
3
3
  export interface BrandLibProps extends LibConfig {
4
4
  verifyToken?: string;
5
5
  }
6
- export declare function BrandLib(props: BrandLibProps): JSX.Element;
6
+ export declare function BrandElement(props: BrandLibProps): JSX.Element;
7
7
  export declare function renderBrandLib(config: BrandLibProps, elementId: string): {
8
8
  unmount: () => void;
9
9
  };
@@ -22,13 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { memo } from 'react';
25
- import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken } from '../../hooks';
25
+ import { createRoot } from 'react-dom/client';
26
+ import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken } from '../../hooks';
26
27
  import { settingsSelector } from '../../app/settings';
27
28
  import AnimationFlow from '../../components/AnimationFlow';
28
29
  import { store } from '../../app/store';
29
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
30
31
  import Collapse from '../../components/Collapse';
31
- import { reactElement } from '../../utils';
32
+ import { createElementAndInject } from '../../utils';
32
33
  import { FeatureContainer } from '../shared/Containers';
33
34
  import { BRAND_SCREENS_NAVIGATION } from '../../constants';
34
35
  import { brandFeatureScreens } from '../featuresScreens';
@@ -38,7 +39,6 @@ import Background from '../shared/Background';
38
39
  var Brand = memo(function (_a) {
39
40
  var verifyToken = _a.verifyToken, props = __rest(_a, ["verifyToken"]);
40
41
  var theme = useAppTheme().theme;
41
- var dispatch = useAppDispatch();
42
42
  var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
43
43
  var _c = useAppSelector(brandSelector), customLoading = _c.customLoading, loading = _c.loading, brandError = _c.error;
44
44
  useAppConfig(__assign(__assign({ navigation: BRAND_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
@@ -60,11 +60,13 @@ var Brand = memo(function (_a) {
60
60
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
61
61
  }) }) })) })) })));
62
62
  });
63
- export function BrandLib(props) {
63
+ export function BrandElement(props) {
64
64
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Brand, __assign({}, props)) })));
65
65
  }
66
66
  export function renderBrandLib(config, elementId) {
67
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
68
- render(_jsx(BrandLib, __assign({}, config)));
67
+ var element = createElementAndInject(elementId);
68
+ var root = createRoot(element);
69
+ root.render(_jsx(BrandElement, __assign({}, config)));
70
+ var unmount = function () { return root.unmount(); };
69
71
  return { unmount: unmount };
70
72
  }
@@ -2,7 +2,7 @@
2
2
  import { LibConfig } from '../../@types';
3
3
  export interface BusinessLibProps extends LibConfig {
4
4
  }
5
- export declare function BusinessLib(props: BusinessLibProps): JSX.Element;
5
+ export declare function BusinessElement(props: BusinessLibProps): JSX.Element;
6
6
  export declare function renderBusinessLib(config: BusinessLibProps, elementId: string): {
7
7
  unmount: () => void;
8
8
  };
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo, useEffect } from 'react';
14
+ import { createRoot } from 'react-dom/client';
14
15
  import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
15
16
  import { handleLanguage, settingsSelector } from '../../app/settings';
16
17
  import { FeatureContainer } from '../shared/Containers';
@@ -19,7 +20,7 @@ import AnimationFlow from '../../components/AnimationFlow';
19
20
  import { store } from '../../app/store';
20
21
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
21
22
  import Collapse from '../../components/Collapse';
22
- import { getParameterByName, reactElement } from '../../utils';
23
+ import { getParameterByName, createElementAndInject } from '../../utils';
23
24
  import { BUSINESS_SCREENS_NAVIGATION } from '../../constants';
24
25
  import { businessFeatureScreens } from '../featuresScreens';
25
26
  import CustomFooter from '../shared/Footer';
@@ -52,11 +53,13 @@ var Business = memo(function (props) {
52
53
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
53
54
  }) }) })) })) })));
54
55
  });
55
- export function BusinessLib(props) {
56
+ export function BusinessElement(props) {
56
57
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Business, __assign({}, props)) })));
57
58
  }
58
59
  export function renderBusinessLib(config, elementId) {
59
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
60
- render(_jsx(BusinessLib, __assign({}, config)));
60
+ var element = createElementAndInject(elementId);
61
+ var root = createRoot(element);
62
+ root.render(_jsx(BusinessElement, __assign({}, config)));
63
+ var unmount = function () { return root.unmount(); };
61
64
  return { unmount: unmount };
62
65
  }
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { LibConfig } from '../../@types';
3
3
  export interface ConnectLibProps extends LibConfig {
4
- onClose?: () => void;
5
4
  }
6
- export declare function ConnectLib(props: ConnectLibProps): JSX.Element;
5
+ export declare function ConnectElement(props: ConnectLibProps): JSX.Element;
7
6
  export declare function renderConnectLib(config: ConnectLibProps, elementId: string): {
8
7
  unmount: () => void;
9
8
  };
@@ -9,19 +9,9 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
12
  import { jsx as _jsx } from "react/jsx-runtime";
24
13
  import React, { memo } from 'react';
14
+ import { createRoot } from 'react-dom/client';
25
15
  import { FeatureContainer } from '../shared/Containers';
26
16
  import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useAppDispatch } from '../../hooks';
27
17
  import { handleCurrentActiveScreen, settingsSelector, handleOpen } from '../../app/settings';
@@ -30,17 +20,16 @@ import { store } from '../../app/store';
30
20
  import { connectSelector, setDefaultCountryCode } from '../app/connect/connectStore';
31
21
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
32
22
  import Collapse from '../../components/Collapse';
33
- import { reactElement, isKW } from '../../utils';
23
+ import { isKW, createElementAndInject } from '../../utils';
34
24
  import { CONNECT_SCREENS_NAVIGATION } from '../../constants';
35
25
  import { connectFeatureScreens } from '../featuresScreens';
36
26
  import CustomFooter from '../shared/Footer';
37
27
  import Background from '../shared/Background';
38
- var Connect = memo(function (_a) {
39
- var onClose = _a.onClose, props = __rest(_a, ["onClose"]);
28
+ var Connect = memo(function (props) {
40
29
  var theme = useAppTheme().theme;
41
30
  var dispatch = useAppDispatch();
42
- var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
43
- var _c = useAppSelector(connectSelector), connectError = _c.error, loading = _c.loading;
31
+ var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
32
+ var _b = useAppSelector(connectSelector), connectError = _b.error, loading = _b.loading;
44
33
  useAppConfig(__assign({ navigation: CONNECT_SCREENS_NAVIGATION }, props));
45
34
  useErrorListener(connectError || error);
46
35
  useStepStartedListener();
@@ -60,17 +49,19 @@ var Connect = memo(function (_a) {
60
49
  var handleDialogClose = function () {
61
50
  dispatch(handleOpen(false));
62
51
  };
63
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onClose: onClose, onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading, error: error, open: open, footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
52
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading, error: error, open: open, footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
64
53
  var Element = _a.element, name = _a.name;
65
54
  var isActive = activeScreen.name === name;
66
55
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
67
56
  }) }) })) })) })));
68
57
  });
69
- export function ConnectLib(props) {
58
+ export function ConnectElement(props) {
70
59
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Connect, __assign({}, props)) })));
71
60
  }
72
61
  export function renderConnectLib(config, elementId) {
73
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
74
- render(_jsx(ConnectLib, __assign({}, config)));
62
+ var element = createElementAndInject(elementId);
63
+ var root = createRoot(element);
64
+ root.render(_jsx(ConnectElement, __assign({}, config)));
65
+ var unmount = function () { return root.unmount(); };
75
66
  return { unmount: unmount };
76
67
  }
@@ -5,7 +5,7 @@ export interface ConnectExpressLibProps extends LibConfig {
5
5
  postURL: string;
6
6
  showBoard?: boolean;
7
7
  }
8
- export declare function ConnectExpressLib(props: ConnectExpressLibProps): JSX.Element;
8
+ export declare function ConnectExpressElement(props: ConnectExpressLibProps): JSX.Element;
9
9
  export declare function renderConnectExpressLib(config: ConnectExpressLibProps, elementId: string): {
10
10
  unmount: () => void;
11
11
  };
@@ -22,6 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import React, { memo } from 'react';
25
+ import { createRoot } from 'react-dom/client';
25
26
  import { FeatureContainer } from '../shared/Containers';
26
27
  import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useAppDispatch } from '../../hooks';
27
28
  import { handleCurrentActiveScreen, settingsSelector } from '../../app/settings';
@@ -30,7 +31,7 @@ import { store } from '../../app/store';
30
31
  import { connectExpressSelector, setIsLeadIdPassed, setPostUrl, setLeadId, retrieveLeadIdentityByIdAsync, setShowBoard } from '../app/connectExpress/connectExpressStore';
31
32
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
32
33
  import Collapse from '../../components/Collapse';
33
- import { reactElement, isKW } from '../../utils';
34
+ import { isKW, createElementAndInject } from '../../utils';
34
35
  import { CONNECT_EXPRESS_SCREENS_NAVIGATION } from '../../constants';
35
36
  import { connectExpressFeatureScreens } from '../featuresScreens';
36
37
  import CustomFooter from '../shared/Footer';
@@ -71,11 +72,13 @@ var ConnectExpress = memo(function (_a) {
71
72
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
72
73
  }) }) })) })) })));
73
74
  });
74
- export function ConnectExpressLib(props) {
75
+ export function ConnectExpressElement(props) {
75
76
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(ConnectExpress, __assign({}, props)) })));
76
77
  }
77
78
  export function renderConnectExpressLib(config, elementId) {
78
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
79
- render(_jsx(ConnectExpress, __assign({}, config)));
79
+ var el = createElementAndInject(elementId);
80
+ var root = createRoot(el);
81
+ root.render(_jsx(ConnectExpressElement, __assign({}, config)));
82
+ var unmount = function () { return root.unmount(); };
80
83
  return { unmount: unmount };
81
84
  }
@@ -3,7 +3,7 @@ import { LibConfig } from '../../@types';
3
3
  export interface EntityLibProps extends LibConfig {
4
4
  verifyToken?: string;
5
5
  }
6
- export declare function EntityLib(props: EntityLibProps): JSX.Element;
6
+ export declare function EntityElement(props: EntityLibProps): JSX.Element;
7
7
  export declare function renderEntityLib(config: EntityLibProps, elementId: string): {
8
8
  unmount: () => void;
9
9
  };
@@ -22,13 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { memo } from 'react';
25
+ import { createRoot } from 'react-dom/client';
25
26
  import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
26
27
  import { settingsSelector } from '../../app/settings';
27
28
  import AnimationFlow from '../../components/AnimationFlow';
28
29
  import { store } from '../../app/store';
29
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
30
31
  import Collapse from '../../components/Collapse';
31
- import { reactElement } from '../../utils';
32
+ import { createElementAndInject } from '../../utils';
32
33
  import { FeatureContainer } from '../shared/Containers';
33
34
  import { ENTITY_SCREENS_NAVIGATION } from '../../constants';
34
35
  import { entityFeatureScreens } from '../featuresScreens';
@@ -59,11 +60,13 @@ var Entity = memo(function (_a) {
59
60
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
60
61
  }) }) })) })) })));
61
62
  });
62
- export function EntityLib(props) {
63
+ export function EntityElement(props) {
63
64
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Entity, __assign({}, props)) })));
64
65
  }
65
66
  export function renderEntityLib(config, elementId) {
66
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
67
- render(_jsx(EntityLib, __assign({}, config)));
67
+ var element = createElementAndInject(elementId);
68
+ var root = createRoot(element);
69
+ root.render(_jsx(EntityElement, __assign({}, config)));
70
+ var unmount = function () { return root.unmount(); };
68
71
  return { unmount: unmount };
69
72
  }
@@ -8,5 +8,4 @@ export declare const bankFeatureScreens: Array<FeatureScreenStep>;
8
8
  export declare const taxFeatureScreens: Array<FeatureScreenStep>;
9
9
  export declare const signInFeatureScreens: Array<FeatureScreenStep>;
10
10
  export declare const entityFeatureScreens: Array<FeatureScreenStep>;
11
- export declare const authFeatureScreens: Array<FeatureScreenStep>;
12
11
  export declare const brandFeatureScreens: Array<FeatureScreenStep>;
@@ -73,8 +73,6 @@ import BrandSuccessPage from './brand/screens/Success';
73
73
  import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
74
74
  import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
75
75
  import BrandDataLoadingPage from './brand/screens/PrepareDataLoading';
76
- import AuthNIDPage from './auth/screens/NID';
77
- import AuthVerifyPage from './auth/screens/OTP';
78
76
  export var connectFeatureScreens = [
79
77
  {
80
78
  name: 'CONNECT_NID_STEP',
@@ -341,16 +339,6 @@ export var entityFeatureScreens = [
341
339
  },
342
340
  { name: 'ENTITY_RESET_PASSWORD_SUCCESS', element: EntityResetPasswordSuccessPage }
343
341
  ];
344
- export var authFeatureScreens = [
345
- {
346
- name: 'AUTH_NID_STEP',
347
- element: AuthNIDPage
348
- },
349
- {
350
- name: 'AUTH_VERIFY_STEP',
351
- element: AuthVerifyPage
352
- }
353
- ];
354
342
  export var brandFeatureScreens = [
355
343
  {
356
344
  name: 'BRAND_VERIFY_STEP',
@@ -3,7 +3,7 @@ import { LibConfig } from '../../@types';
3
3
  export interface IndividualLibProps extends LibConfig {
4
4
  verifyToken?: string;
5
5
  }
6
- export declare function IndividualLib(props: IndividualLibProps): JSX.Element;
6
+ export declare function IndividualElement(props: IndividualLibProps): JSX.Element;
7
7
  export declare function renderIndividualLib(config: IndividualLibProps, elementId: string): {
8
8
  unmount: () => void;
9
9
  };
@@ -22,13 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { memo } from 'react';
25
+ import { createRoot } from 'react-dom/client';
25
26
  import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
26
27
  import { settingsSelector } from '../../app/settings';
27
28
  import AnimationFlow from '../../components/AnimationFlow';
28
29
  import { store } from '../../app/store';
29
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
30
31
  import Collapse from '../../components/Collapse';
31
- import { reactElement } from '../../utils';
32
+ import { createElementAndInject } from '../../utils';
32
33
  import { FeatureContainer } from '../shared/Containers';
33
34
  import { INDIVIDUAL_SCREENS_NAVIGATION } from '../../constants';
34
35
  import { individualFeatureScreens } from '../featuresScreens';
@@ -59,11 +60,13 @@ var Individual = memo(function (_a) {
59
60
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
60
61
  }) }) })) })) })));
61
62
  });
62
- export function IndividualLib(props) {
63
+ export function IndividualElement(props) {
63
64
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Individual, __assign({}, props)) })));
64
65
  }
65
66
  export function renderIndividualLib(config, elementId) {
66
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
67
- render(_jsx(IndividualLib, __assign({}, config)));
67
+ var element = createElementAndInject(elementId);
68
+ var root = createRoot(element);
69
+ root.render(_jsx(IndividualElement, __assign({}, config)));
70
+ var unmount = function () { return root.unmount(); };
68
71
  return { unmount: unmount };
69
72
  }
@@ -3,7 +3,7 @@ import { LibConfig } from '../../@types';
3
3
  export interface PasswordLibProps extends LibConfig {
4
4
  verifyToken?: string;
5
5
  }
6
- export declare function PasswordLib(props: PasswordLibProps): JSX.Element;
6
+ export declare function PasswordElement(props: PasswordLibProps): JSX.Element;
7
7
  export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): {
8
8
  unmount: () => void;
9
9
  };
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo, useEffect } from 'react';
14
+ import { createRoot } from 'react-dom/client';
14
15
  import { useAppTheme, useAppDispatch, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener } from '../../hooks';
15
16
  import { handleLanguage, settingsSelector } from '../../app/settings';
16
17
  import AnimationFlow from '../../components/AnimationFlow';
@@ -18,7 +19,7 @@ import { store } from '../../app/store';
18
19
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
19
20
  import Collapse from '../../components/Collapse';
20
21
  import { FeatureContainer } from '../shared/Containers';
21
- import { getParameterByName, reactElement } from '../../utils';
22
+ import { getParameterByName, createElementAndInject } from '../../utils';
22
23
  import { PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../constants';
23
24
  import { passwordFeatureScreens } from '../featuresScreens';
24
25
  import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
@@ -59,11 +60,13 @@ var Password = memo(function (props) {
59
60
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
60
61
  }) }) })) })) })));
61
62
  });
62
- export function PasswordLib(props) {
63
+ export function PasswordElement(props) {
63
64
  return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Password, __assign({}, props)) })));
64
65
  }
65
66
  export function renderPasswordLib(config, elementId) {
66
- var _a = reactElement(elementId), render = _a.render, unmount = _a.unmount;
67
- render(_jsx(PasswordLib, __assign({}, config)));
67
+ var el = createElementAndInject(elementId);
68
+ var root = createRoot(el);
69
+ root.render(_jsx(PasswordElement, __assign({}, config)));
70
+ var unmount = function () { return root.unmount(); };
68
71
  return { unmount: unmount };
69
72
  }
@@ -160,7 +160,7 @@ export default function FlowsButtons(_a) {
160
160
  return;
161
161
  }
162
162
  if (typeof settingsData.appConfig.onFlowButtonClick === 'function') {
163
- settingsData.appConfig.onFlowButtonClick(item);
163
+ settingsData.appConfig.onFlowButtonClick({ name: item.name, token: item.token });
164
164
  return;
165
165
  }
166
166
  dispatch(handleOpen(false));
@@ -2,7 +2,7 @@
2
2
  import { LibConfig } from '../../@types';
3
3
  export interface SignInLibProps extends LibConfig {
4
4
  }
5
- export declare function SignInLib(props: SignInLibProps): JSX.Element;
5
+ export declare function SignInElement(props: SignInLibProps): JSX.Element;
6
6
  export declare function renderSignInLib(config: SignInLibProps, elementId: string): {
7
7
  unmount: () => void;
8
8
  };