@perses-dev/plugin-system 0.0.0-snapshot-panel-extra-content-2-2767e21 → 0.0.0-snapshot-scatter-chart-embed-8efdfab

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 (373) 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 +350 -0
  4. package/dist/cjs/components/DatasourceEditorForm/index.js +30 -0
  5. package/dist/cjs/components/DatasourceSelect.js +135 -25
  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 +69 -0
  9. package/dist/cjs/components/OptionsEditorRadios/index.js +30 -0
  10. package/dist/cjs/components/{OptionsEditorTabs/TabPanel.js → OptionsEditorTabPanel/OptionsEditorTabPanel.js} +8 -6
  11. package/dist/cjs/components/OptionsEditorTabPanel/index.js +30 -0
  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 +55 -14
  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/ProjectSelect.js +96 -0
  27. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +27 -23
  28. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +21 -19
  29. package/dist/cjs/components/TimeSeriesQueryEditor/index.js +10 -8
  30. package/dist/cjs/components/TraceQueryEditor/TraceQueryEditor.js +143 -0
  31. package/dist/cjs/components/TraceQueryEditor/TraceQueryInput.js +96 -0
  32. package/dist/cjs/components/TraceQueryEditor/index.js +30 -0
  33. package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +438 -229
  34. package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +32 -28
  35. package/dist/cjs/components/Variables/VariableEditorForm/index.js +11 -9
  36. package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +35 -36
  37. package/dist/cjs/components/Variables/index.js +11 -9
  38. package/dist/cjs/components/Variables/variable-model.js +17 -9
  39. package/dist/cjs/components/index.js +23 -18
  40. package/dist/cjs/constants/index.js +10 -8
  41. package/dist/cjs/constants/user-interface-text.js +3 -1
  42. package/dist/cjs/context/ProjectStoreProvider.js +78 -0
  43. package/dist/cjs/context/index.js +30 -0
  44. package/dist/cjs/context/query-params.js +49 -0
  45. package/dist/cjs/index.js +17 -13
  46. package/dist/cjs/model/index.js +18 -15
  47. package/dist/cjs/model/legend.js +32 -20
  48. package/dist/cjs/model/panels.js +2 -2
  49. package/dist/cjs/model/plugin-base.js +2 -2
  50. package/dist/cjs/model/plugin-loading.js +3 -1
  51. package/dist/cjs/model/trace-queries.js +16 -0
  52. package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +67 -35
  53. package/dist/cjs/runtime/DataQueriesProvider/index.js +11 -9
  54. package/dist/cjs/runtime/DataQueriesProvider/model.js +81 -0
  55. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +43 -26
  56. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +43 -0
  57. package/dist/cjs/runtime/TimeRangeProvider/index.js +12 -9
  58. package/dist/cjs/runtime/TimeRangeProvider/query-params.js +41 -55
  59. package/dist/cjs/runtime/TimeRangeProvider/refresh-interval.js +30 -0
  60. package/dist/cjs/runtime/builtin-variables.js +81 -0
  61. package/dist/cjs/runtime/datasources.js +31 -12
  62. package/dist/cjs/runtime/index.js +17 -13
  63. package/dist/cjs/runtime/plugin-registry.js +41 -11
  64. package/dist/cjs/runtime/template-variables.js +96 -4
  65. package/dist/cjs/runtime/time-series-queries.js +39 -27
  66. package/dist/cjs/runtime/trace-queries.js +76 -0
  67. package/dist/cjs/stories/shared-utils/decorators/WithDataQueries.js +7 -5
  68. package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +18 -15
  69. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +42 -0
  70. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +31 -13
  71. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js +6 -4
  72. package/dist/cjs/stories/shared-utils/decorators/WithTimeRange.js +9 -7
  73. package/dist/cjs/stories/shared-utils/decorators/index.js +15 -12
  74. package/dist/cjs/stories/shared-utils/index.js +10 -8
  75. package/dist/cjs/test/index.js +11 -8
  76. package/dist/cjs/test/mock-data.js +80 -0
  77. package/dist/cjs/test/render.js +13 -11
  78. package/dist/cjs/test/test-plugins/bert/index.js +14 -10
  79. package/dist/cjs/test/test-plugins/ernie/index.js +13 -9
  80. package/dist/cjs/test/test-plugins/index.js +11 -9
  81. package/dist/cjs/test-utils/index.js +10 -8
  82. package/dist/cjs/test-utils/mock-plugin-registry.js +8 -4
  83. package/dist/cjs/utils/action.js +43 -0
  84. package/dist/cjs/utils/index.js +11 -8
  85. package/dist/cjs/utils/variables.js +26 -8
  86. package/dist/cjs/validation/datasource.js +30 -0
  87. package/dist/cjs/validation/index.js +33 -0
  88. package/dist/cjs/validation/resource.js +24 -0
  89. package/dist/cjs/validation/role.js +85 -0
  90. package/dist/cjs/validation/rolebinding.js +55 -0
  91. package/dist/cjs/validation/secret.js +176 -0
  92. package/dist/cjs/validation/variable.js +48 -0
  93. package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
  94. package/dist/components/CalculationSelector/index.js.map +1 -1
  95. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +15 -0
  96. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -0
  97. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +342 -0
  98. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -0
  99. package/dist/components/DatasourceEditorForm/index.d.ts +2 -0
  100. package/dist/components/DatasourceEditorForm/index.d.ts.map +1 -0
  101. package/dist/components/DatasourceEditorForm/index.js +15 -0
  102. package/dist/components/DatasourceEditorForm/index.js.map +1 -0
  103. package/dist/components/DatasourceSelect.d.ts +6 -0
  104. package/dist/components/DatasourceSelect.d.ts.map +1 -1
  105. package/dist/components/DatasourceSelect.js +118 -23
  106. package/dist/components/DatasourceSelect.js.map +1 -1
  107. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +2 -2
  108. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
  109. package/dist/components/LegendOptionsEditor/index.js.map +1 -1
  110. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +16 -0
  111. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -0
  112. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +61 -0
  113. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -0
  114. package/dist/components/OptionsEditorRadios/index.d.ts +2 -0
  115. package/dist/components/OptionsEditorRadios/index.d.ts.map +1 -0
  116. package/dist/components/OptionsEditorRadios/index.js +15 -0
  117. package/dist/components/OptionsEditorRadios/index.js.map +1 -0
  118. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +9 -0
  119. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.map +1 -0
  120. package/dist/components/{OptionsEditorTabs/TabPanel.js → OptionsEditorTabPanel/OptionsEditorTabPanel.js} +2 -2
  121. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -0
  122. package/dist/components/OptionsEditorTabPanel/index.d.ts +2 -0
  123. package/dist/components/OptionsEditorTabPanel/index.d.ts.map +1 -0
  124. package/dist/components/OptionsEditorTabPanel/index.js +15 -0
  125. package/dist/components/OptionsEditorTabPanel/index.js.map +1 -0
  126. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +2 -2
  127. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  128. package/dist/components/OptionsEditorTabs/index.js.map +1 -1
  129. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +1 -1
  130. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
  131. package/dist/components/PanelSpecEditor/PanelSpecEditor.js +45 -6
  132. package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
  133. package/dist/components/PanelSpecEditor/index.js.map +1 -1
  134. package/dist/components/PluginEditor/PluginEditor.js +15 -24
  135. package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
  136. package/dist/components/PluginEditor/index.js.map +1 -1
  137. package/dist/components/PluginEditor/plugin-editor-api.d.ts +2 -1
  138. package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
  139. package/dist/components/PluginEditor/plugin-editor-api.js +2 -2
  140. package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
  141. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +3 -3
  142. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
  143. package/dist/components/PluginKindSelect/PluginKindSelect.js +21 -12
  144. package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
  145. package/dist/components/PluginKindSelect/index.js.map +1 -1
  146. package/dist/components/PluginRegistry/PluginRegistry.js +3 -3
  147. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  148. package/dist/components/PluginRegistry/index.js.map +1 -1
  149. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  150. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts +1 -0
  151. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
  152. package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
  153. package/dist/components/PluginSpecEditor/index.js.map +1 -1
  154. package/dist/components/ProjectSelect.d.ts +15 -0
  155. package/dist/components/ProjectSelect.d.ts.map +1 -0
  156. package/dist/components/ProjectSelect.js +91 -0
  157. package/dist/components/ProjectSelect.js.map +1 -0
  158. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -1
  159. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +19 -17
  160. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -1
  161. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +1 -1
  162. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -1
  163. package/dist/components/TimeSeriesQueryEditor/index.js.map +1 -1
  164. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts +9 -0
  165. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts.map +1 -0
  166. package/dist/components/TraceQueryEditor/TraceQueryEditor.js +130 -0
  167. package/dist/components/TraceQueryEditor/TraceQueryEditor.js.map +1 -0
  168. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts +13 -0
  169. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts.map +1 -0
  170. package/dist/components/TraceQueryEditor/TraceQueryInput.js +83 -0
  171. package/dist/components/TraceQueryEditor/TraceQueryInput.js.map +1 -0
  172. package/dist/components/TraceQueryEditor/index.d.ts +2 -0
  173. package/dist/components/TraceQueryEditor/index.d.ts.map +1 -0
  174. package/dist/components/TraceQueryEditor/index.js +15 -0
  175. package/dist/components/TraceQueryEditor/index.js.map +1 -0
  176. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +10 -8
  177. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  178. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +391 -184
  179. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  180. package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
  181. package/dist/components/Variables/VariableEditorForm/index.js.map +1 -1
  182. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +8 -19
  183. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
  184. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +29 -34
  185. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
  186. package/dist/components/Variables/index.js.map +1 -1
  187. package/dist/components/Variables/variable-model.js +3 -3
  188. package/dist/components/Variables/variable-model.js.map +1 -1
  189. package/dist/components/index.d.ts +3 -0
  190. package/dist/components/index.d.ts.map +1 -1
  191. package/dist/components/index.js +3 -0
  192. package/dist/components/index.js.map +1 -1
  193. package/dist/constants/index.js.map +1 -1
  194. package/dist/constants/user-interface-text.js.map +1 -1
  195. package/dist/context/ProjectStoreProvider.d.ts +16 -0
  196. package/dist/context/ProjectStoreProvider.d.ts.map +1 -0
  197. package/dist/context/ProjectStoreProvider.js +56 -0
  198. package/dist/context/ProjectStoreProvider.js.map +1 -0
  199. package/dist/context/index.d.ts +2 -0
  200. package/dist/context/index.d.ts.map +1 -0
  201. package/dist/context/index.js +15 -0
  202. package/dist/context/index.js.map +1 -0
  203. package/dist/context/query-params.d.ts +5 -0
  204. package/dist/context/query-params.d.ts.map +1 -0
  205. package/dist/context/query-params.js +41 -0
  206. package/dist/context/query-params.js.map +1 -0
  207. package/dist/index.d.ts +2 -0
  208. package/dist/index.d.ts.map +1 -1
  209. package/dist/index.js +2 -0
  210. package/dist/index.js.map +1 -1
  211. package/dist/model/datasource.d.ts +2 -1
  212. package/dist/model/datasource.d.ts.map +1 -1
  213. package/dist/model/datasource.js.map +1 -1
  214. package/dist/model/index.d.ts +1 -0
  215. package/dist/model/index.d.ts.map +1 -1
  216. package/dist/model/index.js +1 -0
  217. package/dist/model/index.js.map +1 -1
  218. package/dist/model/legend.d.ts +1 -1
  219. package/dist/model/legend.d.ts.map +1 -1
  220. package/dist/model/legend.js +14 -14
  221. package/dist/model/legend.js.map +1 -1
  222. package/dist/model/panels.d.ts +2 -1
  223. package/dist/model/panels.d.ts.map +1 -1
  224. package/dist/model/panels.js.map +1 -1
  225. package/dist/model/plugin-base.d.ts +1 -0
  226. package/dist/model/plugin-base.d.ts.map +1 -1
  227. package/dist/model/plugin-base.js.map +1 -1
  228. package/dist/model/plugin-loading.js.map +1 -1
  229. package/dist/model/plugins.d.ts +2 -0
  230. package/dist/model/plugins.d.ts.map +1 -1
  231. package/dist/model/plugins.js.map +1 -1
  232. package/dist/model/trace-queries.d.ts +19 -0
  233. package/dist/model/trace-queries.d.ts.map +1 -0
  234. package/dist/model/trace-queries.js +15 -0
  235. package/dist/model/trace-queries.js.map +1 -0
  236. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +5 -5
  237. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
  238. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +52 -28
  239. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  240. package/dist/runtime/DataQueriesProvider/index.js.map +1 -1
  241. package/dist/runtime/DataQueriesProvider/model.d.ts +17 -12
  242. package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
  243. package/dist/runtime/DataQueriesProvider/model.js +67 -1
  244. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  245. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +4 -3
  246. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
  247. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +28 -19
  248. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  249. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts +9 -0
  250. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts.map +1 -0
  251. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +30 -0
  252. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -0
  253. package/dist/runtime/TimeRangeProvider/index.d.ts +1 -0
  254. package/dist/runtime/TimeRangeProvider/index.d.ts.map +1 -1
  255. package/dist/runtime/TimeRangeProvider/index.js +1 -0
  256. package/dist/runtime/TimeRangeProvider/index.js.map +1 -1
  257. package/dist/runtime/TimeRangeProvider/query-params.d.ts +4 -4
  258. package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
  259. package/dist/runtime/TimeRangeProvider/query-params.js +9 -41
  260. package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
  261. package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts +7 -0
  262. package/dist/runtime/TimeRangeProvider/refresh-interval.d.ts.map +1 -0
  263. package/dist/runtime/TimeRangeProvider/refresh-interval.js +25 -0
  264. package/dist/runtime/TimeRangeProvider/refresh-interval.js.map +1 -0
  265. package/dist/runtime/builtin-variables.d.ts +11 -0
  266. package/dist/runtime/builtin-variables.d.ts.map +1 -0
  267. package/dist/runtime/builtin-variables.js +59 -0
  268. package/dist/runtime/builtin-variables.js.map +1 -0
  269. package/dist/runtime/datasources.d.ts +42 -7
  270. package/dist/runtime/datasources.d.ts.map +1 -1
  271. package/dist/runtime/datasources.js +15 -7
  272. package/dist/runtime/datasources.js.map +1 -1
  273. package/dist/runtime/index.d.ts +2 -0
  274. package/dist/runtime/index.d.ts.map +1 -1
  275. package/dist/runtime/index.js +2 -0
  276. package/dist/runtime/index.js.map +1 -1
  277. package/dist/runtime/plugin-registry.d.ts +2 -0
  278. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  279. package/dist/runtime/plugin-registry.js +19 -2
  280. package/dist/runtime/plugin-registry.js.map +1 -1
  281. package/dist/runtime/template-variables.d.ts +62 -2
  282. package/dist/runtime/template-variables.d.ts.map +1 -1
  283. package/dist/runtime/template-variables.js +83 -1
  284. package/dist/runtime/template-variables.js.map +1 -1
  285. package/dist/runtime/time-series-queries.d.ts +3 -3
  286. package/dist/runtime/time-series-queries.d.ts.map +1 -1
  287. package/dist/runtime/time-series-queries.js +14 -12
  288. package/dist/runtime/time-series-queries.js.map +1 -1
  289. package/dist/runtime/trace-queries.d.ts +14 -0
  290. package/dist/runtime/trace-queries.d.ts.map +1 -0
  291. package/dist/runtime/trace-queries.js +61 -0
  292. package/dist/runtime/trace-queries.js.map +1 -0
  293. package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
  294. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +1 -1
  295. package/dist/stories/shared-utils/decorators/WithPluginRegistry.js +2 -1
  296. package/dist/stories/shared-utils/decorators/WithPluginRegistry.js.map +1 -1
  297. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +13 -0
  298. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -0
  299. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js +39 -0
  300. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -0
  301. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
  302. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +23 -7
  303. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
  304. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +1 -1
  305. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +2 -2
  306. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +1 -1
  307. package/dist/stories/shared-utils/decorators/WithTimeRange.js +2 -2
  308. package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
  309. package/dist/stories/shared-utils/decorators/index.d.ts +1 -0
  310. package/dist/stories/shared-utils/decorators/index.d.ts.map +1 -1
  311. package/dist/stories/shared-utils/decorators/index.js +1 -0
  312. package/dist/stories/shared-utils/decorators/index.js.map +1 -1
  313. package/dist/stories/shared-utils/index.js.map +1 -1
  314. package/dist/test/index.d.ts +1 -0
  315. package/dist/test/index.d.ts.map +1 -1
  316. package/dist/test/index.js +1 -0
  317. package/dist/test/index.js.map +1 -1
  318. package/dist/test/mock-data.d.ts +4 -0
  319. package/dist/test/mock-data.d.ts.map +1 -0
  320. package/dist/test/mock-data.js +64 -0
  321. package/dist/test/mock-data.js.map +1 -0
  322. package/dist/test/render.js +2 -2
  323. package/dist/test/render.js.map +1 -1
  324. package/dist/test/setup-tests.js.map +1 -1
  325. package/dist/test/test-plugins/bert/index.js.map +1 -1
  326. package/dist/test/test-plugins/ernie/index.js.map +1 -1
  327. package/dist/test/test-plugins/index.js.map +1 -1
  328. package/dist/test-utils/index.js.map +1 -1
  329. package/dist/test-utils/mock-plugin-registry.js +2 -2
  330. package/dist/test-utils/mock-plugin-registry.js.map +1 -1
  331. package/dist/utils/action.d.ts +4 -0
  332. package/dist/utils/action.d.ts.map +1 -0
  333. package/dist/utils/action.js +27 -0
  334. package/dist/utils/action.js.map +1 -0
  335. package/dist/utils/index.d.ts +1 -0
  336. package/dist/utils/index.d.ts.map +1 -1
  337. package/dist/utils/index.js +1 -0
  338. package/dist/utils/index.js.map +1 -1
  339. package/dist/utils/variables.d.ts.map +1 -1
  340. package/dist/utils/variables.js +17 -5
  341. package/dist/utils/variables.js.map +1 -1
  342. package/dist/validation/datasource.d.ts +19 -0
  343. package/dist/validation/datasource.d.ts.map +1 -0
  344. package/dist/validation/datasource.js +22 -0
  345. package/dist/validation/datasource.js.map +1 -0
  346. package/dist/validation/index.d.ts +5 -0
  347. package/dist/validation/index.d.ts.map +1 -0
  348. package/dist/validation/index.js +18 -0
  349. package/dist/validation/index.js.map +1 -0
  350. package/dist/validation/resource.d.ts +3 -0
  351. package/dist/validation/resource.d.ts.map +1 -0
  352. package/dist/validation/resource.js +16 -0
  353. package/dist/validation/resource.js.map +1 -0
  354. package/dist/validation/role.d.ts +228 -0
  355. package/dist/validation/role.d.ts.map +1 -0
  356. package/dist/validation/role.js +66 -0
  357. package/dist/validation/role.js.map +1 -0
  358. package/dist/validation/rolebinding.d.ts +137 -0
  359. package/dist/validation/rolebinding.d.ts.map +1 -0
  360. package/dist/validation/rolebinding.js +47 -0
  361. package/dist/validation/rolebinding.js.map +1 -0
  362. package/dist/validation/secret.d.ts +964 -0
  363. package/dist/validation/secret.d.ts.map +1 -0
  364. package/dist/validation/secret.js +157 -0
  365. package/dist/validation/secret.js.map +1 -0
  366. package/dist/validation/variable.d.ts +96 -0
  367. package/dist/validation/variable.d.ts.map +1 -0
  368. package/dist/validation/variable.js +40 -0
  369. package/dist/validation/variable.js.map +1 -0
  370. package/package.json +9 -6
  371. package/dist/components/OptionsEditorTabs/TabPanel.d.ts +0 -9
  372. package/dist/components/OptionsEditorTabs/TabPanel.d.ts.map +0 -1
  373. package/dist/components/OptionsEditorTabs/TabPanel.js.map +0 -1
@@ -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
  }
@@ -0,0 +1,69 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "OptionsEditorRadios", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return OptionsEditorRadios;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _react = require("react");
26
+ const _OptionsEditorTabPanel = require("../OptionsEditorTabPanel");
27
+ const OptionsEditorRadios = (props)=>{
28
+ const { tabs , defaultTab , onModeChange , isReadonly } = props;
29
+ const [activeTab, setActiveTab] = (0, _react.useState)(defaultTab);
30
+ const handleChange = (_, value)=>{
31
+ const v = parseInt(value);
32
+ setActiveTab(v);
33
+ onModeChange(v);
34
+ };
35
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
36
+ children: [
37
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
38
+ sx: {
39
+ borderBottom: 1,
40
+ borderColor: (theme)=>theme.palette.divider
41
+ },
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);
56
+ })
57
+ })
58
+ })
59
+ }),
60
+ tabs.map(({ label , content }, i)=>{
61
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabPanel.OptionsEditorTabPanel, {
62
+ value: activeTab,
63
+ index: i,
64
+ children: content
65
+ }, label);
66
+ })
67
+ ]
68
+ });
69
+ };
@@ -0,0 +1,30 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./OptionsEditorRadios"), exports);
18
+ function _export_star(from, to) {
19
+ Object.keys(from).forEach(function(k) {
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
+ }
28
+ });
29
+ return from;
30
+ }
@@ -14,22 +14,24 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- Object.defineProperty(exports, "TabPanel", {
17
+ Object.defineProperty(exports, "OptionsEditorTabPanel", {
18
18
  enumerable: true,
19
- get: ()=>TabPanel
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
- function TabPanel(props) {
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
  })
@@ -0,0 +1,30 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./OptionsEditorTabPanel"), exports);
18
+ function _export_star(from, to) {
19
+ Object.keys(from).forEach(function(k) {
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
+ }
28
+ });
29
+ return from;
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 _tabPanel = require("./TabPanel");
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)(_tabPanel.TabPanel, {
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,22 @@ 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");
28
+ const _TraceQueryEditor = require("../TraceQueryEditor");
26
29
  function PanelSpecEditor(props) {
27
30
  const { panelDefinition , onJSONChange , onQueriesChange , onPluginSpecChange } = props;
28
31
  const { kind } = panelDefinition.spec.plugin;
29
32
  const { data: plugin , isLoading , error } = (0, _runtime.usePlugin)('Panel', kind);
30
33
  if (error) {
31
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorAlert, {
34
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ErrorAlert, {
32
35
  error: error
33
36
  });
34
37
  }
@@ -39,23 +42,60 @@ function PanelSpecEditor(props) {
39
42
  if (plugin === undefined) {
40
43
  throw new Error(`Missing implementation for panel plugin with kind '${kind}'`);
41
44
  }
45
+ const getQueryType = ()=>{
46
+ var _panelDefinition_spec, _queriesList_;
47
+ const queriesList = panelDefinition === null || panelDefinition === void 0 ? void 0 : (_panelDefinition_spec = panelDefinition.spec) === null || _panelDefinition_spec === void 0 ? void 0 : _panelDefinition_spec.queries;
48
+ if (queriesList === undefined) {
49
+ return '';
50
+ }
51
+ const queryType = (_queriesList_ = queriesList[0]) === null || _queriesList_ === void 0 ? void 0 : _queriesList_.kind;
52
+ return queryType;
53
+ };
54
+ // Get the corresponding queryEditor depending on the queryType
55
+ const getQueryEditorComponent = ()=>{
56
+ const queryType = getQueryType();
57
+ // default case handles cause where there is no queryType yet (e.g. UI > 'editing' mode > 'Add Panel')
58
+ switch(queryType){
59
+ case 'TimeSeriesQuery':
60
+ var _panelDefinition_spec_queries;
61
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeSeriesQueryEditor.TimeSeriesQueryEditor, {
62
+ queries: (_panelDefinition_spec_queries = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries !== void 0 ? _panelDefinition_spec_queries : [],
63
+ onChange: onQueriesChange
64
+ });
65
+ case 'TraceQuery':
66
+ var _panelDefinition_spec_queries1;
67
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TraceQueryEditor.TraceQueryEditor, {
68
+ queries: (_panelDefinition_spec_queries1 = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries1 !== void 0 ? _panelDefinition_spec_queries1 : [],
69
+ onChange: onQueriesChange
70
+ });
71
+ default:
72
+ // ScatterChart only handles trace queries for now
73
+ if (kind === 'ScatterChart') {
74
+ var _panelDefinition_spec_queries2;
75
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TraceQueryEditor.TraceQueryEditor, {
76
+ queries: (_panelDefinition_spec_queries2 = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries2 !== void 0 ? _panelDefinition_spec_queries2 : [],
77
+ onChange: onQueriesChange
78
+ });
79
+ }
80
+ var _panelDefinition_spec_queries3;
81
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeSeriesQueryEditor.TimeSeriesQueryEditor, {
82
+ queries: (_panelDefinition_spec_queries3 = panelDefinition.spec.queries) !== null && _panelDefinition_spec_queries3 !== void 0 ? _panelDefinition_spec_queries3 : [],
83
+ onChange: onQueriesChange
84
+ });
85
+ }
86
+ };
42
87
  const { panelOptionsEditorComponents , hideQueryEditor } = plugin;
43
88
  let tabs = [];
44
89
  if (!hideQueryEditor) {
45
- var _queries;
46
- // Since we only support TimeSeriesQuery for now, we will always show a TimeSeriesQueryEditor
47
90
  tabs.push({
48
91
  label: 'Query',
49
- content: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_timeSeriesQueryEditor.TimeSeriesQueryEditor, {
50
- queries: (_queries = panelDefinition.spec.queries) !== null && _queries !== void 0 ? _queries : [],
51
- onChange: onQueriesChange
52
- })
92
+ content: getQueryEditorComponent()
53
93
  });
54
94
  }
55
95
  if (panelOptionsEditorComponents !== undefined) {
56
96
  tabs = tabs.concat(panelOptionsEditorComponents.map(({ label , content: OptionsEditorComponent })=>({
57
97
  label,
58
- content: /*#__PURE__*/ (0, _jsxRuntime.jsx)(OptionsEditorComponent, {
98
+ content: /*#__PURE__*/ (0, _jsxruntime.jsx)(OptionsEditorComponent, {
59
99
  value: panelDefinition.spec.plugin.spec,
60
100
  onChange: onPluginSpecChange
61
101
  })
@@ -64,12 +104,13 @@ function PanelSpecEditor(props) {
64
104
  // always show json editor by default
65
105
  tabs.push({
66
106
  label: 'JSON',
67
- content: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.JSONEditor, {
107
+ content: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.JSONEditor, {
108
+ maxHeight: "80vh",
68
109
  value: panelDefinition,
69
110
  onChange: onJSONChange
70
111
  })
71
112
  });
72
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorTabs.OptionsEditorTabs, {
113
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorTabs.OptionsEditorTabs, {
73
114
  tabs: tabs
74
115
  }, tabs.length);
75
116
  }
@@ -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({