@perses-dev/components 0.34.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 (47) hide show
  1. package/dist/Drawer/Drawer.js +1 -1
  2. package/dist/Drawer/Drawer.js.map +1 -1
  3. package/dist/GaugeChart/GaugeChart.d.ts +1 -1
  4. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  5. package/dist/GaugeChart/GaugeChart.js +6 -3
  6. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  7. package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  8. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  9. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +36 -0
  10. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -0
  11. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +65 -0
  12. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -0
  13. package/dist/SettingsAutocomplete/index.d.ts +2 -0
  14. package/dist/SettingsAutocomplete/index.d.ts.map +1 -0
  15. package/dist/SettingsAutocomplete/index.js +15 -0
  16. package/dist/SettingsAutocomplete/index.js.map +1 -0
  17. package/dist/StatChart/StatChart.d.ts +2 -1
  18. package/dist/StatChart/StatChart.d.ts.map +1 -1
  19. package/dist/StatChart/StatChart.js +73 -20
  20. package/dist/StatChart/StatChart.js.map +1 -1
  21. package/dist/StatChart/calculateFontSize.d.ts +14 -0
  22. package/dist/StatChart/calculateFontSize.d.ts.map +1 -0
  23. package/dist/StatChart/calculateFontSize.js +47 -0
  24. package/dist/StatChart/calculateFontSize.js.map +1 -0
  25. package/dist/UnitSelector/UnitSelector.d.ts.map +1 -1
  26. package/dist/UnitSelector/UnitSelector.js +10 -22
  27. package/dist/UnitSelector/UnitSelector.js.map +1 -1
  28. package/dist/YAxisLabel.js +1 -1
  29. package/dist/YAxisLabel.js.map +1 -1
  30. package/dist/cjs/Drawer/Drawer.js +1 -1
  31. package/dist/cjs/GaugeChart/GaugeChart.js +6 -3
  32. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  33. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +66 -0
  34. package/dist/cjs/SettingsAutocomplete/index.js +28 -0
  35. package/dist/cjs/StatChart/StatChart.js +72 -19
  36. package/dist/cjs/StatChart/calculateFontSize.js +51 -0
  37. package/dist/cjs/UnitSelector/UnitSelector.js +9 -21
  38. package/dist/cjs/YAxisLabel.js +1 -1
  39. package/dist/cjs/index.js +1 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +1 -0
  43. package/dist/index.js.map +1 -1
  44. package/dist/model/theme.d.ts +3 -2
  45. package/dist/model/theme.d.ts.map +1 -1
  46. package/dist/model/theme.js.map +1 -1
  47. package/package.json +3 -3
@@ -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
@@ -28,6 +28,7 @@ _exportStar(require("./JSONEditor"), exports);
28
28
  _exportStar(require("./Legend"), exports);
29
29
  _exportStar(require("./LineChart"), exports);
30
30
  _exportStar(require("./OptionsEditorLayout"), exports);
31
+ _exportStar(require("./SettingsAutocomplete"), exports);
31
32
  _exportStar(require("./StatChart"), exports);
32
33
  _exportStar(require("./Table"), exports);
33
34
  _exportStar(require("./ThresholdsEditor"), exports);
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './JSONEditor';
12
12
  export * from './Legend';
13
13
  export * from './LineChart';
14
14
  export * from './OptionsEditorLayout';
15
+ export * from './SettingsAutocomplete';
15
16
  export * from './StatChart';
16
17
  export * from './Table';
17
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,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,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,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ export * from './JSONEditor';
24
24
  export * from './Legend';
25
25
  export * from './LineChart';
26
26
  export * from './OptionsEditorLayout';
27
+ export * from './SettingsAutocomplete';
27
28
  export * from './StatChart';
28
29
  export * from './Table';
29
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 './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,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,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/components",
3
- "version": "0.34.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,7 +36,7 @@
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.34.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",
@@ -51,7 +51,7 @@
51
51
  "react-virtuoso": "^4.3.6"
52
52
  },
53
53
  "devDependencies": {
54
- "@perses-dev/storybook": "0.34.0"
54
+ "@perses-dev/storybook": "0.35.0"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@mui/material": "^5.10.0",