@perses-dev/components 0.35.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.
- package/dist/ContentWithLegend/ContentWithLegend.d.ts +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +4 -2
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +9 -3
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +17 -7
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +2 -5
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
- package/dist/GaugeChart/GaugeChart.d.ts +1 -1
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +1 -2
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/Legend/CompactLegend.d.ts +3 -1
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js +5 -2
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +11 -2
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +4 -2
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/ListLegend.d.ts +3 -1
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js +5 -4
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +15 -2
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +17 -5
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts +4 -2
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +8 -2
- package/dist/Legend/TableLegend.js.map +1 -1
- package/dist/LineChart/LineChart.d.ts +17 -3
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +33 -7
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LineChart/utils.d.ts +2 -1
- package/dist/LineChart/utils.d.ts.map +1 -1
- package/dist/LineChart/utils.js +14 -1
- package/dist/LineChart/utils.js.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +12 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +45 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -0
- package/dist/RefreshIntervalPicker/index.d.ts +2 -0
- package/dist/RefreshIntervalPicker/index.d.ts.map +1 -0
- package/dist/{model/units → RefreshIntervalPicker}/index.js +1 -3
- package/dist/RefreshIntervalPicker/index.js.map +1 -0
- package/dist/StatChart/StatChart.d.ts +1 -1
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +1 -1
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/Table/InnerTable.js +2 -2
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +57 -9
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableCell.d.ts +11 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +8 -3
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableCheckbox.js +1 -1
- package/dist/Table/TableCheckbox.js.map +1 -1
- package/dist/Table/TableHeaderCell.d.ts +23 -0
- package/dist/Table/TableHeaderCell.d.ts.map +1 -0
- package/dist/Table/TableHeaderCell.js +53 -0
- package/dist/Table/TableHeaderCell.js.map +1 -0
- package/dist/Table/VirtualizedTable.d.ts +3 -3
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +43 -8
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/model/table-model.d.ts +71 -7
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +6 -2
- package/dist/Table/model/table-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts +2 -1
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js +2 -1
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts +2 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +2 -11
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/UnitSelector/UnitSelector.d.ts +1 -1
- package/dist/UnitSelector/UnitSelector.d.ts.map +1 -1
- package/dist/UnitSelector/UnitSelector.js +1 -2
- package/dist/UnitSelector/UnitSelector.js.map +1 -1
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +4 -2
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +17 -7
- package/dist/cjs/GaugeChart/GaugeChart.js +2 -3
- package/dist/cjs/Legend/CompactLegend.js +5 -2
- package/dist/cjs/Legend/Legend.js +4 -2
- package/dist/cjs/Legend/ListLegend.js +5 -4
- package/dist/cjs/Legend/ListLegendItem.js +17 -5
- package/dist/cjs/Legend/TableLegend.js +8 -2
- package/dist/cjs/LineChart/LineChart.js +31 -5
- package/dist/cjs/LineChart/utils.js +14 -3
- package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +51 -0
- package/dist/cjs/{model/units → RefreshIntervalPicker}/index.js +1 -3
- package/dist/cjs/StatChart/StatChart.js +4 -4
- package/dist/cjs/Table/InnerTable.js +2 -2
- package/dist/cjs/Table/Table.js +56 -8
- package/dist/cjs/Table/TableCell.js +8 -3
- package/dist/cjs/Table/TableCheckbox.js +1 -1
- package/dist/cjs/Table/TableHeaderCell.js +59 -0
- package/dist/cjs/Table/VirtualizedTable.js +43 -8
- package/dist/cjs/Table/model/table-model.js +6 -2
- package/dist/cjs/TimeSeriesTooltip/TimeSeriesTooltip.js +2 -1
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +2 -11
- package/dist/cjs/UnitSelector/UnitSelector.js +6 -7
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/model/index.js +1 -1
- package/dist/{model/units/types.js → cjs/model/timeOption.js} +4 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/model/index.d.ts +1 -1
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +1 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/theme.d.ts +1 -4
- package/dist/model/theme.d.ts.map +1 -1
- package/dist/model/theme.js.map +1 -1
- package/dist/model/timeOption.d.ts +6 -0
- package/dist/model/timeOption.d.ts.map +1 -0
- package/dist/model/{units/constants.js → timeOption.js} +2 -4
- package/dist/model/timeOption.js.map +1 -0
- package/package.json +3 -4
- package/dist/cjs/model/units/bytes.js +0 -84
- package/dist/cjs/model/units/constants.js +0 -23
- package/dist/cjs/model/units/decimal.js +0 -62
- package/dist/cjs/model/units/percent.js +0 -73
- package/dist/cjs/model/units/time.js +0 -105
- package/dist/cjs/model/units/types.js +0 -28
- package/dist/cjs/model/units/units.js +0 -101
- package/dist/cjs/model/units/utils.js +0 -42
- package/dist/model/units/bytes.d.ts +0 -13
- package/dist/model/units/bytes.d.ts.map +0 -1
- package/dist/model/units/bytes.js +0 -66
- package/dist/model/units/bytes.js.map +0 -1
- package/dist/model/units/constants.d.ts +0 -2
- package/dist/model/units/constants.d.ts.map +0 -1
- package/dist/model/units/constants.js.map +0 -1
- package/dist/model/units/decimal.d.ts +0 -13
- package/dist/model/units/decimal.d.ts.map +0 -1
- package/dist/model/units/decimal.js +0 -49
- package/dist/model/units/decimal.js.map +0 -1
- package/dist/model/units/index.d.ts +0 -4
- package/dist/model/units/index.d.ts.map +0 -1
- package/dist/model/units/index.js.map +0 -1
- package/dist/model/units/percent.d.ts +0 -12
- package/dist/model/units/percent.d.ts.map +0 -1
- package/dist/model/units/percent.js +0 -60
- package/dist/model/units/percent.js.map +0 -1
- package/dist/model/units/time.d.ts +0 -22
- package/dist/model/units/time.d.ts.map +0 -1
- package/dist/model/units/time.js +0 -91
- package/dist/model/units/time.js.map +0 -1
- package/dist/model/units/types.d.ts +0 -47
- package/dist/model/units/types.d.ts.map +0 -1
- package/dist/model/units/types.js.map +0 -1
- package/dist/model/units/units.d.ts +0 -40
- package/dist/model/units/units.d.ts.map +0 -1
- package/dist/model/units/units.js +0 -80
- package/dist/model/units/units.js.map +0 -1
- package/dist/model/units/utils.d.ts +0 -4
- package/dist/model/units/utils.d.ts.map +0 -1
- package/dist/model/units/utils.js +0 -32
- package/dist/model/units/utils.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
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, "RefreshIntervalPicker", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>RefreshIntervalPicker
|
|
20
|
+
});
|
|
21
|
+
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _material = require("@mui/material");
|
|
23
|
+
function RefreshIntervalPicker(props) {
|
|
24
|
+
const { value , onChange , timeOptions , height } = props;
|
|
25
|
+
const formattedValue = value;
|
|
26
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.FormControl, {
|
|
27
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
28
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Select, {
|
|
29
|
+
id: "refreshInterval",
|
|
30
|
+
value: formattedValue,
|
|
31
|
+
onChange: (event)=>{
|
|
32
|
+
const duration = event.target.value;
|
|
33
|
+
onChange(duration);
|
|
34
|
+
},
|
|
35
|
+
inputProps: {
|
|
36
|
+
'aria-label': `Select refresh interval. Currently set to ${formattedValue}`
|
|
37
|
+
},
|
|
38
|
+
sx: {
|
|
39
|
+
'.MuiSelect-select': height ? {
|
|
40
|
+
lineHeight: height,
|
|
41
|
+
paddingY: 0
|
|
42
|
+
} : {}
|
|
43
|
+
},
|
|
44
|
+
children: timeOptions.map((item, idx)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
45
|
+
value: item.value.pastDuration,
|
|
46
|
+
children: item.display
|
|
47
|
+
}, idx))
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
_exportStar(require("./
|
|
18
|
-
_exportStar(require("./constants"), exports);
|
|
19
|
-
_exportStar(require("./types"), exports);
|
|
17
|
+
_exportStar(require("./RefreshIntervalPicker"), exports);
|
|
20
18
|
function _exportStar(from, to) {
|
|
21
19
|
Object.keys(from).forEach(function(k) {
|
|
22
20
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
@@ -20,14 +20,14 @@ Object.defineProperty(exports, "StatChart", {
|
|
|
20
20
|
});
|
|
21
21
|
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _react = require("react");
|
|
23
|
+
const _core = require("@perses-dev/core");
|
|
23
24
|
const _material = require("@mui/material");
|
|
24
25
|
const _merge = /*#__PURE__*/ _interopRequireDefault(require("lodash/merge"));
|
|
25
|
-
const
|
|
26
|
+
const _core1 = require("echarts/core");
|
|
26
27
|
const _charts = require("echarts/charts");
|
|
27
28
|
const _components = require("echarts/components");
|
|
28
29
|
const _renderers = require("echarts/renderers");
|
|
29
30
|
const _chartsThemeProvider = require("../context/ChartsThemeProvider");
|
|
30
|
-
const _units = require("../model/units");
|
|
31
31
|
const _echart = require("../EChart");
|
|
32
32
|
const _calculateFontSize = require("./calculateFontSize");
|
|
33
33
|
function _interopRequireDefault(obj) {
|
|
@@ -35,7 +35,7 @@ function _interopRequireDefault(obj) {
|
|
|
35
35
|
default: obj
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
(0,
|
|
38
|
+
(0, _core1.use)([
|
|
39
39
|
_charts.LineChart,
|
|
40
40
|
_components.GridComponent,
|
|
41
41
|
_components.DatasetComponent,
|
|
@@ -55,7 +55,7 @@ function StatChart(props) {
|
|
|
55
55
|
if (data.calculatedValue === null) {
|
|
56
56
|
formattedValue = 'null';
|
|
57
57
|
} else if (typeof data.calculatedValue === 'number') {
|
|
58
|
-
formattedValue = (0,
|
|
58
|
+
formattedValue = (0, _core.formatValue)(data.calculatedValue, unit);
|
|
59
59
|
}
|
|
60
60
|
const containerPadding = chartsTheme.container.padding.default;
|
|
61
61
|
var ref2;
|
|
@@ -31,14 +31,14 @@ const TABLE_DENSITY_CONFIG = {
|
|
|
31
31
|
compact: 'small',
|
|
32
32
|
standard: 'medium'
|
|
33
33
|
};
|
|
34
|
-
const InnerTable = /*#__PURE__*/ (0, _react.forwardRef)(function InnerTable({ density ,
|
|
34
|
+
const InnerTable = /*#__PURE__*/ (0, _react.forwardRef)(function InnerTable({ density , ...otherProps }, ref) {
|
|
35
35
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(StyledMuiTable, {
|
|
36
36
|
...otherProps,
|
|
37
37
|
tabIndex: -1,
|
|
38
38
|
size: TABLE_DENSITY_CONFIG[density],
|
|
39
39
|
ref: ref,
|
|
40
40
|
sx: {
|
|
41
|
-
width:
|
|
41
|
+
width: '100%'
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
});
|
package/dist/cjs/Table/Table.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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)
|
|
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
|
});
|
|
@@ -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
|
-
|
|
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: (
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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,11 +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
|
|
24
|
-
const _utils = require("../model/units/utils");
|
|
23
|
+
const _core = require("@perses-dev/core");
|
|
25
24
|
const _optionsEditorLayout = require("../OptionsEditorLayout");
|
|
26
25
|
const _settingsAutocomplete = require("../SettingsAutocomplete");
|
|
27
|
-
const KIND_OPTIONS = Object.entries(
|
|
26
|
+
const KIND_OPTIONS = Object.entries(_core.UNIT_CONFIG).map(([id, config])=>{
|
|
28
27
|
return {
|
|
29
28
|
id: id,
|
|
30
29
|
...config
|
|
@@ -66,8 +65,8 @@ function getOptionByDecimalPlaces(decimal_places) {
|
|
|
66
65
|
return DECIMAL_PLACES_OPTIONS.find((o)=>o.decimal_places === decimal_places);
|
|
67
66
|
}
|
|
68
67
|
function UnitSelector({ value , onChange }) {
|
|
69
|
-
const hasDecimalPlaces = (0,
|
|
70
|
-
const hasAbbreviate = (0,
|
|
68
|
+
const hasDecimalPlaces = (0, _core.isUnitWithDecimalPlaces)(value);
|
|
69
|
+
const hasAbbreviate = (0, _core.isUnitWithAbbreviate)(value);
|
|
71
70
|
const handleKindChange = (_, newValue)=>{
|
|
72
71
|
onChange({
|
|
73
72
|
kind: newValue.id
|
|
@@ -89,13 +88,13 @@ function UnitSelector({ value , onChange }) {
|
|
|
89
88
|
});
|
|
90
89
|
}
|
|
91
90
|
};
|
|
92
|
-
const kindConfig =
|
|
91
|
+
const kindConfig = _core.UNIT_CONFIG[value.kind];
|
|
93
92
|
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
94
93
|
children: [
|
|
95
94
|
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
|
|
96
95
|
label: "Abbreviate",
|
|
97
96
|
control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Switch, {
|
|
98
|
-
checked: hasAbbreviate ? (0,
|
|
97
|
+
checked: hasAbbreviate ? (0, _core.shouldAbbreviate)(value.abbreviate) : false,
|
|
99
98
|
onChange: handleAbbreviateChange,
|
|
100
99
|
disabled: !hasAbbreviate
|
|
101
100
|
})
|
package/dist/cjs/index.js
CHANGED
|
@@ -42,6 +42,7 @@ _exportStar(require("./utils"), exports);
|
|
|
42
42
|
_exportStar(require("./model"), exports);
|
|
43
43
|
_exportStar(require("./test-utils"), exports);
|
|
44
44
|
_exportStar(require("./theme"), exports);
|
|
45
|
+
_exportStar(require("./RefreshIntervalPicker"), exports);
|
|
45
46
|
function _exportStar(from, to) {
|
|
46
47
|
Object.keys(from).forEach(function(k) {
|
|
47
48
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -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("./
|
|
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,13 +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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'Percent',
|
|
18
|
-
'Decimal',
|
|
19
|
-
'Bytes'
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=types.js.map
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -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,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"}
|
|
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
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 './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';\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"}
|
|
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"}
|
package/dist/model/index.d.ts
CHANGED
|
@@ -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,
|
|
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"}
|