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