@tap-payments/auth-jsconnect 2.0.32-test → 2.0.32

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 (280) hide show
  1. package/build/@types/app.d.ts +57 -20
  2. package/build/@types/app.js +14 -1
  3. package/build/@types/form.d.ts +17 -10
  4. package/build/api/auth.d.ts +24 -2
  5. package/build/api/auth.js +36 -1
  6. package/build/api/axios.js +2 -2
  7. package/build/api/brand.d.ts +2 -1
  8. package/build/api/brand.js +10 -1
  9. package/build/api/country.d.ts +3 -1
  10. package/build/api/country.js +3 -1
  11. package/build/api/data.d.ts +38 -7
  12. package/build/api/data.js +57 -17
  13. package/build/api/entity.d.ts +28 -5
  14. package/build/api/entity.js +23 -9
  15. package/build/api/firebase.d.ts +1 -1
  16. package/build/api/firebase.js +3 -1
  17. package/build/api/index.d.ts +41 -14
  18. package/build/api/individual.d.ts +76 -19
  19. package/build/api/individual.js +29 -2
  20. package/build/api/lead.d.ts +8 -6
  21. package/build/app/rootReducer.d.ts +1 -1
  22. package/build/app/rootReducer.js +2 -2
  23. package/build/app/settings.d.ts +8 -2
  24. package/build/app/settings.js +29 -12
  25. package/build/app/store.d.ts +3 -3
  26. package/build/assets/locales/ar.json +256 -179
  27. package/build/assets/locales/en.json +188 -104
  28. package/build/components/AnimationFlow/AnimationFlow.d.ts +5 -1
  29. package/build/components/AnimationFlow/AnimationFlow.js +6 -8
  30. package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
  31. package/build/components/AnimationFlow/BottomSheet.js +4 -3
  32. package/build/components/AnimationFlow/Dialog.d.ts +5 -1
  33. package/build/components/AnimationFlow/Dialog.js +11 -5
  34. package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
  35. package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
  36. package/build/components/ArabicDatePicker/index.d.ts +2 -0
  37. package/build/components/ArabicDatePicker/index.js +2 -0
  38. package/build/components/ArabicDatePicker/style.css +24 -0
  39. package/build/components/FileInput/DragAndDrop.d.ts +10 -1
  40. package/build/components/FileInput/DragAndDrop.js +107 -8
  41. package/build/components/Lottie/Lottie.d.ts +878 -0
  42. package/build/components/Lottie/Lottie.js +58 -0
  43. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  44. package/build/components/Lottie/files/success.json +425 -0
  45. package/build/components/Lottie/index.d.ts +3 -0
  46. package/build/components/Lottie/index.js +3 -0
  47. package/build/components/OTPField/OTPField.d.ts +2 -1
  48. package/build/components/OTPField/OTPField.js +2 -2
  49. package/build/components/OTPTimer/OTPTimer.js +1 -1
  50. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  51. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  52. package/build/components/ProgressBar/index.d.ts +2 -0
  53. package/build/components/ProgressBar/index.js +2 -0
  54. package/build/components/RadioLabel/RadioLabel.d.ts +2 -1
  55. package/build/components/RadioLabel/RadioLabel.js +2 -2
  56. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -4
  57. package/build/components/SocialMediaGroup/SocialMediaGroup.js +3 -55
  58. package/build/constants/api.d.ts +6 -0
  59. package/build/constants/api.js +14 -1
  60. package/build/constants/app.d.ts +7 -5
  61. package/build/constants/app.js +55 -22
  62. package/build/constants/assets.d.ts +20 -1
  63. package/build/constants/assets.js +27 -8
  64. package/build/constants/dummy.d.ts +1 -1
  65. package/build/constants/dummy.js +2 -2
  66. package/build/constants/validation.d.ts +8 -0
  67. package/build/constants/validation.js +9 -1
  68. package/build/features/app/auth/authStore.d.ts +47 -0
  69. package/build/features/app/auth/authStore.js +265 -0
  70. package/build/features/app/bank/bankStore.d.ts +16 -0
  71. package/build/features/app/bank/bankStore.js +81 -37
  72. package/build/features/app/business/businessStore.d.ts +22 -3
  73. package/build/features/app/business/businessStore.js +430 -290
  74. package/build/features/app/connect/connectStore.d.ts +33 -30
  75. package/build/features/app/connect/connectStore.js +398 -258
  76. package/build/features/app/entity/entityStore.d.ts +5 -0
  77. package/build/features/app/entity/entityStore.js +153 -14
  78. package/build/features/app/individual/individualStore.d.ts +17 -0
  79. package/build/features/app/individual/individualStore.js +167 -83
  80. package/build/features/app/password/passwordStore.js +1 -1
  81. package/build/features/app/tax/taxStore.js +3 -2
  82. package/build/features/auth/Auth.d.ts +10 -0
  83. package/build/features/auth/Auth.js +87 -0
  84. package/build/features/auth/index.d.ts +1 -0
  85. package/build/features/auth/index.js +1 -0
  86. package/build/features/auth/screens/NID/DOB.d.ts +7 -0
  87. package/build/features/auth/screens/NID/DOB.js +47 -0
  88. package/build/features/auth/screens/NID/IDNumber.d.ts +3 -0
  89. package/build/features/auth/screens/NID/IDNumber.js +64 -0
  90. package/build/features/auth/screens/NID/NID.d.ts +5 -0
  91. package/build/features/auth/screens/NID/NID.js +67 -0
  92. package/build/features/auth/screens/NID/TAC.d.ts +3 -0
  93. package/build/features/auth/screens/NID/TAC.js +87 -0
  94. package/build/features/auth/screens/NID/index.d.ts +3 -0
  95. package/build/features/auth/screens/NID/index.js +2 -0
  96. package/build/features/auth/screens/NID/validation.d.ts +27 -0
  97. package/build/features/auth/screens/NID/validation.js +19 -0
  98. package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
  99. package/build/features/auth/screens/OTP/OTP.js +76 -0
  100. package/build/features/{otp/screens/OTPVerify/Verify.d.ts → auth/screens/OTP/OTPInput.d.ts} +0 -0
  101. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/OTPInput.js +11 -7
  102. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  103. package/build/features/auth/screens/OTP/index.js +2 -0
  104. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/validation.d.ts +0 -0
  105. package/build/features/{otp/screens/OTPVerify → auth/screens/OTP}/validation.js +0 -0
  106. package/build/features/bank/Bank.js +12 -6
  107. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
  108. package/build/features/bank/screens/BankDetails/BankStatement.js +41 -8
  109. package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
  110. package/build/features/bank/screens/BankDetails/validation.js +2 -2
  111. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  112. package/build/features/business/Business.d.ts +1 -1
  113. package/build/features/business/Business.js +14 -7
  114. package/build/features/business/screens/Activities/Activities.js +1 -6
  115. package/build/features/business/screens/Activities/ActivitiesList.d.ts +37 -1
  116. package/build/features/business/screens/Activities/ActivitiesList.js +51 -12
  117. package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
  118. package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
  119. package/build/features/business/screens/Activities/validation.d.ts +0 -51
  120. package/build/features/business/screens/Activities/validation.js +0 -9
  121. package/build/features/business/screens/BusinessType/BusinessType.js +20 -7
  122. package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
  123. package/build/features/business/screens/BusinessType/EntityName.js +56 -0
  124. package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
  125. package/build/features/business/screens/BusinessType/LicenseCertificate.js +76 -0
  126. package/build/features/business/screens/BusinessType/LicenseList.js +24 -7
  127. package/build/features/business/screens/BusinessType/LicenseNumber.js +14 -8
  128. package/build/features/business/screens/BusinessType/LicenseType.d.ts +6 -0
  129. package/build/features/business/screens/BusinessType/LicenseType.js +67 -0
  130. package/build/features/business/screens/BusinessType/validation.d.ts +19 -0
  131. package/build/features/business/screens/BusinessType/validation.js +50 -1
  132. package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
  133. package/build/features/business/screens/CivilID/CivilID.js +84 -0
  134. package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
  135. package/build/features/business/screens/CivilID/IDNumber.js +59 -0
  136. package/build/features/business/screens/CivilID/index.d.ts +3 -0
  137. package/build/features/business/screens/CivilID/index.js +2 -0
  138. package/build/features/business/screens/CivilID/validation.d.ts +8 -0
  139. package/build/features/business/screens/CivilID/validation.js +4 -0
  140. package/build/features/business/screens/Customers/CustomerLocations.d.ts +15 -2
  141. package/build/features/business/screens/Customers/CustomerLocations.js +32 -8
  142. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  143. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  144. package/build/features/business/screens/Customers/RefundPolicy.js +8 -2
  145. package/build/features/business/screens/Customers/TransactionPolicy.js +8 -2
  146. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +10 -7
  147. package/build/features/business/screens/Verify/Verify.js +4 -4
  148. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  149. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +157 -0
  150. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  151. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  152. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  153. package/build/features/business/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  154. package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
  155. package/build/features/business/screens/VerifyPACI/index.js +2 -0
  156. package/build/features/connect/Connect.d.ts +2 -1
  157. package/build/features/connect/Connect.js +47 -12
  158. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  159. package/build/features/connect/screens/CivilID/CivilID.js +98 -0
  160. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  161. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  162. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  163. package/build/features/connect/screens/CivilID/index.js +2 -0
  164. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  165. package/build/features/connect/screens/CivilID/validation.js +4 -0
  166. package/build/features/connect/screens/Individual/Email.js +11 -3
  167. package/build/features/connect/screens/Individual/Individual.js +27 -14
  168. package/build/features/connect/screens/Merchant/BrandList.js +15 -7
  169. package/build/features/connect/screens/Merchant/BrandName.js +7 -4
  170. package/build/features/connect/screens/Merchant/Merchant.js +47 -50
  171. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +7 -0
  172. package/build/features/connect/screens/Merchant/SalesChannels.js +113 -0
  173. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +1 -4
  174. package/build/features/connect/screens/Merchant/SocialMedia.js +131 -66
  175. package/build/features/connect/screens/Merchant/TAC.js +8 -2
  176. package/build/features/connect/screens/Merchant/validation.d.ts +22 -45
  177. package/build/features/connect/screens/Merchant/validation.js +117 -116
  178. package/build/features/connect/screens/Mobile/Mobile.js +31 -10
  179. package/build/features/connect/screens/NID/NID.js +2 -1
  180. package/build/features/connect/screens/OTP/OTP.js +5 -4
  181. package/build/features/connect/screens/OTP/OTPInput.js +3 -2
  182. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  183. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +159 -0
  184. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  185. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  186. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  187. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  188. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  189. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  190. package/build/features/entity/Entity.d.ts +1 -1
  191. package/build/features/entity/Entity.js +16 -9
  192. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
  193. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +140 -0
  194. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +52 -2
  195. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
  196. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
  197. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
  198. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
  199. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
  200. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
  201. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.d.ts +0 -0
  202. package/build/features/{business/screens/Activities → entity/screens/EntityInfoConfirm}/SalesChannels.js +8 -5
  203. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
  204. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
  205. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -5
  206. package/build/features/featuresScreens.d.ts +1 -1
  207. package/build/features/featuresScreens.js +31 -6
  208. package/build/features/individual/Individual.d.ts +1 -1
  209. package/build/features/individual/Individual.js +14 -7
  210. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
  211. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +15 -3
  212. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  213. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  214. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -8
  215. package/build/features/individual/screens/Verify/Verify.js +4 -4
  216. package/build/features/password/Password.d.ts +1 -1
  217. package/build/features/password/Password.js +14 -7
  218. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -9
  219. package/build/features/shared/Background/Background.d.ts +6 -5
  220. package/build/features/shared/Background/Background.js +16 -5
  221. package/build/features/shared/Button/EmailProvidersButtons.d.ts +2 -1
  222. package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
  223. package/build/features/shared/Button/MobileButton.d.ts +2 -1
  224. package/build/features/shared/Button/MobileButton.js +2 -2
  225. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  226. package/build/features/shared/Dialog/CloseDialog.js +71 -0
  227. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  228. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  229. package/build/features/shared/Dialog/index.d.ts +4 -0
  230. package/build/features/shared/Dialog/index.js +4 -0
  231. package/build/features/shared/Input/Input.d.ts +1 -1
  232. package/build/features/shared/Input/Input.js +2 -2
  233. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  234. package/build/features/shared/UploadFile/UploadFile.d.ts +9 -3
  235. package/build/features/shared/UploadFile/UploadFile.js +23 -8
  236. package/build/features/signIn/SignIn.d.ts +1 -1
  237. package/build/features/signIn/SignIn.js +14 -6
  238. package/build/features/tax/Tax.d.ts +1 -1
  239. package/build/features/tax/Tax.js +16 -8
  240. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +11 -7
  241. package/build/hooks/index.d.ts +1 -0
  242. package/build/hooks/index.js +1 -0
  243. package/build/hooks/useAppConfig.d.ts +3 -1
  244. package/build/hooks/useAppConfig.js +4 -2
  245. package/build/hooks/useAppDispatch.d.ts +1 -1
  246. package/build/hooks/useErrorListener.js +0 -5
  247. package/build/hooks/useScreen.d.ts +3 -0
  248. package/build/hooks/useScreen.js +14 -0
  249. package/build/index.d.ts +3 -3
  250. package/build/index.js +5 -5
  251. package/build/utils/array.d.ts +13 -1
  252. package/build/utils/array.js +26 -0
  253. package/build/utils/common.d.ts +1 -0
  254. package/build/utils/common.js +3 -0
  255. package/build/utils/device.d.ts +1 -0
  256. package/build/utils/device.js +13 -0
  257. package/build/utils/html.d.ts +1 -0
  258. package/build/utils/html.js +6 -0
  259. package/build/utils/index.d.ts +1 -0
  260. package/build/utils/index.js +1 -0
  261. package/build/utils/locale.js +1 -1
  262. package/build/utils/object.d.ts +1 -0
  263. package/build/utils/object.js +12 -0
  264. package/build/utils/rsa.d.ts +2 -2
  265. package/build/utils/rsa.js +1 -1
  266. package/build/utils/string.d.ts +33 -20
  267. package/build/utils/string.js +71 -1
  268. package/build/utils/validation.d.ts +2 -0
  269. package/build/utils/validation.js +6 -0
  270. package/package.json +129 -128
  271. package/build/features/app/otp/otpStore.d.ts +0 -28
  272. package/build/features/app/otp/otpStore.js +0 -153
  273. package/build/features/otp/OTP.d.ts +0 -7
  274. package/build/features/otp/OTP.js +0 -55
  275. package/build/features/otp/index.d.ts +0 -0
  276. package/build/features/otp/index.js +0 -1
  277. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
  278. package/build/features/otp/screens/OTPVerify/Verify.js +0 -50
  279. package/build/features/otp/screens/OTPVerify/index.d.ts +0 -2
  280. package/build/features/otp/screens/OTPVerify/index.js +0 -2
@@ -1,4 +1,4 @@
1
- import { REGEX_BENEFICIARY_NAME, MAX_FILE_SIZE, VALID_FILE_FORMATS } from '../../../../constants';
1
+ import { MAX_FILE_SIZE, VALID_FILE_FORMATS, REGEX_ALPHANUMERIC } from '../../../../constants';
2
2
  import * as yup from 'yup';
3
3
  export var BankValidation = yup.object().shape({
4
4
  iban: yup
@@ -10,7 +10,7 @@ export var BankValidation = yup.object().shape({
10
10
  bankName: yup.string().optional(),
11
11
  beneficiaryName: yup
12
12
  .string()
13
- .matches(REGEX_BENEFICIARY_NAME, 'beneficiary_name_invalid')
13
+ .matches(REGEX_ALPHANUMERIC, 'beneficiary_name_invalid')
14
14
  .required('beneficiary_name_required'),
15
15
  bankStatementId: yup.string().optional(),
16
16
  bankStatementFile: yup
@@ -16,7 +16,7 @@ import { styled } from '@mui/material/styles';
16
16
  import { FlowsButtons } from '../../../shared/Button';
17
17
  import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
18
18
  import { useAppSelector, useLanguage } from '../../../../hooks';
19
- import { getResetFlowUrl, showLastFour } from '../../../../utils';
19
+ import { getResetFlowUrl, showLastFour, concatenateObjectValues } from '../../../../utils';
20
20
  import { bankSelector } from '../../../app/bank/bankStore';
21
21
  import Box from '@mui/material/Box';
22
22
  import Text from '../../../../components/Text';
@@ -44,23 +44,27 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(bankSelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
53
- var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank_account, merchant = _e.merchant, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
+ var _g = nameObj || {}, en = _g.en, ar = _g.ar;
54
+ var username = isAr
55
+ ? concatenateObjectValues(ar || en, ['first', 'last'])
56
+ : concatenateObjectValues(en, ['first', 'last']);
54
57
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
58
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.name) || t('bank');
56
59
  var iban = showLastFour((bank === null || bank === void 0 ? void 0 : bank.iban) || '');
57
- var taxID = (entity === null || entity === void 0 ? void 0 : entity.tax_number) || '';
60
+ var taxID = (entity === null || entity === void 0 ? void 0 : entity.vat_id) || '';
58
61
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
59
62
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
63
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
- var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id) : '';
64
+ var identification = user.identification;
65
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
62
66
  var settings = useAppSelector(settingsSelector);
63
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
67
+ var _h = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _h.contact, board_id = _h.board_id, board_info_id = _h.board_info_id;
64
68
  var email = (contact || { email: '' }).email;
65
69
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
66
70
  var reMapFlowData = function (flows) {
@@ -4,4 +4,4 @@ export interface BusinessLibProps extends LibConfig {
4
4
  }
5
5
  export declare function BusinessLib(props: BusinessLibProps): JSX.Element;
6
6
  export declare function renderBusinessLib(config: BusinessLibProps, elementId: string): void;
7
- export declare function unmountBusinessLib(elementId: string): void;
7
+ export declare function unmountBusinessLib(elementId: string, unmountTimeout?: number): void;
@@ -19,8 +19,8 @@ import AnimationFlow from '../../components/AnimationFlow';
19
19
  import { store } from '../../app/store';
20
20
  import { ReduxProvider, ThemeProvider } from '../../components/Providers';
21
21
  import Collapse from '../../components/Collapse';
22
- import { getParameterByName, reactElement } from '../../utils';
23
- import { BUSINESS_SCREENS_NAVIGATION } from '../../constants';
22
+ import { getParameterByName, reactElement, removeElement } from '../../utils';
23
+ import { BUSINESS_SCREENS_NAVIGATION, DIALOG_ID } from '../../constants';
24
24
  import { businessFeatureScreens } from '../featuresScreens';
25
25
  import CustomFooter from '../shared/Footer';
26
26
  import Background from '../shared/Background';
@@ -28,7 +28,7 @@ var Business = memo(function (props) {
28
28
  var theme = useAppTheme().theme;
29
29
  var dispatch = useAppDispatch();
30
30
  var _a = useAppSelector(settingsSelector), data = _a.data, error = _a.error, settingLoading = _a.loading;
31
- var _b = useAppSelector(businessSelector), customLoading = _b.customLoading, businessError = _b.error;
31
+ var _b = useAppSelector(businessSelector), customLoading = _b.customLoading, businessError = _b.error, loading = _b.loading;
32
32
  useAppConfig(__assign({ navigation: BUSINESS_SCREENS_NAVIGATION }, props));
33
33
  useErrorListener(businessError || error);
34
34
  useStepStartedListener();
@@ -43,10 +43,10 @@ var Business = memo(function (props) {
43
43
  dispatch(verifyLeadToken(token));
44
44
  };
45
45
  useEffect(function () {
46
- if (!settingLoading)
46
+ if (!settingLoading && open)
47
47
  verifyToken();
48
48
  }, [settingLoading]);
49
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: businessFeatureScreens.map(function (_a, index) {
49
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: businessFeatureScreens.map(function (_a, index) {
50
50
  var Element = _a.element, name = _a.name;
51
51
  var isActive = activeScreen.name === name;
52
52
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
@@ -58,6 +58,13 @@ export function BusinessLib(props) {
58
58
  export function renderBusinessLib(config, elementId) {
59
59
  reactElement(elementId).render(_jsx(BusinessLib, __assign({}, config)));
60
60
  }
61
- export function unmountBusinessLib(elementId) {
62
- reactElement(elementId).unmount();
61
+ export function unmountBusinessLib(elementId, unmountTimeout) {
62
+ if (unmountTimeout === void 0) { unmountTimeout = 1000; }
63
+ var element = document.getElementById(elementId);
64
+ setTimeout(function () {
65
+ var _a;
66
+ ((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
67
+ removeElement(DIALOG_ID);
68
+ elementId && reactElement(elementId).unmount();
69
+ }, unmountTimeout);
63
70
  }
@@ -20,7 +20,6 @@ import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { useTranslation } from 'react-i18next';
21
21
  import { handlePrevScreenStep } from '../../../../app/settings';
22
22
  import Button from '../../../shared/Button';
23
- import SalesChannels from './SalesChannels';
24
23
  import { ScreenContainer } from '../../../shared/Containers';
25
24
  import Collapse from '../../../../components/Collapse';
26
25
  import OperationStartDate from './OperationStartDate';
@@ -53,10 +52,6 @@ var Activities = function () {
53
52
  var onBack = function () {
54
53
  dispatch(handlePrevScreenStep());
55
54
  };
56
- React.useEffect(function () {
57
- var salesChannels = activitiesData.salesChannels;
58
- methods.setValue('salesChannels', salesChannels);
59
- }, [activitiesData.salesChannels]);
60
55
  React.useEffect(function () {
61
56
  var activities = activitiesData.activities;
62
57
  methods.setValue('activities', activities);
@@ -73,6 +68,6 @@ var Activities = function () {
73
68
  anchorEl ? setAnchorEl(false) : setAnchorEl(true);
74
69
  };
75
70
  var disabled = !methods.formState.isValid || !!error;
76
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(LicenseName, {}) })), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(SalesChannels, {}) }))] })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
71
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(LicenseName, {}) })), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }) })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
77
72
  };
78
73
  export default Activities;
@@ -17,10 +17,46 @@ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick
17
17
  hide?: boolean | undefined;
18
18
  warningType?: "alert" | "error" | "hint" | undefined;
19
19
  } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
20
+ export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
21
+ children?: React.ReactNode;
22
+ classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
23
+ color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
24
+ fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
25
+ htmlColor?: string | undefined;
26
+ inheritViewBox?: boolean | undefined;
27
+ shapeRendering?: string | undefined;
28
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
29
+ titleAccess?: string | undefined;
30
+ viewBox?: string | undefined;
31
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "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" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "origin" | "method" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
32
+ ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
33
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
34
+ export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
35
+ children?: React.ReactNode;
36
+ classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
37
+ color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
38
+ fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
39
+ htmlColor?: string | undefined;
40
+ inheritViewBox?: boolean | undefined;
41
+ shapeRendering?: string | undefined;
42
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
43
+ titleAccess?: string | undefined;
44
+ viewBox?: string | undefined;
45
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "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" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "origin" | "method" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
46
+ ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
47
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
48
+ export declare const LabelContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
49
+ children?: React.ReactNode;
50
+ component?: React.ElementType<any> | undefined;
51
+ ref?: React.Ref<unknown> | undefined;
52
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
53
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
54
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
55
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | ("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" | "right" | "bottom" | "left" | "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") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
20
56
  export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
21
57
  children?: React.ReactNode;
22
58
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
23
- color?: "inherit" | "disabled" | "error" | "info" | "primary" | "secondary" | "action" | "success" | "warning" | undefined;
59
+ color?: "inherit" | "disabled" | "error" | "success" | "info" | "primary" | "secondary" | "action" | "warning" | undefined;
24
60
  fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
25
61
  htmlColor?: string | undefined;
26
62
  inheritViewBox?: boolean | undefined;
@@ -33,8 +33,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
33
33
  import * as React from 'react';
34
34
  import Box from '@mui/material/Box';
35
35
  import { alpha, styled } from '@mui/material/styles';
36
+ import InfoIcon from '@mui/icons-material/Info';
37
+ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
36
38
  import Text from '../../../../components/Text';
37
39
  import Input from '../../../../components/Input';
40
+ import Tooltip from '../../../../components/Tooltip';
38
41
  import { useTranslation } from 'react-i18next';
39
42
  import { useController, useFormContext } from 'react-hook-form';
40
43
  import { useLanguage, useAppSelector } from '../../../../hooks';
@@ -45,10 +48,11 @@ import ExpandIcon from '../../../../components/ExpandIcon';
45
48
  import { ScreenContainer } from '../../../shared/Containers';
46
49
  import { businessSelector } from '../../../app/business/businessStore';
47
50
  import CheckIcon from '@mui/icons-material/Check';
48
- import { MandatoryStyled } from './SalesChannels';
51
+ import { MandatoryStyled } from './OperationStartDate';
52
+ import Search from '../../../../features/shared/Search';
49
53
  export var InputLabelStyled = styled(Text)(function (_a) {
50
54
  var theme = _a.theme;
51
- return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
55
+ return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
52
56
  });
53
57
  export var InputStyled = styled(Input)(function (_a) {
54
58
  var theme = _a.theme;
@@ -59,9 +63,33 @@ export var InputStyled = styled(Input)(function (_a) {
59
63
  }
60
64
  });
61
65
  });
62
- var SimpleListStyled = styled((SimpleList))(function () { return ({
63
- height: 'fit-content'
64
- }); });
66
+ export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
67
+ var theme = _a.theme;
68
+ return ({
69
+ width: theme.spacing(2.75),
70
+ height: theme.spacing(2.125),
71
+ cursor: 'pointer',
72
+ color: alpha(theme.palette.text.primary, 0.4)
73
+ });
74
+ });
75
+ export var InfoIconStyled = styled(InfoIcon)(function (_a) {
76
+ var theme = _a.theme;
77
+ return ({
78
+ width: theme.spacing(2.75),
79
+ height: theme.spacing(2.125),
80
+ cursor: 'pointer',
81
+ color: alpha(theme.palette.text.primary, 0.4)
82
+ });
83
+ });
84
+ export var LabelContainerStyled = styled(Box)(function (_a) {
85
+ var theme = _a.theme;
86
+ return ({
87
+ display: 'flex',
88
+ justifyContent: 'space-between',
89
+ margin: theme.spacing(2.5, 2.5, 1.5, 2.5)
90
+ });
91
+ });
92
+ var SimpleListStyled = styled((SimpleList))(function () { return ({}); });
65
93
  export var CheckIconStyled = styled(CheckIcon)(function (_a) {
66
94
  var theme = _a.theme;
67
95
  return ({
@@ -85,6 +113,7 @@ var ActivitiesList = function (_a) {
85
113
  var data = useAppSelector(businessSelector).data;
86
114
  var activitiesControl = useController({ name: 'activities', control: control });
87
115
  var controlValue = activitiesControl.field.value;
116
+ var _e = React.useState(false), isHovered = _e[0], setIsHovered = _e[1];
88
117
  var businessTypeData = data.businessTypeData;
89
118
  var activities = (businessTypeData.responseBody || {}).activities;
90
119
  var businessType = (_b = businessTypeData.selectedLicense) === null || _b === void 0 ? void 0 : _b.type;
@@ -105,9 +134,9 @@ var ActivitiesList = function (_a) {
105
134
  (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
106
135
  };
107
136
  var onSelectItem = function (item) {
108
- var isActivityExists = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
137
+ var isActivityExists = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === item.id; });
109
138
  if (isActivityExists) {
110
- var updatedIdList = controlValue === null || controlValue === void 0 ? void 0 : controlValue.filter(function (activity) { return activity.en !== (item === null || item === void 0 ? void 0 : item.en); });
139
+ var updatedIdList = controlValue === null || controlValue === void 0 ? void 0 : controlValue.filter(function (activity) { return activity.id !== (item === null || item === void 0 ? void 0 : item.id); });
111
140
  if (updatedIdList.length >= 1)
112
141
  activitiesControl.field.onChange(updatedIdList);
113
142
  return;
@@ -119,13 +148,23 @@ var ActivitiesList = function (_a) {
119
148
  if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) > 1) {
120
149
  return (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) + ' ' + t('activities_selected');
121
150
  }
122
- return isAr ? (_a = controlValue[0]) === null || _a === void 0 ? void 0 : _a.ar : (_b = controlValue[0]) === null || _b === void 0 ? void 0 : _b.en;
151
+ var item = controlValue[0];
152
+ return isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en;
123
153
  };
124
154
  var getSelectedActivityFlag = function (item) {
125
- return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.en === (item === null || item === void 0 ? void 0 : item.en); });
155
+ return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === item.id; });
156
+ };
157
+ var handleSearch = function (value) {
158
+ var filteredList = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
159
+ var _a, _b, _c, _d;
160
+ return ((_b = (_a = activity === null || activity === void 0 ? void 0 : activity.name) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(value.toLowerCase())) ||
161
+ ((_d = (_c = activity === null || activity === void 0 ? void 0 : activity.name) === null || _c === void 0 ? void 0 : _c.ar) === null || _d === void 0 ? void 0 : _d.toLowerCase().includes(value.toLowerCase()));
162
+ });
163
+ setActivitiesMenuList(filteredList);
126
164
  };
127
- return (_jsx(Collapse, __assign({ in: (activitiesMenuList === null || activitiesMenuList === void 0 ? void 0 : activitiesMenuList.length) > 0 }, { children: _jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
128
- return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.en) === getSelectedActivityFlag(item) }, { children: isAr ? item === null || item === void 0 ? void 0 : item.ar : item === null || item === void 0 ? void 0 : item.en })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
129
- } }) }))] })] }) })));
165
+ return (_jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsx(Tooltip, __assign({ title: t('activities_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name', list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
166
+ var _a, _b, _c;
167
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: item.id === ((_a = getSelectedActivityFlag(item)) === null || _a === void 0 ? void 0 : _a.id) }, { children: isAr ? (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = item === null || item === void 0 ? void 0 : item.name) === null || _c === void 0 ? void 0 : _c.en })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
168
+ } })] }))] })] }));
130
169
  };
131
170
  export default ActivitiesList;
@@ -1,4 +1,18 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
+ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
+ align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
4
+ children?: React.ReactNode;
5
+ classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
6
+ gutterBottom?: boolean | undefined;
7
+ noWrap?: boolean | undefined;
8
+ paragraph?: boolean | undefined;
9
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
10
+ variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
11
+ variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
12
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
13
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | ("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" | "right" | "bottom" | "left" | "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") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
15
+ export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
2
16
  export interface OperationStartDateProps {
3
17
  onDateClicked?: (flag: boolean) => void;
4
18
  }
@@ -1,12 +1,31 @@
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
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { InputLabelStyled } from './ActivitiesList';
3
13
  import { useTranslation } from 'react-i18next';
4
14
  import { useController, useFormContext } from 'react-hook-form';
5
15
  import DatePicker from '../../../../components/DatePicker';
16
+ import Text from '../../../../components/Text';
6
17
  import { ScreenContainer } from '../../../shared/Containers';
7
- import { MandatoryStyled } from './SalesChannels';
8
18
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
9
19
  import { businessSelector, clearError } from '../../../app/business/businessStore';
20
+ import { alpha, styled } from '@mui/material/styles';
21
+ export var InputLabelStyled = styled(Text)(function (_a) {
22
+ var theme = _a.theme;
23
+ return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
24
+ });
25
+ export var MandatoryStyled = styled('span')(function (_a) {
26
+ var theme = _a.theme;
27
+ return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
28
+ });
10
29
  var OperationStartDate = function (_a) {
11
30
  var _b;
12
31
  var onDateClicked = _a.onDateClicked;
@@ -16,23 +16,6 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
16
16
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
17
17
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
18
18
  }>>[] | undefined>;
19
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
20
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
21
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
22
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
23
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
24
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
25
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
26
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
27
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
28
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
29
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
30
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
31
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
32
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
33
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
34
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
35
- }>>[] | undefined>;
36
19
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
37
20
  }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
38
21
  activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -51,23 +34,6 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
51
34
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
52
35
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
53
36
  }>>[] | undefined>;
54
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
55
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
56
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
57
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
58
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
59
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
60
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
61
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
62
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
63
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
64
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
65
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
66
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
67
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
68
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
69
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
70
- }>>[] | undefined>;
71
37
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
72
38
  }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
73
39
  activities: yup.ArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
@@ -86,22 +52,5 @@ export declare const ActivitiesValidationSchema: yup.ObjectSchema<import("yup/li
86
52
  ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
87
53
  en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
88
54
  }>>[] | undefined>;
89
- salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
90
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
91
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
92
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
93
- }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
94
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
95
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
96
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
97
- }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
98
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
99
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
100
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
101
- }>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
102
- id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
103
- name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
104
- name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
105
- }>>[] | undefined>;
106
55
  operationStartDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
107
56
  }>>>;
@@ -4,14 +4,5 @@ export var ActivitiesValidationSchema = yup.object().shape({
4
4
  ar: yup.string(),
5
5
  en: yup.string()
6
6
  })),
7
- salesChannels: yup
8
- .array()
9
- .min(1, 'choose_atleast_one_channel')
10
- .of(yup.object().shape({
11
- id: yup.string(),
12
- name_en: yup.string(),
13
- name_ar: yup.string()
14
- }))
15
- .required('choose_atleast_one_channel'),
16
7
  operationStartDate: yup.string().required('choose_any_business_date')
17
8
  });
@@ -15,24 +15,34 @@ import { useForm, FormProvider } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
16
  import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
18
- import { handlePrevScreenStep } from '../../../../app/settings';
18
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
19
19
  import Form from '../../../../components/Form';
20
20
  import Collapse from '../../../../components/Collapse';
21
21
  import { useLanguage } from '../../../../hooks';
22
22
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
23
  import { businessSelector, clearError, updateLeadBusinessType } from '../../../app/business/businessStore';
24
24
  import Button from '../../../shared/Button';
25
- import { LicenseValidationSchema } from './validation';
25
+ import { isSA } from '../../../../utils';
26
+ import { KWLicenseValidationSchema, LicenseValidationSchema } from './validation';
26
27
  import LicenseList from './LicenseList';
27
28
  var BusinessType = function (_a) {
28
- var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error;
29
+ var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error, uploading = _b.uploading;
30
+ var settingsData = useAppSelector(settingsSelector).data;
31
+ var businessTypeData = data.businessTypeData;
29
32
  var t = useTranslation().t;
30
33
  var isAr = useLanguage().isAr;
31
34
  var dispatch = useAppDispatch();
32
35
  var _c = React.useState(false), listActive = _c[0], setListActive = _c[1];
36
+ var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
33
37
  var methods = useForm({
34
- resolver: yupResolver(LicenseValidationSchema),
35
- defaultValues: data.businessTypeData,
38
+ resolver: yupResolver(!isSACountry ? KWLicenseValidationSchema : LicenseValidationSchema),
39
+ defaultValues: {
40
+ selectedLicense: businessTypeData.selectedLicense,
41
+ licenseNumber: businessTypeData.licenseNumber,
42
+ entityLegalName: businessTypeData.entityLegalName,
43
+ certificateId: businessTypeData.certificateId,
44
+ certificateFile: businessTypeData.certificateFile
45
+ },
36
46
  mode: 'onChange'
37
47
  });
38
48
  React.useEffect(function () {
@@ -42,14 +52,17 @@ var BusinessType = function (_a) {
42
52
  var onSubmit = function (data) {
43
53
  var dataValues = {
44
54
  selectedLicense: data.selectedLicense,
45
- licenseNumber: data.licenseNumber
55
+ licenseNumber: data.licenseNumber,
56
+ entityLegalName: data.entityLegalName,
57
+ certificateId: data.certificateId,
58
+ certificateFile: data.certificateFile
46
59
  };
47
60
  dispatch(updateLeadBusinessType(dataValues));
48
61
  };
49
62
  var onBack = function () {
50
63
  dispatch(handlePrevScreenStep());
51
64
  };
52
- var disabled = !methods.formState.isValid || !!error;
65
+ var disabled = !methods.formState.isValid || !!error || uploading;
53
66
  var disableBack = !data.otpData.isNID;
54
67
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(LicenseList, { onListOpen: function () {
55
68
  setListActive(true);
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface EntityNameProps {
3
+ show: boolean;
4
+ }
5
+ declare const EntityName: ({ show }: EntityNameProps) => JSX.Element;
6
+ export default EntityName;