@perses-dev/table-plugin 0.13.0 → 0.14.0-beta.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/js/{Table.73b9cec1.js → Table.646f97de.js} +3 -3
- package/__mf/js/async/11.976870d0.js +7 -0
- package/__mf/js/async/11.976870d0.js.LICENSE.txt +102 -0
- package/__mf/js/async/121.b3a4c6cf.js +2 -0
- package/__mf/js/async/153.fa68a9e4.js +1 -0
- package/__mf/js/async/186.ab1e0cb3.js +2 -0
- package/__mf/js/async/192.942516a2.js +1 -0
- package/__mf/js/async/2.6b27d33f.js +1 -0
- package/__mf/js/async/235.c5bac291.js +1 -0
- package/__mf/js/async/274.f7dabfa6.js +2 -0
- package/__mf/js/async/321.96f362a6.js +1 -0
- package/__mf/js/async/35.ba7c1b06.js +1 -0
- package/__mf/js/async/356.d7fe5d24.js +1 -0
- package/__mf/js/async/392.e853a818.js +2 -0
- package/__mf/js/async/413.d44db4b1.js +1 -0
- package/__mf/js/async/465.8425c17a.js +1 -0
- package/__mf/js/async/470.21434f20.js +2 -0
- package/__mf/js/async/522.d6a7c203.js +22 -0
- package/__mf/js/async/534.aff242e9.js +1 -0
- package/__mf/js/async/54.e77ec040.js +1 -0
- package/__mf/js/async/587.0ff26337.js +1 -0
- package/__mf/js/async/616.4e891cf9.js +1 -0
- package/__mf/js/async/663.b3778d4c.js +1 -0
- package/__mf/js/async/700.ccacc909.js +3 -0
- package/__mf/js/async/{868.507e984c.js → 741.7feaa0ba.js} +6 -6
- package/__mf/js/async/862.4c658639.js +2 -0
- package/__mf/js/async/865.b9eb3de4.js +1 -0
- package/__mf/js/async/923.87e55609.js +1 -0
- package/__mf/js/async/941.08c16cb2.js +2 -0
- package/__mf/js/async/968.b7fe9818.js +1 -0
- package/__mf/js/async/985.6129a36c.js +37 -0
- package/__mf/js/async/__federation_expose_Table.f8d0feb7.js +1 -0
- package/__mf/js/async/lib-router.020a2a16.js +2 -0
- package/__mf/js/{main.7b15c841.js → main.276cd542.js} +2 -2
- package/lib/Table.d.ts +3 -3
- package/lib/Table.d.ts.map +1 -1
- package/lib/Table.js +4 -4
- package/lib/Table.js.map +1 -1
- package/lib/TableExportAction.d.ts +3 -3
- package/lib/TableExportAction.d.ts.map +1 -1
- package/lib/TableExportAction.js +6 -6
- package/lib/TableExportAction.js.map +1 -1
- package/lib/bootstrap.js +2 -2
- package/lib/components/CellsEditor/CellsEditor.d.ts +2 -2
- package/lib/components/CellsEditor/CellsEditor.d.ts.map +1 -1
- package/lib/components/CellsEditor/CellsEditor.js +1 -1
- package/lib/components/CellsEditor/CellsEditor.js.map +1 -1
- package/lib/components/CellsEditor/index.js +1 -1
- package/lib/components/CellsEditor/index.js.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditor.d.ts +5 -4
- package/lib/components/ColumnsEditor/ColumnEditor.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditor.js +29 -15
- package/lib/components/ColumnsEditor/ColumnEditor.js.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts +3 -3
- package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditorContainer.js +11 -10
- package/lib/components/ColumnsEditor/ColumnEditorContainer.js.map +1 -1
- package/lib/components/ColumnsEditor/ColumnsEditor.d.ts +4 -3
- package/lib/components/ColumnsEditor/ColumnsEditor.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/ColumnsEditor.js +7 -6
- package/lib/components/ColumnsEditor/ColumnsEditor.js.map +1 -1
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts +2 -2
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.js +4 -4
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.js.map +1 -1
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts +2 -2
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +4 -4
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js.map +1 -1
- package/lib/components/ColumnsEditor/index.js +3 -3
- package/lib/components/ColumnsEditor/index.js.map +1 -1
- package/lib/components/ConditionalPanel.d.ts +3 -3
- package/lib/components/ConditionalPanel.d.ts.map +1 -1
- package/lib/components/ConditionalPanel.js +7 -7
- package/lib/components/ConditionalPanel.js.map +1 -1
- package/lib/components/EmbeddedPanel.d.ts +3 -3
- package/lib/components/EmbeddedPanel.d.ts.map +1 -1
- package/lib/components/EmbeddedPanel.js +4 -4
- package/lib/components/EmbeddedPanel.js.map +1 -1
- package/lib/components/TableCellsEditor.d.ts +3 -3
- package/lib/components/TableCellsEditor.d.ts.map +1 -1
- package/lib/components/TableCellsEditor.js +1 -1
- package/lib/components/TableCellsEditor.js.map +1 -1
- package/lib/components/TableColumnsEditor.d.ts +3 -3
- package/lib/components/TableColumnsEditor.d.ts.map +1 -1
- package/lib/components/TableColumnsEditor.js +3 -2
- package/lib/components/TableColumnsEditor.js.map +1 -1
- package/lib/components/TableItemSelectionActionsEditor.d.ts +2 -2
- package/lib/components/TableItemSelectionActionsEditor.d.ts.map +1 -1
- package/lib/components/TableItemSelectionActionsEditor.js +2 -2
- package/lib/components/TableItemSelectionActionsEditor.js.map +1 -1
- package/lib/components/TablePanel.d.ts +4 -4
- package/lib/components/TablePanel.d.ts.map +1 -1
- package/lib/components/TablePanel.js +196 -99
- package/lib/components/TablePanel.js.map +1 -1
- package/lib/components/TableSettingsEditor.d.ts +2 -2
- package/lib/components/TableSettingsEditor.d.ts.map +1 -1
- package/lib/components/TableSettingsEditor.js +16 -2
- package/lib/components/TableSettingsEditor.js.map +1 -1
- package/lib/components/TableTransformsEditor.d.ts +2 -2
- package/lib/components/TableTransformsEditor.d.ts.map +1 -1
- package/lib/components/TableTransformsEditor.js +2 -2
- package/lib/components/TableTransformsEditor.js.map +1 -1
- package/lib/components/index.js +9 -9
- package/lib/components/index.js.map +1 -1
- package/lib/getPluginModule.d.ts +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +3 -1
- package/lib/getPluginModule.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/models/index.js +2 -2
- package/lib/models/index.js.map +1 -1
- package/lib/models/model.d.ts +1 -1
- package/lib/models/model.d.ts.map +1 -1
- package/lib/models/model.js.map +1 -1
- package/lib/models/table-model.d.ts +4 -3
- package/lib/models/table-model.d.ts.map +1 -1
- package/lib/models/table-model.js +2 -2
- package/lib/models/table-model.js.map +1 -1
- package/lib/setup-tests.d.ts +1 -1
- package/lib/setup-tests.d.ts.map +1 -1
- package/lib/setup-tests.js +8 -2
- package/lib/setup-tests.js.map +1 -1
- package/lib/table-data-utils.d.ts +3 -3
- package/lib/table-data-utils.d.ts.map +1 -1
- package/lib/table-data-utils.js.map +1 -1
- package/lib/test/mock-query-results.d.ts +1 -1
- package/lib/test/mock-query-results.d.ts.map +1 -1
- package/lib/test/mock-query-results.js.map +1 -1
- package/mf-manifest.json +42 -84
- package/mf-stats.json +46 -93
- package/package.json +11 -11
- package/__mf/js/async/1432.4e515509.js +0 -1
- package/__mf/js/async/1589.124ce93d.js +0 -2
- package/__mf/js/async/1589.124ce93d.js.LICENSE.txt +0 -37
- package/__mf/js/async/1616.4828085d.js +0 -1
- package/__mf/js/async/2043.1f09864b.js +0 -2
- package/__mf/js/async/2043.1f09864b.js.LICENSE.txt +0 -24
- package/__mf/js/async/2082.231e8397.js +0 -1
- package/__mf/js/async/2842.a52597e6.js +0 -1
- package/__mf/js/async/392.b6035b41.js +0 -2
- package/__mf/js/async/3981.52e94742.js +0 -3
- package/__mf/js/async/4014.cf88a118.js +0 -7
- package/__mf/js/async/4014.cf88a118.js.LICENSE.txt +0 -39
- package/__mf/js/async/4121.e7df36d6.js +0 -2
- package/__mf/js/async/5002.3eb39a8c.js +0 -1
- package/__mf/js/async/5021.c663603d.js +0 -1
- package/__mf/js/async/5071.839a8f1a.js +0 -1
- package/__mf/js/async/5481.6496fac9.js +0 -2
- package/__mf/js/async/5587.a8a428db.js +0 -1
- package/__mf/js/async/6274.8edae86d.js +0 -2
- package/__mf/js/async/629.8cff215d.js +0 -1
- package/__mf/js/async/6811.9d4b123a.js +0 -38
- package/__mf/js/async/7177.e0e5ba2f.js +0 -1
- package/__mf/js/async/7192.692181c8.js +0 -1
- package/__mf/js/async/7413.c9310b8a.js +0 -1
- package/__mf/js/async/7968.3a9a982e.js +0 -1
- package/__mf/js/async/7978.116e4d81.js +0 -1
- package/__mf/js/async/7984.a8edc213.js +0 -22
- package/__mf/js/async/8356.152d5686.js +0 -1
- package/__mf/js/async/8470.b9762117.js +0 -2
- package/__mf/js/async/873.264fedc9.js +0 -1
- package/__mf/js/async/9051.c4deebd7.js +0 -1
- package/__mf/js/async/9235.c67cdb1d.js +0 -1
- package/__mf/js/async/941.cc458a98.js +0 -2
- package/__mf/js/async/9588.d23e2ed3.js +0 -1
- package/__mf/js/async/9701.9c4cea02.js +0 -1
- package/__mf/js/async/__federation_expose_Table.5d0cfb46.js +0 -1
- package/__mf/js/async/lib-router.3493bbf9.js +0 -2
- package/lib/cjs/Table.js +0 -62
- package/lib/cjs/TableExportAction.js +0 -180
- package/lib/cjs/bootstrap.js +0 -26
- package/lib/cjs/components/CellsEditor/CellsEditor.js +0 -30
- package/lib/cjs/components/CellsEditor/index.js +0 -30
- package/lib/cjs/components/ColumnsEditor/ColumnEditor.js +0 -289
- package/lib/cjs/components/ColumnsEditor/ColumnEditorContainer.js +0 -152
- package/lib/cjs/components/ColumnsEditor/ColumnsEditor.js +0 -108
- package/lib/cjs/components/ColumnsEditor/DataLinkEditorDialog.js +0 -139
- package/lib/cjs/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +0 -124
- package/lib/cjs/components/ColumnsEditor/index.js +0 -32
- package/lib/cjs/components/ConditionalPanel.js +0 -367
- package/lib/cjs/components/EmbeddedPanel.js +0 -52
- package/lib/cjs/components/TableCellsEditor.js +0 -36
- package/lib/cjs/components/TableColumnsEditor.js +0 -36
- package/lib/cjs/components/TableItemSelectionActionsEditor.js +0 -44
- package/lib/cjs/components/TablePanel.js +0 -845
- package/lib/cjs/components/TableSettingsEditor.js +0 -144
- package/lib/cjs/components/TableTransformsEditor.js +0 -36
- package/lib/cjs/components/index.js +0 -38
- package/lib/cjs/env.d.js +0 -14
- package/lib/cjs/getPluginModule.js +0 -39
- package/lib/cjs/index-federation.js +0 -55
- package/lib/cjs/index.js +0 -39
- package/lib/cjs/models/index.js +0 -31
- package/lib/cjs/models/model.js +0 -16
- package/lib/cjs/models/table-model.js +0 -278
- package/lib/cjs/setup-tests.js +0 -19
- package/lib/cjs/table-data-utils.js +0 -84
- package/lib/cjs/test/mock-query-results.js +0 -524
- /package/__mf/css/async/{4014.85c2cbf6.css → 11.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{4121.e7df36d6.js.LICENSE.txt → 121.b3a4c6cf.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.8edae86d.js.LICENSE.txt → 274.f7dabfa6.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.b6035b41.js.LICENSE.txt → 392.e853a818.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.b9762117.js.LICENSE.txt → 470.21434f20.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7984.a8edc213.js.LICENSE.txt → 522.d6a7c203.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{868.507e984c.js.LICENSE.txt → 741.7feaa0ba.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5481.6496fac9.js.LICENSE.txt → 862.4c658639.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.cc458a98.js.LICENSE.txt → 941.08c16cb2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.3493bbf9.js.LICENSE.txt → lib-router.020a2a16.js.LICENSE.txt} +0 -0
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
// Copyright 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 ConditionalPanel () {
|
|
25
|
-
return ConditionalPanel;
|
|
26
|
-
},
|
|
27
|
-
get ConditionalRule () {
|
|
28
|
-
return ConditionalRule;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
32
|
-
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
33
|
-
const _material = require("@mui/material");
|
|
34
|
-
const _DeleteOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/DeleteOutline"));
|
|
35
|
-
const _Plus = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Plus"));
|
|
36
|
-
const _components = require("@perses-dev/components");
|
|
37
|
-
const _models = require("../models");
|
|
38
|
-
function _interop_require_default(obj) {
|
|
39
|
-
return obj && obj.__esModule ? obj : {
|
|
40
|
-
default: obj
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function ConditionalRule({ cell, onChange, onDelete, ...props }) {
|
|
44
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Grid2, {
|
|
45
|
-
container: true,
|
|
46
|
-
spacing: 2,
|
|
47
|
-
...props,
|
|
48
|
-
children: [
|
|
49
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
50
|
-
size: {
|
|
51
|
-
xs: 5
|
|
52
|
-
},
|
|
53
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
54
|
-
direction: "row",
|
|
55
|
-
gap: 1,
|
|
56
|
-
width: "100%",
|
|
57
|
-
children: [
|
|
58
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TextField, {
|
|
59
|
-
select: true,
|
|
60
|
-
label: "Type",
|
|
61
|
-
value: cell.condition.kind,
|
|
62
|
-
onChange: (e)=>onChange({
|
|
63
|
-
...cell,
|
|
64
|
-
condition: {
|
|
65
|
-
kind: e.target.value
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
required: true,
|
|
69
|
-
sx: {
|
|
70
|
-
width: '120px'
|
|
71
|
-
},
|
|
72
|
-
children: [
|
|
73
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
74
|
-
value: "Value",
|
|
75
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
76
|
-
children: [
|
|
77
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
78
|
-
children: "Value"
|
|
79
|
-
}),
|
|
80
|
-
cell.condition.kind !== 'Value' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
81
|
-
variant: "caption",
|
|
82
|
-
children: "Matches an exact text value"
|
|
83
|
-
})
|
|
84
|
-
]
|
|
85
|
-
})
|
|
86
|
-
}),
|
|
87
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
88
|
-
value: "Range",
|
|
89
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
90
|
-
children: [
|
|
91
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
92
|
-
children: "Range"
|
|
93
|
-
}),
|
|
94
|
-
cell.condition.kind !== 'Range' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
95
|
-
variant: "caption",
|
|
96
|
-
children: "Matches against a numerical range"
|
|
97
|
-
})
|
|
98
|
-
]
|
|
99
|
-
})
|
|
100
|
-
}),
|
|
101
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
102
|
-
value: "Regex",
|
|
103
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
104
|
-
children: [
|
|
105
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
106
|
-
children: "Regex"
|
|
107
|
-
}),
|
|
108
|
-
cell.condition.kind !== 'Regex' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
109
|
-
variant: "caption",
|
|
110
|
-
children: "Matches against a regular expression"
|
|
111
|
-
})
|
|
112
|
-
]
|
|
113
|
-
})
|
|
114
|
-
}),
|
|
115
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
116
|
-
value: "Misc",
|
|
117
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
118
|
-
children: [
|
|
119
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
120
|
-
children: "Misc"
|
|
121
|
-
}),
|
|
122
|
-
cell.condition.kind !== 'Misc' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
123
|
-
variant: "caption",
|
|
124
|
-
children: "Matches against empty, null and NaN values"
|
|
125
|
-
})
|
|
126
|
-
]
|
|
127
|
-
})
|
|
128
|
-
})
|
|
129
|
-
]
|
|
130
|
-
}),
|
|
131
|
-
(0, _models.renderConditionEditor)(cell.condition, (updatedCondition)=>onChange({
|
|
132
|
-
...cell,
|
|
133
|
-
condition: updatedCondition
|
|
134
|
-
}), 'small')
|
|
135
|
-
]
|
|
136
|
-
})
|
|
137
|
-
}),
|
|
138
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
139
|
-
size: {
|
|
140
|
-
xs: 4
|
|
141
|
-
},
|
|
142
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
143
|
-
spacing: 1,
|
|
144
|
-
children: [
|
|
145
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
146
|
-
label: "Display text",
|
|
147
|
-
value: cell.text,
|
|
148
|
-
onChange: (e)=>onChange({
|
|
149
|
-
...cell,
|
|
150
|
-
text: e.target.value
|
|
151
|
-
}),
|
|
152
|
-
fullWidth: true,
|
|
153
|
-
size: "small"
|
|
154
|
-
}),
|
|
155
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
156
|
-
direction: "row",
|
|
157
|
-
spacing: 1,
|
|
158
|
-
children: [
|
|
159
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
160
|
-
label: "Prefix",
|
|
161
|
-
placeholder: "$",
|
|
162
|
-
value: cell.prefix ?? '',
|
|
163
|
-
onChange: (e)=>onChange({
|
|
164
|
-
...cell,
|
|
165
|
-
prefix: e.target.value
|
|
166
|
-
}),
|
|
167
|
-
size: "small"
|
|
168
|
-
}),
|
|
169
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
170
|
-
label: "Suffix",
|
|
171
|
-
placeholder: "%",
|
|
172
|
-
value: cell.suffix ?? '',
|
|
173
|
-
onChange: (e)=>onChange({
|
|
174
|
-
...cell,
|
|
175
|
-
suffix: e.target.value
|
|
176
|
-
}),
|
|
177
|
-
size: "small"
|
|
178
|
-
})
|
|
179
|
-
]
|
|
180
|
-
})
|
|
181
|
-
]
|
|
182
|
-
})
|
|
183
|
-
}),
|
|
184
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
185
|
-
size: {
|
|
186
|
-
xs: 1
|
|
187
|
-
},
|
|
188
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
189
|
-
direction: "row",
|
|
190
|
-
justifyContent: "center",
|
|
191
|
-
gap: 1,
|
|
192
|
-
children: cell.textColor ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsColorPicker, {
|
|
193
|
-
label: "Text Color",
|
|
194
|
-
color: cell.textColor ?? '#000',
|
|
195
|
-
onColorChange: (color)=>onChange({
|
|
196
|
-
...cell,
|
|
197
|
-
textColor: color
|
|
198
|
-
}),
|
|
199
|
-
onClear: ()=>onChange({
|
|
200
|
-
...cell,
|
|
201
|
-
textColor: undefined
|
|
202
|
-
})
|
|
203
|
-
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
204
|
-
onClick: ()=>onChange({
|
|
205
|
-
...cell,
|
|
206
|
-
textColor: '#000'
|
|
207
|
-
}),
|
|
208
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Plus.default, {})
|
|
209
|
-
})
|
|
210
|
-
})
|
|
211
|
-
}),
|
|
212
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
213
|
-
size: {
|
|
214
|
-
xs: 1
|
|
215
|
-
},
|
|
216
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
217
|
-
direction: "row",
|
|
218
|
-
justifyContent: "center",
|
|
219
|
-
children: cell.backgroundColor ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsColorPicker, {
|
|
220
|
-
label: "Background Color",
|
|
221
|
-
color: cell.backgroundColor ?? '#fff',
|
|
222
|
-
onColorChange: (color)=>onChange({
|
|
223
|
-
...cell,
|
|
224
|
-
backgroundColor: color
|
|
225
|
-
}),
|
|
226
|
-
onClear: ()=>onChange({
|
|
227
|
-
...cell,
|
|
228
|
-
backgroundColor: undefined
|
|
229
|
-
})
|
|
230
|
-
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
231
|
-
onClick: ()=>onChange({
|
|
232
|
-
...cell,
|
|
233
|
-
backgroundColor: '#000'
|
|
234
|
-
}),
|
|
235
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Plus.default, {})
|
|
236
|
-
})
|
|
237
|
-
})
|
|
238
|
-
}),
|
|
239
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
240
|
-
size: {
|
|
241
|
-
xs: 1
|
|
242
|
-
},
|
|
243
|
-
textAlign: "end",
|
|
244
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tooltip, {
|
|
245
|
-
title: "Remove cell settings",
|
|
246
|
-
placement: "top",
|
|
247
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
248
|
-
size: "small",
|
|
249
|
-
sx: {
|
|
250
|
-
marginLeft: 'auto'
|
|
251
|
-
},
|
|
252
|
-
onClick: onDelete,
|
|
253
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DeleteOutline.default, {})
|
|
254
|
-
}, "delete-cell-button")
|
|
255
|
-
})
|
|
256
|
-
})
|
|
257
|
-
]
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
function ConditionalPanel({ cellSettings = [], onChange, addButtonText = 'Add Conditional Format' }) {
|
|
261
|
-
const handleCellChange = (index, updatedCell)=>{
|
|
262
|
-
const updatedCells = [
|
|
263
|
-
...cellSettings
|
|
264
|
-
];
|
|
265
|
-
updatedCells[index] = updatedCell;
|
|
266
|
-
onChange(updatedCells);
|
|
267
|
-
};
|
|
268
|
-
const handleCellDelete = (index)=>{
|
|
269
|
-
const updatedCells = [
|
|
270
|
-
...cellSettings
|
|
271
|
-
];
|
|
272
|
-
updatedCells.splice(index, 1);
|
|
273
|
-
onChange(updatedCells.length > 0 ? updatedCells : undefined);
|
|
274
|
-
};
|
|
275
|
-
const handleAddCell = ()=>{
|
|
276
|
-
const updatedCells = [
|
|
277
|
-
...cellSettings
|
|
278
|
-
];
|
|
279
|
-
updatedCells.push({
|
|
280
|
-
condition: {
|
|
281
|
-
kind: 'Value',
|
|
282
|
-
spec: {
|
|
283
|
-
value: ''
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
onChange(updatedCells);
|
|
288
|
-
};
|
|
289
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
290
|
-
spacing: 3,
|
|
291
|
-
sx: {
|
|
292
|
-
mt: 2
|
|
293
|
-
},
|
|
294
|
-
children: [
|
|
295
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Grid2, {
|
|
296
|
-
container: true,
|
|
297
|
-
spacing: 3,
|
|
298
|
-
children: [
|
|
299
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
300
|
-
size: {
|
|
301
|
-
xs: 5
|
|
302
|
-
},
|
|
303
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
304
|
-
variant: "subtitle1",
|
|
305
|
-
children: "Condition"
|
|
306
|
-
})
|
|
307
|
-
}),
|
|
308
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
309
|
-
size: {
|
|
310
|
-
xs: 4
|
|
311
|
-
},
|
|
312
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
313
|
-
variant: "subtitle1",
|
|
314
|
-
children: "Display Text"
|
|
315
|
-
})
|
|
316
|
-
}),
|
|
317
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
318
|
-
size: {
|
|
319
|
-
xs: 1
|
|
320
|
-
},
|
|
321
|
-
textAlign: "center",
|
|
322
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
323
|
-
variant: "subtitle1",
|
|
324
|
-
children: "Color"
|
|
325
|
-
})
|
|
326
|
-
}),
|
|
327
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
328
|
-
size: {
|
|
329
|
-
xs: 1
|
|
330
|
-
},
|
|
331
|
-
textAlign: "center",
|
|
332
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
333
|
-
variant: "subtitle1",
|
|
334
|
-
children: "Background"
|
|
335
|
-
})
|
|
336
|
-
}),
|
|
337
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid2, {
|
|
338
|
-
size: {
|
|
339
|
-
xs: 1
|
|
340
|
-
}
|
|
341
|
-
})
|
|
342
|
-
]
|
|
343
|
-
}),
|
|
344
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
345
|
-
gap: 1.5,
|
|
346
|
-
divider: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Divider, {
|
|
347
|
-
flexItem: true,
|
|
348
|
-
orientation: "horizontal"
|
|
349
|
-
}),
|
|
350
|
-
children: cellSettings.map((cell, i)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(ConditionalRule, {
|
|
351
|
-
cell: cell,
|
|
352
|
-
onChange: (updatedCell)=>handleCellChange(i, updatedCell),
|
|
353
|
-
onDelete: ()=>handleCellDelete(i)
|
|
354
|
-
}, i))
|
|
355
|
-
}),
|
|
356
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
357
|
-
variant: "outlined",
|
|
358
|
-
startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Plus.default, {}),
|
|
359
|
-
sx: {
|
|
360
|
-
marginTop: 1
|
|
361
|
-
},
|
|
362
|
-
onClick: handleAddCell,
|
|
363
|
-
children: addButtonText
|
|
364
|
-
})
|
|
365
|
-
]
|
|
366
|
-
});
|
|
367
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// Copyright 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
|
-
Object.defineProperty(exports, "EmbeddedPanel", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return EmbeddedPanel;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _dashboards = require("@perses-dev/dashboards");
|
|
25
|
-
const _useresizeobserver = /*#__PURE__*/ _interop_require_default(require("use-resize-observer"));
|
|
26
|
-
const _components = require("@perses-dev/components");
|
|
27
|
-
function _interop_require_default(obj) {
|
|
28
|
-
return obj && obj.__esModule ? obj : {
|
|
29
|
-
default: obj
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function EmbeddedPanel({ kind, spec, queryResults }) {
|
|
33
|
-
const { ref, width = 1, height = 1 } = (0, _useresizeobserver.default)();
|
|
34
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
35
|
-
ref: ref,
|
|
36
|
-
style: {
|
|
37
|
-
height: '100%'
|
|
38
|
-
},
|
|
39
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorBoundary, {
|
|
40
|
-
FallbackComponent: _components.ErrorAlert,
|
|
41
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_dashboards.PanelPluginLoader, {
|
|
42
|
-
kind: kind,
|
|
43
|
-
contentDimensions: {
|
|
44
|
-
width,
|
|
45
|
-
height
|
|
46
|
-
},
|
|
47
|
-
spec: spec,
|
|
48
|
-
queryResults: queryResults
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
});
|
|
52
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Copyright 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
|
-
Object.defineProperty(exports, "TableCellsEditor", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return TableCellsEditor;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _CellsEditor = require("./CellsEditor");
|
|
25
|
-
function TableCellsEditor({ onChange, value }) {
|
|
26
|
-
function handleCellsChange(cells) {
|
|
27
|
-
onChange({
|
|
28
|
-
...value,
|
|
29
|
-
cellSettings: cells
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_CellsEditor.CellsEditor, {
|
|
33
|
-
cellSettings: value.cellSettings ?? [],
|
|
34
|
-
onChange: handleCellsChange
|
|
35
|
-
});
|
|
36
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Copyright 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
|
-
Object.defineProperty(exports, "TableColumnsEditor", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return TableColumnsEditor;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _ColumnsEditor = require("./ColumnsEditor");
|
|
25
|
-
function TableColumnsEditor({ onChange, value }) {
|
|
26
|
-
function handleColumnsChange(columns) {
|
|
27
|
-
onChange({
|
|
28
|
-
...value,
|
|
29
|
-
columnSettings: columns
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_ColumnsEditor.ColumnsEditor, {
|
|
33
|
-
columnSettings: value.columnSettings ?? [],
|
|
34
|
-
onChange: handleColumnsChange
|
|
35
|
-
});
|
|
36
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Copyright 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
|
-
Object.defineProperty(exports, "TableItemSelectionActionsEditor", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return TableItemSelectionActionsEditor;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
25
|
-
function TableItemSelectionActionsEditor({ value, onChange }) {
|
|
26
|
-
function handleActionsChange(actions) {
|
|
27
|
-
onChange({
|
|
28
|
-
...value,
|
|
29
|
-
actions: actions
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function handleSelectionChange(selection) {
|
|
33
|
-
onChange({
|
|
34
|
-
...value,
|
|
35
|
-
selection: selection
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.ItemSelectionActionsEditor, {
|
|
39
|
-
actionOptions: value.actions,
|
|
40
|
-
onChangeActions: handleActionsChange,
|
|
41
|
-
selectionOptions: value.selection,
|
|
42
|
-
onChangeSelection: handleSelectionChange
|
|
43
|
-
});
|
|
44
|
-
}
|