@tap-payments/auth-jsconnect 1.0.5 → 1.0.6

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 (241) hide show
  1. package/build/@types/app.d.ts +61 -3
  2. package/build/@types/app.js +5 -0
  3. package/build/app/settings.d.ts +3 -3
  4. package/build/app/settings.js +26 -11
  5. package/build/assets/locales/ar.json +51 -3
  6. package/build/assets/locales/en.json +50 -2
  7. package/build/components/AnimationFlow/BottomSheet.js +1 -1
  8. package/build/components/AnimationFlow/Dialog.js +7 -22
  9. package/build/components/Footer/Footer.js +1 -1
  10. package/build/components/Loader/Loader.js +12 -11
  11. package/build/components/OTPField/OTPField.js +3 -23
  12. package/build/components/OTPTimer/OTPTimer.d.ts +4 -3
  13. package/build/components/OTPTimer/OTPTimer.js +19 -6
  14. package/build/components/SimpleList/SimpleList.d.ts +1 -1
  15. package/build/components/SimpleList/SimpleList.js +2 -5
  16. package/build/components/Warning/Warning.js +2 -18
  17. package/build/constants/app.d.ts +9 -0
  18. package/build/constants/app.js +112 -2
  19. package/build/constants/assets.d.ts +4 -0
  20. package/build/constants/assets.js +4 -0
  21. package/build/constants/dummy.d.ts +103 -0
  22. package/build/constants/dummy.js +219 -0
  23. package/build/constants/validation.d.ts +4 -0
  24. package/build/constants/validation.js +4 -0
  25. package/build/features/bank/Bank.d.ts +6 -0
  26. package/build/features/bank/Bank.js +48 -0
  27. package/build/features/bank/index.d.ts +1 -0
  28. package/build/features/bank/index.js +1 -0
  29. package/build/features/bank/screens/BankDetails/BankDetails.d.ts +5 -0
  30. package/build/features/bank/screens/BankDetails/BankDetails.js +57 -0
  31. package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -0
  32. package/build/features/bank/screens/BankDetails/BankName.js +27 -0
  33. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +5 -0
  34. package/build/features/bank/screens/BankDetails/Beneficiary.js +34 -0
  35. package/build/features/bank/screens/BankDetails/IBAN.d.ts +5 -0
  36. package/build/features/bank/screens/BankDetails/IBAN.js +35 -0
  37. package/build/features/bank/screens/BankDetails/index.d.ts +3 -0
  38. package/build/features/bank/screens/BankDetails/index.js +2 -0
  39. package/build/features/bank/screens/BankDetails/validation.d.ts +14 -0
  40. package/build/features/bank/screens/BankDetails/validation.js +9 -0
  41. package/build/features/business/Business.d.ts +6 -0
  42. package/build/features/business/Business.js +61 -0
  43. package/build/features/business/index.d.ts +1 -0
  44. package/build/features/business/index.js +1 -1
  45. package/build/features/business/screens/Activities/Activities.d.ts +5 -0
  46. package/build/features/business/screens/Activities/Activities.js +83 -0
  47. package/build/features/business/screens/Activities/ActivitiesList.d.ts +70 -0
  48. package/build/features/business/screens/Activities/ActivitiesList.js +136 -0
  49. package/build/features/business/screens/Activities/SalesChannels.d.ts +5 -0
  50. package/build/features/business/screens/Activities/SalesChannels.js +107 -0
  51. package/build/features/business/screens/Activities/index.d.ts +3 -0
  52. package/build/features/business/screens/Activities/index.js +2 -0
  53. package/build/features/business/screens/Activities/validation.d.ts +119 -0
  54. package/build/features/business/screens/Activities/validation.js +17 -0
  55. package/build/features/business/screens/BusinessType/BusinessType.d.ts +12 -0
  56. package/build/features/business/screens/BusinessType/BusinessType.js +85 -0
  57. package/build/features/business/screens/BusinessType/CRNumber.d.ts +6 -0
  58. package/build/features/business/screens/BusinessType/CRNumber.js +40 -0
  59. package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +11 -0
  60. package/build/features/business/screens/BusinessType/CompanyLicense.js +109 -0
  61. package/build/features/business/screens/BusinessType/FLNumber.d.ts +6 -0
  62. package/build/features/business/screens/BusinessType/FLNumber.js +40 -0
  63. package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +11 -0
  64. package/build/features/business/screens/BusinessType/FreelanceLicense.js +112 -0
  65. package/build/features/business/screens/BusinessType/SelectType.d.ts +8 -0
  66. package/build/features/business/screens/BusinessType/SelectType.js +106 -0
  67. package/build/features/business/screens/BusinessType/Switch.d.ts +7 -0
  68. package/build/features/business/screens/BusinessType/Switch.js +35 -0
  69. package/build/features/business/screens/BusinessType/index.d.ts +3 -0
  70. package/build/features/business/screens/BusinessType/index.js +2 -0
  71. package/build/features/business/screens/BusinessType/validation.d.ts +15 -0
  72. package/build/features/business/screens/BusinessType/validation.js +14 -0
  73. package/build/features/business/screens/Confirm/Confirm.d.ts +5 -0
  74. package/build/features/business/screens/Confirm/Confirm.js +53 -0
  75. package/build/features/business/screens/Confirm/index.d.ts +3 -0
  76. package/build/features/business/screens/Confirm/index.js +2 -0
  77. package/build/features/business/screens/Customers/CustomerLocations.d.ts +92 -0
  78. package/build/features/business/screens/Customers/CustomerLocations.js +122 -0
  79. package/build/features/business/screens/Customers/Customers.d.ts +5 -0
  80. package/build/features/business/screens/Customers/Customers.js +92 -0
  81. package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +7 -0
  82. package/build/features/business/screens/Customers/ExpectedCustomers.js +78 -0
  83. package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +7 -0
  84. package/build/features/business/screens/Customers/ExpectedSalesRange.js +74 -0
  85. package/build/features/business/screens/Customers/RefundPolicy.d.ts +44 -0
  86. package/build/features/business/screens/Customers/RefundPolicy.js +86 -0
  87. package/build/features/business/screens/Customers/TransactionPolicy.d.ts +3 -0
  88. package/build/features/business/screens/Customers/TransactionPolicy.js +37 -0
  89. package/build/features/business/screens/Customers/index.d.ts +3 -0
  90. package/build/features/business/screens/Customers/index.js +2 -0
  91. package/build/features/business/screens/Customers/validation.d.ts +20 -0
  92. package/build/features/business/screens/Customers/validation.js +8 -0
  93. package/build/features/business/screens/IDBOD/DOB.js +8 -8
  94. package/build/features/business/screens/IDBOD/ID.js +8 -7
  95. package/build/features/business/screens/IDBOD/IDBOD.js +5 -6
  96. package/build/features/business/screens/OTP/OTP.d.ts +11 -0
  97. package/build/features/business/screens/OTP/OTP.js +112 -0
  98. package/build/features/business/screens/OTP/OTPInput.d.ts +5 -0
  99. package/build/features/business/screens/OTP/OTPInput.js +51 -0
  100. package/build/features/{connect → business}/screens/OTP/OTPTimer.d.ts +0 -0
  101. package/build/features/business/screens/OTP/OTPTimer.js +20 -0
  102. package/build/features/business/screens/OTP/index.d.ts +3 -0
  103. package/build/features/business/screens/OTP/index.js +2 -0
  104. package/build/features/business/screens/OTP/validation.d.ts +8 -0
  105. package/build/features/business/screens/OTP/validation.js +4 -0
  106. package/build/features/business/screens/Success/Success.d.ts +5 -0
  107. package/build/features/business/screens/Success/Success.js +15 -0
  108. package/build/features/business/screens/Success/index.d.ts +3 -0
  109. package/build/features/business/screens/Success/index.js +2 -0
  110. package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +6 -0
  111. package/build/features/business/screens/VerifyNumber/OTPInput.js +68 -0
  112. package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +5 -0
  113. package/build/features/business/screens/VerifyNumber/OTPTimer.js +20 -0
  114. package/build/features/business/screens/VerifyNumber/VerifyNumber.d.ts +13 -0
  115. package/build/features/business/screens/VerifyNumber/VerifyNumber.js +119 -0
  116. package/build/features/business/screens/VerifyNumber/index.d.ts +3 -0
  117. package/build/features/business/screens/VerifyNumber/index.js +2 -0
  118. package/build/features/business/screens/VerifyNumber/validation.d.ts +8 -0
  119. package/build/features/business/screens/VerifyNumber/validation.js +4 -0
  120. package/build/features/connect/Connect.js +6 -18
  121. package/build/features/connect/screens/Individual/Email.d.ts +1 -1
  122. package/build/features/connect/screens/Individual/Email.js +6 -31
  123. package/build/features/connect/screens/Individual/Individual.js +7 -16
  124. package/build/features/connect/screens/Individual/Name.d.ts +1 -1
  125. package/build/features/connect/screens/Individual/Name.js +7 -34
  126. package/build/features/connect/screens/MID/BusinessCountry.js +5 -40
  127. package/build/features/connect/screens/MID/IDNumber.js +13 -28
  128. package/build/features/connect/screens/MID/MID.js +6 -43
  129. package/build/features/connect/screens/MID/MobileNumber.js +22 -41
  130. package/build/features/connect/screens/Merchant/BrandName.js +5 -31
  131. package/build/features/connect/screens/Merchant/Merchant.js +6 -50
  132. package/build/features/connect/screens/Merchant/SocialMedia.js +3 -11
  133. package/build/features/connect/screens/Merchant/TAC.js +4 -13
  134. package/build/features/connect/screens/OTP/OTP.js +17 -61
  135. package/build/features/connect/screens/OTP/OTPInput.js +8 -21
  136. package/build/features/connect/screens/Password/Password.js +12 -49
  137. package/build/features/connect/screens/Password/PasswordInput.js +16 -51
  138. package/build/features/connect/screens/ThankYou/ThankYou.js +4 -65
  139. package/build/features/featuresScreens.d.ts +5 -0
  140. package/build/features/featuresScreens.js +78 -7
  141. package/build/features/owner/Owner.d.ts +6 -0
  142. package/build/features/owner/Owner.js +50 -0
  143. package/build/features/owner/index.d.ts +1 -0
  144. package/build/features/owner/index.js +1 -0
  145. package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.d.ts +19 -0
  146. package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +52 -0
  147. package/build/features/owner/screens/ShowOwnerInfo/index.d.ts +3 -0
  148. package/build/features/owner/screens/ShowOwnerInfo/index.js +2 -0
  149. package/build/features/owner/screens/ShowOwnerInfo/info.d.ts +7 -0
  150. package/build/features/owner/screens/ShowOwnerInfo/info.js +28 -0
  151. package/build/features/password/Password.d.ts +6 -0
  152. package/build/features/password/Password.js +50 -0
  153. package/build/features/password/index.d.ts +1 -0
  154. package/build/features/password/index.js +1 -0
  155. package/build/features/password/screens/CreatePassword/ConditionText.d.ts +7 -0
  156. package/build/features/password/screens/CreatePassword/ConditionText.js +23 -0
  157. package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +5 -0
  158. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +27 -0
  159. package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +5 -0
  160. package/build/features/password/screens/CreatePassword/CreatePassword.js +51 -0
  161. package/build/features/password/screens/CreatePassword/Password.d.ts +5 -0
  162. package/build/features/password/screens/CreatePassword/Password.js +75 -0
  163. package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +7 -0
  164. package/build/features/password/screens/CreatePassword/PasswordBar.js +29 -0
  165. package/build/features/password/screens/CreatePassword/index.d.ts +3 -0
  166. package/build/features/password/screens/CreatePassword/index.js +2 -0
  167. package/build/features/password/screens/CreatePassword/validation.d.ts +11 -0
  168. package/build/features/password/screens/CreatePassword/validation.js +8 -0
  169. package/build/features/shared/Button/Button.d.ts +8 -0
  170. package/build/features/shared/Button/Button.js +49 -0
  171. package/build/features/shared/Button/index.d.ts +2 -0
  172. package/build/features/shared/Button/index.js +2 -0
  173. package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -0
  174. package/build/features/shared/CheckIcon/CheckIcon.js +14 -0
  175. package/build/features/shared/CheckIcon/index.d.ts +2 -0
  176. package/build/features/shared/CheckIcon/index.js +2 -0
  177. package/build/features/shared/ClearIcon/ClearIcon.d.ts +6 -0
  178. package/build/features/shared/ClearIcon/ClearIcon.js +26 -0
  179. package/build/features/shared/ClearIcon/index.d.ts +2 -0
  180. package/build/features/shared/ClearIcon/index.js +2 -0
  181. package/build/features/shared/Containers/FeatureContainer.d.ts +4 -0
  182. package/build/features/shared/Containers/FeatureContainer.js +33 -0
  183. package/build/features/shared/Containers/ScreenContainer.d.ts +4 -0
  184. package/build/features/shared/Containers/ScreenContainer.js +28 -0
  185. package/build/features/shared/Containers/index.d.ts +3 -0
  186. package/build/features/shared/Containers/index.js +3 -0
  187. package/build/features/shared/ExpandIcon/ExpandIcon.d.ts +7 -0
  188. package/build/features/shared/ExpandIcon/ExpandIcon.js +24 -0
  189. package/build/features/shared/ExpandIcon/index.d.ts +2 -0
  190. package/build/features/shared/ExpandIcon/index.js +2 -0
  191. package/build/features/shared/Footer/Footer.d.ts +2 -0
  192. package/build/features/shared/Footer/Footer.js +16 -0
  193. package/build/features/shared/Footer/index.d.ts +2 -0
  194. package/build/features/shared/Footer/index.js +2 -0
  195. package/build/features/shared/Input/Input.d.ts +27 -0
  196. package/build/features/shared/Input/Input.js +59 -0
  197. package/build/features/shared/Input/index.d.ts +2 -0
  198. package/build/features/shared/Input/index.js +2 -0
  199. package/build/features/shared/OTP/OTP.d.ts +9 -0
  200. package/build/features/shared/OTP/OTP.js +85 -0
  201. package/build/features/shared/OTP/index.d.ts +2 -0
  202. package/build/features/shared/OTP/index.js +2 -0
  203. package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +8 -0
  204. package/build/features/shared/PasswordIcon/PasswordIcon.js +37 -0
  205. package/build/features/shared/PasswordIcon/index.d.ts +2 -0
  206. package/build/features/shared/PasswordIcon/index.js +2 -0
  207. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +7 -0
  208. package/build/features/shared/SuccessScreen/SuccessScreen.js +54 -0
  209. package/build/features/shared/SuccessScreen/index.d.ts +2 -0
  210. package/build/features/shared/SuccessScreen/index.js +2 -0
  211. package/build/features/tax/Tax.d.ts +6 -0
  212. package/build/features/tax/Tax.js +50 -0
  213. package/build/features/tax/index.d.ts +1 -0
  214. package/build/features/tax/index.js +1 -0
  215. package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +5 -0
  216. package/build/features/tax/screens/TaxDetails/TaxDetails.js +45 -0
  217. package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -0
  218. package/build/features/tax/screens/TaxDetails/VATId.js +27 -0
  219. package/build/features/tax/screens/TaxDetails/index.d.ts +3 -0
  220. package/build/features/tax/screens/TaxDetails/index.js +2 -0
  221. package/build/features/tax/screens/TaxDetails/validation.d.ts +8 -0
  222. package/build/features/tax/screens/TaxDetails/validation.js +4 -0
  223. package/build/hooks/index.d.ts +1 -0
  224. package/build/hooks/index.js +1 -0
  225. package/build/hooks/useContainerDimensions.d.ts +4 -0
  226. package/build/hooks/useContainerDimensions.js +21 -0
  227. package/build/index.css +1 -1
  228. package/build/index.d.ts +7 -2
  229. package/build/index.js +17 -2
  230. package/build/theme/palette.js +10 -4
  231. package/build/theme/typography.js +2 -2
  232. package/build/utils/array.d.ts +3 -1
  233. package/build/utils/array.js +7 -3
  234. package/build/utils/string.d.ts +2 -0
  235. package/build/utils/string.js +11 -0
  236. package/build/utils/validation.d.ts +6 -0
  237. package/build/utils/validation.js +19 -1
  238. package/package.json +1 -1
  239. package/build/features/connect/Footer.d.ts +0 -4
  240. package/build/features/connect/Footer.js +0 -16
  241. package/build/features/connect/screens/OTP/OTPTimer.js +0 -35
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Input from '../../../shared/Input';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { useController, useFormContext } from 'react-hook-form';
5
+ import { styled } from '@mui/material';
6
+ import { keepLettersAndSpace } from '../../../../utils';
7
+ import { ScreenContainer } from '../../../shared/Containers';
8
+ import ClearIcon from '../../../shared/ClearIcon';
9
+ import CheckIcon from '../../../shared/CheckIcon';
10
+ var FeatureStyled = styled(ScreenContainer)(function (_a) {
11
+ var theme = _a.theme;
12
+ return ({
13
+ marginBlockEnd: theme.spacing(3)
14
+ });
15
+ });
16
+ var Beneficiary = function () {
17
+ var _a;
18
+ var t = useTranslation().t;
19
+ var control = useFormContext().control;
20
+ var beneficiaryControl = useController({ name: 'beneficiaryName', control: control });
21
+ var beneficiaryValue = beneficiaryControl.field.value;
22
+ var hasError = (_a = beneficiaryControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
23
+ var errorMessage = hasError ? t('beneficiary_error') : '';
24
+ var handleBeneficiaryChange = function (_a) {
25
+ var target = _a.target;
26
+ var value = keepLettersAndSpace(target.value);
27
+ beneficiaryControl.field.onChange(value);
28
+ };
29
+ var clearValue = function () {
30
+ beneficiaryControl.field.onChange('');
31
+ };
32
+ return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('beneficiary_name_label'), onChange: handleBeneficiaryChange, value: beneficiaryValue, placeholder: t('beneficiary_name_placeholder'), warningType: 'alert', warningMessage: errorMessage, required: true, endAdornment: !hasError && beneficiaryValue ? _jsx(CheckIcon, {}) : beneficiaryValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
33
+ };
34
+ export default Beneficiary;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface IBANProps {
3
+ }
4
+ declare const IBAN: () => JSX.Element;
5
+ export default IBAN;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Input from '../../../shared/Input';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { useController, useFormContext } from 'react-hook-form';
5
+ import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
6
+ import { styled } from '@mui/material';
7
+ import { MAX_IBAN_VALUE } from '../../../../constants';
8
+ import { ScreenContainer } from '../../../shared/Containers';
9
+ import ClearIcon from '../../../shared/ClearIcon';
10
+ import CheckIcon from '../../../shared/CheckIcon';
11
+ var FeatureStyled = styled(ScreenContainer)(function (_a) {
12
+ var theme = _a.theme;
13
+ return ({
14
+ marginBlockEnd: theme.spacing(3)
15
+ });
16
+ });
17
+ var IBAN = function () {
18
+ var _a;
19
+ var t = useTranslation().t;
20
+ var control = useFormContext().control;
21
+ var ibanControl = useController({ name: 'iban', control: control });
22
+ var ibanValue = ibanControl.field.value;
23
+ var hasError = !!((_a = ibanControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message);
24
+ var errorMessage = hasError ? t('iban_error') : '';
25
+ var handleIbanChange = function (_a) {
26
+ var target = _a.target;
27
+ var value = removeAllOtherThanCharsAndNumber(target.value);
28
+ ibanControl.field.onChange(value);
29
+ };
30
+ var clearValue = function () {
31
+ ibanControl.field.onChange('');
32
+ };
33
+ return (_jsx(FeatureStyled, { children: _jsx(Input, { label: t('iban'), inputProps: { maxLength: MAX_IBAN_VALUE }, onChange: handleIbanChange, value: ibanValue, placeholder: 'SA44#########10', warningType: 'alert', warningMessage: errorMessage, required: true, endAdornment: !hasError && ibanValue ? _jsx(CheckIcon, {}) : ibanValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
34
+ };
35
+ export default IBAN;
@@ -0,0 +1,3 @@
1
+ import BankDetails, { BankDetailsProps } from './BankDetails';
2
+ export type { BankDetailsProps };
3
+ export default BankDetails;
@@ -0,0 +1,2 @@
1
+ import BankDetails from './BankDetails';
2
+ export default BankDetails;
@@ -0,0 +1,14 @@
1
+ import * as yup from 'yup';
2
+ export declare const BankValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
3
+ iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
+ bankName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
5
+ beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ }>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
7
+ iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
+ bankName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
9
+ beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
10
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
11
+ iban: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
12
+ bankName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
13
+ beneficiaryName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
14
+ }>>>;
@@ -0,0 +1,9 @@
1
+ import * as yup from 'yup';
2
+ export var BankValidation = yup.object().shape({
3
+ iban: yup.string().min(16).max(34).required(''),
4
+ bankName: yup.string().required(),
5
+ beneficiaryName: yup
6
+ .string()
7
+ .matches(/^([a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{2,}|[a-zA-Z0-9]+\s{1}[a-zA-Z0-9]{1,}\s{1}[a-zA-Z0-9]{2,})$/g)
8
+ .required('')
9
+ });
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface BusinessLibProps {
3
+ }
4
+ export declare function BusinessLib(props: BusinessLibProps): JSX.Element;
5
+ export declare function renderBusinessLib(config: BusinessLibProps, elementId: string): void;
6
+ export declare function unmountBusinessLib(elementId: string): void;
@@ -0,0 +1,61 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import React, { memo, useEffect } from 'react';
14
+ import { styled } from '@mui/material/styles';
15
+ import Box from '@mui/material/Box';
16
+ import { useAppTheme, useAppDispatch, useAppSelector } from '../../hooks';
17
+ import { handleActiveFlowScreens, settingsSelector } from '../../app/settings';
18
+ import AnimationFlow from '../../components/AnimationFlow';
19
+ import { store } from '../../app/store';
20
+ import { ReduxProvider, ThemeProvider } from '../../components/Providers';
21
+ import Collapse from '../../components/Collapse';
22
+ import { reactElement } from '../../utils';
23
+ import { BUSINESS_SCREENS_NAVIGATION } from '../../constants';
24
+ import { businessFeatureScreens } from '../featuresScreens';
25
+ import CustomFooter from '../shared/Footer';
26
+ var Container = styled(Box)(function (_a) {
27
+ var _b;
28
+ var theme = _a.theme;
29
+ return (_b = {
30
+ width: '100%',
31
+ minHeight: theme.spacing(20)
32
+ },
33
+ _b[theme.transitions.create('height')] = {
34
+ duration: theme.transitions.duration.enteringScreen
35
+ },
36
+ _b);
37
+ });
38
+ var Business = memo(function (props) {
39
+ var open = React.useState(true)[0];
40
+ var theme = useAppTheme().theme;
41
+ var dispatch = useAppDispatch();
42
+ var data = useAppSelector(settingsSelector).data;
43
+ var activeScreen = data.activeScreen;
44
+ useEffect(function () {
45
+ dispatch(handleActiveFlowScreens(BUSINESS_SCREENS_NAVIGATION));
46
+ }, []);
47
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}) }, { children: _jsx(Container, { children: businessFeatureScreens.map(function (_a, index) {
48
+ var Element = _a.element, name = _a.name;
49
+ var isActive = activeScreen.name === name;
50
+ return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 600, exit: 400, appear: 600 } }, { children: _jsx(Element, {}) }), index));
51
+ }) }) })) })));
52
+ });
53
+ export function BusinessLib(props) {
54
+ return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Business, __assign({}, props)) })));
55
+ }
56
+ export function renderBusinessLib(config, elementId) {
57
+ reactElement(elementId).render(_jsx(BusinessLib, __assign({}, config)));
58
+ }
59
+ export function unmountBusinessLib(elementId) {
60
+ reactElement(elementId).unmount();
61
+ }
@@ -0,0 +1 @@
1
+ export * from './Business';
@@ -1 +1 @@
1
- "use strict";
1
+ export * from './Business';
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface ActivitiesProps {
3
+ }
4
+ declare const Activities: () => JSX.Element;
5
+ export default Activities;
@@ -0,0 +1,83 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import Box from '@mui/material/Box';
14
+ import { styled } from '@mui/material/styles';
15
+ import ActivitiesList from './ActivitiesList';
16
+ import { useForm, FormProvider } from 'react-hook-form';
17
+ import { useAppDispatch, useLanguage } from '../../../../hooks';
18
+ import Form from '../../../../components/Form';
19
+ import { yupResolver } from '@hookform/resolvers/yup';
20
+ import { useTranslation } from 'react-i18next';
21
+ import { ActivitiesValidationSchema } from './validation';
22
+ import { handleNextScreenStep } from '../../../../app/settings';
23
+ import { ACTIVITIES, ICONS_NAMES, SALES_CHANNELS } from '../../../../constants';
24
+ import Button from '../../../../components/Button';
25
+ import Loader from '../../../../components/Loader';
26
+ import Icon from '../../../../components/Icon';
27
+ import SalesChannels from './SalesChannels';
28
+ var BoxStyled = styled(Box)(function (_a) {
29
+ var theme = _a.theme;
30
+ return ({
31
+ display: 'flex',
32
+ flexDirection: 'column',
33
+ direction: theme.direction
34
+ });
35
+ });
36
+ var FormStyled = styled(Form)(function () { return ({
37
+ display: 'flex',
38
+ flexDirection: 'column'
39
+ }); });
40
+ var ButtonContainer = styled(Box)(function (_a) {
41
+ var theme = _a.theme;
42
+ return ({
43
+ margin: theme.spacing(5, 2.5, 2.5, 2.5)
44
+ });
45
+ });
46
+ var LoaderStyled = styled(Loader)(function (_a) {
47
+ var theme = _a.theme;
48
+ return ({
49
+ marginInlineStart: theme.spacing(-6.25),
50
+ '& .loader-box-container': {
51
+ marginInlineStart: theme.spacing(2.5)
52
+ }
53
+ });
54
+ });
55
+ var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
56
+ var theme = _a.theme, isAr = _a.isAr;
57
+ return ({
58
+ width: theme.spacing(3),
59
+ height: theme.spacing(3),
60
+ paddingInlineStart: theme.spacing(1.5),
61
+ paddingInlineEnd: theme.spacing(0.5),
62
+ transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
63
+ });
64
+ });
65
+ var Activities = function () {
66
+ var dispatch = useAppDispatch();
67
+ var isAr = useLanguage().isAr;
68
+ var t = useTranslation().t;
69
+ var methods = useForm({
70
+ resolver: yupResolver(ActivitiesValidationSchema),
71
+ defaultValues: {
72
+ activities: [ACTIVITIES[0]],
73
+ salesChannels: [SALES_CHANNELS[0]]
74
+ },
75
+ mode: 'onChange'
76
+ });
77
+ var onSubmit = function (data) {
78
+ console.log('data', data);
79
+ dispatch(handleNextScreenStep());
80
+ };
81
+ return (_jsx(BoxStyled, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [!!ACTIVITIES && _jsx(ActivitiesList, {}), _jsx(SalesChannels, {}), _jsx(ButtonContainer, { children: _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', startIcon: _jsx(LoaderStyled, { innerColor: 'white', outerColor: 'white', size: 30 }), endIcon: _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, { children: t('next') })) })] })) })) }));
82
+ };
83
+ export default Activities;
@@ -0,0 +1,70 @@
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 InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "sx" | "size" | "disabled" | "error" | "name" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
16
+ placeholder?: string | undefined;
17
+ hide?: boolean | undefined;
18
+ warningType?: "alert" | "error" | undefined;
19
+ } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
20
+ export declare const ExpandIcon: import("@emotion/styled").StyledComponent<{
21
+ children?: React.ReactNode;
22
+ classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
23
+ color?: "inherit" | "disabled" | "error" | "primary" | "secondary" | "action" | "info" | "success" | "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" | "type" | "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" | "name" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "method" | "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" | "version" | "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
+ anchorEl: HTMLElement | null;
35
+ }, {}, {}>;
36
+ export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
37
+ children?: React.ReactNode;
38
+ classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
39
+ color?: "inherit" | "disabled" | "error" | "primary" | "secondary" | "action" | "info" | "success" | "warning" | undefined;
40
+ fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
41
+ htmlColor?: string | undefined;
42
+ inheritViewBox?: boolean | undefined;
43
+ shapeRendering?: string | undefined;
44
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
45
+ titleAccess?: string | undefined;
46
+ viewBox?: string | undefined;
47
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "type" | "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" | "name" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "method" | "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" | "version" | "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"> & {
48
+ ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
49
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
50
+ export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
51
+ align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
52
+ children?: React.ReactNode;
53
+ classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
54
+ gutterBottom?: boolean | undefined;
55
+ noWrap?: boolean | undefined;
56
+ paragraph?: boolean | undefined;
57
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
58
+ variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
59
+ variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
60
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
61
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
62
+ }, 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> & {
63
+ isSelected: boolean;
64
+ }, {}, {}>;
65
+ export interface ActivitiesListProps {
66
+ onListOpen?: () => void;
67
+ onListClose?: () => void;
68
+ }
69
+ declare const ActivitiesList: ({ ...rest }: ActivitiesListProps) => JSX.Element;
70
+ export default ActivitiesList;
@@ -0,0 +1,136 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
24
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
25
+ if (ar || !(i in from)) {
26
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
27
+ ar[i] = from[i];
28
+ }
29
+ }
30
+ return to.concat(ar || Array.prototype.slice.call(from));
31
+ };
32
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
33
+ import * as React from 'react';
34
+ import Box from '@mui/material/Box';
35
+ import { alpha, styled } from '@mui/material/styles';
36
+ import Text from '../../../../components/Text';
37
+ import Input from '../../../../components/Input';
38
+ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
39
+ import { useTranslation } from 'react-i18next';
40
+ import { useController, useFormContext } from 'react-hook-form';
41
+ import { useLanguage } from '../../../../hooks';
42
+ import { ACTIVITIES } from '../../../../constants';
43
+ import { BusinessType } from '../../../../@types';
44
+ import Collapse from '../../../../components/Collapse';
45
+ import SimpleList from '../../../../components/SimpleList';
46
+ import CheckIcon from '@mui/icons-material/Check';
47
+ import { MandatoryStyled } from './SalesChannels';
48
+ var BoxStyled = styled(Box)(function (_a) {
49
+ var theme = _a.theme;
50
+ return ({
51
+ display: 'flex',
52
+ flexDirection: 'column',
53
+ direction: theme.direction
54
+ });
55
+ });
56
+ export var InputLabelStyled = styled(Text)(function (_a) {
57
+ var theme = _a.theme;
58
+ return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
59
+ });
60
+ export var InputStyled = styled(Input)(function (_a) {
61
+ var theme = _a.theme;
62
+ return ({
63
+ paddingInlineEnd: theme.spacing(2.5),
64
+ '& .MuiInputBase-input': {
65
+ cursor: 'pointer'
66
+ }
67
+ });
68
+ });
69
+ export var ExpandIcon = styled(ExpandMoreIcon, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
70
+ var _b;
71
+ var theme = _a.theme, anchorEl = _a.anchorEl;
72
+ return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', cursor: 'pointer', transform: !!anchorEl ? 'rotate(180deg)' : '', paddingInlineStart: !!anchorEl ? theme.spacing(0) : theme.spacing(1), paddingInlineEnd: !!anchorEl ? theme.spacing(1) : theme.spacing(0) }, _b[theme.transitions.create(['transform'])] = {
73
+ duration: theme.transitions.duration.standard
74
+ }, _b)));
75
+ });
76
+ var SimpleListStyled = styled((SimpleList))(function () { return ({
77
+ height: 'fit-content'
78
+ }); });
79
+ export var CheckIconStyled = styled(CheckIcon)(function (_a) {
80
+ var theme = _a.theme;
81
+ return ({
82
+ color: theme.palette.primary.main,
83
+ display: 'flex',
84
+ alignItems: 'flex-end'
85
+ });
86
+ });
87
+ export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
88
+ var theme = _a.theme, isSelected = _a.isSelected;
89
+ return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
90
+ });
91
+ var ActivitiesList = function (_a) {
92
+ var rest = __rest(_a, []);
93
+ var activitiesMenuList = React.useState(ACTIVITIES)[0];
94
+ var _b = React.useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
95
+ var t = useTranslation().t;
96
+ var isAr = useLanguage().isAr;
97
+ var control = useFormContext().control;
98
+ var activitiesControl = useController({ name: 'activities', control: control });
99
+ var controlValue = activitiesControl.field.value;
100
+ var businessType = BusinessType.CR;
101
+ var isCR = businessType === BusinessType.CR;
102
+ var onOpenList = function (event) {
103
+ var _a;
104
+ setAnchorEl(event.currentTarget);
105
+ (_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
106
+ };
107
+ var onCloseList = function () {
108
+ var _a;
109
+ setAnchorEl(null);
110
+ (_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
111
+ };
112
+ var onSelectItem = function (item) {
113
+ var isActivityExists = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === (item === null || item === void 0 ? void 0 : item.id); });
114
+ if (isActivityExists) {
115
+ 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); });
116
+ if (updatedIdList.length >= 1)
117
+ activitiesControl.field.onChange(updatedIdList);
118
+ return;
119
+ }
120
+ activitiesControl.field.onChange(__spreadArray(__spreadArray([], controlValue, true), [item], false));
121
+ };
122
+ var getSelectedActivities = function () {
123
+ var _a, _b;
124
+ if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) > 1) {
125
+ return (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) + ' ' + t('activities_selected');
126
+ }
127
+ return isAr ? (_a = controlValue[0]) === null || _a === void 0 ? void 0 : _a.name : (_b = controlValue[0]) === null || _b === void 0 ? void 0 : _b.nameEn;
128
+ };
129
+ var getSelectedActivityFlag = function (item) {
130
+ return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === (item === null || item === void 0 ? void 0 : item.id); });
131
+ };
132
+ return (_jsxs(BoxStyled, { children: [_jsxs(InputLabelStyled, { children: [t(isCR ? 'activities' : 'category'), " ", _jsx(MandatoryStyled, { children: "*" })] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, value: getSelectedActivities(), 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) {
133
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === getSelectedActivityFlag(item) }, { children: isAr ? item === null || item === void 0 ? void 0 : item.name : item === null || item === void 0 ? void 0 : item.nameEn })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
134
+ } }) }))] })] }));
135
+ };
136
+ export default ActivitiesList;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
3
+ export declare const CollapseStyled: import("@emotion/styled").StyledComponent<import("../../../../components/Collapse").CollapseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
4
+ declare const SalesChannels: () => JSX.Element;
5
+ export default SalesChannels;