@perses-dev/components 0.0.0-snapshot-core-types-move-units-c7c5d31 → 0.0.0-snapshot-panel-extra-content-2-2767e21

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.
Files changed (164) hide show
  1. package/README.md +1 -0
  2. package/dist/BarChart/BarChart.d.ts +16 -0
  3. package/dist/BarChart/BarChart.d.ts.map +1 -0
  4. package/dist/BarChart/BarChart.js +123 -0
  5. package/dist/BarChart/BarChart.js.map +1 -0
  6. package/dist/BarChart/index.d.ts +2 -0
  7. package/dist/BarChart/index.d.ts.map +1 -0
  8. package/dist/BarChart/index.js +15 -0
  9. package/dist/BarChart/index.js.map +1 -0
  10. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +10 -0
  11. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -0
  12. package/dist/Dialog/DiscardChangesConfirmationDialog.js +47 -0
  13. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -0
  14. package/dist/Dialog/index.d.ts +1 -0
  15. package/dist/Dialog/index.d.ts.map +1 -1
  16. package/dist/Dialog/index.js +1 -0
  17. package/dist/Dialog/index.js.map +1 -1
  18. package/dist/FontSizeSelector/FontSizeSelector.d.ts +8 -0
  19. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -0
  20. package/dist/FontSizeSelector/FontSizeSelector.js +124 -0
  21. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -0
  22. package/dist/FontSizeSelector/index.d.ts +2 -0
  23. package/dist/FontSizeSelector/index.d.ts.map +1 -0
  24. package/dist/FontSizeSelector/index.js +15 -0
  25. package/dist/FontSizeSelector/index.js.map +1 -0
  26. package/dist/Legend/ListLegendItem.d.ts +1 -1
  27. package/dist/LineChart/LineChart.d.ts +5 -25
  28. package/dist/LineChart/LineChart.d.ts.map +1 -1
  29. package/dist/LineChart/LineChart.js +8 -7
  30. package/dist/LineChart/LineChart.js.map +1 -1
  31. package/dist/LineChart/index.d.ts +0 -1
  32. package/dist/LineChart/index.d.ts.map +1 -1
  33. package/dist/LineChart/index.js.map +1 -1
  34. package/dist/ModeSelector/ModeSelector.d.ts +9 -0
  35. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -0
  36. package/dist/ModeSelector/ModeSelector.js +43 -0
  37. package/dist/ModeSelector/ModeSelector.js.map +1 -0
  38. package/dist/ModeSelector/index.d.ts +2 -0
  39. package/dist/ModeSelector/index.d.ts.map +1 -0
  40. package/dist/ModeSelector/index.js +15 -0
  41. package/dist/ModeSelector/index.js.map +1 -0
  42. package/dist/SortSelector/SortSelector.d.ts +8 -0
  43. package/dist/SortSelector/SortSelector.d.ts.map +1 -0
  44. package/dist/SortSelector/SortSelector.js +42 -0
  45. package/dist/SortSelector/SortSelector.js.map +1 -0
  46. package/dist/SortSelector/index.d.ts +2 -0
  47. package/dist/SortSelector/index.d.ts.map +1 -0
  48. package/dist/SortSelector/index.js +15 -0
  49. package/dist/SortSelector/index.js.map +1 -0
  50. package/dist/StatChart/StatChart.d.ts +2 -0
  51. package/dist/StatChart/StatChart.d.ts.map +1 -1
  52. package/dist/StatChart/StatChart.js +7 -5
  53. package/dist/StatChart/StatChart.js.map +1 -1
  54. package/dist/StatChart/calculateFontSize.d.ts +3 -1
  55. package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
  56. package/dist/StatChart/calculateFontSize.js +5 -1
  57. package/dist/StatChart/calculateFontSize.js.map +1 -1
  58. package/dist/TimeChart/TimeChart.d.ts +24 -0
  59. package/dist/TimeChart/TimeChart.d.ts.map +1 -0
  60. package/dist/TimeChart/TimeChart.js +354 -0
  61. package/dist/TimeChart/TimeChart.js.map +1 -0
  62. package/dist/TimeChart/index.d.ts +2 -0
  63. package/dist/TimeChart/index.d.ts.map +1 -0
  64. package/dist/TimeChart/index.js +15 -0
  65. package/dist/TimeChart/index.js.map +1 -0
  66. package/dist/TimeSeriesTooltip/{TimeSeriesTooltip.d.ts → LineChartTooltip.d.ts} +7 -2
  67. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -0
  68. package/dist/TimeSeriesTooltip/{TimeSeriesTooltip.js → LineChartTooltip.js} +15 -8
  69. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -0
  70. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +21 -0
  71. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -0
  72. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +83 -0
  73. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -0
  74. package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -9
  75. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  76. package/dist/TimeSeriesTooltip/index.d.ts +2 -1
  77. package/dist/TimeSeriesTooltip/index.d.ts.map +1 -1
  78. package/dist/TimeSeriesTooltip/index.js +2 -1
  79. package/dist/TimeSeriesTooltip/index.js.map +1 -1
  80. package/dist/TimeSeriesTooltip/nearby-series.d.ts +23 -5
  81. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  82. package/dist/TimeSeriesTooltip/nearby-series.js +203 -50
  83. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  84. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +5 -0
  85. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  86. package/dist/TimeSeriesTooltip/tooltip-model.js +1 -0
  87. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  88. package/dist/TimeSeriesTooltip/utils.d.ts +26 -1
  89. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  90. package/dist/TimeSeriesTooltip/utils.js +48 -6
  91. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  92. package/dist/UnitSelector/UnitSelector.d.ts +2 -1
  93. package/dist/UnitSelector/UnitSelector.d.ts.map +1 -1
  94. package/dist/UnitSelector/UnitSelector.js +3 -2
  95. package/dist/UnitSelector/UnitSelector.js.map +1 -1
  96. package/dist/cjs/BarChart/BarChart.js +129 -0
  97. package/dist/cjs/BarChart/index.js +28 -0
  98. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +53 -0
  99. package/dist/cjs/Dialog/index.js +1 -0
  100. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +130 -0
  101. package/dist/cjs/FontSizeSelector/index.js +28 -0
  102. package/dist/cjs/LineChart/LineChart.js +7 -45
  103. package/dist/cjs/ModeSelector/ModeSelector.js +49 -0
  104. package/dist/cjs/ModeSelector/index.js +28 -0
  105. package/dist/cjs/SortSelector/SortSelector.js +48 -0
  106. package/dist/cjs/SortSelector/index.js +28 -0
  107. package/dist/cjs/StatChart/StatChart.js +7 -5
  108. package/dist/cjs/StatChart/calculateFontSize.js +5 -1
  109. package/dist/cjs/TimeChart/TimeChart.js +365 -0
  110. package/dist/cjs/TimeChart/index.js +28 -0
  111. package/dist/cjs/TimeSeriesTooltip/{TimeSeriesTooltip.js → LineChartTooltip.js} +14 -7
  112. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +94 -0
  113. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +6 -9
  114. package/dist/cjs/TimeSeriesTooltip/index.js +2 -1
  115. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +199 -50
  116. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +2 -0
  117. package/dist/cjs/TimeSeriesTooltip/utils.js +54 -8
  118. package/dist/cjs/UnitSelector/UnitSelector.js +3 -2
  119. package/dist/cjs/index.js +5 -0
  120. package/dist/cjs/model/graph.js +35 -3
  121. package/dist/cjs/utils/axis.js +58 -0
  122. package/dist/cjs/utils/chart-actions.js +117 -0
  123. package/dist/cjs/utils/format.js +47 -1
  124. package/dist/cjs/utils/index.js +3 -1
  125. package/dist/cjs/utils/theme-gen.js +75 -6
  126. package/dist/index.d.ts +5 -0
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +5 -0
  129. package/dist/index.js.map +1 -1
  130. package/dist/model/graph.d.ts +29 -3
  131. package/dist/model/graph.d.ts.map +1 -1
  132. package/dist/model/graph.js +25 -0
  133. package/dist/model/graph.js.map +1 -1
  134. package/dist/model/theme.d.ts +5 -0
  135. package/dist/model/theme.d.ts.map +1 -1
  136. package/dist/model/theme.js.map +1 -1
  137. package/dist/utils/axis.d.ts +14 -0
  138. package/dist/utils/axis.d.ts.map +1 -0
  139. package/dist/utils/axis.js +45 -0
  140. package/dist/utils/axis.js.map +1 -0
  141. package/dist/utils/chart-actions.d.ts +21 -0
  142. package/dist/utils/chart-actions.d.ts.map +1 -0
  143. package/dist/utils/chart-actions.js +118 -0
  144. package/dist/utils/chart-actions.js.map +1 -0
  145. package/dist/utils/format.d.ts +6 -0
  146. package/dist/utils/format.d.ts.map +1 -1
  147. package/dist/utils/format.js +47 -0
  148. package/dist/utils/format.js.map +1 -1
  149. package/dist/utils/index.d.ts +3 -1
  150. package/dist/utils/index.d.ts.map +1 -1
  151. package/dist/utils/index.js +3 -1
  152. package/dist/utils/index.js.map +1 -1
  153. package/dist/utils/theme-gen.d.ts +6 -1
  154. package/dist/utils/theme-gen.d.ts.map +1 -1
  155. package/dist/utils/theme-gen.js +75 -6
  156. package/dist/utils/theme-gen.js.map +1 -1
  157. package/package.json +3 -4
  158. package/dist/LineChart/utils.d.ts +0 -31
  159. package/dist/LineChart/utils.d.ts.map +0 -1
  160. package/dist/LineChart/utils.js +0 -103
  161. package/dist/LineChart/utils.js.map +0 -1
  162. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts.map +0 -1
  163. package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js.map +0 -1
  164. package/dist/cjs/LineChart/utils.js +0 -111
package/README.md CHANGED
@@ -15,3 +15,4 @@ For detailed examples of how to use certain components, see individual docs for:
15
15
  - [LineChart.md](./src/LineChart/LineChart.md)
16
16
  - [GaugeChart.md](./src/GaugeChart/GaugeChart.md)
17
17
  - [StatChart.md](./src/StatChart/StatChart.md)
18
+ - [BarChart.md](./src/BarChart/BarChart.md)
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { UnitOptions } from '@perses-dev/core';
3
+ import { ModeOption } from '../ModeSelector';
4
+ export interface BarChartData {
5
+ label: string;
6
+ value: number | null;
7
+ }
8
+ export interface BarChartProps {
9
+ width: number;
10
+ height: number;
11
+ data: BarChartData[] | null;
12
+ unit?: UnitOptions;
13
+ mode?: ModeOption;
14
+ }
15
+ export declare function BarChart(props: BarChartProps): JSX.Element;
16
+ //# sourceMappingURL=BarChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../src/BarChart/BarChart.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAQ5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,eA+E5C"}
@@ -0,0 +1,123 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { useMemo } from 'react';
15
+ import { formatValue } from '@perses-dev/core';
16
+ import { use } from 'echarts/core';
17
+ import { BarChart as EChartsBarChart } from 'echarts/charts';
18
+ import { GridComponent, DatasetComponent, TitleComponent, TooltipComponent } from 'echarts/components';
19
+ import { CanvasRenderer } from 'echarts/renderers';
20
+ import { Box } from '@mui/material';
21
+ import { useChartsTheme } from '../context/ChartsThemeProvider';
22
+ import { EChart } from '../EChart';
23
+ use([
24
+ EChartsBarChart,
25
+ GridComponent,
26
+ DatasetComponent,
27
+ TitleComponent,
28
+ TooltipComponent,
29
+ CanvasRenderer
30
+ ]);
31
+ const BAR_WIN_WIDTH = 14;
32
+ const BAR_GAP = 6;
33
+ export function BarChart(props) {
34
+ const { width , height , data , unit ={
35
+ kind: 'Decimal'
36
+ } , mode ='value' } = props;
37
+ const chartsTheme = useChartsTheme();
38
+ const option = useMemo(()=>{
39
+ if (data == null) return chartsTheme.noDataOption;
40
+ const source = [];
41
+ data.map((d)=>{
42
+ source.push([
43
+ d.label,
44
+ d.value
45
+ ]);
46
+ });
47
+ return {
48
+ title: {
49
+ show: false
50
+ },
51
+ dataset: [
52
+ {
53
+ dimensions: [
54
+ 'label',
55
+ 'value'
56
+ ],
57
+ source: source
58
+ }
59
+ ],
60
+ xAxis: {},
61
+ yAxis: {
62
+ type: 'category',
63
+ splitLine: {
64
+ show: false
65
+ },
66
+ axisLabel: {
67
+ overflow: 'truncate',
68
+ width: width / 3
69
+ }
70
+ },
71
+ series: {
72
+ type: 'bar',
73
+ label: {
74
+ show: true,
75
+ position: 'right',
76
+ formatter: (params)=>{
77
+ if (mode === 'percentage') {
78
+ return params.data[1] && formatValue(params.data[1], {
79
+ kind: 'Percent',
80
+ decimal_places: unit.decimal_places
81
+ });
82
+ }
83
+ return params.data[1] && formatValue(params.data[1], unit);
84
+ },
85
+ barMinWidth: BAR_WIN_WIDTH,
86
+ barCategoryGap: BAR_GAP
87
+ },
88
+ itemStyle: {
89
+ borderRadius: 4,
90
+ color: chartsTheme.echartsTheme[0]
91
+ }
92
+ },
93
+ tooltip: {
94
+ appendToBody: true,
95
+ confine: true,
96
+ formatter: (params)=>params.data[1] && `<b>${params.name}</b> &emsp; ${formatValue(params.data[1], unit)}`
97
+ }
98
+ };
99
+ }, [
100
+ data,
101
+ chartsTheme,
102
+ width,
103
+ mode,
104
+ unit
105
+ ]);
106
+ return /*#__PURE__*/ _jsx(Box, {
107
+ sx: {
108
+ width: width,
109
+ height: height,
110
+ overflow: 'auto'
111
+ },
112
+ children: /*#__PURE__*/ _jsx(EChart, {
113
+ sx: {
114
+ minHeight: height,
115
+ height: data ? data.length * (BAR_WIN_WIDTH + BAR_GAP) : '100%'
116
+ },
117
+ option: option,
118
+ theme: chartsTheme.echartsTheme
119
+ })
120
+ });
121
+ }
122
+
123
+ //# sourceMappingURL=BarChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/BarChart/BarChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useMemo } from 'react';\nimport { UnitOptions, formatValue } from '@perses-dev/core';\nimport { use, EChartsCoreOption } from 'echarts/core';\nimport { BarChart as EChartsBarChart } from 'echarts/charts';\nimport { GridComponent, DatasetComponent, TitleComponent, TooltipComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { Box } from '@mui/material';\nimport { useChartsTheme } from '../context/ChartsThemeProvider';\nimport { EChart } from '../EChart';\nimport { ModeOption } from '../ModeSelector';\n\nuse([EChartsBarChart, GridComponent, DatasetComponent, TitleComponent, TooltipComponent, CanvasRenderer]);\n\nconst BAR_WIN_WIDTH = 14;\nconst BAR_GAP = 6;\n\nexport interface BarChartData {\n label: string;\n value: number | null;\n}\n\nexport interface BarChartProps {\n width: number;\n height: number;\n data: BarChartData[] | null;\n unit?: UnitOptions;\n mode?: ModeOption;\n}\n\nexport function BarChart(props: BarChartProps) {\n const { width, height, data, unit = { kind: 'Decimal' }, mode = 'value' } = props;\n const chartsTheme = useChartsTheme();\n\n const option: EChartsCoreOption = useMemo(() => {\n if (data == null) return chartsTheme.noDataOption;\n\n const source: Array<Array<BarChartData['label'] | BarChartData['value']>> = [];\n data.map((d) => {\n source.push([d.label, d.value]);\n });\n\n return {\n title: {\n show: false,\n },\n dataset: [\n {\n dimensions: ['label', 'value'],\n source: source,\n },\n ],\n xAxis: {},\n yAxis: {\n type: 'category',\n splitLine: {\n show: false,\n },\n axisLabel: {\n overflow: 'truncate',\n width: width / 3,\n },\n },\n series: {\n type: 'bar',\n label: {\n show: true,\n position: 'right',\n formatter: (params: { data: number[] }) => {\n if (mode === 'percentage') {\n return (\n params.data[1] &&\n formatValue(params.data[1], {\n kind: 'Percent',\n decimal_places: unit.decimal_places,\n })\n );\n }\n return params.data[1] && formatValue(params.data[1], unit);\n },\n barMinWidth: BAR_WIN_WIDTH,\n barCategoryGap: BAR_GAP,\n },\n itemStyle: {\n borderRadius: 4,\n color: chartsTheme.echartsTheme[0],\n },\n },\n tooltip: {\n appendToBody: true,\n confine: true,\n formatter: (params: { name: string; data: number[] }) =>\n params.data[1] && `<b>${params.name}</b> &emsp; ${formatValue(params.data[1], unit)}`,\n },\n };\n }, [data, chartsTheme, width, mode, unit]);\n\n return (\n <Box sx={{ width: width, height: height, overflow: 'auto' }}>\n <EChart\n sx={{\n minHeight: height,\n height: data ? data.length * (BAR_WIN_WIDTH + BAR_GAP) : '100%',\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n />\n </Box>\n );\n}\n"],"names":["useMemo","formatValue","use","BarChart","EChartsBarChart","GridComponent","DatasetComponent","TitleComponent","TooltipComponent","CanvasRenderer","Box","useChartsTheme","EChart","BAR_WIN_WIDTH","BAR_GAP","props","width","height","data","unit","kind","mode","chartsTheme","option","noDataOption","source","map","d","push","label","value","title","show","dataset","dimensions","xAxis","yAxis","type","splitLine","axisLabel","overflow","series","position","formatter","params","decimal_places","barMinWidth","barCategoryGap","itemStyle","borderRadius","color","echartsTheme","tooltip","appendToBody","confine","name","sx","minHeight","length","theme"],"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,SAASA,OAAO,QAAQ,OAAO,CAAC;AAChC,SAAsBC,WAAW,QAAQ,kBAAkB,CAAC;AAC5D,SAASC,GAAG,QAA2B,cAAc,CAAC;AACtD,SAASC,QAAQ,IAAIC,eAAe,QAAQ,gBAAgB,CAAC;AAC7D,SAASC,aAAa,EAAEC,gBAAgB,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,oBAAoB,CAAC;AACvG,SAASC,cAAc,QAAQ,mBAAmB,CAAC;AACnD,SAASC,GAAG,QAAQ,eAAe,CAAC;AACpC,SAASC,cAAc,QAAQ,gCAAgC,CAAC;AAChE,SAASC,MAAM,QAAQ,WAAW,CAAC;AAGnCV,GAAG,CAAC;IAACE,eAAe;IAAEC,aAAa;IAAEC,gBAAgB;IAAEC,cAAc;IAAEC,gBAAgB;IAAEC,cAAc;CAAC,CAAC,CAAC;AAE1G,MAAMI,aAAa,GAAG,EAAE,AAAC;AACzB,MAAMC,OAAO,GAAG,CAAC,AAAC;AAelB,OAAO,SAASX,QAAQ,CAACY,KAAoB,EAAE;IAC7C,MAAM,EAAEC,KAAK,CAAA,EAAEC,MAAM,CAAA,EAAEC,IAAI,CAAA,E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AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './BarChart';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/BarChart/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,15 @@
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
+ export * from './BarChart';
14
+
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/BarChart/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 './BarChart';\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,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ interface DiscardChangesConfirmationDialogProps {
3
+ description: string;
4
+ isOpen: boolean;
5
+ onCancel: () => void;
6
+ onDiscardChanges: () => void;
7
+ }
8
+ export declare const DiscardChangesConfirmationDialog: (props: DiscardChangesConfirmationDialogProps) => JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=DiscardChangesConfirmationDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscardChangesConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"names":[],"mappings":";AAgBA,UAAU,qCAAqC;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,gCAAgC,UAAW,qCAAqC,gBAiB5F,CAAC"}
@@ -0,0 +1,47 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { Button } from '@mui/material';
15
+ import { Dialog } from './Dialog';
16
+ export const DiscardChangesConfirmationDialog = (props)=>{
17
+ const { description , isOpen , onCancel , onDiscardChanges } = props;
18
+ return /*#__PURE__*/ _jsxs(Dialog, {
19
+ open: isOpen,
20
+ "aria-labelledby": "discard-dialog",
21
+ children: [
22
+ /*#__PURE__*/ _jsx(Dialog.Header, {
23
+ children: "Discard Changes"
24
+ }),
25
+ /*#__PURE__*/ _jsx(Dialog.Content, {
26
+ children: description
27
+ }),
28
+ /*#__PURE__*/ _jsxs(Dialog.Actions, {
29
+ children: [
30
+ /*#__PURE__*/ _jsx(Button, {
31
+ variant: "contained",
32
+ onClick: onDiscardChanges,
33
+ children: "Discard Changes"
34
+ }),
35
+ /*#__PURE__*/ _jsx(Button, {
36
+ variant: "outlined",
37
+ color: "secondary",
38
+ onClick: onCancel,
39
+ children: "Cancel"
40
+ })
41
+ ]
42
+ })
43
+ ]
44
+ });
45
+ };
46
+
47
+ //# sourceMappingURL=DiscardChangesConfirmationDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport { Dialog } from './Dialog';\n\ninterface DiscardChangesConfirmationDialogProps {\n description: string;\n isOpen: boolean;\n onCancel: () => void;\n onDiscardChanges: () => void;\n}\n\nexport const DiscardChangesConfirmationDialog = (props: DiscardChangesConfirmationDialogProps) => {\n const { description, isOpen, onCancel, onDiscardChanges } = props;\n\n return (\n <Dialog open={isOpen} aria-labelledby=\"discard-dialog\">\n <Dialog.Header>Discard Changes</Dialog.Header>\n <Dialog.Content>{description}</Dialog.Content>\n <Dialog.Actions>\n <Button variant=\"contained\" onClick={onDiscardChanges}>\n Discard Changes\n </Button>\n <Button variant=\"outlined\" color=\"secondary\" onClick={onCancel}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n );\n};\n"],"names":["Button","Dialog","DiscardChangesConfirmationDialog","props","description","isOpen","onCancel","onDiscardChanges","open","aria-labelledby","Header","Content","Actions","variant","onClick","color"],"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,SAASA,MAAM,QAAQ,eAAe,CAAC;AACvC,SAASC,MAAM,QAAQ,UAAU,CAAC;AASlC,OAAO,MAAMC,gCAAgC,GAAG,CAACC,KAA4C,GAAK;IAChG,MAAM,EAAEC,WAAW,CAAA,EAAEC,MAAM,CAAA,EAAEC,QAAQ,CAAA,EAAEC,gBAAgB,CAAA,EAAE,GAAGJ,KAAK,AAAC;IAElE,qBACE,MAACF,MAAM;QAACO,IAAI,EAAEH,MAAM;QAAEI,iBAAe,EAAC,gBAAgB;;0BACpD,KAACR,MAAM,CAACS,MAAM;0BAAC,iBAAe;cAAgB;0BAC9C,KAACT,MAAM,CAACU,OAAO;0BAAEP,WAAW;cAAkB;0BAC9C,MAACH,MAAM,CAACW,OAAO;;kCACb,KAACZ,MAAM;wBAACa,OAAO,EAAC,WAAW;wBAACC,OAAO,EAAEP,gBAAgB;kCAAE,iBAEvD;sBAAS;kCACT,KAACP,MAAM;wBAACa,OAAO,EAAC,UAAU;wBAACE,KAAK,EAAC,WAAW;wBAACD,OAAO,EAAER,QAAQ;kCAAE,QAEhE;sBAAS;;cACM;;MACV,CACT;AACJ,CAAC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './Dialog';
2
+ export * from './DiscardChangesConfirmationDialog';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Dialog/index.tsx"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Dialog/index.tsx"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAC;AACzB,cAAc,oCAAoC,CAAC"}
@@ -11,5 +11,6 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  export * from './Dialog';
14
+ export * from './DiscardChangesConfirmationDialog';
14
15
 
15
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Dialog/index.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './Dialog';\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,UAAU,CAAC"}
1
+ {"version":3,"sources":["../../src/Dialog/index.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './Dialog';\nexport * from './DiscardChangesConfirmationDialog';\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,UAAU,CAAC;AACzB,cAAc,oCAAoC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare type FontSizeOption = number | undefined;
3
+ export interface FontSizeSelectorProps {
4
+ value: FontSizeOption;
5
+ onChange: (fontSize: FontSizeOption) => void;
6
+ }
7
+ export declare function FontSizeSelector({ value, onChange }: FontSizeSelectorProps): JSX.Element;
8
+ //# sourceMappingURL=FontSizeSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontSizeSelector.d.ts","sourceRoot":"","sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"names":[],"mappings":";AAqCA,oBAAY,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,qBAAqB,eAmB1E"}
@@ -0,0 +1,124 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License | Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing | software
9
+ // distributed under the License is distributed on an "AS IS" BASIS |
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { OptionsEditorControl } from '../OptionsEditorLayout';
15
+ import { SettingsAutocomplete } from '../SettingsAutocomplete';
16
+ const FONT_SIZE_OPTIONS = [
17
+ {
18
+ id: 'default',
19
+ label: 'Default',
20
+ value: undefined
21
+ },
22
+ {
23
+ id: '12',
24
+ label: '12',
25
+ value: 12
26
+ },
27
+ {
28
+ id: '14',
29
+ label: '14',
30
+ value: 14
31
+ },
32
+ {
33
+ id: '16',
34
+ label: '16',
35
+ value: 16
36
+ },
37
+ {
38
+ id: '20',
39
+ label: '20',
40
+ value: 20
41
+ },
42
+ {
43
+ id: '24',
44
+ label: '24',
45
+ value: 24
46
+ },
47
+ {
48
+ id: '28',
49
+ label: '28',
50
+ value: 28
51
+ },
52
+ {
53
+ id: '32',
54
+ label: '32',
55
+ value: 32
56
+ },
57
+ {
58
+ id: '36',
59
+ label: '36',
60
+ value: 36
61
+ },
62
+ {
63
+ id: '40',
64
+ label: '40',
65
+ value: 40
66
+ },
67
+ {
68
+ id: '48',
69
+ label: '48',
70
+ value: 48
71
+ },
72
+ {
73
+ id: '56',
74
+ label: '56',
75
+ value: 56
76
+ },
77
+ {
78
+ id: '64',
79
+ label: '64',
80
+ value: 64
81
+ },
82
+ {
83
+ id: '72',
84
+ label: '72',
85
+ value: 72
86
+ },
87
+ {
88
+ id: '96',
89
+ label: '96',
90
+ value: 96
91
+ },
92
+ {
93
+ id: '128',
94
+ label: '128',
95
+ value: 128
96
+ },
97
+ {
98
+ id: '160',
99
+ label: '160',
100
+ value: 160
101
+ },
102
+ {
103
+ id: '192',
104
+ label: '192',
105
+ value: 192
106
+ }
107
+ ];
108
+ export function FontSizeSelector({ value , onChange }) {
109
+ const handleFontSizeChange = (_, { value })=>{
110
+ onChange(value);
111
+ };
112
+ return /*#__PURE__*/ _jsx(OptionsEditorControl, {
113
+ label: "Font Size",
114
+ control: /*#__PURE__*/ _jsx(SettingsAutocomplete, {
115
+ value: FONT_SIZE_OPTIONS.find((o)=>o.value === value),
116
+ options: FONT_SIZE_OPTIONS,
117
+ getOptionLabel: (o)=>o.label,
118
+ onChange: handleFontSizeChange,
119
+ disableClearable: true
120
+ })
121
+ });
122
+ }
123
+
124
+ //# sourceMappingURL=FontSizeSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst FONT_SIZE_OPTIONS = [\n { id: 'default', label: 'Default', value: undefined },\n { id: '12', label: '12', value: 12 },\n { id: '14', label: '14', value: 14 },\n { id: '16', label: '16', value: 16 },\n { id: '20', label: '20', value: 20 },\n { id: '24', label: '24', value: 24 },\n { id: '28', label: '28', value: 28 },\n { id: '32', label: '32', value: 32 },\n { id: '36', label: '36', value: 36 },\n { id: '40', label: '40', value: 40 },\n { id: '48', label: '48', value: 48 },\n { id: '56', label: '56', value: 56 },\n { id: '64', label: '64', value: 64 },\n { id: '72', label: '72', value: 72 },\n { id: '96', label: '96', value: 96 },\n { id: '128', label: '128', value: 128 },\n { id: '160', label: '160', value: 160 },\n { id: '192', label: '192', value: 192 },\n];\n\nexport type FontSizeOption = number | undefined;\n\nexport interface FontSizeSelectorProps {\n value: FontSizeOption;\n onChange: (fontSize: FontSizeOption) => void;\n}\n\nexport function FontSizeSelector({ value, onChange }: FontSizeSelectorProps) {\n const handleFontSizeChange = (_: unknown, { value }: { value: FontSizeOption }) => {\n onChange(value);\n };\n\n return (\n <OptionsEditorControl\n label=\"Font Size\"\n control={\n <SettingsAutocomplete\n value={FONT_SIZE_OPTIONS.find((o) => o.value === value)}\n options={FONT_SIZE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleFontSizeChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","FONT_SIZE_OPTIONS","id","label","value","undefined","FontSizeSelector","onChange","handleFontSizeChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,oBAAoB,QAAQ,wBAAwB,CAAC;AAC9D,SAASC,oBAAoB,QAAQ,yBAAyB,CAAC;AAE/D,MAAMC,iBAAiB,GAAG;IACxB;QAAEC,EAAE,EAAE,SAAS;QAAEC,KAAK,EAAE,SAAS;QAAEC,KAAK,EAAEC,SAAS;KAAE;IACrD;QAAEH,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,EAAE,IAAI;QAAEC,KAAK,EAAE,IAAI;QAAEC,KAAK,EAAE,EAAE;KAAE;IACpC;QAAEF,EAAE,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cAAc,EAAE,CAACF,CAAC,GAAKA,CAAC,CAACT,KAAK;YAC9BI,QAAQ,EAAEC,oBAAoB;YAC9BO,gBAAgB;UAChB;MAEJ,CACF;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FontSizeSelector';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FontSizeSelector/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,15 @@
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
+ export * from './FontSizeSelector';
14
+
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/FontSizeSelector/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 './FontSizeSelector';\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,oBAAoB,CAAC"}
@@ -30,5 +30,5 @@ export interface ListLegendItemProps extends Omit<ListItemProps<'div'>, 'onClick
30
30
  */
31
31
  truncateLabel?: boolean;
32
32
  }
33
- export declare const ListLegendItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<ListLegendItemProps, "classes" | "className" | "style" | "children" | "sx" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "alignItems" | "disabled" | "selected" | "divider" | "components" | "componentsProps" | "slotProps" | "slots" | "dense" | "ContainerComponent" | "ContainerProps" | "disableGutters" | "disablePadding" | "secondaryAction" | "item" | "index" | "isVisuallySelected" | "truncateLabel"> & React.RefAttributes<HTMLDivElement>>>;
33
+ export declare const ListLegendItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<ListLegendItemProps, "classes" | "className" | "style" | "children" | "sx" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "alignItems" | "disabled" | "selected" | "dense" | "components" | "ContainerComponent" | "ContainerProps" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "componentsProps" | "slotProps" | "slots" | "item" | "index" | "isVisuallySelected" | "truncateLabel"> & React.RefAttributes<HTMLDivElement>>>;
34
34
  //# sourceMappingURL=ListLegendItem.d.ts.map
@@ -1,16 +1,10 @@
1
- import React, { MouseEvent } from 'react';
1
+ import { MouseEvent } from 'react';
2
2
  import { UnitOptions } from '@perses-dev/core';
3
3
  import type { EChartsCoreOption, GridComponentOption, LegendComponentOption, YAXisComponentOption } from 'echarts';
4
- import { EChartsDataFormat } from '../model/graph';
5
- import { ZoomEventData } from './utils';
6
- export declare type TooltipConfig = {
7
- wrapLabels: boolean;
8
- hidden?: boolean;
9
- };
4
+ import { EChartsDataFormat, ChartInstance } from '../model/graph';
5
+ import { TooltipConfig } from '../TimeSeriesTooltip';
6
+ import { ZoomEventData } from '../utils';
10
7
  export interface LineChartProps {
11
- /**
12
- * Height of the chart
13
- */
14
8
  height: number;
15
9
  data: EChartsDataFormat;
16
10
  yAxis?: YAXisComponentOption;
@@ -24,19 +18,5 @@ export interface LineChartProps {
24
18
  onDoubleClick?: (e: MouseEvent) => void;
25
19
  __experimentalEChartsOptionsOverride?: (options: EChartsCoreOption) => EChartsCoreOption;
26
20
  }
27
- declare type LineChartHandleFocusOpts = {
28
- id: string;
29
- };
30
- export declare type LineChartHandle = {
31
- /**
32
- * Highlight the series associated with the specified options.
33
- */
34
- highlightSeries: (opts: LineChartHandleFocusOpts) => void;
35
- /**
36
- * Clear all highlighted series.
37
- */
38
- clearHighlightedSeries: () => void;
39
- };
40
- export declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<LineChartHandle>>;
41
- export {};
21
+ export declare const LineChart: import("react").ForwardRefExoticComponent<LineChartProps & import("react").RefAttributes<ChartInstance>>;
42
22
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,0GAsPpB,CAAC"}
@@ -11,7 +11,7 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import React, { useImperativeHandle, useMemo, useRef, useState, forwardRef } from 'react';
14
+ import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';
15
15
  import { Box } from '@mui/material';
16
16
  import { use } from 'echarts/core';
17
17
  import { LineChart as EChartsLineChart } from 'echarts/charts';
@@ -19,9 +19,9 @@ import { GridComponent, DataZoomComponent, MarkAreaComponent, MarkLineComponent,
19
19
  import { CanvasRenderer } from 'echarts/renderers';
20
20
  import { EChart } from '../EChart';
21
21
  import { useChartsTheme } from '../context/ChartsThemeProvider';
22
- import { TimeSeriesTooltip } from '../TimeSeriesTooltip';
22
+ import { LineChartTooltip } from '../TimeSeriesTooltip';
23
23
  import { useTimeZone } from '../context/TimeZoneProvider';
24
- import { clearHighlightedSeries, enableDataZoom, getDateRange, getFormattedDate, getYAxes, restoreChart } from './utils';
24
+ import { clearHighlightedSeries, enableDataZoom, getDateRange, getFormattedDate, getYAxes, restoreChart } from '../utils';
25
25
  use([
26
26
  EChartsLineChart,
27
27
  GridComponent,
@@ -50,7 +50,7 @@ export const LineChart = /*#__PURE__*/ forwardRef(function LineChart({ height ,
50
50
  return {
51
51
  highlightSeries ({ id }) {
52
52
  if (!chartRef.current) {
53
- // No chart. Do nothing.
53
+ // when chart undef, do not highlight series when hovering over legend
54
54
  return;
55
55
  }
56
56
  chartRef.current.dispatchAction({
@@ -60,7 +60,7 @@ export const LineChart = /*#__PURE__*/ forwardRef(function LineChart({ height ,
60
60
  },
61
61
  clearHighlightedSeries: ()=>{
62
62
  if (!chartRef.current) {
63
- // No chart. Do nothing.
63
+ // when chart undef, do not clear highlight series
64
64
  return;
65
65
  }
66
66
  clearHighlightedSeries(chartRef.current, data.timeSeries.length);
@@ -245,7 +245,7 @@ export const LineChart = /*#__PURE__*/ forwardRef(function LineChart({ height ,
245
245
  }
246
246
  },
247
247
  children: [
248
- showTooltip === true && ((ref1 = option.tooltip) === null || ref1 === void 0 ? void 0 : ref1.showContent) === false && tooltipConfig.hidden !== true && /*#__PURE__*/ _jsx(TimeSeriesTooltip, {
248
+ showTooltip === true && ((ref1 = option.tooltip) === null || ref1 === void 0 ? void 0 : ref1.showContent) === false && tooltipConfig.hidden !== true && /*#__PURE__*/ _jsx(LineChartTooltip, {
249
249
  chartRef: chartRef,
250
250
  chartData: data,
251
251
  wrapLabels: tooltipConfig.wrapLabels,
@@ -253,7 +253,8 @@ export const LineChart = /*#__PURE__*/ forwardRef(function LineChart({ height ,
253
253
  unit: unit,
254
254
  onUnpinClick: ()=>{
255
255
  setTooltipPinnedCoords(null);
256
- }
256
+ },
257
+ containerId: chartsTheme.tooltipPortalContainerId
257
258
  }),
258
259
  /*#__PURE__*/ _jsx(EChart, {
259
260
  sx: {