@tap-payments/auth-jsconnect 2.1.23-test → 2.1.25-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +48 -1
- package/build/@types/app.js +12 -0
- package/build/@types/form.d.ts +24 -8
- package/build/api/axios.js +2 -2
- package/build/api/data.d.ts +8 -0
- package/build/api/data.js +16 -0
- package/build/api/entity.d.ts +28 -1
- package/build/api/entity.js +26 -1
- package/build/api/index.d.ts +13 -3
- package/build/api/index.js +2 -2
- package/build/api/individual.d.ts +4 -0
- package/build/api/location.d.ts +5 -0
- package/build/api/location.js +19 -0
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.js +1 -1
- package/build/app/store.d.ts +2 -0
- package/build/assets/locales/ar.json +21 -1
- package/build/assets/locales/en.json +21 -1
- package/build/components/SimpleList/SimpleList.d.ts +2 -1
- package/build/components/SimpleList/SimpleList.js +22 -10
- package/build/constants/api.d.ts +3 -0
- package/build/constants/api.js +7 -1
- package/build/constants/app.d.ts +7 -1
- package/build/constants/app.js +51 -8
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/brand/brandStore.d.ts +97 -0
- package/build/features/app/brand/brandStore.js +618 -0
- package/build/features/app/entity/entityStore.d.ts +11 -23
- package/build/features/app/entity/entityStore.js +212 -295
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -2
- package/build/features/brand/Brand.d.ts +7 -0
- package/build/features/brand/Brand.js +69 -0
- package/build/features/brand/index.d.ts +1 -0
- package/build/features/brand/index.js +1 -0
- package/build/features/{entity/screens/Customers/CustomerLocations.d.ts → brand/screens/BrandActivities/ActivitiesList.d.ts} +34 -61
- package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/ActivitiesList.js +59 -40
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +72 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
- package/build/features/{entity/screens/Customers/CustomerLocations.js → brand/screens/BrandActivities/CustomerBase.js} +8 -35
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.d.ts +0 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.js +6 -6
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.d.ts +0 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.js +6 -6
- package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +20 -0
- package/build/features/brand/screens/BrandActivities/OperationStartDate.js +45 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/RefundPolicy.d.ts +0 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/RefundPolicy.js +2 -2
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
- package/build/features/brand/screens/BrandActivities/TAC.js +87 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.d.ts +0 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.js +0 -0
- package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
- package/build/features/brand/screens/BrandActivities/index.js +2 -0
- package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
- package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/validation.js +9 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +72 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/BrandName.js +142 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +30 -0
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/Segments.js +83 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.js +83 -0
- package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandInfo/index.js +2 -0
- package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
- package/build/features/brand/screens/BrandInfo/validation.js +106 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
- package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/brand/screens/Success/Success.d.ts +5 -0
- package/build/features/brand/screens/Success/Success.js +20 -0
- package/build/features/brand/screens/Success/index.d.ts +3 -0
- package/build/features/brand/screens/Success/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +117 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/brand/screens/Verify/OTPInput.js +47 -0
- package/build/features/brand/screens/Verify/Verify.d.ts +5 -0
- package/build/features/brand/screens/Verify/Verify.js +91 -0
- package/build/features/brand/screens/Verify/index.d.ts +2 -0
- package/build/features/brand/screens/Verify/index.js +2 -0
- package/build/features/brand/screens/Verify/validation.d.ts +8 -0
- package/build/features/brand/screens/Verify/validation.js +4 -0
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +90 -0
- package/build/features/entity/screens/EntityCapital/ActivityList.js +178 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +47 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +42 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +47 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +75 -0
- package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
- package/build/features/entity/screens/EntityCapital/index.js +2 -0
- package/build/features/entity/screens/EntityCapital/validation.d.ts +62 -0
- package/build/features/entity/screens/EntityCapital/validation.js +25 -0
- package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
- package/build/features/entity/screens/EntityName/EntityName.js +87 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +90 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.js +151 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +19 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +19 -0
- package/build/features/entity/screens/EntityName/IssuingDate.js +46 -0
- package/build/features/entity/screens/EntityName/LegalName.d.ts +5 -0
- package/build/features/entity/screens/EntityName/LegalName.js +48 -0
- package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.d.ts +0 -0
- package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.js +12 -18
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +6 -0
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +43 -0
- package/build/features/entity/screens/EntityName/index.d.ts +2 -0
- package/build/features/entity/screens/EntityName/index.js +2 -0
- package/build/features/entity/screens/EntityName/validation.d.ts +48 -0
- package/build/features/entity/screens/EntityName/validation.js +112 -0
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +35 -6
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
- package/build/features/shared/Address/Address.d.ts +11 -0
- package/build/features/shared/Address/Address.js +63 -0
- package/build/features/shared/Address/CountryList.d.ts +72 -0
- package/build/features/shared/Address/CountryList.js +89 -0
- package/build/features/{entity/screens/EntityInfoConfirm/ActivitiesList.d.ts → shared/Address/InputSelect.d.ts} +27 -11
- package/build/features/shared/Address/InputSelect.js +172 -0
- package/build/features/shared/Address/InputText.d.ts +11 -0
- package/build/features/shared/Address/InputText.js +12 -0
- package/build/features/shared/Address/index.d.ts +2 -0
- package/build/features/shared/Address/index.js +2 -0
- package/build/features/shared/Input/Input.d.ts +7 -5
- package/build/features/shared/Input/Input.js +2 -2
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -1
- package/package.json +1 -1
- package/build/api/ip.d.ts +0 -4
- package/build/api/ip.js +0 -12
- package/build/features/entity/screens/Customers/Customers.d.ts +0 -5
- package/build/features/entity/screens/Customers/Customers.js +0 -90
- package/build/features/entity/screens/Customers/index.d.ts +0 -3
- package/build/features/entity/screens/Customers/index.js +0 -2
- package/build/features/entity/screens/Customers/validation.d.ts +0 -20
- package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +0 -3
- package/build/features/entity/screens/EntityInfoConfirm/Article.js +0 -76
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -84
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -32
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -33
- package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -141
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -83
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
3
|
import { InputProps } from '../../../components/Input';
|
|
3
|
-
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<
|
|
4
|
+
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<Theme> & {
|
|
4
5
|
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
7
8
|
gutterBottom?: boolean | undefined;
|
|
8
9
|
noWrap?: boolean | undefined;
|
|
9
10
|
paragraph?: boolean | undefined;
|
|
10
|
-
sx?:
|
|
11
|
+
sx?: SxProps<Theme> | undefined;
|
|
11
12
|
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
12
13
|
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
13
14
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
14
15
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
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<
|
|
16
|
+
}, 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<Theme>, {}, {}>;
|
|
16
17
|
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" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
|
|
17
18
|
placeholder?: string | undefined;
|
|
18
19
|
hide?: boolean | undefined;
|
|
19
20
|
warningType?: "alert" | "error" | "hint" | undefined;
|
|
20
|
-
} & {} & import("@mui/system").MUIStyledCommonProps<
|
|
21
|
+
} & {} & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
21
22
|
interface CustomButtonProps extends InputProps {
|
|
22
23
|
label?: string;
|
|
23
24
|
required?: boolean;
|
|
25
|
+
labelSx?: SxProps<Theme>;
|
|
24
26
|
}
|
|
25
|
-
export default function CustomInput({ label, required, placeholder, ...props }: CustomButtonProps): JSX.Element;
|
|
27
|
+
export default function CustomInput({ label, required, placeholder, labelSx, ...props }: CustomButtonProps): JSX.Element;
|
|
26
28
|
export {};
|
|
@@ -51,6 +51,6 @@ var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
export default function CustomInput(_a) {
|
|
54
|
-
var label = _a.label, required = _a.required, placeholder = _a.placeholder, props = __rest(_a, ["label", "required", "placeholder"]);
|
|
55
|
-
return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsx(InputStyled, __assign({}, props, { placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.toString() }))] }));
|
|
54
|
+
var label = _a.label, required = _a.required, placeholder = _a.placeholder, labelSx = _a.labelSx, props = __rest(_a, ["label", "required", "placeholder", "labelSx"]);
|
|
55
|
+
return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, __assign({ sx: labelSx }, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] }))), _jsx(InputStyled, __assign({}, props, { placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.toString() }))] }));
|
|
56
56
|
}
|
|
@@ -16,7 +16,7 @@ import { styled } from '@mui/material/styles';
|
|
|
16
16
|
import { FlowsButtons } from '../../../shared/Button';
|
|
17
17
|
import { ICONS_NAMES, PASSWORD_OPERATION_TYPE } from '../../../../constants';
|
|
18
18
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
-
import { getResetFlowUrl, showLastFour, concatenateObjectValues, shortenString } from '../../../../utils';
|
|
19
|
+
import { getResetFlowUrl, showLastFour, concatenateObjectValues, shortenString, shortenBrand } from '../../../../utils';
|
|
20
20
|
import { taxSelector } from '../../../app/tax/taxStore';
|
|
21
21
|
import Box from '@mui/material/Box';
|
|
22
22
|
import Text from '../../../../components/Text';
|
|
@@ -80,6 +80,7 @@ var SuccessWithFlowButtons = function () {
|
|
|
80
80
|
var title = t("".concat(name, "_flow_").concat(type), {
|
|
81
81
|
individual_name: username.toLowerCase() + maskedId,
|
|
82
82
|
business_type: entityLegalName,
|
|
83
|
+
brand: brandName,
|
|
83
84
|
license_number: licenseNumber ? t('masking_symbols') + showLastFour(licenseNumber) : '',
|
|
84
85
|
bank_name: bankName,
|
|
85
86
|
iban: iban ? t('masking_symbols') + iban : '',
|
|
@@ -109,7 +110,8 @@ var SuccessWithFlowButtons = function () {
|
|
|
109
110
|
return (_jsxs(ContainerStyled, { children: [_jsxs(TitleStyled, { children: [t('account_details'), " "] }), _jsx(AcceptancePayouts, { showAcceptance: isAcceptance, showPayout: isPayout }), _jsx(ButtonGroupStyled, { children: _jsx(FlowsButtons, { buttons: buttons, data: {
|
|
110
111
|
flowName: data.flowName,
|
|
111
112
|
email: email,
|
|
112
|
-
emailUrl: url
|
|
113
|
+
emailUrl: url,
|
|
114
|
+
brandName: shortenBrand(brandName)
|
|
113
115
|
} }) })] }));
|
|
114
116
|
};
|
|
115
117
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -9,4 +9,5 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
|
9
9
|
signIn: import("../features/app/signIn/signInStore").SignInState;
|
|
10
10
|
entity: import("../features/app/entity/entityStore").EntityState;
|
|
11
11
|
auth: import("../features/app/auth/authStore").AuthState;
|
|
12
|
+
brand: import("../features/app/brand/brandStore").BrandState;
|
|
12
13
|
}, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
|
package/build/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { BankLib, renderBankLib, BankLibProps, unmountBankLib } from './features
|
|
|
8
8
|
import { TaxLib, renderTaxLib, TaxLibProps, unmountTaxLib } from './features/tax';
|
|
9
9
|
import { SignInLib, renderSignInLib, SignInLibProps, unmountSignInLib } from './features/signIn';
|
|
10
10
|
import { EntityLib, EntityLibProps, renderEntityLib, unmountEntityLib } from './features/entity';
|
|
11
|
+
import { BrandLib, BrandLibProps, renderBrandLib, unmountBrandLib } from './features/brand';
|
|
11
12
|
import { AuthLib, AuthLibProps, renderAuthLib, unmountAuthLib } from './features/auth';
|
|
12
|
-
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, AuthLibProps, SignInLibProps };
|
|
13
|
-
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, EntityLib, renderEntityLib, unmountEntityLib, SignInLib, renderSignInLib, unmountSignInLib, AuthLib, renderAuthLib, unmountAuthLib };
|
|
13
|
+
export type { ConnectLibProps, BusinessLibProps, PasswordLibProps, IndividualLibProps, BankLibProps, TaxLibProps, EntityLibProps, BrandLibProps, AuthLibProps, SignInLibProps };
|
|
14
|
+
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, EntityLib, renderEntityLib, unmountEntityLib, BrandLib, unmountBrandLib, renderBrandLib, SignInLib, renderSignInLib, unmountSignInLib, AuthLib, renderAuthLib, unmountAuthLib };
|
package/build/index.js
CHANGED
|
@@ -8,8 +8,9 @@ import { BankLib, renderBankLib, unmountBankLib } from './features/bank';
|
|
|
8
8
|
import { TaxLib, renderTaxLib, unmountTaxLib } from './features/tax';
|
|
9
9
|
import { SignInLib, renderSignInLib, unmountSignInLib } from './features/signIn';
|
|
10
10
|
import { EntityLib, renderEntityLib, unmountEntityLib } from './features/entity';
|
|
11
|
+
import { BrandLib, renderBrandLib, unmountBrandLib } from './features/brand';
|
|
11
12
|
import { AuthLib, renderAuthLib, unmountAuthLib } from './features/auth';
|
|
12
|
-
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, EntityLib, renderEntityLib, unmountEntityLib, SignInLib, renderSignInLib, unmountSignInLib, AuthLib, renderAuthLib, unmountAuthLib };
|
|
13
|
+
export { ConnectLib, renderConnectLib, unmountConnectLib, BusinessLib, renderBusinessLib, unmountBusinessLib, PasswordLib, renderPasswordLib, unmountPasswordLib, IndividualLib, renderIndividualLib, unmountIndividualLib, BankLib, renderBankLib, unmountBankLib, TaxLib, renderTaxLib, unmountTaxLib, EntityLib, renderEntityLib, unmountEntityLib, BrandLib, unmountBrandLib, renderBrandLib, SignInLib, renderSignInLib, unmountSignInLib, AuthLib, renderAuthLib, unmountAuthLib };
|
|
13
14
|
window['TapAuth'] = {
|
|
14
15
|
renderConnectLib: renderConnectLib,
|
|
15
16
|
unmountConnectLib: unmountConnectLib,
|
|
@@ -25,6 +26,8 @@ window['TapAuth'] = {
|
|
|
25
26
|
unmountTaxLib: unmountTaxLib,
|
|
26
27
|
renderEntityLib: renderEntityLib,
|
|
27
28
|
unmountEntityLib: unmountEntityLib,
|
|
29
|
+
renderBrandLib: renderBrandLib,
|
|
30
|
+
unmountBrandLib: unmountBrandLib,
|
|
28
31
|
renderSignInLib: renderSignInLib,
|
|
29
32
|
unmountSignInLib: unmountSignInLib,
|
|
30
33
|
renderAuthLib: renderAuthLib,
|
package/package.json
CHANGED
package/build/api/ip.d.ts
DELETED
package/build/api/ip.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import Box from '@mui/material/Box/Box';
|
|
25
|
-
import { styled } from '@mui/material/styles';
|
|
26
|
-
import * as React from 'react';
|
|
27
|
-
import { useTranslation } from 'react-i18next';
|
|
28
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
29
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
30
|
-
import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
31
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
32
|
-
import { CustomerInfoValidation } from './validation';
|
|
33
|
-
import Form from '../../../../components/Form';
|
|
34
|
-
import Button from '../../../shared/Button';
|
|
35
|
-
import { useLanguage } from '../../../../hooks';
|
|
36
|
-
import CustomerLocations from './CustomerLocations';
|
|
37
|
-
import ExpectedCustomers from './ExpectedCustomers';
|
|
38
|
-
import ExpectedSales from './ExpectedSalesRange';
|
|
39
|
-
import RefundPolicy from './RefundPolicy';
|
|
40
|
-
import TransactionPolicy from './TransactionPolicy';
|
|
41
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
42
|
-
import Collapse from '../../../../components/Collapse';
|
|
43
|
-
import { entitySelector, clearError, updateCustomersInfo } from '../../../app/entity/entityStore';
|
|
44
|
-
var FormStyled = styled(Form)(function () { return ({
|
|
45
|
-
display: 'flex',
|
|
46
|
-
flexDirection: 'column'
|
|
47
|
-
}); });
|
|
48
|
-
var ListType;
|
|
49
|
-
(function (ListType) {
|
|
50
|
-
ListType["CustomerLocationsList"] = "CustomerLocationsList";
|
|
51
|
-
ListType["ExpectedCustomersList"] = "ExpectedCustomersList";
|
|
52
|
-
ListType["ExpectedSalesList"] = "ExpectedSalesList";
|
|
53
|
-
})(ListType || (ListType = {}));
|
|
54
|
-
var Customers = function (_a) {
|
|
55
|
-
var _b = React.useState(), listActive = _b[0], setListActive = _b[1];
|
|
56
|
-
var dispatch = useAppDispatch();
|
|
57
|
-
var _c = useAppSelector(entitySelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
58
|
-
var defaultValues = __rest(data.customersData, []);
|
|
59
|
-
var methods = useForm({
|
|
60
|
-
resolver: yupResolver(CustomerInfoValidation),
|
|
61
|
-
defaultValues: defaultValues,
|
|
62
|
-
mode: 'onChange'
|
|
63
|
-
});
|
|
64
|
-
useSetFromDefaultValues(methods, defaultValues);
|
|
65
|
-
var onSubmit = function (data) {
|
|
66
|
-
dispatch(updateCustomersInfo(data));
|
|
67
|
-
};
|
|
68
|
-
var onBack = function () {
|
|
69
|
-
dispatch(handlePrevScreenStep());
|
|
70
|
-
};
|
|
71
|
-
var t = useTranslation().t;
|
|
72
|
-
var isAr = useLanguage().isAr;
|
|
73
|
-
var handleMenuClick = function (flag) {
|
|
74
|
-
setListActive(flag);
|
|
75
|
-
};
|
|
76
|
-
React.useEffect(function () {
|
|
77
|
-
if (error)
|
|
78
|
-
dispatch(clearError());
|
|
79
|
-
}, [methods.formState.isValid]);
|
|
80
|
-
var isCustomerLocationsListActive = listActive === ListType.CustomerLocationsList;
|
|
81
|
-
var isExpectedCustomersListActive = listActive === ListType.ExpectedCustomersList;
|
|
82
|
-
var isExpectedSalesListActive = listActive === ListType.ExpectedSalesList;
|
|
83
|
-
var whenNotSelectCustomersLocation = !isExpectedCustomersListActive && !isExpectedSalesListActive;
|
|
84
|
-
var whenNotSelectExpectedCustomers = !isCustomerLocationsListActive && !isExpectedSalesListActive;
|
|
85
|
-
var whenNotSelectExpectedSales = !isCustomerLocationsListActive && !isExpectedCustomersListActive;
|
|
86
|
-
var isAnyListSelected = !isExpectedCustomersListActive && !isCustomerLocationsListActive && !isExpectedSalesListActive;
|
|
87
|
-
var disabled = !methods.formState.isValid || !!error;
|
|
88
|
-
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') })) }))] }))] })) })) }));
|
|
89
|
-
};
|
|
90
|
-
export default React.memo(Customers);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export declare const CustomerInfoValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
-
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
4
|
-
expectedCustomers: any;
|
|
5
|
-
expectedSalesRange: any;
|
|
6
|
-
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
7
|
-
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
8
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
9
|
-
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
10
|
-
expectedCustomers: any;
|
|
11
|
-
expectedSalesRange: any;
|
|
12
|
-
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
13
|
-
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
14
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
|
-
customerLocations: import("yup/lib/array").RequiredArraySchema<yup.AnySchema<any, any, any>, import("yup/lib/types").AnyObject, any[] | undefined>;
|
|
16
|
-
expectedCustomers: any;
|
|
17
|
-
expectedSalesRange: any;
|
|
18
|
-
refundPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
19
|
-
transactionPolicy: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, true>;
|
|
20
|
-
}>>>;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { styled } from '@mui/material/styles';
|
|
4
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
5
|
-
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
7
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
8
|
-
import { entitySelector, uploadArticle } from '../../../app/entity/entityStore';
|
|
9
|
-
import UploadFile from '../../../shared/UploadFile';
|
|
10
|
-
import { MAX_FILE_SIZE, VALID_FILE_FORMATS } from '../../../../constants';
|
|
11
|
-
import { maskFileName } from '../../../../utils';
|
|
12
|
-
var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
13
|
-
var theme = _a.theme;
|
|
14
|
-
return ({
|
|
15
|
-
marginBlockStart: theme.spacing(3)
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
var Article = function () {
|
|
19
|
-
var _a, _b;
|
|
20
|
-
var _c = React.useState(0), progress = _c[0], setProgress = _c[1];
|
|
21
|
-
var t = useTranslation().t;
|
|
22
|
-
var _d = useFormContext(), control = _d.control, setError = _d.setError, clearErrors = _d.clearErrors, setValue = _d.setValue;
|
|
23
|
-
var articleFileControl = useController({ name: 'articleFile', control: control });
|
|
24
|
-
var articleIdControl = useController({ name: 'articleId', control: control });
|
|
25
|
-
var _e = useAppSelector(entitySelector), loading = _e.loading, uploading = _e.uploading, sysError = _e.error, data = _e.data;
|
|
26
|
-
var dispatch = useAppDispatch();
|
|
27
|
-
var articleValue = articleFileControl.field.value;
|
|
28
|
-
var error = ((_a = articleFileControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message) || ((_b = articleIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message);
|
|
29
|
-
var entityData = data.entityData;
|
|
30
|
-
var articleFile = entityData.articleFile, articleId = entityData.articleId;
|
|
31
|
-
React.useEffect(function () {
|
|
32
|
-
if (!articleValue) {
|
|
33
|
-
setValue('articleFile', articleFile);
|
|
34
|
-
setValue('articleId', articleId);
|
|
35
|
-
}
|
|
36
|
-
}, [articleFile, articleId]);
|
|
37
|
-
var handleArticleChange = function (files) {
|
|
38
|
-
var file = files === null || files === void 0 ? void 0 : files[0];
|
|
39
|
-
if (!file)
|
|
40
|
-
return;
|
|
41
|
-
if (!VALID_FILE_FORMATS.includes(file === null || file === void 0 ? void 0 : file.type)) {
|
|
42
|
-
setError('articleFile', { message: 'file_not_supported_alert' });
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if ((file === null || file === void 0 ? void 0 : file.size) > MAX_FILE_SIZE) {
|
|
46
|
-
setError('articleFile', { message: 'file_size_alert' });
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
articleFileControl.field.onChange(file);
|
|
50
|
-
dispatch(uploadArticle({
|
|
51
|
-
file: file,
|
|
52
|
-
onProgress: function (value) {
|
|
53
|
-
setProgress(value);
|
|
54
|
-
}
|
|
55
|
-
}));
|
|
56
|
-
};
|
|
57
|
-
var handleReset = function () {
|
|
58
|
-
articleFileControl.field.onChange(null);
|
|
59
|
-
articleIdControl.field.onChange('');
|
|
60
|
-
setProgress(0);
|
|
61
|
-
};
|
|
62
|
-
React.useEffect(function () {
|
|
63
|
-
if (sysError === 'file_upload_error') {
|
|
64
|
-
setError('articleId', { message: sysError });
|
|
65
|
-
articleFileControl.field.onChange(null);
|
|
66
|
-
setProgress(0);
|
|
67
|
-
}
|
|
68
|
-
}, [sysError]);
|
|
69
|
-
React.useEffect(function () {
|
|
70
|
-
if ((articleFileControl.formState.isValid || !!articleValue) && error != 'file_upload_error')
|
|
71
|
-
clearErrors();
|
|
72
|
-
}, [articleFileControl.formState.isValid, articleValue]);
|
|
73
|
-
var fileName = articleValue ? maskFileName(articleValue === null || articleValue === void 0 ? void 0 : articleValue.name) : '';
|
|
74
|
-
return (_jsx(FeatureStyled, { children: _jsx(UploadFile, { label: t('title_article'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('article_of_association'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleArticleChange, isFileUploaded: !uploading && !!articleValue, isSubmitting: loading, isUploading: uploading, progress: progress, onReset: handleReset, error: error && t(error), initialFileName: fileName }) }));
|
|
75
|
-
};
|
|
76
|
-
export default Article;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
-
import LicenseName from './LicenseName';
|
|
26
|
-
import * as React from 'react';
|
|
27
|
-
import LicenseNumber from './LicenseNumber';
|
|
28
|
-
import ActivitiesList from './ActivitiesList';
|
|
29
|
-
import { useAppDispatch, useAppSelector, useLanguage, useSetFromDefaultValues } from '../../../../hooks';
|
|
30
|
-
import { entitySelector, updateEntity } from '../../../app/entity/entityStore';
|
|
31
|
-
import { FormProvider, useForm } from 'react-hook-form';
|
|
32
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
33
|
-
import { BusinessType } from '../../../../@types';
|
|
34
|
-
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
35
|
-
import { styled } from '@mui/system';
|
|
36
|
-
import { EntityInfoValidationSchema, EntityInfoKWValidationSchema } from './validation';
|
|
37
|
-
import Form from '../../../../components/Form';
|
|
38
|
-
import Collapse from '../../../../components/Collapse';
|
|
39
|
-
import Button from '../../../shared/Button';
|
|
40
|
-
import { useTranslation } from 'react-i18next';
|
|
41
|
-
import OperationStartDate from './OperationStartDate';
|
|
42
|
-
import Article from './Article';
|
|
43
|
-
import { isKW } from '../../../../utils';
|
|
44
|
-
var FormStyled = styled(Form)(function () { return ({
|
|
45
|
-
display: 'flex',
|
|
46
|
-
flexDirection: 'column'
|
|
47
|
-
}); });
|
|
48
|
-
var EntityInfo = function (_a) {
|
|
49
|
-
var _b = React.useState(false), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
50
|
-
var _c = React.useState(false), collapse = _c[0], setCollapse = _c[1];
|
|
51
|
-
var _d = useAppSelector(entitySelector), data = _d.data, loading = _d.loading, error = _d.error, uploading = _d.uploading;
|
|
52
|
-
var settingsData = useAppSelector(settingsSelector).data;
|
|
53
|
-
var isAr = useLanguage().isAr;
|
|
54
|
-
var t = useTranslation().t;
|
|
55
|
-
var dispatch = useAppDispatch();
|
|
56
|
-
var defaultValues = __rest(data.entityData, []);
|
|
57
|
-
var country_code = settingsData.businessCountry.iso2;
|
|
58
|
-
var licenseType = defaultValues.licenseType;
|
|
59
|
-
var isKWCountry = React.useMemo(function () { return isKW(country_code); }, [country_code]);
|
|
60
|
-
var isCR = React.useMemo(function () { return licenseType === BusinessType.CR; }, [licenseType]);
|
|
61
|
-
var methods = useForm({
|
|
62
|
-
resolver: yupResolver(isKWCountry ? EntityInfoKWValidationSchema : EntityInfoValidationSchema),
|
|
63
|
-
defaultValues: defaultValues,
|
|
64
|
-
mode: 'onChange'
|
|
65
|
-
});
|
|
66
|
-
useSetFromDefaultValues(methods, defaultValues);
|
|
67
|
-
var onSubmit = function (data) {
|
|
68
|
-
dispatch(updateEntity(__assign({}, data)));
|
|
69
|
-
};
|
|
70
|
-
var handleCollapseOpenClose = function (flag) {
|
|
71
|
-
setCollapse(flag);
|
|
72
|
-
};
|
|
73
|
-
var onBack = function () {
|
|
74
|
-
dispatch(handlePrevScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
75
|
-
};
|
|
76
|
-
var handleMenuClick = function () {
|
|
77
|
-
anchorEl ? setAnchorEl(false) : setAnchorEl(true);
|
|
78
|
-
};
|
|
79
|
-
var disabled = !methods.formState.isValid || !!error || uploading;
|
|
80
|
-
var showLicenseNumber = isKWCountry ? isCR : true;
|
|
81
|
-
var showCertificate = isCR;
|
|
82
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !collapse && !anchorEl }, { children: [_jsx(LicenseName, {}), _jsx(LicenseNumber, { show: showLicenseNumber })] })), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl && showCertificate }, { children: _jsx(Article, {}) })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
|
|
83
|
-
};
|
|
84
|
-
export default EntityInfo;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
5
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
6
|
-
import Input from '../../../shared/Input';
|
|
7
|
-
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
8
|
-
import { removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
9
|
-
import { entitySelector } from '../../../app/entity/entityStore';
|
|
10
|
-
var LicenseName = function (_a) {
|
|
11
|
-
var _b, _c;
|
|
12
|
-
var t = useTranslation().t;
|
|
13
|
-
var isAr = useLanguage();
|
|
14
|
-
var _d = useFormContext(), control = _d.control, setValue = _d.setValue;
|
|
15
|
-
var data = useAppSelector(entitySelector).data;
|
|
16
|
-
var verify = data.verify;
|
|
17
|
-
var legalName = (_c = (_b = verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.legal_name;
|
|
18
|
-
var name = isAr ? legalName === null || legalName === void 0 ? void 0 : legalName.ar : legalName === null || legalName === void 0 ? void 0 : legalName.en;
|
|
19
|
-
var licenseNameControl = useController({ control: control, name: 'licenseName' });
|
|
20
|
-
var licenseNameValue = licenseNameControl.field.value;
|
|
21
|
-
React.useEffect(function () {
|
|
22
|
-
if (name && !licenseNameValue)
|
|
23
|
-
setValue('licenseName', name, { shouldValidate: true });
|
|
24
|
-
}, [name]);
|
|
25
|
-
var handleChange = function (_a) {
|
|
26
|
-
var target = _a.target;
|
|
27
|
-
var value = removeAllOtherThanCharsNumbersAndSpace(target.value);
|
|
28
|
-
licenseNameControl.field.onChange(value);
|
|
29
|
-
};
|
|
30
|
-
return (_jsx(ScreenContainer, { children: _jsx(Input, { onChange: handleChange, value: licenseNameValue, label: t('license_name_label'), placeholder: t('license_name_label'), sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) }));
|
|
31
|
-
};
|
|
32
|
-
export default React.memo(LicenseName);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
5
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
6
|
-
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
7
|
-
import { entitySelector, clearError } from '../../../app/entity/entityStore';
|
|
8
|
-
import DatePicker from '../../../../components/DatePicker';
|
|
9
|
-
import { InputLabelStyled } from './ActivitiesList';
|
|
10
|
-
var OperationStartDate = function (_a) {
|
|
11
|
-
var _b;
|
|
12
|
-
var onDateClicked = _a.onDateClicked;
|
|
13
|
-
var t = useTranslation().t;
|
|
14
|
-
var dispatch = useAppDispatch();
|
|
15
|
-
var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
|
|
16
|
-
var _d = useAppSelector(entitySelector), data = _d.data, error = _d.error;
|
|
17
|
-
var operationStartDate = (data.entityData.responseBody || {}).operationStartDate;
|
|
18
|
-
var oDateControl = useController({ control: control, name: 'operationStartDate' });
|
|
19
|
-
var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
20
|
-
React.useEffect(function () {
|
|
21
|
-
if (!dateValue) {
|
|
22
|
-
var date = operationStartDate || new Date().toString();
|
|
23
|
-
setValue('operationStartDate', date, { shouldValidate: true });
|
|
24
|
-
}
|
|
25
|
-
}, [operationStartDate]);
|
|
26
|
-
var handleOperationStartDateChange = function (data) {
|
|
27
|
-
if (error)
|
|
28
|
-
dispatch(clearError());
|
|
29
|
-
oDateControl.field.onChange(data);
|
|
30
|
-
};
|
|
31
|
-
return (_jsx(ScreenContainer, { children: _jsxs(_Fragment, { children: [_jsx(InputLabelStyled, { children: t('business_start_date') }), _jsx(DatePicker, { readOnly: true, defaultValue: dateValue ? new Date(dateValue) : new Date(), dir: 'ltr', locale: 'en', onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); }, onDateChange: handleOperationStartDateChange })] }) }));
|
|
32
|
-
};
|
|
33
|
-
export default OperationStartDate;
|