@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.
Files changed (200) hide show
  1. package/dist/AssetAutoImporter-OHphsfW9.js +403 -0
  2. package/dist/ChatCreatorModal-CuXha6Dg.js +218 -0
  3. package/dist/ChatModelSelect-Cz7axWjP.js +40 -0
  4. package/dist/{CodeBlock-PT4no49I.js → CodeBlock-BBsaC6hX.js} +4 -4
  5. package/dist/{CommunityModels-D7zWnHgG.js → CommunityModels-CIQQhO-y.js} +106 -75
  6. package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
  7. package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-7Jj_Ggdi.js} +49 -49
  8. package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-CrVHUWFl.js} +4 -4
  9. package/dist/{Dashboard-D1ZCTw5r.js → Dashboard-DxSi9W6Q.js} +276 -280
  10. package/dist/{DashboardImportSelector-CNxibXlS.js → DashboardImportSelector-kuDRDYi8.js} +2 -2
  11. package/dist/{DashboardMobile-D_m0xv17.js → DashboardMobile-CZEgTb0R.js} +39 -39
  12. package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
  13. package/dist/{Editor-DhsP18KE.js → Editor-D6tdutTm.js} +106 -104
  14. package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
  15. package/dist/{GlobalChatPanel-DFx9A4yP.js → GlobalChatPanel-BXZh0sdD.js} +169 -134
  16. package/dist/{IDE-BRMLxTfP.js → IDE-T8PmyAQ_.js} +200 -203
  17. package/dist/{JobsView-C9PYS6pZ.js → JobsView-Ca97MiSd.js} +12 -13
  18. package/dist/{LLMChat-Cqg6pTgC.js → LLMChat-Cch33Yd_.js} +3 -3
  19. package/dist/{LLMView-VkJpP-49.js → LLMView-BDb6wD74.js} +26 -26
  20. package/dist/{LoadingView-s1uznGwG.js → LoadingView-B-xFwd2N.js} +2 -2
  21. package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-BWvdx0k3.js} +531 -430
  22. package/dist/MobileIDE-DpdEQEqc.js +783 -0
  23. package/dist/{ModelCard-D8tKkK9-.js → ModelCard-DkAMP4X9.js} +19 -20
  24. package/dist/{ModelView-rAurf9n8.js → ModelView-DomyhN8g.js} +7 -7
  25. package/dist/PageLoading-BAvKGo9h.js +5937 -0
  26. package/dist/{ResultComponent-_-1qZCfv.js → ResultComponent-zoOSoRLe.js} +8 -8
  27. package/dist/{Results-CQGpFmPQ.js → Results-dq-SlJbU.js} +17 -19
  28. package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-AbxNvJ6p.js} +2 -2
  29. package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CM8WXdu1.js} +2 -2
  30. package/dist/{SymbolsPane-BpmL___H.js → SymbolsPane-DfaxeaPS.js} +6 -3
  31. package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
  32. package/dist/{TutorialPage-CZGBRJdq.js → TutorialPage-BtEJG7cT.js} +27 -28
  33. package/dist/{VegaLiteChart-CmkOw6yD.js → VegaLiteChart-BVyAab-o.js} +12191 -10975
  34. package/dist/{WelcomePage-CLKvAvk-.js → WelcomePage-BoqzYBLr.js} +5 -5
  35. package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
  36. package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
  37. package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
  38. package/dist/assets/json.worker-BezHzWUV.js +58 -0
  39. package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
  40. package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
  41. package/dist/components/AssetAutoImporter.vue.d.ts.map +1 -1
  42. package/dist/components/FeedbackBanner.vue.d.ts +4 -0
  43. package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
  44. package/dist/components/TipsCTA.vue.d.ts +1 -1
  45. package/dist/components/VegaLiteChart.vue.d.ts.map +1 -1
  46. package/dist/components/chartHelpers.d.ts +9 -1
  47. package/dist/components/chartHelpers.d.ts.map +1 -1
  48. package/dist/components/chartRenderManager.d.ts +4 -1
  49. package/dist/components/chartRenderManager.d.ts.map +1 -1
  50. package/dist/components/community/AddStoreModal.vue.d.ts +1 -1
  51. package/dist/components/community/AddStoreModal.vue.d.ts.map +1 -1
  52. package/dist/components/community/CommunityModelCard.vue.d.ts.map +1 -1
  53. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
  54. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
  55. package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
  56. package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
  57. package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
  58. package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
  59. package/dist/components/editor/Editor.vue.d.ts +3 -3
  60. package/dist/components/editor/Editor.vue.d.ts.map +1 -1
  61. package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
  62. package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
  63. package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
  64. package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
  65. package/dist/components/jobs/JobsAddStoreModal.vue.d.ts.map +1 -1
  66. package/dist/components/llm/ChatCreatorModal.vue.d.ts +17 -1
  67. package/dist/components/llm/ChatCreatorModal.vue.d.ts.map +1 -1
  68. package/dist/components/llm/ChatModelSelect.vue.d.ts +13 -0
  69. package/dist/components/llm/ChatModelSelect.vue.d.ts.map +1 -0
  70. package/dist/components/llm/GlobalChatPanel.vue.d.ts.map +1 -1
  71. package/dist/components/model/ModelCard.vue.d.ts +3 -3
  72. package/dist/components/sidebar/CommunityModelList.vue.d.ts +33 -50
  73. package/dist/components/sidebar/CommunityModelList.vue.d.ts.map +1 -1
  74. package/dist/components/sidebar/CommunityModelListItem.vue.d.ts.map +1 -1
  75. package/dist/components/sidebar/EditorList.vue.d.ts +32 -49
  76. package/dist/components/sidebar/EditorList.vue.d.ts.map +1 -1
  77. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
  78. package/dist/components/sidebar/Sidebar.vue.d.ts +65 -99
  79. package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  80. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
  81. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
  82. package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
  83. package/dist/connections.js +3 -4
  84. package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
  85. package/dist/dashboard.js +54 -57
  86. package/dist/dashboards/layerSpec.d.ts +38 -4
  87. package/dist/dashboards/layerSpec.d.ts.map +1 -1
  88. package/dist/dashboards/lineAreaSpec.d.ts +8 -80
  89. package/dist/dashboards/lineAreaSpec.d.ts.map +1 -1
  90. package/dist/dashboards/mapSpec.d.ts +1 -0
  91. package/dist/dashboards/mapSpec.d.ts.map +1 -1
  92. package/dist/dashboards/spec.d.ts.map +1 -1
  93. package/dist/data/tutorial/documentation.d.ts.map +1 -1
  94. package/dist/data/tutorial/startupScripts.d.ts +3 -0
  95. package/dist/data/tutorial/startupScripts.d.ts.map +1 -0
  96. package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
  97. package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
  98. package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
  99. package/dist/{editorRefinementRuntime-C_YmXRy4.js → editorStore-CAlMJftt.js} +2084 -946
  100. package/dist/embed.js +2 -2
  101. package/dist/entry.dashboard.d.ts +1 -0
  102. package/dist/entry.dashboard.d.ts.map +1 -1
  103. package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
  104. package/dist/{globalChatRuntime-oMLiPLNC.js → globalChatRuntime-CyS7vH51.js} +18 -18
  105. package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
  106. package/dist/{helpers-DcWCa6bX.js → helpers-BbVlA3Pf.js} +39 -39
  107. package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
  108. package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
  109. package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
  110. package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
  111. package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
  112. package/dist/llm/data/constants.d.ts +1 -1
  113. package/dist/llm/data/constants.d.ts.map +1 -1
  114. package/dist/llm/data/trilogySyntax.generated.d.ts +7 -1
  115. package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
  116. package/dist/llm/docsIndex.d.ts.map +1 -1
  117. package/dist/llm/openai.d.ts +2 -1
  118. package/dist/llm/openai.d.ts.map +1 -1
  119. package/dist/llm-ClU-2rgk.js +18493 -0
  120. package/dist/llm.js +2 -3
  121. package/dist/{localStorage-CSuYS7QE.js → localStorage-CGQ1iJXt.js} +39 -42
  122. package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
  123. package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
  124. package/dist/models/helpers.d.ts.map +1 -1
  125. package/dist/monaco.js +3 -3
  126. package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
  127. package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
  128. package/dist/{reconcile-Bk7M797_.js → reconcile-DXIvGwBk.js} +1 -1
  129. package/dist/{remoteStoreSync-CLvZJrTK.js → remoteStoreSync-CuQBWpWf.js} +3 -3
  130. package/dist/remotes/displayHelpers.d.ts.map +1 -1
  131. package/dist/remotes/genericStoreMetadata.d.ts +1 -0
  132. package/dist/remotes/genericStoreMetadata.d.ts.map +1 -1
  133. package/dist/remotes/models.d.ts +37 -5
  134. package/dist/remotes/models.d.ts.map +1 -1
  135. package/dist/remotes/staticStorePresets.d.ts +22 -0
  136. package/dist/remotes/staticStorePresets.d.ts.map +1 -0
  137. package/dist/remotes/storeService.d.ts +25 -4
  138. package/dist/remotes/storeService.d.ts.map +1 -1
  139. package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
  140. package/dist/static/test_import.vue.d.ts +4 -0
  141. package/dist/static/test_import.vue.d.ts.map +1 -0
  142. package/dist/stores/communityApiStore.d.ts +32 -60
  143. package/dist/stores/communityApiStore.d.ts.map +1 -1
  144. package/dist/stores/connectionStore.d.ts.map +1 -1
  145. package/dist/stores/resolver.d.ts +5 -0
  146. package/dist/stores/resolver.d.ts.map +1 -1
  147. package/dist/stores/urlStore.d.ts +1 -0
  148. package/dist/stores/urlStore.d.ts.map +1 -1
  149. package/dist/stores-LlyiwSbK.js +2604 -0
  150. package/dist/stores.js +4 -7
  151. package/dist/trilogy-studio-components.css +1 -1
  152. package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
  153. package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
  154. package/dist/{useChatWithTools-GV1ufcqw.js → useChatWithTools-m3Jn_SV-.js} +11 -11
  155. package/dist/{useDashboard-OoBKkkuQ.js → useDashboard-BOAuvVEw.js} +1013 -1021
  156. package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-DuP1q7_f.js} +1729 -711
  157. package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
  158. package/dist/views/MobileIDE.vue.d.ts.map +1 -1
  159. package/dist/views/ModelView.vue.d.ts +6 -6
  160. package/dist/views/ModelView.vue.d.ts.map +1 -1
  161. package/dist/views/TutorialPage.vue.d.ts +41 -58
  162. package/dist/views/TutorialPage.vue.d.ts.map +1 -1
  163. package/dist/views.js +193 -195
  164. package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
  165. package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
  166. package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
  167. package/package.json +29 -20
  168. package/dist/AssetAutoImporter-DfMd_DSk.js +0 -403
  169. package/dist/ChatCreatorModal-BTqY06B6.js +0 -177
  170. package/dist/DashboardCreatorInline-LWvf--2x.js +0 -129
  171. package/dist/DataTable-DoRDynP1.js +0 -365
  172. package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
  173. package/dist/LoadingButton-OH3frQuO.js +0 -138
  174. package/dist/MobileIDE-CHGJoh05.js +0 -781
  175. package/dist/ModalDialog-D1EOG4rl.js +0 -42
  176. package/dist/ModelCreator-DrxLxeyH.js +0 -253
  177. package/dist/PageLoading-I6mr-7NB.js +0 -2666
  178. package/dist/Tooltip-Dihir4zs.js +0 -103
  179. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  180. package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
  181. package/dist/base-C8IuZWqY.js +0 -164
  182. package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
  183. package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
  184. package/dist/connections-CJSb1TZl.js +0 -229
  185. package/dist/constants-DgFEYN2b.js +0 -7
  186. package/dist/dashboardStore-CNkWQ4r7.js +0 -641
  187. package/dist/demoSetup-DiW3ROFQ.js +0 -2941
  188. package/dist/editorRefinementToolExecutor-mX8ClQ63.js +0 -4498
  189. package/dist/editorStore-Ch7k-gse.js +0 -972
  190. package/dist/formatting-BbJ5ICgh.js +0 -6
  191. package/dist/llm-_807I79k.js +0 -11965
  192. package/dist/llmStore-CSzM1IZd.js +0 -153
  193. package/dist/monaco.contribution-ikesdolO.js +0 -128
  194. package/dist/stores-C1wUWiFm.js +0 -1708
  195. package/dist/trilogy-BroD2Qmp.js +0 -4
  196. package/dist/urlStore-Dgmwx1YI.js +0 -54
  197. package/dist/useGlobalChatPanel-CIeUyZba.js +0 -85
  198. package/dist/useIsMobile-CNpUQAvk.js +0 -8
  199. package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
  200. package/dist/workers-Br7ThUKL.js +0 -47
@@ -1,129 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import "./editorRefinementToolExecutor-mX8ClQ63.js";
3
- import { E as t } from "./editorRefinementRuntime-C_YmXRy4.js";
4
- import "./editorStore-Ch7k-gse.js";
5
- import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, inject as c, openBlock as l, ref as u, renderList as d, toDisplayString as f, vModelSelect as p, vModelText as m, withDirectives as h, withKeys as g, withModifiers as _ } from "vue";
6
- //#region components/dashboard/DashboardCreatorInline.vue?vue&type=script&lang.ts
7
- var v = {
8
- name: "DashboardCreatorInline",
9
- props: {
10
- visible: {
11
- type: Boolean,
12
- default: !1
13
- },
14
- testTag: {
15
- type: String,
16
- default: ""
17
- }
18
- },
19
- setup(e, { emit: n }) {
20
- let i = c("dashboardStore"), a = c("connectionStore"), o = c("llmConnectionStore"), s = c("editorStore"), l = c("saveDashboards"), d = c("setActiveDashboard");
21
- if (!i || !a || !o || !s || !l) throw Error("Dashboard or connection store is not provided!");
22
- let f = u(""), p = u(""), m = u(""), h = u(""), g = r(() => o.hasActiveDefaultConnection), _ = r(() => p.value ? g.value && m.value.trim() ? !0 : !!f.value.trim() : !1), v = r(() => g.value && m.value.trim() ? "Leave blank to let the assistant choose" : "My Dashboard"), y = r(() => Object.values(a.connections).filter((e) => e.model && !e.deleted).sort((e, t) => e.name.localeCompare(t.name))), b = r(() => {
23
- let e = p.value ? a.connections[p.value] : void 0;
24
- return e ? Object.values(s.editors).filter((n) => t(n.type) && n.connectionId === e.id).map((e) => ({
25
- id: e.id,
26
- name: e.name,
27
- alias: ""
28
- })) : [];
29
- });
30
- return r(() => (b.value.length > 0 && !h.value ? h.value = b.value[0].id : b.value.length === 0 && (h.value = ""), b.value)), y.value.length > 0 && !p.value && (p.value = y.value[0].id), {
31
- dashboardName: f,
32
- selectedConnection: p,
33
- dashboardPrompt: m,
34
- showPromptField: g,
35
- canSubmit: _,
36
- namePlaceholder: v,
37
- connections: y,
38
- availableImports: b,
39
- selectedImport: h,
40
- createDashboard: async () => {
41
- if (_.value) try {
42
- let e = f.value.trim();
43
- e ||= `Dashboard ${(/* @__PURE__ */ new Date()).toLocaleTimeString([], {
44
- hour: "2-digit",
45
- minute: "2-digit"
46
- })}`;
47
- let t = i.newDashboard(e, p.value);
48
- if (h.value) {
49
- let e = b.value.find((e) => e.id === h.value);
50
- e && i.updateDashboardImports(t.id, [e]);
51
- }
52
- let r = g.value ? m.value.trim() : "";
53
- r && i.setPendingChatPrompt(t.id, r), f.value = "", h.value = "", m.value = "", l(), n("close"), d ? d(t.id) : i.setActiveDashboard(t.id), console.log("New dashboard created:", t.id), n("dashboard-created", t.id);
54
- } catch (e) {
55
- console.error("Failed to create dashboard:", e), alert(`Error creating dashboard: ${e instanceof Error ? e.message : String(e)}`);
56
- }
57
- },
58
- cancel: () => {
59
- f.value = "", m.value = "", h.value = "", n("close");
60
- }
61
- };
62
- }
63
- }, y = {
64
- key: 0,
65
- class: "dashboard-creator creator-container"
66
- }, b = {
67
- key: 0,
68
- class: "form-group"
69
- }, x = ["data-testid"], S = {
70
- key: 1,
71
- class: "form-divider"
72
- }, C = { class: "form-group" }, w = { for: "dashboard-name" }, T = {
73
- key: 0,
74
- class: "optional-label"
75
- }, E = ["placeholder", "data-testid"], D = { class: "form-group" }, O = ["data-testid"], k = ["value"], A = {
76
- key: 2,
77
- class: "form-group"
78
- }, j = ["data-testid"], M = ["value"], N = { class: "form-actions button-row" }, P = ["disabled", "data-testid"], F = ["data-testid"];
79
- function I(e, t, r, c, u, v) {
80
- return r.visible ? (l(), a("div", y, [
81
- t[13] ||= o("h4", null, "Create New Dashboard", -1),
82
- c.showPromptField ? (l(), a("div", b, [t[8] ||= o("label", { for: "dashboard-prompt" }, "Describe your dashboard", -1), h(o("textarea", {
83
- id: "dashboard-prompt",
84
- "onUpdate:modelValue": t[0] ||= (e) => c.dashboardPrompt = e,
85
- placeholder: "Describe what you want to analyze. The assistant will build it (and pick a title if you skip the next field)...",
86
- rows: "3",
87
- onKeyup: t[1] ||= g(_((...e) => c.createDashboard && c.createDashboard(...e), ["ctrl"]), ["enter"]),
88
- "data-testid": r.testTag ? `dashboard-creator-prompt-${r.testTag}` : "dashboard-creator-prompt"
89
- }, null, 40, x), [[m, c.dashboardPrompt]])])) : i("", !0),
90
- c.showPromptField ? (l(), a("div", S, [...t[9] ||= [o("span", null, "or set manually", -1)]])) : i("", !0),
91
- o("div", C, [o("label", w, [t[10] ||= s(" Name ", -1), c.showPromptField && c.dashboardPrompt.trim() ? (l(), a("span", T, "(optional)")) : i("", !0)]), h(o("input", {
92
- id: "dashboard-name",
93
- "onUpdate:modelValue": t[2] ||= (e) => c.dashboardName = e,
94
- type: "text",
95
- placeholder: c.namePlaceholder,
96
- onKeyup: t[3] ||= g((...e) => c.createDashboard && c.createDashboard(...e), ["enter"]),
97
- "data-testid": r.testTag ? `dashboard-creator-name-${r.testTag}` : "dashboard-creator-name"
98
- }, null, 40, E), [[m, c.dashboardName]])]),
99
- o("div", D, [t[11] ||= o("label", { for: "dashboard-connection" }, "Connection", -1), h(o("select", {
100
- id: "dashboard-connection",
101
- "onUpdate:modelValue": t[4] ||= (e) => c.selectedConnection = e,
102
- "data-testid": r.testTag ? `dashboard-creator-connection-${r.testTag}` : "dashboard-creator-connection"
103
- }, [(l(!0), a(n, null, d(c.connections, (e) => (l(), a("option", {
104
- key: e.id,
105
- value: e.id
106
- }, f(e.name), 9, k))), 128))], 8, O), [[p, c.selectedConnection]])]),
107
- c.selectedConnection && c.availableImports.length > 0 ? (l(), a("div", A, [t[12] ||= o("label", { for: "dashboard-import" }, "Import", -1), h(o("select", {
108
- id: "dashboard-import",
109
- "onUpdate:modelValue": t[5] ||= (e) => c.selectedImport = e,
110
- "data-testid": r.testTag ? `dashboard-creator-import-${r.testTag}` : "dashboard-creator-import"
111
- }, [(l(!0), a(n, null, d(c.availableImports, (e) => (l(), a("option", {
112
- key: e.name,
113
- value: e.id
114
- }, f(e.name), 9, M))), 128))], 8, j), [[p, c.selectedImport]])])) : i("", !0),
115
- o("div", N, [o("button", {
116
- onClick: t[6] ||= (...e) => c.createDashboard && c.createDashboard(...e),
117
- disabled: !c.canSubmit,
118
- "data-testid": r.testTag ? `dashboard-creator-submit-${r.testTag}` : "dashboard-creator-submit",
119
- class: "create-btn"
120
- }, " Create ", 8, P), o("button", {
121
- onClick: t[7] ||= (...e) => c.cancel && c.cancel(...e),
122
- "data-testid": r.testTag ? `dashboard-creator-cancel-${r.testTag}` : "dashboard-creator-cancel",
123
- class: "cancel-btn"
124
- }, " Cancel ", 8, F)])
125
- ])) : i("", !0);
126
- }
127
- var L = /*#__PURE__*/ e(v, [["render", I], ["__scopeId", "data-v-410e08e1"]]);
128
- //#endregion
129
- export { L as t };
@@ -1,365 +0,0 @@
1
- import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import { o as t } from "./config-DwTONafa.js";
3
- import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
- import { l as r, t as i } from "./results-DTgAKr5j.js";
5
- import { t as a } from "./formatting-BbJ5ICgh.js";
6
- import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m, u as h } from "./tabulator_esm-CxLvGDp8.js";
7
- import { createCommentVNode as g, createElementBlock as _, createElementVNode as v, inject as y, markRaw as b, normalizeClass as x, openBlock as S, shallowRef as C } from "vue";
8
- //#region components/DataTable.vue?vue&type=script&lang.ts
9
- h.registerModule([
10
- s,
11
- m,
12
- o,
13
- c,
14
- l,
15
- u,
16
- f,
17
- p,
18
- d
19
- ]);
20
- function w(e, t) {
21
- if (!e) return;
22
- let n = "<table class=\"tabulator-sub-table\">", r = t.keys().next().value;
23
- if (!r) return "<table class=\"tabulator-sub-table\"><tbody><tr><td>No data</td></tr></tbody></table>";
24
- let a = t.get(r);
25
- return a ? (n += "<tbody >", e.forEach((e) => {
26
- let o = e[r];
27
- a.type == i.STRUCT && a.children ? o = T(o, a.children) : a.type === i.ARRAY && (o = w(o, t)), n += "<tr class=\"tabulator-sub-row\">", n += `<td class="tabulator-sub-cell">${o}</td>`, n += "</tr>";
28
- }), n += "</tbody>", n += "</table>", n) : "<table class=\"tabulator-sub-table\"><tbody><tr><td>No data</td></tr></tbody></table>";
29
- }
30
- function T(e, t) {
31
- if (!e) return;
32
- let n = "<table class=\"tabulator-sub-table\">";
33
- return n += "<tbody >", t.forEach((t, r) => {
34
- let a = e[t.name];
35
- t.type === i.ARRAY && t.children && (a = w(a, t.children)), t.type === i.STRUCT && t.children && (a = T(a, t.children)), n += "<tr class=\"tabulator-sub-row\">", n += `<td class="tabulator-sub-cell tabulator-sub-cell-header">${t.name}</td>`, n += `<td class="tabulator-sub-cell">${a}</td>`, n += "</tr>";
36
- }), n += "</tbody>", n += "</table>", n;
37
- }
38
- function E(e) {
39
- let t = Intl.DateTimeFormat().resolvedOptions().timeZone;
40
- if (e.traits?.includes("usd")) return {
41
- formatter: "money",
42
- formatterParams: {
43
- symbol: "$",
44
- precision: 4
45
- }
46
- };
47
- if (e.traits?.includes("percent")) return { formatter: (e) => (e.getValue() * 100).toFixed(2) + "%" };
48
- if (e.traits?.includes("url_image")) return { formatter: (e) => {
49
- let t = e.getValue();
50
- return t ? `<img src="${t}" alt="${t}" style="max-width: 100%; max-height: 100%;">` : "";
51
- } };
52
- switch (e.type) {
53
- case i.ARRAY: return { formatter: (t) => w(t.getValue(), e.children || /* @__PURE__ */ new Map()) };
54
- case i.STRUCT: return { formatter: (t) => T(t.getValue(), e.children || /* @__PURE__ */ new Map()) };
55
- case i.FLOAT: return {
56
- formatter: "money",
57
- formatterParams: { precision: e.scale && e.scale >= 0 ? e.scale : !1 }
58
- };
59
- case i.DATETIME: return {
60
- formatter: "datetime",
61
- formatterParams: {
62
- inputFormat: "iso",
63
- outputFormat: "yyyy-MM-dd HH:mm",
64
- invalidPlaceholder: "(invalid datetime)",
65
- timezone: t
66
- }
67
- };
68
- case i.TIMESTAMP: return {
69
- formatter: "datetime",
70
- formatterParams: {
71
- outputFormat: "yyyy-MM-dd HH:mm:ss Z",
72
- invalidPlaceholder: "(invalid timestamp)",
73
- timezone: t
74
- }
75
- };
76
- case i.DATE: return {
77
- formatter: "datetime",
78
- formatterParams: {
79
- inputFormat: "yyyy-MM-dd",
80
- outputFormat: "yyyy-MM-dd",
81
- invalidPlaceholder: "(invalid date)",
82
- timezone: "UTC"
83
- }
84
- };
85
- case i.TIME: return {
86
- formatter: "datetime",
87
- formatterParams: {
88
- inputFormat: "HH:mm:ss",
89
- outputFormat: "HH:mm",
90
- invalidPlaceholder: "(invalid time)",
91
- timezone: t
92
- }
93
- };
94
- case i.TIMESTAMP: return {
95
- formatter: "datetime",
96
- formatterParams: {
97
- inputFormat: "HH:mm:ss",
98
- outputFormat: "HH:mm",
99
- invalidPlaceholder: "(invalid time)",
100
- timezone: t
101
- }
102
- };
103
- case i.BOOLEAN: return {
104
- formatter: "tickCross",
105
- formatterParams: {
106
- allowEmpty: !0,
107
- tickElement: "✓",
108
- crossElement: "✗"
109
- }
110
- };
111
- default: return { formatter: "plaintext" };
112
- }
113
- }
114
- var D = {
115
- data() {
116
- return {
117
- tabulator: null,
118
- selectedCell: null,
119
- controlsVisible: !1,
120
- pendingRebuild: !1,
121
- visibilityObserver: null,
122
- redrawFrame: 0,
123
- lastDrawnSize: null
124
- };
125
- },
126
- props: {
127
- headers: {
128
- type: Map,
129
- required: !0
130
- },
131
- results: {
132
- type: Array,
133
- required: !0
134
- },
135
- containerHeight: Number,
136
- cellClick: {
137
- type: Function,
138
- default: () => {}
139
- },
140
- backgroundClick: {
141
- type: Function,
142
- default: () => {}
143
- },
144
- prettyPrint: {
145
- type: Boolean,
146
- default: !1
147
- },
148
- fitParent: {
149
- type: Boolean,
150
- default: !1
151
- },
152
- flushChrome: {
153
- type: Boolean,
154
- default: !1
155
- },
156
- showControls: {
157
- type: Boolean,
158
- default: !0
159
- }
160
- },
161
- setup() {
162
- let e = y("userSettingsStore", null);
163
- return {
164
- settingsStore: e,
165
- currentTheme: t(e)
166
- };
167
- },
168
- watch: {
169
- results: { handler() {
170
- this.updateTable();
171
- } },
172
- containerHeight: { handler() {
173
- this.$nextTick(() => {
174
- this.tabulator && this.containerHeight && this.tabulator.setHeight(this.containerHeight);
175
- });
176
- } }
177
- },
178
- computed: {
179
- tableData() {
180
- return Object.freeze([...this.results]);
181
- },
182
- tableColumns() {
183
- let e = [];
184
- return this.headers.forEach((t, n) => {
185
- let r = E(t), i = {
186
- title: this.prettyPrint ? a(t.name) : t.name,
187
- field: t.name,
188
- formatter: r.formatter,
189
- formatterParams: r.formatterParams
190
- };
191
- e.push(i);
192
- }), e;
193
- }
194
- },
195
- unmounted() {
196
- this.redrawFrame &&= (cancelAnimationFrame(this.redrawFrame), 0), this.visibilityObserver &&= (this.visibilityObserver.disconnect(), null), this.tabulator &&= (this.tabulator.destroy(), null);
197
- },
198
- mounted() {
199
- this.observeVisibility(), this.tabulator || (this.isVisible() ? this.create() : this.pendingRebuild = !0);
200
- },
201
- methods: {
202
- isVisible() {
203
- let e = this.$refs.root;
204
- return e ? e.offsetWidth > 0 && e.offsetHeight > 0 : !1;
205
- },
206
- observeVisibility() {
207
- let e = this.$refs.root;
208
- if (!e || typeof ResizeObserver > "u") return;
209
- let t = new ResizeObserver(() => {
210
- this.redrawFrame ||= requestAnimationFrame(() => {
211
- if (this.redrawFrame = 0, this.isVisible()) {
212
- if (this.pendingRebuild) this.pendingRebuild = !1, this.create();
213
- else if (this.tabulator) {
214
- let e = this.tabulator.element;
215
- if (!e || !e.isConnected) return;
216
- let t = this.$refs.root;
217
- if (!t) return;
218
- let n = {
219
- width: t.offsetWidth,
220
- height: t.offsetHeight
221
- };
222
- if (this.lastDrawnSize && this.lastDrawnSize.width === n.width && this.lastDrawnSize.height === n.height) return;
223
- this.lastDrawnSize = n;
224
- try {
225
- this.tabulator.redraw(!0);
226
- } catch {}
227
- }
228
- }
229
- });
230
- });
231
- t.observe(e), this.visibilityObserver = b(t);
232
- },
233
- clearHighlights(e) {
234
- e.querySelectorAll(".highlighted-cell").forEach((e) => {
235
- e.classList.remove("highlighted-cell");
236
- });
237
- },
238
- async copyToClipboard() {
239
- if (!(!this.tabulator || !this.tableData || this.tableData.length === 0)) try {
240
- let e = this.tabulator.getData(), t = this.tableColumns.map((e) => e.title).join(" "), n = e.map((e) => this.tableColumns.map((t) => {
241
- let n = e[t.field];
242
- return typeof n == "object" && n ? JSON.stringify(n) : String(n || "");
243
- }).join(" ")).join("\n"), r = t + "\n" + n;
244
- await navigator.clipboard.writeText(r), this.showNotification("Table data copied to clipboard!", "success");
245
- } catch (e) {
246
- console.error("Failed to copy to clipboard:", e), this.showNotification("Failed to copy data to clipboard", "error");
247
- }
248
- },
249
- downloadData() {
250
- if (!(!this.tabulator || !this.tableData || this.tableData.length === 0)) try {
251
- let e = `table-data-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/:/g, "-")}.csv`;
252
- this.tabulator.download("csv", e, {
253
- delimiter: ",",
254
- bom: !0
255
- }), this.showNotification("Download started!", "success");
256
- } catch (e) {
257
- console.error("Failed to download data:", e), this.showNotification("Failed to download data", "error");
258
- }
259
- },
260
- showNotification(e, t) {
261
- let n = document.createElement("div");
262
- n.textContent = e, n.style.cssText = `
263
- position: fixed;
264
- top: 20px;
265
- right: 20px;
266
- padding: 6px 10px;
267
- border-radius: 0px;
268
- color: white;
269
- font-weight: 250;
270
- z-index: 10000;
271
- background-color: ${t === "success" ? "#4caf50" : "#f44336"};
272
- box-shadow: 0 2px 8px rgba(0,0,0,0.2);
273
- transition: opacity 0.3s ease;
274
- `, document.body.appendChild(n), setTimeout(() => {
275
- n.style.opacity = "0", setTimeout(() => {
276
- document.body.removeChild(n);
277
- }, 300);
278
- }, 3e3);
279
- },
280
- create() {
281
- let e = this.$refs.tabulator;
282
- if (!e) return;
283
- let t = this.fitParent ? "fitDataFill" : "fitData", n = 25;
284
- for (let e of this.headers.values()) if (e.type === i.ARRAY || e.type === i.STRUCT) {
285
- n = void 0;
286
- break;
287
- }
288
- let a = new h(e, {
289
- pagination: this.tableData.length > 1e3,
290
- renderHorizontal: "virtual",
291
- maxHeight: "100%",
292
- minHeight: "100%",
293
- minWidth: "100%",
294
- rowHeight: n,
295
- data: this.tableData,
296
- columns: this.tableColumns,
297
- nestedFieldSeparator: !1,
298
- clipboard: "copy",
299
- keybindings: { copyToClipboard: !0 },
300
- downloadConfig: { columnHeaders: !0 },
301
- resizableColumns: !0,
302
- layout: t,
303
- dependencies: { DateTime: r }
304
- });
305
- a.on("cellClick", (t, n) => {
306
- let r = n.getField(), i = this.headers.get(r);
307
- if (!i) return;
308
- let o = i.address;
309
- if (!o) return;
310
- let s = n.getValue();
311
- if (t.ctrlKey) {
312
- this.$emit("drilldown-click", { filters: { [o]: s } });
313
- return;
314
- }
315
- n.getElement().classList.contains("highlighted-cell") ? (this.clearHighlights(e), this.$emit("background-click", { filters: { [o]: s } })) : (this.clearHighlights(e), this.$emit("cell-click", {
316
- filters: { [o]: s },
317
- append: !0
318
- }), a.getColumn(n.getField()).getCells().forEach((e) => {
319
- e.getValue() === s && e.getElement().classList.add("highlighted-cell");
320
- }));
321
- }), this.tabulator = C(a);
322
- let o = this.$refs.root;
323
- this.lastDrawnSize = o ? {
324
- width: o.offsetWidth,
325
- height: o.offsetHeight
326
- } : null, this.updateTableTheme();
327
- },
328
- updateTable() {
329
- if (this.tabulator &&= (this.tabulator.destroy(), null), !this.isVisible()) {
330
- this.pendingRebuild = !0;
331
- return;
332
- }
333
- this.create();
334
- },
335
- updateTableTheme() {
336
- if (!this.tabulator) return;
337
- let e = this.tabulator;
338
- this.currentTheme === "dark" ? (e.element.classList.remove("light-theme-table"), e.element.classList.add("dark-theme-table")) : (e.element.classList.remove("dark-theme-table"), e.element.classList.add("light-theme-table"));
339
- }
340
- }
341
- }, O = /* @__PURE__ */ e({ default: () => N }), k = ["disabled"], A = ["disabled"], j = { ref: "tabulator" };
342
- function M(e, t, n, r, i, a) {
343
- return S(), _("div", {
344
- ref: "root",
345
- class: x(["result-table row pa-0 ba-0", { "result-table-flush": n.flushChrome }]),
346
- onMouseenter: t[2] ||= (e) => i.controlsVisible = !0,
347
- onMouseleave: t[3] ||= (e) => i.controlsVisible = !1
348
- }, [v("div", { class: x(["table-container", { "table-container-flush": n.flushChrome }]) }, [n.showControls ? (S(), _("div", {
349
- key: 0,
350
- class: x(["controls-toggle", { "controls-visible": i.controlsVisible }])
351
- }, [v("button", {
352
- class: "control-btn",
353
- onClick: t[0] ||= (...e) => a.copyToClipboard && a.copyToClipboard(...e),
354
- disabled: !a.tableData || a.tableData.length === 0,
355
- title: "Copy table data to clipboard"
356
- }, [...t[4] ||= [v("i", { class: "mdi mdi-content-copy icon" }, null, -1)]], 8, k), v("button", {
357
- class: "control-btn",
358
- onClick: t[1] ||= (...e) => a.downloadData && a.downloadData(...e),
359
- disabled: !a.tableData || a.tableData.length === 0,
360
- title: "Download table data as CSV"
361
- }, [...t[5] ||= [v("i", { class: "mdi mdi-download-outline icon" }, null, -1)]], 8, A)], 2)) : g("", !0), v("div", j, null, 512)], 2)], 34);
362
- }
363
- var N = /*#__PURE__*/ n(D, [["render", M], ["__scopeId", "data-v-c3af1600"]]);
364
- //#endregion
365
- export { O as n, N as t };
@@ -1,125 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./Tooltip-Dihir4zs.js";
3
- import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, inject as l, openBlock as u, ref as d, renderList as f, renderSlot as p, resolveComponent as m, toDisplayString as h, vModelSelect as g, vModelText as _, withCtx as v, withDirectives as y, withModifiers as b } from "vue";
4
- //#region components/InlineErrorMessage.vue?vue&type=script&lang.ts
5
- var x = {
6
- name: "InlineErrorMessage",
7
- props: {}
8
- }, S = { class: "inline-error-message" }, C = { class: "error-text" }, w = {
9
- key: 0,
10
- class: "error-action"
11
- };
12
- function T(e, t, n, o, s, c) {
13
- return u(), i("div", S, [
14
- t[0] ||= a("span", { class: "error-icon" }, "⚠️", -1),
15
- a("span", C, [p(e.$slots, "default", {}, void 0, !0)]),
16
- e.$slots.action ? (u(), i("div", w, [p(e.$slots, "action", {}, void 0, !0)])) : r("", !0)
17
- ]);
18
- }
19
- //#endregion
20
- //#region components/editor/EditorCreatorInline.vue?vue&type=script&lang.ts
21
- var E = c({
22
- name: "EditorCreator",
23
- components: {
24
- Tooltip: t,
25
- InlineErrorMessage: /* @__PURE__ */ e(x, [["render", T], ["__scopeId", "data-v-9408aaa1"]])
26
- },
27
- props: {
28
- connection: {
29
- type: String,
30
- required: !1,
31
- default: ""
32
- },
33
- visible: {
34
- type: Boolean,
35
- required: !0
36
- },
37
- testTag: {
38
- type: String,
39
- required: !1,
40
- default: ""
41
- }
42
- },
43
- setup(e, { emit: t }) {
44
- let n = d(""), r = l("connectionStore"), i = l("editorStore"), a = l("saveEditors");
45
- if (!r || !i || !a) throw "must inject connectionStore, editorStore, save to EditorCreator";
46
- let o = e.connection && r.connectionByName(e.connection)?.id || "", s = d({
47
- name: "",
48
- type: "preql",
49
- connectionId: o
50
- });
51
- return {
52
- editorDetails: s,
53
- connections: r.connections,
54
- createEditor: () => {
55
- s.value.name = "", s.value.type = "preql", s.value.connectionId = o, n.value = "";
56
- },
57
- submitEditorCreation: () => {
58
- if (s.value.name && s.value.type && s.value.connectionId) try {
59
- let e = r.connections[s.value.connectionId];
60
- if (!e) {
61
- n.value = "Selected connection no longer exists";
62
- return;
63
- }
64
- i.newEditor(s.value.name, s.value.type, e.name, ""), a(), t("close", s.value.name), t("editor-selected", s.value.name);
65
- } catch (e) {
66
- e instanceof Error ? n.value = e.message : n.value = "Unknown error";
67
- }
68
- },
69
- close: () => {
70
- t("close", s.value.name);
71
- },
72
- error: n
73
- };
74
- }
75
- }), D = {
76
- key: 0,
77
- class: "creator-container"
78
- }, O = { class: "form-row" }, k = ["data-testid"], A = { class: "form-row" }, j = ["data-testid"], M = {
79
- key: 0,
80
- class: "form-row"
81
- }, N = ["data-testid"], P = ["value"], F = { key: 1 }, I = { class: "button-row" }, L = ["data-testid"];
82
- function R(e, t, c, l, d, p) {
83
- let x = m("inline-error-message");
84
- return e.visible ? (u(), i("div", D, [a("form", { onSubmit: t[4] ||= b((...t) => e.submitEditorCreation && e.submitEditorCreation(...t), ["prevent"]) }, [
85
- a("div", O, [t[5] ||= a("label", { for: "editor-name" }, "Name", -1), y(a("input", {
86
- "data-testid": e.testTag ? `editor-creator-name-${e.testTag}` : "editor-creator-name",
87
- type: "text",
88
- "onUpdate:modelValue": t[0] ||= (t) => e.editorDetails.name = t,
89
- class: "sidebar-control-input",
90
- id: "editor-name",
91
- required: ""
92
- }, null, 8, k), [[_, e.editorDetails.name]])]),
93
- a("div", A, [t[7] ||= a("label", { for: "editor-type" }, "Type", -1), y(a("select", {
94
- "data-testid": e.testTag ? `editor-creator-type-${e.testTag}` : "editor-creator-type",
95
- "onUpdate:modelValue": t[1] ||= (t) => e.editorDetails.type = t,
96
- class: "sidebar-control-select",
97
- id: "editor-type",
98
- required: ""
99
- }, [...t[6] ||= [a("option", { value: "preql" }, "Trilogy", -1), a("option", { value: "sql" }, "SQL", -1)]], 8, j), [[g, e.editorDetails.type]])]),
100
- e.connection ? r("", !0) : (u(), i("div", M, [t[8] ||= a("label", { for: "connection-name" }, "Connection", -1), y(a("select", {
101
- "data-testid": e.testTag ? `editor-creator-connection-select-${e.testTag}` : "editor-creator-connection-select",
102
- "onUpdate:modelValue": t[2] ||= (t) => e.editorDetails.connectionId = t,
103
- class: "sidebar-control-select",
104
- id: "connection-name",
105
- required: ""
106
- }, [(u(!0), i(n, null, f(e.connections, (e) => (u(), i("option", {
107
- key: e.id,
108
- value: e.id
109
- }, h(e.name), 9, P))), 128))], 8, N), [[g, e.editorDetails.connectionId]])])),
110
- e.error ? (u(), i("div", F, [s(x, null, {
111
- default: v(() => [o(h(e.error), 1)]),
112
- _: 1
113
- })])) : r("", !0),
114
- a("div", I, [a("button", {
115
- "data-testid": e.testTag ? `editor-creator-submit-${e.testTag}` : "editor-creator-submit",
116
- type: "submit"
117
- }, " Submit ", 8, L), a("button", {
118
- type: "button",
119
- onClick: t[3] ||= (t) => e.close()
120
- }, "Cancel")])
121
- ], 32)])) : r("", !0);
122
- }
123
- var z = /*#__PURE__*/ e(E, [["render", R], ["__scopeId", "data-v-74250929"]]);
124
- //#endregion
125
- export { z as t };