@grafana/plugin-ui 0.7.2 → 0.9.0

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 (417) hide show
  1. package/README.md +3 -34
  2. package/dist/components/AsyncButtonCascader/AsyncButtonCascader.js +4 -5
  3. package/dist/components/AsyncButtonCascader/AsyncButtonCascader.js.map +1 -1
  4. package/dist/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js +28 -0
  5. package/dist/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js.map +1 -0
  6. package/dist/components/ConfigEditor/AdvancedSettings/index.js +6 -0
  7. package/dist/components/ConfigEditor/AdvancedSettings/index.js.map +1 -0
  8. package/dist/components/ConfigEditor/Auth/Auth.js +24 -0
  9. package/dist/components/ConfigEditor/Auth/Auth.js.map +1 -0
  10. package/dist/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js +109 -0
  11. package/dist/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js.map +1 -0
  12. package/dist/components/ConfigEditor/Auth/auth-method/BasicAuth.js +23 -0
  13. package/dist/components/ConfigEditor/Auth/auth-method/BasicAuth.js.map +1 -0
  14. package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeader.js +41 -0
  15. package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeader.js.map +1 -0
  16. package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js +76 -0
  17. package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js.map +1 -0
  18. package/dist/components/ConfigEditor/Auth/index.js +10 -0
  19. package/dist/components/ConfigEditor/Auth/index.js.map +1 -0
  20. package/dist/components/ConfigEditor/Auth/styles.js +19 -0
  21. package/dist/components/ConfigEditor/Auth/styles.js.map +1 -0
  22. package/dist/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js +18 -0
  23. package/dist/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js.map +1 -0
  24. package/dist/components/ConfigEditor/Auth/tls/SkipTLSVerification.js +11 -0
  25. package/dist/components/ConfigEditor/Auth/tls/SkipTLSVerification.js.map +1 -0
  26. package/dist/components/ConfigEditor/Auth/tls/TLSClientAuth.js +22 -0
  27. package/dist/components/ConfigEditor/Auth/tls/TLSClientAuth.js.map +1 -0
  28. package/dist/components/ConfigEditor/Auth/tls/TLSSettings.js +25 -0
  29. package/dist/components/ConfigEditor/Auth/tls/TLSSettings.js.map +1 -0
  30. package/dist/components/ConfigEditor/Auth/tls/TLSSettingsSection.js +35 -0
  31. package/dist/components/ConfigEditor/Auth/tls/TLSSettingsSection.js.map +1 -0
  32. package/dist/components/ConfigEditor/Auth/types.js +11 -0
  33. package/dist/components/ConfigEditor/Auth/types.js.map +1 -0
  34. package/dist/components/ConfigEditor/Auth/utils.js +112 -0
  35. package/dist/components/ConfigEditor/Auth/utils.js.map +1 -0
  36. package/dist/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js +32 -0
  37. package/dist/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js.map +1 -0
  38. package/dist/components/ConfigEditor/ConfigSection/ConfigSection.js +12 -0
  39. package/dist/components/ConfigEditor/ConfigSection/ConfigSection.js.map +1 -0
  40. package/dist/components/ConfigEditor/ConfigSection/ConfigSubSection.js +12 -0
  41. package/dist/components/ConfigEditor/ConfigSection/ConfigSubSection.js.map +1 -0
  42. package/dist/components/ConfigEditor/ConfigSection/GenericConfigSection.js +40 -0
  43. package/dist/components/ConfigEditor/ConfigSection/GenericConfigSection.js.map +1 -0
  44. package/dist/components/ConfigEditor/ConfigSection/index.js +10 -0
  45. package/dist/components/ConfigEditor/ConfigSection/index.js.map +1 -0
  46. package/dist/components/ConfigEditor/Connection/ConnectionSettings.js +25 -0
  47. package/dist/components/ConfigEditor/Connection/ConnectionSettings.js.map +1 -0
  48. package/dist/components/ConfigEditor/Connection/index.js +6 -0
  49. package/dist/components/ConfigEditor/Connection/index.js.map +1 -0
  50. package/dist/components/ConfigEditor/DataSourceDescription.js +39 -0
  51. package/dist/components/ConfigEditor/DataSourceDescription.js.map +1 -0
  52. package/dist/components/ConfigEditor/SecureSocksProxyToggle.js +8 -13
  53. package/dist/components/ConfigEditor/SecureSocksProxyToggle.js.map +1 -1
  54. package/dist/components/ConfigEditor/index.js +15 -3
  55. package/dist/components/ConfigEditor/index.js.map +1 -1
  56. package/dist/components/ConfigEditor/types.js +3 -0
  57. package/dist/components/ConfigEditor/types.js.map +1 -0
  58. package/dist/components/CustomHeadersSettings/CustomHeadersSettings.js +12 -17
  59. package/dist/components/CustomHeadersSettings/CustomHeadersSettings.js.map +1 -1
  60. package/dist/components/DataLinks/DataLink.js +3 -3
  61. package/dist/components/DataLinks/DataLink.js.map +1 -1
  62. package/dist/components/DataLinks/DataLinks.js +6 -9
  63. package/dist/components/DataLinks/DataLinks.js.map +1 -1
  64. package/dist/components/DataLinks/index.js.map +1 -1
  65. package/dist/components/DataSourcePicker/DataSourcePicker.js +4 -6
  66. package/dist/components/DataSourcePicker/DataSourcePicker.js.map +1 -1
  67. package/dist/components/DatePicker/DatePicker.js +5 -3
  68. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  69. package/dist/components/DatePicker/styles.js +8 -10
  70. package/dist/components/DatePicker/styles.js.map +1 -1
  71. package/dist/components/DatePickerWithInput/DatePickerWithInput.js +1 -1
  72. package/dist/components/DatePickerWithInput/DatePickerWithInput.js.map +1 -1
  73. package/dist/components/DebounceInput/DebounceInput.js +3 -1
  74. package/dist/components/DebounceInput/DebounceInput.js.map +1 -1
  75. package/dist/components/Plugins/PluginSignatureBadge.js.map +1 -1
  76. package/dist/components/QueryEditor/AccessoryButton.js +3 -4
  77. package/dist/components/QueryEditor/AccessoryButton.js.map +1 -1
  78. package/dist/components/QueryEditor/DatasetSelector.js.map +1 -1
  79. package/dist/components/QueryEditor/EditorField.js +7 -9
  80. package/dist/components/QueryEditor/EditorField.js.map +1 -1
  81. package/dist/components/QueryEditor/EditorFieldGroup.js +2 -2
  82. package/dist/components/QueryEditor/EditorFieldGroup.js.map +1 -1
  83. package/dist/components/QueryEditor/EditorHeader.js +3 -4
  84. package/dist/components/QueryEditor/EditorHeader.js.map +1 -1
  85. package/dist/components/QueryEditor/EditorList.js +5 -6
  86. package/dist/components/QueryEditor/EditorList.js.map +1 -1
  87. package/dist/components/QueryEditor/EditorRow.js +3 -3
  88. package/dist/components/QueryEditor/EditorRow.js.map +1 -1
  89. package/dist/components/QueryEditor/EditorRows.js +2 -2
  90. package/dist/components/QueryEditor/EditorRows.js.map +1 -1
  91. package/dist/components/QueryEditor/EditorStack.js +13 -0
  92. package/dist/components/QueryEditor/EditorStack.js.map +1 -0
  93. package/dist/components/QueryEditor/EditorSwitch.js.map +1 -1
  94. package/dist/components/QueryEditor/FlexItem.js.map +1 -1
  95. package/dist/components/QueryEditor/InlineSelect.js +5 -8
  96. package/dist/components/QueryEditor/InlineSelect.js.map +1 -1
  97. package/dist/components/QueryEditor/InputGroup.js +29 -9
  98. package/dist/components/QueryEditor/InputGroup.js.map +1 -1
  99. package/dist/components/QueryEditor/QueryHeader.js +1 -4
  100. package/dist/components/QueryEditor/QueryHeader.js.map +1 -1
  101. package/dist/components/QueryEditor/RunQueryButton.js +3 -5
  102. package/dist/components/QueryEditor/RunQueryButton.js.map +1 -1
  103. package/dist/components/QueryEditor/TableSelector.js.map +1 -1
  104. package/dist/components/QueryEditor/index.js +3 -3
  105. package/dist/components/QueryEditor/index.js.map +1 -1
  106. package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js +2 -2
  107. package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js.map +1 -1
  108. package/dist/components/QueryEditor/types.js +2 -2
  109. package/dist/components/QueryEditor/types.js.map +1 -1
  110. package/dist/components/QueryEditor/utils/sql.utils.js.map +1 -1
  111. package/dist/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js +1 -1
  112. package/dist/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js.map +1 -1
  113. package/dist/components/QueryEditor/visual-query-builder/EditorField.js.map +1 -1
  114. package/dist/components/QueryEditor/visual-query-builder/EditorRow.js +2 -2
  115. package/dist/components/QueryEditor/visual-query-builder/EditorRow.js.map +1 -1
  116. package/dist/components/QueryEditor/visual-query-builder/EditorRows.js +2 -2
  117. package/dist/components/QueryEditor/visual-query-builder/EditorRows.js.map +1 -1
  118. package/dist/components/QueryEditor/visual-query-builder/SelectRow.js +3 -3
  119. package/dist/components/QueryEditor/visual-query-builder/SelectRow.js.map +1 -1
  120. package/dist/components/QueryEditor/visual-query-builder/VisualEditor.js +1 -1
  121. package/dist/components/QueryEditor/visual-query-builder/VisualEditor.js.map +1 -1
  122. package/dist/components/QueryEditorRow/QueryEditorRow.js +3 -4
  123. package/dist/components/QueryEditorRow/QueryEditorRow.js.map +1 -1
  124. package/dist/components/SQLEditor/components/SQLEditor.js +330 -0
  125. package/dist/components/SQLEditor/components/SQLEditor.js.map +1 -0
  126. package/dist/components/SQLEditor/index.js +25 -0
  127. package/dist/components/SQLEditor/index.js.map +1 -0
  128. package/dist/components/SQLEditor/mocks/Monaco.js +23 -0
  129. package/dist/components/SQLEditor/mocks/Monaco.js.map +1 -0
  130. package/dist/components/SQLEditor/mocks/TextModel.js +22 -0
  131. package/dist/components/SQLEditor/mocks/TextModel.js.map +1 -0
  132. package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js +216 -0
  133. package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js.map +1 -0
  134. package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js +231 -0
  135. package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js.map +1 -0
  136. package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js +271 -0
  137. package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js.map +1 -0
  138. package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js +8 -0
  139. package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js.map +1 -0
  140. package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js +196 -0
  141. package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js.map +1 -0
  142. package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js +211 -0
  143. package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js.map +1 -0
  144. package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js +251 -0
  145. package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js.map +1 -0
  146. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js +386 -0
  147. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js.map +1 -0
  148. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js +416 -0
  149. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js.map +1 -0
  150. package/dist/components/SQLEditor/mocks/testData.js +22 -0
  151. package/dist/components/SQLEditor/mocks/testData.js.map +1 -0
  152. package/dist/components/SQLEditor/standardSql/definition.js +13 -0
  153. package/dist/components/SQLEditor/standardSql/definition.js.map +1 -0
  154. package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js +26 -0
  155. package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js.map +1 -0
  156. package/dist/components/SQLEditor/standardSql/getStatementPosition.js +24 -0
  157. package/dist/components/SQLEditor/standardSql/getStatementPosition.js.map +1 -0
  158. package/dist/components/SQLEditor/standardSql/language.js +875 -0
  159. package/dist/components/SQLEditor/standardSql/language.js.map +1 -0
  160. package/dist/components/SQLEditor/standardSql/macros.js +166 -0
  161. package/dist/components/SQLEditor/standardSql/macros.js.map +1 -0
  162. package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js +30 -0
  163. package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js.map +1 -0
  164. package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js +378 -0
  165. package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js.map +1 -0
  166. package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js +234 -0
  167. package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js.map +1 -0
  168. package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js +153 -0
  169. package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js.map +1 -0
  170. package/dist/components/SQLEditor/standardSql/types.js +3 -0
  171. package/dist/components/SQLEditor/standardSql/types.js.map +1 -0
  172. package/dist/components/SQLEditor/test-utils/index.js +11 -0
  173. package/dist/components/SQLEditor/test-utils/index.js.map +1 -0
  174. package/dist/components/SQLEditor/test-utils/statementPosition.js +40 -0
  175. package/dist/components/SQLEditor/test-utils/statementPosition.js.map +1 -0
  176. package/dist/components/SQLEditor/test-utils/types.js +3 -0
  177. package/dist/components/SQLEditor/test-utils/types.js.map +1 -0
  178. package/dist/components/SQLEditor/types.js +139 -0
  179. package/dist/components/SQLEditor/types.js.map +1 -0
  180. package/dist/components/SQLEditor/utils/LinkedToken.js +147 -0
  181. package/dist/components/SQLEditor/utils/LinkedToken.js.map +1 -0
  182. package/dist/components/SQLEditor/utils/commands.js +8 -0
  183. package/dist/components/SQLEditor/utils/commands.js.map +1 -0
  184. package/dist/components/SQLEditor/utils/debugger.js +14 -0
  185. package/dist/components/SQLEditor/utils/debugger.js.map +1 -0
  186. package/dist/components/SQLEditor/utils/getSuggestionKind.js +18 -0
  187. package/dist/components/SQLEditor/utils/getSuggestionKind.js.map +1 -0
  188. package/dist/components/SQLEditor/utils/linkedTokenBuilder.js +46 -0
  189. package/dist/components/SQLEditor/utils/linkedTokenBuilder.js.map +1 -0
  190. package/dist/components/SQLEditor/utils/toCompletionItem.js +10 -0
  191. package/dist/components/SQLEditor/utils/toCompletionItem.js.map +1 -0
  192. package/dist/components/SQLEditor/utils/tokenUtils.js +72 -0
  193. package/dist/components/SQLEditor/utils/tokenUtils.js.map +1 -0
  194. package/dist/components/SQLEditor/utils/types.js +3 -0
  195. package/dist/components/SQLEditor/utils/types.js.map +1 -0
  196. package/dist/components/Segment/Segment.js +2 -1
  197. package/dist/components/Segment/Segment.js.map +1 -1
  198. package/dist/components/VisualQueryBuilder/QueryModellerBase.js +35 -0
  199. package/dist/components/VisualQueryBuilder/QueryModellerBase.js.map +1 -0
  200. package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js +125 -0
  201. package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js.map +1 -0
  202. package/dist/components/VisualQueryBuilder/components/LabelFilters.js +37 -0
  203. package/dist/components/VisualQueryBuilder/components/LabelFilters.js.map +1 -0
  204. package/dist/components/VisualQueryBuilder/components/OperationEditor.js +41 -0
  205. package/dist/components/VisualQueryBuilder/components/OperationEditor.js.map +1 -0
  206. package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js +173 -0
  207. package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js.map +1 -0
  208. package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js +64 -0
  209. package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js.map +1 -0
  210. package/dist/components/VisualQueryBuilder/components/OperationHeader.js +67 -0
  211. package/dist/components/VisualQueryBuilder/components/OperationHeader.js.map +1 -0
  212. package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js +71 -0
  213. package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js.map +1 -0
  214. package/dist/components/VisualQueryBuilder/components/OperationList.js +129 -0
  215. package/dist/components/VisualQueryBuilder/components/OperationList.js.map +1 -0
  216. package/dist/components/VisualQueryBuilder/components/OperationListExplained.js +22 -0
  217. package/dist/components/VisualQueryBuilder/components/OperationListExplained.js.map +1 -0
  218. package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js +71 -0
  219. package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js.map +1 -0
  220. package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js +24 -0
  221. package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js.map +1 -0
  222. package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js +54 -0
  223. package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js.map +1 -0
  224. package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js +17 -0
  225. package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js.map +1 -0
  226. package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js +32 -0
  227. package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js.map +1 -0
  228. package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js +81 -0
  229. package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js.map +1 -0
  230. package/dist/components/VisualQueryBuilder/components/RawQuery.js +25 -0
  231. package/dist/components/VisualQueryBuilder/components/RawQuery.js.map +1 -0
  232. package/dist/components/VisualQueryBuilder/index.js +29 -0
  233. package/dist/components/VisualQueryBuilder/index.js.map +1 -0
  234. package/dist/components/VisualQueryBuilder/types.js +10 -0
  235. package/dist/components/VisualQueryBuilder/types.js.map +1 -0
  236. package/dist/components/index.js +2 -0
  237. package/dist/components/index.js.map +1 -1
  238. package/dist/datasource/SqlDatasource.js.map +1 -1
  239. package/dist/hooks/useDebounce.js +2 -0
  240. package/dist/hooks/useDebounce.js.map +1 -1
  241. package/dist/index.js +1 -7
  242. package/dist/index.js.map +1 -1
  243. package/dist/src/components/AsyncButtonCascader/AsyncButtonCascader.d.ts +5 -2
  244. package/dist/src/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.d.ts +8 -0
  245. package/dist/src/components/ConfigEditor/AdvancedSettings/index.d.ts +1 -0
  246. package/dist/src/components/ConfigEditor/Auth/Auth.d.ts +18 -0
  247. package/dist/src/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.d.ts +14 -0
  248. package/dist/src/components/ConfigEditor/Auth/auth-method/BasicAuth.d.ts +17 -0
  249. package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeader.d.ts +10 -0
  250. package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeaders.d.ts +8 -0
  251. package/dist/src/components/ConfigEditor/Auth/index.d.ts +4 -0
  252. package/dist/src/components/ConfigEditor/Auth/styles.d.ts +4 -0
  253. package/dist/src/components/ConfigEditor/Auth/tls/SelfSignedCertificate.d.ts +13 -0
  254. package/dist/src/components/ConfigEditor/Auth/tls/SkipTLSVerification.d.ts +7 -0
  255. package/dist/src/components/ConfigEditor/Auth/tls/TLSClientAuth.d.ts +20 -0
  256. package/dist/src/components/ConfigEditor/Auth/tls/TLSSettings.d.ts +11 -0
  257. package/dist/src/components/ConfigEditor/Auth/tls/TLSSettingsSection.d.ts +9 -0
  258. package/dist/src/components/ConfigEditor/Auth/types.d.ts +28 -0
  259. package/dist/src/components/ConfigEditor/Auth/utils.d.ts +12 -0
  260. package/dist/src/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.d.ts +8 -0
  261. package/dist/src/components/ConfigEditor/ConfigSection/ConfigSection.d.ts +5 -0
  262. package/dist/src/components/ConfigEditor/ConfigSection/ConfigSubSection.d.ts +5 -0
  263. package/dist/src/components/ConfigEditor/ConfigSection/GenericConfigSection.d.ts +10 -0
  264. package/dist/src/components/ConfigEditor/ConfigSection/index.d.ts +3 -0
  265. package/dist/src/components/ConfigEditor/Connection/ConnectionSettings.d.ts +13 -0
  266. package/dist/src/components/ConfigEditor/Connection/index.d.ts +1 -0
  267. package/dist/src/components/ConfigEditor/DataSourceDescription.d.ts +9 -0
  268. package/dist/src/components/ConfigEditor/SecureSocksProxyToggle.d.ts +4 -4
  269. package/dist/src/components/ConfigEditor/index.d.ts +7 -2
  270. package/dist/src/components/ConfigEditor/types.d.ts +3 -0
  271. package/dist/src/components/CustomHeadersSettings/CustomHeadersSettings.d.ts +2 -2
  272. package/dist/src/components/DataLinks/DataLink.d.ts +1 -1
  273. package/dist/src/components/Plugins/PluginSignatureBadge.d.ts +5 -2
  274. package/dist/src/components/QueryEditor/AccessoryButton.d.ts +2 -2
  275. package/dist/src/components/QueryEditor/DatasetSelector.d.ts +2 -2
  276. package/dist/src/components/QueryEditor/EditorField.d.ts +2 -1
  277. package/dist/src/components/QueryEditor/EditorFieldGroup.d.ts +2 -1
  278. package/dist/src/components/QueryEditor/EditorHeader.d.ts +2 -1
  279. package/dist/src/components/QueryEditor/EditorList.d.ts +1 -1
  280. package/dist/src/components/QueryEditor/EditorRow.d.ts +2 -1
  281. package/dist/src/components/QueryEditor/EditorRows.d.ts +2 -1
  282. package/dist/src/components/QueryEditor/EditorStack.d.ts +13 -0
  283. package/dist/src/components/QueryEditor/EditorSwitch.d.ts +2 -2
  284. package/dist/src/components/QueryEditor/FlexItem.d.ts +2 -2
  285. package/dist/src/components/QueryEditor/InputGroup.d.ts +7 -2
  286. package/dist/src/components/QueryEditor/RunQueryButton.d.ts +3 -3
  287. package/dist/src/components/QueryEditor/TableSelector.d.ts +2 -2
  288. package/dist/src/components/QueryEditor/index.d.ts +1 -1
  289. package/dist/src/components/QueryEditor/query-editor-raw/QueryEditorRaw.d.ts +1 -1
  290. package/dist/src/components/QueryEditor/types.d.ts +9 -14
  291. package/dist/src/components/QueryEditor/visual-query-builder/EditorField.d.ts +1 -1
  292. package/dist/src/components/QueryEditor/visual-query-builder/EditorRow.d.ts +2 -1
  293. package/dist/src/components/QueryEditor/visual-query-builder/EditorRows.d.ts +2 -1
  294. package/dist/src/components/QueryEditor/visual-query-builder/VisualEditor.d.ts +3 -4
  295. package/dist/src/components/SQLEditor/components/SQLEditor.d.ts +29 -0
  296. package/dist/src/components/SQLEditor/index.d.ts +7 -0
  297. package/dist/src/components/SQLEditor/mocks/Monaco.d.ts +3 -0
  298. package/dist/src/components/SQLEditor/mocks/TextModel.d.ts +7 -0
  299. package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQuery.d.ts +2 -0
  300. package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.d.ts +2 -0
  301. package/dist/src/components/SQLEditor/mocks/queries/multiLineMultipleColumns.d.ts +2 -0
  302. package/dist/src/components/SQLEditor/mocks/queries/singleLineEmptyQuery.d.ts +2 -0
  303. package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQuery.d.ts +2 -0
  304. package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.d.ts +2 -0
  305. package/dist/src/components/SQLEditor/mocks/queries/singleLineMultipleColumns.d.ts +2 -0
  306. package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueries.d.ts +2 -0
  307. package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.d.ts +2 -0
  308. package/dist/src/components/SQLEditor/mocks/testData.d.ts +9 -0
  309. package/dist/src/components/SQLEditor/standardSql/definition.d.ts +3 -0
  310. package/dist/src/components/SQLEditor/standardSql/getStandardSuggestions.d.ts +6 -0
  311. package/dist/src/components/SQLEditor/standardSql/getStatementPosition.d.ts +5 -0
  312. package/dist/src/components/SQLEditor/standardSql/language.d.ts +23 -0
  313. package/dist/src/components/SQLEditor/standardSql/macros.d.ts +2 -0
  314. package/dist/src/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.d.ts +4 -0
  315. package/dist/src/components/SQLEditor/standardSql/standardSuggestionsRegistry.d.ts +7 -0
  316. package/dist/src/components/SQLEditor/standardSql/statementPositionResolversRegistry.d.ts +2 -0
  317. package/dist/src/components/SQLEditor/standardSql/suggestionsKindRegistry.d.ts +7 -0
  318. package/dist/src/components/SQLEditor/standardSql/types.d.ts +33 -0
  319. package/dist/src/components/SQLEditor/test-utils/index.d.ts +7 -0
  320. package/dist/src/components/SQLEditor/test-utils/statementPosition.d.ts +3 -0
  321. package/dist/src/components/SQLEditor/test-utils/types.d.ts +12 -0
  322. package/dist/src/components/SQLEditor/types.d.ts +249 -0
  323. package/dist/src/components/SQLEditor/utils/LinkedToken.d.ts +29 -0
  324. package/dist/src/components/SQLEditor/utils/commands.d.ts +4 -0
  325. package/dist/src/components/SQLEditor/utils/debugger.d.ts +5 -0
  326. package/dist/src/components/SQLEditor/utils/getSuggestionKind.d.ts +7 -0
  327. package/dist/src/components/SQLEditor/utils/linkedTokenBuilder.d.ts +4 -0
  328. package/dist/src/components/SQLEditor/utils/toCompletionItem.d.ts +2 -0
  329. package/dist/src/components/SQLEditor/utils/tokenUtils.d.ts +14 -0
  330. package/dist/src/components/SQLEditor/utils/types.d.ts +11 -0
  331. package/dist/src/components/VisualQueryBuilder/QueryModellerBase.d.ts +18 -0
  332. package/dist/src/components/VisualQueryBuilder/components/LabelFilterItem.d.ts +18 -0
  333. package/dist/src/components/VisualQueryBuilder/components/LabelFilters.d.ts +14 -0
  334. package/dist/src/components/VisualQueryBuilder/components/OperationEditor.d.ts +19 -0
  335. package/dist/src/components/VisualQueryBuilder/components/OperationEditorBody.d.ts +22 -0
  336. package/dist/src/components/VisualQueryBuilder/components/OperationExplainedBox.d.ts +7 -0
  337. package/dist/src/components/VisualQueryBuilder/components/OperationHeader.d.ts +14 -0
  338. package/dist/src/components/VisualQueryBuilder/components/OperationInfoButton.d.ts +9 -0
  339. package/dist/src/components/VisualQueryBuilder/components/OperationList.d.ts +15 -0
  340. package/dist/src/components/VisualQueryBuilder/components/OperationListExplained.d.ts +17 -0
  341. package/dist/src/components/VisualQueryBuilder/components/OperationParamEditor.d.ts +4 -0
  342. package/dist/src/components/VisualQueryBuilder/components/OperationsEditorRow.d.ts +2 -0
  343. package/dist/src/components/VisualQueryBuilder/components/QueryBuilderHints.d.ts +20 -0
  344. package/dist/src/components/VisualQueryBuilder/components/QueryEditorModeToggle.d.ts +8 -0
  345. package/dist/src/components/VisualQueryBuilder/components/QueryHeaderSwitch.d.ts +7 -0
  346. package/dist/src/components/VisualQueryBuilder/components/QueryOptionGroup.d.ts +9 -0
  347. package/dist/src/components/VisualQueryBuilder/components/RawQuery.d.ts +12 -0
  348. package/dist/src/components/VisualQueryBuilder/index.d.ts +13 -0
  349. package/dist/src/components/VisualQueryBuilder/types.d.ts +89 -0
  350. package/dist/src/components/index.d.ts +5 -3
  351. package/dist/src/datasource/SqlDatasource.d.ts +3 -6
  352. package/dist/src/index.d.ts +0 -4
  353. package/dist/src/utils/changeset/functions.d.ts +1 -1
  354. package/dist/test/mocks/Datasource.js +1 -1
  355. package/dist/test/mocks/Datasource.js.map +1 -1
  356. package/dist/test/mocks/Plugin.js +2 -11
  357. package/dist/test/mocks/Plugin.js.map +1 -1
  358. package/dist/test/mocks/QueryEditorProps.js +0 -1
  359. package/dist/test/mocks/QueryEditorProps.js.map +1 -1
  360. package/dist/test/mocks/utils.js.map +1 -1
  361. package/dist/utils/changeset/functions.js +1 -1
  362. package/dist/utils/changeset/functions.js.map +1 -1
  363. package/dist/utils/changeset/index.js +20 -20
  364. package/dist/utils/changeset/index.js.map +1 -1
  365. package/package.json +41 -14
  366. package/CHANGELOG.md +0 -25
  367. package/dist/8x/fixtures/index.js +0 -7
  368. package/dist/8x/fixtures/index.js.map +0 -1
  369. package/dist/8x/fixtures/select.js +0 -43
  370. package/dist/8x/fixtures/select.js.map +0 -1
  371. package/dist/8x/index.js +0 -5
  372. package/dist/8x/index.js.map +0 -1
  373. package/dist/components/ConfigEditor/InlineLabel.js +0 -24
  374. package/dist/components/ConfigEditor/InlineLabel.js.map +0 -1
  375. package/dist/components/QueryEditor/ErrorBoundary.js +0 -23
  376. package/dist/components/QueryEditor/ErrorBoundary.js.map +0 -1
  377. package/dist/components/QueryEditor/Stack.js +0 -27
  378. package/dist/components/QueryEditor/Stack.js.map +0 -1
  379. package/dist/components/QueryEditor/visual-query-builder/Stack.js +0 -27
  380. package/dist/components/QueryEditor/visual-query-builder/Stack.js.map +0 -1
  381. package/dist/src/8x/fixtures/index.d.ts +0 -1
  382. package/dist/src/8x/fixtures/select.d.ts +0 -11
  383. package/dist/src/8x/index.d.ts +0 -1
  384. package/dist/src/components/ConfigEditor/InlineLabel.d.ts +0 -7
  385. package/dist/src/components/QueryEditor/ErrorBoundary.d.ts +0 -14
  386. package/dist/src/components/QueryEditor/Stack.d.ts +0 -9
  387. package/dist/src/components/QueryEditor/visual-query-builder/Stack.d.ts +0 -9
  388. package/dist/src/test/mocks/TestDatasource.d.ts +0 -6
  389. package/dist/src/test/mocks/style.d.ts +0 -1
  390. package/dist/src/test/setupTests.d.ts +0 -1
  391. package/dist/src/unreleasedComponents/SecretInput.d.ts +0 -15
  392. package/dist/src/unreleasedComponents/SecretTextarea.d.ts +0 -19
  393. package/dist/src/unreleasedComponents/index.d.ts +0 -2
  394. package/dist/src/utils/compatFeatures.d.ts +0 -9
  395. package/dist/src/utils/compatibility.d.ts +0 -13
  396. package/dist/src/utils/index.d.ts +0 -3
  397. package/dist/src/utils/testDatasource.d.ts +0 -19
  398. package/dist/test/mocks/TestDatasource.js +0 -24
  399. package/dist/test/mocks/TestDatasource.js.map +0 -1
  400. package/dist/test/mocks/style.js +0 -5
  401. package/dist/test/mocks/style.js.map +0 -1
  402. package/dist/test/setupTests.js +0 -17
  403. package/dist/test/setupTests.js.map +0 -1
  404. package/dist/unreleasedComponents/SecretInput.js +0 -21
  405. package/dist/unreleasedComponents/SecretInput.js.map +0 -1
  406. package/dist/unreleasedComponents/SecretTextarea.js +0 -36
  407. package/dist/unreleasedComponents/SecretTextarea.js.map +0 -1
  408. package/dist/unreleasedComponents/index.js +0 -9
  409. package/dist/unreleasedComponents/index.js.map +0 -1
  410. package/dist/utils/compatFeatures.js +0 -20
  411. package/dist/utils/compatFeatures.js.map +0 -1
  412. package/dist/utils/compatibility.js +0 -31
  413. package/dist/utils/compatibility.js.map +0 -1
  414. package/dist/utils/index.js +0 -8
  415. package/dist/utils/index.js.map +0 -1
  416. package/dist/utils/testDatasource.js +0 -30
  417. package/dist/utils/testDatasource.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"InlineLabel.js","sourceRoot":"","sources":["../../../src/components/ConfigEditor/InlineLabel.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,sCAAmC;AACnC,oCAA4E;AAMrE,MAAM,WAAW,GAAoB,CAAC,EAI5C,EAAE,EAAE;QAJwC,EAC3C,QAAQ,EACR,QAAQ,GAAG,KAAK,OAEjB,EADI,KAAK,sBAHmC,wBAI5C,CADS;IAER,MAAM,KAAK,GAAG,IAAA,cAAS,GAAE,CAAC;IAE1B,MAAM,MAAM,GAAG;QACb,QAAQ,EAAE,IAAA,SAAG,EAAA;eACF,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI;KACjC;KACF,CAAC;IAEF,OAAO,CACL,8BAAC,gBAAmB,oBAAK,KAAK;QAC5B;YACG,QAAQ;YACR,QAAQ,IAAI,CACX;;gBACQ,wCAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,QAAU,CAC/C,CACJ,CACI,CACa,CACvB,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,WAAW,eAyBtB"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ErrorBoundary = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- class ErrorBoundary extends react_1.default.Component {
7
- constructor(props) {
8
- super(props);
9
- this.state = { hasError: false };
10
- }
11
- static getDerivedStateFromError() {
12
- return { hasError: true };
13
- }
14
- render() {
15
- if (this.state.hasError) {
16
- const FallBack = this.props.fallBackComponent || react_1.default.createElement("div", null, "Error");
17
- return FallBack;
18
- }
19
- return this.props.children;
20
- }
21
- }
22
- exports.ErrorBoundary = ErrorBoundary;
23
- //# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/QueryEditor/ErrorBoundary.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAM1B,MAAa,aAAc,SAAQ,eAAK,CAAC,SAAuC;IAC9E,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,wBAAwB;QAC7B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,IAAI,mDAAgB,CAAC;YAClE,OAAO,QAAQ,CAAC;SACjB;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF;AAlBD,sCAkBC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Stack = void 0;
4
- const tslib_1 = require("tslib");
5
- const css_1 = require("@emotion/css");
6
- const react_1 = tslib_1.__importDefault(require("react"));
7
- const ui_1 = require("@grafana/ui");
8
- const Stack = (_a) => {
9
- var { children } = _a, props = tslib_1.__rest(_a, ["children"]);
10
- const theme = (0, ui_1.useTheme2)();
11
- const styles = useStyles(theme, props);
12
- return react_1.default.createElement("div", { className: styles.root }, children);
13
- };
14
- exports.Stack = Stack;
15
- const useStyles = (0, ui_1.stylesFactory)((theme, props) => {
16
- var _a, _b, _c;
17
- return ({
18
- root: (0, css_1.css)({
19
- display: 'flex',
20
- flexDirection: (_a = props.direction) !== null && _a !== void 0 ? _a : 'row',
21
- flexWrap: ((_b = props.wrap) !== null && _b !== void 0 ? _b : true) ? 'wrap' : undefined,
22
- alignItems: props.alignItems,
23
- gap: theme.spacing((_c = props.gap) !== null && _c !== void 0 ? _c : 2),
24
- }),
25
- });
26
- });
27
- //# sourceMappingURL=Stack.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stack.js","sourceRoot":"","sources":["../../../src/components/QueryEditor/Stack.tsx"],"names":[],"mappings":";;;;AAAA,sCAAmC;AACnC,0DAA6C;AAG7C,oCAAuD;AAShD,MAAM,KAAK,GAAyB,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAApB,YAAsB,CAAF;IAC9D,MAAM,KAAK,GAAG,IAAA,cAAS,GAAE,CAAC;IAC1B,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAEvC,OAAO,uCAAK,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,QAAQ,CAAO,CAAC;AACvD,CAAC,CAAC;AALW,QAAA,KAAK,SAKhB;AAEF,MAAM,SAAS,GAAG,IAAA,kBAAa,EAAC,CAAC,KAAoB,EAAE,KAAiB,EAAE,EAAE;;IAAC,OAAA,CAAC;QAC5E,IAAI,EAAE,IAAA,SAAG,EAAC;YACR,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK;YACvC,QAAQ,EAAE,CAAA,MAAA,KAAK,CAAC,IAAI,mCAAI,IAAI,EAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACjD,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,MAAA,KAAK,CAAC,GAAG,mCAAI,CAAC,CAAC;SACnC,CAAC;KACH,CAAC,CAAA;CAAA,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Stack = void 0;
4
- const tslib_1 = require("tslib");
5
- const css_1 = require("@emotion/css");
6
- const react_1 = tslib_1.__importDefault(require("react"));
7
- const ui_1 = require("@grafana/ui");
8
- const Stack = (_a) => {
9
- var { children } = _a, props = tslib_1.__rest(_a, ["children"]);
10
- const theme = (0, ui_1.useTheme2)();
11
- const styles = useStyles(theme, props);
12
- return react_1.default.createElement("div", { className: styles.root }, children);
13
- };
14
- exports.Stack = Stack;
15
- const useStyles = (0, ui_1.stylesFactory)((theme, props) => {
16
- var _a, _b, _c;
17
- return ({
18
- root: (0, css_1.css)({
19
- display: 'flex',
20
- flexDirection: (_a = props.direction) !== null && _a !== void 0 ? _a : 'row',
21
- flexWrap: ((_b = props.wrap) !== null && _b !== void 0 ? _b : true) ? 'wrap' : undefined,
22
- alignItems: props.alignItems,
23
- gap: theme.spacing((_c = props.gap) !== null && _c !== void 0 ? _c : 2),
24
- }),
25
- });
26
- });
27
- //# sourceMappingURL=Stack.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stack.js","sourceRoot":"","sources":["../../../../src/components/QueryEditor/visual-query-builder/Stack.tsx"],"names":[],"mappings":";;;;AAAA,sCAAmC;AACnC,0DAA6C;AAG7C,oCAAuD;AAShD,MAAM,KAAK,GAAyB,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAApB,YAAsB,CAAF;IAC9D,MAAM,KAAK,GAAG,IAAA,cAAS,GAAE,CAAC;IAC1B,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAEvC,OAAO,uCAAK,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,QAAQ,CAAO,CAAC;AACvD,CAAC,CAAC;AALW,QAAA,KAAK,SAKhB;AAEF,MAAM,SAAS,GAAG,IAAA,kBAAa,EAAC,CAAC,KAAoB,EAAE,KAAiB,EAAE,EAAE;;IAAC,OAAA,CAAC;QAC5E,IAAI,EAAE,IAAA,SAAG,EAAC;YACR,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK;YACvC,QAAQ,EAAE,CAAA,MAAA,KAAK,CAAC,IAAI,mCAAI,IAAI,EAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACjD,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,MAAA,KAAK,CAAC,GAAG,mCAAI,CAAC,CAAC;SACnC,CAAC;KACH,CAAC,CAAA;CAAA,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export { selectOption, generateOptions } from './select';
@@ -1,11 +0,0 @@
1
- import { SelectableValue } from '@grafana/data';
2
- export declare const generateOptions: () => Array<SelectableValue<string>>;
3
- /**
4
- * react-select (used by @grafana/ui) renders very differently from the native Select HTML element
5
- * and because they do not pass data-testid down, it is difficult to grab the
6
- * correct element and simulate selecting different options
7
- * created a helper function to click and select a different option manually
8
- * @param optionLabel
9
- * @param index If there are multiple inputs and you don't want the first one taken, then pass in the index
10
- */
11
- export declare const selectOption: (optionLabel: string, index?: number, role?: string) => Promise<void>;
@@ -1 +0,0 @@
1
- export * from './fixtures';
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import { InlineLabel as OriginalInlineLabel } from "@grafana/ui";
3
- type Props = React.ComponentProps<typeof OriginalInlineLabel> & {
4
- required?: boolean;
5
- };
6
- export declare const InlineLabel: React.FC<Props>;
7
- export {};
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- type Props = {
3
- fallBackComponent?: React.ReactNode;
4
- };
5
- export declare class ErrorBoundary extends React.Component<Props, {
6
- hasError: boolean;
7
- }> {
8
- constructor(props: Props);
9
- static getDerivedStateFromError(): {
10
- hasError: boolean;
11
- };
12
- render(): React.ReactNode;
13
- }
14
- export {};
@@ -1,9 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- interface StackProps {
3
- direction?: CSSProperties['flexDirection'];
4
- alignItems?: CSSProperties['alignItems'];
5
- wrap?: boolean;
6
- gap?: number;
7
- }
8
- export declare const Stack: React.FC<StackProps>;
9
- export {};
@@ -1,9 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- interface StackProps {
3
- direction?: CSSProperties['flexDirection'];
4
- alignItems?: CSSProperties['alignItems'];
5
- wrap?: boolean;
6
- gap?: number;
7
- }
8
- export declare const Stack: React.FC<StackProps>;
9
- export {};
@@ -1,6 +0,0 @@
1
- import { HealthCheckResult } from "@grafana/runtime";
2
- import { HealthCheckError, HealthCheckResultDetails, TestDatasourceReturn } from "../../utils/testDatasource";
3
- export declare const mockTestDatasourceReturn: () => TestDatasourceReturn;
4
- export declare const mockHealthCheckResult: () => HealthCheckResult;
5
- export declare const mockHealthCheckDetails: () => HealthCheckResultDetails;
6
- export declare const mockHealthCheckResultError: (details?: HealthCheckResultDetails) => HealthCheckError;
@@ -1 +0,0 @@
1
- export declare const style = "style";
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom';
@@ -1,15 +0,0 @@
1
- /**
2
- * Copy & paste from https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/SecretInput/SecretInput.tsx
3
- * Available starting from @grafana/ui 9.2
4
- */
5
- import * as React from "react";
6
- import { Input } from "@grafana/ui";
7
- export type Props = React.ComponentProps<typeof Input> & {
8
- /** TRUE if the secret was already configured. (It is needed as often the backend doesn't send back the actual secret, only the information that it was configured) */
9
- isConfigured: boolean;
10
- /** Called when the user clicks on the "Reset" button in order to clear the secret */
11
- onReset: () => void;
12
- };
13
- export declare const CONFIGURED_TEXT = "configured";
14
- export declare const RESET_BUTTON_TEXT = "Reset";
15
- export declare const SecretInput: ({ isConfigured, onReset, ...props }: Props) => JSX.Element;
@@ -1,19 +0,0 @@
1
- /**
2
- * Copy & paste from https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/SecretTextArea/SecretTextArea.tsx
3
- * Available starting from @grafana/ui 9.2
4
- */
5
- import * as React from "react";
6
- import { TextArea } from "@grafana/ui";
7
- export type Props = React.ComponentProps<typeof TextArea> & {
8
- /** TRUE if the secret was already configured. (It is needed as often the backend doesn't send back the actual secret, only the information that it was configured) */
9
- isConfigured: boolean;
10
- /** Called when the user clicks on the "Reset" button in order to clear the secret */
11
- onReset: () => void;
12
- };
13
- export declare const CONFIGURED_TEXT = "configured";
14
- export declare const RESET_BUTTON_TEXT = "Reset";
15
- /**
16
- * Text area that does not disclose an already configured value but lets the user reset the current value and enter a new one.
17
- * Typically useful for asymmetric cryptography keys.
18
- */
19
- export declare const SecretTextArea: ({ isConfigured, onReset, ...props }: Props) => JSX.Element;
@@ -1,2 +0,0 @@
1
- export { SecretInput } from "./SecretInput";
2
- export { SecretTextArea } from "./SecretTextarea";
@@ -1,9 +0,0 @@
1
- import { BaseTestDatasource, TestDatasourceReturn } from "./testDatasource";
2
- /**
3
- * Calls the override testDatasource function for backwards compatibility if needed.
4
- *
5
- * @param baseTestDatasource The original testDatasource function
6
- * @param toggle Accepts a feature toggle. Defaults to false so it is clear when we want this feature turned on.
7
- * @returns The result in the expected format for the Grafana version
8
- */
9
- export declare const healthDiagnosticsErrorsCompat: (baseTestDatasource: BaseTestDatasource, toggle?: boolean) => Promise<TestDatasourceReturn>;
@@ -1,13 +0,0 @@
1
- export declare enum CompatibilityFeature {
2
- HEALTH_DIAGNOSTICS_ERRORS = 0,
3
- SECURE_SOCKS_PROXY = 1
4
- }
5
- /**
6
- * Checks if the currently running version of Grafana supports the feature.
7
- *
8
- * Enables graceful degradation for earlier versions that don't support a given capability.
9
- *
10
- * @param feature The feature that requires backwards compatibility
11
- * @returns True if the Grafana version running can support the feature, otherwise false
12
- */
13
- export declare const hasCompatibility: (feature: CompatibilityFeature) => boolean;
@@ -1,3 +0,0 @@
1
- export * from "./compatibility";
2
- export * from "./compatFeatures";
3
- export * as compatFeatures from "./compatFeatures";
@@ -1,19 +0,0 @@
1
- import { HealthCheckResult } from '@grafana/runtime';
2
- export type HealthCheckResultDetails = Record<string, any> | undefined;
3
- export declare class HealthCheckError extends Error {
4
- details: HealthCheckResultDetails;
5
- constructor(message: string, details: HealthCheckResultDetails);
6
- }
7
- export type TestDatasourceReturn = Partial<HealthCheckResult> | Error;
8
- export type BaseTestDatasource = () => Promise<TestDatasourceReturn>;
9
- /**
10
- * Override function for testDatasource in Grafana for the health check
11
- *
12
- * There is a new error format that is introduced in Grafana 8 which is not backwards compatible by default
13
- *
14
- * This transforms the health check result into the old format if Grafana <8 is being used
15
- *
16
- * @param baseTestDatasource The original testDatasource function
17
- * @returns Either the health check result if the health check was successful or an error that is handled later by Grafana
18
- */
19
- export declare const testDatasource: (baseTestDatasource: BaseTestDatasource) => Promise<TestDatasourceReturn>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mockHealthCheckResultError = exports.mockHealthCheckDetails = exports.mockHealthCheckResult = exports.mockTestDatasourceReturn = void 0;
4
- const runtime_1 = require("@grafana/runtime");
5
- const chance_1 = require("chance");
6
- const testDatasource_1 = require("../../utils/testDatasource");
7
- const mockTestDatasourceReturn = () => {
8
- return (0, chance_1.Chance)().pickone([(0, exports.mockHealthCheckResult)(), (0, exports.mockHealthCheckResultError)()]);
9
- };
10
- exports.mockTestDatasourceReturn = mockTestDatasourceReturn;
11
- const mockHealthCheckResult = () => ({
12
- status: (0, chance_1.Chance)().pickone(Object.values(runtime_1.HealthStatus)),
13
- message: (0, chance_1.Chance)().sentence(),
14
- details: (0, exports.mockHealthCheckDetails)()
15
- });
16
- exports.mockHealthCheckResult = mockHealthCheckResult;
17
- const mockHealthCheckDetails = () => ({
18
- message: (0, chance_1.Chance)().sentence(),
19
- verboseMessage: (0, chance_1.Chance)().sentence()
20
- });
21
- exports.mockHealthCheckDetails = mockHealthCheckDetails;
22
- const mockHealthCheckResultError = (details) => new testDatasource_1.HealthCheckError((0, chance_1.Chance)().sentence(), details || (0, exports.mockHealthCheckDetails)());
23
- exports.mockHealthCheckResultError = mockHealthCheckResultError;
24
- //# sourceMappingURL=TestDatasource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestDatasource.js","sourceRoot":"","sources":["../../../src/test/mocks/TestDatasource.ts"],"names":[],"mappings":";;;AAAA,8CAAkE;AAClE,mCAA+B;AAC/B,+DAA6G;AAEtG,MAAM,wBAAwB,GAAG,GAAyB,EAAE;IACjE,OAAO,IAAA,eAAM,GAAE,CAAC,OAAO,CAAC,CAAC,IAAA,6BAAqB,GAAE,EAAE,IAAA,kCAA0B,GAAE,CAAC,CAAC,CAAA;AAClF,CAAC,CAAA;AAFY,QAAA,wBAAwB,4BAEpC;AAEM,MAAM,qBAAqB,GAAG,GAAsB,EAAE,CAAC,CAAC;IAC7D,MAAM,EAAE,IAAA,eAAM,GAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,sBAAY,CAAC,CAAC;IACrD,OAAO,EAAE,IAAA,eAAM,GAAE,CAAC,QAAQ,EAAE;IAC5B,OAAO,EAAE,IAAA,8BAAsB,GAAE;CAClC,CAAC,CAAA;AAJW,QAAA,qBAAqB,yBAIhC;AAEK,MAAM,sBAAsB,GAAG,GAA6B,EAAE,CAAC,CAAC;IACrE,OAAO,EAAE,IAAA,eAAM,GAAE,CAAC,QAAQ,EAAE;IAC5B,cAAc,EAAE,IAAA,eAAM,GAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAA;AAHW,QAAA,sBAAsB,0BAGjC;AAEK,MAAM,0BAA0B,GAAG,CAAC,OAAkC,EAAoB,EAAE,CACjG,IAAI,iCAAgB,CAAC,IAAA,eAAM,GAAE,CAAC,QAAQ,EAAE,EAAE,OAAO,IAAI,IAAA,8BAAsB,GAAE,CAAC,CAAA;AADnE,QAAA,0BAA0B,8BACyC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.style = void 0;
4
- exports.style = 'style';
5
- //# sourceMappingURL=style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/test/mocks/style.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAAG,OAAO,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("@testing-library/jest-dom");
4
- Object.defineProperty(global, 'matchMedia', {
5
- writable: true,
6
- value: jest.fn().mockImplementation((query) => ({
7
- matches: false,
8
- media: query,
9
- onchange: null,
10
- addListener: jest.fn(),
11
- removeListener: jest.fn(),
12
- addEventListener: jest.fn(),
13
- removeEventListener: jest.fn(),
14
- dispatchEvent: jest.fn(),
15
- })),
16
- });
17
- //# sourceMappingURL=setupTests.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/test/setupTests.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AAEnC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE;IACxC,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC9C,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;QACtB,cAAc,EAAE,IAAI,CAAC,EAAE,EAAE;QACzB,gBAAgB,EAAE,IAAI,CAAC,EAAE,EAAE;QAC3B,mBAAmB,EAAE,IAAI,CAAC,EAAE,EAAE;QAC9B,aAAa,EAAE,IAAI,CAAC,EAAE,EAAE;KACzB,CAAC,CAAC;CACJ,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copy & paste from https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/SecretInput/SecretInput.tsx
4
- * Available starting from @grafana/ui 9.2
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SecretInput = exports.RESET_BUTTON_TEXT = exports.CONFIGURED_TEXT = void 0;
8
- const tslib_1 = require("tslib");
9
- const React = tslib_1.__importStar(require("react"));
10
- const ui_1 = require("@grafana/ui");
11
- exports.CONFIGURED_TEXT = "configured";
12
- exports.RESET_BUTTON_TEXT = "Reset";
13
- const SecretInput = (_a) => {
14
- var { isConfigured, onReset } = _a, props = tslib_1.__rest(_a, ["isConfigured", "onReset"]);
15
- return (React.createElement(ui_1.HorizontalGroup, null,
16
- !isConfigured && React.createElement(ui_1.Input, Object.assign({}, props, { type: "password" })),
17
- isConfigured && (React.createElement(ui_1.Input, Object.assign({}, props, { type: "text", disabled: true, value: exports.CONFIGURED_TEXT }))),
18
- isConfigured && (React.createElement(ui_1.Button, { onClick: onReset, variant: "secondary" }, exports.RESET_BUTTON_TEXT))));
19
- };
20
- exports.SecretInput = SecretInput;
21
- //# sourceMappingURL=SecretInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SecretInput.js","sourceRoot":"","sources":["../../src/unreleasedComponents/SecretInput.tsx"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,qDAA+B;AAC/B,oCAA6D;AAShD,QAAA,eAAe,GAAG,YAAY,CAAC;AAC/B,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAElC,MAAM,WAAW,GAAG,CAAC,EAA0C,EAAE,EAAE;QAA9C,EAAE,YAAY,EAAE,OAAO,OAAmB,EAAd,KAAK,sBAAjC,2BAAmC,CAAF;IAAc,OAAA,CACzE,oBAAC,oBAAe;QACb,CAAC,YAAY,IAAI,oBAAC,UAAK,oBAAK,KAAK,IAAE,IAAI,EAAC,UAAU,IAAG;QACrD,YAAY,IAAI,CACf,oBAAC,UAAK,oBAAK,KAAK,IAAE,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,uBAAe,IAAI,CACzE;QACA,YAAY,IAAI,CACf,oBAAC,WAAM,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAC,WAAW,IAC1C,yBAAiB,CACX,CACV,CACe,CACnB,CAAA;CAAA,CAAC;AAZW,QAAA,WAAW,eAYtB"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copy & paste from https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/SecretTextArea/SecretTextArea.tsx
4
- * Available starting from @grafana/ui 9.2
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SecretTextArea = exports.RESET_BUTTON_TEXT = exports.CONFIGURED_TEXT = void 0;
8
- const tslib_1 = require("tslib");
9
- const css_1 = require("@emotion/css");
10
- const React = tslib_1.__importStar(require("react"));
11
- const ui_1 = require("@grafana/ui");
12
- exports.CONFIGURED_TEXT = "configured";
13
- exports.RESET_BUTTON_TEXT = "Reset";
14
- const getStyles = (theme) => {
15
- return {
16
- configuredStyle: (0, css_1.css) `
17
- min-height: ${theme.spacing(theme.components.height.md)};
18
- padding-top: ${theme.spacing(0.5) /** Needed to mimic vertically centered text in an input box */};
19
- resize: none;
20
- `,
21
- };
22
- };
23
- /**
24
- * Text area that does not disclose an already configured value but lets the user reset the current value and enter a new one.
25
- * Typically useful for asymmetric cryptography keys.
26
- */
27
- const SecretTextArea = (_a) => {
28
- var { isConfigured, onReset } = _a, props = tslib_1.__rest(_a, ["isConfigured", "onReset"]);
29
- const styles = (0, ui_1.useStyles2)(getStyles);
30
- return (React.createElement(ui_1.HorizontalGroup, null,
31
- !isConfigured && React.createElement(ui_1.TextArea, Object.assign({}, props)),
32
- isConfigured && (React.createElement(ui_1.TextArea, Object.assign({}, props, { rows: 1, disabled: true, value: exports.CONFIGURED_TEXT, className: (0, css_1.cx)(styles.configuredStyle) }))),
33
- isConfigured && (React.createElement(ui_1.Button, { onClick: onReset, variant: "secondary" }, exports.RESET_BUTTON_TEXT))));
34
- };
35
- exports.SecretTextArea = SecretTextArea;
36
- //# sourceMappingURL=SecretTextarea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SecretTextarea.js","sourceRoot":"","sources":["../../src/unreleasedComponents/SecretTextarea.tsx"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,sCAAuC;AACvC,qDAA+B;AAG/B,oCAA4E;AAS/D,QAAA,eAAe,GAAG,YAAY,CAAC;AAC/B,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE;IACzC,OAAO;QACL,eAAe,EAAE,IAAA,SAAG,EAAA;oBACJ,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;qBAErD,KAAK,CAAC,OAAO,CACX,GAAG,CACJ,CAAC,+DACJ;;KAED;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,EAA0C,EAAE,EAAE;QAA9C,EAAE,YAAY,EAAE,OAAO,OAAmB,EAAd,KAAK,sBAAjC,2BAAmC,CAAF;IAC9D,MAAM,MAAM,GAAG,IAAA,eAAU,EAAC,SAAS,CAAC,CAAC;IACrC,OAAO,CACL,oBAAC,oBAAe;QACb,CAAC,YAAY,IAAI,oBAAC,aAAQ,oBAAK,KAAK,EAAI;QACxC,YAAY,IAAI,CACf,oBAAC,aAAQ,oBACH,KAAK,IACT,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,IAAI,EACd,KAAK,EAAE,uBAAe,EACtB,SAAS,EAAE,IAAA,QAAE,EAAC,MAAM,CAAC,eAAe,CAAC,IACrC,CACH;QACA,YAAY,IAAI,CACf,oBAAC,WAAM,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAC,WAAW,IAC1C,yBAAiB,CACX,CACV,CACe,CACnB,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,cAAc,kBAqBzB"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SecretTextArea = exports.SecretInput = void 0;
4
- // noop for when there are no components here
5
- var SecretInput_1 = require("./SecretInput");
6
- Object.defineProperty(exports, "SecretInput", { enumerable: true, get: function () { return SecretInput_1.SecretInput; } });
7
- var SecretTextarea_1 = require("./SecretTextarea");
8
- Object.defineProperty(exports, "SecretTextArea", { enumerable: true, get: function () { return SecretTextarea_1.SecretTextArea; } });
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unreleasedComponents/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.healthDiagnosticsErrorsCompat = void 0;
4
- const compatibility_1 = require("./compatibility");
5
- const testDatasource_1 = require("./testDatasource");
6
- /**
7
- * Calls the override testDatasource function for backwards compatibility if needed.
8
- *
9
- * @param baseTestDatasource The original testDatasource function
10
- * @param toggle Accepts a feature toggle. Defaults to false so it is clear when we want this feature turned on.
11
- * @returns The result in the expected format for the Grafana version
12
- */
13
- const healthDiagnosticsErrorsCompat = (baseTestDatasource, toggle) => {
14
- if (toggle && (0, compatibility_1.hasCompatibility)(compatibility_1.CompatibilityFeature.HEALTH_DIAGNOSTICS_ERRORS)) {
15
- return baseTestDatasource();
16
- }
17
- return (0, testDatasource_1.testDatasource)(baseTestDatasource);
18
- };
19
- exports.healthDiagnosticsErrorsCompat = healthDiagnosticsErrorsCompat;
20
- //# sourceMappingURL=compatFeatures.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compatFeatures.js","sourceRoot":"","sources":["../../src/utils/compatFeatures.ts"],"names":[],"mappings":";;;AAAA,mDAAyE;AACzE,qDAA4F;AAE5F;;;;;;GAMG;AACI,MAAM,6BAA6B,GAAG,CAAC,kBAAsC,EAAE,MAAgB,EAAiC,EAAE;IACvI,IAAI,MAAM,IAAI,IAAA,gCAAgB,EAAC,oCAAoB,CAAC,yBAAyB,CAAC,EAAE;QAC9E,OAAO,kBAAkB,EAAE,CAAA;KAC5B;IAED,OAAO,IAAA,+BAAc,EAAC,kBAAkB,CAAC,CAAC;AAC5C,CAAC,CAAC;AANW,QAAA,6BAA6B,iCAMxC"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasCompatibility = exports.CompatibilityFeature = void 0;
4
- const runtime_1 = require("@grafana/runtime");
5
- const semver_1 = require("semver");
6
- var CompatibilityFeature;
7
- (function (CompatibilityFeature) {
8
- CompatibilityFeature[CompatibilityFeature["HEALTH_DIAGNOSTICS_ERRORS"] = 0] = "HEALTH_DIAGNOSTICS_ERRORS";
9
- CompatibilityFeature[CompatibilityFeature["SECURE_SOCKS_PROXY"] = 1] = "SECURE_SOCKS_PROXY";
10
- })(CompatibilityFeature = exports.CompatibilityFeature || (exports.CompatibilityFeature = {}));
11
- /**
12
- * Checks if the currently running version of Grafana supports the feature.
13
- *
14
- * Enables graceful degradation for earlier versions that don't support a given capability.
15
- *
16
- * @param feature The feature that requires backwards compatibility
17
- * @returns True if the Grafana version running can support the feature, otherwise false
18
- */
19
- const hasCompatibility = (feature) => {
20
- const version = runtime_1.config.buildInfo.version;
21
- switch (feature) {
22
- case CompatibilityFeature.HEALTH_DIAGNOSTICS_ERRORS:
23
- return (0, semver_1.gte)(version, "8.0.0");
24
- case CompatibilityFeature.SECURE_SOCKS_PROXY:
25
- return (0, semver_1.gte)(version, "10.0.0");
26
- default:
27
- return false;
28
- }
29
- };
30
- exports.hasCompatibility = hasCompatibility;
31
- //# sourceMappingURL=compatibility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../../src/utils/compatibility.ts"],"names":[],"mappings":";;;AAAA,8CAA0C;AAC1C,mCAA6B;AAE7B,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,yGAAyB,CAAA;IACzB,2FAAkB,CAAA;AACpB,CAAC,EAHW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAG/B;AAED;;;;;;;GAOG;AACK,MAAM,gBAAgB,GAAG,CAAC,OAA6B,EAAW,EAAE;IAC1E,MAAM,OAAO,GAAG,gBAAM,CAAC,SAAS,CAAC,OAAO,CAAC;IAEzC,QAAQ,OAAO,EAAE;QACf,KAAK,oBAAoB,CAAC,yBAAyB;YACjD,OAAO,IAAA,YAAG,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/B,KAAK,oBAAoB,CAAC,kBAAkB;YAC1C,OAAO,IAAA,YAAG,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChC;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAC;AAXY,QAAA,gBAAgB,oBAW5B"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compatFeatures = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./compatibility"), exports);
6
- tslib_1.__exportStar(require("./compatFeatures"), exports);
7
- exports.compatFeatures = tslib_1.__importStar(require("./compatFeatures"));
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;AAAA,0DAA+B;AAC/B,2DAAgC;AAChC,2EAAkD"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.testDatasource = exports.HealthCheckError = void 0;
4
- class HealthCheckError extends Error {
5
- constructor(message, details) {
6
- super(message);
7
- this.details = details;
8
- this.name = 'HealthCheckError';
9
- }
10
- }
11
- exports.HealthCheckError = HealthCheckError;
12
- /**
13
- * Override function for testDatasource in Grafana for the health check
14
- *
15
- * There is a new error format that is introduced in Grafana 8 which is not backwards compatible by default
16
- *
17
- * This transforms the health check result into the old format if Grafana <8 is being used
18
- *
19
- * @param baseTestDatasource The original testDatasource function
20
- * @returns Either the health check result if the health check was successful or an error that is handled later by Grafana
21
- */
22
- const testDatasource = (baseTestDatasource) => baseTestDatasource()
23
- // the backwards compatibility only affects the health check error messages
24
- // so only transform the error we give to Grafana
25
- .catch(ex => {
26
- var _a, _b, _c, _d;
27
- throw new Error((_d = (_b = (_a = ex.details) === null || _a === void 0 ? void 0 : _a.verboseMessage) !== null && _b !== void 0 ? _b : (_c = ex.details) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : ex.message);
28
- });
29
- exports.testDatasource = testDatasource;
30
- //# sourceMappingURL=testDatasource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testDatasource.js","sourceRoot":"","sources":["../../src/utils/testDatasource.ts"],"names":[],"mappings":";;;AAIA,MAAa,gBAAiB,SAAQ,KAAK;IAGzC,YAAY,OAAe,EAAE,OAAiC;QAC5D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AARD,4CAQC;AAKD;;;;;;;;;GASG;AACI,MAAM,cAAc,GAAG,CAAC,kBAAsC,EAAiC,EAAE,CACtG,kBAAkB,EAAE;IACpB,2EAA2E;IAC3E,iDAAiD;KAChD,KAAK,CAAC,EAAE,CAAC,EAAE;;IACV,MAAM,IAAI,KAAK,CAAC,MAAA,MAAA,MAAA,EAAE,CAAC,OAAO,0CAAE,cAAc,mCAAI,MAAA,EAAE,CAAC,OAAO,0CAAE,OAAO,mCAAI,EAAE,CAAC,OAAO,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA;AANS,QAAA,cAAc,kBAMvB"}