@tap-payments/auth-jsconnect 2.13.9-beta → 2.14.0-beta

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 (148) hide show
  1. package/build/@types/app.d.ts +2 -1
  2. package/build/@types/app.js +1 -0
  3. package/build/@types/index.d.ts +1 -0
  4. package/build/@types/index.js +1 -0
  5. package/build/@types/terminal.d.ts +104 -0
  6. package/build/@types/terminal.js +1 -0
  7. package/build/api/auth.d.ts +15 -1
  8. package/build/api/index.d.ts +7 -1
  9. package/build/api/index.js +3 -1
  10. package/build/api/terminal.d.ts +25 -0
  11. package/build/api/terminal.js +55 -0
  12. package/build/app/rootReducer.d.ts +1 -0
  13. package/build/app/rootReducer.js +3 -1
  14. package/build/app/store.d.ts +2 -0
  15. package/build/assets/locales/en.json +0 -1
  16. package/build/components/DeviceCard/DeviceCard.d.ts +19 -0
  17. package/build/components/DeviceCard/DeviceCard.js +102 -0
  18. package/build/components/DeviceCard/index.d.ts +3 -0
  19. package/build/components/DeviceCard/index.js +2 -0
  20. package/build/components/OTPTimer/OTPTimer.d.ts +2 -1
  21. package/build/components/OTPTimer/OTPTimer.js +4 -4
  22. package/build/components/TruncatedTooltipText/TruncatedTooltipText.d.ts +7 -0
  23. package/build/components/TruncatedTooltipText/TruncatedTooltipText.js +33 -0
  24. package/build/components/TruncatedTooltipText/index.d.ts +2 -0
  25. package/build/components/TruncatedTooltipText/index.js +2 -0
  26. package/build/constants/app.d.ts +12 -1
  27. package/build/constants/app.js +133 -0
  28. package/build/constants/flows.d.ts +16 -0
  29. package/build/constants/flows.js +16 -0
  30. package/build/constants/validation.d.ts +1 -0
  31. package/build/constants/validation.js +1 -0
  32. package/build/features/app/terminal/terminalStore.d.ts +110 -0
  33. package/build/features/app/terminal/terminalStore.js +703 -0
  34. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +10 -7
  35. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  36. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +6 -4
  37. package/build/features/auth/screens/AuthenticationList/EntityList.js +9 -1
  38. package/build/features/business/screens/BusinessType/BusinessType.js +2 -3
  39. package/build/features/business/screens/BusinessType/LicenseList.js +5 -5
  40. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +10 -10
  41. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  42. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +6 -4
  43. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +9 -1
  44. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -11
  45. package/build/features/connectExpress/screens/Mobile/Mobile.js +7 -6
  46. package/build/features/featuresScreens.d.ts +1 -0
  47. package/build/features/featuresScreens.js +72 -0
  48. package/build/features/shared/Button/Button.js +1 -1
  49. package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
  50. package/build/features/shared/Button/FlowsButtons.js +2 -2
  51. package/build/features/shared/PushNotification/PushNotification.d.ts +11 -0
  52. package/build/features/shared/PushNotification/PushNotification.js +34 -0
  53. package/build/features/shared/PushNotification/index.d.ts +2 -0
  54. package/build/features/shared/PushNotification/index.js +2 -0
  55. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
  56. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +5 -4
  57. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
  58. package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
  59. package/build/features/terminal/Terminal.d.ts +14 -0
  60. package/build/features/terminal/Terminal.js +95 -0
  61. package/build/features/terminal/index.d.ts +1 -0
  62. package/build/features/terminal/index.js +1 -0
  63. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +3 -0
  64. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +68 -0
  65. package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +2 -0
  66. package/build/features/terminal/screens/LinkNewTerminal/index.js +2 -0
  67. package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +10 -0
  68. package/build/features/terminal/screens/LinkNewTerminal/styles.js +28 -0
  69. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +3 -0
  70. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +50 -0
  71. package/build/features/terminal/screens/LinkedSuccess/index.d.ts +2 -0
  72. package/build/features/terminal/screens/LinkedSuccess/index.js +2 -0
  73. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +3 -0
  74. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +55 -0
  75. package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +2 -0
  76. package/build/features/terminal/screens/LinkedTerminalInfo/index.js +2 -0
  77. package/build/features/terminal/screens/Loading/Loading.d.ts +4 -0
  78. package/build/features/terminal/screens/Loading/Loading.js +10 -0
  79. package/build/features/terminal/screens/Loading/index.d.ts +2 -0
  80. package/build/features/terminal/screens/Loading/index.js +2 -0
  81. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +3 -0
  82. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +103 -0
  83. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +2 -0
  84. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +2 -0
  85. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +36 -0
  86. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +34 -0
  87. package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +5 -0
  88. package/build/features/terminal/screens/OperatorError/OperatorError.js +9 -0
  89. package/build/features/terminal/screens/OperatorError/index.d.ts +2 -0
  90. package/build/features/terminal/screens/OperatorError/index.js +2 -0
  91. package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.d.ts +3 -0
  92. package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.js +50 -0
  93. package/build/features/terminal/screens/POSDeviceListPage/index.d.ts +2 -0
  94. package/build/features/terminal/screens/POSDeviceListPage/index.js +2 -0
  95. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +3 -0
  96. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
  97. package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +2 -0
  98. package/build/features/terminal/screens/ResetPasswordSuccess/index.js +2 -0
  99. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  100. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
  101. package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  102. package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +2 -0
  103. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +9 -0
  104. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +20 -0
  105. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +3 -0
  106. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +153 -0
  107. package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +2 -0
  108. package/build/features/terminal/screens/TerminalDeviceList/index.js +2 -0
  109. package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +9 -0
  110. package/build/features/terminal/screens/TerminalDeviceList/styles.js +13 -0
  111. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +3 -0
  112. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +51 -0
  113. package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +2 -0
  114. package/build/features/terminal/screens/UnlinkedSuccess/index.js +2 -0
  115. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +3 -0
  116. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +99 -0
  117. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +2 -0
  118. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +2 -0
  119. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +26 -0
  120. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +30 -0
  121. package/build/features/terminal/screens/Verify/OTPInput.d.ts +7 -0
  122. package/build/features/terminal/screens/Verify/OTPInput.js +51 -0
  123. package/build/features/terminal/screens/Verify/Verify.d.ts +5 -0
  124. package/build/features/terminal/screens/Verify/Verify.js +89 -0
  125. package/build/features/terminal/screens/Verify/index.d.ts +2 -0
  126. package/build/features/terminal/screens/Verify/index.js +2 -0
  127. package/build/features/terminal/screens/Verify/validation.d.ts +8 -0
  128. package/build/features/terminal/screens/Verify/validation.js +4 -0
  129. package/build/features/terminal/screens/shared/Header.d.ts +10 -0
  130. package/build/features/terminal/screens/shared/Header.js +30 -0
  131. package/build/features/terminal/screens/shared/POSDeviceList.d.ts +11 -0
  132. package/build/features/terminal/screens/shared/POSDeviceList.js +30 -0
  133. package/build/features/terminal/screens/shared/index.d.ts +5 -0
  134. package/build/features/terminal/screens/shared/index.js +5 -0
  135. package/build/features/terminal/screens/shared/styles.d.ts +196 -0
  136. package/build/features/terminal/screens/shared/styles.js +155 -0
  137. package/build/features/terminal/screens/shared/utils.d.ts +7 -0
  138. package/build/features/terminal/screens/shared/utils.js +24 -0
  139. package/build/hooks/useAppDispatch.d.ts +1 -0
  140. package/build/index.d.ts +3 -2
  141. package/build/index.js +4 -2
  142. package/build/theme/palette.js +12 -0
  143. package/build/theme/typography.js +4 -0
  144. package/build/utils/error.d.ts +1 -0
  145. package/build/utils/error.js +3 -0
  146. package/build/utils/string.d.ts +2 -1
  147. package/build/utils/string.js +11 -2
  148. package/package.json +1 -1
@@ -43,7 +43,7 @@ export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
43
43
  };
44
44
  export declare const removeRequestHeaders: () => void;
45
45
  export declare const getBaseUrl: () => string;
46
- export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean, isOtherThanSAOrKWCountry?: boolean) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP" | "INDIVIDUAL_LIST_STEP" | "PASSWORD_CREATE_PASSWORD_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP" | "ENTITY_NAME_STEP" | "BRAND_INFO_STEP";
46
+ export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean, isOtherThanSAOrKWCountry?: boolean, terminalStepName?: string) => string;
47
47
  export declare const getEighteenYearsAgo: () => string;
48
48
  export declare const isKW: (flag: string) => boolean;
49
49
  export declare const isSA: (flag: string | undefined) => boolean;
@@ -78,4 +78,5 @@ export declare const formatNumberAsCurrency: (number: string) => string;
78
78
  export declare const getCurrencyByCountryIso2: (countryCode?: string) => string;
79
79
  export declare const getMobileNumberLen: (initialLen: number, number: string) => number;
80
80
  export declare const getWebsiteLink: (isAr: boolean, countryCode: string, path: string) => string;
81
+ export declare function formatCode(code: string, chunkSize?: number, delimiter?: string): string;
81
82
  export declare const isDisasterRecoveryEnv: (type?: string) => boolean;
@@ -1,7 +1,7 @@
1
1
  import { FlowsTypes } from '../@types';
2
2
  import { concatenateObjectValues, encryptString } from '.';
3
3
  import { removeAxiosGlobalHeaders } from '../api';
4
- import { COUNTRY_TO_CURRENCY, ENDPOINT_PATHS, ICONS_FULL_PATH, LANGUAGE_ABBREVIATIONS, TAP_WEBSITE } from '../constants';
4
+ import { CONNECT_FLOWS, COUNTRY_TO_CURRENCY, ENDPOINT_PATHS, ICONS_FULL_PATH, LANGUAGE_ABBREVIATIONS, TAP_WEBSITE } from '../constants';
5
5
  import moment from 'moment';
6
6
  export var maskPhone = function (str) {
7
7
  if (str === void 0) { str = ''; }
@@ -179,7 +179,7 @@ export var getBaseUrl = function () {
179
179
  }
180
180
  return ENDPOINT_PATHS.PRODUCTION_BASE_URL;
181
181
  };
182
- export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser, isOtherThanSAOrKWCountry) {
182
+ export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser, isOtherThanSAOrKWCountry, terminalStepName) {
183
183
  if (flow === FlowsTypes.BANK) {
184
184
  return 'BANK_BANK_DETAILS_STEP';
185
185
  }
@@ -204,6 +204,9 @@ export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser, isOtherT
204
204
  if (flow === FlowsTypes.PASSWORD) {
205
205
  return 'PASSWORD_CREATE_PASSWORD_STEP';
206
206
  }
207
+ if (flow === FlowsTypes.TERMINAL) {
208
+ return terminalStepName !== null && terminalStepName !== void 0 ? terminalStepName : CONNECT_FLOWS.terminal.terminalDeviceList;
209
+ }
207
210
  return '';
208
211
  };
209
212
  export var getEighteenYearsAgo = function () {
@@ -346,4 +349,10 @@ export var getWebsiteLink = function (isAr, countryCode, path) {
346
349
  var language = isAr ? LANGUAGE_ABBREVIATIONS.ARABIC : LANGUAGE_ABBREVIATIONS.ENGLISH;
347
350
  return TAP_WEBSITE + language + '-' + countryCode + path;
348
351
  };
352
+ export function formatCode(code, chunkSize, delimiter) {
353
+ var _a;
354
+ if (chunkSize === void 0) { chunkSize = 3; }
355
+ if (delimiter === void 0) { delimiter = ' - '; }
356
+ return ((_a = code.match(new RegExp(".{1,".concat(chunkSize, "}"), 'g'))) === null || _a === void 0 ? void 0 : _a.join(delimiter)) || code;
357
+ }
349
358
  export var isDisasterRecoveryEnv = function (type) { return type === 'dr'; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.13.9-beta",
3
+ "version": "2.14.0-beta",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",