@perses-dev/plugin-system 0.38.0 → 0.39.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 (57) hide show
  1. package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +74 -0
  2. package/dist/cjs/components/OptionsEditorRadios/index.js +28 -0
  3. package/dist/cjs/components/{OptionsEditorTabs/TabPanel.js → OptionsEditorTabPanel/OptionsEditorTabPanel.js} +3 -3
  4. package/dist/cjs/components/OptionsEditorTabPanel/index.js +28 -0
  5. package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +2 -2
  6. package/dist/cjs/components/index.js +1 -0
  7. package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +40 -28
  8. package/dist/cjs/runtime/DataQueriesProvider/model.js +57 -0
  9. package/dist/cjs/runtime/template-variables.js +62 -0
  10. package/dist/cjs/test/index.js +1 -0
  11. package/dist/cjs/test/mock-data.js +55 -0
  12. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +16 -0
  13. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -0
  14. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +68 -0
  15. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -0
  16. package/dist/components/OptionsEditorRadios/index.d.ts +2 -0
  17. package/dist/components/OptionsEditorRadios/index.d.ts.map +1 -0
  18. package/dist/components/OptionsEditorRadios/index.js +15 -0
  19. package/dist/components/OptionsEditorRadios/index.js.map +1 -0
  20. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +9 -0
  21. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.map +1 -0
  22. package/dist/components/{OptionsEditorTabs/TabPanel.js → OptionsEditorTabPanel/OptionsEditorTabPanel.js} +2 -2
  23. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -0
  24. package/dist/components/OptionsEditorTabPanel/index.d.ts +2 -0
  25. package/dist/components/OptionsEditorTabPanel/index.d.ts.map +1 -0
  26. package/dist/components/OptionsEditorTabPanel/index.js +15 -0
  27. package/dist/components/OptionsEditorTabPanel/index.js.map +1 -0
  28. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +2 -2
  29. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  30. package/dist/components/index.d.ts +1 -0
  31. package/dist/components/index.d.ts.map +1 -1
  32. package/dist/components/index.js +1 -0
  33. package/dist/components/index.js.map +1 -1
  34. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +5 -5
  35. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
  36. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +39 -27
  37. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  38. package/dist/runtime/DataQueriesProvider/model.d.ts +15 -11
  39. package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
  40. package/dist/runtime/DataQueriesProvider/model.js +47 -1
  41. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  42. package/dist/runtime/template-variables.d.ts +61 -2
  43. package/dist/runtime/template-variables.d.ts.map +1 -1
  44. package/dist/runtime/template-variables.js +63 -0
  45. package/dist/runtime/template-variables.js.map +1 -1
  46. package/dist/test/index.d.ts +1 -0
  47. package/dist/test/index.d.ts.map +1 -1
  48. package/dist/test/index.js +1 -0
  49. package/dist/test/index.js.map +1 -1
  50. package/dist/test/mock-data.d.ts +3 -0
  51. package/dist/test/mock-data.d.ts.map +1 -0
  52. package/dist/test/mock-data.js +49 -0
  53. package/dist/test/mock-data.js.map +1 -0
  54. package/package.json +4 -4
  55. package/dist/components/OptionsEditorTabs/TabPanel.d.ts +0 -9
  56. package/dist/components/OptionsEditorTabs/TabPanel.d.ts.map +0 -1
  57. package/dist/components/OptionsEditorTabs/TabPanel.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import { TimeSeriesData } from '@perses-dev/core';
2
+ export declare const MOCK_TIME_SERIES_DATA: TimeSeriesData;
3
+ //# sourceMappingURL=mock-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock-data.d.ts","sourceRoot":"","sources":["../../src/test/mock-data.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,qBAAqB,EAAE,cAsBnC,CAAC"}
@@ -0,0 +1,49 @@
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 const MOCK_TIME_SERIES_DATA = {
14
+ timeRange: {
15
+ start: new Date(1666625490000),
16
+ end: new Date(1666625535000)
17
+ },
18
+ stepMs: 24379,
19
+ series: [
20
+ {
21
+ name: 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"',
22
+ values: [
23
+ [
24
+ 1666479357903,
25
+ 0.27700745551584494
26
+ ],
27
+ [
28
+ 1666479382282,
29
+ 0.27701284657366565
30
+ ]
31
+ ]
32
+ },
33
+ {
34
+ name: 'device="/dev/vda15", env="demo", fstype="vfat", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/boot/efi"',
35
+ values: [
36
+ [
37
+ 1666479357903,
38
+ 0.08486496097624885
39
+ ],
40
+ [
41
+ 1666479382282,
42
+ 0.08486496097624885
43
+ ]
44
+ ]
45
+ }
46
+ ]
47
+ };
48
+
49
+ //# sourceMappingURL=mock-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/test/mock-data.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 { TimeSeriesData } from '@perses-dev/core';\n\nexport const MOCK_TIME_SERIES_DATA: TimeSeriesData = {\n timeRange: {\n start: new Date(1666625490000),\n end: new Date(1666625535000),\n },\n stepMs: 24379,\n series: [\n {\n name: 'device=\"/dev/vda1\", env=\"demo\", fstype=\"ext4\", instance=\"demo.do.prometheus.io:9100\", job=\"node\", mountpoint=\"/\"',\n values: [\n [1666479357903, 0.27700745551584494],\n [1666479382282, 0.27701284657366565],\n ],\n },\n {\n name: 'device=\"/dev/vda15\", env=\"demo\", fstype=\"vfat\", instance=\"demo.do.prometheus.io:9100\", job=\"node\", mountpoint=\"/boot/efi\"',\n values: [\n [1666479357903, 0.08486496097624885],\n [1666479382282, 0.08486496097624885],\n ],\n },\n ],\n};\n"],"names":["MOCK_TIME_SERIES_DATA","timeRange","start","Date","end","stepMs","series","name","values"],"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;AAIjC,OAAO,MAAMA,qBAAqB,GAAmB;IACnDC,SAAS,EAAE;QACTC,KAAK,EAAE,IAAIC,IAAI,CAAC,aAAa,CAAC;QAC9BC,GAAG,EAAE,IAAID,IAAI,CAAC,aAAa,CAAC;KAC7B;IACDE,MAAM,EAAE,KAAK;IACbC,MAAM,EAAE;QACN;YACEC,IAAI,EAAE,kHAAkH;YACxHC,MAAM,EAAE;gBACN;AAAC,iCAAa;AAAE,uCAAmB;iBAAC;gBACpC;AAAC,iCAAa;AAAE,uCAAmB;iBAAC;aACrC;SACF;QACD;YACED,IAAI,EAAE,2HAA2H;YACjIC,MAAM,EAAE;gBACN;AAAC,iCAAa;AAAE,uCAAmB;iBAAC;gBACpC;AAAC,iCAAa;AAAE,uCAAmB;iBAAC;aACrC;SACF;KACF;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/plugin-system",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "The plugin feature in Pereses",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/perses/perses/blob/main/README.md",
@@ -28,14 +28,14 @@
28
28
  "lint:fix": "eslint --fix src --ext .ts,.tsx"
29
29
  },
30
30
  "dependencies": {
31
- "@perses-dev/components": "0.38.0",
32
- "@perses-dev/core": "0.38.0",
31
+ "@perses-dev/components": "0.39.0",
32
+ "@perses-dev/core": "0.39.0",
33
33
  "immer": "^9.0.15",
34
34
  "use-immer": "^0.7.0",
35
35
  "use-query-params": "^2.1.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@perses-dev/storybook": "0.38.0"
38
+ "@perses-dev/storybook": "0.39.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@mui/material": "^5.10.0",
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- interface TabPanelProps {
3
- children: React.ReactNode;
4
- index: number;
5
- value: number;
6
- }
7
- export declare function TabPanel(props: TabPanelProps): JSX.Element;
8
- export {};
9
- //# sourceMappingURL=TabPanel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabPanel.d.ts","sourceRoot":"","sources":["../../../src/components/OptionsEditorTabs/TabPanel.tsx"],"names":[],"mappings":";AAeA,UAAU,aAAa;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,eAgB5C"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/OptionsEditorTabs/TabPanel.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 { Box } from '@mui/material';\n\ninterface TabPanelProps {\n children: React.ReactNode;\n index: number;\n value: number;\n}\n\nexport function TabPanel(props: TabPanelProps) {\n const { children, value, index, ...other } = props;\n\n const isActive = value === index;\n\n return (\n <div\n role=\"tabpanel\"\n hidden={!isActive}\n id={`options-editor-tabpanel-${index}`}\n aria-labelledby={`options-editor-tab-${index}`}\n {...other}\n >\n {isActive && <Box mt={2}>{children}</Box>}\n </div>\n );\n}\n"],"names":["Box","TabPanel","props","children","value","index","other","isActive","div","role","hidden","id","aria-labelledby","mt"],"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,GAAG,QAAQ,eAAe,CAAC;AAQpC,OAAO,SAASC,QAAQ,CAACC,KAAoB,EAAE;IAC7C,MAAM,EAAEC,QAAQ,CAAA,EAAEC,KAAK,CAAA,EAAEC,KAAK,CAAA,EAAE,GAAGC,KAAK,EAAE,GAAGJ,KAAK,AAAC;IAEnD,MAAMK,QAAQ,GAAGH,KAAK,KAAKC,KAAK,AAAC;IAEjC,qBACE,KAACG,KAAG;QACFC,IAAI,EAAC,UAAU;QACfC,MAAM,EAAE,CAACH,QAAQ;QACjBI,EAAE,EAAE,CAAC,wBAAwB,EAAEN,KAAK,CAAC,CAAC;QACtCO,iBAAe,EAAE,CAAC,mBAAmB,EAAEP,KAAK,CAAC,CAAC;QAC7C,GAAGC,KAAK;kBAERC,QAAQ,kBAAI,KAACP,GAAG;YAACa,EAAE,EAAE,CAAC;sBAAGV,QAAQ;UAAO;MACrC,CACN;AACJ,CAAC"}