@rio-cloud/rio-uikit 2.3.0-beta.1 → 2.3.0-beta.2

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 (294) hide show
  1. package/DayPicker.js +6 -2
  2. package/DayPicker.js.map +1 -1
  3. package/DayPickerCalendar.d.ts +2 -0
  4. package/DayPickerCalendar.js +5 -0
  5. package/DayPickerCalendar.js.map +1 -0
  6. package/DayPickerPrototype.d.ts +2 -0
  7. package/DayPickerPrototype.js +5 -0
  8. package/DayPickerPrototype.js.map +1 -0
  9. package/TableNext.d.ts +2 -0
  10. package/TableNext.js +23 -0
  11. package/TableNext.js.map +1 -0
  12. package/TableToolbar.js +3 -2
  13. package/TableToolbar.js.map +1 -1
  14. package/components/assetTree/Tree.js +13 -13
  15. package/components/charts/Area.d.ts +5 -3
  16. package/components/charts/Area.js +4 -3
  17. package/components/charts/Area.js.map +1 -1
  18. package/components/charts/AreaChart.js.map +1 -1
  19. package/components/charts/ComposedChart.js.map +1 -1
  20. package/components/clearableInput/ClearableInput.d.ts +30 -0
  21. package/components/clearableInput/ClearableInput.js +81 -78
  22. package/components/clearableInput/ClearableInput.js.map +1 -1
  23. package/components/datepicker/DayPicker.d.ts +4 -51
  24. package/components/datepicker/DayPicker.js +264 -256
  25. package/components/datepicker/DayPicker.js.map +1 -1
  26. package/components/datepicker/DayPickerCalendar.d.ts +4 -0
  27. package/components/datepicker/DayPickerCalendar.js +129 -0
  28. package/components/datepicker/DayPickerCalendar.js.map +1 -0
  29. package/components/datepicker/DayPickerDropdown.d.ts +18 -0
  30. package/components/datepicker/DayPickerDropdown.js +75 -0
  31. package/components/datepicker/DayPickerDropdown.js.map +1 -0
  32. package/components/datepicker/DayPickerDropdownFooter.d.ts +7 -0
  33. package/components/datepicker/DayPickerDropdownFooter.js +7 -0
  34. package/components/datepicker/DayPickerDropdownFooter.js.map +1 -0
  35. package/components/datepicker/DayPickerDropdownSidebar.d.ts +8 -0
  36. package/components/datepicker/DayPickerDropdownSidebar.js +7 -0
  37. package/components/datepicker/DayPickerDropdownSidebar.js.map +1 -0
  38. package/components/datepicker/DayPickerInput.d.ts +28 -0
  39. package/components/datepicker/DayPickerInput.js +65 -0
  40. package/components/datepicker/DayPickerInput.js.map +1 -0
  41. package/components/datepicker/DayPickerPrototype.d.ts +53 -0
  42. package/components/datepicker/DayPickerPrototype.js +285 -0
  43. package/components/datepicker/DayPickerPrototype.js.map +1 -0
  44. package/components/datepicker/dayPickerRangeSelectionUtils.d.ts +15 -0
  45. package/components/datepicker/dayPickerRangeSelectionUtils.js +31 -0
  46. package/components/datepicker/dayPickerRangeSelectionUtils.js.map +1 -0
  47. package/components/datepicker/dayPickerTypes.d.ts +517 -0
  48. package/components/datepicker/dayPickerTypes.js +7 -0
  49. package/components/datepicker/dayPickerTypes.js.map +1 -0
  50. package/components/datepicker/dayPickerUtils.d.ts +10 -0
  51. package/components/datepicker/dayPickerUtils.js +92 -0
  52. package/components/datepicker/dayPickerUtils.js.map +1 -0
  53. package/components/datepicker/useDayPickerInputState.d.ts +32 -0
  54. package/components/datepicker/useDayPickerInputState.js +85 -0
  55. package/components/datepicker/useDayPickerInputState.js.map +1 -0
  56. package/components/datepicker/useStackedDayPickerCalendars.d.ts +5 -0
  57. package/components/datepicker/useStackedDayPickerCalendars.js +39 -0
  58. package/components/datepicker/useStackedDayPickerCalendars.js.map +1 -0
  59. package/components/divider/Divider.js +6 -6
  60. package/components/dropdown/ButtonDropdown.d.ts +4 -0
  61. package/components/dropdown/ButtonDropdown.js +70 -68
  62. package/components/dropdown/ButtonDropdown.js.map +1 -1
  63. package/components/dropdown/DropdownToggleButton.d.ts +1 -0
  64. package/components/dropdown/DropdownToggleButton.js +17 -15
  65. package/components/dropdown/DropdownToggleButton.js.map +1 -1
  66. package/components/fade/FadeExpander.js +17 -20
  67. package/components/fade/FadeExpander.js.map +1 -1
  68. package/components/loadMore/LoadMoreProgress.js +6 -7
  69. package/components/map/components/Map.js +3 -3
  70. package/components/map/utils/rendering.js +5 -5
  71. package/components/popover/Popover.js +4 -4
  72. package/components/radiobutton/RadioCardGroup.js +3 -3
  73. package/components/rioglyph/RioglyphIconType.d.ts +1 -1
  74. package/components/selects/Multiselect.d.ts +6 -0
  75. package/components/selects/Multiselect.js +164 -150
  76. package/components/selects/Multiselect.js.map +1 -1
  77. package/components/selects/Select.js +39 -37
  78. package/components/selects/Select.js.map +1 -1
  79. package/components/table/Table.d.ts +27 -248
  80. package/components/table/Table.js +237 -214
  81. package/components/table/Table.js.map +1 -1
  82. package/components/table/Table.types.d.ts +293 -121
  83. package/components/table/TableBody.d.ts +65 -5
  84. package/components/table/TableBody.js +132 -2
  85. package/components/table/TableBody.js.map +1 -1
  86. package/components/table/TableCardsSorting.js +25 -32
  87. package/components/table/TableCardsSorting.js.map +1 -1
  88. package/components/table/TableColumn.d.ts +13 -5
  89. package/components/table/TableColumn.js +112 -2
  90. package/components/table/TableColumn.js.map +1 -1
  91. package/components/table/TableExpandedContentRow.d.ts +7 -7
  92. package/components/table/TableExpandedContentRow.js +107 -2
  93. package/components/table/TableExpandedContentRow.js.map +1 -1
  94. package/components/table/TableExpandedRow.d.ts +9 -4
  95. package/components/table/TableExpandedRow.js +147 -2
  96. package/components/table/TableExpandedRow.js.map +1 -1
  97. package/components/table/TableExpanderButton.js +13 -11
  98. package/components/table/TableExpanderButton.js.map +1 -1
  99. package/components/table/TableFooter.d.ts +10 -6
  100. package/components/table/TableFooter.js +49 -2
  101. package/components/table/TableFooter.js.map +1 -1
  102. package/components/table/TableGroupFooterRow.d.ts +7 -7
  103. package/components/table/TableGroupFooterRow.js +27 -2
  104. package/components/table/TableGroupFooterRow.js.map +1 -1
  105. package/components/table/TableGroupRow.d.ts +7 -7
  106. package/components/table/TableGroupRow.js +33 -2
  107. package/components/table/TableGroupRow.js.map +1 -1
  108. package/components/table/TableHeader.d.ts +9 -4
  109. package/components/table/TableHeader.js +104 -2
  110. package/components/table/TableHeader.js.map +1 -1
  111. package/components/table/TableHeaderColumn.d.ts +14 -8
  112. package/components/table/TableHeaderColumn.js +78 -2
  113. package/components/table/TableHeaderColumn.js.map +1 -1
  114. package/components/table/TableHeaderRow.d.ts +1 -1
  115. package/components/table/TableHeaderRow.js +11 -2
  116. package/components/table/TableHeaderRow.js.map +1 -1
  117. package/components/table/TableRow.d.ts +9 -4
  118. package/components/table/TableRow.js +108 -2
  119. package/components/table/TableRow.js.map +1 -1
  120. package/components/table/TableSpacerRow.d.ts +3 -2
  121. package/components/table/TableSpacerRow.js +26 -2
  122. package/components/table/TableSpacerRow.js.map +1 -1
  123. package/components/table/TableToolbar.d.ts +4 -23
  124. package/components/table/TableToolbar.js +39 -28
  125. package/components/table/TableToolbar.js.map +1 -1
  126. package/components/table/TableToolbarColumn.d.ts +31 -0
  127. package/components/table/TableToolbarColumn.js +33 -0
  128. package/components/table/TableToolbarColumn.js.map +1 -0
  129. package/components/table/TableViewToggles.d.ts +3 -3
  130. package/components/table/TableViewToggles.js.map +1 -1
  131. package/components/table/context/TableInteractionContext.d.ts +26 -0
  132. package/components/table/context/TableInteractionContext.js +7 -0
  133. package/components/table/context/TableInteractionContext.js.map +1 -0
  134. package/components/table/context/TableLayoutContext.d.ts +25 -0
  135. package/components/table/context/TableLayoutContext.js +7 -0
  136. package/components/table/context/TableLayoutContext.js.map +1 -0
  137. package/components/table/context/TableRenderConfigContext.d.ts +27 -0
  138. package/components/table/context/TableRenderConfigContext.js +7 -0
  139. package/components/table/context/TableRenderConfigContext.js.map +1 -0
  140. package/components/table/context/TableRenderContext.d.ts +85 -0
  141. package/components/table/context/TableRenderContext.js +7 -0
  142. package/components/table/context/TableRenderContext.js.map +1 -0
  143. package/components/table/context/TableStructureContext.d.ts +31 -0
  144. package/components/table/context/TableStructureContext.js +17 -0
  145. package/components/table/context/TableStructureContext.js.map +1 -0
  146. package/components/table/layout/columnSizing.d.ts +2 -2
  147. package/components/table/layout/columnSizing.js.map +1 -1
  148. package/components/table/layout/useDraggableColumns.d.ts +3 -3
  149. package/components/table/layout/useDraggableColumns.js +17 -17
  150. package/components/table/layout/useDraggableColumns.js.map +1 -1
  151. package/components/table/layout/useHorizontalSectionSync.d.ts +3 -1
  152. package/components/table/layout/useHorizontalSectionSync.js +32 -28
  153. package/components/table/layout/useHorizontalSectionSync.js.map +1 -1
  154. package/components/table/layout/useMeasuredColumnMaxWidths.d.ts +3 -3
  155. package/components/table/layout/useMeasuredColumnMaxWidths.js.map +1 -1
  156. package/components/table/layout/useResizableColumns.d.ts +5 -4
  157. package/components/table/layout/useResizableColumns.js +108 -67
  158. package/components/table/layout/useResizableColumns.js.map +1 -1
  159. package/components/table/layout/useTableBodyScrollBottom.d.ts +12 -0
  160. package/components/table/layout/useTableBodyScrollBottom.js +37 -0
  161. package/components/table/layout/useTableBodyScrollBottom.js.map +1 -0
  162. package/components/table/layout/useTableLayout.d.ts +17 -6
  163. package/components/table/layout/useTableLayout.js +41 -38
  164. package/components/table/layout/useTableLayout.js.map +1 -1
  165. package/components/table/layout/useTableVirtualization.d.ts +6 -6
  166. package/components/table/layout/useTableVirtualization.js +22 -22
  167. package/components/table/layout/useTableVirtualization.js.map +1 -1
  168. package/components/table/model/resolveRowMeta.d.ts +3 -2
  169. package/components/table/model/resolveRowMeta.js.map +1 -1
  170. package/components/table/model/resolveTableClassConfig.d.ts +2 -3
  171. package/components/table/model/resolveTableClassConfig.js.map +1 -1
  172. package/components/table/model/tableView.types.d.ts +41 -0
  173. package/components/table/native/TableSettingsListItem.js +1 -1
  174. package/components/table/native/TableSettingsListItem.js.map +1 -1
  175. package/components/table/render/body/TableBodyContent.d.ts +21 -0
  176. package/components/table/render/body/TableBodyContent.js +52 -0
  177. package/components/table/render/body/TableBodyContent.js.map +1 -0
  178. package/components/table/render/body/TableEmptyRow.js +2 -2
  179. package/components/table/render/body/TableEmptyRow.js.map +1 -1
  180. package/components/table/render/header/TableBatchDropdown.d.ts +5 -1
  181. package/components/table/render/header/TableBatchDropdown.js +17 -15
  182. package/components/table/render/header/TableBatchDropdown.js.map +1 -1
  183. package/components/table/render/header/TableColumnFilter.d.ts +2 -2
  184. package/components/table/render/header/TableColumnFilter.js +16 -14
  185. package/components/table/render/header/TableColumnFilter.js.map +1 -1
  186. package/components/table/render/header/TableDraggableHeaderCell.d.ts +2 -1
  187. package/components/table/render/header/TableDraggableHeaderCell.js +44 -34
  188. package/components/table/render/header/TableDraggableHeaderCell.js.map +1 -1
  189. package/components/table/render/header/TableHeader.types.d.ts +11 -9
  190. package/components/table/render/header/TableHeaderCellContent.d.ts +2 -1
  191. package/components/table/render/header/TableHeaderCellContent.js.map +1 -1
  192. package/components/table/render/header/TableHeaderCellResizeHandle.d.ts +2 -1
  193. package/components/table/render/header/TableHeaderCellResizeHandle.js +8 -8
  194. package/components/table/render/header/TableHeaderCellResizeHandle.js.map +1 -1
  195. package/components/table/render/header/TableHeaderDragOverlay.d.ts +5 -4
  196. package/components/table/render/header/TableHeaderDragOverlay.js.map +1 -1
  197. package/components/table/render/header/TableStaticHeaderCell.d.ts +2 -1
  198. package/components/table/render/header/TableStaticHeaderCell.js +34 -22
  199. package/components/table/render/header/TableStaticHeaderCell.js.map +1 -1
  200. package/components/table/render/header/resolveAriaSort.d.ts +2 -1
  201. package/components/table/render/header/resolveAriaSort.js.map +1 -1
  202. package/components/table/render/header/resolveHeaderCellClassName.d.ts +4 -2
  203. package/components/table/render/header/resolveHeaderCellClassName.js +11 -10
  204. package/components/table/render/header/resolveHeaderCellClassName.js.map +1 -1
  205. package/components/table/render/header/resolveHeaderCellStyle.d.ts +2 -1
  206. package/components/table/render/header/resolveHeaderCellStyle.js.map +1 -1
  207. package/components/table/runtime/shouldAnimateBodyRows.d.ts +17 -0
  208. package/components/table/runtime/shouldAnimateBodyRows.js +5 -0
  209. package/components/table/runtime/shouldAnimateBodyRows.js.map +1 -0
  210. package/components/table/runtime/useRenderDraftState.d.ts +14 -0
  211. package/components/table/runtime/useRenderDraftState.js +80 -0
  212. package/components/table/runtime/useRenderDraftState.js.map +1 -0
  213. package/components/table/runtime/useResolvedRenderColumns.d.ts +43 -0
  214. package/components/table/runtime/useResolvedRenderColumns.js +113 -0
  215. package/components/table/runtime/useResolvedRenderColumns.js.map +1 -0
  216. package/components/table/runtime/useResolvedRenderHeader.d.ts +27 -0
  217. package/components/table/runtime/useResolvedRenderHeader.js +67 -0
  218. package/components/table/runtime/useResolvedRenderHeader.js.map +1 -0
  219. package/components/table/selection/useInternalTableSelectionState.d.ts +17 -0
  220. package/components/table/selection/useInternalTableSelectionState.js +28 -0
  221. package/components/table/selection/useInternalTableSelectionState.js.map +1 -0
  222. package/components/table/selection/useTableSelection.d.ts +3 -3
  223. package/components/table/selection/useTableSelection.js.map +1 -1
  224. package/components/table/shared/getCellContentOverflowClassName.d.ts +3 -0
  225. package/components/table/shared/getCellContentOverflowClassName.js +18 -0
  226. package/components/table/shared/getCellContentOverflowClassName.js.map +1 -0
  227. package/components/table/shared/getInteractiveRowProps.d.ts +3 -2
  228. package/components/table/shared/getInteractiveRowProps.js.map +1 -1
  229. package/hooks/useUrlState.js +3 -3
  230. package/package.json +16 -17
  231. package/utils/analytics/createAnalyticsOverlayTooltip.js +57 -57
  232. package/utils/analytics/createAnalyticsOverlayTooltip.js.map +1 -1
  233. package/utils/analytics/useAnalyticsOverlayDom.js +3 -3
  234. package/utils/routeUtils.d.ts +5 -2
  235. package/utils/routeUtils.js +17 -17
  236. package/utils/routeUtils.js.map +1 -1
  237. package/version.d.ts +1 -1
  238. package/version.js +1 -1
  239. package/version.js.map +1 -1
  240. package/components/table/TableCard.d.ts +0 -63
  241. package/components/table/TableCard.js +0 -150
  242. package/components/table/TableCard.js.map +0 -1
  243. package/components/table/model/buildTableViewModel.d.ts +0 -28
  244. package/components/table/model/buildTableViewModel.js +0 -221
  245. package/components/table/model/buildTableViewModel.js.map +0 -1
  246. package/components/table/model/resolveCellContent.d.ts +0 -2
  247. package/components/table/model/resolveCellContent.js +0 -5
  248. package/components/table/model/resolveCellContent.js.map +0 -1
  249. package/components/table/model/tableViewModel.types.d.ts +0 -153
  250. package/components/table/parse/parseBody.d.ts +0 -3
  251. package/components/table/parse/parseBody.js +0 -13
  252. package/components/table/parse/parseBody.js.map +0 -1
  253. package/components/table/parse/parseColumns.d.ts +0 -3
  254. package/components/table/parse/parseColumns.js +0 -81
  255. package/components/table/parse/parseColumns.js.map +0 -1
  256. package/components/table/parse/parseFooter.d.ts +0 -3
  257. package/components/table/parse/parseFooter.js +0 -39
  258. package/components/table/parse/parseFooter.js.map +0 -1
  259. package/components/table/parse/parseHeaders.d.ts +0 -4
  260. package/components/table/parse/parseHeaders.js +0 -89
  261. package/components/table/parse/parseHeaders.js.map +0 -1
  262. package/components/table/parse/parseRows.d.ts +0 -3
  263. package/components/table/parse/parseRows.js +0 -93
  264. package/components/table/parse/parseRows.js.map +0 -1
  265. package/components/table/parse/tableChildGuards.d.ts +0 -25
  266. package/components/table/parse/tableChildGuards.js +0 -29
  267. package/components/table/parse/tableChildGuards.js.map +0 -1
  268. package/components/table/render/body/TableBodyRow.d.ts +0 -16
  269. package/components/table/render/body/TableBodyRow.js +0 -84
  270. package/components/table/render/body/TableBodyRow.js.map +0 -1
  271. package/components/table/render/body/TableBodySection.d.ts +0 -20
  272. package/components/table/render/body/TableBodySection.js +0 -68
  273. package/components/table/render/body/TableBodySection.js.map +0 -1
  274. package/components/table/render/body/TableDataRow.d.ts +0 -15
  275. package/components/table/render/body/TableDataRow.js +0 -143
  276. package/components/table/render/body/TableDataRow.js.map +0 -1
  277. package/components/table/render/body/TableExpandedRow.d.ts +0 -8
  278. package/components/table/render/body/TableExpandedRow.js +0 -84
  279. package/components/table/render/body/TableExpandedRow.js.map +0 -1
  280. package/components/table/render/body/TableGroupRow.d.ts +0 -8
  281. package/components/table/render/body/TableGroupRow.js +0 -21
  282. package/components/table/render/body/TableGroupRow.js.map +0 -1
  283. package/components/table/render/body/TableSpacerRow.d.ts +0 -7
  284. package/components/table/render/body/TableSpacerRow.js +0 -15
  285. package/components/table/render/body/TableSpacerRow.js.map +0 -1
  286. package/components/table/render/footer/TableFooterCell.d.ts +0 -8
  287. package/components/table/render/footer/TableFooterCell.js +0 -31
  288. package/components/table/render/footer/TableFooterCell.js.map +0 -1
  289. package/components/table/render/footer/TableFooterSection.d.ts +0 -10
  290. package/components/table/render/footer/TableFooterSection.js +0 -28
  291. package/components/table/render/footer/TableFooterSection.js.map +0 -1
  292. package/components/table/render/header/TableHeaderSection.d.ts +0 -3
  293. package/components/table/render/header/TableHeaderSection.js +0 -104
  294. package/components/table/render/header/TableHeaderSection.js.map +0 -1
package/DayPicker.js CHANGED
@@ -1,5 +1,9 @@
1
- import { default as o } from "./components/datepicker/DayPicker.js";
1
+ import { default as a } from "./components/datepicker/DayPicker.js";
2
+ import { default as t } from "./components/datepicker/DayPickerCalendar.js";
3
+ import { supportedDayPickerLocales as p } from "./components/datepicker/dayPickerUtils.js";
2
4
  export {
3
- o as default
5
+ t as DayPickerCalendar,
6
+ a as default,
7
+ p as supportedDayPickerLocales
4
8
  };
5
9
  //# sourceMappingURL=DayPicker.js.map
package/DayPicker.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"DayPicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"DayPicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,2 @@
1
+ export { default } from './components/datepicker/DayPickerCalendar';
2
+ export * from './components/datepicker/DayPickerCalendar';
@@ -0,0 +1,5 @@
1
+ import { default as o } from "./components/datepicker/DayPickerCalendar.js";
2
+ export {
3
+ o as default
4
+ };
5
+ //# sourceMappingURL=DayPickerCalendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DayPickerCalendar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ export { default } from './components/datepicker/DayPickerPrototype';
2
+ export * from './components/datepicker/DayPickerPrototype';
@@ -0,0 +1,5 @@
1
+ import { default as o } from "./components/datepicker/DayPickerPrototype.js";
2
+ export {
3
+ o as default
4
+ };
5
+ //# sourceMappingURL=DayPickerPrototype.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DayPickerPrototype.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/TableNext.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { default } from './Table';
2
+ export * from './Table';
package/TableNext.js ADDED
@@ -0,0 +1,23 @@
1
+ import { TableBatchDropdown as a, TableBody as l, TableColumn as b, TableColumnFilter as T, TableColumnsDropdown as r, TableExpandedContentRow as d, TableExpandedRow as n, TableExpanderButton as t, TableFooter as p, TableGroupFooterRow as u, TableGroupRow as w, TableHeader as R, TableHeaderColumn as m, TableHeaderRow as x, TableRow as C, TableSpacerRow as f, default as c } from "./components/table/Table.js";
2
+ import { default as B } from "./components/table/selection/useTableSelection.js";
3
+ export {
4
+ a as TableBatchDropdown,
5
+ l as TableBody,
6
+ b as TableColumn,
7
+ T as TableColumnFilter,
8
+ r as TableColumnsDropdown,
9
+ d as TableExpandedContentRow,
10
+ n as TableExpandedRow,
11
+ t as TableExpanderButton,
12
+ p as TableFooter,
13
+ u as TableGroupFooterRow,
14
+ w as TableGroupRow,
15
+ R as TableHeader,
16
+ m as TableHeaderColumn,
17
+ x as TableHeaderRow,
18
+ C as TableRow,
19
+ f as TableSpacerRow,
20
+ c as default,
21
+ B as useTableSelection
22
+ };
23
+ //# sourceMappingURL=TableNext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableNext.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/TableToolbar.js CHANGED
@@ -1,6 +1,7 @@
1
- import { TableToolbarColumn as a, default as e } from "./components/table/TableToolbar.js";
1
+ import { default as e } from "./components/table/TableToolbar.js";
2
+ import { default as r } from "./components/table/TableToolbarColumn.js";
2
3
  export {
3
- a as TableToolbarColumn,
4
+ r as TableToolbarColumn,
4
5
  e as default
5
6
  };
6
7
  //# sourceMappingURL=TableToolbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableToolbar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"TableToolbar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs as R, jsx as n } from "react/jsx-runtime";
2
2
  import pt, { useReducer as mt, useRef as E, useCallback as pe, useEffect as F } from "react";
3
- import { noop as k, size as y, isEmpty as u, filter as H, cond as q, stubTrue as Z, map as Y, flow as ht, omit as ft, find as gt, without as St } from "es-toolkit/compat";
3
+ import { noop as k, size as y, isEmpty as u, filter as H, cond as q, stubTrue as Z, map as Y, flow as ht, find as ft, without as gt, omit as St } from "es-toolkit/compat";
4
4
  import { isNil as It, isEqual as W } from "es-toolkit/predicate";
5
5
  import me from "../../utils/classNames.js";
6
6
  import Tt from "./TreeSearch.js";
@@ -13,15 +13,15 @@ import fe from "./TreeNothingFound.js";
13
13
  import Ct from "./TreeOptions.js";
14
14
  import At from "./TreeRoot.js";
15
15
  import xt from "./TypeCounter.js";
16
- import { notEmpty as S, notEqual as K, getTypeCounts as ge, debounceFn as Nt, filterOutByItemId as Q, filterAssetByType as Et, getMappedItemsToGroups as Ft, sortGroupsByName as vt, sortGroupItemsByName as bt, filterEmptyGroups as Lt, getFlatItems as Ot, containsItemById as Vt, addOrRemoveFromList as Rt, excludeFromList as kt, getListIds as Se } from "./treeUtils.js";
16
+ import { notEqual as K, getTypeCounts as ge, debounceFn as Nt, filterOutByItemId as Q, filterAssetByType as Et, notEmpty as S, containsItemById as Ft, addOrRemoveFromList as vt, getMappedItemsToGroups as bt, sortGroupsByName as Lt, sortGroupItemsByName as Ot, filterEmptyGroups as Vt, getFlatItems as Rt, excludeFromList as kt, getListIds as Se } from "./treeUtils.js";
17
17
  import { getSubTypeCounts as xs } from "./treeUtils.js";
18
- import { treeReducer as Ht, assetCounted as Ie, allCheckedChanged as v, visibleTypeCountersChanged as wt, emptyGroupsChanged as zt, groupedItemsChanged as $t, flatItemsChanged as Pt, searchValueChanged as Bt, typeFilterChanged as jt } from "./treeReducer.js";
18
+ import { treeReducer as Ht, assetCounted as Ie, allCheckedChanged as v, visibleTypeCountersChanged as wt, searchValueChanged as zt, typeFilterChanged as $t, emptyGroupsChanged as Pt, groupedItemsChanged as Bt, flatItemsChanged as jt } from "./treeReducer.js";
19
19
  import { useTreeVirtualization as Dt } from "./useTreeVirtualization.js";
20
20
  import { useTreeExpansion as Mt } from "./useTreeExpansion.js";
21
21
  import { useTreeHeight as Ut } from "./useTreeHeight.js";
22
22
  import { useTreeScrollPosition as _t } from "./useTreeScrollPosition.js";
23
23
  import qt from "../smoothScrollbars/SmoothScrollbars.js";
24
- const Te = (I) => ft(I, ["expandedGroups", "onExpandGroupsChange", "onSearchChange", "onSelectionChange", "treeOptions"]), Zt = (I, c) => W(Te(I), Te(c)), Yt = 50, Jt = 5, Gs = pt.memo((I) => {
24
+ const Te = (I) => St(I, ["expandedGroups", "onExpandGroupsChange", "onSearchChange", "onSelectionChange", "treeOptions"]), Zt = (I, c) => W(Te(I), Te(c)), Yt = 50, Jt = 5, Gs = pt.memo((I) => {
25
25
  const {
26
26
  groups: c = [],
27
27
  items: m = [],
@@ -134,18 +134,18 @@ const Te = (I) => ft(I, ["expandedGroups", "onExpandGroupsChange", "onSearchChan
134
134
  groups: t
135
135
  });
136
136
  }, ae = (e, t) => {
137
- const s = e.id, a = !i.includes(s) && !t ? [...i, s] : kt(i, s), h = gt(o.groupedItems, (_) => _.id === s), p = Y(h?.items, (_) => _.id), N = St(f, ...p), O = c.length, M = b ? 0 : o.emptyGroups.length, V = O - M === a.length;
137
+ const s = e.id, a = !i.includes(s) && !t ? [...i, s] : kt(i, s), h = ft(o.groupedItems, (_) => _.id === s), p = Y(h?.items, (_) => _.id), N = gt(f, ...p), O = c.length, M = b ? 0 : o.emptyGroups.length, V = O - M === a.length;
138
138
  d(v(V)), A(N, a);
139
139
  }, De = (e) => {
140
- Fe(e), d(Bt(e)), g && setTimeout(() => {
140
+ Fe(e), d(zt(e)), g && setTimeout(() => {
141
141
  ke();
142
142
  }, 10);
143
143
  }, Me = (e, t) => {
144
- const s = Ot(e, t);
145
- d(Pt(s));
144
+ const s = Rt(e, t);
145
+ d(jt(s));
146
146
  }, Ue = (e, t, s) => {
147
- const r = Ft(e, t), l = ht(vt, bt)(r), a = s ? l : Lt(l), h = H(l, (p) => u(p.items));
148
- d(zt(h)), d(Ie(ge(m))), d($t(a));
147
+ const r = bt(e, t), l = ht(Lt, Ot)(r), a = s ? l : Vt(l), h = H(l, (p) => u(p.items));
148
+ d(Pt(h)), d(Ie(ge(m))), d(Bt(a));
149
149
  }, L = (e, t) => {
150
150
  const s = o.searchValue, r = o.typeFilter, l = e, a = t, h = (V) => V && S(V), p = () => u(s) && h(l), N = () => S(s) && h(l), O = u(r) ? a : Et(a, r), M = () => Ue(l, O, b), U = () => Me(O, s);
151
151
  q([
@@ -238,7 +238,7 @@ const Te = (I) => ft(I, ["expandedGroups", "onExpandGroupsChange", "onSearchChan
238
238
  }, qe = () => {
239
239
  const { groupedItems: e } = o;
240
240
  return u(e) ? /* @__PURE__ */ n(fe, {}) : D.length > te ? ie() : Y(e, (s) => {
241
- const r = s.id, l = s.items, a = le?.includes(r) ?? !1, h = H(l, Vt(f)).length, p = i.includes(r), N = !p && h > 0;
241
+ const r = s.id, l = s.items, a = le?.includes(r) ?? !1, h = H(l, Ft(f)).length, p = i.includes(r), N = !p && h > 0;
242
242
  return /* @__PURE__ */ R(w, { groupId: r, isOpen: a, disableAnimation: x, children: [
243
243
  /* @__PURE__ */ n(
244
244
  he,
@@ -285,8 +285,8 @@ const Te = (I) => ft(I, ["expandedGroups", "onExpandGroupsChange", "onSearchChan
285
285
  [() => C() && !T(), () => qe()],
286
286
  [Z, () => Ze()]
287
287
  ])(), nt = (e) => {
288
- const t = Rt(o.typeFilter, e);
289
- d(jt(t)), Oe(t);
288
+ const t = vt(o.typeFilter, e);
289
+ d($t(t)), Oe(t);
290
290
  }, lt = y(o.visibleTypeCounters) !== 1, ct = S(o.typeFilter), at = !Ce, it = !et, dt = !Ge, ut = !Ne, ue = !It(X);
291
291
  return /* @__PURE__ */ R("div", { ...Re, className: st, ref: se, children: [
292
292
  /* @__PURE__ */ R("div", { className: "TreeHeader", children: [
@@ -1,8 +1,9 @@
1
1
  import { AreaProps as RechartsAreaProps } from 'recharts';
2
2
  import { CurveType } from 'recharts/types/shape/Curve';
3
- export type AreaProps<T = any> = Omit<RechartsAreaProps, 'ref'> & {
3
+ export type AreaProps<T = unknown> = Omit<RechartsAreaProps<T, unknown>, 'ref' | 'dataKey'> & {
4
4
  strokeColor?: string;
5
- dataKey?: string | number | ((obj: T) => any);
5
+ fill?: string;
6
+ dataKey?: string | number | ((obj: T) => unknown);
6
7
  unit?: string;
7
8
  legendType?: string;
8
9
  type?: CurveType;
@@ -12,9 +13,10 @@ export declare const getAreaDefaultProps: () => {
12
13
  dataKey: string;
13
14
  unit: string;
14
15
  strokeColor: string;
16
+ fill: string;
15
17
  legendType: string;
16
18
  type: string;
17
19
  isAnimationActive: boolean;
18
20
  };
19
- declare const Area: (props: AreaProps) => null;
21
+ declare const Area: (_props: AreaProps) => null;
20
22
  export default Area;
@@ -1,13 +1,14 @@
1
- const o = () => ({
1
+ const e = () => ({
2
2
  dataKey: "value",
3
3
  unit: "",
4
4
  strokeColor: "color-coldplay-fountain",
5
+ fill: "color-coldplay-fountain",
5
6
  legendType: "square",
6
7
  type: "monotone",
7
8
  isAnimationActive: !0
8
- }), t = (e) => null;
9
+ }), t = (o) => null;
9
10
  export {
10
11
  t as default,
11
- o as getAreaDefaultProps
12
+ e as getAreaDefaultProps
12
13
  };
13
14
  //# sourceMappingURL=Area.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Area.js","sources":["../../../src/components/charts/Area.tsx"],"sourcesContent":["import type { AreaProps as RechartsAreaProps } from 'recharts';\nimport type { CurveType } from 'recharts/types/shape/Curve';\n\n// biome-ignore lint/suspicious/noExplicitAny: be less restrictive here\nexport type AreaProps<T = any> = Omit<RechartsAreaProps, 'ref'> & {\n strokeColor?: string;\n // biome-ignore lint/suspicious/noExplicitAny: see above\n dataKey?: string | number | ((obj: T) => any);\n unit?: string;\n legendType?: string;\n type?: CurveType;\n isAnimationActive?: boolean;\n};\n\nexport const getAreaDefaultProps = () => ({\n dataKey: 'value',\n unit: '',\n strokeColor: 'color-coldplay-fountain',\n legendType: 'square',\n type: 'monotone',\n isAnimationActive: true,\n});\n\nconst Area = (props: AreaProps) => null;\n\nexport default Area;\n"],"names":["getAreaDefaultProps","Area","props"],"mappings":"AAcO,MAAMA,IAAsB,OAAO;AAAA,EACtC,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,mBAAmB;AACvB,IAEMC,IAAO,CAACC,MAAqB;"}
1
+ {"version":3,"file":"Area.js","sources":["../../../src/components/charts/Area.tsx"],"sourcesContent":["import type { AreaProps as RechartsAreaProps } from 'recharts';\nimport type { CurveType } from 'recharts/types/shape/Curve';\n\nexport type AreaProps<T = unknown> = Omit<RechartsAreaProps<T, unknown>, 'ref' | 'dataKey'> & {\n strokeColor?: string;\n fill?: string;\n dataKey?: string | number | ((obj: T) => unknown);\n unit?: string;\n legendType?: string;\n type?: CurveType;\n isAnimationActive?: boolean;\n};\n\nexport const getAreaDefaultProps = () => ({\n dataKey: 'value',\n unit: '',\n strokeColor: 'color-coldplay-fountain',\n fill: 'color-coldplay-fountain',\n legendType: 'square',\n type: 'monotone',\n isAnimationActive: true,\n});\n\nconst Area = (_props: AreaProps) => null;\n\nexport default Area;\n"],"names":["getAreaDefaultProps","Area","_props"],"mappings":"AAaO,MAAMA,IAAsB,OAAO;AAAA,EACtC,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,mBAAmB;AACvB,IAEMC,IAAO,CAACC,MAAsB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart.js","sources":["../../../src/components/charts/AreaChart.tsx"],"sourcesContent":["import type React from 'react';\nimport {\n AreaChart as RechartsAreaChart,\n Area as RechartsArea,\n Legend as RechartsLegend,\n Brush,\n CartesianGrid,\n ResponsiveContainer,\n XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n type XAxisProps,\n type YAxisProps,\n type AreaProps as RechartsAreaProps,\n} from 'recharts';\nimport { isObject } from 'es-toolkit/compat';\n\nimport { getColor, mapGridOptions } from './chartHelper';\nimport AreaGradient, { DEFAULT_ARIA_GRADIENT_ID, type AreaGradientProps } from './AreaGradient';\nimport ChartTooltip, { type ChartTooltipProps } from './ChartTooltip';\nimport { getLegendDefaultProps, type LegendProps } from './Legend';\nimport { renderAxis } from './XAxis';\nimport { getAreaDefaultProps, type AreaProps } from './Area';\nimport type { GridProps } from './ChartGrid';\nimport type { ResponsiveContainerProps } from './ResponsiveContainer';\nimport { renderReferenceLine, type ReferenceLineProps } from './ReferenceLine';\n\ntype RechartsAreaChartProps = React.ComponentProps<typeof RechartsAreaChart>;\n\nexport type AreaChartProps<T extends object> = Omit<RechartsAreaChartProps, 'data'> & {\n width?: number;\n height?: number;\n data: T[];\n dataUnit?: string;\n // biome-ignore lint/suspicious/noExplicitAny: unknown type\n dataKey?: string | number | ((obj: T) => any);\n gradients?: React.ReactElement<AreaGradientProps>[];\n areas: React.ReactElement<AreaProps>[];\n referenceLines?: React.ReactElement<ReferenceLineProps>[];\n xAxisOptions?: XAxisProps;\n yAxisOptions?: YAxisProps;\n additionalAxes?: React.ReactElement<XAxisProps | YAxisProps>[];\n gridOptions?: GridProps;\n showGrid?: boolean;\n containerOptions?: ResponsiveContainerProps;\n showXAxis?: boolean;\n showYAxis?: boolean;\n legend?: React.ReactElement<LegendProps> | boolean;\n tooltip?: React.ReactElement<ChartTooltipProps> | boolean;\n brush?: boolean;\n};\n\nconst AreaChart = <T extends object>(props: AreaChartProps<T>) => {\n const {\n width,\n height,\n data = [],\n dataUnit = '',\n dataKey = 'value',\n gradients = [],\n areas = [],\n referenceLines = [],\n xAxisOptions,\n yAxisOptions,\n gridOptions,\n containerOptions,\n showXAxis = true,\n showYAxis = false,\n additionalAxes = [],\n showGrid = false,\n legend,\n brush = false,\n tooltip = true,\n ...remainingProps\n } = props;\n\n const areasWithGradient = areas.map(area => {\n const areaPropsWithDefault = { ...getAreaDefaultProps(), ...area.props };\n const { strokeColor, ...remainingAreaProps } = areaPropsWithDefault;\n const gradientId = area.key;\n const stroke = getColor(strokeColor);\n return {\n area: (\n <RechartsArea\n {...(remainingAreaProps as Omit<RechartsAreaProps, 'ref'>)}\n key={area.key}\n stroke={stroke}\n fill={`url(#${gradientId})`}\n />\n ),\n gradient: <AreaGradient key={area.key} id={gradientId || DEFAULT_ARIA_GRADIENT_ID} color={strokeColor} />,\n };\n });\n\n const tooltipProps = isObject(tooltip) ? tooltip.props : {};\n const legendProps = isObject(legend) ? { ...getLegendDefaultProps(), ...legend.props } : ({} as LegendProps);\n\n return (\n <ResponsiveContainer\n minHeight={100}\n minWidth={100}\n initialDimension={{ width: 100, height: 100 }}\n {...containerOptions}\n >\n <RechartsAreaChart\n width={width}\n height={height}\n data={data}\n margin={{ top: 15, right: 15, left: 15, bottom: 15 }}\n {...remainingProps}\n >\n <defs>\n {gradients}\n {areasWithGradient.map(areaWithGradient => areaWithGradient.gradient)}\n </defs>\n\n {showGrid && <CartesianGrid strokeDasharray='3 3' {...mapGridOptions(gridOptions)} />}\n\n <RechartsXAxis hide={!showXAxis} dataKey={dataKey} {...xAxisOptions} />\n <RechartsYAxis hide={!showYAxis} unit={dataUnit} {...yAxisOptions} />\n\n {additionalAxes.map(renderAxis)}\n\n {tooltip && <ChartTooltip {...tooltipProps} />}\n\n {legend && legendProps && (\n <>\n {/* @ts-ignore: intentionally as formatter is different. See Legend component */}\n <RechartsLegend\n wrapperStyle={\n legendProps.verticalAlign === 'bottom' ? { bottom: 0 } : legendProps.wrapperStyle\n }\n {...legendProps}\n />\n </>\n )}\n\n {areasWithGradient.map(areaWithGradient => areaWithGradient.area)}\n\n {referenceLines.map(renderReferenceLine)}\n\n {brush && <Brush stroke={getColor('gray')} />}\n </RechartsAreaChart>\n </ResponsiveContainer>\n );\n};\n\nexport default AreaChart;\n"],"names":["AreaChart","props","width","height","data","dataUnit","dataKey","gradients","areas","referenceLines","xAxisOptions","yAxisOptions","gridOptions","containerOptions","showXAxis","showYAxis","additionalAxes","showGrid","legend","brush","tooltip","remainingProps","areasWithGradient","area","areaPropsWithDefault","getAreaDefaultProps","strokeColor","remainingAreaProps","gradientId","stroke","getColor","createElement","RechartsArea","AreaGradient","DEFAULT_ARIA_GRADIENT_ID","tooltipProps","isObject","legendProps","getLegendDefaultProps","jsx","ResponsiveContainer","jsxs","RechartsAreaChart","areaWithGradient","CartesianGrid","mapGridOptions","RechartsXAxis","RechartsYAxis","renderAxis","ChartTooltip","Fragment","RechartsLegend","renderReferenceLine","Brush"],"mappings":";;;;;;;;;;;AAmDA,MAAMA,KAAY,CAAmBC,MAA6B;AAC9D,QAAM;AAAA,IACF,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC,IAAO,CAAA;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,SAAAC,IAAU;AAAA,IACV,WAAAC,IAAY,CAAA;AAAA,IACZ,OAAAC,IAAQ,CAAA;AAAA,IACR,gBAAAC,IAAiB,CAAA;AAAA,IACjB,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,WAAAC,IAAY;AAAA,IACZ,gBAAAC,IAAiB,CAAA;AAAA,IACjB,UAAAC,IAAW;AAAA,IACX,QAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,GAAGC;AAAA,EAAA,IACHpB,GAEEqB,IAAoBd,EAAM,IAAI,CAA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ChC,GAAW,SAAAR,GAAmB,GAAGI,GAAc;AAAA,YACrE,gBAAA6B,EAACQ,KAAc,MAAM,CAAChC,GAAW,MAAMV,GAAW,GAAGM,GAAc;AAAA,YAElEK,EAAe,IAAIgC,CAAU;AAAA,YAE7B5B,KAAW,gBAAAmB,EAACU,GAAA,EAAc,GAAGd,EAAA,CAAc;AAAA,YAE3CjB,KAAUmB,KACP,gBAAAE,EAAAW,GAAA,EAEI,UAAA,gBAAAX;AAAA,cAACY;AAAAA,cAAA;AAAA,gBACG,cACId,EAAY,kBAAkB,WAAW,EAAE,QAAQ,EAAA,IAAMA,EAAY;AAAA,gBAExE,GAAGA;AAAA,cAAA;AAAA,YAAA,GAEZ;AAAA,YAGHf,EAAkB,IAAI,CAAAqB,MAAoBA,EAAiB,IAAI;AAAA,YAE/DlC,EAAe,IAAI2C,CAAmB;AAAA,YAEtCjC,KAAS,gBAAAoB,EAACc,GAAA,EAAM,QAAQvB,EAAS,MAAM,EAAA,CAAG;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/C;AAAA,EAAA;AAGZ;"}
1
+ {"version":3,"file":"AreaChart.js","sources":["../../../src/components/charts/AreaChart.tsx"],"sourcesContent":["import type React from 'react';\nimport {\n AreaChart as RechartsAreaChart,\n Area as RechartsArea,\n Legend as RechartsLegend,\n Brush,\n CartesianGrid,\n ResponsiveContainer,\n XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n type XAxisProps,\n type YAxisProps,\n type AreaProps as RechartsAreaProps,\n} from 'recharts';\nimport { isObject } from 'es-toolkit/compat';\n\nimport { getColor, mapGridOptions } from './chartHelper';\nimport AreaGradient, { DEFAULT_ARIA_GRADIENT_ID, type AreaGradientProps } from './AreaGradient';\nimport ChartTooltip, { type ChartTooltipProps } from './ChartTooltip';\nimport { getLegendDefaultProps, type LegendProps } from './Legend';\nimport { renderAxis } from './XAxis';\nimport { getAreaDefaultProps, type AreaProps } from './Area';\nimport type { GridProps } from './ChartGrid';\nimport type { ResponsiveContainerProps } from './ResponsiveContainer';\nimport { renderReferenceLine, type ReferenceLineProps } from './ReferenceLine';\n\ntype RechartsAreaChartProps = React.ComponentProps<typeof RechartsAreaChart>;\n\nexport type AreaChartProps<T extends object> = Omit<RechartsAreaChartProps, 'data'> & {\n width?: number;\n height?: number;\n data: T[];\n dataUnit?: string;\n // biome-ignore lint/suspicious/noExplicitAny: unknown type\n dataKey?: string | number | ((obj: T) => any);\n gradients?: React.ReactElement<AreaGradientProps>[];\n areas: React.ReactElement<AreaProps>[];\n referenceLines?: React.ReactElement<ReferenceLineProps>[];\n xAxisOptions?: XAxisProps;\n yAxisOptions?: YAxisProps;\n additionalAxes?: React.ReactElement<XAxisProps | YAxisProps>[];\n gridOptions?: GridProps;\n showGrid?: boolean;\n containerOptions?: ResponsiveContainerProps;\n showXAxis?: boolean;\n showYAxis?: boolean;\n legend?: React.ReactElement<LegendProps> | boolean;\n tooltip?: React.ReactElement<ChartTooltipProps> | boolean;\n brush?: boolean;\n};\n\nconst AreaChart = <T extends object>(props: AreaChartProps<T>) => {\n const {\n width,\n height,\n data = [],\n dataUnit = '',\n dataKey = 'value',\n gradients = [],\n areas = [],\n referenceLines = [],\n xAxisOptions,\n yAxisOptions,\n gridOptions,\n containerOptions,\n showXAxis = true,\n showYAxis = false,\n additionalAxes = [],\n showGrid = false,\n legend,\n brush = false,\n tooltip = true,\n ...remainingProps\n } = props;\n\n const areasWithGradient = areas.map(area => {\n const areaPropsWithDefault = { ...getAreaDefaultProps(), ...area.props };\n const { strokeColor, ...remainingAreaProps } = areaPropsWithDefault;\n const gradientId = area.key;\n const stroke = getColor(strokeColor);\n return {\n area: (\n <RechartsArea\n {...(remainingAreaProps as Omit<RechartsAreaProps<unknown, unknown>, 'ref'>)}\n key={area.key}\n stroke={stroke}\n fill={`url(#${gradientId})`}\n />\n ),\n gradient: <AreaGradient key={area.key} id={gradientId || DEFAULT_ARIA_GRADIENT_ID} color={strokeColor} />,\n };\n });\n\n const tooltipProps = isObject(tooltip) ? tooltip.props : {};\n const legendProps = isObject(legend) ? { ...getLegendDefaultProps(), ...legend.props } : ({} as LegendProps);\n\n return (\n <ResponsiveContainer\n minHeight={100}\n minWidth={100}\n initialDimension={{ width: 100, height: 100 }}\n {...containerOptions}\n >\n <RechartsAreaChart\n width={width}\n height={height}\n data={data}\n margin={{ top: 15, right: 15, left: 15, bottom: 15 }}\n {...remainingProps}\n >\n <defs>\n {gradients}\n {areasWithGradient.map(areaWithGradient => areaWithGradient.gradient)}\n </defs>\n\n {showGrid && <CartesianGrid strokeDasharray='3 3' {...mapGridOptions(gridOptions)} />}\n\n <RechartsXAxis hide={!showXAxis} dataKey={dataKey} {...xAxisOptions} />\n <RechartsYAxis hide={!showYAxis} unit={dataUnit} {...yAxisOptions} />\n\n {additionalAxes.map(renderAxis)}\n\n {tooltip && <ChartTooltip {...tooltipProps} />}\n\n {legend && legendProps && (\n <>\n {/* @ts-ignore: intentionally as formatter is different. See Legend component */}\n <RechartsLegend\n wrapperStyle={\n legendProps.verticalAlign === 'bottom' ? { bottom: 0 } : legendProps.wrapperStyle\n }\n {...legendProps}\n />\n </>\n )}\n\n {areasWithGradient.map(areaWithGradient => areaWithGradient.area)}\n\n {referenceLines.map(renderReferenceLine)}\n\n {brush && <Brush stroke={getColor('gray')} />}\n </RechartsAreaChart>\n </ResponsiveContainer>\n );\n};\n\nexport default AreaChart;\n"],"names":["AreaChart","props","width","height","data","dataUnit","dataKey","gradients","areas","referenceLines","xAxisOptions","yAxisOptions","gridOptions","containerOptions","showXAxis","showYAxis","additionalAxes","showGrid","legend","brush","tooltip","remainingProps","areasWithGradient","area","areaPropsWithDefault","getAreaDefaultProps","strokeColor","remainingAreaProps","gradientId","stroke","getColor","createElement","RechartsArea","AreaGradient","DEFAULT_ARIA_GRADIENT_ID","tooltipProps","isObject","legendProps","getLegendDefaultProps","jsx","ResponsiveContainer","jsxs","RechartsAreaChart","areaWithGradient","CartesianGrid","mapGridOptions","RechartsXAxis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A,EAAM,QAAQvB,EAAS,MAAM,EAAA,CAAG;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/C;AAAA,EAAA;AAGZ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposedChart.js","sources":["../../../src/components/charts/ComposedChart.tsx"],"sourcesContent":["import type React from 'react';\nimport {\n ComposedChart as RechartsComposedChart,\n Line as RechartsLine,\n Bar as RechartsBar,\n Area as RechartsArea,\n Legend as RechartsLegend,\n Brush,\n CartesianGrid,\n ResponsiveContainer,\n XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n type XAxisProps,\n type YAxisProps,\n type AreaProps as RechartsAreaProps,\n type LineProps as RechartsLineProps,\n} from 'recharts';\nimport { isObject } from 'es-toolkit/compat';\n\nimport { getColor, mapGridOptions } from './chartHelper';\nimport ChartTooltip, { type ChartTooltipProps } from './ChartTooltip';\nimport { getLegendDefaultProps, type LegendProps } from './Legend';\nimport { renderAxis } from './XAxis';\nimport { getBarDefaultProps, type BarProps } from './Bar';\nimport { renderReferenceLine, type ReferenceLineProps } from './ReferenceLine';\nimport { getLineDefaultProps, type LineProps } from './Line';\nimport { getAreaDefaultProps, type AreaProps } from './Area';\nimport type { GridProps } from './ChartGrid';\nimport type { ResponsiveContainerProps } from './ResponsiveContainer';\n\ntype RechartsComposedChartProps = React.ComponentProps<typeof RechartsComposedChart>;\n\nexport type ComposedChartProps<T extends object> = Omit<RechartsComposedChartProps, 'data'> & {\n width?: number;\n height?: number;\n data: T[];\n dataUnit?: string;\n // biome-ignore lint/suspicious/noExplicitAny: unknown type\n dataKey?: string | number | ((obj: T) => any);\n lines?: React.ReactElement<LineProps>[];\n bars?: React.ReactElement<BarProps>[];\n areas?: React.ReactElement<AreaProps>[];\n referenceLines?: React.ReactElement<ReferenceLineProps>[];\n xAxisOptions?: XAxisProps;\n yAxisOptions?: YAxisProps;\n additionalAxes?: React.ReactElement<XAxisProps | YAxisProps>[];\n gridOptions?: GridProps;\n containerOptions?: ResponsiveContainerProps;\n showXAxis?: boolean;\n showYAxis?: boolean;\n showGrid?: boolean;\n legend?: React.ReactElement<LegendProps> | boolean;\n tooltip?: React.ReactElement<ChartTooltipProps> | boolean;\n brush?: boolean;\n};\n\nconst ComposedChart = <T extends object>(props: ComposedChartProps<T>) => {\n const {\n width,\n height,\n data = [],\n dataUnit = '',\n dataKey = 'value',\n lines = [],\n bars = [],\n areas = [],\n referenceLines = [],\n xAxisOptions,\n yAxisOptions,\n additionalAxes = [],\n gridOptions,\n containerOptions,\n showXAxis = true,\n showYAxis = false,\n showGrid = false,\n legend,\n brush = false,\n tooltip = true,\n ...remainingProps\n } = props;\n\n const tooltipProps = isObject(tooltip) ? tooltip.props : {};\n const legendProps = isObject(legend) ? { ...getLegendDefaultProps(), ...legend.props } : {};\n\n return (\n <ResponsiveContainer\n minHeight={100}\n minWidth={100}\n initialDimension={{ width: 100, height: 100 }}\n {...containerOptions}\n >\n <RechartsComposedChart\n width={width}\n height={height}\n data={data}\n margin={{ top: 15, right: 15, left: 15, bottom: 15 }}\n {...remainingProps}\n >\n {showGrid && <CartesianGrid strokeDasharray='3 3' {...mapGridOptions(gridOptions)} />}\n\n <RechartsXAxis hide={!showXAxis} dataKey={dataKey} {...xAxisOptions} />\n <RechartsYAxis hide={!showYAxis} unit={dataUnit} {...yAxisOptions} />\n\n {additionalAxes.map(renderAxis)}\n\n {tooltip && <ChartTooltip {...tooltipProps} />}\n\n {legend && <RechartsLegend {...legendProps} />}\n\n {areas.map(area => {\n const areaPropsWithDefault = { ...getAreaDefaultProps(), ...area.props };\n const { strokeColor, fill, ...remainingAreaProps } = areaPropsWithDefault;\n return (\n <RechartsArea\n {...(remainingAreaProps as Omit<RechartsAreaProps, 'ref'>)}\n key={area.key}\n stroke={getColor(strokeColor)}\n fill={getColor(fill)}\n />\n );\n })}\n\n {bars.map(bar => {\n const barPropsWithDefault = { ...getBarDefaultProps(), ...bar.props };\n const { color, ...remainingBarProps } = barPropsWithDefault;\n const cellColor = color && getColor(color);\n return <RechartsBar key={bar.key} unit={dataUnit} {...remainingBarProps} fill={cellColor} />;\n })}\n\n {lines.map(line => {\n const linePropsWithDefault = { ...getLineDefaultProps(), ...line.props };\n const { strokeColor, ...remainingLineProps } = linePropsWithDefault;\n return (\n <RechartsLine\n {...(remainingLineProps as Omit<RechartsLineProps, 'ref'>)}\n key={line.key}\n stroke={getColor(strokeColor)}\n />\n );\n })}\n\n {referenceLines.map(renderReferenceLine)}\n\n {brush && <Brush stroke={getColor('gray')} />}\n </RechartsComposedChart>\n </ResponsiveContainer>\n );\n};\n\nexport default ComposedChart;\n"],"names":["ComposedChart","props","width","height","data","dataUnit","dataKey","lines","bars","areas","referenceLines","xAxisOptions","yAxisOptions","additionalAxes","gridOptions","containerOptions","showXAxis","showYAxis","showGrid","legend","brush","tooltip","remainingProps","tooltipProps","isObject","legendProps","getLegendDefaultProps","jsx","ResponsiveContainer","jsxs","RechartsComposedChart","CartesianGrid","mapGridOptions","RechartsXAxis","RechartsYAxis","renderAxis","ChartTooltip","RechartsLegend","area","areaPropsWithDefault","getAreaDefaultProps","strokeColor","fill","remainingAreaProps","createElement","RechartsArea","getColor","bar","barPropsWithDefault","getBarDefaultProps","color","remainingBarProps","cellColor","RechartsBar","line","linePropsWithDefault","getLineDefaultProps","remainingLineProps","RechartsLine","renderReferenceLine","Brush"],"mappings":";;;;;;;;;;;;AAwDA,MAAMA,KAAgB,CAAmBC,MAAiC;AACtE,QAAM;AAAA,IACF,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC,IAAO,CAAA;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ,CAAA;AAAA,IACR,MAAAC,IAAO,CAAA;AAAA,IACP,OAAAC,IAAQ,CAAA;AAAA,IACR,gBAAAC,IAAiB,CAAA;AAAA,IACjB,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC,IAAiB,CAAA;AAAA,IACjB,aA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,EAAE,aAAAG,GAAa,MAAAC,GAAM,GAAGC,MAAuBJ;AACrD,qBACI,gBAAAK;AAAA,gBAACC;AAAAA,gBAAA;AAAA,kBACI,GAAIF;AAAA,kBACL,KAAKL,EAAK;AAAA,kBACV,QAAQQ,EAASL,CAAW;AAAA,kBAC5B,MAAMK,EAASJ,CAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YAG/B,CAAC;AAAA,YAEAlC,EAAK,IAAI,CAAAuC,MAAO;AACb,oBAAMC,IAAsB,EAAE,GAAGC,KAAsB,GAAGF,EAAI,MAAA,GACxD,EAAE,OAAAG,GAAO,GAAGC,EAAA,IAAsBH,GAClCI,IAAYF,KAASJ,EAASI,CAAK;AACzC,qBAAO,gBAAAvB,EAAC0B,KAA0B,MAAMhD,GAAW,GAAG8C,GAAmB,MAAMC,KAAtDL,EAAI,GAA6D;AAAA,YAC9F,CAAC;AAAA,YAEAxC,EAAM,IAAI,CAAA+C,MAAQ;AACf,oBAAMC,IAAuB,EAAE,GAAGC,KAAuB,GAAGF,EAAK,MAAA,GAC3D,EAAE,aAAAb,GAAa,GAAGgB,EAAA,IAAuBF;AAC/C,qBACI,gBAAAX;AAAA,gBAACc;AAAAA,gBAAA;AAAA,kBACI,GAAID;AAAA,kBACL,KAAKH,EAAK;AAAA,kBACV,QAAQR,EAASL,CAAW;AAAA,gBAAA;AAAA,cAAA;AAAA,YAGxC,CAAC;AAAA,YAEA/B,EAAe,IAAIiD,CAAmB;AAAA,YAEtCvC,KAAS,gBAAAO,EAACiC,GAAA,EAAM,QAAQd,EAAS,MAAM,EAAA,CAAG;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/C;AAAA,EAAA;AAGZ;"}
1
+ {"version":3,"file":"ComposedChart.js","sources":["../../../src/components/charts/ComposedChart.tsx"],"sourcesContent":["import type React from 'react';\nimport {\n ComposedChart as RechartsComposedChart,\n Line as RechartsLine,\n Bar as RechartsBar,\n Area as RechartsArea,\n Legend as RechartsLegend,\n Brush,\n CartesianGrid,\n ResponsiveContainer,\n XAxis as RechartsXAxis,\n YAxis as RechartsYAxis,\n type XAxisProps,\n type YAxisProps,\n type AreaProps as RechartsAreaProps,\n type LineProps as RechartsLineProps,\n} from 'recharts';\nimport { isObject } from 'es-toolkit/compat';\n\nimport { getColor, mapGridOptions } from './chartHelper';\nimport ChartTooltip, { type ChartTooltipProps } from './ChartTooltip';\nimport { getLegendDefaultProps, type LegendProps } from './Legend';\nimport { renderAxis } from './XAxis';\nimport { getBarDefaultProps, type BarProps } from './Bar';\nimport { renderReferenceLine, type ReferenceLineProps } from './ReferenceLine';\nimport { getLineDefaultProps, type LineProps } from './Line';\nimport { getAreaDefaultProps, type AreaProps } from './Area';\nimport type { GridProps } from './ChartGrid';\nimport type { ResponsiveContainerProps } from './ResponsiveContainer';\n\ntype RechartsComposedChartProps = React.ComponentProps<typeof RechartsComposedChart>;\n\nexport type ComposedChartProps<T extends object> = Omit<RechartsComposedChartProps, 'data'> & {\n width?: number;\n height?: number;\n data: T[];\n dataUnit?: string;\n // biome-ignore lint/suspicious/noExplicitAny: unknown type\n dataKey?: string | number | ((obj: T) => any);\n lines?: React.ReactElement<LineProps>[];\n bars?: React.ReactElement<BarProps>[];\n areas?: React.ReactElement<AreaProps>[];\n referenceLines?: React.ReactElement<ReferenceLineProps>[];\n xAxisOptions?: XAxisProps;\n yAxisOptions?: YAxisProps;\n additionalAxes?: React.ReactElement<XAxisProps | YAxisProps>[];\n gridOptions?: GridProps;\n containerOptions?: ResponsiveContainerProps;\n showXAxis?: boolean;\n showYAxis?: boolean;\n showGrid?: boolean;\n legend?: React.ReactElement<LegendProps> | boolean;\n tooltip?: React.ReactElement<ChartTooltipProps> | boolean;\n brush?: boolean;\n};\n\nconst ComposedChart = <T extends object>(props: ComposedChartProps<T>) => {\n const {\n width,\n height,\n data = [],\n dataUnit = '',\n dataKey = 'value',\n lines = [],\n bars = [],\n areas = [],\n referenceLines = [],\n xAxisOptions,\n yAxisOptions,\n additionalAxes = [],\n gridOptions,\n containerOptions,\n showXAxis = true,\n showYAxis = false,\n showGrid = false,\n legend,\n brush = false,\n tooltip = true,\n ...remainingProps\n } = props;\n\n const tooltipProps = isObject(tooltip) ? tooltip.props : {};\n const legendProps = isObject(legend) ? { ...getLegendDefaultProps(), ...legend.props } : {};\n\n return (\n <ResponsiveContainer\n minHeight={100}\n minWidth={100}\n initialDimension={{ width: 100, height: 100 }}\n {...containerOptions}\n >\n <RechartsComposedChart\n width={width}\n height={height}\n data={data}\n margin={{ top: 15, right: 15, left: 15, bottom: 15 }}\n {...remainingProps}\n >\n {showGrid && <CartesianGrid strokeDasharray='3 3' {...mapGridOptions(gridOptions)} />}\n\n <RechartsXAxis hide={!showXAxis} dataKey={dataKey} {...xAxisOptions} />\n <RechartsYAxis hide={!showYAxis} unit={dataUnit} {...yAxisOptions} />\n\n {additionalAxes.map(renderAxis)}\n\n {tooltip && <ChartTooltip {...tooltipProps} />}\n\n {legend && <RechartsLegend {...legendProps} />}\n\n {areas.map(area => {\n const areaPropsWithDefault = { ...getAreaDefaultProps(), ...area.props };\n const { strokeColor, fill, ...remainingAreaProps } = areaPropsWithDefault;\n return (\n <RechartsArea\n {...(remainingAreaProps as Omit<RechartsAreaProps<unknown, unknown>, 'ref'>)}\n key={area.key}\n stroke={getColor(strokeColor)}\n fill={getColor(fill)}\n />\n );\n })}\n\n {bars.map(bar => {\n const barPropsWithDefault = { ...getBarDefaultProps(), ...bar.props };\n const { color, ...remainingBarProps } = barPropsWithDefault;\n const cellColor = color && getColor(color);\n return <RechartsBar key={bar.key} unit={dataUnit} {...remainingBarProps} fill={cellColor} />;\n })}\n\n {lines.map(line => {\n const linePropsWithDefault = { ...getLineDefaultProps(), ...line.props };\n const { strokeColor, ...remainingLineProps } = linePropsWithDefault;\n return (\n <RechartsLine\n {...(remainingLineProps as Omit<RechartsLineProps, 'ref'>)}\n key={line.key}\n stroke={getColor(strokeColor)}\n />\n );\n })}\n\n {referenceLines.map(renderReferenceLine)}\n\n {brush && <Brush stroke={getColor('gray')} />}\n </RechartsComposedChart>\n </ResponsiveContainer>\n );\n};\n\nexport default ComposedChart;\n"],"names":["ComposedChart","props","width","height","data","dataUnit","dataKey","lines","bars","areas","referenceLines","xAxisOptions","yAxisOptions","additionalAxes","gridOptions","containerOptions","showXAxis","showYAxis","showGrid","legend","brush","tooltip","remainingProps","tooltipProps","isObject","legendProps","getLegendDefaultProps","jsx","ResponsiveContainer","jsxs","RechartsComposedChart","CartesianGrid","mapGridOptions","RechartsXAxis","RechartsYAxis","renderAxis","ChartTooltip","RechartsLegend","area","areaPropsWithDefault","getAreaDefaultProps","strokeColor","fill","remainingAreaProps","createElement","RechartsArea","getColor","bar","barPropsWithDefault","getBarDefaultProps","color","remainingBarProps","cellColor","RechartsBar","line","linePropsWithDefault","getLineDefaultProps","remainingLineProps","RechartsLine","renderReferenceLine","Brush"],"mappings":";;;;;;;;;;;;AAwDA,MAAMA,KAAgB,CAAmBC,MAAiC;AACtE,QAAM;AAAA,IACF,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC,IAAO,CAAA;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ,CAAA;AAAA,IACR,MAAAC,IAAO,CAAA;AAAA,IACP,OAAAC,IAAQ,CAAA;AAAA,IACR,gBAAAC,IAAiB,CAAA;AAAA,IACjB,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC,IAAiB,CAAA;AAAA,IACjB,aAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,WAAAC,IAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,QAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,GAAGC;AAAA,EAAA,IACHrB,GAEEsB,IAAeC,EAASH,CAAO,IAAIA,EAAQ,QAAQ,CAAA,GACnDI,IAAcD,EAASL,CAAM,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AuC,MAAO;AACb,oBAAMC,IAAsB,EAAE,GAAGC,KAAsB,GAAGF,EAAI,MAAA,GACxD,EAAE,OAAAG,GAAO,GAAGC,EAAA,IAAsBH,GAClCI,IAAYF,KAASJ,EAASI,CAAK;AACzC,qBAAO,gBAAAvB,EAAC0B,KAA0B,MAAMhD,GAAW,GAAG8C,GAAmB,MAAMC,KAAtDL,EAAI,GAA6D;AAAA,YAC9F,CAAC;AAAA,YAEAxC,EAAM,IAAI,CAAA+C,MAAQ;AACf,oBAAMC,IAAuB,EAAE,GAAGC,KAAuB,GAAGF,EAAK,MAAA,GAC3D,EAAE,aAAAb,GAAa,GAAGgB,EAAA,IAAuBF;AAC/C,qBACI,gBAAAX;AAAA,gBAACc;AAAAA,gBAAA;AAAA,kBACI,GAAID;AAAA,kBACL,KAAKH,EAAK;AAAA,kBACV,QAAQR,EAASL,CAAW;AAAA,gBAAA;AAAA,cAAA;AAAA,YAGxC,CAAC;AAAA,YAEA/B,EAAe,IAAIiD,CAAmB;AAAA,YAEtCvC,KAAS,gBAAAO,EAACiC,GAAA,EAAM,QAAQd,EAAS,MAAM,EAAA,CAAG;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/C;AAAA,EAAA;AAGZ;"}
@@ -148,6 +148,25 @@ export type ClearableInputProps = {
148
148
  * Note, this function may not be an empty function, otherwise the mask selection won't work
149
149
  */
150
150
  maskDispatch?: (appended: string, dynamicMasked: any) => any;
151
+ /**
152
+ * Pattern used by IMask date masks.
153
+ *
154
+ * @example
155
+ * 'Y-m-d'
156
+ */
157
+ pattern?: string;
158
+ /**
159
+ * Formats a typed date value to the masked string representation.
160
+ */
161
+ format?: (value: Date | null, masked: unknown) => string;
162
+ /**
163
+ * Parses the masked string representation back to a typed date value.
164
+ */
165
+ parse?: (value: string, masked: unknown) => Date | null;
166
+ /**
167
+ * Enables IMask autofix behavior for date and number masks.
168
+ */
169
+ autofix?: boolean | 'pad';
151
170
  /**
152
171
  * Controls when the mask pattern is visible.
153
172
  *
@@ -182,6 +201,17 @@ export type ClearableInputProps = {
182
201
  * @default false
183
202
  */
184
203
  disabled?: boolean;
204
+ /**
205
+ * Makes the input read-only.
206
+ */
207
+ readOnly?: boolean;
208
+ /**
209
+ * Controls whether the clear button is rendered.
210
+ * This might be useful to reuse this component for other use-cases.
211
+ *
212
+ * @default true
213
+ */
214
+ showClearButton?: boolean;
185
215
  /**
186
216
  * Additional classes to be set on the input element.
187
217
  */
@@ -1,58 +1,60 @@
1
- import { jsxs as ue, jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as ce, useState as d, useRef as pe } from "react";
3
- import { omit as me, isEmpty as fe } from "es-toolkit/compat";
4
- import { isNil as de, isFunction as he } from "es-toolkit/predicate";
1
+ import { jsxs as pe, jsx as u } from "react/jsx-runtime";
2
+ import { forwardRef as me, useState as d, useRef as fe } from "react";
3
+ import { omit as de, isEmpty as he } from "es-toolkit/compat";
4
+ import { isNil as Ce, isFunction as ge } from "es-toolkit/predicate";
5
5
  import { noop as t } from "es-toolkit/function";
6
- import { IMaskInput as ge } from "react-imask";
6
+ import { IMaskInput as ve } from "react-imask";
7
7
  import h from "../../utils/classNames.js";
8
- import ve from "../../hooks/usePrevious.js";
9
- import Ce from "../../hooks/useMergeRefs.js";
10
- const R = "text", ke = ["text", "password", "email"], T = (u) => !fe(`${u}`), Te = ce((u, g) => {
8
+ import ke from "../../hooks/usePrevious.js";
9
+ import ye from "../../hooks/useMergeRefs.js";
10
+ const R = "text", Ie = ["text", "password", "email"], T = (i) => !he(`${i}`), De = me((i, C) => {
11
11
  const {
12
- type: B = R,
13
- defaultValue: D,
12
+ type: D = R,
13
+ defaultValue: M,
14
14
  value: s,
15
- maxLength: M,
16
- tabIndex: S = 0,
15
+ showClearButton: g = !0,
16
+ maxLength: S,
17
+ tabIndex: O = 0,
17
18
  hasError: L = !1,
18
19
  inputRef: v,
19
- autoComplete: O,
20
- onChange: n = t,
21
- onBlur: _ = t,
22
- onFocus: j = t,
23
- onClear: C = t,
24
- onKeyPress: A = t,
25
- onClick: K = t,
26
- mask: k,
27
- maskPlaceholder: U = "_",
28
- maskVisibility: Y = "always",
29
- maskOverwrite: z = !0,
30
- maskDefinitions: $,
31
- maskDispatch: y,
32
- inputClassName: q = "",
20
+ autoComplete: _,
21
+ onChange: a = t,
22
+ onBlur: j = t,
23
+ onFocus: A = t,
24
+ onClear: k = t,
25
+ onKeyPress: K = t,
26
+ onClick: U = t,
27
+ mask: y,
28
+ maskPlaceholder: Y = "_",
29
+ maskVisibility: z = "always",
30
+ maskOverwrite: $ = !0,
31
+ maskDefinitions: q,
32
+ maskDispatch: I,
33
+ inputClassName: G = "",
33
34
  disabled: c = !1,
34
- className: I = "",
35
+ readOnly: H = !1,
36
+ className: P = "",
35
37
  children: p,
36
- ...G
37
- } = u, P = s || D || "", [b, H] = d(P), [w, J] = d(T(P)), [N, V] = d(!1), x = !de(s), o = pe(null), Q = Ce(o, v, g), r = !!k, W = () => {
38
- switch (Y) {
38
+ ...J
39
+ } = i, w = s || M || "", [b, Q] = d(w), [N, W] = d(T(w)), [V, x] = d(!1), B = !Ce(s), o = fe(null), X = ye(o, v, C), r = !!y, Z = () => {
40
+ switch (z) {
39
41
  case "always":
40
42
  return !0;
41
43
  case "onFocus":
42
- return N;
44
+ return V;
43
45
  case "never":
44
46
  return !1;
45
47
  default:
46
- return N;
48
+ return V;
47
49
  }
48
50
  }, l = (e = "") => {
49
- b !== e && (H(e), J(T(e)));
51
+ b !== e && (Q(e), W(T(e)));
50
52
  };
51
- ve(s) !== s && l(s);
52
- const X = (e) => {
53
- const a = e.target.value;
54
- x || l(a), n(a, e);
55
- }, Z = (e, a, Ie) => {
53
+ ke(s) !== s && l(s);
54
+ const ee = (e) => {
55
+ const n = e.target.value;
56
+ B || l(n), a(n, e);
57
+ }, te = (e, n, we) => {
56
58
  if (!o.current)
57
59
  return;
58
60
  const f = {
@@ -73,66 +75,67 @@ const R = "text", ke = ["text", "password", "email"], T = (u) => !fe(`${u}`), Te
73
75
  type: "change",
74
76
  timeStamp: Date.now()
75
77
  };
76
- f.target.unmaskedValue = a.unmaskedValue, x || l(e), n(e, f);
77
- }, ee = (e) => {
78
- V(!0), j(e);
79
- }, te = (e) => {
80
- V(!1), _(e);
78
+ f.target.unmaskedValue = n.unmaskedValue, B || l(e), a(e, f);
81
79
  }, se = (e) => {
82
- A(e);
80
+ x(!0), A(e);
81
+ }, ae = (e) => {
82
+ x(!1), j(e);
83
83
  }, ne = (e) => {
84
- l(""), n("", e), C && C(e);
85
- }, ae = h(
84
+ K(e);
85
+ }, oe = (e) => {
86
+ l(""), a("", e), k && k(e);
87
+ }, re = h(
86
88
  "ClearableInput",
87
89
  "input-group",
88
90
  L && "has-error",
89
91
  c && "pointer-events-none",
90
- I && I
91
- ), oe = h(
92
+ P && P
93
+ ), le = h(
92
94
  "form-control",
93
- q,
94
- w && "withClearButton",
95
+ G,
96
+ N && g && "withClearButton",
95
97
  r && "withInputMask",
96
98
  c && "disabled"
97
- ), re = h("clearButton", !w && "hide"), E = B?.toLowerCase(), le = ke.indexOf(E) !== -1 ? E : R, m = {
98
- ...me(G, ["value", "defaultValue", "onClear"]),
99
- className: oe,
100
- autoComplete: O,
101
- type: le,
99
+ ), ue = h("clearButton", (!N || !g) && "hide"), E = D?.toLowerCase(), ie = Ie.indexOf(E) !== -1 ? E : R, m = {
100
+ ...de(J, ["value", "defaultValue", "onClear"]),
101
+ className: le,
102
+ autoComplete: _,
103
+ type: ie,
102
104
  value: b,
103
- onKeyPress: se,
104
- onBlur: te,
105
- onFocus: ee,
106
- onChange: r ? void 0 : X,
105
+ onKeyPress: ne,
106
+ onBlur: ae,
107
+ onFocus: se,
108
+ onChange: r ? void 0 : ee,
107
109
  // In case of masked input, the onAccept callback is used
108
- onClick: K,
110
+ onClick: U,
109
111
  disabled: c,
110
- maxLength: r ? void 0 : M,
111
- tabIndex: S
112
+ readOnly: H,
113
+ maxLength: r ? void 0 : S,
114
+ tabIndex: O
112
115
  }, F = {};
113
- y && (F.dispatch = y);
114
- const ie = r ? /* @__PURE__ */ i(
115
- ge,
116
+ I && (F.dispatch = I);
117
+ const ce = r ? /* @__PURE__ */ u(
118
+ ve,
116
119
  {
117
120
  ...m,
118
- inputRef: Q,
119
- mask: k,
120
- definitions: $,
121
+ inputRef: X,
122
+ mask: y,
123
+ definitions: q,
121
124
  ...F,
122
- placeholderChar: U,
123
- onAccept: Z,
124
- lazy: !W(),
125
- overwrite: z
125
+ placeholderChar: Y,
126
+ onAccept: te,
127
+ lazy: !Z(),
128
+ overwrite: $
126
129
  }
127
- ) : /* @__PURE__ */ i("input", { ...m, ref: v || g });
128
- return /* @__PURE__ */ ue("div", { className: ae, children: [
129
- p && he(p) ? p(m) : ie,
130
- /* @__PURE__ */ i("span", { className: re, onClick: ne, children: /* @__PURE__ */ i("span", { className: "clearButtonIcon rioglyph rioglyph-remove-sign" }) })
130
+ ) : /* @__PURE__ */ u("input", { ...m, ref: v || C });
131
+ return /* @__PURE__ */ pe("div", { className: re, children: [
132
+ p && ge(p) ? p(m) : ce,
133
+ /* @__PURE__ */ u("span", { className: ue, onClick: oe, children: /* @__PURE__ */ u("span", { className: "clearButtonIcon rioglyph rioglyph-remove-sign" }) })
131
134
  ] });
132
135
  });
133
136
  export {
134
137
  R as DEFAULT_TYPE,
135
- ke as SUPPORTED_TYPES,
136
- Te as default
138
+ Ie as SUPPORTED_TYPES,
139
+ De as default
137
140
  };
138
141
  //# sourceMappingURL=ClearableInput.js.map