@perses-dev/components 0.33.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/ContentWithLegend/ContentWithLegend.js +1 -1
  2. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  3. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +3 -3
  4. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  5. package/dist/ContentWithLegend/model/content-with-legend-model.js +12 -3
  6. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  7. package/dist/Drawer/Drawer.js +1 -1
  8. package/dist/Drawer/Drawer.js.map +1 -1
  9. package/dist/EChart/EChart.d.ts +2 -1
  10. package/dist/EChart/EChart.d.ts.map +1 -1
  11. package/dist/EChart/EChart.js +15 -3
  12. package/dist/EChart/EChart.js.map +1 -1
  13. package/dist/GaugeChart/GaugeChart.d.ts +1 -1
  14. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  15. package/dist/GaugeChart/GaugeChart.js +6 -3
  16. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  17. package/dist/Legend/CompactLegend.d.ts +1 -1
  18. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  19. package/dist/Legend/CompactLegend.js +1 -1
  20. package/dist/Legend/CompactLegend.js.map +1 -1
  21. package/dist/Legend/Legend.d.ts +8 -3
  22. package/dist/Legend/Legend.d.ts.map +1 -1
  23. package/dist/Legend/Legend.js +4 -3
  24. package/dist/Legend/Legend.js.map +1 -1
  25. package/dist/Legend/ListLegend.d.ts +1 -1
  26. package/dist/Legend/ListLegend.d.ts.map +1 -1
  27. package/dist/Legend/ListLegend.js +1 -1
  28. package/dist/Legend/ListLegend.js.map +1 -1
  29. package/dist/Legend/ListLegendItem.d.ts +1 -1
  30. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  31. package/dist/Legend/ListLegendItem.js.map +1 -1
  32. package/dist/Legend/TableLegend.d.ts +3 -2
  33. package/dist/Legend/TableLegend.d.ts.map +1 -1
  34. package/dist/Legend/TableLegend.js +10 -2
  35. package/dist/Legend/TableLegend.js.map +1 -1
  36. package/dist/Legend/index.d.ts +1 -0
  37. package/dist/Legend/index.d.ts.map +1 -1
  38. package/dist/Legend/index.js +1 -0
  39. package/dist/Legend/index.js.map +1 -1
  40. package/dist/Legend/legend-model.d.ts +24 -0
  41. package/dist/Legend/legend-model.d.ts.map +1 -0
  42. package/dist/Legend/legend-model.js +19 -0
  43. package/dist/Legend/legend-model.js.map +1 -0
  44. package/dist/LineChart/LineChart.d.ts +2 -1
  45. package/dist/LineChart/LineChart.d.ts.map +1 -1
  46. package/dist/LineChart/LineChart.js +3 -2
  47. package/dist/LineChart/LineChart.js.map +1 -1
  48. package/dist/LineChart/utils.js +1 -1
  49. package/dist/LineChart/utils.js.map +1 -1
  50. package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  51. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  52. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +36 -0
  53. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -0
  54. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +65 -0
  55. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -0
  56. package/dist/SettingsAutocomplete/index.d.ts +2 -0
  57. package/dist/SettingsAutocomplete/index.d.ts.map +1 -0
  58. package/dist/{LegendOptionsEditor → SettingsAutocomplete}/index.js +1 -1
  59. package/dist/SettingsAutocomplete/index.js.map +1 -0
  60. package/dist/StatChart/StatChart.d.ts +2 -1
  61. package/dist/StatChart/StatChart.d.ts.map +1 -1
  62. package/dist/StatChart/StatChart.js +74 -21
  63. package/dist/StatChart/StatChart.js.map +1 -1
  64. package/dist/StatChart/calculateFontSize.d.ts +14 -0
  65. package/dist/StatChart/calculateFontSize.d.ts.map +1 -0
  66. package/dist/StatChart/calculateFontSize.js +47 -0
  67. package/dist/StatChart/calculateFontSize.js.map +1 -0
  68. package/dist/Table/Table.js +1 -1
  69. package/dist/Table/Table.js.map +1 -1
  70. package/dist/Table/TableCell.d.ts +6 -3
  71. package/dist/Table/TableCell.d.ts.map +1 -1
  72. package/dist/Table/TableCell.js +5 -2
  73. package/dist/Table/TableCell.js.map +1 -1
  74. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  75. package/dist/Table/VirtualizedTable.js +11 -5
  76. package/dist/Table/VirtualizedTable.js.map +1 -1
  77. package/dist/Table/model/table-model.d.ts +16 -2
  78. package/dist/Table/model/table-model.d.ts.map +1 -1
  79. package/dist/Table/model/table-model.js +18 -7
  80. package/dist/Table/model/table-model.js.map +1 -1
  81. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  82. package/dist/TimeSeriesTooltip/nearby-series.js +4 -2
  83. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  84. package/dist/UnitSelector/UnitSelector.d.ts.map +1 -1
  85. package/dist/UnitSelector/UnitSelector.js +10 -22
  86. package/dist/UnitSelector/UnitSelector.js.map +1 -1
  87. package/dist/YAxisLabel.js +1 -1
  88. package/dist/YAxisLabel.js.map +1 -1
  89. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +1 -1
  90. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +13 -4
  91. package/dist/cjs/Drawer/Drawer.js +1 -1
  92. package/dist/cjs/EChart/EChart.js +22 -5
  93. package/dist/cjs/GaugeChart/GaugeChart.js +6 -3
  94. package/dist/cjs/Legend/CompactLegend.js +2 -2
  95. package/dist/cjs/Legend/Legend.js +5 -4
  96. package/dist/cjs/Legend/ListLegend.js +2 -2
  97. package/dist/cjs/Legend/TableLegend.js +10 -2
  98. package/dist/cjs/Legend/index.js +1 -0
  99. package/dist/cjs/Legend/legend-model.js +25 -0
  100. package/dist/cjs/LineChart/LineChart.js +3 -2
  101. package/dist/cjs/LineChart/utils.js +7 -2
  102. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  103. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +66 -0
  104. package/dist/cjs/{LegendOptionsEditor → SettingsAutocomplete}/index.js +1 -1
  105. package/dist/cjs/StatChart/StatChart.js +79 -21
  106. package/dist/cjs/StatChart/calculateFontSize.js +51 -0
  107. package/dist/cjs/Table/Table.js +1 -1
  108. package/dist/cjs/Table/TableCell.js +5 -2
  109. package/dist/cjs/Table/VirtualizedTable.js +11 -5
  110. package/dist/cjs/Table/model/table-model.js +18 -7
  111. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +4 -2
  112. package/dist/cjs/UnitSelector/UnitSelector.js +9 -21
  113. package/dist/cjs/YAxisLabel.js +1 -1
  114. package/dist/cjs/index.js +1 -1
  115. package/dist/cjs/model/index.js +0 -1
  116. package/dist/cjs/utils/theme-gen.js +7 -2
  117. package/dist/index.d.ts +1 -1
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +1 -1
  120. package/dist/index.js.map +1 -1
  121. package/dist/model/graph.d.ts +1 -1
  122. package/dist/model/graph.d.ts.map +1 -1
  123. package/dist/model/graph.js.map +1 -1
  124. package/dist/model/index.d.ts +0 -1
  125. package/dist/model/index.d.ts.map +1 -1
  126. package/dist/model/index.js +0 -1
  127. package/dist/model/index.js.map +1 -1
  128. package/dist/model/theme.d.ts +3 -2
  129. package/dist/model/theme.d.ts.map +1 -1
  130. package/dist/model/theme.js.map +1 -1
  131. package/dist/utils/theme-gen.js +1 -1
  132. package/dist/utils/theme-gen.js.map +1 -1
  133. package/package.json +4 -4
  134. package/dist/LegendOptionsEditor/LegendOptionsEditor.d.ts +0 -8
  135. package/dist/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +0 -1
  136. package/dist/LegendOptionsEditor/LegendOptionsEditor.js +0 -109
  137. package/dist/LegendOptionsEditor/LegendOptionsEditor.js.map +0 -1
  138. package/dist/LegendOptionsEditor/index.d.ts +0 -2
  139. package/dist/LegendOptionsEditor/index.d.ts.map +0 -1
  140. package/dist/LegendOptionsEditor/index.js.map +0 -1
  141. package/dist/cjs/LegendOptionsEditor/LegendOptionsEditor.js +0 -115
  142. package/dist/cjs/model/legend.js +0 -102
  143. package/dist/model/legend.d.ts +0 -36
  144. package/dist/model/legend.d.ts.map +0 -1
  145. package/dist/model/legend.js +0 -81
  146. package/dist/model/legend.js.map +0 -1
@@ -107,7 +107,8 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
107
107
  children: headers.map((headerGroup)=>{
108
108
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableRow.TableRow, {
109
109
  density: density,
110
- children: headerGroup.headers.map((header, i)=>{
110
+ children: headerGroup.headers.map((header, i, headers)=>{
111
+ var ref;
111
112
  const column = header.column;
112
113
  const position = {
113
114
  row: 0,
@@ -115,10 +116,13 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
115
116
  };
116
117
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCell.TableCell, {
117
118
  width: column.getSize() || 'auto',
119
+ align: (ref = column.columnDef.meta) === null || ref === void 0 ? void 0 : ref.align,
118
120
  variant: "head",
119
121
  density: density,
120
122
  focusState: getFocusState(position),
121
123
  onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
124
+ isFirstColumn: i === 0,
125
+ isLastColumn: i === headers.length - 1,
122
126
  children: (0, _reactTable.flexRender)(column.columnDef.header, header.getContext())
123
127
  }, header.id);
124
128
  })
@@ -132,19 +136,21 @@ function VirtualizedTable({ width , height , density , onRowClick , rows , colum
132
136
  return null;
133
137
  }
134
138
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
135
- children: row.getVisibleCells().map((cell, i)=>{
139
+ children: row.getVisibleCells().map((cell, i, cells)=>{
140
+ var ref;
136
141
  const position = {
137
142
  // Add 1 to the row index because the header is row 0
138
143
  row: index + 1,
139
144
  column: i
140
145
  };
141
146
  return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableCell.TableCell, {
142
- sx: {
143
- width: cell.column.getSize() || 'auto'
144
- },
147
+ width: cell.column.getSize() || 'auto',
148
+ align: (ref = cell.column.columnDef.meta) === null || ref === void 0 ? void 0 : ref.align,
145
149
  density: density,
146
150
  focusState: getFocusState(position),
147
151
  onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
152
+ isFirstColumn: i === 0,
153
+ isLastColumn: i === cells.length - 1,
148
154
  children: (0, _reactTable.flexRender)(cell.column.columnDef.cell, cell.getContext())
149
155
  }, cell.id);
150
156
  })
@@ -31,13 +31,16 @@ function calculateTableCellHeight(lineHeight, paddingY) {
31
31
  const verticalPaddingNum = typeof paddingY === 'string' ? parseInt(paddingY, 10) : paddingY;
32
32
  return lineHeightNum + verticalPaddingNum * 2;
33
33
  }
34
- function getTableCellLayout(theme, density) {
34
+ function getTableCellLayout(theme, density, { isLastColumn , isFirstColumn } = {}) {
35
35
  if (density === 'compact') {
36
36
  const paddingY = theme.spacing(0.5);
37
- const paddingX = theme.spacing(0.25);
37
+ const basePaddingX = theme.spacing(0.5);
38
+ const edgePaddingX = theme.spacing(1);
39
+ const paddingLeft = isFirstColumn ? edgePaddingX : basePaddingX;
40
+ const paddingRight = isLastColumn ? edgePaddingX : basePaddingX;
38
41
  const lineHeight = theme.typography.body2.lineHeight;
39
42
  return {
40
- padding: `${paddingY} ${paddingX}`,
43
+ padding: `${paddingY} ${paddingRight} ${paddingY} ${paddingLeft}`,
41
44
  height: calculateTableCellHeight(lineHeight, paddingY),
42
45
  fontSize: theme.typography.body2.fontSize,
43
46
  lineHeight: lineHeight
@@ -45,17 +48,20 @@ function getTableCellLayout(theme, density) {
45
48
  }
46
49
  // standard density
47
50
  const paddingY1 = theme.spacing(1);
48
- const paddingX1 = theme.spacing(1.25);
51
+ const basePaddingX1 = theme.spacing(1.25);
52
+ const edgePaddingX1 = theme.spacing(2);
53
+ const paddingLeft1 = isFirstColumn ? edgePaddingX1 : basePaddingX1;
54
+ const paddingRight1 = isLastColumn ? edgePaddingX1 : basePaddingX1;
49
55
  const lineHeight1 = theme.typography.body1.lineHeight;
50
56
  return {
51
- padding: `${paddingY1} ${paddingX1}`,
57
+ padding: `${paddingY1} ${paddingRight1} ${paddingY1} ${paddingLeft1}`,
52
58
  height: calculateTableCellHeight(lineHeight1, paddingY1),
53
59
  fontSize: theme.typography.body1.fontSize,
54
60
  lineHeight: lineHeight1
55
61
  };
56
62
  }
57
63
  function persesColumnsToTanstackColumns(columns) {
58
- const tableCols = columns.map(({ width , ...otherProps })=>{
64
+ const tableCols = columns.map(({ width , align , ...otherProps })=>{
59
65
  // Tanstack Table does not support an "auto" value to naturally size to fit
60
66
  // the space in a table. We translate our custom "auto" setting to 0 size
61
67
  // for these columns, so it is easy to fall back to auto when rendering.
@@ -72,7 +78,12 @@ function persesColumnsToTanstackColumns(columns) {
72
78
  };
73
79
  const result = {
74
80
  ...otherProps,
75
- ...sizeProps
81
+ ...sizeProps,
82
+ // Open-ended store for extra metadata in TanStack Table, so you can bake
83
+ // in your own features.
84
+ meta: {
85
+ align
86
+ }
76
87
  };
77
88
  return result;
78
89
  });
@@ -117,14 +117,16 @@ function checkforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
117
117
  chart.dispatchAction({
118
118
  type: 'highlight',
119
119
  seriesIndex: emphasizedSeriesIndexes,
120
- notBlur: false
120
+ notBlur: false,
121
+ escapeConnect: true
121
122
  });
122
123
  } else {
123
124
  // When no emphasized series with bold text, notBlur allows opacity fadeout to not trigger.
124
125
  chart.dispatchAction({
125
126
  type: 'highlight',
126
127
  seriesIndex: nearbySeriesIndexes,
127
- notBlur: true
128
+ notBlur: true,
129
+ escapeConnect: true
128
130
  });
129
131
  }
130
132
  }
@@ -23,6 +23,7 @@ const _material = require("@mui/material");
23
23
  const _model = require("../model");
24
24
  const _utils = require("../model/units/utils");
25
25
  const _optionsEditorLayout = require("../OptionsEditorLayout");
26
+ const _settingsAutocomplete = require("../SettingsAutocomplete");
26
27
  const KIND_OPTIONS = Object.entries(_model.UNIT_CONFIG).map(([id, config])=>{
27
28
  return {
28
29
  id: id,
@@ -31,26 +32,32 @@ const KIND_OPTIONS = Object.entries(_model.UNIT_CONFIG).map(([id, config])=>{
31
32
  }).filter((config)=>!config.disableSelectorOption);
32
33
  const DECIMAL_PLACES_OPTIONS = [
33
34
  {
35
+ id: 'default',
34
36
  label: 'Default',
35
37
  decimal_places: undefined
36
38
  },
37
39
  {
40
+ id: '0',
38
41
  label: '0',
39
42
  decimal_places: 0
40
43
  },
41
44
  {
45
+ id: '1',
42
46
  label: '1',
43
47
  decimal_places: 1
44
48
  },
45
49
  {
50
+ id: '2',
46
51
  label: '2',
47
52
  decimal_places: 2
48
53
  },
49
54
  {
55
+ id: '3',
50
56
  label: '3',
51
57
  decimal_places: 3
52
58
  },
53
59
  {
60
+ id: '4',
54
61
  label: '4',
55
62
  decimal_places: 4
56
63
  }
@@ -95,42 +102,23 @@ function UnitSelector({ value , onChange }) {
95
102
  }),
96
103
  /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
97
104
  label: "Unit",
98
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Autocomplete, {
105
+ control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_settingsAutocomplete.SettingsAutocomplete, {
99
106
  value: {
100
107
  id: value.kind,
101
108
  ...kindConfig
102
109
  },
103
110
  options: KIND_OPTIONS,
104
- isOptionEqualToValue: (option, value)=>option.id === value.id,
105
111
  groupBy: (option)=>option.group,
106
- renderInput: (params)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
107
- ...params
108
- }),
109
- renderOption: (renderOptsProps, option)=>{
110
- // Custom option needed to get some increased left padding to make
111
- // the items more distinct from the group label.
112
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)("li", {
113
- ...renderOptsProps,
114
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
115
- paddingLeft: (theme)=>theme.spacing(1),
116
- children: option.label
117
- })
118
- });
119
- },
120
112
  onChange: handleKindChange,
121
113
  disableClearable: true
122
114
  })
123
115
  }),
124
116
  /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
125
117
  label: "Decimals",
126
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Autocomplete, {
118
+ control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_settingsAutocomplete.SettingsAutocomplete, {
127
119
  value: getOptionByDecimalPlaces(value.decimal_places),
128
120
  options: DECIMAL_PLACES_OPTIONS,
129
121
  getOptionLabel: (o)=>o.label,
130
- isOptionEqualToValue: (option, value)=>option.label === value.label,
131
- renderInput: (params)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
132
- ...params
133
- }),
134
122
  onChange: handleDecimalPlacesChange,
135
123
  disabled: !hasDecimalPlaces,
136
124
  disableClearable: true
@@ -26,7 +26,7 @@ function YAxisLabel({ name , height }) {
26
26
  display: 'inline-block',
27
27
  maxWidth: height,
28
28
  position: 'absolute',
29
- top: '45%',
29
+ top: `calc(${height}px / 2)`,
30
30
  transform: 'translateX(-50%) rotate(-90deg)',
31
31
  transformOrigin: 'top',
32
32
  textAlign: 'center',
package/dist/cjs/index.js CHANGED
@@ -26,9 +26,9 @@ _exportStar(require("./GaugeChart"), exports);
26
26
  _exportStar(require("./InfoTooltip"), exports);
27
27
  _exportStar(require("./JSONEditor"), exports);
28
28
  _exportStar(require("./Legend"), exports);
29
- _exportStar(require("./LegendOptionsEditor"), exports);
30
29
  _exportStar(require("./LineChart"), exports);
31
30
  _exportStar(require("./OptionsEditorLayout"), exports);
31
+ _exportStar(require("./SettingsAutocomplete"), exports);
32
32
  _exportStar(require("./StatChart"), exports);
33
33
  _exportStar(require("./Table"), exports);
34
34
  _exportStar(require("./ThresholdsEditor"), exports);
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
17
  _exportStar(require("./graph"), exports);
18
- _exportStar(require("./legend"), exports);
19
18
  _exportStar(require("./theme"), exports);
20
19
  _exportStar(require("./units"), exports);
21
20
  function _exportStar(from, to) {
@@ -18,7 +18,12 @@ Object.defineProperty(exports, "generateChartsTheme", {
18
18
  enumerable: true,
19
19
  get: ()=>generateChartsTheme
20
20
  });
21
- const _lodashEs = require("lodash-es");
21
+ const _merge = /*#__PURE__*/ _interopRequireDefault(require("lodash/merge"));
22
+ function _interopRequireDefault(obj) {
23
+ return obj && obj.__esModule ? obj : {
24
+ default: obj
25
+ };
26
+ }
22
27
  const DEFAULT_TEXT_COLOR = '#222';
23
28
  function generateChartsTheme(muiTheme, echartsTheme) {
24
29
  var ref, ref1, ref2, ref3, ref4;
@@ -163,7 +168,7 @@ function generateChartsTheme(muiTheme, echartsTheme) {
163
168
  }
164
169
  };
165
170
  return {
166
- echartsTheme: (0, _lodashEs.merge)(muiConvertedTheme, echartsTheme),
171
+ echartsTheme: (0, _merge.default)(muiConvertedTheme, echartsTheme),
167
172
  noDataOption: {
168
173
  title: {
169
174
  show: true,
package/dist/index.d.ts CHANGED
@@ -10,9 +10,9 @@ export * from './GaugeChart';
10
10
  export * from './InfoTooltip';
11
11
  export * from './JSONEditor';
12
12
  export * from './Legend';
13
- export * from './LegendOptionsEditor';
14
13
  export * from './LineChart';
15
14
  export * from './OptionsEditorLayout';
15
+ export * from './SettingsAutocomplete';
16
16
  export * from './StatChart';
17
17
  export * from './Table';
18
18
  export * from './ThresholdsEditor';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAA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CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -22,9 +22,9 @@ export * from './GaugeChart';
22
22
  export * from './InfoTooltip';
23
23
  export * from './JSONEditor';
24
24
  export * from './Legend';
25
- export * from './LegendOptionsEditor';
26
25
  export * from './LineChart';
27
26
  export * from './OptionsEditorLayout';
27
+ export * from './SettingsAutocomplete';
28
28
  export * from './StatChart';
29
29
  export * from './Table';
30
30
  export * from './ThresholdsEditor';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './DateTimeRangePicker';\nexport * from './Dialog';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LegendOptionsEditor';\nexport * from './LineChart';\nexport * from './OptionsEditorLayout';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeSeriesTooltip';\nexport * from './UnitSelector';\nexport * from './YAxisLabel';\nexport * from './context/ChartsThemeProvider';\nexport * from './context/TimeZoneProvider';\nexport * from './context/SnackbarProvider';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './DateTimeRangePicker';\nexport * from './Dialog';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './OptionsEditorLayout';\nexport * from './SettingsAutocomplete';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeSeriesTooltip';\nexport * from './UnitSelector';\nexport * from './YAxisLabel';\nexport * from './context/ChartsThemeProvider';\nexport * from './context/TimeZoneProvider';\nexport * from './context/SnackbarProvider';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { TimeSeriesValueTuple } from '@perses-dev/core';
2
2
  import { LineSeriesOption } from 'echarts/charts';
3
- import { LegendItem } from './legend';
3
+ import { LegendItem } from '../Legend';
4
4
  export declare const OPTIMIZED_MODE_SERIES_LIMIT = 1000;
5
5
  export declare type UnixTimeMs = number;
6
6
  export interface GraphSeries {
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/model/graph.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,oBAAY,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC;AAED,oBAAY,aAAa,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC;AAEhD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAEvE,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/model/graph.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,oBAAY,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC;AAED,oBAAY,aAAa,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC;AAEhD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAEvE,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/graph.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TimeSeriesValueTuple } from '@perses-dev/core';\nimport { LineSeriesOption } from 'echarts/charts';\nimport { LegendItem } from './legend';\n\n// adjust display when there are many time series to help with performance\nexport const OPTIMIZED_MODE_SERIES_LIMIT = 1000;\n\nexport type UnixTimeMs = number;\n\nexport interface GraphSeries {\n name: string;\n values: TimeSeriesValueTuple[];\n}\n\nexport type EChartsValues = number | null | '-';\n\nexport interface EChartsTimeSeries extends Omit<LineSeriesOption, 'data'> {\n // TODO: support dataset and both category / time xAxis types\n data: EChartsValues[];\n}\n\nexport type EChartsDataFormat = {\n timeSeries: EChartsTimeSeries[];\n xAxis: number[];\n legendItems?: LegendItem[];\n xAxisMax?: number | string;\n rangeMs?: number;\n};\n"],"names":["OPTIMIZED_MODE_SERIES_LIMIT"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAMjC,0EAA0E;AAC1E,OAAO,MAAMA,2BAA2B,GAAG,IAAI,CAAC"}
1
+ {"version":3,"sources":["../../src/model/graph.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TimeSeriesValueTuple } from '@perses-dev/core';\nimport { LineSeriesOption } from 'echarts/charts';\nimport { LegendItem } from '../Legend';\n\n// adjust display when there are many time series to help with performance\nexport const OPTIMIZED_MODE_SERIES_LIMIT = 1000;\n\nexport type UnixTimeMs = number;\n\nexport interface GraphSeries {\n name: string;\n values: TimeSeriesValueTuple[];\n}\n\nexport type EChartsValues = number | null | '-';\n\nexport interface EChartsTimeSeries extends Omit<LineSeriesOption, 'data'> {\n // TODO: support dataset and both category / time xAxis types\n data: EChartsValues[];\n}\n\nexport type EChartsDataFormat = {\n timeSeries: EChartsTimeSeries[];\n xAxis: number[];\n legendItems?: LegendItem[];\n xAxisMax?: number | string;\n rangeMs?: number;\n};\n"],"names":["OPTIMIZED_MODE_SERIES_LIMIT"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAMjC,0EAA0E;AAC1E,OAAO,MAAMA,2BAA2B,GAAG,IAAI,CAAC"}
@@ -1,5 +1,4 @@
1
1
  export * from './graph';
2
- export * from './legend';
3
2
  export * from './theme';
4
3
  export * from './units';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -11,7 +11,6 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  export * from './graph';
14
- export * from './legend';
15
14
  export * from './theme';
16
15
  export * from './units';
17
16
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './graph';\nexport * from './legend';\nexport * from './theme';\nexport * from './units';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"sources":["../../src/model/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './graph';\nexport * from './theme';\nexport * from './units';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { EChartsOption, EChartsCoreOption, BarSeriesOption, LineSeriesOption, GaugeSeriesOption } from 'echarts';
1
+ import type { EChartsOption, BarSeriesOption, LineSeriesOption, GaugeSeriesOption, TitleComponentOption, ComposeOption, XAXisComponentOption, YAXisComponentOption } from 'echarts';
2
2
  export interface PersesChartsTheme {
3
3
  echartsTheme: EChartsTheme;
4
- noDataOption: EChartsCoreOption;
4
+ noDataOption: NoDataOption;
5
5
  sparkline: {
6
6
  width: number;
7
7
  color: string;
@@ -28,4 +28,5 @@ export interface ThresholdColorPalette {
28
28
  defaultColor: string;
29
29
  palette: string[];
30
30
  }
31
+ export declare type NoDataOption = ComposeOption<TitleComponentOption | XAXisComponentOption | YAXisComponentOption>;
31
32
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/model/theme.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEtH,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,iBAAiB,CAAC;IAChC,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,OAAO,EAAE;YACP,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;IACF,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAGD,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/model/theme.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,OAAO,EAAE;YACP,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;IACF,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAGD,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,oBAAY,YAAY,GAAG,aAAa,CAAC,oBAAoB,GAAG,oBAAoB,GAAG,oBAAoB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { EChartsOption, EChartsCoreOption, BarSeriesOption, LineSeriesOption, GaugeSeriesOption } from 'echarts';\n\nexport interface PersesChartsTheme {\n echartsTheme: EChartsTheme;\n noDataOption: EChartsCoreOption;\n sparkline: {\n width: number;\n color: string;\n };\n /**\n * Theming for the container that wraps a chart.\n */\n container: {\n /**\n * Padding in pixels.\n */\n padding: {\n default: number;\n };\n };\n thresholds: ThresholdColorPalette;\n}\n\n// https://github.com/apache/echarts/issues/12489#issuecomment-643185207\nexport interface EChartsTheme extends EChartsOption {\n bar?: BarSeriesOption;\n line?: LineSeriesOption;\n gauge?: GaugeSeriesOption;\n}\n\nexport interface ThresholdColorPalette {\n defaultColor: string;\n palette: string[];\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WAiCC"}
1
+ {"version":3,"sources":["../../src/model/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type {\n EChartsOption,\n BarSeriesOption,\n LineSeriesOption,\n GaugeSeriesOption,\n TitleComponentOption,\n ComposeOption,\n XAXisComponentOption,\n YAXisComponentOption,\n} from 'echarts';\n\nexport interface PersesChartsTheme {\n echartsTheme: EChartsTheme;\n noDataOption: NoDataOption;\n sparkline: {\n width: number;\n color: string;\n };\n /**\n * Theming for the container that wraps a chart.\n */\n container: {\n /**\n * Padding in pixels.\n */\n padding: {\n default: number;\n };\n };\n thresholds: ThresholdColorPalette;\n}\n\n// https://github.com/apache/echarts/issues/12489#issuecomment-643185207\nexport interface EChartsTheme extends EChartsOption {\n bar?: BarSeriesOption;\n line?: LineSeriesOption;\n gauge?: GaugeSeriesOption;\n}\n\nexport interface ThresholdColorPalette {\n defaultColor: string;\n palette: string[];\n}\n\nexport type NoDataOption = ComposeOption<TitleComponentOption | XAXisComponentOption | YAXisComponentOption>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WA4C6G"}
@@ -10,7 +10,7 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import { merge } from 'lodash-es';
13
+ import merge from 'lodash/merge';
14
14
  const DEFAULT_TEXT_COLOR = '#222';
15
15
  export function generateChartsTheme(muiTheme, echartsTheme) {
16
16
  var ref, ref1, ref2, ref3, ref4;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/theme-gen.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport { merge } from 'lodash-es';\nimport { EChartsTheme, PersesChartsTheme } from '../model';\n\nconst DEFAULT_TEXT_COLOR = '#222';\n\n// avoid component override type errors since only palette and typography are used\ntype MuiTheme = Omit<Theme, 'components'>;\n\nexport function generateChartsTheme(muiTheme: MuiTheme, echartsTheme: EChartsTheme): PersesChartsTheme {\n const primaryTextColor = muiTheme.palette.text?.primary ?? DEFAULT_TEXT_COLOR;\n\n const muiConvertedTheme: EChartsTheme = {\n title: {\n show: false,\n },\n textStyle: {\n color: primaryTextColor,\n fontFamily: muiTheme.typography.fontFamily,\n fontSize: 12,\n },\n grid: {\n top: 5,\n right: 20,\n bottom: 0,\n left: 20,\n containLabel: true,\n },\n // Accessible categorical palette from: https://davidmathlogic.com/colorblind\n color: [\n '#56B4E9', // lt blue\n '#009E73', // med green\n '#0072B2', // dk blue\n '#CC79A7', // lt purple\n '#F0E442', // yellow\n '#E69F00', // orange\n '#D55E00', // red\n ],\n categoryAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.6,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n valueAxis: {\n show: true,\n axisLabel: {\n color: primaryTextColor,\n margin: 12,\n },\n axisLine: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.6,\n },\n },\n },\n legend: {\n orient: 'horizontal',\n textStyle: {\n color: primaryTextColor,\n },\n pageTextStyle: {\n color: muiTheme.palette.grey[600],\n },\n pageIconColor: muiTheme?.palette?.action?.active,\n pageIconInactiveColor: muiTheme?.palette?.action?.disabled,\n },\n toolbox: {\n show: true,\n top: 10,\n right: 10,\n iconStyle: {\n borderColor: primaryTextColor,\n },\n },\n tooltip: {},\n line: {\n showSymbol: false,\n symbol: 'circle',\n symbolSize: 4,\n smooth: false,\n lineStyle: {\n width: 1,\n },\n emphasis: {\n lineStyle: {\n width: 1.5,\n },\n },\n },\n bar: {\n barMaxWidth: 150,\n itemStyle: {\n borderWidth: 0,\n borderColor: muiTheme.palette.grey[300],\n },\n },\n gauge: {\n detail: {\n fontSize: 18,\n fontWeight: 600,\n valueAnimation: false,\n },\n splitLine: {\n distance: 0,\n length: 4,\n lineStyle: {\n width: 1,\n },\n },\n splitNumber: 12,\n },\n };\n\n return {\n echartsTheme: merge(muiConvertedTheme, echartsTheme),\n noDataOption: {\n title: {\n show: true,\n textStyle: {\n color: primaryTextColor,\n fontSize: 16,\n fontWeight: 400,\n },\n text: 'No data',\n left: 'center',\n top: 'center',\n },\n xAxis: {\n show: false,\n },\n yAxis: {\n show: false,\n },\n },\n sparkline: {\n width: 2,\n color: '#1976d2',\n },\n container: {\n padding: {\n default: parseInt(muiTheme.spacing(1.5), 10),\n },\n },\n thresholds: {\n defaultColor: muiTheme.palette.success.main,\n palette: ['#FFCC00', muiTheme.palette.warning.main, muiTheme.palette.error.main],\n },\n };\n}\n"],"names":["merge","DEFAULT_TEXT_COLOR","generateChartsTheme","muiTheme","echartsTheme","primaryTextColor","palette","text","primary","muiConvertedTheme","title","show","textStyle","color","fontFamily","typography","fontSize","grid","top","right","bottom","left","containLabel","categoryAxis","axisLabel","margin","axisTick","length","lineStyle","grey","axisLine","splitLine","width","opacity","splitArea","areaStyle","valueAxis","legend","orient","pageTextStyle","pageIconColor","action","active","pageIconInactiveColor","disabled","toolbox","iconStyle","borderColor","tooltip","line","showSymbol","symbol","symbolSize","smooth","emphasis","bar","barMaxWidth","itemStyle","borderWidth","gauge","detail","fontWeight","valueAnimation","distance","splitNumber","noDataOption","xAxis","yAxis","sparkline","container","padding","default","parseInt","spacing","thresholds","defaultColor","success","main","warning","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;AAGjC,SAASA,KAAK,QAAQ,WAAW,CAAC;AAGlC,MAAMC,kBAAkB,GAAG,MAAM,AAAC;AAKlC,OAAO,SAASC,mBAAmB,CAACC,QAAkB,EAAEC,YAA0B,EAAqB;QAC5ED,GAAqB,EAyF3BA,IAA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,SAAS,EAAE;oBACTC,KAAK,EAAER,gBAAgB;oBACvBW,QAAQ,EAAE,EAAE;oBACZ6C,UAAU,EAAE,GAAG;iBAChB;gBACDtD,IAAI,EAAE,SAAS;gBACfc,IAAI,EAAE,QAAQ;gBACdH,GAAG,EAAE,QAAQ;aACd;YACDgD,KAAK,EAAE;gBACLvD,IAAI,EAAE,KAAK;aACZ;YACDwD,KAAK,EAAE;gBACLxD,IAAI,EAAE,KAAK;aACZ;SACF;QACDyD,SAAS,EAAE;YACTpC,KAAK,EAAE,CAAC;YACRnB,KAAK,EAAE,SAAS;SACjB;QACDwD,SAAS,EAAE;YACTC,OAAO,EAAE;gBACPC,OAAO,EAAEC,QAAQ,CAACrE,QAAQ,CAACsE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;aAC7C;SACF;QACDC,UAAU,EAAE;YACVC,YAAY,EAAExE,QAAQ,CAACG,OAAO,CAACsE,OAAO,CAACC,IAAI;YAC3CvE,OAAO,EAAE;gBAAC,SAAS;gBAAEH,QAAQ,CAACG,OAAO,CAACwE,OAAO,CAACD,IAAI;gBAAE1E,QAAQ,CAACG,OAAO,CAACyE,KAAK,CAACF,IAAI;aAAC;SACjF;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"sources":["../../src/utils/theme-gen.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport merge from 'lodash/merge';\nimport { EChartsTheme, PersesChartsTheme } from '../model';\n\nconst DEFAULT_TEXT_COLOR = '#222';\n\n// avoid component override type errors since only palette and typography are used\ntype MuiTheme = Omit<Theme, 'components'>;\n\nexport function generateChartsTheme(muiTheme: MuiTheme, echartsTheme: EChartsTheme): PersesChartsTheme {\n const primaryTextColor = muiTheme.palette.text?.primary ?? DEFAULT_TEXT_COLOR;\n\n const muiConvertedTheme: EChartsTheme = {\n title: {\n show: false,\n },\n textStyle: {\n color: primaryTextColor,\n fontFamily: muiTheme.typography.fontFamily,\n fontSize: 12,\n },\n grid: {\n top: 5,\n right: 20,\n bottom: 0,\n left: 20,\n containLabel: true,\n },\n // Accessible categorical palette from: https://davidmathlogic.com/colorblind\n color: [\n '#56B4E9', // lt blue\n '#009E73', // med green\n '#0072B2', // dk blue\n '#CC79A7', // lt purple\n '#F0E442', // yellow\n '#E69F00', // orange\n '#D55E00', // red\n ],\n categoryAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.6,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n valueAxis: {\n show: true,\n axisLabel: {\n color: primaryTextColor,\n margin: 12,\n },\n axisLine: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.6,\n },\n },\n },\n legend: {\n orient: 'horizontal',\n textStyle: {\n color: primaryTextColor,\n },\n pageTextStyle: {\n color: muiTheme.palette.grey[600],\n },\n pageIconColor: muiTheme?.palette?.action?.active,\n pageIconInactiveColor: muiTheme?.palette?.action?.disabled,\n },\n toolbox: {\n show: true,\n top: 10,\n right: 10,\n iconStyle: {\n borderColor: primaryTextColor,\n },\n },\n tooltip: {},\n line: {\n showSymbol: false,\n symbol: 'circle',\n symbolSize: 4,\n smooth: false,\n lineStyle: {\n width: 1,\n },\n emphasis: {\n lineStyle: {\n width: 1.5,\n },\n },\n },\n bar: {\n barMaxWidth: 150,\n itemStyle: {\n borderWidth: 0,\n borderColor: muiTheme.palette.grey[300],\n },\n },\n gauge: {\n detail: {\n fontSize: 18,\n fontWeight: 600,\n valueAnimation: false,\n },\n splitLine: {\n distance: 0,\n length: 4,\n lineStyle: {\n width: 1,\n },\n },\n splitNumber: 12,\n },\n };\n\n return {\n echartsTheme: merge(muiConvertedTheme, echartsTheme),\n noDataOption: {\n title: {\n show: true,\n textStyle: {\n color: primaryTextColor,\n fontSize: 16,\n fontWeight: 400,\n },\n text: 'No data',\n left: 'center',\n top: 'center',\n },\n xAxis: {\n show: false,\n },\n yAxis: {\n show: false,\n },\n },\n sparkline: {\n width: 2,\n color: '#1976d2',\n },\n container: {\n padding: {\n default: parseInt(muiTheme.spacing(1.5), 10),\n },\n },\n thresholds: {\n defaultColor: muiTheme.palette.success.main,\n palette: ['#FFCC00', muiTheme.palette.warning.main, muiTheme.palette.error.main],\n },\n };\n}\n"],"names":["merge","DEFAULT_TEXT_COLOR","generateChartsTheme","muiTheme","echartsTheme","primaryTextColor","palette","text","primary","muiConvertedTheme","title","show","textStyle","color","fontFamily","typography","fontSize","grid","top","right","bottom","left","containLabel","categoryAxis","axisLabel","margin","axisTick","length","lineStyle","grey","axisLine","splitLine","width","opacity","splitArea","areaStyle","valueAxis","legend","orient","pageTextStyle","pageIconColor","action","active","pageIconInactiveColor","disabled","toolbox","iconStyle","borderColor","tooltip","line","showSymbol","symbol","symbolSize","smooth","emphasis","bar","barMaxWidth","itemStyle","borderWidth","gauge","detail","fontWeight","valueAnimation","distance","splitNumber","noDataOption","xAxis","yAxis","sparkline","container","padding","default","parseInt","spacing","thresholds","defaultColor","success","main","warning","error"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;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M,EAAE,CAAC;gBACTC,SAAS,EAAE;oBACTI,KAAK,EAAE,CAAC;iBACT;aACF;YACDgC,WAAW,EAAE,EAAE;SAChB;KACF,AAAC;IAEF,OAAO;QACL5D,YAAY,EAAEJ,KAAK,CAACS,iBAAiB,EAAEL,YAAY,CAAC;QACpD6D,YAAY,EAAE;YACZvD,KAAK,EAAE;gBACLC,IAAI,EAAE,IAAI;gBACVC,SAAS,EAAE;oBACTC,KAAK,EAAER,gBAAgB;oBACvBW,QAAQ,EAAE,EAAE;oBACZ6C,UAAU,EAAE,GAAG;iBAChB;gBACDtD,IAAI,EAAE,SAAS;gBACfc,IAAI,EAAE,QAAQ;gBACdH,GAAG,EAAE,QAAQ;aACd;YACDgD,KAAK,EAAE;gBACLvD,IAAI,EAAE,KAAK;aACZ;YACDwD,KAAK,EAAE;gBACLxD,IAAI,EAAE,KAAK;aACZ;SACF;QACDyD,SAAS,EAAE;YACTpC,KAAK,EAAE,CAAC;YACRnB,KAAK,EAAE,SAAS;SACjB;QACDwD,SAAS,EAAE;YACTC,OAAO,EAAE;gBACPC,OAAO,EAAEC,QAAQ,CAACrE,QAAQ,CAACsE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;aAC7C;SACF;QACDC,UAAU,EAAE;YACVC,YAAY,EAAExE,QAAQ,CAACG,OAAO,CAACsE,OAAO,CAACC,IAAI;YAC3CvE,OAAO,EAAE;gBAAC,SAAS;gBAAEH,QAAQ,CAACG,OAAO,CAACwE,OAAO,CAACD,IAAI;gBAAE1E,QAAQ,CAACG,OAAO,CAACyE,KAAK,CAACF,IAAI;aAAC;SACjF;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/components",
3
- "version": "0.33.0",
3
+ "version": "0.35.0",
4
4
  "description": "Common UI components used across Perses features",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/perses/perses/blob/main/README.md",
@@ -36,13 +36,13 @@
36
36
  "@codemirror/lang-json": "^6.0.1",
37
37
  "@fontsource/lato": "^4.5.10",
38
38
  "@mui/x-date-pickers": "^5.0.0-beta.1",
39
- "@perses-dev/core": "0.33.0",
39
+ "@perses-dev/core": "0.35.0",
40
40
  "@tanstack/react-table": "^8.9.1",
41
41
  "@uiw/react-codemirror": "^4.19.1",
42
42
  "date-fns": "^2.28.0",
43
43
  "date-fns-tz": "^1.3.7",
44
44
  "echarts": "npm:echarts-nightly@5.5.0-dev.20230517",
45
- "lodash-es": "^4.17.21",
45
+ "lodash": "^4.17.21",
46
46
  "mathjs": "^10.6.4",
47
47
  "mdi-material-ui": "^7.4.0",
48
48
  "numbro": "^2.3.6",
@@ -51,7 +51,7 @@
51
51
  "react-virtuoso": "^4.3.6"
52
52
  },
53
53
  "devDependencies": {
54
- "@perses-dev/storybook": "0.33.0"
54
+ "@perses-dev/storybook": "0.35.0"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@mui/material": "^5.10.0",
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { LegendOptions } from '../model';
3
- export interface LegendOptionsEditorProps {
4
- value?: LegendOptions;
5
- onChange: (legend?: LegendOptions) => void;
6
- }
7
- export declare function LegendOptionsEditor({ value, onChange }: LegendOptionsEditorProps): JSX.Element;
8
- //# sourceMappingURL=LegendOptionsEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LegendOptionsEditor.d.ts","sourceRoot":"","sources":["../../src/LegendOptionsEditor/LegendOptionsEditor.tsx"],"names":[],"mappings":";AAeA,OAAO,EAKL,aAAa,EAId,MAAM,UAAU,CAAC;AAqBlB,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,wBAAwB,eAwEhF"}