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