@tap-payments/auth-jsconnect 2.4.3-test → 2.4.8-test

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 (84) hide show
  1. package/build/@types/app.d.ts +27 -1
  2. package/build/api/individual.d.ts +2 -2
  3. package/build/features/app/brand/brandStore.js +10 -9
  4. package/build/features/bank/screens/BankDetails/BankDetails.js +3 -2
  5. package/build/features/bank/screens/BankDetails/BankName.d.ts +2 -1
  6. package/build/features/bank/screens/BankDetails/BankName.js +4 -5
  7. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +2 -1
  8. package/build/features/bank/screens/BankDetails/BankStatement.js +4 -4
  9. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +2 -1
  10. package/build/features/bank/screens/BankDetails/Beneficiary.js +8 -10
  11. package/build/features/bank/screens/BankDetails/IBAN.d.ts +2 -1
  12. package/build/features/bank/screens/BankDetails/IBAN.js +3 -5
  13. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +0 -14
  14. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +6 -11
  15. package/build/features/brand/screens/BrandActivities/BrandActivities.js +13 -7
  16. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +4 -27
  17. package/build/features/brand/screens/BrandActivities/CustomerBase.js +9 -18
  18. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
  19. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +6 -5
  20. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +2 -1
  21. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +15 -14
  22. package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -4
  23. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +2 -1
  24. package/build/features/brand/screens/BrandInfo/BrandLogo.js +2 -2
  25. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +2 -1
  26. package/build/features/brand/screens/BrandInfo/BrandName.js +3 -5
  27. package/build/features/brand/screens/BrandInfo/SalesChannels.js +6 -3
  28. package/build/features/brand/screens/BrandInfo/Segments.d.ts +2 -1
  29. package/build/features/brand/screens/BrandInfo/Segments.js +17 -24
  30. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +2 -1
  31. package/build/features/brand/screens/BrandInfo/TeamSize.js +18 -25
  32. package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -14
  33. package/build/features/business/screens/Activities/ActivitiesList.js +2 -10
  34. package/build/features/business/screens/BusinessType/EntityName.js +2 -3
  35. package/build/features/business/screens/CivilID/IDNumber.js +2 -3
  36. package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -26
  37. package/build/features/business/screens/Customers/CustomerLocations.js +2 -10
  38. package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -3
  39. package/build/features/business/screens/Customers/ExpectedSalesRange.js +6 -5
  40. package/build/features/business/screens/IDBOD/ID.js +2 -3
  41. package/build/features/connect/screens/CivilID/CivilID.js +5 -13
  42. package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
  43. package/build/features/connect/screens/Individual/Email.js +8 -10
  44. package/build/features/connect/screens/Individual/MobileNumber.js +6 -9
  45. package/build/features/connect/screens/Individual/Name.js +11 -15
  46. package/build/features/connect/screens/Merchant/BrandName.js +2 -4
  47. package/build/features/connect/screens/Merchant/Segments.js +2 -10
  48. package/build/features/connect/screens/Merchant/TeamSize.js +10 -18
  49. package/build/features/connect/screens/Mobile/MobileNumber.js +6 -9
  50. package/build/features/connect/screens/NID/IDNumber.js +6 -7
  51. package/build/features/connectExpress/screens/CivilID/IDNumber.js +6 -7
  52. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +6 -7
  53. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +3 -5
  54. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +1 -1
  55. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +2 -4
  56. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +2 -3
  57. package/build/features/connectExpress/screens/NID/IDNumber.js +2 -3
  58. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +2 -3
  59. package/build/features/entity/screens/EntityName/EntityTypeList.js +1 -1
  60. package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
  61. package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
  62. package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
  63. package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
  64. package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
  65. package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
  66. package/build/features/shared/EndAdornment/index.d.ts +3 -0
  67. package/build/features/shared/EndAdornment/index.js +3 -0
  68. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +2 -1
  69. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +4 -3
  70. package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
  71. package/build/features/shared/SalesChannels/SalesChannel.js +2 -2
  72. package/build/features/shared/UploadFile/FileUpload.d.ts +2 -1
  73. package/build/features/shared/UploadFile/FileUpload.js +2 -2
  74. package/build/features/shared/UploadFile/UploadWrapper.d.ts +2 -1
  75. package/build/features/shared/UploadFile/UploadWrapper.js +2 -2
  76. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +2 -1
  77. package/build/features/shared/UploadMultipleFile/UploadFile.js +2 -2
  78. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +2 -1
  79. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
  80. package/build/hooks/index.d.ts +1 -0
  81. package/build/hooks/index.js +1 -0
  82. package/build/hooks/useDataVerified.d.ts +6 -0
  83. package/build/hooks/useDataVerified.js +19 -0
  84. package/package.json +1 -1
@@ -10,20 +10,20 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { connectSelector } from '../../../app/connect/connectStore';
14
- import Box from '@mui/material/Box';
15
- import Collapse from '../../../../components/Collapse';
16
- import { ScreenContainer } from '../../../../features/shared/Containers';
17
- import Input from '../../../../features/shared/Input';
18
- import { useAppSelector, useLanguage } from '../../../../hooks';
19
13
  import React from 'react';
20
- import { useTranslation } from 'react-i18next';
21
14
  import { useController, useFormContext } from 'react-hook-form';
15
+ import { useTranslation } from 'react-i18next';
16
+ import Box from '@mui/material/Box';
17
+ import { styled } from '@mui/material/styles';
18
+ import { useAppSelector, useLanguage } from '../../../../hooks';
22
19
  import SimpleList from '../../../../components/SimpleList';
23
20
  import ExpandIcon from '../../../../components/ExpandIcon';
24
- import { styled } from '@mui/material/styles';
21
+ import Collapse from '../../../../components/Collapse';
25
22
  import Text from '../../../../components/Text';
26
- import CheckIcon from '@mui/icons-material/Check';
23
+ import { connectSelector } from '../../../app/connect/connectStore';
24
+ import { ScreenContainer } from '../../../shared/Containers';
25
+ import Input from '../../../shared/Input';
26
+ import CheckIcon from '../../../shared/CheckIcon';
27
27
  var InputStyled = styled(Input)(function () { return ({
28
28
  '& .MuiInputBase-input': {
29
29
  cursor: 'pointer'
@@ -33,14 +33,6 @@ var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop
33
33
  var theme = _a.theme, isSelected = _a.isSelected;
34
34
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
35
35
  });
36
- var CheckIconStyled = styled(CheckIcon)(function (_a) {
37
- var theme = _a.theme;
38
- return ({
39
- color: theme.palette.success.main,
40
- display: 'flex',
41
- alignItems: 'flex-end'
42
- });
43
- });
44
36
  var TeamSize = function (_a) {
45
37
  var _b, _c, _d, _e;
46
38
  var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose;
@@ -73,7 +65,7 @@ var TeamSize = function (_a) {
73
65
  };
74
66
  return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputStyled, { required: true, label: t('team_size_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_team_size'), value: (isAr ? (_d = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en', 'name.ar'], list: teamSizeList, onSelectItem: onSelectItem, renderItem: function (item) {
75
67
  var _a, _b;
76
- return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) }, { children: 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 })) })), item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) && _jsx(CheckIconStyled, {})] }));
68
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) }, { children: 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 })) })), item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) && _jsx(CheckIcon, {})] }));
77
69
  } }) }))] })) })));
78
70
  };
79
71
  export default TeamSize;
@@ -73,15 +73,12 @@ var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
73
73
  marginInlineStart: theme.spacing(1)
74
74
  });
75
75
  });
76
- var InputStyled = styled(Input)(function (_a) {
77
- var theme = _a.theme;
78
- return ({
79
- direction: 'ltr',
80
- '& .MuiInputBase-input': {
81
- cursor: 'auto'
82
- }
83
- });
84
- });
76
+ var InputStyled = styled(Input)(function () { return ({
77
+ direction: 'ltr',
78
+ '& .MuiInputBase-input': {
79
+ cursor: 'auto'
80
+ }
81
+ }); });
85
82
  var MobileNumber = React.forwardRef(function (_a, ref) {
86
83
  var _b, _c, _d;
87
84
  var countries = _a.countries, rest = __rest(_a, ["countries"]);
@@ -11,18 +11,17 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import Box from '@mui/material/Box';
15
14
  import { useTranslation } from 'react-i18next';
16
15
  import { useController, useFormContext } from 'react-hook-form';
17
16
  import { styled, alpha } from '@mui/material/styles';
17
+ import Box from '@mui/material/Box';
18
+ import { removeAllCharsFromNumber } from '../../../../utils';
19
+ import { ID_NUMBER_LENGTH } from '../../../../constants';
18
20
  import Text from '../../../../components/Text';
19
- import Input from '../../../shared/Input';
20
- import ClearIcon from '../../../shared/ClearIcon';
21
- import CheckIcon from '../../../shared/CheckIcon';
22
21
  import Collapse from '../../../../components/Collapse';
22
+ import Input from '../../../shared/Input';
23
23
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
24
- import { removeAllCharsFromNumber } from '../../../../utils';
25
- import { ID_NUMBER_LENGTH } from '../../../../constants';
24
+ import { EndAdornment } from '../../../shared/EndAdornment';
26
25
  var LabelContainerStyled = styled(Box)(function (_a) {
27
26
  var theme = _a.theme;
28
27
  return ({
@@ -55,6 +54,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
55
54
  };
56
55
  var nidValue = nidControl.field.value;
57
56
  var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
58
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
57
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: _jsx(EndAdornment, { value: nidValue, error: error, onClear: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
59
58
  });
60
59
  export default React.memo(IDNumber);
@@ -11,17 +11,16 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import Box from '@mui/material/Box';
15
14
  import { useTranslation } from 'react-i18next';
16
15
  import { useController, useFormContext } from 'react-hook-form';
16
+ import Box from '@mui/material/Box';
17
17
  import { styled, alpha } from '@mui/material/styles';
18
18
  import Text from '../../../../components/Text';
19
- import Input from '../../../shared/Input';
20
- import ClearIcon from '../../../shared/ClearIcon';
21
- import CheckIcon from '../../../shared/CheckIcon';
22
- import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
19
  import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
24
20
  import { CIVIL_ID_NUMBER_LENGTH } from '../../../../constants';
21
+ import Input from '../../../shared/Input';
22
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
+ import { EndAdornment } from '../../../shared/EndAdornment';
25
24
  var LabelContainerStyled = styled(Box)(function (_a) {
26
25
  var theme = _a.theme;
27
26
  return ({
@@ -38,7 +37,7 @@ var IDNumber = React.forwardRef(function (_a, ref) {
38
37
  var _b;
39
38
  var sx = _a.sx;
40
39
  var t = useTranslation().t;
41
- var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
40
+ var control = useFormContext().control;
42
41
  var civilIdControl = useController({ control: control, name: 'civilId' });
43
42
  var handleIdChange = function (_a) {
44
43
  var target = _a.target;
@@ -50,6 +49,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
50
49
  };
51
50
  var idValue = civilIdControl.field.value;
52
51
  var error = (_b = civilIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
53
- return (_jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_civil_id') }) }), _jsx(Input, { dir: 'ltr', type: 'text', inputProps: { maxLength: CIVIL_ID_NUMBER_LENGTH }, onChange: handleIdChange, value: idValue, endAdornment: !error && idValue ? _jsx(CheckIcon, {}) : idValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: t('civil_id_placeholder'), warningType: 'alert', warningMessage: error && t(error), required: true })] })));
52
+ return (_jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_civil_id') }) }), _jsx(Input, { dir: 'ltr', type: 'text', inputProps: { maxLength: CIVIL_ID_NUMBER_LENGTH }, onChange: handleIdChange, value: idValue, endAdornment: _jsx(EndAdornment, { value: idValue, error: error, onClear: clearIdNumber }), placeholder: t('civil_id_placeholder'), warningType: 'alert', warningMessage: error && t(error), required: true })] })));
54
53
  });
55
54
  export default React.memo(IDNumber);
@@ -11,17 +11,16 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import Box from '@mui/material/Box';
15
14
  import { useTranslation } from 'react-i18next';
16
15
  import { useController, useFormContext } from 'react-hook-form';
16
+ import Box from '@mui/material/Box';
17
17
  import { styled, alpha } from '@mui/material/styles';
18
18
  import Text from '../../../../components/Text';
19
- import Input from '../../../shared/Input';
20
- import ClearIcon from '../../../shared/ClearIcon';
21
- import CheckIcon from '../../../shared/CheckIcon';
22
- import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
19
  import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
24
20
  import { CIVIL_ID_NUMBER_LENGTH } from '../../../../constants';
21
+ import Input from '../../../shared/Input';
22
+ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
+ import { EndAdornment } from '../../../shared/EndAdornment';
25
24
  var LabelContainerStyled = styled(Box)(function (_a) {
26
25
  var theme = _a.theme;
27
26
  return ({
@@ -38,7 +37,7 @@ var IDNumber = React.forwardRef(function (_a, ref) {
38
37
  var _b;
39
38
  var sx = _a.sx;
40
39
  var t = useTranslation().t;
41
- var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
40
+ var control = useFormContext().control;
42
41
  var civilIdControl = useController({ control: control, name: 'civilId' });
43
42
  var handleIdChange = function (_a) {
44
43
  var target = _a.target;
@@ -50,6 +49,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
50
49
  };
51
50
  var idValue = civilIdControl.field.value;
52
51
  var error = (_b = civilIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
53
- return (_jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_civil_id') }) }), _jsx(Input, { dir: 'ltr', type: 'text', inputProps: { maxLength: CIVIL_ID_NUMBER_LENGTH }, onChange: handleIdChange, value: idValue, endAdornment: !error && idValue ? _jsx(CheckIcon, {}) : idValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: t('civil_id_placeholder'), warningType: 'alert', warningMessage: error && t(error), required: true })] })));
52
+ return (_jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_civil_id') }) }), _jsx(Input, { dir: 'ltr', type: 'text', inputProps: { maxLength: CIVIL_ID_NUMBER_LENGTH }, onChange: handleIdChange, value: idValue, endAdornment: _jsx(EndAdornment, { value: idValue, error: error, onClear: clearIdNumber }), placeholder: t('civil_id_placeholder'), warningType: 'alert', warningMessage: error && t(error), required: true })] })));
54
53
  });
55
54
  export default React.memo(IDNumber);
@@ -54,16 +54,14 @@ import axios from 'axios';
54
54
  import Box from '@mui/material/Box';
55
55
  import { styled, alpha } from '@mui/material/styles';
56
56
  import InfoIcon from '@mui/icons-material/Info';
57
- import CircularProgress from '@mui/material/CircularProgress';
58
57
  import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
59
- import { ScreenContainer } from '../../../shared/Containers';
60
58
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
61
59
  import Text from '../../../../components/Text';
62
60
  import Tooltip from '../../../../components/Tooltip';
63
61
  import Collapse from '../../../../components/Collapse';
64
62
  import Input from '../../../shared/Input';
65
- import ClearIcon from '../../../shared/ClearIcon';
66
- import CheckIcon from '../../../shared/CheckIcon';
63
+ import { EndAdornment } from '../../../shared/EndAdornment';
64
+ import { ScreenContainer } from '../../../shared/Containers';
67
65
  import { checkBrandNameAvailabilityAsync, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
68
66
  var LabelContainerStyled = styled(Box)(function (_a) {
69
67
  var theme = _a.theme;
@@ -135,6 +133,6 @@ var BrandName = function (_a) {
135
133
  var clearBrandName = function () {
136
134
  brandControl.field.onChange('');
137
135
  };
138
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 2.5 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, readOnly: readOnly, value: brandNameValue || '', placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: brandNameChecking ? (_jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } })) : !error && brandNameValue ? (_jsx(CheckIcon, {})) : (brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName })) })] })) })));
136
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 2.5 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, readOnly: readOnly, value: brandNameValue || '', placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, error: error, onClear: clearBrandName }) })] })) })));
139
137
  };
140
138
  export default React.memo(BrandName);
@@ -47,6 +47,6 @@ var LicenseNumber = function (_a) {
47
47
  var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : length;
48
48
  var label = isCR ? 'cr_number' : 'fl_number';
49
49
  var showCheckIcon = !isSACountry ? (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) >= minLength : (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) === length;
50
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, label: t(label), required: !isSACountry, onChange: handleFLNumberChange, inputProps: { maxLength: length }, value: licenseNumberValue, endAdornment: showCheckIcon || readOnly ? _jsx(CheckIcon, {}) : licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber }), placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), warningType: 'alert', warningMessage: error && t(error, { length: minLength }) }) }) })));
50
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { readOnly: readOnly, label: t(label), required: !isSACountry, onChange: handleFLNumberChange, inputProps: { maxLength: length }, value: licenseNumberValue, endAdornment: showCheckIcon || (readOnly && licenseNumberValue) ? _jsx(CheckIcon, {}) : licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber }), placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), warningType: 'alert', warningMessage: error && t(error, { length: minLength }) }) }) })));
51
51
  };
52
52
  export default React.memo(LicenseNumber);
@@ -52,13 +52,11 @@ import { debounce } from 'lodash-es';
52
52
  import { useController, useFormContext } from 'react-hook-form';
53
53
  import axios from 'axios';
54
54
  import { styled } from '@mui/material/styles';
55
- import CircularProgress from '@mui/material/CircularProgress';
56
55
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
57
56
  import Collapse from '../../../../components/Collapse';
58
57
  import { ScreenContainer } from '../../../shared/Containers';
59
58
  import Input from '../../../shared/Input';
60
- import ClearIcon from '../../../shared/ClearIcon';
61
- import CheckIcon from '../../../shared/CheckIcon';
59
+ import { EndAdornment } from '../../../shared/EndAdornment';
62
60
  import { checkEmailAvailabilityAsync, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
63
61
  var InputStyled = styled(Input)(function () { return ({
64
62
  input: {
@@ -102,6 +100,6 @@ var Email = function (_a) {
102
100
  var clearNumber = function () {
103
101
  emailControl.field.onChange('');
104
102
  };
105
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, readOnly: readOnly, onEnterPressed: function (e) { return e.preventDefault(); }, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: emailChecking ? (_jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } })) : !error && emailValue ? (_jsx(CheckIcon, {})) : (emailValue && _jsx(ClearIcon, { onClick: clearNumber })) }) }) })));
103
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, readOnly: readOnly, onEnterPressed: function (e) { return e.preventDefault(); }, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: emailValue, loading: emailChecking, error: error, onClear: clearNumber }) }) }) })));
106
104
  };
107
105
  export default React.memo(Email);
@@ -18,8 +18,7 @@ import { removeAllOtherThanAlphabetAndSpace } from '../../../../utils';
18
18
  import Collapse from '../../../../components/Collapse';
19
19
  import { ScreenContainer } from '../../../shared/Containers';
20
20
  import Input from '../../../shared/Input';
21
- import ClearIcon from '../../../shared/ClearIcon';
22
- import CheckIcon from '../../../shared/CheckIcon';
21
+ import { EndAdornment } from '../../../shared/EndAdornment';
23
22
  var InputStyled = styled(Input)(function () { return ({
24
23
  input: {
25
24
  textTransform: 'capitalize'
@@ -40,6 +39,6 @@ var Name = function (_a) {
40
39
  var clearNumber = function () {
41
40
  nameControl.field.onChange('');
42
41
  };
43
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(InputStyled, { label: t('signup_merchant_name_label'), value: nameValue, readOnly: readOnly, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && nameValue ? _jsx(CheckIcon, {}) : nameValue && _jsx(ClearIcon, { onClick: clearNumber }) }) })) })));
42
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(InputStyled, { label: t('signup_merchant_name_label'), value: nameValue, readOnly: readOnly, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: nameValue, error: error, onClear: clearNumber }) }) })) })));
44
43
  };
45
44
  export default React.memo(Name);
@@ -18,12 +18,11 @@ import { useAppSelector } from '../../../../hooks';
18
18
  import { styled, alpha } from '@mui/material/styles';
19
19
  import Text from '../../../../components/Text';
20
20
  import Input from '../../../shared/Input';
21
- import ClearIcon from '../../../shared/ClearIcon';
22
- import CheckIcon from '../../../shared/CheckIcon';
23
21
  import Collapse from '../../../../components/Collapse';
24
22
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
25
23
  import { removeAllCharsFromNumber } from '../../../../utils';
26
24
  import { ID_NUMBER_LENGTH } from '../../../../constants';
25
+ import { EndAdornment } from '../../../shared/EndAdornment';
27
26
  import { connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
28
27
  var LabelContainerStyled = styled(Box)(function (_a) {
29
28
  var theme = _a.theme;
@@ -56,6 +55,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
56
55
  var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
57
56
  var isLeadIdPassed = data.isLeadIdPassed, responseData = data.responseData;
58
57
  var isLeadIdentityIdAvailable = !!((_d = (_c = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _c === void 0 ? void 0 : _c.identification) === null || _d === void 0 ? void 0 : _d.id);
59
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { readOnly: readOnly, dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, disabled: isLeadIdPassed && isLeadIdentityIdAvailable, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
58
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { readOnly: readOnly, dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, disabled: isLeadIdPassed && isLeadIdentityIdAvailable, onChange: handleIdChange, value: nidValue, endAdornment: _jsx(EndAdornment, { value: nidValue, error: error, onClear: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
60
59
  });
61
60
  export default React.memo(IDNumber);
@@ -17,12 +17,11 @@ import { useController, useFormContext } from 'react-hook-form';
17
17
  import { styled, alpha } from '@mui/material/styles';
18
18
  import Text from '../../../../components/Text';
19
19
  import Input from '../../../shared/Input';
20
- import ClearIcon from '../../../shared/ClearIcon';
21
- import CheckIcon from '../../../shared/CheckIcon';
22
20
  import Collapse from '../../../../components/Collapse';
23
21
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
24
22
  import { removeAllCharsFromNumber } from '../../../../utils';
25
23
  import { ID_NUMBER_LENGTH } from '../../../../constants';
24
+ import { EndAdornment } from '../../../shared/EndAdornment';
26
25
  var LabelContainerStyled = styled(Box)(function (_a) {
27
26
  var theme = _a.theme;
28
27
  return ({
@@ -51,6 +50,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
51
50
  };
52
51
  var nidValue = nidControl.field.value;
53
52
  var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
54
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
53
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: _jsx(EndAdornment, { value: nidValue, error: error, onClear: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
55
54
  });
56
55
  export default React.memo(IDNumber);
@@ -72,7 +72,7 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({}); });
72
72
  export var CheckIconStyled = styled(CheckIcon)(function (_a) {
73
73
  var theme = _a.theme;
74
74
  return ({
75
- color: theme.palette.primary.main,
75
+ color: theme.palette.success.main,
76
76
  display: 'flex',
77
77
  alignItems: 'flex-end'
78
78
  });
@@ -1,2 +1,8 @@
1
1
  /// <reference types="react" />
2
- export default function CustomClearIcon(): JSX.Element;
2
+ import { SxProps, Theme } from '@mui/material/styles';
3
+ declare type CustomCheckIconProps = {
4
+ isVerified?: boolean;
5
+ sx?: SxProps<Theme>;
6
+ };
7
+ export default function CustomCheckIcon({ isVerified, sx }: CustomCheckIconProps): JSX.Element;
8
+ export {};
@@ -1,14 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { styled } from '@mui/material/styles';
2
+ import { alpha, styled } from '@mui/material/styles';
3
3
  import CheckIcon from '@mui/icons-material/Check';
4
- var ClearIconStyled = styled(CheckIcon)(function (_a) {
5
- var theme = _a.theme;
4
+ var CheckIconStyled = styled(CheckIcon, { shouldForwardProp: function (prop) { return prop !== 'isVerified'; } })(function (_a) {
5
+ var theme = _a.theme, isVerified = _a.isVerified;
6
6
  return ({
7
7
  display: 'flex',
8
8
  alignItems: 'flex-end',
9
- color: theme.palette.success.main
9
+ color: isVerified ? theme.palette.success.main : alpha(theme.palette.success.dark, 0.5)
10
10
  });
11
11
  });
12
- export default function CustomClearIcon() {
13
- return _jsx(ClearIconStyled, {});
12
+ export default function CustomCheckIcon(_a) {
13
+ var _b = _a.isVerified, isVerified = _b === void 0 ? false : _b, sx = _a.sx;
14
+ return _jsx(CheckIconStyled, { isVerified: isVerified, sx: sx });
14
15
  }
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ interface EndAdornmentProps {
3
+ loading?: boolean;
4
+ isVerified?: boolean;
5
+ error?: string;
6
+ value?: string;
7
+ onClear: () => void;
8
+ }
9
+ declare const EndAdornment: ({ isVerified, loading, error, value, onClear }: EndAdornmentProps) => JSX.Element;
10
+ export default EndAdornment;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import CircularProgress from '@mui/material/CircularProgress';
3
+ import ClearIcon from '../../shared/ClearIcon';
4
+ import CheckIcon from '../../shared/CheckIcon';
5
+ var EndAdornment = function (_a) {
6
+ var isVerified = _a.isVerified, loading = _a.loading, error = _a.error, value = _a.value, onClear = _a.onClear;
7
+ var getEndAdornment = function () {
8
+ if (loading)
9
+ return _jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } });
10
+ if (!error && value)
11
+ return _jsx(CheckIcon, { isVerified: isVerified });
12
+ if (value)
13
+ return _jsx(ClearIcon, { onClick: onClear });
14
+ };
15
+ return _jsx(_Fragment, { children: getEndAdornment() });
16
+ };
17
+ export default EndAdornment;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface EndAdornmentExpandedProps {
3
+ anchorEl: HTMLElement | null;
4
+ isVerified?: boolean;
5
+ }
6
+ declare const EndAdornmentExpanded: ({ isVerified, anchorEl }: EndAdornmentExpandedProps) => JSX.Element;
7
+ export default EndAdornmentExpanded;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import CheckIcon from '../../shared/CheckIcon';
3
+ import ExpandIcon from '../../../components/ExpandIcon';
4
+ var EndAdornmentExpanded = function (_a) {
5
+ var isVerified = _a.isVerified, anchorEl = _a.anchorEl;
6
+ var getEndAdornmentExpanded = function () {
7
+ if (isVerified && !anchorEl)
8
+ return (_jsxs(_Fragment, { children: [_jsx(CheckIcon, { isVerified: isVerified, sx: { marginInlineEnd: '10px' } }), _jsx(ExpandIcon, { anchorEl: !!anchorEl })] }));
9
+ return _jsx(ExpandIcon, { anchorEl: !!anchorEl });
10
+ };
11
+ return _jsx(_Fragment, { children: getEndAdornmentExpanded() });
12
+ };
13
+ export default EndAdornmentExpanded;
@@ -0,0 +1,3 @@
1
+ import EndAdornment from './EndAdornment';
2
+ import EndAdornmentExpanded from './EndAdornmentExpanded';
3
+ export { EndAdornment, EndAdornmentExpanded };
@@ -0,0 +1,3 @@
1
+ import EndAdornment from './EndAdornment';
2
+ import EndAdornmentExpanded from './EndAdornmentExpanded';
3
+ export { EndAdornment, EndAdornmentExpanded };
@@ -7,6 +7,7 @@ interface SaleChannelIconsInputProps {
7
7
  onChangeValue: (val: string, id: string) => void;
8
8
  error: string | undefined;
9
9
  readOnly?: boolean;
10
+ isVerified?: boolean;
10
11
  }
11
- export default function SaleChannelIconsInput({ selectedChannels, onSelectIcon, selectedIconId, onChangeValue, error, readOnly }: SaleChannelIconsInputProps): JSX.Element;
12
+ export default function SaleChannelIconsInput({ selectedChannels, onSelectIcon, selectedIconId, onChangeValue, error, readOnly, isVerified }: SaleChannelIconsInputProps): JSX.Element;
12
13
  export {};
@@ -22,6 +22,7 @@ import ToggleButton from '../../../components/ToggleButton';
22
22
  import Icon from '../../../components/Icon';
23
23
  import { useLanguage } from '../../../hooks';
24
24
  import { isWebsite, isTwitter } from '../../../utils';
25
+ import CheckIcon from '../CheckIcon';
25
26
  var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
26
27
  var theme = _a.theme, defaultValue = _a.defaultValue;
27
28
  return ({
@@ -68,7 +69,7 @@ var SocialMediaButtonStyled = styled(ToggleButton, {
68
69
  });
69
70
  });
70
71
  export default function SaleChannelIconsInput(_a) {
71
- var selectedChannels = _a.selectedChannels, onSelectIcon = _a.onSelectIcon, selectedIconId = _a.selectedIconId, onChangeValue = _a.onChangeValue, error = _a.error, readOnly = _a.readOnly;
72
+ var selectedChannels = _a.selectedChannels, onSelectIcon = _a.onSelectIcon, selectedIconId = _a.selectedIconId, onChangeValue = _a.onChangeValue, error = _a.error, readOnly = _a.readOnly, isVerified = _a.isVerified;
72
73
  var isAr = useLanguage().isAr;
73
74
  var t = useTranslation().t;
74
75
  var getPlaceHolder = function (item) {
@@ -93,9 +94,9 @@ export default function SaleChannelIconsInput(_a) {
93
94
  var isSubActive = selectedIconId === sub.id;
94
95
  return (_jsx(Collapse, __assign({ in: isSubActive, timeout: 300 }, { children: _jsx(InputStyled, { readOnly: readOnly, onChange: function (e) {
95
96
  onChangeValue(e.target.value, sub.id);
96
- }, value: sub.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(sub.code) && { fontSize: '20px' })) }, { children: isWebsite(sub.code) ? "https://www." : isTwitter(sub.code) ? "@" : '' })), placeholder: t(getPlaceHolder(sub)) }) }), "sub_".concat(subIndex)));
97
+ }, value: sub.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(sub.code) && { fontSize: '20px' })) }, { children: isWebsite(sub.code) ? "https://www." : isTwitter(sub.code) ? "@" : '' })), endAdornment: isVerified && !error && _jsx(CheckIcon, { isVerified: true }), placeholder: t(getPlaceHolder(sub)) }) }), "sub_".concat(subIndex)));
97
98
  })) : (_jsx(Collapse, __assign({ in: isActive, timeout: 300 }, { children: _jsx(InputStyled, { readOnly: readOnly, onChange: function (e) {
98
99
  onChangeValue(e.target.value, channel.id);
99
- }, value: channel.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(channel.code) && { fontSize: '20px' })) }, { children: isWebsite(channel.code) ? "https://www." : isTwitter(channel.code) ? "@" : '' })), placeholder: t(getPlaceHolder(channel)) }) }), index));
100
+ }, value: channel.address || '', startAdornment: _jsx(TextStyled, __assign({ sx: __assign({}, (isTwitter(channel.code) && { fontSize: '20px' })) }, { children: isWebsite(channel.code) ? "https://www." : isTwitter(channel.code) ? "@" : '' })), placeholder: t(getPlaceHolder(channel)), endAdornment: isVerified && !error && _jsx(CheckIcon, { isVerified: true }) }) }), index));
100
101
  }), _jsx(Collapse, __assign({ in: !!(error && error !== 'choose_atleast_one_channel') }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(error) })) }))] })) })));
101
102
  }
@@ -8,6 +8,7 @@ interface SalesChannelProps {
8
8
  selectFirstIconListener?: string | number | boolean;
9
9
  disabled?: boolean;
10
10
  readOnly?: boolean;
11
+ isChannelVerified?: (id: string) => boolean;
11
12
  }
12
- declare const _default: React.MemoExoticComponent<({ list, onChange, error, disabled, readOnly, defaultValue, selectFirstIconListener }: SalesChannelProps) => JSX.Element>;
13
+ declare const _default: React.MemoExoticComponent<({ list, onChange, error, disabled, readOnly, defaultValue, selectFirstIconListener, isChannelVerified }: SalesChannelProps) => JSX.Element>;
13
14
  export default _default;
@@ -75,7 +75,7 @@ var CollapseStyled = styled(Collapse)(function (_a) {
75
75
  });
76
76
  });
77
77
  var SalesChannel = function (_a) {
78
- var _b = _a.list, list = _b === void 0 ? [] : _b, onChange = _a.onChange, error = _a.error, disabled = _a.disabled, readOnly = _a.readOnly, _c = _a.defaultValue, defaultValue = _c === void 0 ? [] : _c, _d = _a.selectFirstIconListener, selectFirstIconListener = _d === void 0 ? '' : _d;
78
+ var _b = _a.list, list = _b === void 0 ? [] : _b, onChange = _a.onChange, error = _a.error, disabled = _a.disabled, readOnly = _a.readOnly, _c = _a.defaultValue, defaultValue = _c === void 0 ? [] : _c, _d = _a.selectFirstIconListener, selectFirstIconListener = _d === void 0 ? '' : _d, isChannelVerified = _a.isChannelVerified;
79
79
  var _e = React.useState(''), activeSaleIconId = _e[0], setActiveSaleIconId = _e[1];
80
80
  var _f = React.useState([]), selectedSalas = _f[0], setSelectedSales = _f[1];
81
81
  var t = useTranslation().t;
@@ -145,6 +145,6 @@ var SalesChannel = function (_a) {
145
145
  return (_jsxs(_Fragment, { children: [_jsxs(Box, __assign({ sx: { mb: 3 } }, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), list.map(function (channel, index) {
146
146
  var _a, _b;
147
147
  return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id, disableRipple: true, disabled: disabled || readOnly, disableFocusRipple: true, focusRipple: false, checked: isChecked(channel.id), onChange: function () { return onSelectSalesChannel(channel); } }), _jsxs(TextStyled, { children: [isAr ? (_a = channel === null || channel === void 0 ? void 0 : channel.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = channel === null || channel === void 0 ? void 0 : channel.name) === null || _b === void 0 ? void 0 : _b.en, " "] })] }, "".concat(channel.id, "-indx").concat(index)));
148
- }), _jsx(CollapseStyled, __assign({ in: error === 'choose_atleast_one_channel' }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(error) })) }))] }), 'salesChannels'), _jsx(SaleChannelIconsInput, { readOnly: readOnly, error: error, selectedIconId: activeSaleIconId, onSelectIcon: onChangeActiveSaleIcon, onChangeValue: onValueChange, selectedChannels: selectedSalas }, 'saleChannelIconsInput')] }));
148
+ }), _jsx(CollapseStyled, __assign({ in: error === 'choose_atleast_one_channel' }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(error) })) }))] }), 'salesChannels'), _jsx(SaleChannelIconsInput, { readOnly: readOnly, error: error, selectedIconId: activeSaleIconId, onSelectIcon: onChangeActiveSaleIcon, onChangeValue: onValueChange, selectedChannels: selectedSalas, isVerified: isChannelVerified === null || isChannelVerified === void 0 ? void 0 : isChannelVerified(activeSaleIconId) }, 'saleChannelIconsInput')] }));
149
149
  };
150
150
  export default React.memo(SalesChannel);
@@ -26,6 +26,7 @@ export declare type FileUploadProps = {
26
26
  initialFileId?: string;
27
27
  validFileFormats?: Array<string>;
28
28
  readOnly?: boolean;
29
+ isVerified?: boolean;
29
30
  };
30
- declare const FileUpload: ({ key, show, title, file, uploadedFile, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, fileRemoveType, initialFileId, validFileFormats, readOnly }: FileUploadProps) => JSX.Element;
31
+ declare const FileUpload: ({ key, show, title, file, uploadedFile, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, fileRemoveType, initialFileId, validFileFormats, readOnly, isVerified }: FileUploadProps) => JSX.Element;
31
32
  export default FileUpload;
@@ -108,7 +108,7 @@ var WarningContainer = styled(Box)(function (_a) {
108
108
  return (__assign({ background: alpha(theme.palette.warning.main, 0.1), paddingBlock: theme.spacing(1.5), paddingInlineStart: theme.spacing(2.5), flexDirection: 'row', display: 'flex', justifyContent: 'center', color: theme.palette.warning.light, padding: theme.spacing(0.5, 1), borderRadius: '101px', alignItems: 'center', marginTop: theme.spacing(1.25) }, theme.typography.caption));
109
109
  });
110
110
  var FileUpload = function (_a) {
111
- var key = _a.key, show = _a.show, title = _a.title, file = _a.file, uploadedFile = _a.uploadedFile, onSuccess = _a.onSuccess, onDelete = _a.onDelete, onUpdate = _a.onUpdate, sx = _a.sx, purpose = _a.purpose, isSubmitting = _a.isSubmitting, fileRemoveType = _a.fileRemoveType, initialFileId = _a.initialFileId, _b = _a.validFileFormats, validFileFormats = _b === void 0 ? VALID_FILE_FORMATS : _b, readOnly = _a.readOnly;
111
+ var key = _a.key, show = _a.show, title = _a.title, file = _a.file, uploadedFile = _a.uploadedFile, onSuccess = _a.onSuccess, onDelete = _a.onDelete, onUpdate = _a.onUpdate, sx = _a.sx, purpose = _a.purpose, isSubmitting = _a.isSubmitting, fileRemoveType = _a.fileRemoveType, initialFileId = _a.initialFileId, _b = _a.validFileFormats, validFileFormats = _b === void 0 ? VALID_FILE_FORMATS : _b, readOnly = _a.readOnly, isVerified = _a.isVerified;
112
112
  var theme = useTheme();
113
113
  var t = useTranslation().t;
114
114
  var _c = file || {}, name = _c.name, size = _c.size, type = _c.type;
@@ -227,7 +227,7 @@ var FileUpload = function (_a) {
227
227
  if (status === FileStatus.ERROR)
228
228
  return _jsx(ErrorIconStyled, { src: ICONS_NAMES.ERROR_ICON });
229
229
  if (status === FileStatus.SUCCESS)
230
- return _jsx(CheckIcon, {});
230
+ return _jsx(CheckIcon, { isVerified: isVerified });
231
231
  if (status === FileStatus.DOWNLOADING && !progress)
232
232
  return _jsx(MUICircularProgress, { size: 25, thickness: 5 });
233
233
  if (progress)
@@ -30,6 +30,7 @@ interface UploadWrapperProps {
30
30
  defaultFile?: FileDetails;
31
31
  validFileFormats?: Array<string>;
32
32
  readOnly?: boolean;
33
+ isVerified?: boolean;
33
34
  }
34
- declare const _default: React.MemoExoticComponent<({ id, label, control, required, fileRemoveType, title, subTitle, dragDescription, uploadingTitle, successTitle, isSubmitting, onFileUploaded, fileUploadingStatus, onDeleteFile, purpose, fileTitle, defaultFile, validFileFormats, readOnly }: UploadWrapperProps) => JSX.Element>;
35
+ declare const _default: React.MemoExoticComponent<({ id, label, control, required, fileRemoveType, title, subTitle, dragDescription, uploadingTitle, successTitle, isSubmitting, onFileUploaded, fileUploadingStatus, onDeleteFile, purpose, fileTitle, defaultFile, validFileFormats, readOnly, isVerified }: UploadWrapperProps) => JSX.Element>;
35
36
  export default _default;
@@ -44,7 +44,7 @@ export var InputContainerStyled = styled(Box)(function () { return ({
44
44
  justifyContent: 'center'
45
45
  }); });
46
46
  var UploadWrapper = function (_a) {
47
- var id = _a.id, label = _a.label, control = _a.control, required = _a.required, fileRemoveType = _a.fileRemoveType, title = _a.title, subTitle = _a.subTitle, dragDescription = _a.dragDescription, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, isSubmitting = _a.isSubmitting, onFileUploaded = _a.onFileUploaded, fileUploadingStatus = _a.fileUploadingStatus, onDeleteFile = _a.onDeleteFile, purpose = _a.purpose, fileTitle = _a.fileTitle, defaultFile = _a.defaultFile, validFileFormats = _a.validFileFormats, readOnly = _a.readOnly;
47
+ var id = _a.id, label = _a.label, control = _a.control, required = _a.required, fileRemoveType = _a.fileRemoveType, title = _a.title, subTitle = _a.subTitle, dragDescription = _a.dragDescription, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, isSubmitting = _a.isSubmitting, onFileUploaded = _a.onFileUploaded, fileUploadingStatus = _a.fileUploadingStatus, onDeleteFile = _a.onDeleteFile, purpose = _a.purpose, fileTitle = _a.fileTitle, defaultFile = _a.defaultFile, validFileFormats = _a.validFileFormats, readOnly = _a.readOnly, isVerified = _a.isVerified;
48
48
  var t = useTranslation().t;
49
49
  var _b = React.useState(''), error = _b[0], setError = _b[1];
50
50
  var fileControl = useController({ name: "".concat(id, "File"), control: control });
@@ -110,6 +110,6 @@ var UploadWrapper = function (_a) {
110
110
  var fileExists = !!fileInfo;
111
111
  var showUploadedInputField = (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.SUCCESS || (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.DOWNLOADING || (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.deleteStatus) === DeleteFileStatus.DELETING;
112
112
  var showDragAndDrop = !showUploadedInputField && !readOnly;
113
- return (_jsxs(FeatureStyled, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) }) }), _jsx(Collapse, __assign({ in: showDragAndDrop }, { children: _jsx(InputContainerStyled, __assign({ sx: { mb: 2.5 } }, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: fileExists, uploadingTitle: uploadingTitle, successTitle: successTitle, progress: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.progress, uploading: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.UPLOADING, uploadSuccess: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.SUCCESS, onSuccess: handleFileChange, error: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.error) || error, multiple: false }) })) })), _jsx(Collapse, __assign({ in: fileExists, timeout: 300 }, { children: _jsx(FileUpload, { validFileFormats: validFileFormats, readOnly: readOnly, show: showUploadedInputField, fileRemoveType: fileRemoveType, purpose: purpose, title: fileTitle || '', isSubmitting: isSubmitting, uploadedFile: fileInfo, file: fileData, onSuccess: handleSuccess, onDelete: handleDelete, onUpdate: handleUpdate, initialFileId: defaultFile === null || defaultFile === void 0 ? void 0 : defaultFile.id }) }))] }));
113
+ return (_jsxs(FeatureStyled, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) }) }), _jsx(Collapse, __assign({ in: showDragAndDrop }, { children: _jsx(InputContainerStyled, __assign({ sx: { mb: 2.5 } }, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: fileExists, uploadingTitle: uploadingTitle, successTitle: successTitle, progress: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.progress, uploading: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.UPLOADING, uploadSuccess: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.SUCCESS, onSuccess: handleFileChange, error: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.error) || error, multiple: false }) })) })), _jsx(Collapse, __assign({ in: fileExists, timeout: 300 }, { children: _jsx(FileUpload, { validFileFormats: validFileFormats, readOnly: readOnly, show: showUploadedInputField, fileRemoveType: fileRemoveType, purpose: purpose, title: fileTitle || '', isSubmitting: isSubmitting, uploadedFile: fileInfo, file: fileData, onSuccess: handleSuccess, onDelete: handleDelete, onUpdate: handleUpdate, initialFileId: defaultFile === null || defaultFile === void 0 ? void 0 : defaultFile.id, isVerified: isVerified }) }))] }));
114
114
  };
115
115
  export default React.memo(UploadWrapper);
@@ -23,6 +23,7 @@ export declare type UploadFileProps = {
23
23
  sx?: SxProps<Theme> | undefined;
24
24
  isSubmitting?: boolean;
25
25
  readOnly?: boolean;
26
+ isVerified?: boolean;
26
27
  };
27
- declare const UploadFile: ({ index, title, file, fileType, uploadedFiles, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, readOnly }: UploadFileProps) => JSX.Element;
28
+ declare const UploadFile: ({ index, title, file, fileType, uploadedFiles, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, readOnly, isVerified }: UploadFileProps) => JSX.Element;
28
29
  export default UploadFile;