@tap-payments/auth-jsconnect 2.3.40-test → 2.3.46-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 (103) hide show
  1. package/build/@types/form.d.ts +0 -3
  2. package/build/api/entity.d.ts +0 -1
  3. package/build/api/index.d.ts +0 -3
  4. package/build/api/index.js +1 -3
  5. package/build/assets/locales/ar.json +0 -1
  6. package/build/assets/locales/en.json +0 -1
  7. package/build/components/DatePicker/DatePicker.js +1 -0
  8. package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
  9. package/build/components/RadioGroup/RadioGroup.js +5 -9
  10. package/build/components/RadioGroup/index.d.ts +1 -1
  11. package/build/constants/app.js +4 -10
  12. package/build/features/app/bank/bankStore.d.ts +0 -1
  13. package/build/features/app/bank/bankStore.js +21 -37
  14. package/build/features/app/connectExpress/connectExpressStore.js +12 -8
  15. package/build/features/app/entity/entityStore.d.ts +1 -9
  16. package/build/features/app/entity/entityStore.js +48 -119
  17. package/build/features/app/individual/individualStore.d.ts +0 -2
  18. package/build/features/app/individual/individualStore.js +71 -91
  19. package/build/features/app/tax/taxStore.js +18 -36
  20. package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +6 -10
  21. package/build/features/bank/screens/Verify/OTPInput.js +5 -3
  22. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +0 -5
  23. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +5 -5
  24. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +0 -5
  25. package/build/features/brand/screens/BrandActivities/CustomerBase.js +5 -5
  26. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +13 -3
  27. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +12 -2
  28. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -1
  29. package/build/features/brand/screens/BrandActivities/RefundPolicy.js +6 -9
  30. package/build/features/brand/screens/BrandActivities/TAC.d.ts +12 -0
  31. package/build/features/brand/screens/BrandActivities/TAC.js +6 -9
  32. package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
  33. package/build/features/brand/screens/BrandInfo/BrandInfo.js +2 -2
  34. package/build/features/brand/screens/BrandInfo/Segments.js +9 -1
  35. package/build/features/brand/screens/BrandInfo/TeamSize.js +9 -1
  36. package/build/features/brand/screens/Verify/OTPInput.js +5 -3
  37. package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -5
  38. package/build/features/business/screens/Activities/ActivitiesList.js +5 -5
  39. package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
  40. package/build/features/business/screens/BusinessType/LicenseList.js +1 -1
  41. package/build/features/business/screens/Customers/CustomerLocations.d.ts +0 -5
  42. package/build/features/business/screens/Customers/CustomerLocations.js +5 -5
  43. package/build/features/business/screens/Customers/ExpectedCustomers.js +12 -2
  44. package/build/features/business/screens/Customers/ExpectedSalesRange.js +12 -2
  45. package/build/features/business/screens/IDBOD/DOB.js +1 -1
  46. package/build/features/business/screens/Verify/OTPInput.js +5 -3
  47. package/build/features/connect/screens/Merchant/BrandList.js +1 -1
  48. package/build/features/connect/screens/Merchant/Segments.js +6 -1
  49. package/build/features/connect/screens/Merchant/TeamSize.js +6 -1
  50. package/build/features/connectExpress/screens/Brand/Brand.js +1 -1
  51. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +3 -3
  52. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
  53. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +12 -0
  54. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +6 -9
  55. package/build/features/connectExpress/screens/NID/TAC.d.ts +12 -0
  56. package/build/features/connectExpress/screens/NID/TAC.js +6 -9
  57. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +0 -5
  58. package/build/features/entity/screens/EntityCapital/ActivityList.js +5 -5
  59. package/build/features/entity/screens/EntityCapital/EntityCapital.js +2 -2
  60. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +0 -5
  61. package/build/features/entity/screens/EntityName/EntityTypeList.js +5 -5
  62. package/build/features/entity/screens/Verify/OTPInput.js +5 -3
  63. package/build/features/featuresScreens.js +0 -5
  64. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +1 -1
  65. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +10 -2
  66. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +9 -1
  67. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +1 -1
  68. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -1
  69. package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +9 -1
  70. package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +9 -1
  71. package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +1 -1
  72. package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +1 -1
  73. package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +1 -1
  74. package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +9 -1
  75. package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +9 -6
  76. package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +9 -1
  77. package/build/features/individual/screens/Verify/OTPInput.js +5 -3
  78. package/build/features/password/screens/Verify/OTPInput.js +5 -3
  79. package/build/features/shared/Address/Address.js +13 -20
  80. package/build/features/shared/Address/CountryList.js +4 -4
  81. package/build/features/shared/Address/InputSelect.js +1 -1
  82. package/build/features/shared/Button/FlowsButtons.js +14 -19
  83. package/build/features/shared/Input/Input.js +2 -3
  84. package/build/features/shared/OTP/OTP.d.ts +2 -1
  85. package/build/features/shared/OTP/OTP.js +2 -2
  86. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +2 -1
  87. package/build/features/shared/SalesChannels/SalesChannel.js +2 -1
  88. package/build/features/shared/UploadFile/FileUpload.js +5 -5
  89. package/build/features/shared/UploadFile/UploadFile.js +7 -7
  90. package/build/features/shared/UploadMultipleFile/UploadFile.js +5 -5
  91. package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +6 -9
  92. package/build/features/tax/screens/Verify/OTPInput.js +5 -3
  93. package/build/utils/error.d.ts +1 -0
  94. package/build/utils/error.js +3 -0
  95. package/build/utils/string.d.ts +1 -1
  96. package/build/utils/string.js +6 -0
  97. package/package.json +1 -1
  98. package/build/api/address.d.ts +0 -4
  99. package/build/api/address.js +0 -12
  100. package/build/features/entity/screens/EntityAddress/EntityAddress.d.ts +0 -5
  101. package/build/features/entity/screens/EntityAddress/EntityAddress.js +0 -42
  102. package/build/features/entity/screens/EntityAddress/index.d.ts +0 -2
  103. package/build/features/entity/screens/EntityAddress/index.js +0 -2
@@ -31,7 +31,7 @@ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
31
31
  import { BusinessType } from '../../../../@types';
32
32
  import { sortActivitiesByName } from '../../../../utils';
33
33
  import Text from '../../../../components/Text';
34
- import Input from '../../../../components/Input';
34
+ import Input from '../../../shared/Input';
35
35
  import Tooltip from '../../../../components/Tooltip';
36
36
  import Collapse from '../../../../components/Collapse';
37
37
  import SimpleList from '../../../../components/SimpleList';
@@ -42,12 +42,12 @@ export var InputLabelStyled = styled(Text)(function (_a) {
42
42
  var theme = _a.theme;
43
43
  return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
44
44
  });
45
- export var InputStyled = styled(Input)(function (_a) {
46
- var theme = _a.theme;
45
+ var InputStyled = styled(Input)(function (_a) {
46
+ var theme = _a.theme, readOnly = _a.readOnly;
47
47
  return ({
48
48
  paddingInlineEnd: theme.spacing(2.5),
49
49
  '& .MuiInputBase-input': {
50
- cursor: 'pointer'
50
+ cursor: readOnly ? 'default' : 'pointer'
51
51
  }
52
52
  });
53
53
  });
@@ -160,7 +160,7 @@ var ActivitiesList = function (props) {
160
160
  var getSelectedActivityFlag = function (item) {
161
161
  return controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (activity) { return activity.id === item.id; });
162
162
  };
163
- return (_jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t(isCR ? 'activities' : 'category') }), _jsx(Tooltip, __assign({ title: t('activities_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, disabled: disabled, value: getSelectedActivities() || '', placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
163
+ return (_jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t(isCR ? 'activities' : 'category') }), _jsx(Tooltip, __assign({ title: t('activities_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: props.readOnly, disabled: disabled, value: getSelectedActivities() || '', placeholder: isCR ? t('choose_activities') : t('category_name'), onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: activitiesMenuList, onSelectItem: onSelectItem, renderItem: function (item) {
164
164
  var _a, _b, _c;
165
165
  return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: item.id === ((_a = getSelectedActivityFlag(item)) === null || _a === void 0 ? void 0 : _a.id) }, { children: isAr ? (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = item === null || item === void 0 ? void 0 : item.name) === null || _c === void 0 ? void 0 : _c.en })) })), getSelectedActivityFlag(item) && _jsx(CheckIconStyled, {})] }));
166
166
  } }) }))] })] }));
@@ -33,7 +33,7 @@ var FormStyled = styled(Form)(function () { return ({
33
33
  }); });
34
34
  var EntityCapital = function (_a) {
35
35
  var _b = React.useState(false), anchorEl = _b[0], setAnchorEl = _b[1];
36
- var _c = useAppSelector(entitySelector), data = _c.data, loading = _c.loading, error = _c.error;
36
+ var _c = useAppSelector(entitySelector), data = _c.data, loading = _c.loading, error = _c.error, uploading = _c.uploading;
37
37
  var isAr = useLanguage().isAr;
38
38
  var t = useTranslation().t;
39
39
  var dispatch = useAppDispatch();
@@ -71,7 +71,7 @@ var EntityCapital = function (_a) {
71
71
  var handleActivitiesOpenClose = function (flag) {
72
72
  setAnchorEl(flag);
73
73
  };
74
- var disabled = !methods.formState.isValid || !!error;
74
+ var disabled = !methods.formState.isValid || !!error || uploading;
75
75
  return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(ActivityList, { readOnly: readOnly['activities'] || noneEditable['activities'], onListOpen: function () { return handleActivitiesOpenClose(true); }, onListClose: function () { return handleActivitiesOpenClose(false); } }), _jsxs(Collapse, __assign({ in: !anchorEl }, { children: [_jsx(CapitalPaid, { readOnly: readOnly['capitalPaid'] || noneEditable['capital.paid'] }), _jsx(CapitalShareCount, { readOnly: readOnly['capitalShareCount'] || noneEditable['capital.shares.count'] }), _jsx(CapitalShareValue, { readOnly: readOnly['capitalShareValue'] || noneEditable['capital.shares.value'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] }))] })) })) }));
76
76
  };
77
77
  export default EntityCapital;
@@ -12,11 +12,6 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
12
12
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
13
13
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
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, "name" | "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" | "value" | "components" | "componentsProps" | "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" | "hint" | undefined;
19
- } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
20
15
  export declare const InfoOutlinedIconStyled: import("@emotion/styled").StyledComponent<{
21
16
  children?: React.ReactNode;
22
17
  classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
@@ -23,7 +23,7 @@ import Text from '../../../../components/Text';
23
23
  import Collapse from '../../../../components/Collapse';
24
24
  import SimpleList from '../../../../components/SimpleList';
25
25
  import ExpandIcon from '../../../../components/ExpandIcon';
26
- import Input from '../../../../components/Input';
26
+ import Input from '../../../shared/Input';
27
27
  import { ScreenContainer } from '../../../shared/Containers';
28
28
  import { clearError, entitySelector } from '../../../app/entity/entityStore';
29
29
  import Search from '../../../shared/Search';
@@ -33,12 +33,12 @@ export var InputLabelStyled = styled(Text)(function (_a) {
33
33
  var theme = _a.theme;
34
34
  return (__assign({ color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption));
35
35
  });
36
- export var InputStyled = styled(Input)(function (_a) {
37
- var theme = _a.theme, disabled = _a.disabled;
36
+ var InputStyled = styled(Input)(function (_a) {
37
+ var theme = _a.theme, readOnly = _a.readOnly;
38
38
  return ({
39
39
  paddingInlineEnd: theme.spacing(2.5),
40
40
  '& .MuiInputBase-input': {
41
- cursor: disabled ? 'auto' : 'pointer'
41
+ cursor: readOnly ? 'default' : 'pointer'
42
42
  }
43
43
  });
44
44
  });
@@ -139,7 +139,7 @@ var EntityTypeList = function (props) {
139
139
  var filteredList = entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes.filter(function (i) { return i === null || i === void 0 ? void 0 : i.toLowerCase().includes(val); });
140
140
  setEntityTypesMenuList(filteredList);
141
141
  };
142
- return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { paddingTop: theme.spacing(2.5) } }, { children: [_jsx(Collapse, __assign({ in: !isListAvailable }, { children: _jsx(SharedInput, { disabled: disabled, onChange: handleChange, value: t(getSelectedValue()), label: t('entity_type'), placeholder: t('entity_type_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) })), _jsxs(Collapse, __assign({ in: isListAvailable }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('entity_type') }) }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: true, disabled: disabled, value: t(getSelectedValue()), placeholder: t('choose_entity_type'), onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name', list: entityTypesMenuList, onSelectItem: onSelectItem, renderItem: function (i) {
142
+ return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsxs(ScreenContainer, __assign({ sx: { paddingTop: theme.spacing(2.5) } }, { children: [_jsx(Collapse, __assign({ in: !isListAvailable }, { children: _jsx(SharedInput, { disabled: disabled, readOnly: props.readOnly, onChange: handleChange, value: t(getSelectedValue()), label: t('entity_type'), placeholder: t('entity_type_placeholder'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) })), _jsxs(Collapse, __assign({ in: isListAvailable }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('entity_type') }) }), _jsxs(Box, { children: [_jsx(InputStyled, { readOnly: props.readOnly, disabled: disabled, value: t(getSelectedValue()), placeholder: t('choose_entity_type'), onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name', list: entityTypesMenuList, onSelectItem: onSelectItem, renderItem: function (i) {
143
143
  return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedTypeFlag(i) }, { children: i })) })), getSelectedTypeFlag(i) && _jsx(CheckIconStyled, {})] }));
144
144
  } })] }))] })] }))] })) })));
145
145
  };
@@ -17,8 +17,9 @@ import OTPField from '../../../shared/OTP';
17
17
  import { useController, useFormContext } from 'react-hook-form';
18
18
  import { useTranslation } from 'react-i18next';
19
19
  import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
- import { useAppDispatch } from '../../../../hooks';
21
- import { resendOTP } from '../../../app/entity/entityStore';
20
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
21
+ import { isTokenExpired } from '../../../../utils';
22
+ import { entitySelector, resendOTP } from '../../../app/entity/entityStore';
22
23
  var BoxStyled = styled(Box)(function (_a) {
23
24
  var theme = _a.theme;
24
25
  return ({
@@ -33,6 +34,7 @@ var OTPInput = function (_a) {
33
34
  var t = useTranslation().t;
34
35
  var otpControl = useController({ name: 'otp', control: control });
35
36
  var dispatch = useAppDispatch();
37
+ var error = useAppSelector(entitySelector).error;
36
38
  var handleOnOTPChange = function (otp) {
37
39
  otpControl.field.onChange(otp);
38
40
  };
@@ -42,6 +44,6 @@ var OTPInput = function (_a) {
42
44
  dispatch(resendOTP());
43
45
  };
44
46
  var otpValue = otpControl.field.value;
45
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
47
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, hasError: isTokenExpired(error), onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
46
48
  };
47
49
  export default React.memo(OTPInput);
@@ -65,7 +65,6 @@ import SignInPasswordPage from './signIn/screens/Password';
65
65
  import EntityVerifyPage from './entity/screens/Verify';
66
66
  import EntityNamePage from './entity/screens/EntityName';
67
67
  import EntityCapitalPage from './entity/screens/EntityCapital';
68
- import EntityAddressPage from './entity/screens/EntityAddress';
69
68
  import EntitySuccessPage from './entity/screens/Success';
70
69
  import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
71
70
  import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
@@ -345,10 +344,6 @@ export var entityFeatureScreens = [
345
344
  name: 'ENTITY_CAPITAL_STEP',
346
345
  element: EntityCapitalPage
347
346
  },
348
- {
349
- name: 'ENTITY_ADDRESS_STEP',
350
- element: EntityAddressPage
351
- },
352
347
  {
353
348
  name: 'ENTITY_DETAILS_SUCCESS_STEP',
354
349
  element: EntitySuccessPage
@@ -51,6 +51,6 @@ var InfluencerSwitch = function (_a) {
51
51
  influencerControl.field.onChange(target.value === 'yes');
52
52
  };
53
53
  var influencerValue = influencerControl.field.value;
54
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(Box, __assign({ style: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_are_you_an_influencer'), _jsx(Mandatory, {})] }), _jsx(Tooltip, __assign({ title: t('influencer_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] })), _jsxs(RadioGroupStyled, __assign({ value: influencerValue != null ? (influencerValue ? 'yes' : 'no') : false, onChange: disabled || readOnly ? undefined : handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
54
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(Box, __assign({ style: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_are_you_an_influencer'), _jsx(Mandatory, {})] }), _jsx(Tooltip, __assign({ title: t('influencer_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] })), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: influencerValue != null ? (influencerValue ? 'yes' : 'no') : false, onChange: disabled || readOnly ? undefined : handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
55
55
  };
56
56
  export default React.memo(InfluencerSwitch);
@@ -29,6 +29,14 @@ import { settingsSelector } from '../../../../app/settings';
29
29
  var Container = styled(Box)(function () { return ({
30
30
  display: 'flex'
31
31
  }); });
32
+ var InputStyled = styled(Input)(function (_a) {
33
+ var readOnly = _a.readOnly;
34
+ return ({
35
+ '& .MuiInputBase-input': {
36
+ cursor: readOnly ? 'default' : 'pointer'
37
+ }
38
+ });
39
+ });
32
40
  var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
33
41
  var theme = _a.theme, isSelected = _a.isSelected;
34
42
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
@@ -83,9 +91,9 @@ var MonthlyIncome = function (props) {
83
91
  };
84
92
  var income = monthlyIncomeControl.field.value;
85
93
  var error = (_a = monthlyIncomeControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
86
- return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(Input, { label: t('please_enter_actual_income', {
94
+ return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(InputStyled, { label: t('please_enter_actual_income', {
87
95
  currency: t(findCurrencyByIso2(countryCode.iso2))
88
- }), disabled: disabled, readOnly: true, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
96
+ }), disabled: disabled, readOnly: props.readOnly, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
89
97
  return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.range.ar : item === null || item === void 0 ? void 0 : item.range.en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIconStyled, {})] }));
90
98
  } }) }))] })) })));
91
99
  };
@@ -27,6 +27,14 @@ import SimpleList from '../../../../components/SimpleList';
27
27
  var Container = styled(Box)(function () { return ({
28
28
  display: 'flex'
29
29
  }); });
30
+ var InputStyled = styled(Input)(function (_a) {
31
+ var readOnly = _a.readOnly;
32
+ return ({
33
+ '& .MuiInputBase-input': {
34
+ cursor: readOnly ? 'default' : 'pointer'
35
+ }
36
+ });
37
+ });
30
38
  var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
31
39
  var theme = _a.theme, isSelected = _a.isSelected;
32
40
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
@@ -76,7 +84,7 @@ var Occupation = function (props) {
76
84
  };
77
85
  var occupation = occupationControl.field.value;
78
86
  var error = (_b = occupationControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
79
- return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, disabled: disabled, label: t('occupation_title'), readOnly: true, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_occupation'), value: (isAr ? occupation === null || occupation === void 0 ? void 0 : occupation.name.ar : occupation === null || occupation === void 0 ? void 0 : occupation.name.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en', 'name.ar'], list: occupationList, onSelectItem: onSelectItem, renderItem: function (item) {
87
+ return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(InputStyled, { required: true, disabled: disabled, label: t('occupation_title'), readOnly: props.readOnly, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_occupation'), value: (isAr ? occupation === null || occupation === void 0 ? void 0 : occupation.name.ar : occupation === null || occupation === void 0 ? void 0 : occupation.name.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en', 'name.ar'], list: occupationList, onSelectItem: onSelectItem, renderItem: function (item) {
80
88
  var _a, _b;
81
89
  return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (occupation === null || occupation === void 0 ? void 0 : occupation.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 === (occupation === null || occupation === void 0 ? void 0 : occupation.id) && _jsx(CheckIconStyled, {})] }));
82
90
  } }) }))] })) })));
@@ -70,6 +70,6 @@ var PEPSwitch = function (_a) {
70
70
  pepControl.field.onChange(target.value === 'yes');
71
71
  };
72
72
  var pepValue = pepControl.field.value;
73
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(Box, __assign({ style: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_is_close_relative_in_pep'), _jsx(Mandatory, {})] }), _jsx(Tooltip, __assign({ title: t('pep_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] })), _jsxs(RadioGroupStyled, __assign({ value: pepValue != null ? (pepValue ? 'yes' : 'no') : false, onChange: disabled || readOnly ? undefined : handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
73
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 2.5, pr: 2.5 } }, { children: [_jsxs(Box, __assign({ style: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_is_close_relative_in_pep'), _jsx(Mandatory, {})] }), _jsx(Tooltip, __assign({ title: t('pep_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] })), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: pepValue != null ? (pepValue ? 'yes' : 'no') : false, onChange: disabled || readOnly ? undefined : handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: t('yes') }), _jsx(RadioLabel, { value: 'no', label: t('no') })] }))] })) })));
74
74
  };
75
75
  export default React.memo(PEPSwitch);
@@ -24,6 +24,14 @@ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
24
24
  import Input from '../../../shared/Input';
25
25
  import ExpandIcon from '../../../../components/ExpandIcon';
26
26
  import SimpleList from '../../../../components/SimpleList';
27
+ var InputStyled = styled(Input)(function (_a) {
28
+ var readOnly = _a.readOnly;
29
+ return ({
30
+ '& .MuiInputBase-input': {
31
+ cursor: readOnly ? 'default' : 'pointer'
32
+ }
33
+ });
34
+ });
27
35
  var Container = styled(Box)(function () { return ({
28
36
  display: 'flex'
29
37
  }); });
@@ -76,7 +84,7 @@ var SourceOfIncome = function (props) {
76
84
  };
77
85
  var source = sourceIncomeControl.field.value;
78
86
  var error = (_b = sourceIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
79
- return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, disabled: disabled, label: t('tap_js_source_of_income'), readOnly: true, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name.ar : source === null || source === void 0 ? void 0 : source.name.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
87
+ return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(InputStyled, { required: true, disabled: disabled, label: t('tap_js_source_of_income'), readOnly: props.readOnly, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name.ar : source === null || source === void 0 ? void 0 : source.name.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
80
88
  return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name.ar : item === null || item === void 0 ? void 0 : item.name.en })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIconStyled, {})] }));
81
89
  } }) }))] })) })));
82
90
  };
@@ -37,6 +37,14 @@ import { getCityList, individualSelector } from '../../../app/individual/individ
37
37
  var CountryItemContainer = styled(Box)(function () { return ({
38
38
  display: 'flex'
39
39
  }); });
40
+ var InputStyled = styled(Input)(function (_a) {
41
+ var readOnly = _a.readOnly;
42
+ return ({
43
+ '& .MuiInputBase-input': {
44
+ cursor: readOnly ? 'default' : 'pointer'
45
+ }
46
+ });
47
+ });
40
48
  var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
41
49
  var theme = _a.theme, isSelected = _a.isSelected;
42
50
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
@@ -104,7 +112,7 @@ var BirthCity = React.forwardRef(function (_a, ref) {
104
112
  var _a;
105
113
  return (_a = city === null || city === void 0 ? void 0 : city.name) === null || _a === void 0 ? void 0 : _a.en;
106
114
  };
107
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(Input, { label: t('place_birth_city_label'), readOnly: true, placeholder: t('choose_place_birth_city'), value: getName(cityValue) || '', warningMessage: error && t(error), onClick: cityLoading ? undefined : !!anchorEl ? function () { return onCloseCitySelect(); } : onOpenCitySelect, endAdornment: cityLoading ? _jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } }) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en'], list: locationCities, onSelectItem: onSelectItem, renderItem: function (item) {
115
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputStyled, { label: t('place_birth_city_label'), readOnly: readOnly, placeholder: t('choose_place_birth_city'), value: getName(cityValue) || '', warningMessage: error && t(error), onClick: cityLoading ? undefined : !!anchorEl ? function () { return onCloseCitySelect(); } : onOpenCitySelect, endAdornment: cityLoading ? _jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } }) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.en'], list: locationCities, onSelectItem: onSelectItem, renderItem: function (item) {
108
116
  return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: item.id === (cityValue === null || cityValue === void 0 ? void 0 : cityValue.id) }, { children: getName(item) })) }), item.id === (cityValue === null || cityValue === void 0 ? void 0 : cityValue.id) && _jsx(CheckIconStyled, {})] }));
109
117
  } }) }))] })) })));
110
118
  });
@@ -37,6 +37,14 @@ import Input from '../../../shared/Input';
37
37
  var CountryItemContainer = styled(Box)(function () { return ({
38
38
  display: 'flex'
39
39
  }); });
40
+ var InputStyled = styled(Input)(function (_a) {
41
+ var readOnly = _a.readOnly;
42
+ return ({
43
+ '& .MuiInputBase-input': {
44
+ cursor: readOnly ? 'default' : 'pointer'
45
+ }
46
+ });
47
+ });
40
48
  var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
41
49
  var theme = _a.theme, isSelected = _a.isSelected;
42
50
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
@@ -77,7 +85,7 @@ var BirthCountry = React.forwardRef(function (_a, ref) {
77
85
  };
78
86
  var location = placeOfBirthCountryControl.field.value;
79
87
  var error = (_b = placeOfBirthCountryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
80
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(Input, { label: t('place_of_birth_country_label'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_place_of_birth_country'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
88
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputStyled, { label: t('place_of_birth_country_label'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_place_of_birth_country'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
81
89
  return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIconStyled, {})] }));
82
90
  } }) }))] })) })));
83
91
  });
@@ -22,7 +22,7 @@ import { ScreenContainer } from '../../../shared/Containers';
22
22
  import { individualSelector, clearError } from '../../../app/individual/individualStore';
23
23
  var InputLabelStyled = styled(Text)(function (_a) {
24
24
  var theme = _a.theme;
25
- return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption), { cursor: 'pointer' }));
25
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption), { cursor: 'pointer' }));
26
26
  });
27
27
  var BOD = function (_a) {
28
28
  var _b;
@@ -23,7 +23,7 @@ import { ScreenContainer } from '../../../shared/Containers';
23
23
  import { individualSelector, clearError } from '../../../app/individual/individualStore';
24
24
  var InputLabelStyled = styled(Text)(function (_a) {
25
25
  var theme = _a.theme;
26
- return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption), { cursor: 'pointer' }));
26
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption), { cursor: 'pointer' }));
27
27
  });
28
28
  var ExpiryDate = function (_a) {
29
29
  var _b;
@@ -78,6 +78,6 @@ var Gender = function (_a) {
78
78
  genderControl.field.onChange(target.value);
79
79
  };
80
80
  var genderValue = genderControl.field.value;
81
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5, pl: 2.5, pr: 2.5, pt: 2.5 } }, { children: [_jsx(LabelTextStyled, { children: t('individual_gender_title') }), _jsxs(RadioGroupStyled, __assign({ value: genderValue != null ? genderValue : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: IndividualGender.MALE, label: _jsx(LabelStyled, { children: t('gender_male') }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) }), _jsx(RadioLabel, { value: IndividualGender.FEMALE, sx: { marginInlineEnd: '0px' }, label: _jsx(LabelStyled, { children: t('gender_female') }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) })] }))] })) })));
81
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5, pl: 2.5, pr: 2.5, pt: 2.5 } }, { children: [_jsx(LabelTextStyled, { children: t('individual_gender_title') }), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: genderValue != null ? genderValue : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: IndividualGender.MALE, label: _jsx(LabelStyled, { children: t('gender_male') }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) }), _jsx(RadioLabel, { value: IndividualGender.FEMALE, sx: { marginInlineEnd: '0px' }, label: _jsx(LabelStyled, { children: t('gender_female') }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) })] }))] })) })));
82
82
  };
83
83
  export default Gender;
@@ -37,6 +37,14 @@ import Input from '../../../shared/Input';
37
37
  var CountryItemContainer = styled(Box)(function () { return ({
38
38
  display: 'flex'
39
39
  }); });
40
+ var InputStyled = styled(Input)(function (_a) {
41
+ var readOnly = _a.readOnly;
42
+ return ({
43
+ '& .MuiInputBase-input': {
44
+ cursor: readOnly ? 'default' : 'pointer'
45
+ }
46
+ });
47
+ });
40
48
  var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
41
49
  var theme = _a.theme, isSelected = _a.isSelected;
42
50
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
@@ -78,7 +86,7 @@ var IssuedCountry = React.forwardRef(function (_a, ref) {
78
86
  };
79
87
  var location = issuedCountryControl.field.value;
80
88
  var error = (_b = issuedCountryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
81
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(Input, { label: t('issued_country_label'), readOnly: true, disabled: disabled, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_issued_country'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
89
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputStyled, { label: t('issued_country_label'), readOnly: readOnly, disabled: disabled, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_issued_country'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
82
90
  return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIconStyled, {})] }));
83
91
  } }) }))] })) })));
84
92
  });
@@ -72,12 +72,15 @@ var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
72
72
  marginInlineStart: theme.spacing(1)
73
73
  });
74
74
  });
75
- var InputStyled = styled(Input)(function () { return ({
76
- direction: 'ltr',
77
- '& .MuiInputBase-input': {
78
- cursor: 'auto'
79
- }
80
- }); });
75
+ var InputStyled = styled(Input)(function (_a) {
76
+ var readOnly = _a.readOnly;
77
+ return ({
78
+ direction: 'ltr',
79
+ '& .MuiInputBase-input': {
80
+ cursor: readOnly ? 'default' : 'pointer'
81
+ }
82
+ });
83
+ });
81
84
  var MobileNumber = React.forwardRef(function (_a, ref) {
82
85
  var _b, _c, _d;
83
86
  var countries = _a.countries, readOnly = _a.readOnly, rest = __rest(_a, ["countries", "readOnly"]);
@@ -37,6 +37,14 @@ import Input from '../../../shared/Input';
37
37
  var CountryItemContainer = styled(Box)(function () { return ({
38
38
  display: 'flex'
39
39
  }); });
40
+ var InputStyled = styled(Input)(function (_a) {
41
+ var readOnly = _a.readOnly;
42
+ return ({
43
+ '& .MuiInputBase-input': {
44
+ cursor: readOnly ? 'default' : 'pointer'
45
+ }
46
+ });
47
+ });
40
48
  var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
41
49
  var theme = _a.theme, isSelected = _a.isSelected;
42
50
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
@@ -78,7 +86,7 @@ var Nationality = React.forwardRef(function (_a, ref) {
78
86
  };
79
87
  var location = nationalityControl.field.value;
80
88
  var error = (_b = nationalityControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
81
- return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(Input, { label: t('nationality_label'), readOnly: true, disabled: disabled, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_nationality'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
89
+ return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputStyled, { label: t('nationality_label'), readOnly: readOnly, disabled: disabled, onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_nationality'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
82
90
  return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIconStyled, {})] }));
83
91
  } }) }))] })) })));
84
92
  });
@@ -11,14 +11,15 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import { useAppDispatch } from '../../../../hooks';
14
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
15
15
  import Box from '@mui/material/Box/Box';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import OTPField from '../../../shared/OTP';
18
18
  import { useController, useFormContext } from 'react-hook-form';
19
19
  import { useTranslation } from 'react-i18next';
20
20
  import { DEFAULT_TIMER_VALUE } from '../../../../constants';
21
- import { resendOTP } from '../../../app/individual/individualStore';
21
+ import { isTokenExpired } from '../../../../utils';
22
+ import { individualSelector, resendOTP } from '../../../app/individual/individualStore';
22
23
  var BoxStyled = styled(Box)(function (_a) {
23
24
  var theme = _a.theme;
24
25
  return ({
@@ -33,6 +34,7 @@ var OTPInput = function (_a) {
33
34
  var t = useTranslation().t;
34
35
  var otpControl = useController({ name: 'otp', control: control });
35
36
  var dispatch = useAppDispatch();
37
+ var error = useAppSelector(individualSelector).error;
36
38
  var handleOnOTPChange = function (otp) {
37
39
  otpControl.field.onChange(otp);
38
40
  };
@@ -42,6 +44,6 @@ var OTPInput = function (_a) {
42
44
  dispatch(resendOTP());
43
45
  };
44
46
  var otpValue = otpControl.field.value;
45
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
47
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, hasError: isTokenExpired(error), onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
46
48
  };
47
49
  export default React.memo(OTPInput);
@@ -11,14 +11,15 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import { useAppDispatch } from '../../../../hooks';
14
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
15
15
  import Box from '@mui/material/Box/Box';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import OTPField from '../../../shared/OTP';
18
18
  import { useController, useFormContext } from 'react-hook-form';
19
19
  import { useTranslation } from 'react-i18next';
20
20
  import { DEFAULT_TIMER_VALUE } from '../../../../constants';
21
- import { resendOTP } from '../../../app/password/passwordStore';
21
+ import { isTokenExpired } from '../../../../utils';
22
+ import { passwordSelector, resendOTP } from '../../../app/password/passwordStore';
22
23
  var BoxStyled = styled(Box)(function (_a) {
23
24
  var theme = _a.theme;
24
25
  return ({
@@ -33,6 +34,7 @@ var OTPInput = function (_a) {
33
34
  var t = useTranslation().t;
34
35
  var otpControl = useController({ name: 'otp', control: control });
35
36
  var dispatch = useAppDispatch();
37
+ var error = useAppSelector(passwordSelector).error;
36
38
  var handleOnOTPChange = function (otp) {
37
39
  otpControl.field.onChange(otp);
38
40
  };
@@ -42,6 +44,6 @@ var OTPInput = function (_a) {
42
44
  dispatch(resendOTP());
43
45
  };
44
46
  var otpValue = otpControl.field.value;
45
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
47
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { loading: loading, timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, hasError: isTokenExpired(error), onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
46
48
  };
47
49
  export default React.memo(OTPInput);