@tap-payments/auth-jsconnect 2.8.0 → 2.8.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.
Files changed (68) hide show
  1. package/build/@types/app.d.ts +7 -1
  2. package/build/@types/app.js +7 -0
  3. package/build/@types/form.d.ts +3 -0
  4. package/build/api/auth.d.ts +1 -0
  5. package/build/app/settings.d.ts +1 -0
  6. package/build/app/settings.js +8 -5
  7. package/build/assets/currencies/SARSymbol.d.ts +7 -0
  8. package/build/assets/currencies/SARSymbol.js +28 -0
  9. package/build/assets/currencies/index.d.ts +2 -0
  10. package/build/assets/currencies/index.js +2 -0
  11. package/build/assets/currencies/utils.d.ts +4 -0
  12. package/build/assets/currencies/utils.js +4 -0
  13. package/build/assets/locales/ar.json +10 -1
  14. package/build/assets/locales/en.json +36 -1
  15. package/build/components/TextWithCurrency/TextWithCurrency.d.ts +7 -0
  16. package/build/components/TextWithCurrency/TextWithCurrency.js +14 -0
  17. package/build/components/TextWithCurrency/index.d.ts +2 -0
  18. package/build/components/TextWithCurrency/index.js +2 -0
  19. package/build/constants/api.d.ts +0 -1
  20. package/build/constants/api.js +0 -2
  21. package/build/constants/app.d.ts +3 -0
  22. package/build/constants/app.js +42 -12
  23. package/build/constants/assets.d.ts +4 -0
  24. package/build/constants/assets.js +9 -2
  25. package/build/features/app/auth/authStore.d.ts +24 -5
  26. package/build/features/app/auth/authStore.js +136 -71
  27. package/build/features/app/connectExpress/connectExpressStore.d.ts +14 -3
  28. package/build/features/app/connectExpress/connectExpressStore.js +193 -49
  29. package/build/features/auth/screens/OTP/OTP.d.ts +13 -2
  30. package/build/features/auth/screens/OTP/OTP.js +15 -3
  31. package/build/features/auth/screens/OTP/index.d.ts +1 -2
  32. package/build/features/auth/screens/Passcode/Passcode.d.ts +16 -0
  33. package/build/features/auth/screens/Passcode/Passcode.js +82 -0
  34. package/build/features/auth/screens/Passcode/PasscodeInput.d.ts +6 -0
  35. package/build/features/auth/screens/Passcode/PasscodeInput.js +42 -0
  36. package/build/features/auth/screens/Passcode/index.d.ts +2 -0
  37. package/build/features/auth/screens/Passcode/index.js +2 -0
  38. package/build/features/auth/screens/Passcode/validation.d.ts +8 -0
  39. package/build/features/auth/screens/Passcode/validation.js +4 -0
  40. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -8
  41. package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -8
  42. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +3 -0
  43. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.js +9 -0
  44. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.d.ts +2 -0
  45. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.js +2 -0
  46. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.d.ts +5 -0
  47. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.js +49 -0
  48. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.d.ts +5 -0
  49. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.js +88 -0
  50. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.d.ts +3 -0
  51. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.js +2 -0
  52. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.d.ts +8 -0
  53. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.js +4 -0
  54. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +9 -3
  55. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -7
  56. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -7
  57. package/build/features/featuresScreens.js +10 -0
  58. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +3 -8
  59. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
  60. package/build/features/shared/Background/LogoBackground.js +5 -17
  61. package/build/features/shared/Button/Button.js +1 -2
  62. package/build/features/shared/Button/FlowsButtons.js +1 -2
  63. package/build/features/shared/Input/Input.d.ts +1 -1
  64. package/build/hooks/useAppConfig.js +1 -1
  65. package/build/utils/common.d.ts +1 -1
  66. package/build/utils/common.js +2 -4
  67. package/build/utils/string.d.ts +1 -1
  68. package/package.json +2 -3
@@ -351,12 +351,18 @@ export declare enum AuthForType {
351
351
  NATIONAL_ID = "national_id",
352
352
  NATIONAL_ID_MISSED = "national_id_missed"
353
353
  }
354
+ export declare enum AuthForScreen {
355
+ INDIVIDUAL = "individual",
356
+ DOB = "dob",
357
+ MOBILE_OWNERSHIP = "mobile_ownership"
358
+ }
354
359
  export declare enum AuthTypeNumber {
355
360
  EMAIL_OTP = 5,
356
361
  MOBILE_OTP = 2,
357
362
  PASSWORD = 1,
358
363
  MIGRATION = 10,
359
- RESET_PASSWORD = 7
364
+ RESET_PASSWORD = 7,
365
+ PASSCODE = 11
360
366
  }
361
367
  export declare enum MigrationStatus {
362
368
  IN_PROGRESS = "IN_PROGRESS",
@@ -43,6 +43,12 @@ export var AuthForType;
43
43
  AuthForType["NATIONAL_ID"] = "national_id";
44
44
  AuthForType["NATIONAL_ID_MISSED"] = "national_id_missed";
45
45
  })(AuthForType || (AuthForType = {}));
46
+ export var AuthForScreen;
47
+ (function (AuthForScreen) {
48
+ AuthForScreen["INDIVIDUAL"] = "individual";
49
+ AuthForScreen["DOB"] = "dob";
50
+ AuthForScreen["MOBILE_OWNERSHIP"] = "mobile_ownership";
51
+ })(AuthForScreen || (AuthForScreen = {}));
46
52
  export var AuthTypeNumber;
47
53
  (function (AuthTypeNumber) {
48
54
  AuthTypeNumber[AuthTypeNumber["EMAIL_OTP"] = 5] = "EMAIL_OTP";
@@ -50,6 +56,7 @@ export var AuthTypeNumber;
50
56
  AuthTypeNumber[AuthTypeNumber["PASSWORD"] = 1] = "PASSWORD";
51
57
  AuthTypeNumber[AuthTypeNumber["MIGRATION"] = 10] = "MIGRATION";
52
58
  AuthTypeNumber[AuthTypeNumber["RESET_PASSWORD"] = 7] = "RESET_PASSWORD";
59
+ AuthTypeNumber[AuthTypeNumber["PASSCODE"] = 11] = "PASSCODE";
53
60
  })(AuthTypeNumber || (AuthTypeNumber = {}));
54
61
  export var MigrationStatus;
55
62
  (function (MigrationStatus) {
@@ -10,6 +10,9 @@ export declare type EmailFormValues = {
10
10
  export declare type OTPFormValues = {
11
11
  otp: string;
12
12
  };
13
+ export declare type PasscodeFormValues = {
14
+ passcode: string;
15
+ };
13
16
  export declare type PasswordFormValues = {
14
17
  password: string;
15
18
  };
@@ -31,6 +31,7 @@ export declare type CreateAuthBody = {
31
31
  lead_id?: string;
32
32
  board_id?: string;
33
33
  user_id?: string;
34
+ login?: boolean;
34
35
  };
35
36
  export declare type CreateNafathAuthBody = {
36
37
  country: string;
@@ -14,6 +14,7 @@ export declare const onCloseComplete: import("@reduxjs/toolkit").AsyncThunk<void
14
14
  merchantId: string;
15
15
  brandId: string;
16
16
  entityId: string;
17
+ nextScreen?: string | undefined;
17
18
  }, {}>;
18
19
  export interface SettingsData {
19
20
  skin: ThemeMode;
@@ -56,7 +56,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
56
56
  };
57
57
  var _a;
58
58
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
- import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString, dangerousMessage, getParameterByName, setBaseUrl, getUserLanguage } from '../utils';
59
+ import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString, dangerousMessage, getParameterByName, setBaseUrl, getUserLanguage, sleep } from '../utils';
60
60
  import { BUSINESS_COUNTRIES, DEFAULT_COUNTRY_ISO2, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
61
61
  import i18n from '../i18n';
62
62
  import { updateLocale } from '../utils/locale';
@@ -112,7 +112,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
112
112
  thunkApi.dispatch(handleLanguage(lang));
113
113
  if (configInfo.publicKey) {
114
114
  if (configToken) {
115
- setBaseUrl(configInfo.publicKey, appConfig.businessCountryCode);
115
+ setBaseUrl(configInfo.publicKey);
116
116
  }
117
117
  thunkApi.dispatch(handlePublicKey(configInfo.publicKey));
118
118
  }
@@ -179,7 +179,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
179
179
  });
180
180
  }); });
181
181
  export var onCloseComplete = createAsyncThunk('settings/onCloseComplete', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
182
- var settings, _a, appConfig, authId, postURL, redirectUrl, bi, merchantId, brandId, entityId, body, data, urlQueryStart, newUrl;
182
+ var settings, _a, appConfig, authId, postURL, redirectUrl, bi, merchantId, brandId, entityId, nextScreen, body, data, urlQueryStart, newUrl;
183
183
  var _b, _c;
184
184
  return __generator(this, function (_d) {
185
185
  switch (_d.label) {
@@ -188,7 +188,7 @@ export var onCloseComplete = createAsyncThunk('settings/onCloseComplete', functi
188
188
  _a = settings.data, appConfig = _a.appConfig, authId = _a.authId;
189
189
  postURL = appConfig.postURL, redirectUrl = appConfig.redirectUrl;
190
190
  bi = settings.data.deviceInfo.browser.browser_id;
191
- merchantId = params.merchantId, brandId = params.brandId, entityId = params.entityId;
191
+ merchantId = params.merchantId, brandId = params.brandId, entityId = params.entityId, nextScreen = params.nextScreen;
192
192
  if (!authId) return [3, 2];
193
193
  body = {
194
194
  post_url: postURL || '',
@@ -203,6 +203,10 @@ export var onCloseComplete = createAsyncThunk('settings/onCloseComplete', functi
203
203
  case 1:
204
204
  data = _d.sent();
205
205
  (_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, data);
206
+ if (nextScreen) {
207
+ sleep(100).then(function () { return thunkApi.dispatch(handleCurrentActiveScreen(nextScreen)); });
208
+ return [2];
209
+ }
206
210
  if (settings.data.appConfig.mode === 'popup') {
207
211
  settings.data.appConfig.onFlowCompleted({ auth_id: authId, bi: bi });
208
212
  thunkApi.dispatch(handleOpen(false));
@@ -358,7 +362,6 @@ export var settingsSlice = createSlice({
358
362
  if (state.data.locale && country.iso2)
359
363
  updateLocale(state.data.locale, country.iso2);
360
364
  state.data.businessCountry = country;
361
- setBaseUrl(state.data.appConfig.publicKey, country.iso2);
362
365
  }
363
366
  }
364
367
  },
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare type SARSymbolProps = React.SVGProps<SVGSVGElement> & {
3
+ width?: number;
4
+ height?: number;
5
+ };
6
+ declare const SARSymbol: ({ height, ...svgProps }: SARSymbolProps) => JSX.Element;
7
+ export default SARSymbol;
@@ -0,0 +1,28 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
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
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ var SARSymbol = function (_a) {
25
+ var _b = _a.height, height = _b === void 0 ? 10 : _b, svgProps = __rest(_a, ["height"]);
26
+ return (_jsx("span", __assign({ style: { padding: '0 2px' } }, { children: _jsx("svg", __assign({ xmlns: 'http://www.w3.org/2000/svg', height: height, fill: 'currentColor', viewBox: '0 0 1124.14 1256.39' }, svgProps, { children: _jsx("path", { d: 'M699.62 1113.02a460.24 460.24 0 0 0-38.4 143.37l424.51-90.24a460.44 460.44 0 0 0 38.4-143.37l-424.51 90.24zM1085.73 895.8a460.16 460.16 0 0 0 38.4-143.37l-330.68 70.33v-135.2l292.27-62.11a460.16 460.16 0 0 0 38.4-143.37l-330.68 70.27V66.13a466.56 466.56 0 0 0-132.25 110.99v403.35l-132.25 28.11V0A466.4 466.4 0 0 0 396.7 110.99v525.69l-295.92 62.88a460.46 460.46 0 0 0-38.42 143.37l334.33-71.05v170.26l-358.3 76.14a460.16 460.16 0 0 0-38.4 143.37l375.03-79.7a119.13 119.13 0 0 0 73.83-49.24l68.78-101.97v-.02a65.72 65.72 0 0 0 11.3-36.97V743.77l132.25-28.11v270.4l424.53-90.28z' }) })) })));
27
+ };
28
+ export default SARSymbol;
@@ -0,0 +1,2 @@
1
+ import SARSymbol from './SARSymbol';
2
+ export { SARSymbol };
@@ -0,0 +1,2 @@
1
+ import SARSymbol from './SARSymbol';
2
+ export { SARSymbol };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ declare type CurrencyIconMap = Record<string, React.FC>;
3
+ export declare const CURRENCY_ICON: CurrencyIconMap;
4
+ export {};
@@ -0,0 +1,4 @@
1
+ import SARSymbol from './SARSymbol';
2
+ export var CURRENCY_ICON = {
3
+ SA: SARSymbol
4
+ };
@@ -136,12 +136,14 @@
136
136
  "cancel": "إلغاء",
137
137
  "capital_paid_hint": "00000",
138
138
  "capital_paid_label": "رأس المال المدفوع ({{currency}})",
139
+ "capital_paid_input_label": "رأس المال المدفوع",
139
140
  "capital_paid_required": "Please Enter paid amount",
140
141
  "capital_share_count_hint": "00000",
141
142
  "capital_share_count_label": "عدد اسهم رأس المال",
142
143
  "capital_share_count_required": "Please Enter share count",
143
144
  "capital_share_value_hint": "00000",
144
145
  "capital_share_value_label": "قيمة السهم ({{currency}})",
146
+ "capital_share_value_input_label": "قيمة السهم",
145
147
  "capital_share_value_required": "Please Enter share value",
146
148
  "category": "الفئة",
147
149
  "category_name": "اسم الفئة",
@@ -280,6 +282,7 @@
280
282
  "entity_type_required": "Please select at least one entity type",
281
283
  "expected_customers_to_serve": "عدد العملاء شهريا",
282
284
  "expected_sales_monthly": "البيع المتوقع في الشهر؟ ({{currency}})",
285
+ "expected_sale_per_month": "البيع المتوقع في الشهر؟",
283
286
  "expected_sales_yearly": "ما هي المبيعات المتوقعة لعملك شهريًا؟",
284
287
  "expected_served_monthly": "عدد العملاء شهريا",
285
288
  "expiry_date": "تاريخ الإنتهاء",
@@ -483,6 +486,7 @@
483
486
  "please_choose_is_authorized": "الرجاء التأكيد إذا كنت أنت المستخدم المصرح له",
484
487
  "please_choose_relative_pep": "هل أنت أو أحد أقاربك شخص مكشوف علنًا (PEP)",
485
488
  "please_enter_actual_income": "ما هو دخلك الشهري ({{currency}}) ؟ ",
489
+ "monthly_income": "ما هو دخلك الشهري؟ ",
486
490
  "please_enter_employer_name": "يرجى إدخال اسم منشأه العمل الخاص بك",
487
491
  "please_try_again_after_few_minutes": "يمكنك محاولة تسجيل الدخول مرة أخرى بعد {{minutes}} دقيقة",
488
492
  "powered_by": "بواسطة",
@@ -523,6 +527,7 @@
523
527
  "share_count_label": "عدد الأسهم",
524
528
  "share_value_hint": "0000",
525
529
  "share_value_label": "قيمة السهم ({{currency}})",
530
+ "share_value_input_label": "قيمة السهم",
526
531
  "sign_up": "Sign up",
527
532
  "signed_up": "تسجيل الدخول",
528
533
  "signin_email_label": "البريد الألكتروني",
@@ -638,5 +643,9 @@
638
643
  "current_mobile_number": "رقم الجوال الحالي",
639
644
  "new_mobile_number": "رقم الجوال الجديد",
640
645
  "update_mobile_number": "تحديث رقم الجوال",
641
- "update_later": "سأقوم بالتحديث لاحقاً"
646
+ "update_later": "سأقوم بالتحديث لاحقاً",
647
+ "passcode_title": "الرجاء إدخال رمز المرور الخاص بك",
648
+ "sign_in_with_otp": "تسجيل الدخول باستخدام رمز التحقق (OTP)",
649
+ "passcode_required": "الرجاء إدخال رمز المرور المطلوب",
650
+ "login_with_passcode": "تسجيل الدخول باستخدام رمز المرور"
642
651
  }
@@ -135,12 +135,14 @@
135
135
  "cancel": "Cancel",
136
136
  "capital_paid_hint": "00000",
137
137
  "capital_paid_label": "Capital Paid ({{currency}})",
138
+ "capital_paid_input_label": "Capital Paid",
138
139
  "capital_paid_required": "Please Enter paid amount",
139
140
  "capital_share_count_hint": "00000",
140
141
  "capital_share_count_label": "Capital Share Count",
141
142
  "capital_share_count_required": "Please Enter share count",
142
143
  "capital_share_value_hint": "00000",
143
144
  "capital_share_value_label": "Capital Share Value ({{currency}})",
145
+ "capital_share_value_input_label": "Capital Share Value",
144
146
  "capital_share_value_required": "Please Enter share value",
145
147
  "category": "Category",
146
148
  "category_name": "Category name",
@@ -288,6 +290,7 @@
288
290
  "entity_type_required": "Please select at least one entity type",
289
291
  "expected_customers_to_serve": "Customers server per month",
290
292
  "expected_sales_monthly": "Expected sale per month? ({{currency}})",
293
+ "expected_sale_per_month": "Expected sale per month?",
291
294
  "expected_sales_yearly": "What is the expected sales for your business per month?",
292
295
  "expected_served_monthly": "Customers server per month",
293
296
  "expiry_date": "Date of expiry",
@@ -499,6 +502,7 @@
499
502
  "please_choose_is_authorized": "Please tell us if you are the authorized user",
500
503
  "please_choose_relative_pep": "Are you or one of your relatives a Publicly Exposed Person (PEP)",
501
504
  "please_enter_actual_income": "Monthly income ({{currency}})",
505
+ "monthly_income": "Monthly income",
502
506
  "please_enter_employer_name": "Please enter the name of your employer",
503
507
  "please_try_again_after_few_minutes": "You can try to login again after {{minutes}} mins",
504
508
  "powered_by": "Powered by",
@@ -545,6 +549,7 @@
545
549
  "share_count_label": "Share Count",
546
550
  "share_value_hint": "0000",
547
551
  "share_value_label": "Share Value ({{currency}})",
552
+ "share_value_input_label": "Share Value",
548
553
  "sign_up": "Sign up",
549
554
  "signed_up": "Signed up",
550
555
  "signin_email_label": "Email address",
@@ -665,5 +670,35 @@
665
670
  "current_mobile_number": "Current mobile number",
666
671
  "new_mobile_number": "New mobile number",
667
672
  "update_mobile_number": "Update mobile number",
668
- "update_later": "I'll update later"
673
+ "update_later": "I'll update later",
674
+ "terminal_manage_terminals": "Manage Terminals",
675
+ "terminal_link_terminal": "Link Terminal",
676
+ "terminal_linked": "Linked",
677
+ "terminal_link": "Link",
678
+ "terminal_unlinked": "Unlinked",
679
+ "terminal_paired_with": "Paired with",
680
+ "terminal_device_id": "Device ID",
681
+ "terminal_serial_number": "Serial no",
682
+ "terminal_qr_code_description": "Open the Tap app on the terminal and select Linked Terminal from the More menu.",
683
+ "terminal_or_use_code": "or use code",
684
+ "terminal_unlink": "Unlink",
685
+ "terminal_linked_with": "Linked with",
686
+ "terminal_send_link_request": "Send linking request",
687
+ "terminal_request_will_send": "A request will be sent to Tap Terminal app to confirm linking.",
688
+ "terminal_new_request_will_send": "A new link request bas ben sent to Tap Terminal app to confirm linking.",
689
+ "terminal_resend_request": "Resend Request",
690
+ "terminal_with": "with",
691
+ "terminal_request_denied": "The Request to link Terminal {{device}} has been denied.",
692
+ "terminal_go_to_board": "Go to Board",
693
+ "terminal_linked_success": "Your terminal {{device}} is linked successfully",
694
+ "terminal_unlinked_success": "Your terminal {{device}} is unlinked successfully",
695
+ "terminal_no_terminal_linked": "No Terminal Linked",
696
+ "terminal_no_terminal_linked_description": "We will list the linked terminals here when available",
697
+ "terminal_push_notification_link_new_terminal_failed": "Something went wrong. Please try again later",
698
+ "terminal_id": "Terminal ID",
699
+ "terminal_devices": "{{name}} Devices",
700
+ "passcode_title": "Please enter your passcode",
701
+ "sign_in_with_otp": "Sign in with OTP",
702
+ "passcode_required": "Please enter the required Passcode",
703
+ "login_with_passcode": "Login with Passcode"
669
704
  }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare type TextWithCurrencyProps = {
3
+ text: string;
4
+ countryCode?: string;
5
+ };
6
+ declare const TextWithCurrency: ({ text, countryCode }: TextWithCurrencyProps) => JSX.Element;
7
+ export default TextWithCurrency;
@@ -0,0 +1,14 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { getCurrencyByCountryIso2 } from '../../utils';
3
+ import { CURRENCY_ICON } from '../../assets/currencies/utils';
4
+ var TextWithCurrency = function (_a) {
5
+ var text = _a.text, countryCode = _a.countryCode;
6
+ if (!countryCode)
7
+ return _jsx(_Fragment, { children: text });
8
+ var currencyCode = getCurrencyByCountryIso2(countryCode);
9
+ var CurrencyIcon = CURRENCY_ICON[countryCode];
10
+ if (CurrencyIcon)
11
+ return (_jsxs("span", { children: [text, " (", _jsx(CurrencyIcon, {}), ")"] }));
12
+ return (_jsxs("span", { children: [text, currencyCode ? " (".concat(currencyCode, ")") : ''] }));
13
+ };
14
+ export default TextWithCurrency;
@@ -0,0 +1,2 @@
1
+ import TextWithCurrency from './TextWithCurrency';
2
+ export default TextWithCurrency;
@@ -0,0 +1,2 @@
1
+ import TextWithCurrency from './TextWithCurrency';
2
+ export default TextWithCurrency;
@@ -11,7 +11,6 @@ export declare const ENDPOINT_PATHS: {
11
11
  MIGRATION_STATUS: string;
12
12
  SANDBOX_BASE_URL: string;
13
13
  PRODUCTION_BASE_URL: string;
14
- PRODUCTION_BASE_URL_SA: string;
15
14
  DEV_BASE_URL: string;
16
15
  BETA_BASE_URL: string;
17
16
  BUSINESS_COUNTRIES: string;
@@ -1,6 +1,5 @@
1
1
  var SANDBOX_BASE_URL = 'https://connect-mw.sandbox.tap.company/middleware';
2
2
  var PRODUCTION_BASE_URL = 'https://connect-mw.tap.company/middleware';
3
- var PRODUCTION_BASE_URL_SA = 'https://connect-mw.tap.com.sa/middleware';
4
3
  var DEV_BASE_URL = 'https://connect-mw.dev.tap.company/middleware';
5
4
  var BETA_BASE_URL = 'https://connect-mw.beta.tap.company/middleware';
6
5
  var API_BUSINESS_COUNTRIES = 'https://godata.sandbox.tap.company/api/v1/business/country/list';
@@ -70,7 +69,6 @@ export var ENDPOINT_PATHS = {
70
69
  MIGRATION_STATUS: MIGRATION_STATUS,
71
70
  SANDBOX_BASE_URL: SANDBOX_BASE_URL,
72
71
  PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
73
- PRODUCTION_BASE_URL_SA: PRODUCTION_BASE_URL_SA,
74
72
  DEV_BASE_URL: DEV_BASE_URL,
75
73
  BETA_BASE_URL: BETA_BASE_URL,
76
74
  BUSINESS_COUNTRIES: API_BUSINESS_COUNTRIES,
@@ -11,6 +11,7 @@ export declare const LOCAL_STORAGE_KEYS: {
11
11
  languageMode: string;
12
12
  };
13
13
  export declare const SCOPE_AUTH = "auth";
14
+ export declare const SCOPE_MERCHANT = "merchant";
14
15
  export declare const DEFAULT_COUNTRY_ISO2 = "KW";
15
16
  export declare const NAFATH_VERIFICATION_FAILED = "nafath_verification_failed";
16
17
  export declare const COLLECT_DOB_INFO_NAFATH = "collect_date_of_birth";
@@ -120,6 +121,7 @@ export declare const AUTH_STEP_NAMES: {
120
121
  CREATE_AUTH_NID: string;
121
122
  VERIFY_AUTH_NID: string;
122
123
  UPDATE_DOB_INFO: string;
124
+ CREATE_AUTH_PASSCODE: string;
123
125
  };
124
126
  export declare const CONNECT_EXPRESS_STEP_NAMES: {
125
127
  CREATE_AUTH_MOBILE: string;
@@ -139,6 +141,7 @@ export declare const CONNECT_EXPRESS_STEP_NAMES: {
139
141
  CONNECT_EXPRESS_SUCCESS: string;
140
142
  COLLECT_MOBILE_OWNERSHIP: string;
141
143
  COLLECT_MOBILE_OWNERSHIP_SKIPPED: string;
144
+ VERIFY_AUTH_MOBILE_OTP: string;
142
145
  };
143
146
  export declare const SignIn_STEP_NAMES: {
144
147
  CREATE_AUTH_MOBILE: string;
@@ -12,6 +12,7 @@ export var LOCAL_STORAGE_KEYS = {
12
12
  languageMode: 'languageMode'
13
13
  };
14
14
  export var SCOPE_AUTH = 'auth';
15
+ export var SCOPE_MERCHANT = 'merchant';
15
16
  export var DEFAULT_COUNTRY_ISO2 = 'KW';
16
17
  export var NAFATH_VERIFICATION_FAILED = 'nafath_verification_failed';
17
18
  export var COLLECT_DOB_INFO_NAFATH = 'collect_date_of_birth';
@@ -230,13 +231,22 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
230
231
  },
231
232
  {
232
233
  name: 'CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP',
233
- next: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'],
234
+ next: [
235
+ 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
236
+ 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
237
+ 'CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP'
238
+ ],
234
239
  prev: ['CONNECT_EXPRESS_NID_STEP', 'CONNECT_EXPRESS_NID_MISSED_STEP'],
235
240
  order: 5
236
241
  },
237
242
  {
238
243
  name: 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
239
- next: ['CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP', 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP', 'COLLECT_MOBILE_OWNERSHIP'],
244
+ next: [
245
+ 'CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP',
246
+ 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
247
+ 'COLLECT_MOBILE_OWNERSHIP',
248
+ 'CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP'
249
+ ],
240
250
  prev: [
241
251
  'CONNECT_EXPRESS_MOBILE_STEP',
242
252
  'CONNECT_EXPRESS_NID_STEP',
@@ -253,7 +263,8 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
253
263
  'CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP',
254
264
  'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
255
265
  'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
256
- 'CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP'
266
+ 'CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP',
267
+ 'CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP'
257
268
  ],
258
269
  prev: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_NID_MISSED_STEP'],
259
270
  order: 6
@@ -264,29 +275,40 @@ export var CONNECT_EXPRESS_SCREENS_NAVIGATION = [
264
275
  prev: 'CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP',
265
276
  order: 6
266
277
  },
278
+ {
279
+ name: 'CONNECT_EXPRESS_VERIFY_AUTH_OTP_STEP',
280
+ next: [
281
+ 'CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP',
282
+ 'COLLECT_MOBILE_OWNERSHIP',
283
+ 'CONNECT_EXPRESS_COLLECT_BUSINESS_INFO_STEP',
284
+ 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP'
285
+ ],
286
+ prev: ['CONNECT_EXPRESS_COLLECT_INDIVIDUAL_INFO_STEP', 'CONNECT_EXPRESS_COLLECT_DOB_INFO_STEP', 'COLLECT_MOBILE_OWNERSHIP'],
287
+ order: 7
288
+ },
267
289
  {
268
290
  name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
269
291
  next: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
270
292
  prev: '',
271
- order: 7
293
+ order: 8
272
294
  },
273
295
  {
274
296
  name: 'CONNECT_EXPRESS_PREPARING_DATA_STEP',
275
297
  next: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
276
298
  prev: '',
277
- order: 8
299
+ order: 9
278
300
  },
279
301
  {
280
302
  name: 'CONNECT_EXPRESS_ACCOUNT_ALREADY_CREATED_STEP',
281
303
  next: '',
282
304
  prev: '',
283
- order: 9
305
+ order: 10
284
306
  },
285
307
  {
286
308
  name: 'CONNECT_EXPRESS_SUCCESS_WITH_FLOW_BUTTONS_STEP',
287
309
  next: '',
288
310
  prev: '',
289
- order: 9
311
+ order: 11
290
312
  }
291
313
  ];
292
314
  export var AUTH_SCREENS_NAVIGATION = [
@@ -310,13 +332,13 @@ export var AUTH_SCREENS_NAVIGATION = [
310
332
  },
311
333
  {
312
334
  name: 'AUTH_MOBILE_STEP',
313
- next: 'AUTH_OTP_STEP',
335
+ next: ['AUTH_OTP_STEP', 'AUTH_PASSCODE_STEP'],
314
336
  prev: 'AUTH_SWITCH_STEP',
315
337
  order: 1
316
338
  },
317
339
  {
318
340
  name: 'AUTH_EMAIL_STEP',
319
- next: ['AUTH_PASSWORD_STEP', 'AUTH_RESET_PASSWORD_MESSAGE_STEP', 'AUTH_OTP_STEP'],
341
+ next: ['AUTH_PASSWORD_STEP', 'AUTH_RESET_PASSWORD_MESSAGE_STEP', 'AUTH_OTP_STEP', 'AUTH_PASSCODE_STEP'],
320
342
  prev: 'AUTH_SWITCH_STEP',
321
343
  order: 1
322
344
  },
@@ -334,10 +356,16 @@ export var AUTH_SCREENS_NAVIGATION = [
334
356
  },
335
357
  {
336
358
  name: 'AUTH_OTP_STEP',
337
- next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_EMAIL_SENT_STEP', 'AUTH_MIGRATING_DATA_STEP'],
359
+ next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_EMAIL_SENT_STEP', 'AUTH_MIGRATING_DATA_STEP', 'AUTH_PASSCODE_STEP'],
338
360
  prev: ['AUTH_MOBILE_STEP', 'AUTH_NID_STEP', 'AUTH_EMAIL_STEP', 'AUTH_PASSWORD_STEP'],
339
361
  order: 2
340
362
  },
363
+ {
364
+ name: 'AUTH_PASSCODE_STEP',
365
+ next: ['AUTH_OTP_STEP', 'AUTH_PREPARING_DATA_STEP', 'AUTH_MIGRATING_DATA_STEP'],
366
+ prev: ['AUTH_MOBILE_STEP', 'AUTH_EMAIL_STEP'],
367
+ order: 2
368
+ },
341
369
  {
342
370
  name: 'AUTH_NAFATH_VERIFY_STEP',
343
371
  next: ['AUTH_PREPARING_DATA_STEP', 'AUTH_DOB_STEP'],
@@ -1021,7 +1049,8 @@ export var AUTH_STEP_NAMES = {
1021
1049
  VERIFY_AUTH_EMAIL: 'auth_verify_auth_email',
1022
1050
  CREATE_AUTH_NID: 'auth_create_auth_nid',
1023
1051
  VERIFY_AUTH_NID: 'auth_verify_auth_nid',
1024
- UPDATE_DOB_INFO: 'auth_update_dob_info'
1052
+ UPDATE_DOB_INFO: 'auth_update_dob_info',
1053
+ CREATE_AUTH_PASSCODE: 'auth_create_auth_passcode'
1025
1054
  };
1026
1055
  export var CONNECT_EXPRESS_STEP_NAMES = {
1027
1056
  CREATE_AUTH_MOBILE: 'connect_express_create_auth_mobile',
@@ -1040,7 +1069,8 @@ export var CONNECT_EXPRESS_STEP_NAMES = {
1040
1069
  VERIFY_AUTH_PASSWORD: 'connect_express_verify_auth_password',
1041
1070
  CONNECT_EXPRESS_SUCCESS: 'connect_express_completed',
1042
1071
  COLLECT_MOBILE_OWNERSHIP: 'collect_owner_phone',
1043
- COLLECT_MOBILE_OWNERSHIP_SKIPPED: 'collect_owner_phone_skipped'
1072
+ COLLECT_MOBILE_OWNERSHIP_SKIPPED: 'collect_owner_phone_skipped',
1073
+ VERIFY_AUTH_MOBILE_OTP: 'connect_express_auth_mobile'
1044
1074
  };
1045
1075
  export var SignIn_STEP_NAMES = {
1046
1076
  CREATE_AUTH_MOBILE: 'signIn_create_auth_mobile',
@@ -1,7 +1,10 @@
1
1
  export declare const ICONS_BASE_URL = "https://dash.b-cdn.net";
2
2
  export declare const ICONS_PATH = "/icons/menu";
3
+ export declare const ASSETS_BASE_URL = "https://tap-assets.b-cdn.net";
4
+ export declare const ASSETS_PATH = "/icons/connect";
3
5
  export declare const ICONS_EXTENSION = ".svg";
4
6
  export declare const ICONS_FULL_PATH: string;
7
+ export declare const ASSETS_FULL_PATH: string;
5
8
  export declare const ICONS_NAMES: {
6
9
  SIDE_MENU_CLOSE_ICON: string;
7
10
  SIDE_MENU_CLOSE_ICON_DARK: string;
@@ -44,6 +47,7 @@ export declare const ICONS_NAMES: {
44
47
  NAFATH_LOGO: string;
45
48
  NAFATH_VERIFY_ICON: string;
46
49
  EXPRESS_ERROR_ICON: string;
50
+ TAP_LOGO: string;
47
51
  TAP_EN: string;
48
52
  TAP_AR: string;
49
53
  ID_IMAGE: string;
@@ -1,7 +1,13 @@
1
+ import { ThemeMode } from '../@types';
1
2
  export var ICONS_BASE_URL = 'https://dash.b-cdn.net';
2
3
  export var ICONS_PATH = '/icons/menu';
4
+ export var ASSETS_BASE_URL = 'https://tap-assets.b-cdn.net';
5
+ export var ASSETS_PATH = '/icons/connect';
3
6
  export var ICONS_EXTENSION = '.svg';
4
7
  export var ICONS_FULL_PATH = ICONS_BASE_URL + ICONS_PATH;
8
+ export var ASSETS_FULL_PATH = ASSETS_BASE_URL + ASSETS_PATH;
9
+ var generateAssetPath = function (name, theme) { return "".concat(ASSETS_BASE_URL).concat(ASSETS_PATH, "/").concat(theme, "/").concat(name).concat(ICONS_EXTENSION); };
10
+ var generateLightAssetPath = function (name) { return generateAssetPath(name, ThemeMode.LIGHT); };
5
11
  export var ICONS_NAMES = {
6
12
  SIDE_MENU_CLOSE_ICON: ICONS_FULL_PATH + '/side-menu-close' + ICONS_EXTENSION,
7
13
  SIDE_MENU_CLOSE_ICON_DARK: ICONS_FULL_PATH + '/side-menu-close-dark' + ICONS_EXTENSION,
@@ -41,9 +47,10 @@ export var ICONS_NAMES = {
41
47
  TAP_LOGO_TEXT_AR: ICONS_FULL_PATH + '/tap-white-text-ar' + ICONS_EXTENSION,
42
48
  TAP_LOGO_TEXT_EN: ICONS_FULL_PATH + '/tap-white-text-en' + ICONS_EXTENSION,
43
49
  PACI_VERIFY_ICON: ICONS_FULL_PATH + '/PACI_verify_icon' + '.png',
44
- NAFATH_LOGO: 'https://tap-assets.b-cdn.net/icons/connect/light/nafath_button_logo.svg',
45
- NAFATH_VERIFY_ICON: 'https://tap-assets.b-cdn.net/icons/connect/light/nafath_logo.svg',
50
+ NAFATH_LOGO: generateLightAssetPath('nafath_button_logo'),
51
+ NAFATH_VERIFY_ICON: generateLightAssetPath('nafath_logo'),
46
52
  EXPRESS_ERROR_ICON: ICONS_FULL_PATH + '/EXPRESS_error_icon' + '.svg',
53
+ TAP_LOGO: generateLightAssetPath('tap-logo'),
47
54
  TAP_EN: 'https://tap-connecet.b-cdn.net/imgs/tapEN' + ICONS_EXTENSION,
48
55
  TAP_AR: 'https://tap-connecet.b-cdn.net/imgs/tapAR' + ICONS_EXTENSION,
49
56
  ID_IMAGE: 'https://villageofwarwick.org/wp-content/uploads/2020/02/ICON99-512-1.png',
@@ -1,23 +1,38 @@
1
1
  import { RootState } from '../../../app/store';
2
- import { ActionState, AuthEmailFormValues, AuthForType, AuthMerchantFormValues, AuthenticationListFormValues, CivilFormValues, CountryCode, DOBFormValues, FlowsTypes, MobileFormValues, NIDFormValues, OTPFormValues, PasswordFormValues, SharedState } from '../../../@types';
2
+ import { ActionState, AuthEmailFormValues, AuthForType, AuthMerchantFormValues, AuthenticationListFormValues, CivilFormValues, CountryCode, DOBFormValues, FlowsTypes, MobileFormValues, NIDFormValues, OTPFormValues, PasscodeFormValues, PasswordFormValues, SharedState } from '../../../@types';
3
3
  export declare const updateBusinessCountry: import("@reduxjs/toolkit").AsyncThunk<any, string, {}>;
4
4
  export declare const retrieveLeadIdentityByIdAsync: import("@reduxjs/toolkit").AsyncThunk<{
5
5
  data: any;
6
6
  countryCode: CountryCode;
7
7
  }, string, {}>;
8
+ interface CreateMobileAuthParams extends MobileFormValues {
9
+ skipPasscode?: boolean;
10
+ }
8
11
  export declare const createMobileAuth: import("@reduxjs/toolkit").AsyncThunk<{
9
12
  response: any;
10
- formData: MobileFormValues;
11
- }, MobileFormValues, {}>;
13
+ formData: {
14
+ mobile: string;
15
+ countryCode: CountryCode;
16
+ termAndConditionChecked?: boolean | undefined;
17
+ };
18
+ skipPasscode: boolean | undefined;
19
+ }, CreateMobileAuthParams, {}>;
12
20
  export declare const resendMobileAuthOTP: import("@reduxjs/toolkit").AsyncThunk<{
13
21
  response: any;
14
22
  formData: MobileFormValues;
15
23
  }, MobileFormValues, {}>;
16
24
  export declare const verifyMobileOtp: import("@reduxjs/toolkit").AsyncThunk<any, OTPFormValues, {}>;
25
+ export declare const verifyPasscode: import("@reduxjs/toolkit").AsyncThunk<any, PasscodeFormValues, {}>;
26
+ interface CreateEmailAuthParams extends AuthEmailFormValues {
27
+ skipPasscode?: boolean;
28
+ }
17
29
  export declare const createEmailAuth: import("@reduxjs/toolkit").AsyncThunk<{
18
30
  response: any;
19
- formData: AuthEmailFormValues;
20
- }, AuthEmailFormValues, {}>;
31
+ formData: {
32
+ email: string;
33
+ };
34
+ skipPasscode: boolean | undefined;
35
+ }, CreateEmailAuthParams, {}>;
21
36
  export declare const verifyEmailPassword: import("@reduxjs/toolkit").AsyncThunk<any, PasswordFormValues, {}>;
22
37
  export declare const resendEmailAuthOTP: import("@reduxjs/toolkit").AsyncThunk<{
23
38
  response: any;
@@ -75,6 +90,10 @@ export interface authData {
75
90
  otpData: OTPFormValues & {
76
91
  authFor?: AuthForType;
77
92
  };
93
+ passcodeData: PasscodeFormValues & {
94
+ skipPasscode?: boolean;
95
+ allowOTPToPasscodeRedirection?: boolean;
96
+ };
78
97
  passwordData: PasswordFormValues;
79
98
  leadId?: string;
80
99
  isStartFromBusinessCountry?: boolean;