@nongt/visql 0.0.0-stage → 0.3.1
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/LICENSE +21 -0
- package/README.md +916 -2
- package/dist/PipelineEditor-DNZkDSaY.js +10042 -0
- package/dist/calendarDate-CYlr9TvX.js +43 -0
- package/dist/core-api-BDCnbFHY.js +1056 -0
- package/dist/core.js +80 -0
- package/dist/fixtures.js +7 -0
- package/dist/index.js +145 -0
- package/dist/issueLocation-Cw5sttQL.js +3183 -0
- package/dist/mui-date-pickers.js +117 -0
- package/dist/mui.js +510 -0
- package/dist/schema-z95dxLxu.js +839 -0
- package/dist/sql-import.js +1366 -0
- package/dist/style.css +1 -0
- package/dist/tokens-BTaVMSOx.js +95 -0
- package/dist/types/adapters/mui/MuiDatePicker.d.ts +12 -0
- package/dist/types/adapters/mui/MuiDateTimePicker.d.ts +10 -0
- package/dist/types/adapters/mui/MuiListInput.d.ts +9 -0
- package/dist/types/adapters/mui/MuiTimePicker.d.ts +10 -0
- package/dist/types/adapters/mui/QueryBuilder.d.ts +12 -0
- package/dist/types/adapters/mui/components.d.ts +16 -0
- package/dist/types/adapters/mui/index.d.ts +6 -0
- package/dist/types/adapters/mui/muiPickers.d.ts +6 -0
- package/dist/types/adapters/mui/pickerStyles.d.ts +28 -0
- package/dist/types/adapters/mui/theme.d.ts +11 -0
- package/dist/types/core/BetweenOnTextContext.d.ts +11 -0
- package/dist/types/core/DialectContext.d.ts +10 -0
- package/dist/types/core/DrillDownContext.d.ts +22 -0
- package/dist/types/core/ExistsContext.d.ts +29 -0
- package/dist/types/core/FlowDirectionContext.d.ts +8 -0
- package/dist/types/core/FlowOrientationContext.d.ts +6 -0
- package/dist/types/core/FunctionsContext.d.ts +25 -0
- package/dist/types/core/GroupKeysContext.d.ts +18 -0
- package/dist/types/core/MeasureLockContext.d.ts +12 -0
- package/dist/types/core/ReadOnlyContext.d.ts +6 -0
- package/dist/types/core/SchemaContext.d.ts +8 -0
- package/dist/types/core/SubqueryContext.d.ts +16 -0
- package/dist/types/core/UnionBranchContext.d.ts +6 -0
- package/dist/types/core/ValueInputContext.d.ts +24 -0
- package/dist/types/core/absolutePath.d.ts +57 -0
- package/dist/types/core/ast.d.ts +154 -0
- package/dist/types/core/astChildren.d.ts +4 -0
- package/dist/types/core/astEqual.d.ts +4 -0
- package/dist/types/core/astMap.d.ts +21 -0
- package/dist/types/core/calendarDate.d.ts +21 -0
- package/dist/types/core/columnFormats.d.ts +23 -0
- package/dist/types/core/components/BoolPicker.d.ts +8 -0
- package/dist/types/core/components/NumberInput.d.ts +8 -0
- package/dist/types/core/components/ReadOnlyPart.d.ts +10 -0
- package/dist/types/core/components/TextInput.d.ts +8 -0
- package/dist/types/core/components/expression/BinaryView.d.ts +10 -0
- package/dist/types/core/components/expression/ExprSummary.d.ts +12 -0
- package/dist/types/core/components/expression/ExpressionTypeSelector.d.ts +35 -0
- package/dist/types/core/components/expression/ExpressionView.d.ts +30 -0
- package/dist/types/core/components/expression/FieldView.d.ts +15 -0
- package/dist/types/core/components/expression/FormulaPeek.d.ts +14 -0
- package/dist/types/core/components/expression/FunctionArgInput.d.ts +22 -0
- package/dist/types/core/components/expression/FunctionView.d.ts +7 -0
- package/dist/types/core/components/expression/ListView.d.ts +20 -0
- package/dist/types/core/components/expression/LiteralView.d.ts +23 -0
- package/dist/types/core/components/expression/LogicalView.d.ts +9 -0
- package/dist/types/core/components/expression/MeasureMenu.d.ts +21 -0
- package/dist/types/core/components/expression/ParamView.d.ts +13 -0
- package/dist/types/core/components/expression/RelativeDateView.d.ts +15 -0
- package/dist/types/core/components/expression/SubqueryView.d.ts +8 -0
- package/dist/types/core/components/expression/formulaClasses.d.ts +8 -0
- package/dist/types/core/components/flow/CaseBranchFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/CaseElseFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/CaseFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/ConditionFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/CreateConditionFlowNode.d.ts +14 -0
- package/dist/types/core/components/flow/CreateHavingFlowNode.d.ts +11 -0
- package/dist/types/core/components/flow/DistinctToggle.d.ts +10 -0
- package/dist/types/core/components/flow/ExistsFlowNode.d.ts +9 -0
- package/dist/types/core/components/flow/FromFlowNode.d.ts +110 -0
- package/dist/types/core/components/flow/FunctionArgFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/FunctionCallFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/FunctionSortKeys.d.ts +10 -0
- package/dist/types/core/components/flow/GroupBgNode.d.ts +14 -0
- package/dist/types/core/components/flow/GroupByFlowNode.d.ts +29 -0
- package/dist/types/core/components/flow/IfElseFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/IfFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/IfThenFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/LeafConditionFrame.d.ts +19 -0
- package/dist/types/core/components/flow/LogicalFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/MoveTooltip.d.ts +19 -0
- package/dist/types/core/components/flow/NotFlowNode.d.ts +5 -0
- package/dist/types/core/components/flow/OrderByFlowNode.d.ts +32 -0
- package/dist/types/core/components/flow/SectionLabelFlowNode.d.ts +7 -0
- package/dist/types/core/components/flow/SelectFlowNode.d.ts +49 -0
- package/dist/types/core/components/flow/SharedQueriesFlowNode.d.ts +39 -0
- package/dist/types/core/components/flow/SummaryPill.d.ts +12 -0
- package/dist/types/core/components/flow/WarningNote.d.ts +9 -0
- package/dist/types/core/components/flow/chainSides.d.ts +18 -0
- package/dist/types/core/components/flow/dragContext.d.ts +12 -0
- package/dist/types/core/components/flow/moveTooltipHysteresis.d.ts +18 -0
- package/dist/types/core/components/flow/useRowDrag.d.ts +34 -0
- package/dist/types/core/components/flow/useRowReorderFlip.d.ts +30 -0
- package/dist/types/core/derivedTables.d.ts +98 -0
- package/dist/types/core/distinctSort.d.ts +7 -0
- package/dist/types/core/drillPath.d.ts +11 -0
- package/dist/types/core/exists.d.ts +7 -0
- package/dist/types/core/existsMenu.d.ts +61 -0
- package/dist/types/core/expressionFlow.d.ts +428 -0
- package/dist/types/core/fanOut.d.ts +58 -0
- package/dist/types/core/findParts.d.ts +19 -0
- package/dist/types/core/flowTrees.d.ts +20 -0
- package/dist/types/core/focusKey.d.ts +10 -0
- package/dist/types/core/formula.d.ts +24 -0
- package/dist/types/core/formulaPeek.d.ts +16 -0
- package/dist/types/core/functionRegistry.d.ts +117 -0
- package/dist/types/core/grouping.d.ts +58 -0
- package/dist/types/core/history.d.ts +25 -0
- package/dist/types/core/i18n/defaultMessages.d.ts +367 -0
- package/dist/types/core/i18n/messages.d.ts +273 -0
- package/dist/types/core/i18n/relativeDateWords.d.ts +3 -0
- package/dist/types/core/id.d.ts +5 -0
- package/dist/types/core/issueAnchor.d.ts +29 -0
- package/dist/types/core/issueLocation.d.ts +105 -0
- package/dist/types/core/limits.d.ts +17 -0
- package/dist/types/core/measures.d.ts +51 -0
- package/dist/types/core/params.d.ts +30 -0
- package/dist/types/core/pipelineAnchor.d.ts +118 -0
- package/dist/types/core/pipelineFlow.d.ts +271 -0
- package/dist/types/core/queryAst.d.ts +201 -0
- package/dist/types/core/queryHelpers.d.ts +113 -0
- package/dist/types/core/queryValidation.d.ts +206 -0
- package/dist/types/core/relativeDates.d.ts +11 -0
- package/dist/types/core/resolveNames.d.ts +17 -0
- package/dist/types/core/rowRange.d.ts +3 -0
- package/dist/types/core/schema.d.ts +119 -0
- package/dist/types/core/scopeQuery.d.ts +45 -0
- package/dist/types/core/selectColumns.d.ts +23 -0
- package/dist/types/core/settleQuery.d.ts +11 -0
- package/dist/types/core/sharedQueries.d.ts +66 -0
- package/dist/types/core/sqlGen.d.ts +102 -0
- package/dist/types/core/sqlOffsets.d.ts +5 -0
- package/dist/types/core/sqlSpans.d.ts +33 -0
- package/dist/types/core/storedQuery.d.ts +43 -0
- package/dist/types/core/summarize.d.ts +3 -0
- package/dist/types/core/theme/tokens.d.ts +74 -0
- package/dist/types/core/ui/UIContext.d.ts +6 -0
- package/dist/types/core/ui/index.d.ts +12 -0
- package/dist/types/core/ui/types.d.ts +264 -0
- package/dist/types/core/unionTables.d.ts +121 -0
- package/dist/types/core/useValueTypes.d.ts +12 -0
- package/dist/types/core/valueTypes.d.ts +54 -0
- package/dist/types/core-api.d.ts +20 -0
- package/dist/types/features/queryEditor/ExpressionFlowCanvas.d.ts +10 -0
- package/dist/types/features/queryEditor/FindBox.d.ts +12 -0
- package/dist/types/features/queryEditor/FlowCanvas.d.ts +96 -0
- package/dist/types/features/queryEditor/FocusPulse.d.ts +10 -0
- package/dist/types/features/queryEditor/IssuesButton.d.ts +16 -0
- package/dist/types/features/queryEditor/PipelineEditor.d.ts +210 -0
- package/dist/types/features/queryEditor/QueryOutline.d.ts +16 -0
- package/dist/types/features/queryEditor/ResultsPanel.d.ts +11 -0
- package/dist/types/features/queryEditor/RunButton.d.ts +11 -0
- package/dist/types/features/queryEditor/SubFlowPanel.d.ts +24 -0
- package/dist/types/features/queryEditor/UndoRedoToast.d.ts +6 -0
- package/dist/types/features/queryEditor/canvasPositioning.d.ts +81 -0
- package/dist/types/features/queryEditor/findKeys.d.ts +3 -0
- package/dist/types/features/queryEditor/flowDragUtils.d.ts +16 -0
- package/dist/types/features/queryEditor/focusContext.d.ts +24 -0
- package/dist/types/features/queryEditor/hoveredPart.d.ts +32 -0
- package/dist/types/features/queryEditor/issueFocusParts.d.ts +9 -0
- package/dist/types/features/queryEditor/issueLocationText.d.ts +7 -0
- package/dist/types/features/queryEditor/issueText.d.ts +11 -0
- package/dist/types/features/queryEditor/outlineSections.d.ts +23 -0
- package/dist/types/features/queryEditor/run.d.ts +36 -0
- package/dist/types/features/queryEditor/sectionLabels.d.ts +15 -0
- package/dist/types/features/queryEditor/treeScopeContext.d.ts +14 -0
- package/dist/types/features/queryEditor/useRemeasureOnDirectionChange.d.ts +7 -0
- package/dist/types/features/queryEditor/useRevealNewNodes.d.ts +35 -0
- package/dist/types/features/queryEditor/withTreeScope.d.ts +10 -0
- package/dist/types/fixtures.d.ts +44 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/mui-date-pickers.d.ts +3 -0
- package/dist/types/mui.d.ts +2 -0
- package/dist/types/sql-import.d.ts +3 -0
- package/dist/types/sqlImport/context.d.ts +71 -0
- package/dist/types/sqlImport/expressions.d.ts +11 -0
- package/dist/types/sqlImport/importSql.d.ts +28 -0
- package/dist/types/sqlImport/parse.d.ts +6 -0
- package/dist/types/sqlImport/syntax.d.ts +245 -0
- package/dist/types/sqlImport/tokenize.d.ts +26 -0
- package/package.json +164 -3
package/dist/index.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { P as Q, f as U, a as D } from "./PipelineEditor-DNZkDSaY.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-z95dxLxu.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-Cw5sttQL.js";
|
|
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-BDCnbFHY.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-BDCnbFHY.js";
|
|
7
|
+
import { D as Ve } from "./tokens-BTaVMSOx.js";
|
|
8
|
+
function T(n, s, e = {}) {
|
|
9
|
+
const a = { paths: [] }, t = m(a, () => e.parameterized ? h(n, s, e).sql : p(n, s, e));
|
|
10
|
+
let r = "";
|
|
11
|
+
const c = [], u = [];
|
|
12
|
+
for (let o = 0; o < t.length; o += 1) {
|
|
13
|
+
const i = t[o];
|
|
14
|
+
if (i === "") {
|
|
15
|
+
const d = t.indexOf("", o);
|
|
16
|
+
u.push({ index: Number(t.slice(o + 1, d)), start: r.length }), o = d;
|
|
17
|
+
} else if (i === "") {
|
|
18
|
+
const { index: d, start: f } = u.pop();
|
|
19
|
+
c.push({ start: f, end: r.length, pathSegments: a.paths[d] });
|
|
20
|
+
} else
|
|
21
|
+
r += i;
|
|
22
|
+
}
|
|
23
|
+
return c.sort((o, i) => o.start - i.start || i.end - o.end || o.pathSegments.length - i.pathSegments.length), { sql: r, spans: c };
|
|
24
|
+
}
|
|
25
|
+
function g(n, s) {
|
|
26
|
+
const e = n.filter((a) => a.start <= s && s < a.end);
|
|
27
|
+
return e[e.length - 1];
|
|
28
|
+
}
|
|
29
|
+
function N(n, s) {
|
|
30
|
+
const e = n.filter((a) => s.every((t, r) => a.pathSegments[r] === t));
|
|
31
|
+
return e.filter((a, t) => !e.slice(0, t).some(
|
|
32
|
+
(r) => r.start <= a.start && a.end <= r.end
|
|
33
|
+
));
|
|
34
|
+
}
|
|
35
|
+
function l(n) {
|
|
36
|
+
const s = document.createTreeWalker(n, NodeFilter.SHOW_TEXT), e = [];
|
|
37
|
+
for (; s.nextNode(); ) e.push(s.currentNode);
|
|
38
|
+
return e;
|
|
39
|
+
}
|
|
40
|
+
function S(n, s, e) {
|
|
41
|
+
const a = document.createRange();
|
|
42
|
+
let t = 0;
|
|
43
|
+
return l(n).forEach((r) => {
|
|
44
|
+
const c = t + r.length;
|
|
45
|
+
s >= t && s <= c && a.setStart(r, s - t), e >= t && e <= c && a.setEnd(r, e - t), t = c;
|
|
46
|
+
}), a;
|
|
47
|
+
}
|
|
48
|
+
function _(n, s, e) {
|
|
49
|
+
const a = document.caretPositionFromPoint ? document.caretPositionFromPoint(s, e) : document.caretRangeFromPoint(s, e);
|
|
50
|
+
if (!a) return;
|
|
51
|
+
const [t, r] = "offsetNode" in a ? [a.offsetNode, a.offset] : [a.startContainer, a.startOffset], c = l(n), u = c.indexOf(t);
|
|
52
|
+
if (u < 0) return;
|
|
53
|
+
const o = c.slice(0, u).reduce((i, d) => i + d.length, 0) + r;
|
|
54
|
+
return [o, o - 1].find((i) => {
|
|
55
|
+
if (i < 0) return !1;
|
|
56
|
+
const d = S(n, i, i + 1).getBoundingClientRect();
|
|
57
|
+
return s >= d.left && s <= d.right && e >= d.top && e <= d.bottom;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
b as DEFAULT_FUNCTIONS,
|
|
62
|
+
k as DEFAULT_MESSAGES,
|
|
63
|
+
Ve as DEFAULT_THEME,
|
|
64
|
+
xe as DIALECTS,
|
|
65
|
+
Be as DIALECT_LABELS,
|
|
66
|
+
x as EMPTY_SCHEMA,
|
|
67
|
+
B as MAX_NAME_LENGTH,
|
|
68
|
+
q as MAX_NUMBER_DIGITS,
|
|
69
|
+
C as MAX_TEXT_LENGTH,
|
|
70
|
+
G as MAX_TYPE_NAME_LENGTH,
|
|
71
|
+
Fe as QUERY_FORMAT_VERSION,
|
|
72
|
+
H as QUERY_ISSUE_KINDS,
|
|
73
|
+
w as QUERY_WARNING_KINDS,
|
|
74
|
+
Q as QueryBuilder,
|
|
75
|
+
Ie as QueryFormatError,
|
|
76
|
+
ve as ScopeError,
|
|
77
|
+
X as SharedBaseError,
|
|
78
|
+
Le as addCondition,
|
|
79
|
+
Pe as addGroupBy,
|
|
80
|
+
Re as addJoin,
|
|
81
|
+
W as addMeasure,
|
|
82
|
+
Oe as addOrderBy,
|
|
83
|
+
ke as addSelectItem,
|
|
84
|
+
Y as addSharedQuery,
|
|
85
|
+
j as addUnionBranch,
|
|
86
|
+
J as addUnionJoin,
|
|
87
|
+
z as addUnionTable,
|
|
88
|
+
h as astToParameterizedSql,
|
|
89
|
+
p as astToSql,
|
|
90
|
+
T as astToSqlWithSpans,
|
|
91
|
+
F as branchesOf,
|
|
92
|
+
Ue as calendarDay,
|
|
93
|
+
K as createEmptyQuery,
|
|
94
|
+
V as createUnion,
|
|
95
|
+
qe as expr,
|
|
96
|
+
I as filterSchema,
|
|
97
|
+
U as formula,
|
|
98
|
+
D as formulaText,
|
|
99
|
+
De as fromIsoDay,
|
|
100
|
+
v as functionsForDialect,
|
|
101
|
+
L as hasBaseTable,
|
|
102
|
+
P as isUnion,
|
|
103
|
+
Me as isoDay,
|
|
104
|
+
Z as issueLocation,
|
|
105
|
+
$ as joinMultiplicity,
|
|
106
|
+
ee as joinSharedQuery,
|
|
107
|
+
ae as keepMeasuresInStep,
|
|
108
|
+
Ce as loadQuery,
|
|
109
|
+
se as makeShared,
|
|
110
|
+
te as makeSubQuery,
|
|
111
|
+
re as measureFacts,
|
|
112
|
+
ne as queryParams,
|
|
113
|
+
oe as relativeDateLabel,
|
|
114
|
+
Ge as removeJoin,
|
|
115
|
+
ie as removeSharedQuery,
|
|
116
|
+
de as removeUnionTable,
|
|
117
|
+
ce as renameSharedQuery,
|
|
118
|
+
ue as renameUnionColumn,
|
|
119
|
+
le as repeatedReads,
|
|
120
|
+
fe as repeatedTables,
|
|
121
|
+
He as requireBaseTable,
|
|
122
|
+
me as rowsPerBase,
|
|
123
|
+
we as saveQuery,
|
|
124
|
+
Xe as scopeQuery,
|
|
125
|
+
We as setBaseTable,
|
|
126
|
+
Ye as setDistinct,
|
|
127
|
+
je as setHaving,
|
|
128
|
+
Je as setPaging,
|
|
129
|
+
he as setSharedBase,
|
|
130
|
+
pe as setUnionAll,
|
|
131
|
+
Se as sharedQueryName,
|
|
132
|
+
Ee as sharedUses,
|
|
133
|
+
g as spanAt,
|
|
134
|
+
N as spansFor,
|
|
135
|
+
_ as sqlOffsetAt,
|
|
136
|
+
S as sqlRangeOf,
|
|
137
|
+
Te as unionName,
|
|
138
|
+
ge as unionTableColumns,
|
|
139
|
+
Ne as unionWithQuery,
|
|
140
|
+
_e as unionableTables,
|
|
141
|
+
ze as unscopedBodies,
|
|
142
|
+
ye as unwrapUnion,
|
|
143
|
+
Ae as validateQuery,
|
|
144
|
+
R as validateSchema
|
|
145
|
+
};
|