@tap-payments/auth-jsconnect 2.4.32-test → 2.4.34-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/components/AnimationFlow/BottomSheet.js +14 -3
- package/build/features/app/business/businessStore.d.ts +4 -0
- package/build/features/app/business/businessStore.js +160 -139
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +11 -45
- package/build/features/business/screens/Activities/ActivitiesList.js +217 -88
- package/build/features/business/screens/Activities/validation.d.ts +165 -30
- package/build/features/business/screens/Activities/validation.js +5 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +36 -0
- package/build/features/business/screens/Customers/CustomerLocations.js +29 -2
- package/build/features/entity/screens/EntityCapital/ActivityList.js +4 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
3
|
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
@@ -11,44 +11,11 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
|
|
|
11
11
|
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
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
|
-
}, 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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
20
|
-
htmlColor?: string | undefined;
|
|
21
|
-
inheritViewBox?: boolean | undefined;
|
|
22
|
-
shapeRendering?: string | undefined;
|
|
23
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
24
|
-
titleAccess?: string | undefined;
|
|
25
|
-
viewBox?: string | undefined;
|
|
26
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "children" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "origin" | "method" | "operator" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
27
|
-
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
28
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
29
|
-
export declare const InfoIconStyled: import("@emotion/styled").StyledComponent<{
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
32
|
-
color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
|
|
33
|
-
fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
|
|
34
|
-
htmlColor?: string | undefined;
|
|
35
|
-
inheritViewBox?: boolean | undefined;
|
|
36
|
-
shapeRendering?: string | undefined;
|
|
37
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
38
|
-
titleAccess?: string | undefined;
|
|
39
|
-
viewBox?: string | undefined;
|
|
40
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.SVGProps<SVGSVGElement>, "string" | "name" | "type" | "version" | "className" | "style" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "clipPath" | "cursor" | "direction" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "path" | "children" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "values" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "origin" | "method" | "operator" | "spacing" | "elevation" | "in" | "max" | "href" | "orientation" | "media" | "target" | "min" | "viewBox" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "orient" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
41
|
-
ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
|
|
42
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
43
|
-
export declare const LabelContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
44
|
-
children?: React.ReactNode;
|
|
45
|
-
component?: React.ElementType<any> | undefined;
|
|
46
|
-
ref?: React.Ref<unknown> | undefined;
|
|
47
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
48
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
49
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
50
|
-
}, 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" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
51
|
-
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
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
|
+
isSelected?: boolean | undefined;
|
|
16
|
+
isAr?: boolean | undefined;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
52
19
|
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
53
20
|
children?: React.ReactNode;
|
|
54
21
|
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
@@ -60,12 +27,11 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
|
|
|
60
27
|
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
61
28
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
62
29
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
63
|
-
}, 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
|
|
64
|
-
|
|
65
|
-
}, {}, {}>;
|
|
66
|
-
export interface ActivitiesListProps {
|
|
30
|
+
}, 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>, {}, {}>;
|
|
31
|
+
interface ActivityListProps {
|
|
67
32
|
onListOpen?: () => void;
|
|
68
33
|
onListClose?: () => void;
|
|
34
|
+
readOnly?: boolean;
|
|
69
35
|
}
|
|
70
|
-
declare const
|
|
71
|
-
export default
|
|
36
|
+
declare const ActivityList: ({ onListClose, onListOpen, readOnly }: ActivityListProps) => JSX.Element;
|
|
37
|
+
export default ActivityList;
|
|
@@ -9,17 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
12
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
24
13
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
25
14
|
if (ar || !(i in from)) {
|
|
@@ -29,31 +18,23 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
29
18
|
}
|
|
30
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
20
|
};
|
|
32
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
22
|
import * as React from 'react';
|
|
34
|
-
import { useTranslation } from 'react-i18next';
|
|
35
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
36
23
|
import Box from '@mui/material/Box';
|
|
37
24
|
import { alpha, styled } from '@mui/material/styles';
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import { sortActivitiesByName } from '../../../../utils';
|
|
41
|
-
import Text from '../../../../components/Text';
|
|
42
|
-
import Input from '../../../shared/Input';
|
|
43
|
-
import Tooltip from '../../../../components/Tooltip';
|
|
25
|
+
import { useTranslation } from 'react-i18next';
|
|
26
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
44
27
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
45
|
-
import { BusinessType } from '../../../../@types';
|
|
46
|
-
import Collapse from '../../../../components/Collapse';
|
|
47
28
|
import SimpleList from '../../../../components/SimpleList';
|
|
29
|
+
import Collapse from '../../../../components/Collapse';
|
|
48
30
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
31
|
+
import Text from '../../../../components/Text';
|
|
32
|
+
import { isExist, groupSectionWithSelectedActivitiesAtBeginning, hasVerifiedValue, filterActivitiesByName } from '../../../../utils';
|
|
49
33
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
34
|
+
import Search from '../../../shared/Search';
|
|
35
|
+
import Input from '../../../shared/Input';
|
|
50
36
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
51
37
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
52
|
-
import { MandatoryStyled } from './OperationStartDate';
|
|
53
|
-
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
54
|
-
var theme = _a.theme;
|
|
55
|
-
return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
56
|
-
});
|
|
57
38
|
var InputStyled = styled(Input)(function (_a) {
|
|
58
39
|
var theme = _a.theme, readOnly = _a.readOnly;
|
|
59
40
|
return ({
|
|
@@ -63,99 +44,247 @@ var InputStyled = styled(Input)(function (_a) {
|
|
|
63
44
|
}
|
|
64
45
|
});
|
|
65
46
|
});
|
|
66
|
-
|
|
67
|
-
var
|
|
47
|
+
var SelectedInputStyled = styled(InputStyled, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
|
|
48
|
+
var anchorEl = _a.anchorEl;
|
|
68
49
|
return ({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
'&.MuiInputBase-root': {
|
|
51
|
+
'&.MuiInput-root': __assign({ borderTop: 'none' }, (!anchorEl && {
|
|
52
|
+
borderBottom: 'none'
|
|
53
|
+
}))
|
|
54
|
+
}
|
|
73
55
|
});
|
|
74
56
|
});
|
|
75
|
-
export var
|
|
57
|
+
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return !['isSelected', 'isAr'].includes(prop.toString()); } })(function (_a) {
|
|
58
|
+
var theme = _a.theme, isSelected = _a.isSelected, isAr = _a.isAr;
|
|
59
|
+
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { textAlign: isAr ? 'right' : 'left', fontWeight: isSelected ? theme.typography.fontWeightRegular : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
60
|
+
});
|
|
61
|
+
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
76
62
|
var theme = _a.theme;
|
|
77
|
-
return ({
|
|
78
|
-
width: theme.spacing(2.75),
|
|
79
|
-
height: theme.spacing(2.125),
|
|
80
|
-
cursor: 'pointer',
|
|
81
|
-
color: alpha(theme.palette.text.primary, 0.4)
|
|
82
|
-
});
|
|
63
|
+
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
83
64
|
});
|
|
84
|
-
|
|
65
|
+
var ListItem = styled(Box)(function (_a) {
|
|
85
66
|
var theme = _a.theme;
|
|
86
67
|
return ({
|
|
87
68
|
display: 'flex',
|
|
88
69
|
justifyContent: 'space-between',
|
|
89
|
-
|
|
70
|
+
width: '100%',
|
|
71
|
+
paddingInlineStart: theme.spacing(2.5),
|
|
72
|
+
paddingInlineEnd: theme.spacing(2.5),
|
|
73
|
+
paddingTop: theme.spacing(1.5),
|
|
74
|
+
paddingBottom: theme.spacing(1.5)
|
|
90
75
|
});
|
|
91
76
|
});
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
});
|
|
97
|
-
var
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
77
|
+
var ListItemContainer = styled(Box)(function () { return ({
|
|
78
|
+
display: 'flex',
|
|
79
|
+
flexDirection: 'column',
|
|
80
|
+
width: '100%'
|
|
81
|
+
}); });
|
|
82
|
+
var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
83
|
+
height: 'fit-content'
|
|
84
|
+
}); });
|
|
85
|
+
var DivisionListStyled = styled((SimpleList))(function () { return ({
|
|
86
|
+
height: 'fit-content'
|
|
87
|
+
}); });
|
|
88
|
+
var ActivityListStyled = styled((SimpleList))(function () { return ({
|
|
89
|
+
height: 'fit-content'
|
|
90
|
+
}); });
|
|
91
|
+
var ActivityList = function (_a) {
|
|
92
|
+
var onListClose = _a.onListClose, onListOpen = _a.onListOpen, readOnly = _a.readOnly;
|
|
93
|
+
var _b = React.useState([]), activities = _b[0], setActivities = _b[1];
|
|
94
|
+
var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
|
|
95
|
+
var _d = React.useState(null), activityAnchorEl = _d[0], setActivityAnchorEl = _d[1];
|
|
96
|
+
var _e = React.useState(''), subIndex = _e[0], setSubIndex = _e[1];
|
|
97
|
+
var _f = React.useState(''), subItemIndex = _f[0], setSubItemIndex = _f[1];
|
|
102
98
|
var t = useTranslation().t;
|
|
103
99
|
var isAr = useLanguage().isAr;
|
|
104
100
|
var control = useFormContext().control;
|
|
105
|
-
var data = useAppSelector(businessSelector).data;
|
|
106
101
|
var activitiesControl = useController({ name: 'activities', control: control });
|
|
102
|
+
var data = useAppSelector(businessSelector).data;
|
|
103
|
+
var entity = (data.verify.responseBody || {}).entity;
|
|
104
|
+
var activityList = (data.businessTypeData.responseBody || {}).activityList;
|
|
107
105
|
var controlValue = activitiesControl.field.value;
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
var activities = (businessTypeData.responseBody || {}).activities;
|
|
111
|
-
var businessType = (_b = businessTypeData.selectedLicense) === null || _b === void 0 ? void 0 : _b.type;
|
|
112
|
-
var isCR = businessType === BusinessType.CR;
|
|
113
|
-
var setSelectedActivitiesBeginning = function (list) {
|
|
114
|
-
var mapSelectedListFirst = __spreadArray(__spreadArray([], list.filter(function (a) { return (controlValue || []).some(function (c) { return a.id === c.id; }); }), true), list.filter(function (a) { return !(controlValue || []).some(function (c) { return a.id === c.id; }); }), true);
|
|
115
|
-
setActivitiesMenuList(mapSelectedListFirst);
|
|
106
|
+
var handleOpenActivityMenu = function (event) {
|
|
107
|
+
setActivityAnchorEl(event.currentTarget);
|
|
116
108
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
var
|
|
121
|
-
|
|
109
|
+
var handleCloseActivityMenu = function () {
|
|
110
|
+
var isSearchActive = !(activityList === null || activityList === void 0 ? void 0 : activityList.find(function (s) { var _a; return (_a = s.divisions) === null || _a === void 0 ? void 0 : _a.length; }));
|
|
111
|
+
if (isSearchActive) {
|
|
112
|
+
var list = groupSectionWithSelectedActivitiesAtBeginning(activityList, controlValue);
|
|
113
|
+
if ((list === null || list === void 0 ? void 0 : list.length) > 0) {
|
|
114
|
+
setActivities(list);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
setActivityAnchorEl(null);
|
|
118
|
+
};
|
|
119
|
+
var handleOpenMainMenu = function (event) {
|
|
120
|
+
if (readOnly)
|
|
121
|
+
return;
|
|
122
|
+
var list = groupSectionWithSelectedActivitiesAtBeginning(activityList, controlValue);
|
|
123
|
+
if ((list === null || list === void 0 ? void 0 : list.length) > 0) {
|
|
124
|
+
setActivities(list);
|
|
122
125
|
}
|
|
123
|
-
}, [activities]);
|
|
124
|
-
var onOpenList = function (event) {
|
|
125
|
-
var _a;
|
|
126
126
|
setAnchorEl(event.currentTarget);
|
|
127
|
-
|
|
128
|
-
(_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
127
|
+
onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
|
|
129
128
|
};
|
|
130
|
-
var
|
|
131
|
-
var _a;
|
|
129
|
+
var handleCloseMainMenu = function () {
|
|
132
130
|
setAnchorEl(null);
|
|
133
|
-
|
|
131
|
+
onListClose === null || onListClose === void 0 ? void 0 : onListClose();
|
|
132
|
+
handleCloseSubMenu();
|
|
133
|
+
handleCloseSubItem();
|
|
134
|
+
if ((activityList === null || activityList === void 0 ? void 0 : activityList.length) > 0) {
|
|
135
|
+
setActivities(activityList);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var isActivityVerified = function (item) {
|
|
139
|
+
return hasVerifiedValue(entity === null || entity === void 0 ? void 0 : entity.data_verification, "activities.".concat(item.id));
|
|
140
|
+
};
|
|
141
|
+
var handleOpenSubMenu = function (index) {
|
|
142
|
+
if (subIndex === index)
|
|
143
|
+
setSubIndex('');
|
|
144
|
+
else
|
|
145
|
+
setSubIndex(index);
|
|
146
|
+
};
|
|
147
|
+
var handleCloseSubMenu = function () {
|
|
148
|
+
setSubIndex('');
|
|
134
149
|
};
|
|
135
|
-
var
|
|
136
|
-
|
|
150
|
+
var handleOpenSubItem = function (index) {
|
|
151
|
+
if (subItemIndex === index)
|
|
152
|
+
setSubItemIndex('');
|
|
153
|
+
else
|
|
154
|
+
setSubItemIndex(index);
|
|
155
|
+
};
|
|
156
|
+
var handleCloseSubItem = function () {
|
|
157
|
+
setSubItemIndex('');
|
|
158
|
+
};
|
|
159
|
+
React.useEffect(function () {
|
|
160
|
+
if ((activityList === null || activityList === void 0 ? void 0 : activityList.length) > 0) {
|
|
161
|
+
setActivities(activityList);
|
|
162
|
+
}
|
|
163
|
+
}, [activityList]);
|
|
164
|
+
var onSelectItem = function (activity) {
|
|
165
|
+
var isActivityExists = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (ac) { return ac.id === activity.id; });
|
|
137
166
|
if (isActivityExists) {
|
|
138
|
-
var updatedIdList = controlValue === null || controlValue === void 0 ? void 0 : controlValue.filter(function (
|
|
167
|
+
var updatedIdList = controlValue === null || controlValue === void 0 ? void 0 : controlValue.filter(function (ac) { return ac.id !== activity.id; });
|
|
168
|
+
if (!updatedIdList.length) {
|
|
169
|
+
activitiesControl.field.onChange([]);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
139
172
|
if (updatedIdList.length >= 1)
|
|
140
173
|
activitiesControl.field.onChange(updatedIdList);
|
|
141
174
|
return;
|
|
142
175
|
}
|
|
143
|
-
|
|
176
|
+
var activities = controlValue ? __spreadArray(__spreadArray([], controlValue, true), [activity], false) : [activity];
|
|
177
|
+
activitiesControl.field.onChange(activities);
|
|
144
178
|
};
|
|
145
179
|
var getSelectedActivities = function () {
|
|
146
|
-
var _a, _b;
|
|
180
|
+
var _a, _b, _c;
|
|
147
181
|
if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) > 1) {
|
|
148
182
|
return (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) + ' ' + t('activities_selected');
|
|
149
183
|
}
|
|
150
|
-
var item = controlValue[0];
|
|
151
|
-
|
|
184
|
+
var item = (controlValue || [])[0];
|
|
185
|
+
var code = item === null || item === void 0 ? void 0 : item.isic_code;
|
|
186
|
+
var name = isAr ? ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar) || ((_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en) : (_c = item === null || item === void 0 ? void 0 : item.name) === null || _c === void 0 ? void 0 : _c.en;
|
|
187
|
+
return code ? "".concat(code, " - ").concat(name) : name;
|
|
188
|
+
};
|
|
189
|
+
var getSelectedActivityName = function (item) {
|
|
190
|
+
var _a, _b, _c;
|
|
191
|
+
var code = item === null || item === void 0 ? void 0 : item.isic_code;
|
|
192
|
+
var name = isAr ? ((_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar) || ((_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en) : (_c = item === null || item === void 0 ? void 0 : item.name) === null || _c === void 0 ? void 0 : _c.en;
|
|
193
|
+
return code ? "".concat(code, " - ").concat(name) : name;
|
|
194
|
+
};
|
|
195
|
+
var getSelectedActivitySectionFlag = function (section) {
|
|
196
|
+
var findSection = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (_a) {
|
|
197
|
+
var id = _a.id;
|
|
198
|
+
return id === section.id;
|
|
199
|
+
});
|
|
200
|
+
var findDivision = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (_a) {
|
|
201
|
+
var _b;
|
|
202
|
+
var id = _a.id;
|
|
203
|
+
return (_b = section.divisions) === null || _b === void 0 ? void 0 : _b.find(function (division) { return division.id === id; });
|
|
204
|
+
});
|
|
205
|
+
var findActivity = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (_a) {
|
|
206
|
+
var _b;
|
|
207
|
+
var id = _a.id;
|
|
208
|
+
return (_b = section.divisions) === null || _b === void 0 ? void 0 : _b.find(function (division) { var _a; return (_a = division === null || division === void 0 ? void 0 : division.activities) === null || _a === void 0 ? void 0 : _a.find(function (activity) { return activity.id === id; }); });
|
|
209
|
+
});
|
|
210
|
+
if (findSection || findDivision || findActivity)
|
|
211
|
+
return section.id;
|
|
212
|
+
return '';
|
|
152
213
|
};
|
|
153
|
-
var
|
|
154
|
-
|
|
214
|
+
var getSelectedActivityDivisionFlag = function (division) {
|
|
215
|
+
var findDivision = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (_a) {
|
|
216
|
+
var id = _a.id;
|
|
217
|
+
return division.id === id;
|
|
218
|
+
});
|
|
219
|
+
var findActivity = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (_a) {
|
|
220
|
+
var _b;
|
|
221
|
+
var id = _a.id;
|
|
222
|
+
return (_b = division.activities) === null || _b === void 0 ? void 0 : _b.find(function (activity) { return activity.id === id; });
|
|
223
|
+
});
|
|
224
|
+
if (findDivision || findActivity)
|
|
225
|
+
return division.id;
|
|
226
|
+
return '';
|
|
155
227
|
};
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
228
|
+
var getSelectedActivityFlag = function (activity) {
|
|
229
|
+
var findActivity = controlValue === null || controlValue === void 0 ? void 0 : controlValue.find(function (_a) {
|
|
230
|
+
var id = _a.id;
|
|
231
|
+
return id === activity.id;
|
|
232
|
+
});
|
|
233
|
+
if (findActivity)
|
|
234
|
+
return activity.id;
|
|
235
|
+
return '';
|
|
236
|
+
};
|
|
237
|
+
var handleSearch = function (value) {
|
|
238
|
+
if (!value) {
|
|
239
|
+
var list = groupSectionWithSelectedActivitiesAtBeginning(activityList, controlValue);
|
|
240
|
+
if ((list === null || list === void 0 ? void 0 : list.length) > 0) {
|
|
241
|
+
setActivities(list);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
setActivities(activityList);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
var filteredList = filterActivitiesByName(activityList, value);
|
|
248
|
+
setActivities(filteredList);
|
|
249
|
+
};
|
|
250
|
+
React.useEffect(function () {
|
|
251
|
+
var item = isExist(activityList || [], controlValue === null || controlValue === void 0 ? void 0 : controlValue.id);
|
|
252
|
+
if (item)
|
|
253
|
+
setSubIndex(item.id);
|
|
254
|
+
}, [anchorEl, controlValue]);
|
|
255
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('activities') }), _jsx(InputStyled, { readOnly: readOnly, value: getSelectedActivities() || '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_activities'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsxs(Collapse, __assign({ in: !!(controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) }, { children: [_jsx(SelectedInputStyled, { readOnly: readOnly, anchorEl: activityAnchorEl, value: t('selected_activities'), onClick: !!activityAnchorEl ? handleCloseActivityMenu : handleOpenActivityMenu, placeholder: t('choose_activities'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!activityAnchorEl }) }), _jsx(Collapse, __assign({ in: !!activityAnchorEl }, { children: _jsx(ActivityListStyled, { sx: { pt: 0, pb: 0 }, list: controlValue || [], onSelectItem: function (activity, e) {
|
|
256
|
+
e.stopPropagation();
|
|
257
|
+
onSelectItem(activity);
|
|
258
|
+
}, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (activity, idx) {
|
|
259
|
+
return (_jsxs(ListItem, __assign({ sx: { mt: idx === 0 ? 1 : 0 } }, { children: [_jsx(NameContainer, __assign({ isAr: isAr, isSelected: activity.id === getSelectedActivityFlag(activity) }, { children: getSelectedActivityName(activity) })), activity.id === getSelectedActivityFlag(activity) && _jsx(CheckIcon, { isVerified: isActivityVerified(activity) })] })));
|
|
260
|
+
} }) }))] })), _jsx(Search, { onSearchValue: handleSearch, placeholder: 'search_activities_placeholder' }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: activities, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (section) {
|
|
261
|
+
var isDivisionNotAvailable = !section.divisions || section.divisions.length === 0;
|
|
262
|
+
if (isDivisionNotAvailable)
|
|
263
|
+
onSelectItem(section);
|
|
264
|
+
else
|
|
265
|
+
handleOpenSubMenu(section.id);
|
|
266
|
+
}, renderItem: function (section) {
|
|
267
|
+
var _a;
|
|
268
|
+
var isDivisionNotAvailable = !section.divisions || ((_a = section.divisions) === null || _a === void 0 ? void 0 : _a.length) === 0;
|
|
269
|
+
var showCheck = section.id === getSelectedActivitySectionFlag(section) && isDivisionNotAvailable;
|
|
270
|
+
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 20%)', borderBottom: '1px solid rgba(227, 232, 238, 1)' }, (isDivisionNotAvailable && { bgcolor: 'inherit', borderBottom: 'none' })) }, { children: [_jsx(NameContainer, __assign({ isAr: isAr, isSelected: section.id === getSelectedActivitySectionFlag(section), sx: __assign({}, (isDivisionNotAvailable && { paddingInlineStart: '5px' })) }, { children: getSelectedActivityName(section) })), showCheck ? (_jsx(CheckIcon, { isVerified: isActivityVerified(section) })) : (!isDivisionNotAvailable && _jsx(ExpandIcon, { anchorEl: subIndex === section.id }))] })), _jsx(Collapse, __assign({ in: section.id === subIndex && !isDivisionNotAvailable }, { children: _jsx(DivisionListStyled, { sx: { pt: 0, pb: 0 }, list: (!isDivisionNotAvailable && section.divisions) || [], onSelectItem: function (division, e) {
|
|
271
|
+
e.stopPropagation();
|
|
272
|
+
var isOnlyOneItem = !division.activities || division.activities.length <= 1;
|
|
273
|
+
if (isOnlyOneItem)
|
|
274
|
+
onSelectItem(division);
|
|
275
|
+
else
|
|
276
|
+
handleOpenSubItem(division.id);
|
|
277
|
+
}, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (division, idx) {
|
|
278
|
+
var _a;
|
|
279
|
+
var isOnlyOneItem = !division.activities || ((_a = division.activities) === null || _a === void 0 ? void 0 : _a.length) <= 1;
|
|
280
|
+
var showCheck = division.id === getSelectedActivityDivisionFlag(division) && isOnlyOneItem;
|
|
281
|
+
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 6%)', borderBottom: '1px solid rgba(227, 232, 238, 0.6)' }, (isOnlyOneItem && { bgcolor: 'inherit', borderBottom: 'none' })) }, { children: [_jsx(NameContainer, __assign({ isAr: isAr, isSelected: division.id === getSelectedActivityDivisionFlag(division), sx: __assign({}, (isOnlyOneItem && { paddingInlineStart: '5px' })) }, { children: getSelectedActivityName(division) })), showCheck ? (_jsx(CheckIcon, { isVerified: isActivityVerified(division) })) : (!isOnlyOneItem && _jsx(ExpandIcon, { anchorEl: subItemIndex === division.id }))] })), _jsx(Collapse, __assign({ in: division.id === subItemIndex && !isOnlyOneItem }, { children: _jsx(ActivityListStyled, { sx: { pt: 0, pb: 0 }, list: (!isOnlyOneItem && division.activities) || [], onSelectItem: function (activity, e) {
|
|
282
|
+
e.stopPropagation();
|
|
283
|
+
onSelectItem(activity);
|
|
284
|
+
}, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (activity, idx) {
|
|
285
|
+
return (_jsxs(ListItem, __assign({ sx: { mt: idx === 0 ? 1 : 0 } }, { children: [_jsx(NameContainer, __assign({ isAr: isAr, isSelected: activity.id === getSelectedActivityFlag(activity) }, { children: getSelectedActivityName(activity) })), activity.id === getSelectedActivityFlag(activity) && _jsx(CheckIcon, { isVerified: isActivityVerified(activity) })] })));
|
|
286
|
+
} }) }))] }, idx));
|
|
287
|
+
} }) }))] }));
|
|
288
|
+
} })] }))] }));
|
|
160
289
|
};
|
|
161
|
-
export default
|
|
290
|
+
export default ActivityList;
|