@trilogy-data/trilogy-studio-components 0.1.18 → 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.
- package/README.md +36 -0
- package/dist/{AssetAutoImporter-CUqhhNvb.js → AssetAutoImporter-9QMzD3ho.js} +2 -2
- package/dist/{ChatCreatorModal-CixOpWSH.js → ChatCreatorModal-CpkL5ah4.js} +1 -1
- package/dist/{CommunityModels-BKBxewjm.js → CommunityModels-Dk7uEXRw.js} +2 -2
- package/dist/{ConnectionView-Dyqm2oeV.js → ConnectionView-DQTOod_j.js} +2 -2
- package/dist/{Dashboard-Bsoj1oUW.js → Dashboard-BcCVnVqI.js} +3 -3
- package/dist/{DashboardCreatorInline-BLbkDxBF.js → DashboardCreatorInline-C2ShZBai.js} +1 -1
- package/dist/{DashboardMobile-Ao8NtF1f.js → DashboardMobile-CKaqqZkb.js} +3 -3
- package/dist/{DrilldownPane-OZMttRBx.js → DrilldownPane-iReKVNZE.js} +1 -1
- package/dist/{Editor-N40lTR0s.js → Editor-DUQhJCtJ.js} +2 -2
- package/dist/{EditorCreatorInline-DCFnyl5w.js → EditorCreatorInline-D9h8RNE8.js} +1 -1
- package/dist/{IDE-kbUDZPcL.js → IDE-nbO1W7BN.js} +7 -7
- package/dist/{JobsView-AYNUDnKG.js → JobsView-BRgAiTvy.js} +1 -1
- package/dist/{LLMChat-CZTQUh53.js → LLMChat-B5WBKFfx.js} +3 -3
- package/dist/{LLMConnectionList-BkvCZP5Q.js → LLMConnectionList-JatTlgKd.js} +5 -5
- package/dist/{LLMView-CaTlmLGb.js → LLMView-BTq1yptw.js} +2 -2
- package/dist/{LoadingButton-BdM3Rygq.js → LoadingButton--jhQCgPi.js} +1 -1
- package/dist/{MobileIDE-Bi7GNE2X.js → MobileIDE-BFZxnpvD.js} +12 -12
- package/dist/{ModelCard-Cd6OxExX.js → ModelCard-BdSi4Tb5.js} +3 -3
- package/dist/{ModelCreator-DeI-n86Z.js → ModelCreator-BPfMWQL3.js} +3 -3
- package/dist/{ModelView-Surdb5KW.js → ModelView-CsaxXoLJ.js} +3 -3
- package/dist/{ResultComponent-CXkTwZFS.js → ResultComponent-DSRcNmRC.js} +1 -1
- package/dist/{Sidebar-CfOATms_.js → Sidebar-BKacsmb3.js} +7 -7
- package/dist/{StatusIcon-CahClDuz.js → StatusIcon-ytnp_iom.js} +1 -1
- package/dist/Tooltip-CDt1VNAs.js +104 -0
- package/dist/{TutorialPage-IisHiPL6.js → TutorialPage-ZSgVaEzU.js} +9 -9
- package/dist/{UserProfile-CQAUnKyQ.js → UserProfile-BNx75xfc.js} +1 -1
- package/dist/{WelcomePage-Bq-h9f64.js → WelcomePage-jGXRVqLL.js} +1 -1
- package/dist/components/LoadingButton.vue.d.ts +6 -5
- package/dist/components/LoadingButton.vue.d.ts.map +1 -1
- package/dist/components/Tooltip.vue.d.ts +6 -5
- package/dist/components/Tooltip.vue.d.ts.map +1 -1
- package/dist/components/VegaLiteChart.vue.d.ts +6 -5
- package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
- package/dist/components/connection/ConnectionDatabase.vue.d.ts +6 -5
- package/dist/components/connection/ConnectionDatabase.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardChart.vue.d.ts +6 -5
- package/dist/components/dashboard/DashboardChart.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardGridItem.vue.d.ts.map +1 -1
- package/dist/components/editor/Editor.vue.d.ts +12 -10
- package/dist/components/editor/Editor.vue.d.ts.map +1 -1
- package/dist/components/editor/EditorCreatorInline.vue.d.ts +6 -5
- package/dist/components/editor/EditorCreatorInline.vue.d.ts.map +1 -1
- package/dist/components/editor/EditorHeader.vue.d.ts +6 -5
- package/dist/components/editor/EditorHeader.vue.d.ts.map +1 -1
- package/dist/components/editor/ResultComponent.vue.d.ts +48 -40
- package/dist/components/editor/ResultComponent.vue.d.ts.map +1 -1
- package/dist/components/editor/Results.vue.d.ts +12 -10
- package/dist/components/editor/Results.vue.d.ts.map +1 -1
- package/dist/components/llm/ArtifactsPane.vue.d.ts +12 -10
- package/dist/components/llm/ArtifactsPane.vue.d.ts.map +1 -1
- package/dist/components/llm/ChatArtifact.vue.d.ts +6 -5
- package/dist/components/llm/ChatArtifact.vue.d.ts.map +1 -1
- package/dist/components/llm/LLMChatSplitView.vue.d.ts +12 -10
- package/dist/components/llm/LLMChatSplitView.vue.d.ts.map +1 -1
- package/dist/components/llm/LLMEditorRefinement.vue.d.ts +12 -10
- package/dist/components/llm/LLMEditorRefinement.vue.d.ts.map +1 -1
- package/dist/components/model/ModelCard.vue.d.ts +18 -15
- package/dist/components/model/ModelCard.vue.d.ts.map +1 -1
- package/dist/components/model/ModelCreator.vue.d.ts +12 -10
- package/dist/components/model/ModelCreator.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ConnectionList.vue.d.ts +18 -15
- package/dist/components/sidebar/ConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ConnectionListItem.vue.d.ts +6 -5
- package/dist/components/sidebar/ConnectionListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/DashboardList.vue.d.ts +14 -12
- package/dist/components/sidebar/DashboardList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/DashboardListItem.vue.d.ts +7 -6
- package/dist/components/sidebar/DashboardListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/EditorList.vue.d.ts +18 -15
- package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/EditorListItem.vue.d.ts +6 -5
- package/dist/components/sidebar/EditorListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts +6 -5
- package/dist/components/sidebar/LLMConnectionCreator.vue.d.ts.map +1 -1
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts +12 -10
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts +6 -5
- package/dist/components/sidebar/LLMConnectionListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/ModelSidebar.vue.d.ts +24 -20
- package/dist/components/sidebar/ModelSidebar.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts +92 -77
- package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts +60 -50
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
- package/dist/composables/useEmbeddedDashboardGroup.d.ts +78 -0
- package/dist/composables/useEmbeddedDashboardGroup.d.ts.map +1 -0
- package/dist/dashboard.js +296 -139
- package/dist/dashboards/base.d.ts +4 -3
- package/dist/dashboards/base.d.ts.map +1 -1
- package/dist/dashboards/crossFilters.d.ts +4 -2
- package/dist/dashboards/crossFilters.d.ts.map +1 -1
- package/dist/entry.dashboard.d.ts +2 -0
- package/dist/entry.dashboard.d.ts.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/{queryExecutionService-KrjL0UCa.js → queryExecutionService-BxU16oNE.js} +97 -94
- package/dist/stores/dashboardStore.d.ts +2 -1
- package/dist/stores/dashboardStore.d.ts.map +1 -1
- package/dist/stores.js +1 -1
- package/dist/trilogy-studio-components.css +1 -1
- package/dist/{useDashboard-CtX3sEag.js → useDashboard-Cl_8almf.js} +1063 -1057
- package/dist/views/ConnectionView.vue.d.ts +6 -5
- package/dist/views/ConnectionView.vue.d.ts.map +1 -1
- package/dist/views/LLMView.vue.d.ts +36 -30
- package/dist/views/LLMView.vue.d.ts.map +1 -1
- package/dist/views/ModelView.vue.d.ts +36 -30
- package/dist/views/ModelView.vue.d.ts.map +1 -1
- package/dist/views/TutorialPage.vue.d.ts +193 -161
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/views.js +2 -2
- package/package.json +1 -1
- package/dist/Tooltip-D4kSH91A.js +0 -62
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as J, ref as
|
|
2
|
-
import { a as st, u as
|
|
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
|
|
5
|
-
import { u as
|
|
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
|
|
9
|
-
import yt from "./LoadingButton
|
|
10
|
-
import
|
|
11
|
-
import { D as gt, V as bt } from "./DrilldownPane-
|
|
12
|
-
import { L as
|
|
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
|
|
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:
|
|
31
|
-
const
|
|
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
|
|
36
|
-
return delete
|
|
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,
|
|
39
|
-
const
|
|
40
|
-
delete
|
|
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
|
|
44
|
-
return delete
|
|
43
|
+
const k = { ...v };
|
|
44
|
+
return delete k.id, k;
|
|
45
45
|
})), a;
|
|
46
46
|
};
|
|
47
47
|
de(
|
|
48
|
-
[() =>
|
|
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
|
|
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(),
|
|
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:
|
|
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:
|
|
79
|
+
onClick: h,
|
|
80
80
|
class: "dashboard-copy-button",
|
|
81
81
|
"data-testid": "copy-json-button"
|
|
82
82
|
}, [
|
|
83
83
|
t("i", {
|
|
84
|
-
class:
|
|
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:
|
|
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:
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
124
|
-
const
|
|
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: `${
|
|
127
|
-
left: `${
|
|
128
|
-
width: `${
|
|
126
|
+
top: `${S.bottom + 50}px`,
|
|
127
|
+
left: `${S.left}px`,
|
|
128
|
+
width: `${S.width}px`,
|
|
129
129
|
maxHeight: "200px"
|
|
130
130
|
};
|
|
131
|
-
}),
|
|
132
|
-
if (!
|
|
133
|
-
s.value =
|
|
134
|
-
const
|
|
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(
|
|
136
|
+
for (; M > 0 && !/\s/.test(S.charAt(M - 1)); )
|
|
137
137
|
M--;
|
|
138
|
-
let
|
|
139
|
-
for (;
|
|
140
|
-
|
|
141
|
-
c.value = M,
|
|
142
|
-
},
|
|
143
|
-
if (!
|
|
144
|
-
const
|
|
145
|
-
return
|
|
146
|
-
const
|
|
147
|
-
return
|
|
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(
|
|
151
|
-
r.value =
|
|
150
|
+
de(b, (S) => {
|
|
151
|
+
r.value = S.length > 0, i.value = 0;
|
|
152
152
|
});
|
|
153
|
-
const
|
|
154
|
-
const M =
|
|
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 +
|
|
157
|
-
cursorPosition: c.value +
|
|
156
|
+
text: M + S.label + I,
|
|
157
|
+
cursorPosition: c.value + S.label.length
|
|
158
158
|
}), r.value = !1;
|
|
159
|
-
}, V = (
|
|
159
|
+
}, V = (S) => S.trilogySubType ? S.trilogySubType.toLowerCase() : S.type.toLowerCase();
|
|
160
160
|
return de(
|
|
161
|
-
() =>
|
|
161
|
+
() => o.inputValue,
|
|
162
162
|
() => {
|
|
163
|
-
|
|
163
|
+
k();
|
|
164
164
|
}
|
|
165
|
-
),
|
|
166
|
-
() => [a.value,
|
|
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
|
-
),
|
|
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:
|
|
179
|
+
style: De(v.value)
|
|
180
180
|
}, [
|
|
181
|
-
(m(!0), y(me, null,
|
|
182
|
-
key:
|
|
183
|
-
class:
|
|
184
|
-
onClick: (
|
|
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:
|
|
187
|
+
class: q(["symbol-icon", V(I)])
|
|
188
188
|
}, [
|
|
189
|
-
|
|
189
|
+
I.trilogySubType ? (m(), y("i", {
|
|
190
190
|
key: 0,
|
|
191
|
-
class:
|
|
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
|
-
|
|
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(
|
|
198
|
-
t("div", xt, N(
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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" },
|
|
214
|
+
}, Jt = ["disabled"], Yt = { class: "button-content" }, Zt = ["disabled"], Xt = { class: "button-content" }, eo = {
|
|
215
215
|
key: 0,
|
|
216
216
|
class: "loader-container"
|
|
217
|
-
},
|
|
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:
|
|
237
|
-
const
|
|
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,
|
|
239
|
+
l("filter-apply", a.value), v.value = !1, O();
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function S() {
|
|
242
242
|
a.value = "", v.value = !0, l("filter-change", ""), l("filter-apply", ""), l("clear-filter", ""), setTimeout(() => {
|
|
243
|
-
|
|
243
|
+
h.value && h.value.focus();
|
|
244
244
|
}, 0);
|
|
245
245
|
}
|
|
246
|
-
function M(
|
|
247
|
-
const
|
|
248
|
-
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
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
|
|
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
|
|
260
|
-
|
|
259
|
+
function O() {
|
|
260
|
+
k.value = !1;
|
|
261
261
|
}
|
|
262
|
-
const
|
|
262
|
+
const P = () => {
|
|
263
263
|
i.value = !0;
|
|
264
|
-
const
|
|
265
|
-
name:
|
|
266
|
-
type:
|
|
267
|
-
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,
|
|
270
|
-
|
|
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
|
|
276
|
-
|
|
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
|
|
279
|
-
(
|
|
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(() => (
|
|
282
|
-
function
|
|
283
|
-
a.value =
|
|
284
|
-
const
|
|
285
|
-
|
|
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
|
-
() =>
|
|
289
|
-
(
|
|
290
|
-
|
|
288
|
+
() => o.filterValue,
|
|
289
|
+
(C) => {
|
|
290
|
+
C !== a.value && (a.value = C || "", v.value = !1);
|
|
291
291
|
}
|
|
292
292
|
), de(
|
|
293
|
-
() =>
|
|
294
|
-
(
|
|
295
|
-
i.value =
|
|
293
|
+
() => o.isLoading,
|
|
294
|
+
(C) => {
|
|
295
|
+
i.value = C;
|
|
296
296
|
}
|
|
297
|
-
),
|
|
297
|
+
), Fe(
|
|
298
298
|
() => [c.value, s.value],
|
|
299
299
|
() => {
|
|
300
|
-
|
|
300
|
+
O();
|
|
301
301
|
},
|
|
302
302
|
{
|
|
303
|
-
enabled: () =>
|
|
303
|
+
enabled: () => k.value
|
|
304
304
|
}
|
|
305
|
-
), (
|
|
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:
|
|
313
|
+
value: b.value,
|
|
314
314
|
onInput: M,
|
|
315
|
-
onKeydown:
|
|
316
|
-
onFocus:
|
|
315
|
+
onKeydown: B,
|
|
316
|
+
onFocus: I,
|
|
317
317
|
placeholder: "Add a global filter...",
|
|
318
|
-
class:
|
|
318
|
+
class: q({ "filter-error": g.value === "error" }),
|
|
319
319
|
disabled: i.value
|
|
320
320
|
}, null, 42, Bt),
|
|
321
|
-
|
|
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
|
-
|
|
328
|
+
f[1] || (f[1] = t("span", null, "Global Filters", -1)),
|
|
329
329
|
t("button", {
|
|
330
|
-
onClick:
|
|
330
|
+
onClick: O,
|
|
331
331
|
class: "close-button",
|
|
332
332
|
title: "Close (Esc)"
|
|
333
|
-
}, [...
|
|
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:
|
|
340
|
-
class:
|
|
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
|
-
|
|
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:
|
|
357
|
+
class: q(["apply-button", { "has-changes": v.value }]),
|
|
358
358
|
disabled: i.value,
|
|
359
359
|
title: "Apply filter (Ctrl+Enter)"
|
|
360
|
-
}, [...
|
|
360
|
+
}, [...f[3] || (f[3] = [
|
|
361
361
|
t("i", { class: "mdi mdi-check" }, null, -1),
|
|
362
|
-
|
|
362
|
+
be(" Apply ", -1)
|
|
363
363
|
])], 10, Wt),
|
|
364
364
|
ie(r).hasActiveDefaultConnection ? (m(), y("button", {
|
|
365
365
|
key: 0,
|
|
366
|
-
onClick:
|
|
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:
|
|
372
|
+
class: q(["mdi mdi-auto-fix", { hidden: i.value }])
|
|
373
373
|
}, null, 2),
|
|
374
|
-
i.value ? (m(), y("div", jt, [...
|
|
374
|
+
i.value ? (m(), y("div", jt, [...f[4] || (f[4] = [
|
|
375
375
|
t("div", { class: "loader" }, null, -1)
|
|
376
376
|
])])) : R("", !0),
|
|
377
|
-
|
|
377
|
+
f[5] || (f[5] = be(" Text to Filter ", -1))
|
|
378
378
|
], 8, Ut)) : R("", !0),
|
|
379
379
|
t("button", {
|
|
380
|
-
onClick:
|
|
380
|
+
onClick: S,
|
|
381
381
|
class: "clear-button",
|
|
382
382
|
disabled: i.value,
|
|
383
383
|
title: "Clear filter"
|
|
384
|
-
}, [...
|
|
384
|
+
}, [...f[6] || (f[6] = [
|
|
385
385
|
t("i", { class: "mdi mdi-close-circle-outline" }, null, -1),
|
|
386
|
-
|
|
387
|
-
])], 8,
|
|
386
|
+
be(" Clear ", -1)
|
|
387
|
+
])], 8, _t)
|
|
388
388
|
])
|
|
389
389
|
], 512)) : R("", !0),
|
|
390
|
-
(
|
|
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":
|
|
395
|
-
onSelectCompletion:
|
|
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",
|
|
397
|
+
t("div", Gt, [
|
|
398
398
|
g.value === "error" ? (m(), y("div", zt, [
|
|
399
|
-
|
|
400
|
-
z(
|
|
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:
|
|
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:
|
|
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
|
-
|
|
422
|
-
z(
|
|
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:
|
|
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:
|
|
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:
|
|
443
|
+
class: q(["mdi mdi-auto-fix", { hidden: i.value }])
|
|
444
444
|
}, null, 2),
|
|
445
|
-
i.value ? (m(), y("div",
|
|
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(
|
|
448
|
+
z(ge, {
|
|
449
449
|
content: i.value ? "Processing..." : "Text to filter (Ctrl+Shift+Enter)",
|
|
450
450
|
position: "top"
|
|
451
451
|
}, {
|
|
452
|
-
default:
|
|
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
|
-
|
|
459
|
+
E.value ? (m(), y("button", {
|
|
460
460
|
key: 2,
|
|
461
|
-
onClick:
|
|
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",
|
|
468
|
-
|
|
469
|
-
z(
|
|
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:
|
|
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,
|
|
479
|
+
], 8, to)) : R("", !0)
|
|
480
480
|
])
|
|
481
481
|
])
|
|
482
482
|
]));
|
|
483
483
|
}
|
|
484
|
-
}),
|
|
484
|
+
}), io = /* @__PURE__ */ Y(no, [["__scopeId", "data-v-ff037c5f"]]), ro = {
|
|
485
485
|
class: "dashboard-controls",
|
|
486
486
|
"data-testid": "dashboard-controls"
|
|
487
|
-
},
|
|
487
|
+
}, lo = {
|
|
488
488
|
key: 0,
|
|
489
489
|
class: "editable-text"
|
|
490
|
-
},
|
|
490
|
+
}, ao = { class: "title-text" }, so = {
|
|
491
491
|
key: 0,
|
|
492
492
|
class: "edit-indicator",
|
|
493
493
|
"data-testid": "edit-dashboard-title"
|
|
494
|
-
},
|
|
494
|
+
}, uo = {
|
|
495
495
|
key: 0,
|
|
496
496
|
class: "dashboard-right-controls"
|
|
497
|
-
},
|
|
497
|
+
}, co = {
|
|
498
498
|
class: "connection-selector",
|
|
499
499
|
"data-testid": "connection-selector-wrapper"
|
|
500
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
538
|
-
const
|
|
539
|
-
function
|
|
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
|
|
542
|
+
function E() {
|
|
543
543
|
c.value = !1;
|
|
544
544
|
}
|
|
545
|
-
function V(
|
|
546
|
-
l("filter-change",
|
|
545
|
+
function V(f) {
|
|
546
|
+
l("filter-change", f);
|
|
547
547
|
}
|
|
548
|
-
async function
|
|
549
|
-
return l("export-image"), await new Promise((
|
|
548
|
+
async function S() {
|
|
549
|
+
return l("export-image"), await new Promise((f) => setTimeout(f, 5e3)), Promise.resolve();
|
|
550
550
|
}
|
|
551
|
-
function M(
|
|
552
|
-
const
|
|
553
|
-
l("mode-change",
|
|
551
|
+
function M(f) {
|
|
552
|
+
const T = f.target;
|
|
553
|
+
l("mode-change", T.value);
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
var
|
|
557
|
-
|
|
558
|
-
var
|
|
559
|
-
(
|
|
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
|
|
562
|
+
function O() {
|
|
563
563
|
a.value = !1, l("title-update", v.value);
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
var
|
|
567
|
-
a.value = !1, v.value = ((
|
|
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
|
|
570
|
-
id:
|
|
571
|
-
name:
|
|
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
|
-
}))),
|
|
574
|
-
var
|
|
575
|
-
return ((
|
|
573
|
+
}))), L = p(() => {
|
|
574
|
+
var f;
|
|
575
|
+
return ((f = o.dashboard) == null ? void 0 : f.imports) || [];
|
|
576
576
|
});
|
|
577
|
-
function g(
|
|
578
|
-
l("import-change",
|
|
577
|
+
function g(f) {
|
|
578
|
+
l("import-change", f);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function A() {
|
|
581
581
|
l("refresh");
|
|
582
582
|
}
|
|
583
|
-
const
|
|
584
|
-
var
|
|
585
|
-
switch ((
|
|
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 (
|
|
597
|
-
var
|
|
598
|
-
return m(), y("div",
|
|
596
|
+
return (f, T) => {
|
|
597
|
+
var te, ne;
|
|
598
|
+
return m(), y("div", ro, [
|
|
599
599
|
t("div", {
|
|
600
|
-
class:
|
|
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:
|
|
604
|
+
onClick: I
|
|
605
605
|
}, [
|
|
606
606
|
a.value ? ue((m(), y("input", {
|
|
607
607
|
key: 1,
|
|
608
608
|
ref_key: "titleInput",
|
|
609
|
-
ref:
|
|
609
|
+
ref: k,
|
|
610
610
|
"data-testid": "dashboard-title-input",
|
|
611
|
-
"onUpdate:modelValue":
|
|
612
|
-
onBlur:
|
|
611
|
+
"onUpdate:modelValue": T[0] || (T[0] = (U) => v.value = U),
|
|
612
|
+
onBlur: O,
|
|
613
613
|
onKeyup: [
|
|
614
|
-
ye(
|
|
615
|
-
ye(
|
|
614
|
+
ye(O, ["enter"]),
|
|
615
|
+
ye(P, ["esc"])
|
|
616
616
|
],
|
|
617
617
|
class: "title-input",
|
|
618
618
|
type: "text"
|
|
619
619
|
}, null, 544)), [
|
|
620
|
-
[
|
|
621
|
-
]) : (m(), y("span",
|
|
622
|
-
t("span",
|
|
623
|
-
e.editsLocked ? R("", !0) : (m(), y("span",
|
|
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",
|
|
629
|
-
t("div",
|
|
630
|
-
t("div",
|
|
631
|
-
|
|
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:
|
|
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,
|
|
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,
|
|
645
|
-
], 40,
|
|
644
|
+
}, N(U.name), 9, fo))), 128))
|
|
645
|
+
], 40, ho)
|
|
646
646
|
])
|
|
647
647
|
]),
|
|
648
648
|
z(pt, {
|
|
649
|
-
"available-imports":
|
|
650
|
-
"active-imports":
|
|
649
|
+
"available-imports": B.value,
|
|
650
|
+
"active-imports": L.value,
|
|
651
651
|
"onUpdate:imports": g,
|
|
652
|
-
onExplore:
|
|
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",
|
|
654
|
+
t("div", vo, [
|
|
655
655
|
t("button", {
|
|
656
|
-
onClick:
|
|
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
|
-
}, [...
|
|
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:
|
|
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
|
-
}, [...
|
|
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",
|
|
683
|
-
z(
|
|
684
|
-
"filter-value": ((
|
|
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":
|
|
686
|
+
"is-loading": h.value,
|
|
687
687
|
"global-completion": e.globalCompletion,
|
|
688
688
|
"validate-filter": e.validateFilter,
|
|
689
689
|
onFilterApply: V,
|
|
690
|
-
onClearFilter:
|
|
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",
|
|
692
|
+
t("div", yo, [
|
|
693
693
|
z(yt, {
|
|
694
|
-
action:
|
|
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:
|
|
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:
|
|
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
|
-
}, [...
|
|
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:
|
|
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
|
-
}, [...
|
|
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",
|
|
738
|
-
t("div",
|
|
737
|
+
t("div", go, [
|
|
738
|
+
t("div", bo, [
|
|
739
739
|
t("i", {
|
|
740
|
-
class:
|
|
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
|
-
}, [...
|
|
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,
|
|
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:
|
|
770
|
+
onClose: E
|
|
771
771
|
}, null, 8, ["dashboard", "is-open"])
|
|
772
772
|
]);
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
}), Ki = /* @__PURE__ */ Y(
|
|
776
|
-
function
|
|
777
|
-
const
|
|
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 (!
|
|
781
|
-
const
|
|
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
|
|
786
|
+
const E = c();
|
|
787
787
|
if (!e.results.value) {
|
|
788
|
-
|
|
788
|
+
o.value = !0;
|
|
789
789
|
return;
|
|
790
790
|
}
|
|
791
791
|
setTimeout(() => {
|
|
792
|
-
|
|
793
|
-
},
|
|
792
|
+
o.value = !0;
|
|
793
|
+
}, E);
|
|
794
794
|
}, 0);
|
|
795
|
-
}),
|
|
796
|
-
|
|
795
|
+
}), ot(() => {
|
|
796
|
+
h();
|
|
797
797
|
}), de(
|
|
798
798
|
e.loading,
|
|
799
|
-
(
|
|
800
|
-
if (
|
|
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
|
|
814
|
-
if (!
|
|
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 &&
|
|
818
|
-
} catch (
|
|
819
|
-
console.error("Error setting up query:",
|
|
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:
|
|
824
|
-
ready:
|
|
823
|
+
chartContainer: n,
|
|
824
|
+
ready: o,
|
|
825
825
|
showLoading: r,
|
|
826
826
|
controlsVisible: s,
|
|
827
827
|
executeQuery: a,
|
|
828
828
|
handleLocalRefresh: () => {
|
|
829
|
-
const
|
|
830
|
-
if (
|
|
831
|
-
|
|
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
|
|
844
|
+
const ko = J({
|
|
845
845
|
name: "DashboardChart",
|
|
846
846
|
components: {
|
|
847
847
|
VegaLiteChart: bt,
|
|
848
|
-
ErrorMessage:
|
|
849
|
-
LoadingView:
|
|
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:
|
|
885
|
-
const
|
|
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),
|
|
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
|
-
),
|
|
894
|
+
), O = (G) => {
|
|
895
895
|
const oe = {
|
|
896
|
-
...
|
|
896
|
+
...G,
|
|
897
897
|
showTitle: !1
|
|
898
898
|
};
|
|
899
|
-
if (
|
|
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:
|
|
908
|
-
ready:
|
|
909
|
-
showLoading:
|
|
907
|
+
chartContainer: P,
|
|
908
|
+
ready: B,
|
|
909
|
+
showLoading: L,
|
|
910
910
|
controlsVisible: g,
|
|
911
|
-
executeQuery:
|
|
912
|
-
handleLocalRefresh:
|
|
913
|
-
onChartMouseEnter:
|
|
914
|
-
onChartMouseLeave:
|
|
915
|
-
} =
|
|
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:
|
|
923
|
+
analyticsStore: I,
|
|
924
924
|
analyticsEvent: "dashboard-chart-execution",
|
|
925
925
|
analyticsType: "CHART",
|
|
926
926
|
loadingDelayMs: 250
|
|
927
927
|
});
|
|
928
928
|
return {
|
|
929
|
-
chartContainer:
|
|
929
|
+
chartContainer: P,
|
|
930
930
|
results: i,
|
|
931
|
-
ready:
|
|
931
|
+
ready: B,
|
|
932
932
|
loading: v,
|
|
933
|
-
showLoading:
|
|
934
|
-
error:
|
|
935
|
-
filters:
|
|
933
|
+
showLoading: L,
|
|
934
|
+
error: k,
|
|
935
|
+
filters: b,
|
|
936
936
|
query: r,
|
|
937
|
-
chartHeight:
|
|
937
|
+
chartHeight: h,
|
|
938
938
|
chartWidth: c,
|
|
939
939
|
chartConfig: a,
|
|
940
940
|
chartTitle: s,
|
|
941
|
-
onChartConfigChange:
|
|
941
|
+
onChartConfigChange: O,
|
|
942
942
|
onRefresh: M,
|
|
943
|
-
handleLocalRefresh:
|
|
943
|
+
handleLocalRefresh: C,
|
|
944
944
|
chartSelection: V,
|
|
945
|
-
startTime:
|
|
946
|
-
handleDimensionClick: (
|
|
947
|
-
|
|
945
|
+
startTime: E,
|
|
946
|
+
handleDimensionClick: (G) => {
|
|
947
|
+
n("dimension-click", {
|
|
948
948
|
source: e.itemId,
|
|
949
|
-
filters:
|
|
950
|
-
chart:
|
|
951
|
-
append:
|
|
949
|
+
filters: G.filters,
|
|
950
|
+
chart: G.chart,
|
|
951
|
+
append: G.append
|
|
952
952
|
});
|
|
953
953
|
},
|
|
954
954
|
handleBackgroundClick: () => {
|
|
955
|
-
|
|
955
|
+
n("background-click");
|
|
956
956
|
},
|
|
957
|
-
activeDrilldown:
|
|
958
|
-
activateDrilldown: (
|
|
959
|
-
let oe =
|
|
960
|
-
|
|
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
|
|
962
|
+
submitDrilldown: async (G) => {
|
|
963
|
+
let re = await e.getDashboardQueryExecutor(e.dashboardId).createDrilldownQuery(
|
|
964
964
|
r.value,
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
965
|
+
G,
|
|
966
|
+
o.value.remove,
|
|
967
|
+
o.value.filter,
|
|
968
968
|
l.value.rootContent || [],
|
|
969
|
-
(l.value.imports || []).map((
|
|
969
|
+
(l.value.imports || []).map((X) => ({ name: X.name, alias: X.alias }))
|
|
970
970
|
);
|
|
971
971
|
e.setItemData(e.itemId, e.dashboardId, {
|
|
972
|
-
drilldown:
|
|
972
|
+
drilldown: re,
|
|
973
973
|
drilldownChartConfig: null,
|
|
974
974
|
loading: !0
|
|
975
|
-
}),
|
|
976
|
-
|
|
977
|
-
}).catch((
|
|
978
|
-
console.error("Error executing drilldown query:",
|
|
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
|
-
|
|
980
|
+
L.value = !1;
|
|
981
981
|
});
|
|
982
982
|
},
|
|
983
983
|
controlsVisible: g,
|
|
984
|
-
onChartMouseEnter:
|
|
985
|
-
onChartMouseLeave:
|
|
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
|
|
991
|
+
}), await A();
|
|
992
992
|
},
|
|
993
|
-
hasDrilldown:
|
|
993
|
+
hasDrilldown: S
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
}),
|
|
996
|
+
}), So = {
|
|
997
997
|
key: 3,
|
|
998
998
|
class: "loading-overlay"
|
|
999
999
|
};
|
|
1000
|
-
function
|
|
1001
|
-
const s =
|
|
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:
|
|
1005
|
-
onMouseenter:
|
|
1006
|
-
onMouseleave:
|
|
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(),
|
|
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:
|
|
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(),
|
|
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(),
|
|
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",
|
|
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:
|
|
1049
|
+
class: q(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1050
1050
|
}, [
|
|
1051
1051
|
t("button", {
|
|
1052
|
-
onClick:
|
|
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
|
-
}, [...
|
|
1056
|
+
}, [...n[5] || (n[5] = [
|
|
1057
1057
|
t("i", { class: "mdi mdi-refresh icon" }, null, -1)
|
|
1058
1058
|
])]),
|
|
1059
1059
|
t("button", {
|
|
1060
|
-
onClick:
|
|
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
|
-
}, [...
|
|
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
|
|
1070
|
+
const Eo = /* @__PURE__ */ Y(ko, [["render", Do], ["__scopeId", "data-v-36046d80"]]), To = J({
|
|
1071
1071
|
name: "DynamicMarkdownChart",
|
|
1072
1072
|
components: {
|
|
1073
|
-
ErrorMessage:
|
|
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
|
|
1106
|
-
if (!
|
|
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:
|
|
1109
|
+
chartContainer: E,
|
|
1110
1110
|
ready: V,
|
|
1111
|
-
controlsVisible:
|
|
1111
|
+
controlsVisible: S,
|
|
1112
1112
|
handleLocalRefresh: M,
|
|
1113
|
-
onChartMouseEnter:
|
|
1114
|
-
onChartMouseLeave:
|
|
1115
|
-
} =
|
|
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:
|
|
1123
|
+
analyticsStore: b,
|
|
1124
1124
|
analyticsEvent: "dashboard-markdown-execution",
|
|
1125
1125
|
analyticsType: "MARKDOWN"
|
|
1126
1126
|
});
|
|
1127
1127
|
return {
|
|
1128
|
-
chartContainer:
|
|
1128
|
+
chartContainer: E,
|
|
1129
1129
|
results: i,
|
|
1130
1130
|
ready: V,
|
|
1131
1131
|
loading: s,
|
|
1132
|
-
error:
|
|
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:
|
|
1139
|
-
onChartMouseEnter:
|
|
1140
|
-
onChartMouseLeave:
|
|
1138
|
+
controlsVisible: S,
|
|
1139
|
+
onChartMouseEnter: I,
|
|
1140
|
+
onChartMouseLeave: O
|
|
1141
1141
|
};
|
|
1142
1142
|
}
|
|
1143
1143
|
});
|
|
1144
|
-
function
|
|
1145
|
-
const s =
|
|
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:
|
|
1149
|
-
onMouseenter:
|
|
1150
|
-
onMouseleave:
|
|
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(),
|
|
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(),
|
|
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:
|
|
1166
|
+
class: q(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1167
1167
|
}, [
|
|
1168
1168
|
t("button", {
|
|
1169
|
-
onClick:
|
|
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
|
-
}, [...
|
|
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 $
|
|
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:
|
|
1184
|
-
LoadingView:
|
|
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:
|
|
1215
|
-
const
|
|
1216
|
-
if (!
|
|
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:
|
|
1220
|
+
ready: S,
|
|
1221
1221
|
showLoading: M,
|
|
1222
|
-
controlsVisible:
|
|
1223
|
-
handleLocalRefresh:
|
|
1224
|
-
onChartMouseEnter:
|
|
1225
|
-
onChartMouseLeave:
|
|
1226
|
-
} =
|
|
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:
|
|
1232
|
+
onRefresh: k,
|
|
1233
1233
|
getDashboardQueryExecutor: e.getDashboardQueryExecutor,
|
|
1234
|
-
analyticsStore:
|
|
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:
|
|
1241
|
+
ready: S,
|
|
1242
1242
|
loading: i,
|
|
1243
1243
|
showLoading: M,
|
|
1244
1244
|
error: s,
|
|
1245
|
-
filters:
|
|
1245
|
+
filters: h,
|
|
1246
1246
|
query: l,
|
|
1247
1247
|
chartHeight: a,
|
|
1248
1248
|
chartWidth: v,
|
|
1249
|
-
onRefresh:
|
|
1250
|
-
handleLocalRefresh:
|
|
1249
|
+
onRefresh: k,
|
|
1250
|
+
handleLocalRefresh: O,
|
|
1251
1251
|
startTime: c,
|
|
1252
|
-
handleDimensionClick: (
|
|
1253
|
-
|
|
1252
|
+
handleDimensionClick: (A) => {
|
|
1253
|
+
n("dimension-click", {
|
|
1254
1254
|
source: e.itemId,
|
|
1255
|
-
filters:
|
|
1256
|
-
chart:
|
|
1257
|
-
append:
|
|
1255
|
+
filters: A.filters,
|
|
1256
|
+
chart: A.chart,
|
|
1257
|
+
append: A.append
|
|
1258
1258
|
});
|
|
1259
1259
|
},
|
|
1260
1260
|
handleBackgroundClick: () => {
|
|
1261
|
-
|
|
1261
|
+
n("background-click");
|
|
1262
1262
|
},
|
|
1263
|
-
controlsVisible:
|
|
1264
|
-
onChartMouseEnter:
|
|
1265
|
-
onChartMouseLeave:
|
|
1263
|
+
controlsVisible: I,
|
|
1264
|
+
onChartMouseEnter: P,
|
|
1265
|
+
onChartMouseLeave: B
|
|
1266
1266
|
};
|
|
1267
1267
|
}
|
|
1268
|
-
}),
|
|
1268
|
+
}), Mo = {
|
|
1269
1269
|
key: 2,
|
|
1270
1270
|
class: "loading-overlay"
|
|
1271
1271
|
};
|
|
1272
|
-
function
|
|
1273
|
-
const s =
|
|
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:
|
|
1277
|
-
onMouseenter:
|
|
1278
|
-
onMouseleave:
|
|
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(),
|
|
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(),
|
|
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",
|
|
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:
|
|
1307
|
+
class: q(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1308
1308
|
}, [
|
|
1309
1309
|
t("button", {
|
|
1310
|
-
onClick:
|
|
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
|
-
}, [...
|
|
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
|
|
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),
|
|
1360
|
+
const e = j("userSettingsStore", null), n = kt(e);
|
|
1361
1361
|
return {
|
|
1362
1362
|
settingsStore: e,
|
|
1363
|
-
currentTheme:
|
|
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,
|
|
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[
|
|
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
|
-
|
|
1390
|
+
o.push({
|
|
1391
1391
|
label: s,
|
|
1392
1392
|
value: i
|
|
1393
1393
|
});
|
|
1394
1394
|
}
|
|
1395
|
-
}),
|
|
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((
|
|
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,
|
|
1436
|
-
var
|
|
1437
|
-
switch (
|
|
1435
|
+
formatValue(e, n) {
|
|
1436
|
+
var o, l;
|
|
1437
|
+
switch (n.type) {
|
|
1438
1438
|
case ce.FLOAT:
|
|
1439
|
-
return (
|
|
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
|
|
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
|
-
},
|
|
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
|
-
},
|
|
1497
|
-
function
|
|
1498
|
-
return m(), y("div",
|
|
1499
|
-
t("div",
|
|
1500
|
-
t("div",
|
|
1501
|
-
i.hasSelection ? (m(), y("span",
|
|
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":
|
|
1504
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => r.searchText = s),
|
|
1505
1505
|
type: "text",
|
|
1506
|
-
class:
|
|
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:
|
|
1510
|
-
onInput:
|
|
1511
|
-
onBlur:
|
|
1512
|
-
}, null, 42,
|
|
1513
|
-
[
|
|
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
|
-
|
|
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(),
|
|
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:
|
|
1538
|
+
style: De(i.dropdownStyle)
|
|
1539
1539
|
}, [
|
|
1540
1540
|
t("div", {
|
|
1541
|
-
class:
|
|
1542
|
-
onMousedown:
|
|
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,
|
|
1545
|
-
key:
|
|
1546
|
-
class:
|
|
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,
|
|
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:
|
|
1555
|
-
}, [...
|
|
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
|
|
1562
|
+
const No = /* @__PURE__ */ Y(qo, [["render", Bo], ["__scopeId", "data-v-660a47c4"]]), Po = J({
|
|
1563
1563
|
name: "DashboardFilter",
|
|
1564
1564
|
components: {
|
|
1565
|
-
DashboardDataSelector:
|
|
1566
|
-
ErrorMessage:
|
|
1567
|
-
LoadingView:
|
|
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:
|
|
1598
|
-
const
|
|
1599
|
-
if (!
|
|
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:
|
|
1603
|
+
ready: S,
|
|
1604
1604
|
showLoading: M,
|
|
1605
|
-
controlsVisible:
|
|
1606
|
-
handleLocalRefresh:
|
|
1607
|
-
onChartMouseEnter:
|
|
1608
|
-
onChartMouseLeave:
|
|
1609
|
-
} =
|
|
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:
|
|
1615
|
+
onRefresh: k,
|
|
1616
1616
|
getDashboardQueryExecutor: e.getDashboardQueryExecutor,
|
|
1617
|
-
analyticsStore:
|
|
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:
|
|
1624
|
+
ready: S,
|
|
1625
1625
|
loading: i,
|
|
1626
1626
|
showLoading: M,
|
|
1627
1627
|
error: s,
|
|
1628
|
-
filters:
|
|
1628
|
+
filters: h,
|
|
1629
1629
|
query: l,
|
|
1630
1630
|
chartHeight: a,
|
|
1631
1631
|
chartWidth: v,
|
|
1632
|
-
onRefresh:
|
|
1633
|
-
handleLocalRefresh:
|
|
1632
|
+
onRefresh: k,
|
|
1633
|
+
handleLocalRefresh: O,
|
|
1634
1634
|
startTime: c,
|
|
1635
|
-
handleDimensionClick: (
|
|
1636
|
-
|
|
1635
|
+
handleDimensionClick: (A) => {
|
|
1636
|
+
n("dimension-click", {
|
|
1637
1637
|
source: e.itemId,
|
|
1638
|
-
filters:
|
|
1639
|
-
chart:
|
|
1640
|
-
append:
|
|
1638
|
+
filters: A.filters,
|
|
1639
|
+
chart: A.chart,
|
|
1640
|
+
append: A.append
|
|
1641
1641
|
});
|
|
1642
1642
|
},
|
|
1643
1643
|
handleBackgroundClick: () => {
|
|
1644
|
-
|
|
1644
|
+
n("background-click");
|
|
1645
1645
|
},
|
|
1646
|
-
controlsVisible:
|
|
1647
|
-
onChartMouseEnter:
|
|
1648
|
-
onChartMouseLeave:
|
|
1646
|
+
controlsVisible: I,
|
|
1647
|
+
onChartMouseEnter: P,
|
|
1648
|
+
onChartMouseLeave: B
|
|
1649
1649
|
};
|
|
1650
1650
|
}
|
|
1651
|
-
}),
|
|
1651
|
+
}), Ko = {
|
|
1652
1652
|
key: 2,
|
|
1653
1653
|
class: "loading-overlay"
|
|
1654
1654
|
};
|
|
1655
|
-
function
|
|
1656
|
-
const s =
|
|
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:
|
|
1660
|
-
onMouseenter:
|
|
1661
|
-
onMouseleave:
|
|
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(),
|
|
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(),
|
|
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",
|
|
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
|
|
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
|
-
},
|
|
1692
|
+
}, Yo = { class: "grid-item-header-left" }, Zo = {
|
|
1693
1693
|
key: 0,
|
|
1694
1694
|
class: "drag-handle-icon grid-item-drag-handle"
|
|
1695
|
-
},
|
|
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
|
-
},
|
|
1698
|
+
}, nn = ["id", "placeholder"], rn = { class: "grid-item-header-right" }, ln = {
|
|
1699
1699
|
key: 0,
|
|
1700
1700
|
class: "header-filters no-drag"
|
|
1701
|
-
},
|
|
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
|
-
},
|
|
1704
|
+
}, wn = {
|
|
1705
1705
|
key: 1,
|
|
1706
1706
|
class: "mdi mdi-filter-outline icon"
|
|
1707
|
-
},
|
|
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:
|
|
1720
|
-
const
|
|
1721
|
-
function v(
|
|
1722
|
-
return
|
|
1723
|
-
}
|
|
1724
|
-
function
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
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
|
|
1732
|
+
function b() {
|
|
1737
1733
|
if (r.value) {
|
|
1738
|
-
const
|
|
1739
|
-
|
|
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
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1745
|
-
allowCrossFilter:
|
|
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
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1744
|
+
function V() {
|
|
1745
|
+
const K = o.item.h + 1;
|
|
1746
|
+
o.setItemData(o.item.i, o.dashboardId, {
|
|
1751
1747
|
dimensions: {
|
|
1752
|
-
width:
|
|
1753
|
-
height:
|
|
1748
|
+
width: o.item.w,
|
|
1749
|
+
height: K
|
|
1754
1750
|
}
|
|
1755
1751
|
});
|
|
1756
1752
|
}
|
|
1757
|
-
function
|
|
1758
|
-
const
|
|
1759
|
-
|
|
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:
|
|
1762
|
-
height:
|
|
1757
|
+
width: o.item.w,
|
|
1758
|
+
height: K
|
|
1763
1759
|
}
|
|
1764
1760
|
});
|
|
1765
1761
|
}
|
|
1766
|
-
function
|
|
1762
|
+
function M() {
|
|
1767
1763
|
r.value = !1;
|
|
1768
1764
|
}
|
|
1769
|
-
function
|
|
1770
|
-
if (
|
|
1771
|
-
|
|
1765
|
+
function I() {
|
|
1766
|
+
if (C.value) {
|
|
1767
|
+
k();
|
|
1772
1768
|
return;
|
|
1773
1769
|
}
|
|
1774
|
-
l("edit-content",
|
|
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("
|
|
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
|
|
1783
|
-
l("dimension-click",
|
|
1778
|
+
function B(K) {
|
|
1779
|
+
l("dimension-click", K);
|
|
1784
1780
|
}
|
|
1785
|
-
function
|
|
1786
|
-
l("background-click",
|
|
1781
|
+
function L() {
|
|
1782
|
+
l("background-click", o.item.i);
|
|
1787
1783
|
}
|
|
1788
|
-
function
|
|
1789
|
-
l("remove-filter",
|
|
1784
|
+
function g(K) {
|
|
1785
|
+
l("remove-filter", o.item.i, K);
|
|
1790
1786
|
}
|
|
1791
|
-
const
|
|
1792
|
-
switch (
|
|
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
|
|
1790
|
+
return Eo;
|
|
1795
1791
|
case w.TABLE:
|
|
1796
|
-
return
|
|
1792
|
+
return Ao;
|
|
1797
1793
|
case w.FILTER:
|
|
1798
|
-
return
|
|
1794
|
+
return Uo;
|
|
1799
1795
|
case w.SECTION_HEADER:
|
|
1800
1796
|
return null;
|
|
1801
1797
|
case w.MARKDOWN:
|
|
1802
1798
|
default:
|
|
1803
|
-
return $
|
|
1799
|
+
return $o;
|
|
1804
1800
|
}
|
|
1805
|
-
}),
|
|
1806
|
-
switch (
|
|
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
|
-
}),
|
|
1820
|
-
function
|
|
1821
|
-
var
|
|
1822
|
-
const
|
|
1823
|
-
if (!
|
|
1824
|
-
return { text:
|
|
1825
|
-
const le =
|
|
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:
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1830
|
-
text:
|
|
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:
|
|
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
|
-
|
|
1835
|
+
s.value = !0, h.value = !1;
|
|
1837
1836
|
}
|
|
1838
1837
|
function Re() {
|
|
1839
|
-
s.value = !
|
|
1838
|
+
s.value = !1, h.value = !1;
|
|
1840
1839
|
}
|
|
1841
|
-
|
|
1842
|
-
|
|
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
|
-
}), (
|
|
1848
|
-
class:
|
|
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
|
-
|
|
1847
|
+
A.value.type
|
|
1852
1848
|
),
|
|
1853
|
-
"grid-item-section-header-style":
|
|
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:
|
|
1858
|
-
onMouseleave:
|
|
1853
|
+
onMouseenter: Me,
|
|
1854
|
+
onMouseleave: Re
|
|
1859
1855
|
}, [
|
|
1860
|
-
e.editMode &&
|
|
1856
|
+
e.editMode && C.value ? (m(), y("div", {
|
|
1861
1857
|
key: 0,
|
|
1862
|
-
class:
|
|
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:
|
|
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
|
-
}, [...
|
|
1871
|
+
}, [...x[2] || (x[2] = [
|
|
1876
1872
|
t("i", { class: "mdi mdi-pencil-outline icon" }, null, -1)
|
|
1877
|
-
])], 8,
|
|
1873
|
+
])], 8, _o),
|
|
1878
1874
|
t("button", {
|
|
1879
|
-
onClick:
|
|
1875
|
+
onClick: P,
|
|
1880
1876
|
class: "control-btn",
|
|
1881
1877
|
"data-testid": `copy-dashboard-item-${e.item.i}`,
|
|
1882
1878
|
title: "Copy item"
|
|
1883
|
-
}, [...
|
|
1879
|
+
}, [...x[3] || (x[3] = [
|
|
1884
1880
|
t("i", { class: "mdi mdi-content-copy icon" }, null, -1)
|
|
1885
|
-
])], 8,
|
|
1881
|
+
])], 8, Go),
|
|
1886
1882
|
t("button", {
|
|
1887
|
-
onClick:
|
|
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
|
-
}, [...
|
|
1887
|
+
}, [...x[4] || (x[4] = [
|
|
1892
1888
|
t("i", { class: "mdi mdi-delete-outline icon" }, null, -1)
|
|
1893
|
-
])], 8,
|
|
1889
|
+
])], 8, zo)
|
|
1894
1890
|
], 512)
|
|
1895
1891
|
], 2)) : R("", !0),
|
|
1896
|
-
|
|
1897
|
-
t("div",
|
|
1898
|
-
e.editMode ? (m(), y("div",
|
|
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",
|
|
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":
|
|
1936
|
-
onBlur:
|
|
1931
|
+
"onUpdate:modelValue": x[0] || (x[0] = (W) => i.value = W),
|
|
1932
|
+
onBlur: b,
|
|
1937
1933
|
onKeyup: [
|
|
1938
|
-
ye(
|
|
1939
|
-
ye(
|
|
1934
|
+
ye(b, ["enter"]),
|
|
1935
|
+
ye(M, ["esc"])
|
|
1940
1936
|
],
|
|
1941
1937
|
class: "title-input",
|
|
1942
1938
|
type: "text",
|
|
1943
|
-
placeholder:
|
|
1944
|
-
}, null, 40,
|
|
1945
|
-
[
|
|
1939
|
+
placeholder: T.value
|
|
1940
|
+
}, null, 40, nn)), [
|
|
1941
|
+
[ve, i.value]
|
|
1946
1942
|
]) : (m(), y("div", {
|
|
1947
1943
|
key: 0,
|
|
1948
|
-
class:
|
|
1949
|
-
title:
|
|
1950
|
-
onClick:
|
|
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",
|
|
1953
|
-
e.editMode ? (m(), y("i",
|
|
1954
|
-
], 10,
|
|
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",
|
|
1958
|
-
|
|
1959
|
-
(m(!0), y(me, null,
|
|
1960
|
-
key: `${
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
},
|
|
1964
|
-
|
|
1965
|
-
t("
|
|
1966
|
-
|
|
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
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
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
|
-
|
|
1978
|
-
|
|
1979
|
-
},
|
|
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:
|
|
1990
|
+
class: q(["content-area", { "section-header-content": C.value }])
|
|
1985
1991
|
}, [
|
|
1986
|
-
|
|
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":
|
|
1991
|
-
onBlur:
|
|
1996
|
+
"onUpdate:modelValue": x[1] || (x[1] = (W) => i.value = W),
|
|
1997
|
+
onBlur: b,
|
|
1992
1998
|
onKeyup: [
|
|
1993
|
-
ye(
|
|
1994
|
-
ye(
|
|
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:
|
|
1999
|
-
}, null, 40,
|
|
2000
|
-
[
|
|
2004
|
+
placeholder: T.value
|
|
2005
|
+
}, null, 40, vn)), [
|
|
2006
|
+
[ve, i.value]
|
|
2001
2007
|
]) : (m(), y("div", {
|
|
2002
2008
|
key: 0,
|
|
2003
|
-
class:
|
|
2004
|
-
title:
|
|
2005
|
-
onClick:
|
|
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",
|
|
2008
|
-
], 10,
|
|
2009
|
-
], 64)) : (m(),
|
|
2013
|
+
t("span", fn, N(oe.value), 1)
|
|
2014
|
+
], 10, hn))
|
|
2015
|
+
], 64)) : (m(), _(it(f.value), {
|
|
2010
2016
|
key: 1,
|
|
2011
|
-
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:
|
|
2018
|
-
onDimensionClick:
|
|
2019
|
-
onBackgroundClick:
|
|
2023
|
+
symbols: o.symbols || [],
|
|
2024
|
+
onDimensionClick: B,
|
|
2025
|
+
onBackgroundClick: L
|
|
2020
2026
|
}, null, 40, ["dashboardId", "itemId", "setItemData", "getItemData", "getDashboardQueryExecutor", "editMode", "symbols"])),
|
|
2021
|
-
e.editMode && !
|
|
2027
|
+
e.editMode && !C.value ? (m(), y("div", {
|
|
2022
2028
|
key: 2,
|
|
2023
|
-
class:
|
|
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:
|
|
2038
|
+
onClick: V,
|
|
2033
2039
|
class: "control-btn",
|
|
2034
2040
|
"data-testid": `increase-height-item-${e.item.i}`,
|
|
2035
2041
|
title: "Increase height"
|
|
2036
|
-
}, [...
|
|
2042
|
+
}, [...x[6] || (x[6] = [
|
|
2037
2043
|
t("i", { class: "mdi mdi-plus icon" }, null, -1)
|
|
2038
|
-
])], 8,
|
|
2044
|
+
])], 8, pn),
|
|
2039
2045
|
t("button", {
|
|
2040
|
-
onClick:
|
|
2046
|
+
onClick: S,
|
|
2041
2047
|
class: "control-btn",
|
|
2042
2048
|
"data-testid": `decrease-height-item-${e.item.i}`,
|
|
2043
2049
|
title: "Decrease height"
|
|
2044
|
-
}, [...
|
|
2050
|
+
}, [...x[7] || (x[7] = [
|
|
2045
2051
|
t("i", { class: "mdi mdi-minus icon" }, null, -1)
|
|
2046
|
-
])], 8,
|
|
2052
|
+
])], 8, yn),
|
|
2047
2053
|
t("button", {
|
|
2048
|
-
onClick:
|
|
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
|
-
}, [...
|
|
2058
|
+
}, [...x[8] || (x[8] = [
|
|
2053
2059
|
t("i", { class: "mdi mdi-database-edit-outline icon" }, null, -1)
|
|
2054
|
-
])], 8,
|
|
2060
|
+
])], 8, gn),
|
|
2055
2061
|
t("button", {
|
|
2056
|
-
onClick:
|
|
2062
|
+
onClick: E,
|
|
2057
2063
|
class: "control-btn",
|
|
2058
2064
|
"data-testid": `toggle-crossfilter-item-content-${e.item.i}`,
|
|
2059
|
-
title:
|
|
2065
|
+
title: A.value.allowCrossFilter ? "Toggle cross-filtering OFF" : "Toggle cross-filtering ON"
|
|
2060
2066
|
}, [
|
|
2061
|
-
|
|
2062
|
-
], 8,
|
|
2067
|
+
A.value.allowCrossFilter ? (m(), y("i", Cn)) : (m(), y("i", wn))
|
|
2068
|
+
], 8, bn),
|
|
2063
2069
|
t("button", {
|
|
2064
|
-
onClick:
|
|
2070
|
+
onClick: P,
|
|
2065
2071
|
class: "control-btn",
|
|
2066
2072
|
"data-testid": `copy-dashboard-item-${e.item.i}`,
|
|
2067
2073
|
title: "Copy item"
|
|
2068
|
-
}, [...
|
|
2074
|
+
}, [...x[9] || (x[9] = [
|
|
2069
2075
|
t("i", { class: "mdi mdi-content-copy icon" }, null, -1)
|
|
2070
|
-
])], 8,
|
|
2076
|
+
])], 8, kn),
|
|
2071
2077
|
t("button", {
|
|
2072
|
-
onClick:
|
|
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
|
-
}, [...
|
|
2082
|
+
}, [...x[10] || (x[10] = [
|
|
2077
2083
|
t("i", { class: "mdi mdi-delete-outline icon" }, null, -1)
|
|
2078
|
-
])], 8,
|
|
2084
|
+
])], 8, Sn)
|
|
2079
2085
|
], 512)
|
|
2080
2086
|
], 2)) : R("", !0)
|
|
2081
2087
|
], 2)
|
|
2082
|
-
], 42,
|
|
2088
|
+
], 42, jo));
|
|
2083
2089
|
}
|
|
2084
|
-
}), Wi = /* @__PURE__ */ Y(
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
2098
|
-
const
|
|
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
|
-
|
|
2142
|
+
o("add", l.value);
|
|
2137
2143
|
}
|
|
2138
2144
|
function s() {
|
|
2139
|
-
|
|
2145
|
+
o("close");
|
|
2140
2146
|
}
|
|
2141
|
-
return (
|
|
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:
|
|
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:
|
|
2160
|
-
t("div",
|
|
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",
|
|
2163
|
-
(m(), y(me, null,
|
|
2168
|
+
t("div", Tn, [
|
|
2169
|
+
(m(), y(me, null, Ce(r, (a) => t("label", {
|
|
2164
2170
|
key: a.value,
|
|
2165
|
-
class:
|
|
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, $
|
|
2181
|
+
}, null, 8, $n), [
|
|
2176
2182
|
[rt, l.value]
|
|
2177
2183
|
]),
|
|
2178
|
-
t("span",
|
|
2179
|
-
t("span",
|
|
2184
|
+
t("span", Ln, [
|
|
2185
|
+
t("span", Mn, [
|
|
2180
2186
|
t("i", {
|
|
2181
|
-
class:
|
|
2187
|
+
class: q(["mdi", a.icon])
|
|
2182
2188
|
}, null, 2)
|
|
2183
2189
|
]),
|
|
2184
|
-
t("span",
|
|
2185
|
-
t("span",
|
|
2186
|
-
t("span",
|
|
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,
|
|
2195
|
+
], 10, In)), 64))
|
|
2190
2196
|
])
|
|
2191
2197
|
])
|
|
2192
2198
|
]),
|
|
2193
2199
|
_: 1
|
|
2194
2200
|
}, 8, ["show"]));
|
|
2195
2201
|
}
|
|
2196
|
-
}), Ui = /* @__PURE__ */ Y(
|
|
2197
|
-
function
|
|
2198
|
-
const
|
|
2199
|
-
|
|
2200
|
-
base:
|
|
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":
|
|
2217
|
-
"editor.foreground":
|
|
2218
|
-
"editorLineNumber.foreground":
|
|
2219
|
-
"editorLineNumber.activeForeground":
|
|
2220
|
-
"editorGutter.background":
|
|
2221
|
-
editorLineHighlightBackground:
|
|
2222
|
-
"editor.selectionBackground":
|
|
2223
|
-
"editor.inactiveSelectionBackground":
|
|
2224
|
-
"editorCursor.foreground":
|
|
2225
|
-
"editorCursor.background":
|
|
2226
|
-
"editorIndentGuide.background1":
|
|
2227
|
-
"editorIndentGuide.activeBackground1":
|
|
2228
|
-
"editorWhitespace.foreground":
|
|
2229
|
-
"editorWidget.background":
|
|
2230
|
-
"editorWidget.border":
|
|
2231
|
-
}
|
|
2232
|
-
}),
|
|
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
|
|
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
|
-
}, ...
|
|
2244
|
-
return
|
|
2249
|
+
}, ...n };
|
|
2250
|
+
return Ee.create(e, l);
|
|
2245
2251
|
}
|
|
2246
|
-
function Ue(e,
|
|
2252
|
+
function Ue(e, n = "") {
|
|
2247
2253
|
var r;
|
|
2248
|
-
if (!e) return
|
|
2249
|
-
const
|
|
2250
|
-
let l =
|
|
2251
|
-
return l || (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
|
|
2254
|
-
const { onValidate:
|
|
2255
|
-
if (
|
|
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
|
-
}),
|
|
2263
|
+
}), n.onContentChange) {
|
|
2258
2264
|
let i = null;
|
|
2259
2265
|
e.onDidChangeModelContent(() => {
|
|
2260
2266
|
var s;
|
|
2261
|
-
(s =
|
|
2262
|
-
var
|
|
2263
|
-
e.hasTextFocus() && !((
|
|
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
|
|
2275
|
+
const Vn = J({
|
|
2270
2276
|
name: "EnhancedEditor",
|
|
2271
2277
|
components: {
|
|
2272
2278
|
SymbolsPane: Dt,
|
|
2273
|
-
LoadingView:
|
|
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"),
|
|
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:
|
|
2327
|
-
isMobile:
|
|
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
|
|
2355
|
-
const e = this.theme === "light" || this.theme === "dark" ? this.theme : "",
|
|
2356
|
-
return (e ||
|
|
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
|
-
|
|
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 =
|
|
2389
|
+
this.applyEditorTheme(), F = Hn(this.$refs.editorElement, {
|
|
2384
2390
|
value: this.editor.contents || "",
|
|
2385
2391
|
language: this.editor.type === "sql" ? "sql" : "trilogy"
|
|
2386
|
-
}),
|
|
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 |
|
|
2397
|
+
}), F.addCommand(se.CtrlCmd | fe.Space, () => {
|
|
2392
2398
|
this.togglePanel("symbols");
|
|
2393
|
-
}), F.addCommand(se.CtrlCmd | se.Shift |
|
|
2399
|
+
}), F.addCommand(se.CtrlCmd | se.Shift | fe.Enter, () => {
|
|
2394
2400
|
this.generateLLMQuery();
|
|
2395
|
-
}), this.editor.type !== "sql" && (F.addCommand(se.CtrlCmd |
|
|
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
|
|
2417
|
-
|
|
2422
|
+
const n = F.getPosition();
|
|
2423
|
+
n && e.insertText && (F.executeEdits("", [
|
|
2418
2424
|
{
|
|
2419
2425
|
range: new St(
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
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
|
|
2437
|
+
const n = this.connectionStore, o = this.queryExecutionService;
|
|
2432
2438
|
try {
|
|
2433
2439
|
this.editor.setError(null);
|
|
2434
|
-
const l = F.getValue(), r =
|
|
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
|
|
2447
|
+
}, s = await o.validateQuery(
|
|
2442
2448
|
this.editor.connection,
|
|
2443
2449
|
i
|
|
2444
2450
|
);
|
|
2445
2451
|
if (s && e) {
|
|
2446
|
-
const
|
|
2447
|
-
|
|
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,
|
|
2457
|
-
if (!
|
|
2458
|
-
let
|
|
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
|
-
|
|
2463
|
-
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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
|
-
(
|
|
2502
|
-
!e &&
|
|
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
|
-
|
|
2512
|
+
k.isActive() && k.cancel(), this.editor.loading = !1, this.editor.cancelCallback = null;
|
|
2507
2513
|
};
|
|
2508
|
-
const
|
|
2514
|
+
const b = await v;
|
|
2509
2515
|
e = !0, this.lastOperation = {
|
|
2510
|
-
success:
|
|
2511
|
-
duration:
|
|
2512
|
-
rows: (r =
|
|
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
|
-
},
|
|
2515
|
-
} catch (
|
|
2516
|
-
|
|
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,
|
|
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((
|
|
2539
|
-
name:
|
|
2540
|
-
type:
|
|
2541
|
-
description:
|
|
2542
|
-
calculation:
|
|
2543
|
-
})), i = async (
|
|
2544
|
-
const c =
|
|
2545
|
-
text:
|
|
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
|
|
2558
|
+
const { resultPromise: v } = await n.executeQuery(
|
|
2553
2559
|
this.editor.connection,
|
|
2554
2560
|
a,
|
|
2555
2561
|
() => {
|
|
2556
2562
|
},
|
|
2557
2563
|
() => {
|
|
2558
2564
|
},
|
|
2559
|
-
(
|
|
2560
|
-
throw
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
2604
|
+
}, Gn = {
|
|
2599
2605
|
key: 2,
|
|
2600
2606
|
class: "results-summary",
|
|
2601
2607
|
"data-testid": "simple-editor-results"
|
|
2602
|
-
},
|
|
2608
|
+
}, zn = { class: "results-details" }, Jn = {
|
|
2603
2609
|
key: 0,
|
|
2604
2610
|
class: "timing"
|
|
2605
|
-
},
|
|
2611
|
+
}, Yn = {
|
|
2606
2612
|
key: 1,
|
|
2607
2613
|
class: "row-count"
|
|
2608
|
-
},
|
|
2614
|
+
}, Zn = {
|
|
2609
2615
|
key: 2,
|
|
2610
2616
|
class: "operation-type"
|
|
2611
2617
|
};
|
|
2612
|
-
function
|
|
2613
|
-
const s =
|
|
2614
|
-
return m(), y("div",
|
|
2615
|
-
t("div",
|
|
2616
|
-
t("div",
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
2636
|
-
class:
|
|
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",
|
|
2647
|
+
t("div", Pn, [
|
|
2642
2648
|
t("div", {
|
|
2643
2649
|
ref: "editorElement",
|
|
2644
|
-
class:
|
|
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",
|
|
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",
|
|
2660
|
-
t("div",
|
|
2665
|
+
t("div", Wn, [
|
|
2666
|
+
t("div", Un, [
|
|
2661
2667
|
t("button", {
|
|
2662
|
-
class:
|
|
2663
|
-
onClick:
|
|
2668
|
+
class: q(["sidebar-icon-button", { active: e.isPanelVisible }]),
|
|
2669
|
+
onClick: n[4] || (n[4] = (c) => e.togglePanel("symbols")),
|
|
2664
2670
|
title: "Symbols"
|
|
2665
|
-
}, [...
|
|
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",
|
|
2672
|
-
e.editor.loading ? (m(),
|
|
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",
|
|
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:
|
|
2685
|
+
class: q(["status-badge", e.lastOperation.success ? "success" : "error"])
|
|
2680
2686
|
}, N(e.lastOperation.success ? "SUCCESS" : "FAILED"), 3),
|
|
2681
|
-
t("div",
|
|
2682
|
-
e.lastOperation.duration ? (m(), y("div",
|
|
2683
|
-
e.lastOperation.rows !== void 0 ? (m(), y("div",
|
|
2684
|
-
e.lastOperation.type ? (m(), y("div",
|
|
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(
|
|
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:
|
|
2702
|
-
const
|
|
2703
|
-
initialWidth:
|
|
2704
|
-
initialHeight:
|
|
2705
|
-
minWidth:
|
|
2706
|
-
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 (
|
|
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:
|
|
2719
|
+
style: De(ie(i))
|
|
2714
2720
|
}, [
|
|
2715
|
-
Ne(
|
|
2721
|
+
Ne(h.$slots, "default", {}, void 0, !0),
|
|
2716
2722
|
t("div", ti, [
|
|
2717
|
-
Ne(
|
|
2723
|
+
Ne(h.$slots, "actions", {}, () => [
|
|
2718
2724
|
t("button", {
|
|
2719
2725
|
class: "save-button",
|
|
2720
|
-
"data-testid":
|
|
2726
|
+
"data-testid": o.saveTestId || void 0,
|
|
2721
2727
|
onClick: c[0] || (c[0] = (a) => l("save"))
|
|
2722
|
-
}, N(
|
|
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(
|
|
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:
|
|
2745
|
-
const
|
|
2746
|
-
function
|
|
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(),
|
|
2753
|
-
initialWidth:
|
|
2754
|
-
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:
|
|
2763
|
+
onSave: h,
|
|
2758
2764
|
onCancel: c
|
|
2759
2765
|
}, {
|
|
2760
|
-
default:
|
|
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:
|
|
2794
|
-
const
|
|
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
|
-
() =>
|
|
2797
|
-
(
|
|
2798
|
-
const g = typeof
|
|
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, (
|
|
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
|
|
2816
|
+
function k() {
|
|
2811
2817
|
l("cancel");
|
|
2812
2818
|
}
|
|
2813
|
-
function
|
|
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
|
|
2817
|
-
const
|
|
2818
|
-
if (!
|
|
2819
|
-
const
|
|
2820
|
-
i.value =
|
|
2821
|
-
|
|
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
|
-
|
|
2831
|
+
E("**", "**");
|
|
2826
2832
|
}
|
|
2827
|
-
function
|
|
2828
|
-
|
|
2833
|
+
function S() {
|
|
2834
|
+
E("*", "*");
|
|
2829
2835
|
}
|
|
2830
2836
|
function M() {
|
|
2831
|
-
|
|
2837
|
+
E("## ");
|
|
2832
2838
|
}
|
|
2833
|
-
function
|
|
2834
|
-
|
|
2839
|
+
function I() {
|
|
2840
|
+
E("- ");
|
|
2835
2841
|
}
|
|
2836
|
-
function
|
|
2837
|
-
|
|
2842
|
+
function O() {
|
|
2843
|
+
E("[", "](url)");
|
|
2838
2844
|
}
|
|
2839
|
-
function
|
|
2840
|
-
|
|
2845
|
+
function P() {
|
|
2846
|
+
E("{data[0].field_name}");
|
|
2841
2847
|
}
|
|
2842
|
-
function
|
|
2843
|
-
|
|
2848
|
+
function B() {
|
|
2849
|
+
E(`{{#each data}}
|
|
2844
2850
|
- {{field_name}}
|
|
2845
2851
|
{{/each}}`);
|
|
2846
2852
|
}
|
|
2847
|
-
return (
|
|
2848
|
-
initialWidth:
|
|
2849
|
-
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:
|
|
2859
|
+
onCancel: k
|
|
2854
2860
|
}, {
|
|
2855
|
-
default:
|
|
2861
|
+
default: ee(() => [
|
|
2856
2862
|
t("div", li, [
|
|
2857
2863
|
t("button", {
|
|
2858
|
-
onClick: g[0] || (g[0] = (
|
|
2859
|
-
class:
|
|
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] = (
|
|
2866
|
-
class:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
2911
|
+
onClick: P,
|
|
2906
2912
|
title: "Insert data reference",
|
|
2907
2913
|
class: "data-button"
|
|
2908
2914
|
}, " {} "),
|
|
2909
2915
|
t("button", {
|
|
2910
|
-
onClick:
|
|
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] = (
|
|
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
|
-
[
|
|
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:
|
|
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
|
-
}),
|
|
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,
|
|
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:
|
|
2964
|
-
const
|
|
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 (!
|
|
2973
|
+
if (!o || !r || !i || !s)
|
|
2968
2974
|
throw new Error("DashboardStore, LLMConnectionStore, or QueryExecutionService not provided");
|
|
2969
|
-
const
|
|
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:
|
|
2979
|
-
{ i: "kpi3", x:
|
|
2980
|
-
{ i: "kpi4", x:
|
|
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
|
|
3035
|
-
V.value =
|
|
3036
|
-
const
|
|
3037
|
-
if (
|
|
3038
|
-
for (const g of
|
|
3039
|
-
|
|
3040
|
-
|
|
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",
|
|
3053
|
+
a("template-selected", B);
|
|
3048
3054
|
}
|
|
3049
3055
|
}
|
|
3050
|
-
function
|
|
3051
|
-
|
|
3056
|
+
function O() {
|
|
3057
|
+
h.dashboardId && v.value && (o.updateDashboardDescription(h.dashboardId, v.value), a("description-updated", v.value));
|
|
3052
3058
|
}
|
|
3053
|
-
async function
|
|
3054
|
-
if (!
|
|
3055
|
-
|
|
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
|
-
|
|
3060
|
-
const
|
|
3061
|
-
|
|
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:",
|
|
3067
|
-
|
|
3068
|
-
|
|
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 &&
|
|
3073
|
-
} catch (
|
|
3074
|
-
console.error("Error generating dashboard with LLM:",
|
|
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
|
-
|
|
3082
|
+
b.value = !1;
|
|
3077
3083
|
}
|
|
3078
3084
|
}
|
|
3079
|
-
return (
|
|
3080
|
-
|
|
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
|
-
|
|
3091
|
+
L[3] || (L[3] = t("h3", { class: "section-title" }, "Description", -1)),
|
|
3086
3092
|
ue(t("textarea", {
|
|
3087
|
-
"onUpdate:modelValue":
|
|
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
|
-
[
|
|
3098
|
+
[ve, v.value]
|
|
3093
3099
|
]),
|
|
3094
3100
|
t("button", {
|
|
3095
|
-
onClick:
|
|
3101
|
+
onClick: O,
|
|
3096
3102
|
class: "action-button save-button",
|
|
3097
3103
|
"data-testid": "dashboard-description-save"
|
|
3098
|
-
}, [
|
|
3104
|
+
}, [...L[2] || (L[2] = [
|
|
3099
3105
|
t("i", { class: "mdi mdi-content-save" }, null, -1),
|
|
3100
|
-
|
|
3106
|
+
be(" Save ", -1)
|
|
3101
3107
|
])])
|
|
3102
3108
|
]),
|
|
3103
3109
|
c.value ? (m(), y("div", hi, [
|
|
3104
|
-
|
|
3105
|
-
|
|
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":
|
|
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
|
-
[
|
|
3119
|
+
[ve, k.value]
|
|
3114
3120
|
]),
|
|
3115
3121
|
t("div", fi, [
|
|
3116
3122
|
t("button", {
|
|
3117
|
-
onClick:
|
|
3123
|
+
onClick: P,
|
|
3118
3124
|
class: "action-button llm-button",
|
|
3119
|
-
disabled:
|
|
3125
|
+
disabled: b.value || !k.value.trim(),
|
|
3120
3126
|
"data-testid": "generate-with-llm-button"
|
|
3121
3127
|
}, [
|
|
3122
3128
|
t("i", {
|
|
3123
|
-
class:
|
|
3129
|
+
class: q(["mdi", b.value ? "mdi-loading mdi-spin" : "mdi-creation"])
|
|
3124
3130
|
}, null, 2),
|
|
3125
|
-
|
|
3131
|
+
be(" " + N(b.value ? "Generating..." : "Generate with AI"), 1)
|
|
3126
3132
|
], 8, vi),
|
|
3127
|
-
|
|
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
|
-
|
|
3137
|
+
L[6] || (L[6] = t("h3", { class: "section-title" }, "Templates", -1)),
|
|
3132
3138
|
t("div", gi, [
|
|
3133
|
-
(m(), y(me, null,
|
|
3139
|
+
(m(), y(me, null, Ce(M, (g) => t("div", {
|
|
3134
3140
|
key: g.id,
|
|
3135
|
-
class:
|
|
3136
|
-
onClick: (
|
|
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:
|
|
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,
|
|
3155
|
-
const r = ht(), i =
|
|
3160
|
+
function zi(e, n, o, l) {
|
|
3161
|
+
const r = ht(), i = _e();
|
|
3156
3162
|
let s = j("queryExecutionService");
|
|
3157
|
-
const { setActiveDashboard:
|
|
3163
|
+
const { setActiveDashboard: h } = Ge();
|
|
3158
3164
|
if (!s)
|
|
3159
3165
|
throw new Error("QueryExecutionService not provided");
|
|
3160
|
-
const c =
|
|
3161
|
-
var
|
|
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: ((
|
|
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
|
|
3174
|
+
function A(u) {
|
|
3169
3175
|
if (!(u != null && u.id)) return;
|
|
3170
|
-
u.state === "fullscreen" &&
|
|
3171
|
-
const
|
|
3172
|
-
(
|
|
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
|
-
|
|
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,
|
|
3182
|
-
u && u !==
|
|
3187
|
+
(u, $) => {
|
|
3188
|
+
u && u !== $ && e.value && A(e.value);
|
|
3183
3189
|
}
|
|
3184
3190
|
), je(() => {
|
|
3185
|
-
e.value &&
|
|
3191
|
+
e.value && A(e.value);
|
|
3186
3192
|
const u = new ResizeObserver(() => {
|
|
3187
|
-
|
|
3188
|
-
}),
|
|
3193
|
+
o.triggerResize();
|
|
3194
|
+
}), $ = n.isMobile ? ".mobile-container" : ".grid-container", d = document.querySelector($);
|
|
3189
3195
|
d && u.observe(d);
|
|
3190
3196
|
}), at(() => {
|
|
3191
|
-
|
|
3197
|
+
k.value !== null && clearTimeout(k.value);
|
|
3192
3198
|
});
|
|
3193
|
-
async function
|
|
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
|
|
3198
|
-
await ((u = r.getQueryExecutor(e.value.id)) == null ? void 0 : u.runBatch(
|
|
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
|
|
3202
|
-
var
|
|
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 ((
|
|
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
|
|
3223
|
-
(d = r.getQueryExecutor(e.value.id)) == null || d.runBatch(
|
|
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
|
|
3228
|
-
let
|
|
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: [
|
|
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
|
|
3252
|
-
if (!
|
|
3257
|
+
let H = await d.resultPromise;
|
|
3258
|
+
if (!H.success)
|
|
3253
3259
|
throw new Error(
|
|
3254
|
-
`Validation of "select 1 as test ${
|
|
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
|
|
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
|
|
3270
|
-
e.value && e.value.id && (r.updateDashboardImports(e.value.id, u), await
|
|
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
|
-
|
|
3280
|
+
o.triggerResize();
|
|
3275
3281
|
}));
|
|
3276
|
-
},
|
|
3282
|
+
}, pe = (u) => {
|
|
3277
3283
|
e.value && e.value.id && r.updateDashboardLayout(e.value.id, u);
|
|
3278
3284
|
};
|
|
3279
|
-
function
|
|
3280
|
-
|
|
3285
|
+
function ke() {
|
|
3286
|
+
S.value = !0;
|
|
3281
3287
|
}
|
|
3282
|
-
function
|
|
3288
|
+
function G(u = w.CHART) {
|
|
3283
3289
|
if (!e.value || !e.value.id) return;
|
|
3284
|
-
const
|
|
3285
|
-
|
|
3286
|
-
|
|
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
|
|
3298
|
+
function re() {
|
|
3293
3299
|
!e.value || !e.value.id || r.clearDashboardItems(e.value.id);
|
|
3294
3300
|
}
|
|
3295
|
-
function
|
|
3301
|
+
function X(u) {
|
|
3296
3302
|
!e.value || !e.value.id || r.removeItemFromDashboard(e.value.id, u);
|
|
3297
3303
|
}
|
|
3298
|
-
function
|
|
3304
|
+
function Le(u) {
|
|
3299
3305
|
!e.value || !e.value.id || r.copyItemInDashboard(e.value.id, u);
|
|
3300
3306
|
}
|
|
3301
3307
|
function Me() {
|
|
3302
|
-
|
|
3308
|
+
S.value = !1;
|
|
3303
3309
|
}
|
|
3304
3310
|
function Re(u) {
|
|
3305
|
-
if (
|
|
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 ?
|
|
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
|
|
3310
|
-
if (!e.value || !e.value.id || !
|
|
3311
|
-
const
|
|
3312
|
-
|
|
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
|
|
3315
|
-
|
|
3320
|
+
function x() {
|
|
3321
|
+
E.value = !1, V.value = !1, b.value = null;
|
|
3316
3322
|
}
|
|
3317
|
-
function
|
|
3318
|
-
if (
|
|
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
|
|
3363
|
-
let ae =
|
|
3364
|
-
e.value.filter && (
|
|
3365
|
-
(
|
|
3368
|
+
const H = d.filters || [];
|
|
3369
|
+
let ae = H;
|
|
3370
|
+
e.value.filter && (H.some(
|
|
3371
|
+
(Ve) => {
|
|
3366
3372
|
var Qe;
|
|
3367
|
-
return
|
|
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" }, ...
|
|
3370
|
-
function
|
|
3371
|
-
return
|
|
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
|
|
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 && (
|
|
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
|
|
3382
|
-
return
|
|
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:
|
|
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:
|
|
3400
|
+
chartConfig: Oe,
|
|
3395
3401
|
filters: ae,
|
|
3396
3402
|
chartFilters: d.chartFilters || [],
|
|
3397
3403
|
conceptFilters: d.conceptFilters || [],
|
|
3398
3404
|
parameters: d.parameters || {},
|
|
3399
|
-
onRefresh:
|
|
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:
|
|
3414
|
+
hasDrilldown: qe
|
|
3409
3415
|
};
|
|
3410
3416
|
}
|
|
3411
|
-
function
|
|
3417
|
+
function le(u, $, d) {
|
|
3412
3418
|
if (!e.value || !e.value.id) return;
|
|
3413
|
-
if (
|
|
3419
|
+
if (!$ || e.value.id !== $) {
|
|
3414
3420
|
console.warn(
|
|
3415
3421
|
"Dashboard ID mismatch. Cannot set item data. Given:",
|
|
3416
|
-
|
|
3422
|
+
$,
|
|
3417
3423
|
"Expected:",
|
|
3418
3424
|
e.value.id
|
|
3419
3425
|
);
|
|
3420
3426
|
return;
|
|
3421
3427
|
}
|
|
3422
|
-
const
|
|
3423
|
-
if (d.name && (
|
|
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 && (
|
|
3427
|
-
let ae =
|
|
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
|
|
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
|
|
3441
|
+
let $ = r.dashboards[u];
|
|
3436
3442
|
const d = r.getOrCreateQueryExecutor(u, {
|
|
3437
3443
|
queryExecutionService: s,
|
|
3438
|
-
connectionName:
|
|
3444
|
+
connectionName: $.connection,
|
|
3439
3445
|
dashboardId: u,
|
|
3440
|
-
getDashboardData: (
|
|
3441
|
-
getItemData:
|
|
3442
|
-
setItemData:
|
|
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
|
|
3447
|
-
var
|
|
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), (
|
|
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
|
|
3452
|
-
var
|
|
3457
|
+
function xe(u) {
|
|
3458
|
+
var $, d;
|
|
3453
3459
|
if (e.value) {
|
|
3454
3460
|
if (u) {
|
|
3455
|
-
(
|
|
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
|
|
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
|
|
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(
|
|
3482
|
+
(ae = r.getQueryExecutor(e.value.id)) == null || ae.runBatch(H);
|
|
3477
3483
|
}
|
|
3478
|
-
function Xe(u,
|
|
3484
|
+
function Xe(u, $) {
|
|
3479
3485
|
var d;
|
|
3480
|
-
!e.value || !e.value.id || (r.removeItemCrossFilter(e.value.id, 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
|
|
3486
|
-
(d = r.getQueryExecutor(e.value.id)) == null || d.runBatch(
|
|
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
|
-
|
|
3495
|
+
h(u);
|
|
3490
3496
|
}
|
|
3491
3497
|
return {
|
|
3492
3498
|
// State
|
|
3493
3499
|
dashboard: e,
|
|
3494
|
-
layout:
|
|
3495
|
-
sortedLayout:
|
|
3496
|
-
editMode:
|
|
3497
|
-
selectedConnection:
|
|
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:
|
|
3502
|
-
showQueryEditor:
|
|
3507
|
+
showAddItemModal: S,
|
|
3508
|
+
showQueryEditor: E,
|
|
3503
3509
|
showMarkdownEditor: V,
|
|
3504
|
-
editingItem:
|
|
3505
|
-
dashboardMaxWidth:
|
|
3510
|
+
editingItem: b,
|
|
3511
|
+
dashboardMaxWidth: I,
|
|
3506
3512
|
rootContent: g,
|
|
3507
3513
|
// Methods
|
|
3508
|
-
handleFilterChange:
|
|
3509
|
-
handleFilterClear:
|
|
3510
|
-
handleImportChange:
|
|
3511
|
-
validateFilter:
|
|
3512
|
-
onConnectionChange:
|
|
3514
|
+
handleFilterChange: f,
|
|
3515
|
+
handleFilterClear: C,
|
|
3516
|
+
handleImportChange: ne,
|
|
3517
|
+
validateFilter: T,
|
|
3518
|
+
onConnectionChange: Se,
|
|
3513
3519
|
toggleMode: U,
|
|
3514
|
-
onLayoutUpdated:
|
|
3515
|
-
openAddItemModal:
|
|
3516
|
-
addItem:
|
|
3517
|
-
clearItems:
|
|
3518
|
-
removeItem:
|
|
3519
|
-
copyItem:
|
|
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:
|
|
3523
|
-
closeEditors:
|
|
3524
|
-
getDashboardQueryExecutor:
|
|
3525
|
-
getItemData:
|
|
3526
|
-
setItemData:
|
|
3527
|
-
handleRefresh:
|
|
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
|
-
|
|
3539
|
-
|
|
3544
|
+
_i as M,
|
|
3545
|
+
Gi as _,
|
|
3540
3546
|
Wi as a,
|
|
3541
3547
|
Ui as b,
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
$
|
|
3546
|
-
|
|
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
|
};
|