@perses-dev/components 0.30.0 → 0.31.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/Legend/CompactLegend.d.ts +6 -4
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js +4 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +11 -9
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +45 -11
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/ListLegend.d.ts +5 -8
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js +34 -99
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +8 -8
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +9 -12
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/LineChart/LineChart.d.ts +2 -1
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +31 -22
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/Table/InnerTable.d.ts +9 -0
- package/dist/Table/InnerTable.d.ts.map +1 -0
- package/dist/Table/InnerTable.js +38 -0
- package/dist/Table/InnerTable.js.map +1 -0
- package/dist/Table/Table.d.ts +10 -0
- package/dist/Table/Table.d.ts.map +1 -0
- package/dist/Table/Table.js +101 -0
- package/dist/Table/Table.js.map +1 -0
- package/dist/Table/TableBody.d.ts +6 -0
- package/dist/Table/TableBody.d.ts.map +1 -0
- package/dist/Table/TableBody.js +23 -0
- package/dist/Table/TableBody.js.map +1 -0
- package/dist/Table/TableCell.d.ts +18 -0
- package/dist/Table/TableCell.d.ts.map +1 -0
- package/dist/Table/TableCell.js +91 -0
- package/dist/Table/TableCell.js.map +1 -0
- package/dist/Table/TableCheckbox.d.ts +9 -0
- package/dist/Table/TableCheckbox.d.ts.map +1 -0
- package/dist/Table/TableCheckbox.js +49 -0
- package/dist/Table/TableCheckbox.js.map +1 -0
- package/dist/Table/TableHead.d.ts +6 -0
- package/dist/Table/TableHead.d.ts.map +1 -0
- package/dist/Table/TableHead.js +23 -0
- package/dist/Table/TableHead.js.map +1 -0
- package/dist/Table/TableRow.d.ts +9 -0
- package/dist/Table/TableRow.d.ts.map +1 -0
- package/dist/Table/TableRow.js +29 -0
- package/dist/Table/TableRow.js.map +1 -0
- package/dist/Table/VirtualizedTable.d.ts +11 -0
- package/dist/Table/VirtualizedTable.d.ts.map +1 -0
- package/dist/Table/VirtualizedTable.js +152 -0
- package/dist/Table/VirtualizedTable.js.map +1 -0
- package/dist/Table/VirtualizedTableContainer.d.ts +6 -0
- package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -0
- package/dist/Table/VirtualizedTableContainer.js +24 -0
- package/dist/Table/VirtualizedTableContainer.js.map +1 -0
- package/dist/Table/hooks/useTableKeyboardNav.d.ts +32 -0
- package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -0
- package/dist/Table/hooks/useTableKeyboardNav.js +98 -0
- package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -0
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +29 -0
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -0
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +89 -0
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -0
- package/dist/Table/index.d.ts +4 -0
- package/dist/Table/index.d.ts.map +1 -0
- package/dist/Table/index.js +16 -0
- package/dist/Table/index.js.map +1 -0
- package/dist/Table/model/table-model.d.ts +83 -0
- package/dist/Table/model/table-model.d.ts.map +1 -0
- package/dist/Table/model/table-model.js +73 -0
- package/dist/Table/model/table-model.js.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +1 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js +11 -9
- package/dist/TimeSeriesTooltip/SeriesInfo.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 +60 -15
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts +5 -3
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js +79 -42
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
- package/dist/TimeSeriesTooltip/index.d.ts +1 -1
- package/dist/TimeSeriesTooltip/index.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/index.js +1 -1
- package/dist/TimeSeriesTooltip/index.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts +46 -0
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/nearby-series.js +200 -0
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -0
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts +8 -4
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +6 -2
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/utils.js +4 -3
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/cjs/Legend/CompactLegend.js +4 -1
- package/dist/cjs/Legend/Legend.js +45 -11
- package/dist/cjs/Legend/ListLegend.js +33 -98
- package/dist/cjs/Legend/ListLegendItem.js +8 -11
- package/dist/cjs/LineChart/LineChart.js +31 -22
- package/dist/cjs/Table/InnerTable.js +44 -0
- package/dist/cjs/Table/Table.js +102 -0
- package/dist/cjs/Table/TableBody.js +29 -0
- package/dist/cjs/Table/TableCell.js +97 -0
- package/dist/cjs/Table/TableCheckbox.js +55 -0
- package/dist/cjs/Table/TableHead.js +29 -0
- package/dist/cjs/Table/TableRow.js +35 -0
- package/dist/cjs/Table/VirtualizedTable.js +155 -0
- package/dist/cjs/Table/VirtualizedTableContainer.js +30 -0
- package/dist/cjs/Table/hooks/useTableKeyboardNav.js +99 -0
- package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +93 -0
- package/dist/cjs/Table/index.js +33 -0
- package/dist/cjs/Table/model/table-model.js +80 -0
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +10 -8
- package/dist/cjs/TimeSeriesTooltip/TimeSeriesTooltip.js +57 -12
- package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +83 -41
- package/dist/cjs/TimeSeriesTooltip/index.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +206 -0
- package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +11 -3
- package/dist/cjs/TimeSeriesTooltip/utils.js +3 -2
- package/dist/cjs/context/SnackbarProvider.js +66 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/model/legend.js +7 -1
- package/dist/cjs/theme/palette/grey.js +6 -2
- package/dist/context/SnackbarProvider.d.ts +23 -0
- package/dist/context/SnackbarProvider.d.ts.map +1 -0
- package/dist/context/SnackbarProvider.js +59 -0
- package/dist/context/SnackbarProvider.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/model/legend.d.ts +10 -2
- package/dist/model/legend.d.ts.map +1 -1
- package/dist/model/legend.js +5 -0
- package/dist/model/legend.js.map +1 -1
- package/dist/theme/palette/grey.d.ts.map +1 -1
- package/dist/theme/palette/grey.js +6 -2
- package/dist/theme/palette/grey.js.map +1 -1
- package/package.json +6 -6
- package/dist/TimeSeriesTooltip/focused-series.d.ts +0 -25
- package/dist/TimeSeriesTooltip/focused-series.d.ts.map +0 -1
- package/dist/TimeSeriesTooltip/focused-series.js +0 -110
- package/dist/TimeSeriesTooltip/focused-series.js.map +0 -1
- package/dist/cjs/TimeSeriesTooltip/focused-series.js +0 -116
|
@@ -0,0 +1,206 @@
|
|
|
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
|
+
function _export(target, all) {
|
|
18
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: all[name]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
INCREASE_NEARBY_SERIES_MULTIPLIER: ()=>INCREASE_NEARBY_SERIES_MULTIPLIER,
|
|
25
|
+
DYNAMIC_NEARBY_SERIES_MULTIPLIER: ()=>DYNAMIC_NEARBY_SERIES_MULTIPLIER,
|
|
26
|
+
SHOW_FEWER_SERIES_LIMIT: ()=>SHOW_FEWER_SERIES_LIMIT,
|
|
27
|
+
checkforNearbySeries: ()=>checkforNearbySeries,
|
|
28
|
+
getNearbySeriesData: ()=>getNearbySeriesData,
|
|
29
|
+
isWithinPercentageRange: ()=>isWithinPercentageRange,
|
|
30
|
+
getYBuffer: ()=>getYBuffer
|
|
31
|
+
});
|
|
32
|
+
const _model = require("../model");
|
|
33
|
+
const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5; // adjusts how many series show in tooltip (higher == more series shown)
|
|
34
|
+
const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30; // used for adjustment after series number divisor
|
|
35
|
+
const SHOW_FEWER_SERIES_LIMIT = 5;
|
|
36
|
+
function checkforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
|
|
37
|
+
const currentNearbySeriesData = [];
|
|
38
|
+
var ref;
|
|
39
|
+
const cursorX = (ref = pointInGrid[0]) !== null && ref !== void 0 ? ref : null;
|
|
40
|
+
var ref1;
|
|
41
|
+
const cursorY = (ref1 = pointInGrid[1]) !== null && ref1 !== void 0 ? ref1 : null;
|
|
42
|
+
if (cursorX === null || cursorY === null) {
|
|
43
|
+
return currentNearbySeriesData;
|
|
44
|
+
}
|
|
45
|
+
const nearbySeriesIndexes = [];
|
|
46
|
+
const emphasizedSeriesIndexes = [];
|
|
47
|
+
const nonEmphasizedSeriesIndexes = [];
|
|
48
|
+
const totalSeries = data.timeSeries.length;
|
|
49
|
+
if (Array.isArray(data.xAxis) && Array.isArray(data.timeSeries)) {
|
|
50
|
+
for(let seriesIdx = 0; seriesIdx < totalSeries; seriesIdx++){
|
|
51
|
+
const currentSeries = data.timeSeries[seriesIdx];
|
|
52
|
+
if (currentNearbySeriesData.length >= _model.OPTIMIZED_MODE_SERIES_LIMIT) break;
|
|
53
|
+
if (currentSeries !== undefined) {
|
|
54
|
+
const currentSeriesName = currentSeries.name ? currentSeries.name.toString() : '';
|
|
55
|
+
var _color;
|
|
56
|
+
const markerColor = (_color = currentSeries.color) !== null && _color !== void 0 ? _color : '#000';
|
|
57
|
+
if (Array.isArray(currentSeries.data)) {
|
|
58
|
+
for(let datumIdx = 0; datumIdx < currentSeries.data.length; datumIdx++){
|
|
59
|
+
var _datumIdx;
|
|
60
|
+
const xValue = (_datumIdx = data.xAxis[datumIdx]) !== null && _datumIdx !== void 0 ? _datumIdx : 0;
|
|
61
|
+
const yValue = currentSeries.data[datumIdx];
|
|
62
|
+
// ensure null values not displayed in tooltip
|
|
63
|
+
if (yValue !== undefined && yValue !== null && cursorX === datumIdx) {
|
|
64
|
+
if (yValue !== '-' && cursorY <= yValue + yBuffer && cursorY >= yValue - yBuffer) {
|
|
65
|
+
// show fewer bold series in tooltip when many total series
|
|
66
|
+
const minPercentRange = totalSeries > SHOW_FEWER_SERIES_LIMIT ? 2 : 5;
|
|
67
|
+
const percentRangeToCheck = Math.max(minPercentRange, 100 / totalSeries);
|
|
68
|
+
const isClosestToCursor = isWithinPercentageRange({
|
|
69
|
+
valueToCheck: cursorY,
|
|
70
|
+
baseValue: yValue,
|
|
71
|
+
percentage: percentRangeToCheck
|
|
72
|
+
});
|
|
73
|
+
if (isClosestToCursor) {
|
|
74
|
+
emphasizedSeriesIndexes.push(seriesIdx);
|
|
75
|
+
} else {
|
|
76
|
+
nonEmphasizedSeriesIndexes.push(seriesIdx);
|
|
77
|
+
// ensure series not close to cursor are not highlighted
|
|
78
|
+
if ((chart === null || chart === void 0 ? void 0 : chart.dispatchAction) !== undefined) {
|
|
79
|
+
chart.dispatchAction({
|
|
80
|
+
type: 'downplay',
|
|
81
|
+
seriesIndex: seriesIdx
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// determine whether to convert timestamp to ms, see: https://stackoverflow.com/a/23982005/17575201
|
|
86
|
+
const xValueMilliSeconds = xValue > 99999999999 ? xValue : xValue * 1000;
|
|
87
|
+
const formattedY = (0, _model.formatValue)(yValue, unit);
|
|
88
|
+
currentNearbySeriesData.push({
|
|
89
|
+
seriesIdx: seriesIdx,
|
|
90
|
+
datumIdx: datumIdx,
|
|
91
|
+
seriesName: currentSeriesName,
|
|
92
|
+
date: xValueMilliSeconds,
|
|
93
|
+
x: xValue,
|
|
94
|
+
y: yValue,
|
|
95
|
+
formattedY: formattedY,
|
|
96
|
+
markerColor: markerColor.toString(),
|
|
97
|
+
isClosestToCursor
|
|
98
|
+
});
|
|
99
|
+
nearbySeriesIndexes.push(seriesIdx);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if ((chart === null || chart === void 0 ? void 0 : chart.dispatchAction) !== undefined) {
|
|
108
|
+
// Clears emphasis state of all lines that are not emphasized.
|
|
109
|
+
// Emphasized is a subset of just the nearby series that are closest to cursor.
|
|
110
|
+
chart.dispatchAction({
|
|
111
|
+
type: 'downplay',
|
|
112
|
+
seriesIndex: nonEmphasizedSeriesIndexes
|
|
113
|
+
});
|
|
114
|
+
// https://echarts.apache.org/en/api.html#action.highlight
|
|
115
|
+
if (emphasizedSeriesIndexes.length > 0) {
|
|
116
|
+
// Fadeout opacity of all series not closest to cursor.
|
|
117
|
+
chart.dispatchAction({
|
|
118
|
+
type: 'highlight',
|
|
119
|
+
seriesIndex: emphasizedSeriesIndexes,
|
|
120
|
+
notBlur: false
|
|
121
|
+
});
|
|
122
|
+
} else {
|
|
123
|
+
// When no emphasized series with bold text, notBlur allows opacity fadeout to not trigger.
|
|
124
|
+
chart.dispatchAction({
|
|
125
|
+
type: 'highlight',
|
|
126
|
+
seriesIndex: nearbySeriesIndexes,
|
|
127
|
+
notBlur: true
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return currentNearbySeriesData;
|
|
132
|
+
}
|
|
133
|
+
function getNearbySeriesData({ mousePos , pinnedPos , chartData , chart , unit , showAllSeries =false }) {
|
|
134
|
+
if (chart === undefined || mousePos === null) return [];
|
|
135
|
+
// prevents multiple tooltips showing from adjacent charts
|
|
136
|
+
let cursorTargetMatchesChart = false;
|
|
137
|
+
if (mousePos.target !== null) {
|
|
138
|
+
const currentParent = mousePos.target.parentElement;
|
|
139
|
+
if (currentParent !== null) {
|
|
140
|
+
const currentGrandparent = currentParent.parentElement;
|
|
141
|
+
if (currentGrandparent !== null) {
|
|
142
|
+
const chartDom = chart.getDom();
|
|
143
|
+
if (chartDom === currentGrandparent) {
|
|
144
|
+
cursorTargetMatchesChart = true;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// allows moving cursor inside tooltip
|
|
150
|
+
if (pinnedPos !== null) {
|
|
151
|
+
mousePos = pinnedPos;
|
|
152
|
+
cursorTargetMatchesChart = true;
|
|
153
|
+
}
|
|
154
|
+
if (cursorTargetMatchesChart === false) return [];
|
|
155
|
+
if (chart['_model'] === undefined) return [];
|
|
156
|
+
const chartModel = chart['_model'];
|
|
157
|
+
const yInterval = chartModel.getComponent('yAxis').axis.scale._interval;
|
|
158
|
+
const totalSeries = chartData.timeSeries.length;
|
|
159
|
+
const yBuffer = getYBuffer({
|
|
160
|
+
yInterval,
|
|
161
|
+
totalSeries,
|
|
162
|
+
showAllSeries
|
|
163
|
+
});
|
|
164
|
+
var _x, _y;
|
|
165
|
+
const pointInPixel = [
|
|
166
|
+
(_x = mousePos.plotCanvas.x) !== null && _x !== void 0 ? _x : 0,
|
|
167
|
+
(_y = mousePos.plotCanvas.y) !== null && _y !== void 0 ? _y : 0
|
|
168
|
+
];
|
|
169
|
+
if (chart.containPixel('grid', pointInPixel)) {
|
|
170
|
+
const pointInGrid = chart.convertFromPixel('grid', pointInPixel);
|
|
171
|
+
if (pointInGrid[0] !== undefined && pointInGrid[1] !== undefined) {
|
|
172
|
+
return checkforNearbySeries(chartData, pointInGrid, yBuffer, chart, unit);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// clear all highlighted series when cursor exits canvas
|
|
176
|
+
// https://echarts.apache.org/en/api.html#action.downplay
|
|
177
|
+
for(let i = 0; i < totalSeries; i++){
|
|
178
|
+
if ((chart === null || chart === void 0 ? void 0 : chart.dispatchAction) !== undefined) {
|
|
179
|
+
chart.dispatchAction({
|
|
180
|
+
type: 'downplay',
|
|
181
|
+
seriesIndex: i
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return [];
|
|
186
|
+
}
|
|
187
|
+
function isWithinPercentageRange({ valueToCheck , baseValue , percentage }) {
|
|
188
|
+
const range = percentage / 100 * baseValue;
|
|
189
|
+
const lowerBound = baseValue - range;
|
|
190
|
+
const upperBound = baseValue + range;
|
|
191
|
+
return valueToCheck >= lowerBound && valueToCheck <= upperBound;
|
|
192
|
+
}
|
|
193
|
+
function getYBuffer({ yInterval , totalSeries , showAllSeries =false }) {
|
|
194
|
+
if (showAllSeries) {
|
|
195
|
+
return yInterval * 10; // roughly correlates with grid so entire canvas is searched
|
|
196
|
+
}
|
|
197
|
+
// never let nearby series range be less than roughly the size of a single tick
|
|
198
|
+
const yBufferMin = yInterval * 0.3;
|
|
199
|
+
// tooltip trigger area gets smaller with more series
|
|
200
|
+
if (totalSeries > SHOW_FEWER_SERIES_LIMIT) {
|
|
201
|
+
const adjustedBuffer = yInterval * DYNAMIC_NEARBY_SERIES_MULTIPLIER / totalSeries;
|
|
202
|
+
return Math.max(yBufferMin, adjustedBuffer);
|
|
203
|
+
}
|
|
204
|
+
// increase multiplier to expand nearby series range
|
|
205
|
+
return Math.max(yBufferMin, yInterval * INCREASE_NEARBY_SERIES_MULTIPLIER);
|
|
206
|
+
}
|
|
@@ -21,20 +21,28 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
+
TOOLTIP_MIN_WIDTH: ()=>TOOLTIP_MIN_WIDTH,
|
|
24
25
|
TOOLTIP_MAX_WIDTH: ()=>TOOLTIP_MAX_WIDTH,
|
|
25
26
|
TOOLTIP_MAX_HEIGHT: ()=>TOOLTIP_MAX_HEIGHT,
|
|
26
27
|
TOOLTIP_LABELS_MAX_WIDTH: ()=>TOOLTIP_LABELS_MAX_WIDTH,
|
|
27
|
-
|
|
28
|
+
TOOLTIP_ADJUST_Y_POS_MULTIPLIER: ()=>TOOLTIP_ADJUST_Y_POS_MULTIPLIER,
|
|
29
|
+
FALLBACK_CHART_WIDTH: ()=>FALLBACK_CHART_WIDTH,
|
|
30
|
+
NEARBY_SERIES_DESCRIPTION: ()=>NEARBY_SERIES_DESCRIPTION,
|
|
31
|
+
EMPHASIZED_SERIES_DESCRIPTION: ()=>EMPHASIZED_SERIES_DESCRIPTION,
|
|
28
32
|
TOOLTIP_DATE_FORMAT: ()=>TOOLTIP_DATE_FORMAT,
|
|
29
33
|
defaultCursorData: ()=>defaultCursorData,
|
|
30
34
|
emptyTooltipData: ()=>emptyTooltipData,
|
|
31
35
|
useMousePosition: ()=>useMousePosition
|
|
32
36
|
});
|
|
33
37
|
const _react = require("react");
|
|
38
|
+
const TOOLTIP_MIN_WIDTH = 375;
|
|
34
39
|
const TOOLTIP_MAX_WIDTH = 650;
|
|
35
|
-
const TOOLTIP_MAX_HEIGHT =
|
|
40
|
+
const TOOLTIP_MAX_HEIGHT = 600;
|
|
36
41
|
const TOOLTIP_LABELS_MAX_WIDTH = TOOLTIP_MAX_WIDTH - 150;
|
|
37
|
-
const
|
|
42
|
+
const TOOLTIP_ADJUST_Y_POS_MULTIPLIER = 0.75;
|
|
43
|
+
const FALLBACK_CHART_WIDTH = 750;
|
|
44
|
+
const NEARBY_SERIES_DESCRIPTION = 'nearby series showing in tooltip';
|
|
45
|
+
const EMPHASIZED_SERIES_DESCRIPTION = 'emphasized series showing as bold in tooltip';
|
|
38
46
|
const TOOLTIP_DATE_FORMAT = new Intl.DateTimeFormat(undefined, {
|
|
39
47
|
year: 'numeric',
|
|
40
48
|
month: 'short',
|
|
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "assembleTransform", {
|
|
|
19
19
|
get: ()=>assembleTransform
|
|
20
20
|
});
|
|
21
21
|
const _tooltipModel = require("./tooltip-model");
|
|
22
|
-
function assembleTransform(mousePos,
|
|
22
|
+
function assembleTransform(mousePos, chartWidth, pinnedPos, tooltipHeight, tooltipWidth) {
|
|
23
23
|
if (mousePos === null) {
|
|
24
24
|
return 'translate3d(0, 0)';
|
|
25
25
|
}
|
|
@@ -35,7 +35,8 @@ function assembleTransform(mousePos, seriesNum, chartWidth, pinnedPos, tooltipHe
|
|
|
35
35
|
let y = mousePos.page.y + cursorPaddingY;
|
|
36
36
|
// adjust so tooltip does not get cut off at bottom of chart
|
|
37
37
|
if (mousePos.client.y + tooltipHeight + cursorPaddingY > window.innerHeight) {
|
|
38
|
-
|
|
38
|
+
// multiplier ensures tooltip isn't overly adjusted and gets cut off at the top of the viewport
|
|
39
|
+
y = mousePos.page.y - tooltipHeight * _tooltipModel.TOOLTIP_ADJUST_Y_POS_MULTIPLIER;
|
|
39
40
|
}
|
|
40
41
|
// use tooltip width to determine when to repos from right to left
|
|
41
42
|
const xPosAdjustThreshold = chartWidth - tooltipWidth * 0.9;
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
function _export(target, all) {
|
|
18
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: all[name]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
SnackbarProvider: ()=>_notistack.SnackbarProvider,
|
|
25
|
+
useSnackbar: ()=>useSnackbar
|
|
26
|
+
});
|
|
27
|
+
const _react = require("react");
|
|
28
|
+
const _notistack = require("notistack");
|
|
29
|
+
function useSnackbar() {
|
|
30
|
+
const { enqueueSnackbar , closeSnackbar } = (0, _notistack.useSnackbar)();
|
|
31
|
+
// Create variant-specific callbacks
|
|
32
|
+
const errorSnackbar = useEnqueueFunction(enqueueSnackbar, 'error');
|
|
33
|
+
const infoSnackbar = useEnqueueFunction(enqueueSnackbar, 'info');
|
|
34
|
+
const warningSnackbar = useEnqueueFunction(enqueueSnackbar, 'warning');
|
|
35
|
+
const successSnackbar = useEnqueueFunction(enqueueSnackbar, 'success');
|
|
36
|
+
const exceptionSnackbar = (0, _react.useCallback)((error, options)=>{
|
|
37
|
+
// Try to use message prop, but fallback to a default message that
|
|
38
|
+
// will just stringify the error provided
|
|
39
|
+
const message = error instanceof Error ? error.message : `An unexpected error occurred: ${error}`;
|
|
40
|
+
return errorSnackbar(message, options);
|
|
41
|
+
}, [
|
|
42
|
+
errorSnackbar
|
|
43
|
+
]);
|
|
44
|
+
return {
|
|
45
|
+
enqueueSnackbar,
|
|
46
|
+
closeSnackbar,
|
|
47
|
+
errorSnackbar,
|
|
48
|
+
infoSnackbar,
|
|
49
|
+
warningSnackbar,
|
|
50
|
+
successSnackbar,
|
|
51
|
+
exceptionSnackbar
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
// Helper to create a variant-specific enqueue function
|
|
55
|
+
function useEnqueueFunction(enqueueSnackbar, variant) {
|
|
56
|
+
return (0, _react.useCallback)((message, options)=>{
|
|
57
|
+
const allOptions = {
|
|
58
|
+
...options,
|
|
59
|
+
variant
|
|
60
|
+
};
|
|
61
|
+
return enqueueSnackbar(message, allOptions);
|
|
62
|
+
}, [
|
|
63
|
+
enqueueSnackbar,
|
|
64
|
+
variant
|
|
65
|
+
]);
|
|
66
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,12 +29,14 @@ _exportStar(require("./LegendOptionsEditor"), exports);
|
|
|
29
29
|
_exportStar(require("./LineChart"), exports);
|
|
30
30
|
_exportStar(require("./OptionsEditorLayout"), exports);
|
|
31
31
|
_exportStar(require("./StatChart"), exports);
|
|
32
|
+
_exportStar(require("./Table"), exports);
|
|
32
33
|
_exportStar(require("./ThresholdsEditor"), exports);
|
|
33
34
|
_exportStar(require("./TimeSeriesTooltip"), exports);
|
|
34
35
|
_exportStar(require("./UnitSelector"), exports);
|
|
35
36
|
_exportStar(require("./YAxisLabel"), exports);
|
|
36
37
|
_exportStar(require("./context/ChartsThemeProvider"), exports);
|
|
37
38
|
_exportStar(require("./context/TimeZoneProvider"), exports);
|
|
39
|
+
_exportStar(require("./context/SnackbarProvider"), exports);
|
|
38
40
|
_exportStar(require("./utils"), exports);
|
|
39
41
|
_exportStar(require("./model"), exports);
|
|
40
42
|
_exportStar(require("./test-utils"), exports);
|
package/dist/cjs/model/legend.js
CHANGED
|
@@ -26,7 +26,8 @@ _export(exports, {
|
|
|
26
26
|
DEFAULT_LEGEND: ()=>DEFAULT_LEGEND,
|
|
27
27
|
getLegendPosition: ()=>getLegendPosition,
|
|
28
28
|
isValidLegendPosition: ()=>isValidLegendPosition,
|
|
29
|
-
validateLegendSpec: ()=>validateLegendSpec
|
|
29
|
+
validateLegendSpec: ()=>validateLegendSpec,
|
|
30
|
+
isLegendItemVisuallySelected: ()=>isLegendItemVisuallySelected
|
|
30
31
|
});
|
|
31
32
|
const legendPositions = [
|
|
32
33
|
'Bottom',
|
|
@@ -65,3 +66,8 @@ function validateLegendSpec(legend) {
|
|
|
65
66
|
}
|
|
66
67
|
return true;
|
|
67
68
|
}
|
|
69
|
+
function isLegendItemVisuallySelected(item, selectedItems) {
|
|
70
|
+
// In the "ALL" case, technically all legend items are selected, but we do
|
|
71
|
+
// not render them differently.
|
|
72
|
+
return selectedItems !== 'ALL' && !!selectedItems[item.id];
|
|
73
|
+
}
|
|
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "greyOption", {
|
|
|
21
21
|
const _grey = require("./colors/grey");
|
|
22
22
|
const greyOption = (mode)=>{
|
|
23
23
|
return mode === 'light' ? {
|
|
24
|
+
50: _grey.grey[50],
|
|
24
25
|
100: _grey.grey[100],
|
|
25
26
|
200: _grey.grey[200],
|
|
26
27
|
300: _grey.grey[300],
|
|
@@ -29,8 +30,10 @@ const greyOption = (mode)=>{
|
|
|
29
30
|
600: _grey.grey[600],
|
|
30
31
|
700: _grey.grey[700],
|
|
31
32
|
800: _grey.grey[800],
|
|
32
|
-
900: _grey.grey[900]
|
|
33
|
+
900: _grey.grey[900],
|
|
34
|
+
950: _grey.grey[950]
|
|
33
35
|
} : {
|
|
36
|
+
50: _grey.grey[950],
|
|
34
37
|
100: _grey.grey[900],
|
|
35
38
|
200: _grey.grey[800],
|
|
36
39
|
300: _grey.grey[700],
|
|
@@ -39,6 +42,7 @@ const greyOption = (mode)=>{
|
|
|
39
42
|
600: _grey.grey[400],
|
|
40
43
|
700: _grey.grey[300],
|
|
41
44
|
800: _grey.grey[200],
|
|
42
|
-
900: _grey.grey[100]
|
|
45
|
+
900: _grey.grey[100],
|
|
46
|
+
950: _grey.grey[50]
|
|
43
47
|
};
|
|
44
48
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SnackbarProvider as NotistackProvider, ProviderContext as NotistackContext, SnackbarMessage, OptionsObject, SnackbarKey } from 'notistack';
|
|
2
|
+
export interface SnackbarContext extends NotistackContext {
|
|
3
|
+
errorSnackbar: EnqueueFunction;
|
|
4
|
+
infoSnackbar: EnqueueFunction;
|
|
5
|
+
warningSnackbar: EnqueueFunction;
|
|
6
|
+
successSnackbar: EnqueueFunction;
|
|
7
|
+
/**
|
|
8
|
+
* Useful for catch blocks where the error will be of type `unknown`, tries
|
|
9
|
+
* to show the `message` property if passed an instance of `Error`.
|
|
10
|
+
*/
|
|
11
|
+
exceptionSnackbar: (error: unknown, options?: SnackbarOptions) => SnackbarKey;
|
|
12
|
+
}
|
|
13
|
+
declare type EnqueueFunction = (message: SnackbarMessage, options?: SnackbarOptions) => SnackbarKey;
|
|
14
|
+
declare type SnackbarOptions = Omit<OptionsObject, 'variant'>;
|
|
15
|
+
/**
|
|
16
|
+
* Application-wide provider for showing snackbars/toasts.
|
|
17
|
+
*/
|
|
18
|
+
export { NotistackProvider as SnackbarProvider };
|
|
19
|
+
/**
|
|
20
|
+
* Gets the SnackbarContext with methods for displaying snackbars/toasts.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useSnackbar(): SnackbarContext;
|
|
23
|
+
//# sourceMappingURL=SnackbarProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnackbarProvider.d.ts","sourceRoot":"","sources":["../../src/context/SnackbarProvider.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,eAAe,IAAI,gBAAgB,EAEnC,eAAe,EACf,aAAa,EACb,WAAW,EACZ,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,aAAa,EAAE,eAAe,CAAC;IAC/B,YAAY,EAAE,eAAe,CAAC;IAC9B,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,EAAE,eAAe,CAAC;IAEjC;;;OAGG;IACH,iBAAiB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,KAAK,WAAW,CAAC;CAC/E;AAED,aAAK,eAAe,GAAG,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,eAAe,KAAK,WAAW,CAAC;AAE5F,aAAK,eAAe,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,iBAAiB,IAAI,gBAAgB,EAAE,CAAC;AAEjD;;GAEG;AACH,wBAAgB,WAAW,IAAI,eAAe,CA6B7C"}
|
|
@@ -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
|
+
import { useCallback } from 'react';
|
|
14
|
+
import { SnackbarProvider as NotistackProvider, useSnackbar as useNotistack } from 'notistack';
|
|
15
|
+
/**
|
|
16
|
+
* Application-wide provider for showing snackbars/toasts.
|
|
17
|
+
*/ export { NotistackProvider as SnackbarProvider };
|
|
18
|
+
/**
|
|
19
|
+
* Gets the SnackbarContext with methods for displaying snackbars/toasts.
|
|
20
|
+
*/ export function useSnackbar() {
|
|
21
|
+
const { enqueueSnackbar , closeSnackbar } = useNotistack();
|
|
22
|
+
// Create variant-specific callbacks
|
|
23
|
+
const errorSnackbar = useEnqueueFunction(enqueueSnackbar, 'error');
|
|
24
|
+
const infoSnackbar = useEnqueueFunction(enqueueSnackbar, 'info');
|
|
25
|
+
const warningSnackbar = useEnqueueFunction(enqueueSnackbar, 'warning');
|
|
26
|
+
const successSnackbar = useEnqueueFunction(enqueueSnackbar, 'success');
|
|
27
|
+
const exceptionSnackbar = useCallback((error, options)=>{
|
|
28
|
+
// Try to use message prop, but fallback to a default message that
|
|
29
|
+
// will just stringify the error provided
|
|
30
|
+
const message = error instanceof Error ? error.message : `An unexpected error occurred: ${error}`;
|
|
31
|
+
return errorSnackbar(message, options);
|
|
32
|
+
}, [
|
|
33
|
+
errorSnackbar
|
|
34
|
+
]);
|
|
35
|
+
return {
|
|
36
|
+
enqueueSnackbar,
|
|
37
|
+
closeSnackbar,
|
|
38
|
+
errorSnackbar,
|
|
39
|
+
infoSnackbar,
|
|
40
|
+
warningSnackbar,
|
|
41
|
+
successSnackbar,
|
|
42
|
+
exceptionSnackbar
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Helper to create a variant-specific enqueue function
|
|
46
|
+
function useEnqueueFunction(enqueueSnackbar, variant) {
|
|
47
|
+
return useCallback((message, options)=>{
|
|
48
|
+
const allOptions = {
|
|
49
|
+
...options,
|
|
50
|
+
variant
|
|
51
|
+
};
|
|
52
|
+
return enqueueSnackbar(message, allOptions);
|
|
53
|
+
}, [
|
|
54
|
+
enqueueSnackbar,
|
|
55
|
+
variant
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=SnackbarProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/context/SnackbarProvider.tsx"],"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 { useCallback } from 'react';\nimport {\n SnackbarProvider as NotistackProvider,\n ProviderContext as NotistackContext,\n useSnackbar as useNotistack,\n SnackbarMessage,\n OptionsObject,\n SnackbarKey,\n} from 'notistack';\n\nexport interface SnackbarContext extends NotistackContext {\n errorSnackbar: EnqueueFunction;\n infoSnackbar: EnqueueFunction;\n warningSnackbar: EnqueueFunction;\n successSnackbar: EnqueueFunction;\n\n /**\n * Useful for catch blocks where the error will be of type `unknown`, tries\n * to show the `message` property if passed an instance of `Error`.\n */\n exceptionSnackbar: (error: unknown, options?: SnackbarOptions) => SnackbarKey;\n}\n\ntype EnqueueFunction = (message: SnackbarMessage, options?: SnackbarOptions) => SnackbarKey;\n\ntype SnackbarOptions = Omit<OptionsObject, 'variant'>;\n\n/**\n * Application-wide provider for showing snackbars/toasts.\n */\nexport { NotistackProvider as SnackbarProvider };\n\n/**\n * Gets the SnackbarContext with methods for displaying snackbars/toasts.\n */\nexport function useSnackbar(): SnackbarContext {\n const { enqueueSnackbar, closeSnackbar } = useNotistack();\n\n // Create variant-specific callbacks\n const errorSnackbar = useEnqueueFunction(enqueueSnackbar, 'error');\n const infoSnackbar = useEnqueueFunction(enqueueSnackbar, 'info');\n const warningSnackbar = useEnqueueFunction(enqueueSnackbar, 'warning');\n const successSnackbar = useEnqueueFunction(enqueueSnackbar, 'success');\n\n const exceptionSnackbar: SnackbarContext['exceptionSnackbar'] = useCallback(\n (error, options) => {\n // Try to use message prop, but fallback to a default message that\n // will just stringify the error provided\n const message = error instanceof Error ? error.message : `An unexpected error occurred: ${error}`;\n\n return errorSnackbar(message, options);\n },\n [errorSnackbar]\n );\n\n return {\n enqueueSnackbar,\n closeSnackbar,\n errorSnackbar,\n infoSnackbar,\n warningSnackbar,\n successSnackbar,\n exceptionSnackbar,\n };\n}\n\n// Helper to create a variant-specific enqueue function\nfunction useEnqueueFunction(\n enqueueSnackbar: NotistackContext['enqueueSnackbar'],\n variant: OptionsObject['variant']\n): EnqueueFunction {\n return useCallback(\n (message, options) => {\n const allOptions: OptionsObject = {\n ...options,\n variant,\n };\n return enqueueSnackbar(message, allOptions);\n },\n [enqueueSnackbar, variant]\n );\n}\n"],"names":["useCallback","SnackbarProvider","NotistackProvider","useSnackbar","useNotistack","enqueueSnackbar","closeSnackbar","errorSnackbar","useEnqueueFunction","infoSnackbar","warningSnackbar","successSnackbar","exceptionSnackbar","error","options","message","Error","variant","allOptions"],"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,SAASA,WAAW,QAAQ,OAAO,CAAC;AACpC,SACEC,gBAAgB,IAAIC,iBAAiB,EAErCC,WAAW,IAAIC,YAAY,QAItB,WAAW,CAAC;AAmBnB;;CAEC,GACD,SAASF,iBAAiB,IAAID,gBAAgB,GAAG;AAEjD;;CAEC,GACD,OAAO,SAASE,WAAW,GAAoB;IAC7C,MAAM,EAAEE,eAAe,CAAA,EAAEC,aAAa,CAAA,EAAE,GAAGF,YAAY,EAAE,AAAC;IAE1D,oCAAoC;IACpC,MAAMG,aAAa,GAAGC,kBAAkB,CAACH,eAAe,EAAE,OAAO,CAAC,AAAC;IACnE,MAAMI,YAAY,GAAGD,kBAAkB,CAACH,eAAe,EAAE,MAAM,CAAC,AAAC;IACjE,MAAMK,eAAe,GAAGF,kBAAkB,CAACH,eAAe,EAAE,SAAS,CAAC,AAAC;IACvE,MAAMM,eAAe,GAAGH,kBAAkB,CAACH,eAAe,EAAE,SAAS,CAAC,AAAC;IAEvE,MAAMO,iBAAiB,GAAyCZ,WAAW,CACzE,CAACa,KAAK,EAAEC,OAAO,GAAK;QAClB,kEAAkE;QAClE,yCAAyC;QACzC,MAAMC,OAAO,GAAGF,KAAK,YAAYG,KAAK,GAAGH,KAAK,CAACE,OAAO,GAAG,CAAC,8BAA8B,EAAEF,KAAK,CAAC,CAAC,AAAC;QAElG,OAAON,aAAa,CAACQ,OAAO,EAAED,OAAO,CAAC,CAAC;IACzC,CAAC,EACD;QAACP,aAAa;KAAC,CAChB,AAAC;IAEF,OAAO;QACLF,eAAe;QACfC,aAAa;QACbC,aAAa;QACbE,YAAY;QACZC,eAAe;QACfC,eAAe;QACfC,iBAAiB;KAClB,CAAC;AACJ,CAAC;AAED,uDAAuD;AACvD,SAASJ,kBAAkB,CACzBH,eAAoD,EACpDY,OAAiC,EAChB;IACjB,OAAOjB,WAAW,CAChB,CAACe,OAAO,EAAED,OAAO,GAAK;QACpB,MAAMI,UAAU,GAAkB;YAChC,GAAGJ,OAAO;YACVG,OAAO;SACR,AAAC;QACF,OAAOZ,eAAe,CAACU,OAAO,EAAEG,UAAU,CAAC,CAAC;IAC9C,CAAC,EACD;QAACb,eAAe;QAAEY,OAAO;KAAC,CAC3B,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -13,12 +13,14 @@ export * from './LegendOptionsEditor';
|
|
|
13
13
|
export * from './LineChart';
|
|
14
14
|
export * from './OptionsEditorLayout';
|
|
15
15
|
export * from './StatChart';
|
|
16
|
+
export * from './Table';
|
|
16
17
|
export * from './ThresholdsEditor';
|
|
17
18
|
export * from './TimeSeriesTooltip';
|
|
18
19
|
export * from './UnitSelector';
|
|
19
20
|
export * from './YAxisLabel';
|
|
20
21
|
export * from './context/ChartsThemeProvider';
|
|
21
22
|
export * from './context/TimeZoneProvider';
|
|
23
|
+
export * from './context/SnackbarProvider';
|
|
22
24
|
export * from './utils';
|
|
23
25
|
export * from './model';
|
|
24
26
|
export * from './test-utils';
|
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,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,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,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,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,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,uBAAuB,CAAC;AACtC,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
|
@@ -25,12 +25,14 @@ export * from './LegendOptionsEditor';
|
|
|
25
25
|
export * from './LineChart';
|
|
26
26
|
export * from './OptionsEditorLayout';
|
|
27
27
|
export * from './StatChart';
|
|
28
|
+
export * from './Table';
|
|
28
29
|
export * from './ThresholdsEditor';
|
|
29
30
|
export * from './TimeSeriesTooltip';
|
|
30
31
|
export * from './UnitSelector';
|
|
31
32
|
export * from './YAxisLabel';
|
|
32
33
|
export * from './context/ChartsThemeProvider';
|
|
33
34
|
export * from './context/TimeZoneProvider';
|
|
35
|
+
export * from './context/SnackbarProvider';
|
|
34
36
|
export * from './utils';
|
|
35
37
|
export * from './model';
|
|
36
38
|
export * from './test-utils';
|
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 './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 './LegendOptionsEditor';\nexport * from './LineChart';\nexport * from './OptionsEditorLayout';\nexport * from './StatChart';\nexport * from './ThresholdsEditor';\nexport * from './TimeSeriesTooltip';\nexport * from './UnitSelector';\nexport * from './YAxisLabel';\nexport * from './context/ChartsThemeProvider';\nexport * from './context/TimeZoneProvider';\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,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,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,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,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 './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 './LegendOptionsEditor';\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,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,uBAAuB,CAAC;AACtC,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/legend.d.ts
CHANGED
|
@@ -7,16 +7,24 @@ export interface LegendOptions {
|
|
|
7
7
|
export interface LegendItem {
|
|
8
8
|
id: string;
|
|
9
9
|
label: string;
|
|
10
|
-
isSelected: boolean;
|
|
11
10
|
color: string;
|
|
12
|
-
onClick
|
|
11
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
13
12
|
}
|
|
14
13
|
export declare type LegendPositionConfig = {
|
|
15
14
|
label: string;
|
|
16
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* State of selected items in the legend.
|
|
18
|
+
* - When "ALL", all legend items are selected, but not visually highlighted.
|
|
19
|
+
* - Otherwise, it is a Record that associates legend item ids with a boolean
|
|
20
|
+
* value. When the associated entry for a legend item is `true`, that item
|
|
21
|
+
* will be treated as selected and visually highlighted.
|
|
22
|
+
*/
|
|
23
|
+
export declare type SelectedLegendItemState = Record<LegendItem['id'], boolean> | 'ALL';
|
|
17
24
|
export declare const LEGEND_POSITIONS_CONFIG: Readonly<Record<LegendPositions, LegendPositionConfig>>;
|
|
18
25
|
export declare const DEFAULT_LEGEND: LegendOptions;
|
|
19
26
|
export declare function getLegendPosition(position?: LegendPositions): "Bottom" | "Right";
|
|
20
27
|
export declare function isValidLegendPosition(position: LegendPositions): boolean;
|
|
21
28
|
export declare function validateLegendSpec(legend?: LegendOptions): boolean;
|
|
29
|
+
export declare function isLegendItemVisuallySelected(item: LegendItem, selectedItems: SelectedLegendItemState): boolean;
|
|
22
30
|
//# sourceMappingURL=legend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../src/model/legend.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,eAAO,MAAM,eAAe,8BAA+B,CAAC;AAE5D,oBAAY,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../src/model/legend.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,eAAO,MAAM,eAAe,8BAA+B,CAAC;AAE5D,oBAAY,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAC1C;AAED,oBAAY,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;GAMG;AACH,oBAAY,uBAAuB,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;AAEhF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAG3F,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,aAE5B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,eAAe,sBAQ3D;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,WAE9D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa,WASxD;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,uBAAuB,WAIpG"}
|
package/dist/model/legend.js
CHANGED
|
@@ -47,5 +47,10 @@ export function validateLegendSpec(legend) {
|
|
|
47
47
|
}
|
|
48
48
|
return true;
|
|
49
49
|
}
|
|
50
|
+
export function isLegendItemVisuallySelected(item, selectedItems) {
|
|
51
|
+
// In the "ALL" case, technically all legend items are selected, but we do
|
|
52
|
+
// not render them differently.
|
|
53
|
+
return selectedItems !== 'ALL' && !!selectedItems[item.id];
|
|
54
|
+
}
|
|
50
55
|
|
|
51
56
|
//# sourceMappingURL=legend.js.map
|
package/dist/model/legend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/model/legend.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 { MouseEventHandler } from 'react';\n\nexport const legendPositions = ['Bottom', 'Right'] as const;\n\nexport type LegendPositions = (typeof legendPositions)[number];\n\nexport interface LegendOptions {\n position: LegendPositions;\n}\n\nexport interface LegendItem {\n id: string;\n label: string;\n
|
|
1
|
+
{"version":3,"sources":["../../src/model/legend.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 { MouseEventHandler } from 'react';\n\nexport const legendPositions = ['Bottom', 'Right'] as const;\n\nexport type LegendPositions = (typeof legendPositions)[number];\n\nexport interface LegendOptions {\n position: LegendPositions;\n}\n\nexport interface LegendItem {\n id: string;\n label: string;\n color: string;\n onClick?: MouseEventHandler<HTMLElement>;\n}\n\nexport type LegendPositionConfig = {\n label: string;\n};\n\n/**\n * State of selected items in the legend.\n * - When \"ALL\", all legend items are selected, but not visually highlighted.\n * - Otherwise, it is a Record that associates legend item ids with a boolean\n * value. When the associated entry for a legend item is `true`, that item\n * will be treated as selected and visually highlighted.\n */\nexport type SelectedLegendItemState = Record<LegendItem['id'], boolean> | 'ALL';\n\nexport const LEGEND_POSITIONS_CONFIG: Readonly<Record<LegendPositions, LegendPositionConfig>> = {\n Bottom: { label: 'Bottom' },\n Right: { label: 'Right' },\n};\n\nexport const DEFAULT_LEGEND: LegendOptions = {\n position: 'Bottom',\n};\n\nexport function getLegendPosition(position?: LegendPositions) {\n if (position === undefined) {\n return DEFAULT_LEGEND.position;\n }\n if (isValidLegendPosition(position)) {\n return position;\n }\n return DEFAULT_LEGEND.position;\n}\n\nexport function isValidLegendPosition(position: LegendPositions) {\n return (legendPositions as readonly string[]).includes(position);\n}\n\nexport function validateLegendSpec(legend?: LegendOptions) {\n if (legend === undefined) {\n // undefined is valid since this is how legend is hidden by default\n return true;\n }\n if (!isValidLegendPosition(legend.position)) {\n return false;\n }\n return true;\n}\n\nexport function isLegendItemVisuallySelected(item: LegendItem, selectedItems: SelectedLegendItemState) {\n // In the \"ALL\" case, technically all legend items are selected, but we do\n // not render them differently.\n return selectedItems !== 'ALL' && !!selectedItems[item.id];\n}\n"],"names":["legendPositions","LEGEND_POSITIONS_CONFIG","Bottom","label","Right","DEFAULT_LEGEND","position","getLegendPosition","undefined","isValidLegendPosition","includes","validateLegendSpec","legend","isLegendItemVisuallySelected","item","selectedItems","id"],"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,eAAe,GAAG;IAAC,QAAQ;IAAE,OAAO;CAAC,AAAS,CAAC;AA4B5D,OAAO,MAAMC,uBAAuB,GAA4D;IAC9FC,MAAM,EAAE;QAAEC,KAAK,EAAE,QAAQ;KAAE;IAC3BC,KAAK,EAAE;QAAED,KAAK,EAAE,OAAO;KAAE;CAC1B,CAAC;AAEF,OAAO,MAAME,cAAc,GAAkB;IAC3CC,QAAQ,EAAE,QAAQ;CACnB,CAAC;AAEF,OAAO,SAASC,iBAAiB,CAACD,QAA0B,EAAE;IAC5D,IAAIA,QAAQ,KAAKE,SAAS,EAAE;QAC1B,OAAOH,cAAc,CAACC,QAAQ,CAAC;IACjC,CAAC;IACD,IAAIG,qBAAqB,CAACH,QAAQ,CAAC,EAAE;QACnC,OAAOA,QAAQ,CAAC;IAClB,CAAC;IACD,OAAOD,cAAc,CAACC,QAAQ,CAAC;AACjC,CAAC;AAED,OAAO,SAASG,qBAAqB,CAACH,QAAyB,EAAE;IAC/D,OAAO,AAACN,eAAe,CAAuBU,QAAQ,CAACJ,QAAQ,CAAC,CAAC;AACnE,CAAC;AAED,OAAO,SAASK,kBAAkB,CAACC,MAAsB,EAAE;IACzD,IAAIA,MAAM,KAAKJ,SAAS,EAAE;QACxB,mEAAmE;QACnE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAACC,qBAAqB,CAACG,MAAM,CAACN,QAAQ,CAAC,EAAE;QAC3C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,OAAO,SAASO,4BAA4B,CAACC,IAAgB,EAAEC,aAAsC,EAAE;IACrG,0EAA0E;IAC1E,+BAA+B;IAC/B,OAAOA,aAAa,KAAK,KAAK,IAAI,CAAC,CAACA,aAAa,CAACD,IAAI,CAACE,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grey.d.ts","sourceRoot":"","sources":["../../../src/theme/palette/grey.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5D,eAAO,MAAM,UAAU,SAAU,WAAW,KAAG,cAAc,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"grey.d.ts","sourceRoot":"","sources":["../../../src/theme/palette/grey.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5D,eAAO,MAAM,UAAU,SAAU,WAAW,KAAG,cAAc,CAAC,MAAM,CA6BnE,CAAC"}
|