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

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 (199) hide show
  1. package/dist/cjs/index.cjs +298 -991
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +212 -201
  4. package/dist/cjs/schemas.cjs +20 -14848
  5. package/dist/cjs/schemas.cjs.map +1 -1
  6. package/dist/cjs/schemas.d.cts +76 -1
  7. package/dist/cjs/useDatasourceSchema-BWcU0Gkw.js +16623 -0
  8. package/dist/cjs/useDatasourceSchema-BWcU0Gkw.js.map +1 -0
  9. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js +3 -3
  10. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/DatasourceConfigWizard.js.map +1 -1
  11. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SchemaField.js +2 -2
  12. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SchemaField.js.map +1 -1
  13. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SidebarNav.js +1 -1
  14. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/SidebarNav.js.map +1 -1
  15. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/TabLayout.js +2 -2
  16. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/TabLayout.js.map +1 -1
  17. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/cel.js +75 -0
  18. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/cel.js.map +1 -0
  19. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/config.js.map +1 -0
  20. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/datasource.js.map +1 -0
  21. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/fieldUtils.js +3 -3
  22. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/fieldUtils.js.map +1 -1
  23. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useDatasourceConfigForm.js +3 -3
  24. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/hooks/useDatasourceConfigForm.js.map +1 -1
  25. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/AuthorizationHeaderField.js +1 -1
  26. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/AuthorizationHeaderField.js.map +1 -1
  27. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/FileUploadField.js.map +1 -1
  28. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/IndexedPairEditor.js +1 -1
  29. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/IndexedPairEditor.js.map +1 -1
  30. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js +1 -1
  31. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/ObjectArrayEditor.js.map +1 -1
  32. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/SecureFieldInput.js +1 -1
  33. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/inputs/SecureFieldInput.js.map +1 -1
  34. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/renderFieldInput.js.map +1 -1
  35. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/{tabStyles.js → styles.js} +121 -2
  36. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/styles.js.map +1 -0
  37. package/dist/esm/index.d.ts +212 -201
  38. package/dist/esm/index.js +7 -5
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/{datasource/schema/datasources → schema/registry}/alertmanager.schema.json.js +15 -15
  41. package/dist/esm/{datasource/schema/datasources → schema/registry}/cloudwatch.schema.json.js +17 -17
  42. package/dist/esm/schema/registry/elasticsearch.schema.json.js +597 -0
  43. package/dist/esm/schema/registry/elasticsearch.schema.json.js.map +1 -0
  44. package/dist/esm/schema/registry/grafana-adobeanalytics-datasource.schema.json.js +95 -0
  45. package/dist/esm/schema/registry/grafana-adobeanalytics-datasource.schema.json.js.map +1 -0
  46. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-amazonprometheus-datasource.schema.json.js +13 -13
  47. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-athena-datasource.schema.json.js +3 -3
  48. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-azure-data-explorer-datasource.schema.json.js +3 -3
  49. package/dist/esm/schema/registry/grafana-azure-monitor-datasource.schema.json.js +300 -0
  50. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-azure-monitor-datasource.schema.json.js.map +1 -1
  51. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-bigquery-datasource.schema.json.js +3 -3
  52. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-clickhouse-datasource.schema.json.js +5 -5
  53. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-falconlogscale-datasource.schema.json.js +3 -3
  54. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-googlesheets-datasource.schema.json.js +3 -3
  55. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-iot-sitewise-datasource.schema.json.js +3 -3
  56. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-mqtt-datasource.schema.json.js +5 -5
  57. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-opensearch-datasource.schema.json.js +3 -3
  58. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-postgresql-datasource.schema.json.js +5 -5
  59. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-pyroscope-datasource.schema.json.js +3 -3
  60. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-redshift-datasource.schema.json.js +3 -3
  61. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-salesforce-datasource.schema.json.js +119 -72
  62. package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-salesforce-datasource.schema.json.js.map +1 -1
  63. package/dist/esm/schema/registry/grafana-splunk-datasource.schema.json.js +690 -0
  64. package/dist/esm/schema/registry/grafana-splunk-datasource.schema.json.js.map +1 -0
  65. package/dist/esm/schema/registry/index.js +139 -0
  66. package/dist/esm/schema/registry/index.js.map +1 -0
  67. package/dist/esm/schema/utils/dsconfig.js +97 -0
  68. package/dist/esm/schema/utils/dsconfig.js.map +1 -0
  69. package/dist/esm/{datasource/schema/llmHints.js → schema/utils/llm.js} +1 -1
  70. package/dist/esm/schema/utils/llm.js.map +1 -0
  71. package/dist/esm/{datasource/schema/provisioningYaml.js → schema/utils/provisioning.js} +79 -3
  72. package/dist/esm/schema/utils/provisioning.js.map +1 -0
  73. package/dist/esm/schema/utils/useDatasourceSchema.js +16 -0
  74. package/dist/esm/schema/utils/useDatasourceSchema.js.map +1 -0
  75. package/dist/esm/schemas.d.ts +76 -1
  76. package/dist/esm/schemas.js +5 -1
  77. package/dist/esm/schemas.js.map +1 -1
  78. package/package.json +1 -1
  79. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/tabStyles.js.map +0 -1
  80. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/wizardStyles.js +0 -124
  81. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/wizardStyles.js.map +0 -1
  82. package/dist/esm/datasource/schema/cel.js +0 -42
  83. package/dist/esm/datasource/schema/cel.js.map +0 -1
  84. package/dist/esm/datasource/schema/config.js.map +0 -1
  85. package/dist/esm/datasource/schema/datasource.js.map +0 -1
  86. package/dist/esm/datasource/schema/datasources/elasticsearch.schema.json.js +0 -287
  87. package/dist/esm/datasource/schema/datasources/elasticsearch.schema.json.js.map +0 -1
  88. package/dist/esm/datasource/schema/datasources/grafana-azure-monitor-datasource.schema.json.js +0 -294
  89. package/dist/esm/datasource/schema/datasources/grafana-splunk-datasource.schema.json.js +0 -319
  90. package/dist/esm/datasource/schema/datasources/grafana-splunk-datasource.schema.json.js.map +0 -1
  91. package/dist/esm/datasource/schema/llmHints.js.map +0 -1
  92. package/dist/esm/datasource/schema/provisioningYaml.js.map +0 -1
  93. package/dist/esm/datasource/schema/schemaRegistry.js +0 -139
  94. package/dist/esm/datasource/schema/schemaRegistry.js.map +0 -1
  95. /package/dist/esm/{datasource/schema → components/ConfigEditor/DatasourceConfigWizard}/config.js +0 -0
  96. /package/dist/esm/{datasource/schema → components/ConfigEditor/DatasourceConfigWizard}/datasource.js +0 -0
  97. /package/dist/esm/{datasource/schema/datasources → schema/registry}/alertmanager.schema.json.js.map +0 -0
  98. /package/dist/esm/{datasource/schema/datasources → schema/registry}/cloudwatch.schema.json.js.map +0 -0
  99. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-amazonprometheus-datasource.schema.json.js.map +0 -0
  100. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-appdynamics-datasource.schema.json.js +0 -0
  101. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-appdynamics-datasource.schema.json.js.map +0 -0
  102. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-astradb-datasource.schema.json.js +0 -0
  103. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-astradb-datasource.schema.json.js.map +0 -0
  104. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-athena-datasource.schema.json.js.map +0 -0
  105. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-azure-data-explorer-datasource.schema.json.js.map +0 -0
  106. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-azuredevops-datasource.schema.json.js +0 -0
  107. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-azuredevops-datasource.schema.json.js.map +0 -0
  108. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-azureprometheus-datasource.schema.json.js +0 -0
  109. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-azureprometheus-datasource.schema.json.js.map +0 -0
  110. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-bigquery-datasource.schema.json.js.map +0 -0
  111. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-clickhouse-datasource.schema.json.js.map +0 -0
  112. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-cockroachdb-datasource.schema.json.js +0 -0
  113. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-cockroachdb-datasource.schema.json.js.map +0 -0
  114. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-databricks-datasource.schema.json.js +0 -0
  115. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-databricks-datasource.schema.json.js.map +0 -0
  116. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-datadog-datasource.schema.json.js +0 -0
  117. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-datadog-datasource.schema.json.js.map +0 -0
  118. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-dynatrace-datasource.schema.json.js +0 -0
  119. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-dynatrace-datasource.schema.json.js.map +0 -0
  120. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-falconlogscale-datasource.schema.json.js.map +0 -0
  121. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-github-datasource.schema.json.js +0 -0
  122. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-github-datasource.schema.json.js.map +0 -0
  123. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-gitlab-datasource.schema.json.js +0 -0
  124. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-gitlab-datasource.schema.json.js.map +0 -0
  125. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-googlesheets-datasource.schema.json.js.map +0 -0
  126. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-honeycomb-datasource.schema.json.js +0 -0
  127. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-honeycomb-datasource.schema.json.js.map +0 -0
  128. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-iot-sitewise-datasource.schema.json.js.map +0 -0
  129. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-jira-datasource.schema.json.js +0 -0
  130. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-jira-datasource.schema.json.js.map +0 -0
  131. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-looker-datasource.schema.json.js +0 -0
  132. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-looker-datasource.schema.json.js.map +0 -0
  133. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-mongodb-datasource.schema.json.js +0 -0
  134. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-mongodb-datasource.schema.json.js.map +0 -0
  135. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-mqtt-datasource.schema.json.js.map +0 -0
  136. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-newrelic-datasource.schema.json.js +0 -0
  137. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-newrelic-datasource.schema.json.js.map +0 -0
  138. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-odbc-datasource.schema.json.js +0 -0
  139. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-odbc-datasource.schema.json.js.map +0 -0
  140. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-opensearch-datasource.schema.json.js.map +0 -0
  141. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-oracle-datasource.schema.json.js +0 -0
  142. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-oracle-datasource.schema.json.js.map +0 -0
  143. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-pagerduty-datasource.schema.json.js +0 -0
  144. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-pagerduty-datasource.schema.json.js.map +0 -0
  145. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-postgresql-datasource.schema.json.js.map +0 -0
  146. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-pyroscope-datasource.schema.json.js.map +0 -0
  147. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-redshift-datasource.schema.json.js.map +0 -0
  148. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-saphana-datasource.schema.json.js +0 -0
  149. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-saphana-datasource.schema.json.js.map +0 -0
  150. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-sentry-datasource.schema.json.js +0 -0
  151. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-sentry-datasource.schema.json.js.map +0 -0
  152. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-servicenow-datasource.schema.json.js +0 -0
  153. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-servicenow-datasource.schema.json.js.map +0 -0
  154. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-snowflake-datasource.schema.json.js +0 -0
  155. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-snowflake-datasource.schema.json.js.map +0 -0
  156. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-splunkobservability-datasource.schema.json.js +0 -0
  157. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-splunkobservability-datasource.schema.json.js.map +0 -0
  158. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-strava-datasource.schema.json.js +0 -0
  159. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-strava-datasource.schema.json.js.map +0 -0
  160. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-sumologic-datasource.schema.json.js +0 -0
  161. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-sumologic-datasource.schema.json.js.map +0 -0
  162. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-surrealdb-datasource.schema.json.js +0 -0
  163. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-surrealdb-datasource.schema.json.js.map +0 -0
  164. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-timestream-datasource.schema.json.js +0 -0
  165. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-timestream-datasource.schema.json.js.map +0 -0
  166. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-wavefront-datasource.schema.json.js +0 -0
  167. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-wavefront-datasource.schema.json.js.map +0 -0
  168. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-x-ray-datasource.schema.json.js +0 -0
  169. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-x-ray-datasource.schema.json.js.map +0 -0
  170. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-yugabyte-datasource.schema.json.js +0 -0
  171. /package/dist/esm/{datasource/schema/datasources → schema/registry}/grafana-yugabyte-datasource.schema.json.js.map +0 -0
  172. /package/dist/esm/{datasource/schema/datasources → schema/registry}/graphite.schema.json.js +0 -0
  173. /package/dist/esm/{datasource/schema/datasources → schema/registry}/graphite.schema.json.js.map +0 -0
  174. /package/dist/esm/{datasource/schema/datasources → schema/registry}/influxdb.schema.json.js +0 -0
  175. /package/dist/esm/{datasource/schema/datasources → schema/registry}/influxdb.schema.json.js.map +0 -0
  176. /package/dist/esm/{datasource/schema/datasources → schema/registry}/jaeger.schema.json.js +0 -0
  177. /package/dist/esm/{datasource/schema/datasources → schema/registry}/jaeger.schema.json.js.map +0 -0
  178. /package/dist/esm/{datasource/schema/datasources → schema/registry}/loki.schema.json.js +0 -0
  179. /package/dist/esm/{datasource/schema/datasources → schema/registry}/loki.schema.json.js.map +0 -0
  180. /package/dist/esm/{datasource/schema/datasources → schema/registry}/marcusolsson-csv-datasource.schema.json.js +0 -0
  181. /package/dist/esm/{datasource/schema/datasources → schema/registry}/marcusolsson-csv-datasource.schema.json.js.map +0 -0
  182. /package/dist/esm/{datasource/schema/datasources → schema/registry}/marcusolsson-json-datasource.schema.json.js +0 -0
  183. /package/dist/esm/{datasource/schema/datasources → schema/registry}/marcusolsson-json-datasource.schema.json.js.map +0 -0
  184. /package/dist/esm/{datasource/schema/datasources → schema/registry}/mssql.schema.json.js +0 -0
  185. /package/dist/esm/{datasource/schema/datasources → schema/registry}/mssql.schema.json.js.map +0 -0
  186. /package/dist/esm/{datasource/schema/datasources → schema/registry}/mysql.schema.json.js +0 -0
  187. /package/dist/esm/{datasource/schema/datasources → schema/registry}/mysql.schema.json.js.map +0 -0
  188. /package/dist/esm/{datasource/schema/datasources → schema/registry}/opentsdb.schema.json.js +0 -0
  189. /package/dist/esm/{datasource/schema/datasources → schema/registry}/opentsdb.schema.json.js.map +0 -0
  190. /package/dist/esm/{datasource/schema/datasources → schema/registry}/prometheus.schema.json.js +0 -0
  191. /package/dist/esm/{datasource/schema/datasources → schema/registry}/prometheus.schema.json.js.map +0 -0
  192. /package/dist/esm/{datasource/schema/datasources → schema/registry}/stackdriver.schema.json.js +0 -0
  193. /package/dist/esm/{datasource/schema/datasources → schema/registry}/stackdriver.schema.json.js.map +0 -0
  194. /package/dist/esm/{datasource/schema/datasources → schema/registry}/tempo.schema.json.js +0 -0
  195. /package/dist/esm/{datasource/schema/datasources → schema/registry}/tempo.schema.json.js.map +0 -0
  196. /package/dist/esm/{datasource/schema/datasources → schema/registry}/yesoreyeram-infinity-datasource.schema.json.js +0 -0
  197. /package/dist/esm/{datasource/schema/datasources → schema/registry}/yesoreyeram-infinity-datasource.schema.json.js.map +0 -0
  198. /package/dist/esm/{datasource/schema/datasources → schema/registry}/zipkin.schema.json.js +0 -0
  199. /package/dist/esm/{datasource/schema/datasources → schema/registry}/zipkin.schema.json.js.map +0 -0
@@ -17,13 +17,13 @@ var AutoSizer = require('react-virtualized-auto-sizer');
17
17
  var sqlFormatter = require('sql-formatter');
18
18
  var rxjs = require('rxjs');
19
19
  var operators$1 = require('rxjs/operators');
20
- var celJs = require('@marcbachmann/cel-js');
20
+ var useDatasourceSchema = require('./useDatasourceSchema-BWcU0Gkw.js');
21
21
  var reactHookForm = require('react-hook-form');
22
+ require('@marcbachmann/cel-js');
22
23
  var dnd = require('@hello-pangea/dnd');
23
24
  var reactPopperTooltip = require('react-popper-tooltip');
24
25
  var Prism = require('prismjs');
25
- var yaml = require('js-yaml');
26
- var schemas = require('./schemas.cjs');
26
+ require('js-yaml');
27
27
 
28
28
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
29
29
 
@@ -31,7 +31,6 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
31
31
  var Calendar__default = /*#__PURE__*/_interopDefaultCompat(Calendar);
32
32
  var AutoSizer__default = /*#__PURE__*/_interopDefaultCompat(AutoSizer);
33
33
  var Prism__default = /*#__PURE__*/_interopDefaultCompat(Prism);
34
- var yaml__default = /*#__PURE__*/_interopDefaultCompat(yaml);
35
34
 
36
35
  const QueryEditorRow = (props) => {
37
36
  var _a, _b;
@@ -8437,298 +8436,6 @@ const AdvancedHttpSettings = ({
8437
8436
  ));
8438
8437
  };
8439
8438
 
8440
- const exprCache = /* @__PURE__ */ new Map();
8441
- function getCompiled(expr) {
8442
- if (exprCache.has(expr)) {
8443
- return exprCache.get(expr);
8444
- }
8445
- try {
8446
- const compiled = celJs.parse(expr);
8447
- exprCache.set(expr, compiled);
8448
- return compiled;
8449
- } catch (e) {
8450
- exprCache.set(expr, null);
8451
- return null;
8452
- }
8453
- }
8454
- function evaluateCelExpression(expr, context, defaultValue = false) {
8455
- if (!expr || !expr.trim()) {
8456
- return defaultValue;
8457
- }
8458
- const compiled = getCompiled(expr);
8459
- if (!compiled) {
8460
- return defaultValue;
8461
- }
8462
- try {
8463
- const result = compiled(context);
8464
- return !!result;
8465
- } catch (e) {
8466
- return defaultValue;
8467
- }
8468
- }
8469
- function extractFieldRefs(expr) {
8470
- const matches = expr.matchAll(/([\w.]+)\s*(?:==|!=)/g);
8471
- const refs = /* @__PURE__ */ new Set();
8472
- for (const m of matches) {
8473
- refs.add(m[1]);
8474
- }
8475
- return [...refs];
8476
- }
8477
-
8478
- function resolveGroups(schema) {
8479
- const fieldMap = /* @__PURE__ */ new Map();
8480
- for (const f of schema.fields) {
8481
- fieldMap.set(f.id, f);
8482
- }
8483
- if (schema.groups && schema.groups.length > 0) {
8484
- return schema.groups.slice().sort((a, b) => {
8485
- var _a, _b;
8486
- return ((_a = a.order) != null ? _a : 0) - ((_b = b.order) != null ? _b : 0);
8487
- }).map((g) => ({
8488
- group: g,
8489
- fields: g.fieldRefs.map((ref) => fieldMap.get(ref)).filter((f) => f != null)
8490
- }));
8491
- }
8492
- const allFields = schema.fields.filter((f) => f.kind !== "virtual" && !f.isItemField);
8493
- return [
8494
- {
8495
- group: { id: "default", title: "Configuration", fieldRefs: allFields.map((f) => f.id) },
8496
- fields: allFields
8497
- }
8498
- ];
8499
- }
8500
- function resolveRequiredFieldsGroup(schema) {
8501
- var _a, _b;
8502
- const fieldMap = /* @__PURE__ */ new Map();
8503
- for (const f of schema.fields) {
8504
- fieldMap.set(f.id, f);
8505
- }
8506
- const requiredIds = /* @__PURE__ */ new Set();
8507
- for (const f of schema.fields) {
8508
- if (f.required || ((_a = f.tags) == null ? void 0 : _a.includes("pinned"))) {
8509
- requiredIds.add(f.id);
8510
- }
8511
- }
8512
- const authGroup = (_b = schema.groups) == null ? void 0 : _b.find((g) => g.id === "auth");
8513
- if (authGroup) {
8514
- for (const ref of authGroup.fieldRefs) {
8515
- if (fieldMap.has(ref)) {
8516
- requiredIds.add(ref);
8517
- }
8518
- }
8519
- }
8520
- if (requiredIds.size === 0) {
8521
- return null;
8522
- }
8523
- const includeIds = /* @__PURE__ */ new Set();
8524
- for (const id of requiredIds) {
8525
- includeIds.add(id);
8526
- const f = fieldMap.get(id);
8527
- if (f == null ? void 0 : f.dependsOn) {
8528
- for (const ref of extractFieldRefs(f.dependsOn)) {
8529
- if (fieldMap.has(ref)) {
8530
- includeIds.add(ref);
8531
- }
8532
- }
8533
- }
8534
- }
8535
- for (const f of schema.fields) {
8536
- if (f.dependsOn && !includeIds.has(f.id)) {
8537
- const refs = extractFieldRefs(f.dependsOn);
8538
- if (refs.some((ref) => requiredIds.has(ref))) {
8539
- includeIds.add(f.id);
8540
- }
8541
- }
8542
- }
8543
- const virtualFields = schema.fields.filter((f) => includeIds.has(f.id));
8544
- if (virtualFields.length === 0) {
8545
- return null;
8546
- }
8547
- return {
8548
- group: {
8549
- id: "_required",
8550
- title: "General",
8551
- fieldRefs: virtualFields.map((f) => f.id)
8552
- },
8553
- fields: virtualFields
8554
- };
8555
- }
8556
- function formKey(field) {
8557
- return field.section ? `${field.section}.${field.key}` : field.key;
8558
- }
8559
- function getWatchedValue(watchedValues, key) {
8560
- if (key.includes(".")) {
8561
- const parts = key.split(".");
8562
- let current = watchedValues;
8563
- for (const part of parts) {
8564
- if (current == null || typeof current !== "object") {
8565
- return watchedValues[key];
8566
- }
8567
- current = current[part];
8568
- }
8569
- if (current !== void 0) {
8570
- return current;
8571
- }
8572
- return watchedValues[key];
8573
- }
8574
- return watchedValues[key];
8575
- }
8576
- function parseDependsOn(expr) {
8577
- var _a, _b;
8578
- const m = expr.match(/^([\w.]+)\s*(==|!=)\s*(?:'([^']*)'|"([^"]*)"|(\S+))$/);
8579
- if (!m) {
8580
- return null;
8581
- }
8582
- return { field: m[1], value: ((_b = (_a = m[3]) != null ? _a : m[4]) != null ? _b : m[5]).trim(), negate: m[2] === "!=" };
8583
- }
8584
- function evaluateDependsOn(parsed, currentValue) {
8585
- const matches = String(currentValue != null ? currentValue : "") === parsed.value;
8586
- return parsed.negate ? !matches : matches;
8587
- }
8588
- function resolveActiveOverride(field, watchedValues, fieldById) {
8589
- if (!field.overrides || field.overrides.length === 0) {
8590
- return void 0;
8591
- }
8592
- for (const ov of field.overrides) {
8593
- const parsed = parseDependsOn(ov.when);
8594
- if (!parsed) {
8595
- continue;
8596
- }
8597
- const depField = fieldById.get(parsed.field);
8598
- const depKey = depField ? formKey(depField) : parsed.field;
8599
- if (evaluateDependsOn(parsed, getWatchedValue(watchedValues, depKey))) {
8600
- return ov;
8601
- }
8602
- }
8603
- return void 0;
8604
- }
8605
- function resolveFieldValue(ref, values, fields) {
8606
- if (ref in values) {
8607
- return values[ref];
8608
- }
8609
- const field = fields.find((f) => f.id === ref);
8610
- if (field) {
8611
- const fk = formKey(field);
8612
- if (fk in values) {
8613
- return values[fk];
8614
- }
8615
- }
8616
- return void 0;
8617
- }
8618
- function evaluateComputedRead(expr, values, fields) {
8619
- function evalExpr(s) {
8620
- var _a;
8621
- s = s.trim();
8622
- if (s.startsWith("(") && findMatchingParen(s, 0) === s.length - 1) {
8623
- s = s.slice(1, -1).trim();
8624
- }
8625
- const qIdx = findTopLevel(s, "?");
8626
- if (qIdx !== -1) {
8627
- const condition = s.slice(0, qIdx).trim();
8628
- const rest = s.slice(qIdx + 1);
8629
- const cIdx = findTopLevel(rest, ":");
8630
- if (cIdx !== -1) {
8631
- const trueExpr = rest.slice(0, cIdx).trim();
8632
- const falseExpr = rest.slice(cIdx + 1).trim();
8633
- return evalCondition(condition) ? evalExpr(trueExpr) : evalExpr(falseExpr);
8634
- }
8635
- }
8636
- const strMatch = (_a = s.match(/^'([^']*)'$/)) != null ? _a : s.match(/^"([^"]*)"$/);
8637
- if (strMatch) {
8638
- return strMatch[1];
8639
- }
8640
- if (s === "true") {
8641
- return true;
8642
- }
8643
- if (s === "false") {
8644
- return false;
8645
- }
8646
- if (/^-?\d+(\.\d+)?$/.test(s)) {
8647
- return Number(s);
8648
- }
8649
- return resolveFieldValue(s, values, fields);
8650
- }
8651
- function evalCondition(cond) {
8652
- const eqMatch = cond.match(/^(.+?)\s*(==|!=)\s*(.+)$/);
8653
- if (eqMatch) {
8654
- const left = evalExpr(eqMatch[1]);
8655
- const right = evalExpr(eqMatch[3]);
8656
- const eq = String(left) === String(right);
8657
- return eqMatch[2] === "==" ? eq : !eq;
8658
- }
8659
- return !!evalExpr(cond);
8660
- }
8661
- function findMatchingParen(s, start) {
8662
- let depth = 0;
8663
- for (let i = start; i < s.length; i++) {
8664
- if (s[i] === "(") {
8665
- depth++;
8666
- } else if (s[i] === ")") {
8667
- depth--;
8668
- if (depth === 0) {
8669
- return i;
8670
- }
8671
- }
8672
- }
8673
- return -1;
8674
- }
8675
- function findTopLevel(s, char) {
8676
- let depth = 0;
8677
- let inStr = null;
8678
- for (let i = 0; i < s.length; i++) {
8679
- const c = s[i];
8680
- if (inStr) {
8681
- if (c === inStr) {
8682
- inStr = null;
8683
- }
8684
- continue;
8685
- }
8686
- if (c === "'" || c === '"') {
8687
- inStr = c;
8688
- continue;
8689
- }
8690
- if (c === "(") {
8691
- depth++;
8692
- continue;
8693
- }
8694
- if (c === ")") {
8695
- depth--;
8696
- continue;
8697
- }
8698
- if (depth === 0 && c === char) {
8699
- return i;
8700
- }
8701
- }
8702
- return -1;
8703
- }
8704
- try {
8705
- return evalExpr(expr);
8706
- } catch (e) {
8707
- return void 0;
8708
- }
8709
- }
8710
- function computeVirtualFieldValues(schema, existingValues) {
8711
- var _a;
8712
- const virtualValues = {};
8713
- for (const field of schema.fields) {
8714
- if (field.kind !== "virtual") {
8715
- continue;
8716
- }
8717
- const fk = formKey(field);
8718
- if (((_a = field.storage) == null ? void 0 : _a.type) === "computed" && field.storage.read) {
8719
- const val = evaluateComputedRead(field.storage.read, existingValues, schema.fields);
8720
- if (val !== void 0) {
8721
- virtualValues[fk] = val;
8722
- } else if (field.defaultValue !== void 0) {
8723
- virtualValues[fk] = field.defaultValue;
8724
- }
8725
- } else if (field.defaultValue !== void 0) {
8726
- virtualValues[fk] = field.defaultValue;
8727
- }
8728
- }
8729
- return virtualValues;
8730
- }
8731
-
8732
8439
  const SECURE_FIELD_CONFIGURED = "__CONFIGURED__";
8733
8440
  function resolveSecureKeyTemplate(template, item, index) {
8734
8441
  return template.replace(/\{index1\}/g, String(index + 1)).replace(/\{index\}/g, String(index)).replace(/\{item\.(\w+)\}/g, (_, key) => {
@@ -8893,7 +8600,7 @@ async function fetchExistingValues(dsUid, fields) {
8893
8600
  values[field.key] = expandIndexedPair(field, ds);
8894
8601
  continue;
8895
8602
  }
8896
- const fk = formKey(field);
8603
+ const fk = useDatasourceSchema.formKey(field);
8897
8604
  switch (field.target) {
8898
8605
  case "root":
8899
8606
  if (ds[field.key] !== void 0) {
@@ -8935,7 +8642,7 @@ async function fetchExistingValues(dsUid, fields) {
8935
8642
  if (!hasSecureOverride) {
8936
8643
  continue;
8937
8644
  }
8938
- const fk = formKey(field);
8645
+ const fk = useDatasourceSchema.formKey(field);
8939
8646
  const arr = values[fk];
8940
8647
  if (!Array.isArray(arr)) {
8941
8648
  continue;
@@ -8971,7 +8678,7 @@ function buildDatasourceConfigPayload(data, fields, existing, isFieldVisible) {
8971
8678
  if (!isManagedByEffect && !isFieldVisible(field)) {
8972
8679
  continue;
8973
8680
  }
8974
- const fk = formKey(field);
8681
+ const fk = useDatasourceSchema.formKey(field);
8975
8682
  const value = data[fk];
8976
8683
  if (field.target === "secureJsonData") {
8977
8684
  if (value === SECURE_FIELD_CONFIGURED) {
@@ -9102,13 +8809,13 @@ function isFieldRequired(field, watchedValues, fieldById, celContext) {
9102
8809
  }
9103
8810
  if (field.requiredWhen) {
9104
8811
  if (celContext) {
9105
- return evaluateCelExpression(field.requiredWhen, celContext);
8812
+ return useDatasourceSchema.evaluateCelExpression(field.requiredWhen, celContext);
9106
8813
  }
9107
- const parsed = parseDependsOn(field.requiredWhen);
8814
+ const parsed = useDatasourceSchema.parseDependsOn(field.requiredWhen);
9108
8815
  if (parsed) {
9109
8816
  const depField = fieldById.get(parsed.field);
9110
- const depKey = depField ? formKey(depField) : parsed.field;
9111
- return evaluateDependsOn(parsed, getWatchedValue(watchedValues, depKey));
8817
+ const depKey = depField ? useDatasourceSchema.formKey(depField) : parsed.field;
8818
+ return useDatasourceSchema.evaluateDependsOn(parsed, useDatasourceSchema.getWatchedValue(watchedValues, depKey));
9112
8819
  }
9113
8820
  }
9114
8821
  return false;
@@ -9906,227 +9613,6 @@ function renderFieldInput(field, formField, disabled, errorMessage, setValue) {
9906
9613
  return /* @__PURE__ */ React__default.default.createElement(ui.Input, { ...formField, value: String(value != null ? value : ""), placeholder, disabled });
9907
9614
  }
9908
9615
 
9909
- const getWizardStyles = (theme) => ({
9910
- container: css.css({
9911
- position: "relative",
9912
- display: "flex",
9913
- flexDirection: "column",
9914
- gap: theme.spacing(1),
9915
- padding: theme.spacing(1.5),
9916
- backgroundColor: theme.colors.background.secondary,
9917
- borderRadius: theme.shape.radius.default,
9918
- border: `1px solid ${theme.colors.border.weak}`,
9919
- overflow: "hidden"
9920
- }),
9921
- overlay: css.css({
9922
- position: "absolute",
9923
- inset: 0,
9924
- display: "flex",
9925
- alignItems: "center",
9926
- justifyContent: "center",
9927
- gap: theme.spacing(1),
9928
- background: theme.colors.background.secondary,
9929
- borderRadius: theme.shape.radius.default,
9930
- zIndex: 1,
9931
- fontSize: theme.typography.bodySmall.fontSize,
9932
- color: theme.colors.text.primary,
9933
- opacity: 0.95
9934
- }),
9935
- readOnlyBanner: css.css({
9936
- display: "inline-flex",
9937
- alignItems: "center",
9938
- gap: theme.spacing(0.5),
9939
- padding: `${theme.spacing(0.25)} ${theme.spacing(0.75)}`,
9940
- fontSize: theme.typography.bodySmall.fontSize,
9941
- color: theme.colors.text.secondary,
9942
- backgroundColor: theme.colors.background.secondary,
9943
- borderRadius: theme.shape.radius.default,
9944
- border: `1px solid ${theme.colors.border.weak}`
9945
- }),
9946
- navBar: css.css({
9947
- display: "flex",
9948
- alignItems: "center",
9949
- justifyContent: "space-between"
9950
- }),
9951
- navTitle: css.css({
9952
- display: "inline-flex",
9953
- alignItems: "center",
9954
- gap: theme.spacing(0.5),
9955
- fontSize: theme.typography.body.fontSize,
9956
- fontWeight: theme.typography.fontWeightBold,
9957
- color: theme.colors.text.primary
9958
- }),
9959
- stepCount: css.css({
9960
- fontSize: theme.typography.bodySmall.fontSize,
9961
- fontWeight: theme.typography.fontWeightRegular,
9962
- color: theme.colors.text.secondary
9963
- }),
9964
- navActions: css.css({
9965
- display: "flex",
9966
- alignItems: "center",
9967
- gap: theme.spacing(0.25)
9968
- }),
9969
- form: css.css({
9970
- display: "flex",
9971
- flexDirection: "column",
9972
- gap: theme.spacing(0.75)
9973
- }),
9974
- buttons: css.css({
9975
- display: "flex",
9976
- gap: theme.spacing(1),
9977
- paddingTop: theme.spacing(0.25)
9978
- }),
9979
- fieldRow: css.css({
9980
- display: "grid",
9981
- gridTemplateColumns: "minmax(80px, 1fr) minmax(0, 2fr)",
9982
- gap: theme.spacing(0.75),
9983
- alignItems: "start"
9984
- }),
9985
- fieldRowCenter: css.css({
9986
- display: "grid",
9987
- gridTemplateColumns: "minmax(80px, 1fr) minmax(0, 2fr)",
9988
- gap: theme.spacing(0.75),
9989
- alignItems: "center",
9990
- padding: `${theme.spacing(0.5)} 0`
9991
- }),
9992
- fieldLabelRow: css.css({
9993
- display: "flex",
9994
- alignItems: "center",
9995
- gap: theme.spacing(0.5),
9996
- paddingTop: theme.spacing(0.5)
9997
- }),
9998
- fieldLabelRowCompact: css.css({
9999
- display: "flex",
10000
- alignItems: "center",
10001
- gap: theme.spacing(0.5)
10002
- }),
10003
- fieldLabel: css.css({
10004
- fontSize: theme.typography.bodySmall.fontSize,
10005
- fontWeight: theme.typography.fontWeightMedium,
10006
- color: theme.colors.text.primary
10007
- }),
10008
- fieldRequired: css.css({
10009
- color: theme.colors.error.text,
10010
- marginLeft: 2
10011
- }),
10012
- fieldInfoIcon: css.css({
10013
- color: theme.colors.text.disabled,
10014
- cursor: "help",
10015
- flexShrink: 0
10016
- }),
10017
- fieldInputCol: css.css({
10018
- display: "flex",
10019
- flexDirection: "column",
10020
- gap: theme.spacing(0.25),
10021
- minWidth: 0
10022
- }),
10023
- fieldError: css.css({
10024
- fontSize: theme.typography.bodySmall.fontSize,
10025
- color: theme.colors.error.text
10026
- })
10027
- });
10028
-
10029
- function SchemaField({
10030
- field,
10031
- control,
10032
- errors,
10033
- disabled,
10034
- dsUid,
10035
- watchedValues,
10036
- fieldById,
10037
- celContext,
10038
- setValue
10039
- }) {
10040
- const styles = ui.useStyles2(getWizardStyles);
10041
- const activeOverride = resolveActiveOverride(field, watchedValues, fieldById);
10042
- const fk = formKey(field);
10043
- if (field.key === "pdcInjected" && field.target === "jsonData") {
10044
- return /* @__PURE__ */ React__default.default.createElement(
10045
- reactHookForm.Controller,
10046
- {
10047
- name: fk,
10048
- control,
10049
- render: ({ field: formField }) => /* @__PURE__ */ React__default.default.createElement(
10050
- PdcFieldNote,
10051
- {
10052
- enabled: !!formField.value,
10053
- description: field.description,
10054
- configUrl: `/connections/datasources/edit/${dsUid}`
10055
- }
10056
- )
10057
- }
10058
- );
10059
- }
10060
- const required = isFieldRequired(field, watchedValues, fieldById, celContext);
10061
- const validationRules = buildValidationRules(field, required);
10062
- return /* @__PURE__ */ React__default.default.createElement(
10063
- reactHookForm.Controller,
10064
- {
10065
- name: fk,
10066
- control,
10067
- rules: validationRules,
10068
- render: ({ field: formField }) => {
10069
- var _a, _b, _c, _d, _e;
10070
- const errorMessage = (_a = errors[fk]) == null ? void 0 : _a.message;
10071
- const label = (_b = field.label) != null ? _b : field.key;
10072
- const description = (_c = activeOverride == null ? void 0 : activeOverride.description) != null ? _c : field.description;
10073
- const effectiveField = activeOverride ? {
10074
- ...field,
10075
- description,
10076
- ui: {
10077
- ...field.ui,
10078
- placeholder: (_e = activeOverride.placeholder) != null ? _e : (_d = field.ui) == null ? void 0 : _d.placeholder
10079
- }
10080
- } : field;
10081
- const isReadOnly = !!(activeOverride == null ? void 0 : activeOverride.readOnly);
10082
- const isBool = field.valueType === "boolean";
10083
- return /* @__PURE__ */ React__default.default.createElement("div", { className: isBool ? styles.fieldRowCenter : styles.fieldRow }, /* @__PURE__ */ React__default.default.createElement("div", { className: isBool ? styles.fieldLabelRowCompact : styles.fieldLabelRow }, /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldLabel }, label, required && /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldRequired }, "*")), description && /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: description }, /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "info-circle", size: "xs", className: styles.fieldInfoIcon }))), /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldInputCol }, renderFieldInput(effectiveField, formField, disabled || isReadOnly, errorMessage, setValue), errorMessage && !parseItemErrors(errorMessage) && /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldError }, errorMessage)));
10084
- }
10085
- }
10086
- );
10087
- }
10088
-
10089
- const AuthorizationHeaderField = (props) => {
10090
- const { headersFieldKey, control, disabled, watchedValues } = props;
10091
- const styles = ui.useStyles2(getWizardStyles);
10092
- const items = React.useMemo(
10093
- () => Array.isArray(watchedValues[headersFieldKey]) ? watchedValues[headersFieldKey] : [],
10094
- [watchedValues, headersFieldKey]
10095
- );
10096
- const authEntries = React.useMemo(() => {
10097
- const entries = [];
10098
- for (let i = 0; i < items.length; i++) {
10099
- if (items[i].name.toLowerCase() === "authorization") {
10100
- entries.push({ item: items[i], originalIdx: i });
10101
- }
10102
- }
10103
- return entries;
10104
- }, [items]);
10105
- if (authEntries.length === 0) {
10106
- return null;
10107
- }
10108
- const authItems = authEntries.map((e) => e.item);
10109
- return /* @__PURE__ */ React__default.default.createElement(
10110
- reactHookForm.Controller,
10111
- {
10112
- name: headersFieldKey,
10113
- control,
10114
- render: ({ field: formField }) => {
10115
- const handleChange = (updatedAuthItems) => {
10116
- const updated = [...items];
10117
- for (let i = 0; i < authEntries.length; i++) {
10118
- if (i < updatedAuthItems.length) {
10119
- updated[authEntries[i].originalIdx] = updatedAuthItems[i];
10120
- }
10121
- }
10122
- formField.onChange(updated);
10123
- };
10124
- return /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldRow }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldLabelRow }, /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldLabel }, "Custom HTTP Headers"), /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: "Authorization HTTP header(s) sent with every request." }, /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "info-circle", size: "xs", className: styles.fieldInfoIcon }))), /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldInputCol }, /* @__PURE__ */ React__default.default.createElement(IndexedPairEditor, { value: authItems, onChange: handleChange, disabled, hideControls: true })));
10125
- }
10126
- }
10127
- );
10128
- };
10129
-
10130
9616
  const getTabStyles = (theme) => ({
10131
9617
  root: css.css({
10132
9618
  display: "flex",
@@ -10350,20 +9836,240 @@ const getTabStyles = (theme) => ({
10350
9836
  color: theme.colors.text.primary,
10351
9837
  opacity: 0.95
10352
9838
  }),
10353
- readOnlyBanner: css.css({
10354
- display: "inline-flex",
10355
- alignItems: "center",
10356
- gap: theme.spacing(0.5),
10357
- padding: `${theme.spacing(0.25)} ${theme.spacing(0.75)}`,
9839
+ readOnlyBanner: css.css({
9840
+ display: "inline-flex",
9841
+ alignItems: "center",
9842
+ gap: theme.spacing(0.5),
9843
+ padding: `${theme.spacing(0.25)} ${theme.spacing(0.75)}`,
9844
+ fontSize: theme.typography.bodySmall.fontSize,
9845
+ color: theme.colors.text.secondary,
9846
+ backgroundColor: theme.colors.background.secondary,
9847
+ borderRadius: theme.shape.radius.default,
9848
+ border: `1px solid ${theme.colors.border.weak}`,
9849
+ marginBottom: theme.spacing(1)
9850
+ })
9851
+ });
9852
+ const getWizardStyles = (theme) => ({
9853
+ container: css.css({
9854
+ position: "relative",
9855
+ display: "flex",
9856
+ flexDirection: "column",
9857
+ gap: theme.spacing(1),
9858
+ padding: theme.spacing(1.5),
9859
+ backgroundColor: theme.colors.background.secondary,
9860
+ borderRadius: theme.shape.radius.default,
9861
+ border: `1px solid ${theme.colors.border.weak}`,
9862
+ overflow: "hidden"
9863
+ }),
9864
+ overlay: css.css({
9865
+ position: "absolute",
9866
+ inset: 0,
9867
+ display: "flex",
9868
+ alignItems: "center",
9869
+ justifyContent: "center",
9870
+ gap: theme.spacing(1),
9871
+ background: theme.colors.background.secondary,
9872
+ borderRadius: theme.shape.radius.default,
9873
+ zIndex: 1,
9874
+ fontSize: theme.typography.bodySmall.fontSize,
9875
+ color: theme.colors.text.primary,
9876
+ opacity: 0.95
9877
+ }),
9878
+ readOnlyBanner: css.css({
9879
+ display: "inline-flex",
9880
+ alignItems: "center",
9881
+ gap: theme.spacing(0.5),
9882
+ padding: `${theme.spacing(0.25)} ${theme.spacing(0.75)}`,
9883
+ fontSize: theme.typography.bodySmall.fontSize,
9884
+ color: theme.colors.text.secondary,
9885
+ backgroundColor: theme.colors.background.secondary,
9886
+ borderRadius: theme.shape.radius.default,
9887
+ border: `1px solid ${theme.colors.border.weak}`
9888
+ }),
9889
+ navBar: css.css({
9890
+ display: "flex",
9891
+ alignItems: "center",
9892
+ justifyContent: "space-between"
9893
+ }),
9894
+ navTitle: css.css({
9895
+ display: "inline-flex",
9896
+ alignItems: "center",
9897
+ gap: theme.spacing(0.5),
9898
+ fontSize: theme.typography.body.fontSize,
9899
+ fontWeight: theme.typography.fontWeightBold,
9900
+ color: theme.colors.text.primary
9901
+ }),
9902
+ stepCount: css.css({
9903
+ fontSize: theme.typography.bodySmall.fontSize,
9904
+ fontWeight: theme.typography.fontWeightRegular,
9905
+ color: theme.colors.text.secondary
9906
+ }),
9907
+ navActions: css.css({
9908
+ display: "flex",
9909
+ alignItems: "center",
9910
+ gap: theme.spacing(0.25)
9911
+ }),
9912
+ form: css.css({
9913
+ display: "flex",
9914
+ flexDirection: "column",
9915
+ gap: theme.spacing(0.75)
9916
+ }),
9917
+ buttons: css.css({
9918
+ display: "flex",
9919
+ gap: theme.spacing(1),
9920
+ paddingTop: theme.spacing(0.25)
9921
+ }),
9922
+ fieldRow: css.css({
9923
+ display: "grid",
9924
+ gridTemplateColumns: "minmax(80px, 1fr) minmax(0, 2fr)",
9925
+ gap: theme.spacing(0.75),
9926
+ alignItems: "start"
9927
+ }),
9928
+ fieldRowCenter: css.css({
9929
+ display: "grid",
9930
+ gridTemplateColumns: "minmax(80px, 1fr) minmax(0, 2fr)",
9931
+ gap: theme.spacing(0.75),
9932
+ alignItems: "center",
9933
+ padding: `${theme.spacing(0.5)} 0`
9934
+ }),
9935
+ fieldLabelRow: css.css({
9936
+ display: "flex",
9937
+ alignItems: "center",
9938
+ gap: theme.spacing(0.5),
9939
+ paddingTop: theme.spacing(0.5)
9940
+ }),
9941
+ fieldLabelRowCompact: css.css({
9942
+ display: "flex",
9943
+ alignItems: "center",
9944
+ gap: theme.spacing(0.5)
9945
+ }),
9946
+ fieldLabel: css.css({
9947
+ fontSize: theme.typography.bodySmall.fontSize,
9948
+ fontWeight: theme.typography.fontWeightMedium,
9949
+ color: theme.colors.text.primary
9950
+ }),
9951
+ fieldRequired: css.css({
9952
+ color: theme.colors.error.text,
9953
+ marginLeft: 2
9954
+ }),
9955
+ fieldInfoIcon: css.css({
9956
+ color: theme.colors.text.disabled,
9957
+ cursor: "help",
9958
+ flexShrink: 0
9959
+ }),
9960
+ fieldInputCol: css.css({
9961
+ display: "flex",
9962
+ flexDirection: "column",
9963
+ gap: theme.spacing(0.25),
9964
+ minWidth: 0
9965
+ }),
9966
+ fieldError: css.css({
10358
9967
  fontSize: theme.typography.bodySmall.fontSize,
10359
- color: theme.colors.text.secondary,
10360
- backgroundColor: theme.colors.background.secondary,
10361
- borderRadius: theme.shape.radius.default,
10362
- border: `1px solid ${theme.colors.border.weak}`,
10363
- marginBottom: theme.spacing(1)
9968
+ color: theme.colors.error.text
10364
9969
  })
10365
9970
  });
10366
9971
 
9972
+ function SchemaField({
9973
+ field,
9974
+ control,
9975
+ errors,
9976
+ disabled,
9977
+ dsUid,
9978
+ watchedValues,
9979
+ fieldById,
9980
+ celContext,
9981
+ setValue
9982
+ }) {
9983
+ const styles = ui.useStyles2(getWizardStyles);
9984
+ const activeOverride = useDatasourceSchema.resolveActiveOverride(field, watchedValues, fieldById);
9985
+ const fk = useDatasourceSchema.formKey(field);
9986
+ if (field.key === "pdcInjected" && field.target === "jsonData") {
9987
+ return /* @__PURE__ */ React__default.default.createElement(
9988
+ reactHookForm.Controller,
9989
+ {
9990
+ name: fk,
9991
+ control,
9992
+ render: ({ field: formField }) => /* @__PURE__ */ React__default.default.createElement(
9993
+ PdcFieldNote,
9994
+ {
9995
+ enabled: !!formField.value,
9996
+ description: field.description,
9997
+ configUrl: `/connections/datasources/edit/${dsUid}`
9998
+ }
9999
+ )
10000
+ }
10001
+ );
10002
+ }
10003
+ const required = isFieldRequired(field, watchedValues, fieldById, celContext);
10004
+ const validationRules = buildValidationRules(field, required);
10005
+ return /* @__PURE__ */ React__default.default.createElement(
10006
+ reactHookForm.Controller,
10007
+ {
10008
+ name: fk,
10009
+ control,
10010
+ rules: validationRules,
10011
+ render: ({ field: formField }) => {
10012
+ var _a, _b, _c, _d, _e;
10013
+ const errorMessage = (_a = errors[fk]) == null ? void 0 : _a.message;
10014
+ const label = (_b = field.label) != null ? _b : field.key;
10015
+ const description = (_c = activeOverride == null ? void 0 : activeOverride.description) != null ? _c : field.description;
10016
+ const effectiveField = activeOverride ? {
10017
+ ...field,
10018
+ description,
10019
+ ui: {
10020
+ ...field.ui,
10021
+ placeholder: (_e = activeOverride.placeholder) != null ? _e : (_d = field.ui) == null ? void 0 : _d.placeholder
10022
+ }
10023
+ } : field;
10024
+ const isReadOnly = !!(activeOverride == null ? void 0 : activeOverride.readOnly);
10025
+ const isBool = field.valueType === "boolean";
10026
+ return /* @__PURE__ */ React__default.default.createElement("div", { className: isBool ? styles.fieldRowCenter : styles.fieldRow }, /* @__PURE__ */ React__default.default.createElement("div", { className: isBool ? styles.fieldLabelRowCompact : styles.fieldLabelRow }, /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldLabel }, label, required && /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldRequired }, "*")), description && /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: description }, /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "info-circle", size: "xs", className: styles.fieldInfoIcon }))), /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldInputCol }, renderFieldInput(effectiveField, formField, disabled || isReadOnly, errorMessage, setValue), errorMessage && !parseItemErrors(errorMessage) && /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldError }, errorMessage)));
10027
+ }
10028
+ }
10029
+ );
10030
+ }
10031
+
10032
+ const AuthorizationHeaderField = (props) => {
10033
+ const { headersFieldKey, control, disabled, watchedValues } = props;
10034
+ const styles = ui.useStyles2(getWizardStyles);
10035
+ const items = React.useMemo(
10036
+ () => Array.isArray(watchedValues[headersFieldKey]) ? watchedValues[headersFieldKey] : [],
10037
+ [watchedValues, headersFieldKey]
10038
+ );
10039
+ const authEntries = React.useMemo(() => {
10040
+ const entries = [];
10041
+ for (let i = 0; i < items.length; i++) {
10042
+ if (items[i].name.toLowerCase() === "authorization") {
10043
+ entries.push({ item: items[i], originalIdx: i });
10044
+ }
10045
+ }
10046
+ return entries;
10047
+ }, [items]);
10048
+ if (authEntries.length === 0) {
10049
+ return null;
10050
+ }
10051
+ const authItems = authEntries.map((e) => e.item);
10052
+ return /* @__PURE__ */ React__default.default.createElement(
10053
+ reactHookForm.Controller,
10054
+ {
10055
+ name: headersFieldKey,
10056
+ control,
10057
+ render: ({ field: formField }) => {
10058
+ const handleChange = (updatedAuthItems) => {
10059
+ const updated = [...items];
10060
+ for (let i = 0; i < authEntries.length; i++) {
10061
+ if (i < updatedAuthItems.length) {
10062
+ updated[authEntries[i].originalIdx] = updatedAuthItems[i];
10063
+ }
10064
+ }
10065
+ formField.onChange(updated);
10066
+ };
10067
+ return /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldRow }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldLabelRow }, /* @__PURE__ */ React__default.default.createElement("span", { className: styles.fieldLabel }, "Custom HTTP Headers"), /* @__PURE__ */ React__default.default.createElement(ui.Tooltip, { content: "Authorization HTTP header(s) sent with every request." }, /* @__PURE__ */ React__default.default.createElement(ui.Icon, { name: "info-circle", size: "xs", className: styles.fieldInfoIcon }))), /* @__PURE__ */ React__default.default.createElement("div", { className: styles.fieldInputCol }, /* @__PURE__ */ React__default.default.createElement(IndexedPairEditor, { value: authItems, onChange: handleChange, disabled, hideControls: true })));
10068
+ }
10069
+ }
10070
+ );
10071
+ };
10072
+
10367
10073
  function SidebarNav({ groups, activeIndex, sectionStates, onSelect }) {
10368
10074
  const styles = ui.useStyles2(getTabStyles);
10369
10075
  const visibleGroups = groups.filter((g) => g.group.id !== "_required");
@@ -10557,7 +10263,7 @@ function TabLayout({ form, schema, dsUid, dsName, onRetest, healthError, renderA
10557
10263
  /* @__PURE__ */ React__default.default.createElement("div", { className: styles.sectionBody }, g.group.description && /* @__PURE__ */ React__default.default.createElement("div", { className: styles.sectionDescription }, g.group.description), visibleFields.map((field) => /* @__PURE__ */ React__default.default.createElement(
10558
10264
  SchemaField,
10559
10265
  {
10560
- key: formKey(field),
10266
+ key: useDatasourceSchema.formKey(field),
10561
10267
  field,
10562
10268
  control,
10563
10269
  errors,
@@ -10571,7 +10277,7 @@ function TabLayout({ form, schema, dsUid, dsName, onRetest, healthError, renderA
10571
10277
  )), showHeaders && /* @__PURE__ */ React__default.default.createElement(
10572
10278
  AuthorizationHeaderField,
10573
10279
  {
10574
- headersFieldKey: formKey(httpHeadersField),
10280
+ headersFieldKey: useDatasourceSchema.formKey(httpHeadersField),
10575
10281
  control,
10576
10282
  disabled: allDisabled,
10577
10283
  watchedValues
@@ -10590,8 +10296,8 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10590
10296
  const [detectedReadOnly, setDetectedReadOnly] = React.useState(false);
10591
10297
  const readOnly = detectedReadOnly;
10592
10298
  const resolvedGroups = React.useMemo(() => {
10593
- const groups = resolveGroups(schema);
10594
- const requiredGroup = resolveRequiredFieldsGroup(schema);
10299
+ const groups = useDatasourceSchema.resolveGroups(schema);
10300
+ const requiredGroup = useDatasourceSchema.resolveRequiredFieldsGroup(schema);
10595
10301
  if (!requiredGroup) {
10596
10302
  return groups;
10597
10303
  }
@@ -10637,10 +10343,10 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10637
10343
  when: eff.when,
10638
10344
  targets: Object.entries(eff.set).map(([targetId, val]) => {
10639
10345
  const targetField = fieldById.get(targetId);
10640
- return { key: targetField ? formKey(targetField) : targetId, value: val };
10346
+ return { key: targetField ? useDatasourceSchema.formKey(targetField) : targetId, value: val };
10641
10347
  })
10642
10348
  }));
10643
- result.push({ sourceKey: formKey(field), effects: mapped });
10349
+ result.push({ sourceKey: useDatasourceSchema.formKey(field), effects: mapped });
10644
10350
  }
10645
10351
  return result;
10646
10352
  }, [schema.fields, fieldById]);
@@ -10661,11 +10367,11 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10661
10367
  const defaults = {};
10662
10368
  for (const field of allStorageFields) {
10663
10369
  if (field.defaultValue !== void 0) {
10664
- defaults[formKey(field)] = field.defaultValue;
10370
+ defaults[useDatasourceSchema.formKey(field)] = field.defaultValue;
10665
10371
  }
10666
10372
  }
10667
10373
  const merged = { ...defaults, ...result.values };
10668
- const virtualValues = computeVirtualFieldValues(schema, merged);
10374
+ const virtualValues = useDatasourceSchema.computeVirtualFieldValues(schema, merged);
10669
10375
  reset({ ...merged, ...virtualValues });
10670
10376
  setInitializing(false);
10671
10377
  });
@@ -10680,7 +10386,7 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10680
10386
  return;
10681
10387
  }
10682
10388
  for (const { sourceKey, effects } of fieldsWithEffects) {
10683
- const currentVal = getWatchedValue(watchedValues, sourceKey);
10389
+ const currentVal = useDatasourceSchema.getWatchedValue(watchedValues, sourceKey);
10684
10390
  const prevVal = prevEffectValuesRef.current[sourceKey];
10685
10391
  if (currentVal === prevVal) {
10686
10392
  continue;
@@ -10703,20 +10409,20 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10703
10409
  continue;
10704
10410
  }
10705
10411
  const ovs = field.overrides.filter((ov) => ov.defaultValue !== void 0).map((ov) => {
10706
- const parsed = parseDependsOn(ov.when);
10412
+ const parsed = useDatasourceSchema.parseDependsOn(ov.when);
10707
10413
  if (!parsed) {
10708
10414
  return null;
10709
10415
  }
10710
10416
  const depField = fieldById.get(parsed.field);
10711
10417
  return {
10712
- depKey: depField ? formKey(depField) : parsed.field,
10418
+ depKey: depField ? useDatasourceSchema.formKey(depField) : parsed.field,
10713
10419
  depValue: parsed.value,
10714
10420
  negate: parsed.negate,
10715
10421
  defaultValue: ov.defaultValue
10716
10422
  };
10717
10423
  }).filter(Boolean);
10718
10424
  if (ovs.length > 0) {
10719
- result.push({ targetKey: formKey(field), fieldDefault: field.defaultValue, overrides: ovs });
10425
+ result.push({ targetKey: useDatasourceSchema.formKey(field), fieldDefault: field.defaultValue, overrides: ovs });
10720
10426
  }
10721
10427
  }
10722
10428
  return result;
@@ -10729,15 +10435,15 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10729
10435
  }
10730
10436
  for (const { targetKey, fieldDefault, overrides } of fieldsWithOverrideDefaults) {
10731
10437
  for (const ov of overrides) {
10732
- const currentDepVal = String((_a = getWatchedValue(watchedValues, ov.depKey)) != null ? _a : "");
10438
+ const currentDepVal = String((_a = useDatasourceSchema.getWatchedValue(watchedValues, ov.depKey)) != null ? _a : "");
10733
10439
  const trackKey = `${targetKey}::${ov.depKey}`;
10734
10440
  const prevDepVal = prevOverrideDepRef.current[trackKey];
10735
10441
  if (currentDepVal === prevDepVal) {
10736
10442
  continue;
10737
10443
  }
10738
10444
  prevOverrideDepRef.current[trackKey] = currentDepVal;
10739
- const active = evaluateDependsOn({ value: ov.depValue, negate: ov.negate }, currentDepVal);
10740
- const wasActive = prevDepVal !== void 0 && evaluateDependsOn({ value: ov.depValue, negate: ov.negate }, prevDepVal);
10445
+ const active = useDatasourceSchema.evaluateDependsOn({ value: ov.depValue, negate: ov.negate }, currentDepVal);
10446
+ const wasActive = prevDepVal !== void 0 && useDatasourceSchema.evaluateDependsOn({ value: ov.depValue, negate: ov.negate }, prevDepVal);
10741
10447
  if (active) {
10742
10448
  setValue(targetKey, ov.defaultValue);
10743
10449
  } else if (wasActive && fieldDefault !== void 0) {
@@ -10749,8 +10455,8 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10749
10455
  const celContext = React.useMemo(() => {
10750
10456
  const ctx = {};
10751
10457
  for (const f of fieldById.values()) {
10752
- const fk = formKey(f);
10753
- const val = getWatchedValue(watchedValues, fk);
10458
+ const fk = useDatasourceSchema.formKey(f);
10459
+ const val = useDatasourceSchema.getWatchedValue(watchedValues, fk);
10754
10460
  if (val !== void 0) {
10755
10461
  const parts = f.id.split(".");
10756
10462
  let current = ctx;
@@ -10778,7 +10484,7 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10778
10484
  if (!f.dependsOn) {
10779
10485
  return true;
10780
10486
  }
10781
- const refs = extractFieldRefs(f.dependsOn);
10487
+ const refs = useDatasourceSchema.extractFieldRefs(f.dependsOn);
10782
10488
  for (const ref of refs) {
10783
10489
  const depField = fieldById.get(ref);
10784
10490
  if (depField && !visited.has(depField.id)) {
@@ -10788,7 +10494,7 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10788
10494
  }
10789
10495
  }
10790
10496
  }
10791
- return evaluateCelExpression(f.dependsOn, celContext);
10497
+ return useDatasourceSchema.evaluateCelExpression(f.dependsOn, celContext);
10792
10498
  }
10793
10499
  return check(field, /* @__PURE__ */ new Set());
10794
10500
  },
@@ -10806,11 +10512,11 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10806
10512
  const defaults = {};
10807
10513
  for (const field of allStorageFields) {
10808
10514
  if (field.defaultValue !== void 0) {
10809
- defaults[formKey(field)] = field.defaultValue;
10515
+ defaults[useDatasourceSchema.formKey(field)] = field.defaultValue;
10810
10516
  }
10811
10517
  }
10812
10518
  const merged = { ...defaults, ...refreshed.values };
10813
- const virtualValues = computeVirtualFieldValues(schema, merged);
10519
+ const virtualValues = useDatasourceSchema.computeVirtualFieldValues(schema, merged);
10814
10520
  reset({ ...merged, ...virtualValues });
10815
10521
  onSuccess("UPDATED", "Configuration saved.");
10816
10522
  } catch (err) {
@@ -10829,11 +10535,11 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10829
10535
  if (!isFieldVisible(field)) {
10830
10536
  continue;
10831
10537
  }
10832
- if (errors[formKey(field)]) {
10538
+ if (errors[useDatasourceSchema.formKey(field)]) {
10833
10539
  return false;
10834
10540
  }
10835
10541
  if (isFieldRequired(field, watchedValues, fieldById, celContext)) {
10836
- const val = getWatchedValue(watchedValues, formKey(field));
10542
+ const val = useDatasourceSchema.getWatchedValue(watchedValues, useDatasourceSchema.formKey(field));
10837
10543
  if (val === SECURE_FIELD_CONFIGURED) {
10838
10544
  continue;
10839
10545
  }
@@ -10851,14 +10557,14 @@ function useDatasourceConfigForm({ schema, dsUid, onSuccess, onSaving }) {
10851
10557
  if (!field.disabledWhen) {
10852
10558
  return false;
10853
10559
  }
10854
- return evaluateCelExpression(field.disabledWhen, celContext);
10560
+ return useDatasourceSchema.evaluateCelExpression(field.disabledWhen, celContext);
10855
10561
  },
10856
10562
  [celContext]
10857
10563
  );
10858
10564
  const groupHasData = React.useCallback(
10859
10565
  (group) => {
10860
10566
  for (const field of group.fields) {
10861
- const val = getWatchedValue(watchedValues, formKey(field));
10567
+ const val = useDatasourceSchema.getWatchedValue(watchedValues, useDatasourceSchema.formKey(field));
10862
10568
  if (val === void 0 || val === null || val === "" || val === false) {
10863
10569
  continue;
10864
10570
  }
@@ -10994,11 +10700,11 @@ function WizardLayout({ form, schema, dsUid, dsName, onRetest, healthError, rend
10994
10700
  return true;
10995
10701
  }
10996
10702
  for (const field of visibleFieldsForStep) {
10997
- if (errors[formKey(field)]) {
10703
+ if (errors[useDatasourceSchema.formKey(field)]) {
10998
10704
  return false;
10999
10705
  }
11000
10706
  if (isFieldRequired(field, watchedValues, fieldById, celContext)) {
11001
- const val = getWatchedValue(watchedValues, formKey(field));
10707
+ const val = useDatasourceSchema.getWatchedValue(watchedValues, useDatasourceSchema.formKey(field));
11002
10708
  if (val === SECURE_FIELD_CONFIGURED) {
11003
10709
  continue;
11004
10710
  }
@@ -11014,7 +10720,7 @@ function WizardLayout({ form, schema, dsUid, dsName, onRetest, healthError, rend
11014
10720
  return;
11015
10721
  }
11016
10722
  if (!readOnly) {
11017
- const visibleKeys = visibleFieldsForStep.map((f) => formKey(f));
10723
+ const visibleKeys = visibleFieldsForStep.map((f) => useDatasourceSchema.formKey(f));
11018
10724
  const valid = await trigger(visibleKeys);
11019
10725
  if (!valid) {
11020
10726
  return;
@@ -11098,7 +10804,7 @@ function WizardLayout({ form, schema, dsUid, dsName, onRetest, healthError, rend
11098
10804
  )))), currentResolved && /* @__PURE__ */ React__default.default.createElement("form", { onSubmit: handleSubmit(onSubmit), className: styles.form }, visibleFieldsForStep.map((field) => /* @__PURE__ */ React__default.default.createElement(
11099
10805
  SchemaField,
11100
10806
  {
11101
- key: formKey(field),
10807
+ key: useDatasourceSchema.formKey(field),
11102
10808
  field,
11103
10809
  control,
11104
10810
  errors,
@@ -11112,7 +10818,7 @@ function WizardLayout({ form, schema, dsUid, dsName, onRetest, healthError, rend
11112
10818
  )), (currentResolved.group.id === "_required" || currentResolved.group.id === "auth") && httpHeadersField && /* @__PURE__ */ React__default.default.createElement(
11113
10819
  AuthorizationHeaderField,
11114
10820
  {
11115
- headersFieldKey: formKey(httpHeadersField),
10821
+ headersFieldKey: useDatasourceSchema.formKey(httpHeadersField),
11116
10822
  control,
11117
10823
  disabled: allDisabled,
11118
10824
  watchedValues
@@ -12722,412 +12428,34 @@ const convertUnits = (queryStats) => {
12722
12428
  return text + suffix;
12723
12429
  };
12724
12430
 
12725
- function generateLLMHint(schema) {
12726
- var _a, _b, _c, _d;
12727
- const hints = [];
12728
- for (const field of schema.fields) {
12729
- if (((_a = field.ui) == null ? void 0 : _a.component) !== "select" || field.target !== "jsonData" || field.kind === "virtual") {
12730
- continue;
12731
- }
12732
- const options = (_c = (_b = field.ui) == null ? void 0 : _b.options) != null ? _c : [];
12733
- const values = options.map((opt) => {
12734
- const isDefault = field.defaultValue != null && String(opt.value) === String(field.defaultValue);
12735
- return isDefault ? `"${opt.value}" (default)` : `"${opt.value}"`;
12736
- }).join(", ");
12737
- if (values) {
12738
- hints.push(`- ${(_d = field.label) != null ? _d : field.key}: jsonData.${field.key} \u2014 values: ${values}`);
12739
- }
12740
- }
12741
- return hints.join("\n");
12742
- }
12743
- function generateTroubleshootingFields(schema) {
12744
- var _a, _b, _c;
12745
- const result = [];
12746
- for (const field of schema.fields) {
12747
- if (field.kind === "virtual" || field.isItemField) {
12748
- continue;
12749
- }
12750
- const entry = {
12751
- label: (_a = field.label) != null ? _a : field.key,
12752
- key: field.target === "root" ? field.key : `${field.target}.${field.key}`,
12753
- target: (_b = field.target) != null ? _b : "jsonData",
12754
- type: field.valueType,
12755
- required: !!field.required
12756
- };
12757
- if (field.description) {
12758
- entry.description = field.description;
12759
- }
12760
- if (field.defaultValue != null) {
12761
- entry.defaultValue = field.defaultValue;
12762
- }
12763
- if (((_c = field.ui) == null ? void 0 : _c.options) && field.ui.options.length > 0) {
12764
- entry.options = field.ui.options.map((o) => String(o.value));
12765
- }
12766
- if (field.section) {
12767
- entry.section = field.section;
12768
- }
12769
- if (field.dependsOn) {
12770
- entry.dependsOn = field.dependsOn;
12771
- }
12772
- result.push(entry);
12773
- }
12774
- return result;
12775
- }
12776
-
12777
- function yamlIndent(depth) {
12778
- return " ".repeat(depth);
12779
- }
12780
- function yamlString(value) {
12781
- if (value === null || value === void 0) {
12782
- return '""';
12783
- }
12784
- const s = String(value);
12785
- if (s === "") {
12786
- return '""';
12787
- }
12788
- return yaml__default.default.dump(s, { lineWidth: -1 }).trimEnd();
12789
- }
12790
- function yamlValue(value, depth) {
12791
- if (value === null || value === void 0) {
12792
- return '""';
12793
- }
12794
- if (typeof value === "boolean") {
12795
- return value ? "true" : "false";
12796
- }
12797
- if (typeof value === "number") {
12798
- return String(value);
12799
- }
12800
- if (typeof value === "string") {
12801
- return yamlString(value);
12802
- }
12803
- if (Array.isArray(value)) {
12804
- if (value.length === 0) {
12805
- return "[]";
12806
- }
12807
- const lines = value.map((item) => {
12808
- if (typeof item === "object" && item !== null && !Array.isArray(item)) {
12809
- const entries = Object.entries(item);
12810
- if (entries.length === 0) {
12811
- return `${yamlIndent(depth)}- {}`;
12812
- }
12813
- const [firstKey, firstVal] = entries[0];
12814
- const firstLine = `${yamlIndent(depth)}- ${yamlString(firstKey)}: ${yamlValue(firstVal, depth + 2)}`;
12815
- const rest = entries.slice(1).map(([k, v]) => `${yamlIndent(depth + 1)}${yamlString(k)}: ${yamlValue(v, depth + 2)}`);
12816
- return [firstLine, ...rest].join("\n");
12817
- }
12818
- return `${yamlIndent(depth)}- ${yamlValue(item, depth + 1)}`;
12819
- });
12820
- return "\n" + lines.join("\n");
12821
- }
12822
- if (typeof value === "object") {
12823
- const entries = Object.entries(value);
12824
- if (entries.length === 0) {
12825
- return "{}";
12826
- }
12827
- const lines = entries.map(([k, v]) => `${yamlIndent(depth)}${yamlString(k)}: ${yamlValue(v, depth + 1)}`);
12828
- return "\n" + lines.join("\n");
12829
- }
12830
- return yamlString(value);
12831
- }
12832
- function isCertField(field) {
12833
- var _a;
12834
- const k = field.key.toLowerCase();
12835
- return field.target === "secureJsonData" && (k.includes("cert") || k.includes("key") || ((_a = field.ui) == null ? void 0 : _a.component) === "textarea");
12836
- }
12837
- function isExcludedFromProvisioning(field) {
12838
- var _a, _b;
12839
- if (field.kind === "virtual") {
12840
- return true;
12841
- }
12842
- if (field.isItemField) {
12843
- return true;
12844
- }
12845
- if (((_a = field.tags) == null ? void 0 : _a.some((t) => t.startsWith("managed-by:"))) && field.target !== "root") {
12846
- return true;
12847
- }
12848
- if (((_b = field.storage) == null ? void 0 : _b.type) === "indexedPair") {
12849
- return true;
12850
- }
12851
- return false;
12852
- }
12853
- function secretPlaceholder(field) {
12854
- if (isCertField(field)) {
12855
- return "|\n xxxxxx";
12856
- }
12857
- return "xxxxxx";
12858
- }
12859
- function templateValue(field) {
12860
- var _a;
12861
- if (field.defaultValue !== void 0) {
12862
- return field.defaultValue;
12863
- }
12864
- if (((_a = field.ui) == null ? void 0 : _a.options) && field.ui.options.length > 0) {
12865
- return field.ui.options[0].value;
12866
- }
12867
- switch (field.valueType) {
12868
- case "string":
12869
- return "";
12870
- case "number":
12871
- return 0;
12872
- case "boolean":
12873
- return false;
12874
- case "array":
12875
- return [];
12876
- case "object":
12877
- case "map":
12878
- return {};
12879
- default:
12880
- return "";
12881
- }
12882
- }
12883
- function fieldComment(field, indent) {
12884
- var _a, _b, _c;
12885
- const parts = [];
12886
- const label = (_a = field.label) != null ? _a : field.key;
12887
- let line = label;
12888
- if (field.required) {
12889
- line += " (REQUIRED)";
12890
- }
12891
- if (field.description) {
12892
- line += ` \u2014 ${field.description}`;
12893
- }
12894
- parts.push(`${indent}# ${line}`);
12895
- const options = (_b = field.ui) == null ? void 0 : _b.options;
12896
- if (options && options.length > 0) {
12897
- const vals = options.map((o) => String(o.value)).join(", ");
12898
- parts.push(`${indent}# Allowed values: ${vals}`);
12899
- }
12900
- const allowedValuesRule = (_c = field.validations) == null ? void 0 : _c.find(
12901
- (v) => v.type === "allowedValues"
12902
- );
12903
- if (allowedValuesRule && !options) {
12904
- const vals = allowedValuesRule.values.map((v) => String(v)).join(", ");
12905
- parts.push(`${indent}# Allowed values: ${vals}`);
12906
- }
12907
- if (field.dependsOn) {
12908
- parts.push(`${indent}# Only when: ${field.dependsOn}`);
12909
- }
12910
- return parts.join("\n");
12911
- }
12912
- function toProvisioningYaml(schema, values, options) {
12913
- var _a, _b, _c, _d, _e, _f;
12914
- const isTemplate = !values;
12915
- const showComments = (_a = options == null ? void 0 : options.comments) != null ? _a : isTemplate;
12916
- const indent2 = " ";
12917
- const indent3 = " ";
12918
- const groups = resolveGroups(schema);
12919
- const rootFields = [];
12920
- const jsonDataFieldsByGroup = [];
12921
- const secureJsonDataFieldsByGroup = [];
12922
- const virtualFieldsWithOptions = [];
12923
- for (const { group, fields } of groups) {
12924
- const jd = [];
12925
- const sd = [];
12926
- for (const field of fields) {
12927
- if (field.kind === "virtual" && ((_b = field.ui) == null ? void 0 : _b.options) && field.ui.options.length > 0) {
12928
- virtualFieldsWithOptions.push(field);
12929
- continue;
12930
- }
12931
- if (isExcludedFromProvisioning(field)) {
12932
- continue;
12933
- }
12934
- switch (field.target) {
12935
- case "root":
12936
- rootFields.push(field);
12937
- break;
12938
- case "jsonData":
12939
- jd.push(field);
12940
- break;
12941
- case "secureJsonData":
12942
- sd.push(field);
12943
- break;
12944
- }
12945
- }
12946
- if (jd.length > 0) {
12947
- jsonDataFieldsByGroup.push({ group, fields: jd });
12948
- }
12949
- if (sd.length > 0) {
12950
- secureJsonDataFieldsByGroup.push({ group, fields: sd });
12951
- }
12952
- }
12953
- const allSecureJsonDataFields = secureJsonDataFieldsByGroup.flatMap((g) => g.fields);
12954
- const groupedFieldIds = new Set(groups.flatMap(({ group }) => group.fieldRefs));
12955
- for (const field of schema.fields) {
12956
- if (field.target === "root" && !groupedFieldIds.has(field.id) && !isExcludedFromProvisioning(field)) {
12957
- rootFields.push(field);
12958
- }
12959
- }
12960
- const lines = [];
12961
- lines.push("apiVersion: 1");
12962
- lines.push("");
12963
- lines.push("datasources:");
12964
- lines.push(`${indent2.slice(2)}- name: ${yamlString((_d = (_c = options == null ? void 0 : options.name) != null ? _c : values == null ? void 0 : values.name) != null ? _d : `my-${schema.pluginType}`)}`);
12965
- lines.push(`${indent2}type: ${schema.pluginType}`);
12966
- if (!isTemplate && (values == null ? void 0 : values.uid)) {
12967
- lines.push(`${indent2}uid: ${yamlString(values.uid)}`);
12968
- }
12969
- const ALREADY_EMITTED_ROOT = /* @__PURE__ */ new Set(["name", "type", "uid"]);
12970
- for (const field of rootFields) {
12971
- if (ALREADY_EMITTED_ROOT.has(field.key)) {
12972
- continue;
12973
- }
12974
- const val = values ? values[field.key] : templateValue(field);
12975
- if (val === void 0 || val === null) {
12976
- continue;
12977
- }
12978
- if (!isTemplate && val === false) {
12979
- continue;
12980
- }
12981
- if (showComments) {
12982
- lines.push(fieldComment(field, indent2));
12983
- }
12984
- lines.push(`${indent2}${field.key}: ${yamlValue(val, 3)}`);
12985
- }
12986
- if (showComments) {
12987
- for (const vf of virtualFieldsWithOptions) {
12988
- const label = (_e = vf.label) != null ? _e : vf.key;
12989
- const opts = vf.ui.options.map((o) => `${String(o.value)} (${o.label})`).join(", ");
12990
- lines.push(`${indent2}# ${label}: ${opts}`);
12991
- if (vf.description) {
12992
- lines.push(`${indent2}# ${vf.description}`);
12993
- }
12994
- }
12995
- }
12996
- const emittedJsonDataKeys = /* @__PURE__ */ new Set();
12997
- const emittedSecureJsonDataKeys = /* @__PURE__ */ new Set();
12998
- const jsonDataValues = values == null ? void 0 : values.jsonData;
12999
- const hasJsonDataFromSchema = jsonDataFieldsByGroup.length > 0;
13000
- const hasJsonDataFromValues = !isTemplate && jsonDataValues && Object.keys(jsonDataValues).length > 0;
13001
- if (hasJsonDataFromSchema || hasJsonDataFromValues) {
13002
- lines.push(`${indent2}jsonData:`);
13003
- for (const { group, fields: groupFields } of jsonDataFieldsByGroup) {
13004
- if (showComments && jsonDataFieldsByGroup.length > 1) {
13005
- lines.push(`${indent3}# --- ${group.title} ---`);
13006
- }
13007
- for (const field of groupFields) {
13008
- const val = values ? getNestedValue(values, "jsonData", field) : templateValue(field);
13009
- if (val === void 0 || val === null) {
13010
- continue;
13011
- }
13012
- if (!isTemplate && field.defaultValue !== void 0 && val === field.defaultValue) {
13013
- continue;
13014
- }
13015
- emittedJsonDataKeys.add(field.key);
13016
- if (showComments) {
13017
- lines.push(fieldComment(field, indent3));
13018
- }
13019
- const rendered = yamlValue(val, 4);
13020
- if (rendered.startsWith("\n")) {
13021
- lines.push(`${indent3}${field.key}:${rendered}`);
13022
- } else {
13023
- lines.push(`${indent3}${field.key}: ${rendered}`);
13024
- }
13025
- }
13026
- }
13027
- if (!isTemplate && jsonDataValues) {
13028
- for (const [key, val] of Object.entries(jsonDataValues)) {
13029
- if (emittedJsonDataKeys.has(key)) {
13030
- continue;
13031
- }
13032
- if (val === void 0 || val === null) {
13033
- continue;
13034
- }
13035
- const rendered = yamlValue(val, 4);
13036
- if (rendered.startsWith("\n")) {
13037
- lines.push(`${indent3}${key}:${rendered}`);
13038
- } else {
13039
- lines.push(`${indent3}${key}: ${rendered}`);
13040
- }
13041
- }
13042
- }
13043
- }
13044
- const secureJsonFields = (_f = values == null ? void 0 : values.secureJsonFields) != null ? _f : {};
13045
- const inferredSecureKeys = !isTemplate ? inferSecureJsonDataKeys(jsonDataValues) : [];
13046
- const activeSecureFields = isTemplate ? allSecureJsonDataFields : allSecureJsonDataFields.filter((f) => secureJsonFields[f.key] === true);
13047
- if (activeSecureFields.length > 0 || inferredSecureKeys.length > 0) {
13048
- lines.push(`${indent2}secureJsonData:`);
13049
- for (const field of activeSecureFields) {
13050
- emittedSecureJsonDataKeys.add(field.key);
13051
- if (showComments) {
13052
- lines.push(fieldComment(field, indent3));
13053
- }
13054
- lines.push(`${indent3}${field.key}: ${secretPlaceholder(field)}`);
13055
- }
13056
- for (const key of inferredSecureKeys) {
13057
- if (emittedSecureJsonDataKeys.has(key)) {
13058
- continue;
13059
- }
13060
- lines.push(`${indent3}${key}: xxxxxx`);
13061
- }
13062
- }
13063
- return lines.join("\n");
13064
- }
13065
- function inferSecureJsonDataKeys(jsonData) {
13066
- if (!jsonData) {
13067
- return [];
13068
- }
13069
- const keys = [];
13070
- for (const key of Object.keys(jsonData)) {
13071
- const match = key.match(/^httpHeaderName(\d+)$/);
13072
- if (match) {
13073
- keys.push(`httpHeaderValue${match[1]}`);
13074
- }
13075
- }
13076
- return keys;
13077
- }
13078
- function getNestedValue(values, target, field) {
13079
- const nested = values[target];
13080
- if (nested && typeof nested === "object") {
13081
- return nested[field.key];
13082
- }
13083
- return void 0;
13084
- }
13085
- function datasourceToProvisioningYaml(ds, schema) {
13086
- if (schema) {
13087
- return toProvisioningYaml(schema, ds, { comments: false });
13088
- }
13089
- const lines = [];
13090
- lines.push("apiVersion: 1");
13091
- lines.push("");
13092
- lines.push("datasources:");
13093
- lines.push(` - name: ${yamlString(ds.name)}`);
13094
- if (ds.uid) {
13095
- lines.push(` uid: ${yamlString(ds.uid)}`);
13096
- }
13097
- lines.push(` type: ${yamlString(ds.type)}`);
13098
- if (ds.url) {
13099
- lines.push(` url: ${yamlString(ds.url)}`);
13100
- }
13101
- if (ds.database) {
13102
- lines.push(` database: ${yamlString(ds.database)}`);
13103
- }
13104
- if (ds.isDefault) {
13105
- lines.push(" isDefault: true");
13106
- }
13107
- if (ds.basicAuth) {
13108
- lines.push(" basicAuth: true");
13109
- if (ds.basicAuthUser) {
13110
- lines.push(` basicAuthUser: ${yamlString(ds.basicAuthUser)}`);
13111
- }
13112
- }
13113
- const jsonData = ds.jsonData;
13114
- if (jsonData && Object.keys(jsonData).length > 0) {
13115
- lines.push(" jsonData:");
13116
- for (const [key, val] of Object.entries(jsonData)) {
13117
- const rendered = yamlValue(val, 4);
13118
- if (rendered.startsWith("\n")) {
13119
- lines.push(` ${key}:${rendered}`);
13120
- } else {
13121
- lines.push(` ${key}: ${rendered}`);
13122
- }
13123
- }
13124
- }
13125
- lines.push(" # secureJsonData: (secrets are not exported \u2014 add manually)");
13126
- lines.push(" # mySecret: xxxxxx");
13127
- return lines.join("\n");
13128
- }
13129
-
13130
- exports.getConfigSchema = schemas.getConfigSchema;
12431
+ exports.ROOT_CONFIG_FIELDS = useDatasourceSchema.ROOT_CONFIG_FIELDS;
12432
+ exports.buildCelContext = useDatasourceSchema.buildCelContext;
12433
+ exports.buildCloneDatasourcePayload = useDatasourceSchema.buildCloneDatasourcePayload;
12434
+ exports.buildCreateDatasourcePayload = useDatasourceSchema.buildCreateDatasourcePayload;
12435
+ exports.buildUpdateDatasourcePayload = useDatasourceSchema.buildUpdateDatasourcePayload;
12436
+ exports.clearExpressionCache = useDatasourceSchema.clearExpressionCache;
12437
+ exports.computeVirtualFieldValues = useDatasourceSchema.computeVirtualFieldValues;
12438
+ exports.configToYaml = useDatasourceSchema.configToYaml;
12439
+ exports.datasourceToProvisioningYaml = useDatasourceSchema.datasourceToProvisioningYaml;
12440
+ exports.evaluateCelDirect = useDatasourceSchema.evaluateCelDirect;
12441
+ exports.evaluateCelExpression = useDatasourceSchema.evaluateCelExpression;
12442
+ exports.evaluateComputedRead = useDatasourceSchema.evaluateComputedRead;
12443
+ exports.evaluateDependsOn = useDatasourceSchema.evaluateDependsOn;
12444
+ exports.extractFieldRefs = useDatasourceSchema.extractFieldRefs;
12445
+ exports.fetchConfigSchema = useDatasourceSchema.fetchConfigSchema;
12446
+ exports.formKey = useDatasourceSchema.formKey;
12447
+ exports.formatYamlDiff = useDatasourceSchema.formatYamlDiff;
12448
+ exports.generateLLMHint = useDatasourceSchema.generateLLMHint;
12449
+ exports.generateTroubleshootingFields = useDatasourceSchema.generateTroubleshootingFields;
12450
+ exports.getConfigSchema = useDatasourceSchema.getConfigSchema;
12451
+ exports.getWatchedValue = useDatasourceSchema.getWatchedValue;
12452
+ exports.isValidCelExpression = useDatasourceSchema.isValidCelExpression;
12453
+ exports.parseDependsOn = useDatasourceSchema.parseDependsOn;
12454
+ exports.resolveActiveOverride = useDatasourceSchema.resolveActiveOverride;
12455
+ exports.resolveGroups = useDatasourceSchema.resolveGroups;
12456
+ exports.resolveRequiredFieldsGroup = useDatasourceSchema.resolveRequiredFieldsGroup;
12457
+ exports.toProvisioningYaml = useDatasourceSchema.toProvisioningYaml;
12458
+ exports.useDatasourceSchema = useDatasourceSchema.useDatasourceSchema;
13131
12459
  exports.AccessoryButton = AccessoryButton;
13132
12460
  exports.AdvancedHttpSettings = AdvancedHttpSettings;
13133
12461
  exports.Auth = Auth;
@@ -13184,7 +12512,6 @@ exports.QueryModellerBase = QueryModellerBase;
13184
12512
  exports.QueryOptionGroup = QueryOptionGroup;
13185
12513
  exports.RawQuery = RawQuery;
13186
12514
  exports.RunQueryButton = RunQueryButton;
13187
- exports.SECURE_FIELD_CONFIGURED = SECURE_FIELD_CONFIGURED;
13188
12515
  exports.SQLEditor = SQLEditor;
13189
12516
  exports.SQLEditorMode = SQLEditorMode;
13190
12517
  exports.SQLEditorTestUtils = SQLEditorTestUtils;
@@ -13198,32 +12525,12 @@ exports.SuggestionKind = SuggestionKind;
13198
12525
  exports.TLSSettings = TLSSettings;
13199
12526
  exports.TableSelector = TableSelector;
13200
12527
  exports.TokenType = TokenType;
13201
- exports.buildDatasourceConfigPayload = buildDatasourceConfigPayload;
13202
- exports.computeVirtualFieldValues = computeVirtualFieldValues;
13203
12528
  exports.convertLegacyAuthProps = convertLegacyAuthProps;
13204
- exports.datasourceToProvisioningYaml = datasourceToProvisioningYaml;
13205
- exports.evaluateComputedRead = evaluateComputedRead;
13206
- exports.evaluateDependsOn = evaluateDependsOn;
13207
- exports.expandIndexedPair = expandIndexedPair;
13208
- exports.fetchExistingValues = fetchExistingValues;
13209
- exports.findActiveSecureOverride = findActiveSecureOverride;
13210
- exports.flattenIndexedPair = flattenIndexedPair;
13211
- exports.formKey = formKey;
13212
12529
  exports.formatDate = formatDate;
13213
- exports.generateLLMHint = generateLLMHint;
13214
- exports.generateTroubleshootingFields = generateTroubleshootingFields;
13215
12530
  exports.getStandardSQLCompletionProvider = getStandardSQLCompletionProvider;
13216
- exports.getWatchedValue = getWatchedValue;
13217
12531
  exports.grafanaStandardSQLLanguage = language;
13218
12532
  exports.grafanaStandardSQLLanguageConf = conf;
13219
- exports.parseDependsOn = parseDependsOn;
13220
- exports.resolveActiveOverride = resolveActiveOverride;
13221
- exports.resolveGroups = resolveGroups;
13222
12533
  exports.resolvePluginName = resolvePluginName;
13223
- exports.resolveRequiredFieldsGroup = resolveRequiredFieldsGroup;
13224
- exports.resolveSecureKeyTemplate = resolveSecureKeyTemplate;
13225
- exports.submitDatasourceConfig = submitDatasourceConfig;
13226
12534
  exports.toOption = toOption;
13227
- exports.toProvisioningYaml = toProvisioningYaml;
13228
12535
  exports.useHealthChecks = useHealthChecks;
13229
12536
  //# sourceMappingURL=index.cjs.map