@perses-dev/plugin-system 0.0.0-snapshot-scatter-chart-embed-8efdfab → 0.0.0-snapshot-scatterplot-fix-imports-95e1b59

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 (290) hide show
  1. package/dist/cjs/components/CalculationSelector/CalculationSelector.js +1 -1
  2. package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +16 -16
  3. package/dist/cjs/components/DatasourceSelect.js +11 -9
  4. package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
  5. package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
  6. package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
  7. package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
  8. package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +5 -5
  9. package/dist/cjs/components/PluginEditor/PluginEditor.js +2 -2
  10. package/dist/cjs/components/PluginEditor/plugin-editor-api.js +3 -3
  11. package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +2 -2
  12. package/dist/cjs/components/PluginRegistry/PluginRegistry.js +1 -1
  13. package/dist/cjs/components/PluginRegistry/plugin-indexes.js +4 -4
  14. package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
  15. package/dist/cjs/components/ProjectSelect.js +2 -2
  16. package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +192 -0
  17. package/dist/cjs/components/TimeRangeControls/index.js +30 -0
  18. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +23 -31
  19. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
  20. package/dist/cjs/components/TraceQueryEditor/TraceQueryEditor.js +2 -2
  21. package/dist/cjs/components/TraceQueryEditor/TraceQueryInput.js +3 -3
  22. package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +29 -23
  23. package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +10 -8
  24. package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
  25. package/dist/cjs/components/Variables/variable-model.js +12 -13
  26. package/dist/cjs/components/index.js +1 -0
  27. package/dist/cjs/constants/user-interface-text.js +4 -1
  28. package/dist/cjs/context/ProjectStoreProvider.js +5 -5
  29. package/dist/cjs/model/legend.js +5 -5
  30. package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +6 -6
  31. package/dist/cjs/runtime/DataQueriesProvider/model.js +3 -3
  32. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +21 -10
  33. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
  34. package/dist/cjs/runtime/TimeRangeProvider/query-params.js +16 -16
  35. package/dist/cjs/runtime/builtin-variables.js +5 -5
  36. package/dist/cjs/runtime/datasources.js +7 -7
  37. package/dist/cjs/runtime/plugin-registry.js +12 -12
  38. package/dist/cjs/runtime/template-variables.js +15 -7
  39. package/dist/cjs/runtime/time-series-queries.js +14 -14
  40. package/dist/cjs/runtime/trace-queries.js +4 -4
  41. package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +3 -1
  42. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +1 -1
  43. package/dist/cjs/test/test-plugins/bert/index.js +2 -2
  44. package/dist/cjs/test/test-plugins/ernie/index.js +2 -2
  45. package/dist/cjs/test/test-plugins/index.js +3 -1
  46. package/dist/cjs/test-utils/mock-plugin-registry.js +4 -4
  47. package/dist/cjs/utils/action.js +3 -3
  48. package/dist/cjs/utils/variables.js +4 -4
  49. package/dist/cjs/validation/duration.js +25 -0
  50. package/dist/cjs/validation/index.js +1 -0
  51. package/dist/cjs/validation/resource.js +1 -1
  52. package/dist/cjs/validation/role.js +4 -3
  53. package/dist/cjs/validation/secret.js +3 -3
  54. package/dist/cjs/validation/user.js +46 -0
  55. package/dist/components/CalculationSelector/CalculationSelector.d.ts +1 -2
  56. package/dist/components/CalculationSelector/CalculationSelector.d.ts.map +1 -1
  57. package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
  58. package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
  59. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +3 -4
  60. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -1
  61. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +16 -16
  62. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
  63. package/dist/components/DatasourceSelect.d.ts +3 -4
  64. package/dist/components/DatasourceSelect.d.ts.map +1 -1
  65. package/dist/components/DatasourceSelect.js +8 -6
  66. package/dist/components/DatasourceSelect.js.map +1 -1
  67. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts +1 -2
  68. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
  69. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
  70. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
  71. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +3 -3
  72. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
  73. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
  74. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
  75. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +1 -1
  76. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.map +1 -1
  77. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
  78. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
  79. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts +3 -3
  80. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts.map +1 -1
  81. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
  82. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  83. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +1 -2
  84. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
  85. package/dist/components/PanelSpecEditor/PanelSpecEditor.js +5 -5
  86. package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
  87. package/dist/components/PluginEditor/PluginEditor.d.ts +1 -2
  88. package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
  89. package/dist/components/PluginEditor/PluginEditor.js +2 -2
  90. package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
  91. package/dist/components/PluginEditor/plugin-editor-api.d.ts +3 -4
  92. package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
  93. package/dist/components/PluginEditor/plugin-editor-api.js +3 -3
  94. package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
  95. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +1 -1
  96. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
  97. package/dist/components/PluginKindSelect/PluginKindSelect.js +2 -2
  98. package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
  99. package/dist/components/PluginRegistry/PluginRegistry.d.ts +4 -4
  100. package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
  101. package/dist/components/PluginRegistry/PluginRegistry.js +1 -1
  102. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  103. package/dist/components/PluginRegistry/plugin-indexes.js +1 -1
  104. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  105. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts +1 -2
  106. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
  107. package/dist/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
  108. package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
  109. package/dist/components/ProjectSelect.d.ts +2 -3
  110. package/dist/components/ProjectSelect.d.ts.map +1 -1
  111. package/dist/components/ProjectSelect.js +2 -2
  112. package/dist/components/ProjectSelect.js.map +1 -1
  113. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts +13 -0
  114. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -0
  115. package/dist/components/TimeRangeControls/TimeRangeControls.js +168 -0
  116. package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -0
  117. package/dist/components/TimeRangeControls/index.d.ts +2 -0
  118. package/dist/components/TimeRangeControls/index.d.ts.map +1 -0
  119. package/dist/components/TimeRangeControls/index.js +15 -0
  120. package/dist/components/TimeRangeControls/index.js.map +1 -0
  121. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +1 -2
  122. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -1
  123. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +24 -32
  124. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -1
  125. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +1 -2
  126. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +1 -1
  127. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
  128. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -1
  129. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts +1 -2
  130. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts.map +1 -1
  131. package/dist/components/TraceQueryEditor/TraceQueryEditor.js +2 -2
  132. package/dist/components/TraceQueryEditor/TraceQueryEditor.js.map +1 -1
  133. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts +1 -2
  134. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts.map +1 -1
  135. package/dist/components/TraceQueryEditor/TraceQueryInput.js +3 -3
  136. package/dist/components/TraceQueryEditor/TraceQueryInput.js.map +1 -1
  137. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +1 -1
  138. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  139. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +26 -22
  140. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  141. package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts +2 -3
  142. package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts.map +1 -1
  143. package/dist/components/Variables/VariableEditorForm/VariablePreview.js +4 -4
  144. package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
  145. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +1 -1
  146. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
  147. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
  148. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
  149. package/dist/components/Variables/variable-model.d.ts.map +1 -1
  150. package/dist/components/Variables/variable-model.js +6 -7
  151. package/dist/components/Variables/variable-model.js.map +1 -1
  152. package/dist/components/index.d.ts +1 -0
  153. package/dist/components/index.d.ts.map +1 -1
  154. package/dist/components/index.js +1 -0
  155. package/dist/components/index.js.map +1 -1
  156. package/dist/constants/user-interface-text.d.ts +2 -0
  157. package/dist/constants/user-interface-text.d.ts.map +1 -1
  158. package/dist/constants/user-interface-text.js +4 -1
  159. package/dist/constants/user-interface-text.js.map +1 -1
  160. package/dist/context/ProjectStoreProvider.d.ts +1 -1
  161. package/dist/context/ProjectStoreProvider.d.ts.map +1 -1
  162. package/dist/context/ProjectStoreProvider.js +2 -2
  163. package/dist/context/ProjectStoreProvider.js.map +1 -1
  164. package/dist/context/query-params.js.map +1 -1
  165. package/dist/model/datasource.js +3 -1
  166. package/dist/model/datasource.js.map +1 -1
  167. package/dist/model/legend.d.ts +2 -2
  168. package/dist/model/legend.d.ts.map +1 -1
  169. package/dist/model/legend.js.map +1 -1
  170. package/dist/model/panels.d.ts +1 -1
  171. package/dist/model/panels.d.ts.map +1 -1
  172. package/dist/model/plugin-base.d.ts +0 -1
  173. package/dist/model/plugin-base.d.ts.map +1 -1
  174. package/dist/model/plugin-base.js.map +1 -1
  175. package/dist/model/plugin-loading.js.map +1 -1
  176. package/dist/model/plugins.d.ts +4 -4
  177. package/dist/model/plugins.d.ts.map +1 -1
  178. package/dist/model/plugins.js.map +1 -1
  179. package/dist/model/time-series-queries.d.ts +2 -2
  180. package/dist/model/time-series-queries.d.ts.map +1 -1
  181. package/dist/model/time-series-queries.js.map +1 -1
  182. package/dist/model/trace-queries.d.ts +1 -1
  183. package/dist/model/trace-queries.d.ts.map +1 -1
  184. package/dist/model/trace-queries.js.map +1 -1
  185. package/dist/model/variables.d.ts +2 -2
  186. package/dist/model/variables.d.ts.map +1 -1
  187. package/dist/model/variables.js +3 -1
  188. package/dist/model/variables.js.map +1 -1
  189. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +1 -1
  190. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
  191. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +2 -2
  192. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  193. package/dist/runtime/DataQueriesProvider/model.d.ts +2 -2
  194. package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
  195. package/dist/runtime/DataQueriesProvider/model.js +3 -3
  196. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  197. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +5 -1
  198. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
  199. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +14 -6
  200. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  201. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts +1 -1
  202. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts.map +1 -1
  203. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
  204. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -1
  205. package/dist/runtime/TimeRangeProvider/query-params.d.ts +1 -1
  206. package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
  207. package/dist/runtime/TimeRangeProvider/query-params.js +4 -4
  208. package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
  209. package/dist/runtime/builtin-variables.d.ts +1 -1
  210. package/dist/runtime/builtin-variables.d.ts.map +1 -1
  211. package/dist/runtime/builtin-variables.js +2 -2
  212. package/dist/runtime/builtin-variables.js.map +1 -1
  213. package/dist/runtime/datasources.js +1 -1
  214. package/dist/runtime/datasources.js.map +1 -1
  215. package/dist/runtime/plugin-registry.d.ts +3 -3
  216. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  217. package/dist/runtime/plugin-registry.js +4 -4
  218. package/dist/runtime/plugin-registry.js.map +1 -1
  219. package/dist/runtime/template-variables.d.ts +4 -4
  220. package/dist/runtime/template-variables.d.ts.map +1 -1
  221. package/dist/runtime/template-variables.js +10 -2
  222. package/dist/runtime/template-variables.js.map +1 -1
  223. package/dist/runtime/time-series-queries.js +7 -7
  224. package/dist/runtime/time-series-queries.js.map +1 -1
  225. package/dist/runtime/trace-queries.d.ts +1 -1
  226. package/dist/runtime/trace-queries.d.ts.map +1 -1
  227. package/dist/runtime/trace-queries.js +4 -4
  228. package/dist/runtime/trace-queries.js.map +1 -1
  229. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts +2 -3
  230. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts.map +1 -1
  231. package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
  232. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts +1 -2
  233. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +1 -1
  234. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +2 -3
  235. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -1
  236. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -1
  237. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts +2 -3
  238. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
  239. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +1 -1
  240. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
  241. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts +2 -3
  242. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts.map +1 -1
  243. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +1 -1
  244. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +2 -3
  245. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +1 -1
  246. package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
  247. package/dist/test/render.d.ts +1 -1
  248. package/dist/test/render.d.ts.map +1 -1
  249. package/dist/test/render.js.map +1 -1
  250. package/dist/test/setup-tests.js.map +1 -1
  251. package/dist/test/test-plugins/bert/index.js +2 -2
  252. package/dist/test/test-plugins/bert/index.js.map +1 -1
  253. package/dist/test/test-plugins/ernie/index.js +2 -2
  254. package/dist/test/test-plugins/ernie/index.js.map +1 -1
  255. package/dist/test-utils/mock-plugin-registry.d.ts +1 -1
  256. package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
  257. package/dist/test-utils/mock-plugin-registry.js +1 -1
  258. package/dist/test-utils/mock-plugin-registry.js.map +1 -1
  259. package/dist/utils/variables.js.map +1 -1
  260. package/dist/validation/datasource.d.ts +1 -1
  261. package/dist/validation/datasource.d.ts.map +1 -1
  262. package/dist/validation/datasource.js.map +1 -1
  263. package/dist/validation/duration.d.ts +3 -0
  264. package/dist/validation/duration.d.ts.map +1 -0
  265. package/dist/validation/duration.js +17 -0
  266. package/dist/validation/duration.js.map +1 -0
  267. package/dist/validation/index.d.ts +1 -0
  268. package/dist/validation/index.d.ts.map +1 -1
  269. package/dist/validation/index.js +1 -0
  270. package/dist/validation/index.js.map +1 -1
  271. package/dist/validation/resource.js +1 -1
  272. package/dist/validation/resource.js.map +1 -1
  273. package/dist/validation/role.d.ts +47 -47
  274. package/dist/validation/role.d.ts.map +1 -1
  275. package/dist/validation/role.js +1 -0
  276. package/dist/validation/role.js.map +1 -1
  277. package/dist/validation/rolebinding.d.ts +10 -10
  278. package/dist/validation/rolebinding.d.ts.map +1 -1
  279. package/dist/validation/rolebinding.js.map +1 -1
  280. package/dist/validation/secret.d.ts +19 -19
  281. package/dist/validation/secret.d.ts.map +1 -1
  282. package/dist/validation/secret.js.map +1 -1
  283. package/dist/validation/user.d.ts +93 -0
  284. package/dist/validation/user.d.ts.map +1 -0
  285. package/dist/validation/user.js +38 -0
  286. package/dist/validation/user.js.map +1 -0
  287. package/dist/validation/variable.d.ts +1 -1
  288. package/dist/validation/variable.d.ts.map +1 -1
  289. package/dist/validation/variable.js.map +1 -1
  290. package/package.json +4 -4
@@ -30,9 +30,9 @@ function _interop_require_default(obj) {
30
30
  };
31
31
  }
32
32
  function TimeRangeProviderWithQueryParams(props) {
33
- const { initialTimeRange , initialRefreshInterval , children } = props;
34
- const { timeRange , setTimeRange } = (0, _queryparams.useTimeRangeParams)(initialTimeRange);
35
- const { refreshInterval , setRefreshInterval } = (0, _queryparams.useSetRefreshIntervalParams)(initialRefreshInterval);
33
+ const { initialTimeRange, initialRefreshInterval, children } = props;
34
+ const { timeRange, setTimeRange } = (0, _queryparams.useTimeRangeParams)(initialTimeRange);
35
+ const { refreshInterval, setRefreshInterval } = (0, _queryparams.useSetRefreshIntervalParams)(initialRefreshInterval);
36
36
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeRangeProvider.TimeRangeProvider, {
37
37
  timeRange: timeRange,
38
38
  refreshInterval: refreshInterval,
@@ -21,32 +21,32 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- encodeTimeRangeValue: function() {
25
- return encodeTimeRangeValue;
24
+ TimeRangeParam: function() {
25
+ return TimeRangeParam;
26
26
  },
27
27
  decodeTimeRangeValue: function() {
28
28
  return decodeTimeRangeValue;
29
29
  },
30
- TimeRangeParam: function() {
31
- return TimeRangeParam;
32
- },
33
- timeRangeQueryConfig: function() {
34
- return timeRangeQueryConfig;
30
+ encodeTimeRangeValue: function() {
31
+ return encodeTimeRangeValue;
35
32
  },
36
33
  refreshIntervalQueryConfig: function() {
37
34
  return refreshIntervalQueryConfig;
38
35
  },
39
- useInitialTimeRange: function() {
40
- return useInitialTimeRange;
41
- },
42
- useTimeRangeParams: function() {
43
- return useTimeRangeParams;
36
+ timeRangeQueryConfig: function() {
37
+ return timeRangeQueryConfig;
44
38
  },
45
39
  useInitialRefreshInterval: function() {
46
40
  return useInitialRefreshInterval;
47
41
  },
42
+ useInitialTimeRange: function() {
43
+ return useInitialTimeRange;
44
+ },
48
45
  useSetRefreshIntervalParams: function() {
49
46
  return useSetRefreshIntervalParams;
47
+ },
48
+ useTimeRangeParams: function() {
49
+ return useTimeRangeParams;
50
50
  }
51
51
  });
52
52
  const _react = require("react");
@@ -106,7 +106,7 @@ function useInitialTimeRange(dashboardDuration) {
106
106
  const [query] = (0, _usequeryparams.useQueryParams)(timeRangeQueryConfig, {
107
107
  updateType: 'replaceIn'
108
108
  });
109
- const { start , end } = query;
109
+ const { start, end } = query;
110
110
  return (0, _react.useMemo)(()=>{
111
111
  let initialTimeRange = {
112
112
  pastDuration: dashboardDuration
@@ -138,7 +138,7 @@ function useTimeRangeParams(initialTimeRange) {
138
138
  });
139
139
  // determine whether initial param had previously been populated to fix back btn
140
140
  const [paramsLoaded, setParamsLoaded] = (0, _react.useState)(false);
141
- const { start } = query;
141
+ const { start } = query;
142
142
  (0, _react.useEffect)(()=>{
143
143
  // when dashboard loaded with no params, default to dashboard duration
144
144
  if (!paramsLoaded && !start) {
@@ -177,7 +177,7 @@ function useInitialRefreshInterval(dashboardDuration) {
177
177
  const [query] = (0, _usequeryparams.useQueryParams)(refreshIntervalQueryConfig, {
178
178
  updateType: 'replaceIn'
179
179
  });
180
- const { refresh } = query;
180
+ const { refresh } = query;
181
181
  return (0, _react.useMemo)(()=>{
182
182
  let initialTimeRange = dashboardDuration;
183
183
  if (!refresh) {
@@ -199,7 +199,7 @@ function useSetRefreshIntervalParams(initialRefreshInterval) {
199
199
  });
200
200
  // determine whether initial param had previously been populated to fix back btn
201
201
  const [paramsLoaded, setParamsLoaded] = (0, _react.useState)(false);
202
- const { refresh } = query;
202
+ const { refresh } = query;
203
203
  (0, _react.useEffect)(()=>{
204
204
  // when dashboard loaded with no params, default to dashboard refresh interval
205
205
  if (!paramsLoaded && !refresh) {
@@ -27,11 +27,11 @@ _export(exports, {
27
27
  useBuiltinVariableContext: function() {
28
28
  return useBuiltinVariableContext;
29
29
  },
30
- useBuiltinVariableValues: function() {
31
- return useBuiltinVariableValues;
32
- },
33
30
  useBuiltinVariableDefinitions: function() {
34
31
  return useBuiltinVariableDefinitions;
32
+ },
33
+ useBuiltinVariableValues: function() {
34
+ return useBuiltinVariableValues;
35
35
  }
36
36
  });
37
37
  const _react = require("react");
@@ -44,7 +44,7 @@ function useBuiltinVariableContext() {
44
44
  return ctx;
45
45
  }
46
46
  function useBuiltinVariableValues(names) {
47
- const { variables } = useBuiltinVariableContext();
47
+ const { variables } = useBuiltinVariableContext();
48
48
  const states = (0, _react.useMemo)(()=>{
49
49
  const values = {};
50
50
  for (const variable of variables){
@@ -76,6 +76,6 @@ function useBuiltinVariableValues(names) {
76
76
  return values;
77
77
  }
78
78
  function useBuiltinVariableDefinitions() {
79
- const { variables } = useBuiltinVariableContext();
79
+ const { variables } = useBuiltinVariableContext();
80
80
  return variables;
81
81
  }
@@ -24,17 +24,17 @@ _export(exports, {
24
24
  DatasourceStoreContext: function() {
25
25
  return DatasourceStoreContext;
26
26
  },
27
+ useDatasource: function() {
28
+ return useDatasource;
29
+ },
30
+ useDatasourceClient: function() {
31
+ return useDatasourceClient;
32
+ },
27
33
  useDatasourceStore: function() {
28
34
  return useDatasourceStore;
29
35
  },
30
36
  useListDatasourceSelectItems: function() {
31
37
  return useListDatasourceSelectItems;
32
- },
33
- useDatasourceClient: function() {
34
- return useDatasourceClient;
35
- },
36
- useDatasource: function() {
37
- return useDatasource;
38
38
  }
39
39
  });
40
40
  const _reactquery = require("@tanstack/react-query");
@@ -48,7 +48,7 @@ function useDatasourceStore() {
48
48
  return ctx;
49
49
  }
50
50
  function useListDatasourceSelectItems(datasourcePluginKind, project) {
51
- const { listDatasourceSelectItems } = useDatasourceStore();
51
+ const { listDatasourceSelectItems } = useDatasourceStore();
52
52
  return (0, _reactquery.useQuery)([
53
53
  'listDatasourceSelectItems',
54
54
  datasourcePluginKind,
@@ -24,20 +24,20 @@ _export(exports, {
24
24
  PluginRegistryContext: function() {
25
25
  return PluginRegistryContext;
26
26
  },
27
- usePluginRegistry: function() {
28
- return usePluginRegistry;
27
+ useListPluginMetadata: function() {
28
+ return useListPluginMetadata;
29
29
  },
30
30
  usePlugin: function() {
31
31
  return usePlugin;
32
32
  },
33
- usePlugins: function() {
34
- return usePlugins;
35
- },
36
- useListPluginMetadata: function() {
37
- return useListPluginMetadata;
38
- },
39
33
  usePluginBuiltinVariableDefinitions: function() {
40
34
  return usePluginBuiltinVariableDefinitions;
35
+ },
36
+ usePluginRegistry: function() {
37
+ return usePluginRegistry;
38
+ },
39
+ usePlugins: function() {
40
+ return usePlugins;
41
41
  }
42
42
  });
43
43
  const _react = require("react");
@@ -57,7 +57,7 @@ function usePlugin(pluginType, kind, options) {
57
57
  ...options,
58
58
  enabled: ((_options_enabled = options === null || options === void 0 ? void 0 : options.enabled) !== null && _options_enabled !== void 0 ? _options_enabled : true) && kind !== ''
59
59
  };
60
- const { getPlugin } = usePluginRegistry();
60
+ const { getPlugin } = usePluginRegistry();
61
61
  return (0, _reactquery.useQuery)([
62
62
  'getPlugin',
63
63
  pluginType,
@@ -65,7 +65,7 @@ function usePlugin(pluginType, kind, options) {
65
65
  ], ()=>getPlugin(pluginType, kind), options);
66
66
  }
67
67
  function usePlugins(pluginType, plugins) {
68
- const { getPlugin } = usePluginRegistry();
68
+ const { getPlugin } = usePluginRegistry();
69
69
  return (0, _reactquery.useQueries)({
70
70
  queries: plugins.map((p)=>{
71
71
  return {
@@ -80,14 +80,14 @@ function usePlugins(pluginType, plugins) {
80
80
  });
81
81
  }
82
82
  function useListPluginMetadata(pluginType, options) {
83
- const { listPluginMetadata } = usePluginRegistry();
83
+ const { listPluginMetadata } = usePluginRegistry();
84
84
  return (0, _reactquery.useQuery)([
85
85
  'listPluginMetadata',
86
86
  pluginType
87
87
  ], ()=>listPluginMetadata(pluginType), options);
88
88
  }
89
89
  function usePluginBuiltinVariableDefinitions() {
90
- const { getPlugin , listPluginMetadata } = usePluginRegistry();
90
+ const { getPlugin, listPluginMetadata } = usePluginRegistry();
91
91
  return (0, _reactquery.useQuery)([
92
92
  'usePluginBuiltinVariableDefinitions'
93
93
  ], async ()=>{
@@ -21,20 +21,20 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
+ TemplateVariableContext: function() {
25
+ return TemplateVariableContext;
26
+ },
24
27
  VariableStoreStateMap: function() {
25
28
  return VariableStoreStateMap;
26
29
  },
27
- TemplateVariableContext: function() {
28
- return TemplateVariableContext;
30
+ useReplaceVariablesInString: function() {
31
+ return useReplaceVariablesInString;
29
32
  },
30
33
  useTemplateVariableValues: function() {
31
34
  return useTemplateVariableValues;
32
35
  },
33
36
  useVariableValues: function() {
34
37
  return useVariableValues;
35
- },
36
- useReplaceVariablesInString: function() {
37
- return useReplaceVariablesInString;
38
38
  }
39
39
  });
40
40
  const _react = require("react");
@@ -123,7 +123,7 @@ function useTemplateVariableContext() {
123
123
  return ctx;
124
124
  }
125
125
  function useTemplateVariableValues(names) {
126
- const { state } = useTemplateVariableContext();
126
+ const { state } = useTemplateVariableContext();
127
127
  const values = (0, _react.useMemo)(()=>{
128
128
  const values = {};
129
129
  names === null || names === void 0 ? void 0 : names.forEach((name)=>{
@@ -145,7 +145,15 @@ function useTemplateVariableValues(names) {
145
145
  function useVariableValues(names) {
146
146
  const templateVariableValues = useTemplateVariableValues(names);
147
147
  const builtinVariableValues = (0, _builtinvariables.useBuiltinVariableValues)(names);
148
- return Object.assign(templateVariableValues, builtinVariableValues);
148
+ return (0, _react.useMemo)(()=>{
149
+ return {
150
+ ...templateVariableValues,
151
+ ...builtinVariableValues
152
+ };
153
+ }, [
154
+ templateVariableValues,
155
+ builtinVariableValues
156
+ ]);
149
157
  }
150
158
  function useReplaceVariablesInString(str) {
151
159
  const variablesInString = str ? (0, _utils.parseTemplateVariables)(str) : [];
@@ -24,17 +24,17 @@ _export(exports, {
24
24
  TIME_SERIES_QUERY_KEY: function() {
25
25
  return TIME_SERIES_QUERY_KEY;
26
26
  },
27
- useTimeSeriesQuery: function() {
28
- return useTimeSeriesQuery;
29
- },
30
- useTimeSeriesQueries: function() {
31
- return useTimeSeriesQueries;
27
+ getActiveTimeSeriesQueries: function() {
28
+ return getActiveTimeSeriesQueries;
32
29
  },
33
30
  useActiveTimeSeriesQueries: function() {
34
31
  return useActiveTimeSeriesQueries;
35
32
  },
36
- getActiveTimeSeriesQueries: function() {
37
- return getActiveTimeSeriesQueries;
33
+ useTimeSeriesQueries: function() {
34
+ return useTimeSeriesQueries;
35
+ },
36
+ useTimeSeriesQuery: function() {
37
+ return useTimeSeriesQuery;
38
38
  }
39
39
  });
40
40
  const _reactquery = require("@tanstack/react-query");
@@ -54,8 +54,8 @@ function filterVariableStateMap(v, names) {
54
54
  }
55
55
  return Object.fromEntries(Object.entries(v).filter(([name])=>names.includes(name)));
56
56
  }
57
- function getQueryOptions({ plugin , definition , context }) {
58
- const { timeRange , datasourceStore , suggestedStepMs , variableState , refreshKey } = context;
57
+ function getQueryOptions({ plugin, definition, context }) {
58
+ const { timeRange, datasourceStore, suggestedStepMs, variableState, refreshKey } = context;
59
59
  const dependencies = (plugin === null || plugin === void 0 ? void 0 : plugin.dependsOn) ? plugin.dependsOn(definition.spec.plugin.spec, context) : {};
60
60
  const variableDependencies = dependencies === null || dependencies === void 0 ? void 0 : dependencies.variables;
61
61
  // Determine queryKey
@@ -84,9 +84,9 @@ function getQueryOptions({ plugin , definition , context }) {
84
84
  };
85
85
  }
86
86
  const useTimeSeriesQuery = (definition, options, queryOptions)=>{
87
- const { data: plugin } = (0, _pluginregistry.usePlugin)(TIME_SERIES_QUERY_KEY, definition.spec.plugin.kind);
87
+ const { data: plugin } = (0, _pluginregistry.usePlugin)(TIME_SERIES_QUERY_KEY, definition.spec.plugin.kind);
88
88
  const context = useTimeSeriesQueryContext();
89
- const { queryEnabled , queryKey } = getQueryOptions({
89
+ const { queryEnabled, queryKey } = getQueryOptions({
90
90
  plugin,
91
91
  definition,
92
92
  context
@@ -111,7 +111,7 @@ const useTimeSeriesQuery = (definition, options, queryOptions)=>{
111
111
  });
112
112
  };
113
113
  function useTimeSeriesQueries(definitions, options, queryOptions) {
114
- const { getPlugin } = (0, _pluginregistry.usePluginRegistry)();
114
+ const { getPlugin } = (0, _pluginregistry.usePluginRegistry)();
115
115
  const context = useTimeSeriesQueryContext();
116
116
  const pluginLoaderResponse = (0, _pluginregistry.usePlugins)(TIME_SERIES_QUERY_KEY, definitions.map((d)=>({
117
117
  kind: d.spec.plugin.kind
@@ -120,7 +120,7 @@ function useTimeSeriesQueries(definitions, options, queryOptions) {
120
120
  queries: definitions.map((definition, idx)=>{
121
121
  var _pluginLoaderResponse_idx;
122
122
  const plugin = (_pluginLoaderResponse_idx = pluginLoaderResponse[idx]) === null || _pluginLoaderResponse_idx === void 0 ? void 0 : _pluginLoaderResponse_idx.data;
123
- const { queryEnabled , queryKey } = getQueryOptions({
123
+ const { queryEnabled, queryKey } = getQueryOptions({
124
124
  plugin,
125
125
  definition,
126
126
  context
@@ -147,7 +147,7 @@ function useTimeSeriesQueries(definitions, options, queryOptions) {
147
147
  /**
148
148
  * Build the time series query context object from data available at runtime
149
149
  */ function useTimeSeriesQueryContext() {
150
- const { absoluteTimeRange , refreshKey , refreshIntervalInMs } = (0, _TimeRangeProvider.useTimeRange)();
150
+ const { absoluteTimeRange, refreshKey, refreshIntervalInMs } = (0, _TimeRangeProvider.useTimeRange)();
151
151
  const variableState = (0, _templatevariables.useVariableValues)();
152
152
  const datasourceStore = (0, _datasources.useDatasourceStore)();
153
153
  return {
@@ -38,16 +38,16 @@ const _pluginregistry = require("./plugin-registry");
38
38
  const _TimeRangeProvider = require("./TimeRangeProvider");
39
39
  const TRACE_QUERY_KEY = 'TraceQuery';
40
40
  function getUnixTimeRange(timeRange) {
41
- const { start , end } = timeRange;
41
+ const { start, end } = timeRange;
42
42
  return {
43
43
  start: Math.ceil((0, _datefns.getUnixTime)(start)),
44
44
  end: Math.ceil((0, _datefns.getUnixTime)(end))
45
45
  };
46
46
  }
47
47
  function useTraceQueries(definitions) {
48
- const { getPlugin } = (0, _pluginregistry.usePluginRegistry)();
48
+ const { getPlugin } = (0, _pluginregistry.usePluginRegistry)();
49
49
  const datasourceStore = (0, _datasources.useDatasourceStore)();
50
- const { absoluteTimeRange } = (0, _TimeRangeProvider.useTimeRange)();
50
+ const { absoluteTimeRange } = (0, _TimeRangeProvider.useTimeRange)();
51
51
  const context = {
52
52
  datasourceStore,
53
53
  absoluteTimeRange
@@ -56,7 +56,7 @@ function useTraceQueries(definitions) {
56
56
  // https://tanstack.com/query/v4/docs/react/reference/useQuery
57
57
  return (0, _reactquery.useQueries)({
58
58
  queries: definitions.map((definition)=>{
59
- var _definition_spec, _definition_spec_plugin;
59
+ var _definition_spec_plugin, _definition_spec;
60
60
  const queryKey = [
61
61
  definition,
62
62
  datasourceStore,
@@ -50,7 +50,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
50
50
  if (cache && cache.has(obj)) {
51
51
  return cache.get(obj);
52
52
  }
53
- var newObj = {};
53
+ var newObj = {
54
+ __proto__: null
55
+ };
54
56
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
55
57
  for(var key in obj){
56
58
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -28,7 +28,7 @@ function isWithDatastoreStoreParameter(parameter) {
28
28
  return !!parameter && typeof parameter === 'object' && 'props' in parameter;
29
29
  }
30
30
  const WithPluginSystemDatasourceStore = (Story, context)=>{
31
- const { getPlugin } = (0, _pluginsystem.usePluginRegistry)();
31
+ const { getPlugin } = (0, _pluginsystem.usePluginRegistry)();
32
32
  const initParameter = context.parameters.withPluginSystemDatasourceStore;
33
33
  // This currently provides a very simplified default to enable use in some
34
34
  // basic stories. It likely will need expanding in the future.
@@ -29,7 +29,7 @@ _export(exports, {
29
29
  }
30
30
  });
31
31
  const _jsxruntime = require("react/jsx-runtime");
32
- function BertPanel1Editor({ value , onChange }) {
32
+ function BertPanel1Editor({ value, onChange }) {
33
33
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
34
34
  children: [
35
35
  /*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
@@ -65,7 +65,7 @@ const BertPanel2 = {
65
65
  panelOptionsEditorComponents: [
66
66
  {
67
67
  label: 'Settings',
68
- content: function BertPanel2Editor({ value , onChange }) {
68
+ content: function BertPanel2Editor({ value, onChange }) {
69
69
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
70
70
  children: [
71
71
  /*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
@@ -43,7 +43,7 @@ const ErnieVariable1 = {
43
43
  getVariableOptions: async ()=>({
44
44
  data
45
45
  }),
46
- OptionsEditorComponent: function ErnieVariableEditor({ value , onChange }) {
46
+ OptionsEditorComponent: function ErnieVariableEditor({ value, onChange }) {
47
47
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
48
48
  children: [
49
49
  /*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
@@ -70,7 +70,7 @@ const ErnieVariable2 = {
70
70
  getVariableOptions: async ()=>({
71
71
  data
72
72
  }),
73
- OptionsEditorComponent: function ErnieVariableEditor({ value , onChange }) {
73
+ OptionsEditorComponent: function ErnieVariableEditor({ value, onChange }) {
74
74
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
75
75
  children: [
76
76
  /*#__PURE__*/ (0, _jsxruntime.jsx)("label", {
@@ -49,7 +49,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
49
49
  if (cache && cache.has(obj)) {
50
50
  return cache.get(obj);
51
51
  }
52
- var newObj = {};
52
+ var newObj = {
53
+ __proto__: null
54
+ };
53
55
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
54
56
  for(var key in obj){
55
57
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -21,11 +21,11 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- mockPluginRegistry: function() {
25
- return mockPluginRegistry;
26
- },
27
24
  getMockPluginName: function() {
28
25
  return getMockPluginName;
26
+ },
27
+ mockPluginRegistry: function() {
28
+ return mockPluginRegistry;
29
29
  }
30
30
  });
31
31
  function mockPluginRegistry(...mockPlugins) {
@@ -39,7 +39,7 @@ function mockPluginRegistry(...mockPlugins) {
39
39
  },
40
40
  spec: {
41
41
  // Add metadata for all mock plugins
42
- plugins: mockPlugins.map(({ pluginType , kind })=>({
42
+ plugins: mockPlugins.map(({ pluginType, kind })=>({
43
43
  pluginType,
44
44
  kind,
45
45
  display: {
@@ -21,11 +21,11 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- getTitleAction: function() {
25
- return getTitleAction;
26
- },
27
24
  getSubmitText: function() {
28
25
  return getSubmitText;
26
+ },
27
+ getTitleAction: function() {
28
+ return getTitleAction;
29
29
  }
30
30
  });
31
31
  function getTitleAction(action, isDraft) {
@@ -21,14 +21,14 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- replaceTemplateVariables: function() {
25
- return replaceTemplateVariables;
24
+ parseTemplateVariables: function() {
25
+ return parseTemplateVariables;
26
26
  },
27
27
  replaceTemplateVariable: function() {
28
28
  return replaceTemplateVariable;
29
29
  },
30
- parseTemplateVariables: function() {
31
- return parseTemplateVariables;
30
+ replaceTemplateVariables: function() {
31
+ return replaceTemplateVariables;
32
32
  }
33
33
  });
34
34
  function replaceTemplateVariables(text, variableState) {
@@ -0,0 +1,25 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "durationValidationSchema", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return durationValidationSchema;
21
+ }
22
+ });
23
+ const _core = require("@perses-dev/core");
24
+ const _zod = require("zod");
25
+ const durationValidationSchema = _zod.z.string().nonempty('Required').regex(_core.DURATION_REGEX, 'Must be a valid duration string');
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
17
  _export_star(require("./datasource"), exports);
18
+ _export_star(require("./duration"), exports);
18
19
  _export_star(require("./resource"), exports);
19
20
  _export_star(require("./secret"), exports);
20
21
  _export_star(require("./variable"), exports);
@@ -21,4 +21,4 @@ Object.defineProperty(exports, "resourceIdValidationSchema", {
21
21
  }
22
22
  });
23
23
  const _zod = require("zod");
24
- const resourceIdValidationSchema = _zod.z.string().nonempty('Required').max(75, 'Must be 75 or fewer characters long').regex(/^[a-zA-Z0-9_.-]+$/, 'Must only contains alphanumerical characters and special characters _ . -');
24
+ const resourceIdValidationSchema = _zod.z.string().min(1, 'Required').max(75, 'Must be 75 or fewer characters long').regex(/^[a-zA-Z0-9_.-]+$/, 'Must only contains alphanumerical characters and special characters _ . -');
@@ -21,12 +21,12 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- roleValidationSchema: function() {
25
- return roleValidationSchema;
26
- },
27
24
  globalRoleValidationSchema: function() {
28
25
  return globalRoleValidationSchema;
29
26
  },
27
+ roleValidationSchema: function() {
28
+ return roleValidationSchema;
29
+ },
30
30
  rolesEditorValidationSchema: function() {
31
31
  return rolesEditorValidationSchema;
32
32
  }
@@ -46,6 +46,7 @@ const permissionValidationSchema = _zod.z.object({
46
46
  '*',
47
47
  'Dashboard',
48
48
  'Datasource',
49
+ 'EphemeralDashboard',
49
50
  'Folder',
50
51
  'GlobalDatasource',
51
52
  'GlobalRole',
@@ -21,12 +21,12 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- secretValidationSchema: function() {
25
- return secretValidationSchema;
26
- },
27
24
  globalSecretValidationSchema: function() {
28
25
  return globalSecretValidationSchema;
29
26
  },
27
+ secretValidationSchema: function() {
28
+ return secretValidationSchema;
29
+ },
30
30
  secretsEditorValidationSchema: function() {
31
31
  return secretsEditorValidationSchema;
32
32
  }
@@ -0,0 +1,46 @@
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, "userEditorValidationSchema", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return userEditorValidationSchema;
21
+ }
22
+ });
23
+ const _zod = require("zod");
24
+ const _resource = require("./resource");
25
+ const nativeProviderSchema = _zod.z.object({
26
+ password: _zod.z.string().optional()
27
+ });
28
+ const oauthProvidersSchema = _zod.z.object({
29
+ issuer: _zod.z.string().optional(),
30
+ email: _zod.z.string().optional(),
31
+ subject: _zod.z.string().optional()
32
+ });
33
+ // TODO: handle exclusion native / oauth?
34
+ const userSpecSchema = _zod.z.object({
35
+ firstName: _zod.z.string().optional(),
36
+ lastName: _zod.z.string().optional(),
37
+ nativeProvider: nativeProviderSchema.optional(),
38
+ oauthProviders: _zod.z.array(oauthProvidersSchema).optional()
39
+ });
40
+ const userEditorValidationSchema = _zod.z.object({
41
+ kind: _zod.z.literal('User'),
42
+ metadata: _zod.z.object({
43
+ name: _resource.resourceIdValidationSchema
44
+ }),
45
+ spec: userSpecSchema
46
+ });
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { CalculationType } from '@perses-dev/core';
3
2
  export interface CalculationSelectorProps {
4
3
  value: CalculationType;
5
4
  onChange: (unit: CalculationType) => void;
6
5
  }
7
- export declare function CalculationSelector({ value, onChange }: CalculationSelectorProps): JSX.Element;
6
+ export declare function CalculationSelector({ value, onChange }: CalculationSelectorProps): import("react/jsx-runtime").JSX.Element;
8
7
  //# sourceMappingURL=CalculationSelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalculationSelector.d.ts","sourceRoot":"","sources":["../../../src/components/CalculationSelector/CalculationSelector.tsx"],"names":[],"mappings":";AAcA,OAAO,EAA0C,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAU3F,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,wBAAwB,eAuBhF"}
1
+ {"version":3,"file":"CalculationSelector.d.ts","sourceRoot":"","sources":["../../../src/components/CalculationSelector/CalculationSelector.tsx"],"names":[],"mappings":"AAcA,OAAO,EAA0C,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAU3F,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,wBAAwB,2CAuBhF"}