@perses-dev/components 0.32.0 → 0.34.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.js +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +3 -3
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +12 -3
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/EChart/EChart.d.ts +2 -1
- package/dist/EChart/EChart.d.ts.map +1 -1
- package/dist/EChart/EChart.js +15 -3
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/Legend/CompactLegend.d.ts +1 -1
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js +1 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +8 -3
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +4 -3
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/ListLegend.d.ts +1 -1
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js +1 -1
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +1 -1
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts +3 -2
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +10 -2
- package/dist/Legend/TableLegend.js.map +1 -1
- package/dist/Legend/index.d.ts +1 -0
- package/dist/Legend/index.d.ts.map +1 -1
- package/dist/Legend/index.js +1 -0
- package/dist/Legend/index.js.map +1 -1
- package/dist/Legend/legend-model.d.ts +24 -0
- package/dist/Legend/legend-model.d.ts.map +1 -0
- package/dist/Legend/legend-model.js +19 -0
- package/dist/Legend/legend-model.js.map +1 -0
- package/dist/LineChart/LineChart.d.ts +2 -1
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +3 -2
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LineChart/utils.js +1 -1
- package/dist/LineChart/utils.js.map +1 -1
- package/dist/StatChart/StatChart.js +1 -1
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/Table/InnerTable.js +1 -1
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.js +1 -1
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableCell.d.ts +6 -3
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +6 -3
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +3 -3
- package/dist/Table/TableRow.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +11 -5
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/model/table-model.d.ts +16 -2
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +18 -7
- package/dist/Table/model/table-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +4 -2
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +1 -1
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +13 -4
- package/dist/cjs/EChart/EChart.js +22 -5
- package/dist/cjs/Legend/CompactLegend.js +2 -2
- package/dist/cjs/Legend/Legend.js +5 -4
- package/dist/cjs/Legend/ListLegend.js +2 -2
- package/dist/cjs/Legend/TableLegend.js +10 -2
- package/dist/cjs/Legend/index.js +1 -0
- package/dist/cjs/{LegendOptionsEditor/index.js → Legend/legend-model.js} +8 -11
- package/dist/cjs/LineChart/LineChart.js +3 -2
- package/dist/cjs/LineChart/utils.js +7 -2
- package/dist/cjs/StatChart/StatChart.js +7 -2
- package/dist/cjs/Table/InnerTable.js +1 -1
- package/dist/cjs/Table/Table.js +1 -1
- package/dist/cjs/Table/TableCell.js +6 -3
- package/dist/cjs/Table/TableRow.js +2 -2
- package/dist/cjs/Table/VirtualizedTable.js +11 -5
- package/dist/cjs/Table/model/table-model.js +18 -7
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +4 -2
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/model/index.js +0 -1
- package/dist/cjs/theme/component-overrides/paper.js +27 -0
- package/dist/cjs/theme/palette/background.js +2 -2
- package/dist/cjs/theme/theme.js +2 -0
- package/dist/cjs/utils/theme-gen.js +7 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/model/graph.d.ts +1 -1
- package/dist/model/graph.d.ts.map +1 -1
- package/dist/model/graph.js.map +1 -1
- package/dist/model/index.d.ts +0 -1
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +0 -1
- package/dist/model/index.js.map +1 -1
- package/dist/theme/component-overrides/paper.d.ts +3 -0
- package/dist/theme/component-overrides/paper.d.ts.map +1 -0
- package/dist/{LegendOptionsEditor/index.js → theme/component-overrides/paper.js} +8 -2
- package/dist/theme/component-overrides/paper.js.map +1 -0
- package/dist/theme/palette/background.js +2 -2
- package/dist/theme/palette/background.js.map +1 -1
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +2 -0
- package/dist/theme/theme.js.map +1 -1
- package/dist/utils/theme-gen.js +1 -1
- package/dist/utils/theme-gen.js.map +1 -1
- package/package.json +5 -8
- package/dist/LegendOptionsEditor/LegendOptionsEditor.d.ts +0 -8
- package/dist/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +0 -1
- package/dist/LegendOptionsEditor/LegendOptionsEditor.js +0 -109
- package/dist/LegendOptionsEditor/LegendOptionsEditor.js.map +0 -1
- package/dist/LegendOptionsEditor/index.d.ts +0 -2
- package/dist/LegendOptionsEditor/index.d.ts.map +0 -1
- package/dist/LegendOptionsEditor/index.js.map +0 -1
- package/dist/cjs/LegendOptionsEditor/LegendOptionsEditor.js +0 -115
- package/dist/cjs/model/legend.js +0 -102
- package/dist/model/legend.d.ts +0 -36
- package/dist/model/legend.d.ts.map +0 -1
- package/dist/model/legend.js +0 -81
- package/dist/model/legend.js.map +0 -1
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "Legend", {
|
|
|
21
21
|
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _material = require("@mui/material");
|
|
23
23
|
const _immer = require("immer");
|
|
24
|
-
const
|
|
24
|
+
const _core = require("@perses-dev/core");
|
|
25
25
|
const _listLegend = require("./ListLegend");
|
|
26
26
|
const _compactLegend = require("./CompactLegend");
|
|
27
27
|
const _tableLegend = require("./TableLegend");
|
|
@@ -31,7 +31,7 @@ const _tableLegend = require("./TableLegend");
|
|
|
31
31
|
// Set this number based on testing, but it may need to be tuned a bit on the
|
|
32
32
|
// future as people test this out on different machines.
|
|
33
33
|
const NEED_VIRTUALIZATION_LIMIT = 500;
|
|
34
|
-
function Legend({ width , height , options , data , selectedItems , onSelectedItemsChange }) {
|
|
34
|
+
function Legend({ width , height , options , data , selectedItems , onSelectedItemsChange , tableProps }) {
|
|
35
35
|
const onLegendItemClick = (e, seriesId)=>{
|
|
36
36
|
const isModifiedClick = e.metaKey || e.shiftKey;
|
|
37
37
|
const newSelected = (0, _immer.produce)(selectedItems, (draft)=>{
|
|
@@ -64,7 +64,7 @@ function Legend({ width , height , options , data , selectedItems , onSelectedIt
|
|
|
64
64
|
});
|
|
65
65
|
onSelectedItemsChange(newSelected);
|
|
66
66
|
};
|
|
67
|
-
const mode = (0,
|
|
67
|
+
const mode = (0, _core.getLegendMode)(options.mode);
|
|
68
68
|
// The bottom legend is displayed as a list when the number of items is too
|
|
69
69
|
// large and requires virtualization. Otherwise, it is rendered more compactly.
|
|
70
70
|
// We do not need this check for the right-side legend because it is always
|
|
@@ -81,7 +81,8 @@ function Legend({ width , height , options , data , selectedItems , onSelectedIt
|
|
|
81
81
|
legendContent = /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableLegend.TableLegend, {
|
|
82
82
|
...commonLegendProps,
|
|
83
83
|
onSelectedItemsChange: onSelectedItemsChange,
|
|
84
|
-
width: width
|
|
84
|
+
width: width,
|
|
85
|
+
...tableProps
|
|
85
86
|
});
|
|
86
87
|
} else if (options.position === 'Right' || needsVirtualization) {
|
|
87
88
|
legendContent = /*#__PURE__*/ (0, _jsxRuntime.jsx)(_listLegend.ListLegend, {
|
|
@@ -20,8 +20,8 @@ Object.defineProperty(exports, "ListLegend", {
|
|
|
20
20
|
});
|
|
21
21
|
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _reactVirtuoso = require("react-virtuoso");
|
|
23
|
-
const _model = require("../model");
|
|
24
23
|
const _listLegendItem = require("./ListLegendItem");
|
|
24
|
+
const _legendModel = require("./legend-model");
|
|
25
25
|
function ListLegend({ items , height , width , selectedItems , onLegendItemClick }) {
|
|
26
26
|
// show full labels on hover when there are many total series
|
|
27
27
|
const truncateLabels = items.length > 5;
|
|
@@ -35,7 +35,7 @@ function ListLegend({ items , height , width , selectedItems , onLegendItemClick
|
|
|
35
35
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_listLegendItem.ListLegendItem, {
|
|
36
36
|
item: item,
|
|
37
37
|
truncateLabel: truncateLabels,
|
|
38
|
-
isVisuallySelected: (0,
|
|
38
|
+
isVisuallySelected: (0, _legendModel.isLegendItemVisuallySelected)(item, selectedItems),
|
|
39
39
|
onClick: onLegendItemClick,
|
|
40
40
|
sx: {
|
|
41
41
|
// Having an explicit width is important for the ellipsizing to
|
|
@@ -40,7 +40,7 @@ const getRowId = (data)=>{
|
|
|
40
40
|
const getCheckboxColor = (data)=>{
|
|
41
41
|
return data.color;
|
|
42
42
|
};
|
|
43
|
-
function TableLegend({ items , selectedItems: initRowSelection , onSelectedItemsChange , height , width }) {
|
|
43
|
+
function TableLegend({ items , selectedItems: initRowSelection , onSelectedItemsChange , height , width , columns: additionalColumns = [] }) {
|
|
44
44
|
const rowSelection = (0, _react.useMemo)(()=>{
|
|
45
45
|
return typeof initRowSelection !== 'string' ? initRowSelection : // items for checkboxes.
|
|
46
46
|
// TODO: clean this up if we switch to also using checkboxes in list legend.
|
|
@@ -52,13 +52,21 @@ function TableLegend({ items , selectedItems: initRowSelection , onSelectedItems
|
|
|
52
52
|
initRowSelection,
|
|
53
53
|
items
|
|
54
54
|
]);
|
|
55
|
+
const columns = (0, _react.useMemo)(()=>{
|
|
56
|
+
return [
|
|
57
|
+
...COLUMNS,
|
|
58
|
+
...additionalColumns
|
|
59
|
+
];
|
|
60
|
+
}, [
|
|
61
|
+
additionalColumns
|
|
62
|
+
]);
|
|
55
63
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_table.Table, {
|
|
56
64
|
height: height,
|
|
57
65
|
width: width,
|
|
58
66
|
rowSelection: rowSelection,
|
|
59
67
|
onRowSelectionChange: onSelectedItemsChange,
|
|
60
68
|
data: items,
|
|
61
|
-
columns:
|
|
69
|
+
columns: columns,
|
|
62
70
|
density: "compact",
|
|
63
71
|
getRowId: getRowId,
|
|
64
72
|
getCheckboxColor: getCheckboxColor,
|
package/dist/cjs/Legend/index.js
CHANGED
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
17
|
_exportStar(require("./Legend"), exports);
|
|
18
|
+
_exportStar(require("./legend-model"), exports);
|
|
18
19
|
function _exportStar(from, to) {
|
|
19
20
|
Object.keys(from).forEach(function(k) {
|
|
20
21
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
@@ -14,15 +14,12 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
return from;
|
|
17
|
+
Object.defineProperty(exports, "isLegendItemVisuallySelected", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>isLegendItemVisuallySelected
|
|
20
|
+
});
|
|
21
|
+
function isLegendItemVisuallySelected(item, selectedItems) {
|
|
22
|
+
// In the "ALL" case, technically all legend items are selected, but we do
|
|
23
|
+
// not render them differently.
|
|
24
|
+
return selectedItems !== 'ALL' && !!selectedItems[item.id];
|
|
28
25
|
}
|
|
@@ -84,7 +84,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
84
84
|
]);
|
|
85
85
|
function LineChart({ height , data , yAxis , unit , grid , legend , tooltipConfig ={
|
|
86
86
|
wrapLabels: true
|
|
87
|
-
} , noDataVariant ='message' , onDataZoom , onDoubleClick , __experimentalEChartsOptionsOverride }) {
|
|
87
|
+
} , noDataVariant ='message' , syncGroup , onDataZoom , onDoubleClick , __experimentalEChartsOptionsOverride }) {
|
|
88
88
|
var ref;
|
|
89
89
|
const chartsTheme = (0, _chartsThemeProvider.useChartsTheme)();
|
|
90
90
|
const chartRef = (0, _react.useRef)();
|
|
@@ -284,7 +284,8 @@ function LineChart({ height , data , yAxis , unit , grid , legend , tooltipConfi
|
|
|
284
284
|
option: option,
|
|
285
285
|
theme: chartsTheme.echartsTheme,
|
|
286
286
|
onEvents: handleEvents,
|
|
287
|
-
_instance: chartRef
|
|
287
|
+
_instance: chartRef,
|
|
288
|
+
syncGroup: syncGroup
|
|
288
289
|
})
|
|
289
290
|
]
|
|
290
291
|
});
|
|
@@ -27,9 +27,14 @@ _export(exports, {
|
|
|
27
27
|
getFormattedDate: ()=>getFormattedDate,
|
|
28
28
|
getYAxes: ()=>getYAxes
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const _merge = /*#__PURE__*/ _interopRequireDefault(require("lodash/merge"));
|
|
31
31
|
const _model = require("../model");
|
|
32
32
|
const _utils = require("../utils");
|
|
33
|
+
function _interopRequireDefault(obj) {
|
|
34
|
+
return obj && obj.__esModule ? obj : {
|
|
35
|
+
default: obj
|
|
36
|
+
};
|
|
37
|
+
}
|
|
33
38
|
function enableDataZoom(chart) {
|
|
34
39
|
const chartModel = chart['_model'];
|
|
35
40
|
if (chartModel === undefined) return;
|
|
@@ -90,6 +95,6 @@ function getYAxes(yAxis, unit) {
|
|
|
90
95
|
}
|
|
91
96
|
};
|
|
92
97
|
return [
|
|
93
|
-
(0,
|
|
98
|
+
(0, _merge.default)(Y_AXIS_DEFAULT, yAxis)
|
|
94
99
|
];
|
|
95
100
|
}
|
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "StatChart", {
|
|
|
21
21
|
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _react = require("react");
|
|
23
23
|
const _material = require("@mui/material");
|
|
24
|
-
const
|
|
24
|
+
const _merge = /*#__PURE__*/ _interopRequireDefault(require("lodash/merge"));
|
|
25
25
|
const _core = require("echarts/core");
|
|
26
26
|
const _charts = require("echarts/charts");
|
|
27
27
|
const _components = require("echarts/components");
|
|
@@ -29,6 +29,11 @@ const _renderers = require("echarts/renderers");
|
|
|
29
29
|
const _chartsThemeProvider = require("../context/ChartsThemeProvider");
|
|
30
30
|
const _units = require("../model/units");
|
|
31
31
|
const _echart = require("../EChart");
|
|
32
|
+
function _interopRequireDefault(obj) {
|
|
33
|
+
return obj && obj.__esModule ? obj : {
|
|
34
|
+
default: obj
|
|
35
|
+
};
|
|
36
|
+
}
|
|
32
37
|
(0, _core.use)([
|
|
33
38
|
_charts.LineChart,
|
|
34
39
|
_components.GridComponent,
|
|
@@ -58,7 +63,7 @@ function StatChart(props) {
|
|
|
58
63
|
animation: false,
|
|
59
64
|
silent: true
|
|
60
65
|
};
|
|
61
|
-
const mergedSeries = (0,
|
|
66
|
+
const mergedSeries = (0, _merge.default)(lineSeries, sparkline);
|
|
62
67
|
statSeries.push(mergedSeries);
|
|
63
68
|
}
|
|
64
69
|
const option = {
|
|
@@ -25,7 +25,7 @@ const StyledMuiTable = (0, _material.styled)(_material.Table)(({ theme })=>({
|
|
|
25
25
|
// This value is needed to have a consistent table layout when scrolling.
|
|
26
26
|
tableLayout: 'fixed',
|
|
27
27
|
borderCollapse: 'separate',
|
|
28
|
-
backgroundColor: theme.palette.background.
|
|
28
|
+
backgroundColor: theme.palette.background.default
|
|
29
29
|
}));
|
|
30
30
|
const TABLE_DENSITY_CONFIG = {
|
|
31
31
|
compact: 'small',
|
package/dist/cjs/Table/Table.js
CHANGED
|
@@ -37,7 +37,7 @@ function Table({ data , columns , density ='standard' , checkboxSelection , onRo
|
|
|
37
37
|
const checkboxColumn = (0, _react.useMemo)(()=>{
|
|
38
38
|
return {
|
|
39
39
|
id: 'checkboxRowSelect',
|
|
40
|
-
size:
|
|
40
|
+
size: 28,
|
|
41
41
|
header: ({ table })=>{
|
|
42
42
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCheckbox.TableCheckbox, {
|
|
43
43
|
checked: table.getIsAllRowsSelected(),
|
|
@@ -27,7 +27,7 @@ const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme
|
|
|
27
27
|
backgroundColor: 'inherit',
|
|
28
28
|
'&.MuiTableCell-head': {
|
|
29
29
|
// Important to avoid scrolling behind the header showing through.
|
|
30
|
-
backgroundColor: theme.palette.background.
|
|
30
|
+
backgroundColor: theme.palette.background.default
|
|
31
31
|
},
|
|
32
32
|
'&:focus-visible': {
|
|
33
33
|
outline: `solid 1px ${theme.palette.primary.main}`,
|
|
@@ -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 , ...otherProps }) {
|
|
40
|
+
function TableCell({ children , density , variant , width , focusState ='none' , onFocusTrigger , isFirstColumn , isLastColumn , ...otherProps }) {
|
|
41
41
|
const theme = (0, _material.useTheme)();
|
|
42
42
|
const elRef = (0, _react.useRef)();
|
|
43
43
|
const isHeader = variant === 'head';
|
|
@@ -83,7 +83,10 @@ function TableCell({ children , density , variant , width , focusState ='none' ,
|
|
|
83
83
|
ref: elRef,
|
|
84
84
|
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
85
85
|
sx: {
|
|
86
|
-
...(0, _tableModel.getTableCellLayout)(theme, density
|
|
86
|
+
...(0, _tableModel.getTableCellLayout)(theme, density, {
|
|
87
|
+
isLastColumn,
|
|
88
|
+
isFirstColumn
|
|
89
|
+
}),
|
|
87
90
|
position: 'relative',
|
|
88
91
|
// Text truncation. Currently enforced on all cells. We may control
|
|
89
92
|
// this with a prop on column config in the future.
|
|
@@ -26,9 +26,9 @@ const TableRow = /*#__PURE__*/ (0, _react.forwardRef)(function TableRow(props, r
|
|
|
26
26
|
...props,
|
|
27
27
|
ref: ref,
|
|
28
28
|
sx: {
|
|
29
|
-
backgroundColor: (theme)=>theme.palette.background.
|
|
29
|
+
backgroundColor: (theme)=>theme.palette.background.default,
|
|
30
30
|
'&:hover': {
|
|
31
|
-
backgroundColor: (theme)=>theme.palette.primary.
|
|
31
|
+
backgroundColor: (theme)=>(0, _material.alpha)(theme.palette.primary.main, theme.palette.action.hoverOpacity)
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
});
|
|
@@ -107,7 +107,8 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
|
|
|
107
107
|
children: headers.map((headerGroup)=>{
|
|
108
108
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableRow.TableRow, {
|
|
109
109
|
density: density,
|
|
110
|
-
children: headerGroup.headers.map((header, i)=>{
|
|
110
|
+
children: headerGroup.headers.map((header, i, headers)=>{
|
|
111
|
+
var ref;
|
|
111
112
|
const column = header.column;
|
|
112
113
|
const position = {
|
|
113
114
|
row: 0,
|
|
@@ -115,10 +116,13 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
|
|
|
115
116
|
};
|
|
116
117
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCell.TableCell, {
|
|
117
118
|
width: column.getSize() || 'auto',
|
|
119
|
+
align: (ref = column.columnDef.meta) === null || ref === void 0 ? void 0 : ref.align,
|
|
118
120
|
variant: "head",
|
|
119
121
|
density: density,
|
|
120
122
|
focusState: getFocusState(position),
|
|
121
123
|
onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
|
|
124
|
+
isFirstColumn: i === 0,
|
|
125
|
+
isLastColumn: i === headers.length - 1,
|
|
122
126
|
children: (0, _reactTable.flexRender)(column.columnDef.header, header.getContext())
|
|
123
127
|
}, header.id);
|
|
124
128
|
})
|
|
@@ -132,19 +136,21 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
|
|
|
132
136
|
return null;
|
|
133
137
|
}
|
|
134
138
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
135
|
-
children: row.getVisibleCells().map((cell, i)=>{
|
|
139
|
+
children: row.getVisibleCells().map((cell, i, cells)=>{
|
|
140
|
+
var ref;
|
|
136
141
|
const position = {
|
|
137
142
|
// Add 1 to the row index because the header is row 0
|
|
138
143
|
row: index + 1,
|
|
139
144
|
column: i
|
|
140
145
|
};
|
|
141
146
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCell.TableCell, {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
},
|
|
147
|
+
width: cell.column.getSize() || 'auto',
|
|
148
|
+
align: (ref = cell.column.columnDef.meta) === null || ref === void 0 ? void 0 : ref.align,
|
|
145
149
|
density: density,
|
|
146
150
|
focusState: getFocusState(position),
|
|
147
151
|
onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
|
|
152
|
+
isFirstColumn: i === 0,
|
|
153
|
+
isLastColumn: i === cells.length - 1,
|
|
148
154
|
children: (0, _reactTable.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
149
155
|
}, cell.id);
|
|
150
156
|
})
|
|
@@ -31,13 +31,16 @@ function calculateTableCellHeight(lineHeight, paddingY) {
|
|
|
31
31
|
const verticalPaddingNum = typeof paddingY === 'string' ? parseInt(paddingY, 10) : paddingY;
|
|
32
32
|
return lineHeightNum + verticalPaddingNum * 2;
|
|
33
33
|
}
|
|
34
|
-
function getTableCellLayout(theme, density) {
|
|
34
|
+
function getTableCellLayout(theme, density, { isLastColumn , isFirstColumn } = {}) {
|
|
35
35
|
if (density === 'compact') {
|
|
36
36
|
const paddingY = theme.spacing(0.5);
|
|
37
|
-
const
|
|
37
|
+
const basePaddingX = theme.spacing(0.5);
|
|
38
|
+
const edgePaddingX = theme.spacing(1);
|
|
39
|
+
const paddingLeft = isFirstColumn ? edgePaddingX : basePaddingX;
|
|
40
|
+
const paddingRight = isLastColumn ? edgePaddingX : basePaddingX;
|
|
38
41
|
const lineHeight = theme.typography.body2.lineHeight;
|
|
39
42
|
return {
|
|
40
|
-
padding: `${paddingY} ${
|
|
43
|
+
padding: `${paddingY} ${paddingRight} ${paddingY} ${paddingLeft}`,
|
|
41
44
|
height: calculateTableCellHeight(lineHeight, paddingY),
|
|
42
45
|
fontSize: theme.typography.body2.fontSize,
|
|
43
46
|
lineHeight: lineHeight
|
|
@@ -45,17 +48,20 @@ function getTableCellLayout(theme, density) {
|
|
|
45
48
|
}
|
|
46
49
|
// standard density
|
|
47
50
|
const paddingY1 = theme.spacing(1);
|
|
48
|
-
const
|
|
51
|
+
const basePaddingX1 = theme.spacing(1.25);
|
|
52
|
+
const edgePaddingX1 = theme.spacing(2);
|
|
53
|
+
const paddingLeft1 = isFirstColumn ? edgePaddingX1 : basePaddingX1;
|
|
54
|
+
const paddingRight1 = isLastColumn ? edgePaddingX1 : basePaddingX1;
|
|
49
55
|
const lineHeight1 = theme.typography.body1.lineHeight;
|
|
50
56
|
return {
|
|
51
|
-
padding: `${paddingY1} ${
|
|
57
|
+
padding: `${paddingY1} ${paddingRight1} ${paddingY1} ${paddingLeft1}`,
|
|
52
58
|
height: calculateTableCellHeight(lineHeight1, paddingY1),
|
|
53
59
|
fontSize: theme.typography.body1.fontSize,
|
|
54
60
|
lineHeight: lineHeight1
|
|
55
61
|
};
|
|
56
62
|
}
|
|
57
63
|
function persesColumnsToTanstackColumns(columns) {
|
|
58
|
-
const tableCols = columns.map(({ width , ...otherProps })=>{
|
|
64
|
+
const tableCols = columns.map(({ width , align , ...otherProps })=>{
|
|
59
65
|
// Tanstack Table does not support an "auto" value to naturally size to fit
|
|
60
66
|
// the space in a table. We translate our custom "auto" setting to 0 size
|
|
61
67
|
// for these columns, so it is easy to fall back to auto when rendering.
|
|
@@ -72,7 +78,12 @@ function persesColumnsToTanstackColumns(columns) {
|
|
|
72
78
|
};
|
|
73
79
|
const result = {
|
|
74
80
|
...otherProps,
|
|
75
|
-
...sizeProps
|
|
81
|
+
...sizeProps,
|
|
82
|
+
// Open-ended store for extra metadata in TanStack Table, so you can bake
|
|
83
|
+
// in your own features.
|
|
84
|
+
meta: {
|
|
85
|
+
align
|
|
86
|
+
}
|
|
76
87
|
};
|
|
77
88
|
return result;
|
|
78
89
|
});
|
|
@@ -117,14 +117,16 @@ function checkforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
|
|
|
117
117
|
chart.dispatchAction({
|
|
118
118
|
type: 'highlight',
|
|
119
119
|
seriesIndex: emphasizedSeriesIndexes,
|
|
120
|
-
notBlur: false
|
|
120
|
+
notBlur: false,
|
|
121
|
+
escapeConnect: true
|
|
121
122
|
});
|
|
122
123
|
} else {
|
|
123
124
|
// When no emphasized series with bold text, notBlur allows opacity fadeout to not trigger.
|
|
124
125
|
chart.dispatchAction({
|
|
125
126
|
type: 'highlight',
|
|
126
127
|
seriesIndex: nearbySeriesIndexes,
|
|
127
|
-
notBlur: true
|
|
128
|
+
notBlur: true,
|
|
129
|
+
escapeConnect: true
|
|
128
130
|
});
|
|
129
131
|
}
|
|
130
132
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -26,7 +26,6 @@ _exportStar(require("./GaugeChart"), exports);
|
|
|
26
26
|
_exportStar(require("./InfoTooltip"), exports);
|
|
27
27
|
_exportStar(require("./JSONEditor"), exports);
|
|
28
28
|
_exportStar(require("./Legend"), exports);
|
|
29
|
-
_exportStar(require("./LegendOptionsEditor"), exports);
|
|
30
29
|
_exportStar(require("./LineChart"), exports);
|
|
31
30
|
_exportStar(require("./OptionsEditorLayout"), exports);
|
|
32
31
|
_exportStar(require("./StatChart"), exports);
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
17
|
_exportStar(require("./graph"), exports);
|
|
18
|
-
_exportStar(require("./legend"), exports);
|
|
19
18
|
_exportStar(require("./theme"), exports);
|
|
20
19
|
_exportStar(require("./units"), exports);
|
|
21
20
|
function _exportStar(from, to) {
|
|
@@ -0,0 +1,27 @@
|
|
|
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, "MuiPaper", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>MuiPaper
|
|
20
|
+
});
|
|
21
|
+
const MuiPaper = {
|
|
22
|
+
styleOverrides: {
|
|
23
|
+
root: ({ theme })=>({
|
|
24
|
+
backgroundColor: theme.palette.background.default
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -25,8 +25,8 @@ const background = (mode)=>{
|
|
|
25
25
|
return mode === 'light' ? {
|
|
26
26
|
navigation,
|
|
27
27
|
overlay,
|
|
28
|
-
default: _colors.
|
|
29
|
-
paper: _colors.
|
|
28
|
+
default: _colors.white,
|
|
29
|
+
paper: _colors.grey[50],
|
|
30
30
|
tooltip: _colors.grey[100],
|
|
31
31
|
border: _colors.grey[100]
|
|
32
32
|
} : {
|
package/dist/cjs/theme/theme.js
CHANGED
|
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "getTheme", {
|
|
|
20
20
|
});
|
|
21
21
|
const _material = require("@mui/material");
|
|
22
22
|
const _alert = require("./component-overrides/alert");
|
|
23
|
+
const _paper = require("./component-overrides/paper");
|
|
23
24
|
const _paletteOptions = require("./palette/palette-options");
|
|
24
25
|
const _typography = require("./typography");
|
|
25
26
|
const getModalBackgroundStyle = ({ theme })=>{
|
|
@@ -48,6 +49,7 @@ const components = {
|
|
|
48
49
|
size: 'small'
|
|
49
50
|
}
|
|
50
51
|
},
|
|
52
|
+
MuiPaper: _paper.MuiPaper,
|
|
51
53
|
MuiTextField: {
|
|
52
54
|
defaultProps: {
|
|
53
55
|
size: 'small'
|
|
@@ -18,7 +18,12 @@ Object.defineProperty(exports, "generateChartsTheme", {
|
|
|
18
18
|
enumerable: true,
|
|
19
19
|
get: ()=>generateChartsTheme
|
|
20
20
|
});
|
|
21
|
-
const
|
|
21
|
+
const _merge = /*#__PURE__*/ _interopRequireDefault(require("lodash/merge"));
|
|
22
|
+
function _interopRequireDefault(obj) {
|
|
23
|
+
return obj && obj.__esModule ? obj : {
|
|
24
|
+
default: obj
|
|
25
|
+
};
|
|
26
|
+
}
|
|
22
27
|
const DEFAULT_TEXT_COLOR = '#222';
|
|
23
28
|
function generateChartsTheme(muiTheme, echartsTheme) {
|
|
24
29
|
var ref, ref1, ref2, ref3, ref4;
|
|
@@ -163,7 +168,7 @@ function generateChartsTheme(muiTheme, echartsTheme) {
|
|
|
163
168
|
}
|
|
164
169
|
};
|
|
165
170
|
return {
|
|
166
|
-
echartsTheme: (0,
|
|
171
|
+
echartsTheme: (0, _merge.default)(muiConvertedTheme, echartsTheme),
|
|
167
172
|
noDataOption: {
|
|
168
173
|
title: {
|
|
169
174
|
show: true,
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export * from './GaugeChart';
|
|
|
10
10
|
export * from './InfoTooltip';
|
|
11
11
|
export * from './JSONEditor';
|
|
12
12
|
export * from './Legend';
|
|
13
|
-
export * from './LegendOptionsEditor';
|
|
14
13
|
export * from './LineChart';
|
|
15
14
|
export * from './OptionsEditorLayout';
|
|
16
15
|
export * from './StatChart';
|
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,
|
|
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"}
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,6 @@ export * from './GaugeChart';
|
|
|
22
22
|
export * from './InfoTooltip';
|
|
23
23
|
export * from './JSONEditor';
|
|
24
24
|
export * from './Legend';
|
|
25
|
-
export * from './LegendOptionsEditor';
|
|
26
25
|
export * from './LineChart';
|
|
27
26
|
export * from './OptionsEditorLayout';
|
|
28
27
|
export * from './StatChart';
|
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 './
|
|
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"}
|
package/dist/model/graph.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TimeSeriesValueTuple } from '@perses-dev/core';
|
|
2
2
|
import { LineSeriesOption } from 'echarts/charts';
|
|
3
|
-
import { LegendItem } from '
|
|
3
|
+
import { LegendItem } from '../Legend';
|
|
4
4
|
export declare const OPTIMIZED_MODE_SERIES_LIMIT = 1000;
|
|
5
5
|
export declare type UnixTimeMs = number;
|
|
6
6
|
export interface GraphSeries {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/model/graph.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/model/graph.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,oBAAY,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC;AAED,oBAAY,aAAa,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC;AAEhD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAEvE,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/dist/model/graph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/model/graph.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\nimport { TimeSeriesValueTuple } from '@perses-dev/core';\nimport { LineSeriesOption } from 'echarts/charts';\nimport { LegendItem } from '
|
|
1
|
+
{"version":3,"sources":["../../src/model/graph.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\nimport { TimeSeriesValueTuple } from '@perses-dev/core';\nimport { LineSeriesOption } from 'echarts/charts';\nimport { LegendItem } from '../Legend';\n\n// adjust display when there are many time series to help with performance\nexport const OPTIMIZED_MODE_SERIES_LIMIT = 1000;\n\nexport type UnixTimeMs = number;\n\nexport interface GraphSeries {\n name: string;\n values: TimeSeriesValueTuple[];\n}\n\nexport type EChartsValues = number | null | '-';\n\nexport interface EChartsTimeSeries extends Omit<LineSeriesOption, 'data'> {\n // TODO: support dataset and both category / time xAxis types\n data: EChartsValues[];\n}\n\nexport type EChartsDataFormat = {\n timeSeries: EChartsTimeSeries[];\n xAxis: number[];\n legendItems?: LegendItem[];\n xAxisMax?: number | string;\n rangeMs?: number;\n};\n"],"names":["OPTIMIZED_MODE_SERIES_LIMIT"],"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;AAMjC,0EAA0E;AAC1E,OAAO,MAAMA,2BAA2B,GAAG,IAAI,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,
|
|
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"}
|
package/dist/model/index.js
CHANGED
package/dist/model/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/model/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 './graph';\nexport * from './
|
|
1
|
+
{"version":3,"sources":["../../src/model/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 './graph';\nexport * from './theme';\nexport * from './units';\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,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paper.d.ts","sourceRoot":"","sources":["../../../src/theme/component-overrides/paper.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAElD,eAAO,MAAM,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,UAAU,CAMlD,CAAC"}
|
|
@@ -10,6 +10,12 @@
|
|
|
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
|
-
export
|
|
13
|
+
export const MuiPaper = {
|
|
14
|
+
styleOverrides: {
|
|
15
|
+
root: ({ theme })=>({
|
|
16
|
+
backgroundColor: theme.palette.background.default
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
};
|
|
14
20
|
|
|
15
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=paper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/component-overrides/paper.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\nimport { Components, Theme } from '@mui/material';\n\nexport const MuiPaper: Components<Theme>['MuiPaper'] = {\n styleOverrides: {\n root: ({ theme }) => ({\n backgroundColor: theme.palette.background.default,\n }),\n },\n};\n"],"names":["MuiPaper","styleOverrides","root","theme","backgroundColor","palette","background","default"],"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;AAIjC,OAAO,MAAMA,QAAQ,GAAkC;IACrDC,cAAc,EAAE;QACdC,IAAI,EAAE,CAAC,EAAEC,KAAK,CAAA,EAAE,GAAM,CAAA;gBACpBC,eAAe,EAAED,KAAK,CAACE,OAAO,CAACC,UAAU,CAACC,OAAO;aAClD,CAAA,AAAC;KACH;CACF,CAAC"}
|