@tellaro/tql 1.5.0 → 3.0.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/dist/index.js +73 -65
- package/dist/src/builder.d.ts +6 -0
- package/dist/src/completionProvider.js +276 -195
- package/dist/src/complexityAnalyzer.js +41 -32
- package/dist/src/index.d.ts +3 -3
- package/dist/src/parser.d.ts +193 -1
- package/dist/src/parser.js +614 -127
- package/dist/src/semanticPreview.d.ts +23 -0
- package/dist/src/semanticPreview.js +111 -41
- package/dist/src/tokenizer.d.ts +134 -5
- package/dist/src/tokenizer.js +47 -30
- package/dist/src/types.d.ts +138 -10
- package/dist/src/validator.d.ts +235 -1
- package/dist/src/validator.js +468 -150
- package/dist/tql.css +1 -1
- package/dist/vue/TqlAutocomplete.vue.d.ts +24 -1
- package/dist/vue/TqlChart.vue.d.ts +19 -1
- package/dist/vue/TqlChart.vue.js +1 -1
- package/dist/vue/TqlInput.vue.d.ts +92 -1
- package/dist/vue/TqlInput.vue.js +1 -1
- package/dist/vue/TqlInput.vue2.js +282 -256
- package/dist/vue/components/TqlPreview.vue.d.ts +89 -2
- package/dist/vue/components/TqlPreview.vue.js +4 -4
- package/dist/vue/index.d.ts +1 -1
- package/dist/vue/useTqlInput.d.ts +38 -29
- package/package.json +3 -5
|
@@ -1,47 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useTqlInput as
|
|
5
|
-
import { useQueryHistory as
|
|
6
|
-
import { analyzeComplexity as
|
|
7
|
-
const
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "tql-highlight-layer",
|
|
10
|
-
"aria-hidden": "true"
|
|
11
|
-
}, dt = ["placeholder", "disabled", "readonly", "rows", "aria-expanded", "aria-invalid", "aria-describedby"], vt = ["placeholder", "disabled", "readonly", "aria-expanded", "aria-invalid", "aria-describedby"], ft = { class: "tql-toolbar" }, pt = ["title"], ht = { class: "tql-complexity-label" }, mt = {
|
|
1
|
+
import { defineComponent as at, ref as p, toRef as te, computed as I, watch as le, onMounted as nt, nextTick as S, onUnmounted as st, openBlock as i, createElementBlock as n, normalizeClass as P, unref as c, Fragment as L, renderList as N, toDisplayString as w, createCommentVNode as m, withDirectives as ue, vModelText as re, createElementVNode as d, withModifiers as M, withKeys as Ve, createVNode as Te, createBlock as ut, Teleport as rt } from "vue";
|
|
2
|
+
import ct from "./TqlAutocomplete.vue.js";
|
|
3
|
+
import dt from "./components/TqlPreview.vue.js";
|
|
4
|
+
import { useTqlInput as vt } from "./useTqlInput.js";
|
|
5
|
+
import { useQueryHistory as ft } from "./composables/useQueryHistory.js";
|
|
6
|
+
import { analyzeComplexity as pt } from "../src/complexityAnalyzer.js";
|
|
7
|
+
const ht = ["placeholder", "disabled", "readonly", "rows", "aria-expanded", "aria-invalid", "aria-describedby"], mt = ["placeholder", "disabled", "readonly", "aria-expanded", "aria-invalid", "aria-describedby"], yt = { class: "tql-toolbar" }, gt = ["title"], wt = { class: "tql-complexity-label" }, bt = {
|
|
12
8
|
key: 0,
|
|
13
9
|
class: "tql-complexity-count"
|
|
14
|
-
},
|
|
10
|
+
}, qt = {
|
|
15
11
|
key: 4,
|
|
16
12
|
class: "tql-validation-status"
|
|
17
|
-
},
|
|
13
|
+
}, kt = {
|
|
18
14
|
key: 0,
|
|
19
15
|
class: "pi pi-check-circle tql-icon-valid",
|
|
20
16
|
"aria-label": "Query is valid"
|
|
21
|
-
},
|
|
17
|
+
}, xt = ["aria-label", "aria-expanded"], St = { class: "tql-history-header" }, Ct = { class: "tql-history-list" }, Pt = ["onClick"], Vt = ["title", "onClick"], Tt = { class: "tql-history-content" }, Rt = {
|
|
22
18
|
key: 0,
|
|
23
19
|
class: "tql-history-label"
|
|
24
|
-
},
|
|
20
|
+
}, Dt = { class: "tql-history-query" }, It = { class: "tql-history-time" }, $t = {
|
|
25
21
|
key: 0,
|
|
26
22
|
class: "tql-history-empty"
|
|
27
|
-
},
|
|
23
|
+
}, Ht = {
|
|
28
24
|
key: 0,
|
|
29
25
|
class: "tql-error-suggestion"
|
|
30
|
-
},
|
|
26
|
+
}, Et = {
|
|
31
27
|
key: 4,
|
|
32
28
|
class: "tql-complexity-warnings"
|
|
33
|
-
},
|
|
29
|
+
}, Bt = {
|
|
34
30
|
key: 0,
|
|
35
31
|
class: "tql-complexity-suggestions"
|
|
36
|
-
},
|
|
32
|
+
}, Lt = {
|
|
37
33
|
key: 5,
|
|
38
34
|
class: "tql-preview-panel"
|
|
39
|
-
},
|
|
35
|
+
}, Mt = { class: "tql-preview-header" }, Qt = {
|
|
40
36
|
class: "sr-only",
|
|
41
37
|
role: "status",
|
|
42
38
|
"aria-live": "polite",
|
|
43
39
|
"aria-atomic": "true"
|
|
44
|
-
},
|
|
40
|
+
}, At = { key: 0 }, zt = { key: 1 }, Kt = 1500, Gt = /* @__PURE__ */ at({
|
|
45
41
|
__name: "TqlInput",
|
|
46
42
|
props: {
|
|
47
43
|
modelValue: {},
|
|
@@ -71,123 +67,136 @@ const ct = {
|
|
|
71
67
|
historyStorageKey: {}
|
|
72
68
|
},
|
|
73
69
|
emits: ["update:modelValue", "validation", "parse", "submit"],
|
|
74
|
-
setup(
|
|
75
|
-
const v =
|
|
76
|
-
let
|
|
77
|
-
const V =
|
|
78
|
-
tokens:
|
|
70
|
+
setup(a, { expose: Re, emit: De }) {
|
|
71
|
+
const v = a, b = De, o = p(null), q = p(null), ce = p(null), Q = p(null), s = p(v.modelValue), k = p(!1), y = p(!1), U = p(0), A = p(!1);
|
|
72
|
+
let j = null, W = 0;
|
|
73
|
+
const V = p(!1), T = p(!1), $ = p(""), oe = `tql-input-${Math.random().toString(36).substring(2, 9)}`, de = `${oe}-input`, ie = `${oe}-autocomplete`, ae = `${oe}-errors`, z = p([]), H = p(-1), Ie = te(v, "modelValue"), $e = te(v, "fieldSchema"), He = te(v, "fieldValues"), Ee = te(v, "snippets"), {
|
|
74
|
+
tokens: Be,
|
|
79
75
|
cursorPosition: K,
|
|
80
76
|
completionItems: O,
|
|
81
77
|
showAutocomplete: x,
|
|
82
|
-
isValid:
|
|
78
|
+
isValid: G,
|
|
83
79
|
errors: R,
|
|
84
|
-
hasErrors:
|
|
85
|
-
validate:
|
|
86
|
-
handleInput:
|
|
80
|
+
hasErrors: D,
|
|
81
|
+
validate: Le,
|
|
82
|
+
handleInput: ve,
|
|
87
83
|
handleCursorChange: C,
|
|
88
|
-
insertCompletion:
|
|
89
|
-
insertSnippet:
|
|
90
|
-
triggerAutocomplete:
|
|
91
|
-
hideAutocomplete:
|
|
92
|
-
getTokenAtCursor:
|
|
93
|
-
} =
|
|
94
|
-
modelValue:
|
|
95
|
-
fieldSchema:
|
|
96
|
-
fieldValues:
|
|
97
|
-
snippets:
|
|
84
|
+
insertCompletion: Me,
|
|
85
|
+
insertSnippet: Qe,
|
|
86
|
+
triggerAutocomplete: ne,
|
|
87
|
+
hideAutocomplete: J,
|
|
88
|
+
getTokenAtCursor: Ae
|
|
89
|
+
} = vt({
|
|
90
|
+
modelValue: Ie,
|
|
91
|
+
fieldSchema: $e,
|
|
92
|
+
fieldValues: He,
|
|
93
|
+
snippets: Ee,
|
|
98
94
|
validateOnInput: v.validateOnInput,
|
|
99
95
|
debounceMs: v.debounceMs,
|
|
100
96
|
autocomplete: v.autocomplete,
|
|
101
97
|
onValidation: (e) => b("validation", e),
|
|
102
98
|
onParse: (e) => b("parse", e)
|
|
103
|
-
}),
|
|
99
|
+
}), E = v.showHistory ? ft({
|
|
104
100
|
storageKey: v.historyStorageKey || "tql-history",
|
|
105
101
|
...v.historyOptions
|
|
106
|
-
}) : null, g =
|
|
102
|
+
}) : null, g = I(() => !v.showComplexity || !s.value.trim() ? null : pt(s.value, v.complexityThresholds)), ze = I(() => g.value ? `tql-complexity-${g.value.score}` : ""), fe = I(() => g.value && {
|
|
107
103
|
low: "Low",
|
|
108
104
|
medium: "Medium",
|
|
109
105
|
high: "High"
|
|
110
|
-
}[g.value.score] || ""),
|
|
111
|
-
function
|
|
112
|
-
s.value = e.query, b("update:modelValue", e.query),
|
|
106
|
+
}[g.value.score] || ""), pe = I(() => E ? $.value.trim() ? E.searchHistory($.value).slice(0, 10) : E.getRecentQueries(10) : []);
|
|
107
|
+
function Ke(e) {
|
|
108
|
+
s.value = e.query, b("update:modelValue", e.query), ve(e.query), V.value = !1, $.value = "", S(() => o.value?.focus());
|
|
113
109
|
}
|
|
114
|
-
function
|
|
115
|
-
t.stopPropagation(),
|
|
110
|
+
function Oe(e, t) {
|
|
111
|
+
t.stopPropagation(), E?.toggleFavorite(e.id);
|
|
116
112
|
}
|
|
117
|
-
function
|
|
118
|
-
|
|
113
|
+
function he() {
|
|
114
|
+
E && s.value.trim() && E.addQuery(s.value);
|
|
119
115
|
}
|
|
120
|
-
function
|
|
121
|
-
V.value = !V.value, V.value && (
|
|
116
|
+
function Fe() {
|
|
117
|
+
V.value = !V.value, V.value && (T.value = !1);
|
|
122
118
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
119
|
+
function Ne() {
|
|
120
|
+
T.value = !T.value, T.value && (V.value = !1);
|
|
125
121
|
}
|
|
126
|
-
|
|
122
|
+
le(
|
|
127
123
|
() => v.modelValue,
|
|
128
124
|
(e) => {
|
|
129
125
|
e !== s.value && (s.value = e);
|
|
130
126
|
}
|
|
131
|
-
),
|
|
127
|
+
), le(
|
|
132
128
|
() => v.minHeight,
|
|
133
129
|
(e) => {
|
|
134
130
|
q.value && (e ? q.value.style.setProperty("--tql-min-height", e) : q.value.style.removeProperty("--tql-min-height"));
|
|
135
131
|
},
|
|
136
132
|
{ immediate: !0 }
|
|
137
133
|
);
|
|
138
|
-
const
|
|
139
|
-
const e =
|
|
134
|
+
const Ue = I(() => y.value ? !0 : x.value && O.value.length > 0 ? !1 : !!(!k.value || A.value)), X = p({ top: 0, left: 0 }), je = I(() => X.value.top > 0 || X.value.left > 0), me = p({ top: 0, left: 0, width: 0 }), B = p(null), We = I(() => {
|
|
135
|
+
const e = me.value;
|
|
140
136
|
return e.top > 0 || e.left > 0 || e.width > 0;
|
|
141
137
|
});
|
|
142
|
-
function
|
|
138
|
+
function Y() {
|
|
143
139
|
if (!q.value)
|
|
144
140
|
return;
|
|
145
141
|
const e = q.value.getBoundingClientRect();
|
|
146
|
-
|
|
142
|
+
X.value = {
|
|
147
143
|
top: e.bottom + 4,
|
|
148
144
|
left: e.left
|
|
149
|
-
},
|
|
145
|
+
}, me.value = {
|
|
150
146
|
top: e.bottom + 4,
|
|
151
147
|
left: e.left,
|
|
152
148
|
width: e.width
|
|
153
149
|
}, B.value && (B.value.style.setProperty("--tql-msg-top", `${e.bottom + 4}px`), B.value.style.setProperty("--tql-msg-left", `${e.left}px`), B.value.style.setProperty("--tql-msg-width", `${e.width}px`));
|
|
154
150
|
}
|
|
155
|
-
function
|
|
151
|
+
function Ge(e) {
|
|
156
152
|
const t = `tql-token tql-token-${e.type}`;
|
|
157
153
|
return R.value.some((u) => e.start >= u.start && e.end <= u.end) ? `${t} tql-token-error-range` : t;
|
|
158
154
|
}
|
|
159
|
-
function
|
|
155
|
+
function F() {
|
|
156
|
+
const e = o.value, t = ce.value;
|
|
157
|
+
!e || !t || (t.scrollLeft !== e.scrollLeft && (t.scrollLeft = e.scrollLeft), t.scrollTop !== e.scrollTop && (t.scrollTop = e.scrollTop));
|
|
158
|
+
}
|
|
159
|
+
function Z() {
|
|
160
|
+
S(F);
|
|
161
|
+
}
|
|
162
|
+
function ye() {
|
|
163
|
+
F();
|
|
164
|
+
}
|
|
165
|
+
function ge() {
|
|
166
|
+
F(), Z();
|
|
167
|
+
}
|
|
168
|
+
function we(e) {
|
|
160
169
|
const t = e.target;
|
|
161
|
-
s.value = t.value, b("update:modelValue", t.value),
|
|
170
|
+
s.value = t.value, b("update:modelValue", t.value), ve(t.value), U.value = Date.now(), A.value = !1, F(), Z(), S(() => {
|
|
162
171
|
o.value && C(o.value.selectionStart || 0);
|
|
163
172
|
});
|
|
164
173
|
}
|
|
165
|
-
function
|
|
166
|
-
if (o.value) {
|
|
174
|
+
function _() {
|
|
175
|
+
if (F(), Z(), o.value) {
|
|
167
176
|
const e = o.value.selectionStart || 0;
|
|
168
177
|
e !== K.value && C(e);
|
|
169
178
|
}
|
|
170
179
|
}
|
|
171
|
-
function
|
|
172
|
-
if (e.key === "Tab" && !e.shiftKey) {
|
|
173
|
-
if (Date.now() -
|
|
180
|
+
function be(e) {
|
|
181
|
+
if (Z(), e.key === "Tab" && !e.shiftKey) {
|
|
182
|
+
if (Date.now() - W < 200) {
|
|
174
183
|
e.preventDefault();
|
|
175
184
|
return;
|
|
176
185
|
}
|
|
177
|
-
if (z.value.length > 0 &&
|
|
178
|
-
e.preventDefault(),
|
|
186
|
+
if (z.value.length > 0 && H.value >= 0) {
|
|
187
|
+
e.preventDefault(), Je();
|
|
179
188
|
return;
|
|
180
189
|
}
|
|
181
|
-
if (
|
|
182
|
-
e.preventDefault(),
|
|
190
|
+
if (qe()) {
|
|
191
|
+
e.preventDefault(), Ze();
|
|
183
192
|
return;
|
|
184
193
|
}
|
|
185
|
-
if (
|
|
186
|
-
e.preventDefault(),
|
|
194
|
+
if (Xe()) {
|
|
195
|
+
e.preventDefault(), Ye();
|
|
187
196
|
return;
|
|
188
197
|
}
|
|
189
198
|
if (x.value && O.value.length > 0) {
|
|
190
|
-
e.preventDefault(),
|
|
199
|
+
e.preventDefault(), Q.value?.selectCurrent();
|
|
191
200
|
return;
|
|
192
201
|
}
|
|
193
202
|
return;
|
|
@@ -195,71 +204,71 @@ const ct = {
|
|
|
195
204
|
if (x.value && O.value.length > 0)
|
|
196
205
|
switch (e.key) {
|
|
197
206
|
case "ArrowDown":
|
|
198
|
-
e.preventDefault(),
|
|
207
|
+
e.preventDefault(), Q.value?.moveDown();
|
|
199
208
|
return;
|
|
200
209
|
case "ArrowUp":
|
|
201
|
-
e.preventDefault(),
|
|
210
|
+
e.preventDefault(), Q.value?.moveUp();
|
|
202
211
|
return;
|
|
203
212
|
case "Enter":
|
|
204
213
|
if (!v.multiline)
|
|
205
214
|
break;
|
|
206
|
-
e.preventDefault(),
|
|
215
|
+
e.preventDefault(), Q.value?.selectCurrent();
|
|
207
216
|
return;
|
|
208
217
|
case "Escape":
|
|
209
|
-
e.preventDefault(),
|
|
218
|
+
e.preventDefault(), J(), se();
|
|
210
219
|
return;
|
|
211
220
|
}
|
|
212
221
|
if (e.key === " " && e.ctrlKey) {
|
|
213
|
-
e.preventDefault(),
|
|
222
|
+
e.preventDefault(), ne();
|
|
214
223
|
return;
|
|
215
224
|
}
|
|
216
|
-
e.key === "Enter" && (v.multiline && e.ctrlKey || !v.multiline && !x.value) && (e.preventDefault(),
|
|
225
|
+
e.key === "Enter" && (v.multiline && e.ctrlKey || !v.multiline && !x.value) && (e.preventDefault(), he(), b("submit", s.value));
|
|
217
226
|
}
|
|
218
|
-
function
|
|
219
|
-
if (
|
|
220
|
-
|
|
227
|
+
function Je() {
|
|
228
|
+
if (H.value++, H.value >= z.value.length) {
|
|
229
|
+
se();
|
|
221
230
|
return;
|
|
222
231
|
}
|
|
223
|
-
const e = z.value[
|
|
232
|
+
const e = z.value[H.value];
|
|
224
233
|
o.value && (o.value.setSelectionRange(e.start, e.end), o.value.focus(), C(e.start));
|
|
225
234
|
}
|
|
226
|
-
function
|
|
227
|
-
z.value = [],
|
|
235
|
+
function se() {
|
|
236
|
+
z.value = [], H.value = -1;
|
|
228
237
|
}
|
|
229
|
-
function
|
|
238
|
+
function qe() {
|
|
230
239
|
const e = o.value?.selectionStart ?? K.value, t = s.value;
|
|
231
240
|
let l = !1, u = null;
|
|
232
241
|
for (let r = 0; r < e; r++) {
|
|
233
|
-
const f = t[r],
|
|
234
|
-
(f === '"' || f === "'") &&
|
|
242
|
+
const f = t[r], h = r > 0 ? t[r - 1] : "";
|
|
243
|
+
(f === '"' || f === "'") && h !== "\\" && (l ? f === u && (l = !1, u = null) : (l = !0, u = f));
|
|
235
244
|
}
|
|
236
245
|
return l;
|
|
237
246
|
}
|
|
238
|
-
function
|
|
247
|
+
function Xe() {
|
|
239
248
|
const e = o.value?.selectionStart ?? K.value, t = s.value;
|
|
240
249
|
if (e === 0) return !1;
|
|
241
250
|
const l = t[e - 1];
|
|
242
|
-
return l !== '"' && l !== "'" ? !1 : !
|
|
251
|
+
return l !== '"' && l !== "'" ? !1 : !qe();
|
|
243
252
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
253
|
+
function Ye() {
|
|
254
|
+
W = Date.now();
|
|
246
255
|
const e = o.value?.selectionStart ?? K.value, t = s.value, l = t[e];
|
|
247
256
|
if (l === " " || l === `
|
|
248
257
|
` || l === " ") {
|
|
249
|
-
const
|
|
250
|
-
o.value && (o.value.setSelectionRange(
|
|
258
|
+
const h = e + 1;
|
|
259
|
+
o.value && (o.value.setSelectionRange(h, h), C(h));
|
|
251
260
|
return;
|
|
252
261
|
}
|
|
253
262
|
const u = t.substring(0, e), r = t.substring(e), f = u + " " + r;
|
|
254
263
|
s.value = f, b("update:modelValue", f), S(() => {
|
|
255
264
|
if (o.value) {
|
|
256
|
-
const
|
|
257
|
-
o.value.setSelectionRange(
|
|
265
|
+
const h = e + 1;
|
|
266
|
+
o.value.setSelectionRange(h, h), C(h);
|
|
258
267
|
}
|
|
259
268
|
});
|
|
260
269
|
}
|
|
261
|
-
function
|
|
262
|
-
|
|
270
|
+
function Ze() {
|
|
271
|
+
W = Date.now();
|
|
263
272
|
const e = o.value?.selectionStart ?? K.value, t = s.value;
|
|
264
273
|
for (let l = e; l < t.length; l++)
|
|
265
274
|
if (t[l] === '"' || t[l] === "'") {
|
|
@@ -276,102 +285,109 @@ const ct = {
|
|
|
276
285
|
const f = t + " ";
|
|
277
286
|
s.value = f, b("update:modelValue", f), S(() => {
|
|
278
287
|
if (o.value) {
|
|
279
|
-
const
|
|
280
|
-
o.value.setSelectionRange(
|
|
288
|
+
const h = u + 1;
|
|
289
|
+
o.value.setSelectionRange(h, h), C(h);
|
|
281
290
|
}
|
|
282
291
|
});
|
|
283
292
|
}
|
|
284
293
|
return;
|
|
285
294
|
}
|
|
286
295
|
}
|
|
287
|
-
function
|
|
288
|
-
k.value = !0,
|
|
289
|
-
|
|
296
|
+
function ke() {
|
|
297
|
+
k.value = !0, A.value = !1, U.value = Date.now(), S(() => {
|
|
298
|
+
Y(), ne();
|
|
290
299
|
});
|
|
291
300
|
}
|
|
292
|
-
function
|
|
301
|
+
function xe(e) {
|
|
293
302
|
if (e.relatedTarget?.closest(".tql-autocomplete-dropdown")) {
|
|
294
303
|
setTimeout(() => {
|
|
295
|
-
k.value || (
|
|
304
|
+
k.value || (J(), y.value = !1);
|
|
296
305
|
}, 300);
|
|
297
306
|
return;
|
|
298
307
|
}
|
|
299
308
|
k.value = !1, setTimeout(() => {
|
|
300
|
-
k.value || (
|
|
309
|
+
k.value || (J(), y.value = !1);
|
|
301
310
|
}, 200);
|
|
302
311
|
}
|
|
303
|
-
function
|
|
304
|
-
|
|
305
|
-
const t =
|
|
306
|
-
s.value = t.query, b("update:modelValue", t.query), t.placeholders.length > 0 ? (z.value = t.placeholders,
|
|
307
|
-
o.value && (o.value.focus(), o.value.setSelectionRange(t.newCursorPosition, t.newCursorPosition), C(t.newCursorPosition),
|
|
312
|
+
function _e(e) {
|
|
313
|
+
W = Date.now();
|
|
314
|
+
const t = Me(e);
|
|
315
|
+
s.value = t.query, b("update:modelValue", t.query), t.placeholders.length > 0 ? (z.value = t.placeholders, H.value = 0) : se(), S(() => {
|
|
316
|
+
o.value && (o.value.focus(), o.value.setSelectionRange(t.newCursorPosition, t.newCursorPosition), C(t.newCursorPosition), ne());
|
|
308
317
|
});
|
|
309
318
|
}
|
|
310
|
-
function
|
|
311
|
-
const t =
|
|
319
|
+
function et(e) {
|
|
320
|
+
const t = Qe(e);
|
|
312
321
|
s.value = t, b("update:modelValue", t), S(() => {
|
|
313
322
|
o.value && o.value.focus();
|
|
314
323
|
});
|
|
315
324
|
}
|
|
316
|
-
function
|
|
325
|
+
function tt() {
|
|
317
326
|
o.value?.focus();
|
|
318
327
|
}
|
|
319
|
-
function
|
|
328
|
+
function lt() {
|
|
320
329
|
o.value?.blur();
|
|
321
330
|
}
|
|
322
|
-
function
|
|
331
|
+
function Se() {
|
|
323
332
|
return o.value?.selectionStart || 0;
|
|
324
333
|
}
|
|
325
|
-
function
|
|
334
|
+
function Ce(e) {
|
|
326
335
|
o.value && (o.value.setSelectionRange(e, e), C(e));
|
|
327
336
|
}
|
|
328
|
-
function
|
|
329
|
-
const t =
|
|
337
|
+
function ot(e) {
|
|
338
|
+
const t = Se(), l = s.value.substring(0, t), u = s.value.substring(t), r = l + e + u;
|
|
330
339
|
s.value = r, b("update:modelValue", r), S(() => {
|
|
331
|
-
|
|
340
|
+
Ce(t + e.length);
|
|
332
341
|
});
|
|
333
342
|
}
|
|
334
|
-
function
|
|
335
|
-
const l = Date.now() - e, u = Math.floor(l / 1e3), r = Math.floor(u / 60), f = Math.floor(r / 60),
|
|
336
|
-
return
|
|
343
|
+
function it(e) {
|
|
344
|
+
const l = Date.now() - e, u = Math.floor(l / 1e3), r = Math.floor(u / 60), f = Math.floor(r / 60), h = Math.floor(f / 24);
|
|
345
|
+
return h > 0 ? `${h}d ago` : f > 0 ? `${f}h ago` : r > 0 ? `${r}m ago` : "just now";
|
|
337
346
|
}
|
|
338
|
-
function
|
|
347
|
+
function Pe(e) {
|
|
339
348
|
const t = e.target;
|
|
340
|
-
q.value?.contains(t) || (V.value = !1,
|
|
349
|
+
q.value?.contains(t) || (V.value = !1, T.value = !1);
|
|
341
350
|
}
|
|
342
|
-
|
|
351
|
+
Re({
|
|
343
352
|
// Methods
|
|
344
|
-
focus:
|
|
345
|
-
blur:
|
|
346
|
-
validate:
|
|
347
|
-
insertText:
|
|
348
|
-
insertSnippet:
|
|
349
|
-
getTokenAtPosition:
|
|
350
|
-
getCursorPosition:
|
|
351
|
-
setCursorPosition:
|
|
352
|
-
// Reactive state for form validation
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
353
|
+
focus: tt,
|
|
354
|
+
blur: lt,
|
|
355
|
+
validate: Le,
|
|
356
|
+
insertText: ot,
|
|
357
|
+
insertSnippet: et,
|
|
358
|
+
getTokenAtPosition: Ae,
|
|
359
|
+
getCursorPosition: Se,
|
|
360
|
+
setCursorPosition: Ce,
|
|
361
|
+
// Reactive state for form validation. Getters, so the exposed value is live
|
|
362
|
+
// and matches TqlInputExpose; Vue would unwrap a ref here anyway.
|
|
363
|
+
get isValid() {
|
|
364
|
+
return G.value;
|
|
365
|
+
},
|
|
366
|
+
get hasErrors() {
|
|
367
|
+
return D.value;
|
|
368
|
+
},
|
|
369
|
+
get errors() {
|
|
370
|
+
return R.value;
|
|
371
|
+
}
|
|
356
372
|
});
|
|
357
|
-
function
|
|
358
|
-
(x.value ||
|
|
373
|
+
function ee() {
|
|
374
|
+
(x.value || D.value) && k.value && Y();
|
|
359
375
|
}
|
|
360
|
-
return
|
|
361
|
-
document.addEventListener("selectionchange",
|
|
362
|
-
k.value &&
|
|
376
|
+
return nt(() => {
|
|
377
|
+
document.addEventListener("selectionchange", _), document.addEventListener("click", Pe), window.addEventListener("scroll", ee, !0), window.addEventListener("resize", ee), v.minHeight && q.value && q.value.style.setProperty("--tql-min-height", v.minHeight), j = setInterval(() => {
|
|
378
|
+
k.value && U.value > 0 && Date.now() - U.value >= Kt && !A.value && (A.value = !0);
|
|
363
379
|
}, 500), S(() => {
|
|
364
|
-
|
|
380
|
+
Y();
|
|
365
381
|
});
|
|
366
|
-
}),
|
|
367
|
-
() =>
|
|
382
|
+
}), le(
|
|
383
|
+
() => D.value,
|
|
368
384
|
(e) => {
|
|
369
385
|
e && S(() => {
|
|
370
|
-
|
|
386
|
+
Y();
|
|
371
387
|
});
|
|
372
388
|
},
|
|
373
389
|
{ immediate: !0 }
|
|
374
|
-
),
|
|
390
|
+
), le(
|
|
375
391
|
B,
|
|
376
392
|
(e) => {
|
|
377
393
|
if (e && q.value) {
|
|
@@ -379,126 +395,136 @@ const ct = {
|
|
|
379
395
|
e.style.setProperty("--tql-msg-top", `${t.bottom + 4}px`), e.style.setProperty("--tql-msg-left", `${t.left}px`), e.style.setProperty("--tql-msg-width", `${t.width}px`);
|
|
380
396
|
}
|
|
381
397
|
}
|
|
382
|
-
),
|
|
383
|
-
document.removeEventListener("selectionchange",
|
|
384
|
-
}), (e, t) => (
|
|
398
|
+
), st(() => {
|
|
399
|
+
document.removeEventListener("selectionchange", _), document.removeEventListener("click", Pe), window.removeEventListener("scroll", ee, !0), window.removeEventListener("resize", ee), j && (clearInterval(j), j = null);
|
|
400
|
+
}), (e, t) => (i(), n("div", {
|
|
385
401
|
ref_key: "wrapperRef",
|
|
386
402
|
ref: q,
|
|
387
403
|
class: P([
|
|
388
404
|
"tql-input-wrapper",
|
|
389
405
|
{
|
|
390
406
|
"tql-input-focused": k.value,
|
|
391
|
-
"tql-input-invalid": c(
|
|
392
|
-
"tql-input-disabled":
|
|
393
|
-
"tql-input-multiline":
|
|
407
|
+
"tql-input-invalid": c(D) && a.showValidation,
|
|
408
|
+
"tql-input-disabled": a.disabled,
|
|
409
|
+
"tql-input-multiline": a.multiline,
|
|
394
410
|
"tql-input-autocomplete-active": c(x),
|
|
395
|
-
"tql-input-resizable":
|
|
396
|
-
"tql-input-has-min-height": !!
|
|
411
|
+
"tql-input-resizable": a.resizable && a.multiline,
|
|
412
|
+
"tql-input-has-min-height": !!a.minHeight
|
|
397
413
|
}
|
|
398
414
|
])
|
|
399
415
|
}, [
|
|
400
|
-
|
|
401
|
-
|
|
416
|
+
a.syntaxHighlighting ? (i(), n("div", {
|
|
417
|
+
key: 0,
|
|
418
|
+
ref_key: "highlightRef",
|
|
419
|
+
ref: ce,
|
|
420
|
+
class: "tql-highlight-layer",
|
|
421
|
+
"aria-hidden": "true"
|
|
422
|
+
}, [
|
|
423
|
+
(i(!0), n(L, null, N(c(Be), (l, u) => (i(), n("span", {
|
|
402
424
|
key: u,
|
|
403
|
-
class: P(
|
|
425
|
+
class: P(Ge(l))
|
|
404
426
|
}, w(l.raw || l.value), 3))), 128))
|
|
405
|
-
])) : m("", !0),
|
|
406
|
-
|
|
427
|
+
], 512)) : m("", !0),
|
|
428
|
+
a.multiline ? ue((i(), n("textarea", {
|
|
407
429
|
key: 1,
|
|
408
|
-
id:
|
|
430
|
+
id: de,
|
|
409
431
|
ref_key: "inputRef",
|
|
410
432
|
ref: o,
|
|
411
433
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => s.value = l),
|
|
412
|
-
class: P(["tql-input", { "tql-input-highlighted":
|
|
413
|
-
placeholder:
|
|
414
|
-
disabled:
|
|
415
|
-
readonly:
|
|
416
|
-
rows:
|
|
434
|
+
class: P(["tql-input", { "tql-input-highlighted": a.syntaxHighlighting, "tql-input-resizable-textarea": a.resizable }]),
|
|
435
|
+
placeholder: a.placeholder,
|
|
436
|
+
disabled: a.disabled,
|
|
437
|
+
readonly: a.readonly,
|
|
438
|
+
rows: a.rows,
|
|
417
439
|
role: "combobox",
|
|
418
440
|
"aria-expanded": c(x) && k.value,
|
|
419
|
-
"aria-controls":
|
|
420
|
-
"aria-invalid": c(
|
|
421
|
-
"aria-describedby": c(
|
|
441
|
+
"aria-controls": ie,
|
|
442
|
+
"aria-invalid": c(D) && a.showValidation,
|
|
443
|
+
"aria-describedby": c(D) && y.value ? ae : void 0,
|
|
422
444
|
"aria-autocomplete": "list",
|
|
423
445
|
"aria-haspopup": "listbox",
|
|
424
446
|
spellcheck: "false",
|
|
425
447
|
autocomplete: "off",
|
|
426
448
|
autocapitalize: "off",
|
|
427
|
-
onInput:
|
|
428
|
-
onKeydown:
|
|
429
|
-
onFocus:
|
|
430
|
-
onBlur:
|
|
431
|
-
onClick:
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
449
|
+
onInput: we,
|
|
450
|
+
onKeydown: be,
|
|
451
|
+
onFocus: ke,
|
|
452
|
+
onBlur: xe,
|
|
453
|
+
onClick: _,
|
|
454
|
+
onSelect: ge,
|
|
455
|
+
onScroll: ye
|
|
456
|
+
}, null, 42, ht)), [
|
|
457
|
+
[re, s.value]
|
|
458
|
+
]) : ue((i(), n("input", {
|
|
435
459
|
key: 2,
|
|
436
|
-
id:
|
|
460
|
+
id: de,
|
|
437
461
|
ref_key: "inputRef",
|
|
438
462
|
ref: o,
|
|
439
463
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => s.value = l),
|
|
440
464
|
type: "text",
|
|
441
|
-
class: P(["tql-input", { "tql-input-highlighted":
|
|
442
|
-
placeholder:
|
|
443
|
-
disabled:
|
|
444
|
-
readonly:
|
|
465
|
+
class: P(["tql-input", { "tql-input-highlighted": a.syntaxHighlighting }]),
|
|
466
|
+
placeholder: a.placeholder,
|
|
467
|
+
disabled: a.disabled,
|
|
468
|
+
readonly: a.readonly,
|
|
445
469
|
role: "combobox",
|
|
446
470
|
"aria-expanded": c(x) && k.value,
|
|
447
|
-
"aria-controls":
|
|
448
|
-
"aria-invalid": c(
|
|
449
|
-
"aria-describedby": c(
|
|
471
|
+
"aria-controls": ie,
|
|
472
|
+
"aria-invalid": c(D) && a.showValidation,
|
|
473
|
+
"aria-describedby": c(D) && y.value ? ae : void 0,
|
|
450
474
|
"aria-autocomplete": "list",
|
|
451
475
|
"aria-haspopup": "listbox",
|
|
452
476
|
spellcheck: "false",
|
|
453
477
|
autocomplete: "off",
|
|
454
478
|
autocapitalize: "off",
|
|
455
|
-
onInput:
|
|
456
|
-
onKeydown:
|
|
457
|
-
onFocus:
|
|
458
|
-
onBlur:
|
|
459
|
-
onClick:
|
|
460
|
-
|
|
461
|
-
|
|
479
|
+
onInput: we,
|
|
480
|
+
onKeydown: be,
|
|
481
|
+
onFocus: ke,
|
|
482
|
+
onBlur: xe,
|
|
483
|
+
onClick: _,
|
|
484
|
+
onSelect: ge,
|
|
485
|
+
onScroll: ye
|
|
486
|
+
}, null, 42, mt)), [
|
|
487
|
+
[re, s.value]
|
|
462
488
|
]),
|
|
463
|
-
d("div",
|
|
464
|
-
|
|
489
|
+
d("div", yt, [
|
|
490
|
+
a.showComplexity && g.value && s.value.trim() ? (i(), n("div", {
|
|
465
491
|
key: 0,
|
|
466
|
-
class: P(["tql-complexity-badge",
|
|
467
|
-
title: `${
|
|
492
|
+
class: P(["tql-complexity-badge", ze.value]),
|
|
493
|
+
title: `${fe.value} complexity - ${g.value.warnings.length} warning(s)`
|
|
468
494
|
}, [
|
|
469
|
-
d("span",
|
|
470
|
-
g.value.warnings.length > 0 ? (
|
|
471
|
-
], 10,
|
|
472
|
-
|
|
495
|
+
d("span", wt, w(fe.value), 1),
|
|
496
|
+
g.value.warnings.length > 0 ? (i(), n("span", bt, w(g.value.warnings.length), 1)) : m("", !0)
|
|
497
|
+
], 10, gt)) : m("", !0),
|
|
498
|
+
a.showHistory ? (i(), n("button", {
|
|
473
499
|
key: 1,
|
|
474
500
|
type: "button",
|
|
475
501
|
class: P(["tql-toolbar-button", { "tql-toolbar-button--active": V.value }]),
|
|
476
502
|
title: "Query history",
|
|
477
|
-
onClick:
|
|
503
|
+
onClick: M(Fe, ["stop"])
|
|
478
504
|
}, [...t[10] || (t[10] = [
|
|
479
505
|
d("i", { class: "pi pi-history" }, null, -1)
|
|
480
506
|
])], 2)) : m("", !0),
|
|
481
|
-
|
|
507
|
+
a.showPreview ? (i(), n("button", {
|
|
482
508
|
key: 2,
|
|
483
509
|
type: "button",
|
|
484
|
-
class: P(["tql-toolbar-button", { "tql-toolbar-button--active":
|
|
510
|
+
class: P(["tql-toolbar-button", { "tql-toolbar-button--active": T.value }]),
|
|
485
511
|
title: "Preview query structure",
|
|
486
|
-
onClick:
|
|
512
|
+
onClick: M(Ne, ["stop"])
|
|
487
513
|
}, [...t[11] || (t[11] = [
|
|
488
514
|
d("i", { class: "pi pi-sitemap" }, null, -1)
|
|
489
515
|
])], 2)) : m("", !0),
|
|
490
|
-
|
|
516
|
+
a.showSnippetButton && a.snippets && a.snippets.length > 0 ? (i(), n("button", {
|
|
491
517
|
key: 3,
|
|
492
518
|
type: "button",
|
|
493
519
|
class: "tql-toolbar-button tql-snippet-button",
|
|
494
520
|
title: "Insert snippet",
|
|
495
|
-
onClick: t[2] || (t[2] =
|
|
521
|
+
onClick: t[2] || (t[2] = M(() => {
|
|
496
522
|
}, ["stop"]))
|
|
497
523
|
}, [...t[12] || (t[12] = [
|
|
498
524
|
d("i", { class: "pi pi-code" }, null, -1)
|
|
499
525
|
])])) : m("", !0),
|
|
500
|
-
|
|
501
|
-
c(
|
|
526
|
+
a.showValidation && s.value ? (i(), n("div", qt, [
|
|
527
|
+
c(G) ? (i(), n("i", kt)) : (i(), n("i", {
|
|
502
528
|
key: 1,
|
|
503
529
|
class: "pi pi-exclamation-circle tql-icon-invalid tql-icon-clickable",
|
|
504
530
|
role: "button",
|
|
@@ -508,76 +534,76 @@ const ct = {
|
|
|
508
534
|
"aria-expanded": y.value,
|
|
509
535
|
onClick: t[3] || (t[3] = (l) => y.value = !y.value),
|
|
510
536
|
onKeydown: [
|
|
511
|
-
t[4] || (t[4] =
|
|
512
|
-
t[5] || (t[5] =
|
|
537
|
+
t[4] || (t[4] = Ve((l) => y.value = !y.value, ["enter"])),
|
|
538
|
+
t[5] || (t[5] = Ve(M((l) => y.value = !y.value, ["prevent"]), ["space"]))
|
|
513
539
|
]
|
|
514
|
-
}, null, 40,
|
|
540
|
+
}, null, 40, xt))
|
|
515
541
|
])) : m("", !0)
|
|
516
542
|
]),
|
|
517
|
-
|
|
543
|
+
a.showHistory && V.value ? (i(), n("div", {
|
|
518
544
|
key: 3,
|
|
519
545
|
class: "tql-history-dropdown",
|
|
520
|
-
onClick: t[8] || (t[8] =
|
|
546
|
+
onClick: t[8] || (t[8] = M(() => {
|
|
521
547
|
}, ["stop"]))
|
|
522
548
|
}, [
|
|
523
|
-
d("div",
|
|
524
|
-
|
|
525
|
-
"onUpdate:modelValue": t[6] || (t[6] = (l) =>
|
|
549
|
+
d("div", St, [
|
|
550
|
+
ue(d("input", {
|
|
551
|
+
"onUpdate:modelValue": t[6] || (t[6] = (l) => $.value = l),
|
|
526
552
|
type: "text",
|
|
527
553
|
class: "tql-history-search",
|
|
528
554
|
placeholder: "Search history...",
|
|
529
|
-
onKeydown: t[7] || (t[7] =
|
|
555
|
+
onKeydown: t[7] || (t[7] = M(() => {
|
|
530
556
|
}, ["stop"]))
|
|
531
557
|
}, null, 544), [
|
|
532
|
-
[
|
|
558
|
+
[re, $.value]
|
|
533
559
|
])
|
|
534
560
|
]),
|
|
535
|
-
d("div",
|
|
536
|
-
(
|
|
561
|
+
d("div", Ct, [
|
|
562
|
+
(i(!0), n(L, null, N(pe.value, (l) => (i(), n("div", {
|
|
537
563
|
key: l.id,
|
|
538
564
|
class: P(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
|
|
539
|
-
onClick: (u) =>
|
|
565
|
+
onClick: (u) => Ke(l)
|
|
540
566
|
}, [
|
|
541
567
|
d("button", {
|
|
542
568
|
type: "button",
|
|
543
569
|
class: "tql-history-favorite",
|
|
544
570
|
title: l.isFavorite ? "Remove from favorites" : "Add to favorites",
|
|
545
|
-
onClick: (u) =>
|
|
571
|
+
onClick: (u) => Oe(l, u)
|
|
546
572
|
}, [
|
|
547
573
|
d("i", {
|
|
548
574
|
class: P(l.isFavorite ? "pi pi-star-fill" : "pi pi-star")
|
|
549
575
|
}, null, 2)
|
|
550
|
-
], 8,
|
|
551
|
-
d("div",
|
|
552
|
-
l.label ? (
|
|
553
|
-
d("div",
|
|
576
|
+
], 8, Vt),
|
|
577
|
+
d("div", Tt, [
|
|
578
|
+
l.label ? (i(), n("div", Rt, w(l.label), 1)) : m("", !0),
|
|
579
|
+
d("div", Dt, w(l.query), 1)
|
|
554
580
|
]),
|
|
555
|
-
d("div",
|
|
556
|
-
], 10,
|
|
557
|
-
|
|
581
|
+
d("div", It, w(it(l.timestamp)), 1)
|
|
582
|
+
], 10, Pt))), 128)),
|
|
583
|
+
pe.value.length === 0 ? (i(), n("div", $t, w($.value ? "No matching queries" : "No query history"), 1)) : m("", !0)
|
|
558
584
|
])
|
|
559
585
|
])) : m("", !0),
|
|
560
|
-
|
|
561
|
-
id:
|
|
586
|
+
Te(ct, {
|
|
587
|
+
id: ie,
|
|
562
588
|
ref_key: "autocompleteRef",
|
|
563
|
-
ref:
|
|
589
|
+
ref: Q,
|
|
564
590
|
items: c(O),
|
|
565
|
-
visible: c(x) && k.value &&
|
|
566
|
-
position:
|
|
567
|
-
onSelect:
|
|
568
|
-
onClose: c(
|
|
591
|
+
visible: c(x) && k.value && je.value,
|
|
592
|
+
position: X.value,
|
|
593
|
+
onSelect: _e,
|
|
594
|
+
onClose: c(J)
|
|
569
595
|
}, null, 8, ["items", "visible", "position", "onClose"]),
|
|
570
|
-
(
|
|
571
|
-
|
|
596
|
+
(i(), ut(rt, { to: "body" }, [
|
|
597
|
+
a.showValidation && !c(G) && Ue.value && s.value && c(R).length > 0 && !(c(x) && c(O).length > 0) && We.value ? (i(), n("div", {
|
|
572
598
|
key: 0,
|
|
573
599
|
ref_key: "validationMessagesRef",
|
|
574
600
|
ref: B,
|
|
575
|
-
id:
|
|
601
|
+
id: ae,
|
|
576
602
|
class: "tql-validation-messages-portal",
|
|
577
603
|
role: "alert",
|
|
578
604
|
"aria-live": "polite"
|
|
579
605
|
}, [
|
|
580
|
-
(
|
|
606
|
+
(i(!0), n(L, null, N(c(R).slice(0, 3), (l, u) => (i(), n("div", {
|
|
581
607
|
key: u,
|
|
582
608
|
class: "tql-error-message"
|
|
583
609
|
}, [
|
|
@@ -586,12 +612,12 @@ const ct = {
|
|
|
586
612
|
"aria-hidden": "true"
|
|
587
613
|
}, null, -1)),
|
|
588
614
|
d("span", null, w(l.message), 1),
|
|
589
|
-
l.suggestion ? (
|
|
615
|
+
l.suggestion ? (i(), n("span", Ht, w(l.suggestion), 1)) : m("", !0)
|
|
590
616
|
]))), 128))
|
|
591
617
|
], 512)) : m("", !0)
|
|
592
618
|
])),
|
|
593
|
-
|
|
594
|
-
(
|
|
619
|
+
a.showComplexity && g.value && g.value.warnings.length > 0 && !c(x) ? (i(), n("div", Et, [
|
|
620
|
+
(i(!0), n(L, null, N(g.value.warnings.slice(0, 3), (l, u) => (i(), n("div", {
|
|
595
621
|
key: u,
|
|
596
622
|
class: P(["tql-complexity-warning", `tql-complexity-warning--${l.severity}`])
|
|
597
623
|
}, [
|
|
@@ -601,8 +627,8 @@ const ct = {
|
|
|
601
627
|
}, null, -1)),
|
|
602
628
|
d("span", null, w(l.message), 1)
|
|
603
629
|
], 2))), 128)),
|
|
604
|
-
g.value.suggestions.length > 0 ? (
|
|
605
|
-
(
|
|
630
|
+
g.value.suggestions.length > 0 ? (i(), n("div", Bt, [
|
|
631
|
+
(i(!0), n(L, null, N(g.value.suggestions.slice(0, 2), (l, u) => (i(), n("div", {
|
|
606
632
|
key: u,
|
|
607
633
|
class: "tql-complexity-suggestion"
|
|
608
634
|
}, [
|
|
@@ -614,19 +640,19 @@ const ct = {
|
|
|
614
640
|
]))), 128))
|
|
615
641
|
])) : m("", !0)
|
|
616
642
|
])) : m("", !0),
|
|
617
|
-
|
|
618
|
-
d("div",
|
|
643
|
+
a.showPreview && T.value && s.value.trim() ? (i(), n("div", Lt, [
|
|
644
|
+
d("div", Mt, [
|
|
619
645
|
t[17] || (t[17] = d("span", null, "Query Structure", -1)),
|
|
620
646
|
d("button", {
|
|
621
647
|
type: "button",
|
|
622
648
|
class: "tql-preview-close",
|
|
623
649
|
title: "Close preview",
|
|
624
|
-
onClick: t[9] || (t[9] = (l) =>
|
|
650
|
+
onClick: t[9] || (t[9] = (l) => T.value = !1)
|
|
625
651
|
}, [...t[16] || (t[16] = [
|
|
626
652
|
d("i", { class: "pi pi-times" }, null, -1)
|
|
627
653
|
])])
|
|
628
654
|
]),
|
|
629
|
-
|
|
655
|
+
Te(dt, {
|
|
630
656
|
query: s.value,
|
|
631
657
|
"show-complexity": !1,
|
|
632
658
|
"show-field-usage": !0,
|
|
@@ -634,14 +660,14 @@ const ct = {
|
|
|
634
660
|
compact: ""
|
|
635
661
|
}, null, 8, ["query"])
|
|
636
662
|
])) : m("", !0),
|
|
637
|
-
d("div",
|
|
638
|
-
|
|
639
|
-
c(
|
|
663
|
+
d("div", Qt, [
|
|
664
|
+
a.showValidation && s.value ? (i(), n(L, { key: 0 }, [
|
|
665
|
+
c(G) ? (i(), n("span", At, "Query syntax is valid")) : (i(), n("span", zt, "Query has " + w(c(R).length) + " validation error" + w(c(R).length === 1 ? "" : "s"), 1))
|
|
640
666
|
], 64)) : m("", !0)
|
|
641
667
|
])
|
|
642
668
|
], 2));
|
|
643
669
|
}
|
|
644
670
|
});
|
|
645
671
|
export {
|
|
646
|
-
|
|
672
|
+
Gt as default
|
|
647
673
|
};
|