@perses-dev/table-plugin 0.6.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.
- package/LICENSE +201 -0
- package/README.md +41 -0
- package/__mf/css/async/2341.cbbd94a8.css +1 -0
- package/__mf/css/async/5263.cbbd94a8.css +1 -0
- package/__mf/css/async/6759.cbbd94a8.css +1 -0
- package/__mf/css/async/8433.cbbd94a8.css +1 -0
- package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
- package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
- package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
- package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
- package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
- package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
- package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
- package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
- package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
- package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
- package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
- package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
- package/__mf/js/6487.f255ba88.js +5 -0
- package/__mf/js/Table.510470af.js +5 -0
- package/__mf/js/async/1620.ed8d9b3d.js +2 -0
- package/__mf/js/async/1620.ed8d9b3d.js.LICENSE.txt +9 -0
- package/__mf/js/async/1640.ff18956a.js +1 -0
- package/__mf/js/async/1722.586085f2.js +1 -0
- package/__mf/js/async/1964.979a7101.js +2 -0
- package/__mf/js/async/1964.979a7101.js.LICENSE.txt +9 -0
- package/__mf/js/async/1996.e0e5fb2a.js +2 -0
- package/__mf/js/async/1996.e0e5fb2a.js.LICENSE.txt +24 -0
- package/__mf/js/async/232.ab228ab3.js +1 -0
- package/__mf/js/async/2399.8ceb88c6.js +23 -0
- package/__mf/js/async/2641.78a9e888.js +1 -0
- package/__mf/js/async/2651.7c8030f0.js +1 -0
- package/__mf/js/async/3001.51d0062c.js +1 -0
- package/__mf/js/async/3224.fbb884ab.js +1 -0
- package/__mf/js/async/3598.66df4cef.js +1 -0
- package/__mf/js/async/3660.4a5855e1.js +23 -0
- package/__mf/js/async/3893.f1c71cae.js +1 -0
- package/__mf/js/async/3960.c992ac30.js +2 -0
- package/__mf/js/async/3960.c992ac30.js.LICENSE.txt +8 -0
- package/__mf/js/async/4062.0dd7dc24.js +1 -0
- package/__mf/js/async/4075.4fb81a28.js +1 -0
- package/__mf/js/async/4238.e22a8e1b.js +1 -0
- package/__mf/js/async/4446.9a215492.js +1 -0
- package/__mf/js/async/468.cca77551.js +110 -0
- package/__mf/js/async/468.cca77551.js.LICENSE.txt +27 -0
- package/__mf/js/async/4741.ceabfbaa.js +38 -0
- package/__mf/js/async/52.77f8a241.js +2 -0
- package/__mf/js/async/52.77f8a241.js.LICENSE.txt +37 -0
- package/__mf/js/async/5214.19ee9ad8.js +1 -0
- package/__mf/js/async/5377.05ab91aa.js +1 -0
- package/__mf/js/async/5409.3c667e6d.js +1 -0
- package/__mf/js/async/5662.d6ae2721.js +1 -0
- package/__mf/js/async/5767.6be60775.js +1 -0
- package/__mf/js/async/5912.b68e4631.js +1 -0
- package/__mf/js/async/5981.95116879.js +2 -0
- package/__mf/js/async/5981.95116879.js.LICENSE.txt +8 -0
- package/__mf/js/async/5998.ac755fc8.js +73 -0
- package/__mf/js/async/5998.ac755fc8.js.LICENSE.txt +19 -0
- package/__mf/js/async/6292.20be7eae.js +1 -0
- package/__mf/js/async/6333.35401612.js +2 -0
- package/__mf/js/async/6333.35401612.js.LICENSE.txt +9 -0
- package/__mf/js/async/654.fd64ef4b.js +1 -0
- package/__mf/js/async/6757.5675a614.js +7 -0
- package/__mf/js/async/6757.5675a614.js.LICENSE.txt +21 -0
- package/__mf/js/async/6770.84690346.js +1 -0
- package/__mf/js/async/6884.5426473f.js +1 -0
- package/__mf/js/async/694.4b146780.js +1 -0
- package/__mf/js/async/738.e2fbbd72.js +1 -0
- package/__mf/js/async/7606.4ba8e3ec.js +1 -0
- package/__mf/js/async/7740.dcade8b6.js +1 -0
- package/__mf/js/async/8444.d0d247d8.js +1 -0
- package/__mf/js/async/8488.d5eddfc6.js +1 -0
- package/__mf/js/async/8807.f0e4209b.js +1 -0
- package/__mf/js/async/894.1c4bbdb5.js +1 -0
- package/__mf/js/async/9010.8332598b.js +1 -0
- package/__mf/js/async/9173.00408de3.js +2 -0
- package/__mf/js/async/9173.00408de3.js.LICENSE.txt +19 -0
- package/__mf/js/async/9509.e6075bf0.js +1 -0
- package/__mf/js/async/__federation_expose_Table.0b081d4a.js +1 -0
- package/__mf/js/async/lib-router.d60ae988.js +2 -0
- package/__mf/js/async/lib-router.d60ae988.js.LICENSE.txt +32 -0
- package/__mf/js/main.fa5edfce.js +1 -0
- package/lib/CellsEditor/CellEditor.d.ts +10 -0
- package/lib/CellsEditor/CellEditor.d.ts.map +1 -0
- package/lib/CellsEditor/CellEditor.js +372 -0
- package/lib/CellsEditor/CellEditor.js.map +1 -0
- package/lib/CellsEditor/CellsEditor.d.ts +8 -0
- package/lib/CellsEditor/CellsEditor.d.ts.map +1 -0
- package/lib/CellsEditor/CellsEditor.js +123 -0
- package/lib/CellsEditor/CellsEditor.js.map +1 -0
- package/lib/CellsEditor/index.d.ts +3 -0
- package/lib/CellsEditor/index.d.ts.map +1 -0
- package/lib/CellsEditor/index.js +16 -0
- package/lib/CellsEditor/index.js.map +1 -0
- package/lib/ColumnsEditor/ColumnEditor.d.ts +11 -0
- package/lib/ColumnsEditor/ColumnEditor.d.ts.map +1 -0
- package/lib/ColumnsEditor/ColumnEditor.js +213 -0
- package/lib/ColumnsEditor/ColumnEditor.js.map +1 -0
- package/lib/ColumnsEditor/ColumnEditorContainer.d.ts +11 -0
- package/lib/ColumnsEditor/ColumnEditorContainer.d.ts.map +1 -0
- package/lib/ColumnsEditor/ColumnEditorContainer.js +139 -0
- package/lib/ColumnsEditor/ColumnEditorContainer.js.map +1 -0
- package/lib/ColumnsEditor/ColumnsEditor.d.ts +8 -0
- package/lib/ColumnsEditor/ColumnsEditor.d.ts.map +1 -0
- package/lib/ColumnsEditor/ColumnsEditor.js +95 -0
- package/lib/ColumnsEditor/ColumnsEditor.js.map +1 -0
- package/lib/ColumnsEditor/index.d.ts +4 -0
- package/lib/ColumnsEditor/index.d.ts.map +1 -0
- package/lib/ColumnsEditor/index.js +17 -0
- package/lib/ColumnsEditor/index.js.map +1 -0
- package/lib/EmbeddedPanel.d.ts +10 -0
- package/lib/EmbeddedPanel.d.ts.map +1 -0
- package/lib/EmbeddedPanel.js +39 -0
- package/lib/EmbeddedPanel.js.map +1 -0
- package/lib/Table.d.ts +8 -0
- package/lib/Table.d.ts.map +1 -0
- package/lib/Table.js +48 -0
- package/lib/Table.js.map +1 -0
- package/lib/TableCellsEditor.d.ts +6 -0
- package/lib/TableCellsEditor.d.ts.map +1 -0
- package/lib/TableCellsEditor.js +28 -0
- package/lib/TableCellsEditor.js.map +1 -0
- package/lib/TableColumnsEditor.d.ts +6 -0
- package/lib/TableColumnsEditor.d.ts.map +1 -0
- package/lib/TableColumnsEditor.js +28 -0
- package/lib/TableColumnsEditor.js.map +1 -0
- package/lib/TablePanel.d.ts +10 -0
- package/lib/TablePanel.d.ts.map +1 -0
- package/lib/TablePanel.js +325 -0
- package/lib/TablePanel.js.map +1 -0
- package/lib/TableSettingsEditor.d.ts +4 -0
- package/lib/TableSettingsEditor.d.ts.map +1 -0
- package/lib/TableSettingsEditor.js +108 -0
- package/lib/TableSettingsEditor.js.map +1 -0
- package/lib/TableTransformsEditor.d.ts +4 -0
- package/lib/TableTransformsEditor.d.ts.map +1 -0
- package/lib/TableTransformsEditor.js +28 -0
- package/lib/TableTransformsEditor.js.map +1 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +19 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/CellsEditor/CellEditor.js +385 -0
- package/lib/cjs/CellsEditor/CellsEditor.js +136 -0
- package/lib/cjs/CellsEditor/index.js +31 -0
- package/lib/cjs/ColumnsEditor/ColumnEditor.js +221 -0
- package/lib/cjs/ColumnsEditor/ColumnEditorContainer.js +152 -0
- package/lib/cjs/ColumnsEditor/ColumnsEditor.js +108 -0
- package/lib/cjs/ColumnsEditor/index.js +32 -0
- package/lib/cjs/EmbeddedPanel.js +52 -0
- package/lib/cjs/Table.js +54 -0
- package/lib/cjs/TableCellsEditor.js +36 -0
- package/lib/cjs/TableColumnsEditor.js +36 -0
- package/lib/cjs/TablePanel.js +341 -0
- package/lib/cjs/TableSettingsEditor.js +116 -0
- package/lib/cjs/TableTransformsEditor.js +36 -0
- package/lib/cjs/bootstrap.js +26 -0
- package/lib/cjs/env.d.js +14 -0
- package/lib/cjs/getPluginModule.js +27 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +34 -0
- package/lib/cjs/model.js +4 -0
- package/lib/cjs/setup-tests.js +19 -0
- package/lib/cjs/table-model.js +27 -0
- package/lib/cjs/test/mock-query-results.js +417 -0
- package/lib/env.d.js +15 -0
- package/lib/env.d.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +16 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -0
- package/lib/model.d.ts +6 -0
- package/lib/model.d.ts.map +1 -0
- package/lib/model.js +3 -0
- package/lib/model.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +17 -0
- package/lib/setup-tests.js.map +1 -0
- package/lib/table-model.d.ts +92 -0
- package/lib/table-model.d.ts.map +1 -0
- package/lib/table-model.js +21 -0
- package/lib/table-model.js.map +1 -0
- package/lib/test/mock-query-results.d.ts +136 -0
- package/lib/test/mock-query-results.d.ts.map +1 -0
- package/lib/test/mock-query-results.js +389 -0
- package/lib/test/mock-query-results.js.map +1 -0
- package/mf-manifest.json +491 -0
- package/mf-stats.json +554 -0
- package/package.json +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAGnF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import packageJson from '../package.json';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the plugin module information from package.json
|
|
4
|
+
*/ export function getPluginModule() {
|
|
5
|
+
const { name, version, perses } = packageJson;
|
|
6
|
+
return {
|
|
7
|
+
kind: 'PluginModule',
|
|
8
|
+
metadata: {
|
|
9
|
+
name,
|
|
10
|
+
version
|
|
11
|
+
},
|
|
12
|
+
spec: perses
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=getPluginModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AACA,OAAOA,iBAAiB,kBAAkB;AAE1C;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index-federation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-federation.d.ts","sourceRoot":"","sources":["../../src/index-federation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2024 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('./bootstrap');
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index-federation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index-federation.ts"],"sourcesContent":["// Copyright 2024 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('./bootstrap');\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,MAAM,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { getPluginModule } from './getPluginModule';
|
|
2
|
+
export * from './CellsEditor';
|
|
3
|
+
export * from './ColumnsEditor';
|
|
4
|
+
export * from './Table';
|
|
5
|
+
export * from './TableCellsEditor';
|
|
6
|
+
export * from './TableColumnsEditor';
|
|
7
|
+
export * from './TablePanel';
|
|
8
|
+
export * from './TableSettingsEditor';
|
|
9
|
+
export * from './TableTransformsEditor';
|
|
10
|
+
export * from './model';
|
|
11
|
+
export * from './table-model';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { getPluginModule } from './getPluginModule';
|
|
2
|
+
export * from './CellsEditor';
|
|
3
|
+
export * from './ColumnsEditor';
|
|
4
|
+
export * from './Table';
|
|
5
|
+
export * from './TableCellsEditor';
|
|
6
|
+
export * from './TableColumnsEditor';
|
|
7
|
+
export * from './TablePanel';
|
|
8
|
+
export * from './TableSettingsEditor';
|
|
9
|
+
export * from './TableTransformsEditor';
|
|
10
|
+
export * from './model';
|
|
11
|
+
export * from './table-model';
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { getPluginModule } from './getPluginModule';\nexport * from './CellsEditor';\nexport * from './ColumnsEditor';\nexport * from './Table';\nexport * from './TableCellsEditor';\nexport * from './TableColumnsEditor';\nexport * from './TablePanel';\nexport * from './TableSettingsEditor';\nexport * from './TableTransformsEditor';\nexport * from './model';\nexport * from './table-model';\n"],"names":["getPluginModule"],"mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AACpD,cAAc,gBAAgB;AAC9B,cAAc,kBAAkB;AAChC,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,eAAe;AAC7B,cAAc,wBAAwB;AACtC,cAAc,0BAA0B;AACxC,cAAc,UAAU;AACxB,cAAc,gBAAgB"}
|
package/lib/model.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,UAAU,sBAAsB;CAAG;AAEnC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAC"}
|
package/lib/model.js
ADDED
package/lib/model.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/model.ts"],"sourcesContent":["import { PanelProps } from '@perses-dev/plugin-system';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\ninterface TimeSeriesTableOptions {}\n\nexport type TimeSeriesTableProps = PanelProps<TimeSeriesTableOptions>;\n"],"names":[],"mappings":"AAKA,WAAsE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/setup-tests.ts"],"names":[],"mappings":"AAaA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 '@testing-library/jest-dom';
|
|
14
|
+
// Always mock e-charts during tests since we don't have a proper canvas in jsdom
|
|
15
|
+
jest.mock('echarts/core');
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=setup-tests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/setup-tests.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 '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"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,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Definition, FormatOptions, Transform, UnknownSpec } from '@perses-dev/core';
|
|
2
|
+
import { TableDensity } from '@perses-dev/components';
|
|
3
|
+
import { OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
4
|
+
export interface ColumnSettings {
|
|
5
|
+
name: string;
|
|
6
|
+
header?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Text to display when hovering over the header text. This can be useful for
|
|
9
|
+
* providing additional information about the column when you want to keep the
|
|
10
|
+
* header text relatively short to manage the column width.
|
|
11
|
+
*/
|
|
12
|
+
headerDescription?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Text to display when hovering over a cell. This can be useful for
|
|
15
|
+
* providing additional information about the column when the content is
|
|
16
|
+
* ellipsized to fit in the space.
|
|
17
|
+
*/
|
|
18
|
+
cellDescription?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Panel plugin to render.
|
|
21
|
+
* By default, the cells are rendered as text.
|
|
22
|
+
*/
|
|
23
|
+
plugin?: Definition<UnknownSpec>;
|
|
24
|
+
/** Formatting options. Only applicable if plugin is unset. */
|
|
25
|
+
format?: FormatOptions;
|
|
26
|
+
align?: 'left' | 'center' | 'right';
|
|
27
|
+
enableSorting?: boolean;
|
|
28
|
+
sort?: 'asc' | 'desc';
|
|
29
|
+
/**
|
|
30
|
+
* Width of the column when rendered in a table. It should be a number in pixels
|
|
31
|
+
* or "auto" to allow the table to automatically adjust the width to fill
|
|
32
|
+
* space.
|
|
33
|
+
*/
|
|
34
|
+
width?: number | 'auto';
|
|
35
|
+
hide?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ValueCondition {
|
|
38
|
+
kind: 'Value';
|
|
39
|
+
spec: {
|
|
40
|
+
value: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface RangeCondition {
|
|
44
|
+
kind: 'Range';
|
|
45
|
+
spec: {
|
|
46
|
+
min?: number;
|
|
47
|
+
max?: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface RegexCondition {
|
|
51
|
+
kind: 'Regex';
|
|
52
|
+
spec: {
|
|
53
|
+
expr: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface MiscCondition {
|
|
57
|
+
kind: 'Misc';
|
|
58
|
+
spec: {
|
|
59
|
+
value: 'empty' | 'null' | 'NaN' | 'true' | 'false';
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export type Condition = ValueCondition | RangeCondition | RegexCondition | MiscCondition;
|
|
63
|
+
export interface CellSettings {
|
|
64
|
+
condition: Condition;
|
|
65
|
+
text?: string;
|
|
66
|
+
textColor?: `#${string}`;
|
|
67
|
+
backgroundColor?: `#${string}`;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The schema for a Table panel.
|
|
71
|
+
*/
|
|
72
|
+
export interface TableDefinition extends Definition<TableOptions> {
|
|
73
|
+
kind: 'Table';
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The Options object type supported by the Table panel plugin.
|
|
77
|
+
*/
|
|
78
|
+
export interface TableOptions {
|
|
79
|
+
density?: TableDensity;
|
|
80
|
+
defaultColumnWidth?: 'auto' | number;
|
|
81
|
+
defaultColumnHeight?: 'auto' | number;
|
|
82
|
+
pagination?: boolean;
|
|
83
|
+
columnSettings?: ColumnSettings[];
|
|
84
|
+
cellSettings?: CellSettings[];
|
|
85
|
+
transforms?: Transform[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Creates the initial/empty options for a Table panel.
|
|
89
|
+
*/
|
|
90
|
+
export declare function createInitialTableOptions(): TableOptions;
|
|
91
|
+
export type TableSettingsEditorProps = OptionsEditorProps<TableOptions>;
|
|
92
|
+
//# sourceMappingURL=table-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-model.d.ts","sourceRoot":"","sources":["../../src/table-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAEjC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,aAAa,CAAC;IAGvB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAGpC,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE;QACJ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;KACpD,CAAC;CACH;AAED,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,CAAC;AAEzF,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,MAAM,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,IAAI,MAAM,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,UAAU,CAAC,YAAY,CAAC;IAC/D,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAE3B,OAAO,CAAC,EAAE,YAAY,CAAC;IAGvB,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAGrC,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;IAElC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAE9B,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,YAAY,CAIxD;AAED,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2024 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
|
+
/**
|
|
14
|
+
* Creates the initial/empty options for a Table panel.
|
|
15
|
+
*/ export function createInitialTableOptions() {
|
|
16
|
+
return {
|
|
17
|
+
density: 'standard'
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=table-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/table-model.ts"],"sourcesContent":["// Copyright 2024 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 { Definition, FormatOptions, Transform, UnknownSpec } from '@perses-dev/core';\nimport { TableDensity } from '@perses-dev/components';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\n\nexport interface ColumnSettings {\n name: string;\n\n // Text to display in the header for the column.\n header?: string;\n /**\n * Text to display when hovering over the header text. This can be useful for\n * providing additional information about the column when you want to keep the\n * header text relatively short to manage the column width.\n */\n headerDescription?: string;\n /**\n * Text to display when hovering over a cell. This can be useful for\n * providing additional information about the column when the content is\n * ellipsized to fit in the space.\n */\n cellDescription?: string;\n\n /**\n * Panel plugin to render.\n * By default, the cells are rendered as text.\n */\n plugin?: Definition<UnknownSpec>;\n\n /** Formatting options. Only applicable if plugin is unset. */\n format?: FormatOptions;\n\n // Alignment of the content in the cell.\n align?: 'left' | 'center' | 'right';\n\n // When `true`, the column will be sortable.\n enableSorting?: boolean;\n\n // Default sort order for the column.\n sort?: 'asc' | 'desc';\n\n /**\n * Width of the column when rendered in a table. It should be a number in pixels\n * or \"auto\" to allow the table to automatically adjust the width to fill\n * space.\n */\n width?: number | 'auto';\n // When `true`, the column will not be displayed.\n hide?: boolean;\n}\n\nexport interface ValueCondition {\n kind: 'Value';\n spec: {\n value: string;\n };\n}\n\nexport interface RangeCondition {\n kind: 'Range';\n spec: {\n min?: number;\n max?: number;\n };\n}\n\nexport interface RegexCondition {\n kind: 'Regex';\n spec: {\n expr: string;\n };\n}\n\nexport interface MiscCondition {\n kind: 'Misc';\n spec: {\n value: 'empty' | 'null' | 'NaN' | 'true' | 'false';\n };\n}\n\nexport type Condition = ValueCondition | RangeCondition | RegexCondition | MiscCondition;\n\nexport interface CellSettings {\n condition: Condition;\n text?: string;\n textColor?: `#${string}`;\n backgroundColor?: `#${string}`;\n}\n\n/**\n * The schema for a Table panel.\n */\nexport interface TableDefinition extends Definition<TableOptions> {\n kind: 'Table';\n}\n\n/**\n * The Options object type supported by the Table panel plugin.\n */\nexport interface TableOptions {\n // Change row height.\n density?: TableDensity;\n // When set to 'auto', the table will try to automatically adjust the width of columns to fit without overflowing.\n // Only for column without custom width specified in columnSettings.\n defaultColumnWidth?: 'auto' | number;\n // When set to 'auto', the table will calculate the cell height based on the line height of the theme and the density setting of the table.\n // Only for column without custom height specified in columnSettings.\n defaultColumnHeight?: 'auto' | number;\n // Enable pagination.\n pagination?: boolean;\n // Customize column display and order them by their index in the array.\n columnSettings?: ColumnSettings[];\n // Customize cell display based on their value.\n cellSettings?: CellSettings[];\n // Apply transforms to the data before rendering the table.\n transforms?: Transform[];\n}\n\n/**\n * Creates the initial/empty options for a Table panel.\n */\nexport function createInitialTableOptions(): TableOptions {\n return {\n density: 'standard',\n };\n}\n\nexport type TableSettingsEditorProps = OptionsEditorProps<TableOptions>;\n"],"names":["createInitialTableOptions","density"],"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;AAuHjC;;CAEC,GACD,OAAO,SAASA;IACd,OAAO;QACLC,SAAS;IACX;AACF"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { TimeSeriesData } from '@perses-dev/core';
|
|
2
|
+
export declare const MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE: {
|
|
3
|
+
status: string;
|
|
4
|
+
fetchStatus: string;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
isSuccess: boolean;
|
|
7
|
+
isError: boolean;
|
|
8
|
+
data: {
|
|
9
|
+
timeRange: {
|
|
10
|
+
start: Date;
|
|
11
|
+
end: Date;
|
|
12
|
+
};
|
|
13
|
+
stepMs: number;
|
|
14
|
+
series: {
|
|
15
|
+
name: string;
|
|
16
|
+
values: number[][];
|
|
17
|
+
labels: {
|
|
18
|
+
device: string;
|
|
19
|
+
env: string;
|
|
20
|
+
fstype: string;
|
|
21
|
+
instance: string;
|
|
22
|
+
job: string;
|
|
23
|
+
mountpoint: string;
|
|
24
|
+
};
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
dataUpdatedAt: number;
|
|
28
|
+
error: null;
|
|
29
|
+
errorUpdatedAt: number;
|
|
30
|
+
failureCount: number;
|
|
31
|
+
errorUpdateCount: number;
|
|
32
|
+
isFetched: boolean;
|
|
33
|
+
isFetchedAfterMount: boolean;
|
|
34
|
+
isFetching: boolean;
|
|
35
|
+
isRefetching: boolean;
|
|
36
|
+
isLoadingError: boolean;
|
|
37
|
+
isPaused: boolean;
|
|
38
|
+
isPlaceholderData: boolean;
|
|
39
|
+
isPreviousData: boolean;
|
|
40
|
+
isRefetchError: boolean;
|
|
41
|
+
isStale: boolean;
|
|
42
|
+
}[];
|
|
43
|
+
export declare const MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE: {
|
|
44
|
+
status: string;
|
|
45
|
+
fetchStatus: string;
|
|
46
|
+
isLoading: boolean;
|
|
47
|
+
isSuccess: boolean;
|
|
48
|
+
isError: boolean;
|
|
49
|
+
data: {
|
|
50
|
+
timeRange: {
|
|
51
|
+
start: Date;
|
|
52
|
+
end: Date;
|
|
53
|
+
};
|
|
54
|
+
stepMs: number;
|
|
55
|
+
series: {
|
|
56
|
+
name: string;
|
|
57
|
+
values: number[][];
|
|
58
|
+
labels: {
|
|
59
|
+
device: string;
|
|
60
|
+
env: string;
|
|
61
|
+
fstype: string;
|
|
62
|
+
instance: string;
|
|
63
|
+
job: string;
|
|
64
|
+
mountpoint: string;
|
|
65
|
+
};
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
dataUpdatedAt: number;
|
|
69
|
+
error: null;
|
|
70
|
+
errorUpdatedAt: number;
|
|
71
|
+
failureCount: number;
|
|
72
|
+
errorUpdateCount: number;
|
|
73
|
+
isFetched: boolean;
|
|
74
|
+
isFetchedAfterMount: boolean;
|
|
75
|
+
isFetching: boolean;
|
|
76
|
+
isRefetching: boolean;
|
|
77
|
+
isLoadingError: boolean;
|
|
78
|
+
isPaused: boolean;
|
|
79
|
+
isPlaceholderData: boolean;
|
|
80
|
+
isPreviousData: boolean;
|
|
81
|
+
isRefetchError: boolean;
|
|
82
|
+
isStale: boolean;
|
|
83
|
+
}[];
|
|
84
|
+
export declare const MOCK_TIME_SERIES_DATA_MULTIVALUE: TimeSeriesData;
|
|
85
|
+
export declare const MOCK_TIME_SERIES_DATA_SINGLEVALUE: TimeSeriesData;
|
|
86
|
+
export declare const MOCK_NULL_QUERY_RESULT: {
|
|
87
|
+
status: string;
|
|
88
|
+
fetchStatus: string;
|
|
89
|
+
isLoading: boolean;
|
|
90
|
+
isSuccess: boolean;
|
|
91
|
+
isError: boolean;
|
|
92
|
+
data: {
|
|
93
|
+
timeRange: {
|
|
94
|
+
start: Date;
|
|
95
|
+
end: Date;
|
|
96
|
+
};
|
|
97
|
+
stepMs: number;
|
|
98
|
+
series: {
|
|
99
|
+
name: string;
|
|
100
|
+
values: (number | null)[][];
|
|
101
|
+
formattedName: string;
|
|
102
|
+
labels: {
|
|
103
|
+
env: string;
|
|
104
|
+
instance: string;
|
|
105
|
+
job: string;
|
|
106
|
+
};
|
|
107
|
+
}[];
|
|
108
|
+
};
|
|
109
|
+
dataUpdatedAt: number;
|
|
110
|
+
error: null;
|
|
111
|
+
errorUpdatedAt: number;
|
|
112
|
+
failureCount: number;
|
|
113
|
+
errorUpdateCount: number;
|
|
114
|
+
isFetched: boolean;
|
|
115
|
+
isFetchedAfterMount: boolean;
|
|
116
|
+
isFetching: boolean;
|
|
117
|
+
isRefetching: boolean;
|
|
118
|
+
isLoadingError: boolean;
|
|
119
|
+
isPaused: boolean;
|
|
120
|
+
isPlaceholderData: boolean;
|
|
121
|
+
isPreviousData: boolean;
|
|
122
|
+
isRefetchError: boolean;
|
|
123
|
+
isStale: boolean;
|
|
124
|
+
}[];
|
|
125
|
+
export declare const MOCK_TIME_SERIES_QUERY_DEFINITION: {
|
|
126
|
+
kind: string;
|
|
127
|
+
spec: {
|
|
128
|
+
plugin: {
|
|
129
|
+
kind: string;
|
|
130
|
+
spec: {
|
|
131
|
+
query: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=mock-query-results.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-query-results.d.ts","sourceRoot":"","sources":["../../../src/test/mock-query-results.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DpD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDrD,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,cAsC9C,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,cAgC/C,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgElC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;CAU7C,CAAC"}
|