@trilogy-data/trilogy-studio-components 0.1.4 → 0.1.5

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 (134) hide show
  1. package/dist/{ChatCreatorModal-CIwitCJr.js → ChatCreatorModal-BdUJ9uoW.js} +1 -1
  2. package/dist/{Dashboard-D3jI63BM.js → Dashboard-BGpN0Ixs.js} +3 -3
  3. package/dist/{DashboardCreatorInline-BVr9jK0d.js → DashboardCreatorInline-CZQ5JsIB.js} +1 -1
  4. package/dist/{DashboardMobile-CZfQYJND.js → DashboardMobile-leXuc7Vi.js} +18 -18
  5. package/dist/{LLMConnectionList-1HRJp3QF.js → LLMConnectionList-BfseODm5.js} +115 -115
  6. package/dist/{LLMView-CSLjYSdW.js → LLMView-CkW6UDnK.js} +9 -9
  7. package/dist/Manager-sE56hYtJ.js +4 -0
  8. package/dist/ResultComponent-CcThUn60.js +271 -0
  9. package/dist/{Sidebar-CLZWmBSc.js → Sidebar-gsKRqjCv.js} +3 -3
  10. package/dist/{TutorialPage-DC3pNBJ-.js → TutorialPage-DEOrK1-3.js} +4 -4
  11. package/dist/{WelcomePage-CzoMUeo0.js → WelcomePage-DhWLhWSJ.js} +5 -5
  12. package/dist/chats/chat.d.ts +11 -3
  13. package/dist/chats/chat.d.ts.map +1 -1
  14. package/dist/components/SimpleEditor.vue.d.ts.map +1 -1
  15. package/dist/components/StatusIcon.vue.d.ts +1 -1
  16. package/dist/components/StatusIcon.vue.d.ts.map +1 -1
  17. package/dist/components/VegaLiteChart.vue.d.ts +1 -1
  18. package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
  19. package/dist/components/dashboard/DashboardChart.vue.d.ts +1 -1
  20. package/dist/components/dashboard/DashboardHeader.vue.d.ts +2 -2
  21. package/dist/components/editor/Editor.vue.d.ts +72 -0
  22. package/dist/components/editor/Editor.vue.d.ts.map +1 -1
  23. package/dist/components/editor/ResultComponent.vue.d.ts +3885 -385
  24. package/dist/components/editor/ResultComponent.vue.d.ts.map +1 -1
  25. package/dist/components/editor/Results.vue.d.ts +33 -15
  26. package/dist/components/editor/Results.vue.d.ts.map +1 -1
  27. package/dist/components/layout/TabbedBrowser.vue.d.ts +15 -3
  28. package/dist/components/layout/TabbedBrowser.vue.d.ts.map +1 -1
  29. package/dist/components/llm/ChatArtifact.vue.d.ts +2 -2
  30. package/dist/components/llm/LLMChat.vue.d.ts +95 -23
  31. package/dist/components/llm/LLMChat.vue.d.ts.map +1 -1
  32. package/dist/components/llm/LLMChatSplitView.vue.d.ts +565 -110
  33. package/dist/components/llm/LLMChatSplitView.vue.d.ts.map +1 -1
  34. package/dist/components/llm/LLMEditorRefinement.vue.d.ts +2079 -0
  35. package/dist/components/llm/LLMEditorRefinement.vue.d.ts.map +1 -0
  36. package/dist/components/llm/LLMValidationView.vue.d.ts +20 -0
  37. package/dist/components/llm/LLMValidationView.vue.d.ts.map +1 -1
  38. package/dist/components/llm/index.d.ts +1 -1
  39. package/dist/components/llm/index.d.ts.map +1 -1
  40. package/dist/components/model/ModelCard.vue.d.ts +143 -0
  41. package/dist/components/model/ModelCard.vue.d.ts.map +1 -1
  42. package/dist/components/sidebar/ConnectionList.vue.d.ts +71 -0
  43. package/dist/components/sidebar/ConnectionList.vue.d.ts.map +1 -1
  44. package/dist/components/sidebar/EditorList.vue.d.ts +71 -0
  45. package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
  46. package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts.map +1 -1
  47. package/dist/components/sidebar/LLMConnectionList.vue.d.ts +4 -3
  48. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
  49. package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts.map +1 -1
  50. package/dist/components/sidebar/LLMProviderIcon.vue.d.ts.map +1 -1
  51. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3962 -321
  52. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
  53. package/dist/composables/useChatWithTools.d.ts.map +1 -1
  54. package/dist/composables/useEditorRefinement.d.ts +60 -0
  55. package/dist/composables/useEditorRefinement.d.ts.map +1 -0
  56. package/dist/composables/useToolLoop.d.ts +41 -0
  57. package/dist/composables/useToolLoop.d.ts.map +1 -0
  58. package/dist/{cssMode-BkaQoZFt.js → cssMode-BqpD-bsS.js} +1 -1
  59. package/dist/dashboards/helpers.d.ts +1 -0
  60. package/dist/dashboards/helpers.d.ts.map +1 -1
  61. package/dist/data/githubStorage.d.ts.map +1 -1
  62. package/dist/data/localStorage.d.ts.map +1 -1
  63. package/dist/editors/editor.d.ts +33 -4
  64. package/dist/editors/editor.d.ts.map +1 -1
  65. package/dist/editors/results.d.ts.map +1 -1
  66. package/dist/{freemarker2-CNS10-fC.js → freemarker2-3f3Yc8DD.js} +1 -1
  67. package/dist/{handlebars-p2RiA3nK.js → handlebars-BOGnwoZY.js} +1 -1
  68. package/dist/{html-DPuxm26R.js → html-kwxiJtb9.js} +1 -1
  69. package/dist/{htmlMode-n-1DOFL9.js → htmlMode-BSQWll85.js} +1 -1
  70. package/dist/{javascript-DZ2T7Nqs.js → javascript-Cw2M92n9.js} +1 -1
  71. package/dist/{jsonMode-i7Kirheh.js → jsonMode-Cj3eACe9.js} +1 -1
  72. package/dist/{liquid-hX1l2fnN.js → liquid-D_YCsjzx.js} +1 -1
  73. package/dist/llm/anthropic.d.ts +28 -0
  74. package/dist/llm/anthropic.d.ts.map +1 -1
  75. package/dist/llm/base.d.ts +30 -1
  76. package/dist/llm/base.d.ts.map +1 -1
  77. package/dist/llm/chatAgentPrompt.d.ts +65 -78
  78. package/dist/llm/chatAgentPrompt.d.ts.map +1 -1
  79. package/dist/llm/chatHelpers.d.ts.map +1 -1
  80. package/dist/llm/consts.d.ts +1 -1
  81. package/dist/llm/data/constants.d.ts +1 -1
  82. package/dist/llm/data/constants.d.ts.map +1 -1
  83. package/dist/llm/data/prompts.d.ts.map +1 -1
  84. package/dist/llm/editorRefinementToolExecutor.d.ts +67 -0
  85. package/dist/llm/editorRefinementToolExecutor.d.ts.map +1 -0
  86. package/dist/llm/editorRefinementTools.d.ts +185 -0
  87. package/dist/llm/editorRefinementTools.d.ts.map +1 -0
  88. package/dist/llm/googlev2.d.ts +29 -1
  89. package/dist/llm/googlev2.d.ts.map +1 -1
  90. package/dist/llm/index.d.ts +5 -3
  91. package/dist/llm/index.d.ts.map +1 -1
  92. package/dist/llm/models.d.ts +1 -7
  93. package/dist/llm/models.d.ts.map +1 -1
  94. package/dist/llm/openai.d.ts +41 -0
  95. package/dist/llm/openai.d.ts.map +1 -0
  96. package/dist/llm/sharedToolSchemas.d.ts +93 -0
  97. package/dist/llm/sharedToolSchemas.d.ts.map +1 -0
  98. package/dist/llm/toolLoopCore.d.ts +67 -0
  99. package/dist/llm/toolLoopCore.d.ts.map +1 -0
  100. package/dist/llm/utils.d.ts +5 -1
  101. package/dist/llm/utils.d.ts.map +1 -1
  102. package/dist/{main-Dd5lVGEz.js → main-CMnVPECM.js} +34067 -32789
  103. package/dist/main.css +1 -1
  104. package/dist/main.js +1 -1
  105. package/dist/main.umd.cjs +664 -594
  106. package/dist/{mdx-Cd5SqFY2.js → mdx-D1QYgPt9.js} +1 -1
  107. package/dist/{python-B4N2TTBz.js → python-Bd7oj_ae.js} +1 -1
  108. package/dist/{razor-VmL1UHQI.js → razor-B-2sUawM.js} +1 -1
  109. package/dist/stores/Manager.vue.d.ts.map +1 -1
  110. package/dist/stores/chatStore.d.ts +3 -0
  111. package/dist/stores/chatStore.d.ts.map +1 -1
  112. package/dist/stores/editorStore.d.ts +119 -3
  113. package/dist/stores/editorStore.d.ts.map +1 -1
  114. package/dist/stores/llmStore.d.ts.map +1 -1
  115. package/dist/{tsMode-COLogGl9.js → tsMode-Ba44DEjT.js} +1 -1
  116. package/dist/{typescript-CvklvdUQ.js → typescript-DV6B_8EM.js} +1 -1
  117. package/dist/{useDashboard-DwNI2E0x.js → useDashboard-DyjtNooA.js} +136 -136
  118. package/dist/views/LLMView.vue.d.ts +2509 -412
  119. package/dist/views/LLMView.vue.d.ts.map +1 -1
  120. package/dist/views/ModelView.vue.d.ts +286 -0
  121. package/dist/views/ModelView.vue.d.ts.map +1 -1
  122. package/dist/views/TutorialPage.vue.d.ts +9597 -2029
  123. package/dist/views/TutorialPage.vue.d.ts.map +1 -1
  124. package/dist/{xml-D_weTR40.js → xml-7ZhThnGO.js} +1 -1
  125. package/dist/{yaml-BKP5OwFJ.js → yaml-ngaWkYBh.js} +1 -1
  126. package/package.json +1 -1
  127. package/dist/Manager-DZQXeAg1.js +0 -4
  128. package/dist/ResultComponent-JonPxGw9.js +0 -155
  129. package/dist/components/llm/LLMChatRefinement.vue.d.ts +0 -135
  130. package/dist/components/llm/LLMChatRefinement.vue.d.ts.map +0 -1
  131. package/dist/llm/mistral.d.ts +0 -12
  132. package/dist/llm/mistral.d.ts.map +0 -1
  133. package/dist/llm/openAI.d.ts +0 -13
  134. package/dist/llm/openAI.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as X, ref as b, watch as ne, createElementBlock as p, createCommentVNode as R, openBlock as m, createElementVNode as t, toDisplayString as N, computed as C, onMounted as pe, onBeforeUnmount as We, normalizeStyle as Ie, Fragment as ce, renderList as we, normalizeClass as H, createTextVNode as G, createBlock as Z, unref as Y, createVNode as z, withCtx as ie, withDirectives as te, withKeys as Ce, vModelText as ye, onUnmounted as $e, inject as j, resolveComponent as J, Teleport as Ue, withModifiers as Pe, createStaticVNode as rt, resolveDynamicComponent as lt, nextTick as Ae, vModelRadio as Te, vShow as at } from "vue";
2
- import { a as ee, N as st, T as ke, P as je, Q as ze, u as Ge, B as ut, L as dt, U as ct, x as De, w as Le, V as mt, W as ht, M as ft, X as vt, Y as de, J as $, Z as Ee, $ as ae, a0 as ve, a1 as yt, a2 as pt, a3 as Ne, a4 as gt, a5 as Ye, a6 as Je, r as bt, a7 as Ke } from "./main-Dd5lVGEz.js";
2
+ import { a as ee, I as st, T as ke, J as je, N as ze, u as Ge, y as ut, L as dt, P as ct, v as De, Q as Le, V as mt, U as ht, M as ft, W as vt, X as de, F as $, Y as Ee, Z as ae, $ as ve, a0 as yt, a1 as pt, a2 as Ne, a3 as gt, a4 as Ye, a5 as Je, q as bt, a6 as Ke } from "./main-CMnVPECM.js";
3
3
  const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class: "json-container" }, It = { "data-testid": "dashboard-json" }, Dt = { class: "popup-footer" }, St = /* @__PURE__ */ X({
4
4
  __name: "DashboardSharePopup",
5
5
  props: {
@@ -34,7 +34,7 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
34
34
  },
35
35
  { immediate: !0 }
36
36
  );
37
- const r = b(!1), h = () => {
37
+ const r = b(!1), f = () => {
38
38
  navigator.clipboard.writeText(i.value).then(() => {
39
39
  r.value = !0, setTimeout(() => {
40
40
  r.value = !1;
@@ -42,8 +42,8 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
42
42
  }).catch((y) => {
43
43
  console.error("Could not copy text: ", y);
44
44
  });
45
- }, f = b(null), v = (y) => {
46
- f.value && !f.value.contains(y.target) && a("close");
45
+ }, h = b(null), v = (y) => {
46
+ h.value && !h.value.contains(y.target) && a("close");
47
47
  };
48
48
  return (y, g) => e.isOpen ? (m(), p("div", {
49
49
  key: 0,
@@ -53,7 +53,7 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
53
53
  t("div", {
54
54
  class: "popup-content",
55
55
  ref_key: "popupContent",
56
- ref: f,
56
+ ref: h,
57
57
  "data-testid": "dashboard-share-popup"
58
58
  }, [
59
59
  t("div", Ct, [
@@ -71,7 +71,7 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
71
71
  ]),
72
72
  t("div", Dt, [
73
73
  t("button", {
74
- onClick: h,
74
+ onClick: f,
75
75
  class: "dashboard-copy-button",
76
76
  "data-testid": "copy-json-button"
77
77
  }, N(r.value ? "Copied!" : "Copy"), 1)
@@ -97,7 +97,7 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
97
97
  },
98
98
  emits: ["select-completion"],
99
99
  setup(e, { emit: o }) {
100
- const n = e, a = o, i = b(!1), l = b(0), r = b(0), h = b(""), f = b(0), v = b(null), y = C(() => {
100
+ const n = e, a = o, i = b(!1), l = b(0), r = b(0), f = b(""), h = b(0), v = b(null), y = C(() => {
101
101
  if (!n.inputElement) return {};
102
102
  const E = n.inputElement.getBoundingClientRect();
103
103
  return {
@@ -116,10 +116,10 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
116
116
  let I = r.value;
117
117
  for (; I < E.length && !/\s/.test(E.charAt(I)); )
118
118
  I++;
119
- f.value = M, h.value = E.substring(M, I);
119
+ h.value = M, f.value = E.substring(M, I);
120
120
  }, k = C(() => {
121
- if (!h.value.trim()) return [];
122
- const E = h.value.toLowerCase();
121
+ if (!f.value.trim()) return [];
122
+ const E = f.value.toLowerCase();
123
123
  return n.completionItems.filter((M) => M.label.toLowerCase().includes(E)).sort((M, I) => {
124
124
  const B = M.label.toLowerCase().startsWith(E), x = I.label.toLowerCase().startsWith(E);
125
125
  return B && !x ? -1 : !B && x ? 1 : M.label.localeCompare(I.label);
@@ -129,10 +129,10 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
129
129
  i.value = E.length > 0, l.value = 0;
130
130
  });
131
131
  const T = (E) => {
132
- const M = n.inputValue.substring(0, f.value), I = n.inputValue.substring(r.value);
132
+ const M = n.inputValue.substring(0, h.value), I = n.inputValue.substring(r.value);
133
133
  a("select-completion", {
134
134
  text: M + E.label + I,
135
- cursorPosition: f.value + E.label.length
135
+ cursorPosition: h.value + E.label.length
136
136
  }), i.value = !1;
137
137
  }, F = (E) => {
138
138
  v.value && !v.value.contains(E.target) && n.inputElement !== E.target && (i.value = !1);
@@ -219,25 +219,25 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
219
219
  },
220
220
  emits: ["filter-change", "filter-apply", "clear-filter"],
221
221
  setup(e, { emit: o }) {
222
- const n = e, a = o, i = st(), l = b(n.isLoading), r = b(null), h = b(null), f = b(n.filterValue || ""), v = b(!1), y = b(!1), g = C(() => f.value.replace(/\n/g, " ")), k = C(() => !0);
222
+ const n = e, a = o, i = st(), l = b(n.isLoading), r = b(null), f = b(null), h = b(n.filterValue || ""), v = b(!1), y = b(!1), g = C(() => h.value.replace(/\n/g, " ")), k = C(() => !0);
223
223
  function T() {
224
- a("filter-apply", f.value), v.value = !1, M();
224
+ a("filter-apply", h.value), v.value = !1, M();
225
225
  }
226
226
  function F() {
227
- f.value = "", v.value = !0, a("filter-change", ""), a("filter-apply", ""), a("clear-filter", ""), setTimeout(() => {
228
- h.value && h.value.focus();
227
+ h.value = "", v.value = !0, a("filter-change", ""), a("filter-apply", ""), a("clear-filter", ""), setTimeout(() => {
228
+ f.value && f.value.focus();
229
229
  }, 0);
230
230
  }
231
231
  function _(w) {
232
232
  const u = w.target;
233
- f.value = u.value, v.value = !0, a("filter-change", f.value);
233
+ h.value = u.value, v.value = !0, a("filter-change", h.value);
234
234
  }
235
235
  function E() {
236
236
  y.value = !0, setTimeout(() => {
237
- if (h.value) {
238
- h.value.focus();
239
- const w = f.value.length;
240
- h.value.setSelectionRange(w, w);
237
+ if (f.value) {
238
+ f.value.focus();
239
+ const w = h.value.length;
240
+ f.value.setSelectionRange(w, w);
241
241
  }
242
242
  }, 0);
243
243
  }
@@ -255,8 +255,8 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
255
255
  type: u.datatype,
256
256
  description: u.description
257
257
  }));
258
- i.generateFilterQuery(f.value, w, n.validateFilter).then((u) => {
259
- u && u.length > 0 && (f.value = u.replace(/^\s*where\s+/i, ""), v.value = !0, a("filter-apply", f.value)), l.value = !1;
258
+ i.generateFilterQuery(h.value, w, n.validateFilter).then((u) => {
259
+ u && u.length > 0 && (h.value = u.replace(/^\s*where\s+/i, ""), v.value = !0, a("filter-apply", h.value)), l.value = !1;
260
260
  }).catch(() => {
261
261
  l.value = !1;
262
262
  });
@@ -267,16 +267,16 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
267
267
  function A(w) {
268
268
  (w.ctrlKey || w.metaKey) && w.key === "Enter" && !w.shiftKey ? (w.preventDefault(), T()) : (w.ctrlKey || w.metaKey) && w.shiftKey && w.key === "Enter" ? (w.preventDefault(), B()) : w.key === "Escape" && (w.preventDefault(), M());
269
269
  }
270
- const D = C(() => (n.filterError || "").length > 0 ? "error" : f.value ? "valid" : "neutral");
270
+ const D = C(() => (n.filterError || "").length > 0 ? "error" : h.value ? "valid" : "neutral");
271
271
  function U(w) {
272
- f.value = w.text, v.value = !0, a("filter-change", f.value);
273
- const u = y.value ? h.value : r.value;
272
+ h.value = w.text, v.value = !0, a("filter-change", h.value);
273
+ const u = y.value ? f.value : r.value;
274
274
  u && (u.focus(), u.setSelectionRange(w.cursorPosition, w.cursorPosition));
275
275
  }
276
276
  return ne(
277
277
  () => n.filterValue,
278
278
  (w) => {
279
- w !== f.value && (f.value = w || "", v.value = !1);
279
+ w !== h.value && (h.value = w || "", v.value = !1);
280
280
  }
281
281
  ), ne(
282
282
  () => n.isLoading,
@@ -314,9 +314,9 @@ const Ct = { class: "popup-header" }, wt = { class: "popup-body" }, kt = { class
314
314
  ]),
315
315
  t("textarea", {
316
316
  ref_key: "filterTextareaRef",
317
- ref: h,
317
+ ref: f,
318
318
  class: H(["filter-textarea", { "filter-error": D.value === "error" }]),
319
- value: f.value,
319
+ value: h.value,
320
320
  onInput: _,
321
321
  onKeydown: A,
322
322
  placeholder: Y(i).hasActiveDefaultConnection ? `Use a SQL condition (ex color='blue' or color='red') or text to filter.
@@ -365,11 +365,11 @@ Use Ctrl+Enter to apply`,
365
365
  ])], 8, Kt)
366
366
  ])
367
367
  ])) : R("", !0),
368
- (y.value ? h.value : r.value) ? (m(), Z(At, {
368
+ (y.value ? f.value : r.value) ? (m(), Z(At, {
369
369
  key: 1,
370
- "input-value": f.value,
370
+ "input-value": h.value,
371
371
  "completion-items": e.globalCompletion,
372
- "input-element": y.value ? h.value : r.value,
372
+ "input-element": y.value ? f.value : r.value,
373
373
  onSelectCompletion: U
374
374
  }, null, 8, ["input-value", "completion-items", "input-element"])) : R("", !0),
375
375
  t("button", {
@@ -532,12 +532,12 @@ Use Ctrl+Enter to apply`,
532
532
  "export-image"
533
533
  ],
534
534
  setup(e, { emit: o }) {
535
- const n = e, a = o, i = je(), l = ze(), r = Ge(), h = b(!1), f = b(!1), v = b(!1), y = b(""), g = b(null);
535
+ const n = e, a = o, i = je(), l = ze(), r = Ge(), f = b(!1), h = b(!1), v = b(!1), y = b(""), g = b(null);
536
536
  function k() {
537
- f.value = !f.value;
537
+ h.value = !h.value;
538
538
  }
539
539
  function T() {
540
- f.value = !1;
540
+ h.value = !1;
541
541
  }
542
542
  function F(u) {
543
543
  a("filter-change", u);
@@ -684,7 +684,7 @@ Use Ctrl+Enter to apply`,
684
684
  z(tn, {
685
685
  "filter-value": ((Q = e.dashboard) == null ? void 0 : Q.filter) || "",
686
686
  "filter-error": e.filterError,
687
- "is-loading": h.value,
687
+ "is-loading": f.value,
688
688
  "global-completion": e.globalCompletion,
689
689
  "validate-filter": e.validateFilter,
690
690
  onFilterApply: F,
@@ -745,7 +745,7 @@ Use Ctrl+Enter to apply`,
745
745
  ]),
746
746
  z(Tt, {
747
747
  dashboard: e.dashboard,
748
- "is-open": f.value,
748
+ "is-open": h.value,
749
749
  onClose: T
750
750
  }, null, 8, ["dashboard", "is-open"])
751
751
  ]);
@@ -792,7 +792,7 @@ Use Ctrl+Enter to apply`,
792
792
  }
793
793
  },
794
794
  setup(e, { emit: o }) {
795
- const n = b(!1), a = b(null), i = b(null), l = b(!1), r = b(null), h = b(null), f = C(() => e.getItemData(e.itemId, e.dashboardId)), v = () => {
795
+ const n = b(!1), a = b(null), i = b(null), l = b(!1), r = b(null), f = b(null), h = C(() => e.getItemData(e.itemId, e.dashboardId)), v = () => {
796
796
  if (!a.value) return 0;
797
797
  const W = a.value.getBoundingClientRect(), oe = window.scrollY || document.documentElement.scrollTop, se = W.top + oe, fe = Math.floor(se / 200) * 10;
798
798
  return Math.min(fe, 100);
@@ -807,7 +807,7 @@ Use Ctrl+Enter to apply`,
807
807
  }), $e(() => {
808
808
  r.value && (clearTimeout(r.value), r.value = null);
809
809
  });
810
- const y = C(() => f.value.structured_content.query), g = C(() => f.value.results || null), k = C(() => f.value.name || ""), T = C(() => (f.value.height || 300) - 75), F = C(() => f.value.width || 300), _ = C(() => f.value.chartConfig || null), E = C(() => f.value.loading || !1), M = C(() => f.value.error || null), I = C(() => f.value.loadStartTime || null), B = C(() => (f.value.chartFilters || []).map((W) => W.value)), x = C(() => f.value.hasDrilldown), A = C(() => f.value.onRefresh || null);
810
+ const y = C(() => h.value.structured_content.query), g = C(() => h.value.results || null), k = C(() => h.value.name || ""), T = C(() => (h.value.height || 300) - 75), F = C(() => h.value.width || 300), _ = C(() => h.value.chartConfig || null), E = C(() => h.value.loading || !1), M = C(() => h.value.error || null), I = C(() => h.value.loadStartTime || null), B = C(() => (h.value.chartFilters || []).map((W) => W.value)), x = C(() => h.value.hasDrilldown), A = C(() => h.value.onRefresh || null);
811
811
  ne(
812
812
  E,
813
813
  (W, oe) => {
@@ -854,7 +854,7 @@ Use Ctrl+Enter to apply`,
854
854
  o("background-click");
855
855
  }, Q = (W) => {
856
856
  let oe = W.filters, se = Object.keys(oe)[0], fe = ht(W.filters);
857
- se && (h.value = { remove: se, filter: fe });
857
+ se && (f.value = { remove: se, filter: fe });
858
858
  }, K = async () => {
859
859
  e.setItemData(e.itemId, e.dashboardId, {
860
860
  drilldown: null,
@@ -865,14 +865,14 @@ Use Ctrl+Enter to apply`,
865
865
  let se = await e.getDashboardQueryExecutor(e.dashboardId).createDrilldownQuery(
866
866
  y.value,
867
867
  W,
868
- h.value.remove,
869
- h.value.filter
868
+ f.value.remove,
869
+ f.value.filter
870
870
  );
871
871
  e.setItemData(e.itemId, e.dashboardId, {
872
872
  drilldown: se,
873
873
  drilldownChartConfig: null,
874
874
  loading: !0
875
- }), n.value = !1, l.value = !0, h.value = null, await u().then(() => {
875
+ }), n.value = !1, l.value = !0, f.value = null, await u().then(() => {
876
876
  n.value = !0;
877
877
  }).catch((fe) => {
878
878
  console.error("Error executing drilldown query:", fe), n.value = !0;
@@ -899,7 +899,7 @@ Use Ctrl+Enter to apply`,
899
899
  startTime: I,
900
900
  handleDimensionClick: S,
901
901
  handleBackgroundClick: L,
902
- activeDrilldown: h,
902
+ activeDrilldown: f,
903
903
  activateDrilldown: Q,
904
904
  submitDrilldown: me,
905
905
  controlsVisible: he,
@@ -918,7 +918,7 @@ Use Ctrl+Enter to apply`,
918
918
  class: "loading-overlay"
919
919
  };
920
920
  function In(e, o, n, a, i, l) {
921
- const r = J("drilldown-pane"), h = J("ErrorMessage"), f = J("VegaLiteChart"), v = J("LoadingView");
921
+ const r = J("drilldown-pane"), f = J("ErrorMessage"), h = J("VegaLiteChart"), v = J("LoadingView");
922
922
  return m(), p("div", {
923
923
  ref: "chartContainer",
924
924
  class: H(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
@@ -932,7 +932,7 @@ function In(e, o, n, a, i, l) {
932
932
  onClose: o[0] || (o[0] = (y) => e.activeDrilldown = null),
933
933
  symbols: e.symbols,
934
934
  onSubmit: e.submitDrilldown
935
- }, null, 8, ["drilldown-remove", "drilldown-filter", "symbols", "onSubmit"])) : e.error && !e.loading ? (m(), Z(h, {
935
+ }, null, 8, ["drilldown-remove", "drilldown-filter", "symbols", "onSubmit"])) : e.error && !e.loading ? (m(), Z(f, {
936
936
  key: 1,
937
937
  class: "chart-placeholder"
938
938
  }, {
@@ -940,7 +940,7 @@ function In(e, o, n, a, i, l) {
940
940
  G(N(e.error), 1)
941
941
  ]),
942
942
  _: 1
943
- })) : e.results && e.ready && !e.loading ? (m(), Z(f, {
943
+ })) : e.results && e.ready && !e.loading ? (m(), Z(h, {
944
944
  key: 2,
945
945
  id: `${e.itemId}-${e.dashboardId}`,
946
946
  columns: e.results.headers,
@@ -1028,20 +1028,20 @@ const Dn = /* @__PURE__ */ ee(wn, [["render", In], ["__scopeId", "data-v-973d480
1028
1028
  i.value = !0;
1029
1029
  }, r = () => {
1030
1030
  i.value = !1;
1031
- }, h = () => {
1031
+ }, f = () => {
1032
1032
  if (!n.value) return 0;
1033
1033
  const x = n.value.getBoundingClientRect(), A = window.scrollY || document.documentElement.scrollTop, D = x.top + A, U = Math.floor(D / 200) * 10;
1034
1034
  return Math.min(U, 100);
1035
1035
  };
1036
1036
  pe(() => {
1037
1037
  setTimeout(() => {
1038
- const x = h();
1038
+ const x = f();
1039
1039
  g.value ? setTimeout(() => {
1040
1040
  o.value = !0;
1041
1041
  }, x) : o.value = !0;
1042
1042
  }, 0);
1043
1043
  });
1044
- const f = C(() => e.getItemData(e.itemId, e.dashboardId).structured_content || { markdown: "", query: "" }), v = C(() => f.value.markdown || ""), y = C(() => f.value.query || ""), g = C(() => e.getItemData(e.itemId, e.dashboardId).results || null), k = C(() => e.getItemData(e.itemId, e.dashboardId).loading || !1), T = C(() => e.getItemData(e.itemId, e.dashboardId).error || null), F = C(() => e.getItemData(e.itemId, e.dashboardId).loadStartTime || null), _ = C(() => e.getItemData(e.itemId, e.dashboardId).onRefresh || null), E = j("connectionStore"), M = j("analyticsStore");
1044
+ const h = C(() => e.getItemData(e.itemId, e.dashboardId).structured_content || { markdown: "", query: "" }), v = C(() => h.value.markdown || ""), y = C(() => h.value.query || ""), g = C(() => e.getItemData(e.itemId, e.dashboardId).results || null), k = C(() => e.getItemData(e.itemId, e.dashboardId).loading || !1), T = C(() => e.getItemData(e.itemId, e.dashboardId).error || null), F = C(() => e.getItemData(e.itemId, e.dashboardId).loadStartTime || null), _ = C(() => e.getItemData(e.itemId, e.dashboardId).onRefresh || null), E = j("connectionStore"), M = j("analyticsStore");
1045
1045
  if (!E)
1046
1046
  throw new Error("Connection store not found!");
1047
1047
  const I = async () => {
@@ -1078,12 +1078,12 @@ const Dn = /* @__PURE__ */ ee(wn, [["render", In], ["__scopeId", "data-v-973d480
1078
1078
  }
1079
1079
  });
1080
1080
  function Tn(e, o, n, a, i, l) {
1081
- const r = J("ErrorMessage"), h = J("MarkdownRenderer");
1081
+ const r = J("ErrorMessage"), f = J("MarkdownRenderer");
1082
1082
  return m(), p("div", {
1083
1083
  ref: "chartContainer",
1084
1084
  class: H(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
1085
- onMouseenter: o[1] || (o[1] = (...f) => e.onChartMouseEnter && e.onChartMouseEnter(...f)),
1086
- onMouseleave: o[2] || (o[2] = (...f) => e.onChartMouseLeave && e.onChartMouseLeave(...f))
1085
+ onMouseenter: o[1] || (o[1] = (...h) => e.onChartMouseEnter && e.onChartMouseEnter(...h)),
1086
+ onMouseleave: o[2] || (o[2] = (...h) => e.onChartMouseLeave && e.onChartMouseLeave(...h))
1087
1087
  }, [
1088
1088
  e.error && !e.loading ? (m(), Z(r, {
1089
1089
  key: 0,
@@ -1093,7 +1093,7 @@ function Tn(e, o, n, a, i, l) {
1093
1093
  G(N(e.error), 1)
1094
1094
  ]),
1095
1095
  _: 1
1096
- })) : e.ready ? (m(), Z(h, {
1096
+ })) : e.ready ? (m(), Z(f, {
1097
1097
  key: 1,
1098
1098
  markdown: e.markdown,
1099
1099
  results: e.results,
@@ -1104,7 +1104,7 @@ function Tn(e, o, n, a, i, l) {
1104
1104
  class: H(["controls-toggle", { "controls-visible": e.controlsVisible }])
1105
1105
  }, [
1106
1106
  t("button", {
1107
- onClick: o[0] || (o[0] = (...f) => e.handleLocalRefresh && e.handleLocalRefresh(...f)),
1107
+ onClick: o[0] || (o[0] = (...h) => e.handleLocalRefresh && e.handleLocalRefresh(...h)),
1108
1108
  class: "control-btn",
1109
1109
  "data-testid": "refresh-chart-btn",
1110
1110
  title: "Refresh text"
@@ -1150,10 +1150,10 @@ const En = /* @__PURE__ */ ee(Sn, [["render", Tn], ["__scopeId", "data-v-b4abaf1
1150
1150
  }
1151
1151
  },
1152
1152
  setup(e, { emit: o }) {
1153
- const n = b(!1), a = b(null), i = b(null), l = b(!1), r = b(null), h = b(!1), f = () => {
1154
- h.value = !0;
1153
+ const n = b(!1), a = b(null), i = b(null), l = b(!1), r = b(null), f = b(!1), h = () => {
1154
+ f.value = !0;
1155
1155
  }, v = () => {
1156
- h.value = !1;
1156
+ f.value = !1;
1157
1157
  }, y = () => {
1158
1158
  if (!a.value) return 0;
1159
1159
  const d = a.value.getBoundingClientRect(), S = window.scrollY || document.documentElement.scrollTop, L = d.top + S, Q = Math.floor(L / 200) * 10;
@@ -1222,8 +1222,8 @@ const En = /* @__PURE__ */ ee(Sn, [["render", Tn], ["__scopeId", "data-v-b4abaf1
1222
1222
  handleBackgroundClick: () => {
1223
1223
  o("background-click");
1224
1224
  },
1225
- controlsVisible: h,
1226
- onChartMouseEnter: f,
1225
+ controlsVisible: f,
1226
+ onChartMouseEnter: h,
1227
1227
  onChartMouseLeave: v
1228
1228
  };
1229
1229
  }
@@ -1232,7 +1232,7 @@ const En = /* @__PURE__ */ ee(Sn, [["render", Tn], ["__scopeId", "data-v-b4abaf1
1232
1232
  class: "loading-overlay"
1233
1233
  };
1234
1234
  function Mn(e, o, n, a, i, l) {
1235
- const r = J("ErrorMessage"), h = J("data-table"), f = J("LoadingView");
1235
+ const r = J("ErrorMessage"), f = J("data-table"), h = J("LoadingView");
1236
1236
  return m(), p("div", {
1237
1237
  ref: "chartContainer",
1238
1238
  class: H(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
@@ -1247,7 +1247,7 @@ function Mn(e, o, n, a, i, l) {
1247
1247
  G(N(e.error), 1)
1248
1248
  ]),
1249
1249
  _: 1
1250
- })) : e.ready && e.results ? (m(), Z(h, {
1250
+ })) : e.ready && e.results ? (m(), Z(f, {
1251
1251
  key: 1,
1252
1252
  id: `${e.itemId}-${e.dashboardId}`,
1253
1253
  headers: e.results.headers,
@@ -1259,7 +1259,7 @@ function Mn(e, o, n, a, i, l) {
1259
1259
  onBackgroundClick: e.handleBackgroundClick
1260
1260
  }, null, 8, ["id", "headers", "results", "containerHeight", "onCellClick", "onBackgroundClick"])) : R("", !0),
1261
1261
  e.loading && e.showLoading ? (m(), p("div", Ln, [
1262
- z(f, {
1262
+ z(h, {
1263
1263
  startTime: e.startTime,
1264
1264
  text: "Loading"
1265
1265
  }, null, 8, ["startTime"])
@@ -1507,10 +1507,10 @@ function On(e, o, n, a, i, l) {
1507
1507
  class: H(["dropdown-item select-all", { selected: !i.selectedValue }]),
1508
1508
  onMousedown: o[4] || (o[4] = Pe((...r) => l.selectAll && l.selectAll(...r), ["prevent"]))
1509
1509
  }, " Select All ", 34),
1510
- (m(!0), p(ce, null, we(l.filteredOptions, (r, h) => (m(), p("div", {
1511
- key: h,
1510
+ (m(!0), p(ce, null, we(l.filteredOptions, (r, f) => (m(), p("div", {
1511
+ key: f,
1512
1512
  class: H(["dropdown-item", { selected: i.selectedValue === r.value }]),
1513
- onMousedown: Pe((f) => l.selectOption(r), ["prevent"]),
1513
+ onMousedown: Pe((h) => l.selectOption(r), ["prevent"]),
1514
1514
  innerHTML: l.highlightMatch(r.label)
1515
1515
  }, null, 42, Bn))), 128))
1516
1516
  ], 4)) : R("", !0),
@@ -1561,10 +1561,10 @@ const Hn = /* @__PURE__ */ ee(An, [["render", On], ["__scopeId", "data-v-db5bbc3
1561
1561
  }
1562
1562
  },
1563
1563
  setup(e, { emit: o }) {
1564
- const n = b(!1), a = b(null), i = b(null), l = b(!1), r = b(null), h = b(!1), f = () => {
1565
- h.value = !0;
1564
+ const n = b(!1), a = b(null), i = b(null), l = b(!1), r = b(null), f = b(!1), h = () => {
1565
+ f.value = !0;
1566
1566
  }, v = () => {
1567
- h.value = !1;
1567
+ f.value = !1;
1568
1568
  }, y = () => {
1569
1569
  if (!a.value) return 0;
1570
1570
  const d = a.value.getBoundingClientRect(), S = window.scrollY || document.documentElement.scrollTop, L = d.top + S, Q = Math.floor(L / 200) * 10;
@@ -1633,8 +1633,8 @@ const Hn = /* @__PURE__ */ ee(An, [["render", On], ["__scopeId", "data-v-db5bbc3
1633
1633
  handleBackgroundClick: () => {
1634
1634
  o("background-click");
1635
1635
  },
1636
- controlsVisible: h,
1637
- onChartMouseEnter: f,
1636
+ controlsVisible: f,
1637
+ onChartMouseEnter: h,
1638
1638
  onChartMouseLeave: v
1639
1639
  };
1640
1640
  }
@@ -1643,7 +1643,7 @@ const Hn = /* @__PURE__ */ ee(An, [["render", On], ["__scopeId", "data-v-db5bbc3
1643
1643
  class: "loading-overlay"
1644
1644
  };
1645
1645
  function Kn(e, o, n, a, i, l) {
1646
- const r = J("ErrorMessage"), h = J("dashboard-data-selector"), f = J("LoadingView");
1646
+ const r = J("ErrorMessage"), f = J("dashboard-data-selector"), h = J("LoadingView");
1647
1647
  return m(), p("div", {
1648
1648
  ref: "chartContainer",
1649
1649
  class: H(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
@@ -1658,7 +1658,7 @@ function Kn(e, o, n, a, i, l) {
1658
1658
  G(N(e.error), 1)
1659
1659
  ]),
1660
1660
  _: 1
1661
- })) : e.ready && e.results ? (m(), Z(h, {
1661
+ })) : e.ready && e.results ? (m(), Z(f, {
1662
1662
  key: 1,
1663
1663
  id: `${e.itemId}-${e.dashboardId}`,
1664
1664
  headers: e.results.headers,
@@ -1670,7 +1670,7 @@ function Kn(e, o, n, a, i, l) {
1670
1670
  onBackgroundClick: e.handleBackgroundClick
1671
1671
  }, null, 8, ["id", "headers", "results", "containerHeight", "onCellClick", "onBackgroundClick"])) : R("", !0),
1672
1672
  e.loading && e.showLoading ? (m(), p("div", Nn, [
1673
- z(f, {
1673
+ z(h, {
1674
1674
  startTime: e.startTime,
1675
1675
  text: "Loading"
1676
1676
  }, null, 8, ["startTime"])
@@ -1711,12 +1711,12 @@ const _n = /* @__PURE__ */ ee(Pn, [["render", Kn], ["__scopeId", "data-v-2e938e5
1711
1711
  },
1712
1712
  emits: ["edit-content", "update-dimensions", "dimension-click", "background-click", "remove-filter", "remove-item", "copy-item"],
1713
1713
  setup(e, { emit: o }) {
1714
- const n = e, a = o, i = b(!1), l = b(""), r = b(!1), h = b(!1);
1715
- function f(S) {
1714
+ const n = e, a = o, i = b(!1), l = b(""), r = b(!1), f = b(!1);
1715
+ function h(S) {
1716
1716
  return S.replace(/'''/g, "'").replace("local.", "");
1717
1717
  }
1718
1718
  function v(S, L = 1e3) {
1719
- const Q = f(S);
1719
+ const Q = h(S);
1720
1720
  return Q.length <= L ? Q : Q.substring(0, L) + "...";
1721
1721
  }
1722
1722
  function y() {
@@ -1813,10 +1813,10 @@ const _n = /* @__PURE__ */ ee(Pn, [["render", Kn], ["__scopeId", "data-v-2e938e5
1813
1813
  }]),
1814
1814
  "data-testid": `dashboard-component-${e.item.i}`,
1815
1815
  onMouseenter: L[1] || (L[1] = () => {
1816
- r.value = !0, h.value = !0;
1816
+ r.value = !0, f.value = !0;
1817
1817
  }),
1818
1818
  onMouseleave: L[2] || (L[2] = () => {
1819
- r.value = !1, h.value = !1;
1819
+ r.value = !1, f.value = !1;
1820
1820
  })
1821
1821
  }, [
1822
1822
  e.editMode ? (m(), p("div", {
@@ -1921,7 +1921,7 @@ const _n = /* @__PURE__ */ ee(Pn, [["render", Kn], ["__scopeId", "data-v-2e938e5
1921
1921
  (m(!0), p(ce, null, we(D.value.filters, (Q, K) => (m(), p("div", {
1922
1922
  class: "filter-tag",
1923
1923
  key: `${Q.source}-${Q.value}-${K}`,
1924
- title: f(Q.value)
1924
+ title: h(Q.value)
1925
1925
  }, [
1926
1926
  t("span", lo, [
1927
1927
  t("span", ao, N(Q.source === "global" ? Q.source : "cross") + ": ", 1),
@@ -1936,14 +1936,14 @@ const _n = /* @__PURE__ */ ee(Pn, [["render", Kn], ["__scopeId", "data-v-2e938e5
1936
1936
  ], 8, ro))), 128))
1937
1937
  ])) : (m(), p(ce, { key: 1 }, [
1938
1938
  d.value > 0 ? (m(), p("div", co, [
1939
- h.value ? R("", !0) : (m(), p("div", mo, [...L[10] || (L[10] = [
1939
+ f.value ? R("", !0) : (m(), p("div", mo, [...L[10] || (L[10] = [
1940
1940
  t("i", { class: "mdi mdi-filter-outline filter-icon" }, null, -1)
1941
1941
  ])])),
1942
- h.value ? (m(), p("div", ho, [
1942
+ f.value ? (m(), p("div", ho, [
1943
1943
  (m(!0), p(ce, null, we(D.value.filters, (Q, K) => (m(), p("div", {
1944
1944
  class: "filter-tag",
1945
1945
  key: `${Q.source}-${Q.value}-${K}`,
1946
- title: f(Q.value)
1946
+ title: h(Q.value)
1947
1947
  }, [
1948
1948
  t("span", vo, [
1949
1949
  t("span", yo, N(Q.source === "global" ? Q.source : "cross") + ": ", 1),
@@ -1976,17 +1976,17 @@ const _n = /* @__PURE__ */ ee(Pn, [["render", Kn], ["__scopeId", "data-v-2e938e5
1976
1976
  function r() {
1977
1977
  a("close");
1978
1978
  }
1979
- function h(f) {
1979
+ function f(h) {
1980
1980
  const v = document.querySelector(".content-editor");
1981
- v && !v.contains(f.target) && n.show && a("close");
1981
+ v && !v.contains(h.target) && n.show && a("close");
1982
1982
  }
1983
1983
  return pe(() => {
1984
1984
  Ae(() => {
1985
- document.addEventListener("click", h);
1985
+ document.addEventListener("click", f);
1986
1986
  });
1987
1987
  }), $e(() => {
1988
- document.removeEventListener("click", h);
1989
- }), (f, v) => e.show ? (m(), Z(Ue, {
1988
+ document.removeEventListener("click", f);
1989
+ }), (h, v) => e.show ? (m(), Z(Ue, {
1990
1990
  key: 0,
1991
1991
  to: "body"
1992
1992
  }, [
@@ -2106,8 +2106,8 @@ function Mo(e, o = {}) {
2106
2106
  e.onDidChangeModelContent(() => {
2107
2107
  var r;
2108
2108
  (r = o.onContentChange) == null || r.call(o, e.getValue()), l && clearTimeout(l), l = setTimeout(() => {
2109
- var h;
2110
- e.hasTextFocus() && !((h = e.getSelection()) != null && h.isEmpty()) && e.trigger("completion", "editor.action.triggerSuggest", { auto: !0 });
2109
+ var f;
2110
+ e.hasTextFocus() && !((f = e.getSelection()) != null && f.isEmpty()) && e.trigger("completion", "editor.action.triggerSuggest", { auto: !0 });
2111
2111
  }, 200);
2112
2112
  });
2113
2113
  }
@@ -2265,8 +2265,8 @@ const qo = X({
2265
2265
  l
2266
2266
  );
2267
2267
  if (r && e) {
2268
- const h = V.getModel();
2269
- h && Ee.setModelMarkers(h, "owner", r.data.items || []), r.data.completion_items && (this.editor.completionSymbols = r.data.completion_items);
2268
+ const f = V.getModel();
2269
+ f && Ee.setModelMarkers(f, "owner", r.data.items || []), r.data.completion_items && (this.editor.completionSymbols = r.data.completion_items);
2270
2270
  }
2271
2271
  return r ? r.data.imports : [];
2272
2272
  } catch (a) {
@@ -2303,14 +2303,14 @@ const qo = X({
2303
2303
  if (!(this.editor.loading || !a))
2304
2304
  try {
2305
2305
  this.analyticsStore && this.analyticsStore.log("studio-query-execution", this.editor.type, !0), this.editor.loading = !0, this.lastOperation = null, this.editor.startTime = Date.now();
2306
- const h = o.connections[this.editor.connection], f = _e(a, this.editor.contents);
2307
- if (!f) {
2306
+ const f = o.connections[this.editor.connection], h = _e(a, this.editor.contents);
2307
+ if (!h) {
2308
2308
  this.editor.results = new Ne(/* @__PURE__ */ new Map(), []), this.editor.loading = !1;
2309
2309
  return;
2310
2310
  }
2311
2311
  const v = {
2312
- text: f,
2313
- queryType: h ? h.query_type : "",
2312
+ text: h,
2313
+ queryType: f ? f.query_type : "",
2314
2314
  editorType: this.editor.type,
2315
2315
  imports: this.imports,
2316
2316
  extraContent: this.rootContent
@@ -2333,9 +2333,9 @@ const qo = X({
2333
2333
  duration: k.executionTime,
2334
2334
  rows: (i = k.results) != null && i.data ? (r = (l = k.results) == null ? void 0 : l.data) == null ? void 0 : r.length : void 0,
2335
2335
  type: this.editor.type
2336
- }, k.success ? (k.generatedSql && (this.editor.generated_sql = k.generatedSql), k.results && (this.editor.results = k.results, this.editor.duration = k.executionTime)) : k.error && this.editor.setError(k.error);
2337
- } catch (h) {
2338
- h instanceof Error && this.editor.setError(h.message || "Query execution failed"), this.lastOperation = {
2336
+ }, k.success ? (this.editor.executed_contents = h, k.generatedSql && (this.editor.generated_sql = k.generatedSql), k.results && (this.editor.results = k.results, this.editor.duration = k.executionTime)) : k.error && (this.editor.executed_contents = h, this.editor.setError(k.error));
2337
+ } catch (f) {
2338
+ f instanceof Error && this.editor.setError(f.message || "Query execution failed"), this.lastOperation = {
2339
2339
  success: !1,
2340
2340
  duration: 0,
2341
2341
  type: this.editor.type
@@ -2357,15 +2357,15 @@ const qo = X({
2357
2357
  const a = V.getValue();
2358
2358
  if (await this.validateQuery(!1), !this.editor.completionSymbols || this.editor.completionSymbols.length === 0)
2359
2359
  throw new Error("There are no imported concepts for LLM generation");
2360
- const i = this.editor.completionSymbols.map((h) => ({
2361
- name: h.label,
2362
- type: h.datatype,
2363
- description: h.description,
2364
- calculation: h.calculation
2365
- })), l = async (h) => {
2366
- const f = n.connections[this.editor.connection], v = {
2367
- text: h,
2368
- queryType: f ? f.query_type : "",
2360
+ const i = this.editor.completionSymbols.map((f) => ({
2361
+ name: f.label,
2362
+ type: f.datatype,
2363
+ description: f.description,
2364
+ calculation: f.calculation
2365
+ })), l = async (f) => {
2366
+ const h = n.connections[this.editor.connection], v = {
2367
+ text: f,
2368
+ queryType: h ? h.query_type : "",
2369
2369
  editorType: this.editor.type,
2370
2370
  imports: this.imports,
2371
2371
  extraContent: this.rootContent
@@ -2432,13 +2432,13 @@ const qo = X({
2432
2432
  class: "operation-type"
2433
2433
  };
2434
2434
  function Uo(e, o, n, a, i, l) {
2435
- const r = J("SymbolsPane"), h = J("loading-view");
2435
+ const r = J("SymbolsPane"), f = J("loading-view");
2436
2436
  return m(), p("div", Ao, [
2437
2437
  t("div", Ro, [
2438
2438
  t("div", Fo, [
2439
2439
  t("button", {
2440
2440
  class: "action-item",
2441
- onClick: o[0] || (o[0] = (...f) => e.generateLLMQuery && e.generateLLMQuery(...f)),
2441
+ onClick: o[0] || (o[0] = (...h) => e.generateLLMQuery && e.generateLLMQuery(...h)),
2442
2442
  title: "Generate query using AI",
2443
2443
  "data-testid": "editor-generate-button"
2444
2444
  }, " Generate "),
@@ -2450,11 +2450,11 @@ function Uo(e, o, n, a, i, l) {
2450
2450
  e.editor.type !== "sql" ? (m(), p("button", {
2451
2451
  key: 1,
2452
2452
  class: "action-item",
2453
- onClick: o[2] || (o[2] = (...f) => e.formatQuery && e.formatQuery(...f)),
2453
+ onClick: o[2] || (o[2] = (...h) => e.formatQuery && e.formatQuery(...h)),
2454
2454
  title: "Format query"
2455
2455
  }, " Format ")) : R("", !0),
2456
2456
  t("button", {
2457
- onClick: o[3] || (o[3] = (f) => e.editor.loading ? e.cancelQuery() : e.runQuery()),
2457
+ onClick: o[3] || (o[3] = (h) => e.editor.loading ? e.cancelQuery() : e.runQuery()),
2458
2458
  class: H(["action-item", { "button-cancel": e.editor.loading }]),
2459
2459
  "data-testid": "editor-run-button"
2460
2460
  }, N(e.editor.loading ? "Cancel" : "Test"), 3)
@@ -2482,7 +2482,7 @@ function Uo(e, o, n, a, i, l) {
2482
2482
  t("div", Bo, [
2483
2483
  t("button", {
2484
2484
  class: H(["sidebar-icon-button", { active: e.isPanelVisible }]),
2485
- onClick: o[4] || (o[4] = (f) => e.togglePanel("symbols")),
2485
+ onClick: o[4] || (o[4] = (h) => e.togglePanel("symbols")),
2486
2486
  title: "Symbols"
2487
2487
  }, [...o[5] || (o[5] = [
2488
2488
  t("i", { class: "mdi mdi-tag-search-outline" }, null, -1)
@@ -2491,7 +2491,7 @@ function Uo(e, o, n, a, i, l) {
2491
2491
  ])
2492
2492
  ]),
2493
2493
  t("div", Oo, [
2494
- e.editor.loading ? (m(), Z(h, {
2494
+ e.editor.loading ? (m(), Z(f, {
2495
2495
  key: 0,
2496
2496
  class: "loading-view",
2497
2497
  text: "Loading...",
@@ -2509,7 +2509,7 @@ function Uo(e, o, n, a, i, l) {
2509
2509
  ])
2510
2510
  ]);
2511
2511
  }
2512
- const Ze = /* @__PURE__ */ ee(qo, [["render", Uo], ["__scopeId", "data-v-7695715f"]]), jo = { class: "editor-overlay" }, zo = { class: "editor-body" }, Go = /* @__PURE__ */ X({
2512
+ const Ze = /* @__PURE__ */ ee(qo, [["render", Uo], ["__scopeId", "data-v-b071d1f7"]]), jo = { class: "editor-overlay" }, zo = { class: "editor-body" }, Go = /* @__PURE__ */ X({
2513
2513
  __name: "DashboardChartEditor",
2514
2514
  props: {
2515
2515
  content: {},
@@ -2522,7 +2522,7 @@ const Ze = /* @__PURE__ */ ee(qo, [["render", Uo], ["__scopeId", "data-v-7695715
2522
2522
  },
2523
2523
  emits: ["save", "cancel"],
2524
2524
  setup(e, { emit: o }) {
2525
- const n = e, a = o, i = b(n.content), l = b(n.imports), r = b(null), { editorElement: h, dialogStyle: f, startResize: v } = Ye(() => a("cancel"), {
2525
+ const n = e, a = o, i = b(n.content), l = b(n.imports), r = b(null), { editorElement: f, dialogStyle: h, startResize: v } = Ye(() => a("cancel"), {
2526
2526
  initialWidth: n.initialWidth,
2527
2527
  initialHeight: n.initialHeight
2528
2528
  });
@@ -2539,8 +2539,8 @@ const Ze = /* @__PURE__ */ ee(qo, [["render", Uo], ["__scopeId", "data-v-7695715
2539
2539
  t("div", {
2540
2540
  class: "content-editor",
2541
2541
  ref_key: "editorElement",
2542
- ref: h,
2543
- style: Ie(Y(f))
2542
+ ref: f,
2543
+ style: Ie(Y(h))
2544
2544
  }, [
2545
2545
  t("div", zo, [
2546
2546
  z(Ze, {
@@ -2586,7 +2586,7 @@ const Ze = /* @__PURE__ */ ee(qo, [["render", Uo], ["__scopeId", "data-v-7695715
2586
2586
  },
2587
2587
  emits: ["save", "cancel"],
2588
2588
  setup(e, { emit: o }) {
2589
- const n = e, a = o, i = C(() => typeof n.content == "string" ? { markdown: n.content, query: "" } : { markdown: n.content.markdown || "", query: n.content.query || "" }), l = b(i.value.markdown), r = b(i.value.query), h = b(i.value.query), f = b(n.imports), v = b(null), y = b("markdown"), { editorElement: g, dialogStyle: k, startResize: T } = Ye(() => a("cancel"), {
2589
+ const n = e, a = o, i = C(() => typeof n.content == "string" ? { markdown: n.content, query: "" } : { markdown: n.content.markdown || "", query: n.content.query || "" }), l = b(i.value.markdown), r = b(i.value.query), f = b(i.value.query), h = b(n.imports), v = b(null), y = b("markdown"), { editorElement: g, dialogStyle: k, startResize: T } = Ye(() => a("cancel"), {
2590
2590
  initialWidth: n.initialWidth,
2591
2591
  initialHeight: n.initialHeight
2592
2592
  });
@@ -2594,16 +2594,16 @@ const Ze = /* @__PURE__ */ ee(qo, [["render", Uo], ["__scopeId", "data-v-7695715
2594
2594
  () => n.content,
2595
2595
  (u) => {
2596
2596
  const d = typeof u == "string" ? { markdown: u, query: "" } : { markdown: u.markdown || "", query: u.query || "" };
2597
- l.value = d.markdown, r.value = d.query, h.value = d.query;
2597
+ l.value = d.markdown, r.value = d.query, f.value = d.query;
2598
2598
  }
2599
2599
  ), ne(y, (u, d) => {
2600
- d === "query" && v.value && (h.value = v.value.getContent());
2600
+ d === "query" && v.value && (f.value = v.value.getContent());
2601
2601
  });
2602
2602
  function F() {
2603
- y.value === "query" && v.value && (h.value = v.value.getContent());
2603
+ y.value === "query" && v.value && (f.value = v.value.getContent());
2604
2604
  const u = {
2605
2605
  markdown: l.value,
2606
- query: h.value
2606
+ query: f.value
2607
2607
  };
2608
2608
  a("save", u);
2609
2609
  }
@@ -2611,7 +2611,7 @@ const Ze = /* @__PURE__ */ ee(qo, [["render", Uo], ["__scopeId", "data-v-7695715
2611
2611
  a("cancel");
2612
2612
  }
2613
2613
  function E(u) {
2614
- y.value === "query" && v.value && (h.value = v.value.getContent()), y.value = u;
2614
+ y.value === "query" && v.value && (f.value = v.value.getContent()), y.value = u;
2615
2615
  }
2616
2616
  function M(u, d = "") {
2617
2617
  const S = document.querySelector(".markdown-editor");
@@ -2721,9 +2721,9 @@ Template examples:
2721
2721
  ], -1)),
2722
2722
  z(Ze, {
2723
2723
  class: "editor-content",
2724
- initContent: h.value,
2724
+ initContent: f.value,
2725
2725
  connectionName: e.connectionName,
2726
- imports: f.value,
2726
+ imports: h.value,
2727
2727
  rootContent: e.rootContent,
2728
2728
  ref_key: "editor",
2729
2729
  ref: v
@@ -2763,7 +2763,7 @@ Template examples:
2763
2763
  ), r = j("saveDashboards");
2764
2764
  if (!n || !i || !l || !r)
2765
2765
  throw new Error("DashboardStore, LLMConnectionStore, or QueryExecutionService not provided");
2766
- const h = e, f = C(() => i.activeConnection), v = o, y = b(""), g = b(""), k = b(!1), T = b(""), F = b(null), _ = P / 4, E = [
2766
+ const f = e, h = C(() => i.activeConnection), v = o, y = b(""), g = b(""), k = b(!1), T = b(""), F = b(null), _ = P / 4, E = [
2767
2767
  {
2768
2768
  id: "summary",
2769
2769
  name: "Summary Dashboard",
@@ -2831,10 +2831,10 @@ Template examples:
2831
2831
  function M(x) {
2832
2832
  F.value = x;
2833
2833
  const A = E.find((D) => D.id === x);
2834
- if (A && h.dashboardId) {
2834
+ if (A && f.dashboardId) {
2835
2835
  for (const D of A.layout)
2836
2836
  n.addItemToDashboard(
2837
- h.dashboardId,
2837
+ f.dashboardId,
2838
2838
  D.type,
2839
2839
  D.x,
2840
2840
  D.y,
@@ -2845,7 +2845,7 @@ Template examples:
2845
2845
  }
2846
2846
  }
2847
2847
  function I() {
2848
- h.dashboardId && y.value && (n.updateDashboardDescription(h.dashboardId, y.value), v("description-updated", y.value));
2848
+ f.dashboardId && y.value && (n.updateDashboardDescription(f.dashboardId, y.value), v("description-updated", y.value));
2849
2849
  }
2850
2850
  async function B() {
2851
2851
  if (!g.value.trim()) {
@@ -2861,7 +2861,7 @@ Template examples:
2861
2861
  a
2862
2862
  );
2863
2863
  console.log("Prompt spec generated:", x), x ? (await n.populateFromPromptSpec(
2864
- h.dashboardId,
2864
+ f.dashboardId,
2865
2865
  x,
2866
2866
  i,
2867
2867
  l,
@@ -2897,7 +2897,7 @@ Template examples:
2897
2897
  G(" Save ", -1)
2898
2898
  ])])
2899
2899
  ]),
2900
- f.value ? (m(), p("div", ii, [
2900
+ h.value ? (m(), p("div", ii, [
2901
2901
  A[4] || (A[4] = t("h3", { class: "section-title" }, "AI Copilot", -1)),
2902
2902
  A[5] || (A[5] = t("p", { class: "section-desc" }, " Let AI help build your dashboard based on your data and description ", -1)),
2903
2903
  te(t("textarea", {
@@ -2953,7 +2953,7 @@ function Ii(e, o, n, a) {
2953
2953
  throw new Error("Dashboard computed reference is required");
2954
2954
  const i = bt(), l = ze();
2955
2955
  let r = j("queryExecutionService");
2956
- const h = je(), { setActiveDashboard: f } = Ge();
2956
+ const f = je(), { setActiveDashboard: h } = Ge();
2957
2957
  if (!r)
2958
2958
  throw new Error("QueryExecutionService not provided");
2959
2959
  const v = b(""), y = b(""), g = b(""), k = b(null), T = b(null), F = b(!1), _ = b(!1), E = b(!1), M = b([]), I = C(() => o.maxWidth || "100vw"), B = C(() => e.value ? e.value.layout : []), x = C(() => e.value ? [...e.value.layout].sort((c, q) => (c.y + c.y + c.h) / 2 - (q.y + q.y + q.h) / 2) : []), A = C(() => e.value ? e.value.connection : ""), D = C(() => o.viewMode ? !1 : e.value ? e.value.state === "editing" : !1), U = C(() => e.value ? e.value.imports.map((c) => {
@@ -3231,11 +3231,11 @@ function Ii(e, o, n, a) {
3231
3231
  if (!e.value || !e.value.id)
3232
3232
  throw new Error("Dashboard not found or not initialized");
3233
3233
  if (!r) throw new Error("Query execution service not found");
3234
- if (!h) throw new Error("Connection store not found");
3234
+ if (!f) throw new Error("Connection store not found");
3235
3235
  let q = i.dashboards[c];
3236
3236
  const s = i.getOrCreateQueryExecutor(c, {
3237
3237
  queryExecutionService: r,
3238
- connectionStore: h,
3238
+ connectionStore: f,
3239
3239
  editorStore: l,
3240
3240
  connectionName: q.connection,
3241
3241
  dashboardId: c,
@@ -3295,7 +3295,7 @@ function Ii(e, o, n, a) {
3295
3295
  (s = i.getQueryExecutor(e.value.id)) == null || s.runBatch(q);
3296
3296
  }
3297
3297
  function it(c) {
3298
- f(c);
3298
+ h(c);
3299
3299
  }
3300
3300
  return {
3301
3301
  // State