@perses-dev/clickhouse-plugin 0.6.0 → 0.7.0-beta.2

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 (211) hide show
  1. package/__mf/js/{ClickHouse.4e6199f7.js → ClickHouse.d554fc35.js} +4 -4
  2. package/__mf/js/async/1522.d8e80570.js +22 -0
  3. package/__mf/js/async/1616.8ee37fc2.js +1 -0
  4. package/__mf/js/async/2043.33c976ff.js +2 -0
  5. package/__mf/js/async/2650.27d5a53e.js +3 -0
  6. package/__mf/js/async/2901.98424a07.js +1 -0
  7. package/__mf/js/async/3181.7b46b8e9.js +2 -0
  8. package/__mf/js/async/392.54a0693e.js +2 -0
  9. package/__mf/js/async/3944.f70c2037.js +10 -0
  10. package/__mf/js/async/4077.5b0edb67.js +1 -0
  11. package/__mf/js/async/4121.0b653ee5.js +2 -0
  12. package/__mf/js/async/4496.23de7e47.js +1 -0
  13. package/__mf/js/async/4569.ffd2c654.js +7 -0
  14. package/__mf/js/async/{6155.1398a410.js.LICENSE.txt → 4569.ffd2c654.js.LICENSE.txt} +41 -1
  15. package/__mf/js/async/5002.2cee2f35.js +1 -0
  16. package/__mf/js/async/5071.fe3eb282.js +1 -0
  17. package/__mf/js/async/5440.6cfd6f26.js +2 -0
  18. package/__mf/js/async/5562.c5ce26e1.js +2 -0
  19. package/__mf/js/async/5587.9797bc5a.js +1 -0
  20. package/__mf/js/async/560.acc0c2d1.js +37 -0
  21. package/__mf/js/async/6045.93765a0a.js +1 -0
  22. package/__mf/js/async/6274.35dc924b.js +2 -0
  23. package/__mf/js/async/7192.f4e0055e.js +1 -0
  24. package/__mf/js/async/7862.306edb3f.js +2 -0
  25. package/__mf/js/async/7943.a43cb4a7.js +2 -0
  26. package/__mf/js/async/7968.a73d7acd.js +1 -0
  27. package/__mf/js/async/7978.e22f59c6.js +1 -0
  28. package/__mf/js/async/8356.d102e817.js +1 -0
  29. package/__mf/js/async/8470.4652ca18.js +2 -0
  30. package/__mf/js/async/873.cae3f07a.js +1 -0
  31. package/__mf/js/async/9001.0b1d67e2.js +102 -0
  32. package/__mf/js/async/9207.b184be58.js +1 -0
  33. package/__mf/js/async/9235.0aff6249.js +1 -0
  34. package/__mf/js/async/941.26e4a6ef.js +2 -0
  35. package/__mf/js/async/9588.a36eacf5.js +1 -0
  36. package/__mf/js/async/__federation_expose_ClickHouseDatasource.1eba91f6.js +2 -0
  37. package/__mf/js/async/__federation_expose_ClickHouseLogQuery.27676311.js +20 -0
  38. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.3d225a5d.js +20 -0
  39. package/__mf/js/{main.39993ad6.js → main.5353a8fc.js} +2 -2
  40. package/lib/bootstrap.js +2 -2
  41. package/lib/components/ClickQLEditor.d.ts +2 -2
  42. package/lib/components/ClickQLEditor.d.ts.map +1 -1
  43. package/lib/components/ClickQLEditor.js +3 -3
  44. package/lib/components/ClickQLEditor.js.map +1 -1
  45. package/lib/components/index.js +1 -1
  46. package/lib/components/index.js.map +1 -1
  47. package/lib/datasources/click-house-datasource/ClickHouseDatasource.d.ts +2 -2
  48. package/lib/datasources/click-house-datasource/ClickHouseDatasource.d.ts.map +1 -1
  49. package/lib/datasources/click-house-datasource/ClickHouseDatasource.js +2 -2
  50. package/lib/datasources/click-house-datasource/ClickHouseDatasource.js.map +1 -1
  51. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts +2 -2
  52. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.d.ts.map +1 -1
  53. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +1 -1
  54. package/lib/datasources/click-house-datasource/ClickHouseDatasourceEditor.js.map +1 -1
  55. package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts +3 -3
  56. package/lib/datasources/click-house-datasource/click-house-datasource-types.d.ts.map +1 -1
  57. package/lib/datasources/click-house-datasource/click-house-datasource-types.js.map +1 -1
  58. package/lib/datasources/click-house-datasource/index.js +3 -3
  59. package/lib/datasources/click-house-datasource/index.js.map +1 -1
  60. package/lib/datasources/index.js +1 -1
  61. package/lib/datasources/index.js.map +1 -1
  62. package/lib/getPluginModule.d.ts +1 -1
  63. package/lib/getPluginModule.d.ts.map +1 -1
  64. package/lib/getPluginModule.js +3 -1
  65. package/lib/getPluginModule.js.map +1 -1
  66. package/lib/index-federation.js +1 -1
  67. package/lib/index.js +3 -3
  68. package/lib/index.js.map +1 -1
  69. package/lib/model/click-house-client.d.ts +1 -1
  70. package/lib/model/click-house-client.d.ts.map +1 -1
  71. package/lib/model/click-house-client.js +3 -1
  72. package/lib/model/click-house-client.js.map +1 -1
  73. package/lib/model/click-house-data-types.d.ts +1 -1
  74. package/lib/model/click-house-data-types.d.ts.map +1 -1
  75. package/lib/model/click-house-data-types.js.map +1 -1
  76. package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts +2 -2
  77. package/lib/queries/click-house-log-query/ClickHouseLogQuery.d.ts.map +1 -1
  78. package/lib/queries/click-house-log-query/ClickHouseLogQuery.js +4 -6
  79. package/lib/queries/click-house-log-query/ClickHouseLogQuery.js.map +1 -1
  80. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts +3 -3
  81. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.d.ts.map +1 -1
  82. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js +9 -9
  83. package/lib/queries/click-house-log-query/ClickHouseLogQueryEditor.js.map +1 -1
  84. package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts +1 -1
  85. package/lib/queries/click-house-log-query/click-house-log-query-types.d.ts.map +1 -1
  86. package/lib/queries/click-house-log-query/click-house-log-query-types.js.map +1 -1
  87. package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts +2 -2
  88. package/lib/queries/click-house-log-query/get-click-house-log-data.d.ts.map +1 -1
  89. package/lib/queries/click-house-log-query/get-click-house-log-data.js +4 -4
  90. package/lib/queries/click-house-log-query/get-click-house-log-data.js.map +1 -1
  91. package/lib/queries/click-house-log-query/index.js +4 -4
  92. package/lib/queries/click-house-log-query/index.js.map +1 -1
  93. package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts +2 -2
  94. package/lib/queries/click-house-time-series-query/ClickHouseQuery.d.ts.map +1 -1
  95. package/lib/queries/click-house-time-series-query/ClickHouseQuery.js +4 -6
  96. package/lib/queries/click-house-time-series-query/ClickHouseQuery.js.map +1 -1
  97. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts +3 -3
  98. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.d.ts.map +1 -1
  99. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js +9 -9
  100. package/lib/queries/click-house-time-series-query/ClickHouseQueryEditor.js.map +1 -1
  101. package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts +1 -1
  102. package/lib/queries/click-house-time-series-query/click-house-query-types.d.ts.map +1 -1
  103. package/lib/queries/click-house-time-series-query/click-house-query-types.js.map +1 -1
  104. package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts +2 -2
  105. package/lib/queries/click-house-time-series-query/get-click-house-data.d.ts.map +1 -1
  106. package/lib/queries/click-house-time-series-query/get-click-house-data.js +5 -5
  107. package/lib/queries/click-house-time-series-query/get-click-house-data.js.map +1 -1
  108. package/lib/queries/click-house-time-series-query/index.js +4 -4
  109. package/lib/queries/click-house-time-series-query/index.js.map +1 -1
  110. package/lib/queries/index.js +2 -2
  111. package/lib/queries/index.js.map +1 -1
  112. package/lib/queries/query-editor-model.d.ts +1 -1
  113. package/lib/queries/query-editor-model.d.ts.map +1 -1
  114. package/lib/queries/query-editor-model.js +2 -2
  115. package/lib/queries/query-editor-model.js.map +1 -1
  116. package/lib/setup-tests.d.ts +1 -1
  117. package/lib/setup-tests.d.ts.map +1 -1
  118. package/lib/setup-tests.js +2 -2
  119. package/lib/setup-tests.js.map +1 -1
  120. package/mf-manifest.json +69 -98
  121. package/mf-stats.json +69 -102
  122. package/package.json +21 -13
  123. package/__mf/js/async/1616.c86fdd40.js +0 -1
  124. package/__mf/js/async/1728.a4ac7d54.js +0 -1
  125. package/__mf/js/async/1811.29b51780.js +0 -101
  126. package/__mf/js/async/1825.299edaf9.js +0 -1
  127. package/__mf/js/async/1969.ea0bd5b9.js +0 -1
  128. package/__mf/js/async/2043.13379b9d.js +0 -2
  129. package/__mf/js/async/2386.56de292b.js +0 -2
  130. package/__mf/js/async/3059.3d9dad23.js +0 -1
  131. package/__mf/js/async/3181.f3124eab.js +0 -2
  132. package/__mf/js/async/392.c8af2244.js +0 -2
  133. package/__mf/js/async/3981.9bd5679b.js +0 -3
  134. package/__mf/js/async/4121.b6afa425.js +0 -2
  135. package/__mf/js/async/4233.abbba3f6.js +0 -7
  136. package/__mf/js/async/4233.abbba3f6.js.LICENSE.txt +0 -39
  137. package/__mf/js/async/5002.9167d87e.js +0 -1
  138. package/__mf/js/async/5071.a039a221.js +0 -1
  139. package/__mf/js/async/5440.898ddc2f.js +0 -2
  140. package/__mf/js/async/5481.223427f5.js +0 -2
  141. package/__mf/js/async/5562.d4359565.js +0 -2
  142. package/__mf/js/async/5587.72383e00.js +0 -1
  143. package/__mf/js/async/599.e213c21c.js +0 -1
  144. package/__mf/js/async/6045.9b807b97.js +0 -1
  145. package/__mf/js/async/6155.1398a410.js +0 -2
  146. package/__mf/js/async/6274.22bd6f34.js +0 -2
  147. package/__mf/js/async/6688.abdc25f6.js +0 -2
  148. package/__mf/js/async/7177.96ff5c4d.js +0 -1
  149. package/__mf/js/async/7192.c1f998d2.js +0 -1
  150. package/__mf/js/async/7968.ae66f60b.js +0 -1
  151. package/__mf/js/async/7978.a58ed5ff.js +0 -1
  152. package/__mf/js/async/7984.549ad1a9.js +0 -22
  153. package/__mf/js/async/8356.eda63865.js +0 -1
  154. package/__mf/js/async/8470.3ae4fba1.js +0 -2
  155. package/__mf/js/async/873.e4ddcabf.js +0 -1
  156. package/__mf/js/async/9235.aeb9d818.js +0 -1
  157. package/__mf/js/async/941.11ea3ddf.js +0 -2
  158. package/__mf/js/async/9588.d09a1141.js +0 -1
  159. package/__mf/js/async/9754.9ea7778b.js +0 -10
  160. package/__mf/js/async/9836.75f99110.js +0 -1
  161. package/__mf/js/async/9877.8f08e12a.js +0 -38
  162. package/__mf/js/async/__federation_expose_ClickHouseDatasource.0e124aef.js +0 -2
  163. package/__mf/js/async/__federation_expose_ClickHouseLogQuery.605ad0d2.js +0 -20
  164. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js +0 -20
  165. package/__mf/js/async/__federation_expose_ClickHouseTimeSeriesQuery.a7927056.js.LICENSE.txt +0 -9
  166. package/lib/cjs/bootstrap.js +0 -26
  167. package/lib/cjs/components/ClickQLEditor.js +0 -72
  168. package/lib/cjs/components/constants.js +0 -41
  169. package/lib/cjs/components/index.js +0 -30
  170. package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasource.js +0 -49
  171. package/lib/cjs/datasources/click-house-datasource/ClickHouseDatasourceEditor.js +0 -51
  172. package/lib/cjs/datasources/click-house-datasource/click-house-datasource-types.js +0 -16
  173. package/lib/cjs/datasources/click-house-datasource/index.js +0 -32
  174. package/lib/cjs/datasources/index.js +0 -30
  175. package/lib/cjs/env.d.js +0 -14
  176. package/lib/cjs/getPluginModule.js +0 -39
  177. package/lib/cjs/index-federation.js +0 -55
  178. package/lib/cjs/index.js +0 -38
  179. package/lib/cjs/model/click-house-client.js +0 -83
  180. package/lib/cjs/model/click-house-data-types.js +0 -16
  181. package/lib/cjs/queries/click-house-log-query/ClickHouseLogQuery.js +0 -45
  182. package/lib/cjs/queries/click-house-log-query/ClickHouseLogQueryEditor.js +0 -104
  183. package/lib/cjs/queries/click-house-log-query/click-house-log-query-types.js +0 -16
  184. package/lib/cjs/queries/click-house-log-query/get-click-house-log-data.js +0 -93
  185. package/lib/cjs/queries/click-house-log-query/index.js +0 -33
  186. package/lib/cjs/queries/click-house-time-series-query/ClickHouseQuery.js +0 -43
  187. package/lib/cjs/queries/click-house-time-series-query/ClickHouseQueryEditor.js +0 -104
  188. package/lib/cjs/queries/click-house-time-series-query/click-house-query-types.js +0 -16
  189. package/lib/cjs/queries/click-house-time-series-query/get-click-house-data.js +0 -116
  190. package/lib/cjs/queries/click-house-time-series-query/index.js +0 -33
  191. package/lib/cjs/queries/constants.js +0 -34
  192. package/lib/cjs/queries/index.js +0 -31
  193. package/lib/cjs/queries/query-editor-model.js +0 -53
  194. package/lib/cjs/setup-tests.js +0 -19
  195. /package/__mf/css/async/{4233.85c2cbf6.css → 4569.85c2cbf6.css} +0 -0
  196. /package/__mf/js/async/{7984.549ad1a9.js.LICENSE.txt → 1522.d8e80570.js.LICENSE.txt} +0 -0
  197. /package/__mf/js/async/{2043.13379b9d.js.LICENSE.txt → 2043.33c976ff.js.LICENSE.txt} +0 -0
  198. /package/__mf/js/async/{2386.56de292b.js.LICENSE.txt → 3181.7b46b8e9.js.LICENSE.txt} +0 -0
  199. /package/__mf/js/async/{392.c8af2244.js.LICENSE.txt → 392.54a0693e.js.LICENSE.txt} +0 -0
  200. /package/__mf/js/async/{9754.9ea7778b.js.LICENSE.txt → 3944.f70c2037.js.LICENSE.txt} +0 -0
  201. /package/__mf/js/async/{4121.b6afa425.js.LICENSE.txt → 4121.0b653ee5.js.LICENSE.txt} +0 -0
  202. /package/__mf/js/async/{5440.898ddc2f.js.LICENSE.txt → 5440.6cfd6f26.js.LICENSE.txt} +0 -0
  203. /package/__mf/js/async/{3181.f3124eab.js.LICENSE.txt → 5562.c5ce26e1.js.LICENSE.txt} +0 -0
  204. /package/__mf/js/async/{6274.22bd6f34.js.LICENSE.txt → 6274.35dc924b.js.LICENSE.txt} +0 -0
  205. /package/__mf/js/async/{5481.223427f5.js.LICENSE.txt → 7862.306edb3f.js.LICENSE.txt} +0 -0
  206. /package/__mf/js/async/{5562.d4359565.js.LICENSE.txt → 7943.a43cb4a7.js.LICENSE.txt} +0 -0
  207. /package/__mf/js/async/{8470.3ae4fba1.js.LICENSE.txt → 8470.4652ca18.js.LICENSE.txt} +0 -0
  208. /package/__mf/js/async/{6688.abdc25f6.js.LICENSE.txt → 941.26e4a6ef.js.LICENSE.txt} +0 -0
  209. /package/__mf/js/async/{941.11ea3ddf.js.LICENSE.txt → __federation_expose_ClickHouseDatasource.1eba91f6.js.LICENSE.txt} +0 -0
  210. /package/__mf/js/async/{__federation_expose_ClickHouseDatasource.0e124aef.js.LICENSE.txt → __federation_expose_ClickHouseLogQuery.27676311.js.LICENSE.txt} +0 -0
  211. /package/__mf/js/async/{__federation_expose_ClickHouseLogQuery.605ad0d2.js.LICENSE.txt → __federation_expose_ClickHouseTimeSeriesQuery.3d225a5d.js.LICENSE.txt} +0 -0
@@ -1,5 +1,5 @@
1
- import { ReactCodeMirrorProps } from '@uiw/react-codemirror';
2
- import { ReactElement } from 'react';
1
+ import type { ReactCodeMirrorProps } from '@uiw/react-codemirror';
2
+ import type { ReactElement } from 'react';
3
3
  export type ClickQLEditorProps = Omit<ReactCodeMirrorProps, 'theme' | 'extensions'>;
4
4
  export declare function ClickQLEditor(props: ClickQLEditorProps): ReactElement;
5
5
  //# sourceMappingURL=ClickQLEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClickQLEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ClickQLEditor.tsx"],"names":[],"mappings":"AAaA,OAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,YAAY,CAAC,CAAC;AAEpF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAuCrE"}
1
+ {"version":3,"file":"ClickQLEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ClickQLEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,YAAY,CAAC,CAAC;AAEpF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAuCrE"}
@@ -11,9 +11,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import CodeMirror from '@uiw/react-codemirror';
15
- import { EditorView } from '@codemirror/view';
16
- import { useTheme, InputLabel, Stack } from '@mui/material';
14
+ import { EditorView } from "@codemirror/view";
15
+ import { useTheme, InputLabel, Stack } from "@mui/material";
16
+ import CodeMirror from "@uiw/react-codemirror";
17
17
  export function ClickQLEditor(props) {
18
18
  const theme = useTheme();
19
19
  const isDarkMode = theme.palette.mode === 'dark';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ClickQLEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport { EditorView } from '@codemirror/view';\nimport { useTheme, InputLabel, Stack } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport type ClickQLEditorProps = Omit<ReactCodeMirrorProps, 'theme' | 'extensions'>;\n\nexport function ClickQLEditor(props: ClickQLEditorProps): ReactElement {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n return (\n <Stack position=\"relative\">\n <InputLabel\n sx={{\n fontWeight: 500,\n marginBottom: '4px',\n color: theme.palette.text.primary,\n }}\n >\n ClickHouse Query\n </InputLabel>\n <CodeMirror\n {...props}\n style={{ border: `1px solid ${theme.palette.divider}` }}\n theme={isDarkMode ? 'dark' : 'light'}\n basicSetup={{\n highlightActiveLine: false,\n highlightActiveLineGutter: false,\n foldGutter: false,\n syntaxHighlighting: true,\n }}\n extensions={[\n EditorView.lineWrapping,\n EditorView.theme({\n '.cm-content': {\n paddingTop: '8px',\n paddingBottom: '8px',\n paddingRight: '40px',\n },\n }),\n ]}\n placeholder=\"Write ClickHouse Query Here...\"\n />\n </Stack>\n );\n}\n"],"names":["CodeMirror","EditorView","useTheme","InputLabel","Stack","ClickQLEditor","props","theme","isDarkMode","palette","mode","position","sx","fontWeight","marginBottom","color","text","primary","style","border","divider","basicSetup","highlightActiveLine","highlightActiveLineGutter","foldGutter","syntaxHighlighting","extensions","lineWrapping","paddingTop","paddingBottom","paddingRight","placeholder"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,gBAA0C,wBAAwB;AACzE,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,QAAQ,gBAAgB;AAK5D,OAAO,SAASC,cAAcC,KAAyB;IACrD,MAAMC,QAAQL;IACd,MAAMM,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,qBACE,MAACN;QAAMO,UAAS;;0BACd,KAACR;gBACCS,IAAI;oBACFC,YAAY;oBACZC,cAAc;oBACdC,OAAOR,MAAME,OAAO,CAACO,IAAI,CAACC,OAAO;gBACnC;0BACD;;0BAGD,KAACjB;gBACE,GAAGM,KAAK;gBACTY,OAAO;oBAAEC,QAAQ,CAAC,UAAU,EAAEZ,MAAME,OAAO,CAACW,OAAO,EAAE;gBAAC;gBACtDb,OAAOC,aAAa,SAAS;gBAC7Ba,YAAY;oBACVC,qBAAqB;oBACrBC,2BAA2B;oBAC3BC,YAAY;oBACZC,oBAAoB;gBACtB;gBACAC,YAAY;oBACVzB,WAAW0B,YAAY;oBACvB1B,WAAWM,KAAK,CAAC;wBACf,eAAe;4BACbqB,YAAY;4BACZC,eAAe;4BACfC,cAAc;wBAChB;oBACF;iBACD;gBACDC,aAAY;;;;AAIpB"}
1
+ {"version":3,"sources":["../../../src/components/ClickQLEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { EditorView } from '@codemirror/view';\nimport { useTheme, InputLabel, Stack } from '@mui/material';\nimport type { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport CodeMirror from '@uiw/react-codemirror';\nimport type { ReactElement } from 'react';\n\nexport type ClickQLEditorProps = Omit<ReactCodeMirrorProps, 'theme' | 'extensions'>;\n\nexport function ClickQLEditor(props: ClickQLEditorProps): ReactElement {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n return (\n <Stack position=\"relative\">\n <InputLabel\n sx={{\n fontWeight: 500,\n marginBottom: '4px',\n color: theme.palette.text.primary,\n }}\n >\n ClickHouse Query\n </InputLabel>\n <CodeMirror\n {...props}\n style={{ border: `1px solid ${theme.palette.divider}` }}\n theme={isDarkMode ? 'dark' : 'light'}\n basicSetup={{\n highlightActiveLine: false,\n highlightActiveLineGutter: false,\n foldGutter: false,\n syntaxHighlighting: true,\n }}\n extensions={[\n EditorView.lineWrapping,\n EditorView.theme({\n '.cm-content': {\n paddingTop: '8px',\n paddingBottom: '8px',\n paddingRight: '40px',\n },\n }),\n ]}\n placeholder=\"Write ClickHouse Query Here...\"\n />\n </Stack>\n );\n}\n"],"names":["EditorView","useTheme","InputLabel","Stack","CodeMirror","ClickQLEditor","props","theme","isDarkMode","palette","mode","position","sx","fontWeight","marginBottom","color","text","primary","style","border","divider","basicSetup","highlightActiveLine","highlightActiveLineGutter","foldGutter","syntaxHighlighting","extensions","lineWrapping","paddingTop","paddingBottom","paddingRight","placeholder"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,QAAQ,gBAAgB;AAE5D,OAAOC,gBAAgB,wBAAwB;AAK/C,OAAO,SAASC,cAAcC,KAAyB;IACrD,MAAMC,QAAQN;IACd,MAAMO,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,qBACE,MAACP;QAAMQ,UAAS;;0BACd,KAACT;gBACCU,IAAI;oBACFC,YAAY;oBACZC,cAAc;oBACdC,OAAOR,MAAME,OAAO,CAACO,IAAI,CAACC,OAAO;gBACnC;0BACD;;0BAGD,KAACb;gBACE,GAAGE,KAAK;gBACTY,OAAO;oBAAEC,QAAQ,CAAC,UAAU,EAAEZ,MAAME,OAAO,CAACW,OAAO,EAAE;gBAAC;gBACtDb,OAAOC,aAAa,SAAS;gBAC7Ba,YAAY;oBACVC,qBAAqB;oBACrBC,2BAA2B;oBAC3BC,YAAY;oBACZC,oBAAoB;gBACtB;gBACAC,YAAY;oBACV1B,WAAW2B,YAAY;oBACvB3B,WAAWO,KAAK,CAAC;wBACf,eAAe;4BACbqB,YAAY;4BACZC,eAAe;4BACfC,cAAc;wBAChB;oBACF;iBACD;gBACDC,aAAY;;;;AAIpB"}
@@ -10,6 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './ClickQLEditor';
13
+ export * from "./ClickQLEditor.js";
14
14
 
15
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ClickQLEditor';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB"}
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ClickQLEditor';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,qBAAkB"}
@@ -1,4 +1,4 @@
1
- import { DatasourcePlugin } from '@perses-dev/plugin-system';
2
- import { ClickHouseDatasourceSpec, ClickHouseDatasourceClient } from './click-house-datasource-types';
1
+ import type { DatasourcePlugin } from '@perses-dev/plugin-system';
2
+ import type { ClickHouseDatasourceSpec, ClickHouseDatasourceClient } from './click-house-datasource-types';
3
3
  export declare const ClickHouseDatasource: DatasourcePlugin<ClickHouseDatasourceSpec, ClickHouseDatasourceClient>;
4
4
  //# sourceMappingURL=ClickHouseDatasource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClickHouseDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AA2BtG,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,wBAAwB,EAAE,0BAA0B,CAIvG,CAAC"}
1
+ {"version":3,"file":"ClickHouseDatasource.d.ts","sourceRoot":"","sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasource.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,KAAK,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AA2B3G,eAAO,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,wBAAwB,EAAE,0BAA0B,CAIvG,CAAC"}
@@ -10,8 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import { query } from '../../model/click-house-client';
14
- import { ClickHouseDatasourceEditor } from './ClickHouseDatasourceEditor';
13
+ import { query } from "../../model/click-house-client.js";
14
+ import { ClickHouseDatasourceEditor } from "./ClickHouseDatasourceEditor.js";
15
15
  const createClient = (spec, options)=>{
16
16
  const { directUrl, proxy } = spec;
17
17
  const { proxyUrl } = options;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasource.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { DatasourcePlugin } from '@perses-dev/plugin-system';\nimport { query } from '../../model/click-house-client';\nimport { ClickHouseDatasourceSpec, ClickHouseDatasourceClient } from './click-house-datasource-types';\nimport { ClickHouseDatasourceEditor } from './ClickHouseDatasourceEditor';\n\nconst createClient: DatasourcePlugin<ClickHouseDatasourceSpec, ClickHouseDatasourceClient>['createClient'] = (\n spec,\n options\n) => {\n const { directUrl, proxy } = spec;\n const { proxyUrl } = options;\n\n const datasourceUrl = directUrl ?? proxyUrl;\n if (datasourceUrl === undefined) {\n throw new Error(\n 'No URL specified for ClickHouseDatasource client. You can use directUrl in the spec to configure it.'\n );\n }\n\n const specHeaders = proxy?.spec.headers || {};\n\n return {\n options: {\n datasourceUrl,\n },\n query: (params, headers) => query(params, { datasourceUrl, headers: headers ?? specHeaders }),\n };\n};\n\nexport const ClickHouseDatasource: DatasourcePlugin<ClickHouseDatasourceSpec, ClickHouseDatasourceClient> = {\n createClient,\n OptionsEditorComponent: ClickHouseDatasourceEditor,\n createInitialOptions: () => ({ directUrl: '' }),\n};\n"],"names":["query","ClickHouseDatasourceEditor","createClient","spec","options","directUrl","proxy","proxyUrl","datasourceUrl","undefined","Error","specHeaders","headers","params","ClickHouseDatasource","OptionsEditorComponent","createInitialOptions"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,KAAK,QAAQ,iCAAiC;AAEvD,SAASC,0BAA0B,QAAQ,+BAA+B;AAE1E,MAAMC,eAAuG,CAC3GC,MACAC;IAEA,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGH;IAC7B,MAAM,EAAEI,QAAQ,EAAE,GAAGH;IAErB,MAAMI,gBAAgBH,aAAaE;IACnC,IAAIC,kBAAkBC,WAAW;QAC/B,MAAM,IAAIC,MACR;IAEJ;IAEA,MAAMC,cAAcL,OAAOH,KAAKS,WAAW,CAAC;IAE5C,OAAO;QACLR,SAAS;YACPI;QACF;QACAR,OAAO,CAACa,QAAQD,UAAYZ,MAAMa,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;IAC7F;AACF;AAEA,OAAO,MAAMG,uBAA+F;IAC1GZ;IACAa,wBAAwBd;IACxBe,sBAAsB,IAAO,CAAA;YAAEX,WAAW;QAAG,CAAA;AAC/C,EAAE"}
1
+ {"version":3,"sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasource.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { DatasourcePlugin } from '@perses-dev/plugin-system';\n\nimport { query } from '../../model/click-house-client';\nimport type { ClickHouseDatasourceSpec, ClickHouseDatasourceClient } from './click-house-datasource-types';\nimport { ClickHouseDatasourceEditor } from './ClickHouseDatasourceEditor';\n\nconst createClient: DatasourcePlugin<ClickHouseDatasourceSpec, ClickHouseDatasourceClient>['createClient'] = (\n spec,\n options,\n) => {\n const { directUrl, proxy } = spec;\n const { proxyUrl } = options;\n\n const datasourceUrl = directUrl ?? proxyUrl;\n if (datasourceUrl === undefined) {\n throw new Error(\n 'No URL specified for ClickHouseDatasource client. You can use directUrl in the spec to configure it.',\n );\n }\n\n const specHeaders = proxy?.spec.headers || {};\n\n return {\n options: {\n datasourceUrl,\n },\n query: (params, headers) => query(params, { datasourceUrl, headers: headers ?? specHeaders }),\n };\n};\n\nexport const ClickHouseDatasource: DatasourcePlugin<ClickHouseDatasourceSpec, ClickHouseDatasourceClient> = {\n createClient,\n OptionsEditorComponent: ClickHouseDatasourceEditor,\n createInitialOptions: () => ({ directUrl: '' }),\n};\n"],"names":["query","ClickHouseDatasourceEditor","createClient","spec","options","directUrl","proxy","proxyUrl","datasourceUrl","undefined","Error","specHeaders","headers","params","ClickHouseDatasource","OptionsEditorComponent","createInitialOptions"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAASA,KAAK,QAAQ,oCAAiC;AAEvD,SAASC,0BAA0B,QAAQ,kCAA+B;AAE1E,MAAMC,eAAuG,CAC3GC,MACAC;IAEA,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGH;IAC7B,MAAM,EAAEI,QAAQ,EAAE,GAAGH;IAErB,MAAMI,gBAAgBH,aAAaE;IACnC,IAAIC,kBAAkBC,WAAW;QAC/B,MAAM,IAAIC,MACR;IAEJ;IAEA,MAAMC,cAAcL,OAAOH,KAAKS,WAAW,CAAC;IAE5C,OAAO;QACLR,SAAS;YACPI;QACF;QACAR,OAAO,CAACa,QAAQD,UAAYZ,MAAMa,QAAQ;gBAAEL;gBAAeI,SAASA,WAAWD;YAAY;IAC7F;AACF;AAEA,OAAO,MAAMG,uBAA+F;IAC1GZ;IACAa,wBAAwBd;IACxBe,sBAAsB,IAAO,CAAA;YAAEX,WAAW;QAAG,CAAA;AAC/C,EAAE"}
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { ClickHouseDatasourceSpec } from './click-house-datasource-types';
1
+ import type { ReactElement } from 'react';
2
+ import type { ClickHouseDatasourceSpec } from './click-house-datasource-types';
3
3
  export interface ClickHouseDatasourceEditorProps {
4
4
  value: ClickHouseDatasourceSpec;
5
5
  onChange: (next: ClickHouseDatasourceSpec) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ClickHouseDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,wBAAwB,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,YAAY,CA+B/F"}
1
+ {"version":3,"file":"ClickHouseDatasourceEditor.d.ts","sourceRoot":"","sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,wBAAwB,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,YAAY,CA+B/F"}
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { HTTPSettingsEditor } from '@perses-dev/plugin-system';
14
+ import { HTTPSettingsEditor } from "@perses-dev/plugin-system";
15
15
  export function ClickHouseDatasourceEditor(props) {
16
16
  const { value, onChange, isReadonly } = props;
17
17
  const initialSpecDirect = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { HTTPSettingsEditor } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { ClickHouseDatasourceSpec } from './click-house-datasource-types';\n\nexport interface ClickHouseDatasourceEditorProps {\n value: ClickHouseDatasourceSpec;\n onChange: (next: ClickHouseDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function ClickHouseDatasourceEditor(props: ClickHouseDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: ClickHouseDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: ClickHouseDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/',\n method: 'GET',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","ClickHouseDatasourceEditor","props","value","onChange","isReadonly","initialSpecDirect","directUrl","initialSpecProxy","proxy","kind","spec","allowedEndpoints","endpointPattern","method","url"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,kBAAkB,QAAQ,4BAA4B;AAU/D,OAAO,SAASC,2BAA2BC,KAAsC;IAC/E,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGH;IAExC,MAAMI,oBAA8C;QAClDC,WAAW;IACb;IAEA,MAAMC,mBAA6C;QACjDC,OAAO;YACLC,MAAM;YACNC,MAAM;gBACJC,kBAAkB;oBAChB;wBACEC,iBAAiB;wBACjBC,QAAQ;oBACV;iBACD;gBACDC,KAAK;YACP;QACF;IACF;IAEA,qBACE,KAACf;QACCG,OAAOA;QACPC,UAAUA;QACVC,YAAYA;QACZC,mBAAmBA;QACnBE,kBAAkBA;;AAGxB"}
1
+ {"version":3,"sources":["../../../../src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { HTTPSettingsEditor } from '@perses-dev/plugin-system';\nimport type { ReactElement } from 'react';\n\nimport type { ClickHouseDatasourceSpec } from './click-house-datasource-types';\n\nexport interface ClickHouseDatasourceEditorProps {\n value: ClickHouseDatasourceSpec;\n onChange: (next: ClickHouseDatasourceSpec) => void;\n isReadonly?: boolean;\n}\n\nexport function ClickHouseDatasourceEditor(props: ClickHouseDatasourceEditorProps): ReactElement {\n const { value, onChange, isReadonly } = props;\n\n const initialSpecDirect: ClickHouseDatasourceSpec = {\n directUrl: '',\n };\n\n const initialSpecProxy: ClickHouseDatasourceSpec = {\n proxy: {\n kind: 'HTTPProxy',\n spec: {\n allowedEndpoints: [\n {\n endpointPattern: '/',\n method: 'GET',\n },\n ],\n url: '',\n },\n },\n };\n\n return (\n <HTTPSettingsEditor\n value={value}\n onChange={onChange}\n isReadonly={isReadonly}\n initialSpecDirect={initialSpecDirect}\n initialSpecProxy={initialSpecProxy}\n />\n );\n}\n"],"names":["HTTPSettingsEditor","ClickHouseDatasourceEditor","props","value","onChange","isReadonly","initialSpecDirect","directUrl","initialSpecProxy","proxy","kind","spec","allowedEndpoints","endpointPattern","method","url"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,kBAAkB,QAAQ,4BAA4B;AAW/D,OAAO,SAASC,2BAA2BC,KAAsC;IAC/E,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAE,GAAGH;IAExC,MAAMI,oBAA8C;QAClDC,WAAW;IACb;IAEA,MAAMC,mBAA6C;QACjDC,OAAO;YACLC,MAAM;YACNC,MAAM;gBACJC,kBAAkB;oBAChB;wBACEC,iBAAiB;wBACjBC,QAAQ;oBACV;iBACD;gBACDC,KAAK;YACP;QACF;IACF;IAEA,qBACE,KAACf;QACCG,OAAOA;QACPC,UAAUA;QACVC,YAAYA;QACZC,mBAAmBA;QACnBE,kBAAkBA;;AAGxB"}
@@ -1,6 +1,6 @@
1
- import { RequestHeaders } from '@perses-dev/client';
2
- import { DatasourceClient } from '@perses-dev/plugin-system';
3
- import { HTTPProxy } from '@perses-dev/spec';
1
+ import type { RequestHeaders } from '@perses-dev/client';
2
+ import type { DatasourceClient } from '@perses-dev/plugin-system';
3
+ import type { HTTPProxy } from '@perses-dev/spec';
4
4
  export interface ClickHouseDatasourceSpec {
5
5
  directUrl?: string;
6
6
  proxy?: HTTPProxy;
@@ -1 +1 @@
1
- {"version":3,"file":"click-house-datasource-types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/click-house-datasource/click-house-datasource-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,UAAU,sBAAuB,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,iCAAiC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,OAAO,EAAE,iCAAiC,CAAC;IAC3C,KAAK,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACxG"}
1
+ {"version":3,"file":"click-house-datasource-types.d.ts","sourceRoot":"","sources":["../../../../src/datasources/click-house-datasource/click-house-datasource-types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,UAAU,sBAAuB,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,iCAAiC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,OAAO,EAAE,iCAAiC,CAAC;IAC3C,KAAK,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACxG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/datasources/click-house-datasource/click-house-datasource-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { RequestHeaders } from '@perses-dev/client';\nimport { DatasourceClient } from '@perses-dev/plugin-system';\nimport { HTTPProxy } from '@perses-dev/spec';\n\nexport interface ClickHouseDatasourceSpec {\n directUrl?: string;\n proxy?: HTTPProxy;\n}\n\ninterface QueryRequestParameters extends Record<string, string> {\n query: string;\n start: string;\n end: string;\n}\n\ninterface ClickHouseDatasourceClientOptions {\n datasourceUrl: string;\n headers?: RequestHeaders;\n}\n\nexport interface ClickHouseDatasourceResponse {\n status: string;\n warnings?: string[];\n // TODO: adjust this type to match your datasource response shape\n data: unknown;\n}\n\nexport interface ClickHouseDatasourceClient extends DatasourceClient {\n options: ClickHouseDatasourceClientOptions;\n query(params: QueryRequestParameters, headers?: RequestHeaders): Promise<ClickHouseDatasourceResponse>;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA6BjC,WAGC"}
1
+ {"version":3,"sources":["../../../../src/datasources/click-house-datasource/click-house-datasource-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { RequestHeaders } from '@perses-dev/client';\nimport type { DatasourceClient } from '@perses-dev/plugin-system';\nimport type { HTTPProxy } from '@perses-dev/spec';\n\nexport interface ClickHouseDatasourceSpec {\n directUrl?: string;\n proxy?: HTTPProxy;\n}\n\ninterface QueryRequestParameters extends Record<string, string> {\n query: string;\n start: string;\n end: string;\n}\n\ninterface ClickHouseDatasourceClientOptions {\n datasourceUrl: string;\n headers?: RequestHeaders;\n}\n\nexport interface ClickHouseDatasourceResponse {\n status: string;\n warnings?: string[];\n // TODO: adjust this type to match your datasource response shape\n data: unknown;\n}\n\nexport interface ClickHouseDatasourceClient extends DatasourceClient {\n options: ClickHouseDatasourceClientOptions;\n query(params: QueryRequestParameters, headers?: RequestHeaders): Promise<ClickHouseDatasourceResponse>;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA6BjC,WAGC"}
@@ -10,8 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './ClickHouseDatasource';
14
- export * from './ClickHouseDatasourceEditor';
15
- export * from './click-house-datasource-types';
13
+ export * from "./ClickHouseDatasource.js";
14
+ export * from "./ClickHouseDatasourceEditor.js";
15
+ export * from "./click-house-datasource-types.js";
16
16
 
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/datasources/click-house-datasource/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ClickHouseDatasource';\nexport * from './ClickHouseDatasourceEditor';\nexport * from './click-house-datasource-types';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,yBAAyB;AACvC,cAAc,+BAA+B;AAC7C,cAAc,iCAAiC"}
1
+ {"version":3,"sources":["../../../../src/datasources/click-house-datasource/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ClickHouseDatasource';\nexport * from './ClickHouseDatasourceEditor';\nexport * from './click-house-datasource-types';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,oCAAiC"}
@@ -10,6 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './click-house-datasource';
13
+ export * from "./click-house-datasource/index.js";
14
14
 
15
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/datasources/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './click-house-datasource';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,2BAA2B"}
1
+ {"version":3,"sources":["../../../src/datasources/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './click-house-datasource';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,oCAA2B"}
@@ -1,4 +1,4 @@
1
- import { PluginModuleResource } from '@perses-dev/plugin-system';
1
+ import type { PluginModuleResource } from '@perses-dev/plugin-system';
2
2
  /**
3
3
  * Returns the plugin module information from package.json
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAGnF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
1
+ {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAIxF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
@@ -10,7 +10,9 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import packageJson from '../package.json';
13
+ import packageJson from "../package.json" with {
14
+ type: 'json'
15
+ };
14
16
  /**
15
17
  * Returns the plugin module information from package.json
16
18
  */ export function getPluginModule() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,OAAOA,iBAAiB,kBAAkB;AAE1C;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
1
+ {"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\n\nimport packageJson from '../package.json' with { type: 'json' };\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","type","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAOA,iBAAiB,uBAAuB;IAAEC,MAAM;AAAO,EAAE;AAEhE;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGL;IAClC,OAAO;QACLM,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
@@ -10,6 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import('./bootstrap');
13
+ import("./bootstrap.js");
14
14
 
15
15
  //# sourceMappingURL=index-federation.js.map
package/lib/index.js CHANGED
@@ -10,8 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export { getPluginModule } from './getPluginModule';
14
- export * from './queries';
15
- export * from './datasources';
13
+ export { getPluginModule } from "./getPluginModule.js";
14
+ export * from "./queries/index.js";
15
+ export * from "./datasources/index.js";
16
16
 
17
17
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { getPluginModule } from './getPluginModule';\nexport * from './queries';\nexport * from './datasources';\n"],"names":["getPluginModule"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAe,QAAQ,oBAAoB;AACpD,cAAc,YAAY;AAC1B,cAAc,gBAAgB"}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { getPluginModule } from './getPluginModule';\nexport * from './queries';\nexport * from './datasources';\n"],"names":["getPluginModule"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAe,QAAQ,uBAAoB;AACpD,cAAc,qBAAY;AAC1B,cAAc,yBAAgB"}
@@ -1,4 +1,4 @@
1
- import { RequestHeaders } from '@perses-dev/client';
1
+ import type { RequestHeaders } from '@perses-dev/client';
2
2
  export interface ClickHouseQueryParams {
3
3
  query: string;
4
4
  start?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"click-house-client.d.ts","sourceRoot":"","sources":["../../../src/model/click-house-client.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACpG;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAK3D;AAED,wBAAsB,KAAK,CACzB,MAAM,EAAE,qBAAqB,EAC7B,YAAY,EAAE,sBAAsB,GACnC,OAAO,CAAC,uBAAuB,CAAC,CA4ClC"}
1
+ {"version":3,"file":"click-house-client.d.ts","sourceRoot":"","sources":["../../../src/model/click-house-client.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACpG;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAK3D;AAED,wBAAsB,KAAK,CACzB,MAAM,EAAE,qBAAqB,EAC7B,YAAY,EAAE,sBAAsB,GACnC,OAAO,CAAC,uBAAuB,CAAC,CA4ClC"}
@@ -50,7 +50,9 @@ export async function query(params, queryOptions) {
50
50
  data: body.data || body
51
51
  };
52
52
  } catch (e) {
53
- throw new Error(`ClickHouse query failed: ${e}`);
53
+ throw new Error(`ClickHouse query failed: ${e}`, {
54
+ cause: e
55
+ });
54
56
  }
55
57
  }
56
58
  function urlBuilder(datasourceUrl) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/model/click-house-client.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { RequestHeaders } from '@perses-dev/client';\n\nexport interface ClickHouseQueryParams {\n query: string;\n start?: string;\n end?: string;\n database?: string;\n}\n\nexport interface ClickHouseQueryOptions {\n datasourceUrl: string;\n headers?: RequestHeaders;\n}\n\nexport interface ClickHouseQueryResponse {\n status: 'success' | 'error';\n data: unknown;\n}\n\nexport interface ClickHouseClient {\n query: (params: { start: string; end: string; query: string }) => Promise<ClickHouseQueryResponse>;\n}\n\nexport function replaceTimeRangePlaceholders(query: string, start?: string, end?: string): string {\n return query.replaceAll('{start}', start ?? '{start}').replaceAll('{end}', end ?? '{end}');\n}\n\nexport function formatClickHouseDateTime(date: Date): string {\n return date\n .toISOString()\n .replace('T', ' ')\n .replace(/\\.\\d{3}Z$/, '');\n}\n\nexport async function query(\n params: ClickHouseQueryParams,\n queryOptions: ClickHouseQueryOptions\n): Promise<ClickHouseQueryResponse> {\n const { datasourceUrl, headers } = queryOptions;\n\n const url = urlBuilder(datasourceUrl);\n if (!params.query) {\n throw new Error('No query provided in params');\n }\n\n let finalQuery = replaceTimeRangePlaceholders(params.query.trim(), params.start, params.end);\n if (!finalQuery.toUpperCase().includes('FORMAT')) {\n finalQuery += ' FORMAT JSON';\n }\n\n url.searchParams.set('query', finalQuery);\n url.searchParams.set('database', params.database || 'default');\n\n const init = {\n method: 'GET',\n headers: {\n ...headers,\n },\n };\n\n try {\n const response = await fetch(url.toString(), init);\n\n if (!response.ok) {\n const errorText = await response.text();\n console.error('ClickHouse error response:', errorText);\n return {\n status: 'error',\n data: [],\n };\n }\n\n const body = await response.json();\n\n return {\n status: 'success',\n data: body.data || body,\n };\n } catch (e) {\n throw new Error(`ClickHouse query failed: ${e}`);\n }\n}\n\nfunction urlBuilder(datasourceUrl: string): URL {\n if (datasourceUrl.startsWith('http://') || datasourceUrl.startsWith('https://')) {\n return new URL(datasourceUrl);\n }\n // if relative path (e.g. proxy url), resolve against window.location.origin\n return new URL(datasourceUrl, window.location.origin);\n}\n"],"names":["replaceTimeRangePlaceholders","query","start","end","replaceAll","formatClickHouseDateTime","date","toISOString","replace","params","queryOptions","datasourceUrl","headers","url","urlBuilder","Error","finalQuery","trim","toUpperCase","includes","searchParams","set","database","init","method","response","fetch","toString","ok","errorText","text","console","error","status","data","body","json","e","startsWith","URL","window","location","origin"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAyBjC,OAAO,SAASA,6BAA6BC,KAAa,EAAEC,KAAc,EAAEC,GAAY;IACtF,OAAOF,MAAMG,UAAU,CAAC,WAAWF,SAAS,WAAWE,UAAU,CAAC,SAASD,OAAO;AACpF;AAEA,OAAO,SAASE,yBAAyBC,IAAU;IACjD,OAAOA,KACJC,WAAW,GACXC,OAAO,CAAC,KAAK,KACbA,OAAO,CAAC,aAAa;AAC1B;AAEA,OAAO,eAAeP,MACpBQ,MAA6B,EAC7BC,YAAoC;IAEpC,MAAM,EAAEC,aAAa,EAAEC,OAAO,EAAE,GAAGF;IAEnC,MAAMG,MAAMC,WAAWH;IACvB,IAAI,CAACF,OAAOR,KAAK,EAAE;QACjB,MAAM,IAAIc,MAAM;IAClB;IAEA,IAAIC,aAAahB,6BAA6BS,OAAOR,KAAK,CAACgB,IAAI,IAAIR,OAAOP,KAAK,EAAEO,OAAON,GAAG;IAC3F,IAAI,CAACa,WAAWE,WAAW,GAAGC,QAAQ,CAAC,WAAW;QAChDH,cAAc;IAChB;IAEAH,IAAIO,YAAY,CAACC,GAAG,CAAC,SAASL;IAC9BH,IAAIO,YAAY,CAACC,GAAG,CAAC,YAAYZ,OAAOa,QAAQ,IAAI;IAEpD,MAAMC,OAAO;QACXC,QAAQ;QACRZ,SAAS;YACP,GAAGA,OAAO;QACZ;IACF;IAEA,IAAI;QACF,MAAMa,WAAW,MAAMC,MAAMb,IAAIc,QAAQ,IAAIJ;QAE7C,IAAI,CAACE,SAASG,EAAE,EAAE;YAChB,MAAMC,YAAY,MAAMJ,SAASK,IAAI;YACrCC,QAAQC,KAAK,CAAC,8BAA8BH;YAC5C,OAAO;gBACLI,QAAQ;gBACRC,MAAM,EAAE;YACV;QACF;QAEA,MAAMC,OAAO,MAAMV,SAASW,IAAI;QAEhC,OAAO;YACLH,QAAQ;YACRC,MAAMC,KAAKD,IAAI,IAAIC;QACrB;IACF,EAAE,OAAOE,GAAG;QACV,MAAM,IAAItB,MAAM,CAAC,yBAAyB,EAAEsB,GAAG;IACjD;AACF;AAEA,SAASvB,WAAWH,aAAqB;IACvC,IAAIA,cAAc2B,UAAU,CAAC,cAAc3B,cAAc2B,UAAU,CAAC,aAAa;QAC/E,OAAO,IAAIC,IAAI5B;IACjB;IACA,4EAA4E;IAC5E,OAAO,IAAI4B,IAAI5B,eAAe6B,OAAOC,QAAQ,CAACC,MAAM;AACtD"}
1
+ {"version":3,"sources":["../../../src/model/click-house-client.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { RequestHeaders } from '@perses-dev/client';\n\nexport interface ClickHouseQueryParams {\n query: string;\n start?: string;\n end?: string;\n database?: string;\n}\n\nexport interface ClickHouseQueryOptions {\n datasourceUrl: string;\n headers?: RequestHeaders;\n}\n\nexport interface ClickHouseQueryResponse {\n status: 'success' | 'error';\n data: unknown;\n}\n\nexport interface ClickHouseClient {\n query: (params: { start: string; end: string; query: string }) => Promise<ClickHouseQueryResponse>;\n}\n\nexport function replaceTimeRangePlaceholders(query: string, start?: string, end?: string): string {\n return query.replaceAll('{start}', start ?? '{start}').replaceAll('{end}', end ?? '{end}');\n}\n\nexport function formatClickHouseDateTime(date: Date): string {\n return date\n .toISOString()\n .replace('T', ' ')\n .replace(/\\.\\d{3}Z$/, '');\n}\n\nexport async function query(\n params: ClickHouseQueryParams,\n queryOptions: ClickHouseQueryOptions,\n): Promise<ClickHouseQueryResponse> {\n const { datasourceUrl, headers } = queryOptions;\n\n const url = urlBuilder(datasourceUrl);\n if (!params.query) {\n throw new Error('No query provided in params');\n }\n\n let finalQuery = replaceTimeRangePlaceholders(params.query.trim(), params.start, params.end);\n if (!finalQuery.toUpperCase().includes('FORMAT')) {\n finalQuery += ' FORMAT JSON';\n }\n\n url.searchParams.set('query', finalQuery);\n url.searchParams.set('database', params.database || 'default');\n\n const init = {\n method: 'GET',\n headers: {\n ...headers,\n },\n };\n\n try {\n const response = await fetch(url.toString(), init);\n\n if (!response.ok) {\n const errorText = await response.text();\n console.error('ClickHouse error response:', errorText);\n return {\n status: 'error',\n data: [],\n };\n }\n\n const body = await response.json();\n\n return {\n status: 'success',\n data: body.data || body,\n };\n } catch (e) {\n throw new Error(`ClickHouse query failed: ${e}`, { cause: e });\n }\n}\n\nfunction urlBuilder(datasourceUrl: string): URL {\n if (datasourceUrl.startsWith('http://') || datasourceUrl.startsWith('https://')) {\n return new URL(datasourceUrl);\n }\n // if relative path (e.g. proxy url), resolve against window.location.origin\n return new URL(datasourceUrl, window.location.origin);\n}\n"],"names":["replaceTimeRangePlaceholders","query","start","end","replaceAll","formatClickHouseDateTime","date","toISOString","replace","params","queryOptions","datasourceUrl","headers","url","urlBuilder","Error","finalQuery","trim","toUpperCase","includes","searchParams","set","database","init","method","response","fetch","toString","ok","errorText","text","console","error","status","data","body","json","e","cause","startsWith","URL","window","location","origin"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAyBjC,OAAO,SAASA,6BAA6BC,KAAa,EAAEC,KAAc,EAAEC,GAAY;IACtF,OAAOF,MAAMG,UAAU,CAAC,WAAWF,SAAS,WAAWE,UAAU,CAAC,SAASD,OAAO;AACpF;AAEA,OAAO,SAASE,yBAAyBC,IAAU;IACjD,OAAOA,KACJC,WAAW,GACXC,OAAO,CAAC,KAAK,KACbA,OAAO,CAAC,aAAa;AAC1B;AAEA,OAAO,eAAeP,MACpBQ,MAA6B,EAC7BC,YAAoC;IAEpC,MAAM,EAAEC,aAAa,EAAEC,OAAO,EAAE,GAAGF;IAEnC,MAAMG,MAAMC,WAAWH;IACvB,IAAI,CAACF,OAAOR,KAAK,EAAE;QACjB,MAAM,IAAIc,MAAM;IAClB;IAEA,IAAIC,aAAahB,6BAA6BS,OAAOR,KAAK,CAACgB,IAAI,IAAIR,OAAOP,KAAK,EAAEO,OAAON,GAAG;IAC3F,IAAI,CAACa,WAAWE,WAAW,GAAGC,QAAQ,CAAC,WAAW;QAChDH,cAAc;IAChB;IAEAH,IAAIO,YAAY,CAACC,GAAG,CAAC,SAASL;IAC9BH,IAAIO,YAAY,CAACC,GAAG,CAAC,YAAYZ,OAAOa,QAAQ,IAAI;IAEpD,MAAMC,OAAO;QACXC,QAAQ;QACRZ,SAAS;YACP,GAAGA,OAAO;QACZ;IACF;IAEA,IAAI;QACF,MAAMa,WAAW,MAAMC,MAAMb,IAAIc,QAAQ,IAAIJ;QAE7C,IAAI,CAACE,SAASG,EAAE,EAAE;YAChB,MAAMC,YAAY,MAAMJ,SAASK,IAAI;YACrCC,QAAQC,KAAK,CAAC,8BAA8BH;YAC5C,OAAO;gBACLI,QAAQ;gBACRC,MAAM,EAAE;YACV;QACF;QAEA,MAAMC,OAAO,MAAMV,SAASW,IAAI;QAEhC,OAAO;YACLH,QAAQ;YACRC,MAAMC,KAAKD,IAAI,IAAIC;QACrB;IACF,EAAE,OAAOE,GAAG;QACV,MAAM,IAAItB,MAAM,CAAC,yBAAyB,EAAEsB,GAAG,EAAE;YAAEC,OAAOD;QAAE;IAC9D;AACF;AAEA,SAASvB,WAAWH,aAAqB;IACvC,IAAIA,cAAc4B,UAAU,CAAC,cAAc5B,cAAc4B,UAAU,CAAC,aAAa;QAC/E,OAAO,IAAIC,IAAI7B;IACjB;IACA,4EAA4E;IAC5E,OAAO,IAAI6B,IAAI7B,eAAe8B,OAAOC,QAAQ,CAACC,MAAM;AACtD"}
@@ -1,4 +1,4 @@
1
- import { LogData, TimeSeriesData } from '@perses-dev/spec';
1
+ import type { LogData, TimeSeriesData } from '@perses-dev/spec';
2
2
  export interface ClickHouseTimeSeriesData extends TimeSeriesData {
3
3
  logs?: LogData;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"click-house-data-types.d.ts","sourceRoot":"","sources":["../../../src/model/click-house-data-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD"}
1
+ {"version":3,"file":"click-house-data-types.d.ts","sourceRoot":"","sources":["../../../src/model/click-house-data-types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEhE,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/model/click-house-data-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { LogData, TimeSeriesData } from '@perses-dev/spec';\n\nexport interface ClickHouseTimeSeriesData extends TimeSeriesData {\n logs?: LogData;\n}\n\nexport interface TimeSeriesEntry {\n time: string;\n [key: string]: number | string | null | undefined;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAQjC,WAGC"}
1
+ {"version":3,"sources":["../../../src/model/click-house-data-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { LogData, TimeSeriesData } from '@perses-dev/spec';\n\nexport interface ClickHouseTimeSeriesData extends TimeSeriesData {\n logs?: LogData;\n}\n\nexport interface TimeSeriesEntry {\n time: string;\n [key: string]: number | string | null | undefined;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAQjC,WAGC"}
@@ -1,4 +1,4 @@
1
- import { LogQueryPlugin } from '@perses-dev/plugin-system';
2
- import { ClickHouseLogQuerySpec } from './click-house-log-query-types';
1
+ import type { LogQueryPlugin } from '@perses-dev/plugin-system';
2
+ import type { ClickHouseLogQuerySpec } from './click-house-log-query-types';
3
3
  export declare const ClickHouseLogQuery: LogQueryPlugin<ClickHouseLogQuerySpec>;
4
4
  //# sourceMappingURL=ClickHouseLogQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClickHouseLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQuery.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAkB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,sBAAsB,CAarE,CAAC"}
1
+ {"version":3,"file":"ClickHouseLogQuery.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQuery.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAI5E,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,sBAAsB,CAarE,CAAC"}
@@ -10,9 +10,9 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import { parseVariables } from '@perses-dev/plugin-system';
14
- import { getClickHouseLogData } from './get-click-house-log-data';
15
- import { ClickHouseLogQueryEditor } from './ClickHouseLogQueryEditor';
13
+ import { parseVariables } from "@perses-dev/plugin-system";
14
+ import { ClickHouseLogQueryEditor } from "./ClickHouseLogQueryEditor.js";
15
+ import { getClickHouseLogData } from "./get-click-house-log-data.js";
16
16
  export const ClickHouseLogQuery = {
17
17
  getLogData: getClickHouseLogData,
18
18
  OptionsEditorComponent: ClickHouseLogQueryEditor,
@@ -22,9 +22,7 @@ export const ClickHouseLogQuery = {
22
22
  dependsOn: (spec)=>{
23
23
  const queryVariables = parseVariables(spec.query);
24
24
  const allVariables = [
25
- ...new Set([
26
- ...queryVariables
27
- ])
25
+ ...new Set(queryVariables)
28
26
  ];
29
27
  return {
30
28
  variables: allVariables
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQuery.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { parseVariables, LogQueryPlugin } from '@perses-dev/plugin-system';\nimport { getClickHouseLogData } from './get-click-house-log-data';\nimport { ClickHouseLogQueryEditor } from './ClickHouseLogQueryEditor';\nimport { ClickHouseLogQuerySpec } from './click-house-log-query-types';\n\nexport const ClickHouseLogQuery: LogQueryPlugin<ClickHouseLogQuerySpec> = {\n getLogData: getClickHouseLogData,\n OptionsEditorComponent: ClickHouseLogQueryEditor,\n createInitialOptions: () => ({ query: '' }),\n dependsOn: (spec) => {\n const queryVariables = parseVariables(spec.query);\n const allVariables = [...new Set([...queryVariables])];\n return {\n variables: allVariables,\n };\n },\n // TODO: Implement proper SQL parsing for volume queries\n createVolumeQuery: () => null,\n};\n"],"names":["parseVariables","getClickHouseLogData","ClickHouseLogQueryEditor","ClickHouseLogQuery","getLogData","OptionsEditorComponent","createInitialOptions","query","dependsOn","spec","queryVariables","allVariables","Set","variables","createVolumeQuery"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,cAAc,QAAwB,4BAA4B;AAC3E,SAASC,oBAAoB,QAAQ,6BAA6B;AAClE,SAASC,wBAAwB,QAAQ,6BAA6B;AAGtE,OAAO,MAAMC,qBAA6D;IACxEC,YAAYH;IACZI,wBAAwBH;IACxBI,sBAAsB,IAAO,CAAA;YAAEC,OAAO;QAAG,CAAA;IACzCC,WAAW,CAACC;QACV,MAAMC,iBAAiBV,eAAeS,KAAKF,KAAK;QAChD,MAAMI,eAAe;eAAI,IAAIC,IAAI;mBAAIF;aAAe;SAAE;QACtD,OAAO;YACLG,WAAWF;QACb;IACF;IACA,wDAAwD;IACxDG,mBAAmB,IAAM;AAC3B,EAAE"}
1
+ {"version":3,"sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQuery.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { LogQueryPlugin } from '@perses-dev/plugin-system';\nimport { parseVariables } from '@perses-dev/plugin-system';\n\nimport type { ClickHouseLogQuerySpec } from './click-house-log-query-types';\nimport { ClickHouseLogQueryEditor } from './ClickHouseLogQueryEditor';\nimport { getClickHouseLogData } from './get-click-house-log-data';\n\nexport const ClickHouseLogQuery: LogQueryPlugin<ClickHouseLogQuerySpec> = {\n getLogData: getClickHouseLogData,\n OptionsEditorComponent: ClickHouseLogQueryEditor,\n createInitialOptions: () => ({ query: '' }),\n dependsOn: (spec) => {\n const queryVariables = parseVariables(spec.query);\n const allVariables = [...new Set(queryVariables)];\n return {\n variables: allVariables,\n };\n },\n // TODO: Implement proper SQL parsing for volume queries\n createVolumeQuery: () => null,\n};\n"],"names":["parseVariables","ClickHouseLogQueryEditor","getClickHouseLogData","ClickHouseLogQuery","getLogData","OptionsEditorComponent","createInitialOptions","query","dependsOn","spec","queryVariables","allVariables","Set","variables","createVolumeQuery"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,cAAc,QAAQ,4BAA4B;AAG3D,SAASC,wBAAwB,QAAQ,gCAA6B;AACtE,SAASC,oBAAoB,QAAQ,gCAA6B;AAElE,OAAO,MAAMC,qBAA6D;IACxEC,YAAYF;IACZG,wBAAwBJ;IACxBK,sBAAsB,IAAO,CAAA;YAAEC,OAAO;QAAG,CAAA;IACzCC,WAAW,CAACC;QACV,MAAMC,iBAAiBV,eAAeS,KAAKF,KAAK;QAChD,MAAMI,eAAe;eAAI,IAAIC,IAAIF;SAAgB;QACjD,OAAO;YACLG,WAAWF;QACb;IACF;IACA,wDAAwD;IACxDG,mBAAmB,IAAM;AAC3B,EAAE"}
@@ -1,6 +1,6 @@
1
- import { OptionsEditorProps } from '@perses-dev/plugin-system';
2
- import { ReactElement } from 'react';
3
- import { ClickHouseLogQuerySpec } from './click-house-log-query-types';
1
+ import type { OptionsEditorProps } from '@perses-dev/plugin-system';
2
+ import type { ReactElement } from 'react';
3
+ import type { ClickHouseLogQuerySpec } from './click-house-log-query-types';
4
4
  type ClickHouseQueryEditorProps = OptionsEditorProps<ClickHouseLogQuerySpec>;
5
5
  export declare function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): ReactElement;
6
6
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ClickHouseLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAIL,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAe,MAAM,OAAO,CAAC;AAQlD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,KAAK,0BAA0B,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAE7E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,0BAA0B,GAAG,YAAY,CAsExF"}
1
+ {"version":3,"file":"ClickHouseLogQueryEditor.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAyB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E,KAAK,0BAA0B,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAE7E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,0BAA0B,GAAG,YAAY,CAsExF"}
@@ -11,15 +11,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { DatasourceSelect, isVariableDatasource } from '@perses-dev/plugin-system';
15
- import { useCallback } from 'react';
16
- import { produce } from 'immer';
17
- import { Stack } from '@mui/material';
18
- import { createModEnterHandler } from '@perses-dev/dashboards';
19
- import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants';
20
- import { ClickQLEditor } from '../../components';
21
- import { queryExample } from '../../components/constants';
22
- import { useQueryState } from '../query-editor-model';
14
+ import { Stack } from "@mui/material";
15
+ import { createModEnterHandler } from "@perses-dev/dashboards";
16
+ import { DatasourceSelect, isVariableDatasource } from "@perses-dev/plugin-system";
17
+ import { produce } from "immer";
18
+ import { useCallback } from "react";
19
+ import { ClickQLEditor } from "../../components/index.js";
20
+ import { queryExample } from "../../components/constants.js";
21
+ import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from "../constants.js";
22
+ import { useQueryState } from "../query-editor-model.js";
23
23
  export function ClickHouseLogQueryEditor(props) {
24
24
  const { onChange, value } = props;
25
25
  const { datasource } = value;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport {\n DatasourceSelect,\n DatasourceSelectProps,\n isVariableDatasource,\n OptionsEditorProps,\n} from '@perses-dev/plugin-system';\nimport { ReactElement, useCallback } from 'react';\nimport { produce } from 'immer';\nimport { Stack } from '@mui/material';\nimport { createModEnterHandler } from '@perses-dev/dashboards';\nimport { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants';\nimport { ClickQLEditor } from '../../components';\nimport { queryExample } from '../../components/constants';\nimport { useQueryState } from '../query-editor-model';\nimport { ClickHouseLogQuerySpec } from './click-house-log-query-types';\n\ntype ClickHouseQueryEditorProps = OptionsEditorProps<ClickHouseLogQuerySpec>;\n\nexport function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): ReactElement {\n const { onChange, value } = props;\n const { datasource } = value;\n const selectedDatasource = datasource ?? DEFAULT_DATASOURCE;\n const { query, handleQueryChange, handleQueryBlur } = useQueryState(props);\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => {\n if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) {\n onChange(\n produce(value, (draft) => {\n draft.datasource = newDatasourceSelection;\n })\n );\n return;\n }\n throw new Error('Got unexpected non ClickHouse datasource selection');\n };\n\n // Immediate query execution on Enter or blur\n const handleQueryExecute = (query: string): void => {\n onChange(\n produce(value, (draft) => {\n draft.query = query;\n })\n );\n };\n\n const handleClickHouseQueryChange = useCallback(\n (e: string) => {\n handleQueryChange(e);\n },\n [handleQueryChange]\n );\n\n const examplesStyle: React.CSSProperties = {\n fontSize: '11px',\n color: '#777',\n backgroundColor: '#f5f5f5',\n padding: '8px',\n borderRadius: '4px',\n fontFamily: 'Monaco, Menlo, \"Ubuntu Mono\", monospace',\n whiteSpace: 'pre-wrap',\n lineHeight: '1.3',\n };\n\n return (\n <Stack spacing={1.5}>\n <DatasourceSelect\n datasourcePluginKind={DATASOURCE_KIND}\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n label=\"ClickHouse Datasource\"\n notched\n />\n <ClickQLEditor\n value={query}\n onChange={handleClickHouseQueryChange}\n onBlur={handleQueryBlur}\n onKeyDown={createModEnterHandler(() => handleQueryExecute(query))}\n placeholder=\"Enter ClickHouse SQL query\"\n />\n\n <details>\n <summary style={{ cursor: 'pointer', fontSize: '12px', color: '#666', marginBottom: '8px' }}>\n Query Examples\n </summary>\n <div style={examplesStyle}>{queryExample}</div>\n </details>\n </Stack>\n );\n}\n"],"names":["DatasourceSelect","isVariableDatasource","useCallback","produce","Stack","createModEnterHandler","DATASOURCE_KIND","DEFAULT_DATASOURCE","ClickQLEditor","queryExample","useQueryState","ClickHouseLogQueryEditor","props","onChange","value","datasource","selectedDatasource","query","handleQueryChange","handleQueryBlur","handleDatasourceChange","newDatasourceSelection","kind","draft","Error","handleQueryExecute","handleClickHouseQueryChange","e","examplesStyle","fontSize","color","backgroundColor","padding","borderRadius","fontFamily","whiteSpace","lineHeight","spacing","datasourcePluginKind","label","notched","onBlur","onKeyDown","placeholder","details","summary","style","cursor","marginBottom","div"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SACEA,gBAAgB,EAEhBC,oBAAoB,QAEf,4BAA4B;AACnC,SAAuBC,WAAW,QAAQ,QAAQ;AAClD,SAASC,OAAO,QAAQ,QAAQ;AAChC,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,eAAe;AACnE,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,aAAa,QAAQ,wBAAwB;AAKtD,OAAO,SAASC,yBAAyBC,KAAiC;IACxE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAC5B,MAAM,EAAEG,UAAU,EAAE,GAAGD;IACvB,MAAME,qBAAqBD,cAAcR;IACzC,MAAM,EAAEU,KAAK,EAAEC,iBAAiB,EAAEC,eAAe,EAAE,GAAGT,cAAcE;IAEpE,MAAMQ,yBAA4D,CAACC;QACjE,IAAI,CAACpB,qBAAqBoB,2BAA2BA,uBAAuBC,IAAI,KAAKhB,iBAAiB;YACpGO,SACEV,QAAQW,OAAO,CAACS;gBACdA,MAAMR,UAAU,GAAGM;YACrB;YAEF;QACF;QACA,MAAM,IAAIG,MAAM;IAClB;IAEA,6CAA6C;IAC7C,MAAMC,qBAAqB,CAACR;QAC1BJ,SACEV,QAAQW,OAAO,CAACS;YACdA,MAAMN,KAAK,GAAGA;QAChB;IAEJ;IAEA,MAAMS,8BAA8BxB,YAClC,CAACyB;QACCT,kBAAkBS;IACpB,GACA;QAACT;KAAkB;IAGrB,MAAMU,gBAAqC;QACzCC,UAAU;QACVC,OAAO;QACPC,iBAAiB;QACjBC,SAAS;QACTC,cAAc;QACdC,YAAY;QACZC,YAAY;QACZC,YAAY;IACd;IAEA,qBACE,MAAChC;QAAMiC,SAAS;;0BACd,KAACrC;gBACCsC,sBAAsBhC;gBACtBQ,OAAOE;gBACPH,UAAUO;gBACVmB,OAAM;gBACNC,OAAO;;0BAET,KAAChC;gBACCM,OAAOG;gBACPJ,UAAUa;gBACVe,QAAQtB;gBACRuB,WAAWrC,sBAAsB,IAAMoB,mBAAmBR;gBAC1D0B,aAAY;;0BAGd,MAACC;;kCACC,KAACC;wBAAQC,OAAO;4BAAEC,QAAQ;4BAAWlB,UAAU;4BAAQC,OAAO;4BAAQkB,cAAc;wBAAM;kCAAG;;kCAG7F,KAACC;wBAAIH,OAAOlB;kCAAgBnB;;;;;;AAIpC"}
1
+ {"version":3,"sources":["../../../../src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Stack } from '@mui/material';\nimport { createModEnterHandler } from '@perses-dev/dashboards';\nimport type { DatasourceSelectProps, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { DatasourceSelect, isVariableDatasource } from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport type { ReactElement } from 'react';\nimport { useCallback } from 'react';\n\nimport { ClickQLEditor } from '../../components';\nimport { queryExample } from '../../components/constants';\nimport { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants';\nimport { useQueryState } from '../query-editor-model';\nimport type { ClickHouseLogQuerySpec } from './click-house-log-query-types';\n\ntype ClickHouseQueryEditorProps = OptionsEditorProps<ClickHouseLogQuerySpec>;\n\nexport function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): ReactElement {\n const { onChange, value } = props;\n const { datasource } = value;\n const selectedDatasource = datasource ?? DEFAULT_DATASOURCE;\n const { query, handleQueryChange, handleQueryBlur } = useQueryState(props);\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = (newDatasourceSelection) => {\n if (!isVariableDatasource(newDatasourceSelection) && newDatasourceSelection.kind === DATASOURCE_KIND) {\n onChange(\n produce(value, (draft) => {\n draft.datasource = newDatasourceSelection;\n }),\n );\n return;\n }\n throw new Error('Got unexpected non ClickHouse datasource selection');\n };\n\n // Immediate query execution on Enter or blur\n const handleQueryExecute = (query: string): void => {\n onChange(\n produce(value, (draft) => {\n draft.query = query;\n }),\n );\n };\n\n const handleClickHouseQueryChange = useCallback(\n (e: string) => {\n handleQueryChange(e);\n },\n [handleQueryChange],\n );\n\n const examplesStyle: React.CSSProperties = {\n fontSize: '11px',\n color: '#777',\n backgroundColor: '#f5f5f5',\n padding: '8px',\n borderRadius: '4px',\n fontFamily: 'Monaco, Menlo, \"Ubuntu Mono\", monospace',\n whiteSpace: 'pre-wrap',\n lineHeight: '1.3',\n };\n\n return (\n <Stack spacing={1.5}>\n <DatasourceSelect\n datasourcePluginKind={DATASOURCE_KIND}\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n label=\"ClickHouse Datasource\"\n notched\n />\n <ClickQLEditor\n value={query}\n onChange={handleClickHouseQueryChange}\n onBlur={handleQueryBlur}\n onKeyDown={createModEnterHandler(() => handleQueryExecute(query))}\n placeholder=\"Enter ClickHouse SQL query\"\n />\n\n <details>\n <summary style={{ cursor: 'pointer', fontSize: '12px', color: '#666', marginBottom: '8px' }}>\n Query Examples\n </summary>\n <div style={examplesStyle}>{queryExample}</div>\n </details>\n </Stack>\n );\n}\n"],"names":["Stack","createModEnterHandler","DatasourceSelect","isVariableDatasource","produce","useCallback","ClickQLEditor","queryExample","DATASOURCE_KIND","DEFAULT_DATASOURCE","useQueryState","ClickHouseLogQueryEditor","props","onChange","value","datasource","selectedDatasource","query","handleQueryChange","handleQueryBlur","handleDatasourceChange","newDatasourceSelection","kind","draft","Error","handleQueryExecute","handleClickHouseQueryChange","e","examplesStyle","fontSize","color","backgroundColor","padding","borderRadius","fontFamily","whiteSpace","lineHeight","spacing","datasourcePluginKind","label","notched","onBlur","onKeyDown","placeholder","details","summary","style","cursor","marginBottom","div"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,KAAK,QAAQ,gBAAgB;AACtC,SAASC,qBAAqB,QAAQ,yBAAyB;AAE/D,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,4BAA4B;AACnF,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,WAAW,QAAQ,QAAQ;AAEpC,SAASC,aAAa,QAAQ,4BAAmB;AACjD,SAASC,YAAY,QAAQ,gCAA6B;AAC1D,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,kBAAe;AACnE,SAASC,aAAa,QAAQ,2BAAwB;AAKtD,OAAO,SAASC,yBAAyBC,KAAiC;IACxE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAC5B,MAAM,EAAEG,UAAU,EAAE,GAAGD;IACvB,MAAME,qBAAqBD,cAAcN;IACzC,MAAM,EAAEQ,KAAK,EAAEC,iBAAiB,EAAEC,eAAe,EAAE,GAAGT,cAAcE;IAEpE,MAAMQ,yBAA4D,CAACC;QACjE,IAAI,CAAClB,qBAAqBkB,2BAA2BA,uBAAuBC,IAAI,KAAKd,iBAAiB;YACpGK,SACET,QAAQU,OAAO,CAACS;gBACdA,MAAMR,UAAU,GAAGM;YACrB;YAEF;QACF;QACA,MAAM,IAAIG,MAAM;IAClB;IAEA,6CAA6C;IAC7C,MAAMC,qBAAqB,CAACR;QAC1BJ,SACET,QAAQU,OAAO,CAACS;YACdA,MAAMN,KAAK,GAAGA;QAChB;IAEJ;IAEA,MAAMS,8BAA8BrB,YAClC,CAACsB;QACCT,kBAAkBS;IACpB,GACA;QAACT;KAAkB;IAGrB,MAAMU,gBAAqC;QACzCC,UAAU;QACVC,OAAO;QACPC,iBAAiB;QACjBC,SAAS;QACTC,cAAc;QACdC,YAAY;QACZC,YAAY;QACZC,YAAY;IACd;IAEA,qBACE,MAACpC;QAAMqC,SAAS;;0BACd,KAACnC;gBACCoC,sBAAsB9B;gBACtBM,OAAOE;gBACPH,UAAUO;gBACVmB,OAAM;gBACNC,OAAO;;0BAET,KAAClC;gBACCQ,OAAOG;gBACPJ,UAAUa;gBACVe,QAAQtB;gBACRuB,WAAWzC,sBAAsB,IAAMwB,mBAAmBR;gBAC1D0B,aAAY;;0BAGd,MAACC;;kCACC,KAACC;wBAAQC,OAAO;4BAAEC,QAAQ;4BAAWlB,UAAU;4BAAQC,OAAO;4BAAQkB,cAAc;wBAAM;kCAAG;;kCAG7F,KAACC;wBAAIH,OAAOlB;kCAAgBrB;;;;;;AAIpC"}
@@ -1,4 +1,4 @@
1
- import { DatasourceSelector } from '@perses-dev/spec';
1
+ import type { DatasourceSelector } from '@perses-dev/spec';
2
2
  export interface ClickHouseLogQuerySpec {
3
3
  query: string;
4
4
  datasource?: DatasourceSelector;
@@ -1 +1 @@
1
- {"version":3,"file":"click-house-log-query-types.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/click-house-log-query-types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC"}
1
+ {"version":3,"file":"click-house-log-query-types.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/click-house-log-query-types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/queries/click-house-log-query/click-house-log-query-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { DatasourceSelector } from '@perses-dev/spec';\n\nexport interface ClickHouseLogQuerySpec {\n query: string;\n datasource?: DatasourceSelector;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,WAGC"}
1
+ {"version":3,"sources":["../../../../src/queries/click-house-log-query/click-house-log-query-types.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { DatasourceSelector } from '@perses-dev/spec';\n\nexport interface ClickHouseLogQuerySpec {\n query: string;\n datasource?: DatasourceSelector;\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,WAGC"}
@@ -1,4 +1,4 @@
1
- import { LogQueryPlugin } from '@perses-dev/plugin-system';
2
- import { ClickHouseLogQuerySpec } from './click-house-log-query-types';
1
+ import type { LogQueryPlugin } from '@perses-dev/plugin-system';
2
+ import type { ClickHouseLogQuerySpec } from './click-house-log-query-types';
3
3
  export declare const getClickHouseLogData: LogQueryPlugin<ClickHouseLogQuerySpec>['getLogData'];
4
4
  //# sourceMappingURL=get-click-house-log-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-click-house-log-data.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/get-click-house-log-data.ts"],"names":[],"mappings":"AAaA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAoDvE,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC,YAAY,CAgCrF,CAAC"}
1
+ {"version":3,"file":"get-click-house-log-data.d.ts","sourceRoot":"","sources":["../../../../src/queries/click-house-log-query/get-click-house-log-data.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAOhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAoD5E,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC,YAAY,CAgCrF,CAAC"}