@nongt/visql 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/{PipelineEditor-X83xfPeC.js → PipelineEditor-9-9xOJcB.js} +4046 -3906
- package/dist/{core-api-D4QbGLG-.js → core-api-BsEMnDQ1.js} +21 -21
- package/dist/core.js +3 -3
- package/dist/index.js +5 -5
- package/dist/{issueLocation-BcILIZqd.js → issueLocation-732-e0B8.js} +39 -36
- package/dist/mui.js +225 -207
- package/dist/{schema-z95dxLxu.js → schema-DFC26AhZ.js} +142 -126
- package/dist/sql-import.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/adapters/mui/components.d.ts +8 -1
- package/dist/types/core/i18n/defaultMessages.d.ts +2 -0
- package/dist/types/core/i18n/messages.d.ts +1 -0
- package/dist/types/core/schema.d.ts +19 -0
- package/dist/types/core/tablePickerOptions.d.ts +75 -0
- package/dist/types/core/ui/index.d.ts +6 -0
- package/dist/types/core/ui/types.d.ts +16 -0
- package/dist/types/core-api.d.ts +1 -1
- package/dist/types/features/queryEditor/PipelineEditor.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var qt = Object.defineProperty;
|
|
2
2
|
var Ut = (t, e, r) => e in t ? qt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var M = (t, e, r) => Ut(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { q as U, g as B, F as vt, G as Bt, o as K, d as nt, t as ft, h as jt, w as lt, H as _t, k as Ht, b as Yt, i as Pt } from "./schema-
|
|
5
|
-
import {
|
|
4
|
+
import { q as U, g as B, F as vt, G as Bt, o as K, d as nt, t as ft, h as jt, w as lt, H as _t, k as Ht, b as Yt, i as Pt } from "./schema-DFC26AhZ.js";
|
|
5
|
+
import { aj as R, aD as k, aE as Gt, aF as xt, aG as kt, am as Qt, V as Xt, as as Jt, aH as A, ao as Vt, a8 as Wt, aI as Kt, aJ as $t, $ as zt } from "./issueLocation-732-e0B8.js";
|
|
6
6
|
import { s as Et } from "./calendarDate-CYlr9TvX.js";
|
|
7
7
|
class Zt extends Error {
|
|
8
8
|
constructor(r, n, s, o) {
|
|
@@ -269,7 +269,7 @@ function se(t, e, r, n = {}) {
|
|
|
269
269
|
}
|
|
270
270
|
const a = n.operator ?? "AND", { where: i } = e;
|
|
271
271
|
let c;
|
|
272
|
-
return i ? i.type === "logical" && i.operator === a ? c = { ...i, operands: [...i.operands, r] } : c = { type: "logical", operator: a, operands: [i, r] } : c = r, R(t, e,
|
|
272
|
+
return i ? i.type === "logical" && i.operator === a ? c = { ...i, operands: [...i.operands, r] } : c = { type: "logical", operator: a, operands: [i, r] } : c = r, R(t, e, Jt(t, e, c));
|
|
273
273
|
}
|
|
274
274
|
function Ye(t, e, r, n) {
|
|
275
275
|
const s = A(t, e, { type: "addSelectItem" }), o = s.select[s.select.length - 1].id, a = A(t, s, {
|
|
@@ -288,7 +288,7 @@ function Pe(t, e, r) {
|
|
|
288
288
|
return R(t, e, o);
|
|
289
289
|
}
|
|
290
290
|
function Ge(t, e, r) {
|
|
291
|
-
return R(t, e,
|
|
291
|
+
return R(t, e, Vt(t, e, r));
|
|
292
292
|
}
|
|
293
293
|
function xe(t, e, r, n = "asc") {
|
|
294
294
|
const s = A(t, e, { type: "addOrderByItem" }), { id: o } = s.orderBy[s.orderBy.length - 1], a = A(t, s, {
|
|
@@ -377,13 +377,13 @@ function $e(t) {
|
|
|
377
377
|
}
|
|
378
378
|
return { ...r, value: s };
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Je(t) {
|
|
381
381
|
return {
|
|
382
382
|
version: X,
|
|
383
383
|
query: _(t, le)
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function Ve(t) {
|
|
387
387
|
if (!q(t))
|
|
388
388
|
throw new w("invalid", "a stored query is an object");
|
|
389
389
|
const { version: e } = t;
|
|
@@ -399,7 +399,7 @@ function We(t) {
|
|
|
399
399
|
throw new w("invalid", "a stored query has a query with a string id");
|
|
400
400
|
return _(r, $e);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function J(t, e) {
|
|
403
403
|
const r = new Map(e == null ? void 0 : e.tableOf), n = new Set(e == null ? void 0 : e.aliases), s = new Set(e == null ? void 0 : e.derived);
|
|
404
404
|
return t.forEach(({ table: o, alias: a }) => {
|
|
405
405
|
if (o === void 0) {
|
|
@@ -429,7 +429,7 @@ function F(t, e, r) {
|
|
|
429
429
|
}
|
|
430
430
|
if (t.type === "subquery") return { ...t, query: Y(t.query, r) };
|
|
431
431
|
if (t.type === "exists") {
|
|
432
|
-
const { query: n } = t, s = [n.from, ...n.joins], o =
|
|
432
|
+
const { query: n } = t, s = [n.from, ...n.joins], o = J(s), a = J(s, e);
|
|
433
433
|
return {
|
|
434
434
|
...t,
|
|
435
435
|
link: F(t.link, a, r),
|
|
@@ -444,7 +444,7 @@ function F(t, e, r) {
|
|
|
444
444
|
return K(t, (n) => F(n, e, r));
|
|
445
445
|
}
|
|
446
446
|
function Y(t, e) {
|
|
447
|
-
const r =
|
|
447
|
+
const r = J([t.from, ...t.joins]), n = lt(
|
|
448
448
|
t,
|
|
449
449
|
(s) => F(s, r, e),
|
|
450
450
|
(s) => Y(s, e)
|
|
@@ -455,11 +455,11 @@ function Y(t, e) {
|
|
|
455
455
|
joins: n.joins.map((s) => s.table === void 0 ? s : { ...s, table: e(s.table) })
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
if (Array.isArray(t)) return t.map((s) =>
|
|
458
|
+
function V(t, e) {
|
|
459
|
+
if (Array.isArray(t)) return t.map((s) => V(s, e));
|
|
460
460
|
if (typeof t != "object" || t === null || t instanceof Date) return t;
|
|
461
461
|
const r = Object.fromEntries(Object.entries(t).map(
|
|
462
|
-
([s, o]) => [s,
|
|
462
|
+
([s, o]) => [s, V(o, e)]
|
|
463
463
|
));
|
|
464
464
|
if (!("from" in r) || !Array.isArray(r.joins)) return r;
|
|
465
465
|
const n = (s) => s.table !== void 0 && !s.alias && e(s.table) !== s.table ? { ...s, alias: s.table } : s;
|
|
@@ -470,7 +470,7 @@ function W(t, e) {
|
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
472
|
function ye(t, e) {
|
|
473
|
-
return Y(
|
|
473
|
+
return Y(V(t, e), e);
|
|
474
474
|
}
|
|
475
475
|
const pe = /^(\d{2}):(\d{2})(?::(\d{2}))?$/, ut = /YYYY|MM|DD|HH|mm|ss/g, C = (t, e = 2) => String(t).padStart(e, "0");
|
|
476
476
|
function ht(t, e) {
|
|
@@ -479,7 +479,7 @@ function ht(t, e) {
|
|
|
479
479
|
if (n)
|
|
480
480
|
r = { HH: n[1], mm: n[2], ss: n[3] ?? "00" };
|
|
481
481
|
else {
|
|
482
|
-
const a = typeof t == "string" ?
|
|
482
|
+
const a = typeof t == "string" ? Wt(t, "dateTime") : t;
|
|
483
483
|
a instanceof Date && (r = {
|
|
484
484
|
YYYY: C(a.getUTCFullYear(), 4),
|
|
485
485
|
MM: C(a.getUTCMonth() + 1),
|
|
@@ -527,7 +527,7 @@ function Ot(t, e) {
|
|
|
527
527
|
};
|
|
528
528
|
return { query: n(t), params: r };
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const We = ["mysql", "mssql", "postgres"], Ke = {
|
|
531
531
|
mysql: "MySQL",
|
|
532
532
|
mssql: "SQL Server",
|
|
533
533
|
postgres: "PostgreSQL"
|
|
@@ -1048,10 +1048,10 @@ function Ce(t, e, r, n) {
|
|
|
1048
1048
|
${t.map((o) => T(o, () => `${E(n(o.expression), e, 1, r)} ${o.direction === "desc" ? "DESC" : "ASC"}`)).join(`,
|
|
1049
1049
|
`)}`;
|
|
1050
1050
|
}
|
|
1051
|
-
const
|
|
1051
|
+
const W = (t) => t !== void 0 && Number.isInteger(t) && t >= 0 ? t : void 0;
|
|
1052
1052
|
function Mt(t, e) {
|
|
1053
1053
|
const r = e.resolveName ? ye(t, e.resolveName) : t;
|
|
1054
|
-
return e.defaultLimit !== void 0 &&
|
|
1054
|
+
return e.defaultLimit !== void 0 && W(r.limit) === void 0 ? { ...r, limit: e.defaultLimit } : r;
|
|
1055
1055
|
}
|
|
1056
1056
|
const we = "18446744073709551615";
|
|
1057
1057
|
function z(t, e, r, n = `SELECT${t.distinct ? " DISTINCT" : ""}`) {
|
|
@@ -1070,7 +1070,7 @@ function z(t, e, r, n = `SELECT${t.distinct ? " DISTINCT" : ""}`) {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
function dt(t, e, r) {
|
|
1072
1072
|
I && (I.writing = [{ value: t, path: [] }]), Rt = new Map((t.shared ?? []).map((f) => [f.id, f.name]));
|
|
1073
|
-
const n = Se(t.shared ?? [], e, r), s =
|
|
1073
|
+
const n = Se(t.shared ?? [], e, r), s = W(t.limit), o = W(t.offset) || void 0, a = t.orderBy ?? [], i = e === "mssql" && s !== void 0 && o === void 0, c = `SELECT${t.distinct ? " DISTINCT" : ""}${i ? ` ${T("limit", () => `TOP (${s})`)}` : ""}`, u = z(t, e, r, c);
|
|
1074
1074
|
if (a.length > 0 && u.push(Ce(a, e, r, (f) => e === "mysql" ? $t(f, t) : f)), e === "mssql") {
|
|
1075
1075
|
if (o !== void 0) {
|
|
1076
1076
|
a.length === 0 && u.push("ORDER BY (SELECT NULL)");
|
|
@@ -1114,7 +1114,7 @@ function tr(t, e, r = {}) {
|
|
|
1114
1114
|
}), params: i };
|
|
1115
1115
|
}
|
|
1116
1116
|
export {
|
|
1117
|
-
|
|
1117
|
+
We as D,
|
|
1118
1118
|
X as Q,
|
|
1119
1119
|
Zt as S,
|
|
1120
1120
|
tr as a,
|
|
@@ -1131,8 +1131,8 @@ export {
|
|
|
1131
1131
|
Ge as l,
|
|
1132
1132
|
ke as m,
|
|
1133
1133
|
w as n,
|
|
1134
|
-
|
|
1135
|
-
|
|
1134
|
+
Ve as o,
|
|
1135
|
+
Je as p,
|
|
1136
1136
|
Ke as q,
|
|
1137
1137
|
He as r,
|
|
1138
1138
|
ve as s,
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as e, E as r, M as o, b as n, f as i, a as d, h as t, i as u, v as l } from "./schema-
|
|
2
|
-
import { M as m, a as E, b as T, Q as y, I as c, S as h, d as p, p as Q, e as _, f as U, g as b, c as A, h as M, K as N, B as D, q as I, k as B, t as f, v, m as L, G as C, H as R, w as F, r as G, x as q, i as x, C as H, E as P, F as g, y as k, s as O, z as X, A as Y, j, o as J, l as w, n as K, u as z, J as W } from "./issueLocation-
|
|
1
|
+
import { D as e, E as r, M as o, b as n, f as i, a as d, h as t, i as u, v as l } from "./schema-DFC26AhZ.js";
|
|
2
|
+
import { M as m, a as E, b as T, Q as y, I as c, S as h, d as p, p as Q, e as _, f as U, g as b, c as A, h as M, K as N, B as D, q as I, k as B, t as f, v, m as L, G as C, H as R, w as F, r as G, x as q, i as x, C as H, E as P, F as g, y as k, s as O, z as X, A as Y, j, o as J, l as w, n as K, u as z, J as W } from "./issueLocation-732-e0B8.js";
|
|
3
3
|
import { c as Z, f as $, i as aa } from "./calendarDate-CYlr9TvX.js";
|
|
4
|
-
import { D as ea, q as ra, Q as oa, n as na, S as ia, c as da, d as ta, e as ua, f as la, g as Sa, a as ma, b as Ea, h as Ta, o as ya, r as ca, i as ha, p as pa, s as Qa, j as _a, k as Ua, l as ba, m as Aa, u as Ma } from "./core-api-
|
|
4
|
+
import { D as ea, q as ra, Q as oa, n as na, S as ia, c as da, d as ta, e as ua, f as la, g as Sa, a as ma, b as Ea, h as Ta, o as ya, r as ca, i as ha, p as pa, s as Qa, j as _a, k as Ua, l as ba, m as Aa, u as Ma } from "./core-api-BsEMnDQ1.js";
|
|
5
5
|
export {
|
|
6
6
|
e as DEFAULT_FUNCTIONS,
|
|
7
7
|
ea as DIALECTS,
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as Q, f as U, a as D } from "./PipelineEditor-
|
|
2
|
-
import { D as b, E as x, M as B, b as F, f as I, a as v, h as L, i as P, v as R } from "./schema-
|
|
3
|
-
import { D as k, M as q, a as C, b as G, Q as H, I as w, S as X, d as W, p as Y, e as j, f as J, g as z, c as K, h as V, K as Z, B as $, q as ee, k as ae, t as se, v as te, m as re, G as ne, H as oe, w as ie, r as de, x as ce, i as ue, C as le, E as fe, F as me, y as he, s as pe, z as Se, A as Ee, j as Te, o as ge, l as Ne, n as _e, u as ye, J as Ae } from "./issueLocation-
|
|
1
|
+
import { P as Q, f as U, a as D } from "./PipelineEditor-9-9xOJcB.js";
|
|
2
|
+
import { D as b, E as x, M as B, b as F, f as I, a as v, h as L, i as P, v as R } from "./schema-DFC26AhZ.js";
|
|
3
|
+
import { D as k, M as q, a as C, b as G, Q as H, I as w, S as X, d as W, p as Y, e as j, f as J, g as z, c as K, h as V, K as Z, B as $, q as ee, k as ae, t as se, v as te, m as re, G as ne, H as oe, w as ie, r as de, x as ce, i as ue, C as le, E as fe, F as me, y as he, s as pe, z as Se, A as Ee, j as Te, o as ge, l as Ne, n as _e, u as ye, J as Ae } from "./issueLocation-732-e0B8.js";
|
|
4
4
|
import { c as Ue, f as De, i as Me } from "./calendarDate-CYlr9TvX.js";
|
|
5
|
-
import { w as m, a as h, b as p } from "./core-api-
|
|
6
|
-
import { D as xe, q as Be, Q as Fe, n as Ie, S as ve, c as Le, d as Pe, e as Re, f as Oe, g as ke, h as qe, o as Ce, r as Ge, i as He, p as we, s as Xe, j as We, k as Ye, l as je, m as Je, u as ze } from "./core-api-
|
|
5
|
+
import { w as m, a as h, b as p } from "./core-api-BsEMnDQ1.js";
|
|
6
|
+
import { D as xe, q as Be, Q as Fe, n as Ie, S as ve, c as Le, d as Pe, e as Re, f as Oe, g as ke, h as qe, o as Ce, r as Ge, i as He, p as we, s as Xe, j as We, k as Ye, l as je, m as Je, u as ze } from "./core-api-BsEMnDQ1.js";
|
|
7
7
|
import { D as Ve } from "./tokens-BTaVMSOx.js";
|
|
8
8
|
function T(n, s, e = {}) {
|
|
9
9
|
const a = { paths: [] }, t = m(a, () => e.parameterized ? h(n, s, e).sql : p(n, s, e));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as $e, h as ue, q as Q, t as D, i as H, s as Xn, l as le, u as Kn, w as Pe, e as Ve, x as dn, k as z, r as fe, o as xe, j as K, y as Yn, d as W, z as Jt, A as
|
|
1
|
+
import { D as $e, h as ue, q as Q, t as D, i as H, s as Xn, l as le, u as Kn, w as Pe, e as Ve, x as dn, k as z, r as fe, o as xe, j as K, y as Yn, d as W, z as Jt, A as Be, B as me, C as Pt, M as Y, F as zn, G as Vt, g as Z, H as We, I as fn, b as be, J as Zn, n as Wt, K as et, f as Ht, L as Xt, N as Mn, O as On, P as Ge, Q as Kt } from "./schema-DFC26AhZ.js";
|
|
2
2
|
import { c as Yt, s as zt, b as nt } from "./calendarDate-CYlr9TvX.js";
|
|
3
3
|
const Zt = 1e3, tt = 15, er = 40, ls = 100;
|
|
4
4
|
function nr(e) {
|
|
@@ -354,6 +354,8 @@ const ar = {
|
|
|
354
354
|
openUnionBranch: (e) => `Open ${e}'s query`,
|
|
355
355
|
removeUnionBranch: (e) => `Remove ${e}'s query`,
|
|
356
356
|
joinTableGroup: "Join a table",
|
|
357
|
+
/** The heading over tables in no group, when others have one. */
|
|
358
|
+
otherTablesGroup: "Other tables",
|
|
357
359
|
/** Free-form unions (issue 153): a new one, the query as one's first
|
|
358
360
|
* query, another query for one, and a new query's canvas. */
|
|
359
361
|
createUnion: "Create Union",
|
|
@@ -3215,41 +3217,42 @@ export {
|
|
|
3215
3217
|
nr as a7,
|
|
3216
3218
|
vn as a8,
|
|
3217
3219
|
ai as a9,
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3220
|
+
$s as aA,
|
|
3221
|
+
tr as aB,
|
|
3222
|
+
rt as aC,
|
|
3223
|
+
ne as aD,
|
|
3224
|
+
Ae as aE,
|
|
3225
|
+
Xe as aF,
|
|
3226
|
+
Ce as aG,
|
|
3227
|
+
tn as aH,
|
|
3228
|
+
ni as aI,
|
|
3229
|
+
zs as aJ,
|
|
3230
|
+
ct as aa,
|
|
3231
|
+
fs as ab,
|
|
3232
|
+
vs as ac,
|
|
3233
|
+
Es as ad,
|
|
3234
|
+
lt as ae,
|
|
3235
|
+
Ss as af,
|
|
3236
|
+
es as ag,
|
|
3237
|
+
Xr as ah,
|
|
3238
|
+
at as ai,
|
|
3239
|
+
Zs as aj,
|
|
3240
|
+
us as ak,
|
|
3241
|
+
Ns as al,
|
|
3242
|
+
mn as am,
|
|
3243
|
+
pr as an,
|
|
3244
|
+
ms as ao,
|
|
3245
|
+
hr as ap,
|
|
3246
|
+
mr as aq,
|
|
3247
|
+
He as ar,
|
|
3248
|
+
Ts as as,
|
|
3249
|
+
Fn as at,
|
|
3250
|
+
dt as au,
|
|
3251
|
+
Fr as av,
|
|
3252
|
+
_r as aw,
|
|
3253
|
+
oe as ax,
|
|
3254
|
+
ds as ay,
|
|
3255
|
+
ws as az,
|
|
3253
3256
|
er as b,
|
|
3254
3257
|
ys as c,
|
|
3255
3258
|
Us as d,
|