@trilogy-data/trilogy-studio-components 0.1.25 → 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-CuXha6Dg.js +218 -0
- package/dist/ChatModelSelect-Cz7axWjP.js +40 -0
- package/dist/{CodeBlock-PT4no49I.js → CodeBlock-BBsaC6hX.js} +4 -4
- package/dist/{CommunityModels-D7zWnHgG.js → CommunityModels-CIQQhO-y.js} +106 -75
- 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-D1ZCTw5r.js → Dashboard-DxSi9W6Q.js} +276 -280
- package/dist/{DashboardImportSelector-CNxibXlS.js → DashboardImportSelector-kuDRDYi8.js} +2 -2
- package/dist/{DashboardMobile-D_m0xv17.js → DashboardMobile-CZEgTb0R.js} +39 -39
- package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
- package/dist/{Editor-DhsP18KE.js → Editor-D6tdutTm.js} +106 -104
- package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
- package/dist/{GlobalChatPanel-DFx9A4yP.js → GlobalChatPanel-BXZh0sdD.js} +169 -134
- package/dist/{IDE-BRMLxTfP.js → IDE-T8PmyAQ_.js} +200 -203
- package/dist/{JobsView-C9PYS6pZ.js → JobsView-Ca97MiSd.js} +12 -13
- package/dist/{LLMChat-Cqg6pTgC.js → LLMChat-Cch33Yd_.js} +3 -3
- package/dist/{LLMView-VkJpP-49.js → LLMView-BDb6wD74.js} +26 -26
- package/dist/{LoadingView-s1uznGwG.js → LoadingView-B-xFwd2N.js} +2 -2
- package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-BWvdx0k3.js} +531 -430
- package/dist/MobileIDE-DpdEQEqc.js +783 -0
- package/dist/{ModelCard-D8tKkK9-.js → ModelCard-DkAMP4X9.js} +19 -20
- package/dist/{ModelView-rAurf9n8.js → ModelView-DomyhN8g.js} +7 -7
- package/dist/PageLoading-BAvKGo9h.js +5937 -0
- package/dist/{ResultComponent-_-1qZCfv.js → ResultComponent-zoOSoRLe.js} +8 -8
- package/dist/{Results-CQGpFmPQ.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-BpmL___H.js → SymbolsPane-DfaxeaPS.js} +6 -3
- package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
- package/dist/{TutorialPage-CZGBRJdq.js → TutorialPage-BtEJG7cT.js} +27 -28
- package/dist/{VegaLiteChart-CmkOw6yD.js → VegaLiteChart-BVyAab-o.js} +12191 -10975
- package/dist/{WelcomePage-CLKvAvk-.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/AssetAutoImporter.vue.d.ts.map +1 -1
- package/dist/components/FeedbackBanner.vue.d.ts +4 -0
- package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
- package/dist/components/TipsCTA.vue.d.ts +1 -1
- package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
- package/dist/components/chartHelpers.d.ts +9 -1
- package/dist/components/chartHelpers.d.ts.map +1 -1
- package/dist/components/chartRenderManager.d.ts +4 -1
- package/dist/components/chartRenderManager.d.ts.map +1 -1
- package/dist/components/community/AddStoreModal.vue.d.ts +1 -1
- package/dist/components/community/AddStoreModal.vue.d.ts.map +1 -1
- package/dist/components/community/CommunityModelCard.vue.d.ts.map +1 -1
- 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/Editor.vue.d.ts.map +1 -1
- 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/jobs/JobsAddStoreModal.vue.d.ts.map +1 -1
- package/dist/components/llm/ChatCreatorModal.vue.d.ts +17 -1
- package/dist/components/llm/ChatCreatorModal.vue.d.ts.map +1 -1
- package/dist/components/llm/ChatModelSelect.vue.d.ts +13 -0
- package/dist/components/llm/ChatModelSelect.vue.d.ts.map +1 -0
- package/dist/components/llm/GlobalChatPanel.vue.d.ts.map +1 -1
- package/dist/components/model/ModelCard.vue.d.ts +3 -3
- package/dist/components/sidebar/CommunityModelList.vue.d.ts +33 -50
- package/dist/components/sidebar/CommunityModelList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/CommunityModelListItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/EditorList.vue.d.ts +32 -49
- package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts +65 -99
- 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 +54 -57
- package/dist/dashboards/layerSpec.d.ts +38 -4
- package/dist/dashboards/layerSpec.d.ts.map +1 -1
- package/dist/dashboards/lineAreaSpec.d.ts +8 -80
- package/dist/dashboards/lineAreaSpec.d.ts.map +1 -1
- package/dist/dashboards/mapSpec.d.ts +1 -0
- package/dist/dashboards/mapSpec.d.ts.map +1 -1
- package/dist/dashboards/spec.d.ts.map +1 -1
- package/dist/data/tutorial/documentation.d.ts.map +1 -1
- package/dist/data/tutorial/startupScripts.d.ts +3 -0
- package/dist/data/tutorial/startupScripts.d.ts.map +1 -0
- 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-C_YmXRy4.js → editorStore-CAlMJftt.js} +2084 -946
- package/dist/embed.js +2 -2
- package/dist/entry.dashboard.d.ts +1 -0
- package/dist/entry.dashboard.d.ts.map +1 -1
- package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
- package/dist/{globalChatRuntime-oMLiPLNC.js → globalChatRuntime-CyS7vH51.js} +18 -18
- package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
- package/dist/{helpers-DcWCa6bX.js → helpers-BbVlA3Pf.js} +39 -39
- 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/data/constants.d.ts +1 -1
- package/dist/llm/data/constants.d.ts.map +1 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts +7 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
- package/dist/llm/docsIndex.d.ts.map +1 -1
- package/dist/llm/openai.d.ts +2 -1
- package/dist/llm/openai.d.ts.map +1 -1
- package/dist/llm-ClU-2rgk.js +18493 -0
- package/dist/llm.js +2 -3
- package/dist/{localStorage-CSuYS7QE.js → localStorage-CGQ1iJXt.js} +39 -42
- package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
- package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
- package/dist/models/helpers.d.ts.map +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-Bk7M797_.js → reconcile-DXIvGwBk.js} +1 -1
- package/dist/{remoteStoreSync-CLvZJrTK.js → remoteStoreSync-CuQBWpWf.js} +3 -3
- package/dist/remotes/displayHelpers.d.ts.map +1 -1
- package/dist/remotes/genericStoreMetadata.d.ts +1 -0
- package/dist/remotes/genericStoreMetadata.d.ts.map +1 -1
- package/dist/remotes/models.d.ts +37 -5
- package/dist/remotes/models.d.ts.map +1 -1
- package/dist/remotes/staticStorePresets.d.ts +22 -0
- package/dist/remotes/staticStorePresets.d.ts.map +1 -0
- package/dist/remotes/storeService.d.ts +25 -4
- package/dist/remotes/storeService.d.ts.map +1 -1
- 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/communityApiStore.d.ts +32 -60
- package/dist/stores/communityApiStore.d.ts.map +1 -1
- package/dist/stores/connectionStore.d.ts.map +1 -1
- package/dist/stores/resolver.d.ts +5 -0
- package/dist/stores/resolver.d.ts.map +1 -1
- package/dist/stores/urlStore.d.ts +1 -0
- package/dist/stores/urlStore.d.ts.map +1 -1
- 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-GV1ufcqw.js → useChatWithTools-m3Jn_SV-.js} +11 -11
- package/dist/{useDashboard-OoBKkkuQ.js → useDashboard-BOAuvVEw.js} +1013 -1021
- 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/MobileIDE.vue.d.ts.map +1 -1
- 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 +41 -58
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/views.js +193 -195
- 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-DfMd_DSk.js +0 -403
- package/dist/ChatCreatorModal-BTqY06B6.js +0 -177
- package/dist/DashboardCreatorInline-LWvf--2x.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/MobileIDE-CHGJoh05.js +0 -781
- package/dist/ModalDialog-D1EOG4rl.js +0 -42
- package/dist/ModelCreator-DrxLxeyH.js +0 -253
- package/dist/PageLoading-I6mr-7NB.js +0 -2666
- 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-CNkWQ4r7.js +0 -641
- package/dist/demoSetup-DiW3ROFQ.js +0 -2941
- package/dist/editorRefinementToolExecutor-mX8ClQ63.js +0 -4498
- package/dist/editorStore-Ch7k-gse.js +0 -972
- package/dist/formatting-BbJ5ICgh.js +0 -6
- package/dist/llm-_807I79k.js +0 -11965
- package/dist/llmStore-CSzM1IZd.js +0 -153
- package/dist/monaco.contribution-ikesdolO.js +0 -128
- package/dist/stores-C1wUWiFm.js +0 -1708
- package/dist/trilogy-BroD2Qmp.js +0 -4
- package/dist/urlStore-Dgmwx1YI.js +0 -54
- package/dist/useGlobalChatPanel-CIeUyZba.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,10 +1,10 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-
|
|
3
|
-
import {
|
|
4
|
-
import { t as r } from "./ErrorMessage-
|
|
5
|
-
import { t as i } from "./MarkdownRenderer-
|
|
6
|
-
import {
|
|
7
|
-
import { t as o } from "./StoreTokenModal-
|
|
1
|
+
import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
|
+
import { X as n } from "./editorStore-CAlMJftt.js";
|
|
4
|
+
import { t as r } from "./ErrorMessage-D5JeF3Iz.js";
|
|
5
|
+
import { t as i } from "./MarkdownRenderer-BWvdx0k3.js";
|
|
6
|
+
import { p as a } from "./PageLoading-BAvKGo9h.js";
|
|
7
|
+
import { t as o } from "./StoreTokenModal-CM8WXdu1.js";
|
|
8
8
|
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, inject as g, normalizeClass as _, onMounted as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, watch as w, withCtx as T } from "vue";
|
|
9
9
|
//#region components/community/CommunityModelHeader.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disabled"], k = { key: 0 }, A = { key: 1 }, j = { class: "filters my-4" }, M = { class: "filter-row flex gap-4 mb-2" }, N = { class: "search-box flex-grow" }, P = ["value"], F = { class: "engine-filter" }, I = ["value", "disabled"], L = ["value"], R = { class: "import-status-filter" }, z = ["value"], ee = /*#__PURE__*/ t(/* @__PURE__ */ h({
|
|
@@ -65,22 +65,26 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
65
65
|
]], 40, z)])
|
|
66
66
|
])])]));
|
|
67
67
|
}
|
|
68
|
-
}), [["__scopeId", "data-v-b6accb9f"]]), B = { class: "model-item" }, te =
|
|
68
|
+
}), [["__scopeId", "data-v-b6accb9f"]]), B = { class: "model-item" }, te = { class: "model-item-header" }, ne = { class: "model-info" }, re = ["data-testid"], ie = ["data-testid"], V = { class: "text-faint" }, H = ["title", "data-testid"], U = { class: "expand-text" }, W = { class: "model-actions" }, G = ["disabled", "title"], K = ["data-testid"], q = {
|
|
69
69
|
key: 0,
|
|
70
|
-
class: "
|
|
71
|
-
|
|
70
|
+
class: "share-status",
|
|
71
|
+
role: "status"
|
|
72
|
+
}, J = {
|
|
72
73
|
key: 1,
|
|
74
|
+
class: "model-creator-container"
|
|
75
|
+
}, Y = { class: "model-description" }, ae = { class: "description-content" }, oe = ["data-testid"], se = {
|
|
76
|
+
key: 2,
|
|
73
77
|
class: "model-content-expanded"
|
|
74
|
-
},
|
|
78
|
+
}, ce = { class: "components-grid" }, le = { class: "component-main" }, ue = { class: "component-info" }, de = ["href"], fe = {
|
|
75
79
|
key: 0,
|
|
76
80
|
class: "component-purpose"
|
|
77
|
-
},
|
|
81
|
+
}, pe = {
|
|
78
82
|
key: 0,
|
|
79
83
|
class: "component-actions"
|
|
80
|
-
},
|
|
84
|
+
}, me = ["onClick", "title"], he = {
|
|
81
85
|
key: 1,
|
|
82
86
|
class: "component-actions"
|
|
83
|
-
},
|
|
87
|
+
}, ge = ["onClick", "title"], X = /*#__PURE__*/ t(/* @__PURE__ */ h({
|
|
84
88
|
__name: "CommunityModelCard",
|
|
85
89
|
props: {
|
|
86
90
|
file: {},
|
|
@@ -107,115 +111,142 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
107
111
|
setup(e, { expose: t, emit: r }) {
|
|
108
112
|
let o = e, l = r, h = g("modelStore");
|
|
109
113
|
if (!h) throw Error("ModelConfigStore not found in context");
|
|
110
|
-
let v = b(o.initialCreatorExpanded), C = b(o.initialComponentsExpanded), w = b(o.initialDescriptionExpanded), T =
|
|
114
|
+
let v = b(o.initialCreatorExpanded), C = b(o.initialComponentsExpanded), w = b(o.initialDescriptionExpanded), T = b(""), E = c(() => {
|
|
115
|
+
let e = o.file.components.filter((e) => e.name?.trim() && [
|
|
116
|
+
"trilogy",
|
|
117
|
+
"sql",
|
|
118
|
+
"dashboard"
|
|
119
|
+
].includes(e.type));
|
|
120
|
+
return e.find((e) => e.purpose?.trim().toLowerCase() === "example") ?? e[0];
|
|
121
|
+
}), D = c(() => o.file.name in h.models), O = c(() => n(o.file.engine)), k = c(() => o.file.description ? o.file.description.split("\n").length > 5 : !1), A = (e) => {
|
|
111
122
|
switch (e) {
|
|
112
123
|
case "dashboard": return "mdi mdi-view-dashboard";
|
|
113
124
|
case "trilogy": return "mdi mdi-database";
|
|
114
125
|
case "sql": return "mdi mdi-code-tags";
|
|
115
126
|
default: return "mdi mdi-file";
|
|
116
127
|
}
|
|
117
|
-
},
|
|
128
|
+
}, j = () => {
|
|
118
129
|
v.value = !v.value, l("creator-toggled", v.value);
|
|
119
|
-
},
|
|
130
|
+
}, M = () => {
|
|
120
131
|
C.value = !C.value, l("components-toggled", C.value);
|
|
121
|
-
},
|
|
132
|
+
}, N = () => {
|
|
122
133
|
w.value = !w.value, l("description-toggled", w.value);
|
|
123
|
-
},
|
|
134
|
+
}, P = async (e, t) => {
|
|
135
|
+
T.value = "";
|
|
124
136
|
let n = window.location.origin + window.location.pathname, r = new URLSearchParams({
|
|
125
137
|
screen: "asset-import",
|
|
126
138
|
import: o.file.downloadUrl,
|
|
127
139
|
assetType: t,
|
|
128
|
-
assetName: e.name,
|
|
140
|
+
assetName: e.name || "",
|
|
129
141
|
modelName: o.file.name,
|
|
130
142
|
connection: o.file.engine
|
|
131
143
|
});
|
|
132
|
-
o.file.store?.type === "generic"
|
|
144
|
+
o.file.store?.type === "generic" ? (r.set("store", o.file.store.baseUrl), o.file.store.token && r.set("token", o.file.store.token)) : o.file.store?.type === "static" && (r.set("store", o.file.store.baseUrl), r.set("kind", "static"));
|
|
133
145
|
let i = `${n}#${r.toString()}`;
|
|
134
146
|
try {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
147
|
+
try {
|
|
148
|
+
await navigator.clipboard.writeText(i);
|
|
149
|
+
} catch {
|
|
150
|
+
let e = document.createElement("textarea");
|
|
151
|
+
e.value = i, e.style.position = "fixed", e.style.opacity = "0", document.body.appendChild(e);
|
|
152
|
+
try {
|
|
153
|
+
if (e.select(), !document.execCommand("copy")) throw Error("Copy failed");
|
|
154
|
+
} finally {
|
|
155
|
+
e.remove();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
l(t === "dashboard" ? "dashboard-link-copied" : "editor-link-copied", e), T.value = "Share link copied.";
|
|
159
|
+
} catch {
|
|
160
|
+
T.value = "Unable to copy the share link. Please try again.";
|
|
140
161
|
}
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
}, F = async () => {
|
|
163
|
+
let e = E.value;
|
|
164
|
+
e && await P(e, e.type === "dashboard" ? "dashboard" : "editor");
|
|
165
|
+
}, I = async (e) => {
|
|
166
|
+
await P(e, "dashboard");
|
|
167
|
+
}, L = async (e) => {
|
|
168
|
+
await P(e, "editor");
|
|
145
169
|
};
|
|
146
170
|
return t({
|
|
147
|
-
toggleCreator:
|
|
148
|
-
toggleComponents:
|
|
149
|
-
toggleDescription:
|
|
171
|
+
toggleCreator: j,
|
|
172
|
+
toggleComponents: M,
|
|
173
|
+
toggleDescription: N,
|
|
150
174
|
creatorIsExpanded: () => v.value,
|
|
151
175
|
isComponentsExpanded: () => C.value,
|
|
152
176
|
isDescriptionExpanded: () => w.value
|
|
153
177
|
}), (t, n) => (y(), d("div", B, [
|
|
154
|
-
f("
|
|
155
|
-
onClick: k,
|
|
156
|
-
"data-testid": `import-${e.file.name}`,
|
|
157
|
-
class: "action-button-topright"
|
|
158
|
-
}, S(v.value ? "Hide" : T.value ? "Reload" : "Import"), 9, te),
|
|
159
|
-
f("div", ne, [f("div", re, [f("div", {
|
|
178
|
+
f("div", te, [f("div", ne, [f("div", {
|
|
160
179
|
class: "font-semibold flex items-center",
|
|
161
180
|
"data-testid": `model-card-title-${e.file.name}`
|
|
162
181
|
}, [
|
|
163
|
-
|
|
182
|
+
D.value ? (y(), d("span", {
|
|
164
183
|
key: 0,
|
|
165
184
|
class: "imported-indicator mr-2",
|
|
166
185
|
"data-testid": `imported-${e.file.name}`
|
|
167
|
-
}, [...n[0] ||= [f("i", { class: "mdi mdi-check check-icon" }, null, -1)]], 8,
|
|
186
|
+
}, [...n[0] ||= [f("i", { class: "mdi mdi-check check-icon" }, null, -1)]], 8, ie)) : u("", !0),
|
|
168
187
|
p(" " + S(e.file.name) + " ", 1),
|
|
169
|
-
f("span",
|
|
170
|
-
], 8,
|
|
188
|
+
f("span", V, "(" + S(e.file.engine) + ")", 1)
|
|
189
|
+
], 8, re), f("button", {
|
|
171
190
|
class: _(["expand-button", { expanded: C.value }]),
|
|
172
|
-
onClick:
|
|
191
|
+
onClick: M,
|
|
173
192
|
title: C.value ? "Collapse Content" : "Show Content",
|
|
174
193
|
"data-testid": `${C.value ? "collapse" : "expand"}-${e.file.name}`
|
|
175
|
-
}, [n[1] ||= f("i", { class: "mdi mdi-chevron-down expand-icon" }, null, -1), f("span",
|
|
176
|
-
|
|
194
|
+
}, [n[1] ||= f("i", { class: "mdi mdi-chevron-down expand-icon" }, null, -1), f("span", U, S(C.value ? "Collapse" : "Expand") + " (" + S(e.file.components.length) + " items)", 1)], 10, H)]), f("div", W, [f("button", {
|
|
195
|
+
onClick: F,
|
|
196
|
+
disabled: !E.value,
|
|
197
|
+
title: E.value ? `Copy import link opening ${E.value.name}` : "No shareable components in this model",
|
|
198
|
+
"data-testid": "copy-model-share-button"
|
|
199
|
+
}, [...n[2] ||= [f("i", {
|
|
200
|
+
class: "mdi mdi-content-copy",
|
|
201
|
+
"aria-hidden": "true"
|
|
202
|
+
}, null, -1), p(" Share Model ", -1)]], 8, G), f("button", {
|
|
203
|
+
onClick: j,
|
|
204
|
+
"data-testid": `import-${e.file.name}`
|
|
205
|
+
}, S(v.value ? "Hide" : D.value ? "Reload" : "Import"), 9, K)])]),
|
|
206
|
+
T.value ? (y(), d("p", q, S(T.value), 1)) : u("", !0),
|
|
207
|
+
v.value ? (y(), d("div", J, [m(a, {
|
|
177
208
|
formDefaults: {
|
|
178
209
|
importAddress: e.file.downloadUrl,
|
|
179
210
|
importToken: e.file.store?.type === "generic" ? e.file.store.token : void 0,
|
|
180
|
-
connection:
|
|
211
|
+
connection: O.value,
|
|
181
212
|
name: e.file.name
|
|
182
213
|
},
|
|
183
214
|
absolute: !1,
|
|
184
215
|
visible: v.value,
|
|
185
|
-
onClose:
|
|
216
|
+
onClose: j
|
|
186
217
|
}, null, 8, ["formDefaults", "visible"])])) : u("", !0),
|
|
187
|
-
f("div",
|
|
188
|
-
class: _(["description-text", { "description-truncated": !w.value &&
|
|
218
|
+
f("div", Y, [f("div", ae, [f("div", {
|
|
219
|
+
class: _(["description-text", { "description-truncated": !w.value && k.value }]),
|
|
189
220
|
"data-testid": `model-card-description-${e.file.name}`
|
|
190
|
-
}, [m(i, { markdown: e.file.description }, null, 8, ["markdown"])], 10,
|
|
221
|
+
}, [m(i, { markdown: e.file.description }, null, 8, ["markdown"])], 10, oe), k.value ? (y(), d("button", {
|
|
191
222
|
key: 0,
|
|
192
|
-
onClick:
|
|
223
|
+
onClick: N,
|
|
193
224
|
class: "description-toggle-button"
|
|
194
225
|
}, S(w.value ? "Show Less" : "Show More"), 1)) : u("", !0)])]),
|
|
195
|
-
C.value ? (y(), d("div",
|
|
226
|
+
C.value ? (y(), d("div", se, [n[5] ||= f("div", { class: "content-header" }, [f("h4", null, "Model Components")], -1), f("div", ce, [(y(!0), d(s, null, x(e.file.components, (e) => (y(), d("div", {
|
|
196
227
|
key: e.url,
|
|
197
228
|
class: "component-item"
|
|
198
|
-
}, [f("div",
|
|
229
|
+
}, [f("div", le, [f("i", { class: _([A(e.type), "component-icon"]) }, null, 2), f("div", ue, [f("a", {
|
|
199
230
|
href: e.url,
|
|
200
231
|
target: "_blank",
|
|
201
232
|
class: "component-link"
|
|
202
|
-
}, S(e.name || "Unnamed Component"), 9,
|
|
203
|
-
onClick: (t) =>
|
|
233
|
+
}, S(e.name || "Unnamed Component"), 9, de), e.purpose ? (y(), d("span", fe, S(e.purpose), 1)) : u("", !0)])]), e.type === "dashboard" ? (y(), d("div", pe, [f("button", {
|
|
234
|
+
onClick: (t) => I(e),
|
|
204
235
|
class: "copy-import-button",
|
|
205
236
|
title: "Copy import link for " + e.name,
|
|
206
237
|
"data-testid": "copy-dashboard-share-button"
|
|
207
|
-
}, [...n[
|
|
208
|
-
onClick: (t) =>
|
|
238
|
+
}, [...n[3] ||= [f("i", { class: "mdi mdi-content-copy" }, null, -1), p(" Copy Share Link ", -1)]], 8, me)])) : e.type === "trilogy" || e.type === "sql" ? (y(), d("div", he, [f("button", {
|
|
239
|
+
onClick: (t) => L(e),
|
|
209
240
|
class: "copy-import-button",
|
|
210
241
|
title: "Copy import link for " + e.name,
|
|
211
242
|
"data-testid": "copy-editor-share-button"
|
|
212
|
-
}, [...n[
|
|
243
|
+
}, [...n[4] ||= [f("i", { class: "mdi mdi-content-copy" }, null, -1), p(" Copy Share Link ", -1)]], 8, ge)])) : u("", !0)]))), 128))])])) : u("", !0)
|
|
213
244
|
]));
|
|
214
245
|
}
|
|
215
|
-
}), [["__scopeId", "data-v-
|
|
246
|
+
}), [["__scopeId", "data-v-15d20c5b"]]), _e = { class: "model-page" }, ve = { class: "model-content" }, ye = { key: 0 }, be = { class: "error-actions" }, xe = {
|
|
216
247
|
key: 2,
|
|
217
248
|
class: "text-loading"
|
|
218
|
-
},
|
|
249
|
+
}, Se = {
|
|
219
250
|
key: 3,
|
|
220
251
|
class: "text-faint mt-4"
|
|
221
252
|
}, Z = /*#__PURE__*/ t(/* @__PURE__ */ h({
|
|
@@ -257,7 +288,7 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
257
288
|
break;
|
|
258
289
|
}
|
|
259
290
|
e && await i();
|
|
260
|
-
}), (n, c) => (y(), d("div",
|
|
291
|
+
}), (n, c) => (y(), d("div", _e, [
|
|
261
292
|
m(ee, {
|
|
262
293
|
searchQuery: A.value,
|
|
263
294
|
"onUpdate:searchQuery": c[0] ||= (e) => A.value = e,
|
|
@@ -283,7 +314,7 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
283
314
|
"showTokenButton",
|
|
284
315
|
"onRefresh"
|
|
285
316
|
]),
|
|
286
|
-
f("div",
|
|
317
|
+
f("div", ve, [L.value.length ? (y(), d("div", ye, [(y(!0), d(s, null, x(L.value, (e) => (y(), l(X, {
|
|
287
318
|
key: e.name,
|
|
288
319
|
file: e,
|
|
289
320
|
initialCreatorExpanded: D.value[e.name] || !1,
|
|
@@ -305,7 +336,7 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
305
336
|
key: 1,
|
|
306
337
|
type: "error"
|
|
307
338
|
}, {
|
|
308
|
-
action: T(() => [f("div",
|
|
339
|
+
action: T(() => [f("div", be, [I.value ? (y(), d("button", {
|
|
309
340
|
key: 0,
|
|
310
341
|
onClick: c[4] ||= (e) => h.value = !0,
|
|
311
342
|
class: "retry-button secondary",
|
|
@@ -317,7 +348,7 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
317
348
|
}, " Retry ")])]),
|
|
318
349
|
default: T(() => [p(S(_.value) + " ", 1)]),
|
|
319
350
|
_: 1
|
|
320
|
-
})) : P.value ? (y(), d("p",
|
|
351
|
+
})) : P.value ? (y(), d("p", xe, "Loading community models...")) : L.value.length ? u("", !0) : (y(), d("p", Se, " No models match your search criteria. "))]),
|
|
321
352
|
F.value ? (y(), l(o, {
|
|
322
353
|
key: 0,
|
|
323
354
|
show: h.value,
|
|
@@ -332,19 +363,19 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
332
363
|
])) : u("", !0)
|
|
333
364
|
]));
|
|
334
365
|
}
|
|
335
|
-
}), [["__scopeId", "data-v-85026b43"]]),
|
|
366
|
+
}), [["__scopeId", "data-v-85026b43"]]), Ce = { class: "view-container" }, we = {
|
|
336
367
|
key: 2,
|
|
337
368
|
class: "single-model-view"
|
|
338
|
-
}, Q = { class: "error-actions" },
|
|
369
|
+
}, Q = { class: "error-actions" }, Te = {
|
|
339
370
|
key: 2,
|
|
340
371
|
class: "loading-state"
|
|
341
|
-
},
|
|
372
|
+
}, Ee = {
|
|
342
373
|
key: 0,
|
|
343
374
|
class: "text-loading"
|
|
344
|
-
},
|
|
375
|
+
}, De = {
|
|
345
376
|
key: 1,
|
|
346
377
|
class: "text-error"
|
|
347
|
-
},
|
|
378
|
+
}, Oe = /*@__PURE__*/ h({
|
|
348
379
|
__name: "CommunityModels",
|
|
349
380
|
props: {
|
|
350
381
|
activeCommunityModelKey: {},
|
|
@@ -404,7 +435,7 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
404
435
|
s.value = !1;
|
|
405
436
|
}
|
|
406
437
|
}
|
|
407
|
-
}, { immediate: !0 }), (t, n) => (y(), d("div",
|
|
438
|
+
}, { immediate: !0 }), (t, n) => (y(), d("div", Ce, [h.value === "root" ? (y(), l(Z, {
|
|
408
439
|
key: 0,
|
|
409
440
|
remote: _.value,
|
|
410
441
|
"initial-search": e.initialSearch
|
|
@@ -417,7 +448,7 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
417
448
|
"engine",
|
|
418
449
|
"remote",
|
|
419
450
|
"initial-search"
|
|
420
|
-
])) : h.value === "model" ? (y(), d("div",
|
|
451
|
+
])) : h.value === "model" ? (y(), d("div", we, [C.value ? (y(), l(X, {
|
|
421
452
|
key: C.value.name,
|
|
422
453
|
file: C.value,
|
|
423
454
|
initialCreatorExpanded: !1,
|
|
@@ -441,7 +472,7 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
441
472
|
}, "Retry")])]),
|
|
442
473
|
default: T(() => [p(S(D.value) + " ", 1)]),
|
|
443
474
|
_: 1
|
|
444
|
-
})) : (y(), d("div",
|
|
475
|
+
})) : (y(), d("div", Te, [s.value ? (y(), d("p", Ee, "Loading model...")) : (y(), d("p", De, "Model not found"))]))])) : u("", !0), E.value?.type === "generic" ? (y(), l(o, {
|
|
445
476
|
key: 3,
|
|
446
477
|
show: m.value,
|
|
447
478
|
"store-name": E.value.name,
|
|
@@ -454,6 +485,6 @@ var E = { class: "section-header" }, D = { class: "header-actions" }, O = ["disa
|
|
|
454
485
|
"token"
|
|
455
486
|
])) : u("", !0)]));
|
|
456
487
|
}
|
|
457
|
-
}),
|
|
488
|
+
}), ke = /* @__PURE__ */ e({ default: () => $ }), $ = /*#__PURE__*/ t(Oe, [["__scopeId", "data-v-bcd63b28"]]);
|
|
458
489
|
//#endregion
|
|
459
|
-
export {
|
|
490
|
+
export { ke as n, $ as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
2
2
|
import { Fragment as t, Teleport as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, inject as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, watch as m } from "vue";
|
|
3
3
|
//#region components/ConnectionErrorPopup.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var h = {
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-
|
|
2
|
-
import { t } from "./_plugin-vue_export-helper-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./connections-
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as s } from "./CodeBlock-PT4no49I.js";
|
|
10
|
-
import { t as c } from "./CreateEditorFromDatasourcePopup-snOh1d5h.js";
|
|
1
|
+
import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
|
+
import { t as n, u as r } from "./base-DuKnVD-A.js";
|
|
4
|
+
import { r as i } from "./stores-LlyiwSbK.js";
|
|
5
|
+
import "./connections-CWH3zwH2.js";
|
|
6
|
+
import { r as a, u as o } from "./useGlobalChatPanel-DuP1q7_f.js";
|
|
7
|
+
import { t as s } from "./CodeBlock-BBsaC6hX.js";
|
|
8
|
+
import { t as c } from "./CreateEditorFromDatasourcePopup-CrVHUWFl.js";
|
|
11
9
|
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, inject as v, nextTick as y, normalizeClass as b, onMounted as x, onUnmounted as S, openBlock as C, ref as w, renderList as T, resolveComponent as E, toDisplayString as D, vModelText as O, watch as k, withCtx as A, withDirectives as j } from "vue";
|
|
12
10
|
//#region components/connection/ConnectionTable.vue?vue&type=script&lang.ts
|
|
13
11
|
var ee = _({
|
|
14
12
|
name: "TableViewer",
|
|
15
13
|
components: {
|
|
16
|
-
DataTable:
|
|
14
|
+
DataTable: a,
|
|
17
15
|
CreateEditorFromDatasourcePopup: c
|
|
18
16
|
},
|
|
19
17
|
props: {
|
|
@@ -37,7 +35,7 @@ var ee = _({
|
|
|
37
35
|
return e.table.columns.filter((e) => e.name.toLowerCase().includes(t) || e.type.toLowerCase().includes(t));
|
|
38
36
|
}), h = u(() => {
|
|
39
37
|
let t = p(e.table);
|
|
40
|
-
return a.value[t] || new
|
|
38
|
+
return a.value[t] || new r(/* @__PURE__ */ new Map(), []);
|
|
41
39
|
}), g = u(() => {
|
|
42
40
|
let t = p(e.table), n = a.value[t]?.data?.length > 0, r = e.table.columns.length > 0;
|
|
43
41
|
return !n || !r;
|
|
@@ -54,8 +52,8 @@ var ee = _({
|
|
|
54
52
|
}, E = () => {
|
|
55
53
|
window.removeEventListener("resize", C), b &&= (clearTimeout(b), null);
|
|
56
54
|
}, D = async (t = !1) => {
|
|
57
|
-
let
|
|
58
|
-
if (!(!t && a.value[
|
|
55
|
+
let n = p(e.table);
|
|
56
|
+
if (!(!t && a.value[n]?.data?.length > 0 && e.table.columns.length > 0)) {
|
|
59
57
|
o.value = !0, s.value = null;
|
|
60
58
|
try {
|
|
61
59
|
if (!f) throw Error("Connection store not found");
|
|
@@ -63,15 +61,15 @@ var ee = _({
|
|
|
63
61
|
if (!t) throw Error(`Connection "${e.connectionName}" not found`);
|
|
64
62
|
await t.refreshColumns(e.table.database, e.table.schema, e.table.name);
|
|
65
63
|
let i = await t.getTableSample(e.table.database, e.table.schema, e.table.name, 50);
|
|
66
|
-
a.value[
|
|
64
|
+
a.value[n] = i || new r(/* @__PURE__ */ new Map(), []);
|
|
67
65
|
} catch (e) {
|
|
68
|
-
console.error("Error loading sample data for",
|
|
66
|
+
console.error("Error loading sample data for", n, ":", e), s.value = e instanceof Error ? e.message : "Failed to load sample data";
|
|
69
67
|
} finally {
|
|
70
68
|
o.value = !1;
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
};
|
|
74
|
-
|
|
72
|
+
k(() => e.table, async (e, n) => {
|
|
75
73
|
p(e) !== (n ? p(n) : null) && (i.value = "", g.value && await D(), t.value === "data" && (await y(), _()));
|
|
76
74
|
}, { immediate: !1 }), k(t, async (e) => {
|
|
77
75
|
e === "data" && (await y(), _());
|
|
@@ -79,7 +77,9 @@ var ee = _({
|
|
|
79
77
|
T(), g.value && await D(), t.value === "data" && (await y(), _());
|
|
80
78
|
}), S(() => {
|
|
81
79
|
E();
|
|
82
|
-
})
|
|
80
|
+
});
|
|
81
|
+
let O = u(() => f ? f.connectionByName(e.connectionName) : null);
|
|
82
|
+
return {
|
|
83
83
|
activeTab: t,
|
|
84
84
|
searchTerm: i,
|
|
85
85
|
filteredColumns: m,
|
|
@@ -87,11 +87,11 @@ var ee = _({
|
|
|
87
87
|
isLoading: o,
|
|
88
88
|
error: s,
|
|
89
89
|
loadSampleData: () => D(!0),
|
|
90
|
-
AssetType:
|
|
90
|
+
AssetType: n,
|
|
91
91
|
resultContainerRef: c,
|
|
92
92
|
tabsRef: l,
|
|
93
93
|
containerHeight: d,
|
|
94
|
-
connectionInfo:
|
|
94
|
+
connectionInfo: O
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
}), te = { class: "table-viewer" }, ne = { class: "table-header" }, M = { class: "table-title-row" }, N = { class: "table-title-block" }, P = { class: "table-title" }, F = {
|
|
@@ -208,7 +208,7 @@ var fe = /*#__PURE__*/ t(ee, [["render", de], ["__scopeId", "data-v-ea998475"]])
|
|
|
208
208
|
required: !0
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
|
-
components: { LoadingButton:
|
|
211
|
+
components: { LoadingButton: o },
|
|
212
212
|
emits: [
|
|
213
213
|
"schema-selected",
|
|
214
214
|
"refresh-database",
|
|
@@ -421,11 +421,11 @@ var ct = /*#__PURE__*/ t(Ne, [["render", st], ["__scopeId", "data-v-eac58086"]])
|
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
setup(e) {
|
|
424
|
-
let t = e, n =
|
|
425
|
-
|
|
426
|
-
},
|
|
427
|
-
event?.stopPropagation(),
|
|
428
|
-
},
|
|
424
|
+
let t = e, n = u(() => t.connectionId), r = w(i(n.value)), a = w({}), o = w({}), c = u(() => r.value.history), d = u(() => r.value.isLoading), _ = u(() => r.value.error), v = (e) => {
|
|
425
|
+
a.value[e] = !a.value[e];
|
|
426
|
+
}, y = (e, t) => {
|
|
427
|
+
event?.stopPropagation(), o.value[e] = t;
|
|
428
|
+
}, S = (e) => {
|
|
429
429
|
let t = new Date(e);
|
|
430
430
|
return new Intl.DateTimeFormat("default", {
|
|
431
431
|
year: "numeric",
|
|
@@ -435,57 +435,57 @@ var ct = /*#__PURE__*/ t(Ne, [["render", st], ["__scopeId", "data-v-eac58086"]])
|
|
|
435
435
|
minute: "numeric",
|
|
436
436
|
second: "numeric"
|
|
437
437
|
}).format(t);
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
},
|
|
441
|
-
|
|
438
|
+
}, E = (e) => e < 1e3 ? `${e.toFixed(1)} ms` : `${(e / 1e3).toFixed(2)} s`, O = (e, t) => e.length > t ? `${e.substring(0, t)}...` : e, A = () => {
|
|
439
|
+
r.value.refreshHistory();
|
|
440
|
+
}, j = () => {
|
|
441
|
+
r.value.clearHistory();
|
|
442
442
|
};
|
|
443
443
|
return k(() => t.connectionId, (e) => {
|
|
444
|
-
|
|
444
|
+
a.value = {}, o.value = {}, r.value = i(e), A();
|
|
445
445
|
}, { immediate: !0 }), x(() => {
|
|
446
|
-
|
|
446
|
+
A();
|
|
447
447
|
}), (t, n) => (C(), p("div", lt, [m("div", ut, [
|
|
448
448
|
h(" Query History for " + D(e.connectionName) + " ", 1),
|
|
449
|
-
|
|
449
|
+
c.value.length > 0 ? (C(), p("span", dt, "(" + D(c.value.length) + ")", 1)) : f("", !0),
|
|
450
450
|
m("div", { class: "query-history-actions" }, [m("button", {
|
|
451
|
-
onClick:
|
|
451
|
+
onClick: A,
|
|
452
452
|
class: "refresh-btn",
|
|
453
453
|
title: "Refresh history"
|
|
454
454
|
}, "Refresh"), m("button", {
|
|
455
|
-
onClick:
|
|
455
|
+
onClick: j,
|
|
456
456
|
class: "clear-btn",
|
|
457
457
|
title: "Clear history"
|
|
458
458
|
}, "Clear")])
|
|
459
|
-
]),
|
|
459
|
+
]), d.value ? (C(), p("div", ft, "Loading history...")) : _.value ? (C(), p("div", pt, [m("p", null, "Error: " + D(_.value), 1), m("button", { onClick: A }, "Retry")])) : c.value.length === 0 ? (C(), p("div", mt, " No queries have been executed yet. ")) : (C(), p("div", ht, [(C(!0), p(l, null, T(c.value, (e) => (C(), p("div", {
|
|
460
460
|
key: e.id,
|
|
461
461
|
class: b(["query-history-item", e.status === "error" ? "error" : "success"])
|
|
462
462
|
}, [m("div", {
|
|
463
463
|
class: "query-history-item-header",
|
|
464
|
-
onClick: (t) =>
|
|
464
|
+
onClick: (t) => v(e.id)
|
|
465
465
|
}, [
|
|
466
466
|
m("div", _t, D(e.status === "success" ? "✓" : "✗"), 1),
|
|
467
|
-
m("div", vt, [m("div", yt, D(
|
|
468
|
-
m("span", xt, D(
|
|
467
|
+
m("div", vt, [m("div", yt, D(O(e.query, 50)), 1), m("div", bt, [
|
|
468
|
+
m("span", xt, D(E(e.executionTime)), 1),
|
|
469
469
|
m("span", St, D(e.resultSize) + " rows", 1),
|
|
470
|
-
m("span", Ct, D(
|
|
470
|
+
m("span", Ct, D(S(e.timestamp)), 1)
|
|
471
471
|
])]),
|
|
472
|
-
m("div", wt, D(
|
|
473
|
-
], 8, gt),
|
|
472
|
+
m("div", wt, D(a.value[e.id] ? "▼" : "▶"), 1)
|
|
473
|
+
], 8, gt), a.value[e.id] ? (C(), p("div", Tt, [
|
|
474
474
|
e.generatedQuery ? (C(), p("div", Et, [m("button", {
|
|
475
|
-
class: b(["tab-button", { active: !
|
|
476
|
-
onClick: (t) =>
|
|
475
|
+
class: b(["tab-button", { active: !o.value[e.id] }]),
|
|
476
|
+
onClick: (t) => y(e.id, !1)
|
|
477
477
|
}, " Executed Query ", 10, Dt), m("button", {
|
|
478
|
-
class: b(["tab-button", { active:
|
|
479
|
-
onClick: (t) =>
|
|
478
|
+
class: b(["tab-button", { active: o.value[e.id] }]),
|
|
479
|
+
onClick: (t) => y(e.id, !0)
|
|
480
480
|
}, " Generated Query ", 10, Q)])) : f("", !0),
|
|
481
481
|
g(s, {
|
|
482
482
|
class: "query-history-item-query",
|
|
483
|
-
content:
|
|
483
|
+
content: o.value[e.id] && e.generatedQuery ? e.generatedQuery : e.query,
|
|
484
484
|
language: "sql"
|
|
485
485
|
}, null, 8, ["content"]),
|
|
486
486
|
m("div", Ot, [
|
|
487
|
-
m("div", null, "Executed at: " + D(
|
|
488
|
-
m("div", null, "Time: " + D(
|
|
487
|
+
m("div", null, "Executed at: " + D(S(e.timestamp)), 1),
|
|
488
|
+
m("div", null, "Time: " + D(E(e.executionTime)), 1),
|
|
489
489
|
m("div", null, "Rows: " + D(e.resultSize), 1),
|
|
490
490
|
m("div", null, "Columns: " + D(e.resultColumns), 1),
|
|
491
491
|
e.status === "error" ? (C(), p("div", kt, " Error: " + D(e.errorMessage), 1)) : f("", !0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as r } from "./CodeBlock-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
2
|
+
import { u as t } from "./base-DuKnVD-A.js";
|
|
3
|
+
import { r as n } from "./useGlobalChatPanel-DuP1q7_f.js";
|
|
4
|
+
import { t as r } from "./CodeBlock-BBsaC6hX.js";
|
|
5
5
|
import { Fragment as i, Teleport as a, computed as o, createBlock as ee, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as p, nextTick as te, onMounted as ne, onUnmounted as re, openBlock as m, ref as h, renderList as ie, toDisplayString as g, vModelCheckbox as ae, vModelText as oe, watch as se, withDirectives as _, withKeys as v, withModifiers as y } from "vue";
|
|
6
6
|
//#region components/sidebar/CreateEditorFromDatasourcePopup.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var ce = ["data-testid"], le = ["data-testid"], ue = {
|