@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.
Files changed (211) hide show
  1. package/__mf/js/{Table.73b9cec1.js → Table.646f97de.js} +3 -3
  2. package/__mf/js/async/11.976870d0.js +7 -0
  3. package/__mf/js/async/11.976870d0.js.LICENSE.txt +102 -0
  4. package/__mf/js/async/121.b3a4c6cf.js +2 -0
  5. package/__mf/js/async/153.fa68a9e4.js +1 -0
  6. package/__mf/js/async/186.ab1e0cb3.js +2 -0
  7. package/__mf/js/async/192.942516a2.js +1 -0
  8. package/__mf/js/async/2.6b27d33f.js +1 -0
  9. package/__mf/js/async/235.c5bac291.js +1 -0
  10. package/__mf/js/async/274.f7dabfa6.js +2 -0
  11. package/__mf/js/async/321.96f362a6.js +1 -0
  12. package/__mf/js/async/35.ba7c1b06.js +1 -0
  13. package/__mf/js/async/356.d7fe5d24.js +1 -0
  14. package/__mf/js/async/392.e853a818.js +2 -0
  15. package/__mf/js/async/413.d44db4b1.js +1 -0
  16. package/__mf/js/async/465.8425c17a.js +1 -0
  17. package/__mf/js/async/470.21434f20.js +2 -0
  18. package/__mf/js/async/522.d6a7c203.js +22 -0
  19. package/__mf/js/async/534.aff242e9.js +1 -0
  20. package/__mf/js/async/54.e77ec040.js +1 -0
  21. package/__mf/js/async/587.0ff26337.js +1 -0
  22. package/__mf/js/async/616.4e891cf9.js +1 -0
  23. package/__mf/js/async/663.b3778d4c.js +1 -0
  24. package/__mf/js/async/700.ccacc909.js +3 -0
  25. package/__mf/js/async/{868.507e984c.js → 741.7feaa0ba.js} +6 -6
  26. package/__mf/js/async/862.4c658639.js +2 -0
  27. package/__mf/js/async/865.b9eb3de4.js +1 -0
  28. package/__mf/js/async/923.87e55609.js +1 -0
  29. package/__mf/js/async/941.08c16cb2.js +2 -0
  30. package/__mf/js/async/968.b7fe9818.js +1 -0
  31. package/__mf/js/async/985.6129a36c.js +37 -0
  32. package/__mf/js/async/__federation_expose_Table.f8d0feb7.js +1 -0
  33. package/__mf/js/async/lib-router.020a2a16.js +2 -0
  34. package/__mf/js/{main.7b15c841.js → main.276cd542.js} +2 -2
  35. package/lib/Table.d.ts +3 -3
  36. package/lib/Table.d.ts.map +1 -1
  37. package/lib/Table.js +4 -4
  38. package/lib/Table.js.map +1 -1
  39. package/lib/TableExportAction.d.ts +3 -3
  40. package/lib/TableExportAction.d.ts.map +1 -1
  41. package/lib/TableExportAction.js +6 -6
  42. package/lib/TableExportAction.js.map +1 -1
  43. package/lib/bootstrap.js +2 -2
  44. package/lib/components/CellsEditor/CellsEditor.d.ts +2 -2
  45. package/lib/components/CellsEditor/CellsEditor.d.ts.map +1 -1
  46. package/lib/components/CellsEditor/CellsEditor.js +1 -1
  47. package/lib/components/CellsEditor/CellsEditor.js.map +1 -1
  48. package/lib/components/CellsEditor/index.js +1 -1
  49. package/lib/components/CellsEditor/index.js.map +1 -1
  50. package/lib/components/ColumnsEditor/ColumnEditor.d.ts +5 -4
  51. package/lib/components/ColumnsEditor/ColumnEditor.d.ts.map +1 -1
  52. package/lib/components/ColumnsEditor/ColumnEditor.js +29 -15
  53. package/lib/components/ColumnsEditor/ColumnEditor.js.map +1 -1
  54. package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts +3 -3
  55. package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts.map +1 -1
  56. package/lib/components/ColumnsEditor/ColumnEditorContainer.js +11 -10
  57. package/lib/components/ColumnsEditor/ColumnEditorContainer.js.map +1 -1
  58. package/lib/components/ColumnsEditor/ColumnsEditor.d.ts +4 -3
  59. package/lib/components/ColumnsEditor/ColumnsEditor.d.ts.map +1 -1
  60. package/lib/components/ColumnsEditor/ColumnsEditor.js +7 -6
  61. package/lib/components/ColumnsEditor/ColumnsEditor.js.map +1 -1
  62. package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts +2 -2
  63. package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts.map +1 -1
  64. package/lib/components/ColumnsEditor/DataLinkEditorDialog.js +4 -4
  65. package/lib/components/ColumnsEditor/DataLinkEditorDialog.js.map +1 -1
  66. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts +2 -2
  67. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts.map +1 -1
  68. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +4 -4
  69. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js.map +1 -1
  70. package/lib/components/ColumnsEditor/index.js +3 -3
  71. package/lib/components/ColumnsEditor/index.js.map +1 -1
  72. package/lib/components/ConditionalPanel.d.ts +3 -3
  73. package/lib/components/ConditionalPanel.d.ts.map +1 -1
  74. package/lib/components/ConditionalPanel.js +7 -7
  75. package/lib/components/ConditionalPanel.js.map +1 -1
  76. package/lib/components/EmbeddedPanel.d.ts +3 -3
  77. package/lib/components/EmbeddedPanel.d.ts.map +1 -1
  78. package/lib/components/EmbeddedPanel.js +4 -4
  79. package/lib/components/EmbeddedPanel.js.map +1 -1
  80. package/lib/components/TableCellsEditor.d.ts +3 -3
  81. package/lib/components/TableCellsEditor.d.ts.map +1 -1
  82. package/lib/components/TableCellsEditor.js +1 -1
  83. package/lib/components/TableCellsEditor.js.map +1 -1
  84. package/lib/components/TableColumnsEditor.d.ts +3 -3
  85. package/lib/components/TableColumnsEditor.d.ts.map +1 -1
  86. package/lib/components/TableColumnsEditor.js +3 -2
  87. package/lib/components/TableColumnsEditor.js.map +1 -1
  88. package/lib/components/TableItemSelectionActionsEditor.d.ts +2 -2
  89. package/lib/components/TableItemSelectionActionsEditor.d.ts.map +1 -1
  90. package/lib/components/TableItemSelectionActionsEditor.js +2 -2
  91. package/lib/components/TableItemSelectionActionsEditor.js.map +1 -1
  92. package/lib/components/TablePanel.d.ts +4 -4
  93. package/lib/components/TablePanel.d.ts.map +1 -1
  94. package/lib/components/TablePanel.js +196 -99
  95. package/lib/components/TablePanel.js.map +1 -1
  96. package/lib/components/TableSettingsEditor.d.ts +2 -2
  97. package/lib/components/TableSettingsEditor.d.ts.map +1 -1
  98. package/lib/components/TableSettingsEditor.js +16 -2
  99. package/lib/components/TableSettingsEditor.js.map +1 -1
  100. package/lib/components/TableTransformsEditor.d.ts +2 -2
  101. package/lib/components/TableTransformsEditor.d.ts.map +1 -1
  102. package/lib/components/TableTransformsEditor.js +2 -2
  103. package/lib/components/TableTransformsEditor.js.map +1 -1
  104. package/lib/components/index.js +9 -9
  105. package/lib/components/index.js.map +1 -1
  106. package/lib/getPluginModule.d.ts +1 -1
  107. package/lib/getPluginModule.d.ts.map +1 -1
  108. package/lib/getPluginModule.js +3 -1
  109. package/lib/getPluginModule.js.map +1 -1
  110. package/lib/index-federation.js +1 -1
  111. package/lib/index.js +4 -4
  112. package/lib/index.js.map +1 -1
  113. package/lib/models/index.js +2 -2
  114. package/lib/models/index.js.map +1 -1
  115. package/lib/models/model.d.ts +1 -1
  116. package/lib/models/model.d.ts.map +1 -1
  117. package/lib/models/model.js.map +1 -1
  118. package/lib/models/table-model.d.ts +4 -3
  119. package/lib/models/table-model.d.ts.map +1 -1
  120. package/lib/models/table-model.js +2 -2
  121. package/lib/models/table-model.js.map +1 -1
  122. package/lib/setup-tests.d.ts +1 -1
  123. package/lib/setup-tests.d.ts.map +1 -1
  124. package/lib/setup-tests.js +8 -2
  125. package/lib/setup-tests.js.map +1 -1
  126. package/lib/table-data-utils.d.ts +3 -3
  127. package/lib/table-data-utils.d.ts.map +1 -1
  128. package/lib/table-data-utils.js.map +1 -1
  129. package/lib/test/mock-query-results.d.ts +1 -1
  130. package/lib/test/mock-query-results.d.ts.map +1 -1
  131. package/lib/test/mock-query-results.js.map +1 -1
  132. package/mf-manifest.json +42 -84
  133. package/mf-stats.json +46 -93
  134. package/package.json +11 -11
  135. package/__mf/js/async/1432.4e515509.js +0 -1
  136. package/__mf/js/async/1589.124ce93d.js +0 -2
  137. package/__mf/js/async/1589.124ce93d.js.LICENSE.txt +0 -37
  138. package/__mf/js/async/1616.4828085d.js +0 -1
  139. package/__mf/js/async/2043.1f09864b.js +0 -2
  140. package/__mf/js/async/2043.1f09864b.js.LICENSE.txt +0 -24
  141. package/__mf/js/async/2082.231e8397.js +0 -1
  142. package/__mf/js/async/2842.a52597e6.js +0 -1
  143. package/__mf/js/async/392.b6035b41.js +0 -2
  144. package/__mf/js/async/3981.52e94742.js +0 -3
  145. package/__mf/js/async/4014.cf88a118.js +0 -7
  146. package/__mf/js/async/4014.cf88a118.js.LICENSE.txt +0 -39
  147. package/__mf/js/async/4121.e7df36d6.js +0 -2
  148. package/__mf/js/async/5002.3eb39a8c.js +0 -1
  149. package/__mf/js/async/5021.c663603d.js +0 -1
  150. package/__mf/js/async/5071.839a8f1a.js +0 -1
  151. package/__mf/js/async/5481.6496fac9.js +0 -2
  152. package/__mf/js/async/5587.a8a428db.js +0 -1
  153. package/__mf/js/async/6274.8edae86d.js +0 -2
  154. package/__mf/js/async/629.8cff215d.js +0 -1
  155. package/__mf/js/async/6811.9d4b123a.js +0 -38
  156. package/__mf/js/async/7177.e0e5ba2f.js +0 -1
  157. package/__mf/js/async/7192.692181c8.js +0 -1
  158. package/__mf/js/async/7413.c9310b8a.js +0 -1
  159. package/__mf/js/async/7968.3a9a982e.js +0 -1
  160. package/__mf/js/async/7978.116e4d81.js +0 -1
  161. package/__mf/js/async/7984.a8edc213.js +0 -22
  162. package/__mf/js/async/8356.152d5686.js +0 -1
  163. package/__mf/js/async/8470.b9762117.js +0 -2
  164. package/__mf/js/async/873.264fedc9.js +0 -1
  165. package/__mf/js/async/9051.c4deebd7.js +0 -1
  166. package/__mf/js/async/9235.c67cdb1d.js +0 -1
  167. package/__mf/js/async/941.cc458a98.js +0 -2
  168. package/__mf/js/async/9588.d23e2ed3.js +0 -1
  169. package/__mf/js/async/9701.9c4cea02.js +0 -1
  170. package/__mf/js/async/__federation_expose_Table.5d0cfb46.js +0 -1
  171. package/__mf/js/async/lib-router.3493bbf9.js +0 -2
  172. package/lib/cjs/Table.js +0 -62
  173. package/lib/cjs/TableExportAction.js +0 -180
  174. package/lib/cjs/bootstrap.js +0 -26
  175. package/lib/cjs/components/CellsEditor/CellsEditor.js +0 -30
  176. package/lib/cjs/components/CellsEditor/index.js +0 -30
  177. package/lib/cjs/components/ColumnsEditor/ColumnEditor.js +0 -289
  178. package/lib/cjs/components/ColumnsEditor/ColumnEditorContainer.js +0 -152
  179. package/lib/cjs/components/ColumnsEditor/ColumnsEditor.js +0 -108
  180. package/lib/cjs/components/ColumnsEditor/DataLinkEditorDialog.js +0 -139
  181. package/lib/cjs/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +0 -124
  182. package/lib/cjs/components/ColumnsEditor/index.js +0 -32
  183. package/lib/cjs/components/ConditionalPanel.js +0 -367
  184. package/lib/cjs/components/EmbeddedPanel.js +0 -52
  185. package/lib/cjs/components/TableCellsEditor.js +0 -36
  186. package/lib/cjs/components/TableColumnsEditor.js +0 -36
  187. package/lib/cjs/components/TableItemSelectionActionsEditor.js +0 -44
  188. package/lib/cjs/components/TablePanel.js +0 -845
  189. package/lib/cjs/components/TableSettingsEditor.js +0 -144
  190. package/lib/cjs/components/TableTransformsEditor.js +0 -36
  191. package/lib/cjs/components/index.js +0 -38
  192. package/lib/cjs/env.d.js +0 -14
  193. package/lib/cjs/getPluginModule.js +0 -39
  194. package/lib/cjs/index-federation.js +0 -55
  195. package/lib/cjs/index.js +0 -39
  196. package/lib/cjs/models/index.js +0 -31
  197. package/lib/cjs/models/model.js +0 -16
  198. package/lib/cjs/models/table-model.js +0 -278
  199. package/lib/cjs/setup-tests.js +0 -19
  200. package/lib/cjs/table-data-utils.js +0 -84
  201. package/lib/cjs/test/mock-query-results.js +0 -524
  202. /package/__mf/css/async/{4014.85c2cbf6.css → 11.85c2cbf6.css} +0 -0
  203. /package/__mf/js/async/{4121.e7df36d6.js.LICENSE.txt → 121.b3a4c6cf.js.LICENSE.txt} +0 -0
  204. /package/__mf/js/async/{6274.8edae86d.js.LICENSE.txt → 274.f7dabfa6.js.LICENSE.txt} +0 -0
  205. /package/__mf/js/async/{392.b6035b41.js.LICENSE.txt → 392.e853a818.js.LICENSE.txt} +0 -0
  206. /package/__mf/js/async/{8470.b9762117.js.LICENSE.txt → 470.21434f20.js.LICENSE.txt} +0 -0
  207. /package/__mf/js/async/{7984.a8edc213.js.LICENSE.txt → 522.d6a7c203.js.LICENSE.txt} +0 -0
  208. /package/__mf/js/async/{868.507e984c.js.LICENSE.txt → 741.7feaa0ba.js.LICENSE.txt} +0 -0
  209. /package/__mf/js/async/{5481.6496fac9.js.LICENSE.txt → 862.4c658639.js.LICENSE.txt} +0 -0
  210. /package/__mf/js/async/{941.cc458a98.js.LICENSE.txt → 941.08c16cb2.js.LICENSE.txt} +0 -0
  211. /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
- }