@tap-payments/auth-jsconnect 2.8.98-development → 2.9.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.
Files changed (218) hide show
  1. package/README.md +2 -2
  2. package/build/@types/app.d.ts +13 -4
  3. package/build/@types/app.js +8 -0
  4. package/build/@types/config.d.ts +4 -0
  5. package/build/@types/form.d.ts +7 -0
  6. package/build/api/account.d.ts +3 -1
  7. package/build/api/account.js +7 -0
  8. package/build/api/auth.d.ts +20 -1
  9. package/build/api/index.d.ts +8 -4
  10. package/build/api/lead.d.ts +2 -0
  11. package/build/api/lead.js +16 -0
  12. package/build/api/user.d.ts +7 -0
  13. package/build/api/user.js +9 -1
  14. package/build/app/rootReducer.d.ts +1 -0
  15. package/build/app/rootReducer.js +3 -1
  16. package/build/app/settings.d.ts +1 -0
  17. package/build/app/settings.js +14 -8
  18. package/build/app/store.d.ts +2 -0
  19. package/build/assets/currencies/AEDSymbol.d.ts +7 -0
  20. package/build/assets/currencies/AEDSymbol.js +28 -0
  21. package/build/assets/currencies/SARSymbol.d.ts +7 -0
  22. package/build/assets/currencies/SARSymbol.js +28 -0
  23. package/build/assets/currencies/index.d.ts +2 -0
  24. package/build/assets/currencies/index.js +2 -0
  25. package/build/assets/currencies/utils.d.ts +4 -0
  26. package/build/assets/currencies/utils.js +6 -0
  27. package/build/assets/locales/ar.json +40 -12
  28. package/build/assets/locales/en.json +63 -9
  29. package/build/components/AnimationFlow/BottomSheet.js +16 -12
  30. package/build/components/AnimationFlow/Dialog.js +3 -1
  31. package/build/components/Input/Input.js +1 -1
  32. package/build/components/TextWithCurrency/TextWithCurrency.d.ts +7 -0
  33. package/build/components/TextWithCurrency/TextWithCurrency.js +14 -0
  34. package/build/components/TextWithCurrency/index.d.ts +2 -0
  35. package/build/components/TextWithCurrency/index.js +2 -0
  36. package/build/components/Tooltip/Tooltip.js +1 -1
  37. package/build/constants/api.d.ts +2 -0
  38. package/build/constants/api.js +4 -0
  39. package/build/constants/app.d.ts +27 -0
  40. package/build/constants/app.js +151 -17
  41. package/build/constants/assets.d.ts +12 -3
  42. package/build/constants/assets.js +123 -105
  43. package/build/constants/dummy.js +27 -20
  44. package/build/constants/flows.d.ts +26 -0
  45. package/build/constants/flows.js +27 -0
  46. package/build/constants/index.d.ts +1 -0
  47. package/build/constants/index.js +1 -0
  48. package/build/constants/validation.d.ts +1 -0
  49. package/build/constants/validation.js +1 -0
  50. package/build/features/app/auth/authStore.d.ts +24 -5
  51. package/build/features/app/auth/authStore.js +197 -95
  52. package/build/features/app/board/boardStore.d.ts +5 -1
  53. package/build/features/app/board/boardStore.js +40 -35
  54. package/build/features/app/business/businessStore.d.ts +10 -1
  55. package/build/features/app/business/businessStore.js +164 -35
  56. package/build/features/app/connect/connectStore.d.ts +8 -1
  57. package/build/features/app/connect/connectStore.js +181 -68
  58. package/build/features/app/connectExpress/connectExpressStore.d.ts +21 -3
  59. package/build/features/app/connectExpress/connectExpressStore.js +448 -117
  60. package/build/features/app/individual/individualStore.d.ts +1 -1
  61. package/build/features/app/individual/individualStore.js +40 -33
  62. package/build/features/app/kyc/kycStore.d.ts +67 -0
  63. package/build/features/app/kyc/kycStore.js +432 -0
  64. package/build/features/app/signIn/signInStore.js +19 -15
  65. package/build/features/auth/Auth.d.ts +1 -1
  66. package/build/features/auth/screens/Mobile/MobileNumber.js +5 -7
  67. package/build/features/auth/screens/Mobile/validation.js +5 -2
  68. package/build/features/auth/screens/OTP/OTP.d.ts +13 -2
  69. package/build/features/auth/screens/OTP/OTP.js +15 -3
  70. package/build/features/auth/screens/OTP/index.d.ts +1 -2
  71. package/build/features/auth/screens/Passcode/Passcode.d.ts +16 -0
  72. package/build/features/auth/screens/Passcode/Passcode.js +82 -0
  73. package/build/features/auth/screens/Passcode/PasscodeInput.d.ts +6 -0
  74. package/build/features/auth/screens/Passcode/PasscodeInput.js +42 -0
  75. package/build/features/auth/screens/Passcode/index.d.ts +2 -0
  76. package/build/features/auth/screens/Passcode/index.js +2 -0
  77. package/build/features/auth/screens/Passcode/validation.d.ts +8 -0
  78. package/build/features/auth/screens/Passcode/validation.js +4 -0
  79. package/build/features/bank/Bank.d.ts +5 -1
  80. package/build/features/bank/Bank.js +15 -7
  81. package/build/features/board/Board.js +1 -1
  82. package/build/features/brand/Brand.d.ts +5 -1
  83. package/build/features/brand/Brand.js +15 -7
  84. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +3 -8
  85. package/build/features/business/screens/Customers/ExpectedSalesRange.js +3 -8
  86. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  87. package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +103 -0
  88. package/build/features/business/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  89. package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
  90. package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
  91. package/build/features/business/screens/MobileOwnership/index.js +2 -0
  92. package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
  93. package/build/features/business/screens/MobileOwnership/validation.js +38 -0
  94. package/build/features/connect/Connect.js +1 -1
  95. package/build/features/connect/screens/Individual/MobileNumber.js +5 -7
  96. package/build/features/connect/screens/Individual/validation.js +5 -2
  97. package/build/features/connect/screens/Mobile/MobileNumber.js +5 -7
  98. package/build/features/connect/screens/Mobile/validation.js +5 -2
  99. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  100. package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +104 -0
  101. package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  102. package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
  103. package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
  104. package/build/features/connect/screens/MobileOwnership/index.js +2 -0
  105. package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
  106. package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
  107. package/build/features/connectExpress/ConnectExpress.js +1 -1
  108. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +5 -7
  109. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +5 -2
  110. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.d.ts +3 -0
  111. package/build/features/connectExpress/screens/GenericPrepareDataLoading/GenericPrepareDataLoading.js +9 -0
  112. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.d.ts +2 -0
  113. package/build/features/connectExpress/screens/GenericPrepareDataLoading/index.js +2 -0
  114. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +5 -7
  115. package/build/features/connectExpress/screens/Mobile/validation.js +9 -4
  116. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
  117. package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
  118. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
  119. package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
  120. package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
  121. package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
  122. package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
  123. package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
  124. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.d.ts +5 -0
  125. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/OTPInput.js +49 -0
  126. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.d.ts +5 -0
  127. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/VerifyMobileAuthOTP.js +88 -0
  128. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.d.ts +3 -0
  129. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/index.js +2 -0
  130. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.d.ts +8 -0
  131. package/build/features/connectExpress/screens/VerifyMobileAuthOTP/validation.js +4 -0
  132. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +9 -3
  133. package/build/features/entity/Entity.d.ts +4 -1
  134. package/build/features/entity/Entity.js +15 -7
  135. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +3 -7
  136. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +3 -7
  137. package/build/features/featuresScreens.d.ts +1 -0
  138. package/build/features/featuresScreens.js +73 -0
  139. package/build/features/individual/Individual.d.ts +4 -1
  140. package/build/features/individual/Individual.js +15 -7
  141. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +3 -8
  142. package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +3 -8
  143. package/build/features/individual/screens/IndividualList/MobileNumber.js +5 -10
  144. package/build/features/individual/screens/IndividualList/validation.js +5 -3
  145. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +3 -5
  146. package/build/features/individual/screens/IndividualPersonalInfo/validation.js +5 -2
  147. package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +5 -10
  148. package/build/features/individual/screens/IndividualPhoneInfo/validation.js +5 -2
  149. package/build/features/kyc/KYC.d.ts +11 -0
  150. package/build/features/kyc/KYC.js +99 -0
  151. package/build/features/kyc/index.d.ts +1 -0
  152. package/build/features/kyc/index.js +1 -0
  153. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.d.ts +5 -0
  154. package/build/features/kyc/screens/AlreadySubmitted/AlreadySubmitted.js +19 -0
  155. package/build/features/kyc/screens/AlreadySubmitted/index.d.ts +2 -0
  156. package/build/features/kyc/screens/AlreadySubmitted/index.js +2 -0
  157. package/build/features/kyc/screens/Loading/Loading.d.ts +4 -0
  158. package/build/features/kyc/screens/Loading/Loading.js +10 -0
  159. package/build/features/kyc/screens/Loading/index.d.ts +2 -0
  160. package/build/features/kyc/screens/Loading/index.js +2 -0
  161. package/build/features/kyc/screens/OperatorError/OperatorError.d.ts +5 -0
  162. package/build/features/kyc/screens/OperatorError/OperatorError.js +9 -0
  163. package/build/features/kyc/screens/OperatorError/index.d.ts +2 -0
  164. package/build/features/kyc/screens/OperatorError/index.js +2 -0
  165. package/build/features/kyc/screens/Success/Success.d.ts +5 -0
  166. package/build/features/kyc/screens/Success/Success.js +32 -0
  167. package/build/features/kyc/screens/Success/index.d.ts +2 -0
  168. package/build/features/kyc/screens/Success/index.js +2 -0
  169. package/build/features/kyc/screens/Terms/Header.d.ts +6 -0
  170. package/build/features/kyc/screens/Terms/Header.js +36 -0
  171. package/build/features/kyc/screens/Terms/Terms.d.ts +4 -0
  172. package/build/features/kyc/screens/Terms/Terms.js +87 -0
  173. package/build/features/kyc/screens/Terms/index.d.ts +2 -0
  174. package/build/features/kyc/screens/Terms/index.js +2 -0
  175. package/build/features/kyc/screens/TokenError/TokenError.d.ts +5 -0
  176. package/build/features/kyc/screens/TokenError/TokenError.js +9 -0
  177. package/build/features/kyc/screens/TokenError/index.d.ts +2 -0
  178. package/build/features/kyc/screens/TokenError/index.js +2 -0
  179. package/build/features/kyc/screens/Users/Users.d.ts +3 -0
  180. package/build/features/kyc/screens/Users/Users.js +76 -0
  181. package/build/features/kyc/screens/Users/index.d.ts +2 -0
  182. package/build/features/kyc/screens/Users/index.js +2 -0
  183. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
  184. package/build/features/kyc/screens/VerifyNafath/VerifyNafath.js +45 -0
  185. package/build/features/kyc/screens/VerifyNafath/index.d.ts +3 -0
  186. package/build/features/kyc/screens/VerifyNafath/index.js +2 -0
  187. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.d.ts +5 -0
  188. package/build/features/kyc/screens/VerifyPaci/VerifyPACI.js +44 -0
  189. package/build/features/kyc/screens/VerifyPaci/index.d.ts +3 -0
  190. package/build/features/kyc/screens/VerifyPaci/index.js +2 -0
  191. package/build/features/password/Password.d.ts +4 -1
  192. package/build/features/password/Password.js +13 -6
  193. package/build/features/shared/Background/LogoBackground.js +5 -17
  194. package/build/features/shared/Button/Button.js +1 -2
  195. package/build/features/shared/Button/FlowsButtons.js +5 -2
  196. package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
  197. package/build/features/shared/Containers/FeatureContainer.js +5 -3
  198. package/build/features/shared/Dialog/DialogContainer.js +5 -4
  199. package/build/features/shared/Input/Input.d.ts +1 -1
  200. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  201. package/build/features/signIn/screens/Mobile/MobileNumber.js +5 -7
  202. package/build/features/signIn/screens/Mobile/validation.js +5 -2
  203. package/build/features/tax/Tax.d.ts +4 -1
  204. package/build/features/tax/Tax.js +15 -7
  205. package/build/hooks/useAppConfig.js +1 -1
  206. package/build/hooks/useAppDispatch.d.ts +1 -0
  207. package/build/hooks/useSanitizedTranslation.d.ts +2 -1
  208. package/build/hooks/useSanitizedTranslation.js +2 -2
  209. package/build/index.d.ts +3 -2
  210. package/build/index.js +4 -2
  211. package/build/theme/shadows.js +1 -1
  212. package/build/utils/common.d.ts +1 -1
  213. package/build/utils/common.js +6 -5
  214. package/build/utils/error.d.ts +1 -0
  215. package/build/utils/error.js +3 -0
  216. package/build/utils/string.d.ts +5 -2
  217. package/build/utils/string.js +16 -2
  218. package/package.json +3 -4
@@ -53,8 +53,7 @@ var BackIconStyled = styled(Icon, { shouldForwardProp: function (prop) { return
53
53
  var ButtonBoxStyled = styled(Box)(function (_a) {
54
54
  var theme = _a.theme;
55
55
  return ({
56
- margin: theme.spacing(0, 2.5, 2.5, 2.5),
57
- marginBlockStart: theme.spacing(5),
56
+ margin: theme.spacing(5, 2.5, 2.5, 2.5),
58
57
  maxHeight: theme.spacing(5.375),
59
58
  display: 'flex',
60
59
  alignItems: 'center',
@@ -129,6 +129,9 @@ var CheckIconStyled = styled(CheckIcon)(function (_a) {
129
129
  color: theme.palette.success.main
130
130
  });
131
131
  });
132
+ var LinkStyled = styled(Link)(function () { return ({
133
+ display: 'flex'
134
+ }); });
132
135
  var BrandImage = styled(Box)(function (_a) {
133
136
  var theme = _a.theme;
134
137
  return ({
@@ -233,11 +236,11 @@ export default function FlowsButtons(_a) {
233
236
  return (_jsxs(ButtonBoxStyled, { children: [buttons.map(function (_a, idx) {
234
237
  var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc, isCompleted = _a.isCompleted, sx = _a.sx, name = _a.name, status = _a.status, token = _a.token;
235
238
  var isLast = idx === buttons.length - 1;
236
- return (_jsx(Link, __assign({ underline: 'none', onClick: function () {
239
+ return (_jsx(LinkStyled, __assign({ underline: 'none', onClick: function () {
237
240
  if (isResetPassword(name, status))
238
241
  onResetPassword();
239
242
  else
240
243
  onRedirect({ title: title, href: href, src: src, hoverSrc: hoverSrc, isCompleted: isCompleted, name: name, status: status, token: token });
241
- } }, { children: _jsx(ButtonStyled, __assign({ variant: 'outlined', disabled: isResetPassword(name, status) && loading, isCompleted: isCompleted, hasUrl: !!href, sx: __assign({ mb: isLast ? 2.5 : 1.8 }, sx), endIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [name !== 'password' && _jsx(Dot, { completed: status === 'complete' || status === 'completed' || status === 'reviewed' }), _jsx(Image, { sx: { height: 15, transform: isAr ? 'scale(-1)' : 'scale(1)', marginInlineStart: 0 }, src: ICONS_NAMES.Arrow_filled_right_icon })] }))), startIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isBrand(name) ? (_jsx(_Fragment, { children: _jsx(BrandImage, { children: _jsx(BrandNameStyled, { children: brandName }) }) })) : (_jsx(Image, { src: src, alt: title })), type: 'button' }, { children: title })) }), idx));
244
+ } }, { children: _jsx(ButtonStyled, __assign({ variant: 'outlined', disabled: isResetPassword(name, status) && loading, isCompleted: isCompleted, hasUrl: !!href, sx: __assign({ mb: isLast ? 2.5 : 1.8 }, sx), endIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [name !== 'password' && _jsx(Dot, { completed: ['complete', 'completed', 'reviewed'].includes(status === null || status === void 0 ? void 0 : status.toLowerCase()) }), _jsx(Image, { sx: { height: 15, transform: isAr ? 'scale(-1)' : 'scale(1)', marginInlineStart: 0 }, src: ICONS_NAMES.Arrow_filled_right_icon })] }))), startIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isBrand(name) ? (_jsx(_Fragment, { children: _jsx(BrandImage, { children: _jsx(BrandNameStyled, { children: brandName }) }) })) : (_jsx(Image, { src: src, alt: title })), type: 'button' }, { children: title })) }), idx));
242
245
  }), onClose && (_jsx(SharedButton, __assign({ sx: { mt: 2.5, ml: 0, mr: 0 }, isAr: isAr, disableBack: true, loading: storeLoading, onClick: onClose }, { children: t('close_and_complete_later') })))] }));
243
246
  }
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import { BoxProps } from '@mui/material/Box';
3
3
  interface FeatureContainerProps extends BoxProps {
4
4
  isMaturityExpress?: boolean;
5
+ isTapOrigin?: boolean;
5
6
  mode?: 'popup' | 'page' | 'content';
6
7
  }
7
- declare const FeatureContainer: React.ForwardRefExoticComponent<Pick<FeatureContainerProps, "left" | "right" | "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "translate" | "slot" | "title" | "children" | "component" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "isMaturityExpress" | "mode"> & React.RefAttributes<unknown>>;
8
+ declare const FeatureContainer: React.ForwardRefExoticComponent<Pick<FeatureContainerProps, "left" | "right" | "className" | "style" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "translate" | "slot" | "title" | "children" | "component" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "isMaturityExpress" | "isTapOrigin" | "mode"> & React.RefAttributes<unknown>>;
8
9
  export default FeatureContainer;
@@ -13,9 +13,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import React from 'react';
14
14
  import { styled } from '@mui/material/styles';
15
15
  import Box from '@mui/material/Box';
16
- var Container = styled(Box, { shouldForwardProp: function (prop) { return !['isMaturityExpress', 'mode'].includes(prop); } })(function (_a) {
16
+ var Container = styled(Box, {
17
+ shouldForwardProp: function (prop) { return !['isMaturityExpress', 'mode', 'isTapOrigin'].includes(prop); }
18
+ })(function (_a) {
17
19
  var _b;
18
- var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, mode = _a.mode;
20
+ var theme = _a.theme, isMaturityExpress = _a.isMaturityExpress, mode = _a.mode, isTapOrigin = _a.isTapOrigin;
19
21
  return (_b = {
20
22
  width: '100%',
21
23
  minHeight: theme.spacing(30),
@@ -27,7 +29,7 @@ var Container = styled(Box, { shouldForwardProp: function (prop) { return !['isM
27
29
  property: 'all'
28
30
  },
29
31
  _b[theme.breakpoints.down('sm')] = {
30
- paddingTop: isMaturityExpress || mode === 'content' ? theme.spacing(0.625) : theme.spacing(6)
32
+ paddingTop: (isMaturityExpress && !isTapOrigin) || mode === 'content' ? theme.spacing(1.25) : theme.spacing(6)
31
33
  },
32
34
  _b);
33
35
  });
@@ -21,7 +21,8 @@ var CloseIconStyled = styled(Icon)(function (_a) {
21
21
  var theme = _a.theme;
22
22
  return ({
23
23
  width: theme.spacing(3.75),
24
- height: theme.spacing(3.75)
24
+ height: theme.spacing(3.75),
25
+ cursor: 'pointer'
25
26
  });
26
27
  });
27
28
  var CloseBox = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
@@ -31,11 +32,11 @@ var CloseBox = styled(Box, { shouldForwardProp: function (prop) { return prop !=
31
32
  justifyContent: 'end',
32
33
  marginBlockStart: theme.spacing(2),
33
34
  marginInlineEnd: theme.spacing(2),
34
- cursor: 'pointer',
35
35
  direction: theme.direction,
36
36
  position: isTapOrigin ? 'initial' : 'absolute',
37
37
  right: 0,
38
- left: 0
38
+ left: 0,
39
+ zIndex: 9999
39
40
  });
40
41
  });
41
42
  export default function Dialog(_a) {
@@ -52,5 +53,5 @@ export default function Dialog(_a) {
52
53
  var handleOnCancel = function () {
53
54
  setOpen(false);
54
55
  };
55
- return (_jsxs(_Fragment, { children: [onClose && (_jsx(CloseBox, __assign({ isTapOrigin: isTapOrigin, id: 'close-container', onClick: handleOnCloseButton }, { children: _jsx(CloseIconStyled, { src: ICONS_NAMES.CLOSE_ICON }) }))), children, onClose && (_jsx(CloseDialog, { message: t('confirm_close_flow_title'), confirmTitle: t('confirm_close_flow_yes'), closeTitle: t('confirm_close_flow_no'), open: open, onConfirm: handleOnConfirm, onCancel: handleOnCancel }))] }));
56
+ return (_jsxs(_Fragment, { children: [onClose && (_jsx(CloseBox, __assign({ isTapOrigin: isTapOrigin, id: 'close-container' }, { children: _jsx(CloseIconStyled, { src: ICONS_NAMES.CLOSE_ICON, onClick: handleOnCloseButton }) }))), children, onClose && (_jsx(CloseDialog, { message: t('confirm_close_flow_title'), confirmTitle: t('confirm_close_flow_yes'), closeTitle: t('confirm_close_flow_no'), open: open, onConfirm: handleOnConfirm, onCancel: handleOnCancel }))] }));
56
57
  }
@@ -20,7 +20,7 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
20
20
  warningType?: "alert" | "error" | "hint" | undefined;
21
21
  } & {} & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
22
22
  export interface CustomInputProps extends InputProps {
23
- label?: string;
23
+ label?: string | JSX.Element;
24
24
  required?: boolean;
25
25
  labelSx?: SxProps<Theme>;
26
26
  }
@@ -58,6 +58,6 @@ var ThankYou = function (_a) {
58
58
  var title = _a.title, description = _a.description, showEmailProviders = _a.showEmailProviders, onSuccess = _a.onSuccess, successTitle = _a.successTitle, loading = _a.loading, error = _a.error, enableBack = _a.enableBack, onBack = _a.onBack;
59
59
  var t = useTranslation().t;
60
60
  var isAr = useLanguage().isAr;
61
- return (_jsxs(ContainerStyled, { children: [_jsx(IconStyled, { src: ICONS_NAMES.SUCCESS_GIF, alt: 'loading...' }), _jsxs(TitleStyled, { children: [title, " "] }), _jsx(DescriptionStyled, { children: description }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'mailto:' }, mail: { title: t('mail_btn_open_title'), href: 'mailto:' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ onClick: onSuccess, disableBack: true, disableNextIcon: true, disabled: loading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t(successTitle || '') })) })), enableBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 0 }, onClick: function () { return onBack === null || onBack === void 0 ? void 0 : onBack(); }, variant: 'text' }, { children: t('back') })))] }));
61
+ return (_jsxs(ContainerStyled, { children: [_jsx(IconStyled, { src: ICONS_NAMES.SUCCESS_GIF, alt: 'loading...' }), _jsxs(TitleStyled, { children: [title, " "] }), description && _jsx(DescriptionStyled, { children: description }), showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(EmailProvidersButton, { gmail: { title: t('gmail_btn_open_title'), href: 'https://mail.google.com/mail/u/0/#inbox' }, outlook: { title: t('outlook_btn_open_title'), href: 'https://outlook.live.com/mail/0/' }, apple: { title: t('apple_btn_open_title'), href: 'mailto:' }, mail: { title: t('mail_btn_open_title'), href: 'mailto:' } }) })), onSuccess && !showEmailProviders && (_jsx(MailBoxStyled, { children: _jsx(SuccessButton, __assign({ onClick: onSuccess, disableBack: true, disableNextIcon: true, disabled: loading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t(successTitle || '') })) })), enableBack && (_jsx(Button, __assign({ sx: { mb: 1.5, mt: 0 }, onClick: function () { return onBack === null || onBack === void 0 ? void 0 : onBack(); }, variant: 'text' }, { children: t('back') })))] }));
62
62
  };
63
63
  export default React.memo(ThankYou);
@@ -35,7 +35,7 @@ import { signInSelector } from '../../../app/signIn/signInStore';
35
35
  import ExpandIcon from '../../../../components/ExpandIcon';
36
36
  import Input from '../../../shared/Input';
37
37
  import SimpleList from '../../../../components/SimpleList';
38
- import { removeAllCharsFromNumber } from '../../../../utils';
38
+ import { getMobileNumberLen, removeAllCharsFromNumber } from '../../../../utils';
39
39
  import { useLanguage, useAppSelector } from '../../../../hooks';
40
40
  import Search from '../../../shared/Search';
41
41
  var LabelContainerStyled = styled(Box)(function (_a) {
@@ -97,10 +97,8 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
97
97
  var isSA = countryCodeValue.iso2 === 'SA';
98
98
  var mobileMaxLen = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.max_digits;
99
99
  var mobileMinLen = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.min_digits;
100
- var isStartsWith5 = mobileValue.startsWith('5');
101
- var requiredSALen = isStartsWith5 ? mobileMaxLen - 1 : mobileMaxLen;
102
- var requiredMinLen = isSA ? requiredSALen : mobileMinLen;
103
- var requiredMaxLen = isSA ? requiredSALen : mobileMaxLen;
100
+ var requiredMaxLen = getMobileNumberLen(mobileMaxLen, mobileValue);
101
+ var requiredMinLen = getMobileNumberLen(mobileMinLen, mobileValue);
104
102
  React.useEffect(function () {
105
103
  if (mobileValue)
106
104
  setValue('mobile', mobileValue, { shouldValidate: true });
@@ -142,8 +140,8 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
142
140
  var filteredCountries = countries.filter(function (country) {
143
141
  return country.idd_prefix.toString().toLowerCase().startsWith(value.replace('+', '').toLowerCase()) ||
144
142
  country.capital.toLowerCase().startsWith(value.toLowerCase()) ||
145
- country.name.arabic.toLowerCase().startsWith(value.toLowerCase()) ||
146
- country.name.english.toLowerCase().startsWith(value.toLowerCase());
143
+ country.name.arabic.toLowerCase().includes(value.toLowerCase()) ||
144
+ country.name.english.toLowerCase().includes(value.toLowerCase());
147
145
  });
148
146
  setCountries(filteredCountries);
149
147
  };
@@ -1,3 +1,4 @@
1
+ import { getMobileNumberLen } from '../../../../utils';
1
2
  import * as yup from 'yup';
2
3
  export var PhoneValidationSchema = yup.object().shape({
3
4
  mobile: yup
@@ -19,10 +20,12 @@ export var PhoneValidationSchema = yup.object().shape({
19
20
  if (isSA) {
20
21
  if (!isSaudiNumber)
21
22
  return this.createError({ message: 'start_with_number' });
22
- var requiredLen = isStartWith5 ? maxDigits - 1 : maxDigits;
23
+ var requiredLen = isStartWithZero ? maxDigits + 1 : maxDigits;
23
24
  return valueLen === requiredLen ? true : this.createError({ message: 'enter_valid_mobile_number' });
24
25
  }
25
- if (valueLen >= minDigits && valueLen <= maxDigits)
26
+ var requiredMaxLen = getMobileNumberLen(maxDigits, mobileValue);
27
+ var requiredMinLen = getMobileNumberLen(minDigits, mobileValue);
28
+ if (valueLen >= requiredMinLen && valueLen <= requiredMaxLen)
26
29
  return true;
27
30
  if (minDigits === maxDigits)
28
31
  return this.createError({ message: 'enter_valid_mobile_number' });
@@ -5,7 +5,10 @@ export interface TaxLibProps extends LibConfig {
5
5
  configToken?: string;
6
6
  loaderColor?: string;
7
7
  }
8
- export declare function TaxElement(props: TaxLibProps): JSX.Element;
8
+ export interface TaxLibFullProps extends TaxLibProps {
9
+ unmount?: () => void;
10
+ }
11
+ export declare function TaxElement(props: TaxLibFullProps): JSX.Element;
9
12
  export declare function renderTaxLib(config: TaxLibProps, elementId: string): {
10
13
  unmount: () => void;
11
14
  };
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import React, { memo } from 'react';
25
25
  import { createRoot } from 'react-dom/client';
26
- import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken } from '../../hooks';
27
- import { settingsSelector } from '../../app/settings';
26
+ import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken, useAppDispatch } from '../../hooks';
27
+ import { handleOpen, settingsSelector } from '../../app/settings';
28
28
  import AnimationFlow from '../../components/AnimationFlow';
29
29
  import { store } from '../../app/store';
30
30
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
@@ -36,11 +36,12 @@ import { taxFeatureScreens } from '../featuresScreens';
36
36
  import { taxSelector, verifyLeadToken } from '../app/tax/taxStore';
37
37
  import Background from '../shared/Background';
38
38
  var Tax = memo(function (_a) {
39
- var _b, _c;
39
+ var _b, _c, _d;
40
40
  var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
41
41
  var theme = useAppTheme().theme;
42
- var _d = useAppSelector(settingsSelector), data = _d.data, error = _d.error, settingLoading = _d.loading;
43
- var _e = useAppSelector(taxSelector), customLoading = _e.customLoading, taxError = _e.error, loading = _e.loading;
42
+ var dispatch = useAppDispatch();
43
+ var _e = useAppSelector(settingsSelector), data = _e.data, error = _e.error, settingLoading = _e.loading;
44
+ var _f = useAppSelector(taxSelector), customLoading = _f.customLoading, taxError = _f.error, loading = _f.loading;
44
45
  useAppConfig(__assign(__assign({ navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }));
45
46
  useErrorListener(taxError || error);
46
47
  useStepStartedListener();
@@ -63,8 +64,15 @@ var Tax = memo(function (_a) {
63
64
  operatorErrorScreenName: 'TAX_OPERATOR_ERROR_STEP',
64
65
  isValidOperator: data.isValidOperator
65
66
  });
67
+ var handleDialogClose = function () {
68
+ dispatch(handleOpen(false));
69
+ setTimeout(function () {
70
+ var _a;
71
+ (_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
72
+ }, 1100);
73
+ };
66
74
  var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
67
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, animationDirection: animationDirection, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
75
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, onClose: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.closeButton) ? handleDialogClose : undefined, animationDirection: animationDirection, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: taxFeatureScreens.map(function (_a, index) {
68
76
  var Element = _a.element, name = _a.name;
69
77
  var isActive = activeScreen.name === name;
70
78
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -76,7 +84,7 @@ export function TaxElement(props) {
76
84
  export function renderTaxLib(config, elementId) {
77
85
  var element = findOrCreateElementAndInject(elementId);
78
86
  var root = createRoot(element);
79
- root.render(_jsx(TaxElement, __assign({}, config)));
80
87
  var unmount = function () { return root.unmount(); };
88
+ root.render(_jsx(TaxElement, __assign({}, config, { unmount: unmount })));
81
89
  return { unmount: unmount };
82
90
  }
@@ -48,7 +48,7 @@ export var useAppConfig = function (_a) {
48
48
  if (!disableSettingFetching && !configToken)
49
49
  removeRequestHeaders();
50
50
  checkDomain();
51
- setBaseUrl(publicKey);
51
+ setBaseUrl(publicKey, rest.region);
52
52
  setAppConfig();
53
53
  if (typeof boardMaturity === 'boolean')
54
54
  dispatch(handelBoardMaturity(boardMaturity));
@@ -12,4 +12,5 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
12
12
  connectExpress: import("../features/app/connectExpress/connectExpressStore").ConnectExpressState;
13
13
  auth: import("../features/app/auth/authStore").AuthState;
14
14
  board: import("../features/app/board/boardStore").BoardState;
15
+ kyc: import("../features/app/kyc/kycStore").KYCDataState;
15
16
  }, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
@@ -1 +1,2 @@
1
- export declare const useSanitizedTranslation: () => (key: string) => string;
1
+ import { StringMap, TOptions } from 'i18next';
2
+ export declare const useSanitizedTranslation: () => (key: string, options?: string | TOptions<StringMap> | undefined) => string;
@@ -7,9 +7,9 @@ export var useSanitizedTranslation = function () {
7
7
  return '';
8
8
  return key.replace(/[$#[\].]/g, '');
9
9
  }, []);
10
- var sanitizedTranslate = useCallback(function (key) {
10
+ var sanitizedTranslate = useCallback(function (key, options) {
11
11
  var sanitizedError = sanitize(key);
12
- return t(sanitizedError);
12
+ return t(sanitizedError, options);
13
13
  }, [t, sanitize]);
14
14
  return sanitizedTranslate;
15
15
  };
package/build/index.d.ts CHANGED
@@ -12,5 +12,6 @@ import { SignInElement, SignInLibProps } from './features/signIn';
12
12
  import { EntityElement, EntityLibProps } from './features/entity';
13
13
  import { BrandElement, BrandLibProps } from './features/brand';
14
14
  import { BoardLibProps, BoardElement } from './features/board';
15
- export type { ConnectLibProps, ConnectExpressLibProps, AuthLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, BrandLibProps, SignInLibProps, BoardLibProps };
16
- export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement };
15
+ import { KYCLibProps, KYCElement } from './features/kyc';
16
+ export type { ConnectLibProps, ConnectExpressLibProps, AuthLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, BrandLibProps, SignInLibProps, BoardLibProps, KYCLibProps };
17
+ export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement };
package/build/index.js CHANGED
@@ -12,7 +12,8 @@ import { SignInElement, renderSignInLib } from './features/signIn';
12
12
  import { EntityElement, renderEntityLib } from './features/entity';
13
13
  import { BrandElement, renderBrandLib } from './features/brand';
14
14
  import { BoardElement, renderBoardLib } from './features/board';
15
- export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement };
15
+ import { KYCElement, renderKYCLib } from './features/kyc';
16
+ export { ConnectElement, ConnectExpressElement, AuthElement, BusinessElement, PasswordElement, IndividualElement, BankElement, TaxElement, EntityElement, BrandElement, SignInElement, BoardElement, KYCElement };
16
17
  window['TapAuth'] = {
17
18
  renderConnectLib: renderConnectLib,
18
19
  renderConnectExpressLib: renderConnectExpressLib,
@@ -25,6 +26,7 @@ window['TapAuth'] = {
25
26
  renderEntityLib: renderEntityLib,
26
27
  renderBrandLib: renderBrandLib,
27
28
  renderSignInLib: renderSignInLib,
28
- renderBoardLib: renderBoardLib
29
+ renderBoardLib: renderBoardLib,
30
+ renderKYCLib: renderKYCLib
29
31
  };
30
32
  console.log("TapAuth version: ".concat(require('../package.json').version));
@@ -2,7 +2,7 @@ export var shadows = [
2
2
  'none',
3
3
  '0 0 0 1px rgb(63 63 68 / 5%), 0 1px 2px 0 rgb(63 63 68 / 15%)',
4
4
  '0px 0px 2px rgba(0, 0, 0, 0.08)',
5
- '0px 1px 8px 0px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 3px 3px -2px rgba(0,0,0,0.12)',
5
+ '0px 0px 18px 0px #0000000D',
6
6
  '0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)',
7
7
  '0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)',
8
8
  '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)',
@@ -1,6 +1,6 @@
1
1
  export declare const sleep: (milliseconds?: number) => Promise<unknown>;
2
2
  export declare const dangerousMessage: (message: string, callBack?: Function) => void;
3
- export declare const setBaseUrl: (publicKey: string) => void;
3
+ export declare const setBaseUrl: (publicKey: string, region?: string) => void;
4
4
  export declare const updateLocationUrlWithCountry: (countryIso2: string) => void;
5
5
  export declare const openConnect: (pk: string, countryCode?: string) => void;
6
6
  export declare function getMetaData(): Record<string, string> | undefined;
@@ -1,6 +1,7 @@
1
1
  import { axiosInstance } from '../api';
2
- import { ENDPOINT_PATHS, CONNECT_DEV_URL, CONNECT_PROD_URL } from '../constants';
2
+ import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
3
3
  import { objectHasValues } from './object';
4
+ import { isSA } from './string';
4
5
  export var sleep = function (milliseconds) {
5
6
  if (milliseconds === void 0) { milliseconds = 1000; }
6
7
  return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
@@ -11,13 +12,13 @@ export var dangerousMessage = function (message, callBack) {
11
12
  }
12
13
  callBack === null || callBack === void 0 ? void 0 : callBack({ message: message });
13
14
  };
14
- export var setBaseUrl = function (publicKey) {
15
+ export var setBaseUrl = function (publicKey, region) {
15
16
  var isProd = publicKey.includes('pk_live');
16
17
  if (isProd) {
17
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
18
+ axiosInstance.defaults.baseURL = isSA(region) ? ENDPOINT_PATHS.PRODUCTION_BASE_URL_SA : ENDPOINT_PATHS.PRODUCTION_BASE_URL;
18
19
  return;
19
20
  }
20
- axiosInstance.defaults.baseURL = ENDPOINT_PATHS.DEV_BASE_URL;
21
+ axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
21
22
  };
22
23
  export var updateLocationUrlWithCountry = function (countryIso2) {
23
24
  var country = countryIso2.toLowerCase();
@@ -36,7 +37,7 @@ export var updateLocationUrlWithCountry = function (countryIso2) {
36
37
  window.history.replaceState({}, '', newUrl);
37
38
  };
38
39
  export var openConnect = function (pk, countryCode) {
39
- var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_DEV_URL);
40
+ var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
40
41
  if (countryCode) {
41
42
  newUrl.pathname = "/".concat(countryCode.toLowerCase());
42
43
  }
@@ -1,2 +1,3 @@
1
1
  export declare const isNetworkError: (error: string | null) => boolean;
2
2
  export declare const isTokenExpired: (error: string | null) => boolean;
3
+ export declare const isTimeoutError: (error: string | null) => boolean;
@@ -4,3 +4,6 @@ export var isNetworkError = function (error) {
4
4
  export var isTokenExpired = function (error) {
5
5
  return ['token expired'].includes((error || '').trim().toLowerCase());
6
6
  };
7
+ export var isTimeoutError = function (error) {
8
+ return (error || '').trim().toLowerCase().includes('timeout');
9
+ };
@@ -2,6 +2,7 @@ import { DeviceInfo, License, User } from '../@types';
2
2
  export declare const maskPhone: (str?: string) => string;
3
3
  export declare const shortenString: (str: string, length: number) => string;
4
4
  export declare const maskID: (str: string) => string;
5
+ export declare const maskIDNumber: (str: string) => string;
5
6
  export declare const maskEmail: (str: string) => string;
6
7
  export declare const shortenBrand: (str: string) => string;
7
8
  export declare const showLastFour: (str: string) => string;
@@ -45,7 +46,7 @@ export declare const getBaseUrl: () => string;
45
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
47
  export declare const getEighteenYearsAgo: () => string;
47
48
  export declare const isKW: (flag: string) => boolean;
48
- export declare const isSA: (flag: string) => boolean;
49
+ export declare const isSA: (flag: string | undefined) => boolean;
49
50
  export declare const isOtherThanKWOrSA: (flag: string) => boolean;
50
51
  export declare const isKWOrSA: (flag: string) => boolean;
51
52
  export declare const isLinkedIn: (flag: string) => boolean;
@@ -74,4 +75,6 @@ export declare const getFileType: (type: string) => "" | "image/jpeg" | "image/p
74
75
  export declare const isStringHasOneAsterisk: (value: string) => boolean;
75
76
  export declare const isOtherLicense: (item?: License) => boolean;
76
77
  export declare const formatNumberAsCurrency: (number: string) => string;
77
- export declare const getCurrencyByCountryIso2: (countryCode: string) => string;
78
+ export declare const getCurrencyByCountryIso2: (countryCode?: string) => string;
79
+ export declare const getMobileNumberLen: (initialLen: number, number: string) => number;
80
+ export declare const getWebsiteLink: (isAr: boolean, countryCode: string, path: string) => string;
@@ -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 } from '../constants';
4
+ import { 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 = ''; }
@@ -17,6 +17,10 @@ export var maskID = function (str) {
17
17
  var lastTwo = str.substring(str.length - 2, str.length);
18
18
  return ' ••••' + lastTwo;
19
19
  };
20
+ export var maskIDNumber = function (str) {
21
+ var lastFour = str.substring(str.length - 4, str.length);
22
+ return ' ••••' + lastFour;
23
+ };
20
24
  export var maskEmail = function (str) {
21
25
  if (str) {
22
26
  var name_1 = str.split('@')[0];
@@ -210,7 +214,9 @@ export var isKW = function (flag) {
210
214
  return ['kw', 'kwd'].includes(flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
211
215
  };
212
216
  export var isSA = function (flag) {
213
- return ['sa', 'sau'].includes(flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
217
+ if (!flag)
218
+ return false;
219
+ return ['sa', 'sau'].includes(flag.toLowerCase());
214
220
  };
215
221
  export var isOtherThanKWOrSA = function (flag) {
216
222
  return !isKW(flag) && !isSA(flag);
@@ -332,3 +338,11 @@ export var getCurrencyByCountryIso2 = function (countryCode) {
332
338
  var currencyCode = (_a = COUNTRY_TO_CURRENCY[countryCode]) !== null && _a !== void 0 ? _a : '';
333
339
  return currencyCode;
334
340
  };
341
+ export var getMobileNumberLen = function (initialLen, number) {
342
+ var isStartsWith0 = number.startsWith('0');
343
+ return isStartsWith0 ? initialLen + 1 : initialLen;
344
+ };
345
+ export var getWebsiteLink = function (isAr, countryCode, path) {
346
+ var language = isAr ? LANGUAGE_ABBREVIATIONS.ARABIC : LANGUAGE_ABBREVIATIONS.ENGLISH;
347
+ return TAP_WEBSITE + language + '-' + countryCode + path;
348
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.8.98-development",
3
+ "version": "2.9.0",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -21,7 +21,7 @@
21
21
  "copy:files": "copyfiles -u 1 src/**/*.css build/",
22
22
  "tsc:alias": "tsc-alias -p tsconfig.json",
23
23
  "ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
24
- "push": "npm publish --access public --tag development"
24
+ "push": "npm publish --access public"
25
25
  },
26
26
  "keywords": [],
27
27
  "author": {
@@ -112,8 +112,7 @@
112
112
  "lint-staged": {
113
113
  "src/**/*.{ts,tsx,json,js,jsx}": [
114
114
  "yarn run prettier:fix",
115
- "yarn run lint",
116
- "git add ."
115
+ "yarn run lint"
117
116
  ]
118
117
  },
119
118
  "browserslist": {