@burdenoff/microfe-semanticfed 2026.1031.2 → 2026.1031.4

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.
@@ -1,17 +1,17 @@
1
1
  import { translateWithFallback as e } from "../utils/i18n.js";
2
- import { useSemExecuteSql as t, useSemSqlCatalog as n, useSemSqlModels as r } from "../hooks/useSqlConsole.js";
3
- import { useMemo as i, useState as a } from "react";
4
- import { AlertTriangle as o, CheckCircle2 as s, Clock as c, Database as l, EyeOff as u, Loader2 as d, Play as f, Plug as p, Table2 as m, Terminal as h, XCircle as g } from "lucide-react";
5
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
6
- import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell";
7
- import { Badge as x, Button as S, Card as C, CardContent as w, CardHeader as T, CardTitle as E } from "@burdenoff/fe-libs/ui";
2
+ import { sqlErrorMessage as t, useSemExecuteSql as n, useSemSqlCatalog as r, useSemSqlModels as i } from "../hooks/useSqlConsole.js";
3
+ import { useMemo as a, useState as o } from "react";
4
+ import { AlertTriangle as s, CheckCircle2 as c, Clock as l, Database as u, EyeOff as d, Loader2 as f, Play as p, Plug as m, Table2 as h, Terminal as g, XCircle as _ } from "lucide-react";
5
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
6
+ import { useI18n as x } from "@burdenoff/fe-libs/shared/providers/shell";
7
+ import { Badge as S, Button as C, Card as w, CardContent as T, CardHeader as E, CardTitle as D } from "@burdenoff/fe-libs/ui";
8
8
  //#region src/semanticfed/pages/QueryConsolePage.tsx
9
- var D = [
9
+ var O = [
10
10
  100,
11
11
  1e3,
12
12
  1e4
13
- ], O = 10;
14
- function k(e) {
13
+ ], k = 10;
14
+ function A(e) {
15
15
  if (!e) return "";
16
16
  let t = e.columns.find((e) => e.kind === "DIMENSION"), n = e.columns.find((e) => e.kind === "METRIC"), r = (e) => /^[A-Za-z_][A-Za-z0-9_]*$/.test(e) ? e : `"${e.replace(/"/g, "\"\"")}"`, i = r(e.name);
17
17
  if (t && n) {
@@ -26,316 +26,316 @@ function k(e) {
26
26
  }
27
27
  return `SELECT *\nFROM ${i}\nLIMIT 100;`;
28
28
  }
29
- function A(e) {
29
+ function j(e) {
30
30
  return e == null ? "NULL" : typeof e == "object" ? JSON.stringify(e) : String(e);
31
31
  }
32
- function j() {
33
- let { t: j } = b(), M = (t, n, r) => e(j, t, n, r), N = r(), [P, F] = a(null), I = P ?? N.data?.[0]?.id ?? null, L = n(I), R = t(), [z, B] = a(null), V = z ?? k(L.data?.tables[0]), H = (e) => B(e), [U, W] = a(1e3), [G, K] = a(null), [q, J] = a(null), [Y, X] = a([]), Z = i(() => N.data?.find((e) => e.id === I)?.name ?? "", [N.data, I]), Q = async () => {
34
- if (!I || V.trim() === "" || R.isPending) return;
35
- J(null);
36
- let e = V, t = {
32
+ function M() {
33
+ let { t: M } = x(), N = (t, n, r) => e(M, t, n, r), P = i(), [F, I] = o(null), L = F ?? P.data?.[0]?.id ?? null, R = r(L), z = n(), [B, V] = o(null), H = B ?? A(R.data?.tables[0]), U = (e) => V(e), [W, G] = o(1e3), [K, q] = o(null), [J, Y] = o(null), [X, Z] = o([]), Q = a(() => P.data?.find((e) => e.id === L)?.name ?? "", [P.data, L]), $ = async () => {
34
+ if (!L || H.trim() === "" || z.isPending) return;
35
+ Y(null);
36
+ let e = H, n = {
37
37
  id: Date.now(),
38
38
  sql: e,
39
- modelName: Z,
39
+ modelName: Q,
40
40
  executedAt: (/* @__PURE__ */ new Date()).toLocaleTimeString()
41
41
  };
42
42
  try {
43
- let n = await R.mutateAsync({
43
+ let t = await z.mutateAsync({
44
44
  sql: e,
45
- modelId: I,
46
- maxRows: U
45
+ modelId: L,
46
+ maxRows: W
47
47
  });
48
- K(n), X((e) => [{
49
- ...t,
48
+ q(t), Z((e) => [{
49
+ ...n,
50
50
  ok: !0,
51
- rowCount: n.rowCount,
52
- durationMs: Math.round(n.durationMs),
51
+ rowCount: t.rowCount,
52
+ durationMs: Math.round(t.durationMs),
53
53
  message: null
54
- }, ...e].slice(0, O));
54
+ }, ...e].slice(0, k));
55
55
  } catch (e) {
56
- let n = e instanceof Error ? e.message : String(e);
57
- K(null), J(n), X((e) => [{
58
- ...t,
56
+ let r = t(e);
57
+ q(null), Y(r), Z((e) => [{
58
+ ...n,
59
59
  ok: !1,
60
60
  rowCount: 0,
61
61
  durationMs: 0,
62
- message: n
63
- }, ...e].slice(0, O));
62
+ message: r
63
+ }, ...e].slice(0, k));
64
64
  }
65
- }, $ = (e) => H(V.trim() === "" ? e : `${V}${e}`), ee = N.isSuccess && N.data.length === 0;
66
- return /* @__PURE__ */ y("div", {
65
+ }, ee = (e) => U(H.trim() === "" ? e : `${H}${e}`), te = P.isSuccess && P.data.length === 0;
66
+ return /* @__PURE__ */ b("div", {
67
67
  className: "space-y-6 p-6",
68
68
  children: [
69
- /* @__PURE__ */ y("div", {
69
+ /* @__PURE__ */ b("div", {
70
70
  className: "flex flex-wrap items-center justify-between gap-3",
71
71
  "data-tour": "semanticfed-query-console-header",
72
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
72
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
73
73
  className: "text-2xl font-semibold",
74
- children: M("semanticfed.queryConsole.title", "Query Console")
75
- }), /* @__PURE__ */ v("p", {
74
+ children: N("semanticfed.queryConsole.title", "Query Console")
75
+ }), /* @__PURE__ */ y("p", {
76
76
  className: "text-sm text-muted-foreground",
77
- children: M("semanticfed.queryConsole.sqlDescription", "Run read-only SQL against a semantic model. Every statement is federated across its data sources with your access policies applied.")
78
- })] }), /* @__PURE__ */ y("div", {
77
+ children: N("semanticfed.queryConsole.sqlDescription", "Run read-only SQL against a semantic model. Every statement is federated across its data sources with your access policies applied.")
78
+ })] }), /* @__PURE__ */ b("div", {
79
79
  className: "flex gap-2",
80
- children: [/* @__PURE__ */ y(x, {
80
+ children: [/* @__PURE__ */ b(S, {
81
81
  variant: "outline",
82
82
  className: "gap-1",
83
- children: [/* @__PURE__ */ v(h, { className: "h-3 w-3" }), " SQL SELECT"]
84
- }), /* @__PURE__ */ y(x, {
83
+ children: [/* @__PURE__ */ y(g, { className: "h-3 w-3" }), " SQL SELECT"]
84
+ }), /* @__PURE__ */ b(S, {
85
85
  variant: "outline",
86
86
  className: "gap-1",
87
- children: [/* @__PURE__ */ v(p, { className: "h-3 w-3" }), M("semanticfed.queryConsole.badges.httpApi", "HTTP SQL API")]
87
+ children: [/* @__PURE__ */ y(m, { className: "h-3 w-3" }), N("semanticfed.queryConsole.badges.httpApi", "HTTP SQL API")]
88
88
  })]
89
89
  })]
90
90
  }),
91
- ee && /* @__PURE__ */ v(C, { children: /* @__PURE__ */ y(w, {
91
+ te && /* @__PURE__ */ y(w, { children: /* @__PURE__ */ b(T, {
92
92
  className: "flex items-center gap-3 p-6 text-sm text-muted-foreground",
93
- children: [/* @__PURE__ */ v(l, { className: "h-5 w-5" }), M("semanticfed.queryConsole.noModels", "No semantic model yet. Create a model with entities, dimensions and metrics, then query it here with SQL.")]
93
+ children: [/* @__PURE__ */ y(u, { className: "h-5 w-5" }), N("semanticfed.queryConsole.noModels", "No semantic model yet. Create a model with entities, dimensions and metrics, then query it here with SQL.")]
94
94
  }) }),
95
- /* @__PURE__ */ y("div", {
95
+ /* @__PURE__ */ b("div", {
96
96
  className: "grid gap-4 lg:grid-cols-[18rem_minmax(0,1fr)]",
97
- children: [/* @__PURE__ */ y(C, {
97
+ children: [/* @__PURE__ */ b(w, {
98
98
  className: "min-w-0",
99
- children: [/* @__PURE__ */ v(T, {
99
+ children: [/* @__PURE__ */ y(E, {
100
100
  className: "pb-3",
101
- children: /* @__PURE__ */ y(E, {
101
+ children: /* @__PURE__ */ b(D, {
102
102
  className: "flex items-center gap-2 text-base",
103
- children: [/* @__PURE__ */ v(m, { className: "h-4 w-4" }), M("semanticfed.queryConsole.schema.title", "Tables")]
103
+ children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), N("semanticfed.queryConsole.schema.title", "Tables")]
104
104
  })
105
- }), /* @__PURE__ */ y(w, {
105
+ }), /* @__PURE__ */ b(T, {
106
106
  className: "space-y-3",
107
107
  children: [
108
- /* @__PURE__ */ v("label", {
108
+ /* @__PURE__ */ y("label", {
109
109
  className: "block text-xs font-medium text-muted-foreground",
110
110
  htmlFor: "sql-console-model",
111
- children: M("semanticfed.queryConsole.schema.model", "Semantic model")
111
+ children: N("semanticfed.queryConsole.schema.model", "Semantic model")
112
112
  }),
113
- /* @__PURE__ */ v("select", {
113
+ /* @__PURE__ */ y("select", {
114
114
  id: "sql-console-model",
115
115
  "data-testid": "sql-console-model",
116
116
  className: "w-full rounded border bg-background p-2 text-sm",
117
- value: I ?? "",
117
+ value: L ?? "",
118
118
  onChange: (e) => {
119
- F(e.target.value || null), B(null), K(null), J(null);
119
+ I(e.target.value || null), V(null), q(null), Y(null);
120
120
  },
121
- disabled: !N.data || N.data.length === 0,
122
- children: (N.data ?? []).map((e) => /* @__PURE__ */ v("option", {
121
+ disabled: !P.data || P.data.length === 0,
122
+ children: (P.data ?? []).map((e) => /* @__PURE__ */ y("option", {
123
123
  value: e.id,
124
124
  children: e.name
125
125
  }, e.id))
126
126
  }),
127
- N.isError && /* @__PURE__ */ v("p", {
127
+ P.isError && /* @__PURE__ */ y("p", {
128
128
  className: "text-xs text-destructive",
129
- children: N.error.message
129
+ children: t(P.error)
130
130
  }),
131
- L.isLoading && /* @__PURE__ */ v(d, { className: "h-4 w-4 animate-spin text-muted-foreground" }),
132
- L.isError && /* @__PURE__ */ v("p", {
131
+ R.isLoading && /* @__PURE__ */ y(f, { className: "h-4 w-4 animate-spin text-muted-foreground" }),
132
+ R.isError && /* @__PURE__ */ y("p", {
133
133
  className: "text-xs text-destructive",
134
- children: L.error.message
134
+ children: t(R.error)
135
135
  }),
136
- /* @__PURE__ */ v("div", {
136
+ /* @__PURE__ */ y("div", {
137
137
  className: "max-h-96 space-y-2 overflow-y-auto",
138
138
  "data-testid": "sql-console-tables",
139
- children: (L.data?.tables ?? []).map((e) => /* @__PURE__ */ y("details", {
139
+ children: (R.data?.tables ?? []).map((e) => /* @__PURE__ */ b("details", {
140
140
  className: "rounded border p-2",
141
- open: L.data?.tables.length === 1,
142
- children: [/* @__PURE__ */ v("summary", {
141
+ open: R.data?.tables.length === 1,
142
+ children: [/* @__PURE__ */ y("summary", {
143
143
  className: "cursor-pointer truncate font-mono text-xs font-medium",
144
144
  children: e.name
145
- }), /* @__PURE__ */ y("ul", {
145
+ }), /* @__PURE__ */ b("ul", {
146
146
  className: "mt-2 space-y-1",
147
- children: [e.columns.map((e) => /* @__PURE__ */ v("li", { children: /* @__PURE__ */ y("button", {
147
+ children: [e.columns.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b("button", {
148
148
  type: "button",
149
149
  className: "flex w-full items-center justify-between gap-2 rounded px-1 text-left font-mono text-xs hover:bg-muted",
150
- onClick: () => $(e.name),
150
+ onClick: () => ee(e.name),
151
151
  title: e.description ?? void 0,
152
- children: [/* @__PURE__ */ v("span", {
152
+ children: [/* @__PURE__ */ y("span", {
153
153
  className: "truncate",
154
154
  children: e.name
155
- }), /* @__PURE__ */ v("span", {
155
+ }), /* @__PURE__ */ y("span", {
156
156
  className: "shrink-0 text-[10px] text-muted-foreground",
157
157
  children: e.kind === "METRIC" ? e.aggregation ?? "METRIC" : e.dataType
158
158
  })]
159
- }) }, e.name)), e.columns.length === 0 && /* @__PURE__ */ v("li", {
159
+ }) }, e.name)), e.columns.length === 0 && /* @__PURE__ */ y("li", {
160
160
  className: "text-xs text-muted-foreground",
161
- children: M("semanticfed.queryConsole.schema.noColumns", "No dimensions or metrics registered")
161
+ children: N("semanticfed.queryConsole.schema.noColumns", "No dimensions or metrics registered")
162
162
  })]
163
163
  })]
164
164
  }, e.name))
165
165
  })
166
166
  ]
167
167
  })]
168
- }), /* @__PURE__ */ y("div", {
168
+ }), /* @__PURE__ */ b("div", {
169
169
  className: "min-w-0 space-y-4",
170
170
  children: [
171
- /* @__PURE__ */ y(C, { children: [/* @__PURE__ */ v(T, {
171
+ /* @__PURE__ */ b(w, { children: [/* @__PURE__ */ y(E, {
172
172
  className: "pb-3",
173
- children: /* @__PURE__ */ y("div", {
173
+ children: /* @__PURE__ */ b("div", {
174
174
  className: "flex flex-wrap items-center justify-between gap-2",
175
- children: [/* @__PURE__ */ v(E, {
175
+ children: [/* @__PURE__ */ y(D, {
176
176
  className: "text-base",
177
- children: M("semanticfed.queryConsole.editor.title", "Query Editor")
178
- }), /* @__PURE__ */ y("div", {
177
+ children: N("semanticfed.queryConsole.editor.title", "Query Editor")
178
+ }), /* @__PURE__ */ b("div", {
179
179
  className: "flex items-center gap-2",
180
180
  children: [
181
- /* @__PURE__ */ v("label", {
181
+ /* @__PURE__ */ y("label", {
182
182
  className: "sr-only",
183
183
  htmlFor: "sql-console-max-rows",
184
- children: M("semanticfed.queryConsole.editor.maxRowsLabel", "Maximum rows")
184
+ children: N("semanticfed.queryConsole.editor.maxRowsLabel", "Maximum rows")
185
185
  }),
186
- /* @__PURE__ */ v("select", {
186
+ /* @__PURE__ */ y("select", {
187
187
  id: "sql-console-max-rows",
188
188
  className: "rounded border bg-background p-1 text-xs",
189
- value: U,
190
- onChange: (e) => W(Number(e.target.value)),
191
- children: D.map((e) => /* @__PURE__ */ v("option", {
189
+ value: W,
190
+ onChange: (e) => G(Number(e.target.value)),
191
+ children: O.map((e) => /* @__PURE__ */ y("option", {
192
192
  value: e,
193
- children: M("semanticfed.queryConsole.editor.maxRowsOption", "Max {count} rows", { count: e.toLocaleString() })
193
+ children: N("semanticfed.queryConsole.editor.maxRowsOption", "Max {count} rows", { count: e.toLocaleString() })
194
194
  }, e))
195
195
  }),
196
- /* @__PURE__ */ y(S, {
196
+ /* @__PURE__ */ b(C, {
197
197
  size: "sm",
198
- onClick: () => void Q(),
199
- disabled: !I || V.trim() === "" || R.isPending,
198
+ onClick: () => void $(),
199
+ disabled: !L || H.trim() === "" || z.isPending,
200
200
  "data-testid": "sql-console-run",
201
- children: [R.isPending ? /* @__PURE__ */ v(d, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ v(f, { className: "mr-2 h-4 w-4" }), M("semanticfed.queryConsole.actions.execute", "Execute")]
201
+ children: [z.isPending ? /* @__PURE__ */ y(f, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ y(p, { className: "mr-2 h-4 w-4" }), N("semanticfed.queryConsole.actions.execute", "Execute")]
202
202
  })
203
203
  ]
204
204
  })]
205
205
  })
206
- }), /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v("textarea", {
207
- "aria-label": M("semanticfed.queryConsole.editor.ariaLabel", "SQL statement"),
206
+ }), /* @__PURE__ */ b(T, { children: [/* @__PURE__ */ y("textarea", {
207
+ "aria-label": N("semanticfed.queryConsole.editor.ariaLabel", "SQL statement"),
208
208
  "data-testid": "sql-console-editor",
209
209
  className: "w-full rounded border bg-muted/30 p-4 font-mono text-sm leading-relaxed focus:outline-none focus:ring-2 focus:ring-primary",
210
210
  rows: 8,
211
- value: V,
212
- onChange: (e) => H(e.target.value),
211
+ value: H,
212
+ onChange: (e) => U(e.target.value),
213
213
  onKeyDown: (e) => {
214
- (e.metaKey || e.ctrlKey) && e.key === "Enter" && (e.preventDefault(), Q());
214
+ (e.metaKey || e.ctrlKey) && e.key === "Enter" && (e.preventDefault(), $());
215
215
  },
216
216
  spellCheck: !1,
217
217
  placeholder: "SELECT region, SUM(revenue) FROM orders GROUP BY region"
218
- }), /* @__PURE__ */ y("div", {
218
+ }), /* @__PURE__ */ b("div", {
219
219
  className: "mt-2 flex flex-wrap items-center gap-4 text-xs text-muted-foreground",
220
220
  children: [
221
- /* @__PURE__ */ v("span", { children: M("semanticfed.queryConsole.editor.shortcut", "Ctrl/Cmd + Enter to run") }),
222
- /* @__PURE__ */ v("span", { children: M("semanticfed.queryConsole.editor.timeout", "Timeout: 30s") }),
223
- /* @__PURE__ */ v("span", { children: M("semanticfed.queryConsole.editor.supported", "SELECT, JOIN … ON, WHERE … AND, GROUP BY, ORDER BY, LIMIT/OFFSET") })
221
+ /* @__PURE__ */ y("span", { children: N("semanticfed.queryConsole.editor.shortcut", "Ctrl/Cmd + Enter to run") }),
222
+ /* @__PURE__ */ y("span", { children: N("semanticfed.queryConsole.editor.timeout", "Timeout: 30s") }),
223
+ /* @__PURE__ */ y("span", { children: N("semanticfed.queryConsole.editor.supported", "SELECT, JOIN … ON, WHERE … AND, GROUP BY, ORDER BY, LIMIT/OFFSET") })
224
224
  ]
225
225
  })] })] }),
226
- q && /* @__PURE__ */ v(C, {
226
+ J && /* @__PURE__ */ y(w, {
227
227
  "data-testid": "sql-console-error",
228
- children: /* @__PURE__ */ y(w, {
228
+ children: /* @__PURE__ */ b(T, {
229
229
  className: "flex items-start gap-3 p-4 text-sm text-destructive",
230
- children: [/* @__PURE__ */ v(g, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ v("span", {
230
+ children: [/* @__PURE__ */ y(_, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ y("span", {
231
231
  className: "break-words",
232
- children: q
232
+ children: J
233
233
  })]
234
234
  })
235
235
  }),
236
- G && /* @__PURE__ */ y(C, {
236
+ K && /* @__PURE__ */ b(w, {
237
237
  "data-testid": "sql-console-result",
238
- children: [/* @__PURE__ */ v(T, {
238
+ children: [/* @__PURE__ */ y(E, {
239
239
  className: "pb-3",
240
- children: /* @__PURE__ */ y("div", {
240
+ children: /* @__PURE__ */ b("div", {
241
241
  className: "flex flex-wrap items-center gap-3 text-sm",
242
242
  children: [
243
- /* @__PURE__ */ v(s, { className: "h-4 w-4 text-primary" }),
244
- /* @__PURE__ */ v("span", {
243
+ /* @__PURE__ */ y(c, { className: "h-4 w-4 text-primary" }),
244
+ /* @__PURE__ */ y("span", {
245
245
  className: "font-medium",
246
246
  "data-testid": "sql-console-row-count",
247
- children: M("semanticfed.queryConsole.result.rows", "{count} rows", { count: G.rowCount.toLocaleString() })
247
+ children: N("semanticfed.queryConsole.result.rows", "{count} rows", { count: K.rowCount.toLocaleString() })
248
248
  }),
249
- /* @__PURE__ */ y("span", {
249
+ /* @__PURE__ */ b("span", {
250
250
  className: "text-muted-foreground",
251
- children: [Math.round(G.durationMs), "ms"]
251
+ children: [Math.round(K.durationMs), "ms"]
252
252
  }),
253
- /* @__PURE__ */ v("span", {
253
+ /* @__PURE__ */ y("span", {
254
254
  className: "text-muted-foreground",
255
- children: M("semanticfed.queryConsole.result.sources", "{count} sources", { count: G.sourcesTouched })
255
+ children: N("semanticfed.queryConsole.result.sources", "{count} sources", { count: K.sourcesTouched })
256
256
  }),
257
- G.truncated && /* @__PURE__ */ y(x, {
257
+ K.truncated && /* @__PURE__ */ b(S, {
258
258
  variant: "outline",
259
259
  className: "gap-1",
260
- children: [/* @__PURE__ */ v(o, { className: "h-3 w-3" }), M("semanticfed.queryConsole.result.truncated", "Truncated — more rows matched")]
260
+ children: [/* @__PURE__ */ y(s, { className: "h-3 w-3" }), N("semanticfed.queryConsole.result.truncated", "Truncated — more rows matched")]
261
261
  })
262
262
  ]
263
263
  })
264
- }), /* @__PURE__ */ v(w, { children: /* @__PURE__ */ v("div", {
264
+ }), /* @__PURE__ */ y(T, { children: /* @__PURE__ */ y("div", {
265
265
  className: "max-h-[28rem] overflow-auto rounded border",
266
- children: /* @__PURE__ */ y("table", {
266
+ children: /* @__PURE__ */ b("table", {
267
267
  className: "w-full text-left text-xs",
268
- children: [/* @__PURE__ */ v("thead", {
268
+ children: [/* @__PURE__ */ y("thead", {
269
269
  className: "sticky top-0 bg-muted",
270
- children: /* @__PURE__ */ v("tr", { children: G.columns.map((e) => /* @__PURE__ */ y("th", {
270
+ children: /* @__PURE__ */ y("tr", { children: K.columns.map((e) => /* @__PURE__ */ b("th", {
271
271
  className: "whitespace-nowrap px-3 py-2 font-medium",
272
- children: [/* @__PURE__ */ y("span", {
272
+ children: [/* @__PURE__ */ b("span", {
273
273
  className: "inline-flex items-center gap-1",
274
- children: [e.name, e.masked && /* @__PURE__ */ v(u, {
274
+ children: [e.name, e.masked && /* @__PURE__ */ y(d, {
275
275
  className: "h-3 w-3 text-muted-foreground",
276
- "aria-label": M("semanticfed.queryConsole.result.masked", "Masked by policy ({mask})", { mask: e.mask ?? "" })
276
+ "aria-label": N("semanticfed.queryConsole.result.masked", "Masked by policy ({mask})", { mask: e.mask ?? "" })
277
277
  })]
278
- }), /* @__PURE__ */ v("span", {
278
+ }), /* @__PURE__ */ y("span", {
279
279
  className: "block text-[10px] font-normal text-muted-foreground",
280
280
  children: e.aggregation ?? e.dataType
281
281
  })]
282
282
  }, e.name)) })
283
- }), /* @__PURE__ */ y("tbody", { children: [G.rows.map((e, t) => /* @__PURE__ */ v("tr", {
283
+ }), /* @__PURE__ */ b("tbody", { children: [K.rows.map((e, t) => /* @__PURE__ */ y("tr", {
284
284
  className: "border-t",
285
- children: G.columns.map((t) => /* @__PURE__ */ v("td", {
285
+ children: K.columns.map((t) => /* @__PURE__ */ y("td", {
286
286
  className: "whitespace-nowrap px-3 py-1.5 font-mono",
287
- children: A(e[t.name])
287
+ children: j(e[t.name])
288
288
  }, t.name))
289
- }, t)), G.rows.length === 0 && /* @__PURE__ */ v("tr", { children: /* @__PURE__ */ v("td", {
290
- colSpan: G.columns.length,
289
+ }, t)), K.rows.length === 0 && /* @__PURE__ */ y("tr", { children: /* @__PURE__ */ y("td", {
290
+ colSpan: K.columns.length,
291
291
  className: "px-3 py-4 text-center text-muted-foreground",
292
- children: M("semanticfed.queryConsole.result.empty", "No rows matched")
292
+ children: N("semanticfed.queryConsole.result.empty", "No rows matched")
293
293
  }) })] })]
294
294
  })
295
295
  }) })]
296
296
  }),
297
- /* @__PURE__ */ y(C, { children: [/* @__PURE__ */ v(T, { children: /* @__PURE__ */ y(E, {
297
+ /* @__PURE__ */ b(w, { children: [/* @__PURE__ */ y(E, { children: /* @__PURE__ */ b(D, {
298
298
  className: "flex items-center gap-2 text-base",
299
- children: [/* @__PURE__ */ v(c, { className: "h-4 w-4" }), M("semanticfed.queryConsole.history.title", "Query History")]
300
- }) }), /* @__PURE__ */ v(w, { children: Y.length === 0 ? /* @__PURE__ */ v("p", {
299
+ children: [/* @__PURE__ */ y(l, { className: "h-4 w-4" }), N("semanticfed.queryConsole.history.title", "Query History")]
300
+ }) }), /* @__PURE__ */ y(T, { children: X.length === 0 ? /* @__PURE__ */ y("p", {
301
301
  className: "text-xs text-muted-foreground",
302
- children: M("semanticfed.queryConsole.history.empty", "Statements you run in this session appear here.")
303
- }) : /* @__PURE__ */ v("div", {
302
+ children: N("semanticfed.queryConsole.history.empty", "Statements you run in this session appear here.")
303
+ }) : /* @__PURE__ */ y("div", {
304
304
  className: "space-y-2",
305
- children: Y.map((e) => /* @__PURE__ */ y("button", {
305
+ children: X.map((e) => /* @__PURE__ */ b("button", {
306
306
  type: "button",
307
307
  className: "flex w-full items-start gap-3 rounded border p-3 text-left hover:bg-muted",
308
- onClick: () => H(e.sql),
309
- children: [e.ok ? /* @__PURE__ */ v(s, { className: "mt-0.5 h-4 w-4 shrink-0 text-primary" }) : /* @__PURE__ */ v(g, { className: "mt-0.5 h-4 w-4 shrink-0 text-destructive" }), /* @__PURE__ */ y("div", {
308
+ onClick: () => U(e.sql),
309
+ children: [e.ok ? /* @__PURE__ */ y(c, { className: "mt-0.5 h-4 w-4 shrink-0 text-primary" }) : /* @__PURE__ */ y(_, { className: "mt-0.5 h-4 w-4 shrink-0 text-destructive" }), /* @__PURE__ */ b("div", {
310
310
  className: "min-w-0 flex-1",
311
- children: [/* @__PURE__ */ v("p", {
311
+ children: [/* @__PURE__ */ y("p", {
312
312
  className: "truncate font-mono text-xs",
313
313
  children: e.sql
314
- }), /* @__PURE__ */ y("div", {
314
+ }), /* @__PURE__ */ b("div", {
315
315
  className: "mt-1 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",
316
316
  children: [
317
- /* @__PURE__ */ v("span", { children: e.modelName }),
318
- e.ok ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", { children: M("semanticfed.queryConsole.history.results", "{count} results", { count: e.rowCount.toLocaleString() }) }), /* @__PURE__ */ y("span", { children: [e.durationMs, "ms"] })] }) : /* @__PURE__ */ v("span", {
317
+ /* @__PURE__ */ y("span", { children: e.modelName }),
318
+ e.ok ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", { children: N("semanticfed.queryConsole.history.results", "{count} results", { count: e.rowCount.toLocaleString() }) }), /* @__PURE__ */ b("span", { children: [e.durationMs, "ms"] })] }) : /* @__PURE__ */ y("span", {
319
319
  className: "truncate",
320
320
  children: e.message
321
321
  }),
322
- /* @__PURE__ */ v("span", { children: e.executedAt })
322
+ /* @__PURE__ */ y("span", { children: e.executedAt })
323
323
  ]
324
324
  })]
325
325
  })]
326
326
  }, e.id))
327
327
  }) })] }),
328
- /* @__PURE__ */ y(C, { children: [/* @__PURE__ */ v(T, {
328
+ /* @__PURE__ */ b(w, { children: [/* @__PURE__ */ y(E, {
329
329
  className: "pb-2",
330
- children: /* @__PURE__ */ y(E, {
330
+ children: /* @__PURE__ */ b(D, {
331
331
  className: "flex items-center gap-2 text-base",
332
- children: [/* @__PURE__ */ v(p, { className: "h-4 w-4" }), M("semanticfed.queryConsole.connect.title", "Connect BI tools and notebooks")]
332
+ children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), N("semanticfed.queryConsole.connect.title", "Connect BI tools and notebooks")]
333
333
  })
334
- }), /* @__PURE__ */ y(w, {
334
+ }), /* @__PURE__ */ b(T, {
335
335
  className: "space-y-2 text-xs text-muted-foreground",
336
- children: [/* @__PURE__ */ v("p", { children: M("semanticfed.queryConsole.connect.body", "The same SQL runs over HTTPS: POST the semExecuteSql operation to the workspace API with a workspace token. Power BI (Web connector), Tableau (Web Data Connector), Python/pandas, Jupyter and reverse-ETL HTTP sources can all call it; see the SQL endpoint guide in the SemanticFed docs.") }), /* @__PURE__ */ v("pre", {
336
+ children: [/* @__PURE__ */ y("p", { children: N("semanticfed.queryConsole.connect.body", "The same SQL runs over HTTPS: POST the semExecuteSql operation to the workspace API with a workspace token. Power BI (Web connector), Tableau (Web Data Connector), Python/pandas, Jupyter and reverse-ETL HTTP sources can all call it; see the SQL endpoint guide in the SemanticFed docs.") }), /* @__PURE__ */ y("pre", {
337
337
  className: "overflow-x-auto rounded bg-muted p-3 font-mono text-[11px] text-foreground",
338
- children: `mutation { semExecuteSql(input: { modelId: "${I ?? "<model-id>"}", sql: "SELECT ..." }) { columns { name dataType } rows truncated } }`
338
+ children: `mutation { semExecuteSql(input: { modelId: "${L ?? "<model-id>"}", sql: "SELECT ..." }) { columns { name dataType } rows truncated } }`
339
339
  })]
340
340
  })] })
341
341
  ]
@@ -345,6 +345,6 @@ function j() {
345
345
  });
346
346
  }
347
347
  //#endregion
348
- export { j as QueryConsolePage };
348
+ export { M as QueryConsolePage };
349
349
 
350
350
  //# sourceMappingURL=QueryConsolePage.js.map