@tap-payments/auth-jsconnect 2.4.0-test → 2.4.5-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.
Files changed (62) hide show
  1. package/build/@types/app.d.ts +27 -1
  2. package/build/api/individual.d.ts +2 -2
  3. package/build/features/app/brand/brandStore.js +10 -9
  4. package/build/features/app/business/businessStore.js +11 -3
  5. package/build/features/app/connect/connectStore.js +1 -0
  6. package/build/features/app/entity/entityStore.js +3 -3
  7. package/build/features/app/individual/individualStore.js +2 -2
  8. package/build/features/bank/screens/BankDetails/BankDetails.js +3 -2
  9. package/build/features/bank/screens/BankDetails/BankName.d.ts +2 -1
  10. package/build/features/bank/screens/BankDetails/BankName.js +4 -5
  11. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +2 -1
  12. package/build/features/bank/screens/BankDetails/BankStatement.js +4 -4
  13. package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +2 -1
  14. package/build/features/bank/screens/BankDetails/Beneficiary.js +8 -10
  15. package/build/features/bank/screens/BankDetails/IBAN.d.ts +2 -1
  16. package/build/features/bank/screens/BankDetails/IBAN.js +3 -5
  17. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +0 -14
  18. package/build/features/brand/screens/BrandActivities/ActivitiesList.js +6 -11
  19. package/build/features/brand/screens/BrandActivities/BrandActivities.js +13 -7
  20. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +4 -27
  21. package/build/features/brand/screens/BrandActivities/CustomerBase.js +9 -18
  22. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
  23. package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +6 -5
  24. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +2 -1
  25. package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +15 -14
  26. package/build/features/brand/screens/BrandInfo/BrandInfo.js +5 -4
  27. package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +2 -1
  28. package/build/features/brand/screens/BrandInfo/BrandLogo.js +2 -2
  29. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +2 -1
  30. package/build/features/brand/screens/BrandInfo/BrandName.js +3 -5
  31. package/build/features/brand/screens/BrandInfo/SalesChannels.js +6 -3
  32. package/build/features/brand/screens/BrandInfo/Segments.d.ts +2 -1
  33. package/build/features/brand/screens/BrandInfo/Segments.js +17 -24
  34. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +2 -1
  35. package/build/features/brand/screens/BrandInfo/TeamSize.js +18 -25
  36. package/build/features/business/screens/Customers/Customers.js +27 -16
  37. package/build/features/entity/screens/EntityName/EntityTypeList.js +1 -1
  38. package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
  39. package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
  40. package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
  41. package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
  42. package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
  43. package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
  44. package/build/features/shared/EndAdornment/index.d.ts +3 -0
  45. package/build/features/shared/EndAdornment/index.js +3 -0
  46. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +2 -1
  47. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +4 -3
  48. package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
  49. package/build/features/shared/SalesChannels/SalesChannel.js +2 -2
  50. package/build/features/shared/UploadFile/FileUpload.d.ts +2 -1
  51. package/build/features/shared/UploadFile/FileUpload.js +2 -2
  52. package/build/features/shared/UploadFile/UploadWrapper.d.ts +2 -1
  53. package/build/features/shared/UploadFile/UploadWrapper.js +2 -2
  54. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +2 -1
  55. package/build/features/shared/UploadMultipleFile/UploadFile.js +2 -2
  56. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +2 -1
  57. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
  58. package/build/hooks/index.d.ts +1 -0
  59. package/build/hooks/index.js +1 -0
  60. package/build/hooks/useDataVerified.d.ts +6 -0
  61. package/build/hooks/useDataVerified.js +19 -0
  62. package/package.json +1 -1
@@ -40,39 +40,16 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
40
40
  }, 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> & {
41
41
  isSelected?: boolean | undefined;
42
42
  }, {}, {}>;
43
- export declare const CheckIconStyled: import("@emotion/styled").StyledComponent<{
44
- children?: React.ReactNode;
45
- classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
46
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
47
- fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
48
- htmlColor?: string | undefined;
49
- inheritViewBox?: boolean | undefined;
50
- shapeRendering?: string | undefined;
51
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
52
- titleAccess?: string | undefined;
53
- viewBox?: string | undefined;
54
- } & 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"> & {
55
- ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
56
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
57
43
  export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
58
- children?: React.ReactNode;
59
- classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
60
- color?: "inherit" | "disabled" | "error" | "info" | "success" | "primary" | "secondary" | "action" | "warning" | undefined;
61
- fontSize?: "small" | "inherit" | "medium" | "large" | undefined;
62
- htmlColor?: string | undefined;
63
- inheritViewBox?: boolean | undefined;
64
- shapeRendering?: string | undefined;
44
+ isVerified?: boolean | undefined;
65
45
  sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
66
- titleAccess?: string | undefined;
67
- viewBox?: string | undefined;
68
- } & 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"> & {
69
- ref?: ((instance: SVGSVGElement | null) => void) | React.RefObject<SVGSVGElement> | null | undefined;
70
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "children" | "sx" | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
46
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
71
47
  interface CustomerBaseProps {
72
48
  show: boolean;
73
49
  onListOpen?: () => void;
74
50
  onListClose?: () => void;
75
51
  readOnly?: boolean;
52
+ isVerified?: boolean;
76
53
  }
77
- declare const _default: React.MemoExoticComponent<({ readOnly, ...props }: CustomerBaseProps) => JSX.Element>;
54
+ declare const _default: React.MemoExoticComponent<({ readOnly, isVerified, ...props }: CustomerBaseProps) => JSX.Element>;
78
55
  export default _default;
@@ -22,21 +22,21 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
24
  import * as React from 'react';
25
- import Box from '@mui/material/Box';
26
25
  import { useTranslation } from 'react-i18next';
27
26
  import { useController, useFormContext } from 'react-hook-form';
27
+ import Box from '@mui/material/Box';
28
28
  import { styled, alpha } from '@mui/material/styles';
29
+ import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
29
30
  import Text from '../../../../components/Text';
30
31
  import Collapse from '../../../../components/Collapse';
31
- import CheckIcon from '@mui/icons-material/Check';
32
- import ExpandIcon from '../../../../components/ExpandIcon';
33
- import Input from '../../../shared/Input';
34
32
  import Tooltip from '../../../../components/Tooltip';
35
33
  import SimpleList from '../../../../components/SimpleList';
34
+ import Input from '../../../shared/Input';
36
35
  import { ScreenContainer } from '../../../shared/Containers';
37
- import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
38
36
  import { brandSelector, clearError } from '../../../app/brand/brandStore';
39
- import Search from '../../../../features/shared/Search';
37
+ import Search from '../../../shared/Search';
38
+ import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
39
+ import CheckIcon from '../../../shared/CheckIcon';
40
40
  import { InfoIconStyled, InfoOutlinedIconStyled, LabelContainerStyled } from './ActivitiesList';
41
41
  export var InputLabelStyled = styled(Text)(function (_a) {
42
42
  var theme = _a.theme;
@@ -59,14 +59,6 @@ export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { r
59
59
  var theme = _a.theme, isSelected = _a.isSelected;
60
60
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
61
61
  });
62
- export var CheckIconStyled = styled(CheckIcon)(function (_a) {
63
- var theme = _a.theme;
64
- return ({
65
- color: theme.palette.success.main,
66
- display: 'flex',
67
- alignItems: 'flex-end'
68
- });
69
- });
70
62
  export var RemainingCheck = styled(CheckIcon)(function (_a) {
71
63
  var theme = _a.theme;
72
64
  return ({
@@ -80,7 +72,7 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
80
72
  }); });
81
73
  var CustomerBase = function (_a) {
82
74
  var _b, _c;
83
- var readOnly = _a.readOnly, props = __rest(_a, ["readOnly"]);
75
+ var readOnly = _a.readOnly, isVerified = _a.isVerified, props = __rest(_a, ["readOnly", "isVerified"]);
84
76
  var _d = React.useState([]), customerLocationsList = _d[0], setCustomerLocationsList = _d[1];
85
77
  var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
86
78
  var t = useTranslation().t;
@@ -92,7 +84,6 @@ var CustomerBase = function (_a) {
92
84
  var _g = React.useState(false), isHovered = _g[0], setIsHovered = _g[1];
93
85
  var brandActivities = data.brandActivities;
94
86
  var response = brandActivities.responseBody;
95
- var disabled = false;
96
87
  var onOpenList = function (event) {
97
88
  var _a;
98
89
  if (readOnly)
@@ -140,8 +131,8 @@ var CustomerBase = function (_a) {
140
131
  };
141
132
  var customerLocationsValue = customerLocationsControl.field.value;
142
133
  var customerLocationSelected = customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue[0];
143
- return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(BaseLabelStyled, { children: t('select_customer_base') }), _jsx(Tooltip, __assign({ title: t('customer_base_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(InputStyled, { readOnly: readOnly, disabled: disabled, placeholder: t('choose_expected_sales'), value: isAr ? (_b = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en) !== null && _c !== void 0 ? _c : '', onClick: disabled ? undefined : !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
144
- return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.name.ar : item.name.en })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIconStyled, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(RemainingCheck, {})] }));
134
+ return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(BaseLabelStyled, { children: t('select_customer_base') }), _jsx(Tooltip, __assign({ title: t('customer_base_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(InputStyled, { readOnly: readOnly, placeholder: t('choose_expected_sales'), value: isAr ? (_b = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en) !== null && _c !== void 0 ? _c : '', onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }) }), _jsxs(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
135
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.name.ar : item.name.en })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIcon, { isVerified: isVerified }), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
145
136
  } })] }))] }) })));
146
137
  };
147
138
  export default React.memo(CustomerBase);
@@ -4,6 +4,7 @@ interface ExpectedCustomersProps {
4
4
  onListOpen?: () => void;
5
5
  onListClose?: () => void;
6
6
  readOnly?: boolean;
7
+ isVerified?: boolean;
7
8
  }
8
- declare const ExpectedCustomers: ({ readOnly, ...props }: ExpectedCustomersProps) => JSX.Element;
9
+ declare const ExpectedCustomers: ({ readOnly, isVerified, ...props }: ExpectedCustomersProps) => JSX.Element;
9
10
  export default ExpectedCustomers;
@@ -29,11 +29,12 @@ import { useController, useFormContext } from 'react-hook-form';
29
29
  import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
30
30
  import SimpleList from '../../../../components/SimpleList';
31
31
  import Collapse from '../../../../components/Collapse';
32
- import ExpandIcon from '../../../../components/ExpandIcon';
33
32
  import { ScreenContainer } from '../../../shared/Containers';
34
- import { CheckIconStyled, InputLabelStyled, NameContainer } from './CustomerBase';
35
33
  import { brandSelector, clearError } from '../../../app/brand/brandStore';
36
34
  import Input from '../../../shared/Input';
35
+ import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
36
+ import CheckIcon from '../../../shared/CheckIcon';
37
+ import { InputLabelStyled, NameContainer } from './CustomerBase';
37
38
  var InputStyled = styled(Input)(function (_a) {
38
39
  var theme = _a.theme, readOnly = _a.readOnly;
39
40
  return ({
@@ -55,7 +56,7 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
55
56
  }); });
56
57
  var ExpectedCustomers = function (_a) {
57
58
  var _b, _c, _d, _e;
58
- var readOnly = _a.readOnly, props = __rest(_a, ["readOnly"]);
59
+ var readOnly = _a.readOnly, isVerified = _a.isVerified, props = __rest(_a, ["readOnly", "isVerified"]);
59
60
  var _f = React.useState([]), expectedCustomersList = _f[0], setExpectedCustomersList = _f[1];
60
61
  var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
61
62
  var t = useTranslation().t;
@@ -95,8 +96,8 @@ var ExpectedCustomers = function (_a) {
95
96
  };
96
97
  var expectedCustomersValue = expectedCustomerControl.field.value;
97
98
  var expectedCustomersSelected = expectedCustomersValue;
98
- return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: readOnly, placeholder: t('choose_expected_sales'), value: isAr ? (_c = (_b = expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name) === null || _b === void 0 ? void 0 : _b.ar) !== null && _c !== void 0 ? _c : '' : (_e = (_d = expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name) === null || _d === void 0 ? void 0 : _d.en) !== null && _e !== void 0 ? _e : '', onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
99
- return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.name.ar : item.name.en })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIconStyled, {})] }));
99
+ return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_customers_to_serve') }), _jsx(InputStyled, { readOnly: readOnly, placeholder: t('choose_expected_sales'), value: isAr ? (_c = (_b = expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name) === null || _b === void 0 ? void 0 : _b.ar) !== null && _c !== void 0 ? _c : '' : (_e = (_d = expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.name) === null || _d === void 0 ? void 0 : _d.en) !== null && _e !== void 0 ? _e : '', onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }) }), _jsx(Collapse, __assign({ in: !!anchorEl, timeout: 300 }, { children: _jsx(SimpleListStyled, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: expectedCustomersList, onSelectItem: onSelectItem, renderItem: function (item) {
100
+ return (_jsxs(_Fragment, { children: [_jsx(ListItemContainer, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (expectedCustomersValue === null || expectedCustomersValue === void 0 ? void 0 : expectedCustomersValue.id) }, { children: isAr ? item.name.ar : item.name.en })) }), item.id === (expectedCustomersSelected === null || expectedCustomersSelected === void 0 ? void 0 : expectedCustomersSelected.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
100
101
  } }) }))] }) })));
101
102
  };
102
103
  export default ExpectedCustomers;
@@ -4,6 +4,7 @@ interface ExpectedSalesRangeProps {
4
4
  onListOpen?: () => void;
5
5
  onListClose?: () => void;
6
6
  readOnly?: boolean;
7
+ isVerified?: boolean;
7
8
  }
8
- declare const ExpectedSalesRange: ({ show, onListClose, onListOpen, readOnly }: ExpectedSalesRangeProps) => JSX.Element;
9
+ declare const ExpectedSalesRange: ({ show, onListClose, onListOpen, readOnly, isVerified }: ExpectedSalesRangeProps) => JSX.Element;
9
10
  export default ExpectedSalesRange;
@@ -9,23 +9,25 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import Box from '@mui/material/Box';
15
- import { styled } from '@mui/material/styles';
16
14
  import { useTranslation } from 'react-i18next';
17
15
  import { useController, useFormContext } from 'react-hook-form';
16
+ import Box from '@mui/material/Box';
17
+ import { styled } from '@mui/material/styles';
18
+ import { findCurrencyByIso2, isExist } from '../../../../utils';
18
19
  import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
20
+ import { settingsSelector } from '../../../../app/settings';
19
21
  import SimpleList from '../../../../components/SimpleList';
20
22
  import Collapse from '../../../../components/Collapse';
21
23
  import ExpandIcon from '../../../../components/ExpandIcon';
22
24
  import { brandSelector, clearError } from '../../../app/brand/brandStore';
23
- import { findCurrencyByIso2, isExist } from '../../../../utils';
24
25
  import { ScreenContainer } from '../../../shared/Containers';
25
- import { InputLabelStyled, CheckIconStyled, NameContainer } from './CustomerBase';
26
- import Search from '../../../../features/shared/Search';
27
- import { settingsSelector } from '../../../../app/settings';
26
+ import Search from '../../../shared/Search';
28
27
  import Input from '../../../shared/Input';
28
+ import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
29
+ import CheckIcon from '../../../shared/CheckIcon';
30
+ import { InputLabelStyled, NameContainer } from './CustomerBase';
29
31
  var InputStyled = styled(Input)(function (_a) {
30
32
  var theme = _a.theme, readOnly = _a.readOnly;
31
33
  return ({
@@ -57,7 +59,7 @@ var SimpleListStyled = styled((SimpleList))(function () { return ({
57
59
  }); });
58
60
  var ExpectedSalesRange = function (_a) {
59
61
  var _b, _c;
60
- var show = _a.show, onListClose = _a.onListClose, onListOpen = _a.onListOpen, readOnly = _a.readOnly;
62
+ var show = _a.show, onListClose = _a.onListClose, onListOpen = _a.onListOpen, readOnly = _a.readOnly, isVerified = _a.isVerified;
61
63
  var _d = React.useState([]), expectedSalesRangeList = _d[0], setExpectedSalesRangeList = _d[1];
62
64
  var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
63
65
  var _f = React.useState(''), subIndex = _f[0], setSubIndex = _f[1];
@@ -68,13 +70,12 @@ var ExpectedSalesRange = function (_a) {
68
70
  var expectedSaleControl = useController({ name: 'expectedSale', control: control });
69
71
  var _g = useAppSelector(brandSelector), data = _g.data, error = _g.error;
70
72
  var settingsData = useAppSelector(settingsSelector).data;
71
- var brandActivities = data.brandActivities, verify = data.verify;
73
+ var brandActivities = data.brandActivities;
72
74
  var expectedSales = (brandActivities.responseBody || {}).expectedSales;
73
75
  var expectedSalesRangeValue = expectedSaleControl.field.value;
74
76
  var countryCode = settingsData.businessCountry;
75
- var disabled = false;
76
77
  var handleOpenMainMenu = function (event) {
77
- if (disabled || readOnly)
78
+ if (readOnly)
78
79
  return;
79
80
  setAnchorEl(event.currentTarget);
80
81
  onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
@@ -126,7 +127,7 @@ var ExpectedSalesRange = function (_a) {
126
127
  }, [anchorEl, expectedSalesRangeValue]);
127
128
  return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, { children: t('expected_sales_monthly', {
128
129
  currency: t(findCurrencyByIso2(countryCode.iso2))
129
- }) }), _jsx(InputStyled, { readOnly: readOnly, disabled: disabled, value: isAr ? (_b = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.en) !== null && _c !== void 0 ? _c : '', onClick: disabled ? undefined : !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: disabled ? _jsx(_Fragment, {}) : _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: expectedSalesRangeList, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
130
+ }) }), _jsx(InputStyled, { readOnly: readOnly, value: isAr ? (_b = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.ar) !== null && _b !== void 0 ? _b : '' : (_c = expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.name.en) !== null && _c !== void 0 ? _c : '', onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_expected_sales'), endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: expectedSalesRangeList, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
130
131
  var isOnlyOneItem = !item.sub || item.sub.length === 1;
131
132
  if (isOnlyOneItem)
132
133
  onSelectItem(item);
@@ -136,8 +137,8 @@ var ExpectedSalesRange = function (_a) {
136
137
  var _a;
137
138
  var isOnlyOneItem = !item.sub || ((_a = item.sub) === null || _a === void 0 ? void 0 : _a.length) === 1;
138
139
  var showCheck = item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) && isOnlyOneItem;
139
- return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 8%)', borderBottom: '1px solid rgba(227, 232, 238, 0.8)' }, (isOnlyOneItem && { bgcolor: 'inherit', borderBottom: 'none' })) }, { children: [_jsx(NameContainer, __assign({ isSelected: item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id), sx: __assign({}, (isOnlyOneItem && { paddingInlineStart: '5px' })) }, { children: isAr ? item.name.ar : item.name.en })), showCheck ? _jsx(CheckIconStyled, {}) : !isOnlyOneItem && _jsx(ExpandIcon, { anchorEl: subIndex === item.id })] })), _jsx(Collapse, __assign({ in: item.id === subIndex && !isOnlyOneItem }, { children: _jsx(SimpleListStyled, { sx: { pt: 0, pb: 0 }, list: (!isOnlyOneItem && item.sub) || [], onSelectItem: onSelectItem, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (item, idx) {
140
- return (_jsxs(ListItem, __assign({ sx: { mt: idx === 0 ? 1 : 0 } }, { children: [_jsx(NameContainer, __assign({ isSelected: item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.name.ar : item.name.en })), item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) && _jsx(CheckIconStyled, {})] })));
140
+ return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 8%)', borderBottom: '1px solid rgba(227, 232, 238, 0.8)' }, (isOnlyOneItem && { bgcolor: 'inherit', borderBottom: 'none' })) }, { children: [_jsx(NameContainer, __assign({ isSelected: item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id), sx: __assign({}, (isOnlyOneItem && { paddingInlineStart: '5px' })) }, { children: isAr ? item.name.ar : item.name.en })), showCheck ? _jsx(CheckIcon, { isVerified: isVerified }) : !isOnlyOneItem && _jsx(ExpandIcon, { anchorEl: subIndex === item.id })] })), _jsx(Collapse, __assign({ in: item.id === subIndex && !isOnlyOneItem }, { children: _jsx(SimpleListStyled, { sx: { pt: 0, pb: 0 }, list: (!isOnlyOneItem && item.sub) || [], onSelectItem: onSelectItem, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (item, idx) {
141
+ return (_jsxs(ListItem, __assign({ sx: { mt: idx === 0 ? 1 : 0 } }, { children: [_jsx(NameContainer, __assign({ isSelected: item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) }, { children: isAr ? item.name.ar : item.name.en })), item.id === (expectedSalesRangeValue === null || expectedSalesRangeValue === void 0 ? void 0 : expectedSalesRangeValue.id) && _jsx(CheckIcon, { isVerified: isVerified })] })));
141
142
  } }) }))] }));
142
143
  } })] }))] }) })));
143
144
  };
@@ -15,7 +15,7 @@ import React from 'react';
15
15
  import { FormProvider, useForm } from 'react-hook-form';
16
16
  import Form from '../../../../components/Form';
17
17
  import { styled } from '@mui/material/styles';
18
- import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
18
+ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { BrandValidationSchema } from './validation';
21
21
  import Button from '../../../shared/Button';
@@ -47,7 +47,7 @@ var BrandInfo = function (_a) {
47
47
  var _d = useAppSelector(brandSelector), data = _d.data, loading = _d.loading, error = _d.error, uploadingBrandLogo = _d.uploadingBrandLogo;
48
48
  var _e = data.brandData, brandName = _e.brandName, segment = _e.segment, teamSize = _e.teamSize, salesChannels = _e.salesChannels, brandLogoId = _e.brandLogoId, responseBody = _e.responseBody;
49
49
  var _f = data.verify.responseBody || {}, brand = _f.brand, flows = _f.flows;
50
- var _g = brand || {}, logo_details = _g.logo_details, data_status = _g.data_status;
50
+ var _g = brand || {}, logo_details = _g.logo_details, data_status = _g.data_status, data_verification = _g.data_verification;
51
51
  var methods = useForm({
52
52
  resolver: yupResolver(BrandValidationSchema()),
53
53
  defaultValues: {
@@ -62,8 +62,9 @@ var BrandInfo = function (_a) {
62
62
  useSetFromDefaultValues(methods, data.brandData, true);
63
63
  var defaultBrandLogoFile = React.useMemo(function () { return logo_details && __assign(__assign({}, logo_details), { docId: '' }); }, [logo_details]);
64
64
  var originalReadOnly = useFormReadOnly(methods, { brandLogoId: defaultBrandLogoFile });
65
- var noneEditable = useDataNoneEditable(data_status, ['name', 'segment.type', 'segment.teams', 'channel_services']);
65
+ var noneEditable = useDataNoneEditable(data_status, ['name.en', 'name.ar', 'segment.type', 'segment.teams', 'channel_services']);
66
66
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
67
+ var dataVerified = useDataVerified(data_verification, ['logo', 'name.en', 'name.ar', 'segment.teams', 'segment.type']);
67
68
  var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
68
69
  var onSubmit = function (data) {
69
70
  dispatch(updateBrand(getFelids(data)));
@@ -94,6 +95,6 @@ var BrandInfo = function (_a) {
94
95
  };
95
96
  var isSegmentsListActive = listActive === ListType.SegmentsList;
96
97
  var isTeamSizeListActive = listActive === ListType.TeamSizeList;
97
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, { readOnly: readOnly['brandName'] || noneEditable['name'], show: !listActive, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(BrandLogo, { defaultFile: defaultBrandLogoFile, readOnly: readOnly['brandLogoId'], show: !listActive }), _jsx(Segments, { readOnly: readOnly['segment'] || noneEditable['segment.type'], show: !isTeamSizeListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(TeamSize, { readOnly: readOnly['teamSize'] || noneEditable['segment.teams'], show: !isSegmentsListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); } }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(SalesChannels, { readOnly: readOnly['salesChannels'] || noneEditable['channel_services'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') }))] }))] })) })) }));
98
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandName, { readOnly: readOnly['brandName'] || (noneEditable['name.en'] && noneEditable['name.ar']), show: !listActive, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking, isVerified: dataVerified['name.en'] && dataVerified['name.ar'] }), _jsx(BrandLogo, { defaultFile: defaultBrandLogoFile, readOnly: readOnly['brandLogoId'], show: !listActive, isVerified: dataVerified['logo'] }), _jsx(Segments, { readOnly: readOnly['segment'] || noneEditable['segment.type'], show: !isTeamSizeListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentsList); }, onListClose: function () { return handleMenuClick(); }, isVerified: dataVerified['segment.type'] }), _jsx(TeamSize, { readOnly: readOnly['teamSize'] || noneEditable['segment.teams'], show: !isSegmentsListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); }, isVerified: dataVerified['segment.teams'] }), _jsxs(Collapse, __assign({ in: !listActive }, { children: [_jsx(SalesChannels, { readOnly: readOnly['salesChannels'] || noneEditable['channel_services'] }), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') }))] }))] })) })) }));
98
99
  };
99
100
  export default BrandInfo;
@@ -4,6 +4,7 @@ declare type BrandLogoProps = {
4
4
  show: boolean;
5
5
  readOnly?: boolean;
6
6
  defaultFile?: FileDetails;
7
+ isVerified?: boolean;
7
8
  };
8
- declare const BrandLogo: ({ show, readOnly, defaultFile }: BrandLogoProps) => JSX.Element;
9
+ declare const BrandLogo: ({ show, readOnly, defaultFile, isVerified }: BrandLogoProps) => JSX.Element;
9
10
  export default BrandLogo;
@@ -28,7 +28,7 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
28
28
  });
29
29
  var BrandLogo = function (_a) {
30
30
  var _b;
31
- var show = _a.show, readOnly = _a.readOnly, defaultFile = _a.defaultFile;
31
+ var show = _a.show, readOnly = _a.readOnly, defaultFile = _a.defaultFile, isVerified = _a.isVerified;
32
32
  var t = useTranslation().t;
33
33
  var control = useFormContext().control;
34
34
  var brandLogoIdControl = useController({ name: 'brandLogoId', control: control });
@@ -47,6 +47,6 @@ var BrandLogo = function (_a) {
47
47
  dispatch(clearBrandLogo());
48
48
  brandLogoIdControl.field.onChange(undefined);
49
49
  };
50
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadWrapper, { id: 'brandLogoId', readOnly: readOnly, fileRemoveType: FileRemoveType.BRAND_LOGO_FILE_ID, control: control, label: t('title_brand_logo'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('description_brand_logo'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleBrandLogoChange, isSubmitting: loading, onDeleteFile: handleReset, defaultFile: defaultFile, purpose: DocumentPurpose.BRAND_LOGO, validFileFormats: VALID_FILE_FORMATS_FOR_IMAGE, fileUploadingStatus: function (uploading) { return dispatch(uploadingBrandLogoStatus(uploading)); } }) }) })));
50
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(FeatureStyled, { children: _jsx(UploadWrapper, { id: 'brandLogoId', readOnly: readOnly, fileRemoveType: FileRemoveType.BRAND_LOGO_FILE_ID, control: control, label: t('title_brand_logo'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('description_brand_logo'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleBrandLogoChange, isSubmitting: loading, onDeleteFile: handleReset, defaultFile: defaultFile, purpose: DocumentPurpose.BRAND_LOGO, validFileFormats: VALID_FILE_FORMATS_FOR_IMAGE, fileUploadingStatus: function (uploading) { return dispatch(uploadingBrandLogoStatus(uploading)); }, isVerified: isVerified }) }) })));
51
51
  };
52
52
  export default BrandLogo;
@@ -4,6 +4,7 @@ interface BrandNameProps {
4
4
  fetchingBrandName: (flag: boolean) => void;
5
5
  brandNameChecking: boolean;
6
6
  readOnly?: boolean;
7
+ isVerified?: boolean;
7
8
  }
8
- declare const _default: React.MemoExoticComponent<({ show, brandNameChecking, fetchingBrandName, readOnly }: BrandNameProps) => JSX.Element>;
9
+ declare const _default: React.MemoExoticComponent<({ show, brandNameChecking, fetchingBrandName, readOnly, isVerified }: BrandNameProps) => JSX.Element>;
9
10
  export default _default;
@@ -55,17 +55,15 @@ import Box from '@mui/material/Box';
55
55
  import { styled, alpha } from '@mui/material/styles';
56
56
  import InfoIcon from '@mui/icons-material/Info';
57
57
  import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
58
- import CircularProgress from '@mui/material/CircularProgress';
59
58
  import { FieldType } from '../../../../@types';
60
59
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
61
60
  import Tooltip from '../../../../components/Tooltip';
62
61
  import Collapse from '../../../../components/Collapse';
63
62
  import Text from '../../../../components/Text';
64
63
  import Input from '../../../shared/Input';
65
- import ClearIcon from '../../../shared/ClearIcon';
66
64
  import { ScreenContainer } from '../../../shared/Containers';
67
- import CheckIcon from '../../../shared/CheckIcon';
68
65
  import { checkBrandNameAvailability, brandSelector } from '../../../app/brand/brandStore';
66
+ import { EndAdornment } from '../../../shared/EndAdornment';
69
67
  var LabelContainerStyled = styled(Box)(function (_a) {
70
68
  var theme = _a.theme;
71
69
  return ({
@@ -99,7 +97,7 @@ var InfoIconStyled = styled(InfoIcon)(function (_a) {
99
97
  var cancelToken = null;
100
98
  var BrandName = function (_a) {
101
99
  var _b, _c;
102
- var show = _a.show, brandNameChecking = _a.brandNameChecking, fetchingBrandName = _a.fetchingBrandName, readOnly = _a.readOnly;
100
+ var show = _a.show, brandNameChecking = _a.brandNameChecking, fetchingBrandName = _a.fetchingBrandName, readOnly = _a.readOnly, isVerified = _a.isVerified;
103
101
  var dispatch = useAppDispatch();
104
102
  var _d = React.useState(false), isHovered = _d[0], setIsHovered = _d[1];
105
103
  var t = useTranslation().t;
@@ -138,6 +136,6 @@ var BrandName = function (_a) {
138
136
  var clearBrandName = function () {
139
137
  brandControl.field.onChange('');
140
138
  };
141
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { readOnly: readOnly, onChange: handleBrandNameChange, value: brandNameValue || '', disabled: isNonEditable, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: brandNameChecking ? (_jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } })) : !error && brandNameValue ? (_jsx(CheckIcon, {})) : (brandNameValue && _jsx(ClearIcon, { onClick: clearBrandName })) })] })) })));
139
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { readOnly: readOnly, onChange: handleBrandNameChange, value: brandNameValue || '', disabled: isNonEditable, placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, isVerified: isVerified, error: error, onClear: clearBrandName }) })] })) })));
142
140
  };
143
141
  export default React.memo(BrandName);
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useController, useFormContext } from 'react-hook-form';
4
4
  import { useAppSelector, useAppDispatch } from '../../../../hooks';
5
- import { mapSalesChannel } from '../../../../utils';
5
+ import { hasVerifiedValue, mapSalesChannel } from '../../../../utils';
6
6
  import { brandSelector, clearError } from '../../../app/brand/brandStore';
7
7
  import SalesChannel from '../../../shared/SalesChannels';
8
8
  var SalesChannels = function (_a) {
@@ -12,14 +12,17 @@ var SalesChannels = function (_a) {
12
12
  var dispatch = useAppDispatch();
13
13
  var _c = useController({ control: control, name: 'salesChannels' }), fieldState = _c.fieldState, field = _c.field;
14
14
  var _d = useAppSelector(brandSelector), data = _d.data, error = _d.error;
15
+ var brand = (data.verify.responseBody || {}).brand;
16
+ var isChannelVerified = function (id) {
17
+ return hasVerifiedValue(brand === null || brand === void 0 ? void 0 : brand.data_verification, "channel_services.".concat(id));
18
+ };
15
19
  var channelList = (data.verify.responseBody || {}).channel_list;
16
- var isNonEditable = false;
17
20
  var selectedSalesChannels = React.useMemo(function () { return mapSalesChannel(field.value); }, [(field.value || []).length]);
18
21
  var onChange = function (channels) {
19
22
  if (error)
20
23
  dispatch(clearError());
21
24
  field.onChange(channels);
22
25
  };
23
- return (_jsx(SalesChannel, { disabled: isNonEditable, readOnly: readOnly, error: (_b = fieldState.error) === null || _b === void 0 ? void 0 : _b.message, list: channelList, onChange: onChange, defaultValue: selectedSalesChannels }));
26
+ return (_jsx(SalesChannel, { readOnly: readOnly, isChannelVerified: function (id) { return isChannelVerified(id); }, error: (_b = fieldState.error) === null || _b === void 0 ? void 0 : _b.message, list: channelList, onChange: onChange, defaultValue: selectedSalesChannels }));
24
27
  };
25
28
  export default SalesChannels;
@@ -4,6 +4,7 @@ interface SegmentsProps {
4
4
  onListOpen?: () => void;
5
5
  onListClose?: () => void;
6
6
  readOnly?: boolean;
7
+ isVerified?: boolean;
7
8
  }
8
- declare const Segments: ({ show, onListOpen, onListClose, readOnly }: SegmentsProps) => JSX.Element;
9
+ declare const Segments: ({ show, onListOpen, onListClose, readOnly, isVerified }: SegmentsProps) => JSX.Element;
9
10
  export default Segments;
@@ -10,20 +10,20 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import Collapse from '../../../../components/Collapse';
14
- import { ScreenContainer } from '../../../../features/shared/Containers';
15
- import Input from '../../../../features/shared/Input';
16
- import { useAppSelector, useLanguage } from '../../../../hooks';
17
13
  import React from 'react';
18
14
  import { useTranslation } from 'react-i18next';
19
15
  import { useController, useFormContext } from 'react-hook-form';
20
- import { brandSelector } from '../../../../features/app/brand/brandStore';
21
- import SimpleList from '../../../../components/SimpleList';
22
- import ExpandIcon from '../../../../components/ExpandIcon';
23
16
  import Box from '@mui/material/Box';
24
17
  import { styled } from '@mui/material/styles';
18
+ import { useAppSelector, useLanguage } from '../../../../hooks';
19
+ import SimpleList from '../../../../components/SimpleList';
25
20
  import Text from '../../../../components/Text';
26
- import CheckIcon from '@mui/icons-material/Check';
21
+ import Collapse from '../../../../components/Collapse';
22
+ import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
23
+ import { ScreenContainer } from '../../../shared/Containers';
24
+ import Input from '../../../shared/Input';
25
+ import CheckIcon from '../../../shared/CheckIcon';
26
+ import { brandSelector } from '../../../app/brand/brandStore';
27
27
  var InputStyled = styled(Input)(function (_a) {
28
28
  var readOnly = _a.readOnly;
29
29
  return ({
@@ -36,27 +36,20 @@ var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop
36
36
  var theme = _a.theme, isSelected = _a.isSelected;
37
37
  return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
38
38
  });
39
- var CheckIconStyled = styled(CheckIcon)(function (_a) {
40
- var theme = _a.theme;
41
- return ({
42
- color: theme.palette.success.main,
43
- display: 'flex',
44
- alignItems: 'flex-end'
45
- });
46
- });
47
39
  var Segments = function (_a) {
48
- var _b, _c, _d, _e;
49
- var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, readOnly = _a.readOnly;
50
- var _f = React.useState([]), segmentList = _f[0], setSegmentList = _f[1];
51
- var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
40
+ var _b, _c, _d;
41
+ var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, readOnly = _a.readOnly, isVerified = _a.isVerified;
42
+ var _e = React.useState([]), segmentList = _e[0], setSegmentList = _e[1];
43
+ var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
52
44
  var t = useTranslation().t;
53
45
  var isAr = useLanguage().isAr;
54
46
  var data = useAppSelector(brandSelector).data;
55
47
  var control = useFormContext().control;
56
- var segmentsList = ((_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.segmentsList) || [];
48
+ var list = (data.verify.responseBody || {}).segmentsList;
49
+ var segmentsList = list || [];
57
50
  var segmentControl = useController({ control: control, name: 'segment' });
58
51
  var segment = segmentControl.field.value;
59
- var error = (_c = segmentControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
52
+ var error = (_b = segmentControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
60
53
  React.useEffect(function () {
61
54
  if ((segmentsList === null || segmentsList === void 0 ? void 0 : segmentsList.length) > 0) {
62
55
  setSegmentList(segmentsList);
@@ -76,9 +69,9 @@ var Segments = function (_a) {
76
69
  onCloseList();
77
70
  segmentControl.field.onChange(segment);
78
71
  };
79
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputStyled, { required: true, label: t('segment_title'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
72
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputStyled, { required: true, label: t('segment_title'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_any_segment'), value: (isAr ? (_c = segment === null || segment === void 0 ? void 0 : segment.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
80
73
  var _a, _b;
81
- return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: 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 })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIconStyled, {})] }));
74
+ return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: 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 })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, { isVerified: isVerified })] }));
82
75
  } }) }))] })) })));
83
76
  };
84
77
  export default Segments;
@@ -4,6 +4,7 @@ interface TeamSizeProps {
4
4
  onListOpen?: () => void;
5
5
  onListClose?: () => void;
6
6
  readOnly?: boolean;
7
+ isVerified?: boolean;
7
8
  }
8
- declare const TeamSize: ({ show, onListOpen, onListClose, readOnly }: TeamSizeProps) => JSX.Element;
9
+ declare const TeamSize: ({ show, onListOpen, onListClose, readOnly, isVerified }: TeamSizeProps) => JSX.Element;
9
10
  export default TeamSize;