@perses-dev/components 0.0.0-snapshot-time-range-height-80d08fc
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/LICENSE +201 -0
- package/README.md +18 -0
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +9 -0
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -0
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +181 -0
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -0
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +12 -0
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -0
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js +79 -0
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -0
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +17 -0
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -0
- package/dist/DateTimeRangePicker/TimeRangeSelector.js +58 -0
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -0
- package/dist/DateTimeRangePicker/index.d.ts +4 -0
- package/dist/DateTimeRangePicker/index.d.ts.map +1 -0
- package/dist/DateTimeRangePicker/index.js +17 -0
- package/dist/DateTimeRangePicker/index.js.map +1 -0
- package/dist/DateTimeRangePicker/utils.d.ts +7 -0
- package/dist/DateTimeRangePicker/utils.d.ts.map +1 -0
- package/dist/DateTimeRangePicker/utils.js +37 -0
- package/dist/DateTimeRangePicker/utils.js.map +1 -0
- package/dist/Drawer/Drawer.d.ts +9 -0
- package/dist/Drawer/Drawer.d.ts.map +1 -0
- package/dist/Drawer/Drawer.js +34 -0
- package/dist/Drawer/Drawer.js.map +1 -0
- package/dist/Drawer/index.d.ts +2 -0
- package/dist/Drawer/index.d.ts.map +1 -0
- package/dist/Drawer/index.js +15 -0
- package/dist/Drawer/index.js.map +1 -0
- package/dist/EChart.d.ts +61 -0
- package/dist/EChart.d.ts.map +1 -0
- package/dist/EChart.js +143 -0
- package/dist/EChart.js.map +1 -0
- package/dist/ErrorAlert.d.ts +9 -0
- package/dist/ErrorAlert.d.ts.map +1 -0
- package/dist/ErrorAlert.js +25 -0
- package/dist/ErrorAlert.js.map +1 -0
- package/dist/ErrorBoundary.d.ts +3 -0
- package/dist/ErrorBoundary.d.ts.map +1 -0
- package/dist/ErrorBoundary.js +16 -0
- package/dist/ErrorBoundary.js.map +1 -0
- package/dist/GaugeChart/GaugeChart.d.ts +15 -0
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -0
- package/dist/GaugeChart/GaugeChart.js +172 -0
- package/dist/GaugeChart/GaugeChart.js.map +1 -0
- package/dist/GaugeChart/index.d.ts +2 -0
- package/dist/GaugeChart/index.d.ts.map +1 -0
- package/dist/GaugeChart/index.js +15 -0
- package/dist/GaugeChart/index.js.map +1 -0
- package/dist/InfoTooltip/InfoTooltip.d.ts +17 -0
- package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -0
- package/dist/InfoTooltip/InfoTooltip.js +76 -0
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -0
- package/dist/InfoTooltip/InfoTooltip.test.d.ts +2 -0
- package/dist/InfoTooltip/InfoTooltip.test.d.ts.map +1 -0
- package/dist/InfoTooltip/InfoTooltip.test.js +36 -0
- package/dist/InfoTooltip/InfoTooltip.test.js.map +1 -0
- package/dist/InfoTooltip/index.d.ts +2 -0
- package/dist/InfoTooltip/index.d.ts.map +1 -0
- package/dist/InfoTooltip/index.js +15 -0
- package/dist/InfoTooltip/index.js.map +1 -0
- package/dist/JSONEditor.d.ts +8 -0
- package/dist/JSONEditor.d.ts.map +1 -0
- package/dist/JSONEditor.js +51 -0
- package/dist/JSONEditor.js.map +1 -0
- package/dist/Legend/CompactLegend.d.ts +13 -0
- package/dist/Legend/CompactLegend.d.ts.map +1 -0
- package/dist/Legend/CompactLegend.js +45 -0
- package/dist/Legend/CompactLegend.js.map +1 -0
- package/dist/Legend/Legend.d.ts +11 -0
- package/dist/Legend/Legend.d.ts.map +1 -0
- package/dist/Legend/Legend.js +39 -0
- package/dist/Legend/Legend.js.map +1 -0
- package/dist/Legend/LegendColorBadge.d.ts +7 -0
- package/dist/Legend/LegendColorBadge.d.ts.map +1 -0
- package/dist/Legend/LegendColorBadge.js +31 -0
- package/dist/Legend/LegendColorBadge.js.map +1 -0
- package/dist/Legend/ListLegend.d.ts +11 -0
- package/dist/Legend/ListLegend.d.ts.map +1 -0
- package/dist/Legend/ListLegend.js +40 -0
- package/dist/Legend/ListLegend.js.map +1 -0
- package/dist/Legend/ListLegendItem.d.ts +9 -0
- package/dist/Legend/ListLegendItem.d.ts.map +1 -0
- package/dist/Legend/ListLegendItem.js +47 -0
- package/dist/Legend/ListLegendItem.js.map +1 -0
- package/dist/Legend/index.d.ts +2 -0
- package/dist/Legend/index.d.ts.map +1 -0
- package/dist/Legend/index.js +15 -0
- package/dist/Legend/index.js.map +1 -0
- package/dist/LineChart/LineChart.d.ts +19 -0
- package/dist/LineChart/LineChart.d.ts.map +1 -0
- package/dist/LineChart/LineChart.js +189 -0
- package/dist/LineChart/LineChart.js.map +1 -0
- package/dist/LineChart/index.d.ts +3 -0
- package/dist/LineChart/index.d.ts.map +1 -0
- package/dist/LineChart/index.js +15 -0
- package/dist/LineChart/index.js.map +1 -0
- package/dist/LineChart/utils.d.ts +30 -0
- package/dist/LineChart/utils.d.ts.map +1 -0
- package/dist/LineChart/utils.js +90 -0
- package/dist/LineChart/utils.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +13 -0
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js +28 -0
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +5 -0
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorControl.js +50 -0
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +13 -0
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js +26 -0
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +13 -0
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -0
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js +36 -0
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -0
- package/dist/OptionsEditorLayout/index.d.ts +5 -0
- package/dist/OptionsEditorLayout/index.d.ts.map +1 -0
- package/dist/OptionsEditorLayout/index.js +18 -0
- package/dist/OptionsEditorLayout/index.js.map +1 -0
- package/dist/StatChart/StatChart.d.ts +19 -0
- package/dist/StatChart/StatChart.d.ts.map +1 -0
- package/dist/StatChart/StatChart.js +121 -0
- package/dist/StatChart/StatChart.js.map +1 -0
- package/dist/StatChart/StatChart.test.d.ts +2 -0
- package/dist/StatChart/StatChart.test.d.ts.map +1 -0
- package/dist/StatChart/StatChart.test.js +87 -0
- package/dist/StatChart/StatChart.test.js.map +1 -0
- package/dist/StatChart/index.d.ts +2 -0
- package/dist/StatChart/index.d.ts.map +1 -0
- package/dist/StatChart/index.js +15 -0
- package/dist/StatChart/index.js.map +1 -0
- package/dist/Tooltip/SeriesInfo.d.ts +12 -0
- package/dist/Tooltip/SeriesInfo.d.ts.map +1 -0
- package/dist/Tooltip/SeriesInfo.js +143 -0
- package/dist/Tooltip/SeriesInfo.js.map +1 -0
- package/dist/Tooltip/SeriesMarker.d.ts +7 -0
- package/dist/Tooltip/SeriesMarker.d.ts.map +1 -0
- package/dist/Tooltip/SeriesMarker.js +33 -0
- package/dist/Tooltip/SeriesMarker.js.map +1 -0
- package/dist/Tooltip/Tooltip.d.ts +13 -0
- package/dist/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/Tooltip/Tooltip.js +72 -0
- package/dist/Tooltip/Tooltip.js.map +1 -0
- package/dist/Tooltip/TooltipContent.d.ts +9 -0
- package/dist/Tooltip/TooltipContent.d.ts.map +1 -0
- package/dist/Tooltip/TooltipContent.js +89 -0
- package/dist/Tooltip/TooltipContent.js.map +1 -0
- package/dist/Tooltip/focused-series.d.ts +25 -0
- package/dist/Tooltip/focused-series.d.ts.map +1 -0
- package/dist/Tooltip/focused-series.js +111 -0
- package/dist/Tooltip/focused-series.js.map +1 -0
- package/dist/Tooltip/focused-series.test.d.ts +2 -0
- package/dist/Tooltip/focused-series.test.d.ts.map +1 -0
- package/dist/Tooltip/focused-series.test.js +93 -0
- package/dist/Tooltip/focused-series.test.js.map +1 -0
- package/dist/Tooltip/index.d.ts +3 -0
- package/dist/Tooltip/index.d.ts.map +1 -0
- package/dist/Tooltip/index.js +16 -0
- package/dist/Tooltip/index.js.map +1 -0
- package/dist/Tooltip/tooltip-model.d.ts +79 -0
- package/dist/Tooltip/tooltip-model.d.ts.map +1 -0
- package/dist/Tooltip/tooltip-model.js +80 -0
- package/dist/Tooltip/tooltip-model.js.map +1 -0
- package/dist/Tooltip/utils.d.ts +6 -0
- package/dist/Tooltip/utils.d.ts.map +1 -0
- package/dist/Tooltip/utils.js +46 -0
- package/dist/Tooltip/utils.js.map +1 -0
- package/dist/UnitSelector/UnitSelector.d.ts +8 -0
- package/dist/UnitSelector/UnitSelector.d.ts.map +1 -0
- package/dist/UnitSelector/UnitSelector.js +112 -0
- package/dist/UnitSelector/UnitSelector.js.map +1 -0
- package/dist/UnitSelector/UnitSelector.test.d.ts +2 -0
- package/dist/UnitSelector/UnitSelector.test.d.ts.map +1 -0
- package/dist/UnitSelector/UnitSelector.test.js +205 -0
- package/dist/UnitSelector/UnitSelector.test.js.map +1 -0
- package/dist/UnitSelector/index.d.ts +2 -0
- package/dist/UnitSelector/index.d.ts.map +1 -0
- package/dist/UnitSelector/index.js +15 -0
- package/dist/UnitSelector/index.js.map +1 -0
- package/dist/YAxisLabel.d.ts +8 -0
- package/dist/YAxisLabel.d.ts.map +1 -0
- package/dist/YAxisLabel.js +39 -0
- package/dist/YAxisLabel.js.map +1 -0
- package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +187 -0
- package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +85 -0
- package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +69 -0
- package/dist/cjs/DateTimeRangePicker/index.js +30 -0
- package/dist/cjs/DateTimeRangePicker/utils.js +45 -0
- package/dist/cjs/Drawer/Drawer.js +40 -0
- package/dist/cjs/Drawer/index.js +28 -0
- package/dist/cjs/EChart.js +188 -0
- package/dist/cjs/ErrorAlert.js +29 -0
- package/dist/cjs/ErrorBoundary.js +22 -0
- package/dist/cjs/GaugeChart/GaugeChart.js +178 -0
- package/dist/cjs/GaugeChart/index.js +28 -0
- package/dist/cjs/InfoTooltip/InfoTooltip.js +93 -0
- package/dist/cjs/InfoTooltip/InfoTooltip.test.js +43 -0
- package/dist/cjs/InfoTooltip/index.js +28 -0
- package/dist/cjs/JSONEditor.js +57 -0
- package/dist/cjs/Legend/CompactLegend.js +48 -0
- package/dist/cjs/Legend/Legend.js +45 -0
- package/dist/cjs/Legend/LegendColorBadge.js +42 -0
- package/dist/cjs/Legend/ListLegend.js +44 -0
- package/dist/cjs/Legend/ListLegendItem.js +91 -0
- package/dist/cjs/Legend/index.js +28 -0
- package/dist/cjs/LineChart/LineChart.js +195 -0
- package/dist/cjs/LineChart/index.js +28 -0
- package/dist/cjs/LineChart/utils.js +95 -0
- package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +32 -0
- package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +61 -0
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +29 -0
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +40 -0
- package/dist/cjs/OptionsEditorLayout/index.js +31 -0
- package/dist/cjs/StatChart/StatChart.js +165 -0
- package/dist/cjs/StatChart/StatChart.test.js +89 -0
- package/dist/cjs/StatChart/index.js +28 -0
- package/dist/cjs/Tooltip/SeriesInfo.js +149 -0
- package/dist/cjs/Tooltip/SeriesMarker.js +39 -0
- package/dist/cjs/Tooltip/Tooltip.js +116 -0
- package/dist/cjs/Tooltip/TooltipContent.js +95 -0
- package/dist/cjs/Tooltip/focused-series.js +117 -0
- package/dist/cjs/Tooltip/focused-series.test.js +95 -0
- package/dist/cjs/Tooltip/index.js +29 -0
- package/dist/cjs/Tooltip/tooltip-model.js +98 -0
- package/dist/cjs/Tooltip/utils.js +50 -0
- package/dist/cjs/UnitSelector/UnitSelector.js +118 -0
- package/dist/cjs/UnitSelector/UnitSelector.test.js +212 -0
- package/dist/cjs/UnitSelector/index.js +28 -0
- package/dist/cjs/YAxisLabel.js +45 -0
- package/dist/cjs/context/ChartsThemeProvider.js +83 -0
- package/dist/cjs/context/TimeZoneProvider.js +90 -0
- package/dist/cjs/index.js +47 -0
- package/dist/cjs/model/graph.js +21 -0
- package/dist/cjs/model/index.js +30 -0
- package/dist/cjs/model/theme.js +16 -0
- package/dist/cjs/model/units/bytes.js +60 -0
- package/dist/cjs/model/units/constants.js +23 -0
- package/dist/cjs/model/units/decimal.js +67 -0
- package/dist/cjs/model/units/index.js +30 -0
- package/dist/cjs/model/units/percent.js +64 -0
- package/dist/cjs/model/units/time.js +102 -0
- package/dist/cjs/model/units/types.js +28 -0
- package/dist/cjs/model/units/units.js +104 -0
- package/dist/cjs/test/index.js +28 -0
- package/dist/cjs/test/render.js +36 -0
- package/dist/cjs/test/setup-tests.js +20 -0
- package/dist/cjs/test-utils/index.js +28 -0
- package/dist/cjs/test-utils/theme.js +28 -0
- package/dist/cjs/theme/index.js +28 -0
- package/dist/cjs/theme/palette/background.js +40 -0
- package/dist/cjs/theme/palette/colors/blue.js +35 -0
- package/dist/cjs/theme/palette/colors/common.js +28 -0
- package/dist/cjs/theme/palette/colors/green.js +35 -0
- package/dist/cjs/theme/palette/colors/grey.js +35 -0
- package/dist/cjs/theme/palette/colors/index.js +35 -0
- package/dist/cjs/theme/palette/colors/orange.js +35 -0
- package/dist/cjs/theme/palette/colors/purple.js +35 -0
- package/dist/cjs/theme/palette/colors/red.js +35 -0
- package/dist/cjs/theme/palette/colors/types.js +16 -0
- package/dist/cjs/theme/palette/error.js +32 -0
- package/dist/cjs/theme/palette/grey.js +44 -0
- package/dist/cjs/theme/palette/index.js +28 -0
- package/dist/cjs/theme/palette/palette-options.js +59 -0
- package/dist/cjs/theme/palette/primary.js +32 -0
- package/dist/cjs/theme/palette/secondary.js +32 -0
- package/dist/cjs/theme/palette/success.js +32 -0
- package/dist/cjs/theme/palette/text.js +42 -0
- package/dist/cjs/theme/palette/warning.js +32 -0
- package/dist/cjs/theme/theme.js +64 -0
- package/dist/cjs/theme/types/ThemeExtension.d.js +17 -0
- package/dist/cjs/theme/typography.js +96 -0
- package/dist/cjs/utils/combine-sx.js +29 -0
- package/dist/cjs/utils/component-ids.js +31 -0
- package/dist/cjs/utils/format.js +56 -0
- package/dist/cjs/utils/format.test.js +47 -0
- package/dist/cjs/utils/index.js +31 -0
- package/dist/cjs/utils/mathjs.js +25 -0
- package/dist/cjs/utils/theme-gen.js +188 -0
- package/dist/cjs/utils/theme-gen.test.js +197 -0
- package/dist/context/ChartsThemeProvider.d.ts +10 -0
- package/dist/context/ChartsThemeProvider.d.ts.map +1 -0
- package/dist/context/ChartsThemeProvider.js +31 -0
- package/dist/context/ChartsThemeProvider.js.map +1 -0
- package/dist/context/TimeZoneProvider.d.ts +13 -0
- package/dist/context/TimeZoneProvider.d.ts.map +1 -0
- package/dist/context/TimeZoneProvider.js +38 -0
- package/dist/context/TimeZoneProvider.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/model/graph.d.ts +34 -0
- package/dist/model/graph.d.ts.map +1 -0
- package/dist/model/graph.js +16 -0
- package/dist/model/graph.js.map +1 -0
- package/dist/model/index.d.ts +4 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/index.js +17 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/theme.d.ts +15 -0
- package/dist/model/theme.d.ts.map +1 -0
- package/dist/model/theme.js +15 -0
- package/dist/model/theme.js.map +1 -0
- package/dist/model/units/bytes.d.ts +12 -0
- package/dist/model/units/bytes.d.ts.map +1 -0
- package/dist/model/units/bytes.js +48 -0
- package/dist/model/units/bytes.js.map +1 -0
- package/dist/model/units/constants.d.ts +2 -0
- package/dist/model/units/constants.d.ts.map +1 -0
- package/dist/model/units/constants.js +17 -0
- package/dist/model/units/constants.js.map +1 -0
- package/dist/model/units/decimal.d.ts +24 -0
- package/dist/model/units/decimal.d.ts.map +1 -0
- package/dist/model/units/decimal.js +59 -0
- package/dist/model/units/decimal.js.map +1 -0
- package/dist/model/units/index.d.ts +4 -0
- package/dist/model/units/index.d.ts.map +1 -0
- package/dist/model/units/index.js +17 -0
- package/dist/model/units/index.js.map +1 -0
- package/dist/model/units/percent.d.ts +12 -0
- package/dist/model/units/percent.d.ts.map +1 -0
- package/dist/model/units/percent.js +51 -0
- package/dist/model/units/percent.js.map +1 -0
- package/dist/model/units/time.d.ts +22 -0
- package/dist/model/units/time.d.ts.map +1 -0
- package/dist/model/units/time.js +88 -0
- package/dist/model/units/time.js.map +1 -0
- package/dist/model/units/types.d.ts +38 -0
- package/dist/model/units/types.d.ts.map +1 -0
- package/dist/model/units/types.js +22 -0
- package/dist/model/units/types.js.map +1 -0
- package/dist/model/units/units.d.ts +40 -0
- package/dist/model/units/units.d.ts.map +1 -0
- package/dist/model/units/units.js +83 -0
- package/dist/model/units/units.js.map +1 -0
- package/dist/test/index.d.ts +2 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +15 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/render.d.ts +7 -0
- package/dist/test/render.d.ts.map +1 -0
- package/dist/test/render.js +32 -0
- package/dist/test/render.js.map +1 -0
- package/dist/test/setup-tests.d.ts +2 -0
- package/dist/test/setup-tests.d.ts.map +1 -0
- package/dist/test/setup-tests.js +18 -0
- package/dist/test/setup-tests.js.map +1 -0
- package/dist/test-utils/index.d.ts +2 -0
- package/dist/test-utils/index.d.ts.map +1 -0
- package/dist/test-utils/index.js +15 -0
- package/dist/test-utils/index.js.map +1 -0
- package/dist/test-utils/theme.d.ts +3 -0
- package/dist/test-utils/theme.d.ts.map +1 -0
- package/dist/test-utils/theme.js +22 -0
- package/dist/test-utils/theme.js.map +1 -0
- package/dist/theme/index.d.ts +37 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +15 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/palette/background.d.ts +3 -0
- package/dist/theme/palette/background.d.ts.map +1 -0
- package/dist/theme/palette/background.js +34 -0
- package/dist/theme/palette/background.js.map +1 -0
- package/dist/theme/palette/colors/blue.d.ts +3 -0
- package/dist/theme/palette/colors/blue.d.ts.map +1 -0
- package/dist/theme/palette/colors/blue.js +29 -0
- package/dist/theme/palette/colors/blue.js.map +1 -0
- package/dist/theme/palette/colors/common.d.ts +3 -0
- package/dist/theme/palette/colors/common.d.ts.map +1 -0
- package/dist/theme/palette/colors/common.js +16 -0
- package/dist/theme/palette/colors/common.js.map +1 -0
- package/dist/theme/palette/colors/green.d.ts +3 -0
- package/dist/theme/palette/colors/green.d.ts.map +1 -0
- package/dist/theme/palette/colors/green.js +29 -0
- package/dist/theme/palette/colors/green.js.map +1 -0
- package/dist/theme/palette/colors/grey.d.ts +3 -0
- package/dist/theme/palette/colors/grey.d.ts.map +1 -0
- package/dist/theme/palette/colors/grey.js +29 -0
- package/dist/theme/palette/colors/grey.js.map +1 -0
- package/dist/theme/palette/colors/index.d.ts +9 -0
- package/dist/theme/palette/colors/index.d.ts.map +1 -0
- package/dist/theme/palette/colors/index.js +22 -0
- package/dist/theme/palette/colors/index.js.map +1 -0
- package/dist/theme/palette/colors/orange.d.ts +3 -0
- package/dist/theme/palette/colors/orange.d.ts.map +1 -0
- package/dist/theme/palette/colors/orange.js +29 -0
- package/dist/theme/palette/colors/orange.js.map +1 -0
- package/dist/theme/palette/colors/purple.d.ts +3 -0
- package/dist/theme/palette/colors/purple.d.ts.map +1 -0
- package/dist/theme/palette/colors/purple.js +29 -0
- package/dist/theme/palette/colors/purple.js.map +1 -0
- package/dist/theme/palette/colors/red.d.ts +3 -0
- package/dist/theme/palette/colors/red.d.ts.map +1 -0
- package/dist/theme/palette/colors/red.js +29 -0
- package/dist/theme/palette/colors/red.js.map +1 -0
- package/dist/theme/palette/colors/types.d.ts +17 -0
- package/dist/theme/palette/colors/types.d.ts.map +1 -0
- package/dist/theme/palette/colors/types.js +15 -0
- package/dist/theme/palette/colors/types.js.map +1 -0
- package/dist/theme/palette/error.d.ts +3 -0
- package/dist/theme/palette/error.d.ts.map +1 -0
- package/dist/theme/palette/error.js +26 -0
- package/dist/theme/palette/error.js.map +1 -0
- package/dist/theme/palette/grey.d.ts +3 -0
- package/dist/theme/palette/grey.d.ts.map +1 -0
- package/dist/theme/palette/grey.js +38 -0
- package/dist/theme/palette/grey.js.map +1 -0
- package/dist/theme/palette/index.d.ts +3 -0
- package/dist/theme/palette/index.d.ts.map +1 -0
- package/dist/theme/palette/index.js +15 -0
- package/dist/theme/palette/index.js.map +1 -0
- package/dist/theme/palette/palette-options.d.ts +6 -0
- package/dist/theme/palette/palette-options.d.ts.map +1 -0
- package/dist/theme/palette/palette-options.js +55 -0
- package/dist/theme/palette/palette-options.js.map +1 -0
- package/dist/theme/palette/primary.d.ts +3 -0
- package/dist/theme/palette/primary.d.ts.map +1 -0
- package/dist/theme/palette/primary.js +26 -0
- package/dist/theme/palette/primary.js.map +1 -0
- package/dist/theme/palette/secondary.d.ts +3 -0
- package/dist/theme/palette/secondary.d.ts.map +1 -0
- package/dist/theme/palette/secondary.js +26 -0
- package/dist/theme/palette/secondary.js.map +1 -0
- package/dist/theme/palette/success.d.ts +3 -0
- package/dist/theme/palette/success.d.ts.map +1 -0
- package/dist/theme/palette/success.js +26 -0
- package/dist/theme/palette/success.js.map +1 -0
- package/dist/theme/palette/text.d.ts +3 -0
- package/dist/theme/palette/text.d.ts.map +1 -0
- package/dist/theme/palette/text.js +36 -0
- package/dist/theme/palette/text.js.map +1 -0
- package/dist/theme/palette/warning.d.ts +3 -0
- package/dist/theme/palette/warning.d.ts.map +1 -0
- package/dist/theme/palette/warning.js +26 -0
- package/dist/theme/palette/warning.js.map +1 -0
- package/dist/theme/theme.d.ts +13 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +67 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/theme/types/ThemeExtension.d.js +16 -0
- package/dist/theme/types/ThemeExtension.d.js.map +1 -0
- package/dist/theme/typography.d.ts +10 -0
- package/dist/theme/typography.d.ts.map +1 -0
- package/dist/theme/typography.js +92 -0
- package/dist/theme/typography.js.map +1 -0
- package/dist/utils/combine-sx.d.ts +8 -0
- package/dist/utils/combine-sx.d.ts.map +1 -0
- package/dist/utils/combine-sx.js +27 -0
- package/dist/utils/combine-sx.js.map +1 -0
- package/dist/utils/component-ids.d.ts +8 -0
- package/dist/utils/component-ids.d.ts.map +1 -0
- package/dist/utils/component-ids.js +27 -0
- package/dist/utils/component-ids.js.map +1 -0
- package/dist/utils/format.d.ts +3 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +44 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/format.test.d.ts +2 -0
- package/dist/utils/format.test.d.ts.map +1 -0
- package/dist/utils/format.test.js +45 -0
- package/dist/utils/format.test.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/mathjs.d.ts +6 -0
- package/dist/utils/mathjs.d.ts.map +1 -0
- package/dist/utils/mathjs.js +20 -0
- package/dist/utils/mathjs.js.map +1 -0
- package/dist/utils/theme-gen.d.ts +6 -0
- package/dist/utils/theme-gen.d.ts.map +1 -0
- package/dist/utils/theme-gen.js +182 -0
- package/dist/utils/theme-gen.js.map +1 -0
- package/dist/utils/theme-gen.test.d.ts +2 -0
- package/dist/utils/theme-gen.test.d.ts.map +1 -0
- package/dist/utils/theme-gen.test.js +195 -0
- package/dist/utils/theme-gen.test.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2022 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
|
+
_exportStar(require("./combine-sx"), exports);
|
|
18
|
+
_exportStar(require("./theme-gen"), exports);
|
|
19
|
+
_exportStar(require("./component-ids"), exports);
|
|
20
|
+
_exportStar(require("./format"), exports);
|
|
21
|
+
function _exportStar(from, to) {
|
|
22
|
+
Object.keys(from).forEach(function(k) {
|
|
23
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return from[k];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
return from;
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "round", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>round
|
|
20
|
+
});
|
|
21
|
+
const _mathjs = require("mathjs");
|
|
22
|
+
// This ensures we get a minimal mathjs bundle for just what we need (see https://mathjs.org/docs/custom_bundling.html)
|
|
23
|
+
const { round } = (0, _mathjs.create)({
|
|
24
|
+
roundDependencies: _mathjs.roundDependencies
|
|
25
|
+
});
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "generateChartsTheme", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>generateChartsTheme
|
|
20
|
+
});
|
|
21
|
+
const _lodashEs = require("lodash-es");
|
|
22
|
+
const DEFAULT_TEXT_COLOR = '#222';
|
|
23
|
+
function generateChartsTheme(muiTheme, echartsTheme) {
|
|
24
|
+
var ref, ref1, ref2, ref3, ref4;
|
|
25
|
+
var ref5;
|
|
26
|
+
const primaryTextColor = (ref5 = (ref = muiTheme.palette.text) === null || ref === void 0 ? void 0 : ref.primary) !== null && ref5 !== void 0 ? ref5 : DEFAULT_TEXT_COLOR;
|
|
27
|
+
const muiConvertedTheme = {
|
|
28
|
+
title: {
|
|
29
|
+
show: false
|
|
30
|
+
},
|
|
31
|
+
textStyle: {
|
|
32
|
+
color: primaryTextColor,
|
|
33
|
+
fontFamily: muiTheme.typography.fontFamily,
|
|
34
|
+
fontSize: 12
|
|
35
|
+
},
|
|
36
|
+
grid: {
|
|
37
|
+
top: 5,
|
|
38
|
+
right: 20,
|
|
39
|
+
bottom: 0,
|
|
40
|
+
left: 20,
|
|
41
|
+
containLabel: true
|
|
42
|
+
},
|
|
43
|
+
color: [
|
|
44
|
+
'#8dd3c7',
|
|
45
|
+
'#bebada',
|
|
46
|
+
'#fb8072',
|
|
47
|
+
'#80b1d3',
|
|
48
|
+
'#fdb462'
|
|
49
|
+
],
|
|
50
|
+
categoryAxis: {
|
|
51
|
+
show: true,
|
|
52
|
+
axisLabel: {
|
|
53
|
+
show: true,
|
|
54
|
+
color: primaryTextColor,
|
|
55
|
+
margin: 15
|
|
56
|
+
},
|
|
57
|
+
axisTick: {
|
|
58
|
+
show: false,
|
|
59
|
+
length: 6,
|
|
60
|
+
lineStyle: {
|
|
61
|
+
color: muiTheme.palette.grey[600]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
axisLine: {
|
|
65
|
+
show: true,
|
|
66
|
+
lineStyle: {
|
|
67
|
+
color: muiTheme.palette.grey[600]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
splitLine: {
|
|
71
|
+
show: true,
|
|
72
|
+
lineStyle: {
|
|
73
|
+
width: 0.5,
|
|
74
|
+
color: muiTheme.palette.grey[300],
|
|
75
|
+
opacity: 0.6
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
splitArea: {
|
|
79
|
+
show: false,
|
|
80
|
+
areaStyle: {
|
|
81
|
+
color: [
|
|
82
|
+
muiTheme.palette.grey[300]
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
valueAxis: {
|
|
88
|
+
show: true,
|
|
89
|
+
axisLabel: {
|
|
90
|
+
color: primaryTextColor,
|
|
91
|
+
margin: 12
|
|
92
|
+
},
|
|
93
|
+
axisLine: {
|
|
94
|
+
show: false
|
|
95
|
+
},
|
|
96
|
+
splitLine: {
|
|
97
|
+
show: true,
|
|
98
|
+
lineStyle: {
|
|
99
|
+
width: 0.5,
|
|
100
|
+
color: muiTheme.palette.grey[300],
|
|
101
|
+
opacity: 0.6
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
legend: {
|
|
106
|
+
orient: 'horizontal',
|
|
107
|
+
textStyle: {
|
|
108
|
+
color: primaryTextColor
|
|
109
|
+
},
|
|
110
|
+
pageTextStyle: {
|
|
111
|
+
color: muiTheme.palette.grey[600]
|
|
112
|
+
},
|
|
113
|
+
pageIconColor: muiTheme === null || muiTheme === void 0 ? void 0 : (ref1 = muiTheme.palette) === null || ref1 === void 0 ? void 0 : (ref2 = ref1.action) === null || ref2 === void 0 ? void 0 : ref2.active,
|
|
114
|
+
pageIconInactiveColor: muiTheme === null || muiTheme === void 0 ? void 0 : (ref3 = muiTheme.palette) === null || ref3 === void 0 ? void 0 : (ref4 = ref3.action) === null || ref4 === void 0 ? void 0 : ref4.disabled
|
|
115
|
+
},
|
|
116
|
+
toolbox: {
|
|
117
|
+
show: true,
|
|
118
|
+
top: 10,
|
|
119
|
+
right: 10,
|
|
120
|
+
iconStyle: {
|
|
121
|
+
borderColor: primaryTextColor
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
tooltip: {},
|
|
125
|
+
line: {
|
|
126
|
+
showSymbol: false,
|
|
127
|
+
symbol: 'circle',
|
|
128
|
+
symbolSize: 4,
|
|
129
|
+
smooth: false,
|
|
130
|
+
lineStyle: {
|
|
131
|
+
width: 1
|
|
132
|
+
},
|
|
133
|
+
emphasis: {
|
|
134
|
+
lineStyle: {
|
|
135
|
+
width: 1.5
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
bar: {
|
|
140
|
+
barMaxWidth: 150,
|
|
141
|
+
itemStyle: {
|
|
142
|
+
borderWidth: 0,
|
|
143
|
+
borderColor: muiTheme.palette.grey[300]
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
gauge: {
|
|
147
|
+
detail: {
|
|
148
|
+
fontSize: 18,
|
|
149
|
+
fontWeight: 600,
|
|
150
|
+
valueAnimation: false
|
|
151
|
+
},
|
|
152
|
+
splitLine: {
|
|
153
|
+
distance: 0,
|
|
154
|
+
length: 4,
|
|
155
|
+
lineStyle: {
|
|
156
|
+
width: 1
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
splitNumber: 12
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
return {
|
|
163
|
+
echartsTheme: (0, _lodashEs.merge)(muiConvertedTheme, echartsTheme),
|
|
164
|
+
noDataOption: {
|
|
165
|
+
title: {
|
|
166
|
+
show: true,
|
|
167
|
+
textStyle: {
|
|
168
|
+
color: primaryTextColor,
|
|
169
|
+
fontSize: 16,
|
|
170
|
+
fontWeight: 400
|
|
171
|
+
},
|
|
172
|
+
text: 'No data',
|
|
173
|
+
left: 'center',
|
|
174
|
+
top: 'center'
|
|
175
|
+
},
|
|
176
|
+
xAxis: {
|
|
177
|
+
show: false
|
|
178
|
+
},
|
|
179
|
+
yAxis: {
|
|
180
|
+
show: false
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
sparkline: {
|
|
184
|
+
width: 2,
|
|
185
|
+
color: '#1976d2'
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// Copyright 2022 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
|
+
const _material = require("@mui/material");
|
|
18
|
+
const _themeGen = require("./theme-gen");
|
|
19
|
+
describe('generateChartsTheme', ()=>{
|
|
20
|
+
const muiTheme = (0, _material.createTheme)({});
|
|
21
|
+
const echartsThemeOverrides = {
|
|
22
|
+
legend: {
|
|
23
|
+
textStyle: {
|
|
24
|
+
color: 'yellow'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
line: {
|
|
28
|
+
showSymbol: true,
|
|
29
|
+
smooth: true
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const chartsTheme = (0, _themeGen.generateChartsTheme)(muiTheme, echartsThemeOverrides);
|
|
33
|
+
it('should return perses specific charts theme from converted MUI theme', ()=>{
|
|
34
|
+
expect(chartsTheme).toMatchInlineSnapshot(`
|
|
35
|
+
Object {
|
|
36
|
+
"echartsTheme": Object {
|
|
37
|
+
"bar": Object {
|
|
38
|
+
"barMaxWidth": 150,
|
|
39
|
+
"itemStyle": Object {
|
|
40
|
+
"borderColor": "#e0e0e0",
|
|
41
|
+
"borderWidth": 0,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
"categoryAxis": Object {
|
|
45
|
+
"axisLabel": Object {
|
|
46
|
+
"color": "rgba(0, 0, 0, 0.87)",
|
|
47
|
+
"margin": 15,
|
|
48
|
+
"show": true,
|
|
49
|
+
},
|
|
50
|
+
"axisLine": Object {
|
|
51
|
+
"lineStyle": Object {
|
|
52
|
+
"color": "#757575",
|
|
53
|
+
},
|
|
54
|
+
"show": true,
|
|
55
|
+
},
|
|
56
|
+
"axisTick": Object {
|
|
57
|
+
"length": 6,
|
|
58
|
+
"lineStyle": Object {
|
|
59
|
+
"color": "#757575",
|
|
60
|
+
},
|
|
61
|
+
"show": false,
|
|
62
|
+
},
|
|
63
|
+
"show": true,
|
|
64
|
+
"splitArea": Object {
|
|
65
|
+
"areaStyle": Object {
|
|
66
|
+
"color": Array [
|
|
67
|
+
"#e0e0e0",
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
"show": false,
|
|
71
|
+
},
|
|
72
|
+
"splitLine": Object {
|
|
73
|
+
"lineStyle": Object {
|
|
74
|
+
"color": "#e0e0e0",
|
|
75
|
+
"opacity": 0.6,
|
|
76
|
+
"width": 0.5,
|
|
77
|
+
},
|
|
78
|
+
"show": true,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
"color": Array [
|
|
82
|
+
"#8dd3c7",
|
|
83
|
+
"#bebada",
|
|
84
|
+
"#fb8072",
|
|
85
|
+
"#80b1d3",
|
|
86
|
+
"#fdb462",
|
|
87
|
+
],
|
|
88
|
+
"gauge": Object {
|
|
89
|
+
"detail": Object {
|
|
90
|
+
"fontSize": 18,
|
|
91
|
+
"fontWeight": 600,
|
|
92
|
+
"valueAnimation": false,
|
|
93
|
+
},
|
|
94
|
+
"splitLine": Object {
|
|
95
|
+
"distance": 0,
|
|
96
|
+
"length": 4,
|
|
97
|
+
"lineStyle": Object {
|
|
98
|
+
"width": 1,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
"splitNumber": 12,
|
|
102
|
+
},
|
|
103
|
+
"grid": Object {
|
|
104
|
+
"bottom": 0,
|
|
105
|
+
"containLabel": true,
|
|
106
|
+
"left": 20,
|
|
107
|
+
"right": 20,
|
|
108
|
+
"top": 5,
|
|
109
|
+
},
|
|
110
|
+
"legend": Object {
|
|
111
|
+
"orient": "horizontal",
|
|
112
|
+
"pageIconColor": "rgba(0, 0, 0, 0.54)",
|
|
113
|
+
"pageIconInactiveColor": "rgba(0, 0, 0, 0.26)",
|
|
114
|
+
"pageTextStyle": Object {
|
|
115
|
+
"color": "#757575",
|
|
116
|
+
},
|
|
117
|
+
"textStyle": Object {
|
|
118
|
+
"color": "yellow",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
"line": Object {
|
|
122
|
+
"emphasis": Object {
|
|
123
|
+
"lineStyle": Object {
|
|
124
|
+
"width": 1.5,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
"lineStyle": Object {
|
|
128
|
+
"width": 1,
|
|
129
|
+
},
|
|
130
|
+
"showSymbol": true,
|
|
131
|
+
"smooth": true,
|
|
132
|
+
"symbol": "circle",
|
|
133
|
+
"symbolSize": 4,
|
|
134
|
+
},
|
|
135
|
+
"textStyle": Object {
|
|
136
|
+
"color": "rgba(0, 0, 0, 0.87)",
|
|
137
|
+
"fontFamily": "\\"Roboto\\", \\"Helvetica\\", \\"Arial\\", sans-serif",
|
|
138
|
+
"fontSize": 12,
|
|
139
|
+
},
|
|
140
|
+
"title": Object {
|
|
141
|
+
"show": false,
|
|
142
|
+
},
|
|
143
|
+
"toolbox": Object {
|
|
144
|
+
"iconStyle": Object {
|
|
145
|
+
"borderColor": "rgba(0, 0, 0, 0.87)",
|
|
146
|
+
},
|
|
147
|
+
"right": 10,
|
|
148
|
+
"show": true,
|
|
149
|
+
"top": 10,
|
|
150
|
+
},
|
|
151
|
+
"tooltip": Object {},
|
|
152
|
+
"valueAxis": Object {
|
|
153
|
+
"axisLabel": Object {
|
|
154
|
+
"color": "rgba(0, 0, 0, 0.87)",
|
|
155
|
+
"margin": 12,
|
|
156
|
+
},
|
|
157
|
+
"axisLine": Object {
|
|
158
|
+
"show": false,
|
|
159
|
+
},
|
|
160
|
+
"show": true,
|
|
161
|
+
"splitLine": Object {
|
|
162
|
+
"lineStyle": Object {
|
|
163
|
+
"color": "#e0e0e0",
|
|
164
|
+
"opacity": 0.6,
|
|
165
|
+
"width": 0.5,
|
|
166
|
+
},
|
|
167
|
+
"show": true,
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
"noDataOption": Object {
|
|
172
|
+
"title": Object {
|
|
173
|
+
"left": "center",
|
|
174
|
+
"show": true,
|
|
175
|
+
"text": "No data",
|
|
176
|
+
"textStyle": Object {
|
|
177
|
+
"color": "rgba(0, 0, 0, 0.87)",
|
|
178
|
+
"fontSize": 16,
|
|
179
|
+
"fontWeight": 400,
|
|
180
|
+
},
|
|
181
|
+
"top": "center",
|
|
182
|
+
},
|
|
183
|
+
"xAxis": Object {
|
|
184
|
+
"show": false,
|
|
185
|
+
},
|
|
186
|
+
"yAxis": Object {
|
|
187
|
+
"show": false,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
"sparkline": Object {
|
|
191
|
+
"color": "#1976d2",
|
|
192
|
+
"width": 2,
|
|
193
|
+
},
|
|
194
|
+
}
|
|
195
|
+
`);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PersesChartsTheme } from '../model';
|
|
3
|
+
export interface ChartsThemeProviderProps {
|
|
4
|
+
chartsTheme?: PersesChartsTheme;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function ChartsThemeProvider(props: ChartsThemeProviderProps): JSX.Element;
|
|
8
|
+
export declare const ChartsThemeContext: React.Context<PersesChartsTheme | undefined>;
|
|
9
|
+
export declare function useChartsTheme(): PersesChartsTheme;
|
|
10
|
+
//# sourceMappingURL=ChartsThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartsThemeProvider.d.ts","sourceRoot":"","sources":["../../src/context/ChartsThemeProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAGlE;AAED,eAAO,MAAM,kBAAkB,8CAA0D,CAAC;AAE1F,wBAAgB,cAAc,IAAI,iBAAiB,CAMlD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2022 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 { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import React, { createContext, useContext } from 'react';
|
|
15
|
+
export function ChartsThemeProvider(props) {
|
|
16
|
+
const { children , chartsTheme } = props;
|
|
17
|
+
return /*#__PURE__*/ _jsx(ChartsThemeContext.Provider, {
|
|
18
|
+
value: chartsTheme,
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export const ChartsThemeContext = /*#__PURE__*/ createContext(undefined);
|
|
23
|
+
export function useChartsTheme() {
|
|
24
|
+
const ctx = useContext(ChartsThemeContext);
|
|
25
|
+
if (ctx === undefined) {
|
|
26
|
+
throw new Error('No ChartsThemeContext found. Did you forget a Provider?');
|
|
27
|
+
}
|
|
28
|
+
return ctx;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=ChartsThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/context/ChartsThemeProvider.tsx"],"sourcesContent":["// Copyright 2022 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 React, { createContext, useContext } from 'react';\nimport { PersesChartsTheme } from '../model';\n\nexport interface ChartsThemeProviderProps {\n chartsTheme?: PersesChartsTheme;\n children?: React.ReactNode;\n}\n\nexport function ChartsThemeProvider(props: ChartsThemeProviderProps) {\n const { children, chartsTheme } = props;\n return <ChartsThemeContext.Provider value={chartsTheme}>{children}</ChartsThemeContext.Provider>;\n}\n\nexport const ChartsThemeContext = createContext<PersesChartsTheme | undefined>(undefined);\n\nexport function useChartsTheme(): PersesChartsTheme {\n const ctx = useContext(ChartsThemeContext);\n if (ctx === undefined) {\n throw new Error('No ChartsThemeContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n"],"names":["React","createContext","useContext","ChartsThemeProvider","props","children","chartsTheme","ChartsThemeContext","Provider","value","undefined","useChartsTheme","ctx","Error"],"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;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAQ,OAAO,CAAC;AAQzD,OAAO,SAASC,mBAAmB,CAACC,KAA+B,EAAE;IACnE,MAAM,EAAEC,QAAQ,CAAA,EAAEC,WAAW,CAAA,EAAE,GAAGF,KAAK,AAAC;IACxC,qBAAO,KAACG,kBAAkB,CAACC,QAAQ;QAACC,KAAK,EAAEH,WAAW;kBAAGD,QAAQ;MAA+B,CAAC;AACnG,CAAC;AAED,OAAO,MAAME,kBAAkB,iBAAGN,aAAa,CAAgCS,SAAS,CAAC,CAAC;AAE1F,OAAO,SAASC,cAAc,GAAsB;IAClD,MAAMC,GAAG,GAAGV,UAAU,CAACK,kBAAkB,CAAC,AAAC;IAC3C,IAAIK,GAAG,KAAKF,SAAS,EAAE;QACrB,MAAM,IAAIG,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IACD,OAAOD,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const TimeZoneContext: React.Context<string | undefined>;
|
|
3
|
+
export interface TimeZoneProviderProps {
|
|
4
|
+
timeZone?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function TimeZoneProvider(props: TimeZoneProviderProps): JSX.Element;
|
|
8
|
+
export declare function useTimeZone(): {
|
|
9
|
+
timeZone: string;
|
|
10
|
+
formatWithUserTimeZone(date: Date, formatString: string): string;
|
|
11
|
+
dateFormatOptionsWithUserTimeZone(dateFormatOptions: Intl.DateTimeFormatOptions): Intl.DateTimeFormatOptions;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=TimeZoneProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeZoneProvider.d.ts","sourceRoot":"","sources":["../../src/context/TimeZoneProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAGzD,eAAO,MAAM,eAAe,mCAA+C,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,eAG5D;AAED,wBAAgB,WAAW;;iCAKM,IAAI,gBAAgB,MAAM;yDAGF,KAAK,qBAAqB;EAIlF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright 2022 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 { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import React, { createContext, useContext } from 'react';
|
|
15
|
+
import { formatWithTimeZone, dateFormatOptionsWithTimeZone } from '../utils';
|
|
16
|
+
export const TimeZoneContext = /*#__PURE__*/ createContext(undefined);
|
|
17
|
+
export function TimeZoneProvider(props) {
|
|
18
|
+
const { children , timeZone } = props;
|
|
19
|
+
return /*#__PURE__*/ _jsx(TimeZoneContext.Provider, {
|
|
20
|
+
value: timeZone,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export function useTimeZone() {
|
|
25
|
+
const timeZone = useContext(TimeZoneContext);
|
|
26
|
+
return {
|
|
27
|
+
// fallback to "local" timezone if TimeZoneProvider is not present in the React tree
|
|
28
|
+
timeZone: timeZone !== null && timeZone !== void 0 ? timeZone : 'local',
|
|
29
|
+
formatWithUserTimeZone (date, formatString) {
|
|
30
|
+
return formatWithTimeZone(date, formatString, timeZone);
|
|
31
|
+
},
|
|
32
|
+
dateFormatOptionsWithUserTimeZone (dateFormatOptions) {
|
|
33
|
+
return dateFormatOptionsWithTimeZone(dateFormatOptions, timeZone);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=TimeZoneProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/context/TimeZoneProvider.tsx"],"sourcesContent":["// Copyright 2022 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 React, { createContext, useContext } from 'react';\nimport { formatWithTimeZone, dateFormatOptionsWithTimeZone } from '../utils';\n\nexport const TimeZoneContext = createContext<string | undefined>(undefined);\n\nexport interface TimeZoneProviderProps {\n timeZone?: string;\n children?: React.ReactNode;\n}\n\nexport function TimeZoneProvider(props: TimeZoneProviderProps) {\n const { children, timeZone } = props;\n return <TimeZoneContext.Provider value={timeZone}>{children}</TimeZoneContext.Provider>;\n}\n\nexport function useTimeZone() {\n const timeZone = useContext(TimeZoneContext);\n return {\n // fallback to \"local\" timezone if TimeZoneProvider is not present in the React tree\n timeZone: timeZone ?? 'local',\n formatWithUserTimeZone(date: Date, formatString: string) {\n return formatWithTimeZone(date, formatString, timeZone);\n },\n dateFormatOptionsWithUserTimeZone(dateFormatOptions: Intl.DateTimeFormatOptions) {\n return dateFormatOptionsWithTimeZone(dateFormatOptions, timeZone);\n },\n };\n}\n"],"names":["React","createContext","useContext","formatWithTimeZone","dateFormatOptionsWithTimeZone","TimeZoneContext","undefined","TimeZoneProvider","props","children","timeZone","Provider","value","useTimeZone","formatWithUserTimeZone","date","formatString","dateFormatOptionsWithUserTimeZone","dateFormatOptions"],"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;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAQ,OAAO,CAAC;AACzD,SAASC,kBAAkB,EAAEC,6BAA6B,QAAQ,UAAU,CAAC;AAE7E,OAAO,MAAMC,eAAe,iBAAGJ,aAAa,CAAqBK,SAAS,CAAC,CAAC;AAO5E,OAAO,SAASC,gBAAgB,CAACC,KAA4B,EAAE;IAC7D,MAAM,EAAEC,QAAQ,CAAA,EAAEC,QAAQ,CAAA,EAAE,GAAGF,KAAK,AAAC;IACrC,qBAAO,KAACH,eAAe,CAACM,QAAQ;QAACC,KAAK,EAAEF,QAAQ;kBAAGD,QAAQ;MAA4B,CAAC;AAC1F,CAAC;AAED,OAAO,SAASI,WAAW,GAAG;IAC5B,MAAMH,QAAQ,GAAGR,UAAU,CAACG,eAAe,CAAC,AAAC;IAC7C,OAAO;QACL,oFAAoF;QACpFK,QAAQ,EAAEA,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAI,OAAO;QAC7BI,sBAAsB,EAACC,IAAU,EAAEC,YAAoB,EAAE;YACvD,OAAOb,kBAAkB,CAACY,IAAI,EAAEC,YAAY,EAAEN,QAAQ,CAAC,CAAC;QAC1D,CAAC;QACDO,iCAAiC,EAACC,iBAA6C,EAAE;YAC/E,OAAOd,6BAA6B,CAACc,iBAAiB,EAAER,QAAQ,CAAC,CAAC;QACpE,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './DateTimeRangePicker';
|
|
2
|
+
export * from './Drawer';
|
|
3
|
+
export * from './EChart';
|
|
4
|
+
export * from './ErrorAlert';
|
|
5
|
+
export * from './ErrorBoundary';
|
|
6
|
+
export * from './GaugeChart';
|
|
7
|
+
export * from './InfoTooltip';
|
|
8
|
+
export * from './JSONEditor';
|
|
9
|
+
export * from './Legend';
|
|
10
|
+
export * from './LineChart';
|
|
11
|
+
export * from './OptionsEditorLayout';
|
|
12
|
+
export * from './StatChart';
|
|
13
|
+
export * from './UnitSelector';
|
|
14
|
+
export * from './YAxisLabel';
|
|
15
|
+
export * from './context/ChartsThemeProvider';
|
|
16
|
+
export * from './context/TimeZoneProvider';
|
|
17
|
+
export * from './utils';
|
|
18
|
+
export * from './model';
|
|
19
|
+
export * from './test-utils';
|
|
20
|
+
export * from './theme';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,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"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright 2022 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
|
+
export * from './DateTimeRangePicker';
|
|
14
|
+
export * from './Drawer';
|
|
15
|
+
export * from './EChart';
|
|
16
|
+
export * from './ErrorAlert';
|
|
17
|
+
export * from './ErrorBoundary';
|
|
18
|
+
export * from './GaugeChart';
|
|
19
|
+
export * from './InfoTooltip';
|
|
20
|
+
export * from './JSONEditor';
|
|
21
|
+
export * from './Legend';
|
|
22
|
+
export * from './LineChart';
|
|
23
|
+
export * from './OptionsEditorLayout';
|
|
24
|
+
export * from './StatChart';
|
|
25
|
+
export * from './UnitSelector';
|
|
26
|
+
export * from './YAxisLabel';
|
|
27
|
+
export * from './context/ChartsThemeProvider';
|
|
28
|
+
export * from './context/TimeZoneProvider';
|
|
29
|
+
export * from './utils';
|
|
30
|
+
export * from './model';
|
|
31
|
+
export * from './test-utils';
|
|
32
|
+
export * from './theme';
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2022 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 './DateTimeRangePicker';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './OptionsEditorLayout';\nexport * from './StatChart';\nexport * from './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,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { LineSeriesOption } from 'echarts/charts';
|
|
3
|
+
export declare const OPTIMIZED_MODE_SERIES_LIMIT = 1000;
|
|
4
|
+
export declare type UnixTimeMs = number;
|
|
5
|
+
export declare type GraphSeriesValueTuple = [timestamp: UnixTimeMs, value: number];
|
|
6
|
+
export interface GraphSeries {
|
|
7
|
+
name: string;
|
|
8
|
+
values: Iterable<GraphSeriesValueTuple>;
|
|
9
|
+
}
|
|
10
|
+
export declare type EChartsValues = number | null | '-';
|
|
11
|
+
export interface EChartsTimeSeries extends Omit<LineSeriesOption, 'data'> {
|
|
12
|
+
data: Iterable<GraphSeriesValueTuple> | EChartsValues[];
|
|
13
|
+
}
|
|
14
|
+
export declare type EChartsDataFormat = {
|
|
15
|
+
timeSeries: EChartsTimeSeries[];
|
|
16
|
+
xAxis: number[];
|
|
17
|
+
legendItems?: LegendItem[];
|
|
18
|
+
xAxisMax?: number | string;
|
|
19
|
+
rangeMs?: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Supported legend options
|
|
23
|
+
*/
|
|
24
|
+
export interface LegendOptions {
|
|
25
|
+
position?: 'bottom' | 'right';
|
|
26
|
+
}
|
|
27
|
+
export interface LegendItem {
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
isSelected: boolean;
|
|
31
|
+
color: string;
|
|
32
|
+
onClick: MouseEventHandler<HTMLLIElement>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/model/graph.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,oBAAY,UAAU,GAAG,MAAM,CAAC;AAEhC,oBAAY,qBAAqB,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAE3E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;CACzC;AAED,oBAAY,aAAa,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC;AAEhD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAEvE,IAAI,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,aAAa,EAAE,CAAC;CACzD;AAED,oBAAY,iBAAiB,GAAG;IAC9B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;CAC3C"}
|