@tap-payments/auth-jsconnect 1.0.30 → 1.0.33
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.
- package/build/@types/app.d.ts +17 -1
- package/build/@types/form.d.ts +16 -1
- package/build/api/axios.d.ts +2 -0
- package/build/api/axios.js +10 -0
- package/build/api/entity.d.ts +20 -0
- package/build/api/entity.js +9 -0
- package/build/api/firebase.d.ts +4 -0
- package/build/api/firebase.js +9 -0
- package/build/api/index.d.ts +16 -2
- package/build/api/index.js +7 -1
- package/build/api/lead.d.ts +22 -0
- package/build/api/lead.js +21 -1
- package/build/app/settings.d.ts +1 -0
- package/build/app/settings.js +44 -18
- package/build/assets/locales/ar.json +1 -1
- package/build/components/Input/Input.d.ts +1 -1
- package/build/components/Input/Input.js +3 -2
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/Warning/Warning.d.ts +1 -1
- package/build/components/Warning/Warning.js +13 -2
- package/build/constants/api.d.ts +5 -0
- package/build/constants/api.js +11 -1
- package/build/constants/app.d.ts +7 -1
- package/build/constants/app.js +7 -1
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +2 -1
- package/build/constants/dummy.js +3 -3
- package/build/constants/validation.d.ts +2 -0
- package/build/constants/validation.js +2 -0
- package/build/features/app/business/businessStore.d.ts +54 -4
- package/build/features/app/business/businessStore.js +325 -5
- package/build/features/app/connect/connectStore.d.ts +3 -1
- package/build/features/app/connect/connectStore.js +72 -43
- package/build/features/bank/screens/BankDetails/validation.js +2 -1
- package/build/features/business/Business.js +7 -3
- package/build/features/business/screens/Activities/Activities.js +3 -3
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.d.ts +1 -8
- package/build/features/business/screens/BusinessType/BusinessType.js +25 -27
- package/build/features/business/screens/Confirm/Confirm.js +8 -9
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
- package/build/features/business/screens/IDBOD/DOB.js +1 -1
- package/build/features/business/screens/IDBOD/IDBOD.js +19 -12
- package/build/features/business/screens/OTP/OTP.d.ts +2 -5
- package/build/features/business/screens/OTP/OTP.js +18 -15
- package/build/features/business/screens/OTP/OTPInput.js +20 -5
- package/build/features/business/screens/Verify/OTPInput.js +7 -3
- package/build/features/business/screens/Verify/Verify.d.ts +1 -9
- package/build/features/business/screens/Verify/Verify.js +15 -17
- package/build/features/business/screens/Verify/index.d.ts +1 -2
- package/build/features/connect/screens/Individual/MobileNumber.js +23 -11
- package/build/features/connect/screens/Individual/Name.js +10 -1
- package/build/features/connect/screens/Individual/validation.js +3 -2
- package/build/features/connect/screens/Mobile/Mobile.js +2 -3
- package/build/features/connect/screens/Mobile/MobileNumber.js +22 -28
- package/build/features/connect/screens/NID/NID.js +1 -2
- package/build/features/connect/screens/OTP/OTPInput.js +3 -0
- package/build/features/connect/screens/Password/Password.js +2 -2
- package/build/features/featuresScreens.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -4
- package/build/features/shared/Button/AbsherButton.js +1 -1
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +12 -2
- package/build/hooks/useAppConfig.js +100 -24
- package/build/theme/palette.js +4 -0
- package/build/utils/locale.d.ts +2 -0
- package/build/utils/locale.js +21 -0
- package/build/utils/string.d.ts +26 -1
- package/build/utils/string.js +62 -1
- package/package.json +1 -1
|
@@ -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" | "
|
|
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" | "
|
|
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 {
|
|
@@ -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 '
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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, onClick: 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
|
-
({
|
|
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 {
|
|
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
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
idNumber
|
|
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
|
|
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
|
|
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:
|
|
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);
|
|
@@ -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 '
|
|
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
|
|
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:
|
|
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;
|
|
@@ -13,17 +13,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useAppDispatch } from '../../../../hooks';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import { useSelector } from 'react-redux';
|
|
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 {
|
|
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
|
-
import { maskPhone } from '../../../../utils';
|
|
27
28
|
import { OTPValidation } from './validation';
|
|
28
29
|
import OTPInput from './OTPInput';
|
|
29
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
@@ -46,31 +47,28 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
46
47
|
flexDirection: 'column'
|
|
47
48
|
}); });
|
|
48
49
|
var VerifyNumber = function (_a) {
|
|
49
|
-
var
|
|
50
|
+
var _b, _c, _d;
|
|
50
51
|
var dispatch = useAppDispatch();
|
|
52
|
+
var _e = useSelector(businessSelector), data = _e.data, loading = _e.loading, error = _e.error;
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
67
|
var onBack = function () {
|
|
67
68
|
dispatch(handlePrevScreenStep());
|
|
68
69
|
};
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
VerifyNumber.defaultProps = {
|
|
73
|
-
phone: '564656085',
|
|
74
|
-
code: '+996'
|
|
70
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
71
|
+
var phone = ((_d = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.contact) === null || _c === void 0 ? void 0 : _c.phone) === null || _d === void 0 ? void 0 : _d.number) || '';
|
|
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('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, type: 'submit', isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
75
73
|
};
|
|
76
74
|
export default React.memo(VerifyNumber);
|
|
@@ -36,7 +36,7 @@ import Input from '../../../shared/Input';
|
|
|
36
36
|
import SimpleList from '../../../../components/SimpleList';
|
|
37
37
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
38
38
|
import { useLanguage } from '../../../../hooks';
|
|
39
|
-
import {
|
|
39
|
+
import { SAUDI_NUMBER_LENGTH } from '../../../../constants';
|
|
40
40
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
41
41
|
var theme = _a.theme;
|
|
42
42
|
return ({
|
|
@@ -75,19 +75,35 @@ var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
|
75
75
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
76
76
|
var _b, _c, _d;
|
|
77
77
|
var countries = _a.countries, rest = __rest(_a, ["countries"]);
|
|
78
|
-
var countriesCode = React.useState(countries)[0];
|
|
78
|
+
var countriesCode = React.useState(countries || [])[0];
|
|
79
79
|
var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
|
|
80
80
|
var t = useTranslation().t;
|
|
81
81
|
var isAr = useLanguage().isAr;
|
|
82
82
|
var _f = useFormContext(), control = _f.control, setValue = _f.setValue;
|
|
83
83
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
84
84
|
var countryCodeControl = useController({ name: 'countryCode', control: control });
|
|
85
|
+
var countryCodeValue = countryCodeControl.field.value;
|
|
86
|
+
var mobileValue = phoneControl.field.value || '';
|
|
87
|
+
var countryName = (isAr ? (_b = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.name) === null || _c === void 0 ? void 0 : _c.english) || '';
|
|
88
|
+
var error = (_d = phoneControl.fieldState.error) === null || _d === void 0 ? void 0 : _d.message;
|
|
89
|
+
var isSA = countryCodeValue.iso2 === 'SA';
|
|
90
|
+
var isStartingWithZero = mobileValue.startsWith('0');
|
|
91
|
+
var mobileLen = isSA
|
|
92
|
+
? isStartingWithZero
|
|
93
|
+
? countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits
|
|
94
|
+
: SAUDI_NUMBER_LENGTH
|
|
95
|
+
: countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits;
|
|
85
96
|
React.useEffect(function () {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
(_a = rest.setMobileLength) === null || _a === void 0 ? void 0 : _a.call(rest, (country === null || country === void 0 ? void 0 : country.digits) || 9);
|
|
97
|
+
if (mobileValue) {
|
|
98
|
+
setValue('mobile', mobileValue, { shouldValidate: true });
|
|
99
|
+
}
|
|
90
100
|
}, []);
|
|
101
|
+
React.useEffect(function () {
|
|
102
|
+
var _a;
|
|
103
|
+
if ((mobileValue === null || mobileValue === void 0 ? void 0 : mobileValue.length) === 1 && isSA) {
|
|
104
|
+
(_a = rest.setMobileLength) === null || _a === void 0 ? void 0 : _a.call(rest, mobileLen);
|
|
105
|
+
}
|
|
106
|
+
}, [mobileValue]);
|
|
91
107
|
var onPhoneNumberChange = function (_a) {
|
|
92
108
|
var target = _a.target;
|
|
93
109
|
var value = removeAllCharsFromNumber(target.value);
|
|
@@ -113,11 +129,7 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
113
129
|
countryCodeControl.field.onChange(country);
|
|
114
130
|
(_a = rest.setMobileLength) === null || _a === void 0 ? void 0 : _a.call(rest, country.digits);
|
|
115
131
|
};
|
|
116
|
-
|
|
117
|
-
var mobileValue = phoneControl.field.value || '';
|
|
118
|
-
var countryName = (isAr ? (_b = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.name) === null || _c === void 0 ? void 0 : _c.english) || '';
|
|
119
|
-
var error = (_d = phoneControl.fieldState.error) === null || _d === void 0 ? void 0 : _d.message;
|
|
120
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mb: 3 }, ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(Input, { sx: { direction: 'ltr' }, inputProps: { maxLength: (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits) || 9 }, onChange: onPhoneNumberChange, value: !!anchorEl ? countryName : mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber })), placeholder: "".concat((countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.iso2) === 'SA' ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: error && t(error, { length: countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
132
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mb: 3 }, ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(Input, { sx: { direction: 'ltr' }, inputProps: { maxLength: mobileLen }, onChange: onPhoneNumberChange, value: !!anchorEl ? countryName : mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber })), placeholder: "".concat(isSA ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: error && t(error, { length: mobileLen }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
121
133
|
return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsxs(CountryCodeText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: ["+", item.idd_prefix] })), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) && _jsx(CheckIcon, {})] }));
|
|
122
134
|
} }) }))] })) })));
|
|
123
135
|
});
|
|
@@ -19,6 +19,15 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
19
19
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
20
20
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import { styled } from '@mui/material/styles';
|
|
23
|
+
var InputStyled = styled(Input)(function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return ({
|
|
26
|
+
input: {
|
|
27
|
+
textTransform: 'capitalize'
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
22
31
|
var Name = function (_a) {
|
|
23
32
|
var _b;
|
|
24
33
|
var show = _a.show;
|
|
@@ -34,6 +43,6 @@ var Name = function (_a) {
|
|
|
34
43
|
var clearNumber = function () {
|
|
35
44
|
nameControl.field.onChange('');
|
|
36
45
|
};
|
|
37
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(
|
|
46
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(InputStyled, { label: t('signup_merchant_name_label'), value: nameValue, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && nameValue ? _jsx(CheckIcon, {}) : nameValue && _jsx(ClearIcon, { onClick: clearNumber }) }) })) })));
|
|
38
47
|
};
|
|
39
48
|
export default React.memo(Name);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { REGEX_FULL_NAME } from '../../../../constants';
|
|
1
2
|
import * as yup from 'yup';
|
|
2
3
|
export var IndividualValidation = function () {
|
|
3
4
|
return yup.object().shape({
|
|
4
5
|
name: yup
|
|
5
6
|
.string()
|
|
6
|
-
.matches(
|
|
7
|
+
.matches(REGEX_FULL_NAME, 'please write your first and last name')
|
|
7
8
|
.required('please write your first and last name'),
|
|
8
9
|
email: yup.string().email('email_not_valid').required('email_not_valid')
|
|
9
10
|
});
|
|
@@ -12,7 +13,7 @@ export var IndividualMobileValidation = function (length) {
|
|
|
12
13
|
return yup.object().shape({
|
|
13
14
|
name: yup
|
|
14
15
|
.string()
|
|
15
|
-
.matches(
|
|
16
|
+
.matches(REGEX_FULL_NAME, 'please write your first and last name')
|
|
16
17
|
.required('please write your first and last name'),
|
|
17
18
|
email: yup.string().email('email_not_valid').required('email_not_valid'),
|
|
18
19
|
mobile: yup.string().length(length, 'enter_valid_mobile_number').required('mobile_number_error')
|