@perses-dev/components 0.0.0-snapshot-saving-defaults-refinements-1b25cec → 0.0.0-snapshot-time-chart-rewrite-4667058
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ContentWithLegend/ContentWithLegend.d.ts +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +5 -3
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +10 -4
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +27 -8
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +2 -5
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.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/GaugeChart/GaugeChart.d.ts +2 -2
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +7 -5
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/Legend/CompactLegend.d.ts +4 -2
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js +6 -3
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +17 -3
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +7 -4
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/ListLegend.d.ts +4 -2
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js +6 -5
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +16 -3
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +17 -5
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts +6 -3
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +17 -3
- 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 +6 -11
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +36 -9
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LineChart/index.d.ts +0 -1
- package/dist/LineChart/index.d.ts.map +1 -1
- package/dist/LineChart/index.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +12 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +45 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -0
- package/dist/RefreshIntervalPicker/index.d.ts +2 -0
- package/dist/RefreshIntervalPicker/index.d.ts.map +1 -0
- package/dist/{model/units → RefreshIntervalPicker}/index.js +1 -3
- package/dist/RefreshIntervalPicker/index.js.map +1 -0
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +36 -0
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -0
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js +65 -0
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -0
- package/dist/SettingsAutocomplete/index.d.ts +2 -0
- package/dist/SettingsAutocomplete/index.d.ts.map +1 -0
- package/dist/{model/units/constants.js → SettingsAutocomplete/index.js} +2 -4
- package/dist/SettingsAutocomplete/index.js.map +1 -0
- package/dist/StatChart/StatChart.d.ts +3 -2
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +75 -22
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/calculateFontSize.d.ts +14 -0
- package/dist/StatChart/calculateFontSize.d.ts.map +1 -0
- package/dist/StatChart/calculateFontSize.js +47 -0
- package/dist/StatChart/calculateFontSize.js.map +1 -0
- package/dist/Table/InnerTable.js +3 -3
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +58 -10
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableCell.d.ts +16 -3
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +13 -5
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableCheckbox.js +1 -1
- package/dist/Table/TableCheckbox.js.map +1 -1
- package/dist/Table/TableHeaderCell.d.ts +23 -0
- package/dist/Table/TableHeaderCell.d.ts.map +1 -0
- package/dist/Table/TableHeaderCell.js +53 -0
- package/dist/Table/TableHeaderCell.js.map +1 -0
- package/dist/Table/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 +3 -3
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +51 -10
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/model/table-model.d.ts +81 -3
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +22 -7
- package/dist/Table/model/table-model.js.map +1 -1
- package/dist/TimeChart/TimeChart.d.ts +23 -0
- package/dist/TimeChart/TimeChart.d.ts.map +1 -0
- package/dist/TimeChart/TimeChart.js +314 -0
- package/dist/TimeChart/TimeChart.js.map +1 -0
- package/dist/TimeChart/index.d.ts +2 -0
- package/dist/TimeChart/index.d.ts.map +1 -0
- package/dist/{LegendOptionsEditor → TimeChart}/index.js +1 -1
- package/dist/TimeChart/index.js.map +1 -0
- package/dist/TimeSeriesTooltip/{TimeSeriesTooltip.d.ts → LineChartTooltip.d.ts} +5 -4
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/{TimeSeriesTooltip.js → LineChartTooltip.js} +7 -6
- package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -0
- package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +16 -0
- package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js +76 -0
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -0
- package/dist/TimeSeriesTooltip/TooltipHeader.d.ts +2 -2
- package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.js +10 -8
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/index.d.ts +2 -1
- package/dist/TimeSeriesTooltip/index.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/index.js +2 -1
- package/dist/TimeSeriesTooltip/index.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts +23 -4
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +175 -17
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts +4 -0
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts +25 -0
- package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/utils.js +29 -1
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/UnitSelector/UnitSelector.d.ts +1 -1
- package/dist/UnitSelector/UnitSelector.d.ts.map +1 -1
- package/dist/UnitSelector/UnitSelector.js +11 -24
- package/dist/UnitSelector/UnitSelector.js.map +1 -1
- package/dist/YAxisLabel.js +1 -1
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +5 -3
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +28 -9
- package/dist/cjs/Drawer/Drawer.js +1 -1
- package/dist/cjs/EChart/EChart.js +22 -5
- package/dist/cjs/GaugeChart/GaugeChart.js +7 -5
- package/dist/cjs/Legend/CompactLegend.js +7 -4
- package/dist/cjs/Legend/Legend.js +8 -5
- package/dist/cjs/Legend/ListLegend.js +7 -6
- package/dist/cjs/Legend/ListLegendItem.js +17 -5
- package/dist/cjs/Legend/TableLegend.js +17 -3
- package/dist/cjs/Legend/index.js +1 -0
- package/dist/cjs/{model/units/types.js → Legend/legend-model.js} +7 -10
- package/dist/cjs/LineChart/LineChart.js +35 -47
- package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
- package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +51 -0
- package/dist/cjs/{model/units → RefreshIntervalPicker}/index.js +1 -3
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +66 -0
- package/dist/cjs/SettingsAutocomplete/index.js +28 -0
- package/dist/cjs/StatChart/StatChart.js +82 -24
- package/dist/cjs/StatChart/calculateFontSize.js +51 -0
- package/dist/cjs/Table/InnerTable.js +3 -3
- package/dist/cjs/Table/Table.js +57 -9
- package/dist/cjs/Table/TableCell.js +13 -5
- package/dist/cjs/Table/TableCheckbox.js +1 -1
- package/dist/cjs/Table/TableHeaderCell.js +59 -0
- package/dist/cjs/Table/TableRow.js +2 -2
- package/dist/cjs/Table/VirtualizedTable.js +51 -10
- package/dist/cjs/Table/model/table-model.js +22 -7
- package/dist/cjs/TimeChart/TimeChart.js +320 -0
- package/dist/cjs/{LegendOptionsEditor → TimeChart}/index.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/{TimeSeriesTooltip.js → LineChartTooltip.js} +7 -45
- package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +87 -0
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +10 -8
- package/dist/cjs/TimeSeriesTooltip/index.js +2 -1
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +171 -17
- package/dist/cjs/TimeSeriesTooltip/utils.js +35 -3
- package/dist/cjs/UnitSelector/UnitSelector.js +15 -28
- package/dist/cjs/YAxisLabel.js +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/model/index.js +1 -2
- package/dist/cjs/model/timeOption.js +16 -0
- package/dist/cjs/{model/units/constants.js → theme/component-overrides/paper.js} +9 -5
- package/dist/cjs/theme/palette/background.js +2 -2
- package/dist/cjs/theme/theme.js +2 -0
- package/dist/cjs/utils/axis.js +58 -0
- package/dist/cjs/{LineChart/utils.js → utils/chart-actions.js} +9 -47
- package/dist/cjs/utils/format.js +47 -1
- package/dist/cjs/utils/index.js +3 -1
- package/dist/cjs/utils/theme-gen.js +44 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/model/graph.d.ts +20 -3
- package/dist/model/graph.d.ts.map +1 -1
- package/dist/model/graph.js.map +1 -1
- package/dist/model/index.d.ts +1 -2
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +1 -2
- package/dist/model/index.js.map +1 -1
- package/dist/model/theme.d.ts +4 -6
- package/dist/model/theme.d.ts.map +1 -1
- package/dist/model/theme.js.map +1 -1
- package/dist/model/timeOption.d.ts +6 -0
- package/dist/model/timeOption.d.ts.map +1 -0
- package/dist/model/{units/types.js → timeOption.js} +2 -9
- package/dist/model/timeOption.js.map +1 -0
- package/dist/theme/component-overrides/paper.d.ts +3 -0
- package/dist/theme/component-overrides/paper.d.ts.map +1 -0
- package/dist/theme/component-overrides/paper.js +21 -0
- 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/axis.d.ts +14 -0
- package/dist/utils/axis.d.ts.map +1 -0
- package/dist/utils/axis.js +45 -0
- package/dist/utils/axis.js.map +1 -0
- package/dist/utils/chart-actions.d.ts +18 -0
- package/dist/utils/chart-actions.d.ts.map +1 -0
- package/dist/utils/chart-actions.js +52 -0
- package/dist/utils/chart-actions.js.map +1 -0
- package/dist/utils/format.d.ts +6 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +47 -0
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/theme-gen.d.ts.map +1 -1
- package/dist/utils/theme-gen.js +38 -1
- package/dist/utils/theme-gen.js.map +1 -1
- package/package.json +5 -9
- 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/LineChart/utils.d.ts +0 -30
- package/dist/LineChart/utils.d.ts.map +0 -1
- package/dist/LineChart/utils.js +0 -90
- package/dist/LineChart/utils.js.map +0 -1
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts.map +0 -1
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js.map +0 -1
- package/dist/cjs/LegendOptionsEditor/LegendOptionsEditor.js +0 -115
- package/dist/cjs/model/legend.js +0 -102
- package/dist/cjs/model/units/bytes.js +0 -84
- package/dist/cjs/model/units/decimal.js +0 -62
- package/dist/cjs/model/units/percent.js +0 -73
- package/dist/cjs/model/units/time.js +0 -105
- package/dist/cjs/model/units/units.js +0 -101
- package/dist/cjs/model/units/utils.js +0 -42
- 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
- package/dist/model/units/bytes.d.ts +0 -13
- package/dist/model/units/bytes.d.ts.map +0 -1
- package/dist/model/units/bytes.js +0 -66
- package/dist/model/units/bytes.js.map +0 -1
- package/dist/model/units/constants.d.ts +0 -2
- package/dist/model/units/constants.d.ts.map +0 -1
- package/dist/model/units/constants.js.map +0 -1
- package/dist/model/units/decimal.d.ts +0 -13
- package/dist/model/units/decimal.d.ts.map +0 -1
- package/dist/model/units/decimal.js +0 -49
- package/dist/model/units/decimal.js.map +0 -1
- package/dist/model/units/index.d.ts +0 -4
- package/dist/model/units/index.d.ts.map +0 -1
- package/dist/model/units/index.js.map +0 -1
- package/dist/model/units/percent.d.ts +0 -12
- package/dist/model/units/percent.d.ts.map +0 -1
- package/dist/model/units/percent.js +0 -60
- package/dist/model/units/percent.js.map +0 -1
- package/dist/model/units/time.d.ts +0 -22
- package/dist/model/units/time.d.ts.map +0 -1
- package/dist/model/units/time.js +0 -91
- package/dist/model/units/time.js.map +0 -1
- package/dist/model/units/types.d.ts +0 -47
- package/dist/model/units/types.d.ts.map +0 -1
- package/dist/model/units/types.js.map +0 -1
- package/dist/model/units/units.d.ts +0 -40
- package/dist/model/units/units.d.ts.map +0 -1
- package/dist/model/units/units.js +0 -80
- package/dist/model/units/units.js.map +0 -1
- package/dist/model/units/utils.d.ts +0 -4
- package/dist/model/units/utils.d.ts.map +0 -1
- package/dist/model/units/utils.js +0 -32
- package/dist/model/units/utils.js.map +0 -1
package/dist/cjs/YAxisLabel.js
CHANGED
|
@@ -26,7 +26,7 @@ function YAxisLabel({ name , height }) {
|
|
|
26
26
|
display: 'inline-block',
|
|
27
27
|
maxWidth: height,
|
|
28
28
|
position: 'absolute',
|
|
29
|
-
top:
|
|
29
|
+
top: `calc(${height}px / 2)`,
|
|
30
30
|
transform: 'translateX(-50%) rotate(-90deg)',
|
|
31
31
|
transformOrigin: 'top',
|
|
32
32
|
textAlign: 'center',
|
package/dist/cjs/index.js
CHANGED
|
@@ -26,12 +26,13 @@ _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);
|
|
31
|
+
_exportStar(require("./SettingsAutocomplete"), exports);
|
|
32
32
|
_exportStar(require("./StatChart"), exports);
|
|
33
33
|
_exportStar(require("./Table"), exports);
|
|
34
34
|
_exportStar(require("./ThresholdsEditor"), exports);
|
|
35
|
+
_exportStar(require("./TimeChart"), exports);
|
|
35
36
|
_exportStar(require("./TimeSeriesTooltip"), exports);
|
|
36
37
|
_exportStar(require("./UnitSelector"), exports);
|
|
37
38
|
_exportStar(require("./YAxisLabel"), exports);
|
|
@@ -42,6 +43,7 @@ _exportStar(require("./utils"), exports);
|
|
|
42
43
|
_exportStar(require("./model"), exports);
|
|
43
44
|
_exportStar(require("./test-utils"), exports);
|
|
44
45
|
_exportStar(require("./theme"), exports);
|
|
46
|
+
_exportStar(require("./RefreshIntervalPicker"), exports);
|
|
45
47
|
function _exportStar(from, to) {
|
|
46
48
|
Object.keys(from).forEach(function(k) {
|
|
47
49
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -15,9 +15,8 @@ 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
|
-
_exportStar(require("./
|
|
19
|
+
_exportStar(require("./timeOption"), exports);
|
|
21
20
|
function _exportStar(from, to) {
|
|
22
21
|
Object.keys(from).forEach(function(k) {
|
|
23
22
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
});
|
|
@@ -10,14 +10,18 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
// Common constants needed across individual unit groups and the overall
|
|
14
|
-
// combined units.
|
|
15
13
|
"use strict";
|
|
16
14
|
Object.defineProperty(exports, "__esModule", {
|
|
17
15
|
value: true
|
|
18
16
|
});
|
|
19
|
-
Object.defineProperty(exports, "
|
|
17
|
+
Object.defineProperty(exports, "MuiPaper", {
|
|
20
18
|
enumerable: true,
|
|
21
|
-
get: ()=>
|
|
19
|
+
get: ()=>MuiPaper
|
|
22
20
|
});
|
|
23
|
-
const
|
|
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'
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
getYAxes: ()=>getYAxes,
|
|
25
|
+
getDateRange: ()=>getDateRange
|
|
26
|
+
});
|
|
27
|
+
const _merge = /*#__PURE__*/ _interopRequireDefault(require("lodash/merge"));
|
|
28
|
+
const _core = require("@perses-dev/core");
|
|
29
|
+
function _interopRequireDefault(obj) {
|
|
30
|
+
return obj && obj.__esModule ? obj : {
|
|
31
|
+
default: obj
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function getYAxes(yAxis, unit) {
|
|
35
|
+
// TODO: support alternate yAxis that shows on right side
|
|
36
|
+
const Y_AXIS_DEFAULT = {
|
|
37
|
+
type: 'value',
|
|
38
|
+
boundaryGap: [
|
|
39
|
+
0,
|
|
40
|
+
'10%'
|
|
41
|
+
],
|
|
42
|
+
axisLabel: {
|
|
43
|
+
formatter: (value)=>{
|
|
44
|
+
return (0, _core.formatValue)(value, unit);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return [
|
|
49
|
+
(0, _merge.default)(Y_AXIS_DEFAULT, yAxis)
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
function getDateRange(data) {
|
|
53
|
+
const defaultRange = 3600000; // hour in ms
|
|
54
|
+
if (data.length === 0) return defaultRange;
|
|
55
|
+
const lastDatum = data[data.length - 1];
|
|
56
|
+
if (data[0] === undefined || lastDatum === undefined) return defaultRange;
|
|
57
|
+
return lastDatum - data[0];
|
|
58
|
+
}
|
|
@@ -23,13 +23,8 @@ function _export(target, all) {
|
|
|
23
23
|
_export(exports, {
|
|
24
24
|
enableDataZoom: ()=>enableDataZoom,
|
|
25
25
|
restoreChart: ()=>restoreChart,
|
|
26
|
-
|
|
27
|
-
getFormattedDate: ()=>getFormattedDate,
|
|
28
|
-
getYAxes: ()=>getYAxes
|
|
26
|
+
clearHighlightedSeries: ()=>clearHighlightedSeries
|
|
29
27
|
});
|
|
30
|
-
const _lodashEs = require("lodash-es");
|
|
31
|
-
const _model = require("../model");
|
|
32
|
-
const _utils = require("../utils");
|
|
33
28
|
function enableDataZoom(chart) {
|
|
34
29
|
const chartModel = chart['_model'];
|
|
35
30
|
if (chartModel === undefined) return;
|
|
@@ -50,46 +45,13 @@ function restoreChart(chart) {
|
|
|
50
45
|
type: 'restore'
|
|
51
46
|
});
|
|
52
47
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
function getFormattedDate(value, rangeMs, timeZone) {
|
|
61
|
-
const dateFormatOptions = (0, _utils.dateFormatOptionsWithTimeZone)({
|
|
62
|
-
hour: 'numeric',
|
|
63
|
-
minute: 'numeric',
|
|
64
|
-
hourCycle: 'h23'
|
|
65
|
-
}, timeZone);
|
|
66
|
-
const thirtyMinMs = 1800000;
|
|
67
|
-
const dayMs = 86400000;
|
|
68
|
-
if (rangeMs <= thirtyMinMs) {
|
|
69
|
-
dateFormatOptions.second = 'numeric';
|
|
70
|
-
} else if (rangeMs >= dayMs) {
|
|
71
|
-
dateFormatOptions.month = 'numeric';
|
|
72
|
-
dateFormatOptions.day = 'numeric';
|
|
73
|
-
}
|
|
74
|
-
const DATE_FORMAT = new Intl.DateTimeFormat(undefined, dateFormatOptions);
|
|
75
|
-
// remove comma when month / day present
|
|
76
|
-
return DATE_FORMAT.format(value).replace(/, /g, ' ');
|
|
77
|
-
}
|
|
78
|
-
function getYAxes(yAxis, unit) {
|
|
79
|
-
// TODO: support alternate yAxis that shows on right side
|
|
80
|
-
const Y_AXIS_DEFAULT = {
|
|
81
|
-
type: 'value',
|
|
82
|
-
boundaryGap: [
|
|
83
|
-
0,
|
|
84
|
-
'10%'
|
|
85
|
-
],
|
|
86
|
-
axisLabel: {
|
|
87
|
-
formatter: (value)=>{
|
|
88
|
-
return (0, _model.formatValue)(value, unit);
|
|
89
|
-
}
|
|
48
|
+
function clearHighlightedSeries(chart, totalSeries) {
|
|
49
|
+
if (chart.dispatchAction !== undefined) {
|
|
50
|
+
for(let i = 0; i < totalSeries; i++){
|
|
51
|
+
chart.dispatchAction({
|
|
52
|
+
type: 'downplay',
|
|
53
|
+
seriesIndex: i
|
|
54
|
+
});
|
|
90
55
|
}
|
|
91
|
-
}
|
|
92
|
-
return [
|
|
93
|
-
(0, _lodashEs.merge)(Y_AXIS_DEFAULT, yAxis)
|
|
94
|
-
];
|
|
56
|
+
}
|
|
95
57
|
}
|
package/dist/cjs/utils/format.js
CHANGED
|
@@ -22,7 +22,9 @@ function _export(target, all) {
|
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
24
|
dateFormatOptionsWithTimeZone: ()=>dateFormatOptionsWithTimeZone,
|
|
25
|
-
formatWithTimeZone: ()=>formatWithTimeZone
|
|
25
|
+
formatWithTimeZone: ()=>formatWithTimeZone,
|
|
26
|
+
getFormattedDate: ()=>getFormattedDate,
|
|
27
|
+
getFormattedAxisLabel: ()=>getFormattedAxisLabel
|
|
26
28
|
});
|
|
27
29
|
const _dateFnsTz = require("date-fns-tz");
|
|
28
30
|
const _dateFns = require("date-fns");
|
|
@@ -54,3 +56,47 @@ function formatWithTimeZone(date, formatString, timeZone) {
|
|
|
54
56
|
return (0, _dateFnsTz.formatInTimeZone)(date, lowerTimeZone === 'utc' ? 'UTC' : timeZone, formatString);
|
|
55
57
|
}
|
|
56
58
|
}
|
|
59
|
+
function getFormattedDate(value, rangeMs, timeZone) {
|
|
60
|
+
const dateFormatOptions = dateFormatOptionsWithTimeZone({
|
|
61
|
+
hour: 'numeric',
|
|
62
|
+
minute: 'numeric',
|
|
63
|
+
hourCycle: 'h23'
|
|
64
|
+
}, timeZone);
|
|
65
|
+
const thirtyMinMs = 1800000;
|
|
66
|
+
const dayMs = 86400000;
|
|
67
|
+
if (rangeMs <= thirtyMinMs) {
|
|
68
|
+
dateFormatOptions.second = 'numeric';
|
|
69
|
+
} else if (rangeMs >= dayMs) {
|
|
70
|
+
dateFormatOptions.month = 'numeric';
|
|
71
|
+
dateFormatOptions.day = 'numeric';
|
|
72
|
+
}
|
|
73
|
+
const DATE_FORMAT = new Intl.DateTimeFormat(undefined, dateFormatOptions);
|
|
74
|
+
// remove comma when month / day present
|
|
75
|
+
return DATE_FORMAT.format(value).replace(/, /g, ' ');
|
|
76
|
+
}
|
|
77
|
+
function getFormattedAxisLabel(rangeMs) {
|
|
78
|
+
const dayMs = 86400000;
|
|
79
|
+
const monthMs = 2629440000;
|
|
80
|
+
const yearMs = 31536000000;
|
|
81
|
+
// more than 5 years
|
|
82
|
+
if (rangeMs > yearMs * 5) {
|
|
83
|
+
return '{yyyy}';
|
|
84
|
+
}
|
|
85
|
+
// more than 2 years
|
|
86
|
+
if (rangeMs > yearMs * 2) {
|
|
87
|
+
return '{MMM} {yyyy}';
|
|
88
|
+
}
|
|
89
|
+
// between 5 days to 6 months
|
|
90
|
+
if (rangeMs > dayMs * 5 && rangeMs < monthMs * 6) {
|
|
91
|
+
return '{MM}/{dd}'; // 12/01
|
|
92
|
+
}
|
|
93
|
+
// between 2 and 5 days
|
|
94
|
+
if (rangeMs > dayMs * 2 && rangeMs <= dayMs * 5) {
|
|
95
|
+
return '{MM}/{dd} {HH}:{mm}'; // 12/01 12:30
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
year: '{yearStyle|{yyyy}}\n{monthStyle|{MMM}}',
|
|
99
|
+
month: '{MMM}',
|
|
100
|
+
day: '{MM}/{dd}'
|
|
101
|
+
};
|
|
102
|
+
}
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
+
_exportStar(require("./axis"), exports);
|
|
18
|
+
_exportStar(require("./chart-actions"), exports);
|
|
17
19
|
_exportStar(require("./combine-sx"), exports);
|
|
18
|
-
_exportStar(require("./theme-gen"), exports);
|
|
19
20
|
_exportStar(require("./component-ids"), exports);
|
|
20
21
|
_exportStar(require("./format"), exports);
|
|
22
|
+
_exportStar(require("./theme-gen"), exports);
|
|
21
23
|
function _exportStar(from, to) {
|
|
22
24
|
Object.keys(from).forEach(function(k) {
|
|
23
25
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
@@ -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;
|
|
@@ -87,6 +92,43 @@ function generateChartsTheme(muiTheme, echartsTheme) {
|
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
},
|
|
95
|
+
timeAxis: {
|
|
96
|
+
show: true,
|
|
97
|
+
axisLabel: {
|
|
98
|
+
show: true,
|
|
99
|
+
color: primaryTextColor,
|
|
100
|
+
margin: 15
|
|
101
|
+
},
|
|
102
|
+
axisTick: {
|
|
103
|
+
show: false,
|
|
104
|
+
length: 6,
|
|
105
|
+
lineStyle: {
|
|
106
|
+
color: muiTheme.palette.grey[600]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
axisLine: {
|
|
110
|
+
show: true,
|
|
111
|
+
lineStyle: {
|
|
112
|
+
color: muiTheme.palette.grey[600]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
splitLine: {
|
|
116
|
+
show: true,
|
|
117
|
+
lineStyle: {
|
|
118
|
+
width: 0.5,
|
|
119
|
+
color: muiTheme.palette.grey[300],
|
|
120
|
+
opacity: 0.6
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
splitArea: {
|
|
124
|
+
show: false,
|
|
125
|
+
areaStyle: {
|
|
126
|
+
color: [
|
|
127
|
+
muiTheme.palette.grey[300]
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
90
132
|
valueAxis: {
|
|
91
133
|
show: true,
|
|
92
134
|
axisLabel: {
|
|
@@ -163,7 +205,7 @@ function generateChartsTheme(muiTheme, echartsTheme) {
|
|
|
163
205
|
}
|
|
164
206
|
};
|
|
165
207
|
return {
|
|
166
|
-
echartsTheme: (0,
|
|
208
|
+
echartsTheme: (0, _merge.default)(muiConvertedTheme, echartsTheme),
|
|
167
209
|
noDataOption: {
|
|
168
210
|
title: {
|
|
169
211
|
show: true,
|
package/dist/index.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ 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';
|
|
15
|
+
export * from './SettingsAutocomplete';
|
|
16
16
|
export * from './StatChart';
|
|
17
17
|
export * from './Table';
|
|
18
18
|
export * from './ThresholdsEditor';
|
|
19
|
+
export * from './TimeChart';
|
|
19
20
|
export * from './TimeSeriesTooltip';
|
|
20
21
|
export * from './UnitSelector';
|
|
21
22
|
export * from './YAxisLabel';
|
|
@@ -26,4 +27,5 @@ export * from './utils';
|
|
|
26
27
|
export * from './model';
|
|
27
28
|
export * from './test-utils';
|
|
28
29
|
export * from './theme';
|
|
30
|
+
export * from './RefreshIntervalPicker';
|
|
29
31
|
//# sourceMappingURL=index.d.ts.map
|
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,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,12 +22,13 @@ 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';
|
|
27
|
+
export * from './SettingsAutocomplete';
|
|
28
28
|
export * from './StatChart';
|
|
29
29
|
export * from './Table';
|
|
30
30
|
export * from './ThresholdsEditor';
|
|
31
|
+
export * from './TimeChart';
|
|
31
32
|
export * from './TimeSeriesTooltip';
|
|
32
33
|
export * from './UnitSelector';
|
|
33
34
|
export * from './YAxisLabel';
|
|
@@ -38,5 +39,6 @@ export * from './utils';
|
|
|
38
39
|
export * from './model';
|
|
39
40
|
export * from './test-utils';
|
|
40
41
|
export * from './theme';
|
|
42
|
+
export * from './RefreshIntervalPicker';
|
|
41
43
|
|
|
42
44
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './DateTimeRangePicker';\nexport * from './Dialog';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './DateTimeRangePicker';\nexport * from './Dialog';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './OptionsEditorLayout';\nexport * from './SettingsAutocomplete';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeChart';\nexport * from './TimeSeriesTooltip';\nexport * from './UnitSelector';\nexport * from './YAxisLabel';\nexport * from './context/ChartsThemeProvider';\nexport * from './context/TimeZoneProvider';\nexport * from './context/SnackbarProvider';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\nexport * from './RefreshIntervalPicker';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC"}
|
package/dist/model/graph.d.ts
CHANGED
|
@@ -1,21 +1,38 @@
|
|
|
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 {
|
|
7
7
|
name: string;
|
|
8
8
|
values: TimeSeriesValueTuple[];
|
|
9
|
+
id?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare type EChartsValues = number | null | '-';
|
|
11
|
-
export interface
|
|
12
|
+
export interface LegacyTimeSeries extends Omit<LineSeriesOption, 'data'> {
|
|
12
13
|
data: EChartsValues[];
|
|
13
14
|
}
|
|
15
|
+
export declare type TimeChartSeriesMapping = LineSeriesOption[];
|
|
16
|
+
export declare type TimeChartLegendItems = LegendItem[];
|
|
14
17
|
export declare type EChartsDataFormat = {
|
|
15
|
-
timeSeries:
|
|
18
|
+
timeSeries: LegacyTimeSeries[];
|
|
16
19
|
xAxis: number[];
|
|
17
20
|
legendItems?: LegendItem[];
|
|
18
21
|
xAxisMax?: number | string;
|
|
19
22
|
rangeMs?: number;
|
|
20
23
|
};
|
|
24
|
+
export declare type ChartHandleFocusOpts = {
|
|
25
|
+
id?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type ChartHandle = {
|
|
29
|
+
/**
|
|
30
|
+
* Highlight the series associated with the specified options.
|
|
31
|
+
*/
|
|
32
|
+
highlightSeries: (opts: ChartHandleFocusOpts) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Clear all highlighted series.
|
|
35
|
+
*/
|
|
36
|
+
clearHighlightedSeries: () => void;
|
|
37
|
+
};
|
|
21
38
|
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -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;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,oBAAY,aAAa,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IACtE,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAGD,oBAAY,sBAAsB,GAAG,gBAAgB,EAAE,CAAC;AACxD,oBAAY,oBAAoB,GAAG,UAAU,EAAE,CAAC;AAGhD,oBAAY,iBAAiB,GAAG;IAC9B,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,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;AAKF,oBAAY,oBAAoB,GAAG;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB;;OAEG;IACH,eAAe,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAEtD;;OAEG;IACH,sBAAsB,EAAE,MAAM,IAAI,CAAC;CACpC,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 id?: string;\n}\n\nexport type EChartsValues = number | null | '-';\n\nexport interface LegacyTimeSeries extends Omit<LineSeriesOption, 'data'> {\n data: EChartsValues[];\n}\n\n// TODO: Continue to simplify TimeChart types, fix legend and thresholds\nexport type TimeChartSeriesMapping = LineSeriesOption[];\nexport type TimeChartLegendItems = LegendItem[];\n\n// TODO: Rename to LegacyEChartsDataFormat\nexport type EChartsDataFormat = {\n timeSeries: LegacyTimeSeries[];\n xAxis: number[];\n legendItems?: LegendItem[];\n xAxisMax?: number | string;\n rangeMs?: number;\n};\n\n// Intentionally making this an object to start because it is plausible we will\n// want to support focusing by other attributes (e.g. index, name) in the future,\n// and starting with an object will make adding them a non-breaking change.\nexport type ChartHandleFocusOpts = {\n id?: string; // LineChart uses id\n name?: string; // TimeChart uses name\n};\n\nexport type ChartHandle = {\n /**\n * Highlight the series associated with the specified options.\n */\n highlightSeries: (opts: ChartHandleFocusOpts) => void;\n\n /**\n * Clear all highlighted series.\n */\n clearHighlightedSeries: () => void;\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,cAAc,CAAC"}
|
package/dist/model/index.js
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
export * from './graph';
|
|
14
|
-
export * from './legend';
|
|
15
14
|
export * from './theme';
|
|
16
|
-
export * from './
|
|
15
|
+
export * from './timeOption';
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
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 './timeOption';\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,cAAc,CAAC"}
|
package/dist/model/theme.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ThresholdColorPalette } from '@perses-dev/core';
|
|
2
|
+
import type { EChartsOption, BarSeriesOption, LineSeriesOption, GaugeSeriesOption, TitleComponentOption, ComposeOption, XAXisComponentOption, YAXisComponentOption } from 'echarts';
|
|
2
3
|
export interface PersesChartsTheme {
|
|
3
4
|
echartsTheme: EChartsTheme;
|
|
4
|
-
noDataOption:
|
|
5
|
+
noDataOption: NoDataOption;
|
|
5
6
|
sparkline: {
|
|
6
7
|
width: number;
|
|
7
8
|
color: string;
|
|
@@ -24,8 +25,5 @@ export interface EChartsTheme extends EChartsOption {
|
|
|
24
25
|
line?: LineSeriesOption;
|
|
25
26
|
gauge?: GaugeSeriesOption;
|
|
26
27
|
}
|
|
27
|
-
export
|
|
28
|
-
defaultColor: string;
|
|
29
|
-
palette: string[];
|
|
30
|
-
}
|
|
28
|
+
export declare type NoDataOption = ComposeOption<TitleComponentOption | XAXisComponentOption | YAXisComponentOption>;
|
|
31
29
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/model/theme.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/model/theme.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,OAAO,EAAE;YACP,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;IACF,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAGD,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,oBAAY,YAAY,GAAG,aAAa,CAAC,oBAAoB,GAAG,oBAAoB,GAAG,oBAAoB,CAAC,CAAC"}
|
package/dist/model/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/model/theme.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 type {
|
|
1
|
+
{"version":3,"sources":["../../src/model/theme.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 { ThresholdColorPalette } from '@perses-dev/core';\nimport type {\n EChartsOption,\n BarSeriesOption,\n LineSeriesOption,\n GaugeSeriesOption,\n TitleComponentOption,\n ComposeOption,\n XAXisComponentOption,\n YAXisComponentOption,\n} from 'echarts';\n\nexport interface PersesChartsTheme {\n echartsTheme: EChartsTheme;\n noDataOption: NoDataOption;\n sparkline: {\n width: number;\n color: string;\n };\n /**\n * Theming for the container that wraps a chart.\n */\n container: {\n /**\n * Padding in pixels.\n */\n padding: {\n default: number;\n };\n };\n thresholds: ThresholdColorPalette;\n}\n\n// https://github.com/apache/echarts/issues/12489#issuecomment-643185207\nexport interface EChartsTheme extends EChartsOption {\n bar?: BarSeriesOption;\n line?: LineSeriesOption;\n gauge?: GaugeSeriesOption;\n}\n\nexport type NoDataOption = ComposeOption<TitleComponentOption | XAXisComponentOption | YAXisComponentOption>;\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,WAwC6G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeOption.d.ts","sourceRoot":"","sources":["../../src/model/timeOption.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -10,13 +10,6 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
|
|
14
|
-
// units.
|
|
15
|
-
export const UNIT_GROUPS = [
|
|
16
|
-
'Time',
|
|
17
|
-
'Percent',
|
|
18
|
-
'Decimal',
|
|
19
|
-
'Bytes'
|
|
20
|
-
];
|
|
13
|
+
export { };
|
|
21
14
|
|
|
22
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=timeOption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/model/timeOption.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 { RelativeTimeRange } from '@perses-dev/core';\n\nexport interface TimeOption {\n value: RelativeTimeRange;\n display: string;\n}\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,WAKC"}
|
|
@@ -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"}
|