@trilogy-data/trilogy-studio-components 0.1.29 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/AssetAutoImporter-BA8C4p09.js +403 -0
- package/dist/{ChatCreatorModal-C0OHgrEB.js → ChatCreatorModal-94gZ9D-y.js} +1 -1
- package/dist/{CodeBlock-CS86Ipg1.js → CodeBlock-C9o09ipr.js} +1 -1
- package/dist/{CommunityModels-BxJKe8_v.js → CommunityModels-D48H9Bqt.js} +6 -6
- package/dist/{ConnectionView-D-1gQNQ7.js → ConnectionView-sEXGE8Vs.js} +5 -5
- package/dist/{CreateEditorFromDatasourcePopup-RkNgUdzU.js → CreateEditorFromDatasourcePopup-BUoegyem.js} +2 -2
- package/dist/{Dashboard-DWJPKIeQ.js → Dashboard-C6adKZ7q.js} +202 -203
- package/dist/{DashboardImportSelector-t6tKq5N4.js → DashboardImportSelector-CQqXshDj.js} +1 -1
- package/dist/{DashboardMobile-CxObMuv6.js → DashboardMobile-BU1nDLQv.js} +42 -42
- package/dist/{Editor-DD1inQuU.js → Editor-DO4VRvek.js} +9 -10
- package/dist/{ErrorMessage-D5JeF3Iz.js → ErrorMessage-Cz7q7vJI.js} +1 -1
- package/dist/{GlobalChatPanel-BArWsM8Y.js → GlobalChatPanel-Ct6oSj_A.js} +6 -6
- package/dist/{IDE-D5GKLVYn.js → IDE-kdaEhA4g.js} +19 -20
- package/dist/{JobsView-By7OZgj_.js → JobsView-BcyWrDRf.js} +11 -11
- package/dist/{LLMChat-B-q_7sa4.js → LLMChat-Dg8VvTIP.js} +19 -19
- package/dist/{LLMView-8BKf70Ay.js → LLMView-CZNNYXC1.js} +61 -61
- package/dist/{LoadingView-Da0HfQ56.js → LoadingView-k2CIKiN7.js} +1 -1
- package/dist/{MarkdownRenderer-CQppLv_n.js → MarkdownRenderer-Dlb_KGmk.js} +1 -1
- package/dist/{MobileIDE-C81gvbco.js → MobileIDE-BQcdjWUT.js} +26 -27
- package/dist/{ModelCard-BMDgFDyQ.js → ModelCard-Dn2b5WLs.js} +5 -5
- package/dist/{ModelView-C4B8qJwX.js → ModelView-BEi83zrX.js} +6 -6
- package/dist/{PageLoading-CRl9HNIg.js → PageLoading-C7H6q6U6.js} +233 -233
- package/dist/{ResultComponent-C-A8sbr1.js → ResultComponent-DW9Q9tp9.js} +5 -5
- package/dist/{Results-C1nNHU7C.js → Results-N2OttUlb.js} +14 -14
- package/dist/{StatusIcon-v2EhaU49.js → StatusIcon-B21tjIXx.js} +1 -1
- package/dist/{StoreTokenModal-BV_gLE94.js → StoreTokenModal-CHgvjLGl.js} +1 -1
- package/dist/{SymbolsPane-CuVCamJf.js → SymbolsPane-DUrLpSSw.js} +11 -11
- package/dist/{TutorialPage-DGQGx3vF.js → TutorialPage-DHgPuFN0.js} +11 -11
- package/dist/{VegaLiteChart-BIeSuNU8.js → VegaLiteChart-BqHLSptG.js} +6689 -6690
- package/dist/{WelcomePage-T757Ynnn.js → WelcomePage-CN6ptsoF.js} +3 -3
- package/dist/agent.js +1349 -0
- package/dist/{cssMode-zpO2ap2B.js → cssMode-DW4OByy3.js} +2 -2
- package/dist/dashboard.js +66 -66
- package/dist/{editor.main-BQh6DxDB.js → editor.main-TuTbSVcN.js} +22 -22
- package/dist/{editorStore-k4IbmW9-.js → editorStore-Czhpct1j.js} +1695 -1125
- package/dist/entry.agent.d.ts +12 -0
- package/dist/entry.agent.d.ts.map +1 -0
- package/dist/entry.llm.d.ts +1 -1
- package/dist/entry.llm.d.ts.map +1 -1
- package/dist/{freemarker2-DQBqlEXc.js → freemarker2-ZGcKAI8o.js} +1 -1
- package/dist/{globalChatRuntime-BWahbZxZ.js → globalChatRuntime-BnMYNYqe.js} +30 -30
- package/dist/{handlebars-tgYxaM70.js → handlebars-B3s0Qrrb.js} +1 -1
- package/dist/{helpers-DDKx6kkf.js → helpers-B3tq3RZK.js} +17 -17
- package/dist/{html-jJahD3Mi.js → html-DM1koKCG.js} +1 -1
- package/dist/{htmlMode-BA1-8l2e.js → htmlMode-CpPImbDh.js} +2 -2
- package/dist/{javascript-Cypfo7va.js → javascript-jClqu73w.js} +1 -1
- package/dist/{jsonMode-xJye8PWS.js → jsonMode-CwFYTPO9.js} +2 -2
- package/dist/{liquid-BGDrv5da.js → liquid-C6l-UINC.js} +1 -1
- package/dist/llm/chatAgentPrompt.d.ts +4 -16
- package/dist/llm/chatAgentPrompt.d.ts.map +1 -1
- package/dist/llm/dashboardAgentRuntime.d.ts +10 -10
- package/dist/llm/dashboardAgentTools.d.ts +10 -10
- package/dist/llm/data/prompts.d.ts +1 -1
- package/dist/llm/data/prompts.d.ts.map +1 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts +3 -3
- package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
- package/dist/llm/returnToUserTool.d.ts +20 -0
- package/dist/llm/returnToUserTool.d.ts.map +1 -0
- package/dist/llm/toolLoopCore.d.ts +7 -0
- package/dist/llm/toolLoopCore.d.ts.map +1 -1
- package/dist/llm/utils.d.ts.map +1 -1
- package/dist/{llm--BDQ6qkZ.js → llm-Bc1CfjOE.js} +2233 -2786
- package/dist/llm.js +3 -3
- package/dist/{localStorage-BYwXjN4M.js → localStorage-Cy0sHlT0.js} +18 -18
- package/dist/{lspLanguageFeatures-V3e_p9oN.js → lspLanguageFeatures-GDtuGOTD.js} +1 -1
- package/dist/{mdx-BUR1aImW.js → mdx-BQEQ0k1f.js} +1 -1
- package/dist/monaco.js +3 -3
- package/dist/{python-YLkl0pc6.js → python-USoVCfWY.js} +1 -1
- package/dist/{razor-BP8TRMDY.js → razor-BxmgiR-q.js} +1 -1
- package/dist/{reconcile-D-vMtlgJ.js → reconcile-DtPcgEjQ.js} +1 -1
- package/dist/{remoteStoreSync-PLFQCOmY.js → remoteStoreSync-CscErZ-I.js} +2 -2
- package/dist/{stores-S6dQ5cjI.js → stores-DgdADCiH.js} +325 -325
- package/dist/stores.js +3 -4
- package/dist/{tsMode-BH9HS_sH.js → tsMode-BEQ7aXX4.js} +1 -1
- package/dist/{typescript-BM-ynfk9.js → typescript-CzBSjjfY.js} +1 -1
- package/dist/{useChatWithTools-Bkd9MeMh.js → useChatWithTools-CMhGxdyr.js} +7 -7
- package/dist/{useDashboard-50rwbG0x.js → useDashboard-CjZgjmgb.js} +1148 -1148
- package/dist/{useGlobalChatPanel-JJZaHao8.js → useGlobalChatPanel-Doeilj18.js} +69 -70
- package/dist/views/LLMView.vue.d.ts +23 -23
- package/dist/views/TutorialPage.vue.d.ts +10 -10
- package/dist/views.js +147 -148
- package/dist/vite.agent.config.d.ts +3 -0
- package/dist/vite.agent.config.d.ts.map +1 -0
- package/dist/{workers-B9Eybl-M.js → workers-CHvkad0r.js} +2 -2
- package/dist/{xml-M5WFPSpA.js → xml-ODdyS0gX.js} +1 -1
- package/dist/{yaml-CEeFwjz9.js → yaml-PCBTA2qD.js} +1 -1
- package/package.json +7 -2
- package/dist/AssetAutoImporter-CCbTLQ9v.js +0 -403
- package/dist/rolldown-runtime-B0aSnxlc.js +0 -20
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
9
|
-
import { f as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { a as
|
|
15
|
-
import "./editor.main-
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { n as
|
|
19
|
-
import { Fragment as
|
|
1
|
+
import { $t as e, Jt as t, Lt as n, an as r, dn as i, fn as a, on as o, qt as s, rn as c, sn as l, tn as u } from "./llm-Bc1CfjOE.js";
|
|
2
|
+
import { t as d } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
|
+
import { o as f } from "./config-DwTONafa.js";
|
|
4
|
+
import { c as p, u as m } from "./base-DuKnVD-A.js";
|
|
5
|
+
import { S as h, _ as g, b as _, d as v, et as y, f as b, g as x, h as S, it as C, l as w, m as T, p as E, pt as D, t as ee, u as O } from "./editorStore-Czhpct1j.js";
|
|
6
|
+
import { a as k, f as te, g as ne, p as re } from "./stores-DgdADCiH.js";
|
|
7
|
+
import { t as ie } from "./VegaLiteChart-BqHLSptG.js";
|
|
8
|
+
import { n as ae, t as oe } from "./DashboardImportSelector-CQqXshDj.js";
|
|
9
|
+
import { f as A, p as se, r as ce, u as le } from "./useGlobalChatPanel-Doeilj18.js";
|
|
10
|
+
import { t as j } from "./ErrorMessage-Cz7q7vJI.js";
|
|
11
|
+
import { t as ue } from "./LoadingView-k2CIKiN7.js";
|
|
12
|
+
import { t as de } from "./DrilldownPane-BheRHJMs.js";
|
|
13
|
+
import { t as fe } from "./MarkdownRenderer-Dlb_KGmk.js";
|
|
14
|
+
import { a as pe, d as me, l as he, o as M } from "./workers-CHvkad0r.js";
|
|
15
|
+
import "./editor.main-TuTbSVcN.js";
|
|
16
|
+
import { t as ge } from "./tokenTheme-DBbeCrCg.js";
|
|
17
|
+
import { t as _e } from "./SymbolsPane-DUrLpSSw.js";
|
|
18
|
+
import { n as ve, t as ye } from "./useResizableDialog-Cs90WJdF.js";
|
|
19
|
+
import { Fragment as N, Teleport as be, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createTextVNode as z, createVNode as B, defineComponent as V, inject as H, nextTick as xe, normalizeClass as U, normalizeStyle as Se, onBeforeUnmount as Ce, onMounted as we, onUnmounted as Te, openBlock as W, ref as G, renderList as K, renderSlot as Ee, resolveComponent as q, resolveDynamicComponent as De, toDisplayString as J, unref as Y, vModelRadio as Oe, vModelText as ke, vShow as Ae, watch as X, withCtx as Z, withDirectives as je, withKeys as Me, withModifiers as Ne } from "vue";
|
|
20
20
|
//#region components/dashboard/DashboardSharePopup.vue?vue&type=script&setup=true&lang.ts
|
|
21
21
|
var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
22
22
|
"data-testid": "dashboard-json",
|
|
23
23
|
class: "json-code"
|
|
24
|
-
}, Le = /*#__PURE__*/
|
|
24
|
+
}, Le = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
25
25
|
__name: "DashboardSharePopup",
|
|
26
26
|
props: {
|
|
27
27
|
dashboard: {},
|
|
@@ -29,7 +29,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["close"],
|
|
31
31
|
setup(e, { emit: t }) {
|
|
32
|
-
let n = e, r = t, i =
|
|
32
|
+
let n = e, r = t, i = G(""), a = G(!1), o = (e) => {
|
|
33
33
|
if (!e) return null;
|
|
34
34
|
let t = JSON.parse(JSON.stringify(e));
|
|
35
35
|
if (delete t.id, delete t.connection, delete t.storage, delete t.changed, delete t.deleted, t.layout && Array.isArray(t.layout) && (t.layout = t.layout.map((e) => {
|
|
@@ -44,7 +44,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
44
44
|
return delete t.id, t;
|
|
45
45
|
})), t;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
X([() => n.dashboard, () => n.isOpen], ([e, t]) => {
|
|
48
48
|
if (t && e) {
|
|
49
49
|
let t = o(e);
|
|
50
50
|
i.value = JSON.stringify(t, null, 2), a.value = !1;
|
|
@@ -59,25 +59,25 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
59
59
|
console.error("Could not copy text: ", e);
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
-
return (t, n) => (
|
|
62
|
+
return (t, n) => (W(), F(se, {
|
|
63
63
|
show: e.isOpen,
|
|
64
64
|
title: "Export Definition",
|
|
65
65
|
"max-width": "860px",
|
|
66
66
|
"test-id": "dashboard-share-popup",
|
|
67
67
|
onClose: n[1] ||= (e) => r("close")
|
|
68
68
|
}, {
|
|
69
|
-
footer:
|
|
69
|
+
footer: Z(() => [R("button", {
|
|
70
70
|
class: "secondary-button",
|
|
71
71
|
onClick: n[0] ||= (e) => r("close")
|
|
72
|
-
}, "Close"),
|
|
72
|
+
}, "Close"), R("button", {
|
|
73
73
|
onClick: s,
|
|
74
74
|
class: "dashboard-copy-button",
|
|
75
75
|
"data-testid": "copy-json-button"
|
|
76
|
-
}, [
|
|
77
|
-
class:
|
|
76
|
+
}, [R("i", {
|
|
77
|
+
class: U(["mdi", a.value ? "mdi-check-circle-outline" : "mdi-content-copy"]),
|
|
78
78
|
"aria-hidden": "true"
|
|
79
|
-
}, null, 2),
|
|
80
|
-
default:
|
|
79
|
+
}, null, 2), R("span", null, J(a.value ? "Copied" : "Copy JSON"), 1)])]),
|
|
80
|
+
default: Z(() => [R("div", Pe, [n[3] ||= R("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), R("div", Fe, [n[2] ||= R("div", { class: "json-toolbar" }, [R("span", { class: "json-toolbar-label" }, "dashboard.json")], -1), R("pre", Ie, J(i.value), 1)])])]),
|
|
81
81
|
_: 1
|
|
82
82
|
}, 8, ["show"]));
|
|
83
83
|
}
|
|
@@ -111,58 +111,58 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
111
111
|
"data-testid",
|
|
112
112
|
"onBlur",
|
|
113
113
|
"onKeyup"
|
|
114
|
-
], ut = ["disabled", "onClick"], dt = { class: "section" }, ft = ["disabled"], pt = /*#__PURE__*/
|
|
114
|
+
], ut = ["disabled", "onClick"], dt = { class: "section" }, ft = ["disabled"], pt = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
115
115
|
__name: "DashboardThemePopup",
|
|
116
116
|
props: {
|
|
117
117
|
dashboard: {},
|
|
118
118
|
isOpen: { type: Boolean }
|
|
119
119
|
},
|
|
120
120
|
emits: ["close", "theme-change"],
|
|
121
|
-
setup(e, { emit:
|
|
122
|
-
let
|
|
123
|
-
theme:
|
|
124
|
-
mode:
|
|
121
|
+
setup(e, { emit: t }) {
|
|
122
|
+
let n = e, s = t, d = H("userSettingsStore", null), p = f(d), m = P(() => n.dashboard?.theme || {}), h = P(() => m.value.preset || "default"), g = P(() => a({
|
|
123
|
+
theme: m.value,
|
|
124
|
+
mode: p.value
|
|
125
125
|
}).vars);
|
|
126
126
|
function _(e) {
|
|
127
|
-
return
|
|
127
|
+
return a({
|
|
128
128
|
theme: { preset: e },
|
|
129
|
-
mode:
|
|
129
|
+
mode: p.value
|
|
130
130
|
}).vars;
|
|
131
131
|
}
|
|
132
|
-
let v =
|
|
132
|
+
let v = P(() => Object.keys(m.value).length > 0);
|
|
133
133
|
function y(e) {
|
|
134
|
-
|
|
134
|
+
s("theme-change", { preset: e });
|
|
135
135
|
}
|
|
136
136
|
function b(e, t) {
|
|
137
|
-
|
|
137
|
+
s("theme-change", { [e]: t });
|
|
138
138
|
}
|
|
139
139
|
function x(e) {
|
|
140
|
-
|
|
140
|
+
s("theme-change", { mobileCards: e });
|
|
141
141
|
}
|
|
142
142
|
function S() {
|
|
143
|
-
|
|
143
|
+
s("theme-change", null);
|
|
144
144
|
}
|
|
145
|
-
let C =
|
|
146
|
-
|
|
145
|
+
let C = G({}), w = G({});
|
|
146
|
+
X([() => n.isOpen, m], ([e]) => {
|
|
147
147
|
if (!e) return;
|
|
148
148
|
let t = {};
|
|
149
|
-
for (let e of
|
|
149
|
+
for (let e of l) t[e.key] = m.value[e.key] || "";
|
|
150
150
|
C.value = t, w.value = {};
|
|
151
151
|
}, { immediate: !0 });
|
|
152
|
-
function ee(e) {
|
|
153
|
-
let t = p.value[e];
|
|
154
|
-
return t && /^#[0-9a-f]{6}$/i.test(t) ? t : f.find((t) => t.key === e).placeholder[o.value];
|
|
155
|
-
}
|
|
156
152
|
function T(e) {
|
|
153
|
+
let t = m.value[e];
|
|
154
|
+
return t && /^#[0-9a-f]{6}$/i.test(t) ? t : l.find((t) => t.key === e).placeholder[p.value];
|
|
155
|
+
}
|
|
156
|
+
function E(e) {
|
|
157
157
|
let t = (C.value[e] || "").trim();
|
|
158
158
|
if (t === "") {
|
|
159
159
|
w.value = {
|
|
160
160
|
...w.value,
|
|
161
161
|
[e]: !1
|
|
162
|
-
},
|
|
162
|
+
}, m.value[e] && s("theme-change", { [e]: void 0 });
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
if (!
|
|
165
|
+
if (!i(t)) {
|
|
166
166
|
w.value = {
|
|
167
167
|
...w.value,
|
|
168
168
|
[e]: !0
|
|
@@ -172,9 +172,9 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
172
172
|
w.value = {
|
|
173
173
|
...w.value,
|
|
174
174
|
[e]: !1
|
|
175
|
-
},
|
|
175
|
+
}, s("theme-change", { [e]: t });
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function D(e, t) {
|
|
178
178
|
let n = t.target.value;
|
|
179
179
|
C.value = {
|
|
180
180
|
...C.value,
|
|
@@ -182,164 +182,164 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
182
182
|
}, w.value = {
|
|
183
183
|
...w.value,
|
|
184
184
|
[e]: !1
|
|
185
|
-
},
|
|
185
|
+
}, s("theme-change", { [e]: n });
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function ee(e) {
|
|
188
188
|
C.value = {
|
|
189
189
|
...C.value,
|
|
190
190
|
[e]: ""
|
|
191
191
|
}, w.value = {
|
|
192
192
|
...w.value,
|
|
193
193
|
[e]: !1
|
|
194
|
-
},
|
|
194
|
+
}, s("theme-change", { [e]: void 0 });
|
|
195
195
|
}
|
|
196
|
-
let
|
|
197
|
-
return (t, n) => (
|
|
196
|
+
let O = l, k = o, te = u, ne = c, re = r;
|
|
197
|
+
return (t, n) => (W(), F(se, {
|
|
198
198
|
show: e.isOpen,
|
|
199
199
|
title: "Dashboard theme",
|
|
200
200
|
"max-width": "640px",
|
|
201
201
|
"test-id": "dashboard-theme-popup",
|
|
202
|
-
onClose: n[7] ||= (e) =>
|
|
202
|
+
onClose: n[7] ||= (e) => s("close")
|
|
203
203
|
}, {
|
|
204
|
-
footer:
|
|
204
|
+
footer: Z(() => [R("button", {
|
|
205
205
|
type: "button",
|
|
206
206
|
class: "btn btn-reset",
|
|
207
207
|
disabled: !v.value,
|
|
208
208
|
"data-testid": "theme-reset-button",
|
|
209
209
|
onClick: S
|
|
210
|
-
}, " Reset to default ", 8, ft),
|
|
210
|
+
}, " Reset to default ", 8, ft), R("button", {
|
|
211
211
|
type: "button",
|
|
212
212
|
class: "btn btn-done",
|
|
213
213
|
"data-testid": "theme-done-button",
|
|
214
|
-
onClick: n[6] ||= (e) =>
|
|
214
|
+
onClick: n[6] ||= (e) => s("close")
|
|
215
215
|
}, " Done ")]),
|
|
216
|
-
default:
|
|
217
|
-
n[20] ||=
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
default: Z(() => [R("div", Re, [
|
|
217
|
+
n[20] ||= R("p", { class: "picker-intro" }, [
|
|
218
|
+
z(" Styling for this dashboard only. Anything left on "),
|
|
219
|
+
R("strong", null, "Auto"),
|
|
220
|
+
z(" follows the preset, and colors left blank follow your light/dark setting. ")
|
|
221
221
|
], -1),
|
|
222
|
-
|
|
222
|
+
R("section", ze, [n[9] ||= R("h4", { class: "section-title" }, "Preset", -1), R("div", Be, [(W(!0), L(N, null, K(Y(k), (e) => (W(), L("button", {
|
|
223
223
|
key: e.value,
|
|
224
224
|
type: "button",
|
|
225
|
-
class:
|
|
225
|
+
class: U(["preset-card", { selected: h.value === e.value }]),
|
|
226
226
|
"data-testid": `theme-preset-${e.value}`,
|
|
227
|
-
"aria-pressed":
|
|
227
|
+
"aria-pressed": h.value === e.value,
|
|
228
228
|
onClick: (t) => y(e.value)
|
|
229
229
|
}, [
|
|
230
|
-
|
|
230
|
+
R("span", {
|
|
231
231
|
class: "preset-preview",
|
|
232
|
-
style:
|
|
232
|
+
style: Se(_(e.value)),
|
|
233
233
|
"aria-hidden": "true"
|
|
234
|
-
}, [...n[8] ||= [
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
}, [...n[8] ||= [R("span", { class: "preview-card" }, [R("span", { class: "preview-card-header" })], -1), R("span", { class: "preview-card" }, [R("span", { class: "preview-card-header" })], -1)]], 4),
|
|
235
|
+
R("span", He, J(e.label), 1),
|
|
236
|
+
R("span", Ue, J(e.hint), 1)
|
|
237
237
|
], 10, Ve))), 128))])]),
|
|
238
|
-
|
|
239
|
-
n[14] ||=
|
|
240
|
-
|
|
238
|
+
R("section", We, [
|
|
239
|
+
n[14] ||= R("h4", { class: "section-title" }, "Adjustments", -1),
|
|
240
|
+
R("div", Ge, [n[10] ||= R("span", { class: "knob-label" }, "Corners", -1), R("div", Ke, [R("button", {
|
|
241
241
|
type: "button",
|
|
242
|
-
class:
|
|
242
|
+
class: U(["chip", { selected: !m.value.corners }]),
|
|
243
243
|
onClick: n[0] ||= (e) => b("corners", void 0)
|
|
244
|
-
}, " Auto ", 2), (
|
|
244
|
+
}, " Auto ", 2), (W(!0), L(N, null, K(Y(te), (e) => (W(), L("button", {
|
|
245
245
|
key: e.value,
|
|
246
246
|
type: "button",
|
|
247
|
-
class:
|
|
247
|
+
class: U(["chip", { selected: m.value.corners === e.value }]),
|
|
248
248
|
title: e.hint,
|
|
249
249
|
onClick: (t) => b("corners", e.value)
|
|
250
|
-
},
|
|
251
|
-
|
|
250
|
+
}, J(e.label), 11, qe))), 128))])]),
|
|
251
|
+
R("div", Je, [n[11] ||= R("span", { class: "knob-label" }, "Density", -1), R("div", Ye, [R("button", {
|
|
252
252
|
type: "button",
|
|
253
|
-
class:
|
|
253
|
+
class: U(["chip", { selected: !m.value.density }]),
|
|
254
254
|
onClick: n[1] ||= (e) => b("density", void 0)
|
|
255
|
-
}, " Auto ", 2), (
|
|
255
|
+
}, " Auto ", 2), (W(!0), L(N, null, K(Y(ne), (e) => (W(), L("button", {
|
|
256
256
|
key: e.value,
|
|
257
257
|
type: "button",
|
|
258
|
-
class:
|
|
258
|
+
class: U(["chip", { selected: m.value.density === e.value }]),
|
|
259
259
|
title: e.hint,
|
|
260
260
|
onClick: (t) => b("density", e.value)
|
|
261
|
-
},
|
|
262
|
-
|
|
261
|
+
}, J(e.label), 11, Xe))), 128))])]),
|
|
262
|
+
R("div", Ze, [n[12] ||= R("span", { class: "knob-label" }, "Elevation", -1), R("div", Qe, [R("button", {
|
|
263
263
|
type: "button",
|
|
264
|
-
class:
|
|
264
|
+
class: U(["chip", { selected: !m.value.elevation }]),
|
|
265
265
|
onClick: n[2] ||= (e) => b("elevation", void 0)
|
|
266
|
-
}, " Auto ", 2), (
|
|
266
|
+
}, " Auto ", 2), (W(!0), L(N, null, K(Y(re), (e) => (W(), L("button", {
|
|
267
267
|
key: e.value,
|
|
268
268
|
type: "button",
|
|
269
|
-
class:
|
|
269
|
+
class: U(["chip", { selected: m.value.elevation === e.value }]),
|
|
270
270
|
title: e.hint,
|
|
271
271
|
onClick: (t) => b("elevation", e.value)
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
}, J(e.label), 11, $e))), 128))])]),
|
|
273
|
+
R("div", et, [n[13] ||= R("span", { class: "knob-label" }, "On mobile", -1), R("div", tt, [
|
|
274
|
+
R("button", {
|
|
275
275
|
type: "button",
|
|
276
|
-
class:
|
|
276
|
+
class: U(["chip", { selected: m.value.mobileCards === void 0 }]),
|
|
277
277
|
onClick: n[3] ||= (e) => x(void 0)
|
|
278
278
|
}, " Auto ", 2),
|
|
279
|
-
|
|
279
|
+
R("button", {
|
|
280
280
|
type: "button",
|
|
281
|
-
class:
|
|
281
|
+
class: U(["chip", { selected: m.value.mobileCards === !1 }]),
|
|
282
282
|
title: "Panels flatten to the page background below 768px.",
|
|
283
283
|
onClick: n[4] ||= (e) => x(!1)
|
|
284
284
|
}, " Flatten ", 2),
|
|
285
|
-
|
|
285
|
+
R("button", {
|
|
286
286
|
type: "button",
|
|
287
|
-
class:
|
|
287
|
+
class: U(["chip", { selected: m.value.mobileCards === !0 }]),
|
|
288
288
|
title: "Panels keep their card treatment on narrow screens.",
|
|
289
289
|
onClick: n[5] ||= (e) => x(!0)
|
|
290
290
|
}, " Keep cards ", 2)
|
|
291
291
|
])])
|
|
292
292
|
]),
|
|
293
|
-
|
|
294
|
-
n[16] ||=
|
|
295
|
-
n[17] ||=
|
|
296
|
-
|
|
293
|
+
R("section", nt, [
|
|
294
|
+
n[16] ||= R("h4", { class: "section-title" }, "Colors", -1),
|
|
295
|
+
n[17] ||= R("p", { class: "section-note" }, " A color you set applies in both light and dark mode. Set them as a group so text stays readable, or leave them blank to follow the app theme. ", -1),
|
|
296
|
+
R("div", rt, [(W(!0), L(N, null, K(Y(O), (e) => (W(), L("div", {
|
|
297
297
|
key: e.key,
|
|
298
298
|
class: "color-row"
|
|
299
|
-
}, [
|
|
299
|
+
}, [R("label", {
|
|
300
300
|
class: "color-label",
|
|
301
301
|
for: `theme-color-${e.key}`
|
|
302
|
-
}, [
|
|
303
|
-
|
|
302
|
+
}, [R("span", at, J(e.label), 1), R("span", ot, J(e.hint), 1)], 8, it), R("div", st, [
|
|
303
|
+
R("input", {
|
|
304
304
|
type: "color",
|
|
305
|
-
class:
|
|
306
|
-
value:
|
|
305
|
+
class: U(["color-swatch", { unset: !m.value[e.key] }]),
|
|
306
|
+
value: T(e.key),
|
|
307
307
|
"aria-label": `${e.label} color`,
|
|
308
|
-
onInput: (t) =>
|
|
308
|
+
onInput: (t) => D(e.key, t)
|
|
309
309
|
}, null, 42, ct),
|
|
310
|
-
|
|
310
|
+
je(R("input", {
|
|
311
311
|
id: `theme-color-${e.key}`,
|
|
312
312
|
"onUpdate:modelValue": (t) => C.value[e.key] = t,
|
|
313
313
|
type: "text",
|
|
314
|
-
class:
|
|
314
|
+
class: U(["color-text", { invalid: w.value[e.key] }]),
|
|
315
315
|
"data-testid": `theme-color-${e.key}`,
|
|
316
316
|
placeholder: "Inherited",
|
|
317
317
|
spellcheck: "false",
|
|
318
|
-
onBlur: (t) =>
|
|
319
|
-
onKeyup: Me((t) =>
|
|
320
|
-
}, null, 42, lt), [[
|
|
321
|
-
|
|
318
|
+
onBlur: (t) => E(e.key),
|
|
319
|
+
onKeyup: Me((t) => E(e.key), ["enter"])
|
|
320
|
+
}, null, 42, lt), [[ke, C.value[e.key]]]),
|
|
321
|
+
R("button", {
|
|
322
322
|
type: "button",
|
|
323
323
|
class: "color-clear",
|
|
324
|
-
disabled: !
|
|
324
|
+
disabled: !m.value[e.key],
|
|
325
325
|
title: "Clear — follow the app theme",
|
|
326
326
|
"aria-label": "Clear color",
|
|
327
|
-
onClick: (t) =>
|
|
328
|
-
}, [...n[15] ||= [
|
|
327
|
+
onClick: (t) => ee(e.key)
|
|
328
|
+
}, [...n[15] ||= [R("i", {
|
|
329
329
|
class: "mdi mdi-close",
|
|
330
330
|
"aria-hidden": "true"
|
|
331
331
|
}, null, -1)]], 8, ut)
|
|
332
332
|
])]))), 128))])
|
|
333
333
|
]),
|
|
334
|
-
|
|
334
|
+
R("section", dt, [n[19] ||= R("h4", { class: "section-title" }, "Preview", -1), R("div", {
|
|
335
335
|
class: "live-preview",
|
|
336
|
-
style:
|
|
337
|
-
}, [...n[18] ||= [
|
|
336
|
+
style: Se(g.value)
|
|
337
|
+
}, [...n[18] ||= [R("div", { class: "preview-card large" }, [R("div", { class: "preview-card-header" }, [R("span", { class: "preview-title-bar" })]), R("div", { class: "preview-body" }, [R("span", { class: "preview-accent" })])], -1), R("div", { class: "preview-card large" }, [R("div", { class: "preview-card-header" }, [R("span", { class: "preview-title-bar" })]), R("div", { class: "preview-body" })], -1)]], 4)])
|
|
338
338
|
])]),
|
|
339
339
|
_: 1
|
|
340
340
|
}, 8, ["show"]));
|
|
341
341
|
}
|
|
342
|
-
}), [["__scopeId", "data-v-2a56fa57"]]), mt = ["onClick"], ht = { class: "completion-details" }, gt = { class: "completion-label" }, _t = { class: "completion-description" }, vt = /*#__PURE__*/
|
|
342
|
+
}), [["__scopeId", "data-v-2a56fa57"]]), mt = ["onClick"], ht = { class: "completion-details" }, gt = { class: "completion-label" }, _t = { class: "completion-description" }, vt = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
343
343
|
__name: "DashboardFilterAutocomplete",
|
|
344
344
|
props: {
|
|
345
345
|
inputValue: {
|
|
@@ -357,7 +357,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
357
357
|
},
|
|
358
358
|
emits: ["select-completion"],
|
|
359
359
|
setup(e, { emit: t }) {
|
|
360
|
-
let n = e, r = t, i =
|
|
360
|
+
let n = e, r = t, i = G(!1), a = G(0), o = G(0), s = G(""), c = G(0), l = G(null), u = P(() => {
|
|
361
361
|
if (!n.inputElement) return {};
|
|
362
362
|
let e = n.inputElement.getBoundingClientRect();
|
|
363
363
|
return {
|
|
@@ -374,7 +374,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
374
374
|
let r = o.value;
|
|
375
375
|
for (; r < e.length && !/\s/.test(e.charAt(r));) r++;
|
|
376
376
|
c.value = t, s.value = e.substring(t, r);
|
|
377
|
-
}, f =
|
|
377
|
+
}, f = P(() => {
|
|
378
378
|
if (!s.value.trim()) return [];
|
|
379
379
|
let e = s.value.toLowerCase();
|
|
380
380
|
return n.completionItems.filter((t) => t.label.toLowerCase().includes(e)).sort((t, n) => {
|
|
@@ -382,7 +382,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
382
382
|
return r && !i ? -1 : !r && i ? 1 : t.label.localeCompare(n.label);
|
|
383
383
|
}).slice(0, 10);
|
|
384
384
|
});
|
|
385
|
-
|
|
385
|
+
X(f, (e) => {
|
|
386
386
|
i.value = e.length > 0, a.value = 0;
|
|
387
387
|
});
|
|
388
388
|
let p = (e) => {
|
|
@@ -392,27 +392,27 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
392
392
|
cursorPosition: c.value + e.label.length
|
|
393
393
|
}), i.value = !1;
|
|
394
394
|
}, m = (e) => e.trilogySubType ? e.trilogySubType.toLowerCase() : e.type.toLowerCase();
|
|
395
|
-
return
|
|
395
|
+
return X(() => n.inputValue, () => {
|
|
396
396
|
d();
|
|
397
|
-
}),
|
|
397
|
+
}), ae(() => [l.value, n.inputElement], () => {
|
|
398
398
|
i.value = !1;
|
|
399
399
|
}, {
|
|
400
400
|
enabled: () => i.value,
|
|
401
401
|
eventName: "mousedown"
|
|
402
|
-
}), d(), (e, t) => i.value ? (
|
|
402
|
+
}), d(), (e, t) => i.value ? (W(), L("div", {
|
|
403
403
|
key: 0,
|
|
404
404
|
ref_key: "dropdown",
|
|
405
405
|
ref: l,
|
|
406
406
|
class: "autocomplete-dropdown",
|
|
407
|
-
style:
|
|
408
|
-
}, [(
|
|
407
|
+
style: Se(u.value)
|
|
408
|
+
}, [(W(!0), L(N, null, K(f.value, (e, t) => (W(), L("div", {
|
|
409
409
|
key: t,
|
|
410
|
-
class:
|
|
410
|
+
class: U(["completion-item", { selected: t === a.value }]),
|
|
411
411
|
onClick: (t) => p(e)
|
|
412
|
-
}, [
|
|
412
|
+
}, [R("div", { class: U(["symbol-icon", m(e)]) }, [e.trilogySubType ? (W(), L("i", {
|
|
413
413
|
key: 0,
|
|
414
|
-
class:
|
|
415
|
-
}, null, 2)) : (
|
|
414
|
+
class: U(`mdi ${e.trilogySubType === "key" ? "mdi-key-outline" : e.trilogySubType === "property" ? "mdi-tag-outline" : "mdi-cube-outline"}`)
|
|
415
|
+
}, null, 2)) : (W(), L(N, { key: 1 }, [z(J(e.type === "function" ? "ƒ" : e.type === "variable" ? "V" : e.type === "class" ? "C" : e.type === "interface" ? "I" : e.type === "method" ? "M" : e.type === "property" ? "P" : e.type === "field" ? "F" : e.type === "constant" ? "K" : e.type === "enum" ? "E" : e.type === "keyword" ? "K" : "S"), 1)], 64))], 2), R("div", ht, [R("div", gt, J(e.label), 1), R("div", _t, J(e.description), 1)])], 10, mt))), 128))], 4)) : I("", !0);
|
|
416
416
|
}
|
|
417
417
|
}), [["__scopeId", "data-v-89468628"]]), yt = { class: "filter-container" }, bt = { class: "filter-input-wrapper" }, xt = ["value", "disabled"], St = [
|
|
418
418
|
"value",
|
|
@@ -432,7 +432,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
432
432
|
}, jt = ["disabled"], Mt = { class: "button-content" }, Nt = ["disabled"], Pt = { class: "button-content" }, Ft = {
|
|
433
433
|
key: 0,
|
|
434
434
|
class: "loader-container"
|
|
435
|
-
}, It = ["disabled"], Lt = { class: "button-content" }, Rt = /*#__PURE__*/
|
|
435
|
+
}, It = ["disabled"], Lt = { class: "button-content" }, Rt = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
436
436
|
__name: "DashboardHeaderFilterInput",
|
|
437
437
|
props: {
|
|
438
438
|
filterValue: {
|
|
@@ -456,9 +456,9 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
456
456
|
"clear-filter"
|
|
457
457
|
],
|
|
458
458
|
setup(e, { emit: t }) {
|
|
459
|
-
let n = e, r = t, i =
|
|
459
|
+
let n = e, r = t, i = ne(), a = G(n.isLoading), o = G(null), s = G(null), c = G(null), l = G(n.filterValue || ""), u = G(!1), d = G(!1), f = P(() => l.value.replace(/\n/g, " ")), p = P(() => l.value.trim().length > 0);
|
|
460
460
|
function m() {
|
|
461
|
-
r("filter-apply", l.value), u.value = !1,
|
|
461
|
+
r("filter-apply", l.value), u.value = !1, v();
|
|
462
462
|
}
|
|
463
463
|
function h() {
|
|
464
464
|
l.value = "", u.value = !0, r("filter-change", ""), r("filter-apply", ""), r("clear-filter", ""), setTimeout(() => {
|
|
@@ -478,10 +478,10 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
478
478
|
}
|
|
479
479
|
}, 0);
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function v() {
|
|
482
482
|
d.value = !1;
|
|
483
483
|
}
|
|
484
|
-
let
|
|
484
|
+
let y = () => {
|
|
485
485
|
a.value = !0;
|
|
486
486
|
let e = n.globalCompletion.map((e) => ({
|
|
487
487
|
name: e.label,
|
|
@@ -494,26 +494,26 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
494
494
|
a.value = !1;
|
|
495
495
|
});
|
|
496
496
|
};
|
|
497
|
-
function
|
|
498
|
-
e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.altKey ? d.value || (e.preventDefault(), m()) : (e.ctrlKey || e.metaKey) && e.shiftKey && e.key === "Enter" ? (e.preventDefault(),
|
|
497
|
+
function b(e) {
|
|
498
|
+
e.key === "Enter" && !e.shiftKey && !e.ctrlKey && !e.altKey ? d.value || (e.preventDefault(), m()) : (e.ctrlKey || e.metaKey) && e.shiftKey && e.key === "Enter" ? (e.preventDefault(), y()) : e.key === "Escape" && d.value && (e.preventDefault(), v());
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
(e.ctrlKey || e.metaKey) && e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), m()) : (e.ctrlKey || e.metaKey) && e.shiftKey && e.key === "Enter" ? (e.preventDefault(),
|
|
500
|
+
function x(e) {
|
|
501
|
+
(e.ctrlKey || e.metaKey) && e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), m()) : (e.ctrlKey || e.metaKey) && e.shiftKey && e.key === "Enter" ? (e.preventDefault(), y()) : e.key === "Escape" && (e.preventDefault(), v());
|
|
502
502
|
}
|
|
503
|
-
let
|
|
504
|
-
function
|
|
503
|
+
let S = P(() => (n.filterError || "").length > 0 ? "error" : l.value ? "valid" : "neutral");
|
|
504
|
+
function C(e) {
|
|
505
505
|
l.value = e.text, u.value = !0, r("filter-change", l.value);
|
|
506
506
|
let t = d.value ? s.value : o.value;
|
|
507
507
|
t && (t.focus(), t.setSelectionRange(e.cursorPosition, e.cursorPosition));
|
|
508
508
|
}
|
|
509
|
-
return
|
|
509
|
+
return X(() => n.filterValue, (e) => {
|
|
510
510
|
e !== l.value && (l.value = e || "", u.value = !1);
|
|
511
|
-
}),
|
|
511
|
+
}), X(() => n.isLoading, (e) => {
|
|
512
512
|
a.value = e;
|
|
513
|
-
}),
|
|
514
|
-
|
|
515
|
-
}, { enabled: () => d.value }), (t, n) => (
|
|
516
|
-
|
|
513
|
+
}), ae(() => [c.value, o.value], () => {
|
|
514
|
+
v();
|
|
515
|
+
}, { enabled: () => d.value }), (t, n) => (W(), L("div", yt, [R("div", bt, [
|
|
516
|
+
R("input", {
|
|
517
517
|
id: "filter",
|
|
518
518
|
ref_key: "filterInputRef",
|
|
519
519
|
ref: o,
|
|
@@ -521,128 +521,128 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
521
521
|
type: "text",
|
|
522
522
|
value: f.value,
|
|
523
523
|
onInput: g,
|
|
524
|
-
onKeydown:
|
|
524
|
+
onKeydown: b,
|
|
525
525
|
onFocus: _,
|
|
526
526
|
placeholder: "Add a global filter...",
|
|
527
|
-
class:
|
|
527
|
+
class: U({ "filter-error": S.value === "error" }),
|
|
528
528
|
disabled: a.value
|
|
529
529
|
}, null, 42, xt),
|
|
530
|
-
d.value ? (
|
|
530
|
+
d.value ? (W(), L("div", {
|
|
531
531
|
key: 0,
|
|
532
532
|
ref_key: "filterDropdownRef",
|
|
533
533
|
ref: c,
|
|
534
534
|
class: "filter-dropdown"
|
|
535
535
|
}, [
|
|
536
|
-
|
|
537
|
-
onClick:
|
|
536
|
+
R("div", { class: "dropdown-header" }, [n[1] ||= R("span", null, "Global Filters", -1), R("button", {
|
|
537
|
+
onClick: v,
|
|
538
538
|
class: "close-button",
|
|
539
539
|
title: "Close (Esc)"
|
|
540
|
-
}, [...n[0] ||= [
|
|
541
|
-
|
|
540
|
+
}, [...n[0] ||= [R("i", { class: "mdi mdi-close" }, null, -1)]])]),
|
|
541
|
+
R("textarea", {
|
|
542
542
|
ref_key: "filterTextareaRef",
|
|
543
543
|
ref: s,
|
|
544
|
-
class:
|
|
544
|
+
class: U(["filter-textarea", { "filter-error": S.value === "error" }]),
|
|
545
545
|
value: l.value,
|
|
546
546
|
onInput: g,
|
|
547
|
-
onKeydown:
|
|
548
|
-
placeholder:
|
|
547
|
+
onKeydown: x,
|
|
548
|
+
placeholder: Y(i).hasActiveDefaultConnection ? "Use a SQL condition (ex color='blue' or color='red') or text to filter.\nUse Ctrl+Enter to apply, Ctrl+Shift+Enter for text to SQL" : "Use a SQL condition (ex color='blue') to filter.\nUse Ctrl+Enter to apply",
|
|
549
549
|
disabled: a.value,
|
|
550
550
|
rows: "4"
|
|
551
551
|
}, null, 42, St),
|
|
552
|
-
e.filterError ? (
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
e.filterError ? (W(), L("div", Ct, [n[2] ||= R("i", { class: "mdi mdi-alert-circle-outline" }, null, -1), R("span", null, J(e.filterError), 1)])) : I("", !0),
|
|
553
|
+
R("div", wt, [
|
|
554
|
+
R("button", {
|
|
555
555
|
onClick: m,
|
|
556
|
-
class:
|
|
556
|
+
class: U(["apply-button", { "has-changes": u.value }]),
|
|
557
557
|
disabled: a.value,
|
|
558
558
|
title: "Apply filter (Ctrl+Enter)"
|
|
559
|
-
}, [...n[3] ||= [
|
|
560
|
-
|
|
559
|
+
}, [...n[3] ||= [R("i", { class: "mdi mdi-check" }, null, -1), z(" Apply ", -1)]], 10, Tt),
|
|
560
|
+
Y(i).hasActiveDefaultConnection ? (W(), L("button", {
|
|
561
561
|
key: 0,
|
|
562
|
-
onClick:
|
|
562
|
+
onClick: y,
|
|
563
563
|
class: "llm-button",
|
|
564
564
|
disabled: a.value,
|
|
565
565
|
title: "Text to filter (Ctrl+Shift+Enter)"
|
|
566
566
|
}, [
|
|
567
|
-
|
|
568
|
-
a.value ? (
|
|
569
|
-
n[5] ||=
|
|
570
|
-
], 8, Et)) :
|
|
571
|
-
|
|
567
|
+
R("i", { class: U(["mdi mdi-auto-fix", { hidden: a.value }]) }, null, 2),
|
|
568
|
+
a.value ? (W(), L("div", Dt, [...n[4] ||= [R("div", { class: "loader" }, null, -1)]])) : I("", !0),
|
|
569
|
+
n[5] ||= z(" Text to Filter ", -1)
|
|
570
|
+
], 8, Et)) : I("", !0),
|
|
571
|
+
R("button", {
|
|
572
572
|
onClick: h,
|
|
573
573
|
class: "clear-button",
|
|
574
574
|
disabled: a.value,
|
|
575
575
|
title: "Clear filter"
|
|
576
|
-
}, [...n[6] ||= [
|
|
576
|
+
}, [...n[6] ||= [R("i", { class: "mdi mdi-close-circle-outline" }, null, -1), z(" Clear ", -1)]], 8, Ot)
|
|
577
577
|
])
|
|
578
|
-
], 512)) :
|
|
579
|
-
(d.value ? s.value : o.value) ? (
|
|
578
|
+
], 512)) : I("", !0),
|
|
579
|
+
(d.value ? s.value : o.value) ? (W(), F(vt, {
|
|
580
580
|
key: 1,
|
|
581
581
|
"input-value": l.value,
|
|
582
582
|
"completion-items": e.globalCompletion,
|
|
583
583
|
"input-element": d.value ? s.value : o.value,
|
|
584
|
-
onSelectCompletion:
|
|
584
|
+
onSelectCompletion: C
|
|
585
585
|
}, null, 8, [
|
|
586
586
|
"input-value",
|
|
587
587
|
"completion-items",
|
|
588
588
|
"input-element"
|
|
589
|
-
])) :
|
|
590
|
-
|
|
591
|
-
|
|
589
|
+
])) : I("", !0),
|
|
590
|
+
R("div", kt, [
|
|
591
|
+
S.value === "error" ? (W(), L("div", At, [n[8] ||= R("i", { class: "mdi mdi-alert-circle-outline" }, null, -1), B(A, {
|
|
592
592
|
content: e.filterError || "Unknown Error",
|
|
593
593
|
position: "bottom"
|
|
594
594
|
}, {
|
|
595
|
-
default:
|
|
595
|
+
default: Z(() => [...n[7] ||= [R("span", {
|
|
596
596
|
class: "tooltip-trigger",
|
|
597
597
|
"data-testid": "filter-error-tooltip-trigger"
|
|
598
598
|
}, null, -1)]]),
|
|
599
599
|
_: 1
|
|
600
|
-
}, 8, ["content"])])) :
|
|
601
|
-
|
|
600
|
+
}, 8, ["content"])])) : I("", !0),
|
|
601
|
+
R("button", {
|
|
602
602
|
onClick: m,
|
|
603
|
-
class:
|
|
603
|
+
class: U(["input-icon-button", { "has-changes": u.value }]),
|
|
604
604
|
"data-testid": "filter-search-button",
|
|
605
605
|
disabled: a.value,
|
|
606
606
|
title: "Apply filter (Enter)"
|
|
607
|
-
}, [
|
|
607
|
+
}, [R("div", Mt, [n[10] ||= R("i", { class: "mdi mdi-magnify" }, null, -1), B(A, {
|
|
608
608
|
content: u.value ? "Apply changes (Enter)" : "Search (Enter)",
|
|
609
609
|
position: "top"
|
|
610
610
|
}, {
|
|
611
|
-
default:
|
|
611
|
+
default: Z(() => [...n[9] ||= [R("span", { class: "tooltip-trigger" }, null, -1)]]),
|
|
612
612
|
_: 1
|
|
613
613
|
}, 8, ["content"])])], 10, jt),
|
|
614
|
-
|
|
614
|
+
Y(i).hasActiveDefaultConnection ? (W(), L("button", {
|
|
615
615
|
key: 1,
|
|
616
|
-
onClick:
|
|
616
|
+
onClick: y,
|
|
617
617
|
class: "input-icon-button",
|
|
618
618
|
"data-testid": "filter-llm-button",
|
|
619
619
|
disabled: a.value,
|
|
620
620
|
title: "Transform text to filter if you have a configured LLM connection"
|
|
621
|
-
}, [
|
|
622
|
-
|
|
623
|
-
a.value ? (
|
|
624
|
-
|
|
621
|
+
}, [R("div", Pt, [
|
|
622
|
+
R("i", { class: U(["mdi mdi-auto-fix", { hidden: a.value }]) }, null, 2),
|
|
623
|
+
a.value ? (W(), L("div", Ft, [...n[11] ||= [R("div", { class: "loader" }, null, -1)]])) : I("", !0),
|
|
624
|
+
B(A, {
|
|
625
625
|
content: a.value ? "Processing..." : "Text to filter (Ctrl+Shift+Enter)",
|
|
626
626
|
position: "top"
|
|
627
627
|
}, {
|
|
628
|
-
default:
|
|
628
|
+
default: Z(() => [...n[12] ||= [R("span", { class: "tooltip-trigger" }, null, -1)]]),
|
|
629
629
|
_: 1
|
|
630
630
|
}, 8, ["content"])
|
|
631
|
-
])], 8, Nt)) :
|
|
632
|
-
p.value ? (
|
|
631
|
+
])], 8, Nt)) : I("", !0),
|
|
632
|
+
p.value ? (W(), L("button", {
|
|
633
633
|
key: 2,
|
|
634
634
|
onClick: h,
|
|
635
635
|
class: "input-icon-button clear-icon-button",
|
|
636
636
|
"data-testid": "clear-filters-button",
|
|
637
637
|
disabled: a.value,
|
|
638
638
|
title: "Clear all filters"
|
|
639
|
-
}, [
|
|
639
|
+
}, [R("div", Lt, [n[14] ||= R("i", { class: "mdi mdi-close" }, null, -1), B(A, {
|
|
640
640
|
content: "Clear all filters",
|
|
641
641
|
position: "top"
|
|
642
642
|
}, {
|
|
643
|
-
default:
|
|
643
|
+
default: Z(() => [...n[13] ||= [R("span", { class: "tooltip-trigger" }, null, -1)]]),
|
|
644
644
|
_: 1
|
|
645
|
-
})])], 8, It)) :
|
|
645
|
+
})])], 8, It)) : I("", !0)
|
|
646
646
|
])
|
|
647
647
|
])]));
|
|
648
648
|
}
|
|
@@ -665,7 +665,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
665
665
|
}, Gt = { class: "select-wrapper" }, Kt = ["value", "title"], qt = ["value"], Jt = ["value"], Yt = { class: "grid-actions top-actions" }, Xt = { class: "controls-row filter-row" }, Zt = { class: "grid-actions filter-actions" }, Qt = ["disabled", "title"], $t = { class: "filter-action-label" }, en = {
|
|
666
666
|
class: "mode-selector",
|
|
667
667
|
"data-testid": "mode-selector-wrapper"
|
|
668
|
-
}, tn = { class: "select-wrapper" }, nn = ["value", "disabled"], rn = /*#__PURE__*/
|
|
668
|
+
}, tn = { class: "select-wrapper" }, nn = ["value", "disabled"], rn = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
669
669
|
__name: "DashboardHeader",
|
|
670
670
|
props: {
|
|
671
671
|
dashboard: {
|
|
@@ -716,14 +716,14 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
716
716
|
"theme-change"
|
|
717
717
|
],
|
|
718
718
|
setup(e, { emit: t }) {
|
|
719
|
-
let n = e, r = t, i =
|
|
719
|
+
let n = e, r = t, i = h(), a = ee(), o = k(), s = G(!1), c = G(!1), l = G(!1), u = G(!1), d = G(""), f = G(null);
|
|
720
720
|
function p() {
|
|
721
721
|
c.value = !c.value;
|
|
722
722
|
}
|
|
723
723
|
function m() {
|
|
724
724
|
c.value = !1;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function g() {
|
|
727
727
|
l.value = !l.value;
|
|
728
728
|
}
|
|
729
729
|
function _(e) {
|
|
@@ -740,35 +740,35 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
740
740
|
let t = e.target;
|
|
741
741
|
r("mode-change", t.value);
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function b() {
|
|
744
744
|
n.editsLocked || (u.value = !0, d.value = n.dashboard?.name || "Untitled Dashboard", setTimeout(() => {
|
|
745
745
|
f.value?.focus();
|
|
746
746
|
}, 0));
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function x() {
|
|
749
749
|
u.value = !1, r("title-update", d.value);
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function S() {
|
|
752
752
|
u.value = !1, d.value = n.dashboard?.name || "Untitled Dashboard";
|
|
753
753
|
}
|
|
754
|
-
let w =
|
|
754
|
+
let w = P(() => n.selectedConnection ? i.connections[n.selectedConnection] || i.connectionByName(n.selectedConnection) : void 0), T = P(() => {
|
|
755
755
|
let e = Object.values(i.connections).filter((e) => e.model && !e.deleted), t = w.value;
|
|
756
756
|
return t && !e.some((e) => e.id === t.id) && e.push(t), e.sort((e, t) => e.name.localeCompare(t.name));
|
|
757
|
-
}),
|
|
757
|
+
}), E = P(() => w.value?.id || n.selectedConnection), D = P(() => !!n.selectedConnection && !w.value), O = P(() => w.value?.name || n.selectedConnection), te = P(() => {
|
|
758
758
|
let e = w.value;
|
|
759
|
-
return e ? Object.values(a.editors).filter((t) =>
|
|
759
|
+
return e ? Object.values(a.editors).filter((t) => C(t.type) && t.connectionId === e.id).sort((e, t) => e.name.localeCompare(t.name)).map((e) => ({
|
|
760
760
|
id: e.id,
|
|
761
761
|
name: e.name.replace(/\//g, "."),
|
|
762
762
|
alias: ""
|
|
763
763
|
})) : [];
|
|
764
|
-
}), ne =
|
|
765
|
-
function
|
|
764
|
+
}), ne = P(() => n.dashboard?.imports || []);
|
|
765
|
+
function re(e) {
|
|
766
766
|
r("import-change", e);
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function ie() {
|
|
769
769
|
r("refresh");
|
|
770
770
|
}
|
|
771
|
-
let
|
|
771
|
+
let ae = P(() => {
|
|
772
772
|
switch (n.dashboard?.state) {
|
|
773
773
|
case "editing": return "mdi mdi-pencil-outline";
|
|
774
774
|
case "published": return "mdi mdi-eye-outline";
|
|
@@ -776,60 +776,60 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
776
776
|
default: return "mdi mdi-eye-outline";
|
|
777
777
|
}
|
|
778
778
|
});
|
|
779
|
-
return (t, n) => (
|
|
780
|
-
|
|
779
|
+
return (t, n) => (W(), L("div", zt, [
|
|
780
|
+
R("div", { class: U(["controls-row title-row", { "view-title-row": e.dashboard.state !== "editing" }]) }, [R("div", {
|
|
781
781
|
class: "dashboard-title",
|
|
782
|
-
onClick:
|
|
783
|
-
}, [u.value ?
|
|
782
|
+
onClick: b
|
|
783
|
+
}, [u.value ? je((W(), L("input", {
|
|
784
784
|
key: 1,
|
|
785
785
|
ref_key: "titleInput",
|
|
786
786
|
ref: f,
|
|
787
787
|
"data-testid": "dashboard-title-input",
|
|
788
788
|
"onUpdate:modelValue": n[0] ||= (e) => d.value = e,
|
|
789
|
-
onBlur:
|
|
790
|
-
onKeyup: [Me(
|
|
789
|
+
onBlur: x,
|
|
790
|
+
onKeyup: [Me(x, ["enter"]), Me(S, ["esc"])],
|
|
791
791
|
class: "title-input",
|
|
792
792
|
type: "text"
|
|
793
|
-
}, null, 544)), [[
|
|
794
|
-
|
|
793
|
+
}, null, 544)), [[ke, d.value]]) : (W(), L("span", Bt, [R("span", Vt, J(e.dashboard?.name || "Untitled Dashboard"), 1), e.editsLocked ? I("", !0) : (W(), L("span", Ht, [...n[11] ||= [R("i", { class: "mdi mdi-pencil-outline" }, null, -1)]]))]))]), e.dashboard.state === "editing" ? (W(), L("div", Ut, [
|
|
794
|
+
R("div", Wt, [R("div", Gt, [n[12] ||= R("i", { class: "mdi mdi-database-outline select-icon" }, null, -1), R("select", {
|
|
795
795
|
id: "connection",
|
|
796
796
|
"data-testid": "connection-selector",
|
|
797
797
|
onChange: n[1] ||= (e) => t.$emit("connection-change", e),
|
|
798
|
-
value:
|
|
799
|
-
title:
|
|
800
|
-
}, [
|
|
798
|
+
value: E.value,
|
|
799
|
+
title: O.value
|
|
800
|
+
}, [D.value ? (W(), L("option", {
|
|
801
801
|
key: 0,
|
|
802
802
|
value: e.selectedConnection,
|
|
803
803
|
disabled: ""
|
|
804
|
-
},
|
|
804
|
+
}, J(O.value) + " (unavailable) ", 9, qt)) : I("", !0), (W(!0), L(N, null, K(T.value, (e) => (W(), L("option", {
|
|
805
805
|
key: e.id,
|
|
806
806
|
value: e.id
|
|
807
|
-
},
|
|
808
|
-
|
|
809
|
-
"available-imports":
|
|
807
|
+
}, J(e.name), 9, Jt))), 128))], 40, Kt)])]),
|
|
808
|
+
B(oe, {
|
|
809
|
+
"available-imports": te.value,
|
|
810
810
|
"active-imports": ne.value,
|
|
811
|
-
"onUpdate:imports":
|
|
812
|
-
onExplore: n[2] ||= (e) =>
|
|
811
|
+
"onUpdate:imports": re,
|
|
812
|
+
onExplore: n[2] ||= (e) => Y(o).openTab("editors", null, e.id)
|
|
813
813
|
}, null, 8, ["available-imports", "active-imports"]),
|
|
814
|
-
|
|
814
|
+
R("div", Yt, [R("button", {
|
|
815
815
|
onClick: n[3] ||= (e) => t.$emit("add-item"),
|
|
816
816
|
class: "btn btn-success",
|
|
817
817
|
"data-testid": "add-item-button",
|
|
818
818
|
title: "Add Item"
|
|
819
|
-
}, [...n[13] ||= [
|
|
819
|
+
}, [...n[13] ||= [R("i", {
|
|
820
820
|
class: "mdi mdi-plus top-action-icon",
|
|
821
821
|
"aria-hidden": "true"
|
|
822
|
-
}, null, -1),
|
|
822
|
+
}, null, -1), R("span", { class: "top-action-label" }, "Add", -1)]]), R("button", {
|
|
823
823
|
onClick: n[4] ||= (e) => t.$emit("clear-items"),
|
|
824
824
|
class: "btn btn-danger",
|
|
825
825
|
"data-testid": "clear-items-button",
|
|
826
826
|
title: "Clear All"
|
|
827
|
-
}, [...n[14] ||= [
|
|
827
|
+
}, [...n[14] ||= [R("i", {
|
|
828
828
|
class: "mdi mdi-delete-outline top-action-icon",
|
|
829
829
|
"aria-hidden": "true"
|
|
830
|
-
}, null, -1),
|
|
831
|
-
])) :
|
|
832
|
-
|
|
830
|
+
}, null, -1), R("span", { class: "top-action-label" }, "Clear", -1)]])])
|
|
831
|
+
])) : I("", !0)], 2),
|
|
832
|
+
R("div", Xt, [B(Rt, {
|
|
833
833
|
"filter-value": e.dashboard?.filter || "",
|
|
834
834
|
"filter-error": e.filterError,
|
|
835
835
|
"is-loading": s.value,
|
|
@@ -843,8 +843,8 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
843
843
|
"is-loading",
|
|
844
844
|
"global-completion",
|
|
845
845
|
"validate-filter"
|
|
846
|
-
]),
|
|
847
|
-
|
|
846
|
+
]), R("div", Zt, [
|
|
847
|
+
B(le, {
|
|
848
848
|
action: v,
|
|
849
849
|
"use-default-style": !1,
|
|
850
850
|
class: "btn btn-secondary filter-action-btn dashboard-download-action",
|
|
@@ -853,73 +853,73 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
853
853
|
title: "Download dashboard image",
|
|
854
854
|
"aria-label": "Download dashboard image"
|
|
855
855
|
}, {
|
|
856
|
-
default:
|
|
856
|
+
default: Z(() => [...n[15] ||= [R("i", {
|
|
857
857
|
class: "mdi mdi-download-outline filter-action-icon",
|
|
858
858
|
"aria-hidden": "true"
|
|
859
|
-
}, null, -1),
|
|
859
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Download", -1)]]),
|
|
860
860
|
_: 1
|
|
861
861
|
}),
|
|
862
|
-
e.editsLocked ?
|
|
862
|
+
e.editsLocked ? I("", !0) : (W(), L("button", {
|
|
863
863
|
key: 0,
|
|
864
|
-
onClick:
|
|
865
|
-
class:
|
|
864
|
+
onClick: g,
|
|
865
|
+
class: U(["btn filter-action-btn dashboard-theme-action", l.value ? "btn-primary" : "btn-secondary"]),
|
|
866
866
|
"data-testid": "dashboard-theme-button",
|
|
867
867
|
title: "Dashboard theme",
|
|
868
868
|
"aria-label": "Dashboard theme"
|
|
869
|
-
}, [...n[16] ||= [
|
|
869
|
+
}, [...n[16] ||= [R("i", {
|
|
870
870
|
class: "mdi mdi-palette-outline filter-action-icon",
|
|
871
871
|
"aria-hidden": "true"
|
|
872
|
-
}, null, -1),
|
|
873
|
-
|
|
872
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Theme", -1)]], 2)),
|
|
873
|
+
R("button", {
|
|
874
874
|
onClick: p,
|
|
875
875
|
class: "btn btn-secondary filter-action-btn dashboard-export-action",
|
|
876
876
|
"data-testid": "share-dashboard-button",
|
|
877
877
|
title: "Export dashboard",
|
|
878
878
|
"aria-label": "Export dashboard"
|
|
879
|
-
}, [...n[17] ||= [
|
|
879
|
+
}, [...n[17] ||= [R("i", {
|
|
880
880
|
class: "mdi mdi-export-variant filter-action-icon",
|
|
881
881
|
"aria-hidden": "true"
|
|
882
|
-
}, null, -1),
|
|
883
|
-
|
|
882
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Export", -1)]]),
|
|
883
|
+
R("button", {
|
|
884
884
|
onClick: n[6] ||= (e) => t.$emit("navigate-up"),
|
|
885
885
|
class: "btn btn-secondary filter-action-btn mobile-dashboard-nav-action",
|
|
886
886
|
title: "Previous dashboard item",
|
|
887
887
|
"aria-label": "Previous dashboard item"
|
|
888
|
-
}, [...n[18] ||= [
|
|
888
|
+
}, [...n[18] ||= [R("i", {
|
|
889
889
|
class: "mdi mdi-chevron-up filter-action-icon",
|
|
890
890
|
"aria-hidden": "true"
|
|
891
891
|
}, null, -1)]]),
|
|
892
|
-
|
|
892
|
+
R("button", {
|
|
893
893
|
onClick: n[7] ||= (e) => t.$emit("navigate-down"),
|
|
894
894
|
class: "btn btn-secondary filter-action-btn mobile-dashboard-nav-action",
|
|
895
895
|
title: "Next dashboard item",
|
|
896
896
|
"aria-label": "Next dashboard item"
|
|
897
|
-
}, [...n[19] ||= [
|
|
897
|
+
}, [...n[19] ||= [R("i", {
|
|
898
898
|
class: "mdi mdi-chevron-down filter-action-icon",
|
|
899
899
|
"aria-hidden": "true"
|
|
900
900
|
}, null, -1)]]),
|
|
901
|
-
|
|
901
|
+
R("button", {
|
|
902
902
|
onClick: n[8] ||= (e) => t.$emit("toggle-chat"),
|
|
903
|
-
class:
|
|
903
|
+
class: U(["btn filter-action-btn", e.chatOpen ? "btn-primary" : "btn-secondary"]),
|
|
904
904
|
disabled: !e.hasLlmConnection,
|
|
905
905
|
"data-testid": "toggle-chat-button",
|
|
906
906
|
title: e.hasLlmConnection ? "Toggle AI assistant" : "No LLM connection configured",
|
|
907
907
|
"aria-label": "Toggle AI assistant"
|
|
908
|
-
}, [n[20] ||=
|
|
908
|
+
}, [n[20] ||= R("i", {
|
|
909
909
|
class: "mdi mdi-creation-outline filter-action-icon",
|
|
910
910
|
"aria-hidden": "true"
|
|
911
|
-
}, null, -1),
|
|
912
|
-
|
|
913
|
-
onClick:
|
|
911
|
+
}, null, -1), R("span", $t, J(e.chatOpen ? "Close AI" : "AI"), 1)], 10, Qt),
|
|
912
|
+
R("button", {
|
|
913
|
+
onClick: ie,
|
|
914
914
|
class: "btn btn-primary filter-action-btn",
|
|
915
915
|
"data-testid": "refresh-button",
|
|
916
916
|
title: "Refresh dashboard",
|
|
917
917
|
"aria-label": "Refresh dashboard"
|
|
918
|
-
}, [...n[21] ||= [
|
|
918
|
+
}, [...n[21] ||= [R("i", {
|
|
919
919
|
class: "mdi mdi-refresh filter-action-icon",
|
|
920
920
|
"aria-hidden": "true"
|
|
921
|
-
}, null, -1),
|
|
922
|
-
|
|
921
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Refresh", -1)]]),
|
|
922
|
+
R("div", en, [R("div", tn, [R("i", { class: U(ae.value + " select-icon") }, null, 2), R("select", {
|
|
923
923
|
id: "viewMode",
|
|
924
924
|
"data-testid": "mode-selector",
|
|
925
925
|
onChange: y,
|
|
@@ -927,26 +927,26 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
927
927
|
disabled: e.editsLocked,
|
|
928
928
|
class: "mode-select"
|
|
929
929
|
}, [...n[22] ||= [
|
|
930
|
-
|
|
930
|
+
R("option", {
|
|
931
931
|
value: "editing",
|
|
932
932
|
"data-testid": "edit-mode-option"
|
|
933
933
|
}, "Edit", -1),
|
|
934
|
-
|
|
934
|
+
R("option", {
|
|
935
935
|
value: "published",
|
|
936
936
|
"data-testid": "view-mode-option"
|
|
937
937
|
}, "View", -1),
|
|
938
|
-
|
|
938
|
+
R("option", {
|
|
939
939
|
value: "fullscreen",
|
|
940
940
|
"data-testid": "fullscreen-mode-option"
|
|
941
941
|
}, "Fullscreen", -1)
|
|
942
942
|
]], 40, nn)])])
|
|
943
943
|
])]),
|
|
944
|
-
|
|
944
|
+
B(Le, {
|
|
945
945
|
dashboard: e.dashboard,
|
|
946
946
|
"is-open": c.value,
|
|
947
947
|
onClose: m
|
|
948
948
|
}, null, 8, ["dashboard", "is-open"]),
|
|
949
|
-
|
|
949
|
+
B(pt, {
|
|
950
950
|
dashboard: e.dashboard,
|
|
951
951
|
"is-open": l.value,
|
|
952
952
|
onClose: n[9] ||= (e) => l.value = !1,
|
|
@@ -958,14 +958,14 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
958
958
|
//#endregion
|
|
959
959
|
//#region components/dashboard/useDashboardItemShell.ts
|
|
960
960
|
function an(e) {
|
|
961
|
-
let t =
|
|
961
|
+
let t = G(null), n = G(!1), r = G(null), i = G(!1), a = G(null), o = G(!1), s = () => {
|
|
962
962
|
a.value &&= (clearTimeout(a.value), null);
|
|
963
963
|
}, c = () => {
|
|
964
964
|
if (!t.value) return 0;
|
|
965
965
|
let e = t.value.getBoundingClientRect(), n = window.scrollY || document.documentElement.scrollTop, r = e.top + n, i = Math.floor(r / 200) * 10;
|
|
966
966
|
return Math.min(i, 100);
|
|
967
967
|
};
|
|
968
|
-
|
|
968
|
+
we(() => {
|
|
969
969
|
setTimeout(() => {
|
|
970
970
|
let t = c();
|
|
971
971
|
if (!e.results.value) {
|
|
@@ -976,9 +976,9 @@ function an(e) {
|
|
|
976
976
|
n.value = !0;
|
|
977
977
|
}, t);
|
|
978
978
|
}, 0);
|
|
979
|
-
}),
|
|
979
|
+
}), Te(() => {
|
|
980
980
|
s();
|
|
981
|
-
}),
|
|
981
|
+
}), X(e.loading, (t) => {
|
|
982
982
|
if (s(), t) {
|
|
983
983
|
a.value = setTimeout(() => {
|
|
984
984
|
i.value = !0, a.value = null;
|
|
@@ -1022,13 +1022,13 @@ function an(e) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
//#endregion
|
|
1024
1024
|
//#region components/dashboard/DashboardChart.vue?vue&type=script&lang.ts
|
|
1025
|
-
var on =
|
|
1025
|
+
var on = V({
|
|
1026
1026
|
name: "DashboardChart",
|
|
1027
1027
|
components: {
|
|
1028
|
-
VegaLiteChart:
|
|
1029
|
-
ErrorMessage:
|
|
1030
|
-
LoadingView:
|
|
1031
|
-
DrilldownPane:
|
|
1028
|
+
VegaLiteChart: ie,
|
|
1029
|
+
ErrorMessage: j,
|
|
1030
|
+
LoadingView: ue,
|
|
1031
|
+
DrilldownPane: de
|
|
1032
1032
|
},
|
|
1033
1033
|
props: {
|
|
1034
1034
|
dashboardId: {
|
|
@@ -1068,30 +1068,30 @@ var on = B({
|
|
|
1068
1068
|
required: !0
|
|
1069
1069
|
}
|
|
1070
1070
|
},
|
|
1071
|
-
setup(
|
|
1072
|
-
let
|
|
1073
|
-
if (
|
|
1074
|
-
...
|
|
1071
|
+
setup(t, { emit: n }) {
|
|
1072
|
+
let r = G(null), i = P(() => t.getItemData(t.itemId, t.dashboardId)), a = P(() => i.value.structured_content.query), o = P(() => i.value.results || null), s = P(() => i.value.name || ""), c = P(() => (i.value.height || 300) - 75), l = P(() => i.value.width || 300), u = P(() => {
|
|
1073
|
+
if (i.value.chartConfig) return {
|
|
1074
|
+
...i.value.chartConfig,
|
|
1075
1075
|
showTitle: !1
|
|
1076
1076
|
};
|
|
1077
|
-
}), d =
|
|
1077
|
+
}), d = P(() => i.value.loading || !1), f = P(() => i.value.error || null), p = P(() => i.value.filters || []), m = P(() => i.value.loadStartTime || null), h = P(() => (i.value.chartFilters || []).map((e) => e.value)), g = P(() => i.value.hasDrilldown), _ = P(() => i.value.onRefresh || null), v = H("analyticsStore", null), y = (e) => {
|
|
1078
1078
|
let n = {
|
|
1079
|
-
...
|
|
1079
|
+
...e,
|
|
1080
1080
|
showTitle: !1
|
|
1081
1081
|
};
|
|
1082
1082
|
if (g.value) {
|
|
1083
|
-
|
|
1083
|
+
t.setItemData(t.itemId, t.dashboardId, { drilldownChartConfig: n });
|
|
1084
1084
|
return;
|
|
1085
1085
|
}
|
|
1086
|
-
|
|
1087
|
-
}, { chartContainer: b, ready: x, showLoading: S, controlsVisible: C, executeQuery: w, handleLocalRefresh:
|
|
1088
|
-
dashboardId: () =>
|
|
1089
|
-
itemId: () =>
|
|
1090
|
-
query:
|
|
1091
|
-
results:
|
|
1086
|
+
t.setItemData(t.itemId, t.dashboardId, { chartConfig: n });
|
|
1087
|
+
}, { chartContainer: b, ready: x, showLoading: S, controlsVisible: C, executeQuery: w, handleLocalRefresh: T, onChartMouseEnter: E, onChartMouseLeave: D } = an({
|
|
1088
|
+
dashboardId: () => t.dashboardId,
|
|
1089
|
+
itemId: () => t.itemId,
|
|
1090
|
+
query: a,
|
|
1091
|
+
results: o,
|
|
1092
1092
|
loading: d,
|
|
1093
1093
|
onRefresh: _,
|
|
1094
|
-
getDashboardQueryExecutor:
|
|
1094
|
+
getDashboardQueryExecutor: t.getDashboardQueryExecutor,
|
|
1095
1095
|
analyticsStore: v,
|
|
1096
1096
|
analyticsEvent: "dashboard-chart-execution",
|
|
1097
1097
|
analyticsType: "CHART",
|
|
@@ -1099,51 +1099,51 @@ var on = B({
|
|
|
1099
1099
|
});
|
|
1100
1100
|
return {
|
|
1101
1101
|
chartContainer: b,
|
|
1102
|
-
results:
|
|
1102
|
+
results: o,
|
|
1103
1103
|
ready: x,
|
|
1104
1104
|
loading: d,
|
|
1105
1105
|
showLoading: S,
|
|
1106
1106
|
error: f,
|
|
1107
1107
|
filters: p,
|
|
1108
|
-
query:
|
|
1108
|
+
query: a,
|
|
1109
1109
|
chartHeight: c,
|
|
1110
1110
|
chartWidth: l,
|
|
1111
1111
|
chartConfig: u,
|
|
1112
1112
|
chartTitle: s,
|
|
1113
1113
|
onChartConfigChange: y,
|
|
1114
1114
|
onRefresh: _,
|
|
1115
|
-
handleLocalRefresh:
|
|
1115
|
+
handleLocalRefresh: T,
|
|
1116
1116
|
chartSelection: h,
|
|
1117
1117
|
startTime: m,
|
|
1118
|
-
handleDimensionClick: (
|
|
1119
|
-
|
|
1120
|
-
source:
|
|
1121
|
-
filters:
|
|
1122
|
-
chart:
|
|
1123
|
-
append:
|
|
1118
|
+
handleDimensionClick: (e) => {
|
|
1119
|
+
n("dimension-click", {
|
|
1120
|
+
source: t.itemId,
|
|
1121
|
+
filters: e.filters,
|
|
1122
|
+
chart: e.chart,
|
|
1123
|
+
append: e.append
|
|
1124
1124
|
});
|
|
1125
1125
|
},
|
|
1126
1126
|
handleBackgroundClick: () => {
|
|
1127
|
-
|
|
1127
|
+
n("background-click");
|
|
1128
1128
|
},
|
|
1129
|
-
activeDrilldown:
|
|
1130
|
-
activateDrilldown: (
|
|
1131
|
-
let
|
|
1132
|
-
|
|
1133
|
-
remove:
|
|
1134
|
-
filter:
|
|
1129
|
+
activeDrilldown: r,
|
|
1130
|
+
activateDrilldown: (t) => {
|
|
1131
|
+
let n = t.filters, i = Object.keys(n)[0], a = e(t.filters);
|
|
1132
|
+
i && (r.value = {
|
|
1133
|
+
remove: i,
|
|
1134
|
+
filter: a
|
|
1135
1135
|
});
|
|
1136
1136
|
},
|
|
1137
|
-
submitDrilldown: async (
|
|
1138
|
-
let
|
|
1137
|
+
submitDrilldown: async (e) => {
|
|
1138
|
+
let n = await t.getDashboardQueryExecutor(t.dashboardId).createDrilldownQuery(a.value, e, r.value.remove, r.value.filter, i.value.rootContent || [], (i.value.imports || []).map((e) => ({
|
|
1139
1139
|
name: e.name,
|
|
1140
1140
|
alias: e.alias
|
|
1141
1141
|
})));
|
|
1142
|
-
|
|
1143
|
-
drilldown:
|
|
1142
|
+
t.setItemData(t.itemId, t.dashboardId, {
|
|
1143
|
+
drilldown: n,
|
|
1144
1144
|
drilldownChartConfig: null,
|
|
1145
1145
|
loading: !0
|
|
1146
|
-
}), S.value = !0,
|
|
1146
|
+
}), S.value = !0, r.value = null, await w().then(() => {
|
|
1147
1147
|
x.value = !0;
|
|
1148
1148
|
}).catch((e) => {
|
|
1149
1149
|
console.error("Error executing drilldown query:", e), x.value = !0;
|
|
@@ -1152,10 +1152,10 @@ var on = B({
|
|
|
1152
1152
|
});
|
|
1153
1153
|
},
|
|
1154
1154
|
controlsVisible: C,
|
|
1155
|
-
onChartMouseEnter:
|
|
1156
|
-
onChartMouseLeave:
|
|
1155
|
+
onChartMouseEnter: E,
|
|
1156
|
+
onChartMouseLeave: D,
|
|
1157
1157
|
revertDrilldown: async () => {
|
|
1158
|
-
|
|
1158
|
+
t.setItemData(t.itemId, t.dashboardId, {
|
|
1159
1159
|
drilldown: null,
|
|
1160
1160
|
drilldownChartConfig: null,
|
|
1161
1161
|
loading: !0
|
|
@@ -1169,14 +1169,14 @@ var on = B({
|
|
|
1169
1169
|
class: "loading-overlay"
|
|
1170
1170
|
};
|
|
1171
1171
|
function cn(e, t, n, r, i, a) {
|
|
1172
|
-
let o =
|
|
1173
|
-
return
|
|
1172
|
+
let o = q("drilldown-pane"), s = q("ErrorMessage"), c = q("VegaLiteChart"), l = q("LoadingView");
|
|
1173
|
+
return W(), L("div", {
|
|
1174
1174
|
ref: "chartContainer",
|
|
1175
|
-
class:
|
|
1175
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1176
1176
|
onMouseenter: t[3] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1177
1177
|
onMouseleave: t[4] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1178
1178
|
}, [
|
|
1179
|
-
e.activeDrilldown ? (
|
|
1179
|
+
e.activeDrilldown ? (W(), F(o, {
|
|
1180
1180
|
key: 0,
|
|
1181
1181
|
"drilldown-remove": e.activeDrilldown.remove,
|
|
1182
1182
|
"drilldown-filter": e.activeDrilldown.filter,
|
|
@@ -1188,7 +1188,7 @@ function cn(e, t, n, r, i, a) {
|
|
|
1188
1188
|
"drilldown-filter",
|
|
1189
1189
|
"symbols",
|
|
1190
1190
|
"onSubmit"
|
|
1191
|
-
])) : e.error && !e.loading ? (
|
|
1191
|
+
])) : e.error && !e.loading ? (W(), F(s, {
|
|
1192
1192
|
key: 1,
|
|
1193
1193
|
compact: !0,
|
|
1194
1194
|
details: e.error,
|
|
@@ -1198,7 +1198,7 @@ function cn(e, t, n, r, i, a) {
|
|
|
1198
1198
|
"details",
|
|
1199
1199
|
"query",
|
|
1200
1200
|
"filters"
|
|
1201
|
-
])) : e.results && e.ready ? (
|
|
1201
|
+
])) : e.results && e.ready ? (W(), F(c, {
|
|
1202
1202
|
key: 2,
|
|
1203
1203
|
id: `${e.itemId}-${e.dashboardId}`,
|
|
1204
1204
|
columns: e.results.headers,
|
|
@@ -1233,33 +1233,33 @@ function cn(e, t, n, r, i, a) {
|
|
|
1233
1233
|
"onRefreshClick",
|
|
1234
1234
|
"onDrilldownClick",
|
|
1235
1235
|
"onRevertDrilldown"
|
|
1236
|
-
])) :
|
|
1237
|
-
e.loading && e.showLoading ? (
|
|
1236
|
+
])) : I("", !0),
|
|
1237
|
+
e.loading && e.showLoading ? (W(), L("div", sn, [B(l, {
|
|
1238
1238
|
startTime: e.startTime,
|
|
1239
1239
|
text: "",
|
|
1240
1240
|
subtle: ""
|
|
1241
|
-
}, null, 8, ["startTime"])])) :
|
|
1242
|
-
!e.editMode || !(e.results && e.ready) ? (
|
|
1241
|
+
}, null, 8, ["startTime"])])) : I("", !0),
|
|
1242
|
+
!e.editMode || !(e.results && e.ready) ? (W(), L("div", {
|
|
1243
1243
|
key: 4,
|
|
1244
|
-
class:
|
|
1245
|
-
}, [
|
|
1244
|
+
class: U(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1245
|
+
}, [R("button", {
|
|
1246
1246
|
onClick: t[1] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
1247
1247
|
class: "control-btn",
|
|
1248
1248
|
"data-testid": "refresh-chart-btn",
|
|
1249
1249
|
title: "Refresh table"
|
|
1250
|
-
}, [...t[5] ||= [
|
|
1250
|
+
}, [...t[5] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]]), R("button", {
|
|
1251
1251
|
onClick: t[2] ||= (...t) => e.revertDrilldown && e.revertDrilldown(...t),
|
|
1252
1252
|
class: "control-btn",
|
|
1253
1253
|
"data-testid": "refresh-chart-btn",
|
|
1254
1254
|
title: "Clear Drilldown"
|
|
1255
|
-
}, [...t[6] ||= [
|
|
1255
|
+
}, [...t[6] ||= [R("i", { class: "mdi mdi-undo icon" }, null, -1)]])], 2)) : I("", !0)
|
|
1256
1256
|
], 34);
|
|
1257
1257
|
}
|
|
1258
|
-
var ln = /*#__PURE__*/
|
|
1258
|
+
var ln = /*#__PURE__*/ d(on, [["render", cn], ["__scopeId", "data-v-36046d80"]]), un = V({
|
|
1259
1259
|
name: "DynamicMarkdownChart",
|
|
1260
1260
|
components: {
|
|
1261
|
-
ErrorMessage:
|
|
1262
|
-
MarkdownRenderer:
|
|
1261
|
+
ErrorMessage: j,
|
|
1262
|
+
MarkdownRenderer: fe
|
|
1263
1263
|
},
|
|
1264
1264
|
props: {
|
|
1265
1265
|
dashboardId: {
|
|
@@ -1302,10 +1302,10 @@ var ln = /*#__PURE__*/ e(on, [["render", cn], ["__scopeId", "data-v-36046d80"]])
|
|
|
1302
1302
|
}
|
|
1303
1303
|
},
|
|
1304
1304
|
setup(e) {
|
|
1305
|
-
let t =
|
|
1305
|
+
let t = P(() => e.getItemData(e.itemId, e.dashboardId)), n = P(() => t.value.structured_content || {
|
|
1306
1306
|
markdown: "",
|
|
1307
1307
|
query: ""
|
|
1308
|
-
}), r =
|
|
1308
|
+
}), r = P(() => n.value.markdown || ""), i = P(() => n.value.query || ""), a = P(() => t.value.results || null), o = P(() => t.value.loading || !1), s = P(() => t.value.error || null), c = P(() => t.value.filters || []), l = P(() => t.value.loadStartTime || null), u = P(() => t.value.onRefresh || null), d = H("connectionStore"), f = H("analyticsStore");
|
|
1309
1309
|
if (!d) throw Error("Connection store not found!");
|
|
1310
1310
|
let { chartContainer: p, ready: m, controlsVisible: h, handleLocalRefresh: g, onChartMouseEnter: _, onChartMouseLeave: v } = an({
|
|
1311
1311
|
dashboardId: () => e.dashboardId,
|
|
@@ -1339,13 +1339,13 @@ var ln = /*#__PURE__*/ e(on, [["render", cn], ["__scopeId", "data-v-36046d80"]])
|
|
|
1339
1339
|
//#endregion
|
|
1340
1340
|
//#region components/dashboard/DashboardMarkdown.vue
|
|
1341
1341
|
function dn(e, t, n, r, i, a) {
|
|
1342
|
-
let o =
|
|
1343
|
-
return
|
|
1342
|
+
let o = q("ErrorMessage"), s = q("MarkdownRenderer");
|
|
1343
|
+
return W(), L("div", {
|
|
1344
1344
|
ref: "chartContainer",
|
|
1345
|
-
class:
|
|
1345
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1346
1346
|
onMouseenter: t[1] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1347
1347
|
onMouseleave: t[2] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1348
|
-
}, [e.error && !e.loading ? (
|
|
1348
|
+
}, [e.error && !e.loading ? (W(), F(o, {
|
|
1349
1349
|
key: 0,
|
|
1350
1350
|
compact: !0,
|
|
1351
1351
|
details: e.error,
|
|
@@ -1355,7 +1355,7 @@ function dn(e, t, n, r, i, a) {
|
|
|
1355
1355
|
"details",
|
|
1356
1356
|
"query",
|
|
1357
1357
|
"filters"
|
|
1358
|
-
])) : e.ready ? (
|
|
1358
|
+
])) : e.ready ? (W(), F(s, {
|
|
1359
1359
|
key: 1,
|
|
1360
1360
|
markdown: e.markdown,
|
|
1361
1361
|
results: e.results,
|
|
@@ -1364,22 +1364,22 @@ function dn(e, t, n, r, i, a) {
|
|
|
1364
1364
|
"markdown",
|
|
1365
1365
|
"results",
|
|
1366
1366
|
"loading"
|
|
1367
|
-
])) :
|
|
1367
|
+
])) : I("", !0), !e.loading && e.editMode ? (W(), L("div", {
|
|
1368
1368
|
key: 2,
|
|
1369
|
-
class:
|
|
1370
|
-
}, [
|
|
1369
|
+
class: U(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1370
|
+
}, [R("button", {
|
|
1371
1371
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
1372
1372
|
class: "control-btn",
|
|
1373
1373
|
"data-testid": "refresh-chart-btn",
|
|
1374
1374
|
title: "Refresh text"
|
|
1375
|
-
}, [...t[3] ||= [
|
|
1375
|
+
}, [...t[3] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])], 2)) : I("", !0)], 34);
|
|
1376
1376
|
}
|
|
1377
|
-
var fn = /*#__PURE__*/
|
|
1377
|
+
var fn = /*#__PURE__*/ d(un, [["render", dn], ["__scopeId", "data-v-ffafce48"]]), pn = V({
|
|
1378
1378
|
name: "DashboardTable",
|
|
1379
1379
|
components: {
|
|
1380
|
-
DataTable:
|
|
1381
|
-
ErrorMessage:
|
|
1382
|
-
LoadingView:
|
|
1380
|
+
DataTable: ce,
|
|
1381
|
+
ErrorMessage: j,
|
|
1382
|
+
LoadingView: ue
|
|
1383
1383
|
},
|
|
1384
1384
|
props: {
|
|
1385
1385
|
dashboardId: {
|
|
@@ -1416,7 +1416,7 @@ var fn = /*#__PURE__*/ e(un, [["render", dn], ["__scopeId", "data-v-ffafce48"]])
|
|
|
1416
1416
|
}
|
|
1417
1417
|
},
|
|
1418
1418
|
setup(e, { emit: t }) {
|
|
1419
|
-
let n =
|
|
1419
|
+
let n = P(() => e.getItemData(e.itemId, e.dashboardId)), r = P(() => n.value.content), i = P(() => n.value.results || null), a = P(() => n.value.loading || !1), o = P(() => n.value.error || null), s = P(() => n.value.filters || []), c = P(() => n.value.loadStartTime || null), l = P(() => (n.value.height || 300) - 75), u = P(() => (n.value.width || 300) - 100), d = P(() => n.value.onRefresh || null), f = H("connectionStore"), p = H("analyticsStore");
|
|
1420
1420
|
if (!f) throw Error("Connection store not found!");
|
|
1421
1421
|
let { chartContainer: m, ready: h, showLoading: g, controlsVisible: _, handleLocalRefresh: v, onChartMouseEnter: y, onChartMouseLeave: b } = an({
|
|
1422
1422
|
dashboardId: () => e.dashboardId,
|
|
@@ -1465,14 +1465,14 @@ var fn = /*#__PURE__*/ e(un, [["render", dn], ["__scopeId", "data-v-ffafce48"]])
|
|
|
1465
1465
|
class: "loading-overlay"
|
|
1466
1466
|
};
|
|
1467
1467
|
function hn(e, t, n, r, i, a) {
|
|
1468
|
-
let o =
|
|
1469
|
-
return
|
|
1468
|
+
let o = q("ErrorMessage"), s = q("data-table"), c = q("LoadingView");
|
|
1469
|
+
return W(), L("div", {
|
|
1470
1470
|
ref: "chartContainer",
|
|
1471
|
-
class:
|
|
1471
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1472
1472
|
onMouseenter: t[1] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1473
1473
|
onMouseleave: t[2] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1474
1474
|
}, [
|
|
1475
|
-
e.error && !e.loading ? (
|
|
1475
|
+
e.error && !e.loading ? (W(), F(o, {
|
|
1476
1476
|
key: 0,
|
|
1477
1477
|
compact: !0,
|
|
1478
1478
|
details: e.error,
|
|
@@ -1482,7 +1482,7 @@ function hn(e, t, n, r, i, a) {
|
|
|
1482
1482
|
"details",
|
|
1483
1483
|
"query",
|
|
1484
1484
|
"filters"
|
|
1485
|
-
])) : e.results && e.ready ? (
|
|
1485
|
+
])) : e.results && e.ready ? (W(), F(s, {
|
|
1486
1486
|
key: 1,
|
|
1487
1487
|
id: `${e.itemId}-${e.dashboardId}`,
|
|
1488
1488
|
headers: e.results.headers,
|
|
@@ -1500,27 +1500,27 @@ function hn(e, t, n, r, i, a) {
|
|
|
1500
1500
|
"containerHeight",
|
|
1501
1501
|
"onCellClick",
|
|
1502
1502
|
"onBackgroundClick"
|
|
1503
|
-
])) :
|
|
1504
|
-
e.loading && e.showLoading ? (
|
|
1503
|
+
])) : I("", !0),
|
|
1504
|
+
e.loading && e.showLoading ? (W(), L("div", mn, [B(c, {
|
|
1505
1505
|
startTime: e.startTime,
|
|
1506
1506
|
text: "",
|
|
1507
1507
|
subtle: ""
|
|
1508
|
-
}, null, 8, ["startTime"])])) :
|
|
1509
|
-
!e.loading && e.editMode ? (
|
|
1508
|
+
}, null, 8, ["startTime"])])) : I("", !0),
|
|
1509
|
+
!e.loading && e.editMode ? (W(), L("div", {
|
|
1510
1510
|
key: 3,
|
|
1511
|
-
class:
|
|
1512
|
-
}, [
|
|
1511
|
+
class: U(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1512
|
+
}, [R("button", {
|
|
1513
1513
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
1514
1514
|
class: "control-btn",
|
|
1515
1515
|
"data-testid": "refresh-chart-btn",
|
|
1516
1516
|
title: "Refresh table"
|
|
1517
|
-
}, [...t[3] ||= [
|
|
1517
|
+
}, [...t[3] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])], 2)) : I("", !0)
|
|
1518
1518
|
], 34);
|
|
1519
1519
|
}
|
|
1520
|
-
var gn = /*#__PURE__*/
|
|
1520
|
+
var gn = /*#__PURE__*/ d(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]]), _n = { class: "filter-tile" }, vn = ["title"], yn = ["disabled", "aria-expanded"], bn = ["title"], xn = { class: "dropdown-search" }, Sn = ["placeholder"], Cn = { class: "dropdown-scroll" }, wn = ["checked"], Tn = ["checked", "onChange"], En = ["innerHTML"], Dn = {
|
|
1521
1521
|
key: 1,
|
|
1522
1522
|
class: "dropdown-empty"
|
|
1523
|
-
}, On = { class: "dropdown-footer" }, kn = /*#__PURE__*/
|
|
1523
|
+
}, On = { class: "dropdown-footer" }, kn = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
1524
1524
|
__name: "DashboardDataSelector",
|
|
1525
1525
|
props: {
|
|
1526
1526
|
headers: {
|
|
@@ -1547,48 +1547,48 @@ var gn = /*#__PURE__*/ e(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1547
1547
|
},
|
|
1548
1548
|
emits: ["cell-click", "background-click"],
|
|
1549
1549
|
setup(e, { emit: t }) {
|
|
1550
|
-
let
|
|
1550
|
+
let n = e, r = t, i = G([...n.initialSelection ?? []]), a = G([]), o = G(""), s = G(!1), c = G(null), l = G(null), u = G(null), d = P(() => Array.from(n.headers.values())), f = P(() => d.value[0] || null), m = P(() => d.value[1] || d.value[0] || null);
|
|
1551
1551
|
function h(e, t) {
|
|
1552
1552
|
switch (t.type) {
|
|
1553
|
-
case
|
|
1554
|
-
case
|
|
1555
|
-
case
|
|
1556
|
-
case
|
|
1557
|
-
case
|
|
1558
|
-
case
|
|
1559
|
-
case
|
|
1560
|
-
case
|
|
1553
|
+
case p.FLOAT: return t.traits?.includes("usd") ? `$${Number(e).toFixed(t.scale || 2)}` : t.traits?.includes("percent") ? `${(Number(e) * 100).toFixed(2)}%` : Number(e).toFixed(t.scale || 2);
|
|
1554
|
+
case p.DATETIME:
|
|
1555
|
+
case p.TIMESTAMP:
|
|
1556
|
+
case p.DATE:
|
|
1557
|
+
case p.TIME: return e instanceof Date ? e.toLocaleString() : String(e);
|
|
1558
|
+
case p.BOOLEAN: return e ? "✓" : "✗";
|
|
1559
|
+
case p.ARRAY:
|
|
1560
|
+
case p.STRUCT: return JSON.stringify(e);
|
|
1561
1561
|
default: return String(e);
|
|
1562
1562
|
}
|
|
1563
1563
|
}
|
|
1564
|
-
let g =
|
|
1565
|
-
let e =
|
|
1566
|
-
if (!e || !t || !
|
|
1567
|
-
let
|
|
1568
|
-
for (let t of
|
|
1569
|
-
let
|
|
1570
|
-
|
|
1571
|
-
label: h(
|
|
1564
|
+
let g = P(() => {
|
|
1565
|
+
let e = f.value, t = m.value;
|
|
1566
|
+
if (!e || !t || !n.results || n.results.length === 0) return [];
|
|
1567
|
+
let r = e.name, i = t.name, a = [];
|
|
1568
|
+
for (let t of n.results) {
|
|
1569
|
+
let n = t[r], o = t[i];
|
|
1570
|
+
n != null && o != null && a.push({
|
|
1571
|
+
label: h(n, e),
|
|
1572
1572
|
value: o
|
|
1573
1573
|
});
|
|
1574
1574
|
}
|
|
1575
1575
|
return a;
|
|
1576
|
-
}), _ =
|
|
1576
|
+
}), _ = P(() => {
|
|
1577
1577
|
let e = /* @__PURE__ */ new Map();
|
|
1578
1578
|
for (let t of g.value) e.set(t.value, t.label);
|
|
1579
1579
|
return e;
|
|
1580
|
-
}), v =
|
|
1581
|
-
if (!
|
|
1582
|
-
let e =
|
|
1580
|
+
}), v = P(() => {
|
|
1581
|
+
if (!o.value) return g.value;
|
|
1582
|
+
let e = o.value.toLowerCase();
|
|
1583
1583
|
return g.value.filter((t) => t.label.toLowerCase().includes(e));
|
|
1584
|
-
}), y =
|
|
1585
|
-
function
|
|
1586
|
-
let e =
|
|
1584
|
+
}), y = P(() => f.value?.name || "Field"), b = P(() => i.value.length > 0), x = P(() => !g.value || g.value.length === 0 ? "No data available" : i.value.length === 0 ? `All (${g.value.length})` : i.value.length === 1 ? _.value.get(i.value[0]) ?? String(i.value[0]) : `${_.value.get(i.value[0]) ?? String(i.value[0])} +${i.value.length - 1}`), S = P(() => !g.value || g.value.length === 0), C = P(() => v.value.length > 0 && v.value.every((e) => a.value.includes(e.value))), w = G({});
|
|
1585
|
+
function T() {
|
|
1586
|
+
let e = c.value;
|
|
1587
1587
|
if (!e) {
|
|
1588
1588
|
w.value = {};
|
|
1589
1589
|
return;
|
|
1590
1590
|
}
|
|
1591
|
-
let t = e.getBoundingClientRect(), n = window.visualViewport, r = n?.offsetLeft ?? 0, i = n?.offsetTop ?? 0, a = n?.width ?? window.innerWidth, o = n?.height ?? window.innerHeight, s = r + a,
|
|
1591
|
+
let t = e.getBoundingClientRect(), n = window.visualViewport, r = n?.offsetLeft ?? 0, i = n?.offsetTop ?? 0, a = n?.width ?? window.innerWidth, o = n?.height ?? window.innerHeight, s = r + a, l = i + o, u = Math.min(Math.max(t.width, 220), Math.max(0, a - 16)), d = Math.min(Math.max(t.left, r + 8), Math.max(r + 8, s - u - 8)), f = l - t.bottom - 4 - 8, p = t.top - i - 4 - 8, m = f < 240 && p > f, h = Math.min(360, Math.max(96, m ? p : f)), g = m ? Math.max(i + 8, t.top - 4 - h) : Math.max(i + 8, t.bottom + 4);
|
|
1592
1592
|
w.value = {
|
|
1593
1593
|
position: "fixed",
|
|
1594
1594
|
top: `${g}px`,
|
|
@@ -1598,49 +1598,49 @@ var gn = /*#__PURE__*/ e(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1598
1598
|
maxHeight: `${h}px`
|
|
1599
1599
|
};
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1602
|
-
S.value || (
|
|
1603
|
-
|
|
1601
|
+
function E() {
|
|
1602
|
+
S.value || (a.value = [...i.value], o.value = "", s.value = !0, xe(() => {
|
|
1603
|
+
T(), u.value?.focus();
|
|
1604
1604
|
}));
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1607
|
-
|
|
1606
|
+
function D() {
|
|
1607
|
+
s.value = !1;
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1609
|
+
function ee() {
|
|
1610
|
+
s.value ? D() : E();
|
|
1611
1611
|
}
|
|
1612
|
-
|
|
1613
|
-
function
|
|
1614
|
-
|
|
1612
|
+
ae(() => [c.value, l.value], () => D(), { enabled: () => s.value });
|
|
1613
|
+
function O() {
|
|
1614
|
+
s.value && T();
|
|
1615
1615
|
}
|
|
1616
|
-
|
|
1617
|
-
e ? (window.addEventListener("scroll",
|
|
1618
|
-
}),
|
|
1619
|
-
window.removeEventListener("scroll",
|
|
1616
|
+
X(s, (e) => {
|
|
1617
|
+
e ? (window.addEventListener("scroll", O, !0), window.addEventListener("resize", O), window.visualViewport?.addEventListener("scroll", O), window.visualViewport?.addEventListener("resize", O)) : (window.removeEventListener("scroll", O, !0), window.removeEventListener("resize", O), window.visualViewport?.removeEventListener("scroll", O), window.visualViewport?.removeEventListener("resize", O));
|
|
1618
|
+
}), Ce(() => {
|
|
1619
|
+
window.removeEventListener("scroll", O, !0), window.removeEventListener("resize", O), window.visualViewport?.removeEventListener("scroll", O), window.visualViewport?.removeEventListener("resize", O);
|
|
1620
1620
|
});
|
|
1621
|
-
function
|
|
1622
|
-
return
|
|
1621
|
+
function k(e) {
|
|
1622
|
+
return a.value.includes(e);
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1625
|
-
let t =
|
|
1626
|
-
t === -1 ?
|
|
1624
|
+
function te(e) {
|
|
1625
|
+
let t = a.value.indexOf(e.value);
|
|
1626
|
+
t === -1 ? a.value.push(e.value) : a.value.splice(t, 1);
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1629
|
-
if (C.value)
|
|
1628
|
+
function ne() {
|
|
1629
|
+
if (C.value) a.value = a.value.filter((e) => !v.value.some((t) => t.value === e));
|
|
1630
1630
|
else {
|
|
1631
|
-
let e = [...
|
|
1631
|
+
let e = [...a.value];
|
|
1632
1632
|
for (let t of v.value) e.includes(t.value) || e.push(t.value);
|
|
1633
|
-
|
|
1633
|
+
a.value = e;
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1637
|
-
|
|
1636
|
+
function re() {
|
|
1637
|
+
a.value = [];
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function ie(e) {
|
|
1640
1640
|
let t = m.value?.address || m.value?.name;
|
|
1641
1641
|
if (!t) return;
|
|
1642
1642
|
if (e.length === 0) {
|
|
1643
|
-
|
|
1643
|
+
r("background-click");
|
|
1644
1644
|
return;
|
|
1645
1645
|
}
|
|
1646
1646
|
let n = e.length === 1 ? {
|
|
@@ -1650,88 +1650,88 @@ var gn = /*#__PURE__*/ e(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1650
1650
|
op: "in",
|
|
1651
1651
|
value: [...e]
|
|
1652
1652
|
};
|
|
1653
|
-
|
|
1653
|
+
r("cell-click", {
|
|
1654
1654
|
filters: { [t]: n },
|
|
1655
1655
|
append: !1
|
|
1656
1656
|
});
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1659
|
-
|
|
1658
|
+
function oe() {
|
|
1659
|
+
i.value = [...a.value], ie(i.value), D();
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1662
|
-
|
|
1661
|
+
function A() {
|
|
1662
|
+
i.value = [], a.value = [], ie([]), D();
|
|
1663
1663
|
}
|
|
1664
|
-
|
|
1664
|
+
X(() => n.initialSelection, (e) => {
|
|
1665
1665
|
let t = e ?? [];
|
|
1666
|
-
t.length ===
|
|
1666
|
+
t.length === i.value.length && t.every((e, t) => e === i.value[t]) || (i.value = [...t]);
|
|
1667
1667
|
});
|
|
1668
|
-
function
|
|
1668
|
+
function se(e) {
|
|
1669
1669
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1670
1670
|
}
|
|
1671
|
-
function
|
|
1672
|
-
let t =
|
|
1673
|
-
if (!
|
|
1674
|
-
let n =
|
|
1675
|
-
return r === -1 ? t : `${t.slice(0, r)}<mark>${t.slice(r, r +
|
|
1671
|
+
function ce(e) {
|
|
1672
|
+
let t = se(e);
|
|
1673
|
+
if (!o.value) return t;
|
|
1674
|
+
let n = o.value.toLowerCase(), r = t.toLowerCase().indexOf(n);
|
|
1675
|
+
return r === -1 ? t : `${t.slice(0, r)}<mark>${t.slice(r, r + o.value.length)}</mark>${t.slice(r + o.value.length)}`;
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1678
|
-
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(),
|
|
1677
|
+
function le(e) {
|
|
1678
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), E());
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1681
|
-
e.key === "Escape" ? (e.preventDefault(),
|
|
1680
|
+
function j(e) {
|
|
1681
|
+
e.key === "Escape" ? (e.preventDefault(), D(), c.value?.focus()) : e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), oe());
|
|
1682
1682
|
}
|
|
1683
|
-
return (e, t) => (
|
|
1684
|
-
|
|
1683
|
+
return (e, t) => (W(), L("div", _n, [
|
|
1684
|
+
R("div", {
|
|
1685
1685
|
class: "filter-label",
|
|
1686
1686
|
title: y.value
|
|
1687
|
-
},
|
|
1688
|
-
|
|
1687
|
+
}, J(y.value), 9, vn),
|
|
1688
|
+
R("button", {
|
|
1689
1689
|
ref_key: "triggerRef",
|
|
1690
|
-
ref:
|
|
1690
|
+
ref: c,
|
|
1691
1691
|
type: "button",
|
|
1692
|
-
class:
|
|
1693
|
-
"is-open":
|
|
1692
|
+
class: U(["filter-trigger", {
|
|
1693
|
+
"is-open": s.value,
|
|
1694
1694
|
"has-selection": b.value,
|
|
1695
1695
|
"is-disabled": S.value
|
|
1696
1696
|
}]),
|
|
1697
1697
|
disabled: S.value,
|
|
1698
|
-
"aria-expanded":
|
|
1698
|
+
"aria-expanded": s.value,
|
|
1699
1699
|
"aria-haspopup": "listbox",
|
|
1700
|
-
onClick:
|
|
1701
|
-
onKeydown:
|
|
1700
|
+
onClick: ee,
|
|
1701
|
+
onKeydown: le
|
|
1702
1702
|
}, [
|
|
1703
|
-
|
|
1704
|
-
b.value &&
|
|
1703
|
+
R("span", { class: U(["filter-value", { muted: !b.value }]) }, J(x.value), 3),
|
|
1704
|
+
b.value && i.value.length > 1 ? (W(), L("span", {
|
|
1705
1705
|
key: 0,
|
|
1706
1706
|
class: "filter-count-badge",
|
|
1707
|
-
title: `${
|
|
1708
|
-
},
|
|
1709
|
-
b.value ? (
|
|
1707
|
+
title: `${i.value.length} selected`
|
|
1708
|
+
}, J(i.value.length), 9, bn)) : I("", !0),
|
|
1709
|
+
b.value ? (W(), L("span", {
|
|
1710
1710
|
key: 1,
|
|
1711
1711
|
class: "filter-clear",
|
|
1712
1712
|
role: "button",
|
|
1713
1713
|
tabindex: "-1",
|
|
1714
1714
|
title: "Clear selection",
|
|
1715
|
-
onClick: Ne(
|
|
1716
|
-
}, [...t[3] ||= [
|
|
1715
|
+
onClick: Ne(A, ["stop"])
|
|
1716
|
+
}, [...t[3] ||= [R("svg", {
|
|
1717
1717
|
viewBox: "0 0 24 24",
|
|
1718
1718
|
width: "14",
|
|
1719
1719
|
height: "14",
|
|
1720
1720
|
"aria-hidden": "true"
|
|
1721
|
-
}, [
|
|
1721
|
+
}, [R("path", {
|
|
1722
1722
|
d: "M6 6l12 12M18 6L6 18",
|
|
1723
1723
|
stroke: "currentColor",
|
|
1724
1724
|
"stroke-width": "2",
|
|
1725
1725
|
"stroke-linecap": "round",
|
|
1726
1726
|
fill: "none"
|
|
1727
|
-
})], -1)]])) :
|
|
1728
|
-
t[4] ||=
|
|
1727
|
+
})], -1)]])) : I("", !0),
|
|
1728
|
+
t[4] ||= R("svg", {
|
|
1729
1729
|
class: "chevron",
|
|
1730
1730
|
viewBox: "0 0 24 24",
|
|
1731
1731
|
width: "16",
|
|
1732
1732
|
height: "16",
|
|
1733
1733
|
"aria-hidden": "true"
|
|
1734
|
-
}, [
|
|
1734
|
+
}, [R("path", {
|
|
1735
1735
|
d: "M6 9l6 6 6-6",
|
|
1736
1736
|
stroke: "currentColor",
|
|
1737
1737
|
"stroke-width": "2",
|
|
@@ -1740,79 +1740,79 @@ var gn = /*#__PURE__*/ e(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1740
1740
|
fill: "none"
|
|
1741
1741
|
})], -1)
|
|
1742
1742
|
], 42, yn),
|
|
1743
|
-
(
|
|
1743
|
+
(W(), F(be, { to: "body" }, [s.value ? (W(), L("div", {
|
|
1744
1744
|
key: 0,
|
|
1745
1745
|
ref_key: "dropdownRef",
|
|
1746
|
-
ref:
|
|
1746
|
+
ref: l,
|
|
1747
1747
|
class: "filter-dropdown",
|
|
1748
|
-
style:
|
|
1748
|
+
style: Se(w.value),
|
|
1749
1749
|
role: "dialog",
|
|
1750
|
-
onKeydown:
|
|
1750
|
+
onKeydown: j
|
|
1751
1751
|
}, [
|
|
1752
|
-
|
|
1752
|
+
R("div", xn, [t[5] ||= R("svg", {
|
|
1753
1753
|
viewBox: "0 0 24 24",
|
|
1754
1754
|
width: "14",
|
|
1755
1755
|
height: "14",
|
|
1756
1756
|
"aria-hidden": "true"
|
|
1757
|
-
}, [
|
|
1757
|
+
}, [R("circle", {
|
|
1758
1758
|
cx: "11",
|
|
1759
1759
|
cy: "11",
|
|
1760
1760
|
r: "7",
|
|
1761
1761
|
stroke: "currentColor",
|
|
1762
1762
|
"stroke-width": "2",
|
|
1763
1763
|
fill: "none"
|
|
1764
|
-
}),
|
|
1764
|
+
}), R("path", {
|
|
1765
1765
|
d: "m20 20-3.5-3.5",
|
|
1766
1766
|
stroke: "currentColor",
|
|
1767
1767
|
"stroke-width": "2",
|
|
1768
1768
|
"stroke-linecap": "round"
|
|
1769
|
-
})], -1),
|
|
1769
|
+
})], -1), je(R("input", {
|
|
1770
1770
|
ref_key: "searchInputRef",
|
|
1771
|
-
ref:
|
|
1772
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1771
|
+
ref: u,
|
|
1772
|
+
"onUpdate:modelValue": t[0] ||= (e) => o.value = e,
|
|
1773
1773
|
type: "text",
|
|
1774
1774
|
class: "dropdown-search-input",
|
|
1775
1775
|
placeholder: `Search ${y.value.toLowerCase()}...`
|
|
1776
|
-
}, null, 8, Sn), [[
|
|
1777
|
-
|
|
1778
|
-
v.value.length > 0 ? (
|
|
1776
|
+
}, null, 8, Sn), [[ke, o.value]])]),
|
|
1777
|
+
R("div", Cn, [
|
|
1778
|
+
v.value.length > 0 ? (W(), L("label", {
|
|
1779
1779
|
key: 0,
|
|
1780
1780
|
class: "dropdown-item dropdown-item--all",
|
|
1781
1781
|
onMousedown: t[1] ||= Ne(() => {}, ["prevent"])
|
|
1782
|
-
}, [
|
|
1782
|
+
}, [R("input", {
|
|
1783
1783
|
type: "checkbox",
|
|
1784
1784
|
checked: C.value,
|
|
1785
|
-
onChange:
|
|
1786
|
-
}, null, 40, wn),
|
|
1787
|
-
(
|
|
1785
|
+
onChange: ne
|
|
1786
|
+
}, null, 40, wn), R("span", null, J(o.value ? `Select ${v.value.length} matching` : `All (${g.value.length})`), 1)], 32)) : I("", !0),
|
|
1787
|
+
(W(!0), L(N, null, K(v.value, (e, n) => (W(), L("label", {
|
|
1788
1788
|
key: n,
|
|
1789
|
-
class:
|
|
1789
|
+
class: U(["dropdown-item", { selected: k(e.value) }]),
|
|
1790
1790
|
onMousedown: t[2] ||= Ne(() => {}, ["prevent"])
|
|
1791
|
-
}, [
|
|
1791
|
+
}, [R("input", {
|
|
1792
1792
|
type: "checkbox",
|
|
1793
|
-
checked:
|
|
1794
|
-
onChange: (t) =>
|
|
1795
|
-
}, null, 40, Tn),
|
|
1796
|
-
v.value.length === 0 ? (
|
|
1793
|
+
checked: k(e.value),
|
|
1794
|
+
onChange: (t) => te(e)
|
|
1795
|
+
}, null, 40, Tn), R("span", { innerHTML: ce(e.label) }, null, 8, En)], 34))), 128)),
|
|
1796
|
+
v.value.length === 0 ? (W(), L("div", Dn, "No matches found")) : I("", !0)
|
|
1797
1797
|
]),
|
|
1798
|
-
|
|
1798
|
+
R("div", On, [R("button", {
|
|
1799
1799
|
type: "button",
|
|
1800
1800
|
class: "footer-btn",
|
|
1801
|
-
onClick:
|
|
1802
|
-
}, "Clear"),
|
|
1801
|
+
onClick: re
|
|
1802
|
+
}, "Clear"), R("button", {
|
|
1803
1803
|
type: "button",
|
|
1804
1804
|
class: "footer-btn primary",
|
|
1805
|
-
onClick:
|
|
1806
|
-
}, " Apply" +
|
|
1807
|
-
], 36)) :
|
|
1805
|
+
onClick: oe
|
|
1806
|
+
}, " Apply" + J(a.value.length > 0 ? ` (${a.value.length})` : ""), 1)])
|
|
1807
|
+
], 36)) : I("", !0)]))
|
|
1808
1808
|
]));
|
|
1809
1809
|
}
|
|
1810
|
-
}), [["__scopeId", "data-v-16a8f6a3"]]), An =
|
|
1810
|
+
}), [["__scopeId", "data-v-16a8f6a3"]]), An = V({
|
|
1811
1811
|
name: "DashboardFilter",
|
|
1812
1812
|
components: {
|
|
1813
1813
|
DashboardDataSelector: kn,
|
|
1814
|
-
ErrorMessage:
|
|
1815
|
-
LoadingView:
|
|
1814
|
+
ErrorMessage: j,
|
|
1815
|
+
LoadingView: ue
|
|
1816
1816
|
},
|
|
1817
1817
|
props: {
|
|
1818
1818
|
dashboardId: {
|
|
@@ -1849,7 +1849,7 @@ var gn = /*#__PURE__*/ e(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1849
1849
|
}
|
|
1850
1850
|
},
|
|
1851
1851
|
setup(e, { emit: t }) {
|
|
1852
|
-
let n =
|
|
1852
|
+
let n = P(() => e.getItemData(e.itemId, e.dashboardId)), r = P(() => n.value.content), i = P(() => n.value.results || null), a = P(() => n.value.loading || !1), o = P(() => n.value.error || null), s = P(() => n.value.filters || []), c = P(() => n.value.loadStartTime || null), l = P(() => (n.value.height || 300) - 75), u = P(() => (n.value.width || 300) - 100), d = P(() => n.value.onRefresh || null), f = H("connectionStore"), p = H("analyticsStore");
|
|
1853
1853
|
if (!f) throw Error("Connection store not found!");
|
|
1854
1854
|
let { chartContainer: m, ready: h, showLoading: g, controlsVisible: _, handleLocalRefresh: v, onChartMouseEnter: y, onChartMouseLeave: b } = an({
|
|
1855
1855
|
dashboardId: () => e.dashboardId,
|
|
@@ -1898,13 +1898,13 @@ var gn = /*#__PURE__*/ e(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1898
1898
|
class: "loading-overlay"
|
|
1899
1899
|
};
|
|
1900
1900
|
function Mn(e, t, n, r, i, a) {
|
|
1901
|
-
let o =
|
|
1902
|
-
return
|
|
1901
|
+
let o = q("ErrorMessage"), s = q("dashboard-data-selector"), c = q("LoadingView");
|
|
1902
|
+
return W(), L("div", {
|
|
1903
1903
|
ref: "chartContainer",
|
|
1904
|
-
class:
|
|
1904
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1905
1905
|
onMouseenter: t[0] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1906
1906
|
onMouseleave: t[1] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1907
|
-
}, [e.error && !e.loading ? (
|
|
1907
|
+
}, [e.error && !e.loading ? (W(), F(o, {
|
|
1908
1908
|
key: 0,
|
|
1909
1909
|
compact: !0,
|
|
1910
1910
|
details: e.error,
|
|
@@ -1914,7 +1914,7 @@ function Mn(e, t, n, r, i, a) {
|
|
|
1914
1914
|
"details",
|
|
1915
1915
|
"query",
|
|
1916
1916
|
"filters"
|
|
1917
|
-
])) : e.results && e.ready ? (
|
|
1917
|
+
])) : e.results && e.ready ? (W(), F(s, {
|
|
1918
1918
|
key: 1,
|
|
1919
1919
|
id: `${e.itemId}-${e.dashboardId}`,
|
|
1920
1920
|
headers: e.results.headers,
|
|
@@ -1931,22 +1931,22 @@ function Mn(e, t, n, r, i, a) {
|
|
|
1931
1931
|
"containerHeight",
|
|
1932
1932
|
"onCellClick",
|
|
1933
1933
|
"onBackgroundClick"
|
|
1934
|
-
])) :
|
|
1934
|
+
])) : I("", !0), e.loading && e.showLoading ? (W(), L("div", jn, [B(c, {
|
|
1935
1935
|
startTime: e.startTime,
|
|
1936
1936
|
text: "",
|
|
1937
1937
|
subtle: ""
|
|
1938
|
-
}, null, 8, ["startTime"])])) :
|
|
1938
|
+
}, null, 8, ["startTime"])])) : I("", !0)], 34);
|
|
1939
1939
|
}
|
|
1940
|
-
var Nn = /*#__PURE__*/
|
|
1940
|
+
var Nn = /*#__PURE__*/ d(An, [["render", Mn], ["__scopeId", "data-v-164bba0a"]]), Pn = {
|
|
1941
1941
|
good: "Good",
|
|
1942
1942
|
bad: "Bad",
|
|
1943
1943
|
mixed: "Mixed",
|
|
1944
1944
|
inconclusive: "Inconclusive"
|
|
1945
|
-
}, Fn =
|
|
1945
|
+
}, Fn = V({
|
|
1946
1946
|
name: "DashboardMemo",
|
|
1947
1947
|
components: {
|
|
1948
|
-
MarkdownRenderer:
|
|
1949
|
-
ErrorMessage:
|
|
1948
|
+
MarkdownRenderer: fe,
|
|
1949
|
+
ErrorMessage: j
|
|
1950
1950
|
},
|
|
1951
1951
|
props: {
|
|
1952
1952
|
dashboardId: {
|
|
@@ -1975,7 +1975,7 @@ var Nn = /*#__PURE__*/ e(An, [["render", Mn], ["__scopeId", "data-v-164bba0a"]])
|
|
|
1975
1975
|
}
|
|
1976
1976
|
},
|
|
1977
1977
|
setup(e) {
|
|
1978
|
-
let t =
|
|
1978
|
+
let t = P(() => e.getItemData(e.itemId, e.dashboardId)), n = P(() => t.value.memoData), r = P(() => n.value?.headline || ""), i = P(() => n.value?.verdict || "inconclusive"), a = P(() => Pn[i.value]), o = P(() => `Verdict: ${a.value}`), s = P(() => n.value?.magnitude || ""), c = P(() => n.value?.cause || ""), l = P(() => n.value?.action || ""), u = P(() => n.value?.confidence || "medium"), d = P(() => n.value?.confidenceRationale || ""), f = P(() => t.value.structured_content?.query || ""), p = P(() => t.value.results || null), m = P(() => t.value.loading || !1), h = P(() => t.value.error || null), g = P(() => t.value.filters || []), _ = P(() => t.value.onRefresh || null), v = H("connectionStore"), y = H("analyticsStore");
|
|
1979
1979
|
if (!v) throw Error("Connection store not found!");
|
|
1980
1980
|
let { ready: b, handleLocalRefresh: x } = an({
|
|
1981
1981
|
dashboardId: () => e.dashboardId,
|
|
@@ -2013,8 +2013,8 @@ var Nn = /*#__PURE__*/ e(An, [["render", Mn], ["__scopeId", "data-v-164bba0a"]])
|
|
|
2013
2013
|
class: "controls-toggle controls-visible"
|
|
2014
2014
|
};
|
|
2015
2015
|
function Gn(e, t, n, r, i, a) {
|
|
2016
|
-
let o =
|
|
2017
|
-
return
|
|
2016
|
+
let o = q("ErrorMessage"), s = q("MarkdownRenderer");
|
|
2017
|
+
return W(), L("div", { class: U(["memo-card no-drag", `verdict-${e.verdict}`]) }, [e.error && !e.loading ? (W(), F(o, {
|
|
2018
2018
|
key: 0,
|
|
2019
2019
|
compact: !0,
|
|
2020
2020
|
details: e.error,
|
|
@@ -2024,51 +2024,51 @@ function Gn(e, t, n, r, i, a) {
|
|
|
2024
2024
|
"details",
|
|
2025
2025
|
"query",
|
|
2026
2026
|
"filters"
|
|
2027
|
-
])) : e.ready ? (
|
|
2028
|
-
|
|
2029
|
-
t[1] ||=
|
|
2030
|
-
|
|
2027
|
+
])) : e.ready ? (W(), L(N, { key: 1 }, [
|
|
2028
|
+
R("div", In, [
|
|
2029
|
+
t[1] ||= R("span", { class: "memo-eyebrow" }, "Executive Memo", -1),
|
|
2030
|
+
R("span", {
|
|
2031
2031
|
class: "verdict-chip",
|
|
2032
2032
|
title: e.verdictTitle
|
|
2033
|
-
},
|
|
2034
|
-
|
|
2033
|
+
}, J(e.verdictLabel), 9, Ln),
|
|
2034
|
+
R("span", {
|
|
2035
2035
|
class: "confidence-chip",
|
|
2036
2036
|
title: e.confidenceRationale || ""
|
|
2037
|
-
}, " confidence: " +
|
|
2037
|
+
}, " confidence: " + J(e.confidence), 9, Rn)
|
|
2038
2038
|
]),
|
|
2039
|
-
|
|
2039
|
+
R("h1", zn, [B(s, {
|
|
2040
2040
|
markdown: e.headline || "_No headline yet_",
|
|
2041
2041
|
results: e.results
|
|
2042
2042
|
}, null, 8, ["markdown", "results"])]),
|
|
2043
|
-
|
|
2044
|
-
|
|
2043
|
+
R("div", Bn, [
|
|
2044
|
+
R("div", Vn, [t[2] ||= R("span", { class: "memo-label" }, "Magnitude", -1), B(s, {
|
|
2045
2045
|
class: "memo-prose",
|
|
2046
2046
|
markdown: e.magnitude || "_(not set)_",
|
|
2047
2047
|
results: e.results
|
|
2048
2048
|
}, null, 8, ["markdown", "results"])]),
|
|
2049
|
-
|
|
2049
|
+
R("div", Hn, [t[3] ||= R("span", { class: "memo-label" }, "Likely cause", -1), B(s, {
|
|
2050
2050
|
class: "memo-prose",
|
|
2051
2051
|
markdown: e.cause || "_(not set)_",
|
|
2052
2052
|
results: e.results
|
|
2053
2053
|
}, null, 8, ["markdown", "results"])]),
|
|
2054
|
-
|
|
2054
|
+
R("div", Un, [t[4] ||= R("span", { class: "memo-label" }, "Recommended action", -1), B(s, {
|
|
2055
2055
|
class: "memo-prose",
|
|
2056
2056
|
markdown: e.action || "_(not set)_",
|
|
2057
2057
|
results: e.results
|
|
2058
2058
|
}, null, 8, ["markdown", "results"])])
|
|
2059
2059
|
])
|
|
2060
|
-
], 64)) :
|
|
2060
|
+
], 64)) : I("", !0), !e.loading && e.editMode ? (W(), L("div", Wn, [R("button", {
|
|
2061
2061
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
2062
2062
|
class: "control-btn",
|
|
2063
2063
|
"data-testid": "refresh-memo-btn",
|
|
2064
2064
|
title: "Refresh memo data"
|
|
2065
|
-
}, [...t[5] ||= [
|
|
2065
|
+
}, [...t[5] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])])) : I("", !0)], 2);
|
|
2066
2066
|
}
|
|
2067
|
-
var Kn = /*#__PURE__*/
|
|
2067
|
+
var Kn = /*#__PURE__*/ d(Fn, [["render", Gn], ["__scopeId", "data-v-076ae1b1"]]), qn = V({
|
|
2068
2068
|
name: "DashboardClaim",
|
|
2069
2069
|
components: {
|
|
2070
|
-
MarkdownRenderer:
|
|
2071
|
-
ErrorMessage:
|
|
2070
|
+
MarkdownRenderer: fe,
|
|
2071
|
+
ErrorMessage: j
|
|
2072
2072
|
},
|
|
2073
2073
|
props: {
|
|
2074
2074
|
dashboardId: {
|
|
@@ -2097,7 +2097,7 @@ var Kn = /*#__PURE__*/ e(Fn, [["render", Gn], ["__scopeId", "data-v-076ae1b1"]])
|
|
|
2097
2097
|
}
|
|
2098
2098
|
},
|
|
2099
2099
|
setup(e) {
|
|
2100
|
-
let t =
|
|
2100
|
+
let t = P(() => e.getItemData(e.itemId, e.dashboardId)), n = P(() => t.value.claimData), r = P(() => n.value?.heading || ""), i = P(() => n.value?.claim || ""), a = P(() => n.value?.caveat || ""), o = P(() => n.value?.drilldown || ""), s = P(() => t.value.structured_content?.query || ""), c = P(() => t.value.results || null), l = P(() => t.value.loading || !1), u = P(() => t.value.error || null), d = P(() => t.value.filters || []), f = P(() => t.value.onRefresh || null), p = H("connectionStore"), m = H("analyticsStore");
|
|
2101
2101
|
if (!p) throw Error("Connection store not found!");
|
|
2102
2102
|
let { ready: h, handleLocalRefresh: g } = an({
|
|
2103
2103
|
dashboardId: () => e.dashboardId,
|
|
@@ -2139,8 +2139,8 @@ var Kn = /*#__PURE__*/ e(Fn, [["render", Gn], ["__scopeId", "data-v-076ae1b1"]])
|
|
|
2139
2139
|
class: "controls-toggle controls-visible"
|
|
2140
2140
|
};
|
|
2141
2141
|
function er(e, t, n, r, i, a) {
|
|
2142
|
-
let o =
|
|
2143
|
-
return
|
|
2142
|
+
let o = q("ErrorMessage"), s = q("MarkdownRenderer");
|
|
2143
|
+
return W(), L("div", Jn, [e.error && !e.loading ? (W(), F(o, {
|
|
2144
2144
|
key: 0,
|
|
2145
2145
|
compact: !0,
|
|
2146
2146
|
details: e.error,
|
|
@@ -2150,34 +2150,34 @@ function er(e, t, n, r, i, a) {
|
|
|
2150
2150
|
"details",
|
|
2151
2151
|
"query",
|
|
2152
2152
|
"filters"
|
|
2153
|
-
])) : e.ready ? (
|
|
2154
|
-
e.heading ? (
|
|
2153
|
+
])) : e.ready ? (W(), L(N, { key: 1 }, [
|
|
2154
|
+
e.heading ? (W(), L("div", Yn, [B(s, {
|
|
2155
2155
|
markdown: e.heading,
|
|
2156
2156
|
results: e.results
|
|
2157
|
-
}, null, 8, ["markdown", "results"])])) :
|
|
2158
|
-
|
|
2157
|
+
}, null, 8, ["markdown", "results"])])) : I("", !0),
|
|
2158
|
+
R("div", Xn, [t[1] ||= R("span", { class: "claim-label" }, "Claim", -1), B(s, {
|
|
2159
2159
|
class: "claim-prose claim-main",
|
|
2160
2160
|
markdown: e.claim || "_(no claim yet — set one with the report agent)_",
|
|
2161
2161
|
results: e.results
|
|
2162
2162
|
}, null, 8, ["markdown", "results"])]),
|
|
2163
|
-
e.caveat ? (
|
|
2163
|
+
e.caveat ? (W(), L("div", Zn, [t[2] ||= R("span", { class: "claim-label" }, "Caveat", -1), B(s, {
|
|
2164
2164
|
class: "claim-prose",
|
|
2165
2165
|
markdown: e.caveat,
|
|
2166
2166
|
results: e.results
|
|
2167
|
-
}, null, 8, ["markdown", "results"])])) :
|
|
2168
|
-
e.drilldown ? (
|
|
2167
|
+
}, null, 8, ["markdown", "results"])])) : I("", !0),
|
|
2168
|
+
e.drilldown ? (W(), L("div", Qn, [t[3] ||= R("span", { class: "claim-label" }, "Next drilldown", -1), B(s, {
|
|
2169
2169
|
class: "claim-prose",
|
|
2170
2170
|
markdown: e.drilldown,
|
|
2171
2171
|
results: e.results
|
|
2172
|
-
}, null, 8, ["markdown", "results"])])) :
|
|
2173
|
-
], 64)) :
|
|
2172
|
+
}, null, 8, ["markdown", "results"])])) : I("", !0)
|
|
2173
|
+
], 64)) : I("", !0), !e.loading && e.editMode ? (W(), L("div", $n, [R("button", {
|
|
2174
2174
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
2175
2175
|
class: "control-btn",
|
|
2176
2176
|
"data-testid": "refresh-claim-btn",
|
|
2177
2177
|
title: "Refresh claim data"
|
|
2178
|
-
}, [...t[4] ||= [
|
|
2178
|
+
}, [...t[4] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])])) : I("", !0)]);
|
|
2179
2179
|
}
|
|
2180
|
-
var tr = /*#__PURE__*/
|
|
2180
|
+
var tr = /*#__PURE__*/ d(qn, [["render", er], ["__scopeId", "data-v-f46fbf38"]]), nr = V({
|
|
2181
2181
|
name: "DashboardAppendixHeader",
|
|
2182
2182
|
props: {
|
|
2183
2183
|
dashboardId: {
|
|
@@ -2194,21 +2194,21 @@ var tr = /*#__PURE__*/ e(qn, [["render", er], ["__scopeId", "data-v-f46fbf38"]])
|
|
|
2194
2194
|
}
|
|
2195
2195
|
},
|
|
2196
2196
|
setup(e) {
|
|
2197
|
-
let t =
|
|
2198
|
-
return { label:
|
|
2197
|
+
let t = P(() => e.getItemData(e.itemId, e.dashboardId));
|
|
2198
|
+
return { label: P(() => (t.value.name || "Appendix").replace(/^#+\s*/, "").trim()) };
|
|
2199
2199
|
}
|
|
2200
2200
|
}), rr = { class: "appendix-header no-drag" }, ir = { class: "appendix-label" };
|
|
2201
2201
|
function ar(e, t, n, r, i, a) {
|
|
2202
|
-
return
|
|
2203
|
-
t[0] ||=
|
|
2204
|
-
|
|
2205
|
-
t[1] ||=
|
|
2202
|
+
return W(), L("div", rr, [
|
|
2203
|
+
t[0] ||= R("span", { class: "appendix-eyebrow" }, "Appendix", -1),
|
|
2204
|
+
R("span", ir, J(e.label), 1),
|
|
2205
|
+
t[1] ||= R("span", {
|
|
2206
2206
|
class: "appendix-rule",
|
|
2207
2207
|
"aria-hidden": "true"
|
|
2208
2208
|
}, null, -1)
|
|
2209
2209
|
]);
|
|
2210
2210
|
}
|
|
2211
|
-
var or = /*#__PURE__*/
|
|
2211
|
+
var or = /*#__PURE__*/ d(nr, [["render", ar], ["__scopeId", "data-v-46b63709"]]), sr = 8, cr = 200, lr = 512, ur = 2e3;
|
|
2212
2212
|
function dr(e) {
|
|
2213
2213
|
return typeof e == "string" ? e.length <= lr : typeof e == "number" ? Number.isFinite(e) : e instanceof Date && !Number.isNaN(e.getTime());
|
|
2214
2214
|
}
|
|
@@ -2284,7 +2284,7 @@ function mr(e) {
|
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
2286
|
function hr(e) {
|
|
2287
|
-
return Math.min(
|
|
2287
|
+
return Math.min(x, Math.max(40, Math.round(e)));
|
|
2288
2288
|
}
|
|
2289
2289
|
function gr(e) {
|
|
2290
2290
|
if (!e?.headers) return [];
|
|
@@ -2413,7 +2413,7 @@ var br = 40, xr = class {
|
|
|
2413
2413
|
'use strict';
|
|
2414
2414
|
|
|
2415
2415
|
var VERSION = 1;
|
|
2416
|
-
var HELLO = '${
|
|
2416
|
+
var HELLO = '${T}';
|
|
2417
2417
|
|
|
2418
2418
|
var port = null;
|
|
2419
2419
|
var pending = [];
|
|
@@ -2596,7 +2596,7 @@ function wr(e) {
|
|
|
2596
2596
|
return /^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e);
|
|
2597
2597
|
}
|
|
2598
2598
|
function Tr(e = {}) {
|
|
2599
|
-
let t = (e.cdnOrigins ??
|
|
2599
|
+
let t = (e.cdnOrigins ?? E).filter(wr), n = t.length ? " " + t.join(" ") : "";
|
|
2600
2600
|
return [
|
|
2601
2601
|
"default-src 'none'",
|
|
2602
2602
|
`script-src 'unsafe-inline' 'unsafe-eval' blob:${n}`,
|
|
@@ -2826,11 +2826,11 @@ function Nr(e) {
|
|
|
2826
2826
|
}
|
|
2827
2827
|
//#endregion
|
|
2828
2828
|
//#region components/dashboard/DashboardFreeform.vue?vue&type=script&lang.ts
|
|
2829
|
-
var Pr =
|
|
2829
|
+
var Pr = V({
|
|
2830
2830
|
name: "DashboardFreeform",
|
|
2831
2831
|
components: {
|
|
2832
|
-
ErrorMessage:
|
|
2833
|
-
LoadingView:
|
|
2832
|
+
ErrorMessage: j,
|
|
2833
|
+
LoadingView: ue
|
|
2834
2834
|
},
|
|
2835
2835
|
props: {
|
|
2836
2836
|
dashboardId: {
|
|
@@ -2863,11 +2863,11 @@ var Pr = B({
|
|
|
2863
2863
|
}
|
|
2864
2864
|
},
|
|
2865
2865
|
emits: ["dimension-click", "background-click"],
|
|
2866
|
-
setup(e, { emit:
|
|
2867
|
-
let
|
|
2866
|
+
setup(e, { emit: t }) {
|
|
2867
|
+
let n = G(null), r = G(null), i = G(null), a = G(0), o = null, s = null, c = P(() => e.getItemData(e.itemId, e.dashboardId)), l = P(() => c.value.freeformData || null), u = P(() => l.value?.html || ""), d = P(() => c.value.structured_content?.query || ""), p = P(() => c.value.results || null), m = P(() => c.value.loading || !1), h = P(() => c.value.error || null), g = P(() => c.value.filters || []), _ = P(() => c.value.loadStartTime || null), v = P(() => c.value.onRefresh || null), y = P(() => c.value.name || "Custom widget"), b = H("analyticsStore", null), x = H("userSettingsStore", null), C = f(x), { chartContainer: w, showLoading: T, controlsVisible: E, handleLocalRefresh: D, onChartMouseEnter: ee, onChartMouseLeave: O } = an({
|
|
2868
2868
|
dashboardId: () => e.dashboardId,
|
|
2869
2869
|
itemId: () => e.itemId,
|
|
2870
|
-
query:
|
|
2870
|
+
query: d,
|
|
2871
2871
|
results: p,
|
|
2872
2872
|
loading: m,
|
|
2873
2873
|
onRefresh: v,
|
|
@@ -2877,107 +2877,107 @@ var Pr = B({
|
|
|
2877
2877
|
analyticsType: "FREEFORM",
|
|
2878
2878
|
loadingDelayMs: 250
|
|
2879
2879
|
});
|
|
2880
|
-
function
|
|
2880
|
+
function k() {
|
|
2881
2881
|
return Nr({
|
|
2882
|
-
mode:
|
|
2883
|
-
element:
|
|
2882
|
+
mode: C.value,
|
|
2883
|
+
element: w.value
|
|
2884
2884
|
});
|
|
2885
2885
|
}
|
|
2886
|
-
let
|
|
2887
|
-
html:
|
|
2888
|
-
theme:
|
|
2889
|
-
})) : ""),
|
|
2890
|
-
function
|
|
2891
|
-
|
|
2886
|
+
let te = P(() => u.value ? (a.value, C.value, kr({
|
|
2887
|
+
html: u.value,
|
|
2888
|
+
theme: k()
|
|
2889
|
+
})) : ""), ne = P(() => i.value ? { height: `${i.value}px` } : void 0);
|
|
2890
|
+
function re() {
|
|
2891
|
+
o && o.postState(yr({
|
|
2892
2892
|
status: m.value ? "loading" : h.value ? "error" : "ready",
|
|
2893
2893
|
results: p.value,
|
|
2894
2894
|
filters: g.value,
|
|
2895
2895
|
error: h.value
|
|
2896
2896
|
}));
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2899
|
-
|
|
2898
|
+
function ie() {
|
|
2899
|
+
s &&= (clearTimeout(s), null);
|
|
2900
2900
|
}
|
|
2901
|
-
function
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
},
|
|
2901
|
+
function ae() {
|
|
2902
|
+
ie(), s = setTimeout(() => {
|
|
2903
|
+
o?.connected && !r.value && (r.value = "Widget did not finish loading.");
|
|
2904
|
+
}, S);
|
|
2905
2905
|
}
|
|
2906
|
-
function
|
|
2907
|
-
if (
|
|
2908
|
-
|
|
2906
|
+
function oe(n) {
|
|
2907
|
+
if (n.mode === "clear") {
|
|
2908
|
+
t("background-click");
|
|
2909
2909
|
return;
|
|
2910
2910
|
}
|
|
2911
|
-
let r = _r(
|
|
2911
|
+
let r = _r(n.filters, p.value), i = {};
|
|
2912
2912
|
for (let [e, t] of Object.entries(r)) (t.op === "eq" || t.op === "in") && (i[e] = t.value);
|
|
2913
|
-
|
|
2913
|
+
t("dimension-click", {
|
|
2914
2914
|
source: e.itemId,
|
|
2915
2915
|
filters: r,
|
|
2916
2916
|
chart: i,
|
|
2917
|
-
append:
|
|
2917
|
+
append: n.mode === "append"
|
|
2918
2918
|
});
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2921
|
-
|
|
2920
|
+
function A() {
|
|
2921
|
+
ie(), o?.destroy(), o = null;
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2924
|
-
|
|
2925
|
-
let t =
|
|
2926
|
-
t && (
|
|
2923
|
+
function se() {
|
|
2924
|
+
A();
|
|
2925
|
+
let t = n.value;
|
|
2926
|
+
t && (r.value = null, o = new xr({
|
|
2927
2927
|
itemId: e.itemId,
|
|
2928
2928
|
editMode: e.editMode,
|
|
2929
2929
|
onReady: () => {
|
|
2930
|
-
|
|
2930
|
+
ie(), r.value = null;
|
|
2931
2931
|
},
|
|
2932
|
-
onFilter:
|
|
2933
|
-
onRefresh: () =>
|
|
2932
|
+
onFilter: oe,
|
|
2933
|
+
onRefresh: () => D(),
|
|
2934
2934
|
onResize: (e) => {
|
|
2935
|
-
|
|
2935
|
+
i.value = e;
|
|
2936
2936
|
},
|
|
2937
2937
|
onLog: (t, n) => {
|
|
2938
2938
|
let r = `[widget ${e.itemId}]`;
|
|
2939
2939
|
t === "error" ? console.error(r, n) : t === "warn" ? console.warn(r, n) : console.log(r, n);
|
|
2940
2940
|
}
|
|
2941
|
-
}),
|
|
2941
|
+
}), o.attach(t), o.postTheme(k()), re(), ae());
|
|
2942
2942
|
}
|
|
2943
|
-
function
|
|
2944
|
-
|
|
2943
|
+
function ce() {
|
|
2944
|
+
i.value = null, a.value += 1;
|
|
2945
2945
|
}
|
|
2946
|
-
return
|
|
2946
|
+
return X([te, n], ([e, t]) => {
|
|
2947
2947
|
if (!e || !t) {
|
|
2948
|
-
|
|
2948
|
+
A();
|
|
2949
2949
|
return;
|
|
2950
2950
|
}
|
|
2951
|
-
|
|
2951
|
+
se();
|
|
2952
2952
|
}, {
|
|
2953
2953
|
immediate: !0,
|
|
2954
2954
|
flush: "post"
|
|
2955
|
-
}),
|
|
2955
|
+
}), X([
|
|
2956
2956
|
p,
|
|
2957
2957
|
m,
|
|
2958
2958
|
h,
|
|
2959
2959
|
g
|
|
2960
|
-
], () =>
|
|
2961
|
-
await
|
|
2962
|
-
}),
|
|
2963
|
-
chartContainer:
|
|
2964
|
-
frameRef:
|
|
2965
|
-
srcdoc:
|
|
2966
|
-
frameStyle:
|
|
2967
|
-
html:
|
|
2968
|
-
query:
|
|
2960
|
+
], () => re()), X(C, async () => {
|
|
2961
|
+
await xe(), o?.postTheme(k());
|
|
2962
|
+
}), Ce(A), {
|
|
2963
|
+
chartContainer: w,
|
|
2964
|
+
frameRef: n,
|
|
2965
|
+
srcdoc: te,
|
|
2966
|
+
frameStyle: ne,
|
|
2967
|
+
html: u,
|
|
2968
|
+
query: d,
|
|
2969
2969
|
filters: g,
|
|
2970
2970
|
loading: m,
|
|
2971
|
-
showLoading:
|
|
2971
|
+
showLoading: T,
|
|
2972
2972
|
error: h,
|
|
2973
2973
|
startTime: _,
|
|
2974
|
-
controlsVisible:
|
|
2975
|
-
widgetFailure:
|
|
2974
|
+
controlsVisible: E,
|
|
2975
|
+
widgetFailure: r,
|
|
2976
2976
|
widgetTitle: y,
|
|
2977
|
-
handleLocalRefresh:
|
|
2978
|
-
onChartMouseEnter:
|
|
2979
|
-
onChartMouseLeave:
|
|
2980
|
-
reloadWidget:
|
|
2977
|
+
handleLocalRefresh: D,
|
|
2978
|
+
onChartMouseEnter: ee,
|
|
2979
|
+
onChartMouseLeave: O,
|
|
2980
|
+
reloadWidget: ce,
|
|
2981
2981
|
FREEFORM_SANDBOX: Cr
|
|
2982
2982
|
};
|
|
2983
2983
|
}
|
|
@@ -2996,14 +2996,14 @@ var Pr = B({
|
|
|
2996
2996
|
class: "loading-overlay"
|
|
2997
2997
|
};
|
|
2998
2998
|
function Br(e, t, n, r, i, a) {
|
|
2999
|
-
let o =
|
|
3000
|
-
return
|
|
2999
|
+
let o = q("ErrorMessage"), s = q("LoadingView");
|
|
3000
|
+
return W(), L("div", {
|
|
3001
3001
|
ref: "chartContainer",
|
|
3002
3002
|
class: "freeform-placeholder no-drag",
|
|
3003
3003
|
onMouseenter: t[3] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
3004
3004
|
onMouseleave: t[4] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
3005
3005
|
}, [
|
|
3006
|
-
e.error && !e.loading ? (
|
|
3006
|
+
e.error && !e.loading ? (W(), F(o, {
|
|
3007
3007
|
key: 0,
|
|
3008
3008
|
compact: !0,
|
|
3009
3009
|
details: e.error,
|
|
@@ -3013,43 +3013,43 @@ function Br(e, t, n, r, i, a) {
|
|
|
3013
3013
|
"details",
|
|
3014
3014
|
"query",
|
|
3015
3015
|
"filters"
|
|
3016
|
-
])) : e.html ? (
|
|
3016
|
+
])) : e.html ? (W(), L(N, { key: 2 }, [R("iframe", {
|
|
3017
3017
|
ref: "frameRef",
|
|
3018
|
-
class:
|
|
3018
|
+
class: U(["freeform-frame", { "freeform-frame-hidden": !!e.widgetFailure }]),
|
|
3019
3019
|
sandbox: e.FREEFORM_SANDBOX,
|
|
3020
3020
|
srcdoc: e.srcdoc,
|
|
3021
3021
|
title: e.widgetTitle,
|
|
3022
3022
|
referrerpolicy: "no-referrer",
|
|
3023
3023
|
allow: "",
|
|
3024
|
-
style:
|
|
3025
|
-
}, null, 14, Ir), e.widgetFailure ? (
|
|
3026
|
-
t[5] ||=
|
|
3027
|
-
|
|
3028
|
-
|
|
3024
|
+
style: Se(e.frameStyle)
|
|
3025
|
+
}, null, 14, Ir), e.widgetFailure ? (W(), L("div", Lr, [
|
|
3026
|
+
t[5] ||= R("i", { class: "mdi mdi-alert-circle-outline" }, null, -1),
|
|
3027
|
+
R("div", Rr, J(e.widgetFailure), 1),
|
|
3028
|
+
R("button", {
|
|
3029
3029
|
class: "freeform-retry",
|
|
3030
3030
|
"data-testid": "freeform-retry-btn",
|
|
3031
3031
|
onClick: t[0] ||= (...t) => e.reloadWidget && e.reloadWidget(...t)
|
|
3032
3032
|
}, " Reload widget ")
|
|
3033
|
-
])) :
|
|
3034
|
-
e.loading && e.showLoading ? (
|
|
3033
|
+
])) : I("", !0)], 64)) : (W(), L("div", Fr, " No widget content yet. Use the edit button to author HTML for this cell. ")),
|
|
3034
|
+
e.loading && e.showLoading ? (W(), L("div", zr, [B(s, {
|
|
3035
3035
|
startTime: e.startTime,
|
|
3036
3036
|
text: "",
|
|
3037
3037
|
subtle: ""
|
|
3038
|
-
}, null, 8, ["startTime"])])) :
|
|
3039
|
-
|
|
3038
|
+
}, null, 8, ["startTime"])])) : I("", !0),
|
|
3039
|
+
R("div", { class: U(["controls-toggle", { "controls-visible": e.controlsVisible }]) }, [R("button", {
|
|
3040
3040
|
onClick: t[1] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
3041
3041
|
class: "control-btn",
|
|
3042
3042
|
"data-testid": "refresh-freeform-btn",
|
|
3043
3043
|
title: "Refresh widget data"
|
|
3044
|
-
}, [...t[6] ||= [
|
|
3044
|
+
}, [...t[6] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]]), R("button", {
|
|
3045
3045
|
onClick: t[2] ||= (...t) => e.reloadWidget && e.reloadWidget(...t),
|
|
3046
3046
|
class: "control-btn",
|
|
3047
3047
|
"data-testid": "reload-freeform-btn",
|
|
3048
3048
|
title: "Reload widget"
|
|
3049
|
-
}, [...t[7] ||= [
|
|
3049
|
+
}, [...t[7] ||= [R("i", { class: "mdi mdi-reload icon" }, null, -1)]])], 2)
|
|
3050
3050
|
], 544);
|
|
3051
3051
|
}
|
|
3052
|
-
var Vr = /*#__PURE__*/
|
|
3052
|
+
var Vr = /*#__PURE__*/ d(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]]), Hr = ["data-testid"], Ur = ["data-testid"], Wr = ["data-testid"], Gr = ["data-testid"], Kr = {
|
|
3053
3053
|
key: 1,
|
|
3054
3054
|
class: "grid-item-header"
|
|
3055
3055
|
}, qr = { class: "grid-item-header-left" }, Jr = {
|
|
@@ -3067,7 +3067,7 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3067
3067
|
}, bi = {
|
|
3068
3068
|
key: 1,
|
|
3069
3069
|
class: "mdi mdi-filter-outline icon"
|
|
3070
|
-
}, xi = ["data-testid"], Si = ["data-testid"], Ci = ["aria-label"], wi = { class: "mobile-filter-popover-header" }, Ti = { class: "mobile-filter-popover-values" }, Ei = /*#__PURE__*/
|
|
3070
|
+
}, xi = ["data-testid"], Si = ["data-testid"], Ci = ["aria-label"], wi = { class: "mobile-filter-popover-header" }, Ti = { class: "mobile-filter-popover-values" }, Ei = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
3071
3071
|
__name: "DashboardGridItem",
|
|
3072
3072
|
props: {
|
|
3073
3073
|
dashboardId: {},
|
|
@@ -3088,7 +3088,7 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3088
3088
|
"copy-item"
|
|
3089
3089
|
],
|
|
3090
3090
|
setup(e, { emit: t }) {
|
|
3091
|
-
let
|
|
3091
|
+
let r = e, i = t, a = G(!1), o = G(""), s = G(!1), c = G(!1), l = G(null), u = G(null), d = G(null), f = G(null), p = G({});
|
|
3092
3092
|
function m(e) {
|
|
3093
3093
|
return e.replace(/'''/g, "'").replace("local.", "");
|
|
3094
3094
|
}
|
|
@@ -3107,34 +3107,34 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3107
3107
|
navigator.clipboard.writeText(h(e, t));
|
|
3108
3108
|
}
|
|
3109
3109
|
function _() {
|
|
3110
|
-
if (!
|
|
3111
|
-
let e =
|
|
3110
|
+
if (!r.editMode) return;
|
|
3111
|
+
let e = r.getItemData(r.item.i, r.dashboardId);
|
|
3112
3112
|
s.value = !1, c.value = !1, a.value = !0, o.value = e.name, setTimeout(() => {
|
|
3113
|
-
let e = document.getElementById(`title-input-${
|
|
3113
|
+
let e = document.getElementById(`title-input-${r.item.i}`);
|
|
3114
3114
|
e && e.focus();
|
|
3115
3115
|
}, 0);
|
|
3116
3116
|
}
|
|
3117
3117
|
function v() {
|
|
3118
3118
|
if (a.value) {
|
|
3119
|
-
let e =
|
|
3120
|
-
|
|
3119
|
+
let e = r.getItemData(r.item.i, r.dashboardId), t = o.value.trim() || e.name;
|
|
3120
|
+
r.setItemData(r.item.i, r.dashboardId, { name: t }), a.value = !1;
|
|
3121
3121
|
}
|
|
3122
3122
|
}
|
|
3123
3123
|
function y() {
|
|
3124
|
-
let e = !
|
|
3125
|
-
|
|
3124
|
+
let e = !r.getItemData(r.item.i, r.dashboardId).allowCrossFilter;
|
|
3125
|
+
r.setItemData(r.item.i, r.dashboardId, { allowCrossFilter: e });
|
|
3126
3126
|
}
|
|
3127
3127
|
function b() {
|
|
3128
|
-
let e =
|
|
3129
|
-
|
|
3130
|
-
width:
|
|
3128
|
+
let e = r.item.h + 1;
|
|
3129
|
+
r.setItemData(r.item.i, r.dashboardId, { dimensions: {
|
|
3130
|
+
width: r.item.w,
|
|
3131
3131
|
height: e
|
|
3132
3132
|
} });
|
|
3133
3133
|
}
|
|
3134
3134
|
function x() {
|
|
3135
|
-
let e = Math.max(1,
|
|
3136
|
-
|
|
3137
|
-
width:
|
|
3135
|
+
let e = Math.max(1, r.item.h - 1);
|
|
3136
|
+
r.setItemData(r.item.i, r.dashboardId, { dimensions: {
|
|
3137
|
+
width: r.item.w,
|
|
3138
3138
|
height: e
|
|
3139
3139
|
} });
|
|
3140
3140
|
}
|
|
@@ -3142,71 +3142,71 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3142
3142
|
a.value = !1;
|
|
3143
3143
|
}
|
|
3144
3144
|
function C() {
|
|
3145
|
-
if (
|
|
3145
|
+
if (k.value) {
|
|
3146
3146
|
_();
|
|
3147
3147
|
return;
|
|
3148
3148
|
}
|
|
3149
|
-
|
|
3149
|
+
i("edit-content", r.item);
|
|
3150
3150
|
}
|
|
3151
3151
|
function w() {
|
|
3152
|
-
confirm(`Are you sure you want to remove "${
|
|
3152
|
+
confirm(`Are you sure you want to remove "${O.value.name}"?`) && i("remove-item", r.item.i);
|
|
3153
3153
|
}
|
|
3154
|
-
function
|
|
3155
|
-
|
|
3154
|
+
function T() {
|
|
3155
|
+
i("copy-item", r.item.i);
|
|
3156
3156
|
}
|
|
3157
|
-
function
|
|
3158
|
-
|
|
3157
|
+
function E(e) {
|
|
3158
|
+
i("dimension-click", e);
|
|
3159
3159
|
}
|
|
3160
|
-
function
|
|
3161
|
-
|
|
3160
|
+
function D() {
|
|
3161
|
+
i("background-click", r.item.i);
|
|
3162
3162
|
}
|
|
3163
|
-
function
|
|
3164
|
-
|
|
3165
|
-
}
|
|
3166
|
-
let
|
|
3167
|
-
switch (
|
|
3168
|
-
case
|
|
3169
|
-
case
|
|
3170
|
-
case
|
|
3171
|
-
case
|
|
3172
|
-
case
|
|
3173
|
-
case
|
|
3174
|
-
case
|
|
3175
|
-
case
|
|
3176
|
-
case
|
|
3163
|
+
function ee(e) {
|
|
3164
|
+
i("remove-filter", r.item.i, e);
|
|
3165
|
+
}
|
|
3166
|
+
let O = P(() => r.getItemData(r.item.i, r.dashboardId)), k = P(() => O.value.type === n.SECTION_HEADER), te = P(() => O.value.type === n.FREEFORM), ne = P(() => {
|
|
3167
|
+
switch (O.value.type) {
|
|
3168
|
+
case n.CHART: return ln;
|
|
3169
|
+
case n.TABLE: return gn;
|
|
3170
|
+
case n.FILTER: return Nn;
|
|
3171
|
+
case n.SECTION_HEADER: return null;
|
|
3172
|
+
case n.MEMO: return Kn;
|
|
3173
|
+
case n.CLAIM: return tr;
|
|
3174
|
+
case n.APPENDIX_HEADER: return or;
|
|
3175
|
+
case n.FREEFORM: return Vr;
|
|
3176
|
+
case n.MARKDOWN:
|
|
3177
3177
|
default: return fn;
|
|
3178
3178
|
}
|
|
3179
|
-
}),
|
|
3180
|
-
switch (
|
|
3181
|
-
case
|
|
3182
|
-
case
|
|
3183
|
-
case
|
|
3184
|
-
case
|
|
3185
|
-
case
|
|
3186
|
-
case
|
|
3187
|
-
case
|
|
3188
|
-
case
|
|
3189
|
-
case
|
|
3179
|
+
}), re = P(() => {
|
|
3180
|
+
switch (O.value.type) {
|
|
3181
|
+
case n.CHART: return "Chart Name";
|
|
3182
|
+
case n.TABLE: return "Table Name";
|
|
3183
|
+
case n.FILTER: return "Filter Name";
|
|
3184
|
+
case n.SECTION_HEADER: return "Section Header";
|
|
3185
|
+
case n.MEMO: return "Executive Memo";
|
|
3186
|
+
case n.CLAIM: return "Claim";
|
|
3187
|
+
case n.APPENDIX_HEADER: return "Appendix";
|
|
3188
|
+
case n.FREEFORM: return "Widget Name";
|
|
3189
|
+
case n.MARKDOWN:
|
|
3190
3190
|
default: return "Note Name";
|
|
3191
3191
|
}
|
|
3192
|
-
}),
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
],
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
],
|
|
3203
|
-
let e =
|
|
3192
|
+
}), ie = [
|
|
3193
|
+
n.CHART,
|
|
3194
|
+
n.TABLE,
|
|
3195
|
+
n.MARKDOWN,
|
|
3196
|
+
n.FREEFORM
|
|
3197
|
+
], oe = [
|
|
3198
|
+
n.CHART,
|
|
3199
|
+
n.TABLE,
|
|
3200
|
+
n.FILTER,
|
|
3201
|
+
n.FREEFORM
|
|
3202
|
+
], se = P(() => ie.includes(O.value.type)), ce = P(() => oe.includes(O.value.type)), le = P(() => O.value.filters ? O.value.filters.length : 0), j = P(() => (O.value.filters || []).slice(0, 2)), ue = P(() => Math.max(0, le.value - j.value.length)), de = P(() => {
|
|
3203
|
+
let e = O.value.filters || [];
|
|
3204
3204
|
return ["global", "cross"].map((t) => ({
|
|
3205
3205
|
type: t,
|
|
3206
3206
|
filters: e.filter((e) => t === "global" ? e.source === "global" : e.source !== "global")
|
|
3207
3207
|
})).filter((e) => e.filters.length > 0);
|
|
3208
|
-
}),
|
|
3209
|
-
async function
|
|
3208
|
+
}), fe = P(() => de.value.find((e) => e.type === f.value)?.filters || []);
|
|
3209
|
+
async function pe(e, t) {
|
|
3210
3210
|
if (f.value === t) {
|
|
3211
3211
|
f.value = null;
|
|
3212
3212
|
return;
|
|
@@ -3217,7 +3217,7 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3217
3217
|
left: `${c}px`,
|
|
3218
3218
|
top: `${n.bottom + 6}px`,
|
|
3219
3219
|
width: `${s}px`
|
|
3220
|
-
}, await
|
|
3220
|
+
}, await xe();
|
|
3221
3221
|
let l = d.value;
|
|
3222
3222
|
if (!l) return;
|
|
3223
3223
|
let u = l.getBoundingClientRect(), m = a + (r?.height ?? window.innerHeight);
|
|
@@ -3226,10 +3226,10 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3226
3226
|
top: `${Math.max(a + 8, n.top - u.height - 6)}px`
|
|
3227
3227
|
});
|
|
3228
3228
|
}
|
|
3229
|
-
|
|
3229
|
+
ae(() => d.value, () => {
|
|
3230
3230
|
f.value = null;
|
|
3231
3231
|
}, { enabled: () => f.value !== null });
|
|
3232
|
-
function
|
|
3232
|
+
function me(e, t) {
|
|
3233
3233
|
let n = e?.trim();
|
|
3234
3234
|
if (!n) return {
|
|
3235
3235
|
text: t,
|
|
@@ -3249,59 +3249,59 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3249
3249
|
level: 3
|
|
3250
3250
|
};
|
|
3251
3251
|
}
|
|
3252
|
-
let
|
|
3253
|
-
function
|
|
3254
|
-
|
|
3252
|
+
let he = P(() => me(O.value.name, re.value)), M = P(() => he.value.text), ge = P(() => `item-title-level-${he.value.level}`), _e = P(() => s.value && !a.value && !c.value);
|
|
3253
|
+
function ve() {
|
|
3254
|
+
_e.value && (c.value = !0, s.value = !1);
|
|
3255
3255
|
}
|
|
3256
|
-
function
|
|
3256
|
+
function ye() {
|
|
3257
3257
|
s.value = !0, c.value = !1;
|
|
3258
3258
|
}
|
|
3259
|
-
function
|
|
3259
|
+
function z() {
|
|
3260
3260
|
s.value = !1, c.value = !1;
|
|
3261
3261
|
}
|
|
3262
|
-
return
|
|
3263
|
-
enabled: () =>
|
|
3262
|
+
return ae([l, u], ve, {
|
|
3263
|
+
enabled: () => _e.value,
|
|
3264
3264
|
eventName: "mousedown"
|
|
3265
|
-
}), (t,
|
|
3266
|
-
class:
|
|
3267
|
-
"grid-item-chart-style":
|
|
3268
|
-
"grid-item-markdown-style":
|
|
3269
|
-
"grid-item-section-header-style":
|
|
3265
|
+
}), (t, i) => (W(), L(N, null, [R("div", {
|
|
3266
|
+
class: U(["grid-item-content", {
|
|
3267
|
+
"grid-item-chart-style": ce.value,
|
|
3268
|
+
"grid-item-markdown-style": O.value.type === Y(n).MARKDOWN,
|
|
3269
|
+
"grid-item-section-header-style": k.value,
|
|
3270
3270
|
"grid-item-edit-style": e.editMode
|
|
3271
3271
|
}]),
|
|
3272
3272
|
"data-testid": `dashboard-component-${e.item.i}`,
|
|
3273
|
-
onMouseenter:
|
|
3274
|
-
onMouseleave:
|
|
3273
|
+
onMouseenter: ye,
|
|
3274
|
+
onMouseleave: z
|
|
3275
3275
|
}, [
|
|
3276
|
-
e.editMode &&
|
|
3276
|
+
e.editMode && k.value ? (W(), L("div", {
|
|
3277
3277
|
key: 0,
|
|
3278
|
-
class:
|
|
3279
|
-
}, [
|
|
3278
|
+
class: U(["dev-toolbar-shell", { "dev-toolbar-visible": _e.value }])
|
|
3279
|
+
}, [R("div", {
|
|
3280
3280
|
ref_key: "devToolbarRef",
|
|
3281
3281
|
ref: u,
|
|
3282
3282
|
class: "dev-toolbar",
|
|
3283
3283
|
"data-testid": "dashboard-item-header-controls"
|
|
3284
3284
|
}, [
|
|
3285
|
-
|
|
3285
|
+
R("button", {
|
|
3286
3286
|
onClick: C,
|
|
3287
3287
|
class: "control-btn",
|
|
3288
3288
|
"data-testid": `edit-dashboard-item-content-${e.item.i}`,
|
|
3289
3289
|
title: "Edit title"
|
|
3290
|
-
}, [...
|
|
3291
|
-
|
|
3292
|
-
onClick:
|
|
3290
|
+
}, [...i[4] ||= [R("i", { class: "mdi mdi-pencil-outline icon" }, null, -1)]], 8, Ur),
|
|
3291
|
+
R("button", {
|
|
3292
|
+
onClick: T,
|
|
3293
3293
|
class: "control-btn",
|
|
3294
3294
|
"data-testid": `copy-dashboard-item-${e.item.i}`,
|
|
3295
3295
|
title: "Copy item"
|
|
3296
|
-
}, [...
|
|
3297
|
-
|
|
3296
|
+
}, [...i[5] ||= [R("i", { class: "mdi mdi-content-copy icon" }, null, -1)]], 8, Wr),
|
|
3297
|
+
R("button", {
|
|
3298
3298
|
onClick: w,
|
|
3299
3299
|
class: "control-btn dashboard-remove-btn",
|
|
3300
3300
|
"data-testid": `remove-dashboard-item-${e.item.i}`,
|
|
3301
3301
|
title: "Remove item"
|
|
3302
|
-
}, [...
|
|
3303
|
-
], 512)], 2)) :
|
|
3304
|
-
|
|
3302
|
+
}, [...i[6] ||= [R("i", { class: "mdi mdi-delete-outline icon" }, null, -1)]], 8, Gr)
|
|
3303
|
+
], 512)], 2)) : I("", !0),
|
|
3304
|
+
k.value ? I("", !0) : (W(), L("div", Kr, [R("div", qr, [e.editMode ? (W(), L("div", Jr, [...i[7] ||= [R("svg", {
|
|
3305
3305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3306
3306
|
width: "16",
|
|
3307
3307
|
height: "16",
|
|
@@ -3313,107 +3313,107 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3313
3313
|
"stroke-linejoin": "round",
|
|
3314
3314
|
class: "drag-handle-svg"
|
|
3315
3315
|
}, [
|
|
3316
|
-
|
|
3316
|
+
R("line", {
|
|
3317
3317
|
x1: "3",
|
|
3318
3318
|
y1: "12",
|
|
3319
3319
|
x2: "21",
|
|
3320
3320
|
y2: "12"
|
|
3321
3321
|
}),
|
|
3322
|
-
|
|
3322
|
+
R("line", {
|
|
3323
3323
|
x1: "3",
|
|
3324
3324
|
y1: "6",
|
|
3325
3325
|
x2: "21",
|
|
3326
3326
|
y2: "6"
|
|
3327
3327
|
}),
|
|
3328
|
-
|
|
3328
|
+
R("line", {
|
|
3329
3329
|
x1: "3",
|
|
3330
3330
|
y1: "18",
|
|
3331
3331
|
x2: "21",
|
|
3332
3332
|
y2: "18"
|
|
3333
3333
|
})
|
|
3334
|
-
], -1)]])) :
|
|
3334
|
+
], -1)]])) : I("", !0), R("div", Yr, [a.value ? je((W(), L("input", {
|
|
3335
3335
|
key: 1,
|
|
3336
3336
|
id: `title-input-${e.item.i}`,
|
|
3337
|
-
"onUpdate:modelValue":
|
|
3337
|
+
"onUpdate:modelValue": i[0] ||= (e) => o.value = e,
|
|
3338
3338
|
onBlur: v,
|
|
3339
3339
|
onKeyup: [Me(v, ["enter"]), Me(S, ["esc"])],
|
|
3340
3340
|
class: "title-input",
|
|
3341
3341
|
type: "text",
|
|
3342
|
-
placeholder:
|
|
3343
|
-
}, null, 40, $r)), [[
|
|
3342
|
+
placeholder: re.value
|
|
3343
|
+
}, null, 40, $r)), [[ke, o.value]]) : (W(), L("div", {
|
|
3344
3344
|
key: 0,
|
|
3345
|
-
class:
|
|
3346
|
-
title:
|
|
3345
|
+
class: U(["item-title editable-title", [ge.value, { "item-title-static": !e.editMode }]]),
|
|
3346
|
+
title: M.value,
|
|
3347
3347
|
onClick: _
|
|
3348
|
-
}, [
|
|
3348
|
+
}, [R("span", Zr, J(M.value), 1), e.editMode ? (W(), L("i", Qr)) : I("", !0)], 10, Xr))])]), R("div", ei, [te.value ? (W(), F(A, {
|
|
3349
3349
|
key: 0,
|
|
3350
3350
|
content: "Custom code widget — runs in a sandboxed frame with no network or app access",
|
|
3351
3351
|
position: "bottom"
|
|
3352
3352
|
}, {
|
|
3353
|
-
default:
|
|
3353
|
+
default: Z(() => [...i[8] ||= [R("span", {
|
|
3354
3354
|
class: "widget-badge",
|
|
3355
3355
|
"data-testid": "freeform-widget-badge"
|
|
3356
|
-
}, [
|
|
3356
|
+
}, [R("i", { class: "mdi mdi-code-braces" })], -1)]]),
|
|
3357
3357
|
_: 1
|
|
3358
|
-
})) :
|
|
3358
|
+
})) : I("", !0), se.value && le.value > 0 ? (W(), L("div", ti, [R("div", ni, [(W(!0), L(N, null, K(j.value, (t, n) => (W(), F(A, {
|
|
3359
3359
|
key: `${t.source}-${t.value}-${n}`,
|
|
3360
3360
|
content: h(t.value, t.parameters),
|
|
3361
3361
|
position: "bottom"
|
|
3362
3362
|
}, {
|
|
3363
|
-
default:
|
|
3364
|
-
|
|
3365
|
-
|
|
3363
|
+
default: Z(() => [R("div", ri, [
|
|
3364
|
+
R("span", ii, [R("span", ai, J(t.source === "global" ? t.source : "cross") + ":\xA0", 1), R("span", oi, J(h(t.value, t.parameters)), 1)]),
|
|
3365
|
+
R("button", {
|
|
3366
3366
|
class: "filter-copy-btn",
|
|
3367
3367
|
onClick: Ne((e) => g(t.value, t.parameters), ["stop"]),
|
|
3368
3368
|
title: "Copy filter value"
|
|
3369
3369
|
}, " ⎘ ", 8, si),
|
|
3370
|
-
e.editMode && t.source !== "global" ? (
|
|
3370
|
+
e.editMode && t.source !== "global" ? (W(), L("button", {
|
|
3371
3371
|
key: 0,
|
|
3372
3372
|
class: "filter-remove-btn",
|
|
3373
|
-
onClick: (e) =>
|
|
3373
|
+
onClick: (e) => ee(t.source),
|
|
3374
3374
|
title: `Remove ${t.source} filter`
|
|
3375
|
-
}, " x ", 8, ci)) :
|
|
3375
|
+
}, " x ", 8, ci)) : I("", !0)
|
|
3376
3376
|
])]),
|
|
3377
3377
|
_: 2
|
|
3378
|
-
}, 1032, ["content"]))), 128)),
|
|
3378
|
+
}, 1032, ["content"]))), 128)), ue.value > 0 ? (W(), F(A, {
|
|
3379
3379
|
key: 0,
|
|
3380
|
-
content: `${
|
|
3380
|
+
content: `${ue.value} more filter(s)`,
|
|
3381
3381
|
position: "bottom"
|
|
3382
3382
|
}, {
|
|
3383
|
-
default:
|
|
3383
|
+
default: Z(() => [R("div", li, "+" + J(ue.value), 1)]),
|
|
3384
3384
|
_: 1
|
|
3385
|
-
}, 8, ["content"])) :
|
|
3385
|
+
}, 8, ["content"])) : I("", !0)]), R("div", ui, [(W(!0), L(N, null, K(de.value, (e) => (W(), L("button", {
|
|
3386
3386
|
key: e.type,
|
|
3387
3387
|
type: "button",
|
|
3388
3388
|
class: "header-filter-chip mobile-filter-summary",
|
|
3389
3389
|
"aria-expanded": f.value === e.type,
|
|
3390
|
-
onClick: Ne((t) =>
|
|
3391
|
-
},
|
|
3392
|
-
|
|
3390
|
+
onClick: Ne((t) => pe(t, e.type), ["stop"])
|
|
3391
|
+
}, J(e.type) + ":" + J(e.filters.length), 9, di))), 128))])])) : I("", !0)])])),
|
|
3392
|
+
R("div", { class: U(["content-area", { "section-header-content": k.value }]) }, [k.value ? (W(), L(N, { key: 0 }, [a.value ? je((W(), L("input", {
|
|
3393
3393
|
key: 1,
|
|
3394
3394
|
id: `title-input-${e.item.i}`,
|
|
3395
|
-
"onUpdate:modelValue":
|
|
3395
|
+
"onUpdate:modelValue": i[1] ||= (e) => o.value = e,
|
|
3396
3396
|
onBlur: v,
|
|
3397
3397
|
onKeyup: [Me(v, ["enter"]), Me(S, ["esc"])],
|
|
3398
3398
|
class: "title-input section-header-input no-drag",
|
|
3399
3399
|
type: "text",
|
|
3400
|
-
placeholder:
|
|
3401
|
-
}, null, 40, mi)), [[
|
|
3400
|
+
placeholder: re.value
|
|
3401
|
+
}, null, 40, mi)), [[ke, o.value]]) : (W(), L("div", {
|
|
3402
3402
|
key: 0,
|
|
3403
|
-
class:
|
|
3404
|
-
title:
|
|
3403
|
+
class: U(["section-header-display no-drag", [ge.value, { "section-header-editable": e.editMode }]]),
|
|
3404
|
+
title: M.value,
|
|
3405
3405
|
onClick: _
|
|
3406
|
-
}, [
|
|
3406
|
+
}, [R("span", pi, J(M.value), 1)], 10, fi))], 64)) : (W(), F(De(ne.value), {
|
|
3407
3407
|
key: 1,
|
|
3408
|
-
dashboardId:
|
|
3408
|
+
dashboardId: r.dashboardId,
|
|
3409
3409
|
itemId: e.item.i,
|
|
3410
3410
|
setItemData: e.setItemData,
|
|
3411
3411
|
getItemData: e.getItemData,
|
|
3412
3412
|
getDashboardQueryExecutor: e.getDashboardQueryExecutor,
|
|
3413
3413
|
editMode: e.editMode,
|
|
3414
|
-
symbols:
|
|
3415
|
-
onDimensionClick:
|
|
3416
|
-
onBackgroundClick:
|
|
3414
|
+
symbols: r.symbols || [],
|
|
3415
|
+
onDimensionClick: E,
|
|
3416
|
+
onBackgroundClick: D
|
|
3417
3417
|
}, null, 40, [
|
|
3418
3418
|
"dashboardId",
|
|
3419
3419
|
"itemId",
|
|
@@ -3422,69 +3422,69 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3422
3422
|
"getDashboardQueryExecutor",
|
|
3423
3423
|
"editMode",
|
|
3424
3424
|
"symbols"
|
|
3425
|
-
])), e.editMode && !
|
|
3425
|
+
])), e.editMode && !k.value ? (W(), L("div", {
|
|
3426
3426
|
key: 2,
|
|
3427
|
-
class:
|
|
3428
|
-
}, [
|
|
3427
|
+
class: U(["content-edit-overlay no-drag", { "content-edit-overlay-visible": _e.value }])
|
|
3428
|
+
}, [R("div", {
|
|
3429
3429
|
ref_key: "contentEditToolbarRef",
|
|
3430
3430
|
ref: l,
|
|
3431
3431
|
class: "content-edit-toolbar",
|
|
3432
3432
|
"data-testid": "dashboard-item-header-controls"
|
|
3433
3433
|
}, [
|
|
3434
|
-
|
|
3434
|
+
R("button", {
|
|
3435
3435
|
onClick: b,
|
|
3436
3436
|
class: "control-btn",
|
|
3437
3437
|
"data-testid": `increase-height-item-${e.item.i}`,
|
|
3438
3438
|
title: "Increase height"
|
|
3439
|
-
}, [...
|
|
3440
|
-
|
|
3439
|
+
}, [...i[9] ||= [R("i", { class: "mdi mdi-plus icon" }, null, -1)]], 8, hi),
|
|
3440
|
+
R("button", {
|
|
3441
3441
|
onClick: x,
|
|
3442
3442
|
class: "control-btn",
|
|
3443
3443
|
"data-testid": `decrease-height-item-${e.item.i}`,
|
|
3444
3444
|
title: "Decrease height"
|
|
3445
|
-
}, [...
|
|
3446
|
-
|
|
3445
|
+
}, [...i[10] ||= [R("i", { class: "mdi mdi-minus icon" }, null, -1)]], 8, gi),
|
|
3446
|
+
R("button", {
|
|
3447
3447
|
onClick: C,
|
|
3448
3448
|
class: "control-btn",
|
|
3449
3449
|
"data-testid": `edit-dashboard-item-content-${e.item.i}`,
|
|
3450
3450
|
title: "Edit data"
|
|
3451
|
-
}, [...
|
|
3452
|
-
|
|
3451
|
+
}, [...i[11] ||= [R("i", { class: "mdi mdi-database-edit-outline icon" }, null, -1)]], 8, _i),
|
|
3452
|
+
R("button", {
|
|
3453
3453
|
onClick: y,
|
|
3454
3454
|
class: "control-btn",
|
|
3455
3455
|
"data-testid": `toggle-crossfilter-item-content-${e.item.i}`,
|
|
3456
|
-
title:
|
|
3457
|
-
}, [
|
|
3458
|
-
|
|
3459
|
-
onClick:
|
|
3456
|
+
title: O.value.allowCrossFilter ? "Toggle cross-filtering OFF" : "Toggle cross-filtering ON"
|
|
3457
|
+
}, [O.value.allowCrossFilter ? (W(), L("i", yi)) : (W(), L("i", bi))], 8, vi),
|
|
3458
|
+
R("button", {
|
|
3459
|
+
onClick: T,
|
|
3460
3460
|
class: "control-btn",
|
|
3461
3461
|
"data-testid": `copy-dashboard-item-${e.item.i}`,
|
|
3462
3462
|
title: "Copy item"
|
|
3463
|
-
}, [...
|
|
3464
|
-
|
|
3463
|
+
}, [...i[12] ||= [R("i", { class: "mdi mdi-content-copy icon" }, null, -1)]], 8, xi),
|
|
3464
|
+
R("button", {
|
|
3465
3465
|
onClick: w,
|
|
3466
3466
|
class: "control-btn dashboard-remove-btn",
|
|
3467
3467
|
"data-testid": `remove-dashboard-item-${e.item.i}`,
|
|
3468
3468
|
title: "Remove item"
|
|
3469
|
-
}, [...
|
|
3470
|
-
], 512)], 2)) :
|
|
3471
|
-
], 42, Hr), (
|
|
3469
|
+
}, [...i[13] ||= [R("i", { class: "mdi mdi-delete-outline icon" }, null, -1)]], 8, Si)
|
|
3470
|
+
], 512)], 2)) : I("", !0)], 2)
|
|
3471
|
+
], 42, Hr), (W(), F(be, { to: "body" }, [f.value ? (W(), L("div", {
|
|
3472
3472
|
key: 0,
|
|
3473
3473
|
ref_key: "mobileFilterPopoverRef",
|
|
3474
3474
|
ref: d,
|
|
3475
3475
|
class: "mobile-filter-popover",
|
|
3476
|
-
style:
|
|
3476
|
+
style: Se(p.value),
|
|
3477
3477
|
role: "dialog",
|
|
3478
3478
|
"aria-label": `${f.value} filters`,
|
|
3479
|
-
onClick:
|
|
3480
|
-
}, [
|
|
3479
|
+
onClick: i[3] ||= Ne(() => {}, ["stop"])
|
|
3480
|
+
}, [R("div", wi, [R("span", null, J(f.value) + " filters", 1), R("button", {
|
|
3481
3481
|
type: "button",
|
|
3482
3482
|
"aria-label": "Close filter details",
|
|
3483
|
-
onClick:
|
|
3484
|
-
}, [...
|
|
3483
|
+
onClick: i[2] ||= (e) => f.value = null
|
|
3484
|
+
}, [...i[14] ||= [R("i", { class: "mdi mdi-close" }, null, -1)]])]), R("div", Ti, [(W(!0), L(N, null, K(fe.value, (e, t) => (W(), L("div", {
|
|
3485
3485
|
key: `${e.source}-${t}`,
|
|
3486
3486
|
class: "mobile-filter-popover-value"
|
|
3487
|
-
},
|
|
3487
|
+
}, J(h(e.value, e.parameters)), 1))), 128))])], 12, Ci)) : I("", !0)]))], 64));
|
|
3488
3488
|
}
|
|
3489
3489
|
}), [["__scopeId", "data-v-61a867fc"]]), Di = { class: "add-item-content" }, Oi = {
|
|
3490
3490
|
class: "item-type-grid",
|
|
@@ -3493,70 +3493,70 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3493
3493
|
}, ki = ["data-testid"], Ai = ["value", "data-testid"], ji = { class: "item-option-card" }, Mi = {
|
|
3494
3494
|
class: "item-option-icon",
|
|
3495
3495
|
"aria-hidden": "true"
|
|
3496
|
-
}, Ni = { class: "item-option-text" }, Pi = { class: "item-option-label" }, Fi = { class: "item-option-help" }, Ii = /*#__PURE__*/
|
|
3496
|
+
}, Ni = { class: "item-option-text" }, Pi = { class: "item-option-label" }, Fi = { class: "item-option-help" }, Ii = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
3497
3497
|
__name: "DashboardAddItemModal",
|
|
3498
3498
|
props: { show: { type: Boolean } },
|
|
3499
3499
|
emits: ["add", "close"],
|
|
3500
3500
|
setup(e, { emit: t }) {
|
|
3501
|
-
let
|
|
3501
|
+
let r = t, i = G(n.CHART), a = [
|
|
3502
3502
|
{
|
|
3503
|
-
value:
|
|
3503
|
+
value: n.CHART,
|
|
3504
3504
|
label: "Chart",
|
|
3505
3505
|
description: "Visualize trends, comparisons, and distributions.",
|
|
3506
3506
|
icon: "mdi-chart-bar",
|
|
3507
3507
|
testId: "dashboard-add-item-type-chart"
|
|
3508
3508
|
},
|
|
3509
3509
|
{
|
|
3510
|
-
value:
|
|
3510
|
+
value: n.TABLE,
|
|
3511
3511
|
label: "Table",
|
|
3512
3512
|
description: "Show detailed rows and values in a grid.",
|
|
3513
3513
|
icon: "mdi-table-large",
|
|
3514
3514
|
testId: "dashboard-add-item-type-table"
|
|
3515
3515
|
},
|
|
3516
3516
|
{
|
|
3517
|
-
value:
|
|
3517
|
+
value: n.MARKDOWN,
|
|
3518
3518
|
label: "Markdown",
|
|
3519
3519
|
description: "Add notes, headings, or narrative context.",
|
|
3520
3520
|
icon: "mdi-text-box-outline",
|
|
3521
3521
|
testId: "dashboard-add-item-type-markdown"
|
|
3522
3522
|
},
|
|
3523
3523
|
{
|
|
3524
|
-
value:
|
|
3524
|
+
value: n.FILTER,
|
|
3525
3525
|
label: "Filter",
|
|
3526
3526
|
description: "Let viewers narrow the dashboard interactively.",
|
|
3527
3527
|
icon: "mdi-filter-variant",
|
|
3528
3528
|
testId: "dashboard-add-item-type-filter"
|
|
3529
3529
|
},
|
|
3530
3530
|
{
|
|
3531
|
-
value:
|
|
3531
|
+
value: n.FREEFORM,
|
|
3532
3532
|
label: "Custom Widget",
|
|
3533
3533
|
description: "Hand-authored HTML rendered in a sandboxed frame, wired to a query.",
|
|
3534
3534
|
icon: "mdi-code-braces",
|
|
3535
3535
|
testId: "dashboard-add-item-type-freeform"
|
|
3536
3536
|
},
|
|
3537
3537
|
{
|
|
3538
|
-
value:
|
|
3538
|
+
value: n.SECTION_HEADER,
|
|
3539
3539
|
label: "Section Header",
|
|
3540
3540
|
description: "Break the dashboard into labeled sections.",
|
|
3541
3541
|
icon: "mdi-format-title",
|
|
3542
3542
|
testId: "dashboard-add-item-type-section-header"
|
|
3543
3543
|
},
|
|
3544
3544
|
{
|
|
3545
|
-
value:
|
|
3545
|
+
value: n.MEMO,
|
|
3546
3546
|
label: "Executive Memo",
|
|
3547
3547
|
description: "Headline, verdict, magnitude, cause, action, confidence — at the top of a report.",
|
|
3548
3548
|
icon: "mdi-file-document-edit-outline",
|
|
3549
3549
|
testId: "dashboard-add-item-type-memo"
|
|
3550
3550
|
},
|
|
3551
3551
|
{
|
|
3552
|
-
value:
|
|
3552
|
+
value: n.CLAIM,
|
|
3553
3553
|
label: "Claim Section",
|
|
3554
3554
|
description: "A single claim with caveat and drilldown — pair with a chart for evidence.",
|
|
3555
3555
|
icon: "mdi-comment-quote-outline",
|
|
3556
3556
|
testId: "dashboard-add-item-type-claim"
|
|
3557
3557
|
},
|
|
3558
3558
|
{
|
|
3559
|
-
value:
|
|
3559
|
+
value: n.APPENDIX_HEADER,
|
|
3560
3560
|
label: "Appendix Header",
|
|
3561
3561
|
description: "Divider that introduces the auditability section at the bottom of a report.",
|
|
3562
3562
|
icon: "mdi-bookshelf",
|
|
@@ -3564,38 +3564,38 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3564
3564
|
}
|
|
3565
3565
|
];
|
|
3566
3566
|
function o() {
|
|
3567
|
-
|
|
3567
|
+
r("add", i.value);
|
|
3568
3568
|
}
|
|
3569
3569
|
function s() {
|
|
3570
|
-
|
|
3570
|
+
r("close");
|
|
3571
3571
|
}
|
|
3572
|
-
return (t, n) => (
|
|
3572
|
+
return (t, n) => (W(), F(se, {
|
|
3573
3573
|
show: e.show,
|
|
3574
3574
|
title: "Add New Item",
|
|
3575
3575
|
"max-width": "680px",
|
|
3576
3576
|
"test-id": "dashboard-add-item-modal",
|
|
3577
3577
|
onClose: s
|
|
3578
3578
|
}, {
|
|
3579
|
-
footer:
|
|
3579
|
+
footer: Z(() => [R("button", {
|
|
3580
3580
|
class: "cancel-button",
|
|
3581
3581
|
onClick: s
|
|
3582
|
-
}, "Cancel"),
|
|
3582
|
+
}, "Cancel"), R("button", {
|
|
3583
3583
|
onClick: o,
|
|
3584
3584
|
class: "add-button",
|
|
3585
3585
|
"data-testid": "dashboard-add-item-confirm"
|
|
3586
3586
|
}, " Add Item ")]),
|
|
3587
|
-
default:
|
|
3587
|
+
default: Z(() => [R("div", Di, [n[1] ||= R("p", { class: "add-item-description" }, "Choose the kind of block you want to add to the dashboard.", -1), R("div", Oi, [(W(), L(N, null, K(a, (e) => R("label", {
|
|
3588
3588
|
key: e.value,
|
|
3589
|
-
class:
|
|
3589
|
+
class: U(["item-option", { selected: i.value === e.value }]),
|
|
3590
3590
|
"data-testid": `${e.testId}-option`
|
|
3591
|
-
}, [
|
|
3592
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
3591
|
+
}, [je(R("input", {
|
|
3592
|
+
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
3593
3593
|
class: "item-option-input",
|
|
3594
3594
|
type: "radio",
|
|
3595
3595
|
name: "dashboard-add-item-type",
|
|
3596
3596
|
value: e.value,
|
|
3597
3597
|
"data-testid": e.testId
|
|
3598
|
-
}, null, 8, Ai), [[
|
|
3598
|
+
}, null, 8, Ai), [[Oe, i.value]]), R("span", ji, [R("span", Mi, [R("i", { class: U(["mdi", e.icon]) }, null, 2)]), R("span", Ni, [R("span", Pi, J(e.label), 1), R("span", Fi, J(e.description), 1)])])], 10, ki)), 64))])])]),
|
|
3599
3599
|
_: 1
|
|
3600
3600
|
}, 8, ["show"]));
|
|
3601
3601
|
}
|
|
@@ -3604,10 +3604,10 @@ var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3604
3604
|
//#region monaco/editorHelpers.ts
|
|
3605
3605
|
function Li(e = "dark") {
|
|
3606
3606
|
let t = e === "light";
|
|
3607
|
-
|
|
3607
|
+
me.defineTheme("trilogyStudio", {
|
|
3608
3608
|
base: t ? "vs" : "vs-dark",
|
|
3609
3609
|
inherit: !0,
|
|
3610
|
-
rules:
|
|
3610
|
+
rules: ge,
|
|
3611
3611
|
colors: {
|
|
3612
3612
|
"editor.background": t ? "#ffffff" : "#111318",
|
|
3613
3613
|
"editor.foreground": t ? "#1f2937" : "#e5e7eb",
|
|
@@ -3625,7 +3625,7 @@ function Li(e = "dark") {
|
|
|
3625
3625
|
"editorWidget.background": t ? "#ffffff" : "#111318",
|
|
3626
3626
|
"editorWidget.border": t ? "#d6dde6" : "#2a2f37"
|
|
3627
3627
|
}
|
|
3628
|
-
}),
|
|
3628
|
+
}), me.setTheme("trilogyStudio");
|
|
3629
3629
|
}
|
|
3630
3630
|
function Ri(e, t = {}) {
|
|
3631
3631
|
let n = {
|
|
@@ -3638,7 +3638,7 @@ function Ri(e, t = {}) {
|
|
|
3638
3638
|
theme: "trilogyStudio",
|
|
3639
3639
|
...t
|
|
3640
3640
|
};
|
|
3641
|
-
return
|
|
3641
|
+
return me.create(e, n);
|
|
3642
3642
|
}
|
|
3643
3643
|
function zi(e, t = "") {
|
|
3644
3644
|
if (!e) return t;
|
|
@@ -3647,7 +3647,7 @@ function zi(e, t = "") {
|
|
|
3647
3647
|
}
|
|
3648
3648
|
function Bi(e, t = {}) {
|
|
3649
3649
|
let { onValidate: n, onRun: r, onSave: i } = t;
|
|
3650
|
-
if (n && e.addCommand(
|
|
3650
|
+
if (n && e.addCommand(M.CtrlCmd | M.Shift | pe.KeyV, n), r && e.addCommand(M.CtrlCmd | pe.Enter, r), i && e.addCommand(M.CtrlCmd | pe.KeyS, i), e.addCommand(M.CtrlCmd | pe.KeyZ, () => {
|
|
3651
3651
|
e.trigger("ide", "undo", {});
|
|
3652
3652
|
}), t.onContentChange) {
|
|
3653
3653
|
let n = null;
|
|
@@ -3660,11 +3660,11 @@ function Bi(e, t = {}) {
|
|
|
3660
3660
|
}
|
|
3661
3661
|
//#endregion
|
|
3662
3662
|
//#region components/SimpleEditor.vue?vue&type=script&lang.ts
|
|
3663
|
-
var Q = null, Vi =
|
|
3663
|
+
var Q = null, Vi = V({
|
|
3664
3664
|
name: "EnhancedEditor",
|
|
3665
3665
|
components: {
|
|
3666
|
-
SymbolsPane:
|
|
3667
|
-
LoadingView:
|
|
3666
|
+
SymbolsPane: _e,
|
|
3667
|
+
LoadingView: ue
|
|
3668
3668
|
},
|
|
3669
3669
|
props: {
|
|
3670
3670
|
onSave: {
|
|
@@ -3700,7 +3700,7 @@ var Q = null, Vi = B({
|
|
|
3700
3700
|
data() {
|
|
3701
3701
|
return {
|
|
3702
3702
|
lastOperation: null,
|
|
3703
|
-
editor: new
|
|
3703
|
+
editor: new y({
|
|
3704
3704
|
id: "simple-editor",
|
|
3705
3705
|
name: "My Query",
|
|
3706
3706
|
type: "trilogy",
|
|
@@ -3714,12 +3714,12 @@ var Q = null, Vi = B({
|
|
|
3714
3714
|
},
|
|
3715
3715
|
setup() {
|
|
3716
3716
|
return {
|
|
3717
|
-
queryExecutionService:
|
|
3718
|
-
connectionStore:
|
|
3719
|
-
isMobile:
|
|
3720
|
-
llmConnectionStore:
|
|
3721
|
-
analyticsStore:
|
|
3722
|
-
userSettingsStore:
|
|
3717
|
+
queryExecutionService: H("queryExecutionService"),
|
|
3718
|
+
connectionStore: H("connectionStore"),
|
|
3719
|
+
isMobile: H("isMobile"),
|
|
3720
|
+
llmConnectionStore: H("llmConnectionStore"),
|
|
3721
|
+
analyticsStore: H("analyticsStore"),
|
|
3722
|
+
userSettingsStore: D()
|
|
3723
3723
|
};
|
|
3724
3724
|
},
|
|
3725
3725
|
created() {
|
|
@@ -3769,11 +3769,11 @@ var Q = null, Vi = B({
|
|
|
3769
3769
|
onValidate: () => this.validateQuery(),
|
|
3770
3770
|
onRun: () => this.runQuery(),
|
|
3771
3771
|
onGenerateLLM: () => this.generateLLMQuery()
|
|
3772
|
-
}), Q.addCommand(
|
|
3772
|
+
}), Q.addCommand(M.CtrlCmd | pe.Space, () => {
|
|
3773
3773
|
this.togglePanel("symbols");
|
|
3774
|
-
}), Q.addCommand(
|
|
3774
|
+
}), Q.addCommand(M.CtrlCmd | M.Shift | pe.Enter, () => {
|
|
3775
3775
|
this.generateLLMQuery();
|
|
3776
|
-
}), this.editor.type !== "sql" && (Q.addCommand(
|
|
3776
|
+
}), this.editor.type !== "sql" && (Q.addCommand(M.CtrlCmd | pe.KeyK, () => {
|
|
3777
3777
|
this.formatQuery();
|
|
3778
3778
|
}), Q.addAction({
|
|
3779
3779
|
id: "trilogy.simple-editor.format-query",
|
|
@@ -3796,7 +3796,7 @@ var Q = null, Vi = B({
|
|
|
3796
3796
|
if (!Q) return;
|
|
3797
3797
|
let t = Q.getPosition();
|
|
3798
3798
|
t && e.insertText && (Q.executeEdits("", [{
|
|
3799
|
-
range: new
|
|
3799
|
+
range: new he(t.lineNumber, t.column, t.lineNumber, t.column),
|
|
3800
3800
|
text: e.insertText
|
|
3801
3801
|
}]), Q.focus(), this.isMobile && this.closePanel());
|
|
3802
3802
|
},
|
|
@@ -3815,7 +3815,7 @@ var Q = null, Vi = B({
|
|
|
3815
3815
|
}, o = await n.validateQuery(i?.id || this.editor.connection, a);
|
|
3816
3816
|
if (o && e) {
|
|
3817
3817
|
let e = Q.getModel();
|
|
3818
|
-
e &&
|
|
3818
|
+
e && me.setModelMarkers(e, "owner", o.data.items || []), o.data.completion_items && (this.editor.completionSymbols = o.data.completion_items);
|
|
3819
3819
|
}
|
|
3820
3820
|
return o ? o.data.imports : [];
|
|
3821
3821
|
} catch (e) {
|
|
@@ -3838,33 +3838,33 @@ var Q = null, Vi = B({
|
|
|
3838
3838
|
},
|
|
3839
3839
|
async runQuery() {
|
|
3840
3840
|
this.$emit("query-started"), this.editor.setError(null);
|
|
3841
|
-
let e = !1, t = this.connectionStore, n = this.queryExecutionService,
|
|
3842
|
-
if (!this.editor.loading &&
|
|
3841
|
+
let e = !1, t = this.connectionStore, n = this.queryExecutionService, r = Q;
|
|
3842
|
+
if (!this.editor.loading && r) try {
|
|
3843
3843
|
this.analyticsStore && this.analyticsStore.log("studio-query-execution", this.editor.type, !0), this.editor.loading = !0, this.lastOperation = null, this.editor.startTime = Date.now();
|
|
3844
|
-
let
|
|
3845
|
-
if (!
|
|
3846
|
-
this.editor.results = new
|
|
3844
|
+
let i = this.editor.connectionId && t.connections[this.editor.connectionId] || t.connectionByName(this.editor.connection), a = zi(r, this.editor.contents);
|
|
3845
|
+
if (!a) {
|
|
3846
|
+
this.editor.results = new m(/* @__PURE__ */ new Map(), []), this.editor.loading = !1;
|
|
3847
3847
|
return;
|
|
3848
3848
|
}
|
|
3849
|
-
let
|
|
3850
|
-
text:
|
|
3851
|
-
queryType:
|
|
3849
|
+
let o = {
|
|
3850
|
+
text: a,
|
|
3851
|
+
queryType: i ? i.query_type : "",
|
|
3852
3852
|
editorType: this.editor.type,
|
|
3853
3853
|
imports: this.imports,
|
|
3854
3854
|
extraContent: this.rootContent
|
|
3855
|
-
}, { resultPromise:
|
|
3855
|
+
}, { resultPromise: s, cancellation: c } = await n.executeQuery(i?.id || this.editor.connection, o, () => {}, (t) => {
|
|
3856
3856
|
!e && t.error && (this.editor.loading = !1, t.message && this.editor.setError(t.message)), !e && t.running && (this.editor.error = null, this.editor.loading = !0);
|
|
3857
3857
|
});
|
|
3858
3858
|
this.editor.cancelCallback = () => {
|
|
3859
|
-
|
|
3859
|
+
c.isActive() && c.cancel(), this.editor.loading = !1, this.editor.cancelCallback = null;
|
|
3860
3860
|
};
|
|
3861
|
-
let
|
|
3861
|
+
let l = await s;
|
|
3862
3862
|
e = !0, this.lastOperation = {
|
|
3863
|
-
success:
|
|
3864
|
-
duration:
|
|
3865
|
-
rows:
|
|
3863
|
+
success: l.success,
|
|
3864
|
+
duration: l.executionTime,
|
|
3865
|
+
rows: l.results?.data ? l.results?.data?.length : void 0,
|
|
3866
3866
|
type: this.editor.type
|
|
3867
|
-
},
|
|
3867
|
+
}, l.success ? (this.editor.executed_contents = a, l.generatedSql && (this.editor.generated_sql = l.generatedSql), l.results && (this.editor.results = l.results, this.editor.duration = l.executionTime)) : l.error && (this.editor.executed_contents = a, this.editor.setError(l.error));
|
|
3868
3868
|
} catch (e) {
|
|
3869
3869
|
e instanceof Error && this.editor.setError(e.message || "Query execution failed"), this.lastOperation = {
|
|
3870
3870
|
success: !1,
|
|
@@ -3883,15 +3883,15 @@ var Q = null, Vi = B({
|
|
|
3883
3883
|
return;
|
|
3884
3884
|
}
|
|
3885
3885
|
try {
|
|
3886
|
-
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
|
|
3887
|
-
let
|
|
3886
|
+
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 m(/* @__PURE__ */ new Map(), []), this.editor.setError(null);
|
|
3887
|
+
let r = Q.getValue();
|
|
3888
3888
|
if (await this.validateQuery(!1), !this.editor.completionSymbols || this.editor.completionSymbols.length === 0) throw Error("There are no imported concepts for LLM generation");
|
|
3889
|
-
let
|
|
3889
|
+
let i = this.editor.completionSymbols.map((e) => ({
|
|
3890
3890
|
name: e.label,
|
|
3891
3891
|
type: e.datatype,
|
|
3892
3892
|
description: e.description,
|
|
3893
3893
|
calculation: e.calculation
|
|
3894
|
-
})),
|
|
3894
|
+
})), a = await e.generateQueryCompletion(r, i, async (e) => {
|
|
3895
3895
|
let r = this.editor.connectionId && n.connections[this.editor.connectionId] || n.connectionByName(this.editor.connection), i = {
|
|
3896
3896
|
text: e,
|
|
3897
3897
|
queryType: r ? r.query_type : "",
|
|
@@ -3908,7 +3908,7 @@ var Q = null, Vi = B({
|
|
|
3908
3908
|
throw e;
|
|
3909
3909
|
}
|
|
3910
3910
|
});
|
|
3911
|
-
if (
|
|
3911
|
+
if (a) Q.setValue(a.content), this.editor.contents = Q.getValue(), this.lastOperation = {
|
|
3912
3912
|
success: !0,
|
|
3913
3913
|
duration: Date.now() - (this.editor.startTime || 0),
|
|
3914
3914
|
type: "LLM Generation"
|
|
@@ -3947,68 +3947,68 @@ var Q = null, Vi = B({
|
|
|
3947
3947
|
class: "operation-type"
|
|
3948
3948
|
};
|
|
3949
3949
|
function na(e, t, n, r, i, a) {
|
|
3950
|
-
let o =
|
|
3951
|
-
return
|
|
3952
|
-
|
|
3953
|
-
|
|
3950
|
+
let o = q("SymbolsPane"), s = q("loading-view");
|
|
3951
|
+
return W(), L("div", Hi, [
|
|
3952
|
+
R("div", Ui, [R("div", Wi, [
|
|
3953
|
+
R("button", {
|
|
3954
3954
|
class: "action-item",
|
|
3955
3955
|
onClick: t[0] ||= (...t) => e.generateLLMQuery && e.generateLLMQuery(...t),
|
|
3956
3956
|
title: "Generate query using AI",
|
|
3957
3957
|
"data-testid": "editor-generate-button"
|
|
3958
3958
|
}, " Generate "),
|
|
3959
|
-
e.editor.type === "sql" ?
|
|
3959
|
+
e.editor.type === "sql" ? I("", !0) : (W(), L("button", {
|
|
3960
3960
|
key: 0,
|
|
3961
3961
|
class: "action-item",
|
|
3962
3962
|
onClick: t[1] ||= () => e.validateQuery()
|
|
3963
3963
|
}, " Parse ")),
|
|
3964
|
-
e.editor.type === "sql" ?
|
|
3964
|
+
e.editor.type === "sql" ? I("", !0) : (W(), L("button", {
|
|
3965
3965
|
key: 1,
|
|
3966
3966
|
class: "action-item",
|
|
3967
3967
|
onClick: t[2] ||= (...t) => e.formatQuery && e.formatQuery(...t),
|
|
3968
3968
|
title: "Format query"
|
|
3969
3969
|
}, " Format ")),
|
|
3970
|
-
|
|
3970
|
+
R("button", {
|
|
3971
3971
|
onClick: t[3] ||= (t) => e.editor.loading ? e.cancelQuery() : e.runQuery(),
|
|
3972
|
-
class:
|
|
3972
|
+
class: U(["action-item", {
|
|
3973
3973
|
"button-cancel": e.editor.loading,
|
|
3974
3974
|
"button-run": !e.editor.loading
|
|
3975
3975
|
}]),
|
|
3976
3976
|
"data-testid": "editor-run-button"
|
|
3977
|
-
},
|
|
3977
|
+
}, J(e.editor.loading ? "Cancel" : "Test"), 3)
|
|
3978
3978
|
])]),
|
|
3979
|
-
|
|
3980
|
-
|
|
3979
|
+
R("div", Gi, [
|
|
3980
|
+
R("div", {
|
|
3981
3981
|
ref: "editorElement",
|
|
3982
|
-
class:
|
|
3982
|
+
class: U(["editor-obj", {
|
|
3983
3983
|
"monaco-width-with-panel": e.isPanelVisible,
|
|
3984
3984
|
"monaco-width-no-panel": !e.isPanelVisible
|
|
3985
3985
|
}]),
|
|
3986
3986
|
"data-testid": "simple-editor-content"
|
|
3987
3987
|
}, null, 2),
|
|
3988
|
-
|
|
3988
|
+
je(R("div", Ki, [B(o, {
|
|
3989
3989
|
symbols: e.editor.completionSymbols || [],
|
|
3990
3990
|
onSelectSymbol: e.insertSymbol,
|
|
3991
3991
|
ref: "symbolsPane"
|
|
3992
|
-
}, null, 8, ["symbols", "onSelectSymbol"])], 512), [[
|
|
3993
|
-
|
|
3994
|
-
class:
|
|
3992
|
+
}, null, 8, ["symbols", "onSelectSymbol"])], 512), [[Ae, e.isPanelVisible]]),
|
|
3993
|
+
R("div", qi, [R("div", Ji, [R("button", {
|
|
3994
|
+
class: U(["sidebar-icon-button", { active: e.isPanelVisible }]),
|
|
3995
3995
|
onClick: t[4] ||= (t) => e.togglePanel("symbols"),
|
|
3996
3996
|
title: "Symbols"
|
|
3997
|
-
}, [...t[5] ||= [
|
|
3997
|
+
}, [...t[5] ||= [R("i", { class: "mdi mdi-tag-search-outline" }, null, -1)]], 2)])])
|
|
3998
3998
|
]),
|
|
3999
|
-
|
|
3999
|
+
R("div", Yi, [e.editor.loading ? (W(), F(s, {
|
|
4000
4000
|
key: 0,
|
|
4001
4001
|
class: "loading-view",
|
|
4002
4002
|
text: "Loading...",
|
|
4003
4003
|
startTime: e.editor.startTime
|
|
4004
|
-
}, null, 8, ["startTime"])) : e.editor.error ? (
|
|
4005
|
-
e.lastOperation.duration ? (
|
|
4006
|
-
e.lastOperation.rows === void 0 ?
|
|
4007
|
-
e.lastOperation.type ? (
|
|
4008
|
-
])])) :
|
|
4004
|
+
}, null, 8, ["startTime"])) : e.editor.error ? (W(), L("div", Xi, J(e.editor.error), 1)) : e.lastOperation ? (W(), L("div", Zi, [R("div", { class: U(["status-badge", e.lastOperation.success ? "success" : "error"]) }, J(e.lastOperation.success ? "SUCCESS" : "FAILED"), 3), R("div", Qi, [
|
|
4005
|
+
e.lastOperation.duration ? (W(), L("div", $i, J(e.lastOperation.duration) + "ms", 1)) : I("", !0),
|
|
4006
|
+
e.lastOperation.rows === void 0 ? I("", !0) : (W(), L("div", ea, J(e.lastOperation.rows) + " " + J(e.lastOperation.rows === 1 ? "row" : "rows"), 1)),
|
|
4007
|
+
e.lastOperation.type ? (W(), L("div", ta, J(e.lastOperation.type), 1)) : I("", !0)
|
|
4008
|
+
])])) : I("", !0)])
|
|
4009
4009
|
]);
|
|
4010
4010
|
}
|
|
4011
|
-
var ra = /*#__PURE__*/
|
|
4011
|
+
var ra = /*#__PURE__*/ d(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]]), ia = { class: "editor-overlay" }, aa = { class: "editor-actions" }, oa = ["data-testid"], sa = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
4012
4012
|
__name: "DashboardEditorDialog",
|
|
4013
4013
|
props: {
|
|
4014
4014
|
initialWidth: {},
|
|
@@ -4020,30 +4020,30 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4020
4020
|
},
|
|
4021
4021
|
emits: ["save", "cancel"],
|
|
4022
4022
|
setup(e, { emit: t }) {
|
|
4023
|
-
let n = e, r = t, { editorElement: i, dialogStyle: a, startResize: o } =
|
|
4023
|
+
let n = e, r = t, { editorElement: i, dialogStyle: a, startResize: o } = ye(() => r("cancel"), {
|
|
4024
4024
|
initialWidth: n.initialWidth,
|
|
4025
4025
|
initialHeight: n.initialHeight,
|
|
4026
4026
|
minWidth: n.minWidth,
|
|
4027
4027
|
minHeight: n.minHeight
|
|
4028
4028
|
});
|
|
4029
|
-
return (e, t) => (
|
|
4029
|
+
return (e, t) => (W(), L("div", ia, [R("div", {
|
|
4030
4030
|
ref: (e) => i.value = e,
|
|
4031
4031
|
class: "content-editor",
|
|
4032
|
-
style:
|
|
4032
|
+
style: Se(Y(a))
|
|
4033
4033
|
}, [
|
|
4034
|
-
|
|
4035
|
-
|
|
4034
|
+
Ee(e.$slots, "default", {}, void 0, !0),
|
|
4035
|
+
R("div", aa, [Ee(e.$slots, "actions", {}, () => [R("button", {
|
|
4036
4036
|
class: "save-button",
|
|
4037
4037
|
"data-testid": n.saveTestId || void 0,
|
|
4038
4038
|
onClick: t[0] ||= (e) => r("save")
|
|
4039
|
-
},
|
|
4039
|
+
}, J(n.saveLabel), 9, oa), R("button", {
|
|
4040
4040
|
class: "cancel-button",
|
|
4041
4041
|
onClick: t[1] ||= (e) => r("cancel")
|
|
4042
4042
|
}, "Cancel")], !0)]),
|
|
4043
|
-
|
|
4043
|
+
B(ve, { onStartResize: Y(o) }, null, 8, ["onStartResize"])
|
|
4044
4044
|
], 4)]));
|
|
4045
4045
|
}
|
|
4046
|
-
}), [["__scopeId", "data-v-730a6200"]]), ca = { class: "editor-body" }, la = /*#__PURE__*/
|
|
4046
|
+
}), [["__scopeId", "data-v-730a6200"]]), ca = { class: "editor-body" }, la = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
4047
4047
|
__name: "DashboardChartEditor",
|
|
4048
4048
|
props: {
|
|
4049
4049
|
content: {},
|
|
@@ -4055,14 +4055,14 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4055
4055
|
},
|
|
4056
4056
|
emits: ["save", "cancel"],
|
|
4057
4057
|
setup(e, { emit: t }) {
|
|
4058
|
-
let n = e, r = t, i =
|
|
4058
|
+
let n = e, r = t, i = G(n.content), a = G(n.imports), o = G(null);
|
|
4059
4059
|
function s() {
|
|
4060
4060
|
o.value && r("save", o.value.getContent());
|
|
4061
4061
|
}
|
|
4062
4062
|
function c() {
|
|
4063
4063
|
r("cancel");
|
|
4064
4064
|
}
|
|
4065
|
-
return (t, r) => (
|
|
4065
|
+
return (t, r) => (W(), F(sa, {
|
|
4066
4066
|
initialWidth: n.initialWidth,
|
|
4067
4067
|
initialHeight: n.initialHeight,
|
|
4068
4068
|
saveLabel: "Save Query",
|
|
@@ -4070,7 +4070,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4070
4070
|
onSave: s,
|
|
4071
4071
|
onCancel: c
|
|
4072
4072
|
}, {
|
|
4073
|
-
default:
|
|
4073
|
+
default: Z(() => [R("div", ca, [B(ra, {
|
|
4074
4074
|
class: "editor-content",
|
|
4075
4075
|
initContent: i.value,
|
|
4076
4076
|
connectionName: e.connectionName,
|
|
@@ -4093,7 +4093,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4093
4093
|
}, pa = {
|
|
4094
4094
|
key: 1,
|
|
4095
4095
|
class: "tab-content"
|
|
4096
|
-
}, ma = /*#__PURE__*/
|
|
4096
|
+
}, ma = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
4097
4097
|
__name: "DashboardMarkdownEditor",
|
|
4098
4098
|
props: {
|
|
4099
4099
|
content: {},
|
|
@@ -4105,14 +4105,14 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4105
4105
|
},
|
|
4106
4106
|
emits: ["save", "cancel"],
|
|
4107
4107
|
setup(e, { emit: t }) {
|
|
4108
|
-
let n = e, r = t, i =
|
|
4108
|
+
let n = e, r = t, i = P(() => typeof n.content == "string" ? {
|
|
4109
4109
|
markdown: n.content,
|
|
4110
4110
|
query: ""
|
|
4111
4111
|
} : {
|
|
4112
4112
|
markdown: n.content.markdown || "",
|
|
4113
4113
|
query: n.content.query || ""
|
|
4114
|
-
}), a =
|
|
4115
|
-
|
|
4114
|
+
}), a = G(i.value.markdown), o = G(i.value.query), s = G(n.imports), c = G(null), l = G("markdown");
|
|
4115
|
+
X(() => n.content, (e) => {
|
|
4116
4116
|
let t = typeof e == "string" ? {
|
|
4117
4117
|
markdown: e,
|
|
4118
4118
|
query: ""
|
|
@@ -4121,7 +4121,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4121
4121
|
query: e.query || ""
|
|
4122
4122
|
};
|
|
4123
4123
|
a.value = t.markdown, o.value = t.query;
|
|
4124
|
-
}),
|
|
4124
|
+
}), X(l, (e, t) => {
|
|
4125
4125
|
t === "query" && c.value && (o.value = c.value.getContent());
|
|
4126
4126
|
});
|
|
4127
4127
|
function u() {
|
|
@@ -4165,7 +4165,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4165
4165
|
function b() {
|
|
4166
4166
|
p("{{#each data}}\n- {field_name}\n{{/each}}");
|
|
4167
4167
|
}
|
|
4168
|
-
return (t, r) => (
|
|
4168
|
+
return (t, r) => (W(), F(sa, {
|
|
4169
4169
|
initialWidth: n.initialWidth,
|
|
4170
4170
|
initialHeight: n.initialHeight,
|
|
4171
4171
|
saveLabel: "Save Content",
|
|
@@ -4173,49 +4173,49 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4173
4173
|
onSave: u,
|
|
4174
4174
|
onCancel: d
|
|
4175
4175
|
}, {
|
|
4176
|
-
default:
|
|
4176
|
+
default: Z(() => [R("div", ua, [R("button", {
|
|
4177
4177
|
onClick: r[0] ||= (e) => f("markdown"),
|
|
4178
|
-
class:
|
|
4179
|
-
}, [...r[3] ||= [
|
|
4178
|
+
class: U([{ active: l.value === "markdown" }, "tab-button"])
|
|
4179
|
+
}, [...r[3] ||= [R("i", { class: "mdi mdi-note-text-outline" }, null, -1), R("span", null, "Markdown Template", -1)]], 2), R("button", {
|
|
4180
4180
|
onClick: r[1] ||= (e) => f("query"),
|
|
4181
|
-
class:
|
|
4182
|
-
}, [...r[4] ||= [
|
|
4183
|
-
|
|
4181
|
+
class: U([{ active: l.value === "query" }, "tab-button"])
|
|
4182
|
+
}, [...r[4] ||= [R("i", { class: "mdi mdi-magnify" }, null, -1), R("span", null, "Data Query", -1)]], 2)]), R("div", da, [l.value === "markdown" ? (W(), L("div", fa, [R("div", { class: "markdown-toolbar" }, [
|
|
4183
|
+
R("button", {
|
|
4184
4184
|
onClick: m,
|
|
4185
4185
|
title: "Bold"
|
|
4186
|
-
}, [...r[5] ||= [
|
|
4187
|
-
|
|
4186
|
+
}, [...r[5] ||= [R("strong", null, "B", -1)]]),
|
|
4187
|
+
R("button", {
|
|
4188
4188
|
onClick: h,
|
|
4189
4189
|
title: "Italic"
|
|
4190
|
-
}, [...r[6] ||= [
|
|
4191
|
-
|
|
4190
|
+
}, [...r[6] ||= [R("em", null, "I", -1)]]),
|
|
4191
|
+
R("button", {
|
|
4192
4192
|
onClick: g,
|
|
4193
4193
|
title: "Heading"
|
|
4194
4194
|
}, "H"),
|
|
4195
|
-
|
|
4195
|
+
R("button", {
|
|
4196
4196
|
onClick: _,
|
|
4197
4197
|
title: "List"
|
|
4198
|
-
}, [...r[7] ||= [
|
|
4199
|
-
|
|
4198
|
+
}, [...r[7] ||= [R("i", { class: "mdi mdi-format-list-bulleted" }, null, -1)]]),
|
|
4199
|
+
R("button", {
|
|
4200
4200
|
onClick: v,
|
|
4201
4201
|
title: "Link"
|
|
4202
|
-
}, [...r[8] ||= [
|
|
4203
|
-
r[10] ||=
|
|
4204
|
-
|
|
4202
|
+
}, [...r[8] ||= [R("i", { class: "mdi mdi-link-variant" }, null, -1)]]),
|
|
4203
|
+
r[10] ||= R("div", { class: "toolbar-separator" }, null, -1),
|
|
4204
|
+
R("button", {
|
|
4205
4205
|
onClick: y,
|
|
4206
4206
|
title: "Insert data reference",
|
|
4207
4207
|
class: "data-button"
|
|
4208
4208
|
}, " {} "),
|
|
4209
|
-
|
|
4209
|
+
R("button", {
|
|
4210
4210
|
onClick: b,
|
|
4211
4211
|
title: "Insert loop",
|
|
4212
4212
|
class: "data-button"
|
|
4213
|
-
}, [...r[9] ||= [
|
|
4214
|
-
]),
|
|
4213
|
+
}, [...r[9] ||= [R("i", { class: "mdi mdi-refresh" }, null, -1)]])
|
|
4214
|
+
]), je(R("textarea", {
|
|
4215
4215
|
"onUpdate:modelValue": r[2] ||= (e) => a.value = e,
|
|
4216
4216
|
placeholder: "Enter markdown content here...\n\nTemplate examples:\n- {field_name} - First row value\n- {data[0].field_name} - Specific row\n- {data.length} - Total rows\n- {{#each data}} {field_name} {{/each}} - Loop all\n- {{#each data limit=5}} {field_name} {{/each}} - Loop first 5",
|
|
4217
4217
|
class: "markdown-editor"
|
|
4218
|
-
}, null, 512), [[
|
|
4218
|
+
}, null, 512), [[ke, a.value]])])) : I("", !0), l.value === "query" ? (W(), L("div", pa, [r[11] ||= R("div", { class: "query-help" }, [R("p", null, " Write a query to fetch data for your markdown template. Leave empty if no data is needed. ")], -1), B(ra, {
|
|
4219
4219
|
class: "editor-content",
|
|
4220
4220
|
initContent: o.value,
|
|
4221
4221
|
connectionName: e.connectionName,
|
|
@@ -4228,7 +4228,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4228
4228
|
"connectionName",
|
|
4229
4229
|
"imports",
|
|
4230
4230
|
"rootContent"
|
|
4231
|
-
])])) :
|
|
4231
|
+
])])) : I("", !0)])]),
|
|
4232
4232
|
_: 1
|
|
4233
4233
|
}, 8, ["initialWidth", "initialHeight"]));
|
|
4234
4234
|
}
|
|
@@ -4245,7 +4245,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4245
4245
|
}, ba = {
|
|
4246
4246
|
key: 2,
|
|
4247
4247
|
class: "tab-content api-tab"
|
|
4248
|
-
}, xa = { class: "theme-list" }, Sa = /*#__PURE__*/
|
|
4248
|
+
}, xa = { class: "theme-list" }, Sa = /*#__PURE__*/ d(/* @__PURE__ */ V({
|
|
4249
4249
|
__name: "DashboardFreeformEditor",
|
|
4250
4250
|
props: {
|
|
4251
4251
|
content: {},
|
|
@@ -4257,10 +4257,10 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4257
4257
|
},
|
|
4258
4258
|
emits: ["save", "cancel"],
|
|
4259
4259
|
setup(e, { emit: t }) {
|
|
4260
|
-
let n = e, r = t, i =
|
|
4260
|
+
let n = e, r = t, i = P(() => ({
|
|
4261
4261
|
html: n.content?.html || "",
|
|
4262
4262
|
query: n.content?.query || ""
|
|
4263
|
-
})), a =
|
|
4263
|
+
})), a = G(i.value.html), o = G(i.value.query), s = G(n.imports), c = G(null), l = G("html"), u = P(() => a.value.length > g), d = [
|
|
4264
4264
|
{
|
|
4265
4265
|
name: "--widget-text",
|
|
4266
4266
|
description: "primary text"
|
|
@@ -4302,9 +4302,9 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4302
4302
|
description: "already applied to body"
|
|
4303
4303
|
}
|
|
4304
4304
|
];
|
|
4305
|
-
|
|
4305
|
+
X(() => n.content, (e) => {
|
|
4306
4306
|
a.value = e?.html || "", o.value = e?.query || "";
|
|
4307
|
-
}),
|
|
4307
|
+
}), X(l, (e, t) => {
|
|
4308
4308
|
t === "query" && c.value && (o.value = c.value.getContent());
|
|
4309
4309
|
});
|
|
4310
4310
|
function f() {
|
|
@@ -4319,7 +4319,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4319
4319
|
function m(e) {
|
|
4320
4320
|
l.value === "query" && c.value && (o.value = c.value.getContent()), l.value = e;
|
|
4321
4321
|
}
|
|
4322
|
-
return (t, r) => (
|
|
4322
|
+
return (t, r) => (W(), F(sa, {
|
|
4323
4323
|
initialWidth: n.initialWidth,
|
|
4324
4324
|
initialHeight: n.initialHeight,
|
|
4325
4325
|
saveLabel: "Save Widget",
|
|
@@ -4327,35 +4327,35 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4327
4327
|
onSave: f,
|
|
4328
4328
|
onCancel: p
|
|
4329
4329
|
}, {
|
|
4330
|
-
default:
|
|
4331
|
-
|
|
4330
|
+
default: Z(() => [R("div", ha, [
|
|
4331
|
+
R("button", {
|
|
4332
4332
|
onClick: r[0] ||= (e) => m("html"),
|
|
4333
|
-
class:
|
|
4334
|
-
}, [...r[4] ||= [
|
|
4335
|
-
|
|
4333
|
+
class: U([{ active: l.value === "html" }, "tab-button"])
|
|
4334
|
+
}, [...r[4] ||= [R("i", { class: "mdi mdi-code-tags" }, null, -1), R("span", null, "Widget HTML", -1)]], 2),
|
|
4335
|
+
R("button", {
|
|
4336
4336
|
onClick: r[1] ||= (e) => m("query"),
|
|
4337
|
-
class:
|
|
4338
|
-
}, [...r[5] ||= [
|
|
4339
|
-
|
|
4337
|
+
class: U([{ active: l.value === "query" }, "tab-button"])
|
|
4338
|
+
}, [...r[5] ||= [R("i", { class: "mdi mdi-magnify" }, null, -1), R("span", null, "Data Query", -1)]], 2),
|
|
4339
|
+
R("button", {
|
|
4340
4340
|
onClick: r[2] ||= (e) => m("api"),
|
|
4341
|
-
class:
|
|
4342
|
-
}, [...r[6] ||= [
|
|
4343
|
-
]),
|
|
4344
|
-
l.value === "html" ? (
|
|
4345
|
-
r[7] ||=
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4341
|
+
class: U([{ active: l.value === "api" }, "tab-button"])
|
|
4342
|
+
}, [...r[6] ||= [R("i", { class: "mdi mdi-book-open-variant" }, null, -1), R("span", null, "API", -1)]], 2)
|
|
4343
|
+
]), R("div", ga, [
|
|
4344
|
+
l.value === "html" ? (W(), L("div", _a, [
|
|
4345
|
+
r[7] ||= R("div", { class: "editor-help" }, [R("p", null, [
|
|
4346
|
+
z(" Runs in a sandboxed frame with no network access and no access to the rest of the app. Use "),
|
|
4347
|
+
R("code", null, "window.trilogy"),
|
|
4348
|
+
z(" to read data and drive dashboard interaction — see the API tab. ")
|
|
4349
4349
|
])], -1),
|
|
4350
|
-
|
|
4350
|
+
je(R("textarea", {
|
|
4351
4351
|
"onUpdate:modelValue": r[3] ||= (e) => a.value = e,
|
|
4352
4352
|
"data-testid": "freeform-html-editor",
|
|
4353
4353
|
placeholder: "Author a self-contained HTML fragment. Subscribe to trilogy state, render, then call trilogy.ready().",
|
|
4354
4354
|
class: "html-editor"
|
|
4355
|
-
}, null, 512), [[
|
|
4356
|
-
u.value ? (
|
|
4357
|
-
])) :
|
|
4358
|
-
l.value === "query" ? (
|
|
4355
|
+
}, null, 512), [[ke, a.value]]),
|
|
4356
|
+
u.value ? (W(), L("div", va, " Widget HTML is " + J(a.value.length.toLocaleString()) + " characters — the limit is " + J(Y(g).toLocaleString()) + ". Trim it before saving. ", 1)) : I("", !0)
|
|
4357
|
+
])) : I("", !0),
|
|
4358
|
+
l.value === "query" ? (W(), L("div", ya, [r[8] ||= R("div", { class: "editor-help" }, [R("p", null, " The query runs through the normal dashboard pipeline — global filters and cross-filters apply automatically. Its rows are pushed to the widget; the widget never issues queries of its own. ")], -1), B(ra, {
|
|
4359
4359
|
class: "editor-content",
|
|
4360
4360
|
initContent: o.value,
|
|
4361
4361
|
connectionName: e.connectionName,
|
|
@@ -4368,72 +4368,72 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4368
4368
|
"connectionName",
|
|
4369
4369
|
"imports",
|
|
4370
4370
|
"rootContent"
|
|
4371
|
-
])])) :
|
|
4372
|
-
l.value === "api" ? (
|
|
4373
|
-
r[14] ||=
|
|
4374
|
-
r[15] ||=
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4371
|
+
])])) : I("", !0),
|
|
4372
|
+
l.value === "api" ? (W(), L("div", ba, [
|
|
4373
|
+
r[14] ||= R("h4", null, "window.trilogy", -1),
|
|
4374
|
+
r[15] ||= R("dl", null, [
|
|
4375
|
+
R("dt", null, [R("code", null, "subscribe(fn)")]),
|
|
4376
|
+
R("dd", null, [
|
|
4377
|
+
z(" Called with the current state and on every change. Returns an unsubscribe function. State is "),
|
|
4378
|
+
R("code", null, "{ status, columns, rows, rowCount, truncated, filters, error }"),
|
|
4379
|
+
z(". ")
|
|
4380
4380
|
]),
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4381
|
+
R("dt", null, [R("code", null, "ready()")]),
|
|
4382
|
+
R("dd", null, " Call once the widget has rendered. Required — without it the cell reports a failure. "),
|
|
4383
|
+
R("dt", null, [R("code", null, "filters.eq(field, value)")]),
|
|
4384
|
+
R("dd", null, [
|
|
4385
|
+
z(" Cross-filter the dashboard on a single value, like clicking a chart mark. Pass the column name as it appears in "),
|
|
4386
|
+
R("code", null, "rows"),
|
|
4387
|
+
z("; the host resolves it to the underlying concept address. ")
|
|
4388
4388
|
]),
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4389
|
+
R("dt", null, [
|
|
4390
|
+
R("code", null, "filters.set(map)"),
|
|
4391
|
+
z(" / "),
|
|
4392
|
+
R("code", null, "filters.append(map)")
|
|
4393
4393
|
]),
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4394
|
+
R("dd", null, [
|
|
4395
|
+
z(" Map of field → "),
|
|
4396
|
+
R("code", null, "{ op: 'eq' | 'in' | 'range' | 'is_null', value }"),
|
|
4397
|
+
z(". Fields must be concepts the dashboard exposes; anything else is ignored. ")
|
|
4398
4398
|
]),
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4399
|
+
R("dt", null, [R("code", null, "filters.clear()")]),
|
|
4400
|
+
R("dd", null, "Drop this widget's cross-filter selection."),
|
|
4401
|
+
R("dt", null, [R("code", null, "refresh()")]),
|
|
4402
|
+
R("dd", null, "Re-run the backing query."),
|
|
4403
|
+
R("dt", null, [R("code", null, "resize(px)")]),
|
|
4404
|
+
R("dd", null, "Request a frame height in pixels."),
|
|
4405
|
+
R("dt", null, [R("code", null, "theme")]),
|
|
4406
|
+
R("dd", null, [R("code", null, "{ mode, vars }"), z(" — see the theme contract below.")]),
|
|
4407
|
+
R("dt", null, [R("code", null, "log(...)")]),
|
|
4408
|
+
R("dd", null, "Forwarded to the host console, prefixed with the item id.")
|
|
4409
4409
|
], -1),
|
|
4410
|
-
r[16] ||=
|
|
4411
|
-
r[17] ||=
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4410
|
+
r[16] ||= R("h4", null, "Theme contract", -1),
|
|
4411
|
+
r[17] ||= R("p", { class: "api-note" }, [
|
|
4412
|
+
z(" These custom properties are set on "),
|
|
4413
|
+
R("code", null, ":root"),
|
|
4414
|
+
z(" inside the frame and re-pushed when the user switches light/dark. Use them for every color — a widget with hardcoded colors breaks in the other mode. ")
|
|
4415
4415
|
], -1),
|
|
4416
|
-
|
|
4417
|
-
r[18] ||=
|
|
4418
|
-
|
|
4419
|
-
r[11] ||=
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4416
|
+
R("ul", xa, [(W(), L(N, null, K(d, (e) => R("li", { key: e.name }, [R("code", null, J(e.name), 1), z(" — " + J(e.description), 1)])), 64))]),
|
|
4417
|
+
r[18] ||= R("h4", null, "Sandbox limits", -1),
|
|
4418
|
+
R("ul", null, [
|
|
4419
|
+
r[11] ||= R("li", null, [
|
|
4420
|
+
z("No network: "),
|
|
4421
|
+
R("code", null, "fetch"),
|
|
4422
|
+
z(", XHR, and remote images are blocked.")
|
|
4423
4423
|
], -1),
|
|
4424
|
-
r[12] ||=
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4424
|
+
r[12] ||= R("li", null, [
|
|
4425
|
+
z("No storage: "),
|
|
4426
|
+
R("code", null, "localStorage"),
|
|
4427
|
+
z(" and cookies are unavailable.")
|
|
4428
4428
|
], -1),
|
|
4429
|
-
r[13] ||=
|
|
4430
|
-
|
|
4431
|
-
r[9] ||=
|
|
4432
|
-
(
|
|
4433
|
-
r[10] ||=
|
|
4429
|
+
r[13] ||= R("li", null, "No access to the parent page, and no popups, forms, or top-level navigation.", -1),
|
|
4430
|
+
R("li", null, [
|
|
4431
|
+
r[9] ||= z(" Libraries may be loaded from ", -1),
|
|
4432
|
+
(W(!0), L(N, null, K(Y(E), (e) => (W(), L("code", { key: e }, J(e), 1))), 128)),
|
|
4433
|
+
r[10] ||= z(". ", -1)
|
|
4434
4434
|
])
|
|
4435
4435
|
])
|
|
4436
|
-
])) :
|
|
4436
|
+
])) : I("", !0)
|
|
4437
4437
|
])]),
|
|
4438
4438
|
_: 1
|
|
4439
4439
|
}, 8, ["initialWidth", "initialHeight"]));
|
|
@@ -4441,7 +4441,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4441
4441
|
}), [["__scopeId", "data-v-5ab9a0c4"]]), Ca = { class: "dashboard-setup" }, wa = { class: "setup-section" }, Ta = {
|
|
4442
4442
|
key: 0,
|
|
4443
4443
|
class: "setup-section"
|
|
4444
|
-
}, Ea = ["onKeydown"], Da = { class: "action-row" }, Oa = ["disabled"], ka = { class: "setup-section" }, Aa = { class: "templates-grid" }, ja = ["onClick", "data-testid"], Ma = { class: "template-icon" }, Na = { class: "template-info" }, Pa = { class: "template-title" }, Fa = { class: "template-desc" }, $ = 20, Ia = /* @__PURE__ */
|
|
4444
|
+
}, Ea = ["onKeydown"], Da = { class: "action-row" }, Oa = ["disabled"], ka = { class: "setup-section" }, Aa = { class: "templates-grid" }, ja = ["onClick", "data-testid"], Ma = { class: "template-icon" }, Na = { class: "template-info" }, Pa = { class: "template-title" }, Fa = { class: "template-desc" }, $ = 20, Ia = /* @__PURE__ */ V({
|
|
4445
4445
|
__name: "DashboardCTA",
|
|
4446
4446
|
props: { dashboardId: {} },
|
|
4447
4447
|
emits: [
|
|
@@ -4450,9 +4450,9 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4450
4450
|
"start-chat-with-prompt"
|
|
4451
4451
|
],
|
|
4452
4452
|
setup(e, { emit: t }) {
|
|
4453
|
-
let
|
|
4454
|
-
if (!
|
|
4455
|
-
let o = e, s =
|
|
4453
|
+
let r = H("dashboardStore"), i = H("llmConnectionStore"), a = H("saveDashboards");
|
|
4454
|
+
if (!r || !i || !a) throw Error("DashboardStore or LLMConnectionStore not provided");
|
|
4455
|
+
let o = e, s = P(() => i.activeConnection), c = t, l = G(""), u = G(""), d = G(null), f = $ / 4, p = [
|
|
4456
4456
|
{
|
|
4457
4457
|
id: "summary",
|
|
4458
4458
|
name: "Summary Dashboard",
|
|
@@ -4465,7 +4465,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4465
4465
|
y: 0,
|
|
4466
4466
|
w: $,
|
|
4467
4467
|
h: 3,
|
|
4468
|
-
type:
|
|
4468
|
+
type: n.MARKDOWN
|
|
4469
4469
|
},
|
|
4470
4470
|
{
|
|
4471
4471
|
i: "kpi1",
|
|
@@ -4473,7 +4473,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4473
4473
|
y: 3,
|
|
4474
4474
|
w: $ / 4,
|
|
4475
4475
|
h: 4,
|
|
4476
|
-
type:
|
|
4476
|
+
type: n.CHART
|
|
4477
4477
|
},
|
|
4478
4478
|
{
|
|
4479
4479
|
i: "kpi2",
|
|
@@ -4481,7 +4481,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4481
4481
|
y: 3,
|
|
4482
4482
|
w: $ / 4,
|
|
4483
4483
|
h: 4,
|
|
4484
|
-
type:
|
|
4484
|
+
type: n.CHART
|
|
4485
4485
|
},
|
|
4486
4486
|
{
|
|
4487
4487
|
i: "kpi3",
|
|
@@ -4489,7 +4489,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4489
4489
|
y: 3,
|
|
4490
4490
|
w: $ / 4,
|
|
4491
4491
|
h: 4,
|
|
4492
|
-
type:
|
|
4492
|
+
type: n.CHART
|
|
4493
4493
|
},
|
|
4494
4494
|
{
|
|
4495
4495
|
i: "kpi4",
|
|
@@ -4497,7 +4497,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4497
4497
|
y: 3,
|
|
4498
4498
|
w: $ / 4,
|
|
4499
4499
|
h: 4,
|
|
4500
|
-
type:
|
|
4500
|
+
type: n.CHART
|
|
4501
4501
|
},
|
|
4502
4502
|
{
|
|
4503
4503
|
i: "trend",
|
|
@@ -4505,7 +4505,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4505
4505
|
y: 7,
|
|
4506
4506
|
w: $ / 2,
|
|
4507
4507
|
h: 8,
|
|
4508
|
-
type:
|
|
4508
|
+
type: n.CHART
|
|
4509
4509
|
},
|
|
4510
4510
|
{
|
|
4511
4511
|
i: "breakdown",
|
|
@@ -4513,7 +4513,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4513
4513
|
y: 7,
|
|
4514
4514
|
w: $ / 2,
|
|
4515
4515
|
h: 8,
|
|
4516
|
-
type:
|
|
4516
|
+
type: n.CHART
|
|
4517
4517
|
}
|
|
4518
4518
|
]
|
|
4519
4519
|
},
|
|
@@ -4529,7 +4529,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4529
4529
|
y: 0,
|
|
4530
4530
|
w: $,
|
|
4531
4531
|
h: 3,
|
|
4532
|
-
type:
|
|
4532
|
+
type: n.MARKDOWN
|
|
4533
4533
|
},
|
|
4534
4534
|
{
|
|
4535
4535
|
i: "overview",
|
|
@@ -4537,7 +4537,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4537
4537
|
y: 3,
|
|
4538
4538
|
w: $,
|
|
4539
4539
|
h: 5,
|
|
4540
|
-
type:
|
|
4540
|
+
type: n.CHART
|
|
4541
4541
|
},
|
|
4542
4542
|
{
|
|
4543
4543
|
i: "detail1",
|
|
@@ -4545,7 +4545,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4545
4545
|
y: 8,
|
|
4546
4546
|
w: $ / 2,
|
|
4547
4547
|
h: 8,
|
|
4548
|
-
type:
|
|
4548
|
+
type: n.CHART
|
|
4549
4549
|
},
|
|
4550
4550
|
{
|
|
4551
4551
|
i: "detail2",
|
|
@@ -4553,7 +4553,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4553
4553
|
y: 10,
|
|
4554
4554
|
w: $ / 2,
|
|
4555
4555
|
h: 8,
|
|
4556
|
-
type:
|
|
4556
|
+
type: n.CHART
|
|
4557
4557
|
},
|
|
4558
4558
|
{
|
|
4559
4559
|
i: "datatable",
|
|
@@ -4561,7 +4561,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4561
4561
|
y: 20,
|
|
4562
4562
|
w: $,
|
|
4563
4563
|
h: 8,
|
|
4564
|
-
type:
|
|
4564
|
+
type: n.TABLE
|
|
4565
4565
|
}
|
|
4566
4566
|
]
|
|
4567
4567
|
},
|
|
@@ -4577,7 +4577,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4577
4577
|
y: 0,
|
|
4578
4578
|
w: $,
|
|
4579
4579
|
h: 3,
|
|
4580
|
-
type:
|
|
4580
|
+
type: n.MARKDOWN
|
|
4581
4581
|
},
|
|
4582
4582
|
{
|
|
4583
4583
|
i: "compare1",
|
|
@@ -4585,7 +4585,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4585
4585
|
y: 3,
|
|
4586
4586
|
w: $ / 2,
|
|
4587
4587
|
h: 6,
|
|
4588
|
-
type:
|
|
4588
|
+
type: n.CHART
|
|
4589
4589
|
},
|
|
4590
4590
|
{
|
|
4591
4591
|
i: "compare2",
|
|
@@ -4593,7 +4593,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4593
4593
|
y: 3,
|
|
4594
4594
|
w: $ / 2,
|
|
4595
4595
|
h: 6,
|
|
4596
|
-
type:
|
|
4596
|
+
type: n.CHART
|
|
4597
4597
|
},
|
|
4598
4598
|
{
|
|
4599
4599
|
i: "compare3",
|
|
@@ -4601,7 +4601,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4601
4601
|
y: 9,
|
|
4602
4602
|
w: $ / 2,
|
|
4603
4603
|
h: 6,
|
|
4604
|
-
type:
|
|
4604
|
+
type: n.CHART
|
|
4605
4605
|
},
|
|
4606
4606
|
{
|
|
4607
4607
|
i: "compare4",
|
|
@@ -4609,7 +4609,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4609
4609
|
y: 9,
|
|
4610
4610
|
w: $ / 2,
|
|
4611
4611
|
h: 6,
|
|
4612
|
-
type:
|
|
4612
|
+
type: n.CHART
|
|
4613
4613
|
},
|
|
4614
4614
|
{
|
|
4615
4615
|
i: "summary",
|
|
@@ -4617,7 +4617,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4617
4617
|
y: 15,
|
|
4618
4618
|
w: $,
|
|
4619
4619
|
h: 5,
|
|
4620
|
-
type:
|
|
4620
|
+
type: n.MARKDOWN
|
|
4621
4621
|
}
|
|
4622
4622
|
]
|
|
4623
4623
|
},
|
|
@@ -4633,7 +4633,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4633
4633
|
y: 0,
|
|
4634
4634
|
w: $,
|
|
4635
4635
|
h: 3,
|
|
4636
|
-
type:
|
|
4636
|
+
type: n.MARKDOWN
|
|
4637
4637
|
},
|
|
4638
4638
|
{
|
|
4639
4639
|
i: "maintrend",
|
|
@@ -4641,7 +4641,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4641
4641
|
y: 3,
|
|
4642
4642
|
w: $,
|
|
4643
4643
|
h: 8,
|
|
4644
|
-
type:
|
|
4644
|
+
type: n.CHART
|
|
4645
4645
|
},
|
|
4646
4646
|
{
|
|
4647
4647
|
i: "breakdown1",
|
|
@@ -4649,7 +4649,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4649
4649
|
y: 11,
|
|
4650
4650
|
w: $ / 3,
|
|
4651
4651
|
h: 6,
|
|
4652
|
-
type:
|
|
4652
|
+
type: n.CHART
|
|
4653
4653
|
},
|
|
4654
4654
|
{
|
|
4655
4655
|
i: "breakdown2",
|
|
@@ -4657,7 +4657,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4657
4657
|
y: 11,
|
|
4658
4658
|
w: $ / 3,
|
|
4659
4659
|
h: 6,
|
|
4660
|
-
type:
|
|
4660
|
+
type: n.CHART
|
|
4661
4661
|
},
|
|
4662
4662
|
{
|
|
4663
4663
|
i: "breakdown3",
|
|
@@ -4665,7 +4665,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4665
4665
|
y: 11,
|
|
4666
4666
|
w: $ / 3,
|
|
4667
4667
|
h: 6,
|
|
4668
|
-
type:
|
|
4668
|
+
type: n.CHART
|
|
4669
4669
|
},
|
|
4670
4670
|
{
|
|
4671
4671
|
i: "forecast",
|
|
@@ -4673,7 +4673,7 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4673
4673
|
y: 17,
|
|
4674
4674
|
w: $,
|
|
4675
4675
|
h: 6,
|
|
4676
|
-
type:
|
|
4676
|
+
type: n.CHART
|
|
4677
4677
|
}
|
|
4678
4678
|
]
|
|
4679
4679
|
}
|
|
@@ -4682,287 +4682,287 @@ var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4682
4682
|
d.value = e;
|
|
4683
4683
|
let t = p.find((t) => t.id === e);
|
|
4684
4684
|
if (t && o.dashboardId) {
|
|
4685
|
-
for (let e of t.layout)
|
|
4685
|
+
for (let e of t.layout) r.addItemToDashboard(o.dashboardId, e.type, e.x, e.y, e.w, e.h);
|
|
4686
4686
|
c("template-selected", e);
|
|
4687
4687
|
}
|
|
4688
4688
|
}
|
|
4689
4689
|
function h() {
|
|
4690
|
-
o.dashboardId && l.value && (
|
|
4690
|
+
o.dashboardId && l.value && (r.updateDashboardDescription(o.dashboardId, l.value), c("description-updated", l.value));
|
|
4691
4691
|
}
|
|
4692
4692
|
function g() {
|
|
4693
4693
|
let e = u.value.trim();
|
|
4694
4694
|
e && (c("start-chat-with-prompt", e), u.value = "");
|
|
4695
4695
|
}
|
|
4696
|
-
return (e, t) => (
|
|
4697
|
-
t[8] ||=
|
|
4698
|
-
|
|
4699
|
-
t[3] ||=
|
|
4700
|
-
|
|
4696
|
+
return (e, t) => (W(), L("div", Ca, [
|
|
4697
|
+
t[8] ||= R("div", { class: "setup-header" }, [R("h2", { class: "setup-title" }, "An Empty Dashboard"), R("p", { class: "setup-subtitle" }, " Choose a template or start from scratch by using the 'add item' button to add charts, tables, and more. ")], -1),
|
|
4698
|
+
R("div", wa, [
|
|
4699
|
+
t[3] ||= R("h3", { class: "section-title" }, "Description", -1),
|
|
4700
|
+
je(R("textarea", {
|
|
4701
4701
|
"onUpdate:modelValue": t[0] ||= (e) => l.value = e,
|
|
4702
4702
|
placeholder: "What is this dashboard for? Add context to help viewers understand the data...",
|
|
4703
4703
|
rows: "3",
|
|
4704
4704
|
class: "description-input"
|
|
4705
|
-
}, null, 512), [[
|
|
4706
|
-
|
|
4705
|
+
}, null, 512), [[ke, l.value]]),
|
|
4706
|
+
R("button", {
|
|
4707
4707
|
onClick: h,
|
|
4708
4708
|
class: "action-button save-button",
|
|
4709
4709
|
"data-testid": "dashboard-description-save"
|
|
4710
|
-
}, [...t[2] ||= [
|
|
4710
|
+
}, [...t[2] ||= [R("i", { class: "mdi mdi-content-save" }, null, -1), z(" Save ", -1)]])
|
|
4711
4711
|
]),
|
|
4712
|
-
s.value ? (
|
|
4713
|
-
t[5] ||=
|
|
4714
|
-
t[6] ||=
|
|
4715
|
-
|
|
4712
|
+
s.value ? (W(), L("div", Ta, [
|
|
4713
|
+
t[5] ||= R("h3", { class: "section-title" }, "AI Copilot", -1),
|
|
4714
|
+
t[6] ||= R("p", { class: "section-desc" }, " Describe what you want and the assistant will build it for you in the chat panel ", -1),
|
|
4715
|
+
je(R("textarea", {
|
|
4716
4716
|
"onUpdate:modelValue": t[1] ||= (e) => u.value = e,
|
|
4717
4717
|
placeholder: "Describe the dashboard you want to create. For example: 'Create a sales performance dashboard with monthly trends, regional breakdown, and top product metrics.'",
|
|
4718
4718
|
rows: "4",
|
|
4719
4719
|
class: "description-input",
|
|
4720
4720
|
"data-testid": "dashboard-prompt-input",
|
|
4721
4721
|
onKeydown: Me(Ne(g, ["exact", "prevent"]), ["enter"])
|
|
4722
|
-
}, null, 40, Ea), [[
|
|
4723
|
-
|
|
4722
|
+
}, null, 40, Ea), [[ke, u.value]]),
|
|
4723
|
+
R("div", Da, [R("button", {
|
|
4724
4724
|
onClick: g,
|
|
4725
4725
|
class: "action-button llm-button",
|
|
4726
4726
|
disabled: !u.value.trim(),
|
|
4727
4727
|
"data-testid": "generate-with-llm-button"
|
|
4728
|
-
}, [...t[4] ||= [
|
|
4729
|
-
])) :
|
|
4730
|
-
|
|
4728
|
+
}, [...t[4] ||= [R("i", { class: "mdi mdi-creation" }, null, -1), z(" Build with AI ", -1)]], 8, Oa)])
|
|
4729
|
+
])) : I("", !0),
|
|
4730
|
+
R("div", ka, [t[7] ||= R("h3", { class: "section-title" }, "Templates", -1), R("div", Aa, [(W(), L(N, null, K(p, (e) => R("div", {
|
|
4731
4731
|
key: e.id,
|
|
4732
|
-
class:
|
|
4732
|
+
class: U(["template-card", { selected: d.value === e.id }]),
|
|
4733
4733
|
onClick: (t) => m(e.id),
|
|
4734
4734
|
"data-testid": `template-card-${e.id}`
|
|
4735
|
-
}, [
|
|
4735
|
+
}, [R("div", Ma, [R("i", { class: U(["mdi", e.icon]) }, null, 2)]), R("div", Na, [R("h4", Pa, J(e.name), 1), R("p", Fa, J(e.description), 1)])], 10, ja)), 64))])])
|
|
4736
4736
|
]));
|
|
4737
4737
|
}
|
|
4738
4738
|
});
|
|
4739
4739
|
//#endregion
|
|
4740
4740
|
//#region components/dashboard/useDashboard.ts
|
|
4741
|
-
function La(e,
|
|
4742
|
-
let o =
|
|
4743
|
-
if (!
|
|
4744
|
-
let
|
|
4745
|
-
function
|
|
4741
|
+
function La(e, r, i, a) {
|
|
4742
|
+
let o = re(), c = ee(), l = h(), u = a || H("queryExecutionService"), { setActiveDashboard: d } = k();
|
|
4743
|
+
if (!u) throw Error("QueryExecutionService not provided");
|
|
4744
|
+
let f = G(""), p = G(""), m = G(""), g = G(null), y = G(null), x = G(!1), S = G(!1), C = G(!1), T = G(!1), E = G([]), D = P(() => r.maxWidth || "100vw"), ne = P(() => e.value ? e.value.layout : []), ie = P(() => e.value ? [...e.value.layout].sort((e, t) => (e.y + e.y + e.h) / 2 - (t.y + t.y + t.h) / 2) : []), ae = P(() => e.value ? e.value.connectionId ? e.value.connectionId : l.connectionByName(e.value.connection)?.id || e.value.connection : ""), oe = P(() => r.viewMode ? !1 : e.value ? e.value.state === "editing" : !1), A = P(() => e.value ? v(e.value, c) : []);
|
|
4745
|
+
function se(e) {
|
|
4746
4746
|
if (!e?.id) return;
|
|
4747
|
-
e.state === "fullscreen" &&
|
|
4748
|
-
let t =
|
|
4749
|
-
t?.runBatch(r),
|
|
4747
|
+
e.state === "fullscreen" && i.fullScreen(!0), o.setActiveDashboard(e.id), m.value = "", f.value = "", p.value = "", E.value = [], e.filter && (f.value = e.filter, p.value = e.filter);
|
|
4748
|
+
let t = z(e.id), r = Object.keys(e.gridItems).filter((t) => e.gridItems[t].type !== n.SECTION_HEADER && !e.gridItems[t].results);
|
|
4749
|
+
t?.runBatch(r), ue();
|
|
4750
4750
|
}
|
|
4751
|
-
|
|
4752
|
-
t && t !== n && e.value &&
|
|
4753
|
-
}), Te(() => {
|
|
4754
|
-
e.value && ce(e.value);
|
|
4755
|
-
let r = new ResizeObserver(() => {
|
|
4756
|
-
n.triggerResize();
|
|
4757
|
-
}), i = t.isMobile ? ".mobile-container" : ".grid-container", a = document.querySelector(i);
|
|
4758
|
-
a && r.observe(a);
|
|
4751
|
+
X(() => e.value?.id, (t, n) => {
|
|
4752
|
+
t && t !== n && e.value && se(e.value);
|
|
4759
4753
|
}), we(() => {
|
|
4760
|
-
|
|
4754
|
+
e.value && se(e.value);
|
|
4755
|
+
let t = new ResizeObserver(() => {
|
|
4756
|
+
i.triggerResize();
|
|
4757
|
+
}), n = r.isMobile ? ".mobile-container" : ".grid-container", a = document.querySelector(n);
|
|
4758
|
+
a && t.observe(a);
|
|
4759
|
+
}), Ce(() => {
|
|
4760
|
+
g.value !== null && clearTimeout(g.value);
|
|
4761
4761
|
});
|
|
4762
|
-
async function
|
|
4762
|
+
async function ce() {
|
|
4763
4763
|
if (e.value && e.value.id) {
|
|
4764
|
-
|
|
4764
|
+
f.value = "", p.value = "", m.value = "";
|
|
4765
4765
|
let t = o.removeAllFilters(e.value.id);
|
|
4766
4766
|
await o.getQueryExecutor(e.value.id)?.runBatch(t);
|
|
4767
4767
|
}
|
|
4768
4768
|
}
|
|
4769
|
-
async function
|
|
4770
|
-
if (!t ||
|
|
4771
|
-
if (
|
|
4772
|
-
let n = o.updateDashboardFilter(e.value.id,
|
|
4769
|
+
async function le(t) {
|
|
4770
|
+
if (!t || te(t) === "") {
|
|
4771
|
+
if (m.value = "", e.value && e.value.id) {
|
|
4772
|
+
let n = o.updateDashboardFilter(e.value.id, te(t));
|
|
4773
4773
|
await o.getQueryExecutor(e.value.id)?.runBatch(n);
|
|
4774
4774
|
}
|
|
4775
4775
|
return;
|
|
4776
4776
|
}
|
|
4777
|
-
e.value && e.value.id && (
|
|
4777
|
+
e.value && e.value.id && (f.value = t, await u?.generateQuery(e.value.connectionId || e.value.connection, {
|
|
4778
4778
|
text: "select 1 as test;",
|
|
4779
4779
|
editorType: "trilogy",
|
|
4780
4780
|
extraFilters: [t],
|
|
4781
4781
|
imports: e.value.imports,
|
|
4782
|
-
extraContent:
|
|
4782
|
+
extraContent: A.value
|
|
4783
4783
|
}).then(() => {
|
|
4784
|
-
if (
|
|
4784
|
+
if (m.value = "", e.value && e.value.id) {
|
|
4785
4785
|
let n = o.updateDashboardFilter(e.value.id, t);
|
|
4786
4786
|
o.getQueryExecutor(e.value.id)?.runBatch(n);
|
|
4787
4787
|
}
|
|
4788
|
-
}).catch((e) => (
|
|
4788
|
+
}).catch((e) => (m.value = e.message, !1)));
|
|
4789
4789
|
}
|
|
4790
|
-
let
|
|
4790
|
+
let j = async (t) => {
|
|
4791
4791
|
let n = t.replace(/^\s*where\s+/i, "");
|
|
4792
4792
|
if (e.value && e.value.id) {
|
|
4793
|
-
let t = await
|
|
4793
|
+
let t = await u?.executeQuery(e.value.connectionId || e.value.connection, {
|
|
4794
4794
|
text: "select 1 as test;",
|
|
4795
4795
|
editorType: "trilogy",
|
|
4796
4796
|
imports: e.value.imports,
|
|
4797
4797
|
extraFilters: [n],
|
|
4798
|
-
extraContent:
|
|
4798
|
+
extraContent: A.value
|
|
4799
4799
|
}, () => {}, () => {}, () => {}, () => {}, !0);
|
|
4800
4800
|
if (!t) throw Error("No promises returned from query execution service");
|
|
4801
4801
|
let r = await t.resultPromise;
|
|
4802
4802
|
if (!r.success) throw Error(`Validation of "select 1 as test ${n}" resulted in ${r.error}`);
|
|
4803
4803
|
} else throw Error("Dashboard not found");
|
|
4804
4804
|
};
|
|
4805
|
-
async function
|
|
4806
|
-
if (e.value && e.value.id &&
|
|
4807
|
-
let t = await o.populateCompletion(e.value.id,
|
|
4808
|
-
t && (
|
|
4805
|
+
async function ue() {
|
|
4806
|
+
if (e.value && e.value.id && u) {
|
|
4807
|
+
let t = await o.populateCompletion(e.value.id, u, c);
|
|
4808
|
+
t && (E.value = t), m.value = "";
|
|
4809
4809
|
}
|
|
4810
4810
|
}
|
|
4811
|
-
async function
|
|
4812
|
-
e.value && e.value.id && (o.updateDashboardImports(e.value.id, t), await
|
|
4811
|
+
async function de(t) {
|
|
4812
|
+
e.value && e.value.id && (o.updateDashboardImports(e.value.id, t), await ue());
|
|
4813
4813
|
}
|
|
4814
|
-
let
|
|
4815
|
-
e.value && (o.setState(e.value.id, t),
|
|
4816
|
-
|
|
4814
|
+
let fe = (t) => {
|
|
4815
|
+
e.value && (o.setState(e.value.id, t), xe(() => {
|
|
4816
|
+
i.triggerResize();
|
|
4817
4817
|
}));
|
|
4818
|
-
},
|
|
4818
|
+
}, pe = (t) => {
|
|
4819
4819
|
e.value && e.value.id && o.updateDashboardLayout(e.value.id, t);
|
|
4820
4820
|
};
|
|
4821
|
-
function
|
|
4822
|
-
|
|
4821
|
+
function me() {
|
|
4822
|
+
T.value = !0;
|
|
4823
4823
|
}
|
|
4824
|
-
function
|
|
4824
|
+
function he(t = n.CHART) {
|
|
4825
4825
|
if (!e.value || !e.value.id) return;
|
|
4826
|
-
let r = t ===
|
|
4827
|
-
|
|
4828
|
-
|
|
4826
|
+
let r = t === n.SECTION_HEADER ? o.addItemToDashboard(e.value.id, t, 0, 0, 20, 1) : o.addItemToDashboard(e.value.id, t);
|
|
4827
|
+
T.value = !1, xe(() => {
|
|
4828
|
+
i.dimensionsUpdate(r);
|
|
4829
4829
|
});
|
|
4830
4830
|
}
|
|
4831
|
-
function
|
|
4831
|
+
function M(t) {
|
|
4832
4832
|
e.value && e.value.id && o.updateDashboardTitle(e.value.id, t);
|
|
4833
4833
|
}
|
|
4834
|
-
function
|
|
4834
|
+
function ge(t) {
|
|
4835
4835
|
e.value && e.value.id && o.setDashboardTheme(e.value.id, t);
|
|
4836
4836
|
}
|
|
4837
|
-
function
|
|
4837
|
+
function _e() {
|
|
4838
4838
|
e.value && e.value.id && o.clearDashboardItems(e.value.id);
|
|
4839
4839
|
}
|
|
4840
|
-
function
|
|
4840
|
+
function ve(t) {
|
|
4841
4841
|
e.value && e.value.id && o.removeItemFromDashboard(e.value.id, t);
|
|
4842
4842
|
}
|
|
4843
|
-
function
|
|
4843
|
+
function ye(t) {
|
|
4844
4844
|
e.value && e.value.id && o.copyItemInDashboard(e.value.id, t);
|
|
4845
4845
|
}
|
|
4846
|
-
function
|
|
4847
|
-
|
|
4846
|
+
function N() {
|
|
4847
|
+
T.value = !1;
|
|
4848
4848
|
}
|
|
4849
|
-
function
|
|
4850
|
-
if (
|
|
4851
|
-
let
|
|
4852
|
-
|
|
4849
|
+
function be(t) {
|
|
4850
|
+
if (y.value = t, !e.value || !e.value.id) return;
|
|
4851
|
+
let r = e.value.gridItems[t.i];
|
|
4852
|
+
r && (r.type === n.CHART ? x.value = !0 : r.type === n.MARKDOWN ? S.value = !0 : r.type === n.TABLE || r.type === n.FILTER ? x.value = !0 : r.type === n.FREEFORM ? C.value = !0 : r.type === n.SECTION_HEADER && (y.value = null));
|
|
4853
4853
|
}
|
|
4854
|
-
function
|
|
4855
|
-
if (!e.value || !e.value.id || !
|
|
4856
|
-
let n =
|
|
4857
|
-
|
|
4854
|
+
function F(t) {
|
|
4855
|
+
if (!e.value || !e.value.id || !y.value) return;
|
|
4856
|
+
let n = y.value.i;
|
|
4857
|
+
R(n, e.value.id, { content: t }), I();
|
|
4858
4858
|
}
|
|
4859
|
-
function
|
|
4860
|
-
x.value = !1,
|
|
4859
|
+
function I() {
|
|
4860
|
+
x.value = !1, S.value = !1, C.value = !1, y.value = null;
|
|
4861
4861
|
}
|
|
4862
|
-
function
|
|
4863
|
-
return n && e.value && e.value.id !== n || !e.value ?
|
|
4864
|
-
rootContent:
|
|
4865
|
-
onRefresh:
|
|
4862
|
+
function L(t, n) {
|
|
4863
|
+
return n && e.value && e.value.id !== n || !e.value ? b(t) : O(e.value, t, {
|
|
4864
|
+
rootContent: A.value,
|
|
4865
|
+
onRefresh: V
|
|
4866
4866
|
});
|
|
4867
4867
|
}
|
|
4868
|
-
function
|
|
4868
|
+
function R(t, n, r) {
|
|
4869
4869
|
if (e.value && e.value.id) {
|
|
4870
4870
|
if (!n || e.value.id !== n) {
|
|
4871
4871
|
console.warn("Dashboard ID mismatch. Cannot set item data. Given:", n, "Expected:", e.value.id);
|
|
4872
4872
|
return;
|
|
4873
4873
|
}
|
|
4874
|
-
|
|
4874
|
+
w(o, e.value.id, t, r), r.content && z(e.value.id)?.runSingle(t);
|
|
4875
4875
|
}
|
|
4876
4876
|
}
|
|
4877
|
-
function
|
|
4877
|
+
function z(t) {
|
|
4878
4878
|
if (!e.value || !e.value.id) throw Error("Dashboard not found or not initialized");
|
|
4879
|
-
if (!
|
|
4880
|
-
let n = o.dashboards[t], r =
|
|
4881
|
-
queryExecutionService:
|
|
4879
|
+
if (!u) throw Error("Query execution service not found");
|
|
4880
|
+
let n = o.dashboards[t], r = _(n, l), i = o.getOrCreateQueryExecutor(t, {
|
|
4881
|
+
queryExecutionService: u,
|
|
4882
4882
|
connectionName: r,
|
|
4883
4883
|
dashboardId: t,
|
|
4884
4884
|
getDashboardData: (e) => o.dashboards[e],
|
|
4885
|
-
getItemData:
|
|
4886
|
-
setItemData:
|
|
4885
|
+
getItemData: L,
|
|
4886
|
+
setItemData: R
|
|
4887
4887
|
});
|
|
4888
4888
|
return i || console.warn("No query executor found for dashboard:", e.value.id), i;
|
|
4889
4889
|
}
|
|
4890
|
-
function
|
|
4890
|
+
function B(t) {
|
|
4891
4891
|
let n = t.target.value;
|
|
4892
4892
|
e.value && e.value.id && (o.updateDashboardConnection(e.value.id, n), o.getQueryExecutor(e.value.id)?.setConnection(n));
|
|
4893
4893
|
}
|
|
4894
|
-
function
|
|
4894
|
+
function V(t) {
|
|
4895
4895
|
if (e.value) {
|
|
4896
4896
|
if (t) {
|
|
4897
|
-
let
|
|
4898
|
-
return
|
|
4897
|
+
let n = o.getQueryExecutor(e.value.id)?.runSingle(t);
|
|
4898
|
+
return i.dimensionsUpdate(t), n ?? void 0;
|
|
4899
4899
|
}
|
|
4900
4900
|
o.getQueryExecutor(e.value.id)?.runBatch(Object.keys(e.value.gridItems));
|
|
4901
4901
|
}
|
|
4902
4902
|
}
|
|
4903
|
-
function
|
|
4903
|
+
function U(n) {
|
|
4904
4904
|
if (!e.value || !e.value.id) return;
|
|
4905
|
-
let
|
|
4906
|
-
if (!
|
|
4907
|
-
console.log("No valid filters to apply from cross-filter event, given ",
|
|
4905
|
+
let r = s(E.value), i = t(n.filters, r);
|
|
4906
|
+
if (!i || Object.keys(i).length === 0) {
|
|
4907
|
+
console.log("No valid filters to apply from cross-filter event, given ", n.filters, r);
|
|
4908
4908
|
return;
|
|
4909
4909
|
}
|
|
4910
|
-
let
|
|
4911
|
-
o.getQueryExecutor(e.value.id)?.runBatch(
|
|
4910
|
+
let a = o.updateItemCrossFilters(e.value.id, n.source, i, n.chart, n.append ? "append" : "add");
|
|
4911
|
+
o.getQueryExecutor(e.value.id)?.runBatch(a);
|
|
4912
4912
|
}
|
|
4913
|
-
function
|
|
4913
|
+
function Se(t, n) {
|
|
4914
4914
|
e.value && e.value.id && (o.removeItemCrossFilter(e.value.id, t, n), o.getQueryExecutor(e.value.id)?.runSingle(t));
|
|
4915
4915
|
}
|
|
4916
|
-
function
|
|
4916
|
+
function Te(t) {
|
|
4917
4917
|
if (!e.value || !e.value.id) return;
|
|
4918
4918
|
let n = o.removeItemCrossFilterSource(e.value.id, t);
|
|
4919
4919
|
o.getQueryExecutor(e.value.id)?.runBatch(n);
|
|
4920
4920
|
}
|
|
4921
|
-
function
|
|
4922
|
-
|
|
4921
|
+
function W(e) {
|
|
4922
|
+
d(e);
|
|
4923
4923
|
}
|
|
4924
4924
|
return {
|
|
4925
4925
|
dashboard: e,
|
|
4926
4926
|
layout: ne,
|
|
4927
|
-
sortedLayout:
|
|
4928
|
-
editMode:
|
|
4929
|
-
selectedConnection:
|
|
4930
|
-
filter:
|
|
4931
|
-
filterError:
|
|
4932
|
-
globalCompletion:
|
|
4933
|
-
showAddItemModal:
|
|
4927
|
+
sortedLayout: ie,
|
|
4928
|
+
editMode: oe,
|
|
4929
|
+
selectedConnection: ae,
|
|
4930
|
+
filter: f,
|
|
4931
|
+
filterError: m,
|
|
4932
|
+
globalCompletion: E,
|
|
4933
|
+
showAddItemModal: T,
|
|
4934
4934
|
showQueryEditor: x,
|
|
4935
|
-
showMarkdownEditor:
|
|
4936
|
-
showFreeformEditor:
|
|
4937
|
-
editingItem:
|
|
4938
|
-
dashboardMaxWidth:
|
|
4939
|
-
rootContent:
|
|
4940
|
-
handleFilterChange:
|
|
4941
|
-
handleFilterClear:
|
|
4942
|
-
handleImportChange:
|
|
4943
|
-
validateFilter:
|
|
4944
|
-
onConnectionChange:
|
|
4945
|
-
toggleMode:
|
|
4946
|
-
onLayoutUpdated:
|
|
4947
|
-
openAddItemModal:
|
|
4948
|
-
addItem:
|
|
4949
|
-
clearItems:
|
|
4950
|
-
removeItem:
|
|
4951
|
-
copyItem:
|
|
4952
|
-
closeAddModal:
|
|
4953
|
-
openEditor:
|
|
4954
|
-
saveContent:
|
|
4955
|
-
closeEditors:
|
|
4956
|
-
getDashboardQueryExecutor:
|
|
4957
|
-
getItemData:
|
|
4958
|
-
setItemData:
|
|
4959
|
-
handleRefresh:
|
|
4960
|
-
setCrossFilter:
|
|
4961
|
-
removeFilter:
|
|
4962
|
-
unSelect:
|
|
4963
|
-
dashboardCreated:
|
|
4964
|
-
updateTitle:
|
|
4965
|
-
updateTheme:
|
|
4935
|
+
showMarkdownEditor: S,
|
|
4936
|
+
showFreeformEditor: C,
|
|
4937
|
+
editingItem: y,
|
|
4938
|
+
dashboardMaxWidth: D,
|
|
4939
|
+
rootContent: A,
|
|
4940
|
+
handleFilterChange: le,
|
|
4941
|
+
handleFilterClear: ce,
|
|
4942
|
+
handleImportChange: de,
|
|
4943
|
+
validateFilter: j,
|
|
4944
|
+
onConnectionChange: B,
|
|
4945
|
+
toggleMode: fe,
|
|
4946
|
+
onLayoutUpdated: pe,
|
|
4947
|
+
openAddItemModal: me,
|
|
4948
|
+
addItem: he,
|
|
4949
|
+
clearItems: _e,
|
|
4950
|
+
removeItem: ve,
|
|
4951
|
+
copyItem: ye,
|
|
4952
|
+
closeAddModal: N,
|
|
4953
|
+
openEditor: be,
|
|
4954
|
+
saveContent: F,
|
|
4955
|
+
closeEditors: I,
|
|
4956
|
+
getDashboardQueryExecutor: z,
|
|
4957
|
+
getItemData: L,
|
|
4958
|
+
setItemData: R,
|
|
4959
|
+
handleRefresh: V,
|
|
4960
|
+
setCrossFilter: U,
|
|
4961
|
+
removeFilter: Se,
|
|
4962
|
+
unSelect: Te,
|
|
4963
|
+
dashboardCreated: W,
|
|
4964
|
+
updateTitle: M,
|
|
4965
|
+
updateTheme: ge
|
|
4966
4966
|
};
|
|
4967
4967
|
}
|
|
4968
4968
|
//#endregion
|