@perses-dev/components 0.34.0 → 0.36.0

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 (199) hide show
  1. package/dist/ContentWithLegend/ContentWithLegend.d.ts +1 -1
  2. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  3. package/dist/ContentWithLegend/ContentWithLegend.js +4 -2
  4. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  5. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +9 -3
  6. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  7. package/dist/ContentWithLegend/model/content-with-legend-model.js +17 -7
  8. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  9. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
  10. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  11. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  12. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +2 -5
  13. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
  14. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
  15. package/dist/Drawer/Drawer.js +1 -1
  16. package/dist/Drawer/Drawer.js.map +1 -1
  17. package/dist/GaugeChart/GaugeChart.d.ts +2 -2
  18. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  19. package/dist/GaugeChart/GaugeChart.js +7 -5
  20. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  21. package/dist/Legend/CompactLegend.d.ts +3 -1
  22. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  23. package/dist/Legend/CompactLegend.js +5 -2
  24. package/dist/Legend/CompactLegend.js.map +1 -1
  25. package/dist/Legend/Legend.d.ts +11 -2
  26. package/dist/Legend/Legend.d.ts.map +1 -1
  27. package/dist/Legend/Legend.js +4 -2
  28. package/dist/Legend/Legend.js.map +1 -1
  29. package/dist/Legend/ListLegend.d.ts +3 -1
  30. package/dist/Legend/ListLegend.d.ts.map +1 -1
  31. package/dist/Legend/ListLegend.js +5 -4
  32. package/dist/Legend/ListLegend.js.map +1 -1
  33. package/dist/Legend/ListLegendItem.d.ts +15 -2
  34. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  35. package/dist/Legend/ListLegendItem.js +17 -5
  36. package/dist/Legend/ListLegendItem.js.map +1 -1
  37. package/dist/Legend/TableLegend.d.ts +4 -2
  38. package/dist/Legend/TableLegend.d.ts.map +1 -1
  39. package/dist/Legend/TableLegend.js +8 -2
  40. package/dist/Legend/TableLegend.js.map +1 -1
  41. package/dist/LineChart/LineChart.d.ts +17 -3
  42. package/dist/LineChart/LineChart.d.ts.map +1 -1
  43. package/dist/LineChart/LineChart.js +33 -7
  44. package/dist/LineChart/LineChart.js.map +1 -1
  45. package/dist/LineChart/utils.d.ts +2 -1
  46. package/dist/LineChart/utils.d.ts.map +1 -1
  47. package/dist/LineChart/utils.js +14 -1
  48. package/dist/LineChart/utils.js.map +1 -1
  49. package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  50. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  51. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +12 -0
  52. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -0
  53. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +45 -0
  54. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -0
  55. package/dist/RefreshIntervalPicker/index.d.ts +2 -0
  56. package/dist/RefreshIntervalPicker/index.d.ts.map +1 -0
  57. package/dist/{model/units → RefreshIntervalPicker}/index.js +1 -3
  58. package/dist/RefreshIntervalPicker/index.js.map +1 -0
  59. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +36 -0
  60. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -0
  61. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +65 -0
  62. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -0
  63. package/dist/SettingsAutocomplete/index.d.ts +2 -0
  64. package/dist/SettingsAutocomplete/index.d.ts.map +1 -0
  65. package/dist/{model/units/constants.js → SettingsAutocomplete/index.js} +2 -4
  66. package/dist/SettingsAutocomplete/index.js.map +1 -0
  67. package/dist/StatChart/StatChart.d.ts +3 -2
  68. package/dist/StatChart/StatChart.d.ts.map +1 -1
  69. package/dist/StatChart/StatChart.js +74 -21
  70. package/dist/StatChart/StatChart.js.map +1 -1
  71. package/dist/StatChart/calculateFontSize.d.ts +14 -0
  72. package/dist/StatChart/calculateFontSize.d.ts.map +1 -0
  73. package/dist/StatChart/calculateFontSize.js +47 -0
  74. package/dist/StatChart/calculateFontSize.js.map +1 -0
  75. package/dist/Table/InnerTable.js +2 -2
  76. package/dist/Table/InnerTable.js.map +1 -1
  77. package/dist/Table/Table.d.ts +1 -1
  78. package/dist/Table/Table.d.ts.map +1 -1
  79. package/dist/Table/Table.js +57 -9
  80. package/dist/Table/Table.js.map +1 -1
  81. package/dist/Table/TableCell.d.ts +11 -1
  82. package/dist/Table/TableCell.d.ts.map +1 -1
  83. package/dist/Table/TableCell.js +8 -3
  84. package/dist/Table/TableCell.js.map +1 -1
  85. package/dist/Table/TableCheckbox.js +1 -1
  86. package/dist/Table/TableCheckbox.js.map +1 -1
  87. package/dist/Table/TableHeaderCell.d.ts +23 -0
  88. package/dist/Table/TableHeaderCell.d.ts.map +1 -0
  89. package/dist/Table/TableHeaderCell.js +53 -0
  90. package/dist/Table/TableHeaderCell.js.map +1 -0
  91. package/dist/Table/VirtualizedTable.d.ts +3 -3
  92. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  93. package/dist/Table/VirtualizedTable.js +43 -8
  94. package/dist/Table/VirtualizedTable.js.map +1 -1
  95. package/dist/Table/model/table-model.d.ts +71 -7
  96. package/dist/Table/model/table-model.d.ts.map +1 -1
  97. package/dist/Table/model/table-model.js +6 -2
  98. package/dist/Table/model/table-model.js.map +1 -1
  99. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts +2 -1
  100. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts.map +1 -1
  101. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js +2 -1
  102. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js.map +1 -1
  103. package/dist/TimeSeriesTooltip/nearby-series.d.ts +2 -1
  104. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  105. package/dist/TimeSeriesTooltip/nearby-series.js +2 -11
  106. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  107. package/dist/UnitSelector/UnitSelector.d.ts +1 -1
  108. package/dist/UnitSelector/UnitSelector.d.ts.map +1 -1
  109. package/dist/UnitSelector/UnitSelector.js +11 -24
  110. package/dist/UnitSelector/UnitSelector.js.map +1 -1
  111. package/dist/YAxisLabel.js +1 -1
  112. package/dist/YAxisLabel.js.map +1 -1
  113. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +4 -2
  114. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +17 -7
  115. package/dist/cjs/Drawer/Drawer.js +1 -1
  116. package/dist/cjs/GaugeChart/GaugeChart.js +7 -5
  117. package/dist/cjs/Legend/CompactLegend.js +5 -2
  118. package/dist/cjs/Legend/Legend.js +4 -2
  119. package/dist/cjs/Legend/ListLegend.js +5 -4
  120. package/dist/cjs/Legend/ListLegendItem.js +17 -5
  121. package/dist/cjs/Legend/TableLegend.js +8 -2
  122. package/dist/cjs/LineChart/LineChart.js +31 -5
  123. package/dist/cjs/LineChart/utils.js +14 -3
  124. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  125. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +51 -0
  126. package/dist/cjs/{model/units → RefreshIntervalPicker}/index.js +1 -3
  127. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +66 -0
  128. package/dist/cjs/{model/units/types.js → SettingsAutocomplete/index.js} +12 -12
  129. package/dist/cjs/StatChart/StatChart.js +75 -22
  130. package/dist/cjs/StatChart/calculateFontSize.js +51 -0
  131. package/dist/cjs/Table/InnerTable.js +2 -2
  132. package/dist/cjs/Table/Table.js +56 -8
  133. package/dist/cjs/Table/TableCell.js +8 -3
  134. package/dist/cjs/Table/TableCheckbox.js +1 -1
  135. package/dist/cjs/Table/TableHeaderCell.js +59 -0
  136. package/dist/cjs/Table/VirtualizedTable.js +43 -8
  137. package/dist/cjs/Table/model/table-model.js +6 -2
  138. package/dist/cjs/TimeSeriesTooltip/TimeSeriesTooltip.js +2 -1
  139. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +2 -11
  140. package/dist/cjs/UnitSelector/UnitSelector.js +15 -28
  141. package/dist/cjs/YAxisLabel.js +1 -1
  142. package/dist/cjs/index.js +2 -0
  143. package/dist/cjs/model/index.js +1 -1
  144. package/dist/cjs/model/{units/constants.js → timeOption.js} +0 -7
  145. package/dist/index.d.ts +2 -0
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +2 -0
  148. package/dist/index.js.map +1 -1
  149. package/dist/model/index.d.ts +1 -1
  150. package/dist/model/index.d.ts.map +1 -1
  151. package/dist/model/index.js +1 -1
  152. package/dist/model/index.js.map +1 -1
  153. package/dist/model/theme.d.ts +4 -6
  154. package/dist/model/theme.d.ts.map +1 -1
  155. package/dist/model/theme.js.map +1 -1
  156. package/dist/model/timeOption.d.ts +6 -0
  157. package/dist/model/timeOption.d.ts.map +1 -0
  158. package/dist/model/{units/types.js → timeOption.js} +2 -9
  159. package/dist/model/timeOption.js.map +1 -0
  160. package/package.json +3 -4
  161. package/dist/cjs/model/units/bytes.js +0 -84
  162. package/dist/cjs/model/units/decimal.js +0 -62
  163. package/dist/cjs/model/units/percent.js +0 -73
  164. package/dist/cjs/model/units/time.js +0 -105
  165. package/dist/cjs/model/units/units.js +0 -101
  166. package/dist/cjs/model/units/utils.js +0 -42
  167. package/dist/model/units/bytes.d.ts +0 -13
  168. package/dist/model/units/bytes.d.ts.map +0 -1
  169. package/dist/model/units/bytes.js +0 -66
  170. package/dist/model/units/bytes.js.map +0 -1
  171. package/dist/model/units/constants.d.ts +0 -2
  172. package/dist/model/units/constants.d.ts.map +0 -1
  173. package/dist/model/units/constants.js.map +0 -1
  174. package/dist/model/units/decimal.d.ts +0 -13
  175. package/dist/model/units/decimal.d.ts.map +0 -1
  176. package/dist/model/units/decimal.js +0 -49
  177. package/dist/model/units/decimal.js.map +0 -1
  178. package/dist/model/units/index.d.ts +0 -4
  179. package/dist/model/units/index.d.ts.map +0 -1
  180. package/dist/model/units/index.js.map +0 -1
  181. package/dist/model/units/percent.d.ts +0 -12
  182. package/dist/model/units/percent.d.ts.map +0 -1
  183. package/dist/model/units/percent.js +0 -60
  184. package/dist/model/units/percent.js.map +0 -1
  185. package/dist/model/units/time.d.ts +0 -22
  186. package/dist/model/units/time.d.ts.map +0 -1
  187. package/dist/model/units/time.js +0 -91
  188. package/dist/model/units/time.js.map +0 -1
  189. package/dist/model/units/types.d.ts +0 -47
  190. package/dist/model/units/types.d.ts.map +0 -1
  191. package/dist/model/units/types.js.map +0 -1
  192. package/dist/model/units/units.d.ts +0 -40
  193. package/dist/model/units/units.d.ts.map +0 -1
  194. package/dist/model/units/units.js +0 -80
  195. package/dist/model/units/units.js.map +0 -1
  196. package/dist/model/units/utils.d.ts +0 -4
  197. package/dist/model/units/utils.d.ts.map +0 -1
  198. package/dist/model/units/utils.js +0 -32
  199. package/dist/model/units/utils.js.map +0 -1
@@ -28,12 +28,49 @@ const _tableModel = require("./model/table-model");
28
28
  const DEFAULT_GET_ROW_ID = (data, index)=>{
29
29
  return `${index}`;
30
30
  };
31
- function Table({ data , columns , density ='standard' , checkboxSelection , onRowSelectionChange , getCheckboxColor , getRowId =DEFAULT_GET_ROW_ID , rowSelection ={} , ...otherProps }) {
31
+ // Setting these defaults one enables them to be consistent across renders instead
32
+ // of being recreated every time, which can be important for perf because react
33
+ // does not do deep equality checking for objects and arrays.
34
+ const DEFAULT_ROW_SELECTION = {};
35
+ const DEFAULT_SORTING = [];
36
+ function Table({ data , columns , density ='standard' , checkboxSelection , onRowSelectionChange , onSortingChange , getCheckboxColor , getRowId =DEFAULT_GET_ROW_ID , rowSelection =DEFAULT_ROW_SELECTION , sorting =DEFAULT_SORTING , rowSelectionVariant ='standard' , ...otherProps }) {
32
37
  const theme = (0, _material.useTheme)();
33
38
  const handleRowSelectionChange = (rowSelectionUpdater)=>{
34
39
  const newRowSelection = typeof rowSelectionUpdater === 'function' ? rowSelectionUpdater(rowSelection) : rowSelectionUpdater;
35
40
  onRowSelectionChange === null || onRowSelectionChange === void 0 ? void 0 : onRowSelectionChange(newRowSelection);
36
41
  };
42
+ const handleRowSelectionEvent = (0, _react.useCallback)((table, row, isModified)=>{
43
+ if (rowSelectionVariant === 'standard' || isModified) {
44
+ row.toggleSelected();
45
+ } else {
46
+ // Legend variant (when action not modified with shift/meta key).
47
+ // Note that this behavior needs to be kept in sync with behavior in
48
+ // the Legend component for list-based legends.
49
+ if (row.getIsSelected() && !table.getIsAllRowsSelected()) {
50
+ // Row was already selected. Revert to select all.
51
+ table.toggleAllRowsSelected();
52
+ } else {
53
+ // Focus the selected row.
54
+ onRowSelectionChange === null || onRowSelectionChange === void 0 ? void 0 : onRowSelectionChange({
55
+ [row.id]: true
56
+ });
57
+ }
58
+ }
59
+ }, [
60
+ onRowSelectionChange,
61
+ rowSelectionVariant
62
+ ]);
63
+ const handleCheckboxChange = (0, _react.useCallback)((e, table, row)=>{
64
+ const nativePointerEvent = e.nativeEvent && (e.nativeEvent instanceof MouseEvent || e.nativeEvent instanceof KeyboardEvent) ? e.nativeEvent : undefined;
65
+ const isModifed = !!(nativePointerEvent === null || nativePointerEvent === void 0 ? void 0 : nativePointerEvent.metaKey) || !!(nativePointerEvent === null || nativePointerEvent === void 0 ? void 0 : nativePointerEvent.shiftKey);
66
+ handleRowSelectionEvent(table, row, isModifed);
67
+ }, [
68
+ handleRowSelectionEvent
69
+ ]);
70
+ const handleSortingChange = (sortingUpdater)=>{
71
+ const newSorting = typeof sortingUpdater === 'function' ? sortingUpdater(sorting) : sortingUpdater;
72
+ onSortingChange === null || onSortingChange === void 0 ? void 0 : onSortingChange(newSorting);
73
+ };
37
74
  const checkboxColumn = (0, _react.useMemo)(()=>{
38
75
  return {
39
76
  id: 'checkboxRowSelect',
@@ -47,22 +84,24 @@ function Table({ data , columns , density ='standard' , checkboxSelection , onRo
47
84
  density: density
48
85
  });
49
86
  },
50
- cell: ({ row })=>{
87
+ cell: ({ row , table })=>{
51
88
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCheckbox.TableCheckbox, {
52
89
  checked: row.getIsSelected(),
53
90
  indeterminate: row.getIsSomeSelected(),
54
91
  onChange: (e)=>{
55
- row.getToggleSelectedHandler()(e);
92
+ handleCheckboxChange(e, table, row);
56
93
  },
57
94
  color: getCheckboxColor === null || getCheckboxColor === void 0 ? void 0 : getCheckboxColor(row.original),
58
95
  density: density
59
96
  });
60
- }
97
+ },
98
+ enableSorting: false
61
99
  };
62
100
  }, [
101
+ theme.palette.text.primary,
63
102
  density,
64
103
  getCheckboxColor,
65
- theme.palette.text.primary
104
+ handleCheckboxChange
66
105
  ]);
67
106
  const tableColumns = (0, _react.useMemo)(()=>{
68
107
  const initTableColumns = (0, _tableModel.persesColumnsToTanstackColumns)(columns);
@@ -80,15 +119,24 @@ function Table({ data , columns , density ='standard' , checkboxSelection , onRo
80
119
  columns: tableColumns,
81
120
  getRowId,
82
121
  getCoreRowModel: (0, _reactTable.getCoreRowModel)(),
122
+ getSortedRowModel: (0, _reactTable.getSortedRowModel)(),
83
123
  enableRowSelection: !!checkboxSelection,
84
124
  onRowSelectionChange: handleRowSelectionChange,
125
+ onSortingChange: handleSortingChange,
126
+ // For now, defaulting to sort by descending first. We can expose the ability
127
+ // to customize it if/when we have use cases for it.
128
+ sortDescFirst: true,
85
129
  state: {
86
- rowSelection
130
+ rowSelection,
131
+ sorting
87
132
  }
88
133
  });
89
- const handleRowClick = (0, _react.useCallback)((rowId)=>{
90
- table.getRow(rowId).toggleSelected();
134
+ const handleRowClick = (0, _react.useCallback)((e, rowId)=>{
135
+ const row = table.getRow(rowId);
136
+ const isModifiedClick = e.metaKey || e.shiftKey;
137
+ handleRowSelectionEvent(table, row, isModifiedClick);
91
138
  }, [
139
+ handleRowSelectionEvent,
92
140
  table
93
141
  ]);
94
142
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_virtualizedTable.VirtualizedTable, {
@@ -37,7 +37,7 @@ const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme
37
37
  borderRadius: 0
38
38
  }
39
39
  }));
40
- function TableCell({ children , density , variant , width , focusState ='none' , onFocusTrigger , isFirstColumn , isLastColumn , ...otherProps }) {
40
+ function TableCell({ children , density , variant , width , focusState ='none' , onFocusTrigger , isFirstColumn , isLastColumn , description , ...otherProps }) {
41
41
  const theme = (0, _material.useTheme)();
42
42
  const elRef = (0, _react.useRef)();
43
43
  const isHeader = variant === 'head';
@@ -51,7 +51,7 @@ function TableCell({ children , density , variant , width , focusState ='none' ,
51
51
  const handleFocus = (e)=>{
52
52
  var ref;
53
53
  // From https://zellwk.com/blog/keyboard-focusable-elements/
54
- const nestedFocusTarget = (ref = e.currentTarget) === null || ref === void 0 ? void 0 : ref.querySelector('a[href], button, input, textarea, select, details');
54
+ const nestedFocusTarget = (ref = e.currentTarget) === null || ref === void 0 ? void 0 : ref.querySelector('a[href], button, input, textarea, select, details,[role="button"]');
55
55
  if (nestedFocusTarget) {
56
56
  // If the cell has a focusable child, focus it instead. Mostly used for
57
57
  // checkbox cells, but could have other uses.
@@ -92,8 +92,13 @@ function TableCell({ children , density , variant , width , focusState ='none' ,
92
92
  // this with a prop on column config in the future.
93
93
  whiteSpace: 'nowrap',
94
94
  overflow: 'hidden',
95
- textOverflow: 'ellipsis'
95
+ textOverflow: 'ellipsis',
96
+ // Need to inherit from the MUI cell because this manages some ordering
97
+ // that the `TableSortLabel` uses to determine the location of the icon
98
+ // in headers.
99
+ flexDirection: 'inherit'
96
100
  },
101
+ title: description,
97
102
  children: children
98
103
  })
99
104
  });
@@ -48,7 +48,7 @@ function TableCheckbox({ color , density , ...otherProps }) {
48
48
  background: color ? (0, _material.alpha)(color, 0.5) : undefined
49
49
  },
50
50
  '& .MuiSvgIcon-root': {
51
- fontSize: isCompact ? 14 : 16
51
+ fontSize: isCompact ? 16 : 18
52
52
  }
53
53
  }
54
54
  });
@@ -0,0 +1,59 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "TableHeaderCell", {
18
+ enumerable: true,
19
+ get: ()=>TableHeaderCell
20
+ });
21
+ const _jsxRuntime = require("react/jsx-runtime");
22
+ const _material = require("@mui/material");
23
+ const _tableCell = require("./TableCell");
24
+ function TableHeaderCell({ onSort , sortDirection , nextSortDirection , children , ...cellProps }) {
25
+ const showSortLabel = !!onSort;
26
+ const headerText = /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
27
+ noWrap: true,
28
+ variant: "inherit",
29
+ component: "div",
30
+ color: "inherit",
31
+ children: children
32
+ });
33
+ const isActive = !!sortDirection;
34
+ const direction = isActive ? sortDirection : nextSortDirection;
35
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCell.TableCell, {
36
+ ...cellProps,
37
+ children: showSortLabel ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TableSortLabel, {
38
+ onClick: onSort,
39
+ direction: direction,
40
+ active: isActive,
41
+ sx: {
42
+ // Overrides a default vertical alignment in the CSS that changes
43
+ // the header vertical rhythm in a way that's inconsistent with
44
+ // non-sorting headers.
45
+ verticalAlign: 'unset',
46
+ // Makes it possible to ellipsize the text if it's too long.
47
+ maxWidth: '100%',
48
+ // Make the arrow visible when focused using the keyboard to assist
49
+ // with a11y.
50
+ '&:focus-visible': {
51
+ [`& .${_material.tableSortLabelClasses.icon}`]: {
52
+ opacity: isActive ? 1 : 0.5
53
+ }
54
+ }
55
+ },
56
+ children: headerText
57
+ }) : headerText
58
+ });
59
+ }
@@ -27,10 +27,11 @@ const _tableRow = require("./TableRow");
27
27
  const _tableBody = require("./TableBody");
28
28
  const _innerTable = require("./InnerTable");
29
29
  const _tableHead = require("./TableHead");
30
+ const _tableHeaderCell = require("./TableHeaderCell");
30
31
  const _tableCell = require("./TableCell");
31
32
  const _virtualizedTableContainer = require("./VirtualizedTableContainer");
32
33
  const _useVirtualizedTableKeyboardNav = require("./hooks/useVirtualizedTableKeyboardNav");
33
- function VirtualizedTable({ width , height , density , onRowClick , rows , columns , headers }) {
34
+ function VirtualizedTable({ width , height , density , onRowClick , onRowMouseOver , onRowMouseOut , rows , columns , headers }) {
34
35
  const virtuosoRef = (0, _react.useRef)(null);
35
36
  // Use a ref for these values because they are only needed for keyboard
36
37
  // focus interactions and setting them on state will lead to a significant
@@ -74,10 +75,20 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
74
75
  if (!row) {
75
76
  return null;
76
77
  }
78
+ const rowEventOpts = {
79
+ id: row.id,
80
+ index: row.index
81
+ };
77
82
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableRow.TableRow, {
78
83
  ...props,
79
- onClick: ()=>onRowClick(row.id),
80
- density: density
84
+ onClick: (e)=>onRowClick(e, row.id),
85
+ density: density,
86
+ onMouseOver: (e)=>{
87
+ onRowMouseOver === null || onRowMouseOver === void 0 ? void 0 : onRowMouseOver(e, rowEventOpts);
88
+ },
89
+ onMouseOut: (e)=>{
90
+ onRowMouseOut === null || onRowMouseOut === void 0 ? void 0 : onRowMouseOut(e, rowEventOpts);
91
+ }
81
92
  });
82
93
  },
83
94
  TableBody: _tableBody.TableBody
@@ -86,6 +97,8 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
86
97
  density,
87
98
  keyboardNav.onTableKeyDown,
88
99
  onRowClick,
100
+ onRowMouseOut,
101
+ onRowMouseOver,
89
102
  rows,
90
103
  width
91
104
  ]);
@@ -108,17 +121,23 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
108
121
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableRow.TableRow, {
109
122
  density: density,
110
123
  children: headerGroup.headers.map((header, i, headers)=>{
111
- var ref;
124
+ var ref, ref1;
112
125
  const column = header.column;
113
126
  const position = {
114
127
  row: 0,
115
128
  column: i
116
129
  };
117
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCell.TableCell, {
130
+ const isSorted = column.getIsSorted();
131
+ const nextSorting = column.getNextSortingOrder();
132
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableHeaderCell.TableHeaderCell, {
133
+ onSort: column.getCanSort() ? column.getToggleSortingHandler() : undefined,
134
+ sortDirection: typeof isSorted === 'string' ? isSorted : undefined,
135
+ nextSortDirection: typeof nextSorting === 'string' ? nextSorting : undefined,
118
136
  width: column.getSize() || 'auto',
119
137
  align: (ref = column.columnDef.meta) === null || ref === void 0 ? void 0 : ref.align,
120
138
  variant: "head",
121
139
  density: density,
140
+ description: (ref1 = column.columnDef.meta) === null || ref1 === void 0 ? void 0 : ref1.headerDescription,
122
141
  focusState: getFocusState(position),
123
142
  onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
124
143
  isFirstColumn: i === 0,
@@ -137,21 +156,37 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
137
156
  }
138
157
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
139
158
  children: row.getVisibleCells().map((cell, i, cells)=>{
140
- var ref;
159
+ var ref, ref1;
141
160
  const position = {
142
161
  // Add 1 to the row index because the header is row 0
143
162
  row: index + 1,
144
163
  column: i
145
164
  };
165
+ const cellContext = cell.getContext();
166
+ const cellRenderFn = cell.column.columnDef.cell;
167
+ const cellContent = typeof cellRenderFn == 'function' ? cellRenderFn(cellContext) : null;
168
+ const cellDescriptionDef = (ref = cell.column.columnDef.meta) === null || ref === void 0 ? void 0 : ref.cellDescription;
169
+ let description = undefined;
170
+ if (typeof cellDescriptionDef === 'function') {
171
+ // If the cell description is a function, set the value using
172
+ // the function.
173
+ description = cellDescriptionDef(cellContext);
174
+ } else if (cellDescriptionDef && typeof cellContent === 'string') {
175
+ // If the cell description is `true` AND the cell content is
176
+ // a string (and thus viable as a `title` attribute), use the
177
+ // cell content.
178
+ description = cellContent;
179
+ }
146
180
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCell.TableCell, {
147
181
  width: cell.column.getSize() || 'auto',
148
- align: (ref = cell.column.columnDef.meta) === null || ref === void 0 ? void 0 : ref.align,
182
+ align: (ref1 = cell.column.columnDef.meta) === null || ref1 === void 0 ? void 0 : ref1.align,
149
183
  density: density,
150
184
  focusState: getFocusState(position),
151
185
  onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
152
186
  isFirstColumn: i === 0,
153
187
  isLastColumn: i === cells.length - 1,
154
- children: (0, _reactTable.flexRender)(cell.column.columnDef.cell, cell.getContext())
188
+ description: description,
189
+ children: cellContent
155
190
  }, cell.id);
156
191
  })
157
192
  });
@@ -61,7 +61,7 @@ function getTableCellLayout(theme, density, { isLastColumn , isFirstColumn } =
61
61
  };
62
62
  }
63
63
  function persesColumnsToTanstackColumns(columns) {
64
- const tableCols = columns.map(({ width , align , ...otherProps })=>{
64
+ const tableCols = columns.map(({ width , align , headerDescription , cellDescription , enableSorting , ...otherProps })=>{
65
65
  // Tanstack Table does not support an "auto" value to naturally size to fit
66
66
  // the space in a table. We translate our custom "auto" setting to 0 size
67
67
  // for these columns, so it is easy to fall back to auto when rendering.
@@ -79,10 +79,14 @@ function persesColumnsToTanstackColumns(columns) {
79
79
  const result = {
80
80
  ...otherProps,
81
81
  ...sizeProps,
82
+ // Default sorting to false, so it is very explicitly set per column.
83
+ enableSorting: !!enableSorting,
82
84
  // Open-ended store for extra metadata in TanStack Table, so you can bake
83
85
  // in your own features.
84
86
  meta: {
85
- align
87
+ align,
88
+ headerDescription,
89
+ cellDescription
86
90
  }
87
91
  };
88
92
  return result;
@@ -78,7 +78,8 @@ const TimeSeriesTooltip = /*#__PURE__*/ (0, _react.memo)(function TimeSeriesTool
78
78
  visibility: 'visible',
79
79
  opacity: 1,
80
80
  transition: 'all 0.1s ease-out',
81
- zIndex: theme.zIndex.tooltip,
81
+ // Ensure pinned tooltip shows behind edit panel drawer and sticky header
82
+ zIndex: pinnedPos !== null ? 'auto' : theme.zIndex.tooltip,
82
83
  overflow: 'hidden',
83
84
  '&:hover': {
84
85
  overflowY: 'auto'
@@ -29,6 +29,7 @@ _export(exports, {
29
29
  isWithinPercentageRange: ()=>isWithinPercentageRange,
30
30
  getYBuffer: ()=>getYBuffer
31
31
  });
32
+ const _core = require("@perses-dev/core");
32
33
  const _model = require("../model");
33
34
  const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5; // adjusts how many series show in tooltip (higher == more series shown)
34
35
  const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30; // used for adjustment after series number divisor
@@ -84,7 +85,7 @@ function checkforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
84
85
  }
85
86
  // determine whether to convert timestamp to ms, see: https://stackoverflow.com/a/23982005/17575201
86
87
  const xValueMilliSeconds = xValue > 99999999999 ? xValue : xValue * 1000;
87
- const formattedY = (0, _model.formatValue)(yValue, unit);
88
+ const formattedY = (0, _core.formatValue)(yValue, unit);
88
89
  currentNearbySeriesData.push({
89
90
  seriesIdx: seriesIdx,
90
91
  datumIdx: datumIdx,
@@ -174,16 +175,6 @@ function getNearbySeriesData({ mousePos , pinnedPos , chartData , chart , unit ,
174
175
  return checkforNearbySeries(chartData, pointInGrid, yBuffer, chart, unit);
175
176
  }
176
177
  }
177
- // clear all highlighted series when cursor exits canvas
178
- // https://echarts.apache.org/en/api.html#action.downplay
179
- for(let i = 0; i < totalSeries; i++){
180
- if ((chart === null || chart === void 0 ? void 0 : chart.dispatchAction) !== undefined) {
181
- chart.dispatchAction({
182
- type: 'downplay',
183
- seriesIndex: i
184
- });
185
- }
186
- }
187
178
  return [];
188
179
  }
189
180
  function isWithinPercentageRange({ valueToCheck , baseValue , percentage }) {
@@ -20,10 +20,10 @@ Object.defineProperty(exports, "UnitSelector", {
20
20
  });
21
21
  const _jsxRuntime = require("react/jsx-runtime");
22
22
  const _material = require("@mui/material");
23
- const _model = require("../model");
24
- const _utils = require("../model/units/utils");
23
+ const _core = require("@perses-dev/core");
25
24
  const _optionsEditorLayout = require("../OptionsEditorLayout");
26
- const KIND_OPTIONS = Object.entries(_model.UNIT_CONFIG).map(([id, config])=>{
25
+ const _settingsAutocomplete = require("../SettingsAutocomplete");
26
+ const KIND_OPTIONS = Object.entries(_core.UNIT_CONFIG).map(([id, config])=>{
27
27
  return {
28
28
  id: id,
29
29
  ...config
@@ -31,26 +31,32 @@ const KIND_OPTIONS = Object.entries(_model.UNIT_CONFIG).map(([id, config])=>{
31
31
  }).filter((config)=>!config.disableSelectorOption);
32
32
  const DECIMAL_PLACES_OPTIONS = [
33
33
  {
34
+ id: 'default',
34
35
  label: 'Default',
35
36
  decimal_places: undefined
36
37
  },
37
38
  {
39
+ id: '0',
38
40
  label: '0',
39
41
  decimal_places: 0
40
42
  },
41
43
  {
44
+ id: '1',
42
45
  label: '1',
43
46
  decimal_places: 1
44
47
  },
45
48
  {
49
+ id: '2',
46
50
  label: '2',
47
51
  decimal_places: 2
48
52
  },
49
53
  {
54
+ id: '3',
50
55
  label: '3',
51
56
  decimal_places: 3
52
57
  },
53
58
  {
59
+ id: '4',
54
60
  label: '4',
55
61
  decimal_places: 4
56
62
  }
@@ -59,8 +65,8 @@ function getOptionByDecimalPlaces(decimal_places) {
59
65
  return DECIMAL_PLACES_OPTIONS.find((o)=>o.decimal_places === decimal_places);
60
66
  }
61
67
  function UnitSelector({ value , onChange }) {
62
- const hasDecimalPlaces = (0, _model.isUnitWithDecimalPlaces)(value);
63
- const hasAbbreviate = (0, _model.isUnitWithAbbreviate)(value);
68
+ const hasDecimalPlaces = (0, _core.isUnitWithDecimalPlaces)(value);
69
+ const hasAbbreviate = (0, _core.isUnitWithAbbreviate)(value);
64
70
  const handleKindChange = (_, newValue)=>{
65
71
  onChange({
66
72
  kind: newValue.id
@@ -82,55 +88,36 @@ function UnitSelector({ value , onChange }) {
82
88
  });
83
89
  }
84
90
  };
85
- const kindConfig = _model.UNIT_CONFIG[value.kind];
91
+ const kindConfig = _core.UNIT_CONFIG[value.kind];
86
92
  return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
87
93
  children: [
88
94
  /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
89
95
  label: "Abbreviate",
90
96
  control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Switch, {
91
- checked: hasAbbreviate ? (0, _utils.shouldAbbreviate)(value.abbreviate) : false,
97
+ checked: hasAbbreviate ? (0, _core.shouldAbbreviate)(value.abbreviate) : false,
92
98
  onChange: handleAbbreviateChange,
93
99
  disabled: !hasAbbreviate
94
100
  })
95
101
  }),
96
102
  /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
97
103
  label: "Unit",
98
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Autocomplete, {
104
+ control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_settingsAutocomplete.SettingsAutocomplete, {
99
105
  value: {
100
106
  id: value.kind,
101
107
  ...kindConfig
102
108
  },
103
109
  options: KIND_OPTIONS,
104
- isOptionEqualToValue: (option, value)=>option.id === value.id,
105
110
  groupBy: (option)=>option.group,
106
- renderInput: (params)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
107
- ...params
108
- }),
109
- renderOption: (renderOptsProps, option)=>{
110
- // Custom option needed to get some increased left padding to make
111
- // the items more distinct from the group label.
112
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)("li", {
113
- ...renderOptsProps,
114
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
115
- paddingLeft: (theme)=>theme.spacing(1),
116
- children: option.label
117
- })
118
- });
119
- },
120
111
  onChange: handleKindChange,
121
112
  disableClearable: true
122
113
  })
123
114
  }),
124
115
  /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
125
116
  label: "Decimals",
126
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Autocomplete, {
117
+ control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_settingsAutocomplete.SettingsAutocomplete, {
127
118
  value: getOptionByDecimalPlaces(value.decimal_places),
128
119
  options: DECIMAL_PLACES_OPTIONS,
129
120
  getOptionLabel: (o)=>o.label,
130
- isOptionEqualToValue: (option, value)=>option.label === value.label,
131
- renderInput: (params)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
132
- ...params
133
- }),
134
121
  onChange: handleDecimalPlacesChange,
135
122
  disabled: !hasDecimalPlaces,
136
123
  disableClearable: true
@@ -26,7 +26,7 @@ function YAxisLabel({ name , height }) {
26
26
  display: 'inline-block',
27
27
  maxWidth: height,
28
28
  position: 'absolute',
29
- top: '45%',
29
+ top: `calc(${height}px / 2)`,
30
30
  transform: 'translateX(-50%) rotate(-90deg)',
31
31
  transformOrigin: 'top',
32
32
  textAlign: 'center',
package/dist/cjs/index.js CHANGED
@@ -28,6 +28,7 @@ _exportStar(require("./JSONEditor"), exports);
28
28
  _exportStar(require("./Legend"), exports);
29
29
  _exportStar(require("./LineChart"), exports);
30
30
  _exportStar(require("./OptionsEditorLayout"), exports);
31
+ _exportStar(require("./SettingsAutocomplete"), exports);
31
32
  _exportStar(require("./StatChart"), exports);
32
33
  _exportStar(require("./Table"), exports);
33
34
  _exportStar(require("./ThresholdsEditor"), exports);
@@ -41,6 +42,7 @@ _exportStar(require("./utils"), exports);
41
42
  _exportStar(require("./model"), exports);
42
43
  _exportStar(require("./test-utils"), exports);
43
44
  _exportStar(require("./theme"), exports);
45
+ _exportStar(require("./RefreshIntervalPicker"), exports);
44
46
  function _exportStar(from, to) {
45
47
  Object.keys(from).forEach(function(k) {
46
48
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
@@ -16,7 +16,7 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  _exportStar(require("./graph"), exports);
18
18
  _exportStar(require("./theme"), exports);
19
- _exportStar(require("./units"), exports);
19
+ _exportStar(require("./timeOption"), exports);
20
20
  function _exportStar(from, to) {
21
21
  Object.keys(from).forEach(function(k) {
22
22
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
@@ -10,14 +10,7 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- // Common constants needed across individual unit groups and the overall
14
- // combined units.
15
13
  "use strict";
16
14
  Object.defineProperty(exports, "__esModule", {
17
15
  value: true
18
16
  });
19
- Object.defineProperty(exports, "MAX_SIGNIFICANT_DIGITS", {
20
- enumerable: true,
21
- get: ()=>MAX_SIGNIFICANT_DIGITS
22
- });
23
- const MAX_SIGNIFICANT_DIGITS = 3;
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './JSONEditor';
12
12
  export * from './Legend';
13
13
  export * from './LineChart';
14
14
  export * from './OptionsEditorLayout';
15
+ export * from './SettingsAutocomplete';
15
16
  export * from './StatChart';
16
17
  export * from './Table';
17
18
  export * from './ThresholdsEditor';
@@ -25,4 +26,5 @@ export * from './utils';
25
26
  export * from './model';
26
27
  export * from './test-utils';
27
28
  export * from './theme';
29
+ export * from './RefreshIntervalPicker';
28
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ export * from './JSONEditor';
24
24
  export * from './Legend';
25
25
  export * from './LineChart';
26
26
  export * from './OptionsEditorLayout';
27
+ export * from './SettingsAutocomplete';
27
28
  export * from './StatChart';
28
29
  export * from './Table';
29
30
  export * from './ThresholdsEditor';
@@ -37,5 +38,6 @@ export * from './utils';
37
38
  export * from './model';
38
39
  export * from './test-utils';
39
40
  export * from './theme';
41
+ export * from './RefreshIntervalPicker';
40
42
 
41
43
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './DateTimeRangePicker';\nexport * from './Dialog';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './OptionsEditorLayout';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeSeriesTooltip';\nexport * from './UnitSelector';\nexport * from './YAxisLabel';\nexport * from './context/ChartsThemeProvider';\nexport * from './context/TimeZoneProvider';\nexport * from './context/SnackbarProvider';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './DateTimeRangePicker';\nexport * from './Dialog';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './OptionsEditorLayout';\nexport * from './SettingsAutocomplete';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeSeriesTooltip';\nexport * from './UnitSelector';\nexport * from './YAxisLabel';\nexport * from './context/ChartsThemeProvider';\nexport * from './context/TimeZoneProvider';\nexport * from './context/SnackbarProvider';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\nexport * from './RefreshIntervalPicker';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export * from './graph';
2
2
  export * from './theme';
3
- export * from './units';
3
+ export * from './timeOption';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
@@ -12,6 +12,6 @@
12
12
  // limitations under the License.
13
13
  export * from './graph';
14
14
  export * from './theme';
15
- export * from './units';
15
+ export * from './timeOption';
16
16
 
17
17
  //# sourceMappingURL=index.js.map