@tap-payments/auth-jsconnect 1.0.31 → 1.0.34

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 (70) hide show
  1. package/build/@types/app.d.ts +5 -1
  2. package/build/@types/form.d.ts +23 -1
  3. package/build/api/account.d.ts +15 -0
  4. package/build/api/account.js +9 -0
  5. package/build/api/axios.d.ts +2 -0
  6. package/build/api/axios.js +10 -0
  7. package/build/api/data.d.ts +6 -0
  8. package/build/api/data.js +17 -0
  9. package/build/api/entity.d.ts +20 -0
  10. package/build/api/entity.js +9 -0
  11. package/build/api/index.d.ts +22 -2
  12. package/build/api/index.js +9 -1
  13. package/build/api/lead.d.ts +22 -0
  14. package/build/api/lead.js +21 -1
  15. package/build/app/settings.js +12 -18
  16. package/build/components/Input/Input.d.ts +1 -1
  17. package/build/components/Input/Input.js +3 -2
  18. package/build/components/Slide/Slide.d.ts +1 -1
  19. package/build/components/Warning/Warning.d.ts +1 -1
  20. package/build/components/Warning/Warning.js +13 -2
  21. package/build/constants/api.d.ts +8 -0
  22. package/build/constants/api.js +17 -1
  23. package/build/constants/app.d.ts +11 -1
  24. package/build/constants/app.js +11 -1
  25. package/build/constants/assets.js +1 -1
  26. package/build/constants/validation.d.ts +1 -0
  27. package/build/constants/validation.js +1 -0
  28. package/build/features/app/business/businessStore.d.ts +73 -4
  29. package/build/features/app/business/businessStore.js +500 -7
  30. package/build/features/app/connect/connectStore.d.ts +11 -3
  31. package/build/features/app/connect/connectStore.js +88 -43
  32. package/build/features/bank/screens/BankDetails/validation.js +2 -1
  33. package/build/features/business/Business.js +7 -3
  34. package/build/features/business/screens/Activities/Activities.js +13 -13
  35. package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
  36. package/build/features/business/screens/Activities/ActivitiesList.js +14 -4
  37. package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
  38. package/build/features/business/screens/Activities/SalesChannels.js +11 -2
  39. package/build/features/business/screens/BusinessType/BusinessType.d.ts +1 -8
  40. package/build/features/business/screens/BusinessType/BusinessType.js +25 -27
  41. package/build/features/business/screens/Confirm/Confirm.js +10 -11
  42. package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
  43. package/build/features/business/screens/Customers/Customers.js +3 -2
  44. package/build/features/business/screens/IDBOD/DOB.js +1 -1
  45. package/build/features/business/screens/IDBOD/IDBOD.js +19 -12
  46. package/build/features/business/screens/OTP/OTP.d.ts +2 -5
  47. package/build/features/business/screens/OTP/OTP.js +18 -15
  48. package/build/features/business/screens/OTP/OTPInput.js +20 -5
  49. package/build/features/business/screens/Success/Success.js +6 -0
  50. package/build/features/business/screens/Verify/OTPInput.js +7 -3
  51. package/build/features/business/screens/Verify/Verify.d.ts +1 -9
  52. package/build/features/business/screens/Verify/Verify.js +16 -17
  53. package/build/features/business/screens/Verify/index.d.ts +1 -2
  54. package/build/features/connect/screens/Individual/Individual.js +6 -1
  55. package/build/features/connect/screens/Individual/Name.js +10 -1
  56. package/build/features/connect/screens/Individual/validation.js +3 -2
  57. package/build/features/connect/screens/Merchant/Merchant.js +6 -1
  58. package/build/features/connect/screens/Mobile/Mobile.js +6 -1
  59. package/build/features/connect/screens/NID/NID.js +6 -1
  60. package/build/features/connect/screens/OTP/OTP.js +6 -1
  61. package/build/features/connect/screens/Password/Password.js +7 -2
  62. package/build/features/featuresScreens.js +3 -3
  63. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -4
  64. package/build/features/shared/Button/AbsherButton.js +1 -1
  65. package/build/features/shared/Input/Input.d.ts +1 -1
  66. package/build/hooks/useAppConfig.js +99 -24
  67. package/build/theme/palette.js +4 -0
  68. package/build/utils/string.d.ts +25 -0
  69. package/build/utils/string.js +56 -0
  70. package/package.json +1 -1
@@ -11,24 +11,25 @@ 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 { useSelector } from 'react-redux';
14
15
  import { useForm, FormProvider } from 'react-hook-form';
15
16
  import { useTranslation } from 'react-i18next';
16
17
  import { yupResolver } from '@hookform/resolvers/yup';
17
18
  import Box from '@mui/material/Box';
18
19
  import { styled } from '@mui/material/styles';
19
20
  import { useAppDispatch } from '../../../../hooks';
20
- import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
21
+ import { handlePrevScreenStep } from '../../../../app/settings';
21
22
  import Form from '../../../../components/Form';
22
23
  import Collapse from '../../../../components/Collapse';
23
24
  import { useLanguage } from '../../../../hooks';
24
25
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
26
+ import { businessSelector, clearError, updateLeadBusinessType } from '../../../app/business/businessStore';
27
+ import { BusinessType as BusinessTypeEnum } from '../../../../@types';
25
28
  import Button from '../../../shared/Button';
26
29
  import { CRValidationSchema, FLValidationSchema } from './validation';
27
30
  import SelectType from './SelectType';
28
- import { BusinessType as BusinessTypeEnum } from '../../../../@types';
29
31
  import FreelanceLicense from './FreelanceLicense';
30
32
  import CompanyLicense from './CompanyLicense';
31
- import { CR_LIST } from '../../../../constants/dummy';
32
33
  var InputsContainerStyled = styled(Box)(function (_a) {
33
34
  var _b;
34
35
  var theme = _a.theme, listActive = _a.listActive;
@@ -41,48 +42,45 @@ var InputsContainerStyled = styled(Box)(function (_a) {
41
42
  _b);
42
43
  });
43
44
  var BusinessType = function (_a) {
44
- var businessType = _a.businessType;
45
45
  var _b = React.useState(false), isCR = _b[0], setIsCR = _b[1];
46
+ var _c = useSelector(businessSelector), data = _c.data, loading = _c.loading, error = _c.error;
47
+ var businessTypeData = data.businessTypeData;
48
+ var t = useTranslation().t;
49
+ var isAr = useLanguage().isAr;
50
+ var dispatch = useAppDispatch();
51
+ var _d = React.useState(false), listActive = _d[0], setListActive = _d[1];
46
52
  var methods = useForm({
47
53
  resolver: yupResolver(isCR ? CRValidationSchema : FLValidationSchema),
48
- defaultValues: {
49
- businessType: businessType,
50
- flNumber: '',
51
- crNumber: ''
52
- },
54
+ defaultValues: data.businessTypeData,
53
55
  mode: 'onChange'
54
56
  });
55
57
  React.useEffect(function () {
58
+ var businessType = businessTypeData.businessType;
56
59
  if (businessType === BusinessTypeEnum.CR)
57
60
  setIsCR(true);
58
- }, [businessType]);
59
- var t = useTranslation().t;
60
- var isAr = useLanguage().isAr;
61
- var dispatch = useAppDispatch();
62
- var _c = React.useState(false), listActive = _c[0], setListActive = _c[1];
61
+ }, [businessTypeData.businessType]);
62
+ React.useEffect(function () {
63
+ if (error)
64
+ dispatch(clearError());
65
+ }, [methods.formState.isValid]);
63
66
  var onSubmit = function (data) {
64
- var dataValues = isCR
65
- ? { businessType: data.businessType, crNumber: data.crNumber }
66
- : { businessType: data.businessType, flNumber: data.flNumber };
67
- console.log('data', dataValues);
68
- dispatch(handleNextScreenStep());
67
+ var dataValues = { businessType: data.businessType, flNumber: data.flNumber, crNumber: '' };
68
+ if (isCR)
69
+ dataValues = { businessType: data.businessType, crNumber: data.crNumber, flNumber: '' };
70
+ dispatch(updateLeadBusinessType(dataValues));
69
71
  };
70
72
  var onBack = function () {
71
73
  dispatch(handlePrevScreenStep());
72
74
  };
73
- var flList = [];
74
- var crList = CR_LIST;
75
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(InputsContainerStyled, __assign({ listActive: listActive }, { children: [_jsx(SelectType, { show: !listActive, onSwitchToCR: function () { return setIsCR(true); }, onSwitchToFL: function () { return setIsCR(false); } }), _jsx(CompanyLicense, { show: isCR, list: crList, onListOpen: function () {
75
+ var disabled = !methods.formState.isValid || !!error;
76
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(InputsContainerStyled, __assign({ listActive: listActive }, { children: [_jsx(SelectType, { show: !listActive, onSwitchToCR: function () { return setIsCR(true); }, onSwitchToFL: function () { return setIsCR(false); } }), _jsx(CompanyLicense, { show: isCR, list: data.crInfos, onListOpen: function () {
76
77
  setListActive(true);
77
78
  }, onListClose: function () {
78
79
  setListActive(false);
79
- } }), _jsx(FreelanceLicense, { show: !isCR, list: flList, onListOpen: function () {
80
+ } }), _jsx(FreelanceLicense, { show: !isCR, list: data.flInfos, onListOpen: function () {
80
81
  setListActive(true);
81
82
  }, onListClose: function () {
82
83
  setListActive(false);
83
- } })] })), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: !methods.formState.isValid, loading: false }, { children: t('next') })) }))] })) })) }));
84
+ } })] })), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
84
85
  };
85
86
  export default React.memo(BusinessType);
86
- BusinessType.defaultProps = {
87
- businessType: BusinessTypeEnum.FL
88
- };
@@ -11,15 +11,18 @@ 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 { useSelector } from 'react-redux';
14
15
  import { styled } from '@mui/material/styles';
15
16
  import { useAppDispatch, useLanguage } from '../../../../hooks';
16
17
  import { useTranslation } from 'react-i18next';
17
- import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
18
+ import { handlePrevScreenStep } from '../../../../app/settings';
18
19
  import { FormProvider, useForm } from 'react-hook-form';
19
20
  import Form from '../../../../components/Form';
20
21
  import Input from '../../../shared/Input';
21
22
  import Button from '../../../shared/Button';
22
23
  import { ScreenContainer } from '../../../shared/Containers';
24
+ import { businessSelector, createAccount } from '../../../app/business/businessStore';
25
+ import { BusinessType as BusinessTypeEnum } from '../../../../@types';
23
26
  var InputStyled = styled(Input)(function (_a) {
24
27
  var theme = _a.theme;
25
28
  return ({
@@ -30,27 +33,23 @@ var FormStyled = styled(Form)(function () { return ({
30
33
  display: 'flex',
31
34
  flexDirection: 'column'
32
35
  }); });
33
- var defaultValues = {
34
- licenseNumber: 1234567890,
35
- brandName: 'Tap Payments',
36
- legalName: 'Ali Abulhasan'
37
- };
38
36
  var Confirm = function () {
39
37
  var dispatch = useAppDispatch();
40
- var businessType = React.useState('CR')[0];
41
38
  var t = useTranslation().t;
42
39
  var isAr = useLanguage().isAr;
43
- var isCR = businessType === 'CR';
40
+ var data = useSelector(businessSelector).data;
41
+ var _a = data.businessInfo, licenseNumber = _a.licenseNumber, brandName = _a.brandName, legalName = _a.legalName;
42
+ var isCR = data.businessTypeData.businessType === BusinessTypeEnum.CR;
44
43
  var onSubmit = function () {
45
- dispatch(handleNextScreenStep());
44
+ dispatch(createAccount());
46
45
  };
47
46
  var methods = useForm({
48
- defaultValues: defaultValues,
47
+ defaultValues: data.businessInfo,
49
48
  mode: 'onChange'
50
49
  });
51
50
  var onBack = function () {
52
51
  dispatch(handlePrevScreenStep());
53
52
  };
54
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputStyled, { label: t(isCR ? 'signup_business_cr_info_title' : 'signup_business_fl_info_title'), value: defaultValues.licenseNumber, disabled: true }), _jsx(InputStyled, { label: t('signup_brand_name_label'), value: defaultValues.brandName, disabled: true }), _jsx(InputStyled, { label: t('signup_legal_name_label'), value: defaultValues.legalName, disabled: true }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr }, { children: t('confirm') }))] })) })) }));
53
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputStyled, { label: t(isCR ? 'signup_business_cr_info_title' : 'signup_business_fl_info_title'), value: licenseNumber, disabled: true }), _jsx(InputStyled, { label: t('signup_brand_name_label'), value: brandName, disabled: true }), _jsx(InputStyled, { label: t('signup_legal_name_label'), value: legalName, disabled: true }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr }, { children: t('confirm') }))] })) })) }));
55
54
  };
56
55
  export default React.memo(Confirm);
@@ -15,7 +15,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
15
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" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
16
16
  placeholder?: string | undefined;
17
17
  hide?: boolean | undefined;
18
- warningType?: "alert" | "error" | undefined;
18
+ warningType?: "alert" | "error" | "hint" | undefined;
19
19
  } & {} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
20
20
  export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
21
21
  align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
@@ -43,7 +43,7 @@ export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<
43
43
  sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
44
44
  titleAccess?: string | undefined;
45
45
  viewBox?: string | undefined;
46
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "method" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
46
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "method" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
47
47
  ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
48
48
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
49
49
  export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
@@ -57,7 +57,7 @@ export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
57
57
  sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
58
58
  titleAccess?: string | undefined;
59
59
  viewBox?: string | undefined;
60
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "method" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
60
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "key" | "id" | "lang" | "tabIndex" | "role" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "method" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "origin" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
61
61
  ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
62
62
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
63
63
  interface CustomerLocationsProps {
@@ -17,7 +17,7 @@ import { useTranslation } from 'react-i18next';
17
17
  import { useForm, FormProvider } from 'react-hook-form';
18
18
  import { yupResolver } from '@hookform/resolvers/yup';
19
19
  import { useAppDispatch } from '../../../../hooks';
20
- import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
20
+ import { handlePrevScreenStep } from '../../../../app/settings';
21
21
  import { CustomerInfoValidation } from './validation';
22
22
  import Form from '../../../../components/Form';
23
23
  import Button from '../../../shared/Button';
@@ -30,6 +30,7 @@ import RefundPolicy from './RefundPolicy';
30
30
  import TransactionPolicy from './TransactionPolicy';
31
31
  import { ScreenContainer } from '../../../shared/Containers';
32
32
  import Collapse from '../../../../components/Collapse';
33
+ import { updateCustomersInfo } from '../../../app/business/businessStore';
33
34
  var FormStyled = styled(Form)(function () { return ({
34
35
  display: 'flex',
35
36
  flexDirection: 'column'
@@ -56,7 +57,7 @@ var Customers = function (_a) {
56
57
  });
57
58
  var onSubmit = function (data) {
58
59
  console.log('data', data);
59
- dispatch(handleNextScreenStep());
60
+ dispatch(updateCustomersInfo(__assign(__assign({}, data), { isResend: false })));
60
61
  };
61
62
  var onBack = function () {
62
63
  dispatch(handlePrevScreenStep());
@@ -16,7 +16,7 @@ import { useController, useFormContext } from 'react-hook-form';
16
16
  import { styled, alpha } from '@mui/material/styles';
17
17
  import Text from '../../../../components/Text';
18
18
  import DatePicker from '../../../../components/DatePicker';
19
- import { ScreenContainer } from '../../../../features/shared/Containers';
19
+ import { ScreenContainer } from '../../../shared/Containers';
20
20
  var InputLabelStyled = styled(Text)(function (_a) {
21
21
  var theme = _a.theme;
22
22
  return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption), { cursor: 'pointer' }));
@@ -11,19 +11,21 @@ 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 { useSelector } from 'react-redux';
14
15
  import { useTranslation } from 'react-i18next';
15
- import { styled } from '@mui/material/styles';
16
- import ID from './ID';
17
- import DOB from './DOB';
18
16
  import { useForm, FormProvider } from 'react-hook-form';
17
+ import { styled } from '@mui/material/styles';
19
18
  import { yupResolver } from '@hookform/resolvers/yup';
20
- import { NIDValidationSchema } from './validation';
21
19
  import { useAppDispatch, useLanguage } from '../../../../hooks';
22
- import { handleNextScreenStep } from '../../../../app/settings';
20
+ import { handlePrevScreenStep } from '../../../../app/settings';
23
21
  import Form from '../../../../components/Form';
24
22
  import Button from '../../../shared/Button';
25
23
  import { ScreenContainer } from '../../../shared/Containers';
24
+ import { businessSelector, clearError, updateLeadIdentity } from '../../../app/business/businessStore';
26
25
  import Collapse from '../../../../components/Collapse';
26
+ import { NIDValidationSchema } from './validation';
27
+ import ID from './ID';
28
+ import DOB from './DOB';
27
29
  var FormStyled = styled(Form)(function () { return ({
28
30
  display: 'flex',
29
31
  flexDirection: 'column'
@@ -33,21 +35,26 @@ var IDBOD = function (_a) {
33
35
  var isAr = useLanguage().isAr;
34
36
  var dispatch = useAppDispatch();
35
37
  var t = useTranslation().t;
38
+ var _c = useSelector(businessSelector), data = _c.data, loading = _c.loading, error = _c.error;
36
39
  var methods = useForm({
37
40
  resolver: yupResolver(NIDValidationSchema),
38
- defaultValues: {
39
- nid: '',
40
- dob: '1998-08-22'
41
- },
41
+ defaultValues: data.nidData,
42
42
  mode: 'onChange'
43
43
  });
44
+ React.useEffect(function () {
45
+ if (error)
46
+ dispatch(clearError());
47
+ }, [methods.formState.isValid]);
44
48
  var onSubmit = function (data) {
45
- console.log('data', data);
46
- dispatch(handleNextScreenStep());
49
+ dispatch(updateLeadIdentity(__assign(__assign({}, data), { isResend: false })));
47
50
  };
48
51
  var handleCollapseOpenClose = function (flag) {
49
52
  setCollapse(flag);
50
53
  };
51
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ID, {}) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(Button, __assign({ sx: { mt: 6 }, isAr: isAr, disabled: !methods.formState.isValid }, { children: t('next') })) }))] })) })) }));
54
+ var onBack = function () {
55
+ dispatch(handlePrevScreenStep());
56
+ };
57
+ var disabled = !methods.formState.isValid || !!error;
58
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ID, {}) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(Button, __assign({ loading: loading, sx: { mt: 6 }, isAr: isAr, disabled: disabled, onBackClicked: function () { return onBack(); }, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
52
59
  };
53
60
  export default React.memo(IDBOD);
@@ -1,11 +1,8 @@
1
1
  import * as React from 'react';
2
2
  export interface OTPProps {
3
- idNumber?: string;
4
3
  }
5
4
  declare const _default: React.MemoExoticComponent<{
6
- ({ idNumber }: OTPProps): JSX.Element;
7
- defaultProps: {
8
- idNumber: string;
9
- };
5
+ ({}: OTPProps): JSX.Element;
6
+ defaultProps: {};
10
7
  }>;
11
8
  export default _default;
@@ -11,17 +11,19 @@ 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 { useSelector } from 'react-redux';
14
15
  import { useAppDispatch } from '../../../../hooks';
15
16
  import { useTranslation } from 'react-i18next';
16
17
  import { useForm, FormProvider } from 'react-hook-form';
17
18
  import { yupResolver } from '@hookform/resolvers/yup';
18
19
  import Box from '@mui/material/Box/Box';
19
20
  import { styled } from '@mui/material/styles';
20
- import { handleNextScreenStep } from '../../../../app/settings';
21
+ import { handlePrevScreenStep } from '../../../../app/settings';
21
22
  import { useLanguage } from '../../../../hooks';
22
23
  import Form from '../../../../components/Form';
23
24
  import Text from '../../../../components/Text';
24
25
  import { ScreenContainer } from '../../../shared/Containers';
26
+ import { businessSelector, clearError, verifyLeadOTP } from '../../../app/business/businessStore';
25
27
  import Button from '../../../shared/Button';
26
28
  import { maskID } from '../../../../utils';
27
29
  import { OTPValidation } from './validation';
@@ -46,27 +48,28 @@ var FormStyled = styled(Form)(function () { return ({
46
48
  flexDirection: 'column'
47
49
  }); });
48
50
  var OTP = function (_a) {
49
- var idNumber = _a.idNumber;
51
+ var _b = useSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error;
50
52
  var dispatch = useAppDispatch();
51
53
  var methods = useForm({
52
54
  resolver: yupResolver(OTPValidation),
53
- defaultValues: {
54
- otp: ''
55
- },
55
+ defaultValues: data.otpData,
56
56
  mode: 'onChange'
57
57
  });
58
58
  var t = useTranslation().t;
59
59
  var isAr = useLanguage().isAr;
60
- var onSubmit = function (data) {
61
- console.log('data', data);
62
- if (data.otp === '123456')
63
- return dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
64
- dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
60
+ React.useEffect(function () {
61
+ if (error)
62
+ dispatch(clearError());
63
+ }, [methods.formState.isValid]);
64
+ var onSubmit = function (formData) {
65
+ dispatch(verifyLeadOTP(formData));
65
66
  };
66
- var loading = false;
67
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('opt_nid_sent_title', { provider: 'ABSHER' }), ' ', _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskID(idNumber || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', isAr: isAr, loading: loading }, { children: t('next') }))] })) })) }));
68
- };
69
- OTP.defaultProps = {
70
- idNumber: '1234567891'
67
+ var onBack = function () {
68
+ dispatch(handlePrevScreenStep());
69
+ };
70
+ var disabled = !methods.formState.isValid || !!error;
71
+ var idNumber = data.nidData.nid;
72
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('opt_nid_sent_title', { provider: 'ABSHER' }), ' ', !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskID(idNumber || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, type: 'submit', isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
71
73
  };
74
+ OTP.defaultProps = {};
72
75
  export default React.memo(OTP);
@@ -11,12 +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 Box from '@mui/material/Box/Box';
15
- import { styled } from '@mui/material/styles';
16
- import OTPField from '../../../../features/shared/OTP';
14
+ import { useSelector } from 'react-redux';
17
15
  import { useController, useFormContext } from 'react-hook-form';
18
16
  import { useTranslation } from 'react-i18next';
17
+ import Box from '@mui/material/Box/Box';
18
+ import { styled } from '@mui/material/styles';
19
+ import OTPField from '../../../shared/OTP';
19
20
  import { DEFAULT_TIMER_VALUE } from '../../../../constants';
21
+ import { businessSelector, updateLeadIdentity } from '../../../app/business/businessStore';
22
+ import { useAppDispatch } from '../../../../hooks';
20
23
  var BoxStyled = styled(Box)(function (_a) {
21
24
  var theme = _a.theme;
22
25
  return ({
@@ -27,13 +30,25 @@ var BoxStyled = styled(Box)(function (_a) {
27
30
  });
28
31
  });
29
32
  var OTPInput = function (_a) {
30
- var control = useFormContext().control;
33
+ var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
31
34
  var t = useTranslation().t;
35
+ var dispatch = useAppDispatch();
32
36
  var otpControl = useController({ name: 'otp', control: control });
37
+ var data = useSelector(businessSelector).data;
38
+ var nidData = data.nidData;
33
39
  var handleOnOTPChange = function (otp) {
34
40
  otpControl.field.onChange(otp);
35
41
  };
42
+ var handleOnResendOTP = function () {
43
+ if (otpControl.field.value)
44
+ setValue('otp', '', { shouldValidate: true });
45
+ var params = {
46
+ nid: nidData.nid,
47
+ dob: nidData.dob
48
+ };
49
+ dispatch(updateLeadIdentity(__assign(__assign({}, params), { isResend: true })));
50
+ };
36
51
  var otpValue = otpControl.field.value;
37
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
52
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
38
53
  };
39
54
  export default React.memo(OTPInput);
@@ -1,9 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
+ import { useAppDispatch } from '../../../../hooks';
3
4
  import { useTranslation } from 'react-i18next';
4
5
  import SuccessScreen from '../../../shared/SuccessScreen';
6
+ import { updateLeadSuccess } from '../../../app/business/businessStore';
5
7
  var Success = function (_a) {
6
8
  var t = useTranslation().t;
9
+ var dispatch = useAppDispatch();
10
+ React.useEffect(function () {
11
+ dispatch(updateLeadSuccess());
12
+ }, []);
7
13
  var onSuccess = function () {
8
14
  window.open('mailto:');
9
15
  };
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import Box from '@mui/material/Box/Box';
15
15
  import { styled } from '@mui/material/styles';
16
- import OTPField from '../../../../features/shared/OTP';
16
+ 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';
@@ -27,13 +27,17 @@ var BoxStyled = styled(Box)(function (_a) {
27
27
  });
28
28
  });
29
29
  var OTPInput = function (_a) {
30
- var control = useFormContext().control;
30
+ var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
31
31
  var t = useTranslation().t;
32
32
  var otpControl = useController({ name: 'otp', control: control });
33
33
  var handleOnOTPChange = function (otp) {
34
34
  otpControl.field.onChange(otp);
35
35
  };
36
+ var handleOnResendOTP = function () {
37
+ if (otpControl.field.value)
38
+ setValue('otp', '', { shouldValidate: true });
39
+ };
36
40
  var otpValue = otpControl.field.value;
37
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
41
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
38
42
  };
39
43
  export default React.memo(OTPInput);
@@ -1,13 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export interface OTPProps {
3
- phone?: string;
4
- code?: string;
5
3
  }
6
- declare const _default: React.MemoExoticComponent<{
7
- ({ phone, code }: OTPProps): JSX.Element;
8
- defaultProps: {
9
- phone: string;
10
- code: string;
11
- };
12
- }>;
4
+ declare const _default: React.MemoExoticComponent<({}: OTPProps) => JSX.Element>;
13
5
  export default _default;