@grafana/plugin-ui 0.14.1-dsconfig.bccd84e → 0.14.1-dsconfig.ced809d

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 (217) hide show
  1. package/dist/cjs/index.cjs +1076 -318
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +439 -115
  4. package/dist/cjs/schemas.cjs +14853 -0
  5. package/dist/cjs/schemas.cjs.map +1 -0
  6. package/dist/cjs/schemas.d.cts +373 -0
  7. package/dist/cjs/test-utils.d.cts +23 -23
  8. package/dist/esm/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js +2 -2
  9. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js +14 -9
  10. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js.map +1 -1
  11. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceErrorBoundary.js +27 -0
  12. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceErrorBoundary.js.map +1 -0
  13. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SchemaField.js +16 -5
  14. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SchemaField.js.map +1 -1
  15. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SidebarNav.js.map +1 -1
  16. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/TabLayout.js +9 -4
  17. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/TabLayout.js.map +1 -1
  18. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/fieldUtils.js +61 -11
  19. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/fieldUtils.js.map +1 -1
  20. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{useDatasourceConfigForm.js → hooks/useDatasourceConfigForm.js} +71 -29
  21. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useDatasourceConfigForm.js.map +1 -0
  22. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useHealthChecks.js +106 -0
  23. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useHealthChecks.js.map +1 -0
  24. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{AuthorizationHeaderField.js → inputs/AuthorizationHeaderField.js} +6 -8
  25. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/AuthorizationHeaderField.js.map +1 -0
  26. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{ComplexFieldNote.js → inputs/ComplexFieldNote.js} +6 -4
  27. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ComplexFieldNote.js.map +1 -0
  28. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FileUploadField.js +106 -0
  29. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FileUploadField.js.map +1 -0
  30. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{IndexedPairEditor.js → inputs/IndexedPairEditor.js} +52 -52
  31. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/IndexedPairEditor.js.map +1 -0
  32. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js +190 -0
  33. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js.map +1 -0
  34. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{PdcFieldNote.js → inputs/PdcFieldNote.js} +5 -8
  35. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/PdcFieldNote.js.map +1 -0
  36. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{SecureFieldInput.js → inputs/SecureFieldInput.js} +8 -10
  37. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/SecureFieldInput.js.map +1 -0
  38. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/StringArrayInput.js +80 -0
  39. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/StringArrayInput.js.map +1 -0
  40. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/renderFieldInput.js +76 -41
  41. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/renderFieldInput.js.map +1 -1
  42. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/resolvePluginName.js +30 -0
  43. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/resolvePluginName.js.map +1 -0
  44. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/tabStyles.js +4 -4
  45. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/tabStyles.js.map +1 -1
  46. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/wizardStyles.js +3 -3
  47. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/wizardStyles.js.map +1 -1
  48. package/dist/esm/components/DataLinks/DataLink.js +2 -2
  49. package/dist/esm/components/DataLinks/DataLinks.js +2 -2
  50. package/dist/esm/components/DataSourcePicker/DataSourcePicker.js +7 -7
  51. package/dist/esm/components/DatePicker/styles.js +2 -2
  52. package/dist/esm/components/DatePickerWithInput/styles.js +2 -2
  53. package/dist/esm/components/QueryEditor/EditorField.js +2 -2
  54. package/dist/esm/components/QueryEditor/EditorHeader.js +2 -2
  55. package/dist/esm/components/QueryEditor/EditorRow.js +2 -2
  56. package/dist/esm/components/QueryEditor/EditorSwitch.js +2 -2
  57. package/dist/esm/components/QueryEditor/InputGroup.js +2 -2
  58. package/dist/esm/components/QueryEditor/Space.js +2 -2
  59. package/dist/esm/components/QueryEditor/query-editor-raw/RawEditor.js +2 -2
  60. package/dist/esm/components/QueryEditor/visual-query-builder/EditorField.js +2 -2
  61. package/dist/esm/components/QueryEditor/visual-query-builder/EditorRow.js +2 -2
  62. package/dist/esm/components/QueryEditor/visual-query-builder/Preview.js +2 -2
  63. package/dist/esm/components/QueryEditor/visual-query-builder/SelectRow.js +2 -2
  64. package/dist/esm/datasource/SqlDatasource.js +10 -10
  65. package/dist/esm/datasource/schema/cel.js +42 -0
  66. package/dist/esm/datasource/schema/cel.js.map +1 -0
  67. package/dist/esm/datasource/schema/config.js +37 -14
  68. package/dist/esm/datasource/schema/config.js.map +1 -1
  69. package/dist/esm/datasource/schema/datasource.js +129 -3
  70. package/dist/esm/datasource/schema/datasource.js.map +1 -1
  71. package/dist/esm/datasource/schema/datasources/alertmanager.schema.json.js +77 -0
  72. package/dist/esm/datasource/schema/datasources/alertmanager.schema.json.js.map +1 -0
  73. package/dist/esm/datasource/schema/datasources/cloudwatch.schema.json.js +384 -0
  74. package/dist/esm/datasource/schema/datasources/cloudwatch.schema.json.js.map +1 -0
  75. package/dist/esm/datasource/schema/datasources/elasticsearch.schema.json.js +287 -0
  76. package/dist/esm/datasource/schema/datasources/elasticsearch.schema.json.js.map +1 -0
  77. package/dist/esm/datasource/schema/datasources/grafana-amazonprometheus-datasource.schema.json.js +166 -0
  78. package/dist/esm/datasource/schema/datasources/grafana-amazonprometheus-datasource.schema.json.js.map +1 -0
  79. package/dist/esm/datasource/schema/datasources/grafana-appdynamics-datasource.schema.json.js +145 -0
  80. package/dist/esm/datasource/schema/datasources/grafana-appdynamics-datasource.schema.json.js.map +1 -0
  81. package/dist/esm/datasource/schema/datasources/grafana-astradb-datasource.schema.json.js +123 -0
  82. package/dist/esm/datasource/schema/datasources/grafana-astradb-datasource.schema.json.js.map +1 -0
  83. package/dist/esm/datasource/schema/datasources/grafana-athena-datasource.schema.json.js +158 -0
  84. package/dist/esm/datasource/schema/datasources/grafana-athena-datasource.schema.json.js.map +1 -0
  85. package/dist/esm/datasource/schema/datasources/grafana-azure-data-explorer-datasource.schema.json.js +204 -0
  86. package/dist/esm/datasource/schema/datasources/grafana-azure-data-explorer-datasource.schema.json.js.map +1 -0
  87. package/dist/esm/datasource/schema/datasources/grafana-azure-monitor-datasource.schema.json.js +294 -0
  88. package/dist/esm/datasource/schema/datasources/grafana-azure-monitor-datasource.schema.json.js.map +1 -0
  89. package/dist/esm/datasource/schema/datasources/grafana-azuredevops-datasource.schema.json.js +101 -0
  90. package/dist/esm/datasource/schema/datasources/grafana-azuredevops-datasource.schema.json.js.map +1 -0
  91. package/dist/esm/datasource/schema/datasources/grafana-azureprometheus-datasource.schema.json.js +125 -0
  92. package/dist/esm/datasource/schema/datasources/grafana-azureprometheus-datasource.schema.json.js.map +1 -0
  93. package/dist/esm/datasource/schema/datasources/grafana-bigquery-datasource.schema.json.js +508 -0
  94. package/dist/esm/datasource/schema/datasources/grafana-bigquery-datasource.schema.json.js.map +1 -0
  95. package/dist/esm/datasource/schema/datasources/grafana-clickhouse-datasource.schema.json.js +1400 -0
  96. package/dist/esm/datasource/schema/datasources/grafana-clickhouse-datasource.schema.json.js.map +1 -0
  97. package/dist/esm/datasource/schema/datasources/grafana-cockroachdb-datasource.schema.json.js +302 -0
  98. package/dist/esm/datasource/schema/datasources/grafana-cockroachdb-datasource.schema.json.js.map +1 -0
  99. package/dist/esm/datasource/schema/datasources/grafana-databricks-datasource.schema.json.js +291 -0
  100. package/dist/esm/datasource/schema/datasources/grafana-databricks-datasource.schema.json.js.map +1 -0
  101. package/dist/esm/datasource/schema/datasources/grafana-datadog-datasource.schema.json.js +155 -0
  102. package/dist/esm/datasource/schema/datasources/grafana-datadog-datasource.schema.json.js.map +1 -0
  103. package/dist/esm/datasource/schema/datasources/grafana-dynatrace-datasource.schema.json.js +179 -0
  104. package/dist/esm/datasource/schema/datasources/grafana-dynatrace-datasource.schema.json.js.map +1 -0
  105. package/dist/esm/datasource/schema/datasources/grafana-falconlogscale-datasource.schema.json.js +134 -0
  106. package/dist/esm/datasource/schema/datasources/grafana-falconlogscale-datasource.schema.json.js.map +1 -0
  107. package/dist/esm/datasource/schema/datasources/grafana-github-datasource.schema.json.js +156 -0
  108. package/dist/esm/datasource/schema/datasources/grafana-github-datasource.schema.json.js.map +1 -0
  109. package/dist/esm/datasource/schema/datasources/grafana-gitlab-datasource.schema.json.js +84 -0
  110. package/dist/esm/datasource/schema/datasources/grafana-gitlab-datasource.schema.json.js.map +1 -0
  111. package/dist/esm/datasource/schema/datasources/grafana-googlesheets-datasource.schema.json.js +231 -0
  112. package/dist/esm/datasource/schema/datasources/grafana-googlesheets-datasource.schema.json.js.map +1 -0
  113. package/dist/esm/datasource/schema/datasources/grafana-honeycomb-datasource.schema.json.js +87 -0
  114. package/dist/esm/datasource/schema/datasources/grafana-honeycomb-datasource.schema.json.js.map +1 -0
  115. package/dist/esm/datasource/schema/datasources/grafana-iot-sitewise-datasource.schema.json.js +159 -0
  116. package/dist/esm/datasource/schema/datasources/grafana-iot-sitewise-datasource.schema.json.js.map +1 -0
  117. package/dist/esm/datasource/schema/datasources/grafana-jira-datasource.schema.json.js +188 -0
  118. package/dist/esm/datasource/schema/datasources/grafana-jira-datasource.schema.json.js.map +1 -0
  119. package/dist/esm/datasource/schema/datasources/grafana-looker-datasource.schema.json.js +82 -0
  120. package/dist/esm/datasource/schema/datasources/grafana-looker-datasource.schema.json.js.map +1 -0
  121. package/dist/esm/datasource/schema/datasources/grafana-mongodb-datasource.schema.json.js +278 -0
  122. package/dist/esm/datasource/schema/datasources/grafana-mongodb-datasource.schema.json.js.map +1 -0
  123. package/dist/esm/datasource/schema/datasources/grafana-mqtt-datasource.schema.json.js +168 -0
  124. package/dist/esm/datasource/schema/datasources/grafana-mqtt-datasource.schema.json.js.map +1 -0
  125. package/dist/esm/datasource/schema/datasources/grafana-newrelic-datasource.schema.json.js +129 -0
  126. package/dist/esm/datasource/schema/datasources/grafana-newrelic-datasource.schema.json.js.map +1 -0
  127. package/dist/esm/datasource/schema/datasources/grafana-odbc-datasource.schema.json.js +56 -0
  128. package/dist/esm/datasource/schema/datasources/grafana-odbc-datasource.schema.json.js.map +1 -0
  129. package/dist/esm/datasource/schema/datasources/grafana-opensearch-datasource.schema.json.js +212 -0
  130. package/dist/esm/datasource/schema/datasources/grafana-opensearch-datasource.schema.json.js.map +1 -0
  131. package/dist/esm/datasource/schema/datasources/grafana-oracle-datasource.schema.json.js +186 -0
  132. package/dist/esm/datasource/schema/datasources/grafana-oracle-datasource.schema.json.js.map +1 -0
  133. package/dist/esm/datasource/schema/datasources/grafana-pagerduty-datasource.schema.json.js +85 -0
  134. package/dist/esm/datasource/schema/datasources/grafana-pagerduty-datasource.schema.json.js.map +1 -0
  135. package/dist/esm/datasource/schema/datasources/grafana-postgresql-datasource.schema.json.js +411 -0
  136. package/dist/esm/datasource/schema/datasources/grafana-postgresql-datasource.schema.json.js.map +1 -0
  137. package/dist/esm/datasource/schema/datasources/grafana-pyroscope-datasource.schema.json.js +41 -0
  138. package/dist/esm/datasource/schema/datasources/grafana-pyroscope-datasource.schema.json.js.map +1 -0
  139. package/dist/esm/datasource/schema/datasources/grafana-redshift-datasource.schema.json.js +201 -0
  140. package/dist/esm/datasource/schema/datasources/grafana-redshift-datasource.schema.json.js.map +1 -0
  141. package/dist/esm/datasource/schema/datasources/grafana-salesforce-datasource.schema.json.js +201 -0
  142. package/dist/esm/datasource/schema/datasources/grafana-salesforce-datasource.schema.json.js.map +1 -0
  143. package/dist/esm/datasource/schema/datasources/grafana-saphana-datasource.schema.json.js +208 -0
  144. package/dist/esm/datasource/schema/datasources/grafana-saphana-datasource.schema.json.js.map +1 -0
  145. package/dist/esm/datasource/schema/datasources/grafana-sentry-datasource.schema.json.js +94 -0
  146. package/dist/esm/datasource/schema/datasources/grafana-sentry-datasource.schema.json.js.map +1 -0
  147. package/dist/esm/datasource/schema/datasources/grafana-servicenow-datasource.schema.json.js +179 -0
  148. package/dist/esm/datasource/schema/datasources/grafana-servicenow-datasource.schema.json.js.map +1 -0
  149. package/dist/esm/datasource/schema/datasources/grafana-snowflake-datasource.schema.json.js +304 -0
  150. package/dist/esm/datasource/schema/datasources/grafana-snowflake-datasource.schema.json.js.map +1 -0
  151. package/dist/esm/datasource/schema/datasources/grafana-splunk-datasource.schema.json.js +319 -0
  152. package/dist/esm/datasource/schema/datasources/grafana-splunk-datasource.schema.json.js.map +1 -0
  153. package/dist/esm/datasource/schema/datasources/grafana-splunkobservability-datasource.schema.json.js +90 -0
  154. package/dist/esm/datasource/schema/datasources/grafana-splunkobservability-datasource.schema.json.js.map +1 -0
  155. package/dist/esm/datasource/schema/datasources/grafana-strava-datasource.schema.json.js +74 -0
  156. package/dist/esm/datasource/schema/datasources/grafana-strava-datasource.schema.json.js.map +1 -0
  157. package/dist/esm/datasource/schema/datasources/grafana-sumologic-datasource.schema.json.js +102 -0
  158. package/dist/esm/datasource/schema/datasources/grafana-sumologic-datasource.schema.json.js.map +1 -0
  159. package/dist/esm/datasource/schema/datasources/grafana-surrealdb-datasource.schema.json.js +92 -0
  160. package/dist/esm/datasource/schema/datasources/grafana-surrealdb-datasource.schema.json.js.map +1 -0
  161. package/dist/esm/datasource/schema/datasources/grafana-timestream-datasource.schema.json.js +145 -0
  162. package/dist/esm/datasource/schema/datasources/grafana-timestream-datasource.schema.json.js.map +1 -0
  163. package/dist/esm/datasource/schema/datasources/grafana-wavefront-datasource.schema.json.js +80 -0
  164. package/dist/esm/datasource/schema/datasources/grafana-wavefront-datasource.schema.json.js.map +1 -0
  165. package/dist/esm/datasource/schema/datasources/grafana-x-ray-datasource.schema.json.js +112 -0
  166. package/dist/esm/datasource/schema/datasources/grafana-x-ray-datasource.schema.json.js.map +1 -0
  167. package/dist/esm/datasource/schema/datasources/grafana-yugabyte-datasource.schema.json.js +114 -0
  168. package/dist/esm/datasource/schema/datasources/grafana-yugabyte-datasource.schema.json.js.map +1 -0
  169. package/dist/esm/datasource/schema/datasources/graphite.schema.json.js +104 -0
  170. package/dist/esm/datasource/schema/datasources/graphite.schema.json.js.map +1 -0
  171. package/dist/esm/datasource/schema/datasources/influxdb.schema.json.js +717 -0
  172. package/dist/esm/datasource/schema/datasources/influxdb.schema.json.js.map +1 -0
  173. package/dist/esm/datasource/schema/datasources/jaeger.schema.json.js +59 -0
  174. package/dist/esm/datasource/schema/datasources/jaeger.schema.json.js.map +1 -0
  175. package/dist/esm/datasource/schema/datasources/loki.schema.json.js +545 -0
  176. package/dist/esm/datasource/schema/datasources/loki.schema.json.js.map +1 -0
  177. package/dist/esm/datasource/schema/datasources/marcusolsson-csv-datasource.schema.json.js +45 -0
  178. package/dist/esm/datasource/schema/datasources/marcusolsson-csv-datasource.schema.json.js.map +1 -0
  179. package/dist/esm/datasource/schema/datasources/marcusolsson-json-datasource.schema.json.js +36 -0
  180. package/dist/esm/datasource/schema/datasources/marcusolsson-json-datasource.schema.json.js.map +1 -0
  181. package/dist/esm/datasource/schema/datasources/mssql.schema.json.js +292 -0
  182. package/dist/esm/datasource/schema/datasources/mssql.schema.json.js.map +1 -0
  183. package/dist/esm/datasource/schema/datasources/mysql.schema.json.js +304 -0
  184. package/dist/esm/datasource/schema/datasources/mysql.schema.json.js.map +1 -0
  185. package/dist/esm/datasource/schema/datasources/opentsdb.schema.json.js +113 -0
  186. package/dist/esm/datasource/schema/datasources/opentsdb.schema.json.js.map +1 -0
  187. package/dist/esm/datasource/schema/datasources/prometheus.schema.json.js +783 -0
  188. package/dist/esm/datasource/schema/datasources/prometheus.schema.json.js.map +1 -0
  189. package/dist/esm/datasource/schema/datasources/stackdriver.schema.json.js +224 -0
  190. package/dist/esm/datasource/schema/datasources/stackdriver.schema.json.js.map +1 -0
  191. package/dist/esm/datasource/schema/datasources/tempo.schema.json.js +664 -0
  192. package/dist/esm/datasource/schema/datasources/tempo.schema.json.js.map +1 -0
  193. package/dist/esm/datasource/schema/datasources/yesoreyeram-infinity-datasource.schema.json.js +1073 -0
  194. package/dist/esm/datasource/schema/datasources/yesoreyeram-infinity-datasource.schema.json.js.map +1 -0
  195. package/dist/esm/datasource/schema/datasources/zipkin.schema.json.js +40 -0
  196. package/dist/esm/datasource/schema/datasources/zipkin.schema.json.js.map +1 -0
  197. package/dist/esm/datasource/schema/llmHints.js.map +1 -1
  198. package/dist/esm/datasource/schema/provisioningYaml.js +3 -1
  199. package/dist/esm/datasource/schema/provisioningYaml.js.map +1 -1
  200. package/dist/esm/datasource/schema/schemaRegistry.js +139 -0
  201. package/dist/esm/datasource/schema/schemaRegistry.js.map +1 -0
  202. package/dist/esm/index.d.ts +439 -115
  203. package/dist/esm/index.js +6 -2
  204. package/dist/esm/index.js.map +1 -1
  205. package/dist/esm/schemas.d.ts +373 -0
  206. package/dist/esm/schemas.js +2 -0
  207. package/dist/esm/schemas.js.map +1 -0
  208. package/dist/esm/test-utils.d.ts +23 -23
  209. package/package.json +23 -6
  210. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/AuthorizationHeaderField.js.map +0 -1
  211. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/ComplexFieldNote.js.map +0 -1
  212. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/IndexedPairEditor.js.map +0 -1
  213. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/PdcFieldNote.js.map +0 -1
  214. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SecureFieldInput.js.map +0 -1
  215. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/StringArrayInput.js +0 -84
  216. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/StringArrayInput.js.map +0 -1
  217. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/useDatasourceConfigForm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import React, { ComponentProps, PureComponent, ReactElement, ReactNode, FunctionComponent, HTMLProps } from 'react';
1
+ import React, { ComponentProps, PureComponent, ReactElement, ReactNode, Component, ErrorInfo, FunctionComponent, HTMLProps } from 'react';
2
2
  import { Input, Segment as Segment$1, monacoTypes, Monaco, ButtonProps, Field, PopoverContent, Switch, SelectCommonProps, InlineLabel } from '@grafana/ui';
3
3
  import { DataSourceInstanceSettings, SelectableValue, DataSourceJsonData, VariableSuggestion, TimeRange, DataFrame, MetricFindValue, ThemeSpacingTokens, ScopedVars, VariableModel, DataFrameView, QueryEditorProps as QueryEditorProps$1, DataSourceSettings, RegistryItem, DataSourceApi, Registry, DataQuery as DataQuery$1, PanelData } from '@grafana/data';
4
4
  import { DataSourceSrv, DataSourceWithBackend, TemplateSrv } from '@grafana/runtime';
@@ -1013,206 +1013,387 @@ type Props$a<C extends Config = Config> = {
1013
1013
  };
1014
1014
  declare const AdvancedHttpSettings: <C extends Config = Config>(props: Props$a<C>) => JSX.Element;
1015
1015
 
1016
- /**
1017
- * Datasource configuration schema types and pure helper functions.
1018
- *
1019
- * These types describe the structure of datasource plugin configuration schemas
1020
- * (dsconfig format). Schemas define fields, groups, validations, and relationships
1021
- * that drive the DatasourceConfigWizard UI and provisioning YAML generation.
1022
- */
1023
- type DatasourceConfigSchema = {
1016
+ interface DatasourceConfigSchema {
1017
+ /**
1018
+ * Schema version (required)
1019
+ * Used for compatibility and migrations
1020
+ *
1021
+ * Example: "v2"
1022
+ */
1024
1023
  schemaVersion: string;
1024
+ /**
1025
+ * Unique datasource plugin identifier
1026
+ * Example: "prometheus"
1027
+ */
1025
1028
  pluginType: string;
1029
+ /**
1030
+ * Human-readable name
1031
+ */
1026
1032
  pluginName: string;
1033
+ /**
1034
+ * Optional documentation URL
1035
+ */
1027
1036
  docURL?: string;
1037
+ /**
1038
+ * Source of truth for configuration
1039
+ */
1028
1040
  fields: ConfigField[];
1041
+ /**
1042
+ * Optional UI grouping
1043
+ */
1029
1044
  groups?: ConfigGroup[];
1045
+ /**
1046
+ * Relationships between fields
1047
+ */
1030
1048
  relationships?: FieldRelationship[];
1031
- };
1032
- type ConfigField = {
1049
+ }
1050
+ interface ConfigField {
1051
+ /**
1052
+ * Globally unique identifier
1053
+ * Recommended format: dot-separated path
1054
+ * Example: "auth.method", "httpHeaders.item.key"
1055
+ */
1033
1056
  id: string;
1057
+ /**
1058
+ * Local key used in storage or object
1059
+ */
1034
1060
  key: string;
1061
+ /**
1062
+ * UI metadata
1063
+ */
1035
1064
  label?: string;
1036
1065
  description?: string;
1037
1066
  docURL?: string;
1067
+ /**
1068
+ * Core type of the field
1069
+ */
1038
1070
  valueType: ValueType;
1071
+ /**
1072
+ * Semantic meaning (optional)
1073
+ */
1039
1074
  semanticType?: SemanticType;
1075
+ /**
1076
+ * Storage location (required for storage fields)
1077
+ */
1040
1078
  target?: TargetLocation;
1079
+ /**
1080
+ * Dotted path prefix within the target for nested objects.
1081
+ * Example: for jsonData.tracesToLogs.datasourceUid,
1082
+ * target="jsonData", section="tracesToLogs", key="datasourceUid".
1083
+ */
1041
1084
  section?: string;
1085
+ /**
1086
+ * Field kind.
1087
+ * @default "storage"
1088
+ */
1042
1089
  kind?: FieldKind;
1090
+ /**
1091
+ * True if field belongs to array item schema
1092
+ */
1043
1093
  isItemField?: boolean;
1094
+ /**
1095
+ * Lifecycle state
1096
+ */
1044
1097
  lifecycle?: Lifecycle;
1098
+ /**
1099
+ * UI rendering hints
1100
+ */
1045
1101
  ui?: FieldUI;
1102
+ /**
1103
+ * Validations rules
1104
+ */
1046
1105
  validations?: FieldValidationRule[];
1047
- dependsOn?: string;
1106
+ /**
1107
+ * Visibility condition (CEL expression)
1108
+ */
1109
+ dependsOn?: Expression;
1110
+ /**
1111
+ * Always required
1112
+ */
1048
1113
  required?: boolean;
1049
- requiredWhen?: string;
1050
- disabledWhen?: string;
1114
+ /**
1115
+ * Conditionally required
1116
+ */
1117
+ requiredWhen?: Expression;
1118
+ /**
1119
+ * Disabled condition
1120
+ */
1121
+ disabledWhen?: Expression;
1122
+ /**
1123
+ * Dynamic overrides
1124
+ */
1051
1125
  overrides?: FieldOverride[];
1126
+ /**
1127
+ * Declarative multi-field write side-effects.
1128
+ * When this field's value matches a condition, the listed target
1129
+ * fields are set to specified values. Typically used on virtual
1130
+ * selector fields (e.g. auth method dropdown).
1131
+ */
1052
1132
  effects?: FieldEffect[];
1133
+ /**
1134
+ * Item schema for array elements or map values.
1135
+ * Required if valueType === "array" or "map".
1136
+ */
1053
1137
  item?: FieldItemSchema;
1138
+ /**
1139
+ * Legacy indexed fields (deprecated)
1140
+ */
1141
+ repeatable?: boolean;
1142
+ pattern?: string;
1143
+ /**
1144
+ * Storage mapping
1145
+ */
1054
1146
  storage?: StorageMapping;
1147
+ /**
1148
+ * Metadata
1149
+ */
1055
1150
  tags?: string[];
1056
1151
  examples?: unknown[];
1057
1152
  defaultValue?: unknown;
1058
- };
1059
- type FieldItemSchema = {
1153
+ }
1154
+ interface FieldItemSchema {
1155
+ /**
1156
+ * Type of array items or map values.
1157
+ * For arrays, describes each element.
1158
+ * For maps, describes each value (keys are always strings).
1159
+ */
1060
1160
  valueType: ValueType;
1161
+ /**
1162
+ * Sub-fields for object items. Optional even when valueType = "object"
1163
+ * (omitting allows an unconstrained object).
1164
+ */
1061
1165
  fields?: ConfigField[];
1062
- };
1166
+ }
1167
+ /**
1168
+ * CEL expression string
1169
+ */
1170
+ type Expression = string;
1063
1171
  type ValueType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'map' | 'any';
1064
1172
  type SemanticType = 'url' | 'password' | 'token' | 'hostname' | 'duration' | 'datasourceUid' | 'query';
1065
1173
  type FieldKind = 'storage' | 'virtual';
1066
1174
  type Lifecycle = 'stable' | 'deprecated' | 'experimental';
1067
1175
  type TargetLocation = 'root' | 'jsonData' | 'secureJsonData';
1068
- type UIComponent = 'input' | 'textarea' | 'select' | 'multiselect' | 'radio' | 'checkbox' | 'switch' | 'code' | 'keyvalue' | 'list';
1069
- type FieldUI = {
1176
+ type UIComponent = 'input' | 'textarea' | 'select' | 'multiselect' | 'radio' | 'checkbox' | 'switch' | 'code' | 'keyvalue' | 'list' | 'fileUpload';
1177
+ type UIWidth = 'full' | 'half';
1178
+ /**
1179
+ * UI configuration
1180
+ */
1181
+ interface FieldUI {
1070
1182
  component: UIComponent;
1071
1183
  multiline?: boolean;
1072
1184
  rows?: number;
1073
1185
  options?: FieldOption[];
1074
1186
  allowCustom?: boolean;
1075
- width?: 'full' | 'half';
1187
+ width?: UIWidth;
1076
1188
  placeholder?: string;
1189
+ /**
1190
+ * Language hint for code editor components.
1191
+ * Example: "promql", "logql", "traceql", "sql", "json"
1192
+ */
1077
1193
  language?: string;
1078
- };
1079
- type FieldOption = {
1080
- label: string;
1081
- value: unknown;
1082
- description?: string;
1083
- };
1084
- type FieldValidationRule = PatternValidation | RangeValidation | LengthValidation | ItemCountValidation | AllowedValuesValidation | CustomValidation;
1085
- type BaseValidation = {
1194
+ /**
1195
+ * Layout row index for item fields inside object arrays.
1196
+ * Fields with the same row number are rendered horizontally.
1197
+ * Fields without a row number use auto-layout:
1198
+ * - ≤3 fields: all on one row
1199
+ * - >3 fields: each on its own row
1200
+ */
1201
+ row?: number;
1202
+ /**
1203
+ * Accepted file types for fileUpload component.
1204
+ * Uses HTML accept attribute format with leading dot.
1205
+ * Example: [".json"]
1206
+ */
1207
+ accept?: string[];
1208
+ /**
1209
+ * Maps keys in an uploaded JSON file to target field IDs.
1210
+ * Used by fileUpload to distribute parsed values to other form fields.
1211
+ * Example: { "private_key": "secureJsonData.privateKey", "client_email": "jsonData.clientEmail" }
1212
+ */
1213
+ fileMapping?: Record<string, string>;
1214
+ }
1215
+ type FieldValidationRule = PatternValidationRule | RangeValidationRule | LengthValidationRule | ItemCountValidationRule | AllowedValuesValidationRule | CustomValidationRule;
1216
+ interface BaseValidationRule {
1217
+ /**
1218
+ * Optional stable ID for the validation rule.
1219
+ * Useful for docs, localization, and test snapshots.
1220
+ */
1086
1221
  id?: string;
1222
+ /**
1223
+ * Human-readable validation error message.
1224
+ */
1087
1225
  message?: string;
1088
- };
1089
- type PatternValidation = BaseValidation & {
1226
+ }
1227
+ interface PatternValidationRule extends BaseValidationRule {
1090
1228
  type: 'pattern';
1091
1229
  pattern: string;
1092
- };
1093
- type RangeValidation = BaseValidation & {
1230
+ }
1231
+ interface RangeValidationRule extends BaseValidationRule {
1094
1232
  type: 'range';
1095
1233
  min?: number;
1096
1234
  max?: number;
1097
- };
1098
- type LengthValidation = BaseValidation & {
1235
+ }
1236
+ interface LengthValidationRule extends BaseValidationRule {
1099
1237
  type: 'length';
1100
1238
  min?: number;
1101
1239
  max?: number;
1102
- };
1103
- type ItemCountValidation = BaseValidation & {
1240
+ }
1241
+ interface ItemCountValidationRule extends BaseValidationRule {
1104
1242
  type: 'itemCount';
1105
1243
  min?: number;
1106
1244
  max?: number;
1107
- };
1108
- type AllowedValuesValidation = BaseValidation & {
1245
+ }
1246
+ interface AllowedValuesValidationRule extends BaseValidationRule {
1109
1247
  type: 'allowedValues';
1110
1248
  values: unknown[];
1111
- };
1112
- type CustomValidation = BaseValidation & {
1249
+ }
1250
+ interface CustomValidationRule extends BaseValidationRule {
1113
1251
  type: 'custom';
1114
- expression: string;
1115
- };
1116
- type FieldOverride = {
1117
- when: string;
1252
+ /**
1253
+ * CEL expression.
1254
+ *
1255
+ * Should evaluate to true when the field value is valid.
1256
+ */
1257
+ expression: Expression;
1258
+ }
1259
+ interface FieldOverride {
1260
+ /**
1261
+ * CEL condition
1262
+ */
1263
+ when: Expression;
1118
1264
  defaultValue?: unknown;
1265
+ /**
1266
+ * When true, the field is disabled/read-only while this override is active.
1267
+ */
1119
1268
  readOnly?: boolean;
1120
1269
  description?: string;
1121
1270
  placeholder?: string;
1122
1271
  tooltip?: string;
1123
1272
  validations?: FieldValidationRule[];
1124
1273
  options?: FieldOption[];
1125
- };
1126
- type FieldEffect = {
1127
- when: string;
1128
- set: Record<string, unknown>;
1129
- };
1274
+ /**
1275
+ * When present on an `isItemField` field, the value is routed to
1276
+ * `secureJsonData` under the resolved key instead of being stored
1277
+ * inline in the parent array.
1278
+ *
1279
+ * The template string supports placeholders:
1280
+ * - `{index}` — 0-based array position
1281
+ * - `{index1}` — 1-based array position
1282
+ * - `{item.KEY}` — value of sibling item field `KEY`
1283
+ *
1284
+ * Examples:
1285
+ * - `"secureHttpHeaders.{item.name}"` (ClickHouse)
1286
+ * - `"httpHeaderValue{index1}"` (Grafana core headers)
1287
+ */
1288
+ secureKey?: string;
1289
+ }
1290
+ /**
1291
+ * Declares that when a field's value matches a condition,
1292
+ * listed target fields should be set to specified values.
1293
+ *
1294
+ * Use "value" in the `when` expression to refer to the field's value.
1295
+ */
1296
+ interface FieldEffect {
1297
+ /**
1298
+ * CEL expression. Example: "value == 'basic-auth'"
1299
+ */
1300
+ when: Expression;
1301
+ /**
1302
+ * Maps field IDs to the values they should be set to.
1303
+ * Must contain at least one entry.
1304
+ */
1305
+ set: Record<string, unknown> & {
1306
+ [k: string]: unknown;
1307
+ };
1308
+ }
1130
1309
  type StorageMapping = DirectMapping | IndexedPairMapping | ComputedMapping;
1131
- type DirectMapping = {
1310
+ /**
1311
+ * Direct mapping
1312
+ */
1313
+ interface DirectMapping {
1132
1314
  type: 'direct';
1133
- };
1134
- type IndexedPairMapping = {
1315
+ }
1316
+ /**
1317
+ * Indexed pair mapping (headers)
1318
+ */
1319
+ interface IndexedPairMapping {
1135
1320
  type: 'indexedPair';
1136
1321
  key: MappingField;
1137
1322
  value: MappingField;
1138
1323
  startIndex?: number;
1139
- };
1324
+ }
1325
+ /**
1326
+ * Computed mapping (virtual fields).
1327
+ * At least one of `read` or `write` must be provided.
1328
+ */
1140
1329
  type ComputedMapping = {
1141
1330
  type: 'computed';
1142
- read?: string;
1143
- write?: string;
1331
+ read: Expression;
1332
+ write?: Expression;
1333
+ } | {
1334
+ type: 'computed';
1335
+ read?: Expression;
1336
+ write: Expression;
1144
1337
  };
1145
- type MappingField = {
1338
+ /**
1339
+ * Mapping field
1340
+ */
1341
+ interface MappingField {
1146
1342
  target: TargetLocation;
1147
1343
  pattern: string;
1148
- };
1149
- type ConfigGroup = {
1344
+ }
1345
+ interface FieldOption {
1346
+ label: string;
1347
+ /**
1348
+ * Must match parent field valueType.
1349
+ * Must not be null.
1350
+ */
1351
+ value: NonNullable<unknown>;
1352
+ /**
1353
+ * Optional human-readable description of the option.
1354
+ */
1355
+ description?: string;
1356
+ }
1357
+ interface ConfigGroup {
1150
1358
  id: string;
1151
1359
  title: string;
1152
1360
  description?: string;
1153
1361
  order?: number;
1362
+ /**
1363
+ * When true, the group is optional and can be collapsed/hidden by default.
1364
+ */
1154
1365
  optional?: boolean;
1366
+ /**
1367
+ * References field IDs (not keys)
1368
+ */
1155
1369
  fieldRefs: string[];
1156
- };
1157
- type FieldRelationship = {
1158
- type: 'pair' | 'group' | 'datasourceReference';
1370
+ }
1371
+ type RelationshipType = 'pair' | 'group' | 'datasourceReference';
1372
+ interface FieldRelationship {
1373
+ type: RelationshipType;
1374
+ /**
1375
+ * References field IDs
1376
+ */
1159
1377
  fields: string[];
1160
1378
  description?: string;
1379
+ /**
1380
+ * Constrains the datasource UID to a specific plugin type.
1381
+ * Only applicable when type is "datasourceReference".
1382
+ */
1161
1383
  targetPluginType?: string;
1162
- };
1163
- /**
1164
- * Resolve a schema's groups into arrays of ConfigField objects.
1165
- * If the schema has no groups, returns a single group containing all non-virtual fields.
1166
- */
1167
- declare function resolveGroups(schema: DatasourceConfigSchema): Array<{
1168
- group: ConfigGroup;
1169
- fields: ConfigField[];
1170
- }>;
1171
- /**
1172
- * Build a virtual "Required" group containing all required fields, any parent
1173
- * fields they depend on (via `dependsOn`), and any child fields that depend on
1174
- * required fields. When the schema contains an "auth" group, its fields are
1175
- * also pulled in (auth is effectively required for Prometheus/Loki/Tempo style
1176
- * datasources). Fields are returned in schema order and de-duplicated.
1177
- * Returns `null` when the virtual group would be empty.
1178
- */
1179
- declare function resolveRequiredFieldsGroup(schema: DatasourceConfigSchema): {
1180
- group: ConfigGroup;
1181
- fields: ConfigField[];
1182
- } | null;
1183
- /**
1184
- * Unique form key for a field. Section-scoped fields (e.g. section:"logs", key:"defaultTable")
1185
- * get a prefixed key ("logs.defaultTable") so they don't collide with top-level fields that
1186
- * share the same key name.
1187
- */
1188
- declare function formKey(field: ConfigField): string;
1189
- /**
1190
- * Parse a simple CEL-like dependsOn expression: "fieldId == 'value'" or "fieldId == true".
1191
- * Returns { field, value } or null if unparseable.
1192
- */
1193
- declare function parseDependsOn(expr: string): {
1194
- field: string;
1384
+ }
1385
+ type SecureFieldState = {
1386
+ type: 'unset';
1387
+ } | {
1388
+ type: 'configured';
1389
+ } | {
1390
+ type: 'updated';
1195
1391
  value: string;
1196
- } | null;
1197
- /**
1198
- * Resolve the first matching override for a field given current form values.
1199
- * Override `when` uses the same "fieldId == 'value'" syntax as dependsOn.
1200
- * Returns the matching override or undefined if none match.
1201
- */
1202
- declare function resolveActiveOverride(field: ConfigField, watchedValues: Record<string, unknown>, fieldById: Map<string, ConfigField>): FieldOverride | undefined;
1203
- /**
1204
- * Evaluate a simple computed.read expression against form values.
1205
- * Supports patterns used in dsconfig schemas:
1206
- * - "fieldRef == true ? 'a' : (fieldRef == true ? 'b' : 'c')"
1207
- * - Simple ternary chains with equality checks
1208
- * Falls back to the field's defaultValue if the expression can't be evaluated.
1209
- */
1210
- declare function evaluateComputedRead(expr: string, values: Record<string, unknown>, fields: ConfigField[]): unknown;
1211
- /**
1212
- * Compute initial values for all virtual fields that have storage.computed.read expressions.
1213
- * Call after loading existing storage field values.
1214
- */
1215
- declare function computeVirtualFieldValues(schema: DatasourceConfigSchema, existingValues: Record<string, unknown>): Record<string, unknown>;
1392
+ };
1393
+ interface FormState {
1394
+ values: Record<string, unknown>;
1395
+ secure: Record<string, SecureFieldState>;
1396
+ }
1216
1397
 
1217
1398
  type DatasourceConfigWizardProps = {
1218
1399
  schema: DatasourceConfigSchema;
@@ -1234,6 +1415,43 @@ type DatasourceConfigWizardProps = {
1234
1415
  };
1235
1416
  declare function DatasourceConfigWizard(props: DatasourceConfigWizardProps): React.JSX.Element;
1236
1417
 
1418
+ /** Lightweight error boundary scoped to datasource config widgets — won't crash the host UI. */
1419
+ declare class DatasourceErrorBoundary extends Component<{
1420
+ children: ReactNode;
1421
+ dsName?: string;
1422
+ }, {
1423
+ error: Error | null;
1424
+ }> {
1425
+ state: {
1426
+ error: Error | null;
1427
+ };
1428
+ static getDerivedStateFromError(error: Error): {
1429
+ error: Error;
1430
+ };
1431
+ componentDidCatch(error: Error, info: ErrorInfo): void;
1432
+ render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
1433
+ }
1434
+
1435
+ type HealthState = 'pending' | 'checking' | 'done';
1436
+ interface DatasourceHealth {
1437
+ state: HealthState;
1438
+ status?: string;
1439
+ message?: string;
1440
+ }
1441
+ /**
1442
+ * Health check hook — on-demand only.
1443
+ * Call `checkUids(uids)` to trigger checks for specific UIDs.
1444
+ * Call `retry(uid)` to force re-check a single UID.
1445
+ * UIDs that have already been checked (or are in-flight) are automatically skipped.
1446
+ */
1447
+ declare function useHealthChecks(): {
1448
+ healthMap: Record<string, DatasourceHealth>;
1449
+ checkUids: (uids: string[]) => void;
1450
+ retry: (uid: string) => void;
1451
+ };
1452
+
1453
+ declare function resolvePluginName(pluginType: string): string;
1454
+
1237
1455
  interface CustomHeader {
1238
1456
  id: string;
1239
1457
  name: string;
@@ -1458,6 +1676,92 @@ interface Props {
1458
1676
  }
1459
1677
  declare function RawQuery({ query, language, className }: Props): React.JSX.Element;
1460
1678
 
1679
+ /**
1680
+ * Pure helper functions for working with DatasourceConfigSchema.
1681
+ *
1682
+ * Types are defined in schema.ts — import them from there directly.
1683
+ */
1684
+
1685
+ /**
1686
+ * Resolve a schema's groups into arrays of ConfigField objects.
1687
+ * If the schema has no groups, returns a single group containing all non-virtual fields.
1688
+ */
1689
+ declare function resolveGroups(schema: DatasourceConfigSchema): Array<{
1690
+ group: ConfigGroup;
1691
+ fields: ConfigField[];
1692
+ }>;
1693
+ /**
1694
+ * Build a virtual "Required" group containing all required fields, any parent
1695
+ * fields they depend on (via `dependsOn`), and any child fields that depend on
1696
+ * required fields. When the schema contains an "auth" group, its fields are
1697
+ * also pulled in (auth is effectively required for Prometheus/Loki/Tempo style
1698
+ * datasources). Fields are returned in schema order and de-duplicated.
1699
+ * Returns `null` when the virtual group would be empty.
1700
+ */
1701
+ declare function resolveRequiredFieldsGroup(schema: DatasourceConfigSchema): {
1702
+ group: ConfigGroup;
1703
+ fields: ConfigField[];
1704
+ } | null;
1705
+ /**
1706
+ * Unique form key for a field. Section-scoped fields (e.g. section:"logs", key:"defaultTable")
1707
+ * get a prefixed key ("logs.defaultTable") so they don't collide with top-level fields that
1708
+ * share the same key name.
1709
+ */
1710
+ declare function formKey(field: ConfigField): string;
1711
+ /**
1712
+ * Resolve a possibly-dotted key against watchedValues from react-hook-form.
1713
+ * RHF's `watch()` returns nested objects for dotted Controller names
1714
+ * (e.g. "logs.otelEnabled" → { logs: { otelEnabled: true } }),
1715
+ * so a flat `obj["logs.otelEnabled"]` lookup misses.
1716
+ *
1717
+ * For dotted keys we must try the nested path **first**: react-hook-form's
1718
+ * Controller `onChange` writes nested objects via its internal `set()`, but
1719
+ * `reset()` may have created a flat dotted key with the same name. After user
1720
+ * interaction the nested value is authoritative; the stale flat key must not
1721
+ * shadow it. This mirrors RHF's own `get()` semantics (nested-first, flat
1722
+ * fallback).
1723
+ */
1724
+ declare function getWatchedValue(watchedValues: Record<string, unknown>, key: string): unknown;
1725
+ /**
1726
+ * Parse a simple CEL-like dependsOn expression: "fieldId == 'value'" or "fieldId != 'value'".
1727
+ * Only single comparisons are supported — no &&, ||, or parentheses.
1728
+ * Field IDs may contain dots and underscores (e.g. "jsonData.oauth2.oauth2_type").
1729
+ * Values may be single-quoted, double-quoted, or unquoted literals (true/false/numbers).
1730
+ * Returns { field, value, negate } or null if unparseable.
1731
+ */
1732
+ declare function parseDependsOn(expr: string): {
1733
+ field: string;
1734
+ value: string;
1735
+ negate: boolean;
1736
+ } | null;
1737
+ /**
1738
+ * Evaluate a parsed dependsOn condition against a value.
1739
+ * Handles both == and != operators.
1740
+ */
1741
+ declare function evaluateDependsOn(parsed: {
1742
+ value: string;
1743
+ negate: boolean;
1744
+ }, currentValue: unknown): boolean;
1745
+ /**
1746
+ * Resolve the first matching override for a field given current form values.
1747
+ * Override `when` uses the same "fieldId == 'value'" syntax as dependsOn.
1748
+ * Returns the matching override or undefined if none match.
1749
+ */
1750
+ declare function resolveActiveOverride(field: ConfigField, watchedValues: Record<string, unknown>, fieldById: Map<string, ConfigField>): FieldOverride | undefined;
1751
+ /**
1752
+ * Evaluate a simple computed.read expression against form values.
1753
+ * Supports patterns used in dsconfig schemas:
1754
+ * - "fieldRef == true ? 'a' : (fieldRef == true ? 'b' : 'c')"
1755
+ * - Simple ternary chains with equality checks
1756
+ * Falls back to the field's defaultValue if the expression can't be evaluated.
1757
+ */
1758
+ declare function evaluateComputedRead(expr: string, values: Record<string, unknown>, fields: ConfigField[]): unknown;
1759
+ /**
1760
+ * Compute initial values for all virtual fields that have storage.computed.read expressions.
1761
+ * Call after loading existing storage field values.
1762
+ */
1763
+ declare function computeVirtualFieldValues(schema: DatasourceConfigSchema, existingValues: Record<string, unknown>): Record<string, unknown>;
1764
+
1461
1765
  type DatasourceResponse = Record<string, unknown> & {
1462
1766
  name: string;
1463
1767
  id: number;
@@ -1484,6 +1788,24 @@ type DatasourceConfigPayload = {
1484
1788
  type FormValues = Record<string, unknown>;
1485
1789
 
1486
1790
  declare const SECURE_FIELD_CONFIGURED = "__CONFIGURED__";
1791
+ /**
1792
+ * Resolve a secureKey template string by replacing placeholders.
1793
+ *
1794
+ * Supported placeholders:
1795
+ * - `{index}` — 0-based array position
1796
+ * - `{index1}` — 1-based array position
1797
+ * - `{item.KEY}` — value of sibling field `KEY` in the same item object
1798
+ */
1799
+ declare function resolveSecureKeyTemplate(template: string, item: Record<string, unknown>, index: number): string;
1800
+ /**
1801
+ * For a given item object at a given index, find the first active secureKey
1802
+ * override across all item fields. Returns the resolved secureJsonData key
1803
+ * and the item field key whose value should be routed, or null if none active.
1804
+ */
1805
+ declare function findActiveSecureOverride(itemFields: ConfigField[], item: Record<string, unknown>, index: number): {
1806
+ fieldKey: string;
1807
+ resolvedKey: string;
1808
+ } | null;
1487
1809
  type FetchExistingResult = {
1488
1810
  values: FormValues;
1489
1811
  readOnly: boolean;
@@ -1552,4 +1874,6 @@ declare function toProvisioningYaml(schema: DatasourceConfigSchema, values?: Rec
1552
1874
  */
1553
1875
  declare function datasourceToProvisioningYaml(ds: Record<string, unknown>, schema: DatasourceConfigSchema | null): string;
1554
1876
 
1555
- export { AccessoryButton, AdvancedHttpSettings, type Aggregate, type AllowedValuesValidation, Auth, AuthMethod, type Props$c as AuthProps, BINARY_OPERATIONS_KEY, CatalogSelector, type ColumnDefinition, CompletionItemInsertTextRule, CompletionItemKind, CompletionItemPriority, ConfigDescriptionLink, type ConfigField, type ConfigGroup, ConfigSection, ConfigSubSection, ConnectionSettings, CustomHeadersSettings, type CustomValidation, type DB, DataLink, type DataLinkConfig, DataLinks, DataSourceDescription, DataSourcePicker, DatasetSelector, type DatasourceConfigPayload, type DatasourceConfigSchema, DatasourceConfigWizard, type DatasourceConfigWizardProps, type DatasourceResponse, DatePicker, type DatePickerProps, DatePickerWithInput, type DatePickerWithInputProps, DebounceInput, type DebounceInputProps, EditorField, EditorFieldGroup, EditorHeader, EditorList, EditorMode, EditorRow, EditorRows, EditorStack, EditorSwitch, type FetchExistingResult, type FieldEffect, type FieldItemSchema, type FieldKind, type FieldOption, type FieldOverride, type FieldRelationship, type FieldUI, type FieldValidationRule, FlexItem, type FormValues, GroupByRow, type IndexedPairItem, InlineSelect, InputGroup, type ItemCountValidation, LabelFilters, type LanguageCompletionProvider, type LanguageDefinition, type LengthValidation, type Lifecycle, LinkedToken, MacroType, type MetaDefinition, type NameValue, OperationExplainedBox, OperationList, OperationListExplained, OperationsEditorRow, OperatorType, type PatternValidation, type PositionContext, type Props$s as Props, type ProvisioningYamlOptions, QUERY_FORMAT_OPTIONS, QueryBuilderHints, type QueryBuilderLabelFilter, type QueryBuilderOperation, type QueryBuilderOperationDefinition, type QueryBuilderOperationParamDef, type QueryBuilderOperationParamEditorProps, type QueryBuilderOperationParamValue, QueryEditorMode, QueryEditorModeToggle, type QueryEditorProps, QueryEditorRow, QueryFormat, QueryHeaderSwitch, QueryModellerBase, QueryOptionGroup, type QueryRowFilter, type QueryStats, type QueryWithDefaults, type RAQBFieldTypes, type RangeValidation, RawQuery, type ResourceSelectorProps, type ResponseParser, RunQueryButton, SECURE_FIELD_CONFIGURED, type SQLConnectionLimits, SQLEditor, SQLEditorMode, SQLEditorTestUtils, type SQLExpression, type SQLFilters, type SQLMonarchLanguage, type SQLOptions, type SQLQuery, type SQLSelectableValue, type SchemaDefinition, SecureSocksProxyToggle, Segment, type SegmentProps, type SemanticType, Space, SqlDatasource, SqlQueryEditor, type SqlQueryForInterpolation, type SqlQueryModel, type State$1 as State, type StatementPlacementProvider, StatementPosition, type StorageMapping, SuggestionKind, type SuggestionKindProvider, TLSSettings, type Props$f as TLSSettingsProps, type TableDefinition, type TableFieldSchema, type TableIdentifier, type TableSchema, TableSelector, type TargetLocation, type TestQueryModel, TokenType, type UIComponent, type ValidationResults, type ValueType, type VisualQuery, type VisualQueryBinary, type VisualQueryModeller, buildDatasourceConfigPayload, computeVirtualFieldValues, convertLegacyAuthProps, datasourceToProvisioningYaml, evaluateComputedRead, expandIndexedPair, fetchExistingValues, flattenIndexedPair, formKey, formatDate, generateLLMHint, generateTroubleshootingFields, getStandardSQLCompletionProvider, language as grafanaStandardSQLLanguage, conf as grafanaStandardSQLLanguageConf, parseDependsOn, resolveActiveOverride, resolveGroups, resolveRequiredFieldsGroup, submitDatasourceConfig, toOption, toProvisioningYaml };
1877
+ declare function getConfigSchema(pluginType: string): DatasourceConfigSchema | null;
1878
+
1879
+ export { AccessoryButton, AdvancedHttpSettings, type Aggregate, type AllowedValuesValidationRule, Auth, AuthMethod, type Props$c as AuthProps, BINARY_OPERATIONS_KEY, type BaseValidationRule, CatalogSelector, type ColumnDefinition, CompletionItemInsertTextRule, CompletionItemKind, CompletionItemPriority, type ComputedMapping, ConfigDescriptionLink, type ConfigField, type ConfigGroup, ConfigSection, ConfigSubSection, ConnectionSettings, CustomHeadersSettings, type CustomValidationRule, type DB, DataLink, type DataLinkConfig, DataLinks, DataSourceDescription, DataSourcePicker, DatasetSelector, type DatasourceConfigPayload, type DatasourceConfigSchema, DatasourceConfigWizard, type DatasourceConfigWizardProps, DatasourceErrorBoundary, type DatasourceHealth, type DatasourceResponse, DatePicker, type DatePickerProps, DatePickerWithInput, type DatePickerWithInputProps, DebounceInput, type DebounceInputProps, type DirectMapping, EditorField, EditorFieldGroup, EditorHeader, EditorList, EditorMode, EditorRow, EditorRows, EditorStack, EditorSwitch, type Expression, type FetchExistingResult, type FieldEffect, type FieldItemSchema, type FieldKind, type FieldOption, type FieldOverride, type FieldRelationship, type FieldUI, type FieldValidationRule, FlexItem, type FormState, type FormValues, GroupByRow, type HealthState, type IndexedPairItem, type IndexedPairMapping, InlineSelect, InputGroup, type ItemCountValidationRule, LabelFilters, type LanguageCompletionProvider, type LanguageDefinition, type LengthValidationRule, type Lifecycle, LinkedToken, MacroType, type MappingField, type MetaDefinition, type NameValue, OperationExplainedBox, OperationList, OperationListExplained, OperationsEditorRow, OperatorType, type PatternValidationRule, type PositionContext, type Props$s as Props, type ProvisioningYamlOptions, QUERY_FORMAT_OPTIONS, QueryBuilderHints, type QueryBuilderLabelFilter, type QueryBuilderOperation, type QueryBuilderOperationDefinition, type QueryBuilderOperationParamDef, type QueryBuilderOperationParamEditorProps, type QueryBuilderOperationParamValue, QueryEditorMode, QueryEditorModeToggle, type QueryEditorProps, QueryEditorRow, QueryFormat, QueryHeaderSwitch, QueryModellerBase, QueryOptionGroup, type QueryRowFilter, type QueryStats, type QueryWithDefaults, type RAQBFieldTypes, type RangeValidationRule, RawQuery, type RelationshipType, type ResourceSelectorProps, type ResponseParser, RunQueryButton, SECURE_FIELD_CONFIGURED, type SQLConnectionLimits, SQLEditor, SQLEditorMode, SQLEditorTestUtils, type SQLExpression, type SQLFilters, type SQLMonarchLanguage, type SQLOptions, type SQLQuery, type SQLSelectableValue, type SchemaDefinition, type SecureFieldState, SecureSocksProxyToggle, Segment, type SegmentProps, type SemanticType, Space, SqlDatasource, SqlQueryEditor, type SqlQueryForInterpolation, type SqlQueryModel, type State$1 as State, type StatementPlacementProvider, StatementPosition, type StorageMapping, SuggestionKind, type SuggestionKindProvider, TLSSettings, type Props$f as TLSSettingsProps, type TableDefinition, type TableFieldSchema, type TableIdentifier, type TableSchema, TableSelector, type TargetLocation, type TestQueryModel, TokenType, type UIComponent, type UIWidth, type ValidationResults, type ValueType, type VisualQuery, type VisualQueryBinary, type VisualQueryModeller, buildDatasourceConfigPayload, computeVirtualFieldValues, convertLegacyAuthProps, datasourceToProvisioningYaml, evaluateComputedRead, evaluateDependsOn, expandIndexedPair, fetchExistingValues, findActiveSecureOverride, flattenIndexedPair, formKey, formatDate, generateLLMHint, generateTroubleshootingFields, getConfigSchema, getStandardSQLCompletionProvider, getWatchedValue, language as grafanaStandardSQLLanguage, conf as grafanaStandardSQLLanguageConf, parseDependsOn, resolveActiveOverride, resolveGroups, resolvePluginName, resolveRequiredFieldsGroup, resolveSecureKeyTemplate, submitDatasourceConfig, toOption, toProvisioningYaml, useHealthChecks };