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

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