@corva/ui 0.49.0-3 → 0.49.0-5
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/components/AddComment/Popover.js +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AnnotationComments/index.d.ts +1 -1
- package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.d.ts +2 -2
- package/components/Annotations/components/AnnotationsList/index.d.ts +3 -3
- package/components/AppVersionsSelect/AppVersionsSelect.d.ts +1 -1
- package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
- package/components/AssetEditor/AssetEditorAutocomplete.d.ts +4 -4
- package/components/AssetEditor/SingleAssetEditor.d.ts +2 -2
- package/components/Attachment/index.d.ts +2 -2
- package/components/Avatar/index.d.ts +81 -46
- package/components/Avatar/index.d.ts.map +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Chart/options.d.ts +10 -2
- package/components/Chart/options.d.ts.map +1 -1
- package/components/Chart/tooltip.d.ts +2 -0
- package/components/Chart/tooltip.d.ts.map +1 -0
- package/components/CollapsableSidebar.d.ts +3 -3
- package/components/ColorPicker/ColorPicker.d.ts +2 -43
- package/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/components/ColorPicker/ColorPicker.js +1 -1
- package/components/ColorPicker/index.d.ts +1 -1
- package/components/ColorPicker/index.d.ts.map +1 -1
- package/components/ColorPickerPalette/ColorPickerPalette.d.ts +2 -17
- package/components/ColorPickerPalette/ColorPickerPalette.d.ts.map +1 -1
- package/components/Comment/CommentIcon/index.d.ts +2 -1
- package/components/Comment/CommentIcon/index.d.ts.map +1 -1
- package/components/Comment/index.d.ts +3 -3
- package/components/CommentInput/index.d.ts +5 -5
- package/components/CommentsInfo/index.d.ts +3 -3
- package/components/ConfirmationDialog.d.ts +3 -3
- package/components/Counter/index.d.ts +35 -24
- package/components/Counter/index.d.ts.map +1 -1
- package/components/Counter/index.js +1 -1
- package/components/DateTimePicker/index.d.ts +14 -21
- package/components/DateTimePicker/index.d.ts.map +1 -1
- package/components/DateTimePicker/index.js +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts +31 -25
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts.map +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
- package/components/DevCenter/AppSettingsPopover/index.d.ts +1 -1
- package/components/DevCenter/AppSettingsPopover/index.d.ts.map +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.d.ts +58 -66
- package/components/DevCenter/AppSideBar/AppSideBar.d.ts.map +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.d.ts +2 -2
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/sharedStyles.d.ts +1 -1
- package/components/EditableItem/EditableItem/index.d.ts +33 -37
- package/components/EditableItem/EditableItem/index.d.ts.map +1 -1
- package/components/EditableItem/EditableItem/index.js +1 -1
- package/components/EmbeddedApp/DevCenterEmbeddedApp.d.ts +1 -1
- package/components/EmbeddedApp/EmbeddedApp.d.ts +1 -1
- package/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/components/FeedItem/FeedItem.d.ts +2 -2
- package/components/FeedItem/feedItemTypes/DepthCommentFeedItem.d.ts +1 -1
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/utils.d.ts +20 -2
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/utils.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/TracesMemoFeedItem.d.ts +1 -1
- package/components/FilePreview/index.d.ts +1 -1
- package/components/FilesLoader/FilesLoader.d.ts +49 -58
- package/components/FilesLoader/FilesLoader.d.ts.map +1 -1
- package/components/FilesLoader/FilesLoader.js +1 -1
- package/components/FilesLoader/Icons/IconWarning.d.ts +1 -1
- package/components/FilesLoader/Icons/IconWarning.js +1 -1
- package/components/FilesLoader/index.d.ts +2 -2
- package/components/FilesLoader/index.d.ts.map +1 -1
- package/components/FilesLoader/useStyles.d.ts +1 -1
- package/components/FilesLoader/useStyles.d.ts.map +1 -1
- package/components/FilesLoader/useStyles.js +1 -1
- package/components/IconButton/index.d.ts +33 -10
- package/components/IconButton/index.d.ts.map +1 -1
- package/components/IconButton/index.js +1 -1
- package/components/IconMenu/index.d.ts +4 -4
- package/components/LoadingIndicator/FullScreenLoadingIndicator.d.ts +14 -17
- package/components/LoadingIndicator/FullScreenLoadingIndicator.d.ts.map +1 -1
- package/components/LoadingIndicator/FullScreenLoadingIndicator.js +1 -1
- package/components/LoadingIndicator/InlineLoadingIndicator.d.ts +14 -17
- package/components/LoadingIndicator/InlineLoadingIndicator.d.ts.map +1 -1
- package/components/LoadingIndicator/InlineLoadingIndicator.js +1 -1
- package/components/LoadingIndicator/Loader.d.ts +14 -15
- package/components/LoadingIndicator/Loader.d.ts.map +1 -1
- package/components/LoadingIndicator/Loader.js +1 -1
- package/components/LoadingIndicator/LoadingIndicator.d.ts +18 -26
- package/components/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
- package/components/LoadingIndicator/LoadingIndicator.js +1 -1
- package/components/LoadingIndicator/types.d.ts +25 -0
- package/components/LoadingIndicator/types.d.ts.map +1 -0
- package/components/LoadingIndicator/types.js +1 -0
- package/components/Modal/CorvaModal.d.ts +60 -69
- package/components/Modal/CorvaModal.d.ts.map +1 -1
- package/components/Modal/CorvaModal.js +1 -1
- package/components/Modal/Modal.d.ts +2 -1
- package/components/Modal/Modal.d.ts.map +1 -1
- package/components/Modal/Modal.js +1 -1
- package/components/Modal/index.d.ts +1 -1
- package/components/Modal/index.d.ts.map +1 -1
- package/components/Notifications/components/Toast.d.ts +1 -1
- package/components/OffsetWellButton/OffsetWellButton.d.ts +29 -28
- package/components/OffsetWellButton/OffsetWellButton.d.ts.map +1 -1
- package/components/OffsetWellButton/OffsetWellButton.js +1 -1
- package/components/OffsetWellButton/index.d.ts +1 -1
- package/components/OffsetWellButton/index.d.ts.map +1 -1
- package/components/OffsetWellChips/Chip.d.ts +19 -29
- package/components/OffsetWellChips/Chip.d.ts.map +1 -1
- package/components/OffsetWellChips/Chip.js +1 -1
- package/components/OffsetWellChips/ChipsContainer.d.ts +9 -11
- package/components/OffsetWellChips/ChipsContainer.d.ts.map +1 -1
- package/components/OffsetWellChips/ChipsContainer.js +1 -1
- package/components/OffsetWellChips/index.d.ts +2 -2
- package/components/OffsetWellChips/index.d.ts.map +1 -1
- package/components/OffsetWellChips/types.d.ts +17 -0
- package/components/OffsetWellChips/types.d.ts.map +1 -0
- package/components/OffsetWellChips/types.js +1 -0
- package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsSelect.d.ts +2 -2
- package/components/OffsetWellPickerV2/constants.d.ts +15 -2
- package/components/OffsetWellPickerV2/constants.d.ts.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsSelect.d.ts +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.d.ts +15 -2
- package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.d.ts.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/components/OffsetWellPickerV4/constants.d.ts +15 -2
- package/components/OffsetWellPickerV4/constants.d.ts.map +1 -1
- package/components/ParameterCharts/AddEditTrack.d.ts +2 -2
- package/components/ParameterCharts/components/DataLoadingIndicator.d.ts +1 -1
- package/components/ParameterCharts/components/TrackSettings.d.ts +1 -1
- package/components/PostPreviewDialog/index.d.ts +5 -5
- package/components/RangeSlider/RangeSlider.d.ts +42 -34
- package/components/RangeSlider/RangeSlider.d.ts.map +1 -1
- package/components/RangeSlider/RangeSlider.js +1 -1
- package/components/ResizableTable/ResizableTable.d.ts +8 -10
- package/components/ResizableTable/ResizableTable.d.ts.map +1 -1
- package/components/ResizableTable/ResizableTable.js +1 -1
- package/components/ResizableTable/ResizableTableCell.d.ts +8 -7
- package/components/ResizableTable/ResizableTableCell.d.ts.map +1 -1
- package/components/ResizableTable/ResizableTableCell.js +1 -1
- package/components/ResizableTable/ResizableTableHeaderCell.d.ts +18 -15
- package/components/ResizableTable/ResizableTableHeaderCell.d.ts.map +1 -1
- package/components/ResizableTable/ResizableTableHeaderCell.js +1 -1
- package/components/ResizableTable/index.d.ts +1 -1
- package/components/ResizableTable/index.d.ts.map +1 -1
- package/components/Search/Search.d.ts +68 -69
- package/components/Search/Search.d.ts.map +1 -1
- package/components/Search/Search.js +1 -1
- package/components/Search/styles.d.ts +1 -1
- package/components/Search/styles.d.ts.map +1 -1
- package/components/Select/index.d.ts +44 -24
- package/components/Select/index.d.ts.map +1 -1
- package/components/Select/index.js +1 -1
- package/components/SettingEditors/ColorEditor/index.d.ts +82 -45
- package/components/SettingEditors/ColorEditor/index.d.ts.map +1 -1
- package/components/SettingEditors/ColorEditor/index.js +1 -1
- package/components/SettingEditors/DropdownEditor/index.d.ts +1 -1
- package/components/SettingEditors/RadioEditor/index.d.ts +25 -21
- package/components/SettingEditors/RadioEditor/index.d.ts.map +1 -1
- package/components/SettingEditors/RadioEditor/index.js +1 -1
- package/components/StageDesignVActual/ElementsComparison/ElementsComparison.d.ts +1 -1
- package/components/StageDesignVActual/ElementsComparison/ElementsComparison.d.ts.map +1 -1
- package/components/StageDesignVActual/ElementsComparison/utils.d.ts +4 -1
- package/components/StageDesignVActual/ElementsComparison/utils.d.ts.map +1 -1
- package/components/Stepper/Step.d.ts +37 -42
- package/components/Stepper/Step.d.ts.map +1 -1
- package/components/Stepper/Step.js +1 -1
- package/components/Stepper/Stepper.d.ts +29 -18
- package/components/Stepper/Stepper.d.ts.map +1 -1
- package/components/Stepper/Stepper.js +1 -1
- package/components/Stepper/StepsWrapper.d.ts +16 -14
- package/components/Stepper/StepsWrapper.d.ts.map +1 -1
- package/components/Stepper/StepsWrapper.js +1 -1
- package/components/SwitchControl/index.d.ts +6 -93
- package/components/SwitchControl/index.d.ts.map +1 -1
- package/components/Table/TableCell/TableCell.d.ts +13 -1
- package/components/Table/TableCell/TableCell.d.ts.map +1 -1
- package/components/Table/TableCell/TableCell.js +1 -1
- package/components/Template/TemplateSharingDialog/ChipSelector.d.ts +1 -1
- package/components/TextField/index.d.ts +1 -1
- package/components/Typography.d.ts +16 -16
- package/components/UserMention/index.d.ts +1 -1
- package/constants/goals.d.ts +31 -4
- package/constants/goals.d.ts.map +1 -1
- package/constants/wellSummary.d.ts +14 -0
- package/constants/wellSummary.d.ts.map +1 -1
- package/hocs/withMUIProvidersHOC.d.ts +1 -1
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/utils/accuracy.d.ts +1 -1
- package/utils/accuracy.d.ts.map +1 -1
- package/utils/casing/conversion.d.ts +1 -1
- package/utils/casing/conversion.d.ts.map +1 -1
- package/utils/completion.d.ts +1 -1
- package/utils/completion.d.ts.map +1 -1
- package/utils/goals.d.ts +3 -3
- package/utils/goals.d.ts.map +1 -1
- package/utils/mapbox.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e
|
|
1
|
+
import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as n,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as i,useEffect as o}from"react";import a from"classnames";import{round as l,throttle as u}from"lodash";import s from"prop-types";import{isMobileDetected as m}from"../../utils/mobileDetect.js";import{horizontalStrategy as c}from"./strategies/horizontal.js";import{verticalStrategy as d}from"./strategies/vertical.js";import{calculatePercentForValue as f,updateToValue as g,updateFromValue as R,calculateValueFromPercent as p}from"./utils.js";import v from"./inputs/FromInput.js";import b from"./inputs/ToInput.js";import{RangeSliderControl as O,RangeSliderOrientation as S}from"./constants.js";import T from"./RangeSlider.css.js";var h=function(s){var h,B,I,M,C=s.min,N=s.max,y=s.from,A=s.to,F=s.minRange,V=s.disabled,L=s.onChange,x=s.orientation,j=s.precision,w=s.isSingleRange,E=s.isWithoutInput,z=r(null),H=z[0],P=z[1],_=r(null),D=_[0],U=_[1],q=r(null),W=q[0],X=q[1],Y=r(O.FROM),Z=Y[0],k=Y[1],G=r(null),J=G[0],K=G[1],Q=r({}),$=Q[0],ee=Q[1],ne=r({from:!1,bar:!1,to:!1}),te=ne[0],re=ne[1],ie=i(null),oe=i(null),ae=i(null),le=i(null),ue=i(null),se=x===S.HORIZONTAL,me=x===S.VERTICAL,ce=w&&E;o((function(){x===S.HORIZONTAL&&X(c),x===S.VERTICAL&&X(d)}),[x]),o((function(){w&&L({from:0,to:A})}),[w]),o((function(){var e;if(W){var n=l(y,j),t=l(A,j),r=l(C,j),i=l(N,j),o=f(n,r,i),a=f(t,r,i);ee(((e={})[O.FROM]=W.getThumbStyles(o,Z===O.FROM),e[O.TO]=W.getThumbStyles(a,Z===O.TO),e[O.BAR]=W.getBarStyles(o,a),e[O.FROM_INPUT]=W.getInputStyles(J===O.FROM||J===O.BAR||te.from),e[O.TO_INPUT]=W.getInputStyles(J===O.TO||J===O.BAR||te.to),e)),P(n.toString()),U(t.toString())}}),[W,C,N,y,A,J,te]);var de=function(e){var n=W.getCoordinates(e,ie.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=l(p(t,C,N),j);if(r!==y){var i=R(r,y,A,C,F);L(i)}},fe=function(e){var n=me&&w?W.getRotatedCoordinates(e,ie.current.getBoundingClientRect()):W.getCoordinates(e,ie.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=l(p(t,C,N),j);if(r!==A){var i=g(r,y,A,N,F);L(i)}},ge=function(e,n){var t=W.getBarCoordinates(e,n,ie.current.getBoundingClientRect()),r=f(t.new,t.min,t.max),i=l(p(r,C,N),j),o=l(A+(i-y),j);if(i<C){var a=C-i;i=C,o=l(o+a,j)}if(o>N){a=o-N;o=N,i=l(i-a,j)}i!==y&&o!==A&&i>=C&&o<=N&&L({from:i,to:o})},Re=function(n){var t;n!==O.BAR?re(e(e({},te),((t={})[n]=!0,t))):re({from:!0,bar:!0,to:!0})},pe=function(n){var t;n!==O.BAR?re(e(e({},te),((t={})[n]=!1,t))):re({from:!1,bar:!1,to:!1})},ve=function(e,n){if(!(w&&e===O.BAR||V)){n.stopPropagation(),k(e),K(e);var t=n.clientX,r=n.clientY,i=n.target.getBoundingClientRect(),o=i.x,a=i.y,l=u((function(n){!function(e){return e===O.FROM?de:e===O.TO?fe:ge}(e)(n,{clientX:t,clientY:r,x:o,y:a})}),4);document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function e(){K(null),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",e)}))}},be=function(e,n){var t=n.target.value;Number.isNaN(Number(t))||function(e){return e===O.FROM?P:U}(e)(t)},Oe=function(e,n){var t=n.target.value,r=l(t,j);if(e===O.FROM){var i=R(r,y,A,C,F);L(i)}if(e===O.TO){i=g(r,y,A,N,F);L(i)}};return n("div",e({className:a((h={},h[T.disabled]=V,h[T.rangeSliderHorizontal]=se,h[T.rangeSliderVertical]=me,h[T.rotatedVerticalRange]=me&&w,h))},{children:[!w&&t(v,{compStyles:$[O.FROM_INPUT],isVerticalOrientation:me,max:N,disabled:V,precision:j,fromInputRef:le,from:y,fromInputValue:H,onInputChange:be,validateInputChange:Oe}),n("div",e({className:a(T.rangeSliderRail,(B={},B[T.rangeSliderRailHorizontal]=se,B[T.rangeSliderRailVertical]=me,B)),ref:ie},{children:[!w&&t("div",e({ref:oe,className:a(T.rangeSliderThumb,m&&T.mobileRangeSliderThumb),style:$[O.FROM],onMouseDown:function(e){return ve(O.FROM,e)},onMouseEnter:function(){Re(O.FROM)},onMouseLeave:function(){pe(O.FROM)}},{children:t("div",{className:T.rangeSliderLabel})})),t("div",e({className:a(T.rangeSliderBar,(I={},I[T.rangeSliderBarHorizontal]=se,I[T.rangeSliderBarVertical]=me,I)),style:$[O.BAR],onMouseDown:function(e){return ve(O.BAR,e)},onMouseEnter:function(){Re(O.BAR)},onMouseLeave:function(){pe(O.BAR)}},{children:t("div",{className:a(T.rangeSliderBarView,(M={},M[T.rangeSliderBarViewHorizontal]=se,M[T.rangeSliderBarViewVertical]=me,M))})})),t("div",e({ref:ae,className:a(T.rangeSliderThumb,m&&T.mobileRangeSliderThumb),style:$[O.TO],onMouseDown:function(e){return ve(O.TO,e)},onMouseEnter:function(){Re(O.TO)},onMouseLeave:function(){pe(O.TO)}},{children:t("div",{className:T.rangeSliderLabel})}))]})),!ce&&t(b,{compStyles:$[O.TO_INPUT],disabled:V,isVerticalOrientation:me,rotated:me&&w,max:N,precision:j,toInputRef:ue,to:A,toInputValue:D,onInputChange:be,validateInputChange:Oe})]}))},B={min:s.number,max:s.number,from:s.number.isRequired,to:s.number.isRequired,orientation:s.oneOf(["horizontal","vertical"]),precision:s.number,minRange:s.number,onChange:s.func,isSingleRange:s.bool,isWithoutInput:s.bool,disabled:s.bool.isRequired};h.propTypes=B,h.defaultProps={min:0,max:100,orientation:"horizontal",precision:0,minRange:0,onChange:function(){},isSingleRange:!1,isWithoutInput:!1};export{h as default};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { TableProps } from '@material-ui/core';
|
|
3
|
+
declare const ResizableTable: {
|
|
4
|
+
({ children, ...rest }: TableProps): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
children: PropTypes.Validator<PropTypes.ReactNodeLike[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
1
9
|
export default ResizableTable;
|
|
2
|
-
declare function ResizableTable({ children, ...rest }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
children: any;
|
|
5
|
-
}): JSX.Element;
|
|
6
|
-
declare namespace ResizableTable {
|
|
7
|
-
namespace propTypes {
|
|
8
|
-
const children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
import PropTypes from "prop-types";
|
|
12
10
|
//# sourceMappingURL=ResizableTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResizableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/ResizableTable.
|
|
1
|
+
{"version":3,"file":"ResizableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/ResizableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAoD,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAMjG,QAAA,MAAM,cAAc;4BAA2B,UAAU,GAAG,WAAW;;;;CAyEtE,CAAC;AAQF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r
|
|
1
|
+
import{__rest as r,__assign as l}from"../../_virtual/_tslib.js";import{jsxs as i,jsx as e}from"react/jsx-runtime";import n from"prop-types";import{Table as o,TableHead as d,TableRow as t,TableCell as u,TableBody as c}from"@material-ui/core";import{useState as p}from"react";import a from"./ResizableTableHeaderCell.js";import v from"./ResizableTableCell.js";var h=function(n){var h,s,m,f,y,b=n.children,j=r(n,["children"]),k=b,x=k[0],C=k[1],R=null===(h=null==C?void 0:C.props)||void 0===h?void 0:h.children,T=null===(y=null===(f=null===(m=null===(s=null==x?void 0:x.props)||void 0===s?void 0:s.children)||void 0===m?void 0:m.props)||void 0===f?void 0:f.children)||void 0===y?void 0:y.reduce((function(r,l){return Array.isArray(l)?r.push.apply(r,l):r.push(l),r}),[]),z=p({}),A=z[0],N=z[1],_=function(r){return N((function(i){return l(l({},i),r)}))};return i(o,l({},j,{children:[e(d,{children:e(t,{children:null==T?void 0:T.map((function(r,i){var n;return r?i===T.length-1?e(u,l({},r.props,{children:null===(n=r.props)||void 0===n?void 0:n.children}),r.key||i):e(a,l({cellName:"cell".concat(i),nextCellName:"cell".concat(i+1),handleWidthsUpdate:_,widths:A},{children:r}),r.key||i):null}))})}),e(c,{children:null==R?void 0:R.map((function(r){var l,i;return e(t,{children:null===(i=null===(l=null==r?void 0:r.props)||void 0===l?void 0:l.children)||void 0===i?void 0:i.map((function(r,l){return r&&e(v,{children:r},r.key||l)}))},r.key)}))})]}))},s={children:n.arrayOf(n.node).isRequired};h.propTypes=s;export{h as default};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
interface ResizableTableCellProps {
|
|
3
|
+
children: JSX.Element;
|
|
4
|
+
}
|
|
5
|
+
declare function ResizableTableCell({ children }: ResizableTableCellProps): JSX.Element;
|
|
4
6
|
declare namespace ResizableTableCell {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
7
|
+
var propTypes: {
|
|
8
|
+
children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
9
|
+
};
|
|
8
10
|
}
|
|
9
11
|
export default ResizableTableCell;
|
|
10
|
-
import PropTypes from "prop-types";
|
|
11
12
|
//# sourceMappingURL=ResizableTableCell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResizableTableCell.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/ResizableTableCell.
|
|
1
|
+
{"version":3,"file":"ResizableTableCell.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/ResizableTableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;CACtB;AAED,iBAAwB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAQ7F;kBARuB,kBAAkB;;;;;eAAlB,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{__assign as r}from"../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";import l from"prop-types";function e(l){var e,o,n=l.children;return n?i(n.type,r({},n.props,{children:i("div",{children:null!==(o=null===(e=null==n?void 0:n.props)||void 0===e?void 0:e.children)&&void 0!==o?o:null})})):null}e.propTypes={children:l.element.isRequired};export{e as default};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
widths: any;
|
|
6
|
-
handleWidthsUpdate: any;
|
|
7
|
-
}): JSX.Element;
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
interface ResizableTableHeaderCellProps extends PropTypes.InferProps<typeof resizableTableHeaderCellPropTypes> {
|
|
3
|
+
}
|
|
4
|
+
declare function ResizableTableHeaderCell({ children, cellName, nextCellName, widths, handleWidthsUpdate, }: ResizableTableHeaderCellProps): JSX.Element;
|
|
8
5
|
declare namespace ResizableTableHeaderCell {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
6
|
+
var propTypes: {
|
|
7
|
+
children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
8
|
+
cellName: PropTypes.Validator<string>;
|
|
9
|
+
nextCellName: PropTypes.Validator<string>;
|
|
10
|
+
widths: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
11
|
+
handleWidthsUpdate: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
+
};
|
|
16
13
|
}
|
|
17
14
|
export default ResizableTableHeaderCell;
|
|
18
|
-
|
|
15
|
+
declare const resizableTableHeaderCellPropTypes: {
|
|
16
|
+
children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
17
|
+
cellName: PropTypes.Validator<string>;
|
|
18
|
+
nextCellName: PropTypes.Validator<string>;
|
|
19
|
+
widths: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
20
|
+
handleWidthsUpdate: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
};
|
|
19
22
|
//# sourceMappingURL=ResizableTableHeaderCell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResizableTableHeaderCell.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/ResizableTableHeaderCell.
|
|
1
|
+
{"version":3,"file":"ResizableTableHeaderCell.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/ResizableTableHeaderCell.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AA+BnC,UAAU,6BAA8B,SAAQ,SAAS,CAAC,UAAU,CAAC,OAAO,iCAAiC,CAAC;CAAG;AAEjH,iBAAwB,wBAAwB,CAAC,EAC/C,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,kBAAkB,GACnB,EAAE,6BAA6B,GAAG,GAAG,CAAC,OAAO,CAqD7C;kBA3DuB,wBAAwB;;;;;;;;;eAAxB,wBAAwB;AA6DhD,QAAA,MAAM,iCAAiC;;;;;;CAMtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e
|
|
1
|
+
import{__assign as e}from"../../_virtual/_tslib.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{useState as t,useEffect as n}from"react";import o from"prop-types";import a from"classnames";import l from"react-draggable";import{makeStyles as d}from"@material-ui/core/styles";import{TableCell as s}from"@material-ui/core";var c=d((function(e){return{resizableColumnHeader:{display:"flex",paddingRight:0,justifyContent:"space-between"},tableResizer:{width:6,borderRadius:10,opacity:.7,cursor:"col-resize",marginRight:-11,marginTop:-16,marginBottom:-16},hovered:{backgroundColor:e.palette.primary.main}}})),u=function(e){var r;return null===(r=document.getElementById(e))||void 0===r?void 0:r.offsetWidth};function m(o){var d,m,p=o.children,f=o.cellName,h=o.nextCellName,v=o.widths,g=o.handleWidthsUpdate,R=c(),b=t(!1),x=b[0],y=b[1],z=t(),C=z[0],N=z[1],q=t(),w=q[0],j=q[1];if(n((function(){var e;N(u("content-".concat(f))+12),j(u("content-".concat(h))+12),g(((e={})[f]=u(f),e))}),[]),!p)return null;return r(s,e({width:v[f],id:f},p.props,{children:i("div",e({className:R.resizableColumnHeader},{children:[r("div",e({id:"content-".concat(f)},{children:null!==(m=null===(d=null==p?void 0:p.props)||void 0===d?void 0:d.children)&&void 0!==m?m:null})),r(l,e({axis:"x",onDrag:function(e,r){!function(e){var r,i=v[f]+e,t=v[h]-e;i<0||i<C||t<w||g(((r={})[f]=i,r[h]=t,r))}(r.deltaX)},position:{x:0},zIndex:999,onStart:function(){y(!0)},onStop:function(){var e;v[f]!==u(f)&&g(((e={})[f]=u(f),e)),y(!1)}},{children:r("div",{className:a(R.tableResizer,x&&R.hovered),onMouseEnter:function(){return y(!0)},onMouseLeave:function(){return y(!1)}})}))]}))}))}var p={children:o.element.isRequired,cellName:o.string.isRequired,nextCellName:o.string.isRequired,widths:o.shape({}).isRequired,handleWidthsUpdate:o.func.isRequired};m.propTypes=p;export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as ResizableTable } from
|
|
1
|
+
export { default as ResizableTable } from './ResizableTable';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ResizableTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
value: any;
|
|
5
|
-
onChange: any;
|
|
6
|
-
onInputChange: any;
|
|
7
|
-
loading: any;
|
|
8
|
-
options: any;
|
|
9
|
-
placeholder: any;
|
|
10
|
-
defaultSelectedGroup: any;
|
|
11
|
-
disabled: any;
|
|
12
|
-
multiple: any;
|
|
13
|
-
groups: any;
|
|
14
|
-
GroupsComponent: any;
|
|
15
|
-
recentSearchesMaxCount: any;
|
|
16
|
-
dataStorageKey: any;
|
|
17
|
-
RecentSearchesComponent: any;
|
|
18
|
-
dataStorage: any;
|
|
19
|
-
}): JSX.Element;
|
|
20
|
-
declare namespace Search {
|
|
21
|
-
namespace propTypes {
|
|
22
|
-
const value: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
|
|
23
|
-
const onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
-
const onInputChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
const loading: PropTypes.Requireable<boolean>;
|
|
26
|
-
const disabled: PropTypes.Requireable<boolean>;
|
|
27
|
-
const multiple: PropTypes.Requireable<boolean>;
|
|
28
|
-
const options: PropTypes.Requireable<any[]>;
|
|
29
|
-
const InputProps: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
30
|
-
const placeholder: PropTypes.Requireable<string>;
|
|
31
|
-
const defaultSelectedGroup: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
32
|
-
const RecentSearchesComponent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
33
|
-
const recentSearchesMaxCount: PropTypes.Requireable<number>;
|
|
34
|
-
const dataStorageKey: PropTypes.Requireable<string>;
|
|
35
|
-
const dataStorage: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
36
|
-
const groups: PropTypes.Requireable<any[]>;
|
|
37
|
-
const GroupsComponent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
38
|
-
}
|
|
39
|
-
namespace defaultProps {
|
|
40
|
-
const InputProps_1: any;
|
|
41
|
-
export { InputProps_1 as InputProps };
|
|
42
|
-
const onInputChange_1: any;
|
|
43
|
-
export { onInputChange_1 as onInputChange };
|
|
44
|
-
const options_1: any[];
|
|
45
|
-
export { options_1 as options };
|
|
46
|
-
const groups_1: any[];
|
|
47
|
-
export { groups_1 as groups };
|
|
48
|
-
const disabled_1: boolean;
|
|
49
|
-
export { disabled_1 as disabled };
|
|
50
|
-
const multiple_1: boolean;
|
|
51
|
-
export { multiple_1 as multiple };
|
|
52
|
-
const loading_1: boolean;
|
|
53
|
-
export { loading_1 as loading };
|
|
54
|
-
const placeholder_1: string;
|
|
55
|
-
export { placeholder_1 as placeholder };
|
|
56
|
-
const defaultSelectedGroup_1: any;
|
|
57
|
-
export { defaultSelectedGroup_1 as defaultSelectedGroup };
|
|
58
|
-
const recentSearchesMaxCount_1: number;
|
|
59
|
-
export { recentSearchesMaxCount_1 as recentSearchesMaxCount };
|
|
60
|
-
const dataStorageKey_1: string;
|
|
61
|
-
export { dataStorageKey_1 as dataStorageKey };
|
|
62
|
-
const dataStorage_1: Storage;
|
|
63
|
-
export { dataStorage_1 as dataStorage };
|
|
64
|
-
const RecentSearchesComponent_1: any;
|
|
65
|
-
export { RecentSearchesComponent_1 as RecentSearchesComponent };
|
|
66
|
-
const GroupsComponent_1: any;
|
|
67
|
-
export { GroupsComponent_1 as GroupsComponent };
|
|
68
|
-
}
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
interface SearchProps extends PropTypes.InferProps<typeof searchPropTypes> {
|
|
69
3
|
}
|
|
70
|
-
|
|
4
|
+
declare const Search: {
|
|
5
|
+
({ value, onChange, onInputChange, loading, options, placeholder, defaultSelectedGroup, disabled, multiple, groups, GroupsComponent, recentSearchesMaxCount, dataStorageKey, RecentSearchesComponent, dataStorage, ...props }: SearchProps): JSX.Element;
|
|
6
|
+
propTypes: {
|
|
7
|
+
value: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
|
|
8
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
9
|
+
onInputChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
+
loading: PropTypes.Requireable<boolean>;
|
|
11
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
12
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
13
|
+
options: PropTypes.Requireable<any[]>;
|
|
14
|
+
InputProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
15
|
+
startAdornment: PropTypes.Requireable<number>;
|
|
16
|
+
}>>;
|
|
17
|
+
placeholder: PropTypes.Requireable<string>;
|
|
18
|
+
defaultSelectedGroup: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
+
id: PropTypes.Requireable<string>;
|
|
20
|
+
name: PropTypes.Requireable<string>;
|
|
21
|
+
}>>;
|
|
22
|
+
RecentSearchesComponent: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
23
|
+
recentSearchesMaxCount: PropTypes.Requireable<number>;
|
|
24
|
+
dataStorageKey: PropTypes.Requireable<string>;
|
|
25
|
+
dataStorage: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
26
|
+
groups: PropTypes.Requireable<any[]>;
|
|
27
|
+
GroupsComponent: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
28
|
+
};
|
|
29
|
+
defaultProps: {
|
|
30
|
+
InputProps: any;
|
|
31
|
+
onInputChange: any;
|
|
32
|
+
options: any[];
|
|
33
|
+
groups: any[];
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
multiple: boolean;
|
|
36
|
+
loading: boolean;
|
|
37
|
+
placeholder: string;
|
|
38
|
+
defaultSelectedGroup: any;
|
|
39
|
+
recentSearchesMaxCount: number;
|
|
40
|
+
dataStorageKey: string;
|
|
41
|
+
dataStorage: Storage;
|
|
42
|
+
RecentSearchesComponent: any;
|
|
43
|
+
GroupsComponent: any;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
declare const searchPropTypes: {
|
|
47
|
+
value: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
|
|
48
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
49
|
+
onInputChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
+
loading: PropTypes.Requireable<boolean>;
|
|
51
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
52
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
53
|
+
options: PropTypes.Requireable<any[]>;
|
|
54
|
+
InputProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
55
|
+
startAdornment: PropTypes.Requireable<number>;
|
|
56
|
+
}>>;
|
|
57
|
+
placeholder: PropTypes.Requireable<string>;
|
|
58
|
+
defaultSelectedGroup: PropTypes.Requireable<PropTypes.InferProps<{
|
|
59
|
+
id: PropTypes.Requireable<string>;
|
|
60
|
+
name: PropTypes.Requireable<string>;
|
|
61
|
+
}>>;
|
|
62
|
+
RecentSearchesComponent: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
63
|
+
recentSearchesMaxCount: PropTypes.Requireable<number>;
|
|
64
|
+
dataStorageKey: PropTypes.Requireable<string>;
|
|
65
|
+
dataStorage: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
66
|
+
groups: PropTypes.Requireable<any[]>;
|
|
67
|
+
GroupsComponent: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
68
|
+
};
|
|
69
|
+
export default Search;
|
|
71
70
|
//# sourceMappingURL=Search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/components/Search/Search.
|
|
1
|
+
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/components/Search/Search.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAwBnC,UAAU,WAAY,SAAQ,SAAS,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC;CAAG;AAE7E,QAAA,MAAM,MAAM;mOAiBT,WAAW,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Q3B,CAAC;AAEF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;CAsBpB,CAAC;AAqBF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e
|
|
1
|
+
import{__rest as e,__assign as n}from"../../_virtual/_tslib.js";import{jsx as o,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as l,useRef as a,useCallback as i,useEffect as u}from"react";import c from"prop-types";import{debounce as s,isEmpty as p}from"lodash";import{Autocomplete as d}from"@material-ui/lab";import{Chip as m,TextField as h,InputAdornment as g,CircularProgress as f,FormControlLabel as C,Checkbox as v}from"@material-ui/core";import{CheckBoxOutlineBlank as S,CheckBox as b,Close as I}from"@material-ui/icons";import y from"../IconButton/index.js";import x from"./components/Listbox.js";import G from"./components/Paper.js";import"./components/RecentSearches.js";import"./components/InputAdornmentLeft.js";import"./components/Groups.js";import k from"./styles.js";var N=o(S,{style:{fontSize:20}}),P=o(b,{style:{fontSize:20}}),R=function(c){var S=c.value,b=c.onChange,R=c.onInputChange,A=c.loading,j=c.options,O=c.placeholder,L=c.defaultSelectedGroup,M=c.disabled,T=c.multiple,z=c.groups,K=c.GroupsComponent,B=c.recentSearchesMaxCount,q=c.dataStorageKey,V=c.RecentSearchesComponent,_=c.dataStorage,F=e(c,["value","onChange","onInputChange","loading","options","placeholder","defaultSelectedGroup","disabled","multiple","groups","GroupsComponent","recentSearchesMaxCount","dataStorageKey","RecentSearchesComponent","dataStorage"]),H=l(S||[]),W=H[0],w=H[1],D=l(""),E=D[0],J=D[1],Q=l(""),U=Q[0],X=Q[1],Y=l(!1),Z=Y[0],$=Y[1],ee=l(L),ne=ee[0],oe=ee[1],te=a(),re=k(),le={popper:re.popper,listbox:re.listbox},ae=null==j?void 0:j.some((function(e){return e.group})),ie=i(s((function(e){return X(e)}),500),[]),ue=function(){J(""),b(null,null)},ce=function(e){var n=z.find((function(n){return n.id===e}));oe(n)},se=function(){oe(null)},pe=function(e){te.current.focus(),J(e)};u((function(){Z&&te.current.focus()}));var de=null==j?void 0:j.sort((function(e,n){var o,t;return null===(o=n.group)||void 0===o?void 0:o.toString().localeCompare(null===(t=e.group)||void 0===t?void 0:t.toString())})),me=p(ne)?de:null==j?void 0:j.filter((function(e){return e.group===ne.name})),he=T&&(null==me?void 0:me.length)===(null==W?void 0:W.length),ge=function(){w(he?[]:me)};u((function(){ie(E),R&&R(E)}),[E]),u((function(){w([])}),[ne]);var fe=function(e,n){"blur"!==n&&$(!1)},Ce=function(){return o(C,{className:re.selectAllCheckbox,onClick:ge,control:o(v,{icon:N,style:{fontSize:20},indeterminate:!he,checkedIcon:P,checked:!0,inputProps:{"aria-label":"All"}}),label:"All"})},ve=i((function(e){return o(G,n({},e,{loading:A,AllSelectComponent:T&&!p(me)&&o(Ce,{}),GroupsComponent:!ne&&ae&&K&&o(K,{onGroupClick:ce,groups:z}),RecentSearchesComponent:V&&o(V,{dataStorage:_,dataStorageKey:q,maxCount:B,isHidden:!p(E),onInputChange:function(e){return J(e)},inputValue:U}),onOutsideClick:fe,onRecentSearchClick:pe}))}),[ne,A,ae,E,he,U]);return o(d,{onOpen:function(){$(!0)},open:Z,onChange:function(e,n){w(n),b(e,n)},fullWidth:!0,disabled:M,onClose:fe,value:W,classes:le,renderInput:function(e){var l;return o(h,n({},e,{inputRef:te,placeholder:O,classes:{root:re.searchInput},InputProps:n(n(n({classes:{root:re.textField}},e.InputProps),F.InputProps),{startAdornment:t(r,{children:[null===(l=F.InputProps)||void 0===l?void 0:l.startAdornment,ne&&o(m,{className:re.selectedGroup,"data-not-migrated-MuiChip":!0,variant:"outlined",label:t("div",n({className:re.selectedGroupLabel},{children:[ne.name,o(I,{id:"removeGroupIcon",className:re.removeIcon,onClick:se})]}))},ne.id),T&&!p(W)&&o("div",n({className:re.selectedLabel},{children:he?"All Selected(".concat(null==W?void 0:W.length,")"):"".concat(null==W?void 0:W.length," Selected")}))]}),endAdornment:t(g,n({position:"end"},{children:[A&&o(f,{color:"primary",size:20}),E&&o(y,n({size:"small",className:re.iconButton,onClick:ue,tooltipProps:{title:"Clear"}},{children:o(I,{className:re.closeIcon})}))]}))})}))},loading:A,options:me,renderGroup:function(e){var r=e.key,l=e.group,a=e.children;return!l||!p(ne)&&T?a:t("div",n({className:re.group},{children:[o(m,{"data-not-migrated-MuiChip":!0,className:re.groupChip,variant:"outlined",label:l},r),a]}))},disableCloseOnSelect:T,multiple:T,renderOption:T&&function(e,n){var r=e.label,l=e.id,a=n.selected;return t("div",{children:[o(v,{disableRipple:!0,icon:N,className:re.checkbox,checkedIcon:P,checked:a}),r]},l)},groupBy:ae&&function(e){return e.group},PaperComponent:ve,ListboxComponent:x,inputValue:E,getOptionLabel:function(e){return e.label},onInputChange:function(e){J((null==e?void 0:e.target.value)||(null==e?void 0:e.target.innerText))},loadingText:o("div",n({className:re.label},{children:"Loading ..."})),noOptionsText:o("div",n({className:re.label},{children:"No Options"}))})},A={value:c.arrayOf(c.shape({})).isRequired,onChange:c.func.isRequired,onInputChange:c.func,loading:c.bool,disabled:c.bool,multiple:c.bool,options:c.array,InputProps:c.shape({startAdornment:c.number}),placeholder:c.string,defaultSelectedGroup:c.shape({id:c.string,name:c.string}),RecentSearchesComponent:c.elementType,recentSearchesMaxCount:c.number,dataStorageKey:c.string,dataStorage:c.shape({}),groups:c.array,GroupsComponent:c.elementType};R.propTypes=A,R.defaultProps={InputProps:null,onInputChange:null,options:[],groups:[],disabled:!1,multiple:!1,loading:!1,placeholder:"Search...",defaultSelectedGroup:null,recentSearchesMaxCount:3,dataStorageKey:"Search:recentSearches",dataStorage:sessionStorage,RecentSearchesComponent:null,GroupsComponent:null};export{R as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default useStyles;
|
|
2
1
|
declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"label" | "option" | "checkbox" | "group" | "listbox" | "popper" | "iconButton" | "searchIcon" | "textField" | "closeIcon" | "searchInput" | "selectedLabel" | "selectedGroup" | "groupChip" | "selectedGroupLabel" | "removeIcon" | "selectAllCheckbox">;
|
|
2
|
+
export default useStyles;
|
|
3
3
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Search/styles.
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Search/styles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,uTAiHZ,CAAC;AAEJ,eAAe,SAAS,CAAC"}
|
|
@@ -1,36 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { SelectProps as MuiSelectProps, MenuProps as MuiMenuProps, FormControlProps as MuiFormControlProps } from '@material-ui/core';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
interface SelectProps extends MuiFormControlProps, PropTypes.InferProps<typeof selectPropTypes> {
|
|
4
|
+
MenuProps?: Partial<MuiMenuProps> & {
|
|
5
|
+
list: string;
|
|
6
|
+
paper: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
declare const Select: {
|
|
10
|
+
(props: SelectProps & MuiSelectProps): JSX.Element;
|
|
11
|
+
propTypes: {
|
|
12
|
+
FormControlProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
13
|
classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
14
|
root: PropTypes.Requireable<string>;
|
|
8
15
|
}>>;
|
|
9
16
|
disabled: PropTypes.Requireable<boolean>;
|
|
10
17
|
variant: PropTypes.Requireable<string>;
|
|
11
18
|
}>>;
|
|
12
|
-
|
|
19
|
+
InputLabelProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
20
|
classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
21
|
root: PropTypes.Requireable<string>;
|
|
15
22
|
disabled: PropTypes.Requireable<string>;
|
|
16
23
|
}>>;
|
|
17
24
|
}>>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
25
|
+
label: PropTypes.Requireable<string>;
|
|
26
|
+
formHelperText: PropTypes.Requireable<string>;
|
|
27
|
+
error: PropTypes.Requireable<boolean>;
|
|
28
|
+
};
|
|
29
|
+
defaultProps: {
|
|
30
|
+
FormControlProps: {};
|
|
31
|
+
InputLabelProps: {};
|
|
32
|
+
label: any;
|
|
33
|
+
formHelperText: any;
|
|
34
|
+
error: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
declare const selectPropTypes: {
|
|
38
|
+
FormControlProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
39
|
+
classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
40
|
+
root: PropTypes.Requireable<string>;
|
|
41
|
+
}>>;
|
|
42
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
43
|
+
variant: PropTypes.Requireable<string>;
|
|
44
|
+
}>>;
|
|
45
|
+
InputLabelProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
46
|
+
classes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
|
+
root: PropTypes.Requireable<string>;
|
|
48
|
+
disabled: PropTypes.Requireable<string>;
|
|
49
|
+
}>>;
|
|
50
|
+
}>>;
|
|
51
|
+
label: PropTypes.Requireable<string>;
|
|
52
|
+
formHelperText: PropTypes.Requireable<string>;
|
|
53
|
+
error: PropTypes.Requireable<boolean>;
|
|
54
|
+
};
|
|
55
|
+
export default Select;
|
|
36
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,IAAI,cAAc,EAC7B,SAAS,IAAI,YAAY,EAEzB,gBAAgB,IAAI,mBAAmB,EAIxC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,SAAS,MAAM,YAAY,CAAC;AA+InC,UAAU,WAAY,SAAQ,mBAAmB,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC;IAC7F,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;QAClC,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAA;CACF;AAED,QAAA,MAAM,MAAM;2CAA0C,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ChE,CAAC;AAEF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;CAiBpB,CAAC;AAYF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"
|
|
1
|
+
import{__rest as e,__assign as o}from"../../_virtual/_tslib.js";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{useMemo as l}from"react";import{makeStyles as i,FormControl as a,InputLabel as n,Select as u,FormHelperText as p}from"@material-ui/core";import d from"prop-types";import s from"uuid/v4";import c from"classnames";var m=i((function(e){return{formControlRoot:{"&:hover":{"& .MuiFormLabel-root":{color:e.palette.primary.contrastText},"& .MuiInput-underline:not(.Mui-disabled), & .MuiFilledInput-underline:not(.Mui-disabled)":{"&::before":{borderBottom:"2px solid ".concat(e.palette.primary.contrastText)}},"& .MuiSvgIcon-root.MuiSelect-icon":{color:e.palette.primary.contrastText}},"& .MuiInputBase-root.Mui-focused":{"& .MuiSvgIcon-root.MuiSelect-icon":{color:e.palette.primary.main}},"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::before":{borderBottom:"1px solid ".concat(e.palette.primary.text6)},"&.Mui-disabled":{"&::before":{opacity:"0.4",borderBottom:"1px solid ".concat(e.palette.primary.text6)},"&::after":{opacity:"0.4"}}},"& .MuiSelect-root":{"&.Mui-disabled":{color:e.palette.primary.contrastText,opacity:"0.4"}},"& .MuiFormLabel-root":{color:e.palette.primary.text6,"&.Mui-focused":{color:e.palette.primary.main},"&.Mui-disabled.MuiInputLabel-root":{color:e.palette.primary.text6,opacity:"0.4"}},"& .MuiSelect-icon.Mui-disabled":{color:e.palette.primary.contrastText,opacity:"0.4"},"& .MuiFormHelperText-root":{color:e.palette.primary.text6,"&.Mui-disabled":{opacity:"0.4"}},"& .MuiFilledInput-root":{backgroundColor:e.palette.background.b6,"&:hover":{backgroundColor:e.palette.background.b7},"&.Mui-disabled":{backgroundColor:e.palette.background.b6,opacity:"0.4"}},"& .MuiInputLabel-filled":{left:2},"& .MuiSelect-filled":{paddingLeft:14},"& .MuiSvgIcon-root.MuiSelect-icon":{color:e.palette.primary.text6}},menuList:{backgroundColor:e.palette.background.b9,"& .MuiMenuItem-root":{"&.Mui-selected":{backgroundColor:e.palette.primary.text9}}},error:{"&:hover":{"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::after":{borderBottom:"2px solid ".concat(e.palette.error.main)}},"& .MuiInput-underline.Mui-disabled, & .MuiFilledInput-underline.Mui-disabled":{"&::before":{borderBottom:"1px solid ".concat(e.palette.error.main)},"&::after":{display:"none"}},"& .MuiOutlinedInput-root.Mui-error:not(.Mui-disabled) .MuiOutlinedInput-notchedOutline":{borderWidth:2}},"& .MuiFormLabel-root.MuiInputLabel-root":{color:e.palette.error.main,"&.Mui-focused":{color:e.palette.error.main},"&.Mui-disabled":{color:e.palette.error.main}},"& .MuiFormHelperText-root":{color:e.palette.error.main},"& .MuiInput-underline, & .MuiFilledInput-underline":{"&::after":{borderBottom:"1px solid ".concat(e.palette.error.main)},"&.Mui-disabled::after":{display:"none"},"&.Mui-disabled::before":{borderBottom:"1px solid ".concat(e.palette.error.main)}},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.error.main,opacity:"0.4"}}}})),b=function(i){var d,b,M,f,I,x,y=i.FormControlProps,v=i.InputLabelProps,g=i.label,F=i.formHelperText,P=e(i,["FormControlProps","InputLabelProps","label","formHelperText"]),h=l(s,[]),L=m();return r(a,o({},y,{classes:o(o({},y.classes),{root:c(null===(M=y.classes)||void 0===M?void 0:M.root,L.formControlRoot,(d={},d[L.error]=P.error,d))}),disabled:y.disabled||P.disabled},{children:[g&&t(n,o({id:h},v,{children:g})),t(u,o({},P,{labelId:h,label:g,MenuProps:o(o({},null==P?void 0:P.MenuProps),{classes:o(o({},null===(f=null==P?void 0:P.MenuProps)||void 0===f?void 0:f.classes),{paper:c(null===(I=null==P?void 0:P.MenuProps)||void 0===I?void 0:I.paper,(b={},b[L.outlinedMenuPaper]="outlined"===y.variant,b)),list:c(null===(x=null==P?void 0:P.MenuProps)||void 0===x?void 0:x.list,L.menuList)})})})),F&&t(p,{children:F})]}))},M={FormControlProps:d.shape({classes:d.shape({root:d.string}),disabled:d.bool,variant:d.oneOf(["outlined","filled","standard"])}),InputLabelProps:d.shape({classes:d.shape({root:d.string,disabled:d.string})}),label:d.string,formHelperText:d.string,error:d.bool};b.propTypes=M,b.defaultProps={FormControlProps:{},InputLabelProps:{},label:null,formHelperText:null,error:!1};export{b as default};
|