@tap-payments/auth-jsconnect 1.0.38 → 1.0.43
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 +14 -37
- package/build/api/data.d.ts +1 -0
- package/build/api/data.js +5 -1
- package/build/api/entity.d.ts +5 -6
- package/build/api/index.d.ts +2 -2
- package/build/api/lead.d.ts +1 -2
- package/build/api/lead.js +3 -7
- package/build/components/AnimationFlow/BottomSheet.js +2 -0
- package/build/components/Footer/Footer.d.ts +3 -1
- package/build/components/Footer/Footer.js +11 -47
- package/build/constants/api.d.ts +2 -2
- package/build/constants/api.js +5 -5
- package/build/constants/app.js +1 -1
- package/build/constants/dummy.d.ts +16 -38
- package/build/constants/dummy.js +35 -59
- package/build/features/app/business/businessStore.d.ts +12 -12
- package/build/features/app/business/businessStore.js +109 -67
- package/build/features/app/connect/connectStore.js +7 -5
- package/build/features/business/screens/Activities/Activities.js +16 -6
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +1 -12
- package/build/features/business/screens/Activities/SalesChannels.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +2 -3
- package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +2 -2
- package/build/features/business/screens/BusinessType/CompanyLicense.js +9 -6
- package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +2 -2
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +9 -9
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.js +14 -4
- package/build/features/business/screens/Customers/Customers.js +18 -11
- package/build/features/business/screens/Customers/ExpectedCustomers.js +14 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +14 -4
- package/build/features/business/screens/OTP/OTP.js +5 -2
- package/build/features/business/screens/Verify/Verify.js +4 -1
- package/build/features/connect/screens/Individual/Email.js +1 -1
- package/build/features/connect/screens/Merchant/BrandName.js +7 -3
- package/build/features/connect/screens/Mobile/Mobile.js +1 -2
- package/build/features/connect/screens/NID/NID.js +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +1 -1
- package/build/features/shared/Button/Button.js +13 -3
- package/build/features/shared/Containers/FeatureContainer.js +1 -1
- package/build/features/shared/Containers/ScreenContainer.js +1 -1
- package/build/features/shared/Footer/Footer.js +7 -1
- package/build/features/shared/Input/Input.d.ts +1 -1
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useElementSizeById.d.ts +6 -0
- package/build/hooks/useElementSizeById.js +12 -0
- package/package.json +126 -126
|
@@ -12,7 +12,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
12
12
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
13
13
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
14
14
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
15
|
-
export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "
|
|
15
|
+
export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<import("../../../../components/Input").InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
|
|
16
16
|
placeholder?: string | undefined;
|
|
17
17
|
hide?: boolean | undefined;
|
|
18
18
|
warningType?: "alert" | "error" | "hint" | undefined;
|
|
@@ -22,6 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
|
+
import { useSelector } from 'react-redux';
|
|
25
26
|
import Box from '@mui/material/Box';
|
|
26
27
|
import { useTranslation } from 'react-i18next';
|
|
27
28
|
import { useController, useFormContext } from 'react-hook-form';
|
|
@@ -34,7 +35,7 @@ import Input from '../../../../components/Input';
|
|
|
34
35
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
36
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
36
37
|
import { useLanguage } from '../../../../hooks';
|
|
37
|
-
import {
|
|
38
|
+
import { businessSelector } from '../../../app/business/businessStore';
|
|
38
39
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
39
40
|
var theme = _a.theme;
|
|
40
41
|
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
@@ -73,12 +74,15 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
|
73
74
|
}); });
|
|
74
75
|
var customerLocations = function (_a) {
|
|
75
76
|
var rest = __rest(_a, []);
|
|
76
|
-
var
|
|
77
|
-
var
|
|
77
|
+
var _b = React.useState([]), customerLocationsList = _b[0], setCustomerLocationsList = _b[1];
|
|
78
|
+
var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
|
|
78
79
|
var t = useTranslation().t;
|
|
79
80
|
var isAr = useLanguage().isAr;
|
|
80
81
|
var control = useFormContext().control;
|
|
81
82
|
var customerLocationsControl = useController({ name: 'customerLocations', control: control });
|
|
83
|
+
var data = useSelector(businessSelector).data;
|
|
84
|
+
var activitiesData = data.activitiesData;
|
|
85
|
+
var response = activitiesData.responseBody;
|
|
82
86
|
var onOpenList = function (event) {
|
|
83
87
|
var _a;
|
|
84
88
|
setAnchorEl(event.currentTarget);
|
|
@@ -89,6 +93,12 @@ var customerLocations = function (_a) {
|
|
|
89
93
|
setAnchorEl(null);
|
|
90
94
|
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
91
95
|
};
|
|
96
|
+
React.useEffect(function () {
|
|
97
|
+
var _a;
|
|
98
|
+
if (((_a = response === null || response === void 0 ? void 0 : response.customerBases) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
99
|
+
setCustomerLocationsList(response === null || response === void 0 ? void 0 : response.customerBases);
|
|
100
|
+
}
|
|
101
|
+
}, [response === null || response === void 0 ? void 0 : response.customerBases]);
|
|
92
102
|
var checkRemainingCondition = function (item) {
|
|
93
103
|
return !!customerLocationsValue.find(function (location) {
|
|
94
104
|
return location.id === item.id;
|
|
@@ -102,7 +112,7 @@ var customerLocations = function (_a) {
|
|
|
102
112
|
var customerLocationsValue = customerLocationsControl.field.value;
|
|
103
113
|
var customerLocationSelected = customerLocationsValue[customerLocationsValue.length - 1];
|
|
104
114
|
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('select_customer_base') }), _jsx(InputStyled, { readOnly: true, value: isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.nameAR : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
|
|
105
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.
|
|
115
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.titleAr : item.title })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
|
|
106
116
|
} }) }))] }) })));
|
|
107
117
|
};
|
|
108
118
|
export default React.memo(customerLocations);
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import Box from '@mui/material/Box/Box';
|
|
14
|
+
import { useSelector } from 'react-redux';
|
|
14
15
|
import { styled } from '@mui/material/styles';
|
|
15
16
|
import * as React from 'react';
|
|
16
17
|
import { useTranslation } from 'react-i18next';
|
|
@@ -25,12 +26,11 @@ import { useLanguage } from '../../../../hooks';
|
|
|
25
26
|
import CustomerLocations from './CustomerLocations';
|
|
26
27
|
import ExpectedCustomers from './ExpectedCustomers';
|
|
27
28
|
import ExpectedSales from './ExpectedSalesRange';
|
|
28
|
-
import { CUSTOMER_LOCATIONS, EXPECTED_CUSTOMERS, EXPECTED_SALES_RANGE } from '../../../../constants';
|
|
29
29
|
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
|
+
import { businessSelector, clearError, updateCustomersInfo } from '../../../app/business/businessStore';
|
|
34
34
|
var FormStyled = styled(Form)(function () { return ({
|
|
35
35
|
display: 'flex',
|
|
36
36
|
flexDirection: 'column'
|
|
@@ -44,20 +44,16 @@ var ListType;
|
|
|
44
44
|
var Customers = function (_a) {
|
|
45
45
|
var _b = React.useState(), listActive = _b[0], setListActive = _b[1];
|
|
46
46
|
var dispatch = useAppDispatch();
|
|
47
|
+
var _c = useSelector(businessSelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
48
|
+
var customerData = data.customersData;
|
|
47
49
|
var methods = useForm({
|
|
48
50
|
resolver: yupResolver(CustomerInfoValidation),
|
|
49
|
-
defaultValues:
|
|
50
|
-
customerLocations: CUSTOMER_LOCATIONS,
|
|
51
|
-
expectedCustomers: EXPECTED_CUSTOMERS[EXPECTED_CUSTOMERS.length - 1],
|
|
52
|
-
expectedSalesRange: EXPECTED_SALES_RANGE[EXPECTED_SALES_RANGE.length - 1],
|
|
53
|
-
refundPolicy: false,
|
|
54
|
-
transactionPolicy: false
|
|
55
|
-
},
|
|
51
|
+
defaultValues: data.customersData,
|
|
56
52
|
mode: 'onChange'
|
|
57
53
|
});
|
|
58
54
|
var onSubmit = function (data) {
|
|
59
55
|
console.log('data', data);
|
|
60
|
-
dispatch(updateCustomersInfo(__assign(
|
|
56
|
+
dispatch(updateCustomersInfo(__assign({}, data)));
|
|
61
57
|
};
|
|
62
58
|
var onBack = function () {
|
|
63
59
|
dispatch(handlePrevScreenStep());
|
|
@@ -67,6 +63,16 @@ var Customers = function (_a) {
|
|
|
67
63
|
var handleMenuClick = function (flag) {
|
|
68
64
|
setListActive(flag);
|
|
69
65
|
};
|
|
66
|
+
React.useEffect(function () {
|
|
67
|
+
if (error)
|
|
68
|
+
dispatch(clearError());
|
|
69
|
+
}, [methods.formState.isValid]);
|
|
70
|
+
React.useEffect(function () {
|
|
71
|
+
var customerLocations = customerData.customerLocations, expectedCustomers = customerData.expectedCustomers, expectedSalesRange = customerData.expectedSalesRange;
|
|
72
|
+
methods.setValue('customerLocations', customerLocations);
|
|
73
|
+
methods.setValue('expectedCustomers', expectedCustomers);
|
|
74
|
+
methods.setValue('expectedSalesRange', expectedSalesRange);
|
|
75
|
+
}, [customerData.customerLocations, customerData.expectedCustomers, customerData.expectedSalesRange]);
|
|
70
76
|
var isCustomerLocationsListActive = listActive === ListType.CustomerLocationsList;
|
|
71
77
|
var isExpectedCustomersListActive = listActive === ListType.ExpectedCustomersList;
|
|
72
78
|
var isExpectedSalesListActive = listActive === ListType.ExpectedSalesList;
|
|
@@ -74,6 +80,7 @@ var Customers = function (_a) {
|
|
|
74
80
|
var whenNotSelectExpectedCustomers = !isCustomerLocationsListActive && !isExpectedSalesListActive;
|
|
75
81
|
var whenNotSelectExpectedSales = !isCustomerLocationsListActive && !isExpectedCustomersListActive;
|
|
76
82
|
var isAnyListSelected = !isExpectedCustomersListActive && !isCustomerLocationsListActive && !isExpectedSalesListActive;
|
|
77
|
-
|
|
83
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
84
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(CustomerLocations, { show: whenNotSelectCustomersLocation, onListOpen: function () { return handleMenuClick(ListType.CustomerLocationsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedCustomers, { show: whenNotSelectExpectedCustomers, onListOpen: function () { return handleMenuClick(ListType.ExpectedCustomersList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedSales, { show: whenNotSelectExpectedSales, onListOpen: function () { return handleMenuClick(ListType.ExpectedSalesList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: isAnyListSelected }, { children: [_jsx(RefundPolicy, {}), _jsx(TransactionPolicy, {}), _jsx(Box, __assign({ sx: { mt: 2 } }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] }))] })) })) }));
|
|
78
85
|
};
|
|
79
86
|
export default React.memo(Customers);
|
|
@@ -22,17 +22,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
|
+
import { useSelector } from 'react-redux';
|
|
25
26
|
import Box from '@mui/material/Box';
|
|
26
27
|
import { styled } from '@mui/material/styles';
|
|
27
28
|
import { useTranslation } from 'react-i18next';
|
|
28
29
|
import { useController, useFormContext } from 'react-hook-form';
|
|
29
30
|
import { useLanguage } from '../../../../hooks';
|
|
30
31
|
import SimpleList from '../../../../components/SimpleList';
|
|
31
|
-
import { EXPECTED_CUSTOMERS } from '../../../../constants';
|
|
32
32
|
import Collapse from '../../../../components/Collapse';
|
|
33
33
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
34
34
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
35
35
|
import { CheckIconStyled, InputLabelStyled, InputStyled, NameContainer } from './CustomerLocations';
|
|
36
|
+
import { businessSelector } from '../../../app/business/businessStore';
|
|
36
37
|
var ListItemContainer = styled(Box)(function (_a) {
|
|
37
38
|
var theme = _a.theme;
|
|
38
39
|
return ({
|
|
@@ -45,12 +46,15 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
|
45
46
|
}); });
|
|
46
47
|
var ExpectedCustomers = function (_a) {
|
|
47
48
|
var rest = __rest(_a, []);
|
|
48
|
-
var
|
|
49
|
-
var
|
|
49
|
+
var _b = React.useState([]), expectedCustomersList = _b[0], setExpectedCustomersList = _b[1];
|
|
50
|
+
var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
|
|
50
51
|
var t = useTranslation().t;
|
|
51
52
|
var isAr = useLanguage().isAr;
|
|
52
53
|
var control = useFormContext().control;
|
|
53
54
|
var expectedCustomersControl = useController({ name: 'expectedCustomers', control: control });
|
|
55
|
+
var data = useSelector(businessSelector).data;
|
|
56
|
+
var activitiesData = data.activitiesData;
|
|
57
|
+
var response = activitiesData.responseBody;
|
|
54
58
|
var onOpenList = function (event) {
|
|
55
59
|
var _a;
|
|
56
60
|
setAnchorEl(event.currentTarget);
|
|
@@ -61,6 +65,12 @@ var ExpectedCustomers = function (_a) {
|
|
|
61
65
|
setAnchorEl(null);
|
|
62
66
|
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
63
67
|
};
|
|
68
|
+
React.useEffect(function () {
|
|
69
|
+
var _a;
|
|
70
|
+
if (((_a = response === null || response === void 0 ? void 0 : response.expectedCustomerSales) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
71
|
+
setExpectedCustomersList(response === null || response === void 0 ? void 0 : response.expectedCustomerSales);
|
|
72
|
+
}
|
|
73
|
+
}, [response === null || response === void 0 ? void 0 : response.expectedCustomerSales]);
|
|
64
74
|
var onSelectItem = function (expectedCustomers) {
|
|
65
75
|
onCloseList();
|
|
66
76
|
expectedCustomersControl.field.onChange(expectedCustomers);
|
|
@@ -68,7 +78,7 @@ var ExpectedCustomers = function (_a) {
|
|
|
68
78
|
var expectedCustomersValue = expectedCustomersControl.field.value;
|
|
69
79
|
var expectedCustomersSelected = expectedCustomersValue;
|
|
70
80
|
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.nameAR : expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
71
|
-
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.
|
|
81
|
+
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.titleAr : item.title })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
|
|
72
82
|
} }) }))] }) })));
|
|
73
83
|
};
|
|
74
84
|
export default ExpectedCustomers;
|
|
@@ -27,12 +27,13 @@ import { styled } from '@mui/material/styles';
|
|
|
27
27
|
import { useTranslation } from 'react-i18next';
|
|
28
28
|
import { useController, useFormContext } from 'react-hook-form';
|
|
29
29
|
import { useLanguage } from '../../../../hooks';
|
|
30
|
-
import { EXPECTED_SALES_RANGE } from '../../../../constants';
|
|
31
30
|
import SimpleList from '../../../../components/SimpleList';
|
|
32
31
|
import Collapse from '../../../../components/Collapse';
|
|
33
32
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
34
33
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
35
34
|
import { InputLabelStyled, CheckIconStyled, InputStyled, NameContainer } from './CustomerLocations';
|
|
35
|
+
import { useSelector } from 'react-redux';
|
|
36
|
+
import { businessSelector } from '../../../../features/app/business/businessStore';
|
|
36
37
|
var ListItemContainer = styled(Box)(function () { return ({
|
|
37
38
|
display: 'flex'
|
|
38
39
|
}); });
|
|
@@ -41,12 +42,15 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
|
41
42
|
}); });
|
|
42
43
|
var ExpectedSalesRange = function (_a) {
|
|
43
44
|
var rest = __rest(_a, []);
|
|
44
|
-
var
|
|
45
|
-
var
|
|
45
|
+
var _b = React.useState([]), expectedSalesRangeList = _b[0], setExpectedSalesRangeList = _b[1];
|
|
46
|
+
var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
|
|
46
47
|
var t = useTranslation().t;
|
|
47
48
|
var isAr = useLanguage().isAr;
|
|
48
49
|
var control = useFormContext().control;
|
|
49
50
|
var expectedSalesRangeControl = useController({ name: 'expectedSalesRange', control: control });
|
|
51
|
+
var data = useSelector(businessSelector).data;
|
|
52
|
+
var activitiesData = data.activitiesData;
|
|
53
|
+
var response = activitiesData.responseBody;
|
|
50
54
|
var onOpenList = function (event) {
|
|
51
55
|
var _a;
|
|
52
56
|
setAnchorEl(event.currentTarget);
|
|
@@ -57,6 +61,12 @@ var ExpectedSalesRange = function (_a) {
|
|
|
57
61
|
setAnchorEl(null);
|
|
58
62
|
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
59
63
|
};
|
|
64
|
+
React.useEffect(function () {
|
|
65
|
+
var _a;
|
|
66
|
+
if (((_a = response === null || response === void 0 ? void 0 : response.expectedSales) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
67
|
+
setExpectedSalesRangeList(response === null || response === void 0 ? void 0 : response.expectedSales);
|
|
68
|
+
}
|
|
69
|
+
}, [response === null || response === void 0 ? void 0 : response.expectedSales]);
|
|
60
70
|
var checkRemainingCondition = function (item) {
|
|
61
71
|
return !!expectedSalesRangeValue.find(function (expectedSale) {
|
|
62
72
|
return expectedSale.id === item.id;
|
|
@@ -69,7 +79,7 @@ var ExpectedSalesRange = function (_a) {
|
|
|
69
79
|
var expectedSalesRangeValue = expectedSalesRangeControl.field.value || expectedSalesRangeList;
|
|
70
80
|
var expectedSalesRangeSelected = expectedSalesRangeValue;
|
|
71
81
|
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_yearly') }), _jsx(InputStyled, { readOnly: true, value: isAr ? expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.nameAR : expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.name, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_expected_sales'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name', list: expectedSalesRangeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
72
|
-
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.
|
|
82
|
+
return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.titleAr : item.title })) }), item.id === (expectedSalesRangeSelected === null || expectedSalesRangeSelected === void 0 ? void 0 : expectedSalesRangeSelected.id) && _jsx(CheckIconStyled, {})] }));
|
|
73
83
|
} }) }))] }) })));
|
|
74
84
|
};
|
|
75
85
|
export default ExpectedSalesRange;
|
|
@@ -23,7 +23,7 @@ import { useLanguage } from '../../../../hooks';
|
|
|
23
23
|
import Form from '../../../../components/Form';
|
|
24
24
|
import Text from '../../../../components/Text';
|
|
25
25
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
26
|
-
import { businessSelector, clearError, verifyLeadOTP } from '../../../app/business/businessStore';
|
|
26
|
+
import { businessSelector, clearError, resetOTPScreen, verifyLeadOTP } from '../../../app/business/businessStore';
|
|
27
27
|
import Button from '../../../shared/Button';
|
|
28
28
|
import { maskID } from '../../../../utils';
|
|
29
29
|
import { OTPValidation } from './validation';
|
|
@@ -41,7 +41,7 @@ var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
|
41
41
|
});
|
|
42
42
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
43
43
|
var theme = _a.theme;
|
|
44
|
-
return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightLight, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75),
|
|
44
|
+
return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightLight, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line' }));
|
|
45
45
|
});
|
|
46
46
|
var FormStyled = styled(Form)(function () { return ({
|
|
47
47
|
display: 'flex',
|
|
@@ -60,6 +60,9 @@ var OTP = function (_a) {
|
|
|
60
60
|
React.useEffect(function () {
|
|
61
61
|
if (error)
|
|
62
62
|
dispatch(clearError());
|
|
63
|
+
return function () {
|
|
64
|
+
dispatch(resetOTPScreen());
|
|
65
|
+
};
|
|
63
66
|
}, [methods.formState.isValid]);
|
|
64
67
|
var onSubmit = function (formData) {
|
|
65
68
|
dispatch(verifyLeadOTP(formData));
|
|
@@ -24,7 +24,7 @@ import { maskPhone } from '../../../../utils';
|
|
|
24
24
|
import Form from '../../../../components/Form';
|
|
25
25
|
import Text from '../../../../components/Text';
|
|
26
26
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
27
|
-
import { businessSelector, clearError, verifyLeadOTP } from '../../../app/business/businessStore';
|
|
27
|
+
import { businessSelector, clearError, resetOTPScreen, verifyLeadOTP } from '../../../app/business/businessStore';
|
|
28
28
|
import Button from '../../../shared/Button';
|
|
29
29
|
import { OTPValidation } from './validation';
|
|
30
30
|
import OTPInput from './OTPInput';
|
|
@@ -61,6 +61,9 @@ var VerifyNumber = function (_a) {
|
|
|
61
61
|
React.useEffect(function () {
|
|
62
62
|
if (error)
|
|
63
63
|
dispatch(clearError());
|
|
64
|
+
return function () {
|
|
65
|
+
dispatch(resetOTPScreen());
|
|
66
|
+
};
|
|
64
67
|
}, [methods.formState.isValid]);
|
|
65
68
|
var onSubmit = function (formData) {
|
|
66
69
|
dispatch(verifyLeadOTP(formData));
|
|
@@ -54,6 +54,6 @@ var Email = function (_a) {
|
|
|
54
54
|
var clearNumber = function () {
|
|
55
55
|
emailControl.field.onChange('');
|
|
56
56
|
};
|
|
57
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && emailValue ? _jsx(CheckIcon, {}) : emailValue && _jsx(ClearIcon, { onClick: clearNumber }) }) }) })));
|
|
57
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, onEnterPressed: function (e) { return e.preventDefault(); }, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && emailValue ? _jsx(CheckIcon, {}) : emailValue && _jsx(ClearIcon, { onClick: clearNumber }) }) }) })));
|
|
58
58
|
};
|
|
59
59
|
export default React.memo(Email);
|
|
@@ -11,6 +11,7 @@ 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
16
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
17
|
import Box from '@mui/material/Box';
|
|
@@ -24,7 +25,7 @@ import ClearIcon from '../../../shared/ClearIcon';
|
|
|
24
25
|
import Tooltip from '../../../../components/Tooltip';
|
|
25
26
|
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
26
27
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
27
|
-
import { checkBrandNameAvailability } from '../../../app/connect/connectStore';
|
|
28
|
+
import { checkBrandNameAvailability, connectSelector } from '../../../app/connect/connectStore';
|
|
28
29
|
import { useAppDispatch } from '../../../../hooks';
|
|
29
30
|
import { debounce } from 'lodash-es';
|
|
30
31
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
@@ -66,6 +67,7 @@ var BrandName = function (_a) {
|
|
|
66
67
|
var brandControl = useController({ control: control, name: 'brandName' });
|
|
67
68
|
var brandNameValue = brandControl.field.value;
|
|
68
69
|
var error = (_b = brandControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
70
|
+
var data = useSelector(connectSelector).data;
|
|
69
71
|
var checkBrand = debounce(function (value) {
|
|
70
72
|
dispatch(checkBrandNameAvailability(value));
|
|
71
73
|
}, 500);
|
|
@@ -75,13 +77,15 @@ var BrandName = function (_a) {
|
|
|
75
77
|
brandControl.field.onChange(value);
|
|
76
78
|
};
|
|
77
79
|
React.useEffect(function () {
|
|
80
|
+
var _a;
|
|
78
81
|
var isValid = brandNameValue && !error && brandNameValue.length > 2;
|
|
82
|
+
var brandName = brandNameValue + ((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2);
|
|
79
83
|
if (isValid)
|
|
80
|
-
checkBrand(
|
|
84
|
+
checkBrand(brandName);
|
|
81
85
|
}, [brandNameValue, error]);
|
|
82
86
|
var clearBrandName = function () {
|
|
83
87
|
brandControl.field.onChange('');
|
|
84
88
|
};
|
|
85
|
-
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && brandNameValue ? _jsx(CheckIcon, {}) : brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }) })] })));
|
|
89
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 3 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: !error && brandNameValue ? _jsx(CheckIcon, {}) : brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName }) })] })));
|
|
86
90
|
};
|
|
87
91
|
export default React.memo(BrandName);
|
|
@@ -29,7 +29,6 @@ import Divider from '@mui/material/Divider';
|
|
|
29
29
|
import Text from '../../../../components/Text';
|
|
30
30
|
import MIDTitle from './Title';
|
|
31
31
|
import MobileNumber from './MobileNumber';
|
|
32
|
-
import BusinessCountry from './BusinessCountry';
|
|
33
32
|
import { PhoneValidationSchema } from './validation';
|
|
34
33
|
var FormStyled = styled(Form)(function () { return ({
|
|
35
34
|
display: 'flex',
|
|
@@ -108,6 +107,6 @@ var Mobile = function (_a) {
|
|
|
108
107
|
var isCountryListActive = listType === ListType.CountryCodeList;
|
|
109
108
|
var listActive = isBusinessListActive || isCountryListActive;
|
|
110
109
|
var disabled = !methods.formState.isValid || !!error;
|
|
111
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [
|
|
110
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { show: !isBusinessListActive, setMobileLength: setMobileLength, countries: data.countries, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ disabled: settingsStore.loading || loading, onClick: function () { return onBack(); }, isAr: isAr }, { children: t('absher_button_label') }))] }))] })) }))] }));
|
|
112
111
|
};
|
|
113
112
|
export default React.memo(Mobile);
|
|
@@ -29,7 +29,6 @@ import Divider from '@mui/material/Divider';
|
|
|
29
29
|
import Text from '../../../../components/Text';
|
|
30
30
|
import IDNumber from './IDNumber';
|
|
31
31
|
import DOB from './DOB';
|
|
32
|
-
import BusinessCountry from '../Mobile/BusinessCountry';
|
|
33
32
|
var FormStyled = styled(Form)(function () { return ({
|
|
34
33
|
display: 'flex',
|
|
35
34
|
flexDirection: 'column'
|
|
@@ -87,6 +86,6 @@ var NID = function (_a) {
|
|
|
87
86
|
dispatch(handlePrevScreenStep('CONNECT_MOBILE_STEP'));
|
|
88
87
|
};
|
|
89
88
|
var disabled = !methods.formState.isValid || !!error;
|
|
90
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(
|
|
89
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(AbsherButton, __assign({ onClick: function () { return onBack(); }, disabled: loading || settingsStore.loading, hideIcon: true, isAr: isAr }, { children: t('mobile_button_label') }))] }))] })) })) }));
|
|
91
90
|
};
|
|
92
91
|
export default React.memo(NID);
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -69,7 +69,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
69
69
|
};
|
|
70
70
|
var handleSelectSource = function (country) {
|
|
71
71
|
var _a;
|
|
72
|
-
if (((_a = country.
|
|
72
|
+
if (((_a = country.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'salary')
|
|
73
73
|
setEmployerFieldsActive(true);
|
|
74
74
|
else {
|
|
75
75
|
setEmployerFieldsActive(false);
|
|
@@ -81,7 +81,7 @@ var SourceOfIncome = function (_a) {
|
|
|
81
81
|
var source = sourceIncomeControl.field.value;
|
|
82
82
|
var error = (_b = sourceIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
83
83
|
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(Input, { required: true, label: t('tap_js_source_of_income'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name : source === null || source === void 0 ? void 0 : source.nameEn) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'nameEn', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
84
|
-
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.
|
|
84
|
+
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.titleAr : item === null || item === void 0 ? void 0 : item.title })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIconStyled, {})] }));
|
|
85
85
|
} }) }))] })) })));
|
|
86
86
|
};
|
|
87
87
|
export default React.memo(SourceOfIncome);
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { Fragment } from 'react';
|
|
24
|
+
import React, { Fragment } from 'react';
|
|
25
25
|
import Button from '../../../components/Button';
|
|
26
26
|
import Icon from '../../../components/Icon';
|
|
27
27
|
import { styled } from '@mui/material/styles';
|
|
@@ -84,6 +84,16 @@ var BackButtonStyled = styled(Button, { shouldForwardProp: function (prop) { ret
|
|
|
84
84
|
});
|
|
85
85
|
export default function CustomButton(_a) {
|
|
86
86
|
var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, disableBack = _a.disableBack, onBackClicked = _a.onBackClicked, error = _a.error, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error"]);
|
|
87
|
-
var
|
|
88
|
-
|
|
87
|
+
var _b = React.useState(false), btnLoading = _b[0], setBtnLoading = _b[1];
|
|
88
|
+
var isBackEnabled = !disableBack && !btnLoading;
|
|
89
|
+
React.useEffect(function () {
|
|
90
|
+
if (loading)
|
|
91
|
+
setBtnLoading(true);
|
|
92
|
+
if (error)
|
|
93
|
+
setBtnLoading(false);
|
|
94
|
+
}, [loading, error]);
|
|
95
|
+
React.useEffect(function () {
|
|
96
|
+
setBtnLoading(false);
|
|
97
|
+
}, []);
|
|
98
|
+
return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error }, { children: _jsx(Warning, __assign({ sx: { mb: 1 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: !btnLoading && _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: 'white', outerColor: 'white', size: 15, toggleAnimation: !!loading })) }))] })] }));
|
|
89
99
|
}
|
|
@@ -28,6 +28,6 @@ var Container = styled(Box)(function (_a) {
|
|
|
28
28
|
_b);
|
|
29
29
|
});
|
|
30
30
|
var FeatureContainer = React.forwardRef(function (props, ref) {
|
|
31
|
-
return _jsx(Container, __assign({}, props, { ref: ref, id: 'feature-container' }));
|
|
31
|
+
return _jsx(Container, __assign({}, props, { ref: ref, id: 'main-feature-container' }));
|
|
32
32
|
});
|
|
33
33
|
export default FeatureContainer;
|
|
@@ -24,6 +24,6 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
var ScreenContainer = React.forwardRef(function (props, ref) {
|
|
27
|
-
return _jsx(BoxStyled, __assign({}, props, { ref: ref }));
|
|
27
|
+
return _jsx(BoxStyled, __assign({}, props, { ref: ref, id: 'main-screen-containers' }));
|
|
28
28
|
});
|
|
29
29
|
export default ScreenContainer;
|
|
@@ -4,13 +4,19 @@ import { useAppDispatch, useLanguage } from '../../../hooks';
|
|
|
4
4
|
import { handleLanguage } from '../../../app/settings';
|
|
5
5
|
import Footer from '../../../components/Footer';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { useSelector } from 'react-redux';
|
|
8
|
+
import { connectSelector } from '../../app/connect/connectStore';
|
|
7
9
|
export default function CustomFooter() {
|
|
8
10
|
var isEn = useLanguage().isEn;
|
|
9
11
|
var t = useTranslation().t;
|
|
10
12
|
var dispatch = useAppDispatch();
|
|
13
|
+
var _a = useSelector(connectSelector), data = _a.data, loading = _a.loading, error = _a.error;
|
|
11
14
|
var handleChangeLanguage = function () {
|
|
12
15
|
var language = isEn ? LanguageMode.AR : LanguageMode.EN;
|
|
13
16
|
dispatch(handleLanguage(language));
|
|
14
17
|
};
|
|
15
|
-
|
|
18
|
+
var country = data.businessCountry;
|
|
19
|
+
var countryName = isEn ? country.name.english : country.name.arabic;
|
|
20
|
+
var countryFlag = country.logo;
|
|
21
|
+
return (_jsx(Footer, { onSwitchLanguage: handleChangeLanguage, language: t('language'), countryName: countryName, countryFlag: countryFlag }));
|
|
16
22
|
}
|
|
@@ -13,7 +13,7 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
13
13
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
14
14
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
15
15
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
16
|
-
export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<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" | "
|
|
16
|
+
export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<InputProps, "name" | "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
|
|
17
17
|
placeholder?: string | undefined;
|
|
18
18
|
hide?: boolean | undefined;
|
|
19
19
|
warningType?: "alert" | "error" | "hint" | undefined;
|
package/build/hooks/index.d.ts
CHANGED
package/build/hooks/index.js
CHANGED