@trilogy-data/trilogy-studio-components 0.1.19 → 0.1.21

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 (166) hide show
  1. package/dist/{AssetAutoImporter-CUqhhNvb.js → AssetAutoImporter-IfDvXCFE.js} +5 -5
  2. package/dist/{ChatCreatorModal-CixOpWSH.js → ChatCreatorModal-BG6DyTV3.js} +2 -2
  3. package/dist/{CodeBlock-CDWXUAiQ.js → CodeBlock-Br-z9kG9.js} +1 -1
  4. package/dist/{CommunityModels-BKBxewjm.js → CommunityModels-DlK6gSx6.js} +7 -7
  5. package/dist/{ConfirmDialog-tNLC5CUN.js → ConfirmDialog-CYTEamQQ.js} +2 -2
  6. package/dist/{ConnectionView-Dyqm2oeV.js → ConnectionView-B_qlbq8s.js} +7 -7
  7. package/dist/{CreateEditorFromDatasourcePopup-D5mwCk5D.js → CreateEditorFromDatasourcePopup-bSSd8xci.js} +4 -4
  8. package/dist/{Dashboard-Bsoj1oUW.js → Dashboard-BN0T29JU.js} +1384 -1295
  9. package/dist/{DashboardCreatorInline-BLbkDxBF.js → DashboardCreatorInline-CPrHcaZC.js} +3 -3
  10. package/dist/{DashboardImportSelector-YRySr7k3.js → DashboardImportSelector-8mxsOld1.js} +1 -1
  11. package/dist/{DashboardMobile-Ao8NtF1f.js → DashboardMobile-BFcFiWhG.js} +4 -4
  12. package/dist/{DataTable-Bf7xeKSf.js → DataTable-CcALeEBZ.js} +2 -2
  13. package/dist/{DrilldownPane-OZMttRBx.js → DrilldownPane-oN6u9FSj.js} +6110 -6053
  14. package/dist/{Editor-N40lTR0s.js → Editor-BRnH6Fhm.js} +7 -7
  15. package/dist/{EditorCreatorInline-DCFnyl5w.js → EditorCreatorInline-BDWVUdax.js} +2 -2
  16. package/dist/{ErrorMessage-QW4GXCEn.js → ErrorMessage-BcAwiBgc.js} +1 -1
  17. package/dist/{HintComponent-B1B6qtaG.js → HintComponent-BZ7QT0Cf.js} +1 -1
  18. package/dist/{IDE-kbUDZPcL.js → IDE-BYphurDi.js} +10 -10
  19. package/dist/{JobsView-AYNUDnKG.js → JobsView-Bzv-qCJD.js} +4 -4
  20. package/dist/{LLMChat-CZTQUh53.js → LLMChat-DUReWNVL.js} +9 -9
  21. package/dist/{LLMConnectionList-BkvCZP5Q.js → LLMConnectionList-CS8b_fyI.js} +9 -9
  22. package/dist/{LLMView-CaTlmLGb.js → LLMView-D031rgKZ.js} +8 -8
  23. package/dist/{LoadingButton-BdM3Rygq.js → LoadingButton-3lCHccOe.js} +2 -2
  24. package/dist/{LoadingView-DXMQWonY.js → LoadingView-CCvQjQXB.js} +1 -1
  25. package/dist/{MarkdownRenderer-cdaHKql1.js → MarkdownRenderer-ToJ3ndVO.js} +3 -3
  26. package/dist/{MobileIDE-Bi7GNE2X.js → MobileIDE-YK0ZzWHh.js} +17 -17
  27. package/dist/{ModalDialog-D-yprLG4.js → ModalDialog-DUjJI7a8.js} +1 -1
  28. package/dist/{ModelCard-Cd6OxExX.js → ModelCard-DqfChNPX.js} +6 -6
  29. package/dist/{ModelCreator-DeI-n86Z.js → ModelCreator-DM1J950f.js} +4 -4
  30. package/dist/{ModelView-Surdb5KW.js → ModelView--DBf6oe2.js} +6 -6
  31. package/dist/{ResultComponent-CXkTwZFS.js → ResultComponent-DPeHR38g.js} +5 -5
  32. package/dist/{Sidebar-CfOATms_.js → Sidebar-Dq-6dIQq.js} +11 -11
  33. package/dist/{StatusIcon-CahClDuz.js → StatusIcon-BRguDu_P.js} +2 -2
  34. package/dist/{StoreTokenModal-CyPiGrhJ.js → StoreTokenModal-B379wQ3M.js} +2 -2
  35. package/dist/{SymbolsPane-CZaqqs5e.js → SymbolsPane-BrwZzMNn.js} +1 -1
  36. package/dist/Tooltip-Du2RDSUJ.js +104 -0
  37. package/dist/{TrilogyEmbedProvider-scDWYeoJ.js → TrilogyEmbedProvider-SmcmJEz6.js} +1 -1
  38. package/dist/{TutorialPage-IisHiPL6.js → TutorialPage-A-44DRyk.js} +12 -12
  39. package/dist/{UserProfile-CQAUnKyQ.js → UserProfile-DmDQyEIc.js} +4 -4
  40. package/dist/{WelcomePage-Bq-h9f64.js → WelcomePage-CeP5qQXC.js} +2 -2
  41. package/dist/_plugin-vue_export-helper-Ckr1Vx8X.js +368 -0
  42. package/dist/components/LoadingButton.vue.d.ts +6 -5
  43. package/dist/components/LoadingButton.vue.d.ts.map +1 -1
  44. package/dist/components/MarkdownRenderer.vue.d.ts.map +1 -1
  45. package/dist/components/Tooltip.vue.d.ts +6 -5
  46. package/dist/components/Tooltip.vue.d.ts.map +1 -1
  47. package/dist/components/VegaLiteChart.vue.d.ts +6 -5
  48. package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
  49. package/dist/components/chartHelpers.d.ts.map +1 -1
  50. package/dist/components/connection/ConnectionDatabase.vue.d.ts +6 -5
  51. package/dist/components/connection/ConnectionDatabase.vue.d.ts.map +1 -1
  52. package/dist/components/dashboard/Dashboard.vue.d.ts +3 -1
  53. package/dist/components/dashboard/Dashboard.vue.d.ts.map +1 -1
  54. package/dist/components/dashboard/DashboardChart.vue.d.ts +8 -7
  55. package/dist/components/dashboard/DashboardChart.vue.d.ts.map +1 -1
  56. package/dist/components/dashboard/DashboardFilter.vue.d.ts +1 -1
  57. package/dist/components/dashboard/DashboardGridItem.vue.d.ts.map +1 -1
  58. package/dist/components/dashboard/DashboardHeader.vue.d.ts +10 -0
  59. package/dist/components/dashboard/DashboardHeader.vue.d.ts.map +1 -1
  60. package/dist/components/dashboard/DashboardMarkdown.vue.d.ts +1 -1
  61. package/dist/components/dashboard/DashboardTable.vue.d.ts +1 -1
  62. package/dist/components/dashboard/useDashboard.d.ts.map +1 -1
  63. package/dist/components/editor/Editor.vue.d.ts +12 -10
  64. package/dist/components/editor/Editor.vue.d.ts.map +1 -1
  65. package/dist/components/editor/EditorCreatorInline.vue.d.ts +6 -5
  66. package/dist/components/editor/EditorCreatorInline.vue.d.ts.map +1 -1
  67. package/dist/components/editor/EditorHeader.vue.d.ts +6 -5
  68. package/dist/components/editor/EditorHeader.vue.d.ts.map +1 -1
  69. package/dist/components/editor/ResultComponent.vue.d.ts +48 -40
  70. package/dist/components/editor/ResultComponent.vue.d.ts.map +1 -1
  71. package/dist/components/editor/Results.vue.d.ts +12 -10
  72. package/dist/components/editor/Results.vue.d.ts.map +1 -1
  73. package/dist/components/llm/ArtifactsPane.vue.d.ts +12 -10
  74. package/dist/components/llm/ArtifactsPane.vue.d.ts.map +1 -1
  75. package/dist/components/llm/ChatArtifact.vue.d.ts +6 -5
  76. package/dist/components/llm/ChatArtifact.vue.d.ts.map +1 -1
  77. package/dist/components/llm/LLMChatSplitView.vue.d.ts +12 -10
  78. package/dist/components/llm/LLMChatSplitView.vue.d.ts.map +1 -1
  79. package/dist/components/llm/LLMEditorRefinement.vue.d.ts +12 -10
  80. package/dist/components/llm/LLMEditorRefinement.vue.d.ts.map +1 -1
  81. package/dist/components/model/ModelCard.vue.d.ts +18 -15
  82. package/dist/components/model/ModelCard.vue.d.ts.map +1 -1
  83. package/dist/components/model/ModelCreator.vue.d.ts +12 -10
  84. package/dist/components/model/ModelCreator.vue.d.ts.map +1 -1
  85. package/dist/components/sidebar/ConnectionList.vue.d.ts +18 -15
  86. package/dist/components/sidebar/ConnectionList.vue.d.ts.map +1 -1
  87. package/dist/components/sidebar/ConnectionListItem.vue.d.ts +6 -5
  88. package/dist/components/sidebar/ConnectionListItem.vue.d.ts.map +1 -1
  89. package/dist/components/sidebar/DashboardList.vue.d.ts +14 -12
  90. package/dist/components/sidebar/DashboardList.vue.d.ts.map +1 -1
  91. package/dist/components/sidebar/DashboardListItem.vue.d.ts +7 -6
  92. package/dist/components/sidebar/DashboardListItem.vue.d.ts.map +1 -1
  93. package/dist/components/sidebar/EditorList.vue.d.ts +18 -15
  94. package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
  95. package/dist/components/sidebar/EditorListItem.vue.d.ts +6 -5
  96. package/dist/components/sidebar/EditorListItem.vue.d.ts.map +1 -1
  97. package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts +6 -5
  98. package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts.map +1 -1
  99. package/dist/components/sidebar/LLMConnectionList.vue.d.ts +12 -10
  100. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
  101. package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts +6 -5
  102. package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts.map +1 -1
  103. package/dist/components/sidebar/ModelSidebar.vue.d.ts +24 -20
  104. package/dist/components/sidebar/ModelSidebar.vue.d.ts.map +1 -1
  105. package/dist/components/sidebar/Sidebar.vue.d.ts +92 -77
  106. package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  107. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +60 -50
  108. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
  109. package/dist/composables/useCrossFilterEligibility.d.ts.map +1 -1
  110. package/dist/composables/useEmbeddedDashboardGroup.d.ts +5 -9
  111. package/dist/composables/useEmbeddedDashboardGroup.d.ts.map +1 -1
  112. package/dist/composables/useResolvedCrossFilterController.d.ts +1 -1
  113. package/dist/composables/useResolvedCrossFilterController.d.ts.map +1 -1
  114. package/dist/connections/bigquery_oauth.d.ts +1 -0
  115. package/dist/connections/bigquery_oauth.d.ts.map +1 -1
  116. package/dist/connections/duckdb.d.ts.map +1 -1
  117. package/dist/connections/motherduck.d.ts +1 -1
  118. package/dist/connections/motherduck.d.ts.map +1 -1
  119. package/dist/connections/snowflake.d.ts +9 -2
  120. package/dist/connections/snowflake.d.ts.map +1 -1
  121. package/dist/connections.js +2 -2
  122. package/dist/dashboard.js +23 -18
  123. package/dist/dashboards/barChartSpec.d.ts.map +1 -1
  124. package/dist/dashboards/barHChartSpec.d.ts.map +1 -1
  125. package/dist/dashboards/base.d.ts +13 -12
  126. package/dist/dashboards/base.d.ts.map +1 -1
  127. package/dist/dashboards/conditions.d.ts +26 -0
  128. package/dist/dashboards/conditions.d.ts.map +1 -1
  129. package/dist/dashboards/crossFilters.d.ts +28 -8
  130. package/dist/dashboards/crossFilters.d.ts.map +1 -1
  131. package/dist/dashboards/dashboardQueryExecutor.d.ts.map +1 -1
  132. package/dist/dashboards/helpers.d.ts +2 -0
  133. package/dist/dashboards/helpers.d.ts.map +1 -1
  134. package/dist/dashboards/spec.d.ts.map +1 -1
  135. package/dist/{editorStore-BTPcljeQ.js → editorStore-CHHdik0L.js} +1 -1
  136. package/dist/editors/results.d.ts +1 -0
  137. package/dist/editors/results.d.ts.map +1 -1
  138. package/dist/embed.js +2 -2
  139. package/dist/icons/registerMdiIcons.d.ts +2 -1
  140. package/dist/icons/registerMdiIcons.d.ts.map +1 -1
  141. package/dist/monaco.js +1 -1
  142. package/dist/{queryExecutionService-KrjL0UCa.js → queryExecutionService-D1ynkTop.js} +852 -690
  143. package/dist/{remoteProject-CvjztZU1.js → remoteProject-DrsKUWjF.js} +1 -1
  144. package/dist/{snowflake-CY1Gnu3y.js → snowflake-BUHnLz1S.js} +1587 -1539
  145. package/dist/stores/dashboardStore.d.ts +2 -1
  146. package/dist/stores/dashboardStore.d.ts.map +1 -1
  147. package/dist/stores/queryExecutionService.d.ts.map +1 -1
  148. package/dist/stores/resolver.d.ts +2 -0
  149. package/dist/stores/resolver.d.ts.map +1 -1
  150. package/dist/stores.js +2 -2
  151. package/dist/trilogy-studio-components.css +1 -1
  152. package/dist/{useDashboard-CtX3sEag.js → useDashboard-DlVElw8y.js} +1130 -1093
  153. package/dist/{useResizableDialog-BZgmdwim.js → useResizableDialog-B6WRQMxc.js} +1 -1
  154. package/dist/views/ConnectionView.vue.d.ts +6 -5
  155. package/dist/views/ConnectionView.vue.d.ts.map +1 -1
  156. package/dist/views/LLMView.vue.d.ts +36 -30
  157. package/dist/views/LLMView.vue.d.ts.map +1 -1
  158. package/dist/views/ModelView.vue.d.ts +36 -30
  159. package/dist/views/ModelView.vue.d.ts.map +1 -1
  160. package/dist/views/ResponsiveIDE.vue.d.ts.map +1 -1
  161. package/dist/views/TutorialPage.vue.d.ts +196 -162
  162. package/dist/views/TutorialPage.vue.d.ts.map +1 -1
  163. package/dist/views.js +109 -104
  164. package/package.json +1 -1
  165. package/dist/Tooltip-D4kSH91A.js +0 -62
  166. package/dist/_plugin-vue_export-helper-BzkwV_Yn.js +0 -361
@@ -1,23 +1,23 @@
1
- import { defineComponent as J, ref as S, watch as de, createBlock as G, openBlock as m, withCtx as ne, createElementVNode as t, toDisplayString as N, normalizeClass as A, computed as p, createElementBlock as y, createCommentVNode as R, normalizeStyle as Ee, Fragment as me, renderList as be, createTextVNode as ge, unref as ie, createVNode as z, withDirectives as ue, withKeys as ye, vModelText as fe, onMounted as je, onUnmounted as nt, inject as j, resolveComponent as X, Teleport as ot, withModifiers as Be, resolveDynamicComponent as it, vModelRadio as rt, vShow as lt, renderSlot as Ne, onBeforeUnmount as at, nextTick as Pe } from "vue";
2
- import { a as st, u as Ge, j as dt } from "./editorStore-BTPcljeQ.js";
1
+ import { defineComponent as J, ref as S, watch as ue, createBlock as _, openBlock as h, withCtx as ee, createElementVNode as t, toDisplayString as P, normalizeClass as q, computed as p, createElementBlock as y, createCommentVNode as R, normalizeStyle as Te, Fragment as fe, renderList as we, createTextVNode as Ce, unref as ie, createVNode as z, withDirectives as ce, withKeys as ge, vModelText as pe, onMounted as Ge, onUnmounted as ot, inject as j, resolveComponent as Z, Teleport as nt, withModifiers as Oe, resolveDynamicComponent as it, vModelRadio as rt, vShow as lt, renderSlot as Ke, onBeforeUnmount as at, nextTick as We } from "vue";
2
+ import { a as st, u as ze, j as dt } from "./editorStore-CHHdik0L.js";
3
3
  import { u as ut } from "./toolLoopCore-CK_KVuAS.js";
4
- import { u as ct, e as _e, w as mt, h as w, a as ht, p as ft, q as vt, O as Ke } from "./queryExecutionService-KrjL0UCa.js";
5
- import { u as xe, D as pt } from "./DashboardImportSelector-YRySr7k3.js";
6
- import { M as ze } from "./ModalDialog-D-yprLG4.js";
7
- import { _ as Y } from "./_plugin-vue_export-helper-BzkwV_Yn.js";
8
- import { T as De } from "./Tooltip-D4kSH91A.js";
9
- import yt from "./LoadingButton-BdM3Rygq.js";
10
- import Ie from "./ErrorMessage-QW4GXCEn.js";
11
- import { D as gt, V as bt } from "./DrilldownPane-OZMttRBx.js";
12
- import { L as $e } from "./LoadingView-DXMQWonY.js";
13
- import { M as Ct } from "./MarkdownRenderer-cdaHKql1.js";
14
- import { D as wt } from "./DataTable-Bf7xeKSf.js";
15
- import { C as ce, R as We } from "./snowflake-CY1Gnu3y.js";
4
+ import { u as ct, e as Je, w as mt, h as C, a as ht, p as ft, q as vt, O as Ue } from "./queryExecutionService-D1ynkTop.js";
5
+ import { u as Ve, D as pt } from "./DashboardImportSelector-8mxsOld1.js";
6
+ import { M as Ye } from "./ModalDialog-DUjJI7a8.js";
7
+ import { _ as Y } from "./_plugin-vue_export-helper-Ckr1Vx8X.js";
8
+ import { T as be } from "./Tooltip-Du2RDSUJ.js";
9
+ import yt from "./LoadingButton-3lCHccOe.js";
10
+ import Le from "./ErrorMessage-BcAwiBgc.js";
11
+ import { D as gt, V as bt } from "./DrilldownPane-oN6u9FSj.js";
12
+ import { L as Me } from "./LoadingView-CCvQjQXB.js";
13
+ import { M as Ct } from "./MarkdownRenderer-ToJ3ndVO.js";
14
+ import { D as wt } from "./DataTable-CcALeEBZ.js";
15
+ import { C as he, R as je } from "./snowflake-BUHnLz1S.js";
16
16
  import { u as kt } from "./config-AzVcp1pU.js";
17
- import { e as Te, K as se, a as he, R as St } from "./toggleHighContrast-q6tdBRv8.js";
18
- import { S as Dt } from "./SymbolsPane-CZaqqs5e.js";
19
- import { u as Et, R as Tt } from "./useResizableDialog-BZgmdwim.js";
20
- const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt = {
17
+ import { e as $e, K as de, a as ve, R as St } from "./toggleHighContrast-q6tdBRv8.js";
18
+ import { S as Et } from "./SymbolsPane-BrwZzMNn.js";
19
+ import { u as Dt, R as It } from "./useResizableDialog-B6WRQMxc.js";
20
+ const Tt = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt = {
21
21
  "data-testid": "dashboard-json",
22
22
  class: "json-code"
23
23
  }, Mt = /* @__PURE__ */ J({
@@ -27,25 +27,25 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
27
27
  isOpen: { type: Boolean }
28
28
  },
29
29
  emits: ["close"],
30
- setup(e, { emit: o }) {
31
- const n = e, l = o, r = S(""), i = S(!1), s = (c) => {
30
+ setup(e, { emit: n }) {
31
+ const o = e, l = n, r = S(""), i = S(!1), s = (c) => {
32
32
  if (!c) return null;
33
33
  const a = JSON.parse(JSON.stringify(c));
34
34
  if (delete a.id, delete a.connection, delete a.storage, delete a.changed, delete a.deleted, a.layout && Array.isArray(a.layout) && (a.layout = a.layout.map((v) => {
35
- const E = { ...v };
36
- return delete E.static, delete E.moved, delete E.state, E;
35
+ const w = { ...v };
36
+ return delete w.static, delete w.moved, delete w.state, w;
37
37
  })), a.gridItems && typeof a.gridItems == "object")
38
- for (const [v, E] of Object.entries(a.gridItems)) {
39
- const C = { ...E };
40
- delete C.results, delete C.loading, delete C.loadStartTime, delete C.error, C.filters || delete C.filters, C.crossFilters || delete C.crossFilters, C.chartFilters || delete C.chartFilters, C.conceptFilters || delete C.conceptFilters, C.chartConfig && delete C.chartConfig.showDebug, a.gridItems[v] = C;
38
+ for (const [v, w] of Object.entries(a.gridItems)) {
39
+ const b = { ...w };
40
+ delete b.results, delete b.loading, delete b.loadStartTime, delete b.error, b.filters || delete b.filters, b.crossFilters || delete b.crossFilters, b.chartFilters || delete b.chartFilters, b.conceptFilters || delete b.conceptFilters, b.chartConfig && delete b.chartConfig.showDebug, a.gridItems[v] = b;
41
41
  }
42
42
  return a.imports && Array.isArray(a.imports) && (a.imports = a.imports.map((v) => {
43
- const E = { ...v };
44
- return delete E.id, E;
43
+ const w = { ...v };
44
+ return delete w.id, w;
45
45
  })), a;
46
46
  };
47
- de(
48
- [() => n.dashboard, () => n.isOpen],
47
+ ue(
48
+ [() => o.dashboard, () => o.isOpen],
49
49
  ([c, a]) => {
50
50
  if (a && c) {
51
51
  const v = s(c);
@@ -63,14 +63,14 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
63
63
  console.error("Could not copy text: ", c);
64
64
  });
65
65
  };
66
- return (c, a) => (m(), G(ze, {
66
+ return (c, a) => (h(), _(Ye, {
67
67
  show: e.isOpen,
68
68
  title: "Export Definition",
69
69
  "max-width": "860px",
70
70
  "test-id": "dashboard-share-popup",
71
71
  onClose: a[1] || (a[1] = (v) => l("close"))
72
72
  }, {
73
- footer: ne(() => [
73
+ footer: ee(() => [
74
74
  t("button", {
75
75
  class: "secondary-button",
76
76
  onClick: a[0] || (a[0] = (v) => l("close"))
@@ -81,20 +81,20 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
81
81
  "data-testid": "copy-json-button"
82
82
  }, [
83
83
  t("i", {
84
- class: A(["mdi", i.value ? "mdi-check-circle-outline" : "mdi-content-copy"]),
84
+ class: q(["mdi", i.value ? "mdi-check-circle-outline" : "mdi-content-copy"]),
85
85
  "aria-hidden": "true"
86
86
  }, null, 2),
87
- t("span", null, N(i.value ? "Copied" : "Copy JSON"), 1)
87
+ t("span", null, P(i.value ? "Copied" : "Copy JSON"), 1)
88
88
  ])
89
89
  ]),
90
- default: ne(() => [
91
- t("div", It, [
90
+ default: ee(() => [
91
+ t("div", Tt, [
92
92
  a[3] || (a[3] = t("p", { class: "share-popup-description" }, " Copy a definition of this dashboard; it can be imported by others with the same model defined. Existing runtime/results info is removed automatically. ", -1)),
93
93
  t("div", $t, [
94
94
  a[2] || (a[2] = t("div", { class: "json-toolbar" }, [
95
95
  t("span", { class: "json-toolbar-label" }, "dashboard.json")
96
96
  ], -1)),
97
- t("pre", Lt, N(r.value), 1)
97
+ t("pre", Lt, P(r.value), 1)
98
98
  ])
99
99
  ])
100
100
  ]),
@@ -118,20 +118,20 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
118
118
  }
119
119
  },
120
120
  emits: ["select-completion"],
121
- setup(e, { emit: o }) {
122
- const n = e, l = o, r = S(!1), i = S(0), s = S(0), f = S(""), c = S(0), a = S(null), v = p(() => {
123
- if (!n.inputElement) return {};
124
- const k = n.inputElement.getBoundingClientRect();
121
+ setup(e, { emit: n }) {
122
+ const o = e, l = n, r = S(!1), i = S(0), s = S(0), f = S(""), c = S(0), a = S(null), v = p(() => {
123
+ if (!o.inputElement) return {};
124
+ const k = o.inputElement.getBoundingClientRect();
125
125
  return {
126
126
  top: `${k.bottom + 50}px`,
127
127
  left: `${k.left}px`,
128
128
  width: `${k.width}px`,
129
129
  maxHeight: "200px"
130
130
  };
131
- }), E = () => {
132
- if (!n.inputElement) return;
133
- s.value = n.inputElement.selectionStart || 0;
134
- const k = n.inputValue;
131
+ }), w = () => {
132
+ if (!o.inputElement) return;
133
+ s.value = o.inputElement.selectionStart || 0;
134
+ const k = o.inputValue;
135
135
  let M = s.value;
136
136
  for (; M > 0 && !/\s/.test(k.charAt(M - 1)); )
137
137
  M--;
@@ -139,31 +139,31 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
139
139
  for (; T < k.length && !/\s/.test(k.charAt(T)); )
140
140
  T++;
141
141
  c.value = M, f.value = k.substring(M, T);
142
- }, C = p(() => {
142
+ }, b = p(() => {
143
143
  if (!f.value.trim()) return [];
144
144
  const k = f.value.toLowerCase();
145
- return n.completionItems.filter((M) => M.label.toLowerCase().includes(k)).sort((M, T) => {
146
- const H = M.label.toLowerCase().startsWith(k), K = T.label.toLowerCase().startsWith(k);
147
- return H && !K ? -1 : !H && K ? 1 : M.label.localeCompare(T.label);
145
+ return o.completionItems.filter((M) => M.label.toLowerCase().includes(k)).sort((M, T) => {
146
+ const O = M.label.toLowerCase().startsWith(k), W = T.label.toLowerCase().startsWith(k);
147
+ return O && !W ? -1 : !O && W ? 1 : M.label.localeCompare(T.label);
148
148
  }).slice(0, 10);
149
149
  });
150
- de(C, (k) => {
150
+ ue(b, (k) => {
151
151
  r.value = k.length > 0, i.value = 0;
152
152
  });
153
- const D = (k) => {
154
- const M = n.inputValue.substring(0, c.value), T = n.inputValue.substring(s.value);
153
+ const I = (k) => {
154
+ const M = o.inputValue.substring(0, c.value), T = o.inputValue.substring(s.value);
155
155
  l("select-completion", {
156
156
  text: M + k.label + T,
157
157
  cursorPosition: c.value + k.label.length
158
158
  }), r.value = !1;
159
- }, V = (k) => k.trilogySubType ? k.trilogySubType.toLowerCase() : k.type.toLowerCase();
160
- return de(
161
- () => n.inputValue,
159
+ }, x = (k) => k.trilogySubType ? k.trilogySubType.toLowerCase() : k.type.toLowerCase();
160
+ return ue(
161
+ () => o.inputValue,
162
162
  () => {
163
- E();
163
+ w();
164
164
  }
165
- ), xe(
166
- () => [a.value, n.inputElement],
165
+ ), Ve(
166
+ () => [a.value, o.inputElement],
167
167
  () => {
168
168
  r.value = !1;
169
169
  },
@@ -171,50 +171,50 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
171
171
  enabled: () => r.value,
172
172
  eventName: "mousedown"
173
173
  }
174
- ), E(), (k, M) => r.value ? (m(), y("div", {
174
+ ), w(), (k, M) => r.value ? (h(), y("div", {
175
175
  key: 0,
176
176
  ref_key: "dropdown",
177
177
  ref: a,
178
178
  class: "autocomplete-dropdown",
179
- style: Ee(v.value)
179
+ style: Te(v.value)
180
180
  }, [
181
- (m(!0), y(me, null, be(C.value, (T, H) => (m(), y("div", {
182
- key: H,
183
- class: A(["completion-item", { selected: H === i.value }]),
184
- onClick: (K) => D(T)
181
+ (h(!0), y(fe, null, we(b.value, (T, O) => (h(), y("div", {
182
+ key: O,
183
+ class: q(["completion-item", { selected: O === i.value }]),
184
+ onClick: (W) => I(T)
185
185
  }, [
186
186
  t("div", {
187
- class: A(["symbol-icon", V(T)])
187
+ class: q(["symbol-icon", x(T)])
188
188
  }, [
189
- T.trilogySubType ? (m(), y("i", {
189
+ T.trilogySubType ? (h(), y("i", {
190
190
  key: 0,
191
- class: A(`mdi ${T.trilogySubType === "key" ? "mdi-key-outline" : T.trilogySubType === "property" ? "mdi-tag-outline" : "mdi-cube-outline"}`)
192
- }, null, 2)) : (m(), y(me, { key: 1 }, [
193
- ge(N(T.type === "function" ? "ƒ" : T.type === "variable" ? "V" : T.type === "class" ? "C" : T.type === "interface" ? "I" : T.type === "method" ? "M" : T.type === "property" ? "P" : T.type === "field" ? "F" : T.type === "constant" ? "K" : T.type === "enum" ? "E" : T.type === "keyword" ? "K" : "S"), 1)
191
+ class: q(`mdi ${T.trilogySubType === "key" ? "mdi-key-outline" : T.trilogySubType === "property" ? "mdi-tag-outline" : "mdi-cube-outline"}`)
192
+ }, null, 2)) : (h(), y(fe, { key: 1 }, [
193
+ Ce(P(T.type === "function" ? "ƒ" : T.type === "variable" ? "V" : T.type === "class" ? "C" : T.type === "interface" ? "I" : T.type === "method" ? "M" : T.type === "property" ? "P" : T.type === "field" ? "F" : T.type === "constant" ? "K" : T.type === "enum" ? "E" : T.type === "keyword" ? "K" : "S"), 1)
194
194
  ], 64))
195
195
  ], 2),
196
196
  t("div", qt, [
197
- t("div", Ft, N(T.label), 1),
198
- t("div", xt, N(T.description), 1)
197
+ t("div", Ft, P(T.label), 1),
198
+ t("div", xt, P(T.description), 1)
199
199
  ])
200
200
  ], 10, At))), 128))
201
201
  ], 4)) : R("", !0);
202
202
  }
203
- }), Vt = /* @__PURE__ */ Y(Ht, [["__scopeId", "data-v-89468628"]]), Ot = { class: "filter-container" }, Qt = { class: "filter-input-wrapper" }, Bt = ["value", "disabled"], Nt = ["value", "placeholder", "disabled"], Pt = {
203
+ }), Ot = /* @__PURE__ */ Y(Ht, [["__scopeId", "data-v-89468628"]]), Vt = { class: "filter-container" }, Qt = { class: "filter-input-wrapper" }, Bt = ["value", "disabled"], Nt = ["value", "placeholder", "disabled"], Pt = {
204
204
  key: 0,
205
205
  class: "dropdown-error-message",
206
206
  "data-testid": "dropdown-error-message"
207
207
  }, Kt = { class: "dropdown-actions" }, Wt = ["disabled"], Ut = ["disabled"], jt = {
208
208
  key: 0,
209
209
  class: "loader-container"
210
- }, Gt = ["disabled"], _t = { class: "filter-inline-actions" }, zt = {
210
+ }, _t = ["disabled"], Gt = { class: "filter-inline-actions" }, zt = {
211
211
  key: 0,
212
212
  class: "filter-status error",
213
213
  "data-testid": "filter-error-icon"
214
- }, Jt = ["disabled"], Yt = { class: "button-content" }, Zt = ["disabled"], Xt = { class: "button-content" }, en = {
214
+ }, Jt = ["disabled"], Yt = { class: "button-content" }, Zt = ["disabled"], Xt = { class: "button-content" }, eo = {
215
215
  key: 0,
216
216
  class: "loader-container"
217
- }, tn = ["disabled"], nn = { class: "button-content" }, on = /* @__PURE__ */ J({
217
+ }, to = ["disabled"], oo = { class: "button-content" }, no = /* @__PURE__ */ J({
218
218
  __name: "DashboardHeaderFilterInput",
219
219
  props: {
220
220
  filterValue: {
@@ -233,76 +233,76 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
233
233
  }
234
234
  },
235
235
  emits: ["filter-change", "filter-apply", "clear-filter"],
236
- setup(e, { emit: o }) {
237
- const n = e, l = o, r = ct(), i = S(n.isLoading), s = S(null), f = S(null), c = S(null), a = S(n.filterValue || ""), v = S(!1), E = S(!1), C = p(() => a.value.replace(/\n/g, " ")), D = p(() => a.value.trim().length > 0);
238
- function V() {
239
- l("filter-apply", a.value), v.value = !1, H();
236
+ setup(e, { emit: n }) {
237
+ const o = e, l = n, r = ct(), i = S(o.isLoading), s = S(null), f = S(null), c = S(null), a = S(o.filterValue || ""), v = S(!1), w = S(!1), b = p(() => a.value.replace(/\n/g, " ")), I = p(() => a.value.trim().length > 0);
238
+ function x() {
239
+ l("filter-apply", a.value), v.value = !1, O();
240
240
  }
241
241
  function k() {
242
242
  a.value = "", v.value = !0, l("filter-change", ""), l("filter-apply", ""), l("clear-filter", ""), setTimeout(() => {
243
243
  f.value && f.value.focus();
244
244
  }, 0);
245
245
  }
246
- function M(b) {
247
- const h = b.target;
248
- a.value = h.value, v.value = !0, l("filter-change", a.value);
246
+ function M(E) {
247
+ const m = E.target;
248
+ a.value = m.value, v.value = !0, l("filter-change", a.value);
249
249
  }
250
250
  function T() {
251
- E.value = !0, setTimeout(() => {
251
+ w.value = !0, setTimeout(() => {
252
252
  if (f.value) {
253
253
  f.value.focus();
254
- const b = a.value.length;
255
- f.value.setSelectionRange(b, b);
254
+ const E = a.value.length;
255
+ f.value.setSelectionRange(E, E);
256
256
  }
257
257
  }, 0);
258
258
  }
259
- function H() {
260
- E.value = !1;
259
+ function O() {
260
+ w.value = !1;
261
261
  }
262
- const K = () => {
262
+ const W = () => {
263
263
  i.value = !0;
264
- const b = n.globalCompletion.map((h) => ({
265
- name: h.label,
266
- type: h.datatype,
267
- description: h.description
264
+ const E = o.globalCompletion.map((m) => ({
265
+ name: m.label,
266
+ type: m.datatype,
267
+ description: m.description
268
268
  }));
269
- r.generateFilterQuery(a.value, b, n.validateFilter).then((h) => {
270
- h && h.length > 0 && (a.value = h.replace(/^\s*where\s+/i, ""), v.value = !0, l("filter-apply", a.value)), i.value = !1;
269
+ r.generateFilterQuery(a.value, E, o.validateFilter).then((m) => {
270
+ m && m.length > 0 && (a.value = m.replace(/^\s*where\s+/i, ""), v.value = !0, l("filter-apply", a.value)), i.value = !1;
271
271
  }).catch(() => {
272
272
  i.value = !1;
273
273
  });
274
274
  };
275
- function O(b) {
276
- b.key === "Enter" && !b.shiftKey && !b.ctrlKey && !b.altKey ? E.value || (b.preventDefault(), V()) : (b.ctrlKey || b.metaKey) && b.shiftKey && b.key === "Enter" ? (b.preventDefault(), K()) : b.key === "Escape" && E.value && (b.preventDefault(), H());
277
- }
278
- function $(b) {
279
- (b.ctrlKey || b.metaKey) && b.key === "Enter" && !b.shiftKey ? (b.preventDefault(), V()) : (b.ctrlKey || b.metaKey) && b.shiftKey && b.key === "Enter" ? (b.preventDefault(), K()) : b.key === "Escape" && (b.preventDefault(), H());
280
- }
281
- const g = p(() => (n.filterError || "").length > 0 ? "error" : a.value ? "valid" : "neutral");
282
- function B(b) {
283
- a.value = b.text, v.value = !0, l("filter-change", a.value);
284
- const h = E.value ? f.value : s.value;
285
- h && (h.focus(), h.setSelectionRange(b.cursorPosition, b.cursorPosition));
286
- }
287
- return de(
288
- () => n.filterValue,
289
- (b) => {
290
- b !== a.value && (a.value = b || "", v.value = !1);
275
+ function V(E) {
276
+ E.key === "Enter" && !E.shiftKey && !E.ctrlKey && !E.altKey ? w.value || (E.preventDefault(), x()) : (E.ctrlKey || E.metaKey) && E.shiftKey && E.key === "Enter" ? (E.preventDefault(), W()) : E.key === "Escape" && w.value && (E.preventDefault(), O());
277
+ }
278
+ function $(E) {
279
+ (E.ctrlKey || E.metaKey) && E.key === "Enter" && !E.shiftKey ? (E.preventDefault(), x()) : (E.ctrlKey || E.metaKey) && E.shiftKey && E.key === "Enter" ? (E.preventDefault(), W()) : E.key === "Escape" && (E.preventDefault(), O());
280
+ }
281
+ const g = p(() => (o.filterError || "").length > 0 ? "error" : a.value ? "valid" : "neutral");
282
+ function B(E) {
283
+ a.value = E.text, v.value = !0, l("filter-change", a.value);
284
+ const m = w.value ? f.value : s.value;
285
+ m && (m.focus(), m.setSelectionRange(E.cursorPosition, E.cursorPosition));
286
+ }
287
+ return ue(
288
+ () => o.filterValue,
289
+ (E) => {
290
+ E !== a.value && (a.value = E || "", v.value = !1);
291
291
  }
292
- ), de(
293
- () => n.isLoading,
294
- (b) => {
295
- i.value = b;
292
+ ), ue(
293
+ () => o.isLoading,
294
+ (E) => {
295
+ i.value = E;
296
296
  }
297
- ), xe(
297
+ ), Ve(
298
298
  () => [c.value, s.value],
299
299
  () => {
300
- H();
300
+ O();
301
301
  },
302
302
  {
303
- enabled: () => E.value
303
+ enabled: () => w.value
304
304
  }
305
- ), (b, h) => (m(), y("div", Ot, [
305
+ ), (E, m) => (h(), y("div", Vt, [
306
306
  t("div", Qt, [
307
307
  t("input", {
308
308
  id: "filter",
@@ -310,34 +310,34 @@ const It = { class: "share-popup-body" }, $t = { class: "json-container" }, Lt =
310
310
  ref: s,
311
311
  "data-testid": "filter-input",
312
312
  type: "text",
313
- value: C.value,
313
+ value: b.value,
314
314
  onInput: M,
315
- onKeydown: O,
315
+ onKeydown: V,
316
316
  onFocus: T,
317
317
  placeholder: "Add a global filter...",
318
- class: A({ "filter-error": g.value === "error" }),
318
+ class: q({ "filter-error": g.value === "error" }),
319
319
  disabled: i.value
320
320
  }, null, 42, Bt),
321
- E.value ? (m(), y("div", {
321
+ w.value ? (h(), y("div", {
322
322
  key: 0,
323
323
  ref_key: "filterDropdownRef",
324
324
  ref: c,
325
325
  class: "filter-dropdown"
326
326
  }, [
327
327
  t("div", { class: "dropdown-header" }, [
328
- h[1] || (h[1] = t("span", null, "Global Filters", -1)),
328
+ m[1] || (m[1] = t("span", null, "Global Filters", -1)),
329
329
  t("button", {
330
- onClick: H,
330
+ onClick: O,
331
331
  class: "close-button",
332
332
  title: "Close (Esc)"
333
- }, [...h[0] || (h[0] = [
333
+ }, [...m[0] || (m[0] = [
334
334
  t("i", { class: "mdi mdi-close" }, null, -1)
335
335
  ])])
336
336
  ]),
337
337
  t("textarea", {
338
338
  ref_key: "filterTextareaRef",
339
339
  ref: f,
340
- class: A(["filter-textarea", { "filter-error": g.value === "error" }]),
340
+ class: q(["filter-textarea", { "filter-error": g.value === "error" }]),
341
341
  value: a.value,
342
342
  onInput: M,
343
343
  onKeydown: $,
@@ -347,61 +347,61 @@ Use Ctrl+Enter to apply`,
347
347
  disabled: i.value,
348
348
  rows: "4"
349
349
  }, null, 42, Nt),
350
- e.filterError ? (m(), y("div", Pt, [
351
- h[2] || (h[2] = t("i", { class: "mdi mdi-alert-circle-outline" }, null, -1)),
352
- t("span", null, N(e.filterError), 1)
350
+ e.filterError ? (h(), y("div", Pt, [
351
+ m[2] || (m[2] = t("i", { class: "mdi mdi-alert-circle-outline" }, null, -1)),
352
+ t("span", null, P(e.filterError), 1)
353
353
  ])) : R("", !0),
354
354
  t("div", Kt, [
355
355
  t("button", {
356
- onClick: V,
357
- class: A(["apply-button", { "has-changes": v.value }]),
356
+ onClick: x,
357
+ class: q(["apply-button", { "has-changes": v.value }]),
358
358
  disabled: i.value,
359
359
  title: "Apply filter (Ctrl+Enter)"
360
- }, [...h[3] || (h[3] = [
360
+ }, [...m[3] || (m[3] = [
361
361
  t("i", { class: "mdi mdi-check" }, null, -1),
362
- ge(" Apply ", -1)
362
+ Ce(" Apply ", -1)
363
363
  ])], 10, Wt),
364
- ie(r).hasActiveDefaultConnection ? (m(), y("button", {
364
+ ie(r).hasActiveDefaultConnection ? (h(), y("button", {
365
365
  key: 0,
366
- onClick: K,
366
+ onClick: W,
367
367
  class: "llm-button",
368
368
  disabled: i.value,
369
369
  title: "Text to filter (Ctrl+Shift+Enter)"
370
370
  }, [
371
371
  t("i", {
372
- class: A(["mdi mdi-auto-fix", { hidden: i.value }])
372
+ class: q(["mdi mdi-auto-fix", { hidden: i.value }])
373
373
  }, null, 2),
374
- i.value ? (m(), y("div", jt, [...h[4] || (h[4] = [
374
+ i.value ? (h(), y("div", jt, [...m[4] || (m[4] = [
375
375
  t("div", { class: "loader" }, null, -1)
376
376
  ])])) : R("", !0),
377
- h[5] || (h[5] = ge(" Text to Filter ", -1))
377
+ m[5] || (m[5] = Ce(" Text to Filter ", -1))
378
378
  ], 8, Ut)) : R("", !0),
379
379
  t("button", {
380
380
  onClick: k,
381
381
  class: "clear-button",
382
382
  disabled: i.value,
383
383
  title: "Clear filter"
384
- }, [...h[6] || (h[6] = [
384
+ }, [...m[6] || (m[6] = [
385
385
  t("i", { class: "mdi mdi-close-circle-outline" }, null, -1),
386
- ge(" Clear ", -1)
387
- ])], 8, Gt)
386
+ Ce(" Clear ", -1)
387
+ ])], 8, _t)
388
388
  ])
389
389
  ], 512)) : R("", !0),
390
- (E.value ? f.value : s.value) ? (m(), G(Vt, {
390
+ (w.value ? f.value : s.value) ? (h(), _(Ot, {
391
391
  key: 1,
392
392
  "input-value": a.value,
393
393
  "completion-items": e.globalCompletion,
394
- "input-element": E.value ? f.value : s.value,
394
+ "input-element": w.value ? f.value : s.value,
395
395
  onSelectCompletion: B
396
396
  }, null, 8, ["input-value", "completion-items", "input-element"])) : R("", !0),
397
- t("div", _t, [
398
- g.value === "error" ? (m(), y("div", zt, [
399
- h[8] || (h[8] = t("i", { class: "mdi mdi-alert-circle-outline" }, null, -1)),
400
- z(De, {
397
+ t("div", Gt, [
398
+ g.value === "error" ? (h(), y("div", zt, [
399
+ m[8] || (m[8] = t("i", { class: "mdi mdi-alert-circle-outline" }, null, -1)),
400
+ z(be, {
401
401
  content: e.filterError || "Unknown Error",
402
402
  position: "bottom"
403
403
  }, {
404
- default: ne(() => [...h[7] || (h[7] = [
404
+ default: ee(() => [...m[7] || (m[7] = [
405
405
  t("span", {
406
406
  class: "tooltip-trigger",
407
407
  "data-testid": "filter-error-tooltip-trigger"
@@ -411,28 +411,28 @@ Use Ctrl+Enter to apply`,
411
411
  }, 8, ["content"])
412
412
  ])) : R("", !0),
413
413
  t("button", {
414
- onClick: V,
415
- class: A(["input-icon-button", { "has-changes": v.value }]),
414
+ onClick: x,
415
+ class: q(["input-icon-button", { "has-changes": v.value }]),
416
416
  "data-testid": "filter-search-button",
417
417
  disabled: i.value,
418
418
  title: "Apply filter (Enter)"
419
419
  }, [
420
420
  t("div", Yt, [
421
- h[10] || (h[10] = t("i", { class: "mdi mdi-magnify" }, null, -1)),
422
- z(De, {
421
+ m[10] || (m[10] = t("i", { class: "mdi mdi-magnify" }, null, -1)),
422
+ z(be, {
423
423
  content: v.value ? "Apply changes (Enter)" : "Search (Enter)",
424
424
  position: "top"
425
425
  }, {
426
- default: ne(() => [...h[9] || (h[9] = [
426
+ default: ee(() => [...m[9] || (m[9] = [
427
427
  t("span", { class: "tooltip-trigger" }, null, -1)
428
428
  ])]),
429
429
  _: 1
430
430
  }, 8, ["content"])
431
431
  ])
432
432
  ], 10, Jt),
433
- ie(r).hasActiveDefaultConnection ? (m(), y("button", {
433
+ ie(r).hasActiveDefaultConnection ? (h(), y("button", {
434
434
  key: 1,
435
- onClick: K,
435
+ onClick: W,
436
436
  class: "input-icon-button",
437
437
  "data-testid": "filter-llm-button",
438
438
  disabled: i.value,
@@ -440,23 +440,23 @@ Use Ctrl+Enter to apply`,
440
440
  }, [
441
441
  t("div", Xt, [
442
442
  t("i", {
443
- class: A(["mdi mdi-auto-fix", { hidden: i.value }])
443
+ class: q(["mdi mdi-auto-fix", { hidden: i.value }])
444
444
  }, null, 2),
445
- i.value ? (m(), y("div", en, [...h[11] || (h[11] = [
445
+ i.value ? (h(), y("div", eo, [...m[11] || (m[11] = [
446
446
  t("div", { class: "loader" }, null, -1)
447
447
  ])])) : R("", !0),
448
- z(De, {
448
+ z(be, {
449
449
  content: i.value ? "Processing..." : "Text to filter (Ctrl+Shift+Enter)",
450
450
  position: "top"
451
451
  }, {
452
- default: ne(() => [...h[12] || (h[12] = [
452
+ default: ee(() => [...m[12] || (m[12] = [
453
453
  t("span", { class: "tooltip-trigger" }, null, -1)
454
454
  ])]),
455
455
  _: 1
456
456
  }, 8, ["content"])
457
457
  ])
458
458
  ], 8, Zt)) : R("", !0),
459
- D.value ? (m(), y("button", {
459
+ I.value ? (h(), y("button", {
460
460
  key: 2,
461
461
  onClick: k,
462
462
  class: "input-icon-button clear-icon-button",
@@ -464,43 +464,43 @@ Use Ctrl+Enter to apply`,
464
464
  disabled: i.value,
465
465
  title: "Clear all filters"
466
466
  }, [
467
- t("div", nn, [
468
- h[14] || (h[14] = t("i", { class: "mdi mdi-close" }, null, -1)),
469
- z(De, {
467
+ t("div", oo, [
468
+ m[14] || (m[14] = t("i", { class: "mdi mdi-close" }, null, -1)),
469
+ z(be, {
470
470
  content: "Clear all filters",
471
471
  position: "top"
472
472
  }, {
473
- default: ne(() => [...h[13] || (h[13] = [
473
+ default: ee(() => [...m[13] || (m[13] = [
474
474
  t("span", { class: "tooltip-trigger" }, null, -1)
475
475
  ])]),
476
476
  _: 1
477
477
  })
478
478
  ])
479
- ], 8, tn)) : R("", !0)
479
+ ], 8, to)) : R("", !0)
480
480
  ])
481
481
  ])
482
482
  ]));
483
483
  }
484
- }), rn = /* @__PURE__ */ Y(on, [["__scopeId", "data-v-ff037c5f"]]), ln = {
484
+ }), io = /* @__PURE__ */ Y(no, [["__scopeId", "data-v-ff037c5f"]]), ro = {
485
485
  class: "dashboard-controls",
486
486
  "data-testid": "dashboard-controls"
487
- }, an = {
487
+ }, lo = {
488
488
  key: 0,
489
489
  class: "editable-text"
490
- }, sn = { class: "title-text" }, dn = {
490
+ }, ao = { class: "title-text" }, so = {
491
491
  key: 0,
492
492
  class: "edit-indicator",
493
493
  "data-testid": "edit-dashboard-title"
494
- }, un = {
494
+ }, uo = {
495
495
  key: 0,
496
496
  class: "dashboard-right-controls"
497
- }, cn = {
497
+ }, co = {
498
498
  class: "connection-selector",
499
499
  "data-testid": "connection-selector-wrapper"
500
- }, mn = { class: "select-wrapper" }, hn = ["value", "title"], fn = ["value"], vn = { class: "grid-actions top-actions" }, pn = { class: "controls-row filter-row" }, yn = { class: "grid-actions filter-actions" }, gn = {
500
+ }, mo = { class: "select-wrapper" }, ho = ["value", "title"], fo = ["value"], vo = { class: "grid-actions top-actions" }, po = { class: "controls-row filter-row" }, yo = { class: "grid-actions filter-actions" }, go = {
501
501
  class: "mode-selector",
502
502
  "data-testid": "mode-selector-wrapper"
503
- }, bn = { class: "select-wrapper" }, Cn = ["value", "disabled"], wn = /* @__PURE__ */ J({
503
+ }, bo = { class: "select-wrapper" }, Co = ["value", "disabled"], wo = /* @__PURE__ */ J({
504
504
  __name: "DashboardHeader",
505
505
  props: {
506
506
  dashboard: {
@@ -520,6 +520,10 @@ Use Ctrl+Enter to apply`,
520
520
  validateFilter: {
521
521
  type: Function,
522
522
  default: () => !0
523
+ },
524
+ exportImageAction: {
525
+ type: Function,
526
+ default: null
523
527
  }
524
528
  },
525
529
  emits: [
@@ -534,55 +538,59 @@ Use Ctrl+Enter to apply`,
534
538
  "title-update",
535
539
  "export-image"
536
540
  ],
537
- setup(e, { emit: o }) {
538
- const n = e, l = o, r = st(), i = Ge(), s = _e(), f = S(!1), c = S(!1), a = S(!1), v = S(""), E = S(null);
539
- function C() {
541
+ setup(e, { emit: n }) {
542
+ const o = e, l = n, r = st(), i = ze(), s = Je(), f = S(!1), c = S(!1), a = S(!1), v = S(""), w = S(null);
543
+ function b() {
540
544
  c.value = !c.value;
541
545
  }
542
- function D() {
546
+ function I() {
543
547
  c.value = !1;
544
548
  }
545
- function V(h) {
546
- l("filter-change", h);
549
+ function x(m) {
550
+ l("filter-change", m);
547
551
  }
548
552
  async function k() {
549
- return l("export-image"), await new Promise((h) => setTimeout(h, 5e3)), Promise.resolve();
553
+ if (o.exportImageAction) {
554
+ await o.exportImageAction();
555
+ return;
556
+ }
557
+ l("export-image");
550
558
  }
551
- function M(h) {
552
- const I = h.target;
553
- l("mode-change", I.value);
559
+ function M(m) {
560
+ const D = m.target;
561
+ l("mode-change", D.value);
554
562
  }
555
563
  function T() {
556
- var h;
557
- n.editsLocked || (a.value = !0, v.value = ((h = n.dashboard) == null ? void 0 : h.name) || "Untitled Dashboard", setTimeout(() => {
558
- var I;
559
- (I = E.value) == null || I.focus();
564
+ var m;
565
+ o.editsLocked || (a.value = !0, v.value = ((m = o.dashboard) == null ? void 0 : m.name) || "Untitled Dashboard", setTimeout(() => {
566
+ var D;
567
+ (D = w.value) == null || D.focus();
560
568
  }, 0));
561
569
  }
562
- function H() {
570
+ function O() {
563
571
  a.value = !1, l("title-update", v.value);
564
572
  }
565
- function K() {
566
- var h;
567
- a.value = !1, v.value = ((h = n.dashboard) == null ? void 0 : h.name) || "Untitled Dashboard";
573
+ function W() {
574
+ var m;
575
+ a.value = !1, v.value = ((m = o.dashboard) == null ? void 0 : m.name) || "Untitled Dashboard";
568
576
  }
569
- const O = p(() => Object.values(i.editors).filter((I) => I.connection === n.selectedConnection).sort((I, Z) => I.name.localeCompare(Z.name)).map((I) => ({
570
- id: I.id,
571
- name: I.name.replace(/\//g, "."),
577
+ const V = p(() => Object.values(i.editors).filter((D) => D.connection === o.selectedConnection).sort((D, te) => D.name.localeCompare(te.name)).map((D) => ({
578
+ id: D.id,
579
+ name: D.name.replace(/\//g, "."),
572
580
  alias: ""
573
581
  }))), $ = p(() => {
574
- var h;
575
- return ((h = n.dashboard) == null ? void 0 : h.imports) || [];
582
+ var m;
583
+ return ((m = o.dashboard) == null ? void 0 : m.imports) || [];
576
584
  });
577
- function g(h) {
578
- l("import-change", h);
585
+ function g(m) {
586
+ l("import-change", m);
579
587
  }
580
588
  function B() {
581
589
  l("refresh");
582
590
  }
583
- const b = p(() => {
584
- var h;
585
- switch ((h = n.dashboard) == null ? void 0 : h.state) {
591
+ const E = p(() => {
592
+ var m;
593
+ switch ((m = o.dashboard) == null ? void 0 : m.state) {
586
594
  case "editing":
587
595
  return "mdi mdi-pencil-outline";
588
596
  case "published":
@@ -593,71 +601,71 @@ Use Ctrl+Enter to apply`,
593
601
  return "mdi mdi-eye-outline";
594
602
  }
595
603
  });
596
- return (h, I) => {
597
- var Z, re;
598
- return m(), y("div", ln, [
604
+ return (m, D) => {
605
+ var te, ne;
606
+ return h(), y("div", ro, [
599
607
  t("div", {
600
- class: A(["controls-row title-row", { "view-title-row": e.dashboard.state !== "editing" }])
608
+ class: q(["controls-row title-row", { "view-title-row": e.dashboard.state !== "editing" }])
601
609
  }, [
602
610
  t("div", {
603
611
  class: "dashboard-title",
604
612
  onClick: T
605
613
  }, [
606
- a.value ? ue((m(), y("input", {
614
+ a.value ? ce((h(), y("input", {
607
615
  key: 1,
608
616
  ref_key: "titleInput",
609
- ref: E,
617
+ ref: w,
610
618
  "data-testid": "dashboard-title-input",
611
- "onUpdate:modelValue": I[0] || (I[0] = (U) => v.value = U),
612
- onBlur: H,
619
+ "onUpdate:modelValue": D[0] || (D[0] = (U) => v.value = U),
620
+ onBlur: O,
613
621
  onKeyup: [
614
- ye(H, ["enter"]),
615
- ye(K, ["esc"])
622
+ ge(O, ["enter"]),
623
+ ge(W, ["esc"])
616
624
  ],
617
625
  class: "title-input",
618
626
  type: "text"
619
627
  }, null, 544)), [
620
- [fe, v.value]
621
- ]) : (m(), y("span", an, [
622
- t("span", sn, N(((Z = e.dashboard) == null ? void 0 : Z.name) || "Untitled Dashboard"), 1),
623
- e.editsLocked ? R("", !0) : (m(), y("span", dn, [...I[6] || (I[6] = [
628
+ [pe, v.value]
629
+ ]) : (h(), y("span", lo, [
630
+ t("span", ao, P(((te = e.dashboard) == null ? void 0 : te.name) || "Untitled Dashboard"), 1),
631
+ e.editsLocked ? R("", !0) : (h(), y("span", so, [...D[6] || (D[6] = [
624
632
  t("i", { class: "mdi mdi-pencil-outline" }, null, -1)
625
633
  ])]))
626
634
  ]))
627
635
  ]),
628
- e.dashboard.state === "editing" ? (m(), y("div", un, [
629
- t("div", cn, [
630
- t("div", mn, [
631
- I[7] || (I[7] = t("i", { class: "mdi mdi-database-outline select-icon" }, null, -1)),
636
+ e.dashboard.state === "editing" ? (h(), y("div", uo, [
637
+ t("div", co, [
638
+ t("div", mo, [
639
+ D[7] || (D[7] = t("i", { class: "mdi mdi-database-outline select-icon" }, null, -1)),
632
640
  t("select", {
633
641
  id: "connection",
634
642
  "data-testid": "connection-selector",
635
- onChange: I[1] || (I[1] = (U) => h.$emit("connection-change", U)),
643
+ onChange: D[1] || (D[1] = (U) => m.$emit("connection-change", U)),
636
644
  value: e.selectedConnection,
637
645
  title: e.selectedConnection
638
646
  }, [
639
- (m(!0), y(me, null, be(Object.values(ie(r).connections).filter(
647
+ (h(!0), y(fe, null, we(Object.values(ie(r).connections).filter(
640
648
  (U) => U.model
641
- ), (U) => (m(), y("option", {
649
+ ), (U) => (h(), y("option", {
642
650
  key: U.name,
643
651
  value: U.name
644
- }, N(U.name), 9, fn))), 128))
645
- ], 40, hn)
652
+ }, P(U.name), 9, fo))), 128))
653
+ ], 40, ho)
646
654
  ])
647
655
  ]),
648
656
  z(pt, {
649
- "available-imports": O.value,
657
+ "available-imports": V.value,
650
658
  "active-imports": $.value,
651
659
  "onUpdate:imports": g,
652
- onExplore: I[2] || (I[2] = (U) => ie(s).openTab("editors", null, U.id))
660
+ onExplore: D[2] || (D[2] = (U) => ie(s).openTab("editors", null, U.id))
653
661
  }, null, 8, ["available-imports", "active-imports"]),
654
- t("div", vn, [
662
+ t("div", vo, [
655
663
  t("button", {
656
- onClick: I[3] || (I[3] = (U) => h.$emit("add-item")),
664
+ onClick: D[3] || (D[3] = (U) => m.$emit("add-item")),
657
665
  class: "btn btn-success",
658
666
  "data-testid": "add-item-button",
659
667
  title: "Add Item"
660
- }, [...I[8] || (I[8] = [
668
+ }, [...D[8] || (D[8] = [
661
669
  t("i", {
662
670
  class: "mdi mdi-plus top-action-icon",
663
671
  "aria-hidden": "true"
@@ -665,11 +673,11 @@ Use Ctrl+Enter to apply`,
665
673
  t("span", { class: "top-action-label" }, "Add", -1)
666
674
  ])]),
667
675
  t("button", {
668
- onClick: I[4] || (I[4] = (U) => h.$emit("clear-items")),
676
+ onClick: D[4] || (D[4] = (U) => m.$emit("clear-items")),
669
677
  class: "btn btn-danger",
670
678
  "data-testid": "clear-items-button",
671
679
  title: "Clear All"
672
- }, [...I[9] || (I[9] = [
680
+ }, [...D[9] || (D[9] = [
673
681
  t("i", {
674
682
  class: "mdi mdi-delete-outline top-action-icon",
675
683
  "aria-hidden": "true"
@@ -679,17 +687,17 @@ Use Ctrl+Enter to apply`,
679
687
  ])
680
688
  ])) : R("", !0)
681
689
  ], 2),
682
- t("div", pn, [
683
- z(rn, {
684
- "filter-value": ((re = e.dashboard) == null ? void 0 : re.filter) || "",
690
+ t("div", po, [
691
+ z(io, {
692
+ "filter-value": ((ne = e.dashboard) == null ? void 0 : ne.filter) || "",
685
693
  "filter-error": e.filterError,
686
694
  "is-loading": f.value,
687
695
  "global-completion": e.globalCompletion,
688
696
  "validate-filter": e.validateFilter,
689
- onFilterApply: V,
690
- onClearFilter: I[5] || (I[5] = (U) => h.$emit("clear-filter", ""))
697
+ onFilterApply: x,
698
+ onClearFilter: D[5] || (D[5] = (U) => m.$emit("clear-filter", ""))
691
699
  }, null, 8, ["filter-value", "filter-error", "is-loading", "global-completion", "validate-filter"]),
692
- t("div", yn, [
700
+ t("div", yo, [
693
701
  z(yt, {
694
702
  action: k,
695
703
  "use-default-style": !1,
@@ -699,7 +707,7 @@ Use Ctrl+Enter to apply`,
699
707
  title: "Download dashboard image",
700
708
  "aria-label": "Download dashboard image"
701
709
  }, {
702
- default: ne(() => [...I[10] || (I[10] = [
710
+ default: ee(() => [...D[10] || (D[10] = [
703
711
  t("i", {
704
712
  class: "mdi mdi-download-outline filter-action-icon",
705
713
  "aria-hidden": "true"
@@ -709,12 +717,12 @@ Use Ctrl+Enter to apply`,
709
717
  _: 1
710
718
  }),
711
719
  t("button", {
712
- onClick: C,
720
+ onClick: b,
713
721
  class: "btn btn-secondary filter-action-btn",
714
722
  "data-testid": "share-dashboard-button",
715
723
  title: "Export dashboard",
716
724
  "aria-label": "Export dashboard"
717
- }, [...I[11] || (I[11] = [
725
+ }, [...D[11] || (D[11] = [
718
726
  t("i", {
719
727
  class: "mdi mdi-export-variant filter-action-icon",
720
728
  "aria-hidden": "true"
@@ -727,17 +735,17 @@ Use Ctrl+Enter to apply`,
727
735
  "data-testid": "refresh-button",
728
736
  title: "Refresh dashboard",
729
737
  "aria-label": "Refresh dashboard"
730
- }, [...I[12] || (I[12] = [
738
+ }, [...D[12] || (D[12] = [
731
739
  t("i", {
732
740
  class: "mdi mdi-refresh filter-action-icon",
733
741
  "aria-hidden": "true"
734
742
  }, null, -1),
735
743
  t("span", { class: "filter-action-label" }, "Refresh", -1)
736
744
  ])]),
737
- t("div", gn, [
738
- t("div", bn, [
745
+ t("div", go, [
746
+ t("div", bo, [
739
747
  t("i", {
740
- class: A(b.value + " select-icon")
748
+ class: q(E.value + " select-icon")
741
749
  }, null, 2),
742
750
  t("select", {
743
751
  id: "viewMode",
@@ -746,7 +754,7 @@ Use Ctrl+Enter to apply`,
746
754
  value: e.dashboard.state,
747
755
  disabled: e.editsLocked,
748
756
  class: "mode-select"
749
- }, [...I[13] || (I[13] = [
757
+ }, [...D[13] || (D[13] = [
750
758
  t("option", {
751
759
  value: "editing",
752
760
  "data-testid": "edit-mode-option"
@@ -759,7 +767,7 @@ Use Ctrl+Enter to apply`,
759
767
  value: "fullscreen",
760
768
  "data-testid": "fullscreen-mode-option"
761
769
  }, "Fullscreen", -1)
762
- ])], 40, Cn)
770
+ ])], 40, Co)
763
771
  ])
764
772
  ])
765
773
  ])
@@ -767,37 +775,37 @@ Use Ctrl+Enter to apply`,
767
775
  z(Rt, {
768
776
  dashboard: e.dashboard,
769
777
  "is-open": c.value,
770
- onClose: D
778
+ onClose: I
771
779
  }, null, 8, ["dashboard", "is-open"])
772
780
  ]);
773
781
  };
774
782
  }
775
- }), Ki = /* @__PURE__ */ Y(wn, [["__scopeId", "data-v-4c51e2bc"]]);
776
- function Le(e) {
777
- const o = S(null), n = S(!1), l = S(null), r = S(!1), i = S(null), s = S(!1), f = () => {
783
+ }), Wi = /* @__PURE__ */ Y(wo, [["__scopeId", "data-v-b0dab49c"]]);
784
+ function Re(e) {
785
+ const n = S(null), o = S(!1), l = S(null), r = S(!1), i = S(null), s = S(!1), f = () => {
778
786
  i.value && (clearTimeout(i.value), i.value = null);
779
787
  }, c = () => {
780
- if (!o.value) return 0;
781
- const D = o.value.getBoundingClientRect(), V = window.scrollY || document.documentElement.scrollTop, k = D.top + V, M = Math.floor(k / 200) * 10;
788
+ if (!n.value) return 0;
789
+ const I = n.value.getBoundingClientRect(), x = window.scrollY || document.documentElement.scrollTop, k = I.top + x, M = Math.floor(k / 200) * 10;
782
790
  return Math.min(M, 100);
783
791
  };
784
- je(() => {
792
+ Ge(() => {
785
793
  setTimeout(() => {
786
- const D = c();
794
+ const I = c();
787
795
  if (!e.results.value) {
788
- n.value = !0;
796
+ o.value = !0;
789
797
  return;
790
798
  }
791
799
  setTimeout(() => {
792
- n.value = !0;
793
- }, D);
800
+ o.value = !0;
801
+ }, I);
794
802
  }, 0);
795
- }), nt(() => {
803
+ }), ot(() => {
796
804
  f();
797
- }), de(
805
+ }), ue(
798
806
  e.loading,
799
- (D) => {
800
- if (f(), D) {
807
+ (I) => {
808
+ if (f(), I) {
801
809
  i.value = setTimeout(() => {
802
810
  r.value = !0, i.value = null;
803
811
  }, e.loadingDelayMs ?? 150);
@@ -810,25 +818,25 @@ function Le(e) {
810
818
  const a = async () => {
811
819
  var M;
812
820
  if (!e.query.value) return;
813
- const D = e.dashboardId(), V = e.itemId(), k = e.getDashboardQueryExecutor(D);
821
+ const I = e.dashboardId(), x = e.itemId(), k = e.getDashboardQueryExecutor(I);
814
822
  if (!k)
815
823
  throw new Error("Dashboard query executor not found!");
816
824
  try {
817
- (M = e.analyticsStore) == null || M.log(e.analyticsEvent, e.analyticsType, !0), l.value && k.cancelQuery(l.value), l.value = await k.runSingle(V), await k.waitForQuery(l.value);
825
+ (M = e.analyticsStore) == null || M.log(e.analyticsEvent, e.analyticsType, !0), l.value && k.cancelQuery(l.value), l.value = await k.runSingle(x), await k.waitForQuery(l.value);
818
826
  } catch (T) {
819
827
  console.error("Error setting up query:", T), l.value = null;
820
828
  }
821
829
  };
822
830
  return {
823
- chartContainer: o,
824
- ready: n,
831
+ chartContainer: n,
832
+ ready: o,
825
833
  showLoading: r,
826
834
  controlsVisible: s,
827
835
  executeQuery: a,
828
836
  handleLocalRefresh: () => {
829
- const D = e.onRefresh.value;
830
- if (D) {
831
- D(e.itemId());
837
+ const I = e.onRefresh.value;
838
+ if (I) {
839
+ I(e.itemId());
832
840
  return;
833
841
  }
834
842
  a();
@@ -841,12 +849,12 @@ function Le(e) {
841
849
  }
842
850
  };
843
851
  }
844
- const kn = J({
852
+ const ko = J({
845
853
  name: "DashboardChart",
846
854
  components: {
847
855
  VegaLiteChart: bt,
848
- ErrorMessage: Ie,
849
- LoadingView: $e,
856
+ ErrorMessage: Le,
857
+ LoadingView: Me,
850
858
  DrilldownPane: gt
851
859
  },
852
860
  props: {
@@ -881,38 +889,38 @@ const kn = J({
881
889
  required: !0
882
890
  }
883
891
  },
884
- setup(e, { emit: o }) {
885
- const n = S(null), l = p(() => e.getItemData(e.itemId, e.dashboardId)), r = p(() => l.value.structured_content.query), i = p(() => l.value.results || null), s = p(() => l.value.name || ""), f = p(() => (l.value.height || 300) - 75), c = p(() => l.value.width || 300), a = p(() => {
892
+ setup(e, { emit: n }) {
893
+ const o = S(null), l = p(() => e.getItemData(e.itemId, e.dashboardId)), r = p(() => l.value.structured_content.query), i = p(() => l.value.results || null), s = p(() => l.value.name || ""), f = p(() => (l.value.height || 300) - 75), c = p(() => l.value.width || 300), a = p(() => {
886
894
  if (l.value.chartConfig)
887
895
  return {
888
896
  ...l.value.chartConfig,
889
897
  showTitle: !1
890
898
  };
891
- }), v = p(() => l.value.loading || !1), E = p(() => l.value.error || null), C = p(() => l.value.filters || []), D = p(() => l.value.loadStartTime || null), V = p(() => (l.value.chartFilters || []).map((_) => _.value)), k = p(() => l.value.hasDrilldown), M = p(() => l.value.onRefresh || null), T = j(
899
+ }), v = p(() => l.value.loading || !1), w = p(() => l.value.error || null), b = p(() => l.value.filters || []), I = p(() => l.value.loadStartTime || null), x = p(() => (l.value.chartFilters || []).map((G) => G.value)), k = p(() => l.value.hasDrilldown), M = p(() => l.value.onRefresh || null), T = j(
892
900
  "analyticsStore",
893
901
  null
894
- ), H = (_) => {
895
- const oe = {
896
- ..._,
902
+ ), O = (G) => {
903
+ const re = {
904
+ ...G,
897
905
  showTitle: !1
898
906
  };
899
907
  if (k.value) {
900
908
  e.setItemData(e.itemId, e.dashboardId, {
901
- drilldownChartConfig: oe
909
+ drilldownChartConfig: re
902
910
  });
903
911
  return;
904
912
  }
905
- e.setItemData(e.itemId, e.dashboardId, { chartConfig: oe });
913
+ e.setItemData(e.itemId, e.dashboardId, { chartConfig: re });
906
914
  }, {
907
- chartContainer: K,
908
- ready: O,
915
+ chartContainer: W,
916
+ ready: V,
909
917
  showLoading: $,
910
918
  controlsVisible: g,
911
919
  executeQuery: B,
912
- handleLocalRefresh: b,
913
- onChartMouseEnter: h,
914
- onChartMouseLeave: I
915
- } = Le({
920
+ handleLocalRefresh: E,
921
+ onChartMouseEnter: m,
922
+ onChartMouseLeave: D
923
+ } = Re({
916
924
  dashboardId: () => e.dashboardId,
917
925
  itemId: () => e.itemId,
918
926
  query: r,
@@ -926,63 +934,63 @@ const kn = J({
926
934
  loadingDelayMs: 250
927
935
  });
928
936
  return {
929
- chartContainer: K,
937
+ chartContainer: W,
930
938
  results: i,
931
- ready: O,
939
+ ready: V,
932
940
  loading: v,
933
941
  showLoading: $,
934
- error: E,
935
- filters: C,
942
+ error: w,
943
+ filters: b,
936
944
  query: r,
937
945
  chartHeight: f,
938
946
  chartWidth: c,
939
947
  chartConfig: a,
940
948
  chartTitle: s,
941
- onChartConfigChange: H,
949
+ onChartConfigChange: O,
942
950
  onRefresh: M,
943
- handleLocalRefresh: b,
944
- chartSelection: V,
945
- startTime: D,
946
- handleDimensionClick: (_) => {
947
- o("dimension-click", {
951
+ handleLocalRefresh: E,
952
+ chartSelection: x,
953
+ startTime: I,
954
+ handleDimensionClick: (G) => {
955
+ n("dimension-click", {
948
956
  source: e.itemId,
949
- filters: _.filters,
950
- chart: _.chart,
951
- append: _.append
957
+ filters: G.filters,
958
+ chart: G.chart,
959
+ append: G.append
952
960
  });
953
961
  },
954
962
  handleBackgroundClick: () => {
955
- o("background-click");
963
+ n("background-click");
956
964
  },
957
- activeDrilldown: n,
958
- activateDrilldown: (_) => {
959
- let oe = _.filters, ee = Object.keys(oe)[0], te = mt(_.filters);
960
- ee && (n.value = { remove: ee, filter: te });
965
+ activeDrilldown: o,
966
+ activateDrilldown: (G) => {
967
+ let re = G.filters, le = Object.keys(re)[0], X = mt(G.filters);
968
+ le && (o.value = { remove: le, filter: X });
961
969
  },
962
- submitDrilldown: async (_) => {
963
- let ee = await e.getDashboardQueryExecutor(e.dashboardId).createDrilldownQuery(
970
+ submitDrilldown: async (G) => {
971
+ let le = await e.getDashboardQueryExecutor(e.dashboardId).createDrilldownQuery(
964
972
  r.value,
965
- _,
966
- n.value.remove,
967
- n.value.filter,
973
+ G,
974
+ o.value.remove,
975
+ o.value.filter,
968
976
  l.value.rootContent || [],
969
- (l.value.imports || []).map((te) => ({ name: te.name, alias: te.alias }))
977
+ (l.value.imports || []).map((X) => ({ name: X.name, alias: X.alias }))
970
978
  );
971
979
  e.setItemData(e.itemId, e.dashboardId, {
972
- drilldown: ee,
980
+ drilldown: le,
973
981
  drilldownChartConfig: null,
974
982
  loading: !0
975
- }), $.value = !0, n.value = null, await B().then(() => {
976
- O.value = !0;
977
- }).catch((te) => {
978
- console.error("Error executing drilldown query:", te), O.value = !0;
983
+ }), $.value = !0, o.value = null, await B().then(() => {
984
+ V.value = !0;
985
+ }).catch((X) => {
986
+ console.error("Error executing drilldown query:", X), V.value = !0;
979
987
  }).finally(() => {
980
988
  $.value = !1;
981
989
  });
982
990
  },
983
991
  controlsVisible: g,
984
- onChartMouseEnter: h,
985
- onChartMouseLeave: I,
992
+ onChartMouseEnter: m,
993
+ onChartMouseLeave: D,
986
994
  revertDrilldown: async () => {
987
995
  e.setItemData(e.itemId, e.dashboardId, {
988
996
  drilldown: null,
@@ -993,32 +1001,32 @@ const kn = J({
993
1001
  hasDrilldown: k
994
1002
  };
995
1003
  }
996
- }), Sn = {
1004
+ }), So = {
997
1005
  key: 3,
998
1006
  class: "loading-overlay"
999
1007
  };
1000
- function Dn(e, o, n, l, r, i) {
1001
- const s = X("drilldown-pane"), f = X("ErrorMessage"), c = X("VegaLiteChart"), a = X("LoadingView");
1002
- return m(), y("div", {
1008
+ function Eo(e, n, o, l, r, i) {
1009
+ const s = Z("drilldown-pane"), f = Z("ErrorMessage"), c = Z("VegaLiteChart"), a = Z("LoadingView");
1010
+ return h(), y("div", {
1003
1011
  ref: "chartContainer",
1004
- class: A(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1005
- onMouseenter: o[3] || (o[3] = (...v) => e.onChartMouseEnter && e.onChartMouseEnter(...v)),
1006
- onMouseleave: o[4] || (o[4] = (...v) => e.onChartMouseLeave && e.onChartMouseLeave(...v))
1012
+ class: q(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1013
+ onMouseenter: n[3] || (n[3] = (...v) => e.onChartMouseEnter && e.onChartMouseEnter(...v)),
1014
+ onMouseleave: n[4] || (n[4] = (...v) => e.onChartMouseLeave && e.onChartMouseLeave(...v))
1007
1015
  }, [
1008
- e.activeDrilldown ? (m(), G(s, {
1016
+ e.activeDrilldown ? (h(), _(s, {
1009
1017
  key: 0,
1010
1018
  "drilldown-remove": e.activeDrilldown.remove,
1011
1019
  "drilldown-filter": e.activeDrilldown.filter,
1012
- onClose: o[0] || (o[0] = (v) => e.activeDrilldown = null),
1020
+ onClose: n[0] || (n[0] = (v) => e.activeDrilldown = null),
1013
1021
  symbols: e.symbols,
1014
1022
  onSubmit: e.submitDrilldown
1015
- }, null, 8, ["drilldown-remove", "drilldown-filter", "symbols", "onSubmit"])) : e.error && !e.loading ? (m(), G(f, {
1023
+ }, null, 8, ["drilldown-remove", "drilldown-filter", "symbols", "onSubmit"])) : e.error && !e.loading ? (h(), _(f, {
1016
1024
  key: 1,
1017
1025
  compact: !0,
1018
1026
  details: e.error,
1019
1027
  query: e.query,
1020
1028
  filters: e.filters
1021
- }, null, 8, ["details", "query", "filters"])) : e.results && e.ready ? (m(), G(c, {
1029
+ }, null, 8, ["details", "query", "filters"])) : e.results && e.ready ? (h(), _(c, {
1022
1030
  key: 2,
1023
1031
  id: `${e.itemId}-${e.dashboardId}`,
1024
1032
  columns: e.results.headers,
@@ -1037,40 +1045,40 @@ function Dn(e, o, n, l, r, i) {
1037
1045
  onDrilldownClick: e.activateDrilldown,
1038
1046
  onRevertDrilldown: e.revertDrilldown
1039
1047
  }, null, 8, ["id", "columns", "data", "showControls", "initialConfig", "containerHeight", "container-width", "onChartConfigChange", "chartSelection", "chartTitle", "drilldown-active", "onDimensionClick", "onBackgroundClick", "onRefreshClick", "onDrilldownClick", "onRevertDrilldown"])) : R("", !0),
1040
- e.loading && e.showLoading ? (m(), y("div", Sn, [
1048
+ e.loading && e.showLoading ? (h(), y("div", So, [
1041
1049
  z(a, {
1042
1050
  startTime: e.startTime,
1043
1051
  text: "",
1044
1052
  subtle: ""
1045
1053
  }, null, 8, ["startTime"])
1046
1054
  ])) : R("", !0),
1047
- !e.editMode || !(e.results && e.ready) ? (m(), y("div", {
1055
+ !e.editMode || !(e.results && e.ready) ? (h(), y("div", {
1048
1056
  key: 4,
1049
- class: A(["controls-toggle", { "controls-visible": e.controlsVisible }])
1057
+ class: q(["controls-toggle", { "controls-visible": e.controlsVisible }])
1050
1058
  }, [
1051
1059
  t("button", {
1052
- onClick: o[1] || (o[1] = (...v) => e.handleLocalRefresh && e.handleLocalRefresh(...v)),
1060
+ onClick: n[1] || (n[1] = (...v) => e.handleLocalRefresh && e.handleLocalRefresh(...v)),
1053
1061
  class: "control-btn",
1054
1062
  "data-testid": "refresh-chart-btn",
1055
1063
  title: "Refresh table"
1056
- }, [...o[5] || (o[5] = [
1064
+ }, [...n[5] || (n[5] = [
1057
1065
  t("i", { class: "mdi mdi-refresh icon" }, null, -1)
1058
1066
  ])]),
1059
1067
  t("button", {
1060
- onClick: o[2] || (o[2] = (...v) => e.revertDrilldown && e.revertDrilldown(...v)),
1068
+ onClick: n[2] || (n[2] = (...v) => e.revertDrilldown && e.revertDrilldown(...v)),
1061
1069
  class: "control-btn",
1062
1070
  "data-testid": "refresh-chart-btn",
1063
1071
  title: "Clear Drilldown"
1064
- }, [...o[6] || (o[6] = [
1072
+ }, [...n[6] || (n[6] = [
1065
1073
  t("i", { class: "mdi mdi-undo icon" }, null, -1)
1066
1074
  ])])
1067
1075
  ], 2)) : R("", !0)
1068
1076
  ], 34);
1069
1077
  }
1070
- const En = /* @__PURE__ */ Y(kn, [["render", Dn], ["__scopeId", "data-v-36046d80"]]), Tn = J({
1078
+ const Do = /* @__PURE__ */ Y(ko, [["render", Eo], ["__scopeId", "data-v-36046d80"]]), Io = J({
1071
1079
  name: "DynamicMarkdownChart",
1072
1080
  components: {
1073
- ErrorMessage: Ie,
1081
+ ErrorMessage: Le,
1074
1082
  MarkdownRenderer: Ct
1075
1083
  },
1076
1084
  props: {
@@ -1102,17 +1110,17 @@ const En = /* @__PURE__ */ Y(kn, [["render", Dn], ["__scopeId", "data-v-36046d80
1102
1110
  }
1103
1111
  },
1104
1112
  setup(e) {
1105
- const o = p(() => e.getItemData(e.itemId, e.dashboardId)), n = p(() => o.value.structured_content || { markdown: "", query: "" }), l = p(() => n.value.markdown || ""), r = p(() => n.value.query || ""), i = p(() => o.value.results || null), s = p(() => o.value.loading || !1), f = p(() => o.value.error || null), c = p(() => o.value.filters || []), a = p(() => o.value.loadStartTime || null), v = p(() => o.value.onRefresh || null), E = j("connectionStore"), C = j("analyticsStore");
1106
- if (!E)
1113
+ const n = p(() => e.getItemData(e.itemId, e.dashboardId)), o = p(() => n.value.structured_content || { markdown: "", query: "" }), l = p(() => o.value.markdown || ""), r = p(() => o.value.query || ""), i = p(() => n.value.results || null), s = p(() => n.value.loading || !1), f = p(() => n.value.error || null), c = p(() => n.value.filters || []), a = p(() => n.value.loadStartTime || null), v = p(() => n.value.onRefresh || null), w = j("connectionStore"), b = j("analyticsStore");
1114
+ if (!w)
1107
1115
  throw new Error("Connection store not found!");
1108
1116
  const {
1109
- chartContainer: D,
1110
- ready: V,
1117
+ chartContainer: I,
1118
+ ready: x,
1111
1119
  controlsVisible: k,
1112
1120
  handleLocalRefresh: M,
1113
1121
  onChartMouseEnter: T,
1114
- onChartMouseLeave: H
1115
- } = Le({
1122
+ onChartMouseLeave: O
1123
+ } = Re({
1116
1124
  dashboardId: () => e.dashboardId,
1117
1125
  itemId: () => e.itemId,
1118
1126
  query: r,
@@ -1120,14 +1128,14 @@ const En = /* @__PURE__ */ Y(kn, [["render", Dn], ["__scopeId", "data-v-36046d80
1120
1128
  loading: s,
1121
1129
  onRefresh: v,
1122
1130
  getDashboardQueryExecutor: e.getDashboardQueryExecutor,
1123
- analyticsStore: C,
1131
+ analyticsStore: b,
1124
1132
  analyticsEvent: "dashboard-markdown-execution",
1125
1133
  analyticsType: "MARKDOWN"
1126
1134
  });
1127
1135
  return {
1128
- chartContainer: D,
1136
+ chartContainer: I,
1129
1137
  results: i,
1130
- ready: V,
1138
+ ready: x,
1131
1139
  loading: s,
1132
1140
  error: f,
1133
1141
  filters: c,
@@ -1137,51 +1145,51 @@ const En = /* @__PURE__ */ Y(kn, [["render", Dn], ["__scopeId", "data-v-36046d80
1137
1145
  startTime: a,
1138
1146
  controlsVisible: k,
1139
1147
  onChartMouseEnter: T,
1140
- onChartMouseLeave: H
1148
+ onChartMouseLeave: O
1141
1149
  };
1142
1150
  }
1143
1151
  });
1144
- function In(e, o, n, l, r, i) {
1145
- const s = X("ErrorMessage"), f = X("MarkdownRenderer");
1146
- return m(), y("div", {
1152
+ function To(e, n, o, l, r, i) {
1153
+ const s = Z("ErrorMessage"), f = Z("MarkdownRenderer");
1154
+ return h(), y("div", {
1147
1155
  ref: "chartContainer",
1148
- class: A(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1149
- onMouseenter: o[1] || (o[1] = (...c) => e.onChartMouseEnter && e.onChartMouseEnter(...c)),
1150
- onMouseleave: o[2] || (o[2] = (...c) => e.onChartMouseLeave && e.onChartMouseLeave(...c))
1156
+ class: q(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1157
+ onMouseenter: n[1] || (n[1] = (...c) => e.onChartMouseEnter && e.onChartMouseEnter(...c)),
1158
+ onMouseleave: n[2] || (n[2] = (...c) => e.onChartMouseLeave && e.onChartMouseLeave(...c))
1151
1159
  }, [
1152
- e.error && !e.loading ? (m(), G(s, {
1160
+ e.error && !e.loading ? (h(), _(s, {
1153
1161
  key: 0,
1154
1162
  compact: !0,
1155
1163
  details: e.error,
1156
1164
  query: e.query,
1157
1165
  filters: e.filters
1158
- }, null, 8, ["details", "query", "filters"])) : e.ready ? (m(), G(f, {
1166
+ }, null, 8, ["details", "query", "filters"])) : e.ready ? (h(), _(f, {
1159
1167
  key: 1,
1160
1168
  markdown: e.markdown,
1161
1169
  results: e.results,
1162
1170
  loading: e.loading
1163
1171
  }, null, 8, ["markdown", "results", "loading"])) : R("", !0),
1164
- !e.loading && e.editMode ? (m(), y("div", {
1172
+ !e.loading && e.editMode ? (h(), y("div", {
1165
1173
  key: 2,
1166
- class: A(["controls-toggle", { "controls-visible": e.controlsVisible }])
1174
+ class: q(["controls-toggle", { "controls-visible": e.controlsVisible }])
1167
1175
  }, [
1168
1176
  t("button", {
1169
- onClick: o[0] || (o[0] = (...c) => e.handleLocalRefresh && e.handleLocalRefresh(...c)),
1177
+ onClick: n[0] || (n[0] = (...c) => e.handleLocalRefresh && e.handleLocalRefresh(...c)),
1170
1178
  class: "control-btn",
1171
1179
  "data-testid": "refresh-chart-btn",
1172
1180
  title: "Refresh text"
1173
- }, [...o[3] || (o[3] = [
1181
+ }, [...n[3] || (n[3] = [
1174
1182
  t("i", { class: "mdi mdi-refresh icon" }, null, -1)
1175
1183
  ])])
1176
1184
  ], 2)) : R("", !0)
1177
1185
  ], 34);
1178
1186
  }
1179
- const $n = /* @__PURE__ */ Y(Tn, [["render", In], ["__scopeId", "data-v-ffafce48"]]), Ln = J({
1187
+ const $o = /* @__PURE__ */ Y(Io, [["render", To], ["__scopeId", "data-v-ffafce48"]]), Lo = J({
1180
1188
  name: "DashboardTable",
1181
1189
  components: {
1182
1190
  DataTable: wt,
1183
- ErrorMessage: Ie,
1184
- LoadingView: $e
1191
+ ErrorMessage: Le,
1192
+ LoadingView: Me
1185
1193
  },
1186
1194
  props: {
1187
1195
  dashboardId: {
@@ -1211,32 +1219,32 @@ const $n = /* @__PURE__ */ Y(Tn, [["render", In], ["__scopeId", "data-v-ffafce48
1211
1219
  required: !0
1212
1220
  }
1213
1221
  },
1214
- setup(e, { emit: o }) {
1215
- const n = p(() => e.getItemData(e.itemId, e.dashboardId)), l = p(() => n.value.content), r = p(() => n.value.results || null), i = p(() => n.value.loading || !1), s = p(() => n.value.error || null), f = p(() => n.value.filters || []), c = p(() => n.value.loadStartTime || null), a = p(() => (n.value.height || 300) - 75), v = p(() => (n.value.width || 300) - 100), E = p(() => n.value.onRefresh || null), C = j("connectionStore"), D = j("analyticsStore");
1216
- if (!C)
1222
+ setup(e, { emit: n }) {
1223
+ const o = p(() => e.getItemData(e.itemId, e.dashboardId)), l = p(() => o.value.content), r = p(() => o.value.results || null), i = p(() => o.value.loading || !1), s = p(() => o.value.error || null), f = p(() => o.value.filters || []), c = p(() => o.value.loadStartTime || null), a = p(() => (o.value.height || 300) - 75), v = p(() => (o.value.width || 300) - 100), w = p(() => o.value.onRefresh || null), b = j("connectionStore"), I = j("analyticsStore");
1224
+ if (!b)
1217
1225
  throw new Error("Connection store not found!");
1218
1226
  const {
1219
- chartContainer: V,
1227
+ chartContainer: x,
1220
1228
  ready: k,
1221
1229
  showLoading: M,
1222
1230
  controlsVisible: T,
1223
- handleLocalRefresh: H,
1224
- onChartMouseEnter: K,
1225
- onChartMouseLeave: O
1226
- } = Le({
1231
+ handleLocalRefresh: O,
1232
+ onChartMouseEnter: W,
1233
+ onChartMouseLeave: V
1234
+ } = Re({
1227
1235
  dashboardId: () => e.dashboardId,
1228
1236
  itemId: () => e.itemId,
1229
1237
  query: l,
1230
1238
  results: r,
1231
1239
  loading: i,
1232
- onRefresh: E,
1240
+ onRefresh: w,
1233
1241
  getDashboardQueryExecutor: e.getDashboardQueryExecutor,
1234
- analyticsStore: D,
1242
+ analyticsStore: I,
1235
1243
  analyticsEvent: "dashboard-table-execution",
1236
1244
  analyticsType: "TABLE"
1237
1245
  });
1238
1246
  return {
1239
- chartContainer: V,
1247
+ chartContainer: x,
1240
1248
  results: r,
1241
1249
  ready: k,
1242
1250
  loading: i,
@@ -1246,11 +1254,11 @@ const $n = /* @__PURE__ */ Y(Tn, [["render", In], ["__scopeId", "data-v-ffafce48
1246
1254
  query: l,
1247
1255
  chartHeight: a,
1248
1256
  chartWidth: v,
1249
- onRefresh: E,
1250
- handleLocalRefresh: H,
1257
+ onRefresh: w,
1258
+ handleLocalRefresh: O,
1251
1259
  startTime: c,
1252
1260
  handleDimensionClick: (B) => {
1253
- o("dimension-click", {
1261
+ n("dimension-click", {
1254
1262
  source: e.itemId,
1255
1263
  filters: B.filters,
1256
1264
  chart: B.chart,
@@ -1258,32 +1266,32 @@ const $n = /* @__PURE__ */ Y(Tn, [["render", In], ["__scopeId", "data-v-ffafce48
1258
1266
  });
1259
1267
  },
1260
1268
  handleBackgroundClick: () => {
1261
- o("background-click");
1269
+ n("background-click");
1262
1270
  },
1263
1271
  controlsVisible: T,
1264
- onChartMouseEnter: K,
1265
- onChartMouseLeave: O
1272
+ onChartMouseEnter: W,
1273
+ onChartMouseLeave: V
1266
1274
  };
1267
1275
  }
1268
- }), Mn = {
1276
+ }), Mo = {
1269
1277
  key: 2,
1270
1278
  class: "loading-overlay"
1271
1279
  };
1272
- function Rn(e, o, n, l, r, i) {
1273
- const s = X("ErrorMessage"), f = X("data-table"), c = X("LoadingView");
1274
- return m(), y("div", {
1280
+ function Ro(e, n, o, l, r, i) {
1281
+ const s = Z("ErrorMessage"), f = Z("data-table"), c = Z("LoadingView");
1282
+ return h(), y("div", {
1275
1283
  ref: "chartContainer",
1276
- class: A(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1277
- onMouseenter: o[1] || (o[1] = (...a) => e.onChartMouseEnter && e.onChartMouseEnter(...a)),
1278
- onMouseleave: o[2] || (o[2] = (...a) => e.onChartMouseLeave && e.onChartMouseLeave(...a))
1284
+ class: q(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1285
+ onMouseenter: n[1] || (n[1] = (...a) => e.onChartMouseEnter && e.onChartMouseEnter(...a)),
1286
+ onMouseleave: n[2] || (n[2] = (...a) => e.onChartMouseLeave && e.onChartMouseLeave(...a))
1279
1287
  }, [
1280
- e.error && !e.loading ? (m(), G(s, {
1288
+ e.error && !e.loading ? (h(), _(s, {
1281
1289
  key: 0,
1282
1290
  compact: !0,
1283
1291
  details: e.error,
1284
1292
  query: e.query,
1285
1293
  filters: e.filters
1286
- }, null, 8, ["details", "query", "filters"])) : e.results && e.ready ? (m(), G(f, {
1294
+ }, null, 8, ["details", "query", "filters"])) : e.results && e.ready ? (h(), _(f, {
1287
1295
  key: 1,
1288
1296
  id: `${e.itemId}-${e.dashboardId}`,
1289
1297
  headers: e.results.headers,
@@ -1295,29 +1303,29 @@ function Rn(e, o, n, l, r, i) {
1295
1303
  onCellClick: e.handleDimensionClick,
1296
1304
  onBackgroundClick: e.handleBackgroundClick
1297
1305
  }, null, 8, ["id", "headers", "results", "containerHeight", "onCellClick", "onBackgroundClick"])) : R("", !0),
1298
- e.loading && e.showLoading ? (m(), y("div", Mn, [
1306
+ e.loading && e.showLoading ? (h(), y("div", Mo, [
1299
1307
  z(c, {
1300
1308
  startTime: e.startTime,
1301
1309
  text: "",
1302
1310
  subtle: ""
1303
1311
  }, null, 8, ["startTime"])
1304
1312
  ])) : R("", !0),
1305
- !e.loading && e.editMode ? (m(), y("div", {
1313
+ !e.loading && e.editMode ? (h(), y("div", {
1306
1314
  key: 3,
1307
- class: A(["controls-toggle", { "controls-visible": e.controlsVisible }])
1315
+ class: q(["controls-toggle", { "controls-visible": e.controlsVisible }])
1308
1316
  }, [
1309
1317
  t("button", {
1310
- onClick: o[0] || (o[0] = (...a) => e.handleLocalRefresh && e.handleLocalRefresh(...a)),
1318
+ onClick: n[0] || (n[0] = (...a) => e.handleLocalRefresh && e.handleLocalRefresh(...a)),
1311
1319
  class: "control-btn",
1312
1320
  "data-testid": "refresh-chart-btn",
1313
1321
  title: "Refresh table"
1314
- }, [...o[3] || (o[3] = [
1322
+ }, [...n[3] || (n[3] = [
1315
1323
  t("i", { class: "mdi mdi-refresh icon" }, null, -1)
1316
1324
  ])])
1317
1325
  ], 2)) : R("", !0)
1318
1326
  ], 34);
1319
1327
  }
1320
- const An = /* @__PURE__ */ Y(Ln, [["render", Rn], ["__scopeId", "data-v-2fa93a82"]]), qn = {
1328
+ const Ao = /* @__PURE__ */ Y(Lo, [["render", Ro], ["__scopeId", "data-v-2fa93a82"]]), qo = {
1321
1329
  data() {
1322
1330
  return {
1323
1331
  selectedValue: "",
@@ -1357,10 +1365,10 @@ const An = /* @__PURE__ */ Y(Ln, [["render", Rn], ["__scopeId", "data-v-2fa93a82
1357
1365
  }
1358
1366
  },
1359
1367
  setup() {
1360
- const e = j("userSettingsStore", null), o = kt(e);
1368
+ const e = j("userSettingsStore", null), n = kt(e);
1361
1369
  return {
1362
1370
  settingsStore: e,
1363
- currentTheme: o
1371
+ currentTheme: n
1364
1372
  };
1365
1373
  },
1366
1374
  computed: {
@@ -1382,23 +1390,23 @@ const An = /* @__PURE__ */ Y(Ln, [["render", Rn], ["__scopeId", "data-v-2fa93a82
1382
1390
  selectOptions() {
1383
1391
  if (!this.displayColumn || !this.valueColumn || !this.results || this.results.length === 0)
1384
1392
  return [];
1385
- const e = this.displayColumn.name, o = this.valueColumn.name, n = [];
1393
+ const e = this.displayColumn.name, n = this.valueColumn.name, o = [];
1386
1394
  return this.results.forEach((l) => {
1387
- const r = l[e], i = l[o];
1395
+ const r = l[e], i = l[n];
1388
1396
  if (r != null && i !== null && i !== void 0) {
1389
1397
  const s = this.formatValue(r, this.displayColumn);
1390
- n.push({
1398
+ o.push({
1391
1399
  label: s,
1392
1400
  value: i
1393
1401
  });
1394
1402
  }
1395
- }), n;
1403
+ }), o;
1396
1404
  },
1397
1405
  filteredOptions() {
1398
1406
  if (!this.searchText)
1399
1407
  return this.selectOptions;
1400
1408
  const e = this.searchText.toLowerCase();
1401
- return this.selectOptions.filter((o) => o.label.toLowerCase().includes(e));
1409
+ return this.selectOptions.filter((n) => n.label.toLowerCase().includes(e));
1402
1410
  },
1403
1411
  placeholderText() {
1404
1412
  return this.hasSelection ? this.selectedLabel || "Type to search..." : !this.selectOptions || this.selectOptions.length === 0 ? "No data available" : "All";
@@ -1432,20 +1440,20 @@ const An = /* @__PURE__ */ Y(Ln, [["render", Rn], ["__scopeId", "data-v-2fa93a82
1432
1440
  }
1433
1441
  },
1434
1442
  methods: {
1435
- formatValue(e, o) {
1436
- var n, l;
1437
- switch (o.type) {
1438
- case ce.FLOAT:
1439
- return (n = o.traits) != null && n.includes("usd") ? `$${Number(e).toFixed(o.scale || 2)}` : (l = o.traits) != null && l.includes("percent") ? `${(Number(e) * 100).toFixed(2)}%` : Number(e).toFixed(o.scale || 2);
1440
- case ce.DATETIME:
1441
- case ce.TIMESTAMP:
1442
- case ce.DATE:
1443
- case ce.TIME:
1443
+ formatValue(e, n) {
1444
+ var o, l;
1445
+ switch (n.type) {
1446
+ case he.FLOAT:
1447
+ return (o = n.traits) != null && o.includes("usd") ? `$${Number(e).toFixed(n.scale || 2)}` : (l = n.traits) != null && l.includes("percent") ? `${(Number(e) * 100).toFixed(2)}%` : Number(e).toFixed(n.scale || 2);
1448
+ case he.DATETIME:
1449
+ case he.TIMESTAMP:
1450
+ case he.DATE:
1451
+ case he.TIME:
1444
1452
  return e instanceof Date ? e.toLocaleString() : String(e);
1445
- case ce.BOOLEAN:
1453
+ case he.BOOLEAN:
1446
1454
  return e ? "✓" : "✗";
1447
- case ce.ARRAY:
1448
- case ce.STRUCT:
1455
+ case he.ARRAY:
1456
+ case he.STRUCT:
1449
1457
  return JSON.stringify(e);
1450
1458
  default:
1451
1459
  return String(e);
@@ -1454,7 +1462,7 @@ const An = /* @__PURE__ */ Y(Ln, [["render", Rn], ["__scopeId", "data-v-2fa93a82
1454
1462
  highlightMatch(e) {
1455
1463
  if (!this.searchText)
1456
1464
  return e;
1457
- const o = this.searchText.toLowerCase(), l = e.toLowerCase().indexOf(o);
1465
+ const n = this.searchText.toLowerCase(), l = e.toLowerCase().indexOf(n);
1458
1466
  if (l === -1)
1459
1467
  return e;
1460
1468
  const r = e.slice(0, l), i = e.slice(l, l + this.searchText.length), s = e.slice(l + this.searchText.length);
@@ -1490,29 +1498,29 @@ const An = /* @__PURE__ */ Y(Ln, [["render", Rn], ["__scopeId", "data-v-2fa93a82
1490
1498
  });
1491
1499
  }
1492
1500
  }
1493
- }, Fn = { class: "result-select row pa-0 ba-0" }, xn = { class: "select-container" }, Hn = { class: "search-input-wrapper" }, Vn = {
1501
+ }, Fo = { class: "result-select row pa-0 ba-0" }, xo = { class: "select-container" }, Ho = { class: "search-input-wrapper" }, Oo = {
1494
1502
  key: 0,
1495
1503
  class: "inline-label"
1496
- }, On = ["placeholder", "disabled"], Qn = ["onMousedown", "innerHTML"];
1497
- function Bn(e, o, n, l, r, i) {
1498
- return m(), y("div", Fn, [
1499
- t("div", xn, [
1500
- t("div", Hn, [
1501
- i.hasSelection ? (m(), y("span", Vn, N(i.fieldLabel) + ": ", 1)) : R("", !0),
1502
- ue(t("input", {
1504
+ }, Vo = ["placeholder", "disabled"], Qo = ["onMousedown", "innerHTML"];
1505
+ function Bo(e, n, o, l, r, i) {
1506
+ return h(), y("div", Fo, [
1507
+ t("div", xo, [
1508
+ t("div", Ho, [
1509
+ i.hasSelection ? (h(), y("span", Oo, P(i.fieldLabel) + ": ", 1)) : R("", !0),
1510
+ ce(t("input", {
1503
1511
  ref: "searchInput",
1504
- "onUpdate:modelValue": o[0] || (o[0] = (s) => r.searchText = s),
1512
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => r.searchText = s),
1505
1513
  type: "text",
1506
- class: A(["search-input", { "has-inline-label": i.hasSelection }]),
1514
+ class: q(["search-input", { "has-inline-label": i.hasSelection }]),
1507
1515
  placeholder: i.placeholderText,
1508
1516
  disabled: !i.selectOptions || i.selectOptions.length === 0,
1509
- onFocus: o[1] || (o[1] = (...s) => i.handleFocus && i.handleFocus(...s)),
1510
- onInput: o[2] || (o[2] = (...s) => i.onSearchInput && i.onSearchInput(...s)),
1511
- onBlur: o[3] || (o[3] = (...s) => i.handleBlur && i.handleBlur(...s))
1512
- }, null, 42, On), [
1513
- [fe, r.searchText]
1517
+ onFocus: n[1] || (n[1] = (...s) => i.handleFocus && i.handleFocus(...s)),
1518
+ onInput: n[2] || (n[2] = (...s) => i.onSearchInput && i.onSearchInput(...s)),
1519
+ onBlur: n[3] || (n[3] = (...s) => i.handleBlur && i.handleBlur(...s))
1520
+ }, null, 42, Vo), [
1521
+ [pe, r.searchText]
1514
1522
  ]),
1515
- o[5] || (o[5] = t("span", { class: "search-icon" }, [
1523
+ n[5] || (n[5] = t("span", { class: "search-icon" }, [
1516
1524
  t("svg", {
1517
1525
  xmlns: "http://www.w3.org/2000/svg",
1518
1526
  viewBox: "0 0 24 24",
@@ -1531,40 +1539,40 @@ function Bn(e, o, n, l, r, i) {
1531
1539
  ])
1532
1540
  ], -1))
1533
1541
  ]),
1534
- (m(), G(ot, { to: "body" }, [
1535
- r.showDropdown && i.filteredOptions.length > 0 ? (m(), y("div", {
1542
+ (h(), _(nt, { to: "body" }, [
1543
+ r.showDropdown && i.filteredOptions.length > 0 ? (h(), y("div", {
1536
1544
  key: 0,
1537
1545
  class: "dropdown-list",
1538
- style: Ee(i.dropdownStyle)
1546
+ style: Te(i.dropdownStyle)
1539
1547
  }, [
1540
1548
  t("div", {
1541
- class: A(["dropdown-item select-all", { selected: !r.selectedValue }]),
1542
- onMousedown: o[4] || (o[4] = Be((...s) => i.selectAll && i.selectAll(...s), ["prevent"]))
1549
+ class: q(["dropdown-item select-all", { selected: !r.selectedValue }]),
1550
+ onMousedown: n[4] || (n[4] = Oe((...s) => i.selectAll && i.selectAll(...s), ["prevent"]))
1543
1551
  }, " All ", 34),
1544
- (m(!0), y(me, null, be(i.filteredOptions, (s, f) => (m(), y("div", {
1552
+ (h(!0), y(fe, null, we(i.filteredOptions, (s, f) => (h(), y("div", {
1545
1553
  key: f,
1546
- class: A(["dropdown-item", { selected: r.selectedValue === s.value }]),
1547
- onMousedown: Be((c) => i.selectOption(s), ["prevent"]),
1554
+ class: q(["dropdown-item", { selected: r.selectedValue === s.value }]),
1555
+ onMousedown: Oe((c) => i.selectOption(s), ["prevent"]),
1548
1556
  innerHTML: i.highlightMatch(s.label)
1549
- }, null, 42, Qn))), 128))
1557
+ }, null, 42, Qo))), 128))
1550
1558
  ], 4)) : R("", !0),
1551
- r.showDropdown && r.searchText && i.filteredOptions.length === 0 ? (m(), y("div", {
1559
+ r.showDropdown && r.searchText && i.filteredOptions.length === 0 ? (h(), y("div", {
1552
1560
  key: 1,
1553
1561
  class: "dropdown-list",
1554
- style: Ee(i.dropdownStyle)
1555
- }, [...o[6] || (o[6] = [
1562
+ style: Te(i.dropdownStyle)
1563
+ }, [...n[6] || (n[6] = [
1556
1564
  t("div", { class: "dropdown-item no-results" }, "No matches found", -1)
1557
1565
  ])], 4)) : R("", !0)
1558
1566
  ]))
1559
1567
  ])
1560
1568
  ]);
1561
1569
  }
1562
- const Nn = /* @__PURE__ */ Y(qn, [["render", Bn], ["__scopeId", "data-v-660a47c4"]]), Pn = J({
1570
+ const No = /* @__PURE__ */ Y(qo, [["render", Bo], ["__scopeId", "data-v-660a47c4"]]), Po = J({
1563
1571
  name: "DashboardFilter",
1564
1572
  components: {
1565
- DashboardDataSelector: Nn,
1566
- ErrorMessage: Ie,
1567
- LoadingView: $e
1573
+ DashboardDataSelector: No,
1574
+ ErrorMessage: Le,
1575
+ LoadingView: Me
1568
1576
  },
1569
1577
  props: {
1570
1578
  dashboardId: {
@@ -1594,32 +1602,32 @@ const Nn = /* @__PURE__ */ Y(qn, [["render", Bn], ["__scopeId", "data-v-660a47c4
1594
1602
  required: !0
1595
1603
  }
1596
1604
  },
1597
- setup(e, { emit: o }) {
1598
- const n = p(() => e.getItemData(e.itemId, e.dashboardId)), l = p(() => n.value.content), r = p(() => n.value.results || null), i = p(() => n.value.loading || !1), s = p(() => n.value.error || null), f = p(() => n.value.filters || []), c = p(() => n.value.loadStartTime || null), a = p(() => (n.value.height || 300) - 75), v = p(() => (n.value.width || 300) - 100), E = p(() => n.value.onRefresh || null), C = j("connectionStore"), D = j("analyticsStore");
1599
- if (!C)
1605
+ setup(e, { emit: n }) {
1606
+ const o = p(() => e.getItemData(e.itemId, e.dashboardId)), l = p(() => o.value.content), r = p(() => o.value.results || null), i = p(() => o.value.loading || !1), s = p(() => o.value.error || null), f = p(() => o.value.filters || []), c = p(() => o.value.loadStartTime || null), a = p(() => (o.value.height || 300) - 75), v = p(() => (o.value.width || 300) - 100), w = p(() => o.value.onRefresh || null), b = j("connectionStore"), I = j("analyticsStore");
1607
+ if (!b)
1600
1608
  throw new Error("Connection store not found!");
1601
1609
  const {
1602
- chartContainer: V,
1610
+ chartContainer: x,
1603
1611
  ready: k,
1604
1612
  showLoading: M,
1605
1613
  controlsVisible: T,
1606
- handleLocalRefresh: H,
1607
- onChartMouseEnter: K,
1608
- onChartMouseLeave: O
1609
- } = Le({
1614
+ handleLocalRefresh: O,
1615
+ onChartMouseEnter: W,
1616
+ onChartMouseLeave: V
1617
+ } = Re({
1610
1618
  dashboardId: () => e.dashboardId,
1611
1619
  itemId: () => e.itemId,
1612
1620
  query: l,
1613
1621
  results: r,
1614
1622
  loading: i,
1615
- onRefresh: E,
1623
+ onRefresh: w,
1616
1624
  getDashboardQueryExecutor: e.getDashboardQueryExecutor,
1617
- analyticsStore: D,
1625
+ analyticsStore: I,
1618
1626
  analyticsEvent: "dashboard-filter-execution",
1619
1627
  analyticsType: "FILTER"
1620
1628
  });
1621
1629
  return {
1622
- chartContainer: V,
1630
+ chartContainer: x,
1623
1631
  results: r,
1624
1632
  ready: k,
1625
1633
  loading: i,
@@ -1629,11 +1637,11 @@ const Nn = /* @__PURE__ */ Y(qn, [["render", Bn], ["__scopeId", "data-v-660a47c4
1629
1637
  query: l,
1630
1638
  chartHeight: a,
1631
1639
  chartWidth: v,
1632
- onRefresh: E,
1633
- handleLocalRefresh: H,
1640
+ onRefresh: w,
1641
+ handleLocalRefresh: O,
1634
1642
  startTime: c,
1635
1643
  handleDimensionClick: (B) => {
1636
- o("dimension-click", {
1644
+ n("dimension-click", {
1637
1645
  source: e.itemId,
1638
1646
  filters: B.filters,
1639
1647
  chart: B.chart,
@@ -1641,32 +1649,32 @@ const Nn = /* @__PURE__ */ Y(qn, [["render", Bn], ["__scopeId", "data-v-660a47c4
1641
1649
  });
1642
1650
  },
1643
1651
  handleBackgroundClick: () => {
1644
- o("background-click");
1652
+ n("background-click");
1645
1653
  },
1646
1654
  controlsVisible: T,
1647
- onChartMouseEnter: K,
1648
- onChartMouseLeave: O
1655
+ onChartMouseEnter: W,
1656
+ onChartMouseLeave: V
1649
1657
  };
1650
1658
  }
1651
- }), Kn = {
1659
+ }), Ko = {
1652
1660
  key: 2,
1653
1661
  class: "loading-overlay"
1654
1662
  };
1655
- function Wn(e, o, n, l, r, i) {
1656
- const s = X("ErrorMessage"), f = X("dashboard-data-selector"), c = X("LoadingView");
1657
- return m(), y("div", {
1663
+ function Wo(e, n, o, l, r, i) {
1664
+ const s = Z("ErrorMessage"), f = Z("dashboard-data-selector"), c = Z("LoadingView");
1665
+ return h(), y("div", {
1658
1666
  ref: "chartContainer",
1659
- class: A(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1660
- onMouseenter: o[0] || (o[0] = (...a) => e.onChartMouseEnter && e.onChartMouseEnter(...a)),
1661
- onMouseleave: o[1] || (o[1] = (...a) => e.onChartMouseLeave && e.onChartMouseLeave(...a))
1667
+ class: q(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1668
+ onMouseenter: n[0] || (n[0] = (...a) => e.onChartMouseEnter && e.onChartMouseEnter(...a)),
1669
+ onMouseleave: n[1] || (n[1] = (...a) => e.onChartMouseLeave && e.onChartMouseLeave(...a))
1662
1670
  }, [
1663
- e.error && !e.loading ? (m(), G(s, {
1671
+ e.error && !e.loading ? (h(), _(s, {
1664
1672
  key: 0,
1665
1673
  compact: !0,
1666
1674
  details: e.error,
1667
1675
  query: e.query,
1668
1676
  filters: e.filters
1669
- }, null, 8, ["details", "query", "filters"])) : e.results && e.ready ? (m(), G(f, {
1677
+ }, null, 8, ["details", "query", "filters"])) : e.results && e.ready ? (h(), _(f, {
1670
1678
  key: 1,
1671
1679
  id: `${e.itemId}-${e.dashboardId}`,
1672
1680
  headers: e.results.headers,
@@ -1677,7 +1685,7 @@ function Wn(e, o, n, l, r, i) {
1677
1685
  onCellClick: e.handleDimensionClick,
1678
1686
  onBackgroundClick: e.handleBackgroundClick
1679
1687
  }, null, 8, ["id", "headers", "results", "containerHeight", "onCellClick", "onBackgroundClick"])) : R("", !0),
1680
- e.loading && e.showLoading ? (m(), y("div", Kn, [
1688
+ e.loading && e.showLoading ? (h(), y("div", Ko, [
1681
1689
  z(c, {
1682
1690
  startTime: e.startTime,
1683
1691
  text: "",
@@ -1686,25 +1694,25 @@ function Wn(e, o, n, l, r, i) {
1686
1694
  ])) : R("", !0)
1687
1695
  ], 34);
1688
1696
  }
1689
- const Un = /* @__PURE__ */ Y(Pn, [["render", Wn], ["__scopeId", "data-v-9f88e03e"]]), jn = ["data-testid"], Gn = ["data-testid"], _n = ["data-testid"], zn = ["data-testid"], Jn = {
1697
+ const Uo = /* @__PURE__ */ Y(Po, [["render", Wo], ["__scopeId", "data-v-9f88e03e"]]), jo = ["data-testid"], _o = ["data-testid"], Go = ["data-testid"], zo = ["data-testid"], Jo = {
1690
1698
  key: 1,
1691
1699
  class: "grid-item-header"
1692
- }, Yn = { class: "grid-item-header-left" }, Zn = {
1700
+ }, Yo = { class: "grid-item-header-left" }, Zo = {
1693
1701
  key: 0,
1694
1702
  class: "drag-handle-icon grid-item-drag-handle"
1695
- }, Xn = { class: "item-title-container no-drag" }, eo = ["title"], to = { class: "item-title-text" }, no = {
1703
+ }, Xo = { class: "item-title-container no-drag" }, en = ["title"], tn = { class: "item-title-text" }, on = {
1696
1704
  key: 0,
1697
1705
  class: "mdi mdi-pencil-outline edit-indicator"
1698
- }, oo = ["id", "placeholder"], io = { class: "grid-item-header-right" }, ro = {
1706
+ }, nn = ["id", "placeholder"], rn = { class: "grid-item-header-right" }, ln = {
1699
1707
  key: 0,
1700
1708
  class: "header-filters no-drag"
1701
- }, lo = ["title"], ao = { class: "filter-content" }, so = { class: "filter-source" }, uo = { class: "filter-value" }, co = ["onClick", "title"], mo = ["title"], ho = ["title"], fo = { class: "section-header-text" }, vo = ["id", "placeholder"], po = ["data-testid"], yo = ["data-testid"], go = ["data-testid"], bo = ["data-testid", "title"], Co = {
1709
+ }, an = { class: "header-filter-chip" }, sn = { class: "filter-content" }, dn = { class: "filter-source" }, un = { class: "filter-value" }, cn = ["onClick"], mn = ["onClick", "title"], hn = { class: "header-filter-chip filter-overflow" }, fn = ["title"], vn = { class: "section-header-text" }, pn = ["id", "placeholder"], yn = ["data-testid"], gn = ["data-testid"], bn = ["data-testid"], Cn = ["data-testid", "title"], wn = {
1702
1710
  key: 0,
1703
1711
  class: "mdi mdi-filter-remove-outline icon"
1704
- }, wo = {
1712
+ }, kn = {
1705
1713
  key: 1,
1706
1714
  class: "mdi mdi-filter-outline icon"
1707
- }, ko = ["data-testid"], So = ["data-testid"], Do = /* @__PURE__ */ J({
1715
+ }, Sn = ["data-testid"], En = ["data-testid"], Dn = /* @__PURE__ */ J({
1708
1716
  __name: "DashboardGridItem",
1709
1717
  props: {
1710
1718
  dashboardId: {},
@@ -1716,150 +1724,160 @@ const Un = /* @__PURE__ */ Y(Pn, [["render", Wn], ["__scopeId", "data-v-9f88e03e
1716
1724
  setItemData: { type: Function }
1717
1725
  },
1718
1726
  emits: ["edit-content", "update-dimensions", "dimension-click", "background-click", "remove-filter", "remove-item", "copy-item"],
1719
- setup(e, { emit: o }) {
1720
- const n = e, l = o, r = S(!1), i = S(""), s = S(!1), f = S(!1), c = S(null), a = S(null);
1721
- function v(W) {
1722
- return W.replace(/'''/g, "'").replace("local.", "");
1723
- }
1724
- function E(W, q = 1e3) {
1725
- const P = v(W);
1726
- return P.length <= q ? P : P.substring(0, q) + "...";
1727
- }
1728
- function C() {
1729
- if (!n.editMode) return;
1730
- const W = n.getItemData(n.item.i, n.dashboardId);
1731
- s.value = !1, f.value = !1, r.value = !0, i.value = W.name, setTimeout(() => {
1732
- const q = document.getElementById(`title-input-${n.item.i}`);
1733
- q && q.focus();
1727
+ setup(e, { emit: n }) {
1728
+ const o = e, l = n, r = S(!1), i = S(""), s = S(!1), f = S(!1), c = S(null), a = S(null);
1729
+ function v(K) {
1730
+ return K.replace(/'''/g, "'").replace("local.", "");
1731
+ }
1732
+ function w(K, A) {
1733
+ let N = v(K);
1734
+ if (A) {
1735
+ const ae = Object.keys(A).sort((oe, me) => me.length - oe.length);
1736
+ for (const oe of ae) {
1737
+ const me = A[oe], Fe = new RegExp(oe.replace(":", "\\:"), "g");
1738
+ N = N.replace(Fe, String(me));
1739
+ }
1740
+ }
1741
+ return N;
1742
+ }
1743
+ function b(K, A) {
1744
+ navigator.clipboard.writeText(w(K, A));
1745
+ }
1746
+ function I() {
1747
+ if (!o.editMode) return;
1748
+ const K = o.getItemData(o.item.i, o.dashboardId);
1749
+ s.value = !1, f.value = !1, r.value = !0, i.value = K.name, setTimeout(() => {
1750
+ const A = document.getElementById(`title-input-${o.item.i}`);
1751
+ A && A.focus();
1734
1752
  }, 0);
1735
1753
  }
1736
- function D() {
1754
+ function x() {
1737
1755
  if (r.value) {
1738
- const W = n.getItemData(n.item.i, n.dashboardId), q = i.value.trim() || W.name;
1739
- n.setItemData(n.item.i, n.dashboardId, { name: q }), r.value = !1;
1756
+ const K = o.getItemData(o.item.i, o.dashboardId), A = i.value.trim() || K.name;
1757
+ o.setItemData(o.item.i, o.dashboardId, { name: A }), r.value = !1;
1740
1758
  }
1741
1759
  }
1742
- function V() {
1743
- const q = !n.getItemData(n.item.i, n.dashboardId).allowCrossFilter;
1744
- n.setItemData(n.item.i, n.dashboardId, {
1745
- allowCrossFilter: q
1760
+ function k() {
1761
+ const A = !o.getItemData(o.item.i, o.dashboardId).allowCrossFilter;
1762
+ o.setItemData(o.item.i, o.dashboardId, {
1763
+ allowCrossFilter: A
1746
1764
  });
1747
1765
  }
1748
- function k() {
1749
- const W = n.item.h + 1;
1750
- n.setItemData(n.item.i, n.dashboardId, {
1766
+ function M() {
1767
+ const K = o.item.h + 1;
1768
+ o.setItemData(o.item.i, o.dashboardId, {
1751
1769
  dimensions: {
1752
- width: n.item.w,
1753
- height: W
1770
+ width: o.item.w,
1771
+ height: K
1754
1772
  }
1755
1773
  });
1756
1774
  }
1757
- function M() {
1758
- const W = Math.max(1, n.item.h - 1);
1759
- n.setItemData(n.item.i, n.dashboardId, {
1775
+ function T() {
1776
+ const K = Math.max(1, o.item.h - 1);
1777
+ o.setItemData(o.item.i, o.dashboardId, {
1760
1778
  dimensions: {
1761
- width: n.item.w,
1762
- height: W
1779
+ width: o.item.w,
1780
+ height: K
1763
1781
  }
1764
1782
  });
1765
1783
  }
1766
- function T() {
1784
+ function O() {
1767
1785
  r.value = !1;
1768
1786
  }
1769
- function H() {
1770
- if (h.value) {
1771
- C();
1787
+ function W() {
1788
+ if (D.value) {
1789
+ I();
1772
1790
  return;
1773
1791
  }
1774
- l("edit-content", n.item);
1792
+ l("edit-content", o.item);
1775
1793
  }
1776
- function K() {
1777
- confirm(`Are you sure you want to remove "${b.value.name}"?`) && l("remove-item", n.item.i);
1794
+ function V() {
1795
+ confirm(`Are you sure you want to remove "${m.value.name}"?`) && l("remove-item", o.item.i);
1778
1796
  }
1779
- function O() {
1780
- l("copy-item", n.item.i);
1781
- }
1782
- function $(W) {
1783
- l("dimension-click", W);
1784
- }
1785
- function g() {
1786
- l("background-click", n.item.i);
1787
- }
1788
- function B(W) {
1789
- l("remove-filter", n.item.i, W);
1790
- }
1791
- const b = p(() => n.getItemData(n.item.i, n.dashboardId)), h = p(() => b.value.type === w.SECTION_HEADER), I = p(() => {
1792
- switch (b.value.type) {
1793
- case w.CHART:
1794
- return En;
1795
- case w.TABLE:
1796
- return An;
1797
- case w.FILTER:
1798
- return Un;
1799
- case w.SECTION_HEADER:
1797
+ function $() {
1798
+ l("copy-item", o.item.i);
1799
+ }
1800
+ function g(K) {
1801
+ l("dimension-click", K);
1802
+ }
1803
+ function B() {
1804
+ l("background-click", o.item.i);
1805
+ }
1806
+ function E(K) {
1807
+ l("remove-filter", o.item.i, K);
1808
+ }
1809
+ const m = p(() => o.getItemData(o.item.i, o.dashboardId)), D = p(() => m.value.type === C.SECTION_HEADER), te = p(() => {
1810
+ switch (m.value.type) {
1811
+ case C.CHART:
1812
+ return Do;
1813
+ case C.TABLE:
1814
+ return Ao;
1815
+ case C.FILTER:
1816
+ return Uo;
1817
+ case C.SECTION_HEADER:
1800
1818
  return null;
1801
- case w.MARKDOWN:
1819
+ case C.MARKDOWN:
1802
1820
  default:
1803
- return $n;
1821
+ return $o;
1804
1822
  }
1805
- }), Z = p(() => {
1806
- switch (b.value.type) {
1807
- case w.CHART:
1823
+ }), ne = p(() => {
1824
+ switch (m.value.type) {
1825
+ case C.CHART:
1808
1826
  return "Chart Name";
1809
- case w.TABLE:
1827
+ case C.TABLE:
1810
1828
  return "Table Name";
1811
- case w.FILTER:
1829
+ case C.FILTER:
1812
1830
  return "Filter Name";
1813
- case w.SECTION_HEADER:
1831
+ case C.SECTION_HEADER:
1814
1832
  return "Section Header";
1815
- case w.MARKDOWN:
1833
+ case C.MARKDOWN:
1816
1834
  default:
1817
1835
  return "Note Name";
1818
1836
  }
1819
- }), re = p(() => [w.CHART, w.TABLE, w.MARKDOWN].includes(b.value.type)), U = p(() => b.value.filters ? b.value.filters.length : 0), Ce = p(() => (b.value.filters || []).slice(0, 2)), ve = p(() => Math.max(0, U.value - Ce.value.length));
1820
- function _(W, q) {
1821
- var ke;
1822
- const P = W == null ? void 0 : W.trim();
1823
- if (!P)
1824
- return { text: q, level: 3 };
1825
- const le = P.match(/^(#{1,3})\s*(.+)$/);
1826
- if (!le)
1827
- return { text: P, level: 3 };
1828
- const we = (ke = le[2]) == null ? void 0 : ke.trim();
1829
- return we ? {
1830
- text: we,
1831
- level: le[1].length
1832
- } : { text: P, level: 3 };
1833
- }
1834
- const oe = p(() => _(b.value.name, Z.value)), ee = p(() => oe.value.text), te = p(() => `item-title-level-${oe.value.level}`), pe = p(() => s.value && !r.value && !f.value);
1835
- function Me() {
1836
- pe.value && (f.value = !0, s.value = !1);
1837
- }
1838
- function Re() {
1837
+ }), U = p(() => [C.CHART, C.TABLE, C.MARKDOWN].includes(m.value.type)), ke = p(() => m.value.filters ? m.value.filters.length : 0), Se = p(() => (m.value.filters || []).slice(0, 2)), G = p(() => Math.max(0, ke.value - Se.value.length));
1838
+ function re(K, A) {
1839
+ var me;
1840
+ const N = K == null ? void 0 : K.trim();
1841
+ if (!N)
1842
+ return { text: A, level: 3 };
1843
+ const ae = N.match(/^(#{1,3})\s*(.+)$/);
1844
+ if (!ae)
1845
+ return { text: N, level: 3 };
1846
+ const oe = (me = ae[2]) == null ? void 0 : me.trim();
1847
+ return oe ? {
1848
+ text: oe,
1849
+ level: ae[1].length
1850
+ } : { text: N, level: 3 };
1851
+ }
1852
+ const le = p(() => re(m.value.name, ne.value)), X = p(() => le.value.text), De = p(() => `item-title-level-${le.value.level}`), ye = p(() => s.value && !r.value && !f.value);
1853
+ function Ae() {
1854
+ ye.value && (f.value = !0, s.value = !1);
1855
+ }
1856
+ function qe() {
1839
1857
  s.value = !0, f.value = !1;
1840
1858
  }
1841
- function Ae() {
1859
+ function Ie() {
1842
1860
  s.value = !1, f.value = !1;
1843
1861
  }
1844
- return xe([c, a], Me, {
1845
- enabled: () => pe.value,
1862
+ return Ve([c, a], Ae, {
1863
+ enabled: () => ye.value,
1846
1864
  eventName: "mousedown"
1847
- }), (W, q) => (m(), y("div", {
1848
- class: A(["grid-item-content", {
1849
- "grid-item-chart-style": [ie(w).CHART, ie(w).TABLE, ie(w).FILTER].includes(
1865
+ }), (K, A) => (h(), y("div", {
1866
+ class: q(["grid-item-content", {
1867
+ "grid-item-chart-style": [ie(C).CHART, ie(C).TABLE, ie(C).FILTER].includes(
1850
1868
  //@ts-ignore
1851
- b.value.type
1869
+ m.value.type
1852
1870
  ),
1853
- "grid-item-section-header-style": h.value,
1871
+ "grid-item-section-header-style": D.value,
1854
1872
  "grid-item-edit-style": e.editMode
1855
1873
  }]),
1856
1874
  "data-testid": `dashboard-component-${e.item.i}`,
1857
- onMouseenter: Re,
1858
- onMouseleave: Ae
1875
+ onMouseenter: qe,
1876
+ onMouseleave: Ie
1859
1877
  }, [
1860
- e.editMode && h.value ? (m(), y("div", {
1878
+ e.editMode && D.value ? (h(), y("div", {
1861
1879
  key: 0,
1862
- class: A(["dev-toolbar-shell", { "dev-toolbar-visible": pe.value }])
1880
+ class: q(["dev-toolbar-shell", { "dev-toolbar-visible": ye.value }])
1863
1881
  }, [
1864
1882
  t("div", {
1865
1883
  ref_key: "devToolbarRef",
@@ -1868,34 +1886,34 @@ const Un = /* @__PURE__ */ Y(Pn, [["render", Wn], ["__scopeId", "data-v-9f88e03e
1868
1886
  "data-testid": "dashboard-item-header-controls"
1869
1887
  }, [
1870
1888
  t("button", {
1871
- onClick: H,
1889
+ onClick: W,
1872
1890
  class: "control-btn",
1873
1891
  "data-testid": `edit-dashboard-item-content-${e.item.i}`,
1874
1892
  title: "Edit title"
1875
- }, [...q[2] || (q[2] = [
1893
+ }, [...A[2] || (A[2] = [
1876
1894
  t("i", { class: "mdi mdi-pencil-outline icon" }, null, -1)
1877
- ])], 8, Gn),
1895
+ ])], 8, _o),
1878
1896
  t("button", {
1879
- onClick: O,
1897
+ onClick: $,
1880
1898
  class: "control-btn",
1881
1899
  "data-testid": `copy-dashboard-item-${e.item.i}`,
1882
1900
  title: "Copy item"
1883
- }, [...q[3] || (q[3] = [
1901
+ }, [...A[3] || (A[3] = [
1884
1902
  t("i", { class: "mdi mdi-content-copy icon" }, null, -1)
1885
- ])], 8, _n),
1903
+ ])], 8, Go),
1886
1904
  t("button", {
1887
- onClick: K,
1905
+ onClick: V,
1888
1906
  class: "control-btn dashboard-remove-btn",
1889
1907
  "data-testid": `remove-dashboard-item-${e.item.i}`,
1890
1908
  title: "Remove item"
1891
- }, [...q[4] || (q[4] = [
1909
+ }, [...A[4] || (A[4] = [
1892
1910
  t("i", { class: "mdi mdi-delete-outline icon" }, null, -1)
1893
- ])], 8, zn)
1911
+ ])], 8, zo)
1894
1912
  ], 512)
1895
1913
  ], 2)) : R("", !0),
1896
- h.value ? R("", !0) : (m(), y("div", Jn, [
1897
- t("div", Yn, [
1898
- e.editMode ? (m(), y("div", Zn, [...q[5] || (q[5] = [
1914
+ D.value ? R("", !0) : (h(), y("div", Jo, [
1915
+ t("div", Yo, [
1916
+ e.editMode ? (h(), y("div", Zo, [...A[5] || (A[5] = [
1899
1917
  t("svg", {
1900
1918
  xmlns: "http://www.w3.org/2000/svg",
1901
1919
  width: "16",
@@ -1928,99 +1946,114 @@ const Un = /* @__PURE__ */ Y(Pn, [["render", Wn], ["__scopeId", "data-v-9f88e03e
1928
1946
  })
1929
1947
  ], -1)
1930
1948
  ])])) : R("", !0),
1931
- t("div", Xn, [
1932
- r.value ? ue((m(), y("input", {
1949
+ t("div", Xo, [
1950
+ r.value ? ce((h(), y("input", {
1933
1951
  key: 1,
1934
1952
  id: `title-input-${e.item.i}`,
1935
- "onUpdate:modelValue": q[0] || (q[0] = (P) => i.value = P),
1936
- onBlur: D,
1953
+ "onUpdate:modelValue": A[0] || (A[0] = (N) => i.value = N),
1954
+ onBlur: x,
1937
1955
  onKeyup: [
1938
- ye(D, ["enter"]),
1939
- ye(T, ["esc"])
1956
+ ge(x, ["enter"]),
1957
+ ge(O, ["esc"])
1940
1958
  ],
1941
1959
  class: "title-input",
1942
1960
  type: "text",
1943
- placeholder: Z.value
1944
- }, null, 40, oo)), [
1945
- [fe, i.value]
1946
- ]) : (m(), y("div", {
1961
+ placeholder: ne.value
1962
+ }, null, 40, nn)), [
1963
+ [pe, i.value]
1964
+ ]) : (h(), y("div", {
1947
1965
  key: 0,
1948
- class: A(["item-title editable-title", [te.value, { "item-title-static": !e.editMode }]]),
1949
- title: ee.value,
1950
- onClick: C
1966
+ class: q(["item-title editable-title", [De.value, { "item-title-static": !e.editMode }]]),
1967
+ title: X.value,
1968
+ onClick: I
1951
1969
  }, [
1952
- t("span", to, N(ee.value), 1),
1953
- e.editMode ? (m(), y("i", no)) : R("", !0)
1954
- ], 10, eo))
1970
+ t("span", tn, P(X.value), 1),
1971
+ e.editMode ? (h(), y("i", on)) : R("", !0)
1972
+ ], 10, en))
1955
1973
  ])
1956
1974
  ]),
1957
- t("div", io, [
1958
- re.value && U.value > 0 ? (m(), y("div", ro, [
1959
- (m(!0), y(me, null, be(Ce.value, (P, le) => (m(), y("div", {
1960
- key: `${P.source}-${P.value}-${le}`,
1961
- class: "header-filter-chip",
1962
- title: v(P.value)
1963
- }, [
1964
- t("span", ao, [
1965
- t("span", so, N(P.source === "global" ? P.source : "cross") + ": ", 1),
1966
- t("span", uo, N(E(P.value, 40)), 1)
1975
+ t("div", rn, [
1976
+ U.value && ke.value > 0 ? (h(), y("div", ln, [
1977
+ (h(!0), y(fe, null, we(Se.value, (N, ae) => (h(), _(be, {
1978
+ key: `${N.source}-${N.value}-${ae}`,
1979
+ content: w(N.value, N.parameters),
1980
+ position: "bottom"
1981
+ }, {
1982
+ default: ee(() => [
1983
+ t("div", an, [
1984
+ t("span", sn, [
1985
+ t("span", dn, P(N.source === "global" ? N.source : "cross") + ": ", 1),
1986
+ t("span", un, P(w(N.value, N.parameters)), 1)
1987
+ ]),
1988
+ t("button", {
1989
+ class: "filter-copy-btn",
1990
+ onClick: Oe((oe) => b(N.value, N.parameters), ["stop"]),
1991
+ title: "Copy filter value"
1992
+ }, " ⎘ ", 8, cn),
1993
+ e.editMode && N.source !== "global" ? (h(), y("button", {
1994
+ key: 0,
1995
+ class: "filter-remove-btn",
1996
+ onClick: (oe) => E(N.source),
1997
+ title: `Remove ${N.source} filter`
1998
+ }, " x ", 8, mn)) : R("", !0)
1999
+ ])
1967
2000
  ]),
1968
- e.editMode && P.source !== "global" ? (m(), y("button", {
1969
- key: 0,
1970
- class: "filter-remove-btn",
1971
- onClick: (we) => B(P.source),
1972
- title: `Remove ${P.source} filter`
1973
- }, " x ", 8, co)) : R("", !0)
1974
- ], 8, lo))), 128)),
1975
- ve.value > 0 ? (m(), y("div", {
2001
+ _: 2
2002
+ }, 1032, ["content"]))), 128)),
2003
+ G.value > 0 ? (h(), _(be, {
1976
2004
  key: 0,
1977
- class: "header-filter-chip filter-overflow",
1978
- title: `${ve.value} more filter(s)`
1979
- }, " +" + N(ve.value), 9, mo)) : R("", !0)
2005
+ content: `${G.value} more filter(s)`,
2006
+ position: "bottom"
2007
+ }, {
2008
+ default: ee(() => [
2009
+ t("div", hn, "+" + P(G.value), 1)
2010
+ ]),
2011
+ _: 1
2012
+ }, 8, ["content"])) : R("", !0)
1980
2013
  ])) : R("", !0)
1981
2014
  ])
1982
2015
  ])),
1983
2016
  t("div", {
1984
- class: A(["content-area", { "section-header-content": h.value }])
2017
+ class: q(["content-area", { "section-header-content": D.value }])
1985
2018
  }, [
1986
- h.value ? (m(), y(me, { key: 0 }, [
1987
- r.value ? ue((m(), y("input", {
2019
+ D.value ? (h(), y(fe, { key: 0 }, [
2020
+ r.value ? ce((h(), y("input", {
1988
2021
  key: 1,
1989
2022
  id: `title-input-${e.item.i}`,
1990
- "onUpdate:modelValue": q[1] || (q[1] = (P) => i.value = P),
1991
- onBlur: D,
2023
+ "onUpdate:modelValue": A[1] || (A[1] = (N) => i.value = N),
2024
+ onBlur: x,
1992
2025
  onKeyup: [
1993
- ye(D, ["enter"]),
1994
- ye(T, ["esc"])
2026
+ ge(x, ["enter"]),
2027
+ ge(O, ["esc"])
1995
2028
  ],
1996
2029
  class: "title-input section-header-input no-drag",
1997
2030
  type: "text",
1998
- placeholder: Z.value
1999
- }, null, 40, vo)), [
2000
- [fe, i.value]
2001
- ]) : (m(), y("div", {
2031
+ placeholder: ne.value
2032
+ }, null, 40, pn)), [
2033
+ [pe, i.value]
2034
+ ]) : (h(), y("div", {
2002
2035
  key: 0,
2003
- class: A(["section-header-display no-drag", [te.value, { "section-header-editable": e.editMode }]]),
2004
- title: ee.value,
2005
- onClick: C
2036
+ class: q(["section-header-display no-drag", [De.value, { "section-header-editable": e.editMode }]]),
2037
+ title: X.value,
2038
+ onClick: I
2006
2039
  }, [
2007
- t("span", fo, N(ee.value), 1)
2008
- ], 10, ho))
2009
- ], 64)) : (m(), G(it(I.value), {
2040
+ t("span", vn, P(X.value), 1)
2041
+ ], 10, fn))
2042
+ ], 64)) : (h(), _(it(te.value), {
2010
2043
  key: 1,
2011
- dashboardId: n.dashboardId,
2044
+ dashboardId: o.dashboardId,
2012
2045
  itemId: e.item.i,
2013
2046
  setItemData: e.setItemData,
2014
2047
  getItemData: e.getItemData,
2015
2048
  getDashboardQueryExecutor: e.getDashboardQueryExecutor,
2016
2049
  editMode: e.editMode,
2017
- symbols: n.symbols || [],
2018
- onDimensionClick: $,
2019
- onBackgroundClick: g
2050
+ symbols: o.symbols || [],
2051
+ onDimensionClick: g,
2052
+ onBackgroundClick: B
2020
2053
  }, null, 40, ["dashboardId", "itemId", "setItemData", "getItemData", "getDashboardQueryExecutor", "editMode", "symbols"])),
2021
- e.editMode && !h.value ? (m(), y("div", {
2054
+ e.editMode && !D.value ? (h(), y("div", {
2022
2055
  key: 2,
2023
- class: A(["content-edit-overlay no-drag", { "content-edit-overlay-visible": pe.value }])
2056
+ class: q(["content-edit-overlay no-drag", { "content-edit-overlay-visible": ye.value }])
2024
2057
  }, [
2025
2058
  t("div", {
2026
2059
  ref_key: "contentEditToolbarRef",
@@ -2029,103 +2062,103 @@ const Un = /* @__PURE__ */ Y(Pn, [["render", Wn], ["__scopeId", "data-v-9f88e03e
2029
2062
  "data-testid": "dashboard-item-header-controls"
2030
2063
  }, [
2031
2064
  t("button", {
2032
- onClick: k,
2065
+ onClick: M,
2033
2066
  class: "control-btn",
2034
2067
  "data-testid": `increase-height-item-${e.item.i}`,
2035
2068
  title: "Increase height"
2036
- }, [...q[6] || (q[6] = [
2069
+ }, [...A[6] || (A[6] = [
2037
2070
  t("i", { class: "mdi mdi-plus icon" }, null, -1)
2038
- ])], 8, po),
2071
+ ])], 8, yn),
2039
2072
  t("button", {
2040
- onClick: M,
2073
+ onClick: T,
2041
2074
  class: "control-btn",
2042
2075
  "data-testid": `decrease-height-item-${e.item.i}`,
2043
2076
  title: "Decrease height"
2044
- }, [...q[7] || (q[7] = [
2077
+ }, [...A[7] || (A[7] = [
2045
2078
  t("i", { class: "mdi mdi-minus icon" }, null, -1)
2046
- ])], 8, yo),
2079
+ ])], 8, gn),
2047
2080
  t("button", {
2048
- onClick: H,
2081
+ onClick: W,
2049
2082
  class: "control-btn",
2050
2083
  "data-testid": `edit-dashboard-item-content-${e.item.i}`,
2051
2084
  title: "Edit data"
2052
- }, [...q[8] || (q[8] = [
2085
+ }, [...A[8] || (A[8] = [
2053
2086
  t("i", { class: "mdi mdi-database-edit-outline icon" }, null, -1)
2054
- ])], 8, go),
2087
+ ])], 8, bn),
2055
2088
  t("button", {
2056
- onClick: V,
2089
+ onClick: k,
2057
2090
  class: "control-btn",
2058
2091
  "data-testid": `toggle-crossfilter-item-content-${e.item.i}`,
2059
- title: b.value.allowCrossFilter ? "Toggle cross-filtering OFF" : "Toggle cross-filtering ON"
2092
+ title: m.value.allowCrossFilter ? "Toggle cross-filtering OFF" : "Toggle cross-filtering ON"
2060
2093
  }, [
2061
- b.value.allowCrossFilter ? (m(), y("i", Co)) : (m(), y("i", wo))
2062
- ], 8, bo),
2094
+ m.value.allowCrossFilter ? (h(), y("i", wn)) : (h(), y("i", kn))
2095
+ ], 8, Cn),
2063
2096
  t("button", {
2064
- onClick: O,
2097
+ onClick: $,
2065
2098
  class: "control-btn",
2066
2099
  "data-testid": `copy-dashboard-item-${e.item.i}`,
2067
2100
  title: "Copy item"
2068
- }, [...q[9] || (q[9] = [
2101
+ }, [...A[9] || (A[9] = [
2069
2102
  t("i", { class: "mdi mdi-content-copy icon" }, null, -1)
2070
- ])], 8, ko),
2103
+ ])], 8, Sn),
2071
2104
  t("button", {
2072
- onClick: K,
2105
+ onClick: V,
2073
2106
  class: "control-btn dashboard-remove-btn",
2074
2107
  "data-testid": `remove-dashboard-item-${e.item.i}`,
2075
2108
  title: "Remove item"
2076
- }, [...q[10] || (q[10] = [
2109
+ }, [...A[10] || (A[10] = [
2077
2110
  t("i", { class: "mdi mdi-delete-outline icon" }, null, -1)
2078
- ])], 8, So)
2111
+ ])], 8, En)
2079
2112
  ], 512)
2080
2113
  ], 2)) : R("", !0)
2081
2114
  ], 2)
2082
- ], 42, jn));
2115
+ ], 42, jo));
2083
2116
  }
2084
- }), Wi = /* @__PURE__ */ Y(Do, [["__scopeId", "data-v-354fb06e"]]), Eo = { class: "add-item-content" }, To = {
2117
+ }), Ui = /* @__PURE__ */ Y(Dn, [["__scopeId", "data-v-9dbea91e"]]), In = { class: "add-item-content" }, Tn = {
2085
2118
  class: "item-type-grid",
2086
2119
  role: "radiogroup",
2087
2120
  "aria-label": "Dashboard item type"
2088
- }, Io = ["data-testid"], $o = ["value", "data-testid"], Lo = { class: "item-option-card" }, Mo = {
2121
+ }, $n = ["data-testid"], Ln = ["value", "data-testid"], Mn = { class: "item-option-card" }, Rn = {
2089
2122
  class: "item-option-icon",
2090
2123
  "aria-hidden": "true"
2091
- }, Ro = { class: "item-option-text" }, Ao = { class: "item-option-label" }, qo = { class: "item-option-help" }, Fo = /* @__PURE__ */ J({
2124
+ }, An = { class: "item-option-text" }, qn = { class: "item-option-label" }, Fn = { class: "item-option-help" }, xn = /* @__PURE__ */ J({
2092
2125
  __name: "DashboardAddItemModal",
2093
2126
  props: {
2094
2127
  show: { type: Boolean }
2095
2128
  },
2096
2129
  emits: ["add", "close"],
2097
- setup(e, { emit: o }) {
2098
- const n = o, l = S(w.CHART), r = [
2130
+ setup(e, { emit: n }) {
2131
+ const o = n, l = S(C.CHART), r = [
2099
2132
  {
2100
- value: w.CHART,
2133
+ value: C.CHART,
2101
2134
  label: "Chart",
2102
2135
  description: "Visualize trends, comparisons, and distributions.",
2103
2136
  icon: "mdi-chart-bar",
2104
2137
  testId: "dashboard-add-item-type-chart"
2105
2138
  },
2106
2139
  {
2107
- value: w.TABLE,
2140
+ value: C.TABLE,
2108
2141
  label: "Table",
2109
2142
  description: "Show detailed rows and values in a grid.",
2110
2143
  icon: "mdi-table-large",
2111
2144
  testId: "dashboard-add-item-type-table"
2112
2145
  },
2113
2146
  {
2114
- value: w.MARKDOWN,
2147
+ value: C.MARKDOWN,
2115
2148
  label: "Markdown",
2116
2149
  description: "Add notes, headings, or narrative context.",
2117
2150
  icon: "mdi-text-box-outline",
2118
2151
  testId: "dashboard-add-item-type-markdown"
2119
2152
  },
2120
2153
  {
2121
- value: w.FILTER,
2154
+ value: C.FILTER,
2122
2155
  label: "Filter",
2123
2156
  description: "Let viewers narrow the dashboard interactively.",
2124
2157
  icon: "mdi-filter-variant",
2125
2158
  testId: "dashboard-add-item-type-filter"
2126
2159
  },
2127
2160
  {
2128
- value: w.SECTION_HEADER,
2161
+ value: C.SECTION_HEADER,
2129
2162
  label: "Section Header",
2130
2163
  description: "Break the dashboard into labeled sections.",
2131
2164
  icon: "mdi-format-title",
@@ -2133,19 +2166,19 @@ const Un = /* @__PURE__ */ Y(Pn, [["render", Wn], ["__scopeId", "data-v-9f88e03e
2133
2166
  }
2134
2167
  ];
2135
2168
  function i() {
2136
- n("add", l.value);
2169
+ o("add", l.value);
2137
2170
  }
2138
2171
  function s() {
2139
- n("close");
2172
+ o("close");
2140
2173
  }
2141
- return (f, c) => (m(), G(ze, {
2174
+ return (f, c) => (h(), _(Ye, {
2142
2175
  show: e.show,
2143
2176
  title: "Add New Item",
2144
2177
  "max-width": "680px",
2145
2178
  "test-id": "dashboard-add-item-modal",
2146
2179
  onClose: s
2147
2180
  }, {
2148
- footer: ne(() => [
2181
+ footer: ee(() => [
2149
2182
  t("button", {
2150
2183
  class: "cancel-button",
2151
2184
  onClick: s
@@ -2156,48 +2189,48 @@ const Un = /* @__PURE__ */ Y(Pn, [["render", Wn], ["__scopeId", "data-v-9f88e03e
2156
2189
  "data-testid": "dashboard-add-item-confirm"
2157
2190
  }, " Add Item ")
2158
2191
  ]),
2159
- default: ne(() => [
2160
- t("div", Eo, [
2192
+ default: ee(() => [
2193
+ t("div", In, [
2161
2194
  c[1] || (c[1] = t("p", { class: "add-item-description" }, "Choose the kind of block you want to add to the dashboard.", -1)),
2162
- t("div", To, [
2163
- (m(), y(me, null, be(r, (a) => t("label", {
2195
+ t("div", Tn, [
2196
+ (h(), y(fe, null, we(r, (a) => t("label", {
2164
2197
  key: a.value,
2165
- class: A(["item-option", { selected: l.value === a.value }]),
2198
+ class: q(["item-option", { selected: l.value === a.value }]),
2166
2199
  "data-testid": `${a.testId}-option`
2167
2200
  }, [
2168
- ue(t("input", {
2201
+ ce(t("input", {
2169
2202
  "onUpdate:modelValue": c[0] || (c[0] = (v) => l.value = v),
2170
2203
  class: "item-option-input",
2171
2204
  type: "radio",
2172
2205
  name: "dashboard-add-item-type",
2173
2206
  value: a.value,
2174
2207
  "data-testid": a.testId
2175
- }, null, 8, $o), [
2208
+ }, null, 8, Ln), [
2176
2209
  [rt, l.value]
2177
2210
  ]),
2178
- t("span", Lo, [
2179
- t("span", Mo, [
2211
+ t("span", Mn, [
2212
+ t("span", Rn, [
2180
2213
  t("i", {
2181
- class: A(["mdi", a.icon])
2214
+ class: q(["mdi", a.icon])
2182
2215
  }, null, 2)
2183
2216
  ]),
2184
- t("span", Ro, [
2185
- t("span", Ao, N(a.label), 1),
2186
- t("span", qo, N(a.description), 1)
2217
+ t("span", An, [
2218
+ t("span", qn, P(a.label), 1),
2219
+ t("span", Fn, P(a.description), 1)
2187
2220
  ])
2188
2221
  ])
2189
- ], 10, Io)), 64))
2222
+ ], 10, $n)), 64))
2190
2223
  ])
2191
2224
  ])
2192
2225
  ]),
2193
2226
  _: 1
2194
2227
  }, 8, ["show"]));
2195
2228
  }
2196
- }), Ui = /* @__PURE__ */ Y(Fo, [["__scopeId", "data-v-ee048740"]]);
2197
- function xo(e = "dark") {
2198
- const o = e === "light";
2199
- Te.defineTheme("trilogyStudio", {
2200
- base: o ? "vs" : "vs-dark",
2229
+ }), ji = /* @__PURE__ */ Y(xn, [["__scopeId", "data-v-ee048740"]]);
2230
+ function Hn(e = "dark") {
2231
+ const n = e === "light";
2232
+ $e.defineTheme("trilogyStudio", {
2233
+ base: n ? "vs" : "vs-dark",
2201
2234
  inherit: !0,
2202
2235
  rules: [
2203
2236
  { token: "comment", foreground: "#6A9955", fontStyle: "italic" },
@@ -2213,25 +2246,25 @@ function xo(e = "dark") {
2213
2246
  { token: "property", foreground: "#BFBFBF" }
2214
2247
  ],
2215
2248
  colors: {
2216
- "editor.background": o ? "#ffffff" : "#111318",
2217
- "editor.foreground": o ? "#1f2937" : "#e5e7eb",
2218
- "editorLineNumber.foreground": o ? "#94a3b8" : "#64748b",
2219
- "editorLineNumber.activeForeground": o ? "#475569" : "#cbd5e1",
2220
- "editorGutter.background": o ? "#ffffff" : "#111318",
2221
- editorLineHighlightBackground: o ? "#f6f8fb" : "#181c22",
2222
- "editor.selectionBackground": o ? "#dbeafe" : "#1d4ed833",
2223
- "editor.inactiveSelectionBackground": o ? "#e2e8f0" : "#33415555",
2224
- "editorCursor.foreground": o ? "#334155" : "#ffffff",
2225
- "editorCursor.background": o ? "#ffffff" : "#111318",
2226
- "editorIndentGuide.background1": o ? "#e2e8f0" : "#2a2f37",
2227
- "editorIndentGuide.activeBackground1": o ? "#cbd5e1" : "#475569",
2228
- "editorWhitespace.foreground": o ? "#cbd5e1" : "#334155",
2229
- "editorWidget.background": o ? "#ffffff" : "#111318",
2230
- "editorWidget.border": o ? "#d6dde6" : "#2a2f37"
2231
- }
2232
- }), Te.setTheme("trilogyStudio");
2249
+ "editor.background": n ? "#ffffff" : "#111318",
2250
+ "editor.foreground": n ? "#1f2937" : "#e5e7eb",
2251
+ "editorLineNumber.foreground": n ? "#94a3b8" : "#64748b",
2252
+ "editorLineNumber.activeForeground": n ? "#475569" : "#cbd5e1",
2253
+ "editorGutter.background": n ? "#ffffff" : "#111318",
2254
+ editorLineHighlightBackground: n ? "#f6f8fb" : "#181c22",
2255
+ "editor.selectionBackground": n ? "#dbeafe" : "#1d4ed833",
2256
+ "editor.inactiveSelectionBackground": n ? "#e2e8f0" : "#33415555",
2257
+ "editorCursor.foreground": n ? "#334155" : "#ffffff",
2258
+ "editorCursor.background": n ? "#ffffff" : "#111318",
2259
+ "editorIndentGuide.background1": n ? "#e2e8f0" : "#2a2f37",
2260
+ "editorIndentGuide.activeBackground1": n ? "#cbd5e1" : "#475569",
2261
+ "editorWhitespace.foreground": n ? "#cbd5e1" : "#334155",
2262
+ "editorWidget.background": n ? "#ffffff" : "#111318",
2263
+ "editorWidget.border": n ? "#d6dde6" : "#2a2f37"
2264
+ }
2265
+ }), $e.setTheme("trilogyStudio");
2233
2266
  }
2234
- function Ho(e, o = {}) {
2267
+ function On(e, n = {}) {
2235
2268
  const l = { ...{
2236
2269
  automaticLayout: !0,
2237
2270
  autoClosingBrackets: "always",
@@ -2240,25 +2273,25 @@ function Ho(e, o = {}) {
2240
2273
  acceptSuggestionOnEnter: "off",
2241
2274
  tabCompletion: "on",
2242
2275
  theme: "trilogyStudio"
2243
- }, ...o };
2244
- return Te.create(e, l);
2276
+ }, ...n };
2277
+ return $e.create(e, l);
2245
2278
  }
2246
- function Ue(e, o = "") {
2279
+ function _e(e, n = "") {
2247
2280
  var r;
2248
- if (!e) return o;
2249
- const n = e.getSelection();
2250
- let l = n && !(n.startColumn === n.endColumn && n.startLineNumber === n.endLineNumber) ? ((r = e.getModel()) == null ? void 0 : r.getValueInRange(n)) || "" : e.getValue();
2251
- return l || (l = o), l;
2281
+ if (!e) return n;
2282
+ const o = e.getSelection();
2283
+ let l = o && !(o.startColumn === o.endColumn && o.startLineNumber === o.endLineNumber) ? ((r = e.getModel()) == null ? void 0 : r.getValueInRange(o)) || "" : e.getValue();
2284
+ return l || (l = n), l;
2252
2285
  }
2253
- function Vo(e, o = {}) {
2254
- const { onValidate: n, onRun: l, onSave: r } = o;
2255
- if (n && e.addCommand(se.CtrlCmd | se.Shift | he.KeyV, n), l && e.addCommand(se.CtrlCmd | he.Enter, l), r && e.addCommand(se.CtrlCmd | he.KeyS, r), e.addCommand(se.CtrlCmd | he.KeyZ, () => {
2286
+ function Vn(e, n = {}) {
2287
+ const { onValidate: o, onRun: l, onSave: r } = n;
2288
+ if (o && e.addCommand(de.CtrlCmd | de.Shift | ve.KeyV, o), l && e.addCommand(de.CtrlCmd | ve.Enter, l), r && e.addCommand(de.CtrlCmd | ve.KeyS, r), e.addCommand(de.CtrlCmd | ve.KeyZ, () => {
2256
2289
  e.trigger("ide", "undo", {});
2257
- }), o.onContentChange) {
2290
+ }), n.onContentChange) {
2258
2291
  let i = null;
2259
2292
  e.onDidChangeModelContent(() => {
2260
2293
  var s;
2261
- (s = o.onContentChange) == null || s.call(o, e.getValue()), i && clearTimeout(i), i = setTimeout(() => {
2294
+ (s = n.onContentChange) == null || s.call(n, e.getValue()), i && clearTimeout(i), i = setTimeout(() => {
2262
2295
  var f;
2263
2296
  e.hasTextFocus() && !((f = e.getSelection()) != null && f.isEmpty()) && e.trigger("completion", "editor.action.triggerSuggest", { auto: !0 });
2264
2297
  }, 200);
@@ -2266,11 +2299,11 @@ function Vo(e, o = {}) {
2266
2299
  }
2267
2300
  }
2268
2301
  let F = null;
2269
- const Oo = J({
2302
+ const Qn = J({
2270
2303
  name: "EnhancedEditor",
2271
2304
  components: {
2272
- SymbolsPane: Dt,
2273
- LoadingView: $e
2305
+ SymbolsPane: Et,
2306
+ LoadingView: Me
2274
2307
  },
2275
2308
  props: {
2276
2309
  onSave: {
@@ -2320,11 +2353,11 @@ const Oo = J({
2320
2353
  };
2321
2354
  },
2322
2355
  setup() {
2323
- const e = j("queryExecutionService"), o = j("connectionStore"), n = j("isMobile"), l = j("llmConnectionStore"), r = j("analyticsStore"), i = ut();
2356
+ const e = j("queryExecutionService"), n = j("connectionStore"), o = j("isMobile"), l = j("llmConnectionStore"), r = j("analyticsStore"), i = ut();
2324
2357
  return {
2325
2358
  queryExecutionService: e,
2326
- connectionStore: o,
2327
- isMobile: n,
2359
+ connectionStore: n,
2360
+ isMobile: o,
2328
2361
  llmConnectionStore: l,
2329
2362
  analyticsStore: r,
2330
2363
  userSettingsStore: i
@@ -2351,12 +2384,12 @@ const Oo = J({
2351
2384
  },
2352
2385
  methods: {
2353
2386
  getResolvedTheme() {
2354
- var n;
2355
- const e = this.theme === "light" || this.theme === "dark" ? this.theme : "", o = ((n = this.userSettingsStore) == null ? void 0 : n.settings.theme) || "";
2356
- return (e || o || "dark") === "light" ? "light" : "dark";
2387
+ var o;
2388
+ const e = this.theme === "light" || this.theme === "dark" ? this.theme : "", n = ((o = this.userSettingsStore) == null ? void 0 : o.settings.theme) || "";
2389
+ return (e || n || "dark") === "light" ? "light" : "dark";
2357
2390
  },
2358
2391
  applyEditorTheme() {
2359
- xo(this.getResolvedTheme());
2392
+ Hn(this.getResolvedTheme());
2360
2393
  },
2361
2394
  // New methods for panel management
2362
2395
  togglePanel(e) {
@@ -2380,19 +2413,19 @@ const Oo = J({
2380
2413
  }
2381
2414
  },
2382
2415
  createEditor() {
2383
- this.applyEditorTheme(), F = Ho(this.$refs.editorElement, {
2416
+ this.applyEditorTheme(), F = On(this.$refs.editorElement, {
2384
2417
  value: this.editor.contents || "",
2385
2418
  language: this.editor.type === "sql" ? "sql" : "trilogy"
2386
- }), Vo(F, {
2419
+ }), Vn(F, {
2387
2420
  onValidate: () => this.validateQuery(),
2388
2421
  onRun: () => this.runQuery(),
2389
2422
  onGenerateLLM: () => this.generateLLMQuery()
2390
2423
  // Add LLM generation shortcut
2391
- }), F.addCommand(se.CtrlCmd | he.Space, () => {
2424
+ }), F.addCommand(de.CtrlCmd | ve.Space, () => {
2392
2425
  this.togglePanel("symbols");
2393
- }), F.addCommand(se.CtrlCmd | se.Shift | he.Enter, () => {
2426
+ }), F.addCommand(de.CtrlCmd | de.Shift | ve.Enter, () => {
2394
2427
  this.generateLLMQuery();
2395
- }), this.editor.type !== "sql" && (F.addCommand(se.CtrlCmd | he.KeyK, () => {
2428
+ }), this.editor.type !== "sql" && (F.addCommand(de.CtrlCmd | ve.KeyK, () => {
2396
2429
  this.formatQuery();
2397
2430
  }), F.addAction({
2398
2431
  id: "trilogy.simple-editor.format-query",
@@ -2413,14 +2446,14 @@ const Oo = J({
2413
2446
  },
2414
2447
  insertSymbol(e) {
2415
2448
  if (!F) return;
2416
- const o = F.getPosition();
2417
- o && e.insertText && (F.executeEdits("", [
2449
+ const n = F.getPosition();
2450
+ n && e.insertText && (F.executeEdits("", [
2418
2451
  {
2419
2452
  range: new St(
2420
- o.lineNumber,
2421
- o.column,
2422
- o.lineNumber,
2423
- o.column
2453
+ n.lineNumber,
2454
+ n.column,
2455
+ n.lineNumber,
2456
+ n.column
2424
2457
  ),
2425
2458
  text: e.insertText
2426
2459
  }
@@ -2428,23 +2461,23 @@ const Oo = J({
2428
2461
  },
2429
2462
  async validateQuery(e = !0) {
2430
2463
  if (!F) return [];
2431
- const o = this.connectionStore, n = this.queryExecutionService;
2464
+ const n = this.connectionStore, o = this.queryExecutionService;
2432
2465
  try {
2433
2466
  this.editor.setError(null);
2434
- const l = F.getValue(), r = o.connections[this.editor.connection], i = {
2467
+ const l = F.getValue(), r = n.connections[this.editor.connection], i = {
2435
2468
  text: l,
2436
2469
  queryType: r ? r.query_type : "trilogy",
2437
2470
  editorType: this.editor.type,
2438
2471
  sources: [],
2439
2472
  imports: this.imports,
2440
2473
  extraContent: this.rootContent
2441
- }, s = await n.validateQuery(
2474
+ }, s = await o.validateQuery(
2442
2475
  this.editor.connection,
2443
2476
  i
2444
2477
  );
2445
2478
  if (s && e) {
2446
2479
  const f = F.getModel();
2447
- f && Te.setModelMarkers(f, "owner", s.data.items || []), s.data.completion_items && (this.editor.completionSymbols = s.data.completion_items);
2480
+ f && $e.setModelMarkers(f, "owner", s.data.items || []), s.data.completion_items && (this.editor.completionSymbols = s.data.completion_items);
2448
2481
  }
2449
2482
  return s ? s.data.imports : [];
2450
2483
  } catch (l) {
@@ -2453,14 +2486,14 @@ const Oo = J({
2453
2486
  },
2454
2487
  async formatQuery() {
2455
2488
  var r;
2456
- const e = F, o = Ue(e, this.editor.contents);
2457
- if (!o || !e) return;
2458
- let n = (r = this.connectionStore) == null ? void 0 : r.connections[this.editor.connection], l = this.queryExecutionService;
2489
+ const e = F, n = _e(e, this.editor.contents);
2490
+ if (!n || !e) return;
2491
+ let o = (r = this.connectionStore) == null ? void 0 : r.connections[this.editor.connection], l = this.queryExecutionService;
2459
2492
  if (l)
2460
2493
  try {
2461
2494
  const i = await l.formatQuery(
2462
- o,
2463
- n ? n.query_type : "",
2495
+ n,
2496
+ o ? o.query_type : "",
2464
2497
  this.editor.type,
2465
2498
  this.imports,
2466
2499
  this.rootContent
@@ -2477,13 +2510,13 @@ const Oo = J({
2477
2510
  var r, i, s;
2478
2511
  this.$emit("query-started"), this.editor.setError(null);
2479
2512
  let e = !1;
2480
- const o = this.connectionStore, n = this.queryExecutionService, l = F;
2513
+ const n = this.connectionStore, o = this.queryExecutionService, l = F;
2481
2514
  if (!(this.editor.loading || !l))
2482
2515
  try {
2483
2516
  this.analyticsStore && this.analyticsStore.log("studio-query-execution", this.editor.type, !0), this.editor.loading = !0, this.lastOperation = null, this.editor.startTime = Date.now();
2484
- const f = o.connections[this.editor.connection], c = Ue(l, this.editor.contents);
2517
+ const f = n.connections[this.editor.connection], c = _e(l, this.editor.contents);
2485
2518
  if (!c) {
2486
- this.editor.results = new We(/* @__PURE__ */ new Map(), []), this.editor.loading = !1;
2519
+ this.editor.results = new je(/* @__PURE__ */ new Map(), []), this.editor.loading = !1;
2487
2520
  return;
2488
2521
  }
2489
2522
  const a = {
@@ -2492,26 +2525,26 @@ const Oo = J({
2492
2525
  editorType: this.editor.type,
2493
2526
  imports: this.imports,
2494
2527
  extraContent: this.rootContent
2495
- }, { resultPromise: v, cancellation: E } = await n.executeQuery(
2528
+ }, { resultPromise: v, cancellation: w } = await o.executeQuery(
2496
2529
  this.editor.connection,
2497
2530
  a,
2498
2531
  // Progress callback for connection issues
2499
2532
  () => {
2500
2533
  },
2501
- (D) => {
2502
- !e && D.error && (this.editor.loading = !1, D.message && this.editor.setError(D.message)), !e && D.running && (this.editor.error = null, this.editor.loading = !0);
2534
+ (I) => {
2535
+ !e && I.error && (this.editor.loading = !1, I.message && this.editor.setError(I.message)), !e && I.running && (this.editor.error = null, this.editor.loading = !0);
2503
2536
  }
2504
2537
  );
2505
2538
  this.editor.cancelCallback = () => {
2506
- E.isActive() && E.cancel(), this.editor.loading = !1, this.editor.cancelCallback = null;
2539
+ w.isActive() && w.cancel(), this.editor.loading = !1, this.editor.cancelCallback = null;
2507
2540
  };
2508
- const C = await v;
2541
+ const b = await v;
2509
2542
  e = !0, this.lastOperation = {
2510
- success: C.success,
2511
- duration: C.executionTime,
2512
- rows: (r = C.results) != null && r.data ? (s = (i = C.results) == null ? void 0 : i.data) == null ? void 0 : s.length : void 0,
2543
+ success: b.success,
2544
+ duration: b.executionTime,
2545
+ rows: (r = b.results) != null && r.data ? (s = (i = b.results) == null ? void 0 : i.data) == null ? void 0 : s.length : void 0,
2513
2546
  type: this.editor.type
2514
- }, C.success ? (this.editor.executed_contents = c, C.generatedSql && (this.editor.generated_sql = C.generatedSql), C.results && (this.editor.results = C.results, this.editor.duration = C.executionTime)) : C.error && (this.editor.executed_contents = c, this.editor.setError(C.error));
2547
+ }, b.success ? (this.editor.executed_contents = c, b.generatedSql && (this.editor.generated_sql = b.generatedSql), b.results && (this.editor.results = b.results, this.editor.duration = b.executionTime)) : b.error && (this.editor.executed_contents = c, this.editor.setError(b.error));
2515
2548
  } catch (f) {
2516
2549
  f instanceof Error && this.editor.setError(f.message || "Query execution failed"), this.lastOperation = {
2517
2550
  success: !1,
@@ -2525,13 +2558,13 @@ const Oo = J({
2525
2558
  // Add the LLM query generation method
2526
2559
  async generateLLMQuery() {
2527
2560
  if (this.editor.loading || !F) return;
2528
- const e = this.llmConnectionStore, o = this.queryExecutionService, n = this.connectionStore;
2561
+ const e = this.llmConnectionStore, n = this.queryExecutionService, o = this.connectionStore;
2529
2562
  if (!e) {
2530
2563
  this.editor.setError("LLM connection store not available");
2531
2564
  return;
2532
2565
  }
2533
2566
  try {
2534
- this.analyticsStore && this.analyticsStore.log("studio-llm-generation", this.editor.type, !0), this.editor.loading = !0, this.editor.startTime = Date.now(), this.editor.results = new We(/* @__PURE__ */ new Map(), []), this.editor.setError(null);
2567
+ this.analyticsStore && this.analyticsStore.log("studio-llm-generation", this.editor.type, !0), this.editor.loading = !0, this.editor.startTime = Date.now(), this.editor.results = new je(/* @__PURE__ */ new Map(), []), this.editor.setError(null);
2535
2568
  const l = F.getValue();
2536
2569
  if (await this.validateQuery(!1), !this.editor.completionSymbols || this.editor.completionSymbols.length === 0)
2537
2570
  throw new Error("There are no imported concepts for LLM generation");
@@ -2541,7 +2574,7 @@ const Oo = J({
2541
2574
  description: f.description,
2542
2575
  calculation: f.calculation
2543
2576
  })), i = async (f) => {
2544
- const c = n.connections[this.editor.connection], a = {
2577
+ const c = o.connections[this.editor.connection], a = {
2545
2578
  text: f,
2546
2579
  queryType: c ? c.query_type : "",
2547
2580
  editorType: this.editor.type,
@@ -2549,15 +2582,15 @@ const Oo = J({
2549
2582
  extraContent: this.rootContent
2550
2583
  };
2551
2584
  try {
2552
- const { resultPromise: v } = await o.executeQuery(
2585
+ const { resultPromise: v } = await n.executeQuery(
2553
2586
  this.editor.connection,
2554
2587
  a,
2555
2588
  () => {
2556
2589
  },
2557
2590
  () => {
2558
2591
  },
2559
- (E) => {
2560
- throw E;
2592
+ (w) => {
2593
+ throw w;
2561
2594
  },
2562
2595
  () => !0,
2563
2596
  !0
@@ -2592,62 +2625,62 @@ const Oo = J({
2592
2625
  return F ? F.getValue() : this.editor.contents || "";
2593
2626
  }
2594
2627
  }
2595
- }), Qo = { class: "editor-container" }, Bo = { class: "menu-bar" }, No = { class: "menu-actions" }, Po = { class: "editor-content" }, Ko = { class: "sidebar-panel" }, Wo = { class: "be-sidebar-container" }, Uo = { class: "be-sidebar-icons" }, jo = { class: "result-wrapper" }, Go = {
2628
+ }), Bn = { class: "editor-container" }, Nn = { class: "menu-bar" }, Pn = { class: "menu-actions" }, Kn = { class: "editor-content" }, Wn = { class: "sidebar-panel" }, Un = { class: "be-sidebar-container" }, jn = { class: "be-sidebar-icons" }, _n = { class: "result-wrapper" }, Gn = {
2596
2629
  key: 1,
2597
2630
  class: "error-message"
2598
- }, _o = {
2631
+ }, zn = {
2599
2632
  key: 2,
2600
2633
  class: "results-summary",
2601
2634
  "data-testid": "simple-editor-results"
2602
- }, zo = { class: "results-details" }, Jo = {
2635
+ }, Jn = { class: "results-details" }, Yn = {
2603
2636
  key: 0,
2604
2637
  class: "timing"
2605
- }, Yo = {
2638
+ }, Zn = {
2606
2639
  key: 1,
2607
2640
  class: "row-count"
2608
- }, Zo = {
2641
+ }, Xn = {
2609
2642
  key: 2,
2610
2643
  class: "operation-type"
2611
2644
  };
2612
- function Xo(e, o, n, l, r, i) {
2613
- const s = X("SymbolsPane"), f = X("loading-view");
2614
- return m(), y("div", Qo, [
2615
- t("div", Bo, [
2616
- t("div", No, [
2645
+ function ei(e, n, o, l, r, i) {
2646
+ const s = Z("SymbolsPane"), f = Z("loading-view");
2647
+ return h(), y("div", Bn, [
2648
+ t("div", Nn, [
2649
+ t("div", Pn, [
2617
2650
  t("button", {
2618
2651
  class: "action-item",
2619
- onClick: o[0] || (o[0] = (...c) => e.generateLLMQuery && e.generateLLMQuery(...c)),
2652
+ onClick: n[0] || (n[0] = (...c) => e.generateLLMQuery && e.generateLLMQuery(...c)),
2620
2653
  title: "Generate query using AI",
2621
2654
  "data-testid": "editor-generate-button"
2622
2655
  }, " Generate "),
2623
- e.editor.type !== "sql" ? (m(), y("button", {
2656
+ e.editor.type !== "sql" ? (h(), y("button", {
2624
2657
  key: 0,
2625
2658
  class: "action-item",
2626
- onClick: o[1] || (o[1] = () => e.validateQuery())
2659
+ onClick: n[1] || (n[1] = () => e.validateQuery())
2627
2660
  }, " Parse ")) : R("", !0),
2628
- e.editor.type !== "sql" ? (m(), y("button", {
2661
+ e.editor.type !== "sql" ? (h(), y("button", {
2629
2662
  key: 1,
2630
2663
  class: "action-item",
2631
- onClick: o[2] || (o[2] = (...c) => e.formatQuery && e.formatQuery(...c)),
2664
+ onClick: n[2] || (n[2] = (...c) => e.formatQuery && e.formatQuery(...c)),
2632
2665
  title: "Format query"
2633
2666
  }, " Format ")) : R("", !0),
2634
2667
  t("button", {
2635
- onClick: o[3] || (o[3] = (c) => e.editor.loading ? e.cancelQuery() : e.runQuery()),
2636
- class: A(["action-item", { "button-cancel": e.editor.loading, "button-run": !e.editor.loading }]),
2668
+ onClick: n[3] || (n[3] = (c) => e.editor.loading ? e.cancelQuery() : e.runQuery()),
2669
+ class: q(["action-item", { "button-cancel": e.editor.loading, "button-run": !e.editor.loading }]),
2637
2670
  "data-testid": "editor-run-button"
2638
- }, N(e.editor.loading ? "Cancel" : "Test"), 3)
2671
+ }, P(e.editor.loading ? "Cancel" : "Test"), 3)
2639
2672
  ])
2640
2673
  ]),
2641
- t("div", Po, [
2674
+ t("div", Kn, [
2642
2675
  t("div", {
2643
2676
  ref: "editorElement",
2644
- class: A(["editor-obj", {
2677
+ class: q(["editor-obj", {
2645
2678
  "monaco-width-with-panel": e.isPanelVisible,
2646
2679
  "monaco-width-no-panel": !e.isPanelVisible
2647
2680
  }]),
2648
2681
  "data-testid": "simple-editor-content"
2649
2682
  }, null, 2),
2650
- ue(t("div", Ko, [
2683
+ ce(t("div", Wn, [
2651
2684
  z(s, {
2652
2685
  symbols: e.editor.completionSymbols || [],
2653
2686
  onSelectSymbol: e.insertSymbol,
@@ -2656,38 +2689,38 @@ function Xo(e, o, n, l, r, i) {
2656
2689
  ], 512), [
2657
2690
  [lt, e.isPanelVisible]
2658
2691
  ]),
2659
- t("div", Wo, [
2660
- t("div", Uo, [
2692
+ t("div", Un, [
2693
+ t("div", jn, [
2661
2694
  t("button", {
2662
- class: A(["sidebar-icon-button", { active: e.isPanelVisible }]),
2663
- onClick: o[4] || (o[4] = (c) => e.togglePanel("symbols")),
2695
+ class: q(["sidebar-icon-button", { active: e.isPanelVisible }]),
2696
+ onClick: n[4] || (n[4] = (c) => e.togglePanel("symbols")),
2664
2697
  title: "Symbols"
2665
- }, [...o[5] || (o[5] = [
2698
+ }, [...n[5] || (n[5] = [
2666
2699
  t("i", { class: "mdi mdi-tag-search-outline" }, null, -1)
2667
2700
  ])], 2)
2668
2701
  ])
2669
2702
  ])
2670
2703
  ]),
2671
- t("div", jo, [
2672
- e.editor.loading ? (m(), G(f, {
2704
+ t("div", _n, [
2705
+ e.editor.loading ? (h(), _(f, {
2673
2706
  key: 0,
2674
2707
  class: "loading-view",
2675
2708
  text: "Loading...",
2676
2709
  startTime: e.editor.startTime
2677
- }, null, 8, ["startTime"])) : e.editor.error ? (m(), y("div", Go, N(e.editor.error), 1)) : e.lastOperation ? (m(), y("div", _o, [
2710
+ }, null, 8, ["startTime"])) : e.editor.error ? (h(), y("div", Gn, P(e.editor.error), 1)) : e.lastOperation ? (h(), y("div", zn, [
2678
2711
  t("div", {
2679
- class: A(["status-badge", e.lastOperation.success ? "success" : "error"])
2680
- }, N(e.lastOperation.success ? "SUCCESS" : "FAILED"), 3),
2681
- t("div", zo, [
2682
- e.lastOperation.duration ? (m(), y("div", Jo, N(e.lastOperation.duration) + "ms", 1)) : R("", !0),
2683
- e.lastOperation.rows !== void 0 ? (m(), y("div", Yo, N(e.lastOperation.rows) + " " + N(e.lastOperation.rows === 1 ? "row" : "rows"), 1)) : R("", !0),
2684
- e.lastOperation.type ? (m(), y("div", Zo, N(e.lastOperation.type), 1)) : R("", !0)
2712
+ class: q(["status-badge", e.lastOperation.success ? "success" : "error"])
2713
+ }, P(e.lastOperation.success ? "SUCCESS" : "FAILED"), 3),
2714
+ t("div", Jn, [
2715
+ e.lastOperation.duration ? (h(), y("div", Yn, P(e.lastOperation.duration) + "ms", 1)) : R("", !0),
2716
+ e.lastOperation.rows !== void 0 ? (h(), y("div", Zn, P(e.lastOperation.rows) + " " + P(e.lastOperation.rows === 1 ? "row" : "rows"), 1)) : R("", !0),
2717
+ e.lastOperation.type ? (h(), y("div", Xn, P(e.lastOperation.type), 1)) : R("", !0)
2685
2718
  ])
2686
2719
  ])) : R("", !0)
2687
2720
  ])
2688
2721
  ]);
2689
2722
  }
2690
- const Je = /* @__PURE__ */ Y(Oo, [["render", Xo], ["__scopeId", "data-v-e4c72cff"]]), ei = { class: "editor-overlay" }, ti = { class: "editor-actions" }, ni = ["data-testid"], oi = /* @__PURE__ */ J({
2723
+ const Ze = /* @__PURE__ */ Y(Qn, [["render", ei], ["__scopeId", "data-v-e4c72cff"]]), ti = { class: "editor-overlay" }, oi = { class: "editor-actions" }, ni = ["data-testid"], ii = /* @__PURE__ */ J({
2691
2724
  __name: "DashboardEditorDialog",
2692
2725
  props: {
2693
2726
  initialWidth: {},
@@ -2698,39 +2731,39 @@ const Je = /* @__PURE__ */ Y(Oo, [["render", Xo], ["__scopeId", "data-v-e4c72cff
2698
2731
  saveTestId: { default: "" }
2699
2732
  },
2700
2733
  emits: ["save", "cancel"],
2701
- setup(e, { emit: o }) {
2702
- const n = e, l = o, { editorElement: r, dialogStyle: i, startResize: s } = Et(() => l("cancel"), {
2703
- initialWidth: n.initialWidth,
2704
- initialHeight: n.initialHeight,
2705
- minWidth: n.minWidth,
2706
- minHeight: n.minHeight
2734
+ setup(e, { emit: n }) {
2735
+ const o = e, l = n, { editorElement: r, dialogStyle: i, startResize: s } = Dt(() => l("cancel"), {
2736
+ initialWidth: o.initialWidth,
2737
+ initialHeight: o.initialHeight,
2738
+ minWidth: o.minWidth,
2739
+ minHeight: o.minHeight
2707
2740
  });
2708
- return (f, c) => (m(), y("div", ei, [
2741
+ return (f, c) => (h(), y("div", ti, [
2709
2742
  t("div", {
2710
2743
  ref_key: "editorElement",
2711
2744
  ref: r,
2712
2745
  class: "content-editor",
2713
- style: Ee(ie(i))
2746
+ style: Te(ie(i))
2714
2747
  }, [
2715
- Ne(f.$slots, "default", {}, void 0, !0),
2716
- t("div", ti, [
2717
- Ne(f.$slots, "actions", {}, () => [
2748
+ Ke(f.$slots, "default", {}, void 0, !0),
2749
+ t("div", oi, [
2750
+ Ke(f.$slots, "actions", {}, () => [
2718
2751
  t("button", {
2719
2752
  class: "save-button",
2720
- "data-testid": n.saveTestId || void 0,
2753
+ "data-testid": o.saveTestId || void 0,
2721
2754
  onClick: c[0] || (c[0] = (a) => l("save"))
2722
- }, N(n.saveLabel), 9, ni),
2755
+ }, P(o.saveLabel), 9, ni),
2723
2756
  t("button", {
2724
2757
  class: "cancel-button",
2725
2758
  onClick: c[1] || (c[1] = (a) => l("cancel"))
2726
2759
  }, "Cancel")
2727
2760
  ], !0)
2728
2761
  ]),
2729
- z(Tt, { onStartResize: ie(s) }, null, 8, ["onStartResize"])
2762
+ z(It, { onStartResize: ie(s) }, null, 8, ["onStartResize"])
2730
2763
  ], 4)
2731
2764
  ]));
2732
2765
  }
2733
- }), Ye = /* @__PURE__ */ Y(oi, [["__scopeId", "data-v-580721a8"]]), ii = { class: "editor-body" }, ri = /* @__PURE__ */ J({
2766
+ }), Xe = /* @__PURE__ */ Y(ii, [["__scopeId", "data-v-580721a8"]]), ri = { class: "editor-body" }, li = /* @__PURE__ */ J({
2734
2767
  __name: "DashboardChartEditor",
2735
2768
  props: {
2736
2769
  content: {},
@@ -2741,25 +2774,25 @@ const Je = /* @__PURE__ */ Y(Oo, [["render", Xo], ["__scopeId", "data-v-e4c72cff
2741
2774
  initialHeight: {}
2742
2775
  },
2743
2776
  emits: ["save", "cancel"],
2744
- setup(e, { emit: o }) {
2745
- const n = e, l = o, r = S(n.content), i = S(n.imports), s = S(null);
2777
+ setup(e, { emit: n }) {
2778
+ const o = e, l = n, r = S(o.content), i = S(o.imports), s = S(null);
2746
2779
  function f() {
2747
2780
  s.value && l("save", s.value.getContent());
2748
2781
  }
2749
2782
  function c() {
2750
2783
  l("cancel");
2751
2784
  }
2752
- return (a, v) => (m(), G(Ye, {
2753
- initialWidth: n.initialWidth,
2754
- initialHeight: n.initialHeight,
2785
+ return (a, v) => (h(), _(Xe, {
2786
+ initialWidth: o.initialWidth,
2787
+ initialHeight: o.initialHeight,
2755
2788
  saveLabel: "Save Query",
2756
2789
  saveTestId: "save-dashboard-chart",
2757
2790
  onSave: f,
2758
2791
  onCancel: c
2759
2792
  }, {
2760
- default: ne(() => [
2761
- t("div", ii, [
2762
- z(Je, {
2793
+ default: ee(() => [
2794
+ t("div", ri, [
2795
+ z(Ze, {
2763
2796
  class: "editor-content",
2764
2797
  initContent: r.value,
2765
2798
  connectionName: e.connectionName,
@@ -2773,13 +2806,13 @@ const Je = /* @__PURE__ */ Y(Oo, [["render", Xo], ["__scopeId", "data-v-e4c72cff
2773
2806
  _: 1
2774
2807
  }, 8, ["initialWidth", "initialHeight"]));
2775
2808
  }
2776
- }), ji = /* @__PURE__ */ Y(ri, [["__scopeId", "data-v-9717eaff"]]), li = { class: "tab-header" }, ai = { class: "editor-body" }, si = {
2809
+ }), _i = /* @__PURE__ */ Y(li, [["__scopeId", "data-v-9717eaff"]]), ai = { class: "tab-header" }, si = { class: "editor-body" }, di = {
2777
2810
  key: 0,
2778
2811
  class: "tab-content"
2779
- }, di = {
2812
+ }, ui = {
2780
2813
  key: 1,
2781
2814
  class: "tab-content"
2782
- }, ui = /* @__PURE__ */ J({
2815
+ }, ci = /* @__PURE__ */ J({
2783
2816
  __name: "DashboardMarkdownEditor",
2784
2817
  props: {
2785
2818
  content: {},
@@ -2790,15 +2823,15 @@ const Je = /* @__PURE__ */ Y(Oo, [["render", Xo], ["__scopeId", "data-v-e4c72cff
2790
2823
  initialHeight: {}
2791
2824
  },
2792
2825
  emits: ["save", "cancel"],
2793
- setup(e, { emit: o }) {
2794
- const n = e, l = o, r = p(() => typeof n.content == "string" ? { markdown: n.content, query: "" } : { markdown: n.content.markdown || "", query: n.content.query || "" }), i = S(r.value.markdown), s = S(r.value.query), f = S(n.imports), c = S(null), a = S("markdown");
2795
- de(
2796
- () => n.content,
2826
+ setup(e, { emit: n }) {
2827
+ const o = e, l = n, r = p(() => typeof o.content == "string" ? { markdown: o.content, query: "" } : { markdown: o.content.markdown || "", query: o.content.query || "" }), i = S(r.value.markdown), s = S(r.value.query), f = S(o.imports), c = S(null), a = S("markdown");
2828
+ ue(
2829
+ () => o.content,
2797
2830
  ($) => {
2798
2831
  const g = typeof $ == "string" ? { markdown: $, query: "" } : { markdown: $.markdown || "", query: $.query || "" };
2799
2832
  i.value = g.markdown, s.value = g.query;
2800
2833
  }
2801
- ), de(a, ($, g) => {
2834
+ ), ue(a, ($, g) => {
2802
2835
  g === "query" && c.value && (s.value = c.value.getContent());
2803
2836
  });
2804
2837
  function v() {
@@ -2807,73 +2840,73 @@ const Je = /* @__PURE__ */ Y(Oo, [["render", Xo], ["__scopeId", "data-v-e4c72cff
2807
2840
  query: s.value
2808
2841
  });
2809
2842
  }
2810
- function E() {
2843
+ function w() {
2811
2844
  l("cancel");
2812
2845
  }
2813
- function C($) {
2846
+ function b($) {
2814
2847
  a.value === "query" && c.value && (s.value = c.value.getContent()), a.value = $;
2815
2848
  }
2816
- function D($, g = "") {
2849
+ function I($, g = "") {
2817
2850
  const B = document.querySelector(".markdown-editor");
2818
2851
  if (!B) return;
2819
- const b = B.selectionStart, h = B.selectionEnd, I = i.value.substring(b, h), Z = i.value.substring(0, b), re = i.value.substring(h);
2820
- i.value = Z + $ + I + g + re, setTimeout(() => {
2821
- B.focus(), B.setSelectionRange(b + $.length, b + $.length + I.length);
2852
+ const E = B.selectionStart, m = B.selectionEnd, D = i.value.substring(E, m), te = i.value.substring(0, E), ne = i.value.substring(m);
2853
+ i.value = te + $ + D + g + ne, setTimeout(() => {
2854
+ B.focus(), B.setSelectionRange(E + $.length, E + $.length + D.length);
2822
2855
  }, 0);
2823
2856
  }
2824
- function V() {
2825
- D("**", "**");
2857
+ function x() {
2858
+ I("**", "**");
2826
2859
  }
2827
2860
  function k() {
2828
- D("*", "*");
2861
+ I("*", "*");
2829
2862
  }
2830
2863
  function M() {
2831
- D("## ");
2864
+ I("## ");
2832
2865
  }
2833
2866
  function T() {
2834
- D("- ");
2867
+ I("- ");
2835
2868
  }
2836
- function H() {
2837
- D("[", "](url)");
2869
+ function O() {
2870
+ I("[", "](url)");
2838
2871
  }
2839
- function K() {
2840
- D("{data[0].field_name}");
2872
+ function W() {
2873
+ I("{data[0].field_name}");
2841
2874
  }
2842
- function O() {
2843
- D(`{{#each data}}
2875
+ function V() {
2876
+ I(`{{#each data}}
2844
2877
  - {{field_name}}
2845
2878
  {{/each}}`);
2846
2879
  }
2847
- return ($, g) => (m(), G(Ye, {
2848
- initialWidth: n.initialWidth,
2849
- initialHeight: n.initialHeight,
2880
+ return ($, g) => (h(), _(Xe, {
2881
+ initialWidth: o.initialWidth,
2882
+ initialHeight: o.initialHeight,
2850
2883
  saveLabel: "Save Content",
2851
2884
  saveTestId: "save-dashboard-markdown",
2852
2885
  onSave: v,
2853
- onCancel: E
2886
+ onCancel: w
2854
2887
  }, {
2855
- default: ne(() => [
2856
- t("div", li, [
2888
+ default: ee(() => [
2889
+ t("div", ai, [
2857
2890
  t("button", {
2858
- onClick: g[0] || (g[0] = (B) => C("markdown")),
2859
- class: A([{ active: a.value === "markdown" }, "tab-button"])
2891
+ onClick: g[0] || (g[0] = (B) => b("markdown")),
2892
+ class: q([{ active: a.value === "markdown" }, "tab-button"])
2860
2893
  }, [...g[3] || (g[3] = [
2861
2894
  t("i", { class: "mdi mdi-note-text-outline" }, null, -1),
2862
2895
  t("span", null, "Markdown Template", -1)
2863
2896
  ])], 2),
2864
2897
  t("button", {
2865
- onClick: g[1] || (g[1] = (B) => C("query")),
2866
- class: A([{ active: a.value === "query" }, "tab-button"])
2898
+ onClick: g[1] || (g[1] = (B) => b("query")),
2899
+ class: q([{ active: a.value === "query" }, "tab-button"])
2867
2900
  }, [...g[4] || (g[4] = [
2868
2901
  t("i", { class: "mdi mdi-magnify" }, null, -1),
2869
2902
  t("span", null, "Data Query", -1)
2870
2903
  ])], 2)
2871
2904
  ]),
2872
- t("div", ai, [
2873
- a.value === "markdown" ? (m(), y("div", si, [
2905
+ t("div", si, [
2906
+ a.value === "markdown" ? (h(), y("div", di, [
2874
2907
  t("div", { class: "markdown-toolbar" }, [
2875
2908
  t("button", {
2876
- onClick: V,
2909
+ onClick: x,
2877
2910
  title: "Bold"
2878
2911
  }, [...g[5] || (g[5] = [
2879
2912
  t("strong", null, "B", -1)
@@ -2895,26 +2928,26 @@ const Je = /* @__PURE__ */ Y(Oo, [["render", Xo], ["__scopeId", "data-v-e4c72cff
2895
2928
  t("i", { class: "mdi mdi-format-list-bulleted" }, null, -1)
2896
2929
  ])]),
2897
2930
  t("button", {
2898
- onClick: H,
2931
+ onClick: O,
2899
2932
  title: "Link"
2900
2933
  }, [...g[8] || (g[8] = [
2901
2934
  t("i", { class: "mdi mdi-link-variant" }, null, -1)
2902
2935
  ])]),
2903
2936
  g[10] || (g[10] = t("div", { class: "toolbar-separator" }, null, -1)),
2904
2937
  t("button", {
2905
- onClick: K,
2938
+ onClick: W,
2906
2939
  title: "Insert data reference",
2907
2940
  class: "data-button"
2908
2941
  }, " {} "),
2909
2942
  t("button", {
2910
- onClick: O,
2943
+ onClick: V,
2911
2944
  title: "Insert loop",
2912
2945
  class: "data-button"
2913
2946
  }, [...g[9] || (g[9] = [
2914
2947
  t("i", { class: "mdi mdi-refresh" }, null, -1)
2915
2948
  ])])
2916
2949
  ]),
2917
- ue(t("textarea", {
2950
+ ce(t("textarea", {
2918
2951
  "onUpdate:modelValue": g[2] || (g[2] = (B) => i.value = B),
2919
2952
  placeholder: `Enter markdown content here...
2920
2953
 
@@ -2926,14 +2959,14 @@ Template examples:
2926
2959
  - {{#each data limit=5}} {{field_name}} {{/each}} - Loop first 5`,
2927
2960
  class: "markdown-editor"
2928
2961
  }, null, 512), [
2929
- [fe, i.value]
2962
+ [pe, i.value]
2930
2963
  ])
2931
2964
  ])) : R("", !0),
2932
- a.value === "query" ? (m(), y("div", di, [
2965
+ a.value === "query" ? (h(), y("div", ui, [
2933
2966
  g[11] || (g[11] = t("div", { class: "query-help" }, [
2934
2967
  t("p", null, " Write a query to fetch data for your markdown template. Leave empty if no data is needed. ")
2935
2968
  ], -1)),
2936
- z(Je, {
2969
+ z(Ze, {
2937
2970
  class: "editor-content",
2938
2971
  initContent: s.value,
2939
2972
  connectionName: e.connectionName,
@@ -2948,38 +2981,38 @@ Template examples:
2948
2981
  _: 1
2949
2982
  }, 8, ["initialWidth", "initialHeight"]));
2950
2983
  }
2951
- }), Gi = /* @__PURE__ */ Y(ui, [["__scopeId", "data-v-d2f32030"]]), ci = { class: "dashboard-setup" }, mi = { class: "setup-section" }, hi = {
2984
+ }), Gi = /* @__PURE__ */ Y(ci, [["__scopeId", "data-v-d2f32030"]]), mi = { class: "dashboard-setup" }, hi = { class: "setup-section" }, fi = {
2952
2985
  key: 0,
2953
2986
  class: "setup-section"
2954
- }, fi = { class: "action-row" }, vi = ["disabled"], pi = {
2987
+ }, vi = { class: "action-row" }, pi = ["disabled"], yi = {
2955
2988
  key: 0,
2956
2989
  class: "error-message"
2957
- }, yi = { class: "setup-section" }, gi = { class: "templates-grid" }, bi = ["onClick", "data-testid"], Ci = { class: "template-icon" }, wi = { class: "template-info" }, ki = { class: "template-title" }, Si = { class: "template-desc" }, Q = 20, _i = /* @__PURE__ */ J({
2990
+ }, gi = { class: "setup-section" }, bi = { class: "templates-grid" }, Ci = ["onClick", "data-testid"], wi = { class: "template-icon" }, ki = { class: "template-info" }, Si = { class: "template-title" }, Ei = { class: "template-desc" }, Q = 20, zi = /* @__PURE__ */ J({
2958
2991
  __name: "DashboardCTA",
2959
2992
  props: {
2960
2993
  dashboardId: {}
2961
2994
  },
2962
2995
  emits: ["template-selected", "description-updated"],
2963
- setup(e, { emit: o }) {
2964
- const n = j("dashboardStore"), l = j("editorStore"), r = j("llmConnectionStore"), i = j(
2996
+ setup(e, { emit: n }) {
2997
+ const o = j("dashboardStore"), l = j("editorStore"), r = j("llmConnectionStore"), i = j(
2965
2998
  "queryExecutionService"
2966
2999
  ), s = j("saveDashboards");
2967
- if (!n || !r || !i || !s)
3000
+ if (!o || !r || !i || !s)
2968
3001
  throw new Error("DashboardStore, LLMConnectionStore, or QueryExecutionService not provided");
2969
- const f = e, c = p(() => r.activeConnection), a = o, v = S(""), E = S(""), C = S(!1), D = S(""), V = S(null), k = Q / 4, M = [
3002
+ const f = e, c = p(() => r.activeConnection), a = n, v = S(""), w = S(""), b = S(!1), I = S(""), x = S(null), k = Q / 4, M = [
2970
3003
  {
2971
3004
  id: "summary",
2972
3005
  name: "Summary Dashboard",
2973
3006
  description: "High-level metrics and KPIs with key visualizations",
2974
3007
  icon: "mdi-view-dashboard",
2975
3008
  layout: [
2976
- { i: "title", x: 0, y: 0, w: Q, h: 3, type: w.MARKDOWN },
2977
- { i: "kpi1", x: 0, y: 3, w: Q / 4, h: 4, type: w.CHART },
2978
- { i: "kpi2", x: k, y: 3, w: Q / 4, h: 4, type: w.CHART },
2979
- { i: "kpi3", x: k * 2, y: 3, w: Q / 4, h: 4, type: w.CHART },
2980
- { i: "kpi4", x: k * 3, y: 3, w: Q / 4, h: 4, type: w.CHART },
2981
- { i: "trend", x: 0, y: 7, w: Q / 2, h: 8, type: w.CHART },
2982
- { i: "breakdown", x: Q / 2, y: 7, w: Q / 2, h: 8, type: w.CHART }
3009
+ { i: "title", x: 0, y: 0, w: Q, h: 3, type: C.MARKDOWN },
3010
+ { i: "kpi1", x: 0, y: 3, w: Q / 4, h: 4, type: C.CHART },
3011
+ { i: "kpi2", x: k, y: 3, w: Q / 4, h: 4, type: C.CHART },
3012
+ { i: "kpi3", x: k * 2, y: 3, w: Q / 4, h: 4, type: C.CHART },
3013
+ { i: "kpi4", x: k * 3, y: 3, w: Q / 4, h: 4, type: C.CHART },
3014
+ { i: "trend", x: 0, y: 7, w: Q / 2, h: 8, type: C.CHART },
3015
+ { i: "breakdown", x: Q / 2, y: 7, w: Q / 2, h: 8, type: C.CHART }
2983
3016
  ]
2984
3017
  },
2985
3018
  {
@@ -2988,11 +3021,11 @@ Template examples:
2988
3021
  description: "Hierarchical data exploration with filtering capabilities",
2989
3022
  icon: "mdi-magnify-expand",
2990
3023
  layout: [
2991
- { i: "filters", x: 0, y: 0, w: Q, h: 3, type: w.MARKDOWN },
2992
- { i: "overview", x: 0, y: 3, w: Q, h: 5, type: w.CHART },
2993
- { i: "detail1", x: 0, y: 8, w: Q / 2, h: 8, type: w.CHART },
2994
- { i: "detail2", x: Q / 2, y: 10, w: Q / 2, h: 8, type: w.CHART },
2995
- { i: "datatable", x: 0, y: 20, w: Q, h: 8, type: w.TABLE }
3024
+ { i: "filters", x: 0, y: 0, w: Q, h: 3, type: C.MARKDOWN },
3025
+ { i: "overview", x: 0, y: 3, w: Q, h: 5, type: C.CHART },
3026
+ { i: "detail1", x: 0, y: 8, w: Q / 2, h: 8, type: C.CHART },
3027
+ { i: "detail2", x: Q / 2, y: 10, w: Q / 2, h: 8, type: C.CHART },
3028
+ { i: "datatable", x: 0, y: 20, w: Q, h: 8, type: C.TABLE }
2996
3029
  ]
2997
3030
  },
2998
3031
  {
@@ -3001,12 +3034,12 @@ Template examples:
3001
3034
  description: "Side-by-side comparisons of metrics across dimensions",
3002
3035
  icon: "mdi-compare",
3003
3036
  layout: [
3004
- { i: "title", x: 0, y: 0, w: Q, h: 3, type: w.MARKDOWN },
3005
- { i: "compare1", x: 0, y: 3, w: Q / 2, h: 6, type: w.CHART },
3006
- { i: "compare2", x: Q / 2, y: 3, w: Q / 2, h: 6, type: w.CHART },
3007
- { i: "compare3", x: 0, y: 9, w: Q / 2, h: 6, type: w.CHART },
3008
- { i: "compare4", x: Q / 2, y: 9, w: Q / 2, h: 6, type: w.CHART },
3009
- { i: "summary", x: 0, y: 15, w: Q, h: 5, type: w.MARKDOWN }
3037
+ { i: "title", x: 0, y: 0, w: Q, h: 3, type: C.MARKDOWN },
3038
+ { i: "compare1", x: 0, y: 3, w: Q / 2, h: 6, type: C.CHART },
3039
+ { i: "compare2", x: Q / 2, y: 3, w: Q / 2, h: 6, type: C.CHART },
3040
+ { i: "compare3", x: 0, y: 9, w: Q / 2, h: 6, type: C.CHART },
3041
+ { i: "compare4", x: Q / 2, y: 9, w: Q / 2, h: 6, type: C.CHART },
3042
+ { i: "summary", x: 0, y: 15, w: Q, h: 5, type: C.MARKDOWN }
3010
3043
  ]
3011
3044
  },
3012
3045
  {
@@ -3015,12 +3048,12 @@ Template examples:
3015
3048
  description: "Visualization of trends and patterns over time",
3016
3049
  icon: "mdi-chart-timeline-variant",
3017
3050
  layout: [
3018
- { i: "headline", x: 0, y: 0, w: Q, h: 3, type: w.MARKDOWN },
3019
- { i: "maintrend", x: 0, y: 3, w: Q, h: 8, type: w.CHART },
3020
- { i: "breakdown1", x: 0, y: 11, w: Q / 3, h: 6, type: w.CHART },
3021
- { i: "breakdown2", x: Q / 3, y: 11, w: Q / 3, h: 6, type: w.CHART },
3022
- { i: "breakdown3", x: Q / 3 * 2, y: 11, w: Q / 3, h: 6, type: w.CHART },
3023
- { i: "forecast", x: 0, y: 17, w: Q, h: 6, type: w.CHART }
3051
+ { i: "headline", x: 0, y: 0, w: Q, h: 3, type: C.MARKDOWN },
3052
+ { i: "maintrend", x: 0, y: 3, w: Q, h: 8, type: C.CHART },
3053
+ { i: "breakdown1", x: 0, y: 11, w: Q / 3, h: 6, type: C.CHART },
3054
+ { i: "breakdown2", x: Q / 3, y: 11, w: Q / 3, h: 6, type: C.CHART },
3055
+ { i: "breakdown3", x: Q / 3 * 2, y: 11, w: Q / 3, h: 6, type: C.CHART },
3056
+ { i: "forecast", x: 0, y: 17, w: Q, h: 6, type: C.CHART }
3024
3057
  ]
3025
3058
  }
3026
3059
  // {
@@ -3031,12 +3064,12 @@ Template examples:
3031
3064
  // layout: []
3032
3065
  // }
3033
3066
  ];
3034
- function T(O) {
3035
- V.value = O;
3036
- const $ = M.find((g) => g.id === O);
3067
+ function T(V) {
3068
+ x.value = V;
3069
+ const $ = M.find((g) => g.id === V);
3037
3070
  if ($ && f.dashboardId) {
3038
3071
  for (const g of $.layout)
3039
- n.addItemToDashboard(
3072
+ o.addItemToDashboard(
3040
3073
  f.dashboardId,
3041
3074
  g.type,
3042
3075
  g.x,
@@ -3044,120 +3077,120 @@ Template examples:
3044
3077
  g.w,
3045
3078
  g.h
3046
3079
  );
3047
- a("template-selected", O);
3080
+ a("template-selected", V);
3048
3081
  }
3049
3082
  }
3050
- function H() {
3051
- f.dashboardId && v.value && (n.updateDashboardDescription(f.dashboardId, v.value), a("description-updated", v.value));
3083
+ function O() {
3084
+ f.dashboardId && v.value && (o.updateDashboardDescription(f.dashboardId, v.value), a("description-updated", v.value));
3052
3085
  }
3053
- async function K() {
3054
- if (!E.value.trim()) {
3055
- D.value = "Please provide a prompt for the dashboard generation.";
3086
+ async function W() {
3087
+ if (!w.value.trim()) {
3088
+ I.value = "Please provide a prompt for the dashboard generation.";
3056
3089
  return;
3057
3090
  }
3058
3091
  try {
3059
- C.value = !0, D.value = "";
3060
- const O = await n.generatePromptSpec(
3061
- E.value,
3092
+ b.value = !0, I.value = "";
3093
+ const V = await o.generatePromptSpec(
3094
+ w.value,
3062
3095
  r,
3063
3096
  i,
3064
3097
  l
3065
3098
  );
3066
- console.log("Prompt spec generated:", O), O ? (await n.populateFromPromptSpec(
3099
+ console.log("Prompt spec generated:", V), V ? (await o.populateFromPromptSpec(
3067
3100
  f.dashboardId,
3068
- O,
3101
+ V,
3069
3102
  r,
3070
3103
  i,
3071
3104
  l
3072
- ), !v.value && O.description && (v.value = O.description, H()), s()) : D.value = "Failed to generate dashboard specification.";
3073
- } catch (O) {
3074
- console.error("Error generating dashboard with LLM:", O), D.value = "An error occurred while generating the dashboard.";
3105
+ ), !v.value && V.description && (v.value = V.description, O()), s()) : I.value = "Failed to generate dashboard specification.";
3106
+ } catch (V) {
3107
+ console.error("Error generating dashboard with LLM:", V), I.value = "An error occurred while generating the dashboard.";
3075
3108
  } finally {
3076
- C.value = !1;
3109
+ b.value = !1;
3077
3110
  }
3078
3111
  }
3079
- return (O, $) => (m(), y("div", ci, [
3112
+ return (V, $) => (h(), y("div", mi, [
3080
3113
  $[7] || ($[7] = t("div", { class: "setup-header" }, [
3081
3114
  t("h2", { class: "setup-title" }, "An Empty Dashboard"),
3082
3115
  t("p", { class: "setup-subtitle" }, " Choose a template or start from scratch by using the 'add item' button to add charts, tables, and more. ")
3083
3116
  ], -1)),
3084
- t("div", mi, [
3117
+ t("div", hi, [
3085
3118
  $[3] || ($[3] = t("h3", { class: "section-title" }, "Description", -1)),
3086
- ue(t("textarea", {
3119
+ ce(t("textarea", {
3087
3120
  "onUpdate:modelValue": $[0] || ($[0] = (g) => v.value = g),
3088
3121
  placeholder: "What is this dashboard for? Add context to help viewers understand the data...",
3089
3122
  rows: "3",
3090
3123
  class: "description-input"
3091
3124
  }, null, 512), [
3092
- [fe, v.value]
3125
+ [pe, v.value]
3093
3126
  ]),
3094
3127
  t("button", {
3095
- onClick: H,
3128
+ onClick: O,
3096
3129
  class: "action-button save-button",
3097
3130
  "data-testid": "dashboard-description-save"
3098
3131
  }, [...$[2] || ($[2] = [
3099
3132
  t("i", { class: "mdi mdi-content-save" }, null, -1),
3100
- ge(" Save ", -1)
3133
+ Ce(" Save ", -1)
3101
3134
  ])])
3102
3135
  ]),
3103
- c.value ? (m(), y("div", hi, [
3136
+ c.value ? (h(), y("div", fi, [
3104
3137
  $[4] || ($[4] = t("h3", { class: "section-title" }, "AI Copilot", -1)),
3105
3138
  $[5] || ($[5] = t("p", { class: "section-desc" }, " Let AI help build your dashboard based on your data and description ", -1)),
3106
- ue(t("textarea", {
3107
- "onUpdate:modelValue": $[1] || ($[1] = (g) => E.value = g),
3139
+ ce(t("textarea", {
3140
+ "onUpdate:modelValue": $[1] || ($[1] = (g) => w.value = g),
3108
3141
  placeholder: "Describe the dashboard you want to create. For example: 'Create a sales performance dashboard with monthly trends, regional breakdown, and top product metrics.'",
3109
3142
  rows: "4",
3110
3143
  class: "description-input",
3111
3144
  "data-testid": "dashboard-prompt-input"
3112
3145
  }, null, 512), [
3113
- [fe, E.value]
3146
+ [pe, w.value]
3114
3147
  ]),
3115
- t("div", fi, [
3148
+ t("div", vi, [
3116
3149
  t("button", {
3117
- onClick: K,
3150
+ onClick: W,
3118
3151
  class: "action-button llm-button",
3119
- disabled: C.value || !E.value.trim(),
3152
+ disabled: b.value || !w.value.trim(),
3120
3153
  "data-testid": "generate-with-llm-button"
3121
3154
  }, [
3122
3155
  t("i", {
3123
- class: A(["mdi", C.value ? "mdi-loading mdi-spin" : "mdi-creation"])
3156
+ class: q(["mdi", b.value ? "mdi-loading mdi-spin" : "mdi-creation"])
3124
3157
  }, null, 2),
3125
- ge(" " + N(C.value ? "Generating..." : "Generate with AI"), 1)
3126
- ], 8, vi),
3127
- D.value ? (m(), y("div", pi, N(D.value), 1)) : R("", !0)
3158
+ Ce(" " + P(b.value ? "Generating..." : "Generate with AI"), 1)
3159
+ ], 8, pi),
3160
+ I.value ? (h(), y("div", yi, P(I.value), 1)) : R("", !0)
3128
3161
  ])
3129
3162
  ])) : R("", !0),
3130
- t("div", yi, [
3163
+ t("div", gi, [
3131
3164
  $[6] || ($[6] = t("h3", { class: "section-title" }, "Templates", -1)),
3132
- t("div", gi, [
3133
- (m(), y(me, null, be(M, (g) => t("div", {
3165
+ t("div", bi, [
3166
+ (h(), y(fe, null, we(M, (g) => t("div", {
3134
3167
  key: g.id,
3135
- class: A(["template-card", { selected: V.value === g.id }]),
3168
+ class: q(["template-card", { selected: x.value === g.id }]),
3136
3169
  onClick: (B) => T(g.id),
3137
3170
  "data-testid": `template-card-${g.id}`
3138
3171
  }, [
3139
- t("div", Ci, [
3172
+ t("div", wi, [
3140
3173
  t("i", {
3141
- class: A(["mdi", g.icon])
3174
+ class: q(["mdi", g.icon])
3142
3175
  }, null, 2)
3143
3176
  ]),
3144
- t("div", wi, [
3145
- t("h4", ki, N(g.name), 1),
3146
- t("p", Si, N(g.description), 1)
3177
+ t("div", ki, [
3178
+ t("h4", Si, P(g.name), 1),
3179
+ t("p", Ei, P(g.description), 1)
3147
3180
  ])
3148
- ], 10, bi)), 64))
3181
+ ], 10, Ci)), 64))
3149
3182
  ])
3150
3183
  ])
3151
3184
  ]));
3152
3185
  }
3153
3186
  });
3154
- function zi(e, o, n, l) {
3155
- const r = ht(), i = Ge();
3187
+ function Ji(e, n, o, l) {
3188
+ const r = ht(), i = ze();
3156
3189
  let s = j("queryExecutionService");
3157
- const { setActiveDashboard: f } = _e();
3190
+ const { setActiveDashboard: f } = Je();
3158
3191
  if (!s)
3159
3192
  throw new Error("QueryExecutionService not provided");
3160
- const c = S(""), a = S(""), v = S(""), E = S(null), C = S(null), D = S(!1), V = S(!1), k = S(!1), M = S([]), T = p(() => o.maxWidth || "100vw"), H = p(() => e.value ? e.value.layout : []), K = p(() => e.value ? [...e.value.layout].sort((u, L) => (u.y + u.y + u.h) / 2 - (L.y + L.y + L.h) / 2) : []), O = p(() => e.value ? e.value.connection : ""), $ = p(() => o.viewMode ? !1 : e.value ? e.value.state === "editing" : !1), g = p(() => e.value ? e.value.imports.map((u) => {
3193
+ const c = S(""), a = S(""), v = S(""), w = S(null), b = S(null), I = S(!1), x = S(!1), k = S(!1), M = S([]), T = p(() => n.maxWidth || "100vw"), O = p(() => e.value ? e.value.layout : []), W = p(() => e.value ? [...e.value.layout].sort((u, L) => (u.y + u.y + u.h) / 2 - (L.y + L.y + L.h) / 2) : []), V = p(() => e.value ? e.value.connection : ""), $ = p(() => n.viewMode ? !1 : e.value ? e.value.state === "editing" : !1), g = p(() => e.value ? e.value.imports.map((u) => {
3161
3194
  var L, d;
3162
3195
  return {
3163
3196
  alias: u.name,
@@ -3167,13 +3200,13 @@ function zi(e, o, n, l) {
3167
3200
  }) : []);
3168
3201
  function B(u) {
3169
3202
  if (!(u != null && u.id)) return;
3170
- u.state === "fullscreen" && n.fullScreen(!0), r.setActiveDashboard(u.id), v.value = "", c.value = "", a.value = "", M.value = [], u.filter && (c.value = u.filter, a.value = u.filter);
3171
- const L = le(u.id), d = Object.keys(u.gridItems).filter(
3172
- (x) => u.gridItems[x].type !== w.SECTION_HEADER && !u.gridItems[x].results
3203
+ u.state === "fullscreen" && o.fullScreen(!0), r.setActiveDashboard(u.id), v.value = "", c.value = "", a.value = "", M.value = [], u.filter && (c.value = u.filter, a.value = u.filter);
3204
+ const L = N(u.id), d = Object.keys(u.gridItems).filter(
3205
+ (H) => u.gridItems[H].type !== C.SECTION_HEADER && !u.gridItems[H].results
3173
3206
  );
3174
- L == null || L.runBatch(d), Z();
3207
+ L == null || L.runBatch(d), te();
3175
3208
  }
3176
- de(
3209
+ ue(
3177
3210
  () => {
3178
3211
  var u;
3179
3212
  return (u = e.value) == null ? void 0 : u.id;
@@ -3181,16 +3214,16 @@ function zi(e, o, n, l) {
3181
3214
  (u, L) => {
3182
3215
  u && u !== L && e.value && B(e.value);
3183
3216
  }
3184
- ), je(() => {
3217
+ ), Ge(() => {
3185
3218
  e.value && B(e.value);
3186
3219
  const u = new ResizeObserver(() => {
3187
- n.triggerResize();
3188
- }), L = o.isMobile ? ".mobile-container" : ".grid-container", d = document.querySelector(L);
3220
+ o.triggerResize();
3221
+ }), L = n.isMobile ? ".mobile-container" : ".grid-container", d = document.querySelector(L);
3189
3222
  d && u.observe(d);
3190
3223
  }), at(() => {
3191
- E.value !== null && clearTimeout(E.value);
3224
+ w.value !== null && clearTimeout(w.value);
3192
3225
  });
3193
- async function b() {
3226
+ async function E() {
3194
3227
  var u;
3195
3228
  if (e.value && e.value.id) {
3196
3229
  c.value = "", a.value = "", v.value = "";
@@ -3198,13 +3231,13 @@ function zi(e, o, n, l) {
3198
3231
  await ((u = r.getQueryExecutor(e.value.id)) == null ? void 0 : u.runBatch(L));
3199
3232
  }
3200
3233
  }
3201
- async function h(u) {
3234
+ async function m(u) {
3202
3235
  var L;
3203
- if (!u || Ke(u) === "") {
3236
+ if (!u || Ue(u) === "") {
3204
3237
  if (v.value = "", e.value && e.value.id) {
3205
3238
  let d = r.updateDashboardFilter(
3206
3239
  e.value.id,
3207
- Ke(u)
3240
+ Ue(u)
3208
3241
  );
3209
3242
  await ((L = r.getQueryExecutor(e.value.id)) == null ? void 0 : L.runBatch(d));
3210
3243
  }
@@ -3219,12 +3252,12 @@ function zi(e, o, n, l) {
3219
3252
  }).then(() => {
3220
3253
  var d;
3221
3254
  if (v.value = "", e.value && e.value.id) {
3222
- let x = r.updateDashboardFilter(e.value.id, u);
3223
- (d = r.getQueryExecutor(e.value.id)) == null || d.runBatch(x);
3255
+ let H = r.updateDashboardFilter(e.value.id, u);
3256
+ (d = r.getQueryExecutor(e.value.id)) == null || d.runBatch(H);
3224
3257
  }
3225
3258
  }).catch((d) => (v.value = d.message, !1))));
3226
3259
  }
3227
- const I = async (u) => {
3260
+ const D = async (u) => {
3228
3261
  let L = u.replace(/^\s*where\s+/i, "");
3229
3262
  if (e.value && e.value.id) {
3230
3263
  let d = await (s == null ? void 0 : s.executeQuery(
@@ -3248,15 +3281,15 @@ function zi(e, o, n, l) {
3248
3281
  ));
3249
3282
  if (!d)
3250
3283
  throw new Error("No promises returned from query execution service");
3251
- let x = await d.resultPromise;
3252
- if (!x.success)
3284
+ let H = await d.resultPromise;
3285
+ if (!H.success)
3253
3286
  throw new Error(
3254
- `Validation of "select 1 as test ${L}" resulted in ${x.error}`
3287
+ `Validation of "select 1 as test ${L}" resulted in ${H.error}`
3255
3288
  );
3256
3289
  } else
3257
3290
  throw new Error("Dashboard not found");
3258
3291
  };
3259
- async function Z() {
3292
+ async function te() {
3260
3293
  if (e.value && e.value.id && s) {
3261
3294
  let u = await r.populateCompletion(
3262
3295
  e.value.id,
@@ -3266,58 +3299,58 @@ function zi(e, o, n, l) {
3266
3299
  u && (M.value = u), v.value = "";
3267
3300
  }
3268
3301
  }
3269
- async function re(u) {
3270
- e.value && e.value.id && (r.updateDashboardImports(e.value.id, u), await Z());
3302
+ async function ne(u) {
3303
+ e.value && e.value.id && (r.updateDashboardImports(e.value.id, u), await te());
3271
3304
  }
3272
3305
  const U = (u) => {
3273
- e.value && (r.setState(e.value.id, u), Pe(() => {
3274
- n.triggerResize();
3306
+ e.value && (r.setState(e.value.id, u), We(() => {
3307
+ o.triggerResize();
3275
3308
  }));
3276
- }, Ce = (u) => {
3309
+ }, ke = (u) => {
3277
3310
  e.value && e.value.id && r.updateDashboardLayout(e.value.id, u);
3278
3311
  };
3279
- function ve() {
3312
+ function Se() {
3280
3313
  k.value = !0;
3281
3314
  }
3282
- function _(u = w.CHART) {
3315
+ function G(u = C.CHART) {
3283
3316
  if (!e.value || !e.value.id) return;
3284
- const L = u === w.SECTION_HEADER ? r.addItemToDashboard(e.value.id, u, 0, 0, 20, 1) : r.addItemToDashboard(e.value.id, u);
3285
- k.value = !1, Pe(() => {
3286
- n.dimensionsUpdate(L);
3317
+ const L = u === C.SECTION_HEADER ? r.addItemToDashboard(e.value.id, u, 0, 0, 20, 1) : r.addItemToDashboard(e.value.id, u);
3318
+ k.value = !1, We(() => {
3319
+ o.dimensionsUpdate(L);
3287
3320
  });
3288
3321
  }
3289
- function oe(u) {
3322
+ function re(u) {
3290
3323
  !e.value || !e.value.id || r.updateDashboardTitle(e.value.id, u);
3291
3324
  }
3292
- function ee() {
3325
+ function le() {
3293
3326
  !e.value || !e.value.id || r.clearDashboardItems(e.value.id);
3294
3327
  }
3295
- function te(u) {
3328
+ function X(u) {
3296
3329
  !e.value || !e.value.id || r.removeItemFromDashboard(e.value.id, u);
3297
3330
  }
3298
- function pe(u) {
3331
+ function De(u) {
3299
3332
  !e.value || !e.value.id || r.copyItemInDashboard(e.value.id, u);
3300
3333
  }
3301
- function Me() {
3334
+ function ye() {
3302
3335
  k.value = !1;
3303
3336
  }
3304
- function Re(u) {
3305
- if (C.value = u, !e.value || !e.value.id) return;
3337
+ function Ae(u) {
3338
+ if (b.value = u, !e.value || !e.value.id) return;
3306
3339
  const d = e.value.gridItems[u.i];
3307
- d && (d.type === w.CHART ? D.value = !0 : d.type === w.MARKDOWN ? V.value = !0 : d.type === w.TABLE || d.type === w.FILTER ? D.value = !0 : d.type === w.SECTION_HEADER && (C.value = null));
3340
+ d && (d.type === C.CHART ? I.value = !0 : d.type === C.MARKDOWN ? x.value = !0 : d.type === C.TABLE || d.type === C.FILTER ? I.value = !0 : d.type === C.SECTION_HEADER && (b.value = null));
3308
3341
  }
3309
- function Ae(u) {
3310
- if (!e.value || !e.value.id || !C.value) return;
3311
- const L = C.value.i;
3312
- P(L, e.value.id, { content: u }), W();
3342
+ function qe(u) {
3343
+ if (!e.value || !e.value.id || !b.value) return;
3344
+ const L = b.value.i;
3345
+ A(L, e.value.id, { content: u }), Ie();
3313
3346
  }
3314
- function W() {
3315
- D.value = !1, V.value = !1, C.value = null;
3347
+ function Ie() {
3348
+ I.value = !1, x.value = !1, b.value = null;
3316
3349
  }
3317
- function q(u, L) {
3350
+ function K(u, L) {
3318
3351
  if (L && e.value && e.value.id !== L)
3319
3352
  return {
3320
- type: w.CHART,
3353
+ type: C.CHART,
3321
3354
  content: "",
3322
3355
  structured_content: { markdown: "", query: "" },
3323
3356
  name: `Item ${u}`,
@@ -3331,7 +3364,7 @@ function zi(e, o, n, l) {
3331
3364
  };
3332
3365
  if (!e.value)
3333
3366
  return {
3334
- type: w.CHART,
3367
+ type: C.CHART,
3335
3368
  content: "",
3336
3369
  structured_content: { markdown: "", query: "" },
3337
3370
  name: `Item ${u}`,
@@ -3346,7 +3379,7 @@ function zi(e, o, n, l) {
3346
3379
  const d = e.value.gridItems[u];
3347
3380
  if (!d)
3348
3381
  return {
3349
- type: w.CHART,
3382
+ type: C.CHART,
3350
3383
  content: "",
3351
3384
  structured_content: { markdown: "", query: "" },
3352
3385
  name: `Item ${u}`,
@@ -3359,44 +3392,44 @@ function zi(e, o, n, l) {
3359
3392
  connectionName: e.value.connection || "",
3360
3393
  hasDrilldown: !1
3361
3394
  };
3362
- const x = d.filters || [];
3363
- let ae = x;
3364
- e.value.filter && (x.some(
3365
- (Oe) => {
3366
- var Qe;
3367
- return Oe.source === "global" && Oe.value === ((Qe = e.value) == null ? void 0 : Qe.filter);
3395
+ const H = d.filters || [];
3396
+ let se = H;
3397
+ e.value.filter && (H.some(
3398
+ (Ne) => {
3399
+ var Pe;
3400
+ return Ne.source === "global" && Ne.value === ((Pe = e.value) == null ? void 0 : Pe.filter);
3368
3401
  }
3369
- ) || (ae = [{ value: e.value.filter, source: "global" }, ...x]));
3370
- function qe(Se) {
3371
- return Se && typeof Se == "object" && typeof Se.markdown == "string" && typeof Se.query == "string";
3402
+ ) || (se = [{ value: e.value.filter, source: "global" }, ...H]));
3403
+ function xe(Ee) {
3404
+ return Ee && typeof Ee == "object" && typeof Ee.markdown == "string" && typeof Ee.query == "string";
3372
3405
  }
3373
- let Fe = !1, He = qe(d.content) ? d.content : {
3406
+ let He = !1, Qe = xe(d.content) ? d.content : {
3374
3407
  markdown: d.type === "markdown" ? d.content : "",
3375
3408
  query: d.type !== "markdown" ? d.content : ""
3376
3409
  };
3377
- d.drilldown && (Fe = !0, He = qe(d.drilldown) ? d.drilldown : {
3410
+ d.drilldown && (He = !0, Qe = xe(d.drilldown) ? d.drilldown : {
3378
3411
  markdown: d.type === "markdown" ? d.drilldown : "",
3379
3412
  query: d.type !== "markdown" ? d.drilldown : ""
3380
3413
  });
3381
- let Ve = d.chartConfig;
3382
- return Fe && (Ve = d.drilldownChartConfig || void 0), {
3414
+ let Be = d.chartConfig;
3415
+ return He && (Be = d.drilldownChartConfig || void 0), {
3383
3416
  type: d.type,
3384
3417
  // check if it's MarkdownData, and if so, extract markdown
3385
3418
  //
3386
- content: qe(d.content) ? d.content.markdown : d.content || "",
3419
+ content: xe(d.content) ? d.content.markdown : d.content || "",
3387
3420
  // display the drilldown of set
3388
- structured_content: He,
3421
+ structured_content: Qe,
3389
3422
  name: d.name,
3390
3423
  allowCrossFilter: d.allowCrossFilter !== !1,
3391
3424
  // Default to true if not explicitly false
3392
3425
  width: d.width || 0,
3393
3426
  height: d.height || 0,
3394
- chartConfig: Ve,
3395
- filters: ae,
3427
+ chartConfig: Be,
3428
+ filters: se,
3396
3429
  chartFilters: d.chartFilters || [],
3397
3430
  conceptFilters: d.conceptFilters || [],
3398
3431
  parameters: d.parameters || {},
3399
- onRefresh: ke,
3432
+ onRefresh: oe,
3400
3433
  rootContent: g.value,
3401
3434
  results: d.results || null,
3402
3435
  connectionName: e.value.connection || "",
@@ -3405,10 +3438,10 @@ function zi(e, o, n, l) {
3405
3438
  loading: d.loading || !1,
3406
3439
  loadStartTime: d.loadStartTime || null,
3407
3440
  // Include load start time if available
3408
- hasDrilldown: Fe
3441
+ hasDrilldown: He
3409
3442
  };
3410
3443
  }
3411
- function P(u, L, d) {
3444
+ function A(u, L, d) {
3412
3445
  if (!e.value || !e.value.id) return;
3413
3446
  if (!L || e.value.id !== L) {
3414
3447
  console.warn(
@@ -3419,16 +3452,16 @@ function zi(e, o, n, l) {
3419
3452
  );
3420
3453
  return;
3421
3454
  }
3422
- const x = {};
3423
- if (d.name && (x.name = d.name), d.chartConfig && (x.chartConfig = d.chartConfig), d.content && (x.content = d.content), d.dimensions && (x.layoutDimensions = {
3455
+ const H = {};
3456
+ if (d.name && (H.name = d.name), d.chartConfig && (H.chartConfig = d.chartConfig), d.content && (H.content = d.content), d.dimensions && (H.layoutDimensions = {
3424
3457
  w: d.dimensions.width,
3425
3458
  h: d.dimensions.height
3426
- }), d.width && d.height && (x.width = d.width, x.height = d.height), d.loading !== void 0 && (x.loading = d.loading), d.results !== void 0 && (x.results = d.results), d.error !== void 0 && (x.error = d.error), d.drilldown !== void 0 && (x.drilldown = d.drilldown), d.drilldownChartConfig !== void 0 && (x.drilldownChartConfig = d.drilldownChartConfig), d.allowCrossFilter !== void 0 && (x.allowCrossFilter = d.allowCrossFilter), Object.keys(x).length > 0 && r.updateMultipleItemProperties(e.value.id, u, x), d.content) {
3427
- let ae = le(e.value.id);
3428
- ae == null || ae.runSingle(u);
3459
+ }), d.width && d.height && (H.width = d.width, H.height = d.height), d.loading !== void 0 && (H.loading = d.loading), d.results !== void 0 && (H.results = d.results), d.error !== void 0 && (H.error = d.error), d.drilldown !== void 0 && (H.drilldown = d.drilldown), d.drilldownChartConfig !== void 0 && (H.drilldownChartConfig = d.drilldownChartConfig), d.allowCrossFilter !== void 0 && (H.allowCrossFilter = d.allowCrossFilter), Object.keys(H).length > 0 && r.updateMultipleItemProperties(e.value.id, u, H), d.content) {
3460
+ let se = N(e.value.id);
3461
+ se == null || se.runSingle(u);
3429
3462
  }
3430
3463
  }
3431
- function le(u) {
3464
+ function N(u) {
3432
3465
  if (!e.value || !e.value.id)
3433
3466
  throw new Error("Dashboard not found or not initialized");
3434
3467
  if (!s) throw new Error("Query execution service not found");
@@ -3437,45 +3470,49 @@ function zi(e, o, n, l) {
3437
3470
  queryExecutionService: s,
3438
3471
  connectionName: L.connection,
3439
3472
  dashboardId: u,
3440
- getDashboardData: (x) => r.dashboards[x],
3441
- getItemData: q,
3442
- setItemData: P
3473
+ getDashboardData: (H) => r.dashboards[H],
3474
+ getItemData: K,
3475
+ setItemData: A
3443
3476
  });
3444
3477
  return d || console.warn("No query executor found for dashboard:", e.value.id), d;
3445
3478
  }
3446
- function we(u) {
3447
- var x;
3479
+ function ae(u) {
3480
+ var H;
3448
3481
  const d = u.target.value;
3449
- e.value && e.value.id && (r.updateDashboardConnection(e.value.id, d), (x = r.getQueryExecutor(e.value.id)) == null || x.setConnection(d));
3482
+ e.value && e.value.id && (r.updateDashboardConnection(e.value.id, d), (H = r.getQueryExecutor(e.value.id)) == null || H.setConnection(d));
3450
3483
  }
3451
- function ke(u) {
3484
+ function oe(u) {
3452
3485
  var L, d;
3453
3486
  if (e.value) {
3454
3487
  if (u) {
3455
- (L = r.getQueryExecutor(e.value.id)) == null || L.runSingle(u), n.dimensionsUpdate(u);
3488
+ (L = r.getQueryExecutor(e.value.id)) == null || L.runSingle(u), o.dimensionsUpdate(u);
3456
3489
  return;
3457
3490
  }
3458
3491
  (d = r.getQueryExecutor(e.value.id)) == null || d.runBatch(Object.keys(e.value.gridItems));
3459
3492
  }
3460
3493
  }
3461
- function Ze(u) {
3462
- var ae;
3494
+ function me(u) {
3495
+ var se;
3463
3496
  if (!e.value || !e.value.id) return;
3464
3497
  const L = ft(M.value), d = vt(u.filters, L);
3465
3498
  if (!d || Object.keys(d).length === 0) {
3466
- console.log("No valid filters to apply from cross-filter event, given ", u.filters);
3499
+ console.log(
3500
+ "No valid filters to apply from cross-filter event, given ",
3501
+ u.filters,
3502
+ L
3503
+ );
3467
3504
  return;
3468
3505
  }
3469
- let x = r.updateItemCrossFilters(
3506
+ let H = r.updateItemCrossFilters(
3470
3507
  e.value.id,
3471
3508
  u.source,
3472
3509
  d,
3473
3510
  u.chart,
3474
3511
  u.append ? "append" : "add"
3475
3512
  );
3476
- (ae = r.getQueryExecutor(e.value.id)) == null || ae.runBatch(x);
3513
+ (se = r.getQueryExecutor(e.value.id)) == null || se.runBatch(H);
3477
3514
  }
3478
- function Xe(u, L) {
3515
+ function Fe(u, L) {
3479
3516
  var d;
3480
3517
  !e.value || !e.value.id || (r.removeItemCrossFilter(e.value.id, u, L), (d = r.getQueryExecutor(e.value.id)) == null || d.runSingle(u));
3481
3518
  }
@@ -3491,58 +3528,58 @@ function zi(e, o, n, l) {
3491
3528
  return {
3492
3529
  // State
3493
3530
  dashboard: e,
3494
- layout: H,
3495
- sortedLayout: K,
3531
+ layout: O,
3532
+ sortedLayout: W,
3496
3533
  editMode: $,
3497
- selectedConnection: O,
3534
+ selectedConnection: V,
3498
3535
  filter: c,
3499
3536
  filterError: v,
3500
3537
  globalCompletion: M,
3501
3538
  showAddItemModal: k,
3502
- showQueryEditor: D,
3503
- showMarkdownEditor: V,
3504
- editingItem: C,
3539
+ showQueryEditor: I,
3540
+ showMarkdownEditor: x,
3541
+ editingItem: b,
3505
3542
  dashboardMaxWidth: T,
3506
3543
  rootContent: g,
3507
3544
  // Methods
3508
- handleFilterChange: h,
3509
- handleFilterClear: b,
3510
- handleImportChange: re,
3511
- validateFilter: I,
3512
- onConnectionChange: we,
3545
+ handleFilterChange: m,
3546
+ handleFilterClear: E,
3547
+ handleImportChange: ne,
3548
+ validateFilter: D,
3549
+ onConnectionChange: ae,
3513
3550
  toggleMode: U,
3514
- onLayoutUpdated: Ce,
3515
- openAddItemModal: ve,
3516
- addItem: _,
3517
- clearItems: ee,
3518
- removeItem: te,
3519
- copyItem: pe,
3520
- closeAddModal: Me,
3521
- openEditor: Re,
3522
- saveContent: Ae,
3523
- closeEditors: W,
3524
- getDashboardQueryExecutor: le,
3525
- getItemData: q,
3526
- setItemData: P,
3527
- handleRefresh: ke,
3528
- setCrossFilter: Ze,
3529
- removeFilter: Xe,
3551
+ onLayoutUpdated: ke,
3552
+ openAddItemModal: Se,
3553
+ addItem: G,
3554
+ clearItems: le,
3555
+ removeItem: X,
3556
+ copyItem: De,
3557
+ closeAddModal: ye,
3558
+ openEditor: Ae,
3559
+ saveContent: qe,
3560
+ closeEditors: Ie,
3561
+ getDashboardQueryExecutor: N,
3562
+ getItemData: K,
3563
+ setItemData: A,
3564
+ handleRefresh: oe,
3565
+ setCrossFilter: me,
3566
+ removeFilter: Fe,
3530
3567
  unSelect: et,
3531
3568
  dashboardCreated: tt,
3532
- updateTitle: oe
3569
+ updateTitle: re
3533
3570
  };
3534
3571
  }
3535
3572
  export {
3536
- ji as C,
3537
- Ki as D,
3573
+ _i as C,
3574
+ Wi as D,
3538
3575
  Gi as M,
3539
- _i as _,
3540
- Wi as a,
3541
- Ui as b,
3542
- En as c,
3543
- An as d,
3544
- Un as e,
3545
- $n as f,
3546
- Nn as g,
3547
- zi as u
3576
+ zi as _,
3577
+ Ui as a,
3578
+ ji as b,
3579
+ Do as c,
3580
+ Ao as d,
3581
+ Uo as e,
3582
+ $o as f,
3583
+ No as g,
3584
+ Ji as u
3548
3585
  };