@trilogy-data/trilogy-studio-components 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AssetAutoImporter-OHphsfW9.js +403 -0
- package/dist/{ChatCreatorModal-CL-jBnc3.js → ChatCreatorModal-CuXha6Dg.js} +3 -3
- package/dist/{ChatModelSelect-Do-VRUFc.js → ChatModelSelect-Cz7axWjP.js} +1 -1
- package/dist/{CodeBlock-PT4no49I.js → CodeBlock-BBsaC6hX.js} +4 -4
- package/dist/{CommunityModels-Cmro0hV3.js → CommunityModels-CIQQhO-y.js} +7 -7
- package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
- package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-7Jj_Ggdi.js} +49 -49
- package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-CrVHUWFl.js} +4 -4
- package/dist/{Dashboard-BH9ZwMVJ.js → Dashboard-DxSi9W6Q.js} +276 -280
- package/dist/{DashboardImportSelector-DQSvu9T-.js → DashboardImportSelector-kuDRDYi8.js} +2 -2
- package/dist/{DashboardMobile-BUPtdN2V.js → DashboardMobile-CZEgTb0R.js} +39 -39
- package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
- package/dist/{Editor-DQsYpkwl.js → Editor-D6tdutTm.js} +105 -103
- package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
- package/dist/{GlobalChatPanel-DhnOaige.js → GlobalChatPanel-BXZh0sdD.js} +20 -21
- package/dist/{IDE-HLa8vybk.js → IDE-T8PmyAQ_.js} +200 -203
- package/dist/{JobsView-B97HBoIE.js → JobsView-Ca97MiSd.js} +13 -14
- package/dist/{LLMChat-CxJcPLEG.js → LLMChat-Cch33Yd_.js} +3 -3
- package/dist/{LLMView-C1MUf0c2.js → LLMView-BDb6wD74.js} +23 -23
- package/dist/{LoadingView-s1uznGwG.js → LoadingView-B-xFwd2N.js} +2 -2
- package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-BWvdx0k3.js} +531 -430
- package/dist/{MobileIDE-BpqXoaMR.js → MobileIDE-DpdEQEqc.js} +179 -182
- package/dist/{ModelCard-BhN25jaV.js → ModelCard-DkAMP4X9.js} +12 -13
- package/dist/{ModelView-DUDA_PtZ.js → ModelView-DomyhN8g.js} +7 -7
- package/dist/PageLoading-BAvKGo9h.js +5937 -0
- package/dist/{ResultComponent-CAn_r3BL.js → ResultComponent-zoOSoRLe.js} +8 -8
- package/dist/{Results-BJtlwebY.js → Results-dq-SlJbU.js} +17 -19
- package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-AbxNvJ6p.js} +2 -2
- package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CM8WXdu1.js} +2 -2
- package/dist/{SymbolsPane-KYSwN9Sv.js → SymbolsPane-DfaxeaPS.js} +6 -3
- package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
- package/dist/{TutorialPage-NRcee6Dx.js → TutorialPage-BtEJG7cT.js} +27 -28
- package/dist/{VegaLiteChart-D1slfOUY.js → VegaLiteChart-BVyAab-o.js} +12131 -10947
- package/dist/{WelcomePage-D5mU2x1L.js → WelcomePage-BoqzYBLr.js} +5 -5
- package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
- package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
- package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
- package/dist/assets/json.worker-BezHzWUV.js +58 -0
- package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
- package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
- package/dist/components/FeedbackBanner.vue.d.ts +4 -0
- package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
- package/dist/components/editor/Editor.vue.d.ts +3 -3
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
- package/dist/components/model/ModelCard.vue.d.ts +3 -3
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
- package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
- package/dist/connections.js +3 -4
- package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
- package/dist/dashboard.js +28 -31
- package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
- package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
- package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
- package/dist/{editorRefinementRuntime-DoP9P5J2.js → editorStore-CAlMJftt.js} +1692 -575
- package/dist/embed.js +2 -2
- package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
- package/dist/{globalChatRuntime-DWZxeS57.js → globalChatRuntime-CyS7vH51.js} +16 -16
- package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
- package/dist/{helpers-BLQAgX3C.js → helpers-BbVlA3Pf.js} +34 -35
- package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
- package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
- package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
- package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
- package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
- package/dist/llm-ClU-2rgk.js +18493 -0
- package/dist/llm.js +2 -3
- package/dist/{localStorage-D9uyOFEO.js → localStorage-CGQ1iJXt.js} +40 -43
- package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
- package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
- package/dist/monaco.js +3 -3
- package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
- package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
- package/dist/{reconcile-Dyf4UZmj.js → reconcile-DXIvGwBk.js} +1 -1
- package/dist/{remoteStoreSync-Z-yjlYtI.js → remoteStoreSync-CuQBWpWf.js} +3 -3
- package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/static/test_import.vue.d.ts +4 -0
- package/dist/static/test_import.vue.d.ts.map +1 -0
- package/dist/stores-LlyiwSbK.js +2604 -0
- package/dist/stores.js +4 -7
- package/dist/trilogy-studio-components.css +1 -1
- package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
- package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
- package/dist/{useChatWithTools-B0HZ_DVh.js → useChatWithTools-m3Jn_SV-.js} +11 -11
- package/dist/{useDashboard-CdSnPe_6.js → useDashboard-BOAuvVEw.js} +1014 -1022
- package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-DuP1q7_f.js} +1729 -711
- package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
- package/dist/views/ModelView.vue.d.ts +6 -6
- package/dist/views/ModelView.vue.d.ts.map +1 -1
- package/dist/views/TutorialPage.vue.d.ts +9 -9
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/views.js +192 -194
- package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
- package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
- package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
- package/package.json +29 -20
- package/dist/AssetAutoImporter-CBzvBaOt.js +0 -405
- package/dist/DashboardCreatorInline-CDU7kLy3.js +0 -129
- package/dist/DataTable-DoRDynP1.js +0 -365
- package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
- package/dist/LoadingButton-OH3frQuO.js +0 -138
- package/dist/ModalDialog-D1EOG4rl.js +0 -42
- package/dist/ModelCreator-CCdC7EXt.js +0 -253
- package/dist/PageLoading-BzniJM0C.js +0 -2669
- package/dist/Tooltip-Dihir4zs.js +0 -103
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
- package/dist/base-C8IuZWqY.js +0 -164
- package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
- package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
- package/dist/connections-CJSb1TZl.js +0 -229
- package/dist/constants-DgFEYN2b.js +0 -7
- package/dist/dashboardStore-ppM6nGks.js +0 -641
- package/dist/demoSetup-mwa-RDC6.js +0 -2942
- package/dist/editorRefinementToolExecutor-CVY3FA7k.js +0 -4624
- package/dist/editorStore-BhhmXbi-.js +0 -1019
- package/dist/formatting-BbJ5ICgh.js +0 -6
- package/dist/llm-BBOVWb-F.js +0 -11967
- package/dist/llmStore-DJM2JhzY.js +0 -153
- package/dist/monaco.contribution-ikesdolO.js +0 -128
- package/dist/stores-BT9hTLny.js +0 -1708
- package/dist/trilogy-BroD2Qmp.js +0 -4
- package/dist/urlStore-52HG6lsX.js +0 -55
- package/dist/useGlobalChatPanel-D_0luajQ.js +0 -85
- package/dist/useIsMobile-CNpUQAvk.js +0 -8
- package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
- package/dist/workers-Br7ThUKL.js +0 -47
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import {
|
|
20
|
-
import { c as me, n as he, o as ge, r as j } from "./editor.api2-ClD5pp8H.js";
|
|
21
|
-
import "./editor.main-Cl8i7rHY.js";
|
|
22
|
-
import { t as _e } from "./tokenTheme-DBbeCrCg.js";
|
|
23
|
-
import { t as ve } from "./SymbolsPane-KYSwN9Sv.js";
|
|
24
|
-
import { n as ye, t as be } from "./useResizableDialog-B0ePSts4.js";
|
|
25
|
-
import { Fragment as M, Teleport as xe, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createTextVNode as R, createVNode as z, defineComponent as B, inject as V, nextTick as Se, normalizeClass as H, normalizeStyle as Ce, onBeforeUnmount as we, onMounted as Te, onUnmounted as Ee, openBlock as U, ref as W, renderList as G, renderSlot as De, resolveComponent as K, resolveDynamicComponent as Oe, toDisplayString as q, unref as J, vModelRadio as ke, vModelText as Ae, vShow as je, watch as Y, withCtx as X, withDirectives as Z, withKeys as Me, withModifiers as Ne } from "vue";
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
2
|
+
import { o as t } from "./config-DwTONafa.js";
|
|
3
|
+
import { c as n, u as r } from "./base-DuKnVD-A.js";
|
|
4
|
+
import { $t as i, Ft as a, Gt as o, Kt as s, Zt as c, an as l, fn as u, in as d, ln as f, rn as p, tn as m, un as h } from "./llm-ClU-2rgk.js";
|
|
5
|
+
import { a as g, f as _, g as v, p as y } from "./stores-LlyiwSbK.js";
|
|
6
|
+
import { S as b, _ as x, b as S, d as C, et as w, f as ee, g as T, h as E, it as te, l as D, m as O, p as ne, t as re, u as ie } from "./editorStore-CAlMJftt.js";
|
|
7
|
+
import { n as ae, t as oe } from "./DashboardImportSelector-kuDRDYi8.js";
|
|
8
|
+
import { f as k, p as A, r as se, u as ce } from "./useGlobalChatPanel-DuP1q7_f.js";
|
|
9
|
+
import { t as j } from "./ErrorMessage-D5JeF3Iz.js";
|
|
10
|
+
import { t as le } from "./VegaLiteChart-BVyAab-o.js";
|
|
11
|
+
import { t as ue } from "./LoadingView-B-xFwd2N.js";
|
|
12
|
+
import { t as de } from "./DrilldownPane-BheRHJMs.js";
|
|
13
|
+
import { t as fe } from "./MarkdownRenderer-BWvdx0k3.js";
|
|
14
|
+
import { a as pe, d as me, l as he, o as M } from "./workers-B9Eybl-M.js";
|
|
15
|
+
import "./editor.main-BQh6DxDB.js";
|
|
16
|
+
import { t as ge } from "./tokenTheme-DBbeCrCg.js";
|
|
17
|
+
import { t as _e } from "./SymbolsPane-DfaxeaPS.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";
|
|
26
20
|
//#region components/dashboard/DashboardSharePopup.vue?vue&type=script&setup=true&lang.ts
|
|
27
21
|
var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
28
22
|
"data-testid": "dashboard-json",
|
|
29
23
|
class: "json-code"
|
|
30
|
-
}, Le = /*#__PURE__*/
|
|
24
|
+
}, Le = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
31
25
|
__name: "DashboardSharePopup",
|
|
32
26
|
props: {
|
|
33
27
|
dashboard: {},
|
|
@@ -35,7 +29,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
35
29
|
},
|
|
36
30
|
emits: ["close"],
|
|
37
31
|
setup(e, { emit: t }) {
|
|
38
|
-
let n = e, r = t, i =
|
|
32
|
+
let n = e, r = t, i = G(""), a = G(!1), o = (e) => {
|
|
39
33
|
if (!e) return null;
|
|
40
34
|
let t = JSON.parse(JSON.stringify(e));
|
|
41
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) => {
|
|
@@ -50,7 +44,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
50
44
|
return delete t.id, t;
|
|
51
45
|
})), t;
|
|
52
46
|
};
|
|
53
|
-
|
|
47
|
+
X([() => n.dashboard, () => n.isOpen], ([e, t]) => {
|
|
54
48
|
if (t && e) {
|
|
55
49
|
let t = o(e);
|
|
56
50
|
i.value = JSON.stringify(t, null, 2), a.value = !1;
|
|
@@ -65,25 +59,25 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
65
59
|
console.error("Could not copy text: ", e);
|
|
66
60
|
});
|
|
67
61
|
};
|
|
68
|
-
return (t, n) => (
|
|
62
|
+
return (t, n) => (W(), F(A, {
|
|
69
63
|
show: e.isOpen,
|
|
70
64
|
title: "Export Definition",
|
|
71
65
|
"max-width": "860px",
|
|
72
66
|
"test-id": "dashboard-share-popup",
|
|
73
67
|
onClose: n[1] ||= (e) => r("close")
|
|
74
68
|
}, {
|
|
75
|
-
footer:
|
|
69
|
+
footer: Z(() => [R("button", {
|
|
76
70
|
class: "secondary-button",
|
|
77
71
|
onClick: n[0] ||= (e) => r("close")
|
|
78
|
-
}, "Close"),
|
|
72
|
+
}, "Close"), R("button", {
|
|
79
73
|
onClick: s,
|
|
80
74
|
class: "dashboard-copy-button",
|
|
81
75
|
"data-testid": "copy-json-button"
|
|
82
|
-
}, [
|
|
83
|
-
class:
|
|
76
|
+
}, [R("i", {
|
|
77
|
+
class: U(["mdi", a.value ? "mdi-check-circle-outline" : "mdi-content-copy"]),
|
|
84
78
|
"aria-hidden": "true"
|
|
85
|
-
}, null, 2),
|
|
86
|
-
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)])])]),
|
|
87
81
|
_: 1
|
|
88
82
|
}, 8, ["show"]));
|
|
89
83
|
}
|
|
@@ -117,235 +111,235 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
117
111
|
"data-testid",
|
|
118
112
|
"onBlur",
|
|
119
113
|
"onKeyup"
|
|
120
|
-
], ut = ["disabled", "onClick"], dt = { class: "section" }, ft = ["disabled"], pt = /*#__PURE__*/
|
|
114
|
+
], ut = ["disabled", "onClick"], dt = { class: "section" }, ft = ["disabled"], pt = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
121
115
|
__name: "DashboardThemePopup",
|
|
122
116
|
props: {
|
|
123
117
|
dashboard: {},
|
|
124
118
|
isOpen: { type: Boolean }
|
|
125
119
|
},
|
|
126
120
|
emits: ["close", "theme-change"],
|
|
127
|
-
setup(
|
|
128
|
-
let r =
|
|
129
|
-
theme:
|
|
130
|
-
mode:
|
|
121
|
+
setup(e, { emit: n }) {
|
|
122
|
+
let r = e, a = n, o = H("userSettingsStore", null), s = t(o), c = P(() => r.dashboard?.theme || {}), u = P(() => c.value.preset || "default"), g = P(() => h({
|
|
123
|
+
theme: c.value,
|
|
124
|
+
mode: s.value
|
|
131
125
|
}).vars);
|
|
132
|
-
function
|
|
133
|
-
return
|
|
126
|
+
function _(e) {
|
|
127
|
+
return h({
|
|
134
128
|
theme: { preset: e },
|
|
135
|
-
mode:
|
|
129
|
+
mode: s.value
|
|
136
130
|
}).vars;
|
|
137
131
|
}
|
|
138
|
-
let
|
|
139
|
-
function
|
|
140
|
-
|
|
132
|
+
let v = P(() => Object.keys(c.value).length > 0);
|
|
133
|
+
function y(e) {
|
|
134
|
+
a("theme-change", { preset: e });
|
|
141
135
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
136
|
+
function b(e, t) {
|
|
137
|
+
a("theme-change", { [e]: t });
|
|
144
138
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
139
|
+
function x(e) {
|
|
140
|
+
a("theme-change", { mobileCards: e });
|
|
147
141
|
}
|
|
148
|
-
function
|
|
149
|
-
|
|
142
|
+
function S() {
|
|
143
|
+
a("theme-change", null);
|
|
150
144
|
}
|
|
151
|
-
let
|
|
152
|
-
|
|
145
|
+
let C = G({}), w = G({});
|
|
146
|
+
X([() => r.isOpen, c], ([e]) => {
|
|
153
147
|
if (!e) return;
|
|
154
148
|
let t = {};
|
|
155
|
-
for (let e of
|
|
156
|
-
|
|
149
|
+
for (let e of l) t[e.key] = c.value[e.key] || "";
|
|
150
|
+
C.value = t, w.value = {};
|
|
157
151
|
}, { immediate: !0 });
|
|
158
|
-
function
|
|
159
|
-
let t =
|
|
160
|
-
return t && /^#[0-9a-f]{6}$/i.test(t) ? t :
|
|
152
|
+
function ee(e) {
|
|
153
|
+
let t = c.value[e];
|
|
154
|
+
return t && /^#[0-9a-f]{6}$/i.test(t) ? t : l.find((t) => t.key === e).placeholder[s.value];
|
|
161
155
|
}
|
|
162
156
|
function T(e) {
|
|
163
|
-
let t = (
|
|
157
|
+
let t = (C.value[e] || "").trim();
|
|
164
158
|
if (t === "") {
|
|
165
|
-
|
|
166
|
-
...
|
|
159
|
+
w.value = {
|
|
160
|
+
...w.value,
|
|
167
161
|
[e]: !1
|
|
168
|
-
},
|
|
162
|
+
}, c.value[e] && a("theme-change", { [e]: void 0 });
|
|
169
163
|
return;
|
|
170
164
|
}
|
|
171
|
-
if (!
|
|
172
|
-
|
|
173
|
-
...
|
|
165
|
+
if (!f(t)) {
|
|
166
|
+
w.value = {
|
|
167
|
+
...w.value,
|
|
174
168
|
[e]: !0
|
|
175
169
|
};
|
|
176
170
|
return;
|
|
177
171
|
}
|
|
178
|
-
|
|
179
|
-
...
|
|
172
|
+
w.value = {
|
|
173
|
+
...w.value,
|
|
180
174
|
[e]: !1
|
|
181
|
-
},
|
|
175
|
+
}, a("theme-change", { [e]: t });
|
|
182
176
|
}
|
|
183
|
-
function
|
|
177
|
+
function E(e, t) {
|
|
184
178
|
let n = t.target.value;
|
|
185
|
-
|
|
186
|
-
...S.value,
|
|
187
|
-
[e]: n
|
|
188
|
-
}, C.value = {
|
|
179
|
+
C.value = {
|
|
189
180
|
...C.value,
|
|
181
|
+
[e]: n
|
|
182
|
+
}, w.value = {
|
|
183
|
+
...w.value,
|
|
190
184
|
[e]: !1
|
|
191
|
-
},
|
|
185
|
+
}, a("theme-change", { [e]: n });
|
|
192
186
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
195
|
-
...S.value,
|
|
196
|
-
[e]: ""
|
|
197
|
-
}, C.value = {
|
|
187
|
+
function te(e) {
|
|
188
|
+
C.value = {
|
|
198
189
|
...C.value,
|
|
190
|
+
[e]: ""
|
|
191
|
+
}, w.value = {
|
|
192
|
+
...w.value,
|
|
199
193
|
[e]: !1
|
|
200
|
-
},
|
|
194
|
+
}, a("theme-change", { [e]: void 0 });
|
|
201
195
|
}
|
|
202
|
-
let
|
|
203
|
-
return (
|
|
204
|
-
show:
|
|
196
|
+
let D = l, O = d, ne = i, re = m, ie = p;
|
|
197
|
+
return (t, n) => (W(), F(A, {
|
|
198
|
+
show: e.isOpen,
|
|
205
199
|
title: "Dashboard theme",
|
|
206
200
|
"max-width": "640px",
|
|
207
201
|
"test-id": "dashboard-theme-popup",
|
|
208
|
-
onClose: n[7] ||= (e) =>
|
|
202
|
+
onClose: n[7] ||= (e) => a("close")
|
|
209
203
|
}, {
|
|
210
|
-
footer:
|
|
204
|
+
footer: Z(() => [R("button", {
|
|
211
205
|
type: "button",
|
|
212
206
|
class: "btn btn-reset",
|
|
213
|
-
disabled: !
|
|
207
|
+
disabled: !v.value,
|
|
214
208
|
"data-testid": "theme-reset-button",
|
|
215
|
-
onClick:
|
|
216
|
-
}, " Reset to default ", 8, ft),
|
|
209
|
+
onClick: S
|
|
210
|
+
}, " Reset to default ", 8, ft), R("button", {
|
|
217
211
|
type: "button",
|
|
218
212
|
class: "btn btn-done",
|
|
219
213
|
"data-testid": "theme-done-button",
|
|
220
|
-
onClick: n[6] ||= (e) =>
|
|
214
|
+
onClick: n[6] ||= (e) => a("close")
|
|
221
215
|
}, " Done ")]),
|
|
222
|
-
default:
|
|
223
|
-
n[20] ||=
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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. ")
|
|
227
221
|
], -1),
|
|
228
|
-
|
|
222
|
+
R("section", ze, [n[9] ||= R("h4", { class: "section-title" }, "Preset", -1), R("div", Be, [(W(!0), L(N, null, K(Y(O), (e) => (W(), L("button", {
|
|
229
223
|
key: e.value,
|
|
230
224
|
type: "button",
|
|
231
|
-
class:
|
|
225
|
+
class: U(["preset-card", { selected: u.value === e.value }]),
|
|
232
226
|
"data-testid": `theme-preset-${e.value}`,
|
|
233
|
-
"aria-pressed":
|
|
234
|
-
onClick: (t) =>
|
|
227
|
+
"aria-pressed": u.value === e.value,
|
|
228
|
+
onClick: (t) => y(e.value)
|
|
235
229
|
}, [
|
|
236
|
-
|
|
230
|
+
R("span", {
|
|
237
231
|
class: "preset-preview",
|
|
238
|
-
style:
|
|
232
|
+
style: Se(_(e.value)),
|
|
239
233
|
"aria-hidden": "true"
|
|
240
|
-
}, [...n[8] ||= [
|
|
241
|
-
|
|
242
|
-
|
|
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)
|
|
243
237
|
], 10, Ve))), 128))])]),
|
|
244
|
-
|
|
245
|
-
n[14] ||=
|
|
246
|
-
|
|
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", {
|
|
247
241
|
type: "button",
|
|
248
|
-
class:
|
|
249
|
-
onClick: n[0] ||= (e) =>
|
|
250
|
-
}, " Auto ", 2), (
|
|
242
|
+
class: U(["chip", { selected: !c.value.corners }]),
|
|
243
|
+
onClick: n[0] ||= (e) => b("corners", void 0)
|
|
244
|
+
}, " Auto ", 2), (W(!0), L(N, null, K(Y(ne), (e) => (W(), L("button", {
|
|
251
245
|
key: e.value,
|
|
252
246
|
type: "button",
|
|
253
|
-
class:
|
|
247
|
+
class: U(["chip", { selected: c.value.corners === e.value }]),
|
|
254
248
|
title: e.hint,
|
|
255
|
-
onClick: (t) =>
|
|
256
|
-
},
|
|
257
|
-
|
|
249
|
+
onClick: (t) => b("corners", e.value)
|
|
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", {
|
|
258
252
|
type: "button",
|
|
259
|
-
class:
|
|
260
|
-
onClick: n[1] ||= (e) =>
|
|
261
|
-
}, " Auto ", 2), (
|
|
253
|
+
class: U(["chip", { selected: !c.value.density }]),
|
|
254
|
+
onClick: n[1] ||= (e) => b("density", void 0)
|
|
255
|
+
}, " Auto ", 2), (W(!0), L(N, null, K(Y(re), (e) => (W(), L("button", {
|
|
262
256
|
key: e.value,
|
|
263
257
|
type: "button",
|
|
264
|
-
class:
|
|
258
|
+
class: U(["chip", { selected: c.value.density === e.value }]),
|
|
265
259
|
title: e.hint,
|
|
266
|
-
onClick: (t) =>
|
|
267
|
-
},
|
|
268
|
-
|
|
260
|
+
onClick: (t) => b("density", e.value)
|
|
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", {
|
|
269
263
|
type: "button",
|
|
270
|
-
class:
|
|
271
|
-
onClick: n[2] ||= (e) =>
|
|
272
|
-
}, " Auto ", 2), (
|
|
264
|
+
class: U(["chip", { selected: !c.value.elevation }]),
|
|
265
|
+
onClick: n[2] ||= (e) => b("elevation", void 0)
|
|
266
|
+
}, " Auto ", 2), (W(!0), L(N, null, K(Y(ie), (e) => (W(), L("button", {
|
|
273
267
|
key: e.value,
|
|
274
268
|
type: "button",
|
|
275
|
-
class:
|
|
269
|
+
class: U(["chip", { selected: c.value.elevation === e.value }]),
|
|
276
270
|
title: e.hint,
|
|
277
|
-
onClick: (t) =>
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
|
|
271
|
+
onClick: (t) => b("elevation", e.value)
|
|
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", {
|
|
281
275
|
type: "button",
|
|
282
|
-
class:
|
|
283
|
-
onClick: n[3] ||= (e) =>
|
|
276
|
+
class: U(["chip", { selected: c.value.mobileCards === void 0 }]),
|
|
277
|
+
onClick: n[3] ||= (e) => x(void 0)
|
|
284
278
|
}, " Auto ", 2),
|
|
285
|
-
|
|
279
|
+
R("button", {
|
|
286
280
|
type: "button",
|
|
287
|
-
class:
|
|
281
|
+
class: U(["chip", { selected: c.value.mobileCards === !1 }]),
|
|
288
282
|
title: "Panels flatten to the page background below 768px.",
|
|
289
|
-
onClick: n[4] ||= (e) =>
|
|
283
|
+
onClick: n[4] ||= (e) => x(!1)
|
|
290
284
|
}, " Flatten ", 2),
|
|
291
|
-
|
|
285
|
+
R("button", {
|
|
292
286
|
type: "button",
|
|
293
|
-
class:
|
|
287
|
+
class: U(["chip", { selected: c.value.mobileCards === !0 }]),
|
|
294
288
|
title: "Panels keep their card treatment on narrow screens.",
|
|
295
|
-
onClick: n[5] ||= (e) =>
|
|
289
|
+
onClick: n[5] ||= (e) => x(!0)
|
|
296
290
|
}, " Keep cards ", 2)
|
|
297
291
|
])])
|
|
298
292
|
]),
|
|
299
|
-
|
|
300
|
-
n[16] ||=
|
|
301
|
-
n[17] ||=
|
|
302
|
-
|
|
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(D), (e) => (W(), L("div", {
|
|
303
297
|
key: e.key,
|
|
304
298
|
class: "color-row"
|
|
305
|
-
}, [
|
|
299
|
+
}, [R("label", {
|
|
306
300
|
class: "color-label",
|
|
307
301
|
for: `theme-color-${e.key}`
|
|
308
|
-
}, [
|
|
309
|
-
|
|
302
|
+
}, [R("span", at, J(e.label), 1), R("span", ot, J(e.hint), 1)], 8, it), R("div", st, [
|
|
303
|
+
R("input", {
|
|
310
304
|
type: "color",
|
|
311
|
-
class:
|
|
312
|
-
value:
|
|
305
|
+
class: U(["color-swatch", { unset: !c.value[e.key] }]),
|
|
306
|
+
value: ee(e.key),
|
|
313
307
|
"aria-label": `${e.label} color`,
|
|
314
|
-
onInput: (t) =>
|
|
308
|
+
onInput: (t) => E(e.key, t)
|
|
315
309
|
}, null, 42, ct),
|
|
316
|
-
|
|
310
|
+
je(R("input", {
|
|
317
311
|
id: `theme-color-${e.key}`,
|
|
318
|
-
"onUpdate:modelValue": (t) =>
|
|
312
|
+
"onUpdate:modelValue": (t) => C.value[e.key] = t,
|
|
319
313
|
type: "text",
|
|
320
|
-
class:
|
|
314
|
+
class: U(["color-text", { invalid: w.value[e.key] }]),
|
|
321
315
|
"data-testid": `theme-color-${e.key}`,
|
|
322
316
|
placeholder: "Inherited",
|
|
323
317
|
spellcheck: "false",
|
|
324
318
|
onBlur: (t) => T(e.key),
|
|
325
319
|
onKeyup: Me((t) => T(e.key), ["enter"])
|
|
326
|
-
}, null, 42, lt), [[
|
|
327
|
-
|
|
320
|
+
}, null, 42, lt), [[ke, C.value[e.key]]]),
|
|
321
|
+
R("button", {
|
|
328
322
|
type: "button",
|
|
329
323
|
class: "color-clear",
|
|
330
|
-
disabled: !
|
|
324
|
+
disabled: !c.value[e.key],
|
|
331
325
|
title: "Clear — follow the app theme",
|
|
332
326
|
"aria-label": "Clear color",
|
|
333
|
-
onClick: (t) =>
|
|
334
|
-
}, [...n[15] ||= [
|
|
327
|
+
onClick: (t) => te(e.key)
|
|
328
|
+
}, [...n[15] ||= [R("i", {
|
|
335
329
|
class: "mdi mdi-close",
|
|
336
330
|
"aria-hidden": "true"
|
|
337
331
|
}, null, -1)]], 8, ut)
|
|
338
332
|
])]))), 128))])
|
|
339
333
|
]),
|
|
340
|
-
|
|
334
|
+
R("section", dt, [n[19] ||= R("h4", { class: "section-title" }, "Preview", -1), R("div", {
|
|
341
335
|
class: "live-preview",
|
|
342
|
-
style:
|
|
343
|
-
}, [...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)])
|
|
344
338
|
])]),
|
|
345
339
|
_: 1
|
|
346
340
|
}, 8, ["show"]));
|
|
347
341
|
}
|
|
348
|
-
}), [["__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__*/ e(/* @__PURE__ */ V({
|
|
349
343
|
__name: "DashboardFilterAutocomplete",
|
|
350
344
|
props: {
|
|
351
345
|
inputValue: {
|
|
@@ -363,7 +357,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
363
357
|
},
|
|
364
358
|
emits: ["select-completion"],
|
|
365
359
|
setup(e, { emit: t }) {
|
|
366
|
-
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(() => {
|
|
367
361
|
if (!n.inputElement) return {};
|
|
368
362
|
let e = n.inputElement.getBoundingClientRect();
|
|
369
363
|
return {
|
|
@@ -380,7 +374,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
380
374
|
let r = o.value;
|
|
381
375
|
for (; r < e.length && !/\s/.test(e.charAt(r));) r++;
|
|
382
376
|
c.value = t, s.value = e.substring(t, r);
|
|
383
|
-
}, f =
|
|
377
|
+
}, f = P(() => {
|
|
384
378
|
if (!s.value.trim()) return [];
|
|
385
379
|
let e = s.value.toLowerCase();
|
|
386
380
|
return n.completionItems.filter((t) => t.label.toLowerCase().includes(e)).sort((t, n) => {
|
|
@@ -388,7 +382,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
388
382
|
return r && !i ? -1 : !r && i ? 1 : t.label.localeCompare(n.label);
|
|
389
383
|
}).slice(0, 10);
|
|
390
384
|
});
|
|
391
|
-
|
|
385
|
+
X(f, (e) => {
|
|
392
386
|
i.value = e.length > 0, a.value = 0;
|
|
393
387
|
});
|
|
394
388
|
let p = (e) => {
|
|
@@ -398,27 +392,27 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
398
392
|
cursorPosition: c.value + e.label.length
|
|
399
393
|
}), i.value = !1;
|
|
400
394
|
}, m = (e) => e.trilogySubType ? e.trilogySubType.toLowerCase() : e.type.toLowerCase();
|
|
401
|
-
return
|
|
395
|
+
return X(() => n.inputValue, () => {
|
|
402
396
|
d();
|
|
403
397
|
}), ae(() => [l.value, n.inputElement], () => {
|
|
404
398
|
i.value = !1;
|
|
405
399
|
}, {
|
|
406
400
|
enabled: () => i.value,
|
|
407
401
|
eventName: "mousedown"
|
|
408
|
-
}), d(), (e, t) => i.value ? (
|
|
402
|
+
}), d(), (e, t) => i.value ? (W(), L("div", {
|
|
409
403
|
key: 0,
|
|
410
404
|
ref_key: "dropdown",
|
|
411
405
|
ref: l,
|
|
412
406
|
class: "autocomplete-dropdown",
|
|
413
|
-
style:
|
|
414
|
-
}, [(
|
|
407
|
+
style: Se(u.value)
|
|
408
|
+
}, [(W(!0), L(N, null, K(f.value, (e, t) => (W(), L("div", {
|
|
415
409
|
key: t,
|
|
416
|
-
class:
|
|
410
|
+
class: U(["completion-item", { selected: t === a.value }]),
|
|
417
411
|
onClick: (t) => p(e)
|
|
418
|
-
}, [
|
|
412
|
+
}, [R("div", { class: U(["symbol-icon", m(e)]) }, [e.trilogySubType ? (W(), L("i", {
|
|
419
413
|
key: 0,
|
|
420
|
-
class:
|
|
421
|
-
}, 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);
|
|
422
416
|
}
|
|
423
417
|
}), [["__scopeId", "data-v-89468628"]]), yt = { class: "filter-container" }, bt = { class: "filter-input-wrapper" }, xt = ["value", "disabled"], St = [
|
|
424
418
|
"value",
|
|
@@ -438,7 +432,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
438
432
|
}, jt = ["disabled"], Mt = { class: "button-content" }, Nt = ["disabled"], Pt = { class: "button-content" }, Ft = {
|
|
439
433
|
key: 0,
|
|
440
434
|
class: "loader-container"
|
|
441
|
-
}, It = ["disabled"], Lt = { class: "button-content" }, Rt = /*#__PURE__*/
|
|
435
|
+
}, It = ["disabled"], Lt = { class: "button-content" }, Rt = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
442
436
|
__name: "DashboardHeaderFilterInput",
|
|
443
437
|
props: {
|
|
444
438
|
filterValue: {
|
|
@@ -462,9 +456,9 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
462
456
|
"clear-filter"
|
|
463
457
|
],
|
|
464
458
|
setup(e, { emit: t }) {
|
|
465
|
-
let n = e, r = t, i =
|
|
459
|
+
let n = e, r = t, i = v(), 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);
|
|
466
460
|
function m() {
|
|
467
|
-
r("filter-apply", l.value), u.value = !1,
|
|
461
|
+
r("filter-apply", l.value), u.value = !1, y();
|
|
468
462
|
}
|
|
469
463
|
function h() {
|
|
470
464
|
l.value = "", u.value = !0, r("filter-change", ""), r("filter-apply", ""), r("clear-filter", ""), setTimeout(() => {
|
|
@@ -484,10 +478,10 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
484
478
|
}
|
|
485
479
|
}, 0);
|
|
486
480
|
}
|
|
487
|
-
function
|
|
481
|
+
function y() {
|
|
488
482
|
d.value = !1;
|
|
489
483
|
}
|
|
490
|
-
let
|
|
484
|
+
let b = () => {
|
|
491
485
|
a.value = !0;
|
|
492
486
|
let e = n.globalCompletion.map((e) => ({
|
|
493
487
|
name: e.label,
|
|
@@ -500,26 +494,26 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
500
494
|
a.value = !1;
|
|
501
495
|
});
|
|
502
496
|
};
|
|
503
|
-
function b(e) {
|
|
504
|
-
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());
|
|
505
|
-
}
|
|
506
497
|
function x(e) {
|
|
507
|
-
|
|
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(), b()) : e.key === "Escape" && d.value && (e.preventDefault(), y());
|
|
499
|
+
}
|
|
500
|
+
function S(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(), b()) : e.key === "Escape" && (e.preventDefault(), y());
|
|
508
502
|
}
|
|
509
|
-
let
|
|
510
|
-
function
|
|
503
|
+
let C = P(() => (n.filterError || "").length > 0 ? "error" : l.value ? "valid" : "neutral");
|
|
504
|
+
function w(e) {
|
|
511
505
|
l.value = e.text, u.value = !0, r("filter-change", l.value);
|
|
512
506
|
let t = d.value ? s.value : o.value;
|
|
513
507
|
t && (t.focus(), t.setSelectionRange(e.cursorPosition, e.cursorPosition));
|
|
514
508
|
}
|
|
515
|
-
return
|
|
509
|
+
return X(() => n.filterValue, (e) => {
|
|
516
510
|
e !== l.value && (l.value = e || "", u.value = !1);
|
|
517
|
-
}),
|
|
511
|
+
}), X(() => n.isLoading, (e) => {
|
|
518
512
|
a.value = e;
|
|
519
513
|
}), ae(() => [c.value, o.value], () => {
|
|
520
|
-
|
|
521
|
-
}, { enabled: () => d.value }), (t, n) => (
|
|
522
|
-
|
|
514
|
+
y();
|
|
515
|
+
}, { enabled: () => d.value }), (t, n) => (W(), L("div", yt, [R("div", bt, [
|
|
516
|
+
R("input", {
|
|
523
517
|
id: "filter",
|
|
524
518
|
ref_key: "filterInputRef",
|
|
525
519
|
ref: o,
|
|
@@ -527,128 +521,128 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
527
521
|
type: "text",
|
|
528
522
|
value: f.value,
|
|
529
523
|
onInput: g,
|
|
530
|
-
onKeydown:
|
|
524
|
+
onKeydown: x,
|
|
531
525
|
onFocus: _,
|
|
532
526
|
placeholder: "Add a global filter...",
|
|
533
|
-
class:
|
|
527
|
+
class: U({ "filter-error": C.value === "error" }),
|
|
534
528
|
disabled: a.value
|
|
535
529
|
}, null, 42, xt),
|
|
536
|
-
d.value ? (
|
|
530
|
+
d.value ? (W(), L("div", {
|
|
537
531
|
key: 0,
|
|
538
532
|
ref_key: "filterDropdownRef",
|
|
539
533
|
ref: c,
|
|
540
534
|
class: "filter-dropdown"
|
|
541
535
|
}, [
|
|
542
|
-
|
|
543
|
-
onClick:
|
|
536
|
+
R("div", { class: "dropdown-header" }, [n[1] ||= R("span", null, "Global Filters", -1), R("button", {
|
|
537
|
+
onClick: y,
|
|
544
538
|
class: "close-button",
|
|
545
539
|
title: "Close (Esc)"
|
|
546
|
-
}, [...n[0] ||= [
|
|
547
|
-
|
|
540
|
+
}, [...n[0] ||= [R("i", { class: "mdi mdi-close" }, null, -1)]])]),
|
|
541
|
+
R("textarea", {
|
|
548
542
|
ref_key: "filterTextareaRef",
|
|
549
543
|
ref: s,
|
|
550
|
-
class:
|
|
544
|
+
class: U(["filter-textarea", { "filter-error": C.value === "error" }]),
|
|
551
545
|
value: l.value,
|
|
552
546
|
onInput: g,
|
|
553
|
-
onKeydown:
|
|
554
|
-
placeholder:
|
|
547
|
+
onKeydown: S,
|
|
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",
|
|
555
549
|
disabled: a.value,
|
|
556
550
|
rows: "4"
|
|
557
551
|
}, null, 42, St),
|
|
558
|
-
e.filterError ? (
|
|
559
|
-
|
|
560
|
-
|
|
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", {
|
|
561
555
|
onClick: m,
|
|
562
|
-
class:
|
|
556
|
+
class: U(["apply-button", { "has-changes": u.value }]),
|
|
563
557
|
disabled: a.value,
|
|
564
558
|
title: "Apply filter (Ctrl+Enter)"
|
|
565
|
-
}, [...n[3] ||= [
|
|
566
|
-
|
|
559
|
+
}, [...n[3] ||= [R("i", { class: "mdi mdi-check" }, null, -1), z(" Apply ", -1)]], 10, Tt),
|
|
560
|
+
Y(i).hasActiveDefaultConnection ? (W(), L("button", {
|
|
567
561
|
key: 0,
|
|
568
|
-
onClick:
|
|
562
|
+
onClick: b,
|
|
569
563
|
class: "llm-button",
|
|
570
564
|
disabled: a.value,
|
|
571
565
|
title: "Text to filter (Ctrl+Shift+Enter)"
|
|
572
566
|
}, [
|
|
573
|
-
|
|
574
|
-
a.value ? (
|
|
575
|
-
n[5] ||=
|
|
576
|
-
], 8, Et)) :
|
|
577
|
-
|
|
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", {
|
|
578
572
|
onClick: h,
|
|
579
573
|
class: "clear-button",
|
|
580
574
|
disabled: a.value,
|
|
581
575
|
title: "Clear filter"
|
|
582
|
-
}, [...n[6] ||= [
|
|
576
|
+
}, [...n[6] ||= [R("i", { class: "mdi mdi-close-circle-outline" }, null, -1), z(" Clear ", -1)]], 8, Ot)
|
|
583
577
|
])
|
|
584
|
-
], 512)) :
|
|
585
|
-
(d.value ? s.value : o.value) ? (
|
|
578
|
+
], 512)) : I("", !0),
|
|
579
|
+
(d.value ? s.value : o.value) ? (W(), F(vt, {
|
|
586
580
|
key: 1,
|
|
587
581
|
"input-value": l.value,
|
|
588
582
|
"completion-items": e.globalCompletion,
|
|
589
583
|
"input-element": d.value ? s.value : o.value,
|
|
590
|
-
onSelectCompletion:
|
|
584
|
+
onSelectCompletion: w
|
|
591
585
|
}, null, 8, [
|
|
592
586
|
"input-value",
|
|
593
587
|
"completion-items",
|
|
594
588
|
"input-element"
|
|
595
|
-
])) :
|
|
596
|
-
|
|
597
|
-
|
|
589
|
+
])) : I("", !0),
|
|
590
|
+
R("div", kt, [
|
|
591
|
+
C.value === "error" ? (W(), L("div", At, [n[8] ||= R("i", { class: "mdi mdi-alert-circle-outline" }, null, -1), B(k, {
|
|
598
592
|
content: e.filterError || "Unknown Error",
|
|
599
593
|
position: "bottom"
|
|
600
594
|
}, {
|
|
601
|
-
default:
|
|
595
|
+
default: Z(() => [...n[7] ||= [R("span", {
|
|
602
596
|
class: "tooltip-trigger",
|
|
603
597
|
"data-testid": "filter-error-tooltip-trigger"
|
|
604
598
|
}, null, -1)]]),
|
|
605
599
|
_: 1
|
|
606
|
-
}, 8, ["content"])])) :
|
|
607
|
-
|
|
600
|
+
}, 8, ["content"])])) : I("", !0),
|
|
601
|
+
R("button", {
|
|
608
602
|
onClick: m,
|
|
609
|
-
class:
|
|
603
|
+
class: U(["input-icon-button", { "has-changes": u.value }]),
|
|
610
604
|
"data-testid": "filter-search-button",
|
|
611
605
|
disabled: a.value,
|
|
612
606
|
title: "Apply filter (Enter)"
|
|
613
|
-
}, [
|
|
607
|
+
}, [R("div", Mt, [n[10] ||= R("i", { class: "mdi mdi-magnify" }, null, -1), B(k, {
|
|
614
608
|
content: u.value ? "Apply changes (Enter)" : "Search (Enter)",
|
|
615
609
|
position: "top"
|
|
616
610
|
}, {
|
|
617
|
-
default:
|
|
611
|
+
default: Z(() => [...n[9] ||= [R("span", { class: "tooltip-trigger" }, null, -1)]]),
|
|
618
612
|
_: 1
|
|
619
613
|
}, 8, ["content"])])], 10, jt),
|
|
620
|
-
|
|
614
|
+
Y(i).hasActiveDefaultConnection ? (W(), L("button", {
|
|
621
615
|
key: 1,
|
|
622
|
-
onClick:
|
|
616
|
+
onClick: b,
|
|
623
617
|
class: "input-icon-button",
|
|
624
618
|
"data-testid": "filter-llm-button",
|
|
625
619
|
disabled: a.value,
|
|
626
620
|
title: "Transform text to filter if you have a configured LLM connection"
|
|
627
|
-
}, [
|
|
628
|
-
|
|
629
|
-
a.value ? (
|
|
630
|
-
|
|
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(k, {
|
|
631
625
|
content: a.value ? "Processing..." : "Text to filter (Ctrl+Shift+Enter)",
|
|
632
626
|
position: "top"
|
|
633
627
|
}, {
|
|
634
|
-
default:
|
|
628
|
+
default: Z(() => [...n[12] ||= [R("span", { class: "tooltip-trigger" }, null, -1)]]),
|
|
635
629
|
_: 1
|
|
636
630
|
}, 8, ["content"])
|
|
637
|
-
])], 8, Nt)) :
|
|
638
|
-
p.value ? (
|
|
631
|
+
])], 8, Nt)) : I("", !0),
|
|
632
|
+
p.value ? (W(), L("button", {
|
|
639
633
|
key: 2,
|
|
640
634
|
onClick: h,
|
|
641
635
|
class: "input-icon-button clear-icon-button",
|
|
642
636
|
"data-testid": "clear-filters-button",
|
|
643
637
|
disabled: a.value,
|
|
644
638
|
title: "Clear all filters"
|
|
645
|
-
}, [
|
|
639
|
+
}, [R("div", Lt, [n[14] ||= R("i", { class: "mdi mdi-close" }, null, -1), B(k, {
|
|
646
640
|
content: "Clear all filters",
|
|
647
641
|
position: "top"
|
|
648
642
|
}, {
|
|
649
|
-
default:
|
|
643
|
+
default: Z(() => [...n[13] ||= [R("span", { class: "tooltip-trigger" }, null, -1)]]),
|
|
650
644
|
_: 1
|
|
651
|
-
})])], 8, It)) :
|
|
645
|
+
})])], 8, It)) : I("", !0)
|
|
652
646
|
])
|
|
653
647
|
])]));
|
|
654
648
|
}
|
|
@@ -671,7 +665,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
671
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 = {
|
|
672
666
|
class: "mode-selector",
|
|
673
667
|
"data-testid": "mode-selector-wrapper"
|
|
674
|
-
}, tn = { class: "select-wrapper" }, nn = ["value", "disabled"], rn = /*#__PURE__*/
|
|
668
|
+
}, tn = { class: "select-wrapper" }, nn = ["value", "disabled"], rn = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
675
669
|
__name: "DashboardHeader",
|
|
676
670
|
props: {
|
|
677
671
|
dashboard: {
|
|
@@ -722,7 +716,7 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
722
716
|
"theme-change"
|
|
723
717
|
],
|
|
724
718
|
setup(e, { emit: t }) {
|
|
725
|
-
let n = e, r = t, i =
|
|
719
|
+
let n = e, r = t, i = b(), a = re(), o = g(), s = G(!1), c = G(!1), l = G(!1), u = G(!1), d = G(""), f = G(null);
|
|
726
720
|
function p() {
|
|
727
721
|
c.value = !c.value;
|
|
728
722
|
}
|
|
@@ -732,17 +726,17 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
732
726
|
function h() {
|
|
733
727
|
l.value = !l.value;
|
|
734
728
|
}
|
|
735
|
-
function
|
|
729
|
+
function _(e) {
|
|
736
730
|
r("filter-change", e);
|
|
737
731
|
}
|
|
738
|
-
async function
|
|
732
|
+
async function v() {
|
|
739
733
|
if (n.exportImageAction) {
|
|
740
734
|
await n.exportImageAction();
|
|
741
735
|
return;
|
|
742
736
|
}
|
|
743
737
|
r("export-image");
|
|
744
738
|
}
|
|
745
|
-
function
|
|
739
|
+
function y(e) {
|
|
746
740
|
let t = e.target;
|
|
747
741
|
r("mode-change", t.value);
|
|
748
742
|
}
|
|
@@ -757,24 +751,24 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
757
751
|
function C() {
|
|
758
752
|
u.value = !1, d.value = n.dashboard?.name || "Untitled Dashboard";
|
|
759
753
|
}
|
|
760
|
-
let w =
|
|
754
|
+
let w = P(() => n.selectedConnection ? i.connections[n.selectedConnection] || i.connectionByName(n.selectedConnection) : void 0), ee = P(() => {
|
|
761
755
|
let e = Object.values(i.connections).filter((e) => e.model && !e.deleted), t = w.value;
|
|
762
756
|
return t && !e.some((e) => e.id === t.id) && e.push(t), e.sort((e, t) => e.name.localeCompare(t.name));
|
|
763
|
-
}),
|
|
757
|
+
}), T = P(() => w.value?.id || n.selectedConnection), E = P(() => !!n.selectedConnection && !w.value), D = P(() => w.value?.name || n.selectedConnection), O = P(() => {
|
|
764
758
|
let e = w.value;
|
|
765
|
-
return e ? Object.values(a.editors).filter((t) =>
|
|
759
|
+
return e ? Object.values(a.editors).filter((t) => te(t.type) && t.connectionId === e.id).sort((e, t) => e.name.localeCompare(t.name)).map((e) => ({
|
|
766
760
|
id: e.id,
|
|
767
761
|
name: e.name.replace(/\//g, "."),
|
|
768
762
|
alias: ""
|
|
769
763
|
})) : [];
|
|
770
|
-
}),
|
|
764
|
+
}), ne = P(() => n.dashboard?.imports || []);
|
|
771
765
|
function ie(e) {
|
|
772
766
|
r("import-change", e);
|
|
773
767
|
}
|
|
774
768
|
function ae() {
|
|
775
769
|
r("refresh");
|
|
776
770
|
}
|
|
777
|
-
let k =
|
|
771
|
+
let k = P(() => {
|
|
778
772
|
switch (n.dashboard?.state) {
|
|
779
773
|
case "editing": return "mdi mdi-pencil-outline";
|
|
780
774
|
case "published": return "mdi mdi-eye-outline";
|
|
@@ -782,11 +776,11 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
782
776
|
default: return "mdi mdi-eye-outline";
|
|
783
777
|
}
|
|
784
778
|
});
|
|
785
|
-
return (t, n) => (
|
|
786
|
-
|
|
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", {
|
|
787
781
|
class: "dashboard-title",
|
|
788
782
|
onClick: x
|
|
789
|
-
}, [u.value ?
|
|
783
|
+
}, [u.value ? je((W(), L("input", {
|
|
790
784
|
key: 1,
|
|
791
785
|
ref_key: "titleInput",
|
|
792
786
|
ref: f,
|
|
@@ -796,52 +790,52 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
796
790
|
onKeyup: [Me(S, ["enter"]), Me(C, ["esc"])],
|
|
797
791
|
class: "title-input",
|
|
798
792
|
type: "text"
|
|
799
|
-
}, null, 544)), [[
|
|
800
|
-
|
|
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", {
|
|
801
795
|
id: "connection",
|
|
802
796
|
"data-testid": "connection-selector",
|
|
803
797
|
onChange: n[1] ||= (e) => t.$emit("connection-change", e),
|
|
804
|
-
value:
|
|
805
|
-
title:
|
|
806
|
-
}, [E.value ? (
|
|
798
|
+
value: T.value,
|
|
799
|
+
title: D.value
|
|
800
|
+
}, [E.value ? (W(), L("option", {
|
|
807
801
|
key: 0,
|
|
808
802
|
value: e.selectedConnection,
|
|
809
803
|
disabled: ""
|
|
810
|
-
},
|
|
804
|
+
}, J(D.value) + " (unavailable) ", 9, qt)) : I("", !0), (W(!0), L(N, null, K(ee.value, (e) => (W(), L("option", {
|
|
811
805
|
key: e.id,
|
|
812
806
|
value: e.id
|
|
813
|
-
},
|
|
814
|
-
|
|
815
|
-
"available-imports":
|
|
816
|
-
"active-imports":
|
|
807
|
+
}, J(e.name), 9, Jt))), 128))], 40, Kt)])]),
|
|
808
|
+
B(oe, {
|
|
809
|
+
"available-imports": O.value,
|
|
810
|
+
"active-imports": ne.value,
|
|
817
811
|
"onUpdate:imports": ie,
|
|
818
|
-
onExplore: n[2] ||= (e) =>
|
|
812
|
+
onExplore: n[2] ||= (e) => Y(o).openTab("editors", null, e.id)
|
|
819
813
|
}, null, 8, ["available-imports", "active-imports"]),
|
|
820
|
-
|
|
814
|
+
R("div", Yt, [R("button", {
|
|
821
815
|
onClick: n[3] ||= (e) => t.$emit("add-item"),
|
|
822
816
|
class: "btn btn-success",
|
|
823
817
|
"data-testid": "add-item-button",
|
|
824
818
|
title: "Add Item"
|
|
825
|
-
}, [...n[13] ||= [
|
|
819
|
+
}, [...n[13] ||= [R("i", {
|
|
826
820
|
class: "mdi mdi-plus top-action-icon",
|
|
827
821
|
"aria-hidden": "true"
|
|
828
|
-
}, null, -1),
|
|
822
|
+
}, null, -1), R("span", { class: "top-action-label" }, "Add", -1)]]), R("button", {
|
|
829
823
|
onClick: n[4] ||= (e) => t.$emit("clear-items"),
|
|
830
824
|
class: "btn btn-danger",
|
|
831
825
|
"data-testid": "clear-items-button",
|
|
832
826
|
title: "Clear All"
|
|
833
|
-
}, [...n[14] ||= [
|
|
827
|
+
}, [...n[14] ||= [R("i", {
|
|
834
828
|
class: "mdi mdi-delete-outline top-action-icon",
|
|
835
829
|
"aria-hidden": "true"
|
|
836
|
-
}, null, -1),
|
|
837
|
-
])) :
|
|
838
|
-
|
|
830
|
+
}, null, -1), R("span", { class: "top-action-label" }, "Clear", -1)]])])
|
|
831
|
+
])) : I("", !0)], 2),
|
|
832
|
+
R("div", Xt, [B(Rt, {
|
|
839
833
|
"filter-value": e.dashboard?.filter || "",
|
|
840
834
|
"filter-error": e.filterError,
|
|
841
835
|
"is-loading": s.value,
|
|
842
836
|
"global-completion": e.globalCompletion,
|
|
843
837
|
"validate-filter": e.validateFilter,
|
|
844
|
-
onFilterApply:
|
|
838
|
+
onFilterApply: _,
|
|
845
839
|
onClearFilter: n[5] ||= (e) => t.$emit("clear-filter", "")
|
|
846
840
|
}, null, 8, [
|
|
847
841
|
"filter-value",
|
|
@@ -849,9 +843,9 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
849
843
|
"is-loading",
|
|
850
844
|
"global-completion",
|
|
851
845
|
"validate-filter"
|
|
852
|
-
]),
|
|
853
|
-
|
|
854
|
-
action:
|
|
846
|
+
]), R("div", Zt, [
|
|
847
|
+
B(ce, {
|
|
848
|
+
action: v,
|
|
855
849
|
"use-default-style": !1,
|
|
856
850
|
class: "btn btn-secondary filter-action-btn dashboard-download-action",
|
|
857
851
|
"data-testid": "download-button",
|
|
@@ -859,100 +853,100 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
859
853
|
title: "Download dashboard image",
|
|
860
854
|
"aria-label": "Download dashboard image"
|
|
861
855
|
}, {
|
|
862
|
-
default:
|
|
856
|
+
default: Z(() => [...n[15] ||= [R("i", {
|
|
863
857
|
class: "mdi mdi-download-outline filter-action-icon",
|
|
864
858
|
"aria-hidden": "true"
|
|
865
|
-
}, null, -1),
|
|
859
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Download", -1)]]),
|
|
866
860
|
_: 1
|
|
867
861
|
}),
|
|
868
|
-
e.editsLocked ?
|
|
862
|
+
e.editsLocked ? I("", !0) : (W(), L("button", {
|
|
869
863
|
key: 0,
|
|
870
864
|
onClick: h,
|
|
871
|
-
class:
|
|
865
|
+
class: U(["btn filter-action-btn dashboard-theme-action", l.value ? "btn-primary" : "btn-secondary"]),
|
|
872
866
|
"data-testid": "dashboard-theme-button",
|
|
873
867
|
title: "Dashboard theme",
|
|
874
868
|
"aria-label": "Dashboard theme"
|
|
875
|
-
}, [...n[16] ||= [
|
|
869
|
+
}, [...n[16] ||= [R("i", {
|
|
876
870
|
class: "mdi mdi-palette-outline filter-action-icon",
|
|
877
871
|
"aria-hidden": "true"
|
|
878
|
-
}, null, -1),
|
|
879
|
-
|
|
872
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Theme", -1)]], 2)),
|
|
873
|
+
R("button", {
|
|
880
874
|
onClick: p,
|
|
881
875
|
class: "btn btn-secondary filter-action-btn dashboard-export-action",
|
|
882
876
|
"data-testid": "share-dashboard-button",
|
|
883
877
|
title: "Export dashboard",
|
|
884
878
|
"aria-label": "Export dashboard"
|
|
885
|
-
}, [...n[17] ||= [
|
|
879
|
+
}, [...n[17] ||= [R("i", {
|
|
886
880
|
class: "mdi mdi-export-variant filter-action-icon",
|
|
887
881
|
"aria-hidden": "true"
|
|
888
|
-
}, null, -1),
|
|
889
|
-
|
|
882
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Export", -1)]]),
|
|
883
|
+
R("button", {
|
|
890
884
|
onClick: n[6] ||= (e) => t.$emit("navigate-up"),
|
|
891
885
|
class: "btn btn-secondary filter-action-btn mobile-dashboard-nav-action",
|
|
892
886
|
title: "Previous dashboard item",
|
|
893
887
|
"aria-label": "Previous dashboard item"
|
|
894
|
-
}, [...n[18] ||= [
|
|
888
|
+
}, [...n[18] ||= [R("i", {
|
|
895
889
|
class: "mdi mdi-chevron-up filter-action-icon",
|
|
896
890
|
"aria-hidden": "true"
|
|
897
891
|
}, null, -1)]]),
|
|
898
|
-
|
|
892
|
+
R("button", {
|
|
899
893
|
onClick: n[7] ||= (e) => t.$emit("navigate-down"),
|
|
900
894
|
class: "btn btn-secondary filter-action-btn mobile-dashboard-nav-action",
|
|
901
895
|
title: "Next dashboard item",
|
|
902
896
|
"aria-label": "Next dashboard item"
|
|
903
|
-
}, [...n[19] ||= [
|
|
897
|
+
}, [...n[19] ||= [R("i", {
|
|
904
898
|
class: "mdi mdi-chevron-down filter-action-icon",
|
|
905
899
|
"aria-hidden": "true"
|
|
906
900
|
}, null, -1)]]),
|
|
907
|
-
|
|
901
|
+
R("button", {
|
|
908
902
|
onClick: n[8] ||= (e) => t.$emit("toggle-chat"),
|
|
909
|
-
class:
|
|
903
|
+
class: U(["btn filter-action-btn", e.chatOpen ? "btn-primary" : "btn-secondary"]),
|
|
910
904
|
disabled: !e.hasLlmConnection,
|
|
911
905
|
"data-testid": "toggle-chat-button",
|
|
912
906
|
title: e.hasLlmConnection ? "Toggle AI assistant" : "No LLM connection configured",
|
|
913
907
|
"aria-label": "Toggle AI assistant"
|
|
914
|
-
}, [n[20] ||=
|
|
908
|
+
}, [n[20] ||= R("i", {
|
|
915
909
|
class: "mdi mdi-creation-outline filter-action-icon",
|
|
916
910
|
"aria-hidden": "true"
|
|
917
|
-
}, null, -1),
|
|
918
|
-
|
|
911
|
+
}, null, -1), R("span", $t, J(e.chatOpen ? "Close AI" : "AI"), 1)], 10, Qt),
|
|
912
|
+
R("button", {
|
|
919
913
|
onClick: ae,
|
|
920
914
|
class: "btn btn-primary filter-action-btn",
|
|
921
915
|
"data-testid": "refresh-button",
|
|
922
916
|
title: "Refresh dashboard",
|
|
923
917
|
"aria-label": "Refresh dashboard"
|
|
924
|
-
}, [...n[21] ||= [
|
|
918
|
+
}, [...n[21] ||= [R("i", {
|
|
925
919
|
class: "mdi mdi-refresh filter-action-icon",
|
|
926
920
|
"aria-hidden": "true"
|
|
927
|
-
}, null, -1),
|
|
928
|
-
|
|
921
|
+
}, null, -1), R("span", { class: "filter-action-label" }, "Refresh", -1)]]),
|
|
922
|
+
R("div", en, [R("div", tn, [R("i", { class: U(k.value + " select-icon") }, null, 2), R("select", {
|
|
929
923
|
id: "viewMode",
|
|
930
924
|
"data-testid": "mode-selector",
|
|
931
|
-
onChange:
|
|
925
|
+
onChange: y,
|
|
932
926
|
value: e.dashboard.state,
|
|
933
927
|
disabled: e.editsLocked,
|
|
934
928
|
class: "mode-select"
|
|
935
929
|
}, [...n[22] ||= [
|
|
936
|
-
|
|
930
|
+
R("option", {
|
|
937
931
|
value: "editing",
|
|
938
932
|
"data-testid": "edit-mode-option"
|
|
939
933
|
}, "Edit", -1),
|
|
940
|
-
|
|
934
|
+
R("option", {
|
|
941
935
|
value: "published",
|
|
942
936
|
"data-testid": "view-mode-option"
|
|
943
937
|
}, "View", -1),
|
|
944
|
-
|
|
938
|
+
R("option", {
|
|
945
939
|
value: "fullscreen",
|
|
946
940
|
"data-testid": "fullscreen-mode-option"
|
|
947
941
|
}, "Fullscreen", -1)
|
|
948
942
|
]], 40, nn)])])
|
|
949
943
|
])]),
|
|
950
|
-
|
|
944
|
+
B(Le, {
|
|
951
945
|
dashboard: e.dashboard,
|
|
952
946
|
"is-open": c.value,
|
|
953
947
|
onClose: m
|
|
954
948
|
}, null, 8, ["dashboard", "is-open"]),
|
|
955
|
-
|
|
949
|
+
B(pt, {
|
|
956
950
|
dashboard: e.dashboard,
|
|
957
951
|
"is-open": l.value,
|
|
958
952
|
onClose: n[9] ||= (e) => l.value = !1,
|
|
@@ -964,14 +958,14 @@ var Pe = { class: "share-popup-body" }, Fe = { class: "json-container" }, Ie = {
|
|
|
964
958
|
//#endregion
|
|
965
959
|
//#region components/dashboard/useDashboardItemShell.ts
|
|
966
960
|
function an(e) {
|
|
967
|
-
let t =
|
|
961
|
+
let t = G(null), n = G(!1), r = G(null), i = G(!1), a = G(null), o = G(!1), s = () => {
|
|
968
962
|
a.value &&= (clearTimeout(a.value), null);
|
|
969
963
|
}, c = () => {
|
|
970
964
|
if (!t.value) return 0;
|
|
971
965
|
let e = t.value.getBoundingClientRect(), n = window.scrollY || document.documentElement.scrollTop, r = e.top + n, i = Math.floor(r / 200) * 10;
|
|
972
966
|
return Math.min(i, 100);
|
|
973
967
|
};
|
|
974
|
-
|
|
968
|
+
we(() => {
|
|
975
969
|
setTimeout(() => {
|
|
976
970
|
let t = c();
|
|
977
971
|
if (!e.results.value) {
|
|
@@ -982,9 +976,9 @@ function an(e) {
|
|
|
982
976
|
n.value = !0;
|
|
983
977
|
}, t);
|
|
984
978
|
}, 0);
|
|
985
|
-
}),
|
|
979
|
+
}), Te(() => {
|
|
986
980
|
s();
|
|
987
|
-
}),
|
|
981
|
+
}), X(e.loading, (t) => {
|
|
988
982
|
if (s(), t) {
|
|
989
983
|
a.value = setTimeout(() => {
|
|
990
984
|
i.value = !0, a.value = null;
|
|
@@ -1028,11 +1022,11 @@ function an(e) {
|
|
|
1028
1022
|
}
|
|
1029
1023
|
//#endregion
|
|
1030
1024
|
//#region components/dashboard/DashboardChart.vue?vue&type=script&lang.ts
|
|
1031
|
-
var on =
|
|
1025
|
+
var on = V({
|
|
1032
1026
|
name: "DashboardChart",
|
|
1033
1027
|
components: {
|
|
1034
1028
|
VegaLiteChart: le,
|
|
1035
|
-
ErrorMessage:
|
|
1029
|
+
ErrorMessage: j,
|
|
1036
1030
|
LoadingView: ue,
|
|
1037
1031
|
DrilldownPane: de
|
|
1038
1032
|
},
|
|
@@ -1075,12 +1069,12 @@ var on = B({
|
|
|
1075
1069
|
}
|
|
1076
1070
|
},
|
|
1077
1071
|
setup(e, { emit: t }) {
|
|
1078
|
-
let n =
|
|
1072
|
+
let n = G(null), r = P(() => e.getItemData(e.itemId, e.dashboardId)), i = P(() => r.value.structured_content.query), a = P(() => r.value.results || null), o = P(() => r.value.name || ""), s = P(() => (r.value.height || 300) - 75), l = P(() => r.value.width || 300), u = P(() => {
|
|
1079
1073
|
if (r.value.chartConfig) return {
|
|
1080
1074
|
...r.value.chartConfig,
|
|
1081
1075
|
showTitle: !1
|
|
1082
1076
|
};
|
|
1083
|
-
}), d =
|
|
1077
|
+
}), d = P(() => r.value.loading || !1), f = P(() => r.value.error || null), p = P(() => r.value.filters || []), m = P(() => r.value.loadStartTime || null), h = P(() => (r.value.chartFilters || []).map((e) => e.value)), g = P(() => r.value.hasDrilldown), _ = P(() => r.value.onRefresh || null), v = H("analyticsStore", null), y = (t) => {
|
|
1084
1078
|
let n = {
|
|
1085
1079
|
...t,
|
|
1086
1080
|
showTitle: !1
|
|
@@ -1090,7 +1084,7 @@ var on = B({
|
|
|
1090
1084
|
return;
|
|
1091
1085
|
}
|
|
1092
1086
|
e.setItemData(e.itemId, e.dashboardId, { chartConfig: n });
|
|
1093
|
-
}, { chartContainer: b, ready: x, showLoading: S, controlsVisible: C, executeQuery: w, handleLocalRefresh:
|
|
1087
|
+
}, { chartContainer: b, ready: x, showLoading: S, controlsVisible: C, executeQuery: w, handleLocalRefresh: ee, onChartMouseEnter: T, onChartMouseLeave: E } = an({
|
|
1094
1088
|
dashboardId: () => e.dashboardId,
|
|
1095
1089
|
itemId: () => e.itemId,
|
|
1096
1090
|
query: i,
|
|
@@ -1113,12 +1107,12 @@ var on = B({
|
|
|
1113
1107
|
filters: p,
|
|
1114
1108
|
query: i,
|
|
1115
1109
|
chartHeight: s,
|
|
1116
|
-
chartWidth:
|
|
1110
|
+
chartWidth: l,
|
|
1117
1111
|
chartConfig: u,
|
|
1118
1112
|
chartTitle: o,
|
|
1119
1113
|
onChartConfigChange: y,
|
|
1120
1114
|
onRefresh: _,
|
|
1121
|
-
handleLocalRefresh:
|
|
1115
|
+
handleLocalRefresh: ee,
|
|
1122
1116
|
chartSelection: h,
|
|
1123
1117
|
startTime: m,
|
|
1124
1118
|
handleDimensionClick: (n) => {
|
|
@@ -1134,7 +1128,7 @@ var on = B({
|
|
|
1134
1128
|
},
|
|
1135
1129
|
activeDrilldown: n,
|
|
1136
1130
|
activateDrilldown: (e) => {
|
|
1137
|
-
let t = e.filters, r = Object.keys(t)[0], i =
|
|
1131
|
+
let t = e.filters, r = Object.keys(t)[0], i = c(e.filters);
|
|
1138
1132
|
r && (n.value = {
|
|
1139
1133
|
remove: r,
|
|
1140
1134
|
filter: i
|
|
@@ -1158,7 +1152,7 @@ var on = B({
|
|
|
1158
1152
|
});
|
|
1159
1153
|
},
|
|
1160
1154
|
controlsVisible: C,
|
|
1161
|
-
onChartMouseEnter:
|
|
1155
|
+
onChartMouseEnter: T,
|
|
1162
1156
|
onChartMouseLeave: E,
|
|
1163
1157
|
revertDrilldown: async () => {
|
|
1164
1158
|
e.setItemData(e.itemId, e.dashboardId, {
|
|
@@ -1175,14 +1169,14 @@ var on = B({
|
|
|
1175
1169
|
class: "loading-overlay"
|
|
1176
1170
|
};
|
|
1177
1171
|
function cn(e, t, n, r, i, a) {
|
|
1178
|
-
let o =
|
|
1179
|
-
return
|
|
1172
|
+
let o = q("drilldown-pane"), s = q("ErrorMessage"), c = q("VegaLiteChart"), l = q("LoadingView");
|
|
1173
|
+
return W(), L("div", {
|
|
1180
1174
|
ref: "chartContainer",
|
|
1181
|
-
class:
|
|
1175
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1182
1176
|
onMouseenter: t[3] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1183
1177
|
onMouseleave: t[4] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1184
1178
|
}, [
|
|
1185
|
-
e.activeDrilldown ? (
|
|
1179
|
+
e.activeDrilldown ? (W(), F(o, {
|
|
1186
1180
|
key: 0,
|
|
1187
1181
|
"drilldown-remove": e.activeDrilldown.remove,
|
|
1188
1182
|
"drilldown-filter": e.activeDrilldown.filter,
|
|
@@ -1194,7 +1188,7 @@ function cn(e, t, n, r, i, a) {
|
|
|
1194
1188
|
"drilldown-filter",
|
|
1195
1189
|
"symbols",
|
|
1196
1190
|
"onSubmit"
|
|
1197
|
-
])) : e.error && !e.loading ? (
|
|
1191
|
+
])) : e.error && !e.loading ? (W(), F(s, {
|
|
1198
1192
|
key: 1,
|
|
1199
1193
|
compact: !0,
|
|
1200
1194
|
details: e.error,
|
|
@@ -1204,7 +1198,7 @@ function cn(e, t, n, r, i, a) {
|
|
|
1204
1198
|
"details",
|
|
1205
1199
|
"query",
|
|
1206
1200
|
"filters"
|
|
1207
|
-
])) : e.results && e.ready ? (
|
|
1201
|
+
])) : e.results && e.ready ? (W(), F(c, {
|
|
1208
1202
|
key: 2,
|
|
1209
1203
|
id: `${e.itemId}-${e.dashboardId}`,
|
|
1210
1204
|
columns: e.results.headers,
|
|
@@ -1239,32 +1233,32 @@ function cn(e, t, n, r, i, a) {
|
|
|
1239
1233
|
"onRefreshClick",
|
|
1240
1234
|
"onDrilldownClick",
|
|
1241
1235
|
"onRevertDrilldown"
|
|
1242
|
-
])) :
|
|
1243
|
-
e.loading && e.showLoading ? (
|
|
1236
|
+
])) : I("", !0),
|
|
1237
|
+
e.loading && e.showLoading ? (W(), L("div", sn, [B(l, {
|
|
1244
1238
|
startTime: e.startTime,
|
|
1245
1239
|
text: "",
|
|
1246
1240
|
subtle: ""
|
|
1247
|
-
}, null, 8, ["startTime"])])) :
|
|
1248
|
-
!e.editMode || !(e.results && e.ready) ? (
|
|
1241
|
+
}, null, 8, ["startTime"])])) : I("", !0),
|
|
1242
|
+
!e.editMode || !(e.results && e.ready) ? (W(), L("div", {
|
|
1249
1243
|
key: 4,
|
|
1250
|
-
class:
|
|
1251
|
-
}, [
|
|
1244
|
+
class: U(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1245
|
+
}, [R("button", {
|
|
1252
1246
|
onClick: t[1] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
1253
1247
|
class: "control-btn",
|
|
1254
1248
|
"data-testid": "refresh-chart-btn",
|
|
1255
1249
|
title: "Refresh table"
|
|
1256
|
-
}, [...t[5] ||= [
|
|
1250
|
+
}, [...t[5] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]]), R("button", {
|
|
1257
1251
|
onClick: t[2] ||= (...t) => e.revertDrilldown && e.revertDrilldown(...t),
|
|
1258
1252
|
class: "control-btn",
|
|
1259
1253
|
"data-testid": "refresh-chart-btn",
|
|
1260
1254
|
title: "Clear Drilldown"
|
|
1261
|
-
}, [...t[6] ||= [
|
|
1255
|
+
}, [...t[6] ||= [R("i", { class: "mdi mdi-undo icon" }, null, -1)]])], 2)) : I("", !0)
|
|
1262
1256
|
], 34);
|
|
1263
1257
|
}
|
|
1264
|
-
var ln = /*#__PURE__*/
|
|
1258
|
+
var ln = /*#__PURE__*/ e(on, [["render", cn], ["__scopeId", "data-v-36046d80"]]), un = V({
|
|
1265
1259
|
name: "DynamicMarkdownChart",
|
|
1266
1260
|
components: {
|
|
1267
|
-
ErrorMessage:
|
|
1261
|
+
ErrorMessage: j,
|
|
1268
1262
|
MarkdownRenderer: fe
|
|
1269
1263
|
},
|
|
1270
1264
|
props: {
|
|
@@ -1308,10 +1302,10 @@ var ln = /*#__PURE__*/ t(on, [["render", cn], ["__scopeId", "data-v-36046d80"]])
|
|
|
1308
1302
|
}
|
|
1309
1303
|
},
|
|
1310
1304
|
setup(e) {
|
|
1311
|
-
let t =
|
|
1305
|
+
let t = P(() => e.getItemData(e.itemId, e.dashboardId)), n = P(() => t.value.structured_content || {
|
|
1312
1306
|
markdown: "",
|
|
1313
1307
|
query: ""
|
|
1314
|
-
}), 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");
|
|
1315
1309
|
if (!d) throw Error("Connection store not found!");
|
|
1316
1310
|
let { chartContainer: p, ready: m, controlsVisible: h, handleLocalRefresh: g, onChartMouseEnter: _, onChartMouseLeave: v } = an({
|
|
1317
1311
|
dashboardId: () => e.dashboardId,
|
|
@@ -1345,13 +1339,13 @@ var ln = /*#__PURE__*/ t(on, [["render", cn], ["__scopeId", "data-v-36046d80"]])
|
|
|
1345
1339
|
//#endregion
|
|
1346
1340
|
//#region components/dashboard/DashboardMarkdown.vue
|
|
1347
1341
|
function dn(e, t, n, r, i, a) {
|
|
1348
|
-
let o =
|
|
1349
|
-
return
|
|
1342
|
+
let o = q("ErrorMessage"), s = q("MarkdownRenderer");
|
|
1343
|
+
return W(), L("div", {
|
|
1350
1344
|
ref: "chartContainer",
|
|
1351
|
-
class:
|
|
1345
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1352
1346
|
onMouseenter: t[1] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1353
1347
|
onMouseleave: t[2] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1354
|
-
}, [e.error && !e.loading ? (
|
|
1348
|
+
}, [e.error && !e.loading ? (W(), F(o, {
|
|
1355
1349
|
key: 0,
|
|
1356
1350
|
compact: !0,
|
|
1357
1351
|
details: e.error,
|
|
@@ -1361,7 +1355,7 @@ function dn(e, t, n, r, i, a) {
|
|
|
1361
1355
|
"details",
|
|
1362
1356
|
"query",
|
|
1363
1357
|
"filters"
|
|
1364
|
-
])) : e.ready ? (
|
|
1358
|
+
])) : e.ready ? (W(), F(s, {
|
|
1365
1359
|
key: 1,
|
|
1366
1360
|
markdown: e.markdown,
|
|
1367
1361
|
results: e.results,
|
|
@@ -1370,21 +1364,21 @@ function dn(e, t, n, r, i, a) {
|
|
|
1370
1364
|
"markdown",
|
|
1371
1365
|
"results",
|
|
1372
1366
|
"loading"
|
|
1373
|
-
])) :
|
|
1367
|
+
])) : I("", !0), !e.loading && e.editMode ? (W(), L("div", {
|
|
1374
1368
|
key: 2,
|
|
1375
|
-
class:
|
|
1376
|
-
}, [
|
|
1369
|
+
class: U(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1370
|
+
}, [R("button", {
|
|
1377
1371
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
1378
1372
|
class: "control-btn",
|
|
1379
1373
|
"data-testid": "refresh-chart-btn",
|
|
1380
1374
|
title: "Refresh text"
|
|
1381
|
-
}, [...t[3] ||= [
|
|
1375
|
+
}, [...t[3] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])], 2)) : I("", !0)], 34);
|
|
1382
1376
|
}
|
|
1383
|
-
var fn = /*#__PURE__*/
|
|
1377
|
+
var fn = /*#__PURE__*/ e(un, [["render", dn], ["__scopeId", "data-v-ffafce48"]]), pn = V({
|
|
1384
1378
|
name: "DashboardTable",
|
|
1385
1379
|
components: {
|
|
1386
|
-
DataTable:
|
|
1387
|
-
ErrorMessage:
|
|
1380
|
+
DataTable: se,
|
|
1381
|
+
ErrorMessage: j,
|
|
1388
1382
|
LoadingView: ue
|
|
1389
1383
|
},
|
|
1390
1384
|
props: {
|
|
@@ -1422,7 +1416,7 @@ var fn = /*#__PURE__*/ t(un, [["render", dn], ["__scopeId", "data-v-ffafce48"]])
|
|
|
1422
1416
|
}
|
|
1423
1417
|
},
|
|
1424
1418
|
setup(e, { emit: t }) {
|
|
1425
|
-
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");
|
|
1426
1420
|
if (!f) throw Error("Connection store not found!");
|
|
1427
1421
|
let { chartContainer: m, ready: h, showLoading: g, controlsVisible: _, handleLocalRefresh: v, onChartMouseEnter: y, onChartMouseLeave: b } = an({
|
|
1428
1422
|
dashboardId: () => e.dashboardId,
|
|
@@ -1471,14 +1465,14 @@ var fn = /*#__PURE__*/ t(un, [["render", dn], ["__scopeId", "data-v-ffafce48"]])
|
|
|
1471
1465
|
class: "loading-overlay"
|
|
1472
1466
|
};
|
|
1473
1467
|
function hn(e, t, n, r, i, a) {
|
|
1474
|
-
let o =
|
|
1475
|
-
return
|
|
1468
|
+
let o = q("ErrorMessage"), s = q("data-table"), c = q("LoadingView");
|
|
1469
|
+
return W(), L("div", {
|
|
1476
1470
|
ref: "chartContainer",
|
|
1477
|
-
class:
|
|
1471
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1478
1472
|
onMouseenter: t[1] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1479
1473
|
onMouseleave: t[2] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1480
1474
|
}, [
|
|
1481
|
-
e.error && !e.loading ? (
|
|
1475
|
+
e.error && !e.loading ? (W(), F(o, {
|
|
1482
1476
|
key: 0,
|
|
1483
1477
|
compact: !0,
|
|
1484
1478
|
details: e.error,
|
|
@@ -1488,7 +1482,7 @@ function hn(e, t, n, r, i, a) {
|
|
|
1488
1482
|
"details",
|
|
1489
1483
|
"query",
|
|
1490
1484
|
"filters"
|
|
1491
|
-
])) : e.results && e.ready ? (
|
|
1485
|
+
])) : e.results && e.ready ? (W(), F(s, {
|
|
1492
1486
|
key: 1,
|
|
1493
1487
|
id: `${e.itemId}-${e.dashboardId}`,
|
|
1494
1488
|
headers: e.results.headers,
|
|
@@ -1506,27 +1500,27 @@ function hn(e, t, n, r, i, a) {
|
|
|
1506
1500
|
"containerHeight",
|
|
1507
1501
|
"onCellClick",
|
|
1508
1502
|
"onBackgroundClick"
|
|
1509
|
-
])) :
|
|
1510
|
-
e.loading && e.showLoading ? (
|
|
1503
|
+
])) : I("", !0),
|
|
1504
|
+
e.loading && e.showLoading ? (W(), L("div", mn, [B(c, {
|
|
1511
1505
|
startTime: e.startTime,
|
|
1512
1506
|
text: "",
|
|
1513
1507
|
subtle: ""
|
|
1514
|
-
}, null, 8, ["startTime"])])) :
|
|
1515
|
-
!e.loading && e.editMode ? (
|
|
1508
|
+
}, null, 8, ["startTime"])])) : I("", !0),
|
|
1509
|
+
!e.loading && e.editMode ? (W(), L("div", {
|
|
1516
1510
|
key: 3,
|
|
1517
|
-
class:
|
|
1518
|
-
}, [
|
|
1511
|
+
class: U(["controls-toggle", { "controls-visible": e.controlsVisible }])
|
|
1512
|
+
}, [R("button", {
|
|
1519
1513
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
1520
1514
|
class: "control-btn",
|
|
1521
1515
|
"data-testid": "refresh-chart-btn",
|
|
1522
1516
|
title: "Refresh table"
|
|
1523
|
-
}, [...t[3] ||= [
|
|
1517
|
+
}, [...t[3] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])], 2)) : I("", !0)
|
|
1524
1518
|
], 34);
|
|
1525
1519
|
}
|
|
1526
|
-
var gn = /*#__PURE__*/
|
|
1520
|
+
var gn = /*#__PURE__*/ e(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 = {
|
|
1527
1521
|
key: 1,
|
|
1528
1522
|
class: "dropdown-empty"
|
|
1529
|
-
}, On = { class: "dropdown-footer" }, kn = /*#__PURE__*/
|
|
1523
|
+
}, On = { class: "dropdown-footer" }, kn = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
1530
1524
|
__name: "DashboardDataSelector",
|
|
1531
1525
|
props: {
|
|
1532
1526
|
headers: {
|
|
@@ -1553,42 +1547,42 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1553
1547
|
},
|
|
1554
1548
|
emits: ["cell-click", "background-click"],
|
|
1555
1549
|
setup(e, { emit: t }) {
|
|
1556
|
-
let
|
|
1550
|
+
let r = e, i = t, a = G([...r.initialSelection ?? []]), o = G([]), s = G(""), c = G(!1), l = G(null), u = G(null), d = G(null), f = P(() => Array.from(r.headers.values())), p = P(() => f.value[0] || null), m = P(() => f.value[1] || f.value[0] || null);
|
|
1557
1551
|
function h(e, t) {
|
|
1558
1552
|
switch (t.type) {
|
|
1559
|
-
case
|
|
1560
|
-
case
|
|
1561
|
-
case
|
|
1562
|
-
case
|
|
1563
|
-
case
|
|
1564
|
-
case
|
|
1565
|
-
case
|
|
1566
|
-
case
|
|
1553
|
+
case n.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 n.DATETIME:
|
|
1555
|
+
case n.TIMESTAMP:
|
|
1556
|
+
case n.DATE:
|
|
1557
|
+
case n.TIME: return e instanceof Date ? e.toLocaleString() : String(e);
|
|
1558
|
+
case n.BOOLEAN: return e ? "✓" : "✗";
|
|
1559
|
+
case n.ARRAY:
|
|
1560
|
+
case n.STRUCT: return JSON.stringify(e);
|
|
1567
1561
|
default: return String(e);
|
|
1568
1562
|
}
|
|
1569
1563
|
}
|
|
1570
|
-
let g =
|
|
1564
|
+
let g = P(() => {
|
|
1571
1565
|
let e = p.value, t = m.value;
|
|
1572
|
-
if (!e || !t || !
|
|
1573
|
-
let
|
|
1574
|
-
for (let t of
|
|
1575
|
-
let
|
|
1576
|
-
|
|
1577
|
-
label: h(
|
|
1566
|
+
if (!e || !t || !r.results || r.results.length === 0) return [];
|
|
1567
|
+
let n = e.name, i = t.name, a = [];
|
|
1568
|
+
for (let t of r.results) {
|
|
1569
|
+
let r = t[n], o = t[i];
|
|
1570
|
+
r != null && o != null && a.push({
|
|
1571
|
+
label: h(r, e),
|
|
1578
1572
|
value: o
|
|
1579
1573
|
});
|
|
1580
1574
|
}
|
|
1581
1575
|
return a;
|
|
1582
|
-
}), _ =
|
|
1576
|
+
}), _ = P(() => {
|
|
1583
1577
|
let e = /* @__PURE__ */ new Map();
|
|
1584
1578
|
for (let t of g.value) e.set(t.value, t.label);
|
|
1585
1579
|
return e;
|
|
1586
|
-
}), v =
|
|
1580
|
+
}), v = P(() => {
|
|
1587
1581
|
if (!s.value) return g.value;
|
|
1588
1582
|
let e = s.value.toLowerCase();
|
|
1589
1583
|
return g.value.filter((t) => t.label.toLowerCase().includes(e));
|
|
1590
|
-
}), y =
|
|
1591
|
-
function
|
|
1584
|
+
}), y = P(() => p.value?.name || "Field"), b = P(() => a.value.length > 0), x = P(() => !g.value || g.value.length === 0 ? "No data available" : a.value.length === 0 ? `All (${g.value.length})` : a.value.length === 1 ? _.value.get(a.value[0]) ?? String(a.value[0]) : `${_.value.get(a.value[0]) ?? String(a.value[0])} +${a.value.length - 1}`), S = P(() => !g.value || g.value.length === 0), C = P(() => v.value.length > 0 && v.value.every((e) => o.value.includes(e.value))), w = G({});
|
|
1585
|
+
function ee() {
|
|
1592
1586
|
let e = l.value;
|
|
1593
1587
|
if (!e) {
|
|
1594
1588
|
w.value = {};
|
|
@@ -1604,24 +1598,24 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1604
1598
|
maxHeight: `${h}px`
|
|
1605
1599
|
};
|
|
1606
1600
|
}
|
|
1607
|
-
function
|
|
1608
|
-
S.value || (o.value = [...a.value], s.value = "", c.value = !0,
|
|
1609
|
-
|
|
1601
|
+
function T() {
|
|
1602
|
+
S.value || (o.value = [...a.value], s.value = "", c.value = !0, xe(() => {
|
|
1603
|
+
ee(), d.value?.focus();
|
|
1610
1604
|
}));
|
|
1611
1605
|
}
|
|
1612
1606
|
function E() {
|
|
1613
1607
|
c.value = !1;
|
|
1614
1608
|
}
|
|
1615
1609
|
function te() {
|
|
1616
|
-
c.value ? E() :
|
|
1610
|
+
c.value ? E() : T();
|
|
1617
1611
|
}
|
|
1618
1612
|
ae(() => [l.value, u.value], () => E(), { enabled: () => c.value });
|
|
1619
1613
|
function D() {
|
|
1620
|
-
c.value &&
|
|
1614
|
+
c.value && ee();
|
|
1621
1615
|
}
|
|
1622
|
-
|
|
1616
|
+
X(c, (e) => {
|
|
1623
1617
|
e ? (window.addEventListener("scroll", D, !0), window.addEventListener("resize", D), window.visualViewport?.addEventListener("scroll", D), window.visualViewport?.addEventListener("resize", D)) : (window.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D), window.visualViewport?.removeEventListener("scroll", D), window.visualViewport?.removeEventListener("resize", D));
|
|
1624
|
-
}),
|
|
1618
|
+
}), Ce(() => {
|
|
1625
1619
|
window.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D), window.visualViewport?.removeEventListener("scroll", D), window.visualViewport?.removeEventListener("resize", D);
|
|
1626
1620
|
});
|
|
1627
1621
|
function O(e) {
|
|
@@ -1667,7 +1661,7 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1667
1661
|
function A() {
|
|
1668
1662
|
a.value = [], o.value = [], oe([]), E();
|
|
1669
1663
|
}
|
|
1670
|
-
|
|
1664
|
+
X(() => r.initialSelection, (e) => {
|
|
1671
1665
|
let t = e ?? [];
|
|
1672
1666
|
t.length === a.value.length && t.every((e, t) => e === a.value[t]) || (a.value = [...t]);
|
|
1673
1667
|
});
|
|
@@ -1680,22 +1674,22 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1680
1674
|
let n = s.value.toLowerCase(), r = t.toLowerCase().indexOf(n);
|
|
1681
1675
|
return r === -1 ? t : `${t.slice(0, r)}<mark>${t.slice(r, r + s.value.length)}</mark>${t.slice(r + s.value.length)}`;
|
|
1682
1676
|
}
|
|
1683
|
-
function
|
|
1684
|
-
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(),
|
|
1677
|
+
function j(e) {
|
|
1678
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), T());
|
|
1685
1679
|
}
|
|
1686
|
-
function
|
|
1680
|
+
function le(e) {
|
|
1687
1681
|
e.key === "Escape" ? (e.preventDefault(), E(), l.value?.focus()) : e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), k());
|
|
1688
1682
|
}
|
|
1689
|
-
return (e, t) => (
|
|
1690
|
-
|
|
1683
|
+
return (e, t) => (W(), L("div", _n, [
|
|
1684
|
+
R("div", {
|
|
1691
1685
|
class: "filter-label",
|
|
1692
1686
|
title: y.value
|
|
1693
|
-
},
|
|
1694
|
-
|
|
1687
|
+
}, J(y.value), 9, vn),
|
|
1688
|
+
R("button", {
|
|
1695
1689
|
ref_key: "triggerRef",
|
|
1696
1690
|
ref: l,
|
|
1697
1691
|
type: "button",
|
|
1698
|
-
class:
|
|
1692
|
+
class: U(["filter-trigger", {
|
|
1699
1693
|
"is-open": c.value,
|
|
1700
1694
|
"has-selection": b.value,
|
|
1701
1695
|
"is-disabled": S.value
|
|
@@ -1704,40 +1698,40 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1704
1698
|
"aria-expanded": c.value,
|
|
1705
1699
|
"aria-haspopup": "listbox",
|
|
1706
1700
|
onClick: te,
|
|
1707
|
-
onKeydown:
|
|
1701
|
+
onKeydown: j
|
|
1708
1702
|
}, [
|
|
1709
|
-
|
|
1710
|
-
b.value && a.value.length > 1 ? (
|
|
1703
|
+
R("span", { class: U(["filter-value", { muted: !b.value }]) }, J(x.value), 3),
|
|
1704
|
+
b.value && a.value.length > 1 ? (W(), L("span", {
|
|
1711
1705
|
key: 0,
|
|
1712
1706
|
class: "filter-count-badge",
|
|
1713
1707
|
title: `${a.value.length} selected`
|
|
1714
|
-
},
|
|
1715
|
-
b.value ? (
|
|
1708
|
+
}, J(a.value.length), 9, bn)) : I("", !0),
|
|
1709
|
+
b.value ? (W(), L("span", {
|
|
1716
1710
|
key: 1,
|
|
1717
1711
|
class: "filter-clear",
|
|
1718
1712
|
role: "button",
|
|
1719
1713
|
tabindex: "-1",
|
|
1720
1714
|
title: "Clear selection",
|
|
1721
1715
|
onClick: Ne(A, ["stop"])
|
|
1722
|
-
}, [...t[3] ||= [
|
|
1716
|
+
}, [...t[3] ||= [R("svg", {
|
|
1723
1717
|
viewBox: "0 0 24 24",
|
|
1724
1718
|
width: "14",
|
|
1725
1719
|
height: "14",
|
|
1726
1720
|
"aria-hidden": "true"
|
|
1727
|
-
}, [
|
|
1721
|
+
}, [R("path", {
|
|
1728
1722
|
d: "M6 6l12 12M18 6L6 18",
|
|
1729
1723
|
stroke: "currentColor",
|
|
1730
1724
|
"stroke-width": "2",
|
|
1731
1725
|
"stroke-linecap": "round",
|
|
1732
1726
|
fill: "none"
|
|
1733
|
-
})], -1)]])) :
|
|
1734
|
-
t[4] ||=
|
|
1727
|
+
})], -1)]])) : I("", !0),
|
|
1728
|
+
t[4] ||= R("svg", {
|
|
1735
1729
|
class: "chevron",
|
|
1736
1730
|
viewBox: "0 0 24 24",
|
|
1737
1731
|
width: "16",
|
|
1738
1732
|
height: "16",
|
|
1739
1733
|
"aria-hidden": "true"
|
|
1740
|
-
}, [
|
|
1734
|
+
}, [R("path", {
|
|
1741
1735
|
d: "M6 9l6 6 6-6",
|
|
1742
1736
|
stroke: "currentColor",
|
|
1743
1737
|
"stroke-width": "2",
|
|
@@ -1746,78 +1740,78 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1746
1740
|
fill: "none"
|
|
1747
1741
|
})], -1)
|
|
1748
1742
|
], 42, yn),
|
|
1749
|
-
(
|
|
1743
|
+
(W(), F(be, { to: "body" }, [c.value ? (W(), L("div", {
|
|
1750
1744
|
key: 0,
|
|
1751
1745
|
ref_key: "dropdownRef",
|
|
1752
1746
|
ref: u,
|
|
1753
1747
|
class: "filter-dropdown",
|
|
1754
|
-
style:
|
|
1748
|
+
style: Se(w.value),
|
|
1755
1749
|
role: "dialog",
|
|
1756
|
-
onKeydown:
|
|
1750
|
+
onKeydown: le
|
|
1757
1751
|
}, [
|
|
1758
|
-
|
|
1752
|
+
R("div", xn, [t[5] ||= R("svg", {
|
|
1759
1753
|
viewBox: "0 0 24 24",
|
|
1760
1754
|
width: "14",
|
|
1761
1755
|
height: "14",
|
|
1762
1756
|
"aria-hidden": "true"
|
|
1763
|
-
}, [
|
|
1757
|
+
}, [R("circle", {
|
|
1764
1758
|
cx: "11",
|
|
1765
1759
|
cy: "11",
|
|
1766
1760
|
r: "7",
|
|
1767
1761
|
stroke: "currentColor",
|
|
1768
1762
|
"stroke-width": "2",
|
|
1769
1763
|
fill: "none"
|
|
1770
|
-
}),
|
|
1764
|
+
}), R("path", {
|
|
1771
1765
|
d: "m20 20-3.5-3.5",
|
|
1772
1766
|
stroke: "currentColor",
|
|
1773
1767
|
"stroke-width": "2",
|
|
1774
1768
|
"stroke-linecap": "round"
|
|
1775
|
-
})], -1),
|
|
1769
|
+
})], -1), je(R("input", {
|
|
1776
1770
|
ref_key: "searchInputRef",
|
|
1777
1771
|
ref: d,
|
|
1778
1772
|
"onUpdate:modelValue": t[0] ||= (e) => s.value = e,
|
|
1779
1773
|
type: "text",
|
|
1780
1774
|
class: "dropdown-search-input",
|
|
1781
1775
|
placeholder: `Search ${y.value.toLowerCase()}...`
|
|
1782
|
-
}, null, 8, Sn), [[
|
|
1783
|
-
|
|
1784
|
-
v.value.length > 0 ? (
|
|
1776
|
+
}, null, 8, Sn), [[ke, s.value]])]),
|
|
1777
|
+
R("div", Cn, [
|
|
1778
|
+
v.value.length > 0 ? (W(), L("label", {
|
|
1785
1779
|
key: 0,
|
|
1786
1780
|
class: "dropdown-item dropdown-item--all",
|
|
1787
1781
|
onMousedown: t[1] ||= Ne(() => {}, ["prevent"])
|
|
1788
|
-
}, [
|
|
1782
|
+
}, [R("input", {
|
|
1789
1783
|
type: "checkbox",
|
|
1790
1784
|
checked: C.value,
|
|
1791
1785
|
onChange: re
|
|
1792
|
-
}, null, 40, wn),
|
|
1793
|
-
(
|
|
1786
|
+
}, null, 40, wn), R("span", null, J(s.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", {
|
|
1794
1788
|
key: n,
|
|
1795
|
-
class:
|
|
1789
|
+
class: U(["dropdown-item", { selected: O(e.value) }]),
|
|
1796
1790
|
onMousedown: t[2] ||= Ne(() => {}, ["prevent"])
|
|
1797
|
-
}, [
|
|
1791
|
+
}, [R("input", {
|
|
1798
1792
|
type: "checkbox",
|
|
1799
1793
|
checked: O(e.value),
|
|
1800
1794
|
onChange: (t) => ne(e)
|
|
1801
|
-
}, null, 40, Tn),
|
|
1802
|
-
v.value.length === 0 ? (
|
|
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)
|
|
1803
1797
|
]),
|
|
1804
|
-
|
|
1798
|
+
R("div", On, [R("button", {
|
|
1805
1799
|
type: "button",
|
|
1806
1800
|
class: "footer-btn",
|
|
1807
1801
|
onClick: ie
|
|
1808
|
-
}, "Clear"),
|
|
1802
|
+
}, "Clear"), R("button", {
|
|
1809
1803
|
type: "button",
|
|
1810
1804
|
class: "footer-btn primary",
|
|
1811
1805
|
onClick: k
|
|
1812
|
-
}, " Apply" +
|
|
1813
|
-
], 36)) :
|
|
1806
|
+
}, " Apply" + J(o.value.length > 0 ? ` (${o.value.length})` : ""), 1)])
|
|
1807
|
+
], 36)) : I("", !0)]))
|
|
1814
1808
|
]));
|
|
1815
1809
|
}
|
|
1816
|
-
}), [["__scopeId", "data-v-16a8f6a3"]]), An =
|
|
1810
|
+
}), [["__scopeId", "data-v-16a8f6a3"]]), An = V({
|
|
1817
1811
|
name: "DashboardFilter",
|
|
1818
1812
|
components: {
|
|
1819
1813
|
DashboardDataSelector: kn,
|
|
1820
|
-
ErrorMessage:
|
|
1814
|
+
ErrorMessage: j,
|
|
1821
1815
|
LoadingView: ue
|
|
1822
1816
|
},
|
|
1823
1817
|
props: {
|
|
@@ -1855,7 +1849,7 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1855
1849
|
}
|
|
1856
1850
|
},
|
|
1857
1851
|
setup(e, { emit: t }) {
|
|
1858
|
-
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");
|
|
1859
1853
|
if (!f) throw Error("Connection store not found!");
|
|
1860
1854
|
let { chartContainer: m, ready: h, showLoading: g, controlsVisible: _, handleLocalRefresh: v, onChartMouseEnter: y, onChartMouseLeave: b } = an({
|
|
1861
1855
|
dashboardId: () => e.dashboardId,
|
|
@@ -1904,13 +1898,13 @@ var gn = /*#__PURE__*/ t(pn, [["render", hn], ["__scopeId", "data-v-2fa93a82"]])
|
|
|
1904
1898
|
class: "loading-overlay"
|
|
1905
1899
|
};
|
|
1906
1900
|
function Mn(e, t, n, r, i, a) {
|
|
1907
|
-
let o =
|
|
1908
|
-
return
|
|
1901
|
+
let o = q("ErrorMessage"), s = q("dashboard-data-selector"), c = q("LoadingView");
|
|
1902
|
+
return W(), L("div", {
|
|
1909
1903
|
ref: "chartContainer",
|
|
1910
|
-
class:
|
|
1904
|
+
class: U(["chart-placeholder no-drag", { "chart-placeholder-edit-mode": e.editMode }]),
|
|
1911
1905
|
onMouseenter: t[0] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
1912
1906
|
onMouseleave: t[1] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
1913
|
-
}, [e.error && !e.loading ? (
|
|
1907
|
+
}, [e.error && !e.loading ? (W(), F(o, {
|
|
1914
1908
|
key: 0,
|
|
1915
1909
|
compact: !0,
|
|
1916
1910
|
details: e.error,
|
|
@@ -1920,7 +1914,7 @@ function Mn(e, t, n, r, i, a) {
|
|
|
1920
1914
|
"details",
|
|
1921
1915
|
"query",
|
|
1922
1916
|
"filters"
|
|
1923
|
-
])) : e.results && e.ready ? (
|
|
1917
|
+
])) : e.results && e.ready ? (W(), F(s, {
|
|
1924
1918
|
key: 1,
|
|
1925
1919
|
id: `${e.itemId}-${e.dashboardId}`,
|
|
1926
1920
|
headers: e.results.headers,
|
|
@@ -1937,22 +1931,22 @@ function Mn(e, t, n, r, i, a) {
|
|
|
1937
1931
|
"containerHeight",
|
|
1938
1932
|
"onCellClick",
|
|
1939
1933
|
"onBackgroundClick"
|
|
1940
|
-
])) :
|
|
1934
|
+
])) : I("", !0), e.loading && e.showLoading ? (W(), L("div", jn, [B(c, {
|
|
1941
1935
|
startTime: e.startTime,
|
|
1942
1936
|
text: "",
|
|
1943
1937
|
subtle: ""
|
|
1944
|
-
}, null, 8, ["startTime"])])) :
|
|
1938
|
+
}, null, 8, ["startTime"])])) : I("", !0)], 34);
|
|
1945
1939
|
}
|
|
1946
|
-
var Nn = /*#__PURE__*/
|
|
1940
|
+
var Nn = /*#__PURE__*/ e(An, [["render", Mn], ["__scopeId", "data-v-164bba0a"]]), Pn = {
|
|
1947
1941
|
good: "Good",
|
|
1948
1942
|
bad: "Bad",
|
|
1949
1943
|
mixed: "Mixed",
|
|
1950
1944
|
inconclusive: "Inconclusive"
|
|
1951
|
-
}, Fn =
|
|
1945
|
+
}, Fn = V({
|
|
1952
1946
|
name: "DashboardMemo",
|
|
1953
1947
|
components: {
|
|
1954
1948
|
MarkdownRenderer: fe,
|
|
1955
|
-
ErrorMessage:
|
|
1949
|
+
ErrorMessage: j
|
|
1956
1950
|
},
|
|
1957
1951
|
props: {
|
|
1958
1952
|
dashboardId: {
|
|
@@ -1981,7 +1975,7 @@ var Nn = /*#__PURE__*/ t(An, [["render", Mn], ["__scopeId", "data-v-164bba0a"]])
|
|
|
1981
1975
|
}
|
|
1982
1976
|
},
|
|
1983
1977
|
setup(e) {
|
|
1984
|
-
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");
|
|
1985
1979
|
if (!v) throw Error("Connection store not found!");
|
|
1986
1980
|
let { ready: b, handleLocalRefresh: x } = an({
|
|
1987
1981
|
dashboardId: () => e.dashboardId,
|
|
@@ -2019,8 +2013,8 @@ var Nn = /*#__PURE__*/ t(An, [["render", Mn], ["__scopeId", "data-v-164bba0a"]])
|
|
|
2019
2013
|
class: "controls-toggle controls-visible"
|
|
2020
2014
|
};
|
|
2021
2015
|
function Gn(e, t, n, r, i, a) {
|
|
2022
|
-
let o =
|
|
2023
|
-
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, {
|
|
2024
2018
|
key: 0,
|
|
2025
2019
|
compact: !0,
|
|
2026
2020
|
details: e.error,
|
|
@@ -2030,51 +2024,51 @@ function Gn(e, t, n, r, i, a) {
|
|
|
2030
2024
|
"details",
|
|
2031
2025
|
"query",
|
|
2032
2026
|
"filters"
|
|
2033
|
-
])) : e.ready ? (
|
|
2034
|
-
|
|
2035
|
-
t[1] ||=
|
|
2036
|
-
|
|
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", {
|
|
2037
2031
|
class: "verdict-chip",
|
|
2038
2032
|
title: e.verdictTitle
|
|
2039
|
-
},
|
|
2040
|
-
|
|
2033
|
+
}, J(e.verdictLabel), 9, Ln),
|
|
2034
|
+
R("span", {
|
|
2041
2035
|
class: "confidence-chip",
|
|
2042
2036
|
title: e.confidenceRationale || ""
|
|
2043
|
-
}, " confidence: " +
|
|
2037
|
+
}, " confidence: " + J(e.confidence), 9, Rn)
|
|
2044
2038
|
]),
|
|
2045
|
-
|
|
2039
|
+
R("h1", zn, [B(s, {
|
|
2046
2040
|
markdown: e.headline || "_No headline yet_",
|
|
2047
2041
|
results: e.results
|
|
2048
2042
|
}, null, 8, ["markdown", "results"])]),
|
|
2049
|
-
|
|
2050
|
-
|
|
2043
|
+
R("div", Bn, [
|
|
2044
|
+
R("div", Vn, [t[2] ||= R("span", { class: "memo-label" }, "Magnitude", -1), B(s, {
|
|
2051
2045
|
class: "memo-prose",
|
|
2052
2046
|
markdown: e.magnitude || "_(not set)_",
|
|
2053
2047
|
results: e.results
|
|
2054
2048
|
}, null, 8, ["markdown", "results"])]),
|
|
2055
|
-
|
|
2049
|
+
R("div", Hn, [t[3] ||= R("span", { class: "memo-label" }, "Likely cause", -1), B(s, {
|
|
2056
2050
|
class: "memo-prose",
|
|
2057
2051
|
markdown: e.cause || "_(not set)_",
|
|
2058
2052
|
results: e.results
|
|
2059
2053
|
}, null, 8, ["markdown", "results"])]),
|
|
2060
|
-
|
|
2054
|
+
R("div", Un, [t[4] ||= R("span", { class: "memo-label" }, "Recommended action", -1), B(s, {
|
|
2061
2055
|
class: "memo-prose",
|
|
2062
2056
|
markdown: e.action || "_(not set)_",
|
|
2063
2057
|
results: e.results
|
|
2064
2058
|
}, null, 8, ["markdown", "results"])])
|
|
2065
2059
|
])
|
|
2066
|
-
], 64)) :
|
|
2060
|
+
], 64)) : I("", !0), !e.loading && e.editMode ? (W(), L("div", Wn, [R("button", {
|
|
2067
2061
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
2068
2062
|
class: "control-btn",
|
|
2069
2063
|
"data-testid": "refresh-memo-btn",
|
|
2070
2064
|
title: "Refresh memo data"
|
|
2071
|
-
}, [...t[5] ||= [
|
|
2065
|
+
}, [...t[5] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])])) : I("", !0)], 2);
|
|
2072
2066
|
}
|
|
2073
|
-
var Kn = /*#__PURE__*/
|
|
2067
|
+
var Kn = /*#__PURE__*/ e(Fn, [["render", Gn], ["__scopeId", "data-v-076ae1b1"]]), qn = V({
|
|
2074
2068
|
name: "DashboardClaim",
|
|
2075
2069
|
components: {
|
|
2076
2070
|
MarkdownRenderer: fe,
|
|
2077
|
-
ErrorMessage:
|
|
2071
|
+
ErrorMessage: j
|
|
2078
2072
|
},
|
|
2079
2073
|
props: {
|
|
2080
2074
|
dashboardId: {
|
|
@@ -2103,7 +2097,7 @@ var Kn = /*#__PURE__*/ t(Fn, [["render", Gn], ["__scopeId", "data-v-076ae1b1"]])
|
|
|
2103
2097
|
}
|
|
2104
2098
|
},
|
|
2105
2099
|
setup(e) {
|
|
2106
|
-
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");
|
|
2107
2101
|
if (!p) throw Error("Connection store not found!");
|
|
2108
2102
|
let { ready: h, handleLocalRefresh: g } = an({
|
|
2109
2103
|
dashboardId: () => e.dashboardId,
|
|
@@ -2145,8 +2139,8 @@ var Kn = /*#__PURE__*/ t(Fn, [["render", Gn], ["__scopeId", "data-v-076ae1b1"]])
|
|
|
2145
2139
|
class: "controls-toggle controls-visible"
|
|
2146
2140
|
};
|
|
2147
2141
|
function er(e, t, n, r, i, a) {
|
|
2148
|
-
let o =
|
|
2149
|
-
return
|
|
2142
|
+
let o = q("ErrorMessage"), s = q("MarkdownRenderer");
|
|
2143
|
+
return W(), L("div", Jn, [e.error && !e.loading ? (W(), F(o, {
|
|
2150
2144
|
key: 0,
|
|
2151
2145
|
compact: !0,
|
|
2152
2146
|
details: e.error,
|
|
@@ -2156,34 +2150,34 @@ function er(e, t, n, r, i, a) {
|
|
|
2156
2150
|
"details",
|
|
2157
2151
|
"query",
|
|
2158
2152
|
"filters"
|
|
2159
|
-
])) : e.ready ? (
|
|
2160
|
-
e.heading ? (
|
|
2153
|
+
])) : e.ready ? (W(), L(N, { key: 1 }, [
|
|
2154
|
+
e.heading ? (W(), L("div", Yn, [B(s, {
|
|
2161
2155
|
markdown: e.heading,
|
|
2162
2156
|
results: e.results
|
|
2163
|
-
}, null, 8, ["markdown", "results"])])) :
|
|
2164
|
-
|
|
2157
|
+
}, null, 8, ["markdown", "results"])])) : I("", !0),
|
|
2158
|
+
R("div", Xn, [t[1] ||= R("span", { class: "claim-label" }, "Claim", -1), B(s, {
|
|
2165
2159
|
class: "claim-prose claim-main",
|
|
2166
2160
|
markdown: e.claim || "_(no claim yet — set one with the report agent)_",
|
|
2167
2161
|
results: e.results
|
|
2168
2162
|
}, null, 8, ["markdown", "results"])]),
|
|
2169
|
-
e.caveat ? (
|
|
2163
|
+
e.caveat ? (W(), L("div", Zn, [t[2] ||= R("span", { class: "claim-label" }, "Caveat", -1), B(s, {
|
|
2170
2164
|
class: "claim-prose",
|
|
2171
2165
|
markdown: e.caveat,
|
|
2172
2166
|
results: e.results
|
|
2173
|
-
}, null, 8, ["markdown", "results"])])) :
|
|
2174
|
-
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, {
|
|
2175
2169
|
class: "claim-prose",
|
|
2176
2170
|
markdown: e.drilldown,
|
|
2177
2171
|
results: e.results
|
|
2178
|
-
}, null, 8, ["markdown", "results"])])) :
|
|
2179
|
-
], 64)) :
|
|
2172
|
+
}, null, 8, ["markdown", "results"])])) : I("", !0)
|
|
2173
|
+
], 64)) : I("", !0), !e.loading && e.editMode ? (W(), L("div", $n, [R("button", {
|
|
2180
2174
|
onClick: t[0] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
2181
2175
|
class: "control-btn",
|
|
2182
2176
|
"data-testid": "refresh-claim-btn",
|
|
2183
2177
|
title: "Refresh claim data"
|
|
2184
|
-
}, [...t[4] ||= [
|
|
2178
|
+
}, [...t[4] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]])])) : I("", !0)]);
|
|
2185
2179
|
}
|
|
2186
|
-
var tr = /*#__PURE__*/
|
|
2180
|
+
var tr = /*#__PURE__*/ e(qn, [["render", er], ["__scopeId", "data-v-f46fbf38"]]), nr = V({
|
|
2187
2181
|
name: "DashboardAppendixHeader",
|
|
2188
2182
|
props: {
|
|
2189
2183
|
dashboardId: {
|
|
@@ -2200,21 +2194,21 @@ var tr = /*#__PURE__*/ t(qn, [["render", er], ["__scopeId", "data-v-f46fbf38"]])
|
|
|
2200
2194
|
}
|
|
2201
2195
|
},
|
|
2202
2196
|
setup(e) {
|
|
2203
|
-
let t =
|
|
2204
|
-
return { label:
|
|
2197
|
+
let t = P(() => e.getItemData(e.itemId, e.dashboardId));
|
|
2198
|
+
return { label: P(() => (t.value.name || "Appendix").replace(/^#+\s*/, "").trim()) };
|
|
2205
2199
|
}
|
|
2206
2200
|
}), rr = { class: "appendix-header no-drag" }, ir = { class: "appendix-label" };
|
|
2207
2201
|
function ar(e, t, n, r, i, a) {
|
|
2208
|
-
return
|
|
2209
|
-
t[0] ||=
|
|
2210
|
-
|
|
2211
|
-
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", {
|
|
2212
2206
|
class: "appendix-rule",
|
|
2213
2207
|
"aria-hidden": "true"
|
|
2214
2208
|
}, null, -1)
|
|
2215
2209
|
]);
|
|
2216
2210
|
}
|
|
2217
|
-
var or = /*#__PURE__*/
|
|
2211
|
+
var or = /*#__PURE__*/ e(nr, [["render", ar], ["__scopeId", "data-v-46b63709"]]), sr = 8, cr = 200, lr = 512, ur = 2e3;
|
|
2218
2212
|
function dr(e) {
|
|
2219
2213
|
return typeof e == "string" ? e.length <= lr : typeof e == "number" ? Number.isFinite(e) : e instanceof Date && !Number.isNaN(e.getTime());
|
|
2220
2214
|
}
|
|
@@ -2290,7 +2284,7 @@ function mr(e) {
|
|
|
2290
2284
|
}
|
|
2291
2285
|
}
|
|
2292
2286
|
function hr(e) {
|
|
2293
|
-
return Math.min(
|
|
2287
|
+
return Math.min(T, Math.max(40, Math.round(e)));
|
|
2294
2288
|
}
|
|
2295
2289
|
function gr(e) {
|
|
2296
2290
|
if (!e?.headers) return [];
|
|
@@ -2355,7 +2349,7 @@ var br = 40, xr = class {
|
|
|
2355
2349
|
handleWindowMessage(e) {
|
|
2356
2350
|
if (this.destroyed || this.port || !this.frame || e.source !== this.frame.contentWindow) return;
|
|
2357
2351
|
let t = e.data;
|
|
2358
|
-
|
|
2352
|
+
t && typeof t == "object" && t.type === "trilogy-freeform-hello" && t.v === 1 && this.connect();
|
|
2359
2353
|
}
|
|
2360
2354
|
connect() {
|
|
2361
2355
|
let e = this.frame?.contentWindow;
|
|
@@ -2388,13 +2382,11 @@ var br = 40, xr = class {
|
|
|
2388
2382
|
case "resize":
|
|
2389
2383
|
this.options.onResize(t.height);
|
|
2390
2384
|
break;
|
|
2391
|
-
case "log":
|
|
2392
|
-
this.options.onLog(t.level, t.message);
|
|
2393
|
-
break;
|
|
2385
|
+
case "log": this.options.onLog(t.level, t.message);
|
|
2394
2386
|
}
|
|
2395
2387
|
}
|
|
2396
2388
|
postState(e) {
|
|
2397
|
-
if (this.lastState = e,
|
|
2389
|
+
if (this.lastState = e, this.port && !this.destroyed) try {
|
|
2398
2390
|
this.port.postMessage({
|
|
2399
2391
|
type: "state",
|
|
2400
2392
|
v: 1,
|
|
@@ -2405,7 +2397,7 @@ var br = 40, xr = class {
|
|
|
2405
2397
|
}
|
|
2406
2398
|
}
|
|
2407
2399
|
postTheme(e) {
|
|
2408
|
-
this.lastTheme = e,
|
|
2400
|
+
this.lastTheme = e, this.port && !this.destroyed && this.port.postMessage({
|
|
2409
2401
|
type: "theme",
|
|
2410
2402
|
v: 1,
|
|
2411
2403
|
theme: e
|
|
@@ -2421,7 +2413,7 @@ var br = 40, xr = class {
|
|
|
2421
2413
|
'use strict';
|
|
2422
2414
|
|
|
2423
2415
|
var VERSION = 1;
|
|
2424
|
-
var HELLO = '${
|
|
2416
|
+
var HELLO = '${O}';
|
|
2425
2417
|
|
|
2426
2418
|
var port = null;
|
|
2427
2419
|
var pending = [];
|
|
@@ -2604,7 +2596,7 @@ function wr(e) {
|
|
|
2604
2596
|
return /^https:\/\/[a-z0-9.-]+(:\d+)?$/i.test(e);
|
|
2605
2597
|
}
|
|
2606
2598
|
function Tr(e = {}) {
|
|
2607
|
-
let t = (e.cdnOrigins ??
|
|
2599
|
+
let t = (e.cdnOrigins ?? ne).filter(wr), n = t.length ? " " + t.join(" ") : "";
|
|
2608
2600
|
return [
|
|
2609
2601
|
"default-src 'none'",
|
|
2610
2602
|
`script-src 'unsafe-inline' 'unsafe-eval' blob:${n}`,
|
|
@@ -2834,10 +2826,10 @@ function Nr(e) {
|
|
|
2834
2826
|
}
|
|
2835
2827
|
//#endregion
|
|
2836
2828
|
//#region components/dashboard/DashboardFreeform.vue?vue&type=script&lang.ts
|
|
2837
|
-
var Pr =
|
|
2829
|
+
var Pr = V({
|
|
2838
2830
|
name: "DashboardFreeform",
|
|
2839
2831
|
components: {
|
|
2840
|
-
ErrorMessage:
|
|
2832
|
+
ErrorMessage: j,
|
|
2841
2833
|
LoadingView: ue
|
|
2842
2834
|
},
|
|
2843
2835
|
props: {
|
|
@@ -2871,31 +2863,31 @@ var Pr = B({
|
|
|
2871
2863
|
}
|
|
2872
2864
|
},
|
|
2873
2865
|
emits: ["dimension-click", "background-click"],
|
|
2874
|
-
setup(
|
|
2875
|
-
let r =
|
|
2876
|
-
dashboardId: () =>
|
|
2877
|
-
itemId: () =>
|
|
2866
|
+
setup(e, { emit: n }) {
|
|
2867
|
+
let r = G(null), i = G(null), a = G(null), o = G(0), s = null, c = null, l = P(() => e.getItemData(e.itemId, e.dashboardId)), u = P(() => l.value.freeformData || null), d = P(() => u.value?.html || ""), f = P(() => l.value.structured_content?.query || ""), p = P(() => l.value.results || null), m = P(() => l.value.loading || !1), h = P(() => l.value.error || null), g = P(() => l.value.filters || []), _ = P(() => l.value.loadStartTime || null), v = P(() => l.value.onRefresh || null), y = P(() => l.value.name || "Custom widget"), b = H("analyticsStore", null), x = H("userSettingsStore", null), S = t(x), { chartContainer: C, showLoading: w, controlsVisible: ee, handleLocalRefresh: T, onChartMouseEnter: te, onChartMouseLeave: D } = an({
|
|
2868
|
+
dashboardId: () => e.dashboardId,
|
|
2869
|
+
itemId: () => e.itemId,
|
|
2878
2870
|
query: f,
|
|
2879
2871
|
results: p,
|
|
2880
2872
|
loading: m,
|
|
2881
2873
|
onRefresh: v,
|
|
2882
|
-
getDashboardQueryExecutor:
|
|
2874
|
+
getDashboardQueryExecutor: e.getDashboardQueryExecutor,
|
|
2883
2875
|
analyticsStore: b,
|
|
2884
2876
|
analyticsEvent: "dashboard-freeform-execution",
|
|
2885
2877
|
analyticsType: "FREEFORM",
|
|
2886
2878
|
loadingDelayMs: 250
|
|
2887
2879
|
});
|
|
2888
|
-
function
|
|
2880
|
+
function O() {
|
|
2889
2881
|
return Nr({
|
|
2890
|
-
mode:
|
|
2891
|
-
element:
|
|
2882
|
+
mode: S.value,
|
|
2883
|
+
element: C.value
|
|
2892
2884
|
});
|
|
2893
2885
|
}
|
|
2894
|
-
let
|
|
2886
|
+
let ne = P(() => d.value ? (o.value, S.value, kr({
|
|
2895
2887
|
html: d.value,
|
|
2896
|
-
theme:
|
|
2897
|
-
})) : ""),
|
|
2898
|
-
function
|
|
2888
|
+
theme: O()
|
|
2889
|
+
})) : ""), re = P(() => a.value ? { height: `${a.value}px` } : void 0);
|
|
2890
|
+
function ie() {
|
|
2899
2891
|
s && s.postState(yr({
|
|
2900
2892
|
status: m.value ? "loading" : h.value ? "error" : "ready",
|
|
2901
2893
|
results: p.value,
|
|
@@ -2903,89 +2895,89 @@ var Pr = B({
|
|
|
2903
2895
|
error: h.value
|
|
2904
2896
|
}));
|
|
2905
2897
|
}
|
|
2906
|
-
function
|
|
2898
|
+
function ae() {
|
|
2907
2899
|
c &&= (clearTimeout(c), null);
|
|
2908
2900
|
}
|
|
2909
|
-
function
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
},
|
|
2901
|
+
function oe() {
|
|
2902
|
+
ae(), c = setTimeout(() => {
|
|
2903
|
+
s?.connected && !i.value && (i.value = "Widget did not finish loading.");
|
|
2904
|
+
}, E);
|
|
2913
2905
|
}
|
|
2914
|
-
function
|
|
2915
|
-
if (
|
|
2906
|
+
function k(t) {
|
|
2907
|
+
if (t.mode === "clear") {
|
|
2916
2908
|
n("background-click");
|
|
2917
2909
|
return;
|
|
2918
2910
|
}
|
|
2919
|
-
let r = _r(
|
|
2911
|
+
let r = _r(t.filters, p.value), i = {};
|
|
2920
2912
|
for (let [e, t] of Object.entries(r)) (t.op === "eq" || t.op === "in") && (i[e] = t.value);
|
|
2921
2913
|
n("dimension-click", {
|
|
2922
|
-
source:
|
|
2914
|
+
source: e.itemId,
|
|
2923
2915
|
filters: r,
|
|
2924
2916
|
chart: i,
|
|
2925
|
-
append:
|
|
2917
|
+
append: t.mode === "append"
|
|
2926
2918
|
});
|
|
2927
2919
|
}
|
|
2928
|
-
function k() {
|
|
2929
|
-
ie(), s?.destroy(), s = null;
|
|
2930
|
-
}
|
|
2931
2920
|
function A() {
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2921
|
+
ae(), s?.destroy(), s = null;
|
|
2922
|
+
}
|
|
2923
|
+
function se() {
|
|
2924
|
+
A();
|
|
2925
|
+
let t = r.value;
|
|
2926
|
+
t && (i.value = null, s = new xr({
|
|
2927
|
+
itemId: e.itemId,
|
|
2928
|
+
editMode: e.editMode,
|
|
2937
2929
|
onReady: () => {
|
|
2938
|
-
|
|
2930
|
+
ae(), i.value = null;
|
|
2939
2931
|
},
|
|
2940
|
-
onFilter:
|
|
2941
|
-
onRefresh: () =>
|
|
2932
|
+
onFilter: k,
|
|
2933
|
+
onRefresh: () => T(),
|
|
2942
2934
|
onResize: (e) => {
|
|
2943
2935
|
a.value = e;
|
|
2944
2936
|
},
|
|
2945
|
-
onLog: (
|
|
2946
|
-
let r = `[widget ${
|
|
2947
|
-
|
|
2937
|
+
onLog: (t, n) => {
|
|
2938
|
+
let r = `[widget ${e.itemId}]`;
|
|
2939
|
+
t === "error" ? console.error(r, n) : t === "warn" ? console.warn(r, n) : console.log(r, n);
|
|
2948
2940
|
}
|
|
2949
|
-
}), s.attach(
|
|
2941
|
+
}), s.attach(t), s.postTheme(O()), ie(), oe());
|
|
2950
2942
|
}
|
|
2951
|
-
function
|
|
2943
|
+
function ce() {
|
|
2952
2944
|
a.value = null, o.value += 1;
|
|
2953
2945
|
}
|
|
2954
|
-
return
|
|
2946
|
+
return X([ne, r], ([e, t]) => {
|
|
2955
2947
|
if (!e || !t) {
|
|
2956
|
-
|
|
2948
|
+
A();
|
|
2957
2949
|
return;
|
|
2958
2950
|
}
|
|
2959
|
-
|
|
2951
|
+
se();
|
|
2960
2952
|
}, {
|
|
2961
2953
|
immediate: !0,
|
|
2962
2954
|
flush: "post"
|
|
2963
|
-
}),
|
|
2955
|
+
}), X([
|
|
2964
2956
|
p,
|
|
2965
2957
|
m,
|
|
2966
2958
|
h,
|
|
2967
2959
|
g
|
|
2968
|
-
], () =>
|
|
2969
|
-
await
|
|
2970
|
-
}),
|
|
2971
|
-
chartContainer:
|
|
2960
|
+
], () => ie()), X(S, async () => {
|
|
2961
|
+
await xe(), s?.postTheme(O());
|
|
2962
|
+
}), Ce(A), {
|
|
2963
|
+
chartContainer: C,
|
|
2972
2964
|
frameRef: r,
|
|
2973
|
-
srcdoc:
|
|
2974
|
-
frameStyle:
|
|
2965
|
+
srcdoc: ne,
|
|
2966
|
+
frameStyle: re,
|
|
2975
2967
|
html: d,
|
|
2976
2968
|
query: f,
|
|
2977
2969
|
filters: g,
|
|
2978
2970
|
loading: m,
|
|
2979
|
-
showLoading:
|
|
2971
|
+
showLoading: w,
|
|
2980
2972
|
error: h,
|
|
2981
2973
|
startTime: _,
|
|
2982
|
-
controlsVisible:
|
|
2974
|
+
controlsVisible: ee,
|
|
2983
2975
|
widgetFailure: i,
|
|
2984
2976
|
widgetTitle: y,
|
|
2985
|
-
handleLocalRefresh:
|
|
2986
|
-
onChartMouseEnter:
|
|
2987
|
-
onChartMouseLeave:
|
|
2988
|
-
reloadWidget:
|
|
2977
|
+
handleLocalRefresh: T,
|
|
2978
|
+
onChartMouseEnter: te,
|
|
2979
|
+
onChartMouseLeave: D,
|
|
2980
|
+
reloadWidget: ce,
|
|
2989
2981
|
FREEFORM_SANDBOX: Cr
|
|
2990
2982
|
};
|
|
2991
2983
|
}
|
|
@@ -3004,14 +2996,14 @@ var Pr = B({
|
|
|
3004
2996
|
class: "loading-overlay"
|
|
3005
2997
|
};
|
|
3006
2998
|
function Br(e, t, n, r, i, a) {
|
|
3007
|
-
let o =
|
|
3008
|
-
return
|
|
2999
|
+
let o = q("ErrorMessage"), s = q("LoadingView");
|
|
3000
|
+
return W(), L("div", {
|
|
3009
3001
|
ref: "chartContainer",
|
|
3010
3002
|
class: "freeform-placeholder no-drag",
|
|
3011
3003
|
onMouseenter: t[3] ||= (...t) => e.onChartMouseEnter && e.onChartMouseEnter(...t),
|
|
3012
3004
|
onMouseleave: t[4] ||= (...t) => e.onChartMouseLeave && e.onChartMouseLeave(...t)
|
|
3013
3005
|
}, [
|
|
3014
|
-
e.error && !e.loading ? (
|
|
3006
|
+
e.error && !e.loading ? (W(), F(o, {
|
|
3015
3007
|
key: 0,
|
|
3016
3008
|
compact: !0,
|
|
3017
3009
|
details: e.error,
|
|
@@ -3021,43 +3013,43 @@ function Br(e, t, n, r, i, a) {
|
|
|
3021
3013
|
"details",
|
|
3022
3014
|
"query",
|
|
3023
3015
|
"filters"
|
|
3024
|
-
])) : e.html ? (
|
|
3016
|
+
])) : e.html ? (W(), L(N, { key: 2 }, [R("iframe", {
|
|
3025
3017
|
ref: "frameRef",
|
|
3026
|
-
class:
|
|
3018
|
+
class: U(["freeform-frame", { "freeform-frame-hidden": !!e.widgetFailure }]),
|
|
3027
3019
|
sandbox: e.FREEFORM_SANDBOX,
|
|
3028
3020
|
srcdoc: e.srcdoc,
|
|
3029
3021
|
title: e.widgetTitle,
|
|
3030
3022
|
referrerpolicy: "no-referrer",
|
|
3031
3023
|
allow: "",
|
|
3032
|
-
style:
|
|
3033
|
-
}, null, 14, Ir), e.widgetFailure ? (
|
|
3034
|
-
t[5] ||=
|
|
3035
|
-
|
|
3036
|
-
|
|
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", {
|
|
3037
3029
|
class: "freeform-retry",
|
|
3038
3030
|
"data-testid": "freeform-retry-btn",
|
|
3039
3031
|
onClick: t[0] ||= (...t) => e.reloadWidget && e.reloadWidget(...t)
|
|
3040
3032
|
}, " Reload widget ")
|
|
3041
|
-
])) :
|
|
3042
|
-
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, {
|
|
3043
3035
|
startTime: e.startTime,
|
|
3044
3036
|
text: "",
|
|
3045
3037
|
subtle: ""
|
|
3046
|
-
}, null, 8, ["startTime"])])) :
|
|
3047
|
-
|
|
3038
|
+
}, null, 8, ["startTime"])])) : I("", !0),
|
|
3039
|
+
R("div", { class: U(["controls-toggle", { "controls-visible": e.controlsVisible }]) }, [R("button", {
|
|
3048
3040
|
onClick: t[1] ||= (...t) => e.handleLocalRefresh && e.handleLocalRefresh(...t),
|
|
3049
3041
|
class: "control-btn",
|
|
3050
3042
|
"data-testid": "refresh-freeform-btn",
|
|
3051
3043
|
title: "Refresh widget data"
|
|
3052
|
-
}, [...t[6] ||= [
|
|
3044
|
+
}, [...t[6] ||= [R("i", { class: "mdi mdi-refresh icon" }, null, -1)]]), R("button", {
|
|
3053
3045
|
onClick: t[2] ||= (...t) => e.reloadWidget && e.reloadWidget(...t),
|
|
3054
3046
|
class: "control-btn",
|
|
3055
3047
|
"data-testid": "reload-freeform-btn",
|
|
3056
3048
|
title: "Reload widget"
|
|
3057
|
-
}, [...t[7] ||= [
|
|
3049
|
+
}, [...t[7] ||= [R("i", { class: "mdi mdi-reload icon" }, null, -1)]])], 2)
|
|
3058
3050
|
], 544);
|
|
3059
3051
|
}
|
|
3060
|
-
var Vr = /*#__PURE__*/
|
|
3052
|
+
var Vr = /*#__PURE__*/ e(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]]), Hr = ["data-testid"], Ur = ["data-testid"], Wr = ["data-testid"], Gr = ["data-testid"], Kr = {
|
|
3061
3053
|
key: 1,
|
|
3062
3054
|
class: "grid-item-header"
|
|
3063
3055
|
}, qr = { class: "grid-item-header-left" }, Jr = {
|
|
@@ -3075,7 +3067,7 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3075
3067
|
}, bi = {
|
|
3076
3068
|
key: 1,
|
|
3077
3069
|
class: "mdi mdi-filter-outline icon"
|
|
3078
|
-
}, 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__*/ e(/* @__PURE__ */ V({
|
|
3079
3071
|
__name: "DashboardGridItem",
|
|
3080
3072
|
props: {
|
|
3081
3073
|
dashboardId: {},
|
|
@@ -3096,7 +3088,7 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3096
3088
|
"copy-item"
|
|
3097
3089
|
],
|
|
3098
3090
|
setup(e, { emit: t }) {
|
|
3099
|
-
let n = e, r = t, i =
|
|
3091
|
+
let n = e, r = t, i = G(!1), o = G(""), s = G(!1), c = G(!1), l = G(null), u = G(null), d = G(null), f = G(null), p = G({});
|
|
3100
3092
|
function m(e) {
|
|
3101
3093
|
return e.replace(/'''/g, "'").replace("local.", "");
|
|
3102
3094
|
}
|
|
@@ -3117,14 +3109,14 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3117
3109
|
function _() {
|
|
3118
3110
|
if (!n.editMode) return;
|
|
3119
3111
|
let e = n.getItemData(n.item.i, n.dashboardId);
|
|
3120
|
-
s.value = !1, c.value = !1, i.value = !0,
|
|
3112
|
+
s.value = !1, c.value = !1, i.value = !0, o.value = e.name, setTimeout(() => {
|
|
3121
3113
|
let e = document.getElementById(`title-input-${n.item.i}`);
|
|
3122
3114
|
e && e.focus();
|
|
3123
3115
|
}, 0);
|
|
3124
3116
|
}
|
|
3125
3117
|
function v() {
|
|
3126
3118
|
if (i.value) {
|
|
3127
|
-
let e = n.getItemData(n.item.i, n.dashboardId), t =
|
|
3119
|
+
let e = n.getItemData(n.item.i, n.dashboardId), t = o.value.trim() || e.name;
|
|
3128
3120
|
n.setItemData(n.item.i, n.dashboardId, { name: t }), i.value = !1;
|
|
3129
3121
|
}
|
|
3130
3122
|
}
|
|
@@ -3159,10 +3151,10 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3159
3151
|
function w() {
|
|
3160
3152
|
confirm(`Are you sure you want to remove "${D.value.name}"?`) && r("remove-item", n.item.i);
|
|
3161
3153
|
}
|
|
3162
|
-
function
|
|
3154
|
+
function ee() {
|
|
3163
3155
|
r("copy-item", n.item.i);
|
|
3164
3156
|
}
|
|
3165
|
-
function
|
|
3157
|
+
function T(e) {
|
|
3166
3158
|
r("dimension-click", e);
|
|
3167
3159
|
}
|
|
3168
3160
|
function E() {
|
|
@@ -3171,50 +3163,50 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3171
3163
|
function te(e) {
|
|
3172
3164
|
r("remove-filter", n.item.i, e);
|
|
3173
3165
|
}
|
|
3174
|
-
let D =
|
|
3166
|
+
let D = P(() => n.getItemData(n.item.i, n.dashboardId)), O = P(() => D.value.type === a.SECTION_HEADER), ne = P(() => D.value.type === a.FREEFORM), re = P(() => {
|
|
3175
3167
|
switch (D.value.type) {
|
|
3176
|
-
case
|
|
3177
|
-
case
|
|
3178
|
-
case
|
|
3179
|
-
case
|
|
3180
|
-
case
|
|
3181
|
-
case
|
|
3182
|
-
case
|
|
3183
|
-
case
|
|
3184
|
-
case
|
|
3168
|
+
case a.CHART: return ln;
|
|
3169
|
+
case a.TABLE: return gn;
|
|
3170
|
+
case a.FILTER: return Nn;
|
|
3171
|
+
case a.SECTION_HEADER: return null;
|
|
3172
|
+
case a.MEMO: return Kn;
|
|
3173
|
+
case a.CLAIM: return tr;
|
|
3174
|
+
case a.APPENDIX_HEADER: return or;
|
|
3175
|
+
case a.FREEFORM: return Vr;
|
|
3176
|
+
case a.MARKDOWN:
|
|
3185
3177
|
default: return fn;
|
|
3186
3178
|
}
|
|
3187
|
-
}), ie =
|
|
3179
|
+
}), ie = P(() => {
|
|
3188
3180
|
switch (D.value.type) {
|
|
3189
|
-
case
|
|
3190
|
-
case
|
|
3191
|
-
case
|
|
3192
|
-
case
|
|
3193
|
-
case
|
|
3194
|
-
case
|
|
3195
|
-
case
|
|
3196
|
-
case
|
|
3197
|
-
case
|
|
3181
|
+
case a.CHART: return "Chart Name";
|
|
3182
|
+
case a.TABLE: return "Table Name";
|
|
3183
|
+
case a.FILTER: return "Filter Name";
|
|
3184
|
+
case a.SECTION_HEADER: return "Section Header";
|
|
3185
|
+
case a.MEMO: return "Executive Memo";
|
|
3186
|
+
case a.CLAIM: return "Claim";
|
|
3187
|
+
case a.APPENDIX_HEADER: return "Appendix";
|
|
3188
|
+
case a.FREEFORM: return "Widget Name";
|
|
3189
|
+
case a.MARKDOWN:
|
|
3198
3190
|
default: return "Note Name";
|
|
3199
3191
|
}
|
|
3200
3192
|
}), oe = [
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
],
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
], se =
|
|
3193
|
+
a.CHART,
|
|
3194
|
+
a.TABLE,
|
|
3195
|
+
a.MARKDOWN,
|
|
3196
|
+
a.FREEFORM
|
|
3197
|
+
], A = [
|
|
3198
|
+
a.CHART,
|
|
3199
|
+
a.TABLE,
|
|
3200
|
+
a.FILTER,
|
|
3201
|
+
a.FREEFORM
|
|
3202
|
+
], se = P(() => oe.includes(D.value.type)), ce = P(() => A.includes(D.value.type)), j = P(() => D.value.filters ? D.value.filters.length : 0), le = P(() => (D.value.filters || []).slice(0, 2)), ue = P(() => Math.max(0, j.value - le.value.length)), de = P(() => {
|
|
3211
3203
|
let e = D.value.filters || [];
|
|
3212
3204
|
return ["global", "cross"].map((t) => ({
|
|
3213
3205
|
type: t,
|
|
3214
3206
|
filters: e.filter((e) => t === "global" ? e.source === "global" : e.source !== "global")
|
|
3215
3207
|
})).filter((e) => e.filters.length > 0);
|
|
3216
|
-
}),
|
|
3217
|
-
async function
|
|
3208
|
+
}), fe = P(() => de.value.find((e) => e.type === f.value)?.filters || []);
|
|
3209
|
+
async function pe(e, t) {
|
|
3218
3210
|
if (f.value === t) {
|
|
3219
3211
|
f.value = null;
|
|
3220
3212
|
return;
|
|
@@ -3225,7 +3217,7 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3225
3217
|
left: `${c}px`,
|
|
3226
3218
|
top: `${n.bottom + 6}px`,
|
|
3227
3219
|
width: `${s}px`
|
|
3228
|
-
}, await
|
|
3220
|
+
}, await xe();
|
|
3229
3221
|
let l = d.value;
|
|
3230
3222
|
if (!l) return;
|
|
3231
3223
|
let u = l.getBoundingClientRect(), m = a + (r?.height ?? window.innerHeight);
|
|
@@ -3237,7 +3229,7 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3237
3229
|
ae(() => d.value, () => {
|
|
3238
3230
|
f.value = null;
|
|
3239
3231
|
}, { enabled: () => f.value !== null });
|
|
3240
|
-
function
|
|
3232
|
+
function me(e, t) {
|
|
3241
3233
|
let n = e?.trim();
|
|
3242
3234
|
if (!n) return {
|
|
3243
3235
|
text: t,
|
|
@@ -3257,59 +3249,59 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3257
3249
|
level: 3
|
|
3258
3250
|
};
|
|
3259
3251
|
}
|
|
3260
|
-
let
|
|
3261
|
-
function
|
|
3262
|
-
|
|
3252
|
+
let he = P(() => me(D.value.name, ie.value)), M = P(() => he.value.text), ge = P(() => `item-title-level-${he.value.level}`), _e = P(() => s.value && !i.value && !c.value);
|
|
3253
|
+
function ve() {
|
|
3254
|
+
_e.value && (c.value = !0, s.value = !1);
|
|
3263
3255
|
}
|
|
3264
|
-
function
|
|
3256
|
+
function ye() {
|
|
3265
3257
|
s.value = !0, c.value = !1;
|
|
3266
3258
|
}
|
|
3267
|
-
function
|
|
3259
|
+
function z() {
|
|
3268
3260
|
s.value = !1, c.value = !1;
|
|
3269
3261
|
}
|
|
3270
|
-
return ae([l, u],
|
|
3271
|
-
enabled: () =>
|
|
3262
|
+
return ae([l, u], ve, {
|
|
3263
|
+
enabled: () => _e.value,
|
|
3272
3264
|
eventName: "mousedown"
|
|
3273
|
-
}), (t, r) => (
|
|
3274
|
-
class:
|
|
3265
|
+
}), (t, r) => (W(), L(N, null, [R("div", {
|
|
3266
|
+
class: U(["grid-item-content", {
|
|
3275
3267
|
"grid-item-chart-style": ce.value,
|
|
3276
|
-
"grid-item-markdown-style": D.value.type ===
|
|
3268
|
+
"grid-item-markdown-style": D.value.type === Y(a).MARKDOWN,
|
|
3277
3269
|
"grid-item-section-header-style": O.value,
|
|
3278
3270
|
"grid-item-edit-style": e.editMode
|
|
3279
3271
|
}]),
|
|
3280
3272
|
"data-testid": `dashboard-component-${e.item.i}`,
|
|
3281
|
-
onMouseenter:
|
|
3282
|
-
onMouseleave:
|
|
3273
|
+
onMouseenter: ye,
|
|
3274
|
+
onMouseleave: z
|
|
3283
3275
|
}, [
|
|
3284
|
-
e.editMode && O.value ? (
|
|
3276
|
+
e.editMode && O.value ? (W(), L("div", {
|
|
3285
3277
|
key: 0,
|
|
3286
|
-
class:
|
|
3287
|
-
}, [
|
|
3278
|
+
class: U(["dev-toolbar-shell", { "dev-toolbar-visible": _e.value }])
|
|
3279
|
+
}, [R("div", {
|
|
3288
3280
|
ref_key: "devToolbarRef",
|
|
3289
3281
|
ref: u,
|
|
3290
3282
|
class: "dev-toolbar",
|
|
3291
3283
|
"data-testid": "dashboard-item-header-controls"
|
|
3292
3284
|
}, [
|
|
3293
|
-
|
|
3285
|
+
R("button", {
|
|
3294
3286
|
onClick: C,
|
|
3295
3287
|
class: "control-btn",
|
|
3296
3288
|
"data-testid": `edit-dashboard-item-content-${e.item.i}`,
|
|
3297
3289
|
title: "Edit title"
|
|
3298
|
-
}, [...r[4] ||= [
|
|
3299
|
-
|
|
3300
|
-
onClick:
|
|
3290
|
+
}, [...r[4] ||= [R("i", { class: "mdi mdi-pencil-outline icon" }, null, -1)]], 8, Ur),
|
|
3291
|
+
R("button", {
|
|
3292
|
+
onClick: ee,
|
|
3301
3293
|
class: "control-btn",
|
|
3302
3294
|
"data-testid": `copy-dashboard-item-${e.item.i}`,
|
|
3303
3295
|
title: "Copy item"
|
|
3304
|
-
}, [...r[5] ||= [
|
|
3305
|
-
|
|
3296
|
+
}, [...r[5] ||= [R("i", { class: "mdi mdi-content-copy icon" }, null, -1)]], 8, Wr),
|
|
3297
|
+
R("button", {
|
|
3306
3298
|
onClick: w,
|
|
3307
3299
|
class: "control-btn dashboard-remove-btn",
|
|
3308
3300
|
"data-testid": `remove-dashboard-item-${e.item.i}`,
|
|
3309
3301
|
title: "Remove item"
|
|
3310
|
-
}, [...r[6] ||= [
|
|
3311
|
-
], 512)], 2)) :
|
|
3312
|
-
O.value ?
|
|
3302
|
+
}, [...r[6] ||= [R("i", { class: "mdi mdi-delete-outline icon" }, null, -1)]], 8, Gr)
|
|
3303
|
+
], 512)], 2)) : I("", !0),
|
|
3304
|
+
O.value ? I("", !0) : (W(), L("div", Kr, [R("div", qr, [e.editMode ? (W(), L("div", Jr, [...r[7] ||= [R("svg", {
|
|
3313
3305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3314
3306
|
width: "16",
|
|
3315
3307
|
height: "16",
|
|
@@ -3321,97 +3313,97 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3321
3313
|
"stroke-linejoin": "round",
|
|
3322
3314
|
class: "drag-handle-svg"
|
|
3323
3315
|
}, [
|
|
3324
|
-
|
|
3316
|
+
R("line", {
|
|
3325
3317
|
x1: "3",
|
|
3326
3318
|
y1: "12",
|
|
3327
3319
|
x2: "21",
|
|
3328
3320
|
y2: "12"
|
|
3329
3321
|
}),
|
|
3330
|
-
|
|
3322
|
+
R("line", {
|
|
3331
3323
|
x1: "3",
|
|
3332
3324
|
y1: "6",
|
|
3333
3325
|
x2: "21",
|
|
3334
3326
|
y2: "6"
|
|
3335
3327
|
}),
|
|
3336
|
-
|
|
3328
|
+
R("line", {
|
|
3337
3329
|
x1: "3",
|
|
3338
3330
|
y1: "18",
|
|
3339
3331
|
x2: "21",
|
|
3340
3332
|
y2: "18"
|
|
3341
3333
|
})
|
|
3342
|
-
], -1)]])) :
|
|
3334
|
+
], -1)]])) : I("", !0), R("div", Yr, [i.value ? je((W(), L("input", {
|
|
3343
3335
|
key: 1,
|
|
3344
3336
|
id: `title-input-${e.item.i}`,
|
|
3345
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
3337
|
+
"onUpdate:modelValue": r[0] ||= (e) => o.value = e,
|
|
3346
3338
|
onBlur: v,
|
|
3347
3339
|
onKeyup: [Me(v, ["enter"]), Me(S, ["esc"])],
|
|
3348
3340
|
class: "title-input",
|
|
3349
3341
|
type: "text",
|
|
3350
3342
|
placeholder: ie.value
|
|
3351
|
-
}, null, 40, $r)), [[
|
|
3343
|
+
}, null, 40, $r)), [[ke, o.value]]) : (W(), L("div", {
|
|
3352
3344
|
key: 0,
|
|
3353
|
-
class:
|
|
3354
|
-
title:
|
|
3345
|
+
class: U(["item-title editable-title", [ge.value, { "item-title-static": !e.editMode }]]),
|
|
3346
|
+
title: M.value,
|
|
3355
3347
|
onClick: _
|
|
3356
|
-
}, [
|
|
3348
|
+
}, [R("span", Zr, J(M.value), 1), e.editMode ? (W(), L("i", Qr)) : I("", !0)], 10, Xr))])]), R("div", ei, [ne.value ? (W(), F(k, {
|
|
3357
3349
|
key: 0,
|
|
3358
3350
|
content: "Custom code widget — runs in a sandboxed frame with no network or app access",
|
|
3359
3351
|
position: "bottom"
|
|
3360
3352
|
}, {
|
|
3361
|
-
default:
|
|
3353
|
+
default: Z(() => [...r[8] ||= [R("span", {
|
|
3362
3354
|
class: "widget-badge",
|
|
3363
3355
|
"data-testid": "freeform-widget-badge"
|
|
3364
|
-
}, [
|
|
3356
|
+
}, [R("i", { class: "mdi mdi-code-braces" })], -1)]]),
|
|
3365
3357
|
_: 1
|
|
3366
|
-
})) :
|
|
3358
|
+
})) : I("", !0), se.value && j.value > 0 ? (W(), L("div", ti, [R("div", ni, [(W(!0), L(N, null, K(le.value, (t, n) => (W(), F(k, {
|
|
3367
3359
|
key: `${t.source}-${t.value}-${n}`,
|
|
3368
3360
|
content: h(t.value, t.parameters),
|
|
3369
3361
|
position: "bottom"
|
|
3370
3362
|
}, {
|
|
3371
|
-
default:
|
|
3372
|
-
|
|
3373
|
-
|
|
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", {
|
|
3374
3366
|
class: "filter-copy-btn",
|
|
3375
3367
|
onClick: Ne((e) => g(t.value, t.parameters), ["stop"]),
|
|
3376
3368
|
title: "Copy filter value"
|
|
3377
3369
|
}, " ⎘ ", 8, si),
|
|
3378
|
-
e.editMode && t.source !== "global" ? (
|
|
3370
|
+
e.editMode && t.source !== "global" ? (W(), L("button", {
|
|
3379
3371
|
key: 0,
|
|
3380
3372
|
class: "filter-remove-btn",
|
|
3381
3373
|
onClick: (e) => te(t.source),
|
|
3382
3374
|
title: `Remove ${t.source} filter`
|
|
3383
|
-
}, " x ", 8, ci)) :
|
|
3375
|
+
}, " x ", 8, ci)) : I("", !0)
|
|
3384
3376
|
])]),
|
|
3385
3377
|
_: 2
|
|
3386
|
-
}, 1032, ["content"]))), 128)),
|
|
3378
|
+
}, 1032, ["content"]))), 128)), ue.value > 0 ? (W(), F(k, {
|
|
3387
3379
|
key: 0,
|
|
3388
|
-
content: `${
|
|
3380
|
+
content: `${ue.value} more filter(s)`,
|
|
3389
3381
|
position: "bottom"
|
|
3390
3382
|
}, {
|
|
3391
|
-
default:
|
|
3383
|
+
default: Z(() => [R("div", li, "+" + J(ue.value), 1)]),
|
|
3392
3384
|
_: 1
|
|
3393
|
-
}, 8, ["content"])) :
|
|
3385
|
+
}, 8, ["content"])) : I("", !0)]), R("div", ui, [(W(!0), L(N, null, K(de.value, (e) => (W(), L("button", {
|
|
3394
3386
|
key: e.type,
|
|
3395
3387
|
type: "button",
|
|
3396
3388
|
class: "header-filter-chip mobile-filter-summary",
|
|
3397
3389
|
"aria-expanded": f.value === e.type,
|
|
3398
|
-
onClick: Ne((t) =>
|
|
3399
|
-
},
|
|
3400
|
-
|
|
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": O.value }]) }, [O.value ? (W(), L(N, { key: 0 }, [i.value ? je((W(), L("input", {
|
|
3401
3393
|
key: 1,
|
|
3402
3394
|
id: `title-input-${e.item.i}`,
|
|
3403
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
3395
|
+
"onUpdate:modelValue": r[1] ||= (e) => o.value = e,
|
|
3404
3396
|
onBlur: v,
|
|
3405
3397
|
onKeyup: [Me(v, ["enter"]), Me(S, ["esc"])],
|
|
3406
3398
|
class: "title-input section-header-input no-drag",
|
|
3407
3399
|
type: "text",
|
|
3408
3400
|
placeholder: ie.value
|
|
3409
|
-
}, null, 40, mi)), [[
|
|
3401
|
+
}, null, 40, mi)), [[ke, o.value]]) : (W(), L("div", {
|
|
3410
3402
|
key: 0,
|
|
3411
|
-
class:
|
|
3412
|
-
title:
|
|
3403
|
+
class: U(["section-header-display no-drag", [ge.value, { "section-header-editable": e.editMode }]]),
|
|
3404
|
+
title: M.value,
|
|
3413
3405
|
onClick: _
|
|
3414
|
-
}, [
|
|
3406
|
+
}, [R("span", pi, J(M.value), 1)], 10, fi))], 64)) : (W(), F(De(re.value), {
|
|
3415
3407
|
key: 1,
|
|
3416
3408
|
dashboardId: n.dashboardId,
|
|
3417
3409
|
itemId: e.item.i,
|
|
@@ -3420,7 +3412,7 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3420
3412
|
getDashboardQueryExecutor: e.getDashboardQueryExecutor,
|
|
3421
3413
|
editMode: e.editMode,
|
|
3422
3414
|
symbols: n.symbols || [],
|
|
3423
|
-
onDimensionClick:
|
|
3415
|
+
onDimensionClick: T,
|
|
3424
3416
|
onBackgroundClick: E
|
|
3425
3417
|
}, null, 40, [
|
|
3426
3418
|
"dashboardId",
|
|
@@ -3430,69 +3422,69 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3430
3422
|
"getDashboardQueryExecutor",
|
|
3431
3423
|
"editMode",
|
|
3432
3424
|
"symbols"
|
|
3433
|
-
])), e.editMode && !O.value ? (
|
|
3425
|
+
])), e.editMode && !O.value ? (W(), L("div", {
|
|
3434
3426
|
key: 2,
|
|
3435
|
-
class:
|
|
3436
|
-
}, [
|
|
3427
|
+
class: U(["content-edit-overlay no-drag", { "content-edit-overlay-visible": _e.value }])
|
|
3428
|
+
}, [R("div", {
|
|
3437
3429
|
ref_key: "contentEditToolbarRef",
|
|
3438
3430
|
ref: l,
|
|
3439
3431
|
class: "content-edit-toolbar",
|
|
3440
3432
|
"data-testid": "dashboard-item-header-controls"
|
|
3441
3433
|
}, [
|
|
3442
|
-
|
|
3434
|
+
R("button", {
|
|
3443
3435
|
onClick: b,
|
|
3444
3436
|
class: "control-btn",
|
|
3445
3437
|
"data-testid": `increase-height-item-${e.item.i}`,
|
|
3446
3438
|
title: "Increase height"
|
|
3447
|
-
}, [...r[9] ||= [
|
|
3448
|
-
|
|
3439
|
+
}, [...r[9] ||= [R("i", { class: "mdi mdi-plus icon" }, null, -1)]], 8, hi),
|
|
3440
|
+
R("button", {
|
|
3449
3441
|
onClick: x,
|
|
3450
3442
|
class: "control-btn",
|
|
3451
3443
|
"data-testid": `decrease-height-item-${e.item.i}`,
|
|
3452
3444
|
title: "Decrease height"
|
|
3453
|
-
}, [...r[10] ||= [
|
|
3454
|
-
|
|
3445
|
+
}, [...r[10] ||= [R("i", { class: "mdi mdi-minus icon" }, null, -1)]], 8, gi),
|
|
3446
|
+
R("button", {
|
|
3455
3447
|
onClick: C,
|
|
3456
3448
|
class: "control-btn",
|
|
3457
3449
|
"data-testid": `edit-dashboard-item-content-${e.item.i}`,
|
|
3458
3450
|
title: "Edit data"
|
|
3459
|
-
}, [...r[11] ||= [
|
|
3460
|
-
|
|
3451
|
+
}, [...r[11] ||= [R("i", { class: "mdi mdi-database-edit-outline icon" }, null, -1)]], 8, _i),
|
|
3452
|
+
R("button", {
|
|
3461
3453
|
onClick: y,
|
|
3462
3454
|
class: "control-btn",
|
|
3463
3455
|
"data-testid": `toggle-crossfilter-item-content-${e.item.i}`,
|
|
3464
3456
|
title: D.value.allowCrossFilter ? "Toggle cross-filtering OFF" : "Toggle cross-filtering ON"
|
|
3465
|
-
}, [D.value.allowCrossFilter ? (
|
|
3466
|
-
|
|
3467
|
-
onClick:
|
|
3457
|
+
}, [D.value.allowCrossFilter ? (W(), L("i", yi)) : (W(), L("i", bi))], 8, vi),
|
|
3458
|
+
R("button", {
|
|
3459
|
+
onClick: ee,
|
|
3468
3460
|
class: "control-btn",
|
|
3469
3461
|
"data-testid": `copy-dashboard-item-${e.item.i}`,
|
|
3470
3462
|
title: "Copy item"
|
|
3471
|
-
}, [...r[12] ||= [
|
|
3472
|
-
|
|
3463
|
+
}, [...r[12] ||= [R("i", { class: "mdi mdi-content-copy icon" }, null, -1)]], 8, xi),
|
|
3464
|
+
R("button", {
|
|
3473
3465
|
onClick: w,
|
|
3474
3466
|
class: "control-btn dashboard-remove-btn",
|
|
3475
3467
|
"data-testid": `remove-dashboard-item-${e.item.i}`,
|
|
3476
3468
|
title: "Remove item"
|
|
3477
|
-
}, [...r[13] ||= [
|
|
3478
|
-
], 512)], 2)) :
|
|
3479
|
-
], 42, Hr), (
|
|
3469
|
+
}, [...r[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", {
|
|
3480
3472
|
key: 0,
|
|
3481
3473
|
ref_key: "mobileFilterPopoverRef",
|
|
3482
3474
|
ref: d,
|
|
3483
3475
|
class: "mobile-filter-popover",
|
|
3484
|
-
style:
|
|
3476
|
+
style: Se(p.value),
|
|
3485
3477
|
role: "dialog",
|
|
3486
3478
|
"aria-label": `${f.value} filters`,
|
|
3487
3479
|
onClick: r[3] ||= Ne(() => {}, ["stop"])
|
|
3488
|
-
}, [
|
|
3480
|
+
}, [R("div", wi, [R("span", null, J(f.value) + " filters", 1), R("button", {
|
|
3489
3481
|
type: "button",
|
|
3490
3482
|
"aria-label": "Close filter details",
|
|
3491
3483
|
onClick: r[2] ||= (e) => f.value = null
|
|
3492
|
-
}, [...r[14] ||= [
|
|
3484
|
+
}, [...r[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", {
|
|
3493
3485
|
key: `${e.source}-${t}`,
|
|
3494
3486
|
class: "mobile-filter-popover-value"
|
|
3495
|
-
},
|
|
3487
|
+
}, J(h(e.value, e.parameters)), 1))), 128))])], 12, Ci)) : I("", !0)]))], 64));
|
|
3496
3488
|
}
|
|
3497
3489
|
}), [["__scopeId", "data-v-61a867fc"]]), Di = { class: "add-item-content" }, Oi = {
|
|
3498
3490
|
class: "item-type-grid",
|
|
@@ -3501,109 +3493,109 @@ var Vr = /*#__PURE__*/ t(Pr, [["render", Br], ["__scopeId", "data-v-da53ca6d"]])
|
|
|
3501
3493
|
}, ki = ["data-testid"], Ai = ["value", "data-testid"], ji = { class: "item-option-card" }, Mi = {
|
|
3502
3494
|
class: "item-option-icon",
|
|
3503
3495
|
"aria-hidden": "true"
|
|
3504
|
-
}, 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__*/ e(/* @__PURE__ */ V({
|
|
3505
3497
|
__name: "DashboardAddItemModal",
|
|
3506
3498
|
props: { show: { type: Boolean } },
|
|
3507
3499
|
emits: ["add", "close"],
|
|
3508
3500
|
setup(e, { emit: t }) {
|
|
3509
|
-
let n = t, r =
|
|
3501
|
+
let n = t, r = G(a.CHART), i = [
|
|
3510
3502
|
{
|
|
3511
|
-
value:
|
|
3503
|
+
value: a.CHART,
|
|
3512
3504
|
label: "Chart",
|
|
3513
3505
|
description: "Visualize trends, comparisons, and distributions.",
|
|
3514
3506
|
icon: "mdi-chart-bar",
|
|
3515
3507
|
testId: "dashboard-add-item-type-chart"
|
|
3516
3508
|
},
|
|
3517
3509
|
{
|
|
3518
|
-
value:
|
|
3510
|
+
value: a.TABLE,
|
|
3519
3511
|
label: "Table",
|
|
3520
3512
|
description: "Show detailed rows and values in a grid.",
|
|
3521
3513
|
icon: "mdi-table-large",
|
|
3522
3514
|
testId: "dashboard-add-item-type-table"
|
|
3523
3515
|
},
|
|
3524
3516
|
{
|
|
3525
|
-
value:
|
|
3517
|
+
value: a.MARKDOWN,
|
|
3526
3518
|
label: "Markdown",
|
|
3527
3519
|
description: "Add notes, headings, or narrative context.",
|
|
3528
3520
|
icon: "mdi-text-box-outline",
|
|
3529
3521
|
testId: "dashboard-add-item-type-markdown"
|
|
3530
3522
|
},
|
|
3531
3523
|
{
|
|
3532
|
-
value:
|
|
3524
|
+
value: a.FILTER,
|
|
3533
3525
|
label: "Filter",
|
|
3534
3526
|
description: "Let viewers narrow the dashboard interactively.",
|
|
3535
3527
|
icon: "mdi-filter-variant",
|
|
3536
3528
|
testId: "dashboard-add-item-type-filter"
|
|
3537
3529
|
},
|
|
3538
3530
|
{
|
|
3539
|
-
value:
|
|
3531
|
+
value: a.FREEFORM,
|
|
3540
3532
|
label: "Custom Widget",
|
|
3541
3533
|
description: "Hand-authored HTML rendered in a sandboxed frame, wired to a query.",
|
|
3542
3534
|
icon: "mdi-code-braces",
|
|
3543
3535
|
testId: "dashboard-add-item-type-freeform"
|
|
3544
3536
|
},
|
|
3545
3537
|
{
|
|
3546
|
-
value:
|
|
3538
|
+
value: a.SECTION_HEADER,
|
|
3547
3539
|
label: "Section Header",
|
|
3548
3540
|
description: "Break the dashboard into labeled sections.",
|
|
3549
3541
|
icon: "mdi-format-title",
|
|
3550
3542
|
testId: "dashboard-add-item-type-section-header"
|
|
3551
3543
|
},
|
|
3552
3544
|
{
|
|
3553
|
-
value:
|
|
3545
|
+
value: a.MEMO,
|
|
3554
3546
|
label: "Executive Memo",
|
|
3555
3547
|
description: "Headline, verdict, magnitude, cause, action, confidence — at the top of a report.",
|
|
3556
3548
|
icon: "mdi-file-document-edit-outline",
|
|
3557
3549
|
testId: "dashboard-add-item-type-memo"
|
|
3558
3550
|
},
|
|
3559
3551
|
{
|
|
3560
|
-
value:
|
|
3552
|
+
value: a.CLAIM,
|
|
3561
3553
|
label: "Claim Section",
|
|
3562
3554
|
description: "A single claim with caveat and drilldown — pair with a chart for evidence.",
|
|
3563
3555
|
icon: "mdi-comment-quote-outline",
|
|
3564
3556
|
testId: "dashboard-add-item-type-claim"
|
|
3565
3557
|
},
|
|
3566
3558
|
{
|
|
3567
|
-
value:
|
|
3559
|
+
value: a.APPENDIX_HEADER,
|
|
3568
3560
|
label: "Appendix Header",
|
|
3569
3561
|
description: "Divider that introduces the auditability section at the bottom of a report.",
|
|
3570
3562
|
icon: "mdi-bookshelf",
|
|
3571
3563
|
testId: "dashboard-add-item-type-appendix"
|
|
3572
3564
|
}
|
|
3573
3565
|
];
|
|
3574
|
-
function
|
|
3566
|
+
function o() {
|
|
3575
3567
|
n("add", r.value);
|
|
3576
3568
|
}
|
|
3577
3569
|
function s() {
|
|
3578
3570
|
n("close");
|
|
3579
3571
|
}
|
|
3580
|
-
return (t, n) => (
|
|
3572
|
+
return (t, n) => (W(), F(A, {
|
|
3581
3573
|
show: e.show,
|
|
3582
3574
|
title: "Add New Item",
|
|
3583
3575
|
"max-width": "680px",
|
|
3584
3576
|
"test-id": "dashboard-add-item-modal",
|
|
3585
3577
|
onClose: s
|
|
3586
3578
|
}, {
|
|
3587
|
-
footer:
|
|
3579
|
+
footer: Z(() => [R("button", {
|
|
3588
3580
|
class: "cancel-button",
|
|
3589
3581
|
onClick: s
|
|
3590
|
-
}, "Cancel"),
|
|
3591
|
-
onClick:
|
|
3582
|
+
}, "Cancel"), R("button", {
|
|
3583
|
+
onClick: o,
|
|
3592
3584
|
class: "add-button",
|
|
3593
3585
|
"data-testid": "dashboard-add-item-confirm"
|
|
3594
3586
|
}, " Add Item ")]),
|
|
3595
|
-
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(i, (e) => R("label", {
|
|
3596
3588
|
key: e.value,
|
|
3597
|
-
class:
|
|
3589
|
+
class: U(["item-option", { selected: r.value === e.value }]),
|
|
3598
3590
|
"data-testid": `${e.testId}-option`
|
|
3599
|
-
}, [
|
|
3591
|
+
}, [je(R("input", {
|
|
3600
3592
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
3601
3593
|
class: "item-option-input",
|
|
3602
3594
|
type: "radio",
|
|
3603
3595
|
name: "dashboard-add-item-type",
|
|
3604
3596
|
value: e.value,
|
|
3605
3597
|
"data-testid": e.testId
|
|
3606
|
-
}, null, 8, Ai), [[
|
|
3598
|
+
}, null, 8, Ai), [[Oe, r.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))])])]),
|
|
3607
3599
|
_: 1
|
|
3608
3600
|
}, 8, ["show"]));
|
|
3609
3601
|
}
|
|
@@ -3615,7 +3607,7 @@ function Li(e = "dark") {
|
|
|
3615
3607
|
me.defineTheme("trilogyStudio", {
|
|
3616
3608
|
base: t ? "vs" : "vs-dark",
|
|
3617
3609
|
inherit: !0,
|
|
3618
|
-
rules:
|
|
3610
|
+
rules: ge,
|
|
3619
3611
|
colors: {
|
|
3620
3612
|
"editor.background": t ? "#ffffff" : "#111318",
|
|
3621
3613
|
"editor.foreground": t ? "#1f2937" : "#e5e7eb",
|
|
@@ -3650,12 +3642,12 @@ function Ri(e, t = {}) {
|
|
|
3650
3642
|
}
|
|
3651
3643
|
function zi(e, t = "") {
|
|
3652
3644
|
if (!e) return t;
|
|
3653
|
-
let n = e.getSelection(), r = n &&
|
|
3645
|
+
let n = e.getSelection(), r = n && (n.startColumn !== n.endColumn || n.startLineNumber !== n.endLineNumber) ? e.getModel()?.getValueInRange(n) || "" : e.getValue();
|
|
3654
3646
|
return r ||= t, r;
|
|
3655
3647
|
}
|
|
3656
3648
|
function Bi(e, t = {}) {
|
|
3657
3649
|
let { onValidate: n, onRun: r, onSave: i } = t;
|
|
3658
|
-
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, () => {
|
|
3659
3651
|
e.trigger("ide", "undo", {});
|
|
3660
3652
|
}), t.onContentChange) {
|
|
3661
3653
|
let n = null;
|
|
@@ -3668,10 +3660,10 @@ function Bi(e, t = {}) {
|
|
|
3668
3660
|
}
|
|
3669
3661
|
//#endregion
|
|
3670
3662
|
//#region components/SimpleEditor.vue?vue&type=script&lang.ts
|
|
3671
|
-
var Q = null, Vi =
|
|
3663
|
+
var Q = null, Vi = V({
|
|
3672
3664
|
name: "EnhancedEditor",
|
|
3673
3665
|
components: {
|
|
3674
|
-
SymbolsPane:
|
|
3666
|
+
SymbolsPane: _e,
|
|
3675
3667
|
LoadingView: ue
|
|
3676
3668
|
},
|
|
3677
3669
|
props: {
|
|
@@ -3708,7 +3700,7 @@ var Q = null, Vi = B({
|
|
|
3708
3700
|
data() {
|
|
3709
3701
|
return {
|
|
3710
3702
|
lastOperation: null,
|
|
3711
|
-
editor: new
|
|
3703
|
+
editor: new w({
|
|
3712
3704
|
id: "simple-editor",
|
|
3713
3705
|
name: "My Query",
|
|
3714
3706
|
type: "trilogy",
|
|
@@ -3722,12 +3714,12 @@ var Q = null, Vi = B({
|
|
|
3722
3714
|
},
|
|
3723
3715
|
setup() {
|
|
3724
3716
|
return {
|
|
3725
|
-
queryExecutionService:
|
|
3726
|
-
connectionStore:
|
|
3727
|
-
isMobile:
|
|
3728
|
-
llmConnectionStore:
|
|
3729
|
-
analyticsStore:
|
|
3730
|
-
userSettingsStore:
|
|
3717
|
+
queryExecutionService: H("queryExecutionService"),
|
|
3718
|
+
connectionStore: H("connectionStore"),
|
|
3719
|
+
isMobile: H("isMobile"),
|
|
3720
|
+
llmConnectionStore: H("llmConnectionStore"),
|
|
3721
|
+
analyticsStore: H("analyticsStore"),
|
|
3722
|
+
userSettingsStore: u()
|
|
3731
3723
|
};
|
|
3732
3724
|
},
|
|
3733
3725
|
created() {
|
|
@@ -3777,11 +3769,11 @@ var Q = null, Vi = B({
|
|
|
3777
3769
|
onValidate: () => this.validateQuery(),
|
|
3778
3770
|
onRun: () => this.runQuery(),
|
|
3779
3771
|
onGenerateLLM: () => this.generateLLMQuery()
|
|
3780
|
-
}), Q.addCommand(
|
|
3772
|
+
}), Q.addCommand(M.CtrlCmd | pe.Space, () => {
|
|
3781
3773
|
this.togglePanel("symbols");
|
|
3782
|
-
}), Q.addCommand(
|
|
3774
|
+
}), Q.addCommand(M.CtrlCmd | M.Shift | pe.Enter, () => {
|
|
3783
3775
|
this.generateLLMQuery();
|
|
3784
|
-
}), this.editor.type !== "sql" && (Q.addCommand(
|
|
3776
|
+
}), this.editor.type !== "sql" && (Q.addCommand(M.CtrlCmd | pe.KeyK, () => {
|
|
3785
3777
|
this.formatQuery();
|
|
3786
3778
|
}), Q.addAction({
|
|
3787
3779
|
id: "trilogy.simple-editor.format-query",
|
|
@@ -3804,7 +3796,7 @@ var Q = null, Vi = B({
|
|
|
3804
3796
|
if (!Q) return;
|
|
3805
3797
|
let t = Q.getPosition();
|
|
3806
3798
|
t && e.insertText && (Q.executeEdits("", [{
|
|
3807
|
-
range: new
|
|
3799
|
+
range: new he(t.lineNumber, t.column, t.lineNumber, t.column),
|
|
3808
3800
|
text: e.insertText
|
|
3809
3801
|
}]), Q.focus(), this.isMobile && this.closePanel());
|
|
3810
3802
|
},
|
|
@@ -3846,12 +3838,12 @@ var Q = null, Vi = B({
|
|
|
3846
3838
|
},
|
|
3847
3839
|
async runQuery() {
|
|
3848
3840
|
this.$emit("query-started"), this.editor.setError(null);
|
|
3849
|
-
let e = !1, t = this.connectionStore,
|
|
3850
|
-
if (!
|
|
3841
|
+
let e = !1, t = this.connectionStore, n = this.queryExecutionService, i = Q;
|
|
3842
|
+
if (!this.editor.loading && i) try {
|
|
3851
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();
|
|
3852
3844
|
let a = this.editor.connectionId && t.connections[this.editor.connectionId] || t.connectionByName(this.editor.connection), o = zi(i, this.editor.contents);
|
|
3853
3845
|
if (!o) {
|
|
3854
|
-
this.editor.results = new
|
|
3846
|
+
this.editor.results = new r(/* @__PURE__ */ new Map(), []), this.editor.loading = !1;
|
|
3855
3847
|
return;
|
|
3856
3848
|
}
|
|
3857
3849
|
let s = {
|
|
@@ -3860,7 +3852,7 @@ var Q = null, Vi = B({
|
|
|
3860
3852
|
editorType: this.editor.type,
|
|
3861
3853
|
imports: this.imports,
|
|
3862
3854
|
extraContent: this.rootContent
|
|
3863
|
-
}, { resultPromise: c, cancellation: l } = await
|
|
3855
|
+
}, { resultPromise: c, cancellation: l } = await n.executeQuery(a?.id || this.editor.connection, s, () => {}, (t) => {
|
|
3864
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);
|
|
3865
3857
|
});
|
|
3866
3858
|
this.editor.cancelCallback = () => {
|
|
@@ -3885,13 +3877,13 @@ var Q = null, Vi = B({
|
|
|
3885
3877
|
},
|
|
3886
3878
|
async generateLLMQuery() {
|
|
3887
3879
|
if (this.editor.loading || !Q) return;
|
|
3888
|
-
let e = this.llmConnectionStore, t = this.queryExecutionService,
|
|
3880
|
+
let e = this.llmConnectionStore, t = this.queryExecutionService, n = this.connectionStore;
|
|
3889
3881
|
if (!e) {
|
|
3890
3882
|
this.editor.setError("LLM connection store not available");
|
|
3891
3883
|
return;
|
|
3892
3884
|
}
|
|
3893
3885
|
try {
|
|
3894
|
-
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
|
|
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 r(/* @__PURE__ */ new Map(), []), this.editor.setError(null);
|
|
3895
3887
|
let i = Q.getValue();
|
|
3896
3888
|
if (await this.validateQuery(!1), !this.editor.completionSymbols || this.editor.completionSymbols.length === 0) throw Error("There are no imported concepts for LLM generation");
|
|
3897
3889
|
let a = this.editor.completionSymbols.map((e) => ({
|
|
@@ -3900,15 +3892,15 @@ var Q = null, Vi = B({
|
|
|
3900
3892
|
description: e.description,
|
|
3901
3893
|
calculation: e.calculation
|
|
3902
3894
|
})), o = await e.generateQueryCompletion(i, a, async (e) => {
|
|
3903
|
-
let
|
|
3895
|
+
let r = this.editor.connectionId && n.connections[this.editor.connectionId] || n.connectionByName(this.editor.connection), i = {
|
|
3904
3896
|
text: e,
|
|
3905
|
-
queryType:
|
|
3897
|
+
queryType: r ? r.query_type : "",
|
|
3906
3898
|
editorType: this.editor.type,
|
|
3907
3899
|
imports: this.imports,
|
|
3908
3900
|
extraContent: this.rootContent
|
|
3909
3901
|
};
|
|
3910
3902
|
try {
|
|
3911
|
-
let { resultPromise: e } = await t.executeQuery(
|
|
3903
|
+
let { resultPromise: e } = await t.executeQuery(r?.id || this.editor.connection, i, () => {}, () => {}, (e) => {
|
|
3912
3904
|
throw e;
|
|
3913
3905
|
}, () => !0, !0);
|
|
3914
3906
|
return await e, !0;
|
|
@@ -3955,68 +3947,68 @@ var Q = null, Vi = B({
|
|
|
3955
3947
|
class: "operation-type"
|
|
3956
3948
|
};
|
|
3957
3949
|
function na(e, t, n, r, i, a) {
|
|
3958
|
-
let o =
|
|
3959
|
-
return
|
|
3960
|
-
|
|
3961
|
-
|
|
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", {
|
|
3962
3954
|
class: "action-item",
|
|
3963
3955
|
onClick: t[0] ||= (...t) => e.generateLLMQuery && e.generateLLMQuery(...t),
|
|
3964
3956
|
title: "Generate query using AI",
|
|
3965
3957
|
"data-testid": "editor-generate-button"
|
|
3966
3958
|
}, " Generate "),
|
|
3967
|
-
e.editor.type === "sql" ?
|
|
3959
|
+
e.editor.type === "sql" ? I("", !0) : (W(), L("button", {
|
|
3968
3960
|
key: 0,
|
|
3969
3961
|
class: "action-item",
|
|
3970
3962
|
onClick: t[1] ||= () => e.validateQuery()
|
|
3971
3963
|
}, " Parse ")),
|
|
3972
|
-
e.editor.type === "sql" ?
|
|
3964
|
+
e.editor.type === "sql" ? I("", !0) : (W(), L("button", {
|
|
3973
3965
|
key: 1,
|
|
3974
3966
|
class: "action-item",
|
|
3975
3967
|
onClick: t[2] ||= (...t) => e.formatQuery && e.formatQuery(...t),
|
|
3976
3968
|
title: "Format query"
|
|
3977
3969
|
}, " Format ")),
|
|
3978
|
-
|
|
3970
|
+
R("button", {
|
|
3979
3971
|
onClick: t[3] ||= (t) => e.editor.loading ? e.cancelQuery() : e.runQuery(),
|
|
3980
|
-
class:
|
|
3972
|
+
class: U(["action-item", {
|
|
3981
3973
|
"button-cancel": e.editor.loading,
|
|
3982
3974
|
"button-run": !e.editor.loading
|
|
3983
3975
|
}]),
|
|
3984
3976
|
"data-testid": "editor-run-button"
|
|
3985
|
-
},
|
|
3977
|
+
}, J(e.editor.loading ? "Cancel" : "Test"), 3)
|
|
3986
3978
|
])]),
|
|
3987
|
-
|
|
3988
|
-
|
|
3979
|
+
R("div", Gi, [
|
|
3980
|
+
R("div", {
|
|
3989
3981
|
ref: "editorElement",
|
|
3990
|
-
class:
|
|
3982
|
+
class: U(["editor-obj", {
|
|
3991
3983
|
"monaco-width-with-panel": e.isPanelVisible,
|
|
3992
3984
|
"monaco-width-no-panel": !e.isPanelVisible
|
|
3993
3985
|
}]),
|
|
3994
3986
|
"data-testid": "simple-editor-content"
|
|
3995
3987
|
}, null, 2),
|
|
3996
|
-
|
|
3988
|
+
je(R("div", Ki, [B(o, {
|
|
3997
3989
|
symbols: e.editor.completionSymbols || [],
|
|
3998
3990
|
onSelectSymbol: e.insertSymbol,
|
|
3999
3991
|
ref: "symbolsPane"
|
|
4000
|
-
}, null, 8, ["symbols", "onSelectSymbol"])], 512), [[
|
|
4001
|
-
|
|
4002
|
-
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 }]),
|
|
4003
3995
|
onClick: t[4] ||= (t) => e.togglePanel("symbols"),
|
|
4004
3996
|
title: "Symbols"
|
|
4005
|
-
}, [...t[5] ||= [
|
|
3997
|
+
}, [...t[5] ||= [R("i", { class: "mdi mdi-tag-search-outline" }, null, -1)]], 2)])])
|
|
4006
3998
|
]),
|
|
4007
|
-
|
|
3999
|
+
R("div", Yi, [e.editor.loading ? (W(), F(s, {
|
|
4008
4000
|
key: 0,
|
|
4009
4001
|
class: "loading-view",
|
|
4010
4002
|
text: "Loading...",
|
|
4011
4003
|
startTime: e.editor.startTime
|
|
4012
|
-
}, null, 8, ["startTime"])) : e.editor.error ? (
|
|
4013
|
-
e.lastOperation.duration ? (
|
|
4014
|
-
e.lastOperation.rows === void 0 ?
|
|
4015
|
-
e.lastOperation.type ? (
|
|
4016
|
-
])])) :
|
|
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)])
|
|
4017
4009
|
]);
|
|
4018
4010
|
}
|
|
4019
|
-
var ra = /*#__PURE__*/
|
|
4011
|
+
var ra = /*#__PURE__*/ e(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]]), ia = { class: "editor-overlay" }, aa = { class: "editor-actions" }, oa = ["data-testid"], sa = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
4020
4012
|
__name: "DashboardEditorDialog",
|
|
4021
4013
|
props: {
|
|
4022
4014
|
initialWidth: {},
|
|
@@ -4028,30 +4020,30 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4028
4020
|
},
|
|
4029
4021
|
emits: ["save", "cancel"],
|
|
4030
4022
|
setup(e, { emit: t }) {
|
|
4031
|
-
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"), {
|
|
4032
4024
|
initialWidth: n.initialWidth,
|
|
4033
4025
|
initialHeight: n.initialHeight,
|
|
4034
4026
|
minWidth: n.minWidth,
|
|
4035
4027
|
minHeight: n.minHeight
|
|
4036
4028
|
});
|
|
4037
|
-
return (e, t) => (
|
|
4029
|
+
return (e, t) => (W(), L("div", ia, [R("div", {
|
|
4038
4030
|
ref: (e) => i.value = e,
|
|
4039
4031
|
class: "content-editor",
|
|
4040
|
-
style:
|
|
4032
|
+
style: Se(Y(a))
|
|
4041
4033
|
}, [
|
|
4042
|
-
|
|
4043
|
-
|
|
4034
|
+
Ee(e.$slots, "default", {}, void 0, !0),
|
|
4035
|
+
R("div", aa, [Ee(e.$slots, "actions", {}, () => [R("button", {
|
|
4044
4036
|
class: "save-button",
|
|
4045
4037
|
"data-testid": n.saveTestId || void 0,
|
|
4046
4038
|
onClick: t[0] ||= (e) => r("save")
|
|
4047
|
-
},
|
|
4039
|
+
}, J(n.saveLabel), 9, oa), R("button", {
|
|
4048
4040
|
class: "cancel-button",
|
|
4049
4041
|
onClick: t[1] ||= (e) => r("cancel")
|
|
4050
4042
|
}, "Cancel")], !0)]),
|
|
4051
|
-
|
|
4043
|
+
B(ve, { onStartResize: Y(o) }, null, 8, ["onStartResize"])
|
|
4052
4044
|
], 4)]));
|
|
4053
4045
|
}
|
|
4054
|
-
}), [["__scopeId", "data-v-730a6200"]]), ca = { class: "editor-body" }, la = /*#__PURE__*/
|
|
4046
|
+
}), [["__scopeId", "data-v-730a6200"]]), ca = { class: "editor-body" }, la = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
4055
4047
|
__name: "DashboardChartEditor",
|
|
4056
4048
|
props: {
|
|
4057
4049
|
content: {},
|
|
@@ -4063,14 +4055,14 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4063
4055
|
},
|
|
4064
4056
|
emits: ["save", "cancel"],
|
|
4065
4057
|
setup(e, { emit: t }) {
|
|
4066
|
-
let n = e, r = t, i =
|
|
4058
|
+
let n = e, r = t, i = G(n.content), a = G(n.imports), o = G(null);
|
|
4067
4059
|
function s() {
|
|
4068
4060
|
o.value && r("save", o.value.getContent());
|
|
4069
4061
|
}
|
|
4070
4062
|
function c() {
|
|
4071
4063
|
r("cancel");
|
|
4072
4064
|
}
|
|
4073
|
-
return (t, r) => (
|
|
4065
|
+
return (t, r) => (W(), F(sa, {
|
|
4074
4066
|
initialWidth: n.initialWidth,
|
|
4075
4067
|
initialHeight: n.initialHeight,
|
|
4076
4068
|
saveLabel: "Save Query",
|
|
@@ -4078,7 +4070,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4078
4070
|
onSave: s,
|
|
4079
4071
|
onCancel: c
|
|
4080
4072
|
}, {
|
|
4081
|
-
default:
|
|
4073
|
+
default: Z(() => [R("div", ca, [B(ra, {
|
|
4082
4074
|
class: "editor-content",
|
|
4083
4075
|
initContent: i.value,
|
|
4084
4076
|
connectionName: e.connectionName,
|
|
@@ -4101,7 +4093,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4101
4093
|
}, pa = {
|
|
4102
4094
|
key: 1,
|
|
4103
4095
|
class: "tab-content"
|
|
4104
|
-
}, ma = /*#__PURE__*/
|
|
4096
|
+
}, ma = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
4105
4097
|
__name: "DashboardMarkdownEditor",
|
|
4106
4098
|
props: {
|
|
4107
4099
|
content: {},
|
|
@@ -4113,14 +4105,14 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4113
4105
|
},
|
|
4114
4106
|
emits: ["save", "cancel"],
|
|
4115
4107
|
setup(e, { emit: t }) {
|
|
4116
|
-
let n = e, r = t, i =
|
|
4108
|
+
let n = e, r = t, i = P(() => typeof n.content == "string" ? {
|
|
4117
4109
|
markdown: n.content,
|
|
4118
4110
|
query: ""
|
|
4119
4111
|
} : {
|
|
4120
4112
|
markdown: n.content.markdown || "",
|
|
4121
4113
|
query: n.content.query || ""
|
|
4122
|
-
}), a =
|
|
4123
|
-
|
|
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) => {
|
|
4124
4116
|
let t = typeof e == "string" ? {
|
|
4125
4117
|
markdown: e,
|
|
4126
4118
|
query: ""
|
|
@@ -4129,7 +4121,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4129
4121
|
query: e.query || ""
|
|
4130
4122
|
};
|
|
4131
4123
|
a.value = t.markdown, o.value = t.query;
|
|
4132
|
-
}),
|
|
4124
|
+
}), X(l, (e, t) => {
|
|
4133
4125
|
t === "query" && c.value && (o.value = c.value.getContent());
|
|
4134
4126
|
});
|
|
4135
4127
|
function u() {
|
|
@@ -4173,7 +4165,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4173
4165
|
function b() {
|
|
4174
4166
|
p("{{#each data}}\n- {field_name}\n{{/each}}");
|
|
4175
4167
|
}
|
|
4176
|
-
return (t, r) => (
|
|
4168
|
+
return (t, r) => (W(), F(sa, {
|
|
4177
4169
|
initialWidth: n.initialWidth,
|
|
4178
4170
|
initialHeight: n.initialHeight,
|
|
4179
4171
|
saveLabel: "Save Content",
|
|
@@ -4181,49 +4173,49 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4181
4173
|
onSave: u,
|
|
4182
4174
|
onCancel: d
|
|
4183
4175
|
}, {
|
|
4184
|
-
default:
|
|
4176
|
+
default: Z(() => [R("div", ua, [R("button", {
|
|
4185
4177
|
onClick: r[0] ||= (e) => f("markdown"),
|
|
4186
|
-
class:
|
|
4187
|
-
}, [...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", {
|
|
4188
4180
|
onClick: r[1] ||= (e) => f("query"),
|
|
4189
|
-
class:
|
|
4190
|
-
}, [...r[4] ||= [
|
|
4191
|
-
|
|
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", {
|
|
4192
4184
|
onClick: m,
|
|
4193
4185
|
title: "Bold"
|
|
4194
|
-
}, [...r[5] ||= [
|
|
4195
|
-
|
|
4186
|
+
}, [...r[5] ||= [R("strong", null, "B", -1)]]),
|
|
4187
|
+
R("button", {
|
|
4196
4188
|
onClick: h,
|
|
4197
4189
|
title: "Italic"
|
|
4198
|
-
}, [...r[6] ||= [
|
|
4199
|
-
|
|
4190
|
+
}, [...r[6] ||= [R("em", null, "I", -1)]]),
|
|
4191
|
+
R("button", {
|
|
4200
4192
|
onClick: g,
|
|
4201
4193
|
title: "Heading"
|
|
4202
4194
|
}, "H"),
|
|
4203
|
-
|
|
4195
|
+
R("button", {
|
|
4204
4196
|
onClick: _,
|
|
4205
4197
|
title: "List"
|
|
4206
|
-
}, [...r[7] ||= [
|
|
4207
|
-
|
|
4198
|
+
}, [...r[7] ||= [R("i", { class: "mdi mdi-format-list-bulleted" }, null, -1)]]),
|
|
4199
|
+
R("button", {
|
|
4208
4200
|
onClick: v,
|
|
4209
4201
|
title: "Link"
|
|
4210
|
-
}, [...r[8] ||= [
|
|
4211
|
-
r[10] ||=
|
|
4212
|
-
|
|
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", {
|
|
4213
4205
|
onClick: y,
|
|
4214
4206
|
title: "Insert data reference",
|
|
4215
4207
|
class: "data-button"
|
|
4216
4208
|
}, " {} "),
|
|
4217
|
-
|
|
4209
|
+
R("button", {
|
|
4218
4210
|
onClick: b,
|
|
4219
4211
|
title: "Insert loop",
|
|
4220
4212
|
class: "data-button"
|
|
4221
|
-
}, [...r[9] ||= [
|
|
4222
|
-
]),
|
|
4213
|
+
}, [...r[9] ||= [R("i", { class: "mdi mdi-refresh" }, null, -1)]])
|
|
4214
|
+
]), je(R("textarea", {
|
|
4223
4215
|
"onUpdate:modelValue": r[2] ||= (e) => a.value = e,
|
|
4224
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",
|
|
4225
4217
|
class: "markdown-editor"
|
|
4226
|
-
}, 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, {
|
|
4227
4219
|
class: "editor-content",
|
|
4228
4220
|
initContent: o.value,
|
|
4229
4221
|
connectionName: e.connectionName,
|
|
@@ -4236,7 +4228,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4236
4228
|
"connectionName",
|
|
4237
4229
|
"imports",
|
|
4238
4230
|
"rootContent"
|
|
4239
|
-
])])) :
|
|
4231
|
+
])])) : I("", !0)])]),
|
|
4240
4232
|
_: 1
|
|
4241
4233
|
}, 8, ["initialWidth", "initialHeight"]));
|
|
4242
4234
|
}
|
|
@@ -4253,7 +4245,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4253
4245
|
}, ba = {
|
|
4254
4246
|
key: 2,
|
|
4255
4247
|
class: "tab-content api-tab"
|
|
4256
|
-
}, xa = { class: "theme-list" }, Sa = /*#__PURE__*/
|
|
4248
|
+
}, xa = { class: "theme-list" }, Sa = /*#__PURE__*/ e(/* @__PURE__ */ V({
|
|
4257
4249
|
__name: "DashboardFreeformEditor",
|
|
4258
4250
|
props: {
|
|
4259
4251
|
content: {},
|
|
@@ -4265,10 +4257,10 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4265
4257
|
},
|
|
4266
4258
|
emits: ["save", "cancel"],
|
|
4267
4259
|
setup(e, { emit: t }) {
|
|
4268
|
-
let n = e, r = t, i =
|
|
4260
|
+
let n = e, r = t, i = P(() => ({
|
|
4269
4261
|
html: n.content?.html || "",
|
|
4270
4262
|
query: n.content?.query || ""
|
|
4271
|
-
})), 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 > x), d = [
|
|
4272
4264
|
{
|
|
4273
4265
|
name: "--widget-text",
|
|
4274
4266
|
description: "primary text"
|
|
@@ -4310,9 +4302,9 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4310
4302
|
description: "already applied to body"
|
|
4311
4303
|
}
|
|
4312
4304
|
];
|
|
4313
|
-
|
|
4305
|
+
X(() => n.content, (e) => {
|
|
4314
4306
|
a.value = e?.html || "", o.value = e?.query || "";
|
|
4315
|
-
}),
|
|
4307
|
+
}), X(l, (e, t) => {
|
|
4316
4308
|
t === "query" && c.value && (o.value = c.value.getContent());
|
|
4317
4309
|
});
|
|
4318
4310
|
function f() {
|
|
@@ -4327,7 +4319,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4327
4319
|
function m(e) {
|
|
4328
4320
|
l.value === "query" && c.value && (o.value = c.value.getContent()), l.value = e;
|
|
4329
4321
|
}
|
|
4330
|
-
return (t, r) => (
|
|
4322
|
+
return (t, r) => (W(), F(sa, {
|
|
4331
4323
|
initialWidth: n.initialWidth,
|
|
4332
4324
|
initialHeight: n.initialHeight,
|
|
4333
4325
|
saveLabel: "Save Widget",
|
|
@@ -4335,35 +4327,35 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4335
4327
|
onSave: f,
|
|
4336
4328
|
onCancel: p
|
|
4337
4329
|
}, {
|
|
4338
|
-
default:
|
|
4339
|
-
|
|
4330
|
+
default: Z(() => [R("div", ha, [
|
|
4331
|
+
R("button", {
|
|
4340
4332
|
onClick: r[0] ||= (e) => m("html"),
|
|
4341
|
-
class:
|
|
4342
|
-
}, [...r[4] ||= [
|
|
4343
|
-
|
|
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", {
|
|
4344
4336
|
onClick: r[1] ||= (e) => m("query"),
|
|
4345
|
-
class:
|
|
4346
|
-
}, [...r[5] ||= [
|
|
4347
|
-
|
|
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", {
|
|
4348
4340
|
onClick: r[2] ||= (e) => m("api"),
|
|
4349
|
-
class:
|
|
4350
|
-
}, [...r[6] ||= [
|
|
4351
|
-
]),
|
|
4352
|
-
l.value === "html" ? (
|
|
4353
|
-
r[7] ||=
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
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. ")
|
|
4357
4349
|
])], -1),
|
|
4358
|
-
|
|
4350
|
+
je(R("textarea", {
|
|
4359
4351
|
"onUpdate:modelValue": r[3] ||= (e) => a.value = e,
|
|
4360
4352
|
"data-testid": "freeform-html-editor",
|
|
4361
4353
|
placeholder: "Author a self-contained HTML fragment. Subscribe to trilogy state, render, then call trilogy.ready().",
|
|
4362
4354
|
class: "html-editor"
|
|
4363
|
-
}, null, 512), [[
|
|
4364
|
-
u.value ? (
|
|
4365
|
-
])) :
|
|
4366
|
-
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(x).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, {
|
|
4367
4359
|
class: "editor-content",
|
|
4368
4360
|
initContent: o.value,
|
|
4369
4361
|
connectionName: e.connectionName,
|
|
@@ -4376,72 +4368,72 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4376
4368
|
"connectionName",
|
|
4377
4369
|
"imports",
|
|
4378
4370
|
"rootContent"
|
|
4379
|
-
])])) :
|
|
4380
|
-
l.value === "api" ? (
|
|
4381
|
-
r[14] ||=
|
|
4382
|
-
r[15] ||=
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
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(". ")
|
|
4388
4380
|
]),
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
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. ")
|
|
4396
4388
|
]),
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4389
|
+
R("dt", null, [
|
|
4390
|
+
R("code", null, "filters.set(map)"),
|
|
4391
|
+
z(" / "),
|
|
4392
|
+
R("code", null, "filters.append(map)")
|
|
4401
4393
|
]),
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
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. ")
|
|
4406
4398
|
]),
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
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.")
|
|
4417
4409
|
], -1),
|
|
4418
|
-
r[16] ||=
|
|
4419
|
-
r[17] ||=
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
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. ")
|
|
4423
4415
|
], -1),
|
|
4424
|
-
|
|
4425
|
-
r[18] ||=
|
|
4426
|
-
|
|
4427
|
-
r[11] ||=
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
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.")
|
|
4431
4423
|
], -1),
|
|
4432
|
-
r[12] ||=
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4424
|
+
r[12] ||= R("li", null, [
|
|
4425
|
+
z("No storage: "),
|
|
4426
|
+
R("code", null, "localStorage"),
|
|
4427
|
+
z(" and cookies are unavailable.")
|
|
4436
4428
|
], -1),
|
|
4437
|
-
r[13] ||=
|
|
4438
|
-
|
|
4439
|
-
r[9] ||=
|
|
4440
|
-
(
|
|
4441
|
-
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(ne), (e) => (W(), L("code", { key: e }, J(e), 1))), 128)),
|
|
4433
|
+
r[10] ||= z(". ", -1)
|
|
4442
4434
|
])
|
|
4443
4435
|
])
|
|
4444
|
-
])) :
|
|
4436
|
+
])) : I("", !0)
|
|
4445
4437
|
])]),
|
|
4446
4438
|
_: 1
|
|
4447
4439
|
}, 8, ["initialWidth", "initialHeight"]));
|
|
@@ -4449,7 +4441,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4449
4441
|
}), [["__scopeId", "data-v-5ab9a0c4"]]), Ca = { class: "dashboard-setup" }, wa = { class: "setup-section" }, Ta = {
|
|
4450
4442
|
key: 0,
|
|
4451
4443
|
class: "setup-section"
|
|
4452
|
-
}, 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({
|
|
4453
4445
|
__name: "DashboardCTA",
|
|
4454
4446
|
props: { dashboardId: {} },
|
|
4455
4447
|
emits: [
|
|
@@ -4458,9 +4450,9 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4458
4450
|
"start-chat-with-prompt"
|
|
4459
4451
|
],
|
|
4460
4452
|
setup(e, { emit: t }) {
|
|
4461
|
-
let n =
|
|
4453
|
+
let n = H("dashboardStore"), r = H("llmConnectionStore"), i = H("saveDashboards");
|
|
4462
4454
|
if (!n || !r || !i) throw Error("DashboardStore or LLMConnectionStore not provided");
|
|
4463
|
-
let
|
|
4455
|
+
let o = e, s = P(() => r.activeConnection), c = t, l = G(""), u = G(""), d = G(null), f = $ / 4, p = [
|
|
4464
4456
|
{
|
|
4465
4457
|
id: "summary",
|
|
4466
4458
|
name: "Summary Dashboard",
|
|
@@ -4473,7 +4465,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4473
4465
|
y: 0,
|
|
4474
4466
|
w: $,
|
|
4475
4467
|
h: 3,
|
|
4476
|
-
type:
|
|
4468
|
+
type: a.MARKDOWN
|
|
4477
4469
|
},
|
|
4478
4470
|
{
|
|
4479
4471
|
i: "kpi1",
|
|
@@ -4481,7 +4473,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4481
4473
|
y: 3,
|
|
4482
4474
|
w: $ / 4,
|
|
4483
4475
|
h: 4,
|
|
4484
|
-
type:
|
|
4476
|
+
type: a.CHART
|
|
4485
4477
|
},
|
|
4486
4478
|
{
|
|
4487
4479
|
i: "kpi2",
|
|
@@ -4489,23 +4481,23 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4489
4481
|
y: 3,
|
|
4490
4482
|
w: $ / 4,
|
|
4491
4483
|
h: 4,
|
|
4492
|
-
type:
|
|
4484
|
+
type: a.CHART
|
|
4493
4485
|
},
|
|
4494
4486
|
{
|
|
4495
4487
|
i: "kpi3",
|
|
4496
|
-
x:
|
|
4488
|
+
x: 10,
|
|
4497
4489
|
y: 3,
|
|
4498
4490
|
w: $ / 4,
|
|
4499
4491
|
h: 4,
|
|
4500
|
-
type:
|
|
4492
|
+
type: a.CHART
|
|
4501
4493
|
},
|
|
4502
4494
|
{
|
|
4503
4495
|
i: "kpi4",
|
|
4504
|
-
x:
|
|
4496
|
+
x: 15,
|
|
4505
4497
|
y: 3,
|
|
4506
4498
|
w: $ / 4,
|
|
4507
4499
|
h: 4,
|
|
4508
|
-
type:
|
|
4500
|
+
type: a.CHART
|
|
4509
4501
|
},
|
|
4510
4502
|
{
|
|
4511
4503
|
i: "trend",
|
|
@@ -4513,7 +4505,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4513
4505
|
y: 7,
|
|
4514
4506
|
w: $ / 2,
|
|
4515
4507
|
h: 8,
|
|
4516
|
-
type:
|
|
4508
|
+
type: a.CHART
|
|
4517
4509
|
},
|
|
4518
4510
|
{
|
|
4519
4511
|
i: "breakdown",
|
|
@@ -4521,7 +4513,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4521
4513
|
y: 7,
|
|
4522
4514
|
w: $ / 2,
|
|
4523
4515
|
h: 8,
|
|
4524
|
-
type:
|
|
4516
|
+
type: a.CHART
|
|
4525
4517
|
}
|
|
4526
4518
|
]
|
|
4527
4519
|
},
|
|
@@ -4537,7 +4529,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4537
4529
|
y: 0,
|
|
4538
4530
|
w: $,
|
|
4539
4531
|
h: 3,
|
|
4540
|
-
type:
|
|
4532
|
+
type: a.MARKDOWN
|
|
4541
4533
|
},
|
|
4542
4534
|
{
|
|
4543
4535
|
i: "overview",
|
|
@@ -4545,7 +4537,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4545
4537
|
y: 3,
|
|
4546
4538
|
w: $,
|
|
4547
4539
|
h: 5,
|
|
4548
|
-
type:
|
|
4540
|
+
type: a.CHART
|
|
4549
4541
|
},
|
|
4550
4542
|
{
|
|
4551
4543
|
i: "detail1",
|
|
@@ -4553,7 +4545,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4553
4545
|
y: 8,
|
|
4554
4546
|
w: $ / 2,
|
|
4555
4547
|
h: 8,
|
|
4556
|
-
type:
|
|
4548
|
+
type: a.CHART
|
|
4557
4549
|
},
|
|
4558
4550
|
{
|
|
4559
4551
|
i: "detail2",
|
|
@@ -4561,7 +4553,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4561
4553
|
y: 10,
|
|
4562
4554
|
w: $ / 2,
|
|
4563
4555
|
h: 8,
|
|
4564
|
-
type:
|
|
4556
|
+
type: a.CHART
|
|
4565
4557
|
},
|
|
4566
4558
|
{
|
|
4567
4559
|
i: "datatable",
|
|
@@ -4569,7 +4561,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4569
4561
|
y: 20,
|
|
4570
4562
|
w: $,
|
|
4571
4563
|
h: 8,
|
|
4572
|
-
type:
|
|
4564
|
+
type: a.TABLE
|
|
4573
4565
|
}
|
|
4574
4566
|
]
|
|
4575
4567
|
},
|
|
@@ -4585,7 +4577,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4585
4577
|
y: 0,
|
|
4586
4578
|
w: $,
|
|
4587
4579
|
h: 3,
|
|
4588
|
-
type:
|
|
4580
|
+
type: a.MARKDOWN
|
|
4589
4581
|
},
|
|
4590
4582
|
{
|
|
4591
4583
|
i: "compare1",
|
|
@@ -4593,7 +4585,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4593
4585
|
y: 3,
|
|
4594
4586
|
w: $ / 2,
|
|
4595
4587
|
h: 6,
|
|
4596
|
-
type:
|
|
4588
|
+
type: a.CHART
|
|
4597
4589
|
},
|
|
4598
4590
|
{
|
|
4599
4591
|
i: "compare2",
|
|
@@ -4601,7 +4593,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4601
4593
|
y: 3,
|
|
4602
4594
|
w: $ / 2,
|
|
4603
4595
|
h: 6,
|
|
4604
|
-
type:
|
|
4596
|
+
type: a.CHART
|
|
4605
4597
|
},
|
|
4606
4598
|
{
|
|
4607
4599
|
i: "compare3",
|
|
@@ -4609,7 +4601,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4609
4601
|
y: 9,
|
|
4610
4602
|
w: $ / 2,
|
|
4611
4603
|
h: 6,
|
|
4612
|
-
type:
|
|
4604
|
+
type: a.CHART
|
|
4613
4605
|
},
|
|
4614
4606
|
{
|
|
4615
4607
|
i: "compare4",
|
|
@@ -4617,7 +4609,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4617
4609
|
y: 9,
|
|
4618
4610
|
w: $ / 2,
|
|
4619
4611
|
h: 6,
|
|
4620
|
-
type:
|
|
4612
|
+
type: a.CHART
|
|
4621
4613
|
},
|
|
4622
4614
|
{
|
|
4623
4615
|
i: "summary",
|
|
@@ -4625,7 +4617,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4625
4617
|
y: 15,
|
|
4626
4618
|
w: $,
|
|
4627
4619
|
h: 5,
|
|
4628
|
-
type:
|
|
4620
|
+
type: a.MARKDOWN
|
|
4629
4621
|
}
|
|
4630
4622
|
]
|
|
4631
4623
|
},
|
|
@@ -4641,7 +4633,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4641
4633
|
y: 0,
|
|
4642
4634
|
w: $,
|
|
4643
4635
|
h: 3,
|
|
4644
|
-
type:
|
|
4636
|
+
type: a.MARKDOWN
|
|
4645
4637
|
},
|
|
4646
4638
|
{
|
|
4647
4639
|
i: "maintrend",
|
|
@@ -4649,7 +4641,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4649
4641
|
y: 3,
|
|
4650
4642
|
w: $,
|
|
4651
4643
|
h: 8,
|
|
4652
|
-
type:
|
|
4644
|
+
type: a.CHART
|
|
4653
4645
|
},
|
|
4654
4646
|
{
|
|
4655
4647
|
i: "breakdown1",
|
|
@@ -4657,7 +4649,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4657
4649
|
y: 11,
|
|
4658
4650
|
w: $ / 3,
|
|
4659
4651
|
h: 6,
|
|
4660
|
-
type:
|
|
4652
|
+
type: a.CHART
|
|
4661
4653
|
},
|
|
4662
4654
|
{
|
|
4663
4655
|
i: "breakdown2",
|
|
@@ -4665,7 +4657,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4665
4657
|
y: 11,
|
|
4666
4658
|
w: $ / 3,
|
|
4667
4659
|
h: 6,
|
|
4668
|
-
type:
|
|
4660
|
+
type: a.CHART
|
|
4669
4661
|
},
|
|
4670
4662
|
{
|
|
4671
4663
|
i: "breakdown3",
|
|
@@ -4673,7 +4665,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4673
4665
|
y: 11,
|
|
4674
4666
|
w: $ / 3,
|
|
4675
4667
|
h: 6,
|
|
4676
|
-
type:
|
|
4668
|
+
type: a.CHART
|
|
4677
4669
|
},
|
|
4678
4670
|
{
|
|
4679
4671
|
i: "forecast",
|
|
@@ -4681,7 +4673,7 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4681
4673
|
y: 17,
|
|
4682
4674
|
w: $,
|
|
4683
4675
|
h: 6,
|
|
4684
|
-
type:
|
|
4676
|
+
type: a.CHART
|
|
4685
4677
|
}
|
|
4686
4678
|
]
|
|
4687
4679
|
}
|
|
@@ -4689,116 +4681,116 @@ var ra = /*#__PURE__*/ t(Vi, [["render", na], ["__scopeId", "data-v-79e13368"]])
|
|
|
4689
4681
|
function m(e) {
|
|
4690
4682
|
d.value = e;
|
|
4691
4683
|
let t = p.find((t) => t.id === e);
|
|
4692
|
-
if (t &&
|
|
4693
|
-
for (let e of t.layout) n.addItemToDashboard(
|
|
4684
|
+
if (t && o.dashboardId) {
|
|
4685
|
+
for (let e of t.layout) n.addItemToDashboard(o.dashboardId, e.type, e.x, e.y, e.w, e.h);
|
|
4694
4686
|
c("template-selected", e);
|
|
4695
4687
|
}
|
|
4696
4688
|
}
|
|
4697
4689
|
function h() {
|
|
4698
|
-
|
|
4690
|
+
o.dashboardId && l.value && (n.updateDashboardDescription(o.dashboardId, l.value), c("description-updated", l.value));
|
|
4699
4691
|
}
|
|
4700
4692
|
function g() {
|
|
4701
4693
|
let e = u.value.trim();
|
|
4702
4694
|
e && (c("start-chat-with-prompt", e), u.value = "");
|
|
4703
4695
|
}
|
|
4704
|
-
return (e, t) => (
|
|
4705
|
-
t[8] ||=
|
|
4706
|
-
|
|
4707
|
-
t[3] ||=
|
|
4708
|
-
|
|
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", {
|
|
4709
4701
|
"onUpdate:modelValue": t[0] ||= (e) => l.value = e,
|
|
4710
4702
|
placeholder: "What is this dashboard for? Add context to help viewers understand the data...",
|
|
4711
4703
|
rows: "3",
|
|
4712
4704
|
class: "description-input"
|
|
4713
|
-
}, null, 512), [[
|
|
4714
|
-
|
|
4705
|
+
}, null, 512), [[ke, l.value]]),
|
|
4706
|
+
R("button", {
|
|
4715
4707
|
onClick: h,
|
|
4716
4708
|
class: "action-button save-button",
|
|
4717
4709
|
"data-testid": "dashboard-description-save"
|
|
4718
|
-
}, [...t[2] ||= [
|
|
4710
|
+
}, [...t[2] ||= [R("i", { class: "mdi mdi-content-save" }, null, -1), z(" Save ", -1)]])
|
|
4719
4711
|
]),
|
|
4720
|
-
s.value ? (
|
|
4721
|
-
t[5] ||=
|
|
4722
|
-
t[6] ||=
|
|
4723
|
-
|
|
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", {
|
|
4724
4716
|
"onUpdate:modelValue": t[1] ||= (e) => u.value = e,
|
|
4725
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.'",
|
|
4726
4718
|
rows: "4",
|
|
4727
4719
|
class: "description-input",
|
|
4728
4720
|
"data-testid": "dashboard-prompt-input",
|
|
4729
4721
|
onKeydown: Me(Ne(g, ["exact", "prevent"]), ["enter"])
|
|
4730
|
-
}, null, 40, Ea), [[
|
|
4731
|
-
|
|
4722
|
+
}, null, 40, Ea), [[ke, u.value]]),
|
|
4723
|
+
R("div", Da, [R("button", {
|
|
4732
4724
|
onClick: g,
|
|
4733
4725
|
class: "action-button llm-button",
|
|
4734
4726
|
disabled: !u.value.trim(),
|
|
4735
4727
|
"data-testid": "generate-with-llm-button"
|
|
4736
|
-
}, [...t[4] ||= [
|
|
4737
|
-
])) :
|
|
4738
|
-
|
|
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", {
|
|
4739
4731
|
key: e.id,
|
|
4740
|
-
class:
|
|
4732
|
+
class: U(["template-card", { selected: d.value === e.id }]),
|
|
4741
4733
|
onClick: (t) => m(e.id),
|
|
4742
4734
|
"data-testid": `template-card-${e.id}`
|
|
4743
|
-
}, [
|
|
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))])])
|
|
4744
4736
|
]));
|
|
4745
4737
|
}
|
|
4746
4738
|
});
|
|
4747
4739
|
//#endregion
|
|
4748
4740
|
//#region components/dashboard/useDashboard.ts
|
|
4749
4741
|
function La(e, t, n, r) {
|
|
4750
|
-
let i =
|
|
4751
|
-
if (!
|
|
4752
|
-
let
|
|
4742
|
+
let i = y(), c = re(), l = b(), u = r || H("queryExecutionService"), { setActiveDashboard: d } = g();
|
|
4743
|
+
if (!u) throw Error("QueryExecutionService not provided");
|
|
4744
|
+
let f = G(""), p = G(""), m = G(""), h = G(null), v = G(null), x = G(!1), w = G(!1), T = G(!1), E = G(!1), te = G([]), O = P(() => t.maxWidth || "100vw"), ne = P(() => e.value ? e.value.layout : []), ae = P(() => e.value ? [...e.value.layout].sort((e, t) => (e.y + e.y + e.h) / 2 - (t.y + t.y + t.h) / 2) : []), oe = P(() => e.value ? e.value.connectionId ? e.value.connectionId : l.connectionByName(e.value.connection)?.id || e.value.connection : ""), k = P(() => t.viewMode ? !1 : e.value ? e.value.state === "editing" : !1), A = P(() => e.value ? C(e.value, c) : []);
|
|
4753
4745
|
function se(e) {
|
|
4754
4746
|
if (!e?.id) return;
|
|
4755
|
-
e.state === "fullscreen" && n.fullScreen(!0), i.setActiveDashboard(e.id),
|
|
4756
|
-
let t =
|
|
4757
|
-
t?.runBatch(r),
|
|
4747
|
+
e.state === "fullscreen" && n.fullScreen(!0), i.setActiveDashboard(e.id), m.value = "", f.value = "", p.value = "", te.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 !== a.SECTION_HEADER && !e.gridItems[t].results);
|
|
4749
|
+
t?.runBatch(r), ue();
|
|
4758
4750
|
}
|
|
4759
|
-
|
|
4751
|
+
X(() => e.value?.id, (t, n) => {
|
|
4760
4752
|
t && t !== n && e.value && se(e.value);
|
|
4761
|
-
}),
|
|
4753
|
+
}), we(() => {
|
|
4762
4754
|
e.value && se(e.value);
|
|
4763
4755
|
let r = new ResizeObserver(() => {
|
|
4764
4756
|
n.triggerResize();
|
|
4765
4757
|
}), i = t.isMobile ? ".mobile-container" : ".grid-container", a = document.querySelector(i);
|
|
4766
4758
|
a && r.observe(a);
|
|
4767
|
-
}),
|
|
4768
|
-
|
|
4759
|
+
}), Ce(() => {
|
|
4760
|
+
h.value !== null && clearTimeout(h.value);
|
|
4769
4761
|
});
|
|
4770
4762
|
async function ce() {
|
|
4771
4763
|
if (e.value && e.value.id) {
|
|
4772
|
-
|
|
4764
|
+
f.value = "", p.value = "", m.value = "";
|
|
4773
4765
|
let t = i.removeAllFilters(e.value.id);
|
|
4774
4766
|
await i.getQueryExecutor(e.value.id)?.runBatch(t);
|
|
4775
4767
|
}
|
|
4776
4768
|
}
|
|
4777
|
-
async function
|
|
4778
|
-
if (!t ||
|
|
4779
|
-
if (
|
|
4780
|
-
let n = i.updateDashboardFilter(e.value.id,
|
|
4769
|
+
async function j(t) {
|
|
4770
|
+
if (!t || _(t) === "") {
|
|
4771
|
+
if (m.value = "", e.value && e.value.id) {
|
|
4772
|
+
let n = i.updateDashboardFilter(e.value.id, _(t));
|
|
4781
4773
|
await i.getQueryExecutor(e.value.id)?.runBatch(n);
|
|
4782
4774
|
}
|
|
4783
4775
|
return;
|
|
4784
4776
|
}
|
|
4785
|
-
e.value && e.value.id && (
|
|
4777
|
+
e.value && e.value.id && (f.value = t, await u?.generateQuery(e.value.connectionId || e.value.connection, {
|
|
4786
4778
|
text: "select 1 as test;",
|
|
4787
4779
|
editorType: "trilogy",
|
|
4788
4780
|
extraFilters: [t],
|
|
4789
4781
|
imports: e.value.imports,
|
|
4790
4782
|
extraContent: A.value
|
|
4791
4783
|
}).then(() => {
|
|
4792
|
-
if (
|
|
4784
|
+
if (m.value = "", e.value && e.value.id) {
|
|
4793
4785
|
let n = i.updateDashboardFilter(e.value.id, t);
|
|
4794
4786
|
i.getQueryExecutor(e.value.id)?.runBatch(n);
|
|
4795
4787
|
}
|
|
4796
|
-
}).catch((e) => (
|
|
4788
|
+
}).catch((e) => (m.value = e.message, !1)));
|
|
4797
4789
|
}
|
|
4798
|
-
let
|
|
4790
|
+
let le = async (t) => {
|
|
4799
4791
|
let n = t.replace(/^\s*where\s+/i, "");
|
|
4800
4792
|
if (e.value && e.value.id) {
|
|
4801
|
-
let t = await
|
|
4793
|
+
let t = await u?.executeQuery(e.value.connectionId || e.value.connection, {
|
|
4802
4794
|
text: "select 1 as test;",
|
|
4803
4795
|
editorType: "trilogy",
|
|
4804
4796
|
imports: e.value.imports,
|
|
@@ -4810,96 +4802,96 @@ function La(e, t, n, r) {
|
|
|
4810
4802
|
if (!r.success) throw Error(`Validation of "select 1 as test ${n}" resulted in ${r.error}`);
|
|
4811
4803
|
} else throw Error("Dashboard not found");
|
|
4812
4804
|
};
|
|
4813
|
-
async function
|
|
4814
|
-
if (e.value && e.value.id &&
|
|
4815
|
-
let t = await i.populateCompletion(e.value.id,
|
|
4816
|
-
t && (
|
|
4805
|
+
async function ue() {
|
|
4806
|
+
if (e.value && e.value.id && u) {
|
|
4807
|
+
let t = await i.populateCompletion(e.value.id, u, c);
|
|
4808
|
+
t && (te.value = t), m.value = "";
|
|
4817
4809
|
}
|
|
4818
4810
|
}
|
|
4819
|
-
async function
|
|
4820
|
-
e.value && e.value.id && (i.updateDashboardImports(e.value.id, t), await
|
|
4811
|
+
async function de(t) {
|
|
4812
|
+
e.value && e.value.id && (i.updateDashboardImports(e.value.id, t), await ue());
|
|
4821
4813
|
}
|
|
4822
|
-
let
|
|
4823
|
-
e.value && (i.setState(e.value.id, t),
|
|
4814
|
+
let fe = (t) => {
|
|
4815
|
+
e.value && (i.setState(e.value.id, t), xe(() => {
|
|
4824
4816
|
n.triggerResize();
|
|
4825
4817
|
}));
|
|
4826
|
-
},
|
|
4818
|
+
}, pe = (t) => {
|
|
4827
4819
|
e.value && e.value.id && i.updateDashboardLayout(e.value.id, t);
|
|
4828
4820
|
};
|
|
4829
|
-
function
|
|
4830
|
-
|
|
4821
|
+
function me() {
|
|
4822
|
+
E.value = !0;
|
|
4831
4823
|
}
|
|
4832
|
-
function
|
|
4824
|
+
function he(t = a.CHART) {
|
|
4833
4825
|
if (!e.value || !e.value.id) return;
|
|
4834
|
-
let r = t ===
|
|
4835
|
-
|
|
4826
|
+
let r = t === a.SECTION_HEADER ? i.addItemToDashboard(e.value.id, t, 0, 0, 20, 1) : i.addItemToDashboard(e.value.id, t);
|
|
4827
|
+
E.value = !1, xe(() => {
|
|
4836
4828
|
n.dimensionsUpdate(r);
|
|
4837
4829
|
});
|
|
4838
4830
|
}
|
|
4839
|
-
function
|
|
4840
|
-
|
|
4831
|
+
function M(t) {
|
|
4832
|
+
e.value && e.value.id && i.updateDashboardTitle(e.value.id, t);
|
|
4841
4833
|
}
|
|
4842
|
-
function
|
|
4843
|
-
|
|
4834
|
+
function ge(t) {
|
|
4835
|
+
e.value && e.value.id && i.setDashboardTheme(e.value.id, t);
|
|
4844
4836
|
}
|
|
4845
|
-
function
|
|
4846
|
-
|
|
4837
|
+
function _e() {
|
|
4838
|
+
e.value && e.value.id && i.clearDashboardItems(e.value.id);
|
|
4847
4839
|
}
|
|
4848
|
-
function
|
|
4849
|
-
|
|
4840
|
+
function ve(t) {
|
|
4841
|
+
e.value && e.value.id && i.removeItemFromDashboard(e.value.id, t);
|
|
4850
4842
|
}
|
|
4851
|
-
function
|
|
4852
|
-
|
|
4843
|
+
function ye(t) {
|
|
4844
|
+
e.value && e.value.id && i.copyItemInDashboard(e.value.id, t);
|
|
4853
4845
|
}
|
|
4854
|
-
function
|
|
4855
|
-
|
|
4846
|
+
function N() {
|
|
4847
|
+
E.value = !1;
|
|
4856
4848
|
}
|
|
4857
|
-
function
|
|
4858
|
-
if (
|
|
4849
|
+
function be(t) {
|
|
4850
|
+
if (v.value = t, !e.value || !e.value.id) return;
|
|
4859
4851
|
let n = e.value.gridItems[t.i];
|
|
4860
|
-
n && (n.type ===
|
|
4852
|
+
n && (n.type === a.CHART ? x.value = !0 : n.type === a.MARKDOWN ? w.value = !0 : n.type === a.TABLE || n.type === a.FILTER ? x.value = !0 : n.type === a.FREEFORM ? T.value = !0 : n.type === a.SECTION_HEADER && (v.value = null));
|
|
4861
4853
|
}
|
|
4862
|
-
function
|
|
4863
|
-
if (!e.value || !e.value.id || !
|
|
4864
|
-
let n =
|
|
4865
|
-
|
|
4854
|
+
function F(t) {
|
|
4855
|
+
if (!e.value || !e.value.id || !v.value) return;
|
|
4856
|
+
let n = v.value.i;
|
|
4857
|
+
R(n, e.value.id, { content: t }), I();
|
|
4866
4858
|
}
|
|
4867
|
-
function
|
|
4868
|
-
|
|
4859
|
+
function I() {
|
|
4860
|
+
x.value = !1, w.value = !1, T.value = !1, v.value = null;
|
|
4869
4861
|
}
|
|
4870
|
-
function
|
|
4871
|
-
return n && e.value && e.value.id !== n || !e.value ?
|
|
4862
|
+
function L(t, n) {
|
|
4863
|
+
return n && e.value && e.value.id !== n || !e.value ? ee(t) : ie(e.value, t, {
|
|
4872
4864
|
rootContent: A.value,
|
|
4873
|
-
onRefresh:
|
|
4865
|
+
onRefresh: V
|
|
4874
4866
|
});
|
|
4875
4867
|
}
|
|
4876
|
-
function
|
|
4877
|
-
if (
|
|
4868
|
+
function R(t, n, r) {
|
|
4869
|
+
if (e.value && e.value.id) {
|
|
4878
4870
|
if (!n || e.value.id !== n) {
|
|
4879
4871
|
console.warn("Dashboard ID mismatch. Cannot set item data. Given:", n, "Expected:", e.value.id);
|
|
4880
4872
|
return;
|
|
4881
4873
|
}
|
|
4882
|
-
|
|
4874
|
+
D(i, e.value.id, t, r), r.content && z(e.value.id)?.runSingle(t);
|
|
4883
4875
|
}
|
|
4884
4876
|
}
|
|
4885
|
-
function
|
|
4877
|
+
function z(t) {
|
|
4886
4878
|
if (!e.value || !e.value.id) throw Error("Dashboard not found or not initialized");
|
|
4887
|
-
if (!
|
|
4888
|
-
let n = i.dashboards[t], r =
|
|
4889
|
-
queryExecutionService:
|
|
4879
|
+
if (!u) throw Error("Query execution service not found");
|
|
4880
|
+
let n = i.dashboards[t], r = S(n, l), a = i.getOrCreateQueryExecutor(t, {
|
|
4881
|
+
queryExecutionService: u,
|
|
4890
4882
|
connectionName: r,
|
|
4891
4883
|
dashboardId: t,
|
|
4892
4884
|
getDashboardData: (e) => i.dashboards[e],
|
|
4893
|
-
getItemData:
|
|
4894
|
-
setItemData:
|
|
4885
|
+
getItemData: L,
|
|
4886
|
+
setItemData: R
|
|
4895
4887
|
});
|
|
4896
4888
|
return a || console.warn("No query executor found for dashboard:", e.value.id), a;
|
|
4897
4889
|
}
|
|
4898
|
-
function
|
|
4890
|
+
function B(t) {
|
|
4899
4891
|
let n = t.target.value;
|
|
4900
4892
|
e.value && e.value.id && (i.updateDashboardConnection(e.value.id, n), i.getQueryExecutor(e.value.id)?.setConnection(n));
|
|
4901
4893
|
}
|
|
4902
|
-
function
|
|
4894
|
+
function V(t) {
|
|
4903
4895
|
if (e.value) {
|
|
4904
4896
|
if (t) {
|
|
4905
4897
|
let r = i.getQueryExecutor(e.value.id)?.runSingle(t);
|
|
@@ -4908,9 +4900,9 @@ function La(e, t, n, r) {
|
|
|
4908
4900
|
i.getQueryExecutor(e.value.id)?.runBatch(Object.keys(e.value.gridItems));
|
|
4909
4901
|
}
|
|
4910
4902
|
}
|
|
4911
|
-
function
|
|
4903
|
+
function U(t) {
|
|
4912
4904
|
if (!e.value || !e.value.id) return;
|
|
4913
|
-
let n =
|
|
4905
|
+
let n = o(te.value), r = s(t.filters, n);
|
|
4914
4906
|
if (!r || Object.keys(r).length === 0) {
|
|
4915
4907
|
console.log("No valid filters to apply from cross-filter event, given ", t.filters, n);
|
|
4916
4908
|
return;
|
|
@@ -4918,16 +4910,16 @@ function La(e, t, n, r) {
|
|
|
4918
4910
|
let a = i.updateItemCrossFilters(e.value.id, t.source, r, t.chart, t.append ? "append" : "add");
|
|
4919
4911
|
i.getQueryExecutor(e.value.id)?.runBatch(a);
|
|
4920
4912
|
}
|
|
4921
|
-
function
|
|
4922
|
-
|
|
4913
|
+
function Se(t, n) {
|
|
4914
|
+
e.value && e.value.id && (i.removeItemCrossFilter(e.value.id, t, n), i.getQueryExecutor(e.value.id)?.runSingle(t));
|
|
4923
4915
|
}
|
|
4924
|
-
function
|
|
4916
|
+
function Te(t) {
|
|
4925
4917
|
if (!e.value || !e.value.id) return;
|
|
4926
4918
|
let n = i.removeItemCrossFilterSource(e.value.id, t);
|
|
4927
4919
|
i.getQueryExecutor(e.value.id)?.runBatch(n);
|
|
4928
4920
|
}
|
|
4929
|
-
function
|
|
4930
|
-
|
|
4921
|
+
function W(e) {
|
|
4922
|
+
d(e);
|
|
4931
4923
|
}
|
|
4932
4924
|
return {
|
|
4933
4925
|
dashboard: e,
|
|
@@ -4935,42 +4927,42 @@ function La(e, t, n, r) {
|
|
|
4935
4927
|
sortedLayout: ae,
|
|
4936
4928
|
editMode: k,
|
|
4937
4929
|
selectedConnection: oe,
|
|
4938
|
-
filter:
|
|
4939
|
-
filterError:
|
|
4940
|
-
globalCompletion:
|
|
4941
|
-
showAddItemModal:
|
|
4942
|
-
showQueryEditor:
|
|
4943
|
-
showMarkdownEditor:
|
|
4944
|
-
showFreeformEditor:
|
|
4945
|
-
editingItem:
|
|
4946
|
-
dashboardMaxWidth:
|
|
4930
|
+
filter: f,
|
|
4931
|
+
filterError: m,
|
|
4932
|
+
globalCompletion: te,
|
|
4933
|
+
showAddItemModal: E,
|
|
4934
|
+
showQueryEditor: x,
|
|
4935
|
+
showMarkdownEditor: w,
|
|
4936
|
+
showFreeformEditor: T,
|
|
4937
|
+
editingItem: v,
|
|
4938
|
+
dashboardMaxWidth: O,
|
|
4947
4939
|
rootContent: A,
|
|
4948
|
-
handleFilterChange:
|
|
4940
|
+
handleFilterChange: j,
|
|
4949
4941
|
handleFilterClear: ce,
|
|
4950
|
-
handleImportChange:
|
|
4951
|
-
validateFilter:
|
|
4952
|
-
onConnectionChange:
|
|
4953
|
-
toggleMode:
|
|
4954
|
-
onLayoutUpdated:
|
|
4955
|
-
openAddItemModal:
|
|
4956
|
-
addItem:
|
|
4957
|
-
clearItems:
|
|
4958
|
-
removeItem:
|
|
4959
|
-
copyItem:
|
|
4960
|
-
closeAddModal:
|
|
4961
|
-
openEditor:
|
|
4962
|
-
saveContent:
|
|
4963
|
-
closeEditors:
|
|
4964
|
-
getDashboardQueryExecutor:
|
|
4965
|
-
getItemData:
|
|
4966
|
-
setItemData:
|
|
4967
|
-
handleRefresh:
|
|
4968
|
-
setCrossFilter:
|
|
4969
|
-
removeFilter:
|
|
4970
|
-
unSelect:
|
|
4971
|
-
dashboardCreated:
|
|
4972
|
-
updateTitle:
|
|
4973
|
-
updateTheme:
|
|
4942
|
+
handleImportChange: de,
|
|
4943
|
+
validateFilter: le,
|
|
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
|
|
4974
4966
|
};
|
|
4975
4967
|
}
|
|
4976
4968
|
//#endregion
|