@grafana/plugin-ui 0.8.0 → 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 (373) hide show
  1. package/README.md +3 -12
  2. package/dist/components/AsyncButtonCascader/AsyncButtonCascader.js +1 -2
  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 +3 -7
  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/DataLinks/DataLink.js +3 -3
  59. package/dist/components/DataLinks/DataLink.js.map +1 -1
  60. package/dist/components/DataLinks/DataLinks.js +6 -9
  61. package/dist/components/DataLinks/DataLinks.js.map +1 -1
  62. package/dist/components/DataLinks/index.js.map +1 -1
  63. package/dist/components/DataSourcePicker/DataSourcePicker.js +4 -6
  64. package/dist/components/DataSourcePicker/DataSourcePicker.js.map +1 -1
  65. package/dist/components/DatePicker/DatePicker.js +5 -3
  66. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  67. package/dist/components/DatePicker/styles.js +8 -10
  68. package/dist/components/DatePicker/styles.js.map +1 -1
  69. package/dist/components/DatePickerWithInput/DatePickerWithInput.js +1 -1
  70. package/dist/components/DatePickerWithInput/DatePickerWithInput.js.map +1 -1
  71. package/dist/components/DebounceInput/DebounceInput.js +3 -1
  72. package/dist/components/DebounceInput/DebounceInput.js.map +1 -1
  73. package/dist/components/QueryEditor/AccessoryButton.js +3 -4
  74. package/dist/components/QueryEditor/AccessoryButton.js.map +1 -1
  75. package/dist/components/QueryEditor/EditorField.js +7 -9
  76. package/dist/components/QueryEditor/EditorField.js.map +1 -1
  77. package/dist/components/QueryEditor/EditorFieldGroup.js +2 -2
  78. package/dist/components/QueryEditor/EditorFieldGroup.js.map +1 -1
  79. package/dist/components/QueryEditor/EditorHeader.js +3 -4
  80. package/dist/components/QueryEditor/EditorHeader.js.map +1 -1
  81. package/dist/components/QueryEditor/EditorList.js +5 -6
  82. package/dist/components/QueryEditor/EditorList.js.map +1 -1
  83. package/dist/components/QueryEditor/EditorRow.js +3 -3
  84. package/dist/components/QueryEditor/EditorRow.js.map +1 -1
  85. package/dist/components/QueryEditor/EditorRows.js +2 -2
  86. package/dist/components/QueryEditor/EditorRows.js.map +1 -1
  87. package/dist/components/QueryEditor/EditorStack.js +13 -0
  88. package/dist/components/QueryEditor/EditorStack.js.map +1 -0
  89. package/dist/components/QueryEditor/InlineSelect.js +5 -8
  90. package/dist/components/QueryEditor/InlineSelect.js.map +1 -1
  91. package/dist/components/QueryEditor/InputGroup.js +29 -9
  92. package/dist/components/QueryEditor/InputGroup.js.map +1 -1
  93. package/dist/components/QueryEditor/QueryHeader.js +1 -4
  94. package/dist/components/QueryEditor/QueryHeader.js.map +1 -1
  95. package/dist/components/QueryEditor/index.js +3 -3
  96. package/dist/components/QueryEditor/index.js.map +1 -1
  97. package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js +2 -2
  98. package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js.map +1 -1
  99. package/dist/components/QueryEditor/utils/sql.utils.js.map +1 -1
  100. package/dist/components/QueryEditor/visual-query-builder/EditorRow.js +2 -2
  101. package/dist/components/QueryEditor/visual-query-builder/EditorRow.js.map +1 -1
  102. package/dist/components/QueryEditor/visual-query-builder/EditorRows.js +2 -2
  103. package/dist/components/QueryEditor/visual-query-builder/EditorRows.js.map +1 -1
  104. package/dist/components/QueryEditor/visual-query-builder/SelectRow.js +3 -3
  105. package/dist/components/QueryEditor/visual-query-builder/SelectRow.js.map +1 -1
  106. package/dist/components/QueryEditor/visual-query-builder/VisualEditor.js.map +1 -1
  107. package/dist/components/QueryEditorRow/QueryEditorRow.js +3 -4
  108. package/dist/components/QueryEditorRow/QueryEditorRow.js.map +1 -1
  109. package/dist/components/SQLEditor/components/SQLEditor.js +330 -0
  110. package/dist/components/SQLEditor/components/SQLEditor.js.map +1 -0
  111. package/dist/components/SQLEditor/index.js +25 -0
  112. package/dist/components/SQLEditor/index.js.map +1 -0
  113. package/dist/components/SQLEditor/mocks/Monaco.js +23 -0
  114. package/dist/components/SQLEditor/mocks/Monaco.js.map +1 -0
  115. package/dist/components/SQLEditor/mocks/TextModel.js +22 -0
  116. package/dist/components/SQLEditor/mocks/TextModel.js.map +1 -0
  117. package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js +216 -0
  118. package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js.map +1 -0
  119. package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js +231 -0
  120. package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js.map +1 -0
  121. package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js +271 -0
  122. package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js.map +1 -0
  123. package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js +8 -0
  124. package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js.map +1 -0
  125. package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js +196 -0
  126. package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js.map +1 -0
  127. package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js +211 -0
  128. package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js.map +1 -0
  129. package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js +251 -0
  130. package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js.map +1 -0
  131. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js +386 -0
  132. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js.map +1 -0
  133. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js +416 -0
  134. package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js.map +1 -0
  135. package/dist/components/SQLEditor/mocks/testData.js +22 -0
  136. package/dist/components/SQLEditor/mocks/testData.js.map +1 -0
  137. package/dist/components/SQLEditor/standardSql/definition.js +13 -0
  138. package/dist/components/SQLEditor/standardSql/definition.js.map +1 -0
  139. package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js +26 -0
  140. package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js.map +1 -0
  141. package/dist/components/SQLEditor/standardSql/getStatementPosition.js +24 -0
  142. package/dist/components/SQLEditor/standardSql/getStatementPosition.js.map +1 -0
  143. package/dist/components/SQLEditor/standardSql/language.js +875 -0
  144. package/dist/components/SQLEditor/standardSql/language.js.map +1 -0
  145. package/dist/components/SQLEditor/standardSql/macros.js +166 -0
  146. package/dist/components/SQLEditor/standardSql/macros.js.map +1 -0
  147. package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js +30 -0
  148. package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js.map +1 -0
  149. package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js +378 -0
  150. package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js.map +1 -0
  151. package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js +234 -0
  152. package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js.map +1 -0
  153. package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js +153 -0
  154. package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js.map +1 -0
  155. package/dist/components/SQLEditor/standardSql/types.js +3 -0
  156. package/dist/components/SQLEditor/standardSql/types.js.map +1 -0
  157. package/dist/components/SQLEditor/test-utils/index.js +11 -0
  158. package/dist/components/SQLEditor/test-utils/index.js.map +1 -0
  159. package/dist/components/SQLEditor/test-utils/statementPosition.js +40 -0
  160. package/dist/components/SQLEditor/test-utils/statementPosition.js.map +1 -0
  161. package/dist/components/SQLEditor/test-utils/types.js +3 -0
  162. package/dist/components/SQLEditor/test-utils/types.js.map +1 -0
  163. package/dist/components/SQLEditor/types.js +139 -0
  164. package/dist/components/SQLEditor/types.js.map +1 -0
  165. package/dist/components/SQLEditor/utils/LinkedToken.js +147 -0
  166. package/dist/components/SQLEditor/utils/LinkedToken.js.map +1 -0
  167. package/dist/components/SQLEditor/utils/commands.js +8 -0
  168. package/dist/components/SQLEditor/utils/commands.js.map +1 -0
  169. package/dist/components/SQLEditor/utils/debugger.js +14 -0
  170. package/dist/components/SQLEditor/utils/debugger.js.map +1 -0
  171. package/dist/components/SQLEditor/utils/getSuggestionKind.js +18 -0
  172. package/dist/components/SQLEditor/utils/getSuggestionKind.js.map +1 -0
  173. package/dist/components/SQLEditor/utils/linkedTokenBuilder.js +46 -0
  174. package/dist/components/SQLEditor/utils/linkedTokenBuilder.js.map +1 -0
  175. package/dist/components/SQLEditor/utils/toCompletionItem.js +10 -0
  176. package/dist/components/SQLEditor/utils/toCompletionItem.js.map +1 -0
  177. package/dist/components/SQLEditor/utils/tokenUtils.js +72 -0
  178. package/dist/components/SQLEditor/utils/tokenUtils.js.map +1 -0
  179. package/dist/components/SQLEditor/utils/types.js +3 -0
  180. package/dist/components/SQLEditor/utils/types.js.map +1 -0
  181. package/dist/components/Segment/Segment.js +2 -1
  182. package/dist/components/Segment/Segment.js.map +1 -1
  183. package/dist/components/VisualQueryBuilder/QueryModellerBase.js +35 -0
  184. package/dist/components/VisualQueryBuilder/QueryModellerBase.js.map +1 -0
  185. package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js +125 -0
  186. package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js.map +1 -0
  187. package/dist/components/VisualQueryBuilder/components/LabelFilters.js +37 -0
  188. package/dist/components/VisualQueryBuilder/components/LabelFilters.js.map +1 -0
  189. package/dist/components/VisualQueryBuilder/components/OperationEditor.js +41 -0
  190. package/dist/components/VisualQueryBuilder/components/OperationEditor.js.map +1 -0
  191. package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js +173 -0
  192. package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js.map +1 -0
  193. package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js +64 -0
  194. package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js.map +1 -0
  195. package/dist/components/VisualQueryBuilder/components/OperationHeader.js +67 -0
  196. package/dist/components/VisualQueryBuilder/components/OperationHeader.js.map +1 -0
  197. package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js +71 -0
  198. package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js.map +1 -0
  199. package/dist/components/VisualQueryBuilder/components/OperationList.js +129 -0
  200. package/dist/components/VisualQueryBuilder/components/OperationList.js.map +1 -0
  201. package/dist/components/VisualQueryBuilder/components/OperationListExplained.js +22 -0
  202. package/dist/components/VisualQueryBuilder/components/OperationListExplained.js.map +1 -0
  203. package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js +71 -0
  204. package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js.map +1 -0
  205. package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js +24 -0
  206. package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js.map +1 -0
  207. package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js +54 -0
  208. package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js.map +1 -0
  209. package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js +17 -0
  210. package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js.map +1 -0
  211. package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js +32 -0
  212. package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js.map +1 -0
  213. package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js +81 -0
  214. package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js.map +1 -0
  215. package/dist/components/VisualQueryBuilder/components/RawQuery.js +25 -0
  216. package/dist/components/VisualQueryBuilder/components/RawQuery.js.map +1 -0
  217. package/dist/components/VisualQueryBuilder/index.js +29 -0
  218. package/dist/components/VisualQueryBuilder/index.js.map +1 -0
  219. package/dist/components/VisualQueryBuilder/types.js +10 -0
  220. package/dist/components/VisualQueryBuilder/types.js.map +1 -0
  221. package/dist/components/index.js +2 -0
  222. package/dist/components/index.js.map +1 -1
  223. package/dist/datasource/SqlDatasource.js.map +1 -1
  224. package/dist/hooks/useDebounce.js +2 -0
  225. package/dist/hooks/useDebounce.js.map +1 -1
  226. package/dist/index.js +1 -6
  227. package/dist/index.js.map +1 -1
  228. package/dist/src/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.d.ts +8 -0
  229. package/dist/src/components/ConfigEditor/AdvancedSettings/index.d.ts +1 -0
  230. package/dist/src/components/ConfigEditor/Auth/Auth.d.ts +18 -0
  231. package/dist/src/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.d.ts +14 -0
  232. package/dist/src/components/ConfigEditor/Auth/auth-method/BasicAuth.d.ts +17 -0
  233. package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeader.d.ts +10 -0
  234. package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeaders.d.ts +8 -0
  235. package/dist/src/components/ConfigEditor/Auth/index.d.ts +4 -0
  236. package/dist/src/components/ConfigEditor/Auth/styles.d.ts +4 -0
  237. package/dist/src/components/ConfigEditor/Auth/tls/SelfSignedCertificate.d.ts +13 -0
  238. package/dist/src/components/ConfigEditor/Auth/tls/SkipTLSVerification.d.ts +7 -0
  239. package/dist/src/components/ConfigEditor/Auth/tls/TLSClientAuth.d.ts +20 -0
  240. package/dist/src/components/ConfigEditor/Auth/tls/TLSSettings.d.ts +11 -0
  241. package/dist/src/components/ConfigEditor/Auth/tls/TLSSettingsSection.d.ts +9 -0
  242. package/dist/src/components/ConfigEditor/Auth/types.d.ts +28 -0
  243. package/dist/src/components/ConfigEditor/Auth/utils.d.ts +12 -0
  244. package/dist/src/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.d.ts +8 -0
  245. package/dist/src/components/ConfigEditor/ConfigSection/ConfigSection.d.ts +5 -0
  246. package/dist/src/components/ConfigEditor/ConfigSection/ConfigSubSection.d.ts +5 -0
  247. package/dist/src/components/ConfigEditor/ConfigSection/GenericConfigSection.d.ts +10 -0
  248. package/dist/src/components/ConfigEditor/ConfigSection/index.d.ts +3 -0
  249. package/dist/src/components/ConfigEditor/Connection/ConnectionSettings.d.ts +13 -0
  250. package/dist/src/components/ConfigEditor/Connection/index.d.ts +1 -0
  251. package/dist/src/components/ConfigEditor/DataSourceDescription.d.ts +9 -0
  252. package/dist/src/components/ConfigEditor/index.d.ts +7 -2
  253. package/dist/src/components/ConfigEditor/types.d.ts +3 -0
  254. package/dist/src/components/DataLinks/DataLink.d.ts +1 -1
  255. package/dist/src/components/QueryEditor/EditorField.d.ts +1 -0
  256. package/dist/src/components/QueryEditor/EditorList.d.ts +1 -1
  257. package/dist/src/components/QueryEditor/EditorStack.d.ts +13 -0
  258. package/dist/src/components/QueryEditor/InputGroup.d.ts +6 -2
  259. package/dist/src/components/QueryEditor/index.d.ts +1 -1
  260. package/dist/src/components/QueryEditor/query-editor-raw/QueryEditorRaw.d.ts +1 -1
  261. package/dist/src/components/QueryEditor/types.d.ts +1 -6
  262. package/dist/src/components/QueryEditor/visual-query-builder/VisualEditor.d.ts +1 -2
  263. package/dist/src/components/SQLEditor/components/SQLEditor.d.ts +29 -0
  264. package/dist/src/components/SQLEditor/index.d.ts +7 -0
  265. package/dist/src/components/SQLEditor/mocks/Monaco.d.ts +3 -0
  266. package/dist/src/components/SQLEditor/mocks/TextModel.d.ts +7 -0
  267. package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQuery.d.ts +2 -0
  268. package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.d.ts +2 -0
  269. package/dist/src/components/SQLEditor/mocks/queries/multiLineMultipleColumns.d.ts +2 -0
  270. package/dist/src/components/SQLEditor/mocks/queries/singleLineEmptyQuery.d.ts +2 -0
  271. package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQuery.d.ts +2 -0
  272. package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.d.ts +2 -0
  273. package/dist/src/components/SQLEditor/mocks/queries/singleLineMultipleColumns.d.ts +2 -0
  274. package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueries.d.ts +2 -0
  275. package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.d.ts +2 -0
  276. package/dist/src/components/SQLEditor/mocks/testData.d.ts +9 -0
  277. package/dist/src/components/SQLEditor/standardSql/definition.d.ts +3 -0
  278. package/dist/src/components/SQLEditor/standardSql/getStandardSuggestions.d.ts +6 -0
  279. package/dist/src/components/SQLEditor/standardSql/getStatementPosition.d.ts +5 -0
  280. package/dist/src/components/SQLEditor/standardSql/language.d.ts +23 -0
  281. package/dist/src/components/SQLEditor/standardSql/macros.d.ts +2 -0
  282. package/dist/src/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.d.ts +4 -0
  283. package/dist/src/components/SQLEditor/standardSql/standardSuggestionsRegistry.d.ts +7 -0
  284. package/dist/src/components/SQLEditor/standardSql/statementPositionResolversRegistry.d.ts +2 -0
  285. package/dist/src/components/SQLEditor/standardSql/suggestionsKindRegistry.d.ts +7 -0
  286. package/dist/src/components/SQLEditor/standardSql/types.d.ts +33 -0
  287. package/dist/src/components/SQLEditor/test-utils/index.d.ts +7 -0
  288. package/dist/src/components/SQLEditor/test-utils/statementPosition.d.ts +3 -0
  289. package/dist/src/components/SQLEditor/test-utils/types.d.ts +12 -0
  290. package/dist/src/components/SQLEditor/types.d.ts +249 -0
  291. package/dist/src/components/SQLEditor/utils/LinkedToken.d.ts +29 -0
  292. package/dist/src/components/SQLEditor/utils/commands.d.ts +4 -0
  293. package/dist/src/components/SQLEditor/utils/debugger.d.ts +5 -0
  294. package/dist/src/components/SQLEditor/utils/getSuggestionKind.d.ts +7 -0
  295. package/dist/src/components/SQLEditor/utils/linkedTokenBuilder.d.ts +4 -0
  296. package/dist/src/components/SQLEditor/utils/toCompletionItem.d.ts +2 -0
  297. package/dist/src/components/SQLEditor/utils/tokenUtils.d.ts +14 -0
  298. package/dist/src/components/SQLEditor/utils/types.d.ts +11 -0
  299. package/dist/src/components/VisualQueryBuilder/QueryModellerBase.d.ts +18 -0
  300. package/dist/src/components/VisualQueryBuilder/components/LabelFilterItem.d.ts +18 -0
  301. package/dist/src/components/VisualQueryBuilder/components/LabelFilters.d.ts +14 -0
  302. package/dist/src/components/VisualQueryBuilder/components/OperationEditor.d.ts +19 -0
  303. package/dist/src/components/VisualQueryBuilder/components/OperationEditorBody.d.ts +22 -0
  304. package/dist/src/components/VisualQueryBuilder/components/OperationExplainedBox.d.ts +7 -0
  305. package/dist/src/components/VisualQueryBuilder/components/OperationHeader.d.ts +14 -0
  306. package/dist/src/components/VisualQueryBuilder/components/OperationInfoButton.d.ts +9 -0
  307. package/dist/src/components/VisualQueryBuilder/components/OperationList.d.ts +15 -0
  308. package/dist/src/components/VisualQueryBuilder/components/OperationListExplained.d.ts +17 -0
  309. package/dist/src/components/VisualQueryBuilder/components/OperationParamEditor.d.ts +4 -0
  310. package/dist/src/components/VisualQueryBuilder/components/OperationsEditorRow.d.ts +2 -0
  311. package/dist/src/components/VisualQueryBuilder/components/QueryBuilderHints.d.ts +20 -0
  312. package/dist/src/components/VisualQueryBuilder/components/QueryEditorModeToggle.d.ts +8 -0
  313. package/dist/src/components/VisualQueryBuilder/components/QueryHeaderSwitch.d.ts +7 -0
  314. package/dist/src/components/VisualQueryBuilder/components/QueryOptionGroup.d.ts +9 -0
  315. package/dist/src/components/VisualQueryBuilder/components/RawQuery.d.ts +12 -0
  316. package/dist/src/components/VisualQueryBuilder/index.d.ts +13 -0
  317. package/dist/src/components/VisualQueryBuilder/types.d.ts +89 -0
  318. package/dist/src/components/index.d.ts +5 -3
  319. package/dist/src/datasource/SqlDatasource.d.ts +0 -3
  320. package/dist/src/index.d.ts +0 -3
  321. package/dist/src/utils/changeset/functions.d.ts +1 -1
  322. package/dist/test/mocks/Datasource.js +1 -1
  323. package/dist/test/mocks/Datasource.js.map +1 -1
  324. package/dist/test/mocks/Plugin.js +2 -11
  325. package/dist/test/mocks/Plugin.js.map +1 -1
  326. package/dist/test/mocks/utils.js.map +1 -1
  327. package/dist/utils/changeset/functions.js +1 -1
  328. package/dist/utils/changeset/functions.js.map +1 -1
  329. package/dist/utils/changeset/index.js +20 -20
  330. package/dist/utils/changeset/index.js.map +1 -1
  331. package/package.json +29 -13
  332. package/dist/8x/fixtures/index.js +0 -7
  333. package/dist/8x/fixtures/index.js.map +0 -1
  334. package/dist/8x/fixtures/select.js +0 -43
  335. package/dist/8x/fixtures/select.js.map +0 -1
  336. package/dist/8x/index.js +0 -5
  337. package/dist/8x/index.js.map +0 -1
  338. package/dist/components/ConfigEditor/InlineLabel.js +0 -24
  339. package/dist/components/ConfigEditor/InlineLabel.js.map +0 -1
  340. package/dist/components/QueryEditor/ErrorBoundary.js +0 -23
  341. package/dist/components/QueryEditor/ErrorBoundary.js.map +0 -1
  342. package/dist/components/QueryEditor/Stack.js +0 -27
  343. package/dist/components/QueryEditor/Stack.js.map +0 -1
  344. package/dist/components/QueryEditor/visual-query-builder/Stack.js +0 -27
  345. package/dist/components/QueryEditor/visual-query-builder/Stack.js.map +0 -1
  346. package/dist/src/8x/fixtures/index.d.ts +0 -1
  347. package/dist/src/8x/fixtures/select.d.ts +0 -11
  348. package/dist/src/8x/index.d.ts +0 -1
  349. package/dist/src/components/ConfigEditor/InlineLabel.d.ts +0 -7
  350. package/dist/src/components/QueryEditor/ErrorBoundary.d.ts +0 -14
  351. package/dist/src/components/QueryEditor/Stack.d.ts +0 -10
  352. package/dist/src/components/QueryEditor/visual-query-builder/Stack.d.ts +0 -10
  353. package/dist/src/test/mocks/TestDatasource.d.ts +0 -6
  354. package/dist/src/test/mocks/style.d.ts +0 -1
  355. package/dist/src/test/setupTests.d.ts +0 -1
  356. package/dist/src/utils/compatFeatures.d.ts +0 -9
  357. package/dist/src/utils/compatibility.d.ts +0 -13
  358. package/dist/src/utils/index.d.ts +0 -3
  359. package/dist/src/utils/testDatasource.d.ts +0 -19
  360. package/dist/test/mocks/TestDatasource.js +0 -24
  361. package/dist/test/mocks/TestDatasource.js.map +0 -1
  362. package/dist/test/mocks/style.js +0 -5
  363. package/dist/test/mocks/style.js.map +0 -1
  364. package/dist/test/setupTests.js +0 -17
  365. package/dist/test/setupTests.js.map +0 -1
  366. package/dist/utils/compatFeatures.js +0 -20
  367. package/dist/utils/compatFeatures.js.map +0 -1
  368. package/dist/utils/compatibility.js +0 -31
  369. package/dist/utils/compatibility.js.map +0 -1
  370. package/dist/utils/index.js +0 -8
  371. package/dist/utils/index.js.map +0 -1
  372. package/dist/utils/testDatasource.js +0 -30
  373. package/dist/utils/testDatasource.js.map +0 -1
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.selectOption = exports.generateOptions = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = require("@testing-library/react");
6
- const user_event_1 = tslib_1.__importDefault(require("@testing-library/user-event"));
7
- const chance_1 = require("chance");
8
- const lodash_1 = require("lodash");
9
- const generateOptions = () => {
10
- const numberOfOptions = 5;
11
- return Array.from(new Array(numberOfOptions), () => {
12
- const name = (0, chance_1.Chance)().name();
13
- return {
14
- label: name,
15
- value: (0, lodash_1.kebabCase)(name),
16
- };
17
- });
18
- };
19
- exports.generateOptions = generateOptions;
20
- /**
21
- * react-select (used by @grafana/ui) renders very differently from the native Select HTML element
22
- * and because they do not pass data-testid down, it is difficult to grab the
23
- * correct element and simulate selecting different options
24
- * created a helper function to click and select a different option manually
25
- * @param optionLabel
26
- * @param index If there are multiple inputs and you don't want the first one taken, then pass in the index
27
- */
28
- const selectOption = (optionLabel, index, role) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
29
- role = role || 'combobox';
30
- // this needs to be here to support autoFocus=true prop
31
- react_1.fireEvent.blur(react_1.screen.getAllByRole(role)[index || 0]);
32
- // open the dropdown
33
- react_1.fireEvent.keyDown(react_1.screen.getAllByRole(role)[index || 0], {
34
- key: 'ArrowDown',
35
- keyCode: 40,
36
- });
37
- // wait for the list to show
38
- const option = yield (0, react_1.waitFor)(() => react_1.screen.getByText(optionLabel));
39
- // select the option
40
- user_event_1.default.click(option);
41
- });
42
- exports.selectOption = selectOption;
43
- //# sourceMappingURL=select.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/8x/fixtures/select.ts"],"names":[],"mappings":";;;;AACA,kDAAoE;AACpE,qFAAoD;AACpD,mCAAgC;AAChC,mCAAmC;AAE5B,MAAM,eAAe,GAAG,GAAmC,EAAE;IAClE,MAAM,eAAe,GAAG,CAAC,CAAC;IAE1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,EAAE,GAAG,EAAE;QACjD,MAAM,IAAI,GAAG,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE,CAAC;QAE7B,OAAO;YACL,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,IAAA,kBAAS,EAAC,IAAI,CAAC;SACvB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAXW,QAAA,eAAe,mBAW1B;AAEF;;;;;;;GAOG;AACI,MAAM,YAAY,GAAG,CAAO,WAAmB,EAAE,KAAc,EAAE,IAAa,EAAE,EAAE;IACvF,IAAI,GAAG,IAAI,IAAI,UAAU,CAAC;IAC1B,uDAAuD;IACvD,iBAAS,CAAC,IAAI,CAAC,cAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC;IAEtD,oBAAoB;IACpB,iBAAS,CAAC,OAAO,CAAC,cAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE;QACvD,GAAG,EAAE,WAAW;QAChB,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;IAEH,4BAA4B;IAC5B,MAAM,MAAM,GAAG,MAAM,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,cAAM,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IAElE,oBAAoB;IACpB,oBAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAA,CAAC;AAhBW,QAAA,YAAY,gBAgBvB"}
package/dist/8x/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./fixtures"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/8x/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InlineLabel = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- const css_1 = require("@emotion/css");
7
- const ui_1 = require("@grafana/ui");
8
- const InlineLabel = (_a) => {
9
- var { children, required = false } = _a, props = tslib_1.__rest(_a, ["children", "required"]);
10
- const theme = (0, ui_1.useTheme2)();
11
- const styles = {
12
- asterisk: (0, css_1.css) `
13
- color: ${theme.colors.error.main};
14
- `,
15
- };
16
- return (react_1.default.createElement(ui_1.InlineLabel, Object.assign({}, props),
17
- react_1.default.createElement("span", null,
18
- children,
19
- required && (react_1.default.createElement(react_1.default.Fragment, null,
20
- "\u00A0",
21
- react_1.default.createElement("span", { className: styles.asterisk }, "*"))))));
22
- };
23
- exports.InlineLabel = InlineLabel;
24
- //# sourceMappingURL=InlineLabel.js.map
@@ -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,GAAG,CAAC,EAA+C,EAAE,EAAE;QAAnD,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,OAAmB,EAAd,KAAK,sBAAtC,wBAAwC,CAAF;IAChE,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;AArBW,QAAA,WAAW,eAqBtB"}
@@ -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;AAUhD,MAAM,KAAK,GAAG,CAAC,EAAkC,EAAE,EAAE;QAAtC,EAAE,QAAQ,OAAwB,EAAnB,KAAK,sBAApB,YAAsB,CAAF;IACxC,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,CAAC,MAAA,KAAK,CAAC,IAAI,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACnD,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;AAUhD,MAAM,KAAK,GAAG,CAAC,EAAkC,EAAE,EAAE;QAAtC,EAAE,QAAQ,OAAwB,EAAnB,KAAK,sBAApB,YAAsB,CAAF;IACxC,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,CAAC,MAAA,KAAK,CAAC,IAAI,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACnD,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: ({ children, required, ...props }: Props) => JSX.Element;
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,10 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- interface StackProps {
3
- children?: React.ReactNode;
4
- direction?: CSSProperties['flexDirection'];
5
- alignItems?: CSSProperties['alignItems'];
6
- wrap?: boolean;
7
- gap?: number;
8
- }
9
- export declare const Stack: ({ children, ...props }: StackProps) => JSX.Element;
10
- export {};
@@ -1,10 +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
- children?: React.ReactNode;
8
- }
9
- export declare const Stack: ({ children, ...props }: StackProps) => JSX.Element;
10
- 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,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,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"}