@trilogy-data/trilogy-studio-components 0.1.26 → 0.1.28

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 (145) hide show
  1. package/dist/AssetAutoImporter-C_7Ms9xe.js +403 -0
  2. package/dist/{ChatCreatorModal-CL-jBnc3.js → ChatCreatorModal-Cd40SvdM.js} +3 -3
  3. package/dist/{ChatModelSelect-Do-VRUFc.js → ChatModelSelect-Cz7axWjP.js} +1 -1
  4. package/dist/{CodeBlock-PT4no49I.js → CodeBlock-Dj-GfTbW.js} +4 -4
  5. package/dist/{CommunityModels-Cmro0hV3.js → CommunityModels-lX2RhHCG.js} +7 -7
  6. package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
  7. package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-CZ06qjjE.js} +49 -49
  8. package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-DwA938kf.js} +4 -4
  9. package/dist/{Dashboard-BH9ZwMVJ.js → Dashboard-CQsIqWZC.js} +276 -280
  10. package/dist/{DashboardImportSelector-DQSvu9T-.js → DashboardImportSelector-CkqH52FX.js} +2 -2
  11. package/dist/{DashboardMobile-BUPtdN2V.js → DashboardMobile-DWFlel5p.js} +39 -39
  12. package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
  13. package/dist/{Editor-DQsYpkwl.js → Editor-DQ66Vp6v.js} +105 -103
  14. package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
  15. package/dist/{GlobalChatPanel-DhnOaige.js → GlobalChatPanel-B_s3COHE.js} +20 -21
  16. package/dist/{IDE-HLa8vybk.js → IDE-4-Jg6gsM.js} +200 -203
  17. package/dist/{JobsView-B97HBoIE.js → JobsView-B5NWDUgP.js} +13 -14
  18. package/dist/{LLMChat-CxJcPLEG.js → LLMChat-eKgEc-I3.js} +3 -3
  19. package/dist/{LLMView-C1MUf0c2.js → LLMView-CdTwMLVV.js} +23 -23
  20. package/dist/{LoadingView-s1uznGwG.js → LoadingView-Bu3wLJ7J.js} +2 -2
  21. package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-B6lqdkgc.js} +531 -430
  22. package/dist/{MobileIDE-BpqXoaMR.js → MobileIDE-CZlg20oa.js} +179 -182
  23. package/dist/{ModelCard-BhN25jaV.js → ModelCard-Bs_d7Jis.js} +12 -13
  24. package/dist/{ModelView-DUDA_PtZ.js → ModelView-BP5yyecx.js} +7 -7
  25. package/dist/PageLoading-DKFeqkmK.js +5937 -0
  26. package/dist/{ResultComponent-CAn_r3BL.js → ResultComponent-BaDheojB.js} +8 -8
  27. package/dist/{Results-BJtlwebY.js → Results-CrpHB101.js} +17 -19
  28. package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-Clfyy-Yn.js} +2 -2
  29. package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CO5hXMs3.js} +2 -2
  30. package/dist/{SymbolsPane-KYSwN9Sv.js → SymbolsPane-XFVErDFb.js} +6 -3
  31. package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
  32. package/dist/{TutorialPage-NRcee6Dx.js → TutorialPage-CMcTYDOV.js} +27 -28
  33. package/dist/{VegaLiteChart-D1slfOUY.js → VegaLiteChart-DX_LbF3g.js} +12131 -10947
  34. package/dist/{WelcomePage-D5mU2x1L.js → WelcomePage-B6E35FUa.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/FeedbackBanner.vue.d.ts +4 -0
  42. package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
  43. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
  44. package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
  45. package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
  46. package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
  47. package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
  48. package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
  49. package/dist/components/editor/Editor.vue.d.ts +3 -3
  50. package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
  51. package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
  52. package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
  53. package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
  54. package/dist/components/model/ModelCard.vue.d.ts +3 -3
  55. package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
  56. package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  57. package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
  58. package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
  59. package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
  60. package/dist/connections.js +3 -4
  61. package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
  62. package/dist/dashboard.js +28 -31
  63. package/dist/dashboards/dashboardQueryExecutor.d.ts +9 -0
  64. package/dist/dashboards/dashboardQueryExecutor.d.ts.map +1 -1
  65. package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
  66. package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
  67. package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
  68. package/dist/{editorRefinementRuntime-DoP9P5J2.js → editorStore-CiWH_nGN.js} +1692 -575
  69. package/dist/embed.js +2 -2
  70. package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
  71. package/dist/{globalChatRuntime-DWZxeS57.js → globalChatRuntime-DAERmOdu.js} +16 -16
  72. package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
  73. package/dist/{helpers-BLQAgX3C.js → helpers-C2pARJoZ.js} +34 -35
  74. package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
  75. package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
  76. package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
  77. package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
  78. package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
  79. package/dist/llm/data/prompts.d.ts +1 -1
  80. package/dist/llm/data/prompts.d.ts.map +1 -1
  81. package/dist/llm/data/trilogySyntax.generated.d.ts +3 -3
  82. package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
  83. package/dist/llm-Wf4Etiu9.js +18493 -0
  84. package/dist/llm.js +2 -3
  85. package/dist/{localStorage-D9uyOFEO.js → localStorage-C3xms-ab.js} +40 -43
  86. package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
  87. package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
  88. package/dist/monaco.js +4 -4
  89. package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
  90. package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
  91. package/dist/{reconcile-Dyf4UZmj.js → reconcile-BH_ReGDR.js} +1 -1
  92. package/dist/{remoteStoreSync-Z-yjlYtI.js → remoteStoreSync-B0K8QScO.js} +3 -3
  93. package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
  94. package/dist/static/test_import.vue.d.ts +4 -0
  95. package/dist/static/test_import.vue.d.ts.map +1 -0
  96. package/dist/stores-DTGQZ4_B.js +2612 -0
  97. package/dist/stores.js +4 -7
  98. package/dist/trilogy-studio-components.css +1 -1
  99. package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
  100. package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
  101. package/dist/{useChatWithTools-B0HZ_DVh.js → useChatWithTools-BSrzJtYI.js} +11 -11
  102. package/dist/{useDashboard-CdSnPe_6.js → useDashboard-CGeIdDuX.js} +1014 -1022
  103. package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-D9kMZLeF.js} +1729 -711
  104. package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
  105. package/dist/views/ModelView.vue.d.ts +6 -6
  106. package/dist/views/ModelView.vue.d.ts.map +1 -1
  107. package/dist/views/TutorialPage.vue.d.ts +9 -9
  108. package/dist/views/TutorialPage.vue.d.ts.map +1 -1
  109. package/dist/views.js +192 -194
  110. package/dist/{vocabulary-CKLGILtR.js → vocabulary-DQK5jB7m.js} +3 -1
  111. package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
  112. package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
  113. package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
  114. package/package.json +29 -20
  115. package/dist/AssetAutoImporter-CBzvBaOt.js +0 -405
  116. package/dist/DashboardCreatorInline-CDU7kLy3.js +0 -129
  117. package/dist/DataTable-DoRDynP1.js +0 -365
  118. package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
  119. package/dist/LoadingButton-OH3frQuO.js +0 -138
  120. package/dist/ModalDialog-D1EOG4rl.js +0 -42
  121. package/dist/ModelCreator-CCdC7EXt.js +0 -253
  122. package/dist/PageLoading-BzniJM0C.js +0 -2669
  123. package/dist/Tooltip-Dihir4zs.js +0 -103
  124. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  125. package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
  126. package/dist/base-C8IuZWqY.js +0 -164
  127. package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
  128. package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
  129. package/dist/connections-CJSb1TZl.js +0 -229
  130. package/dist/constants-DgFEYN2b.js +0 -7
  131. package/dist/dashboardStore-ppM6nGks.js +0 -641
  132. package/dist/demoSetup-mwa-RDC6.js +0 -2942
  133. package/dist/editorRefinementToolExecutor-CVY3FA7k.js +0 -4624
  134. package/dist/editorStore-BhhmXbi-.js +0 -1019
  135. package/dist/formatting-BbJ5ICgh.js +0 -6
  136. package/dist/llm-BBOVWb-F.js +0 -11967
  137. package/dist/llmStore-DJM2JhzY.js +0 -153
  138. package/dist/monaco.contribution-ikesdolO.js +0 -128
  139. package/dist/stores-BT9hTLny.js +0 -1708
  140. package/dist/trilogy-BroD2Qmp.js +0 -4
  141. package/dist/urlStore-52HG6lsX.js +0 -55
  142. package/dist/useGlobalChatPanel-D_0luajQ.js +0 -85
  143. package/dist/useIsMobile-CNpUQAvk.js +0 -8
  144. package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
  145. package/dist/workers-Br7ThUKL.js +0 -47
@@ -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 };
@@ -1,138 +0,0 @@
1
- import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
2
- import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { t as n } from "./ModalDialog-D1EOG4rl.js";
4
- import { Fragment as r, Transition as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, mergeProps as u, normalizeClass as d, onMounted as f, onUnmounted as p, openBlock as m, ref as h, renderSlot as g, resolveComponent as _, toDisplayString as v, useAttrs as y, withCtx as b, withModifiers as x } from "vue";
5
- //#region components/LoadingButton.vue?vue&type=script&lang.ts
6
- var S = {
7
- props: {
8
- action: {
9
- type: Function,
10
- required: !0
11
- },
12
- useDefaultStyle: {
13
- type: Boolean,
14
- default: !0
15
- },
16
- keyCombination: {
17
- type: Array,
18
- default: null
19
- },
20
- disabled: {
21
- type: Boolean,
22
- default: !1
23
- },
24
- testId: {
25
- type: String,
26
- default: ""
27
- }
28
- },
29
- components: { ModalDialog: n },
30
- setup(e) {
31
- let t = y(), n = a(() => e.testId || (typeof t["data-testid"] == "string" ? t["data-testid"] : "")), r = h(!1), i = h(null), o = h(null), s = h(!1), c = /* @__PURE__ */ new Set(), l = null, u = (t) => {
32
- if (!e.keyCombination || !t.key) return;
33
- c.add(t.key.toLowerCase());
34
- let n = new Set(e.keyCombination.map((e) => e.toLowerCase()));
35
- Array.from(n).every((e) => c.has(e)) && (c.clear(), t.preventDefault(), g());
36
- }, d = (t) => {
37
- e.keyCombination && t.key && c.delete(t.key.toLowerCase());
38
- }, m = () => {
39
- s.value = !1, o.value = null, i.value = null;
40
- }, g = async () => {
41
- if (r.value || s.value) return;
42
- l &&= (clearTimeout(l), null), r.value = !0, o.value = null, i.value = null;
43
- let t = Date.now(), n = null;
44
- try {
45
- await e.action(), n = "success";
46
- } catch (e) {
47
- n = "error", e instanceof Error ? i.value = e.message : typeof e == "string" ? i.value = e : i.value = "An unknown error occurred";
48
- } finally {
49
- let e = Date.now() - t, i = Math.max(500 - e, 0);
50
- await new Promise((e) => setTimeout(e, i)), o.value = n, r.value = !1, n === "error" ? s.value = !0 : l = setTimeout(() => {
51
- o.value = null, l = null;
52
- }, 1500);
53
- }
54
- };
55
- return f(() => {
56
- window.addEventListener("keydown", u), window.addEventListener("keyup", d);
57
- }), p(() => {
58
- window.removeEventListener("keydown", u), window.removeEventListener("keyup", d), l && clearTimeout(l);
59
- }), {
60
- effectiveTestId: n,
61
- errorMessage: i,
62
- isLoading: r,
63
- status: o,
64
- showErrorModal: s,
65
- handleClick: g,
66
- handleKeydown: u,
67
- dismissError: m,
68
- retryAction: () => {
69
- m(), g();
70
- }
71
- };
72
- }
73
- }, C = /* @__PURE__ */ e({ default: () => M }), w = ["disabled", "data-testid"], T = {
74
- key: 0,
75
- class: "success status_overlay"
76
- }, E = ["data-testid"], D = {
77
- key: 1,
78
- class: "loading status_overlay"
79
- }, O = ["data-testid"], k = ["data-testid"], A = ["data-testid"];
80
- function j(e, t, n, a, f, p) {
81
- let h = _("ModalDialog");
82
- return m(), s(r, null, [c("button", u({ class: [
83
- n.useDefaultStyle ? "default-style" : "",
84
- e.$attrs.class,
85
- "btn"
86
- ] }, e.$attrs, {
87
- disabled: n.disabled || a.isLoading,
88
- onClick: t[0] ||= x((...e) => a.handleClick && a.handleClick(...e), ["stop"]),
89
- "data-testid": a.effectiveTestId
90
- }), [
91
- c("span", { class: d({
92
- "hidden-text": a.isLoading,
93
- contents: !0
94
- }) }, [g(e.$slots, "default", {}, void 0, !0)], 2),
95
- l(i, { name: "status-fade" }, {
96
- default: b(() => [a.status === "success" ? (m(), s("span", T, [...t[3] ||= [c("span", {
97
- class: "success-backdrop",
98
- "aria-hidden": "true"
99
- }, null, -1), c("span", { class: "status-symbol" }, "✔", -1)]])) : o("", !0)]),
100
- _: 1
101
- }),
102
- a.status === "error" ? (m(), s("span", {
103
- key: 0,
104
- class: "error status_overlay",
105
- "data-testid": `${a.effectiveTestId}-error`
106
- }, "✖", 8, E)) : a.isLoading ? (m(), s("span", D, [...t[4] ||= [c("span", { class: "spinner" }, null, -1)]])) : o("", !0)
107
- ], 16, w), l(h, {
108
- show: a.showErrorModal,
109
- title: "Action failed",
110
- "max-width": "560px",
111
- "test-id": a.effectiveTestId ? `${a.effectiveTestId}-error-modal` : "loading-button-error-modal",
112
- onClose: a.dismissError
113
- }, {
114
- footer: b(() => [c("button", {
115
- type: "button",
116
- class: "okay-button",
117
- "data-testid": a.effectiveTestId ? `${a.effectiveTestId}-error-okay` : "loading-button-error-okay",
118
- onClick: t[1] ||= (...e) => a.dismissError && a.dismissError(...e)
119
- }, " Okay ", 8, k), c("button", {
120
- type: "button",
121
- class: "retry-button",
122
- "data-testid": a.effectiveTestId ? `${a.effectiveTestId}-error-retry` : "loading-button-error-retry",
123
- onClick: t[2] ||= (...e) => a.retryAction && a.retryAction(...e)
124
- }, " Retry ", 8, A)]),
125
- default: b(() => [c("p", {
126
- class: "error-message",
127
- "data-testid": a.effectiveTestId ? `${a.effectiveTestId}-error-message` : "loading-button-error-message"
128
- }, v(a.errorMessage), 9, O)]),
129
- _: 1
130
- }, 8, [
131
- "show",
132
- "test-id",
133
- "onClose"
134
- ])], 64);
135
- }
136
- var M = /*#__PURE__*/ t(S, [["render", j], ["__scopeId", "data-v-795027f0"]]);
137
- //#endregion
138
- export { C as n, M as t };
@@ -1,42 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { Teleport as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeStyle as s, openBlock as c, renderSlot as l, toDisplayString as u, withModifiers as d } from "vue";
3
- //#region components/ModalDialog.vue?vue&type=script&setup=true&lang.ts
4
- var f = ["data-testid"], p = {
5
- key: 0,
6
- class: "modal-header"
7
- }, m = { class: "modal-title" }, h = { class: "modal-body" }, g = {
8
- key: 1,
9
- class: "modal-footer"
10
- }, _ = /*#__PURE__*/ e(/* @__PURE__ */ o({
11
- __name: "ModalDialog",
12
- props: {
13
- show: { type: Boolean },
14
- title: { default: "" },
15
- maxWidth: { default: "400px" },
16
- testId: { default: "" },
17
- closeOnOverlay: {
18
- type: Boolean,
19
- default: !0
20
- }
21
- },
22
- emits: ["close"],
23
- setup(e, { emit: o }) {
24
- let _ = e, v = o;
25
- return (e, o) => (c(), n(t, { to: "body" }, [_.show ? (c(), i("div", {
26
- key: 0,
27
- class: "modal-overlay",
28
- onClick: o[1] ||= (e) => _.closeOnOverlay ? v("close") : void 0
29
- }, [a("div", {
30
- class: "modal-panel",
31
- style: s({ maxWidth: _.maxWidth }),
32
- "data-testid": _.testId || void 0,
33
- onClick: o[0] ||= d(() => {}, ["stop"])
34
- }, [
35
- _.title || e.$slots.header ? (c(), i("div", p, [l(e.$slots, "header", {}, () => [a("h3", m, u(_.title), 1)], !0)])) : r("", !0),
36
- a("div", h, [l(e.$slots, "default", {}, void 0, !0)]),
37
- e.$slots.footer ? (c(), i("div", g, [l(e.$slots, "footer", {}, void 0, !0)])) : r("", !0)
38
- ], 12, f)])) : r("", !0)]));
39
- }
40
- }), [["__scopeId", "data-v-587355bb"]]);
41
- //#endregion
42
- export { _ as t };