@perses-dev/plugin-system 0.39.0 → 0.40.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 (253) hide show
  1. package/dist/cjs/components/CalculationSelector/CalculationSelector.js +6 -4
  2. package/dist/cjs/components/CalculationSelector/index.js +10 -8
  3. package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +381 -0
  4. package/dist/cjs/components/DatasourceEditorForm/index.js +30 -0
  5. package/dist/cjs/components/DatasourceSelect.js +119 -21
  6. package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +18 -16
  7. package/dist/cjs/components/LegendOptionsEditor/index.js +10 -8
  8. package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +23 -28
  9. package/dist/cjs/components/OptionsEditorRadios/index.js +10 -8
  10. package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +6 -4
  11. package/dist/cjs/components/OptionsEditorTabPanel/index.js +10 -8
  12. package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +10 -8
  13. package/dist/cjs/components/OptionsEditorTabs/index.js +10 -8
  14. package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +13 -11
  15. package/dist/cjs/components/PanelSpecEditor/index.js +10 -8
  16. package/dist/cjs/components/PluginEditor/PluginEditor.js +24 -31
  17. package/dist/cjs/components/PluginEditor/index.js +11 -9
  18. package/dist/cjs/components/PluginEditor/plugin-editor-api.js +5 -3
  19. package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +23 -12
  20. package/dist/cjs/components/PluginKindSelect/index.js +10 -8
  21. package/dist/cjs/components/PluginRegistry/PluginRegistry.js +11 -9
  22. package/dist/cjs/components/PluginRegistry/index.js +10 -8
  23. package/dist/cjs/components/PluginRegistry/plugin-indexes.js +6 -2
  24. package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +6 -4
  25. package/dist/cjs/components/PluginSpecEditor/index.js +10 -8
  26. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +15 -13
  27. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +21 -19
  28. package/dist/cjs/components/TimeSeriesQueryEditor/index.js +10 -8
  29. package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +257 -166
  30. package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +32 -28
  31. package/dist/cjs/components/Variables/VariableEditorForm/index.js +11 -9
  32. package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +28 -32
  33. package/dist/cjs/components/Variables/index.js +11 -9
  34. package/dist/cjs/components/Variables/variable-model.js +17 -9
  35. package/dist/cjs/components/index.js +22 -19
  36. package/dist/cjs/constants/index.js +10 -8
  37. package/dist/cjs/constants/user-interface-text.js +3 -1
  38. package/dist/cjs/index.js +16 -13
  39. package/dist/cjs/model/index.js +17 -15
  40. package/dist/cjs/model/legend.js +32 -20
  41. package/dist/cjs/model/panels.js +2 -2
  42. package/dist/cjs/model/plugin-base.js +2 -2
  43. package/dist/cjs/model/plugin-loading.js +3 -1
  44. package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +19 -11
  45. package/dist/cjs/runtime/DataQueriesProvider/index.js +11 -9
  46. package/dist/cjs/runtime/DataQueriesProvider/model.js +12 -8
  47. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +19 -11
  48. package/dist/cjs/runtime/TimeRangeProvider/index.js +11 -9
  49. package/dist/cjs/runtime/TimeRangeProvider/query-params.js +36 -18
  50. package/dist/cjs/runtime/builtin-variables.js +81 -0
  51. package/dist/cjs/runtime/datasources.js +29 -11
  52. package/dist/cjs/runtime/index.js +16 -13
  53. package/dist/cjs/runtime/plugin-registry.js +41 -11
  54. package/dist/cjs/runtime/template-variables.js +42 -12
  55. package/dist/cjs/runtime/time-series-queries.js +39 -27
  56. package/dist/cjs/stories/shared-utils/decorators/WithDataQueries.js +7 -5
  57. package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +16 -14
  58. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +42 -0
  59. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +19 -13
  60. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js +6 -4
  61. package/dist/cjs/stories/shared-utils/decorators/WithTimeRange.js +7 -5
  62. package/dist/cjs/stories/shared-utils/decorators/index.js +15 -12
  63. package/dist/cjs/stories/shared-utils/index.js +10 -8
  64. package/dist/cjs/test/index.js +11 -9
  65. package/dist/cjs/test/mock-data.js +3 -1
  66. package/dist/cjs/test/render.js +13 -11
  67. package/dist/cjs/test/test-plugins/bert/index.js +14 -10
  68. package/dist/cjs/test/test-plugins/ernie/index.js +13 -9
  69. package/dist/cjs/test/test-plugins/index.js +11 -9
  70. package/dist/cjs/test-utils/index.js +10 -8
  71. package/dist/cjs/test-utils/mock-plugin-registry.js +8 -4
  72. package/dist/cjs/utils/action.js +43 -0
  73. package/dist/cjs/utils/index.js +11 -8
  74. package/dist/cjs/utils/variables.js +26 -8
  75. package/dist/cjs/validation/datasource.js +30 -0
  76. package/dist/cjs/validation/index.js +32 -0
  77. package/dist/cjs/validation/resource.js +24 -0
  78. package/dist/cjs/validation/variable.js +29 -0
  79. package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
  80. package/dist/components/CalculationSelector/index.js.map +1 -1
  81. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +15 -0
  82. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -0
  83. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +334 -0
  84. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -0
  85. package/dist/components/DatasourceEditorForm/index.d.ts +2 -0
  86. package/dist/components/DatasourceEditorForm/index.d.ts.map +1 -0
  87. package/dist/components/DatasourceEditorForm/index.js +15 -0
  88. package/dist/components/DatasourceEditorForm/index.js.map +1 -0
  89. package/dist/components/DatasourceSelect.d.ts +5 -0
  90. package/dist/components/DatasourceSelect.d.ts.map +1 -1
  91. package/dist/components/DatasourceSelect.js +102 -19
  92. package/dist/components/DatasourceSelect.js.map +1 -1
  93. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +2 -2
  94. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
  95. package/dist/components/LegendOptionsEditor/index.js.map +1 -1
  96. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +2 -2
  97. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
  98. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +16 -23
  99. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
  100. package/dist/components/OptionsEditorRadios/index.js.map +1 -1
  101. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
  102. package/dist/components/OptionsEditorTabPanel/index.js.map +1 -1
  103. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  104. package/dist/components/OptionsEditorTabs/index.js.map +1 -1
  105. package/dist/components/PanelSpecEditor/PanelSpecEditor.js +2 -2
  106. package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
  107. package/dist/components/PanelSpecEditor/index.js.map +1 -1
  108. package/dist/components/PluginEditor/PluginEditor.js +15 -24
  109. package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
  110. package/dist/components/PluginEditor/index.js.map +1 -1
  111. package/dist/components/PluginEditor/plugin-editor-api.d.ts +1 -1
  112. package/dist/components/PluginEditor/plugin-editor-api.js +2 -2
  113. package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
  114. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +3 -3
  115. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
  116. package/dist/components/PluginKindSelect/PluginKindSelect.js +21 -12
  117. package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
  118. package/dist/components/PluginKindSelect/index.js.map +1 -1
  119. package/dist/components/PluginRegistry/PluginRegistry.js +3 -3
  120. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  121. package/dist/components/PluginRegistry/index.js.map +1 -1
  122. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  123. package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
  124. package/dist/components/PluginSpecEditor/index.js.map +1 -1
  125. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +4 -4
  126. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -1
  127. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +1 -1
  128. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -1
  129. package/dist/components/TimeSeriesQueryEditor/index.js.map +1 -1
  130. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +10 -7
  131. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  132. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +201 -112
  133. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  134. package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
  135. package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
  136. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +5 -4
  137. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
  138. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +22 -30
  139. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
  140. package/dist/components/Variables/index.js.map +1 -1
  141. package/dist/components/Variables/variable-model.js +3 -3
  142. package/dist/components/Variables/variable-model.js.map +1 -1
  143. package/dist/components/index.d.ts +1 -0
  144. package/dist/components/index.d.ts.map +1 -1
  145. package/dist/components/index.js +1 -0
  146. package/dist/components/index.js.map +1 -1
  147. package/dist/constants/index.js.map +1 -1
  148. package/dist/constants/user-interface-text.js.map +1 -1
  149. package/dist/index.d.ts +1 -0
  150. package/dist/index.d.ts.map +1 -1
  151. package/dist/index.js +1 -0
  152. package/dist/index.js.map +1 -1
  153. package/dist/model/datasource.d.ts +2 -1
  154. package/dist/model/datasource.d.ts.map +1 -1
  155. package/dist/model/datasource.js.map +1 -1
  156. package/dist/model/index.js.map +1 -1
  157. package/dist/model/legend.d.ts +1 -1
  158. package/dist/model/legend.d.ts.map +1 -1
  159. package/dist/model/legend.js +14 -14
  160. package/dist/model/legend.js.map +1 -1
  161. package/dist/model/panels.js.map +1 -1
  162. package/dist/model/plugin-base.js.map +1 -1
  163. package/dist/model/plugin-loading.js.map +1 -1
  164. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +4 -4
  165. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  166. package/dist/runtime/DataQueriesProvider/index.js.map +1 -1
  167. package/dist/runtime/DataQueriesProvider/model.d.ts +3 -2
  168. package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
  169. package/dist/runtime/DataQueriesProvider/model.js +4 -4
  170. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  171. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  172. package/dist/runtime/TimeRangeProvider/index.js.map +1 -1
  173. package/dist/runtime/TimeRangeProvider/query-params.js +1 -1
  174. package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
  175. package/dist/runtime/builtin-variables.d.ts +11 -0
  176. package/dist/runtime/builtin-variables.d.ts.map +1 -0
  177. package/dist/runtime/builtin-variables.js +59 -0
  178. package/dist/runtime/builtin-variables.js.map +1 -0
  179. package/dist/runtime/datasources.d.ts +14 -6
  180. package/dist/runtime/datasources.d.ts.map +1 -1
  181. package/dist/runtime/datasources.js +13 -6
  182. package/dist/runtime/datasources.js.map +1 -1
  183. package/dist/runtime/index.d.ts +1 -0
  184. package/dist/runtime/index.d.ts.map +1 -1
  185. package/dist/runtime/index.js +1 -0
  186. package/dist/runtime/index.js.map +1 -1
  187. package/dist/runtime/plugin-registry.d.ts +2 -0
  188. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  189. package/dist/runtime/plugin-registry.js +19 -2
  190. package/dist/runtime/plugin-registry.js.map +1 -1
  191. package/dist/runtime/template-variables.d.ts +2 -1
  192. package/dist/runtime/template-variables.d.ts.map +1 -1
  193. package/dist/runtime/template-variables.js +27 -8
  194. package/dist/runtime/template-variables.js.map +1 -1
  195. package/dist/runtime/time-series-queries.d.ts +3 -3
  196. package/dist/runtime/time-series-queries.d.ts.map +1 -1
  197. package/dist/runtime/time-series-queries.js +14 -12
  198. package/dist/runtime/time-series-queries.js.map +1 -1
  199. package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
  200. package/dist/stories/shared-utils/decorators/WithPluginRegistry.js.map +1 -1
  201. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +13 -0
  202. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -0
  203. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +39 -0
  204. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -0
  205. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
  206. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +11 -7
  207. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
  208. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +1 -1
  209. package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
  210. package/dist/stories/shared-utils/decorators/index.d.ts +1 -0
  211. package/dist/stories/shared-utils/decorators/index.d.ts.map +1 -1
  212. package/dist/stories/shared-utils/decorators/index.js +1 -0
  213. package/dist/stories/shared-utils/decorators/index.js.map +1 -1
  214. package/dist/stories/shared-utils/index.js.map +1 -1
  215. package/dist/test/index.js.map +1 -1
  216. package/dist/test/mock-data.js.map +1 -1
  217. package/dist/test/render.js +2 -2
  218. package/dist/test/render.js.map +1 -1
  219. package/dist/test/setup-tests.js.map +1 -1
  220. package/dist/test/test-plugins/bert/index.js.map +1 -1
  221. package/dist/test/test-plugins/ernie/index.js.map +1 -1
  222. package/dist/test/test-plugins/index.js.map +1 -1
  223. package/dist/test-utils/index.js.map +1 -1
  224. package/dist/test-utils/mock-plugin-registry.js +2 -2
  225. package/dist/test-utils/mock-plugin-registry.js.map +1 -1
  226. package/dist/utils/action.d.ts +4 -0
  227. package/dist/utils/action.d.ts.map +1 -0
  228. package/dist/utils/action.js +27 -0
  229. package/dist/utils/action.js.map +1 -0
  230. package/dist/utils/index.d.ts +1 -0
  231. package/dist/utils/index.d.ts.map +1 -1
  232. package/dist/utils/index.js +1 -0
  233. package/dist/utils/index.js.map +1 -1
  234. package/dist/utils/variables.d.ts.map +1 -1
  235. package/dist/utils/variables.js +17 -5
  236. package/dist/utils/variables.js.map +1 -1
  237. package/dist/validation/datasource.d.ts +19 -0
  238. package/dist/validation/datasource.d.ts.map +1 -0
  239. package/dist/validation/datasource.js +22 -0
  240. package/dist/validation/datasource.js.map +1 -0
  241. package/dist/validation/index.d.ts +4 -0
  242. package/dist/validation/index.d.ts.map +1 -0
  243. package/dist/validation/index.js +17 -0
  244. package/dist/validation/index.js.map +1 -0
  245. package/dist/validation/resource.d.ts +3 -0
  246. package/dist/validation/resource.d.ts.map +1 -0
  247. package/dist/validation/resource.js +16 -0
  248. package/dist/validation/resource.js.map +1 -0
  249. package/dist/validation/variable.d.ts +19 -0
  250. package/dist/validation/variable.d.ts.map +1 -0
  251. package/dist/validation/variable.js +21 -0
  252. package/dist/validation/variable.js.map +1 -0
  253. package/package.json +8 -6
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "LegendOptionsEditor", {
18
18
  enumerable: true,
19
- get: ()=>LegendOptionsEditor
19
+ get: function() {
20
+ return LegendOptionsEditor;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
25
  const _core = require("@perses-dev/core");
24
26
  const _components = require("@perses-dev/components");
@@ -102,24 +104,24 @@ function LegendOptionsEditor({ value , onChange }) {
102
104
  }
103
105
  return result;
104
106
  }, []);
105
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
107
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
106
108
  children: [
107
- !isValidLegend && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorAlert, {
109
+ !isValidLegend && /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorAlert, {
108
110
  error: {
109
111
  name: 'invalid-legend',
110
112
  message: 'Invalid legend spec'
111
113
  }
112
114
  }),
113
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.OptionsEditorControl, {
115
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
114
116
  label: "Show",
115
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Switch, {
117
+ control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Switch, {
116
118
  checked: value !== undefined,
117
119
  onChange: handleLegendShowChange
118
120
  })
119
121
  }),
120
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.OptionsEditorControl, {
122
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
121
123
  label: "Position",
122
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.SettingsAutocomplete, {
124
+ control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
123
125
  value: {
124
126
  ...legendPositionConfig,
125
127
  id: currentPosition
@@ -130,9 +132,9 @@ function LegendOptionsEditor({ value , onChange }) {
130
132
  disableClearable: true
131
133
  })
132
134
  }),
133
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.OptionsEditorControl, {
135
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
134
136
  label: "Mode",
135
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.SettingsAutocomplete, {
137
+ control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
136
138
  value: {
137
139
  ...legendModeConfig,
138
140
  id: currentMode
@@ -143,9 +145,9 @@ function LegendOptionsEditor({ value , onChange }) {
143
145
  disableClearable: true
144
146
  })
145
147
  }),
146
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.OptionsEditorControl, {
148
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
147
149
  label: "Size",
148
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.SettingsAutocomplete, {
150
+ control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
149
151
  value: {
150
152
  ...legendSizeConfig,
151
153
  id: currentSize
@@ -154,23 +156,23 @@ function LegendOptionsEditor({ value , onChange }) {
154
156
  onChange: handleLegendSizeChange,
155
157
  // TODO: enable sizes for list mode when we normalize the layout of
156
158
  // lists to more closely match tables.
157
- disabled: value === undefined || currentMode !== 'Table',
159
+ disabled: value === undefined || currentMode !== 'table',
158
160
  disableClearable: true
159
161
  })
160
162
  }),
161
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.OptionsEditorControl, {
163
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
162
164
  label: "Values",
163
165
  control: // For some reason, the inferred option type doesn't always seem to work
164
166
  // quite right when `multiple` is true. Explicitly setting the generics
165
167
  // to work around this.
166
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.SettingsAutocomplete, {
168
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
167
169
  multiple: true,
168
170
  disableCloseOnSelect: true,
169
171
  disableClearable: true,
170
172
  value: legendValuesConfig,
171
173
  options: VALUE_OPTIONS,
172
174
  onChange: handleLegendValueChange,
173
- disabled: value === undefined || currentMode !== 'Table',
175
+ disabled: value === undefined || currentMode !== 'table',
174
176
  limitTags: 1,
175
177
  ChipProps: {
176
178
  size: 'small'
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./LegendOptionsEditor"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./LegendOptionsEditor"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,12 +16,14 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "OptionsEditorRadios", {
18
18
  enumerable: true,
19
- get: ()=>OptionsEditorRadios
19
+ get: function() {
20
+ return OptionsEditorRadios;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
25
  const _react = require("react");
24
- const _optionsEditorTabPanel = require("../OptionsEditorTabPanel");
26
+ const _OptionsEditorTabPanel = require("../OptionsEditorTabPanel");
25
27
  const OptionsEditorRadios = (props)=>{
26
28
  const { tabs , defaultTab , onModeChange , isReadonly } = props;
27
29
  const [activeTab, setActiveTab] = (0, _react.useState)(defaultTab);
@@ -30,40 +32,33 @@ const OptionsEditorRadios = (props)=>{
30
32
  setActiveTab(v);
31
33
  onModeChange(v);
32
34
  };
33
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
35
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
34
36
  children: [
35
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
37
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
36
38
  sx: {
37
39
  borderBottom: 1,
38
40
  borderColor: (theme)=>theme.palette.divider
39
41
  },
40
- children: /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.FormControl, {
41
- children: [
42
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
43
- variant: "overline",
44
- component: "h4",
45
- children: "Mode:"
46
- }),
47
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.RadioGroup, {
48
- row: true,
49
- defaultValue: defaultTab,
50
- value: activeTab,
51
- onChange: handleChange,
52
- "aria-labelledby": "Configuration radio",
53
- children: tabs.map(({ label }, i)=>{
54
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.FormControlLabel, {
55
- disabled: isReadonly,
56
- value: i,
57
- control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Radio, {}),
58
- label: label
59
- }, label);
60
- })
42
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormControl, {
43
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.RadioGroup, {
44
+ row: true,
45
+ defaultValue: defaultTab,
46
+ value: activeTab,
47
+ onChange: handleChange,
48
+ "aria-labelledby": "Configuration radio",
49
+ children: tabs.map(({ label }, i)=>{
50
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormControlLabel, {
51
+ disabled: isReadonly,
52
+ value: i,
53
+ control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Radio, {}),
54
+ label: label
55
+ }, label);
61
56
  })
62
- ]
57
+ })
63
58
  })
64
59
  }),
65
60
  tabs.map(({ label , content }, i)=>{
66
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorTabPanel.OptionsEditorTabPanel, {
61
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabPanel.OptionsEditorTabPanel, {
67
62
  value: activeTab,
68
63
  index: i,
69
64
  children: content
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./OptionsEditorRadios"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./OptionsEditorRadios"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,20 +16,22 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "OptionsEditorTabPanel", {
18
18
  enumerable: true,
19
- get: ()=>OptionsEditorTabPanel
19
+ get: function() {
20
+ return OptionsEditorTabPanel;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
25
  function OptionsEditorTabPanel(props) {
24
26
  const { children , value , index , ...other } = props;
25
27
  const isActive = value === index;
26
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)("div", {
28
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
27
29
  role: "tabpanel",
28
30
  hidden: !isActive,
29
31
  id: `options-editor-tabpanel-${index}`,
30
32
  "aria-labelledby": `options-editor-tab-${index}`,
31
33
  ...other,
32
- children: isActive && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
34
+ children: isActive && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
33
35
  mt: 2,
34
36
  children: children
35
37
  })
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./OptionsEditorTabPanel"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./OptionsEditorTabPanel"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,30 +16,32 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "OptionsEditorTabs", {
18
18
  enumerable: true,
19
- get: ()=>OptionsEditorTabs
19
+ get: function() {
20
+ return OptionsEditorTabs;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
25
  const _react = require("react");
24
- const _optionsEditorTabPanel = require("../OptionsEditorTabPanel");
26
+ const _OptionsEditorTabPanel = require("../OptionsEditorTabPanel");
25
27
  const OptionsEditorTabs = ({ tabs })=>{
26
28
  const [activeTab, setActiveTab] = (0, _react.useState)(0);
27
29
  const handleChange = (_, newValue)=>{
28
30
  setActiveTab(newValue);
29
31
  };
30
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
32
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
31
33
  children: [
32
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
34
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
33
35
  sx: {
34
36
  borderBottom: 1,
35
37
  borderColor: (theme)=>theme.palette.divider
36
38
  },
37
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Tabs, {
39
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tabs, {
38
40
  value: activeTab,
39
41
  onChange: handleChange,
40
42
  "aria-label": "Panel configuration tabs",
41
43
  children: tabs.map(({ label }, i)=>{
42
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Tab, {
44
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tab, {
43
45
  label: label,
44
46
  id: `options-editor-tab-${i}`,
45
47
  "aria-controls": `options-editor-tabpanel-${i}`
@@ -48,7 +50,7 @@ const OptionsEditorTabs = ({ tabs })=>{
48
50
  })
49
51
  }),
50
52
  tabs.map(({ label , content }, i)=>{
51
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorTabPanel.OptionsEditorTabPanel, {
53
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabPanel.OptionsEditorTabPanel, {
52
54
  value: activeTab,
53
55
  index: i,
54
56
  children: content
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./OptionsEditorTabs"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./OptionsEditorTabs"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,19 +16,21 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "PanelSpecEditor", {
18
18
  enumerable: true,
19
- get: ()=>PanelSpecEditor
19
+ get: function() {
20
+ return PanelSpecEditor;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _components = require("@perses-dev/components");
23
25
  const _runtime = require("../../runtime");
24
- const _optionsEditorTabs = require("../OptionsEditorTabs");
25
- const _timeSeriesQueryEditor = require("../TimeSeriesQueryEditor");
26
+ const _OptionsEditorTabs = require("../OptionsEditorTabs");
27
+ const _TimeSeriesQueryEditor = require("../TimeSeriesQueryEditor");
26
28
  function PanelSpecEditor(props) {
27
29
  const { panelDefinition , onJSONChange , onQueriesChange , onPluginSpecChange } = props;
28
30
  const { kind } = panelDefinition.spec.plugin;
29
31
  const { data: plugin , isLoading , error } = (0, _runtime.usePlugin)('Panel', kind);
30
32
  if (error) {
31
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorAlert, {
33
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorAlert, {
32
34
  error: error
33
35
  });
34
36
  }
@@ -42,12 +44,12 @@ function PanelSpecEditor(props) {
42
44
  const { panelOptionsEditorComponents , hideQueryEditor } = plugin;
43
45
  let tabs = [];
44
46
  if (!hideQueryEditor) {
45
- var _queries;
47
+ var _panelDefinition_spec_queries;
46
48
  // Since we only support TimeSeriesQuery for now, we will always show a TimeSeriesQueryEditor
47
49
  tabs.push({
48
50
  label: 'Query',
49
- content: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_timeSeriesQueryEditor.TimeSeriesQueryEditor, {
50
- queries: (_queries = panelDefinition.spec.queries) !== null && _queries !== void 0 ? _queries : [],
51
+ content: /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeSeriesQueryEditor.TimeSeriesQueryEditor, {
52
+ queries: (_panelDefinition_spec_queries = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries !== void 0 ? _panelDefinition_spec_queries : [],
51
53
  onChange: onQueriesChange
52
54
  })
53
55
  });
@@ -55,7 +57,7 @@ function PanelSpecEditor(props) {
55
57
  if (panelOptionsEditorComponents !== undefined) {
56
58
  tabs = tabs.concat(panelOptionsEditorComponents.map(({ label , content: OptionsEditorComponent })=>({
57
59
  label,
58
- content: /*#__PURE__*/ (0, _jsxRuntime.jsx)(OptionsEditorComponent, {
60
+ content: /*#__PURE__*/ (0, _jsxruntime.jsx)(OptionsEditorComponent, {
59
61
  value: panelDefinition.spec.plugin.spec,
60
62
  onChange: onPluginSpecChange
61
63
  })
@@ -64,12 +66,12 @@ function PanelSpecEditor(props) {
64
66
  // always show json editor by default
65
67
  tabs.push({
66
68
  label: 'JSON',
67
- content: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.JSONEditor, {
69
+ content: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.JSONEditor, {
68
70
  value: panelDefinition,
69
71
  onChange: onJSONChange
70
72
  })
71
73
  });
72
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorTabs.OptionsEditorTabs, {
74
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabs.OptionsEditorTabs, {
73
75
  tabs: tabs
74
76
  }, tabs.length);
75
77
  }
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./PanelSpecEditor"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./PanelSpecEditor"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,48 +16,41 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "PluginEditor", {
18
18
  enumerable: true,
19
- get: ()=>PluginEditor
19
+ get: function() {
20
+ return PluginEditor;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
- const _pluginKindSelect = require("../PluginKindSelect");
24
- const _pluginSpecEditor = require("../PluginSpecEditor");
25
- const _pluginEditorApi = require("./plugin-editor-api");
25
+ const _PluginKindSelect = require("../PluginKindSelect");
26
+ const _PluginSpecEditor = require("../PluginSpecEditor");
27
+ const _plugineditorapi = require("./plugin-editor-api");
26
28
  function PluginEditor(props) {
27
29
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
30
  const { value , pluginType , pluginKindLabel , onChange: _ , isReadonly , ...others } = props;
29
- const { pendingKind , isLoading , error , onKindChange , onSpecChange } = (0, _pluginEditorApi.usePluginEditor)(props);
30
- var ref;
31
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
31
+ const { pendingKind , isLoading , error , onKindChange , onSpecChange } = (0, _plugineditorapi.usePluginEditor)(props);
32
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
32
33
  ...others,
33
34
  children: [
34
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.FormControl, {
35
- margin: "dense",
35
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_PluginKindSelect.PluginKindSelect, {
36
36
  fullWidth: false,
37
- disabled: isLoading,
38
- error: error !== null,
39
37
  sx: {
40
- mb: 1
38
+ mb: 1,
39
+ minWidth: 120
40
+ },
41
+ margin: "dense",
42
+ label: pluginKindLabel,
43
+ pluginType: pluginType,
44
+ disabled: isLoading,
45
+ value: pendingKind !== '' ? pendingKind : value.kind,
46
+ InputProps: {
47
+ readOnly: isReadonly
41
48
  },
42
- children: [
43
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.InputLabel, {
44
- id: "plugin-kind-label",
45
- children: pluginKindLabel
46
- }),
47
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginKindSelect.PluginKindSelect, {
48
- labelId: "plugin-kind-label",
49
- label: pluginKindLabel,
50
- pluginType: pluginType,
51
- value: pendingKind !== '' ? pendingKind : value.kind,
52
- readOnly: isReadonly,
53
- onChange: onKindChange
54
- }),
55
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.FormHelperText, {
56
- children: (ref = error === null || error === void 0 ? void 0 : error.message) !== null && ref !== void 0 ? ref : ''
57
- })
58
- ]
49
+ error: !!error,
50
+ helperText: error === null || error === void 0 ? void 0 : error.message,
51
+ onChange: onKindChange
59
52
  }),
60
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pluginSpecEditor.PluginSpecEditor, {
53
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_PluginSpecEditor.PluginSpecEditor, {
61
54
  pluginType: pluginType,
62
55
  pluginKind: value.kind,
63
56
  value: value.spec,
@@ -14,16 +14,18 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./PluginEditor"), exports);
18
- _exportStar(require("./plugin-editor-api"), exports);
19
- function _exportStar(from, to) {
17
+ _export_star(require("./PluginEditor"), exports);
18
+ _export_star(require("./plugin-editor-api"), exports);
19
+ function _export_star(from, to) {
20
20
  Object.keys(from).forEach(function(k) {
21
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
22
- enumerable: true,
23
- get: function() {
24
- return from[k];
25
- }
26
- });
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
+ }
27
29
  });
28
30
  return from;
29
31
  }
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "usePluginEditor", {
18
18
  enumerable: true,
19
- get: ()=>usePluginEditor
19
+ get: function() {
20
+ return usePluginEditor;
21
+ }
20
22
  });
21
23
  const _core = require("@perses-dev/core");
22
24
  const _react = require("react");
@@ -86,10 +88,10 @@ function usePluginEditor(props) {
86
88
  * When the user tries to change the plugin kind, make sure we have the correct spec for that plugin kind before we
87
89
  * make the switch.
88
90
  */ const onKindChange = (e)=>{
89
- var ref;
91
+ var _prevSpecState_current_pluginType;
90
92
  const nextKind = e.target.value;
91
93
  // If we already have state for this plugin type/kind from a previous selection, just use it
92
- const previousState = (ref = prevSpecState.current[pluginType]) === null || ref === void 0 ? void 0 : ref[nextKind];
94
+ const previousState = (_prevSpecState_current_pluginType = prevSpecState.current[pluginType]) === null || _prevSpecState_current_pluginType === void 0 ? void 0 : _prevSpecState_current_pluginType[nextKind];
93
95
  if (previousState !== undefined) {
94
96
  rememberCurrentSpecState();
95
97
  onChange({
@@ -16,26 +16,37 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "PluginKindSelect", {
18
18
  enumerable: true,
19
- get: ()=>PluginKindSelect
19
+ get: function() {
20
+ return PluginKindSelect;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
25
+ const _react = require("react");
23
26
  const _runtime = require("../../runtime");
24
- function PluginKindSelect(props) {
27
+ const PluginKindSelect = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
25
28
  const { pluginType , value: propValue , ...others } = props;
26
29
  const { data , isLoading } = (0, _runtime.useListPluginMetadata)(pluginType);
27
30
  // Pass an empty value while options are still loading so MUI doesn't complain about us using an "out of range" value
28
31
  const value = propValue !== '' && isLoading ? '' : propValue;
29
32
  // TODO: Does this need a loading indicator of some kind?
30
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Select, {
31
- sx: {
32
- minWidth: 120
33
- },
33
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TextField, {
34
+ select: true,
35
+ inputRef: ref,
34
36
  ...others,
35
37
  value: value,
36
- children: data === null || data === void 0 ? void 0 : data.map((metadata)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.MenuItem, {
37
- value: metadata.kind,
38
- children: metadata.display.name
39
- }, metadata.kind))
38
+ "data-testid": "plugin-kind-select",
39
+ children: [
40
+ isLoading && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
41
+ value: "",
42
+ children: "Loading..."
43
+ }),
44
+ data === null || data === void 0 ? void 0 : data.map((metadata)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
45
+ "data-testid": "option",
46
+ value: metadata.kind,
47
+ children: metadata.display.name
48
+ }, metadata.kind))
49
+ ]
40
50
  });
41
- }
51
+ });
52
+ PluginKindSelect.displayName = 'PluginKindSelect';