@perses-dev/table-plugin 0.9.0 → 0.10.1
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/__mf/css/async/3061.d3010b86.css +1 -0
- package/__mf/css/async/5442.d3010b86.css +1 -0
- package/__mf/css/async/7823.d3010b86.css +1 -0
- package/__mf/js/Table.7e37b83d.js +6 -0
- package/__mf/js/async/1432.4dcbe7e3.js +1 -0
- package/__mf/js/async/1490.7aa42bc8.js +22 -0
- package/__mf/js/async/1616.7a74f4ef.js +1 -0
- package/__mf/js/async/2043.fdebf89c.js +2 -0
- package/__mf/js/async/3827.1b39b042.js +38 -0
- package/__mf/js/async/392.c2307fe5.js +2 -0
- package/__mf/js/async/{1964.ad4fb2b0.js → 4121.8e97ef88.js} +2 -2
- package/__mf/js/async/4761.08da9107.js +1 -0
- package/__mf/js/async/{2651.4ede9028.js → 5002.3189d214.js} +1 -1
- package/__mf/js/async/{1640.c1ed5a05.js → 5019.5318688a.js} +1 -1
- package/__mf/js/async/5071.91e1c002.js +1 -0
- package/__mf/js/async/5501.fa3f80e1.js +1 -0
- package/__mf/js/async/{5214.00911b97.js → 5587.f5f2b0cc.js} +1 -1
- package/__mf/js/async/5806.44fbc2a8.js +1 -0
- package/__mf/js/async/6274.14683c28.js +2 -0
- package/__mf/js/async/6283.e044c368.js +2 -0
- package/__mf/js/async/6587.d2b9768c.js +110 -0
- package/__mf/js/async/6753.032ce611.js +1 -0
- package/__mf/js/async/7142.5d923107.js +1 -0
- package/__mf/js/async/7177.356298ae.js +1 -0
- package/__mf/js/async/7192.66c9e3a5.js +1 -0
- package/__mf/js/async/7208.125848cf.js +7 -0
- package/__mf/js/async/7417.86d0bc09.js +1 -0
- package/__mf/js/async/7968.a66bfadb.js +1 -0
- package/__mf/js/async/7978.a19f5a4f.js +1 -0
- package/__mf/js/async/8356.8ae40b6a.js +1 -0
- package/__mf/js/async/8470.1b8b20ff.js +2 -0
- package/__mf/js/async/8728.546704f2.js +1 -0
- package/__mf/js/async/873.a7310675.js +1 -0
- package/__mf/js/async/9235.eee50e10.js +1 -0
- package/__mf/js/async/9355.8b0c6885.js +2 -0
- package/__mf/js/async/941.333875f4.js +2 -0
- package/__mf/js/async/9588.7b021071.js +1 -0
- package/__mf/js/async/__federation_expose_Table.4836d198.js +1 -0
- package/__mf/js/async/lib-router.8fd59130.js +2 -0
- package/__mf/js/main.289caaea.js +6 -0
- package/lib/Table.d.ts +2 -2
- package/lib/Table.d.ts.map +1 -1
- package/lib/Table.js +2 -6
- package/lib/Table.js.map +1 -1
- package/lib/bootstrap.js +1 -1
- package/lib/bootstrap.js.map +1 -1
- package/lib/cjs/Table.js +9 -13
- package/lib/cjs/components/CellsEditor/CellsEditor.js +30 -0
- package/lib/cjs/{CellsEditor → components/CellsEditor}/index.js +0 -1
- package/lib/cjs/components/ColumnsEditor/ColumnEditor.js +241 -0
- package/lib/cjs/{CellsEditor/CellEditor.js → components/ConditionalPanel.js} +167 -197
- package/lib/cjs/components/TablePanel.js +576 -0
- package/lib/cjs/{TableSettingsEditor.js → components/TableSettingsEditor.js} +32 -4
- package/lib/cjs/components/index.js +37 -0
- package/lib/cjs/index-federation.js +12 -12
- package/lib/cjs/index.js +2 -9
- package/lib/cjs/models/index.js +31 -0
- package/lib/cjs/{table-model.js → models/model.js} +1 -12
- package/lib/cjs/models/table-model.js +252 -0
- package/lib/cjs/test/mock-query-results.js +7 -7
- package/lib/{CellsEditor → components/CellsEditor}/CellsEditor.d.ts +1 -1
- package/lib/components/CellsEditor/CellsEditor.d.ts.map +1 -0
- package/lib/components/CellsEditor/CellsEditor.js +22 -0
- package/lib/components/CellsEditor/CellsEditor.js.map +1 -0
- package/lib/components/CellsEditor/index.d.ts +2 -0
- package/lib/components/CellsEditor/index.d.ts.map +1 -0
- package/lib/{CellsEditor → components/CellsEditor}/index.js +0 -1
- package/lib/components/CellsEditor/index.js.map +1 -0
- package/lib/{ColumnsEditor → components/ColumnsEditor}/ColumnEditor.d.ts +1 -1
- package/lib/components/ColumnsEditor/ColumnEditor.d.ts.map +1 -0
- package/lib/components/ColumnsEditor/ColumnEditor.js +233 -0
- package/lib/components/ColumnsEditor/ColumnEditor.js.map +1 -0
- package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts.map +1 -0
- package/lib/{ColumnsEditor → components/ColumnsEditor}/ColumnEditorContainer.js +1 -1
- package/lib/components/ColumnsEditor/ColumnEditorContainer.js.map +1 -0
- package/lib/{ColumnsEditor → components/ColumnsEditor}/ColumnsEditor.d.ts +1 -1
- package/lib/components/ColumnsEditor/ColumnsEditor.d.ts.map +1 -0
- package/lib/{ColumnsEditor → components/ColumnsEditor}/ColumnsEditor.js +1 -1
- package/lib/components/ColumnsEditor/ColumnsEditor.js.map +1 -0
- package/lib/components/ColumnsEditor/index.d.ts.map +1 -0
- package/lib/components/ColumnsEditor/index.js.map +1 -0
- package/lib/components/ConditionalPanel.d.ts +15 -0
- package/lib/components/ConditionalPanel.d.ts.map +1 -0
- package/lib/{CellsEditor/CellEditor.js → components/ConditionalPanel.js} +159 -197
- package/lib/components/ConditionalPanel.js.map +1 -0
- package/lib/components/EmbeddedPanel.d.ts.map +1 -0
- package/lib/components/EmbeddedPanel.js.map +1 -0
- package/lib/{TableCellsEditor.d.ts → components/TableCellsEditor.d.ts} +1 -1
- package/lib/components/TableCellsEditor.d.ts.map +1 -0
- package/lib/components/TableCellsEditor.js.map +1 -0
- package/lib/{TableColumnsEditor.d.ts → components/TableColumnsEditor.d.ts} +1 -1
- package/lib/components/TableColumnsEditor.d.ts.map +1 -0
- package/lib/components/TableColumnsEditor.js.map +1 -0
- package/lib/{TablePanel.d.ts → components/TablePanel.d.ts} +1 -1
- package/lib/components/TablePanel.d.ts.map +1 -0
- package/lib/components/TablePanel.js +560 -0
- package/lib/components/TablePanel.js.map +1 -0
- package/lib/{TableSettingsEditor.d.ts → components/TableSettingsEditor.d.ts} +1 -1
- package/lib/components/TableSettingsEditor.d.ts.map +1 -0
- package/lib/{TableSettingsEditor.js → components/TableSettingsEditor.js} +33 -5
- package/lib/components/TableSettingsEditor.js.map +1 -0
- package/lib/{TableTransformsEditor.d.ts → components/TableTransformsEditor.d.ts} +1 -1
- package/lib/components/TableTransformsEditor.d.ts.map +1 -0
- package/lib/{TableTransformsEditor.js → components/TableTransformsEditor.js} +1 -1
- package/lib/components/TableTransformsEditor.js.map +1 -0
- package/lib/components/index.d.ts +9 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +22 -0
- package/lib/components/index.js.map +1 -0
- package/lib/index.d.ts +2 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -9
- package/lib/index.js.map +1 -1
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/{table-model.js → models/index.js} +4 -9
- package/lib/models/index.js.map +1 -0
- package/lib/models/model.d.ts.map +1 -0
- package/lib/models/model.js +15 -0
- package/lib/models/model.js.map +1 -0
- package/lib/{table-model.d.ts → models/table-model.d.ts} +24 -1
- package/lib/models/table-model.d.ts.map +1 -0
- package/lib/models/table-model.js +233 -0
- package/lib/models/table-model.js.map +1 -0
- package/mf-manifest.json +44 -45
- package/mf-stats.json +45 -46
- package/package.json +5 -5
- package/__mf/css/async/2341.cbbd94a8.css +0 -1
- package/__mf/css/async/5263.cbbd94a8.css +0 -1
- package/__mf/css/async/6759.cbbd94a8.css +0 -1
- package/__mf/js/Table.09045c91.js +0 -5
- package/__mf/js/async/1143.68727fe6.js +0 -1
- package/__mf/js/async/2292.12f77288.js +0 -2
- package/__mf/js/async/2854.fc0ce4ac.js +0 -110
- package/__mf/js/async/3224.5efdac43.js +0 -1
- package/__mf/js/async/3391.62c7afd4.js +0 -73
- package/__mf/js/async/3863.5ed15409.js +0 -2
- package/__mf/js/async/3960.ad46df53.js +0 -2
- package/__mf/js/async/3980.17fb5371.js +0 -2
- package/__mf/js/async/4075.e2a2c230.js +0 -1
- package/__mf/js/async/4238.ea9515aa.js +0 -1
- package/__mf/js/async/4300.fc319dfb.js +0 -38
- package/__mf/js/async/4368.3e460b07.js +0 -1
- package/__mf/js/async/4483.b6379137.js +0 -1
- package/__mf/js/async/5061.85655462.js +0 -2
- package/__mf/js/async/5377.6522c49a.js +0 -1
- package/__mf/js/async/5409.524589b2.js +0 -1
- package/__mf/js/async/5981.91033d82.js +0 -2
- package/__mf/js/async/6284.5f775177.js +0 -1
- package/__mf/js/async/6292.c204d39b.js +0 -1
- package/__mf/js/async/6770.94607b71.js +0 -1
- package/__mf/js/async/694.20d8be37.js +0 -1
- package/__mf/js/async/738.3929068d.js +0 -1
- package/__mf/js/async/7740.4fee7abb.js +0 -1
- package/__mf/js/async/8313.b86a056a.js +0 -7
- package/__mf/js/async/8488.9f177839.js +0 -1
- package/__mf/js/async/8599.4f1f88c0.js +0 -1
- package/__mf/js/async/9010.aaf984f3.js +0 -1
- package/__mf/js/async/9173.c646dd1e.js +0 -2
- package/__mf/js/async/9509.1c4313e0.js +0 -1
- package/__mf/js/async/9667.211c6bdb.js +0 -1
- package/__mf/js/async/__federation_expose_Table.3668e352.js +0 -1
- package/__mf/js/async/lib-router.f3ef5227.js +0 -2
- package/__mf/js/main.0cb08842.js +0 -5
- package/lib/CellsEditor/CellEditor.d.ts +0 -10
- package/lib/CellsEditor/CellEditor.d.ts.map +0 -1
- package/lib/CellsEditor/CellEditor.js.map +0 -1
- package/lib/CellsEditor/CellsEditor.d.ts.map +0 -1
- package/lib/CellsEditor/CellsEditor.js +0 -123
- package/lib/CellsEditor/CellsEditor.js.map +0 -1
- package/lib/CellsEditor/index.d.ts +0 -3
- package/lib/CellsEditor/index.d.ts.map +0 -1
- package/lib/CellsEditor/index.js.map +0 -1
- package/lib/ColumnsEditor/ColumnEditor.d.ts.map +0 -1
- package/lib/ColumnsEditor/ColumnEditor.js +0 -213
- package/lib/ColumnsEditor/ColumnEditor.js.map +0 -1
- package/lib/ColumnsEditor/ColumnEditorContainer.d.ts.map +0 -1
- package/lib/ColumnsEditor/ColumnEditorContainer.js.map +0 -1
- package/lib/ColumnsEditor/ColumnsEditor.d.ts.map +0 -1
- package/lib/ColumnsEditor/ColumnsEditor.js.map +0 -1
- package/lib/ColumnsEditor/index.d.ts.map +0 -1
- package/lib/ColumnsEditor/index.js.map +0 -1
- package/lib/EmbeddedPanel.d.ts.map +0 -1
- package/lib/EmbeddedPanel.js.map +0 -1
- package/lib/TableCellsEditor.d.ts.map +0 -1
- package/lib/TableCellsEditor.js.map +0 -1
- package/lib/TableColumnsEditor.d.ts.map +0 -1
- package/lib/TableColumnsEditor.js.map +0 -1
- package/lib/TablePanel.d.ts.map +0 -1
- package/lib/TablePanel.js +0 -325
- package/lib/TablePanel.js.map +0 -1
- package/lib/TableSettingsEditor.d.ts.map +0 -1
- package/lib/TableSettingsEditor.js.map +0 -1
- package/lib/TableTransformsEditor.d.ts.map +0 -1
- package/lib/TableTransformsEditor.js.map +0 -1
- package/lib/cjs/CellsEditor/CellsEditor.js +0 -136
- package/lib/cjs/ColumnsEditor/ColumnEditor.js +0 -221
- package/lib/cjs/TablePanel.js +0 -341
- package/lib/cjs/model.js +0 -4
- package/lib/model.d.ts.map +0 -1
- package/lib/model.js +0 -3
- package/lib/model.js.map +0 -1
- package/lib/table-model.d.ts.map +0 -1
- package/lib/table-model.js.map +0 -1
- /package/__mf/js/async/{3391.62c7afd4.js.LICENSE.txt → 1490.7aa42bc8.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2292.12f77288.js.LICENSE.txt → 2043.fdebf89c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5981.91033d82.js.LICENSE.txt → 392.c2307fe5.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{1964.ad4fb2b0.js.LICENSE.txt → 4121.8e97ef88.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3960.ad46df53.js.LICENSE.txt → 6274.14683c28.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3980.17fb5371.js.LICENSE.txt → 6283.e044c368.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2854.fc0ce4ac.js.LICENSE.txt → 6587.d2b9768c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8313.b86a056a.js.LICENSE.txt → 7208.125848cf.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{9173.c646dd1e.js.LICENSE.txt → 8470.1b8b20ff.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5061.85655462.js.LICENSE.txt → 9355.8b0c6885.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{3863.5ed15409.js.LICENSE.txt → 941.333875f4.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.f3ef5227.js.LICENSE.txt → lib-router.8fd59130.js.LICENSE.txt} +0 -0
- /package/lib/cjs/{ColumnsEditor → components/ColumnsEditor}/ColumnEditorContainer.js +0 -0
- /package/lib/cjs/{ColumnsEditor → components/ColumnsEditor}/ColumnsEditor.js +0 -0
- /package/lib/cjs/{ColumnsEditor → components/ColumnsEditor}/index.js +0 -0
- /package/lib/cjs/{EmbeddedPanel.js → components/EmbeddedPanel.js} +0 -0
- /package/lib/cjs/{TableCellsEditor.js → components/TableCellsEditor.js} +0 -0
- /package/lib/cjs/{TableColumnsEditor.js → components/TableColumnsEditor.js} +0 -0
- /package/lib/cjs/{TableTransformsEditor.js → components/TableTransformsEditor.js} +0 -0
- /package/lib/{ColumnsEditor → components/ColumnsEditor}/ColumnEditorContainer.d.ts +0 -0
- /package/lib/{ColumnsEditor → components/ColumnsEditor}/index.d.ts +0 -0
- /package/lib/{ColumnsEditor → components/ColumnsEditor}/index.js +0 -0
- /package/lib/{EmbeddedPanel.d.ts → components/EmbeddedPanel.d.ts} +0 -0
- /package/lib/{EmbeddedPanel.js → components/EmbeddedPanel.js} +0 -0
- /package/lib/{TableCellsEditor.js → components/TableCellsEditor.js} +0 -0
- /package/lib/{TableColumnsEditor.js → components/TableColumnsEditor.js} +0 -0
- /package/lib/{model.d.ts → models/model.d.ts} +0 -0
|
@@ -1,15 +1,3 @@
|
|
|
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
1
|
"use strict";
|
|
14
2
|
function _getRequireWildcardCache(nodeInterop) {
|
|
15
3
|
if (typeof WeakMap !== "function") return null;
|
|
@@ -52,4 +40,16 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
52
40
|
}
|
|
53
41
|
return newObj;
|
|
54
42
|
}
|
|
43
|
+
// Copyright 2024 The Perses Authors
|
|
44
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
45
|
+
// you may not use this file except in compliance with the License.
|
|
46
|
+
// You may obtain a copy of the License at
|
|
47
|
+
//
|
|
48
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
+
//
|
|
50
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
51
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
52
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
53
|
+
// See the License for the specific language governing permissions and
|
|
54
|
+
// limitations under the License.
|
|
55
55
|
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./bootstrap")));
|
package/lib/cjs/index.js
CHANGED
|
@@ -9,16 +9,9 @@ Object.defineProperty(exports, "getPluginModule", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _getPluginModule = require("./getPluginModule");
|
|
12
|
-
_export_star(require("./CellsEditor"), exports);
|
|
13
|
-
_export_star(require("./ColumnsEditor"), exports);
|
|
14
12
|
_export_star(require("./Table"), exports);
|
|
15
|
-
_export_star(require("./
|
|
16
|
-
_export_star(require("./
|
|
17
|
-
_export_star(require("./TablePanel"), exports);
|
|
18
|
-
_export_star(require("./TableSettingsEditor"), exports);
|
|
19
|
-
_export_star(require("./TableTransformsEditor"), exports);
|
|
20
|
-
_export_star(require("./model"), exports);
|
|
21
|
-
_export_star(require("./table-model"), exports);
|
|
13
|
+
_export_star(require("./components"), exports);
|
|
14
|
+
_export_star(require("./models"), exports);
|
|
22
15
|
function _export_star(from, to) {
|
|
23
16
|
Object.keys(from).forEach(function(k) {
|
|
24
17
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2025 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
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
_export_star(require("./model"), exports);
|
|
18
|
+
_export_star(require("./table-model"), exports);
|
|
19
|
+
function _export_star(from, to) {
|
|
20
|
+
Object.keys(from).forEach(function(k) {
|
|
21
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
22
|
+
Object.defineProperty(to, k, {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return from[k];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return from;
|
|
31
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -14,14 +14,3 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
Object.defineProperty(exports, "createInitialTableOptions", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return createInitialTableOptions;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
function createInitialTableOptions() {
|
|
24
|
-
return {
|
|
25
|
-
density: 'standard'
|
|
26
|
-
};
|
|
27
|
-
}
|
|
@@ -0,0 +1,252 @@
|
|
|
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
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
function _export(target, all) {
|
|
18
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
get createInitialTableOptions () {
|
|
25
|
+
return createInitialTableOptions;
|
|
26
|
+
},
|
|
27
|
+
get evaluateCondition () {
|
|
28
|
+
return evaluateCondition;
|
|
29
|
+
},
|
|
30
|
+
get evaluateConditionalFormatting () {
|
|
31
|
+
return evaluateConditionalFormatting;
|
|
32
|
+
},
|
|
33
|
+
get formatCellDisplay () {
|
|
34
|
+
return formatCellDisplay;
|
|
35
|
+
},
|
|
36
|
+
get renderConditionEditor () {
|
|
37
|
+
return renderConditionEditor;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
41
|
+
const _material = require("@mui/material");
|
|
42
|
+
function _interop_require_default(obj) {
|
|
43
|
+
return obj && obj.__esModule ? obj : {
|
|
44
|
+
default: obj
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function createInitialTableOptions() {
|
|
48
|
+
return {
|
|
49
|
+
density: 'standard',
|
|
50
|
+
enableFiltering: true
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function formatCellDisplay(value, setting, defaultText) {
|
|
54
|
+
const baseText = setting.text || defaultText || String(value);
|
|
55
|
+
const displayText = `${setting.prefix ?? ''}${baseText}${setting.suffix ?? ''}`;
|
|
56
|
+
return {
|
|
57
|
+
text: displayText,
|
|
58
|
+
textColor: setting.textColor,
|
|
59
|
+
backgroundColor: setting.backgroundColor
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function evaluateCondition(condition, value) {
|
|
63
|
+
switch(condition.kind){
|
|
64
|
+
case 'Value':
|
|
65
|
+
return condition.spec?.value === String(value);
|
|
66
|
+
case 'Range':
|
|
67
|
+
{
|
|
68
|
+
if (Number.isNaN(Number(value))) return false;
|
|
69
|
+
const numericValue = Number(value);
|
|
70
|
+
// Both min and max defined
|
|
71
|
+
if (condition.spec?.min !== undefined && condition.spec?.max !== undefined) {
|
|
72
|
+
return numericValue >= +condition.spec.min && numericValue <= +condition.spec.max;
|
|
73
|
+
}
|
|
74
|
+
// Only min defined
|
|
75
|
+
if (condition.spec?.min !== undefined) {
|
|
76
|
+
return numericValue >= +condition.spec.min;
|
|
77
|
+
}
|
|
78
|
+
// Only max defined
|
|
79
|
+
if (condition.spec?.max !== undefined) {
|
|
80
|
+
return numericValue <= +condition.spec.max;
|
|
81
|
+
}
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
case 'Regex':
|
|
85
|
+
if (!condition.spec?.expr) return false;
|
|
86
|
+
try {
|
|
87
|
+
const regex = new RegExp(condition.spec.expr);
|
|
88
|
+
return regex.test(String(value));
|
|
89
|
+
} catch {
|
|
90
|
+
return false; // Invalid regex
|
|
91
|
+
}
|
|
92
|
+
case 'Misc':
|
|
93
|
+
switch(condition.spec?.value){
|
|
94
|
+
case 'empty':
|
|
95
|
+
return value === '';
|
|
96
|
+
case 'null':
|
|
97
|
+
return value === null || value === undefined;
|
|
98
|
+
case 'NaN':
|
|
99
|
+
return Number.isNaN(value);
|
|
100
|
+
case 'true':
|
|
101
|
+
return value === true;
|
|
102
|
+
case 'false':
|
|
103
|
+
return value === false;
|
|
104
|
+
default:
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
default:
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function evaluateConditionalFormatting(value, settings) {
|
|
112
|
+
for (const setting of settings){
|
|
113
|
+
if (evaluateCondition(setting.condition, value)) {
|
|
114
|
+
// Handle special default text cases
|
|
115
|
+
let defaultText;
|
|
116
|
+
if (setting.condition.kind === 'Misc') {
|
|
117
|
+
switch(setting.condition.spec?.value){
|
|
118
|
+
case 'null':
|
|
119
|
+
defaultText = 'null';
|
|
120
|
+
break;
|
|
121
|
+
case 'NaN':
|
|
122
|
+
defaultText = 'NaN';
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return formatCellDisplay(value, setting, defaultText);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return undefined; // No conditions matched
|
|
130
|
+
}
|
|
131
|
+
function renderConditionEditor(condition, onChange, size = 'small') {
|
|
132
|
+
if (condition.kind === 'Value') {
|
|
133
|
+
return _react.default.createElement(_material.TextField, {
|
|
134
|
+
label: 'Value',
|
|
135
|
+
placeholder: 'Exact value',
|
|
136
|
+
value: condition.spec?.value ?? '',
|
|
137
|
+
onChange: (e)=>onChange({
|
|
138
|
+
...condition,
|
|
139
|
+
spec: {
|
|
140
|
+
value: e.target.value
|
|
141
|
+
}
|
|
142
|
+
}),
|
|
143
|
+
fullWidth: true,
|
|
144
|
+
size: size
|
|
145
|
+
});
|
|
146
|
+
} else if (condition.kind === 'Range') {
|
|
147
|
+
return _react.default.createElement(_material.Stack, {
|
|
148
|
+
gap: 1,
|
|
149
|
+
direction: 'row'
|
|
150
|
+
}, [
|
|
151
|
+
_react.default.createElement(_material.TextField, {
|
|
152
|
+
key: 'min',
|
|
153
|
+
label: 'From',
|
|
154
|
+
placeholder: 'Start of range',
|
|
155
|
+
value: condition.spec?.min ?? '',
|
|
156
|
+
onChange: (e)=>onChange({
|
|
157
|
+
...condition,
|
|
158
|
+
spec: {
|
|
159
|
+
...condition.spec,
|
|
160
|
+
min: +e.target.value
|
|
161
|
+
}
|
|
162
|
+
}),
|
|
163
|
+
fullWidth: true,
|
|
164
|
+
size: size
|
|
165
|
+
}),
|
|
166
|
+
_react.default.createElement(_material.TextField, {
|
|
167
|
+
key: 'max',
|
|
168
|
+
label: 'To',
|
|
169
|
+
placeholder: 'End of range (inclusive)',
|
|
170
|
+
value: condition.spec?.max ?? '',
|
|
171
|
+
onChange: (e)=>onChange({
|
|
172
|
+
...condition,
|
|
173
|
+
spec: {
|
|
174
|
+
...condition.spec,
|
|
175
|
+
max: +e.target.value
|
|
176
|
+
}
|
|
177
|
+
}),
|
|
178
|
+
fullWidth: true,
|
|
179
|
+
size: size
|
|
180
|
+
})
|
|
181
|
+
]);
|
|
182
|
+
} else if (condition.kind === 'Regex') {
|
|
183
|
+
return _react.default.createElement(_material.TextField, {
|
|
184
|
+
label: 'Regular Expression',
|
|
185
|
+
placeholder: 'JavaScript regular expression',
|
|
186
|
+
value: condition.spec?.expr ?? '',
|
|
187
|
+
onChange: (e)=>onChange({
|
|
188
|
+
...condition,
|
|
189
|
+
spec: {
|
|
190
|
+
expr: e.target.value
|
|
191
|
+
}
|
|
192
|
+
}),
|
|
193
|
+
fullWidth: true,
|
|
194
|
+
size: size
|
|
195
|
+
});
|
|
196
|
+
} else if (condition.kind === 'Misc') {
|
|
197
|
+
const options = [
|
|
198
|
+
{
|
|
199
|
+
value: 'empty',
|
|
200
|
+
label: 'Empty',
|
|
201
|
+
caption: 'Matches empty string'
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
value: 'null',
|
|
205
|
+
label: 'Null',
|
|
206
|
+
caption: 'Matches null or undefined'
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
value: 'NaN',
|
|
210
|
+
label: 'NaN',
|
|
211
|
+
caption: 'Matches Not a Number value'
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
value: 'true',
|
|
215
|
+
label: 'True',
|
|
216
|
+
caption: 'Matches true boolean'
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
value: 'false',
|
|
220
|
+
label: 'False',
|
|
221
|
+
caption: 'Matches false boolean'
|
|
222
|
+
}
|
|
223
|
+
];
|
|
224
|
+
return _react.default.createElement(_material.TextField, {
|
|
225
|
+
select: true,
|
|
226
|
+
label: 'Value',
|
|
227
|
+
value: condition.spec?.value ?? '',
|
|
228
|
+
onChange: (e)=>onChange({
|
|
229
|
+
...condition,
|
|
230
|
+
spec: {
|
|
231
|
+
value: e.target.value
|
|
232
|
+
}
|
|
233
|
+
}),
|
|
234
|
+
fullWidth: true,
|
|
235
|
+
size: size
|
|
236
|
+
}, options.map((option)=>_react.default.createElement(_material.MenuItem, {
|
|
237
|
+
key: option.value,
|
|
238
|
+
value: option.value
|
|
239
|
+
}, _react.default.createElement(_material.Stack, {
|
|
240
|
+
key: 'stack'
|
|
241
|
+
}, [
|
|
242
|
+
_react.default.createElement(_material.Typography, {
|
|
243
|
+
key: 'title'
|
|
244
|
+
}, option.label),
|
|
245
|
+
_react.default.createElement(_material.Typography, {
|
|
246
|
+
key: 'caption',
|
|
247
|
+
variant: 'caption'
|
|
248
|
+
}, option.caption)
|
|
249
|
+
]))));
|
|
250
|
+
}
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
@@ -17,26 +17,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
17
17
|
function _export(target, all) {
|
|
18
18
|
for(var name in all)Object.defineProperty(target, name, {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: all
|
|
20
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
MOCK_NULL_QUERY_RESULT
|
|
24
|
+
get MOCK_NULL_QUERY_RESULT () {
|
|
25
25
|
return MOCK_NULL_QUERY_RESULT;
|
|
26
26
|
},
|
|
27
|
-
MOCK_TIME_SERIES_DATA_MULTIVALUE
|
|
27
|
+
get MOCK_TIME_SERIES_DATA_MULTIVALUE () {
|
|
28
28
|
return MOCK_TIME_SERIES_DATA_MULTIVALUE;
|
|
29
29
|
},
|
|
30
|
-
MOCK_TIME_SERIES_DATA_SINGLEVALUE
|
|
30
|
+
get MOCK_TIME_SERIES_DATA_SINGLEVALUE () {
|
|
31
31
|
return MOCK_TIME_SERIES_DATA_SINGLEVALUE;
|
|
32
32
|
},
|
|
33
|
-
MOCK_TIME_SERIES_QUERY_DEFINITION
|
|
33
|
+
get MOCK_TIME_SERIES_QUERY_DEFINITION () {
|
|
34
34
|
return MOCK_TIME_SERIES_QUERY_DEFINITION;
|
|
35
35
|
},
|
|
36
|
-
MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE
|
|
36
|
+
get MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE () {
|
|
37
37
|
return MOCK_TIME_SERIES_QUERY_RESULT_MULTIVALUE;
|
|
38
38
|
},
|
|
39
|
-
MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE
|
|
39
|
+
get MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE () {
|
|
40
40
|
return MOCK_TIME_SERIES_QUERY_RESULT_SINGLEVALUE;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellsEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/CellsEditor/CellsEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CACjD;AAED,wBAAgB,WAAW,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,YAAY,CAOtF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { ConditionalPanel } from '../ConditionalPanel';
|
|
15
|
+
export function CellsEditor({ cellSettings, onChange }) {
|
|
16
|
+
return /*#__PURE__*/ _jsx(ConditionalPanel, {
|
|
17
|
+
cellSettings: cellSettings,
|
|
18
|
+
onChange: (updatedCellSettings)=>onChange(updatedCellSettings || [])
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=CellsEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/CellsEditor/CellsEditor.tsx"],"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 { ReactElement } from 'react';\nimport { CellSettings } from '../../models';\nimport { ConditionalPanel } from '../ConditionalPanel';\n\nexport interface CellsEditorProps {\n cellSettings: CellSettings[];\n onChange: (cellOptions: CellSettings[]) => void;\n}\n\nexport function CellsEditor({ cellSettings, onChange }: CellsEditorProps): ReactElement {\n return (\n <ConditionalPanel\n cellSettings={cellSettings}\n onChange={(updatedCellSettings) => onChange(updatedCellSettings || [])}\n />\n );\n}\n"],"names":["ConditionalPanel","CellsEditor","cellSettings","onChange","updatedCellSettings"],"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,SAASA,gBAAgB,QAAQ,sBAAsB;AAOvD,OAAO,SAASC,YAAY,EAAEC,YAAY,EAAEC,QAAQ,EAAoB;IACtE,qBACE,KAACH;QACCE,cAAcA;QACdC,UAAU,CAACC,sBAAwBD,SAASC,uBAAuB,EAAE;;AAG3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CellsEditor/index.ts"],"names":[],"mappings":"AAaA,cAAc,eAAe,CAAC"}
|
|
@@ -10,7 +10,6 @@
|
|
|
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
|
-
export * from './CellEditor';
|
|
14
13
|
export * from './CellsEditor';
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/CellsEditor/index.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\nexport * from './CellsEditor';\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,gBAAgB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StackProps } from '@mui/material';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
|
-
import { ColumnSettings } from '
|
|
3
|
+
import { ColumnSettings } from '../../models';
|
|
4
4
|
type OmittedMuiProps = 'children' | 'value' | 'onChange';
|
|
5
5
|
export interface ColumnEditorProps extends Omit<StackProps, OmittedMuiProps> {
|
|
6
6
|
column: ColumnSettings;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ColumnsEditor/ColumnEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA8B,UAAU,EAAqB,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;AAY/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ9C,KAAK,eAAe,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC;IAC1E,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,iBAAiB,GAAG,YAAY,CAkL7F"}
|