@corva/ui 0.49.0-3 → 0.49.0-4

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 (231) hide show
  1. package/components/AddComment/Popover.js +1 -1
  2. package/components/AddComment/components/Content.js +1 -1
  3. package/components/Annotations/components/AnnotationsList/components/AnnotationComments/index.d.ts +1 -1
  4. package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.d.ts +2 -2
  5. package/components/Annotations/components/AnnotationsList/index.d.ts +3 -3
  6. package/components/AppVersionsSelect/AppVersionsSelect.d.ts +1 -1
  7. package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
  8. package/components/AssetEditor/AssetEditorAutocomplete.d.ts +4 -4
  9. package/components/AssetEditor/SingleAssetEditor.d.ts +2 -2
  10. package/components/Attachment/index.d.ts +2 -2
  11. package/components/Avatar/index.d.ts +81 -46
  12. package/components/Avatar/index.d.ts.map +1 -1
  13. package/components/Avatar/index.js +1 -1
  14. package/components/BICOffsetPickerDialog/index.js +1 -1
  15. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  16. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  17. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  18. package/components/Chart/options.d.ts +10 -2
  19. package/components/Chart/options.d.ts.map +1 -1
  20. package/components/Chart/tooltip.d.ts +2 -0
  21. package/components/Chart/tooltip.d.ts.map +1 -0
  22. package/components/CollapsableSidebar.d.ts +3 -3
  23. package/components/ColorPicker/ColorPicker.d.ts +2 -43
  24. package/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  25. package/components/ColorPicker/ColorPicker.js +1 -1
  26. package/components/ColorPicker/index.d.ts +1 -1
  27. package/components/ColorPicker/index.d.ts.map +1 -1
  28. package/components/ColorPickerPalette/ColorPickerPalette.d.ts +2 -17
  29. package/components/ColorPickerPalette/ColorPickerPalette.d.ts.map +1 -1
  30. package/components/Comment/CommentIcon/index.d.ts +2 -1
  31. package/components/Comment/CommentIcon/index.d.ts.map +1 -1
  32. package/components/Comment/index.d.ts +3 -3
  33. package/components/CommentInput/index.d.ts +5 -5
  34. package/components/CommentsInfo/index.d.ts +3 -3
  35. package/components/ConfirmationDialog.d.ts +3 -3
  36. package/components/Counter/index.d.ts +35 -24
  37. package/components/Counter/index.d.ts.map +1 -1
  38. package/components/Counter/index.js +1 -1
  39. package/components/DateTimePicker/index.d.ts +14 -21
  40. package/components/DateTimePicker/index.d.ts.map +1 -1
  41. package/components/DateTimePicker/index.js +1 -1
  42. package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts +31 -25
  43. package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts.map +1 -1
  44. package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
  45. package/components/DevCenter/AppSettingsPopover/index.d.ts +1 -1
  46. package/components/DevCenter/AppSettingsPopover/index.d.ts.map +1 -1
  47. package/components/DevCenter/AppSideBar/AppSideBar.d.ts +58 -66
  48. package/components/DevCenter/AppSideBar/AppSideBar.d.ts.map +1 -1
  49. package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
  50. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  51. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
  52. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  53. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
  54. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
  55. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  56. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.d.ts +2 -2
  57. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  58. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  59. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  60. package/components/DocumentViewer/DocumentViewer.js +1 -1
  61. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  62. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  63. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  64. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  65. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  66. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  67. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  68. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  69. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  70. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  71. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  72. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  73. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  74. package/components/Drillstring/BHAComponentsTable/components/sharedStyles.d.ts +1 -1
  75. package/components/EditableItem/EditableItem/index.d.ts +33 -37
  76. package/components/EditableItem/EditableItem/index.d.ts.map +1 -1
  77. package/components/EditableItem/EditableItem/index.js +1 -1
  78. package/components/EmbeddedApp/DevCenterEmbeddedApp.d.ts +1 -1
  79. package/components/EmbeddedApp/EmbeddedApp.d.ts +1 -1
  80. package/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  81. package/components/FeedItem/FeedItem.d.ts +2 -2
  82. package/components/FeedItem/feedItemTypes/DepthCommentFeedItem.d.ts +1 -1
  83. package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/utils.d.ts +20 -2
  84. package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/utils.d.ts.map +1 -1
  85. package/components/FeedItem/feedItemTypes/TracesMemoFeedItem.d.ts +1 -1
  86. package/components/FilePreview/index.d.ts +1 -1
  87. package/components/FilesLoader/FilesLoader.d.ts +49 -58
  88. package/components/FilesLoader/FilesLoader.d.ts.map +1 -1
  89. package/components/FilesLoader/FilesLoader.js +1 -1
  90. package/components/FilesLoader/Icons/IconWarning.d.ts +1 -1
  91. package/components/FilesLoader/Icons/IconWarning.js +1 -1
  92. package/components/FilesLoader/index.d.ts +2 -2
  93. package/components/FilesLoader/index.d.ts.map +1 -1
  94. package/components/FilesLoader/useStyles.d.ts +1 -1
  95. package/components/FilesLoader/useStyles.d.ts.map +1 -1
  96. package/components/FilesLoader/useStyles.js +1 -1
  97. package/components/IconButton/index.d.ts +33 -10
  98. package/components/IconButton/index.d.ts.map +1 -1
  99. package/components/IconButton/index.js +1 -1
  100. package/components/IconMenu/index.d.ts +4 -4
  101. package/components/LoadingIndicator/FullScreenLoadingIndicator.d.ts +14 -17
  102. package/components/LoadingIndicator/FullScreenLoadingIndicator.d.ts.map +1 -1
  103. package/components/LoadingIndicator/FullScreenLoadingIndicator.js +1 -1
  104. package/components/LoadingIndicator/InlineLoadingIndicator.d.ts +14 -17
  105. package/components/LoadingIndicator/InlineLoadingIndicator.d.ts.map +1 -1
  106. package/components/LoadingIndicator/InlineLoadingIndicator.js +1 -1
  107. package/components/LoadingIndicator/Loader.d.ts +14 -15
  108. package/components/LoadingIndicator/Loader.d.ts.map +1 -1
  109. package/components/LoadingIndicator/Loader.js +1 -1
  110. package/components/LoadingIndicator/LoadingIndicator.d.ts +18 -26
  111. package/components/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
  112. package/components/LoadingIndicator/LoadingIndicator.js +1 -1
  113. package/components/LoadingIndicator/types.d.ts +25 -0
  114. package/components/LoadingIndicator/types.d.ts.map +1 -0
  115. package/components/LoadingIndicator/types.js +1 -0
  116. package/components/Modal/CorvaModal.d.ts +60 -69
  117. package/components/Modal/CorvaModal.d.ts.map +1 -1
  118. package/components/Modal/CorvaModal.js +1 -1
  119. package/components/Modal/Modal.d.ts +2 -1
  120. package/components/Modal/Modal.d.ts.map +1 -1
  121. package/components/Modal/Modal.js +1 -1
  122. package/components/Modal/index.d.ts +1 -1
  123. package/components/Modal/index.d.ts.map +1 -1
  124. package/components/Notifications/components/Toast.d.ts +1 -1
  125. package/components/OffsetWellButton/OffsetWellButton.d.ts +29 -28
  126. package/components/OffsetWellButton/OffsetWellButton.d.ts.map +1 -1
  127. package/components/OffsetWellButton/OffsetWellButton.js +1 -1
  128. package/components/OffsetWellButton/index.d.ts +1 -1
  129. package/components/OffsetWellButton/index.d.ts.map +1 -1
  130. package/components/OffsetWellChips/Chip.d.ts +19 -29
  131. package/components/OffsetWellChips/Chip.d.ts.map +1 -1
  132. package/components/OffsetWellChips/Chip.js +1 -1
  133. package/components/OffsetWellChips/ChipsContainer.d.ts +9 -11
  134. package/components/OffsetWellChips/ChipsContainer.d.ts.map +1 -1
  135. package/components/OffsetWellChips/ChipsContainer.js +1 -1
  136. package/components/OffsetWellChips/index.d.ts +2 -2
  137. package/components/OffsetWellChips/index.d.ts.map +1 -1
  138. package/components/OffsetWellChips/types.d.ts +17 -0
  139. package/components/OffsetWellChips/types.d.ts.map +1 -0
  140. package/components/OffsetWellChips/types.js +1 -0
  141. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  142. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  143. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  144. package/components/OffsetWellPickerV2/components/Table/MetricsSelect.d.ts +2 -2
  145. package/components/OffsetWellPickerV2/constants.d.ts +15 -2
  146. package/components/OffsetWellPickerV2/constants.d.ts.map +1 -1
  147. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  148. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  149. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsSelect.d.ts +1 -1
  150. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.d.ts +15 -2
  151. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.d.ts.map +1 -1
  152. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  153. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  154. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  155. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  156. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  157. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  158. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  159. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  160. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  161. package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  162. package/components/OffsetWellPickerV4/constants.d.ts +15 -2
  163. package/components/OffsetWellPickerV4/constants.d.ts.map +1 -1
  164. package/components/ParameterCharts/AddEditTrack.d.ts +2 -2
  165. package/components/ParameterCharts/components/DataLoadingIndicator.d.ts +1 -1
  166. package/components/ParameterCharts/components/TrackSettings.d.ts +1 -1
  167. package/components/PostPreviewDialog/index.d.ts +5 -5
  168. package/components/RangeSlider/RangeSlider.d.ts +42 -34
  169. package/components/RangeSlider/RangeSlider.d.ts.map +1 -1
  170. package/components/RangeSlider/RangeSlider.js +1 -1
  171. package/components/ResizableTable/ResizableTable.d.ts +8 -10
  172. package/components/ResizableTable/ResizableTable.d.ts.map +1 -1
  173. package/components/ResizableTable/ResizableTable.js +1 -1
  174. package/components/ResizableTable/ResizableTableCell.d.ts +8 -7
  175. package/components/ResizableTable/ResizableTableCell.d.ts.map +1 -1
  176. package/components/ResizableTable/ResizableTableCell.js +1 -1
  177. package/components/ResizableTable/ResizableTableHeaderCell.d.ts +18 -15
  178. package/components/ResizableTable/ResizableTableHeaderCell.d.ts.map +1 -1
  179. package/components/ResizableTable/ResizableTableHeaderCell.js +1 -1
  180. package/components/ResizableTable/index.d.ts +1 -1
  181. package/components/ResizableTable/index.d.ts.map +1 -1
  182. package/components/Search/Search.d.ts +68 -69
  183. package/components/Search/Search.d.ts.map +1 -1
  184. package/components/Search/Search.js +1 -1
  185. package/components/Search/styles.d.ts +1 -1
  186. package/components/Search/styles.d.ts.map +1 -1
  187. package/components/Select/index.d.ts +44 -24
  188. package/components/Select/index.d.ts.map +1 -1
  189. package/components/Select/index.js +1 -1
  190. package/components/SettingEditors/ColorEditor/index.d.ts +82 -45
  191. package/components/SettingEditors/ColorEditor/index.d.ts.map +1 -1
  192. package/components/SettingEditors/ColorEditor/index.js +1 -1
  193. package/components/SettingEditors/DropdownEditor/index.d.ts +1 -1
  194. package/components/SettingEditors/RadioEditor/index.d.ts +25 -21
  195. package/components/SettingEditors/RadioEditor/index.d.ts.map +1 -1
  196. package/components/SettingEditors/RadioEditor/index.js +1 -1
  197. package/components/StageDesignVActual/ElementsComparison/ElementsComparison.d.ts +1 -1
  198. package/components/StageDesignVActual/ElementsComparison/ElementsComparison.d.ts.map +1 -1
  199. package/components/StageDesignVActual/ElementsComparison/utils.d.ts +4 -1
  200. package/components/StageDesignVActual/ElementsComparison/utils.d.ts.map +1 -1
  201. package/components/Stepper/Step.d.ts +37 -42
  202. package/components/Stepper/Step.d.ts.map +1 -1
  203. package/components/Stepper/Step.js +1 -1
  204. package/components/Stepper/Stepper.d.ts +29 -18
  205. package/components/Stepper/Stepper.d.ts.map +1 -1
  206. package/components/Stepper/Stepper.js +1 -1
  207. package/components/Stepper/StepsWrapper.d.ts +16 -14
  208. package/components/Stepper/StepsWrapper.d.ts.map +1 -1
  209. package/components/Stepper/StepsWrapper.js +1 -1
  210. package/components/SwitchControl/index.d.ts +6 -93
  211. package/components/SwitchControl/index.d.ts.map +1 -1
  212. package/components/Template/TemplateSharingDialog/ChipSelector.d.ts +1 -1
  213. package/components/TextField/index.d.ts +1 -1
  214. package/components/Typography.d.ts +16 -16
  215. package/components/UserMention/index.d.ts +1 -1
  216. package/constants/goals.d.ts +31 -4
  217. package/constants/goals.d.ts.map +1 -1
  218. package/constants/wellSummary.d.ts +14 -0
  219. package/constants/wellSummary.d.ts.map +1 -1
  220. package/hocs/withMUIProvidersHOC.d.ts +1 -1
  221. package/package.json +1 -1
  222. package/types.d.ts +1 -0
  223. package/utils/accuracy.d.ts +1 -1
  224. package/utils/accuracy.d.ts.map +1 -1
  225. package/utils/casing/conversion.d.ts +1 -1
  226. package/utils/casing/conversion.d.ts.map +1 -1
  227. package/utils/completion.d.ts +1 -1
  228. package/utils/completion.d.ts.map +1 -1
  229. package/utils/goals.d.ts +3 -3
  230. package/utils/goals.d.ts.map +1 -1
  231. package/utils/mapbox.d.ts +1 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as i}from"react";import o from"classnames";import{round as a,throttle as u}from"lodash";import l from"prop-types";import{isMobileDetected as s}from"../../utils/mobileDetect.js";import{horizontalStrategy as m}from"./strategies/horizontal.js";import{verticalStrategy as c}from"./strategies/vertical.js";import{calculatePercentForValue as f,updateFromValue as d,updateToValue as g,calculateValueFromPercent as p}from"./utils.js";import R from"./inputs/FromInput.js";import O from"./inputs/ToInput.js";import{RangeSliderControl as b,RangeSliderOrientation as v}from"./constants.js";import S from"./RangeSlider.css.js";import{jsxs as h,jsx as T}from"react/jsx-runtime";function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function B(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var I=function(l){var y,I,M,j,C=l.min,N=l.max,w=l.from,A=l.to,P=l.minRange,F=l.disabled,V=l.onChange,L=l.orientation,x=l.precision,E=l.isSingleRange,D=l.isWithoutInput,z=t(null),H=n(z,2),U=H[0],_=H[1],W=t(null),q=n(W,2),X=q[0],Y=q[1],Z=t(null),k=n(Z,2),G=k[0],J=k[1],K=t(b.FROM),Q=n(K,2),$=Q[0],ee=Q[1],ne=t(null),te=n(ne,2),re=te[0],ie=te[1],oe=t({}),ae=n(oe,2),ue=ae[0],le=ae[1],se=t({from:!1,bar:!1,to:!1}),me=n(se,2),ce=me[0],fe=me[1],de=r(null),ge=r(null),pe=r(null),Re=r(null),Oe=r(null),be=L===v.HORIZONTAL,ve=L===v.VERTICAL,Se=E&&D;i((function(){L===v.HORIZONTAL&&J(m),L===v.VERTICAL&&J(c)}),[L]),i((function(){E&&V({from:0,to:A})}),[E]),i((function(){if(G){var n,t=a(w,x),r=a(A,x),i=a(C,x),o=a(N,x),u=f(t,i,o),l=f(r,i,o);le((e(n={},b.FROM,G.getThumbStyles(u,$===b.FROM)),e(n,b.TO,G.getThumbStyles(l,$===b.TO)),e(n,b.BAR,G.getBarStyles(u,l)),e(n,b.FROM_INPUT,G.getInputStyles(re===b.FROM||re===b.BAR||ce.from)),e(n,b.TO_INPUT,G.getInputStyles(re===b.TO||re===b.BAR||ce.to)),n)),_(t.toString()),Y(r.toString())}}),[G,C,N,w,A,re,ce]);var he=function(e){var n=G.getCoordinates(e,de.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=a(p(t,C,N),x);if(r!==w){var i=d(r,w,A,C,P);V(i)}},Te=function(e){var n=ve&&E?G.getRotatedCoordinates(e,de.current.getBoundingClientRect()):G.getCoordinates(e,de.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=a(p(t,C,N),x);if(r!==A){var i=g(r,w,A,N,P);V(i)}},ye=function(e,n){var t=G.getBarCoordinates(e,n,de.current.getBoundingClientRect()),r=f(t.new,t.min,t.max),i=a(p(r,C,N),x),o=a(A+(i-w),x);if(i<C){var u=C-i;i=C,o=a(o+u,x)}if(o>N){var l=o-N;o=N,i=a(i-l,x)}i!==w&&o!==A&&i>=C&&o<=N&&V({from:i,to:o})},Be=function(n){n!==b.BAR?fe(B(B({},ce),{},e({},n,!0))):fe({from:!0,bar:!0,to:!0})},Ie=function(n){n!==b.BAR?fe(B(B({},ce),{},e({},n,!1))):fe({from:!1,bar:!1,to:!1})},Me=function(e,n){if(!(E&&e===b.BAR||F)){n.stopPropagation(),ee(e),ie(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===b.FROM?he:e===b.TO?Te:ye}(e)(n,{clientX:t,clientY:r,x:o,y:a})}),4);document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function e(){ie(null),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",e)}))}},je=function(e,n){var t=n.target.value;Number.isNaN(Number(t))||function(e){return e===b.FROM?_:Y}(e)(t)},Ce=function(e,n){var t=n.target.value,r=a(t,x);if(e===b.FROM){var i=d(r,w,A,C,P);V(i)}if(e===b.TO){var o=g(r,w,A,N,P);V(o)}};return h("div",{className:o((y={},e(y,S.disabled,F),e(y,S.rangeSliderHorizontal,be),e(y,S.rangeSliderVertical,ve),e(y,S.rotatedVerticalRange,ve&&E),y)),children:[!E&&T(R,{compStyles:ue[b.FROM_INPUT],isVerticalOrientation:ve,max:N,disabled:F,precision:x,fromInputRef:Re,from:w,fromInputValue:U,onInputChange:je,validateInputChange:Ce}),h("div",{className:o(S.rangeSliderRail,(I={},e(I,S.rangeSliderRailHorizontal,be),e(I,S.rangeSliderRailVertical,ve),I)),ref:de,children:[!E&&T("div",{ref:ge,className:o(S.rangeSliderThumb,s&&S.mobileRangeSliderThumb),style:ue[b.FROM],onMouseDown:function(e){return Me(b.FROM,e)},onMouseEnter:function(){Be(b.FROM)},onMouseLeave:function(){Ie(b.FROM)},children:T("div",{className:S.rangeSliderLabel})}),T("div",{className:o(S.rangeSliderBar,(M={},e(M,S.rangeSliderBarHorizontal,be),e(M,S.rangeSliderBarVertical,ve),M)),style:ue[b.BAR],onMouseDown:function(e){return Me(b.BAR,e)},onMouseEnter:function(){Be(b.BAR)},onMouseLeave:function(){Ie(b.BAR)},children:T("div",{className:o(S.rangeSliderBarView,(j={},e(j,S.rangeSliderBarViewHorizontal,be),e(j,S.rangeSliderBarViewVertical,ve),j))})}),T("div",{ref:pe,className:o(S.rangeSliderThumb,s&&S.mobileRangeSliderThumb),style:ue[b.TO],onMouseDown:function(e){return Me(b.TO,e)},onMouseEnter:function(){Be(b.TO)},onMouseLeave:function(){Ie(b.TO)},children:T("div",{className:S.rangeSliderLabel})})]}),!Se&&T(O,{compStyles:ue[b.TO_INPUT],disabled:F,isVerticalOrientation:ve,rotated:ve&&E,max:N,precision:x,toInputRef:Oe,to:A,toInputValue:X,onInputChange:je,validateInputChange:Ce})]})};I.propTypes={min:l.number,max:l.number,from:l.number.isRequired,to:l.number.isRequired,orientation:l.oneOf(["horizontal","vertical"]),precision:l.number,minRange:l.number,onChange:l.func,isSingleRange:l.bool,isWithoutInput:l.bool},I.defaultProps={min:0,max:100,orientation:"horizontal",precision:0,minRange:0,onChange:function(){},isSingleRange:!1,isWithoutInput:!1};export{I as default};
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.js"],"names":[],"mappings":";AAQA;;;gBAyEC"}
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 from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import n from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import l from"prop-types";import{Table as o,TableHead as i,TableRow as c,TableCell as p,TableBody as u}from"@material-ui/core";import{useState as a}from"react";import d from"./ResizableTableHeaderCell.js";import s from"./ResizableTableCell.js";import{jsxs as m,jsx as f}from"react/jsx-runtime";var h=["children"];function b(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var y=function(r){var l,b,y,O,j,P=r.children,g=t(r,h),w=n(P,2),k=w[0],A=w[1],C=null==A||null===(l=A.props)||void 0===l?void 0:l.children,D=null==k||null===(b=k.props)||void 0===b||null===(y=b.children)||void 0===y||null===(O=y.props)||void 0===O||null===(j=O.children)||void 0===j?void 0:j.reduce((function(r,n){return Array.isArray(n)?r.push.apply(r,e(n)):r.push(n),r}),[]),T=a({}),x=n(T,2),R=x[0],z=x[1],E=function(r){return z((function(e){return v(v({},e),r)}))};return m(o,v(v({},g),{},{children:[f(i,{children:f(c,{children:null==D?void 0:D.map((function(r,e){var n;return r?e===D.length-1?f(p,v(v({},r.props),{},{children:null===(n=r.props)||void 0===n?void 0:n.children}),r.key||e):f(d,{cellName:"cell".concat(e),nextCellName:"cell".concat(e+1),handleWidthsUpdate:E,widths:R,children:r},r.key||e):null}))})}),f(u,{children:null==C?void 0:C.map((function(r){var e,n;return f(c,{children:null==r||null===(e=r.props)||void 0===e||null===(n=e.children)||void 0===n?void 0:n.map((function(r,e){return r&&f(s,{children:r},r.key||e)}))},r.key)}))})]}))};y.propTypes={children:l.node.isRequired};export{y as default};
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
- declare function ResizableTableCell({ children }: {
2
- children: any;
3
- }): JSX.Element;
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
- namespace propTypes {
6
- const children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
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.js"],"names":[],"mappings":"AAEA;;gBAQC"}
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 e from"@babel/runtime/helpers/defineProperty";import r from"prop-types";import{jsx as t}from"react/jsx-runtime";function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function i(e){var r,n,i=e.children;return i?t(i.type,o(o({},i.props),{},{children:t("div",{children:null!==(r=null==i||null===(n=i.props)||void 0===n?void 0:n.children)&&void 0!==r?r:null})})):null}i.propTypes={children:r.node.isRequired};export{i as default};
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
- declare function ResizableTableHeaderCell({ children, cellName, nextCellName, widths, handleWidthsUpdate, }: {
2
- children: any;
3
- cellName: any;
4
- nextCellName: any;
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
- namespace propTypes {
10
- const children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
11
- const cellName: PropTypes.Validator<string>;
12
- const nextCellName: PropTypes.Validator<string>;
13
- const widths: PropTypes.Validator<NonNullable<PropTypes.InferProps<{}>>>;
14
- const handleWidthsUpdate: PropTypes.Validator<(...args: any[]) => any>;
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
- import PropTypes from "prop-types";
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.js"],"names":[],"mappings":"AAgCA;;;;;;gBA0DC"}
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 from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n}from"react";import i from"prop-types";import o from"classnames";import a from"react-draggable";import{makeStyles as c}from"@material-ui/core/styles";import{TableCell as l}from"@material-ui/core";import{jsx as s,jsxs as d}from"react/jsx-runtime";function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var m=c((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}}})),f=function(e){var r;return null===(r=document.getElementById(e))||void 0===r?void 0:r.offsetWidth};function h(i){var c,u,h=i.children,b=i.cellName,y=i.nextCellName,g=i.widths,v=i.handleWidthsUpdate,O=m(),j=t(!1),w=r(j,2),x=w[0],R=w[1],P=t(),z=r(P,2),C=z[0],N=z[1],q=t(),D=r(q,2),E=D[0],S=D[1];if(n((function(){N(f("content-".concat(b))+12),S(f("content-".concat(y))+12),v(e({},b,f(b)))}),[]),!h)return null;return s(l,p(p({width:g[b],id:b},h.props),{},{children:d("div",{className:O.resizableColumnHeader,children:[s("div",{id:"content-".concat(b),children:null!==(c=null==h||null===(u=h.props)||void 0===u?void 0:u.children)&&void 0!==c?c:null}),s(a,{axis:"x",onDrag:function(r,t){var n=t.deltaX;t.x,t.lastX,function(r){var t,n=g[b]+r,i=g[y]-r;n<0||n<C||i<E||v((e(t={},b,n),e(t,y,i),t))}(n)},position:{x:0},zIndex:999,onStart:function(){R(!0)},onStop:function(){g[b]!==f(b)&&v(e({},b,f(b))),R(!1)},children:s("div",{className:o(O.tableResizer,x&&O.hovered),onMouseEnter:function(){return R(!0)},onMouseLeave:function(){return R(!1)}})})]})}))}h.propTypes={children:i.node.isRequired,cellName:i.string.isRequired,nextCellName:i.string.isRequired,widths:i.shape({}).isRequired,handleWidthsUpdate:i.func.isRequired};export{h as default};
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 "./ResizableTable";
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.js"],"names":[],"mappings":""}
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
- export default Search;
2
- declare function Search({ value, onChange, onInputChange, loading, options, placeholder, defaultSelectedGroup, disabled, multiple, groups, GroupsComponent, recentSearchesMaxCount, dataStorageKey, RecentSearchesComponent, dataStorage, ...props }: {
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
- import PropTypes from "prop-types";
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.js"],"names":[],"mappings":";AAyBA;;;;;;;;;;;;;;;;;gBA6RC"}
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 from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/objectWithoutProperties";import{useState as t,useRef as r,useCallback as l,useEffect as a}from"react";import i from"prop-types";import{debounce as c,isEmpty as u}from"lodash";import{Autocomplete as p}from"@material-ui/lab";import{Chip as s,TextField as d,InputAdornment as m,CircularProgress as f,FormControlLabel as h,Checkbox as g}from"@material-ui/core";import{CheckBoxOutlineBlank as b,CheckBox as v,Close as C}from"@material-ui/icons";import S from"../IconButton/index.js";import y from"./components/Listbox.js";import O from"./components/Paper.js";import"./components/RecentSearches.js";import"./components/InputAdornmentLeft.js";import"./components/Groups.js";import I from"./styles.js";import{jsx as P,jsxs as j,Fragment as x}from"react/jsx-runtime";var G=["value","onChange","onInputChange","loading","options","placeholder","defaultSelectedGroup","disabled","multiple","groups","GroupsComponent","recentSearchesMaxCount","dataStorageKey","RecentSearchesComponent","dataStorage"];function k(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function N(n){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?k(Object(t),!0).forEach((function(o){e(n,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var R=P(b,{style:{fontSize:20}}),A=P(v,{style:{fontSize:20}}),L=function(e){var i=e.value,b=e.onChange,v=e.onInputChange,k=e.loading,L=e.options,w=e.placeholder,M=e.defaultSelectedGroup,z=e.disabled,K=e.multiple,T=e.groups,D=e.GroupsComponent,B=e.recentSearchesMaxCount,q=e.dataStorageKey,E=e.RecentSearchesComponent,V=e.dataStorage,W=o(e,G),F=t(i||[]),H=n(F,2),J=H[0],Q=H[1],U=t(""),X=n(U,2),Y=X[0],Z=X[1],$=t(""),_=n($,2),ee=_[0],ne=_[1],oe=t(!1),te=n(oe,2),re=te[0],le=te[1],ae=t(M),ie=n(ae,2),ce=ie[0],ue=ie[1],pe=r(),se=I(),de={popper:se.popper,paper:se.paper,listbox:se.listbox},me=null==L?void 0:L.some((function(e){return e.group})),fe=l(c((function(e){return ne(e)}),500),[]),he=function(){Z(""),b(null,null)},ge=function(e){var n=T.find((function(n){return n.id===e}));ue(n)},be=function(){ue(null)},ve=function(e){pe.current.focus(),Z(e)};a((function(){re&&pe.current.focus()}));var Ce=null==L?void 0:L.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())})),Se=u(ce)?Ce:null==L?void 0:L.filter((function(e){return e.group===ce.name})),ye=K&&(null==Se?void 0:Se.length)===(null==J?void 0:J.length),Oe=function(){Q(ye?[]:Se)};a((function(){fe(Y),v&&v(Y)}),[Y]),a((function(){Q([])}),[ce]);var Ie=function(e,n){"blur"!==n&&le(!1)},Pe=function(){return P(h,{className:se.selectAllCheckbox,onClick:Oe,control:P(g,{icon:R,style:{fontSize:20},indeterminate:!ye,checkedIcon:A,checked:!0,inputProps:{"aria-label":"All"}}),label:"All"})},je=l((function(e){return P(O,N(N({},e),{},{loading:k,AllSelectComponent:K&&!u(Se)&&P(Pe,{}),GroupsComponent:!ce&&me&&D&&P(D,{onGroupClick:ge,groups:T}),RecentSearchesComponent:E&&P(E,{dataStorage:V,dataStorageKey:q,maxCount:B,isHidden:!u(Y),onInputChange:function(e){return Z(e)},inputValue:ee}),onOutsideClick:Ie,onRecentSearchClick:ve}))}),[ce,k,me,Y,ye,ee]);return P(p,{onOpen:function(){le(!0)},open:re,onChange:function(e,n){Q(n),b(e,n)},fullWidth:!0,disabled:z,onClose:Ie,value:J,classes:de,renderInput:function(e){var n;return P(d,N(N({},e),{},{inputRef:pe,placeholder:w,classes:{root:se.searchInput},InputProps:N(N(N({classes:{root:se.textField}},e.InputProps),W.InputProps),{},{startAdornment:j(x,{children:[null===(n=W.InputProps)||void 0===n?void 0:n.startAdornment,ce&&P(s,{className:se.selectedGroup,"data-not-migrated-MuiChip":!0,variant:"outlined",label:j("div",{className:se.selectedGroupLabel,children:[ce.name,P(C,{id:"removeGroupIcon",className:se.removeIcon,onClick:be})]})},ce.id),K&&!u(J)&&P("div",{className:se.selectedLabel,children:ye?"All Selected(".concat(null==J?void 0:J.length,")"):"".concat(null==J?void 0:J.length," Selected")})]}),endAdornment:j(m,{position:"end",children:[k&&P(f,{color:"primary",size:20}),Y&&P(S,{size:"small",className:se.iconButton,onClick:he,tooltipProps:{title:"Clear"},children:P(C,{className:se.closeIcon})})]})})}))},loading:k,options:Se,renderGroup:function(e){var n=e.key,o=e.group,t=e.children;return!o||!u(ce)&&K?t:j("div",{className:se.group,children:[P(s,{"data-not-migrated-MuiChip":!0,className:se.groupChip,variant:"outlined",label:o},n),t]})},disableCloseOnSelect:K,multiple:K,renderOption:K&&function(e,n){var o=e.label,t=e.id,r=n.selected;return j("div",{children:[P(g,{disableRipple:!0,icon:R,className:se.checkbox,checkedIcon:A,checked:r}),o]},t)},groupBy:me&&function(e){return e.group},PaperComponent:je,ListboxComponent:y,inputValue:Y,getOptionLabel:function(e){return e.label},onInputChange:function(e){Z((null==e?void 0:e.target.value)||(null==e?void 0:e.target.innerText))},loadingText:P("div",{className:se.label,children:"Loading ..."}),noOptionsText:P("div",{className:se.label,children:"No Options"})})};L.propTypes={value:i.shape({}).isRequired,onChange:i.func.isRequired,onInputChange:i.func,loading:i.bool,disabled:i.bool,multiple:i.bool,options:i.array,InputProps:i.shape({}),placeholder:i.string,defaultSelectedGroup:i.shape({}),RecentSearchesComponent:i.node,recentSearchesMaxCount:i.number,dataStorageKey:i.string,dataStorage:i.shape({}),groups:i.array,GroupsComponent:i.node},L.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{L as default};
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.js"],"names":[],"mappings":";AAEA,+UAiHI"}
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
- export default Select;
2
- declare function Select(props: any): JSX.Element;
3
- declare namespace Select {
4
- namespace propTypes {
5
- const FormControlProps: PropTypes.Requireable<PropTypes.InferProps<{
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
- const InputLabelProps: PropTypes.Requireable<PropTypes.InferProps<{
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
- const label: PropTypes.Requireable<string>;
19
- const formHelperText: PropTypes.Requireable<string>;
20
- const error: PropTypes.Requireable<boolean>;
21
- }
22
- namespace defaultProps {
23
- const FormControlProps_1: {};
24
- export { FormControlProps_1 as FormControlProps };
25
- const InputLabelProps_1: {};
26
- export { InputLabelProps_1 as InputLabelProps };
27
- const label_1: any;
28
- export { label_1 as label };
29
- const formHelperText_1: any;
30
- export { formHelperText_1 as formHelperText };
31
- const error_1: boolean;
32
- export { error_1 as error };
33
- }
34
- }
35
- import PropTypes from "prop-types";
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.js"],"names":[],"mappings":";AAuJA,iDA2CC"}
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"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{useMemo as o}from"react";import{makeStyles as t,FormControl as i,InputLabel as l,Select as n,FormHelperText as a}from"@material-ui/core";import u from"prop-types";import p from"uuid/v4";import d from"classnames";import{jsxs as s,jsx as c}from"react/jsx-runtime";var b=["FormControlProps","InputLabelProps","label","formHelperText"];function m(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,t)}return o}function M(r){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?m(Object(t),!0).forEach((function(o){e(r,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var f=t((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"}}}})),y=function(t){var u,m,y,I,x=t.FormControlProps,g=t.InputLabelProps,v=t.label,P=t.formHelperText,O=r(t,b),h=o(p,[]),F=f();return s(i,M(M({},x),{},{classes:M(M({},x.classes),{},{root:d(null===(u=x.classes)||void 0===u?void 0:u.root,F.formControlRoot,e({},F.error,O.error))}),disabled:x.disabled||O.disabled,children:[v&&c(l,M(M({id:h},g),{},{children:v})),c(n,M(M({},O),{},{labelId:h,label:v,MenuProps:M(M({},null==O?void 0:O.MenuProps),{},{classes:M(M({},null==O||null===(m=O.MenuProps)||void 0===m?void 0:m.classes),{},{paper:d(null==O||null===(y=O.MenuProps)||void 0===y?void 0:y.paper,e({},F.outlinedMenuPaper,"outlined"===x.variant)),list:d(null==O||null===(I=O.MenuProps)||void 0===I?void 0:I.list,F.menuList)})})})),P&&c(a,{children:P})]}))};y.propTypes={FormControlProps:u.shape({classes:u.shape({root:u.string}),disabled:u.bool,variant:u.oneOf(["outlined","filled","standard"])}),InputLabelProps:u.shape({classes:u.shape({root:u.string,disabled:u.string})}),label:u.string,formHelperText:u.string,error:u.bool},y.defaultProps={FormControlProps:{},InputLabelProps:{},label:null,formHelperText:null,error:!1};export{y as default};
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};