@tellaro/tql 0.1.8 → 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,560 +71,570 @@ const ct = {
|
|
|
71
71
|
historyStorageKey: {}
|
|
72
72
|
},
|
|
73
73
|
emits: ["update:modelValue", "validation", "parse", "submit"],
|
|
74
|
-
setup(
|
|
75
|
-
const f =
|
|
76
|
-
let j = null,
|
|
77
|
-
const
|
|
78
|
-
tokens:
|
|
79
|
-
cursorPosition:
|
|
80
|
-
completionItems:
|
|
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
|
+
let j = null, W = 0;
|
|
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
81
|
showAutocomplete: C,
|
|
82
|
-
isValid:
|
|
83
|
-
errors:
|
|
84
|
-
hasErrors:
|
|
85
|
-
validate:
|
|
86
|
-
handleInput:
|
|
87
|
-
handleCursorChange:
|
|
88
|
-
insertCompletion:
|
|
89
|
-
insertSnippet:
|
|
90
|
-
triggerAutocomplete:
|
|
91
|
-
hideAutocomplete:
|
|
92
|
-
getTokenAtCursor:
|
|
93
|
-
} =
|
|
94
|
-
modelValue:
|
|
95
|
-
fieldSchema:
|
|
82
|
+
isValid: ie,
|
|
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
|
+
hideAutocomplete: G,
|
|
92
|
+
getTokenAtCursor: Be
|
|
93
|
+
} = ut({
|
|
94
|
+
modelValue: Ve,
|
|
95
|
+
fieldSchema: De,
|
|
96
96
|
fieldValues: Re,
|
|
97
97
|
snippets: $e,
|
|
98
98
|
validateOnInput: f.validateOnInput,
|
|
99
99
|
debounceMs: f.debounceMs,
|
|
100
100
|
autocomplete: f.autocomplete,
|
|
101
|
-
onValidation: (e) =>
|
|
102
|
-
onParse: (e) =>
|
|
103
|
-
}), $ = f.showHistory ?
|
|
101
|
+
onValidation: (e) => q("validation", e),
|
|
102
|
+
onParse: (e) => q("parse", e)
|
|
103
|
+
}), $ = f.showHistory ? rt({
|
|
104
104
|
storageKey: f.historyStorageKey || "tql-history",
|
|
105
105
|
...f.historyOptions
|
|
106
|
-
}) : null, g =
|
|
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
|
-
u.value = e.query,
|
|
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
|
|
117
|
+
function Ae(e, t) {
|
|
118
118
|
t.stopPropagation(), $ == null || $.toggleFavorite(e.id);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function fe() {
|
|
121
121
|
$ && u.value.trim() && $.addQuery(u.value);
|
|
122
122
|
}
|
|
123
|
-
function Ae() {
|
|
124
|
-
V.value = !V.value, V.value && (R.value = !1);
|
|
125
|
-
}
|
|
126
123
|
function Le() {
|
|
127
|
-
|
|
124
|
+
D.value = !D.value, D.value && (R.value = !1);
|
|
128
125
|
}
|
|
129
|
-
|
|
126
|
+
function ze() {
|
|
127
|
+
R.value = !R.value, R.value && (D.value = !1);
|
|
128
|
+
}
|
|
129
|
+
ee(
|
|
130
130
|
() => f.modelValue,
|
|
131
131
|
(e) => {
|
|
132
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
|
-
function
|
|
146
|
-
if (!
|
|
145
|
+
function X() {
|
|
146
|
+
if (!k.value)
|
|
147
147
|
return;
|
|
148
|
-
const e =
|
|
149
|
-
|
|
148
|
+
const e = k.value.getBoundingClientRect();
|
|
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
|
-
u.value = t.value,
|
|
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
|
-
function
|
|
169
|
-
if (
|
|
170
|
-
const e =
|
|
171
|
-
e !==
|
|
168
|
+
function Y() {
|
|
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
|
-
if (
|
|
178
|
-
e.preventDefault()
|
|
177
|
+
if (Date.now() - W < 200) {
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (K.value.length > 0 && B.value >= 0) {
|
|
182
|
+
e.preventDefault(), Ue();
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (ye()) {
|
|
186
|
+
e.preventDefault(), Ge();
|
|
179
187
|
return;
|
|
180
188
|
}
|
|
181
|
-
if (
|
|
189
|
+
if (je()) {
|
|
182
190
|
e.preventDefault(), We();
|
|
183
191
|
return;
|
|
184
192
|
}
|
|
185
|
-
if (
|
|
186
|
-
e.preventDefault(),
|
|
193
|
+
if (C.value && F.value.length > 0) {
|
|
194
|
+
e.preventDefault(), (t = L.value) == null || t.selectCurrent();
|
|
187
195
|
return;
|
|
188
196
|
}
|
|
197
|
+
return;
|
|
189
198
|
}
|
|
190
|
-
if (C.value &&
|
|
199
|
+
if (C.value && F.value.length > 0)
|
|
191
200
|
switch (e.key) {
|
|
192
201
|
case "ArrowDown":
|
|
193
|
-
e.preventDefault(), (
|
|
202
|
+
e.preventDefault(), (l = L.value) == null || l.moveDown();
|
|
194
203
|
return;
|
|
195
204
|
case "ArrowUp":
|
|
196
|
-
e.preventDefault(), (
|
|
197
|
-
return;
|
|
198
|
-
case "Tab":
|
|
199
|
-
if (e.preventDefault(), Date.now() - se < 100)
|
|
200
|
-
return;
|
|
201
|
-
x(((a = s.value) == null ? void 0 : a.selectionStart) || 0), O.value.length > 0 && ((r = A.value) == null || r.selectCurrent());
|
|
205
|
+
e.preventDefault(), (o = L.value) == null || o.moveUp();
|
|
202
206
|
return;
|
|
203
207
|
case "Enter":
|
|
204
208
|
if (!f.multiline)
|
|
205
209
|
break;
|
|
206
|
-
e.preventDefault(), (v =
|
|
210
|
+
e.preventDefault(), (v = L.value) == null || v.selectCurrent();
|
|
207
211
|
return;
|
|
208
212
|
case "Escape":
|
|
209
|
-
e.preventDefault(),
|
|
213
|
+
e.preventDefault(), G(), ne();
|
|
210
214
|
return;
|
|
211
215
|
}
|
|
212
216
|
if (e.key === " " && e.ctrlKey) {
|
|
213
|
-
e.preventDefault(),
|
|
217
|
+
e.preventDefault(), ae();
|
|
214
218
|
return;
|
|
215
219
|
}
|
|
216
|
-
e.key === "Enter" && (f.multiline && e.ctrlKey || !f.multiline && !C.value) && (e.preventDefault(),
|
|
220
|
+
e.key === "Enter" && (f.multiline && e.ctrlKey || !f.multiline && !C.value) && (e.preventDefault(), fe(), q("submit", u.value));
|
|
217
221
|
}
|
|
218
|
-
function
|
|
219
|
-
if (
|
|
220
|
-
|
|
222
|
+
function Ue() {
|
|
223
|
+
if (B.value++, B.value >= K.value.length) {
|
|
224
|
+
ne();
|
|
221
225
|
return;
|
|
222
226
|
}
|
|
223
|
-
const e =
|
|
224
|
-
|
|
227
|
+
const e = K.value[B.value];
|
|
228
|
+
i.value && (i.value.setSelectionRange(e.start, e.end), i.value.focus(), S(e.start));
|
|
225
229
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
230
|
+
function ne() {
|
|
231
|
+
K.value = [], B.value = -1;
|
|
228
232
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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));
|
|
235
240
|
}
|
|
236
241
|
return l;
|
|
237
242
|
}
|
|
238
|
-
function
|
|
239
|
-
|
|
243
|
+
function je() {
|
|
244
|
+
var o;
|
|
245
|
+
const e = ((o = i.value) == null ? void 0 : o.selectionStart) ?? O.value, t = u.value;
|
|
240
246
|
if (e === 0) return !1;
|
|
241
247
|
const l = t[e - 1];
|
|
242
|
-
return l !== '"' && l !== "'" ? !1 : !
|
|
248
|
+
return l !== '"' && l !== "'" ? !1 : !ye();
|
|
243
249
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
250
|
+
function We() {
|
|
251
|
+
var p;
|
|
252
|
+
W = Date.now();
|
|
253
|
+
const e = ((p = i.value) == null ? void 0 : p.selectionStart) ?? O.value, t = u.value, l = t[e];
|
|
246
254
|
if (l === " " || l === `
|
|
247
255
|
` || l === " ") {
|
|
248
|
-
const
|
|
249
|
-
|
|
256
|
+
const w = e + 1;
|
|
257
|
+
i.value && (i.value.setSelectionRange(w, w), S(w));
|
|
250
258
|
return;
|
|
251
259
|
}
|
|
252
|
-
const
|
|
253
|
-
u.value =
|
|
254
|
-
if (
|
|
255
|
-
const
|
|
256
|
-
|
|
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);
|
|
257
265
|
}
|
|
258
266
|
});
|
|
259
267
|
}
|
|
260
|
-
function
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
268
|
+
function Ge() {
|
|
269
|
+
var l;
|
|
270
|
+
W = Date.now();
|
|
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));
|
|
273
283
|
} else {
|
|
274
|
-
const
|
|
275
|
-
u.value =
|
|
276
|
-
if (
|
|
277
|
-
const
|
|
278
|
-
|
|
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);
|
|
279
289
|
}
|
|
280
290
|
});
|
|
281
291
|
}
|
|
282
292
|
return;
|
|
283
293
|
}
|
|
284
294
|
}
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
295
|
+
function ge() {
|
|
296
|
+
x.value = !0, z.value = !1, U.value = Date.now(), P(() => {
|
|
297
|
+
X(), ae();
|
|
288
298
|
});
|
|
289
299
|
}
|
|
290
|
-
function
|
|
300
|
+
function we(e) {
|
|
291
301
|
const l = e.relatedTarget;
|
|
292
302
|
if (l != null && l.closest(".tql-autocomplete-dropdown")) {
|
|
293
303
|
setTimeout(() => {
|
|
294
|
-
|
|
304
|
+
x.value || (G(), y.value = !1);
|
|
295
305
|
}, 300);
|
|
296
306
|
return;
|
|
297
307
|
}
|
|
298
|
-
|
|
299
|
-
|
|
308
|
+
x.value = !1, setTimeout(() => {
|
|
309
|
+
x.value || (G(), y.value = !1);
|
|
300
310
|
}, 200);
|
|
301
311
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
304
|
-
const t =
|
|
305
|
-
u.value = t.query,
|
|
306
|
-
|
|
312
|
+
function Je(e) {
|
|
313
|
+
W = Date.now();
|
|
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());
|
|
307
317
|
});
|
|
308
318
|
}
|
|
309
|
-
function
|
|
310
|
-
const t =
|
|
311
|
-
u.value = t,
|
|
312
|
-
|
|
319
|
+
function Xe(e) {
|
|
320
|
+
const t = Te(e);
|
|
321
|
+
u.value = t, q("update:modelValue", t), P(() => {
|
|
322
|
+
i.value && i.value.focus();
|
|
313
323
|
});
|
|
314
324
|
}
|
|
315
|
-
function
|
|
325
|
+
function Ye() {
|
|
316
326
|
var e;
|
|
317
|
-
(e =
|
|
327
|
+
(e = i.value) == null || e.focus();
|
|
318
328
|
}
|
|
319
|
-
function
|
|
329
|
+
function Ze() {
|
|
320
330
|
var e;
|
|
321
|
-
(e =
|
|
331
|
+
(e = i.value) == null || e.blur();
|
|
322
332
|
}
|
|
323
|
-
function
|
|
333
|
+
function be() {
|
|
324
334
|
var e;
|
|
325
|
-
return ((e =
|
|
335
|
+
return ((e = i.value) == null ? void 0 : e.selectionStart) || 0;
|
|
326
336
|
}
|
|
327
|
-
function
|
|
328
|
-
|
|
337
|
+
function qe(e) {
|
|
338
|
+
i.value && (i.value.setSelectionRange(e, e), S(e));
|
|
329
339
|
}
|
|
330
|
-
function
|
|
331
|
-
const t =
|
|
332
|
-
u.value =
|
|
333
|
-
|
|
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);
|
|
334
344
|
});
|
|
335
345
|
}
|
|
336
|
-
function
|
|
337
|
-
const l = Date.now() - e,
|
|
338
|
-
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";
|
|
339
349
|
}
|
|
340
|
-
function
|
|
350
|
+
function ke(e) {
|
|
341
351
|
var l;
|
|
342
352
|
const t = e.target;
|
|
343
|
-
(l =
|
|
353
|
+
(l = k.value) != null && l.contains(t) || (D.value = !1, R.value = !1);
|
|
344
354
|
}
|
|
345
|
-
|
|
346
|
-
focus:
|
|
347
|
-
blur:
|
|
348
|
-
validate:
|
|
349
|
-
insertText:
|
|
350
|
-
insertSnippet:
|
|
351
|
-
getTokenAtPosition:
|
|
352
|
-
getCursorPosition:
|
|
353
|
-
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
|
|
354
364
|
});
|
|
355
|
-
function
|
|
356
|
-
(C.value ||
|
|
365
|
+
function Z() {
|
|
366
|
+
(C.value || E.value) && x.value && X();
|
|
357
367
|
}
|
|
358
|
-
return
|
|
359
|
-
document.addEventListener("selectionchange",
|
|
360
|
-
|
|
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);
|
|
361
371
|
}, 500), P(() => {
|
|
362
|
-
|
|
372
|
+
X();
|
|
363
373
|
});
|
|
364
|
-
}),
|
|
365
|
-
() =>
|
|
374
|
+
}), ee(
|
|
375
|
+
() => E.value,
|
|
366
376
|
(e) => {
|
|
367
377
|
e && P(() => {
|
|
368
|
-
|
|
378
|
+
X();
|
|
369
379
|
});
|
|
370
380
|
},
|
|
371
381
|
{ immediate: !0 }
|
|
372
|
-
),
|
|
373
|
-
|
|
382
|
+
), ee(
|
|
383
|
+
M,
|
|
374
384
|
(e) => {
|
|
375
|
-
if (e &&
|
|
376
|
-
const t =
|
|
385
|
+
if (e && k.value) {
|
|
386
|
+
const t = k.value.getBoundingClientRect();
|
|
377
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`);
|
|
378
388
|
}
|
|
379
389
|
}
|
|
380
|
-
),
|
|
381
|
-
document.removeEventListener("selectionchange",
|
|
382
|
-
}), (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", {
|
|
383
393
|
ref_key: "wrapperRef",
|
|
384
|
-
ref:
|
|
385
|
-
class:
|
|
394
|
+
ref: k,
|
|
395
|
+
class: V([
|
|
386
396
|
"tql-input-wrapper",
|
|
387
397
|
{
|
|
388
|
-
"tql-input-focused":
|
|
389
|
-
"tql-input-invalid":
|
|
390
|
-
"tql-input-disabled":
|
|
391
|
-
"tql-input-multiline":
|
|
392
|
-
"tql-input-autocomplete-active":
|
|
393
|
-
"tql-input-resizable":
|
|
394
|
-
"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
|
|
395
405
|
}
|
|
396
406
|
])
|
|
397
407
|
}, [
|
|
398
|
-
|
|
399
|
-
(
|
|
400
|
-
key:
|
|
401
|
-
class:
|
|
402
|
-
},
|
|
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))
|
|
403
413
|
])) : m("", !0),
|
|
404
|
-
|
|
414
|
+
n.multiline ? se((a(), s("textarea", {
|
|
405
415
|
key: 1,
|
|
406
|
-
id:
|
|
416
|
+
id: re,
|
|
407
417
|
ref_key: "inputRef",
|
|
408
|
-
ref:
|
|
418
|
+
ref: i,
|
|
409
419
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => u.value = l),
|
|
410
|
-
class:
|
|
411
|
-
placeholder:
|
|
412
|
-
disabled:
|
|
413
|
-
readonly:
|
|
414
|
-
rows:
|
|
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,
|
|
415
425
|
role: "combobox",
|
|
416
|
-
"aria-expanded":
|
|
417
|
-
"aria-controls":
|
|
418
|
-
"aria-invalid":
|
|
419
|
-
"aria-describedby":
|
|
426
|
+
"aria-expanded": r(C) && x.value,
|
|
427
|
+
"aria-controls": le,
|
|
428
|
+
"aria-invalid": r(E) && n.showValidation,
|
|
429
|
+
"aria-describedby": r(E) && y.value ? oe : void 0,
|
|
420
430
|
"aria-autocomplete": "list",
|
|
421
431
|
"aria-haspopup": "listbox",
|
|
422
432
|
spellcheck: "false",
|
|
423
433
|
autocomplete: "off",
|
|
424
434
|
autocapitalize: "off",
|
|
425
|
-
onInput:
|
|
426
|
-
onKeydown:
|
|
427
|
-
onFocus:
|
|
428
|
-
onBlur:
|
|
429
|
-
onClick:
|
|
430
|
-
}, null, 42,
|
|
431
|
-
[
|
|
432
|
-
]) :
|
|
435
|
+
onInput: he,
|
|
436
|
+
onKeydown: me,
|
|
437
|
+
onFocus: ge,
|
|
438
|
+
onBlur: we,
|
|
439
|
+
onClick: Y
|
|
440
|
+
}, null, 42, vt)), [
|
|
441
|
+
[ue, u.value]
|
|
442
|
+
]) : se((a(), s("input", {
|
|
433
443
|
key: 2,
|
|
434
|
-
id:
|
|
444
|
+
id: re,
|
|
435
445
|
ref_key: "inputRef",
|
|
436
|
-
ref:
|
|
446
|
+
ref: i,
|
|
437
447
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => u.value = l),
|
|
438
448
|
type: "text",
|
|
439
|
-
class:
|
|
440
|
-
placeholder:
|
|
441
|
-
disabled:
|
|
442
|
-
readonly:
|
|
449
|
+
class: V(["tql-input", { "tql-input-highlighted": n.syntaxHighlighting }]),
|
|
450
|
+
placeholder: n.placeholder,
|
|
451
|
+
disabled: n.disabled,
|
|
452
|
+
readonly: n.readonly,
|
|
443
453
|
role: "combobox",
|
|
444
|
-
"aria-expanded":
|
|
445
|
-
"aria-controls":
|
|
446
|
-
"aria-invalid":
|
|
447
|
-
"aria-describedby":
|
|
454
|
+
"aria-expanded": r(C) && x.value,
|
|
455
|
+
"aria-controls": le,
|
|
456
|
+
"aria-invalid": r(E) && n.showValidation,
|
|
457
|
+
"aria-describedby": r(E) && y.value ? oe : void 0,
|
|
448
458
|
"aria-autocomplete": "list",
|
|
449
459
|
"aria-haspopup": "listbox",
|
|
450
460
|
spellcheck: "false",
|
|
451
461
|
autocomplete: "off",
|
|
452
462
|
autocapitalize: "off",
|
|
453
|
-
onInput:
|
|
454
|
-
onKeydown:
|
|
455
|
-
onFocus:
|
|
456
|
-
onBlur:
|
|
457
|
-
onClick:
|
|
458
|
-
}, null, 42,
|
|
459
|
-
[
|
|
463
|
+
onInput: he,
|
|
464
|
+
onKeydown: me,
|
|
465
|
+
onFocus: ge,
|
|
466
|
+
onBlur: we,
|
|
467
|
+
onClick: Y
|
|
468
|
+
}, null, 42, ft)), [
|
|
469
|
+
[ue, u.value]
|
|
460
470
|
]),
|
|
461
|
-
|
|
462
|
-
|
|
471
|
+
c("div", pt, [
|
|
472
|
+
n.showComplexity && g.value && u.value.trim() ? (a(), s("div", {
|
|
463
473
|
key: 0,
|
|
464
|
-
class:
|
|
465
|
-
title: `${
|
|
474
|
+
class: V(["tql-complexity-badge", Me.value]),
|
|
475
|
+
title: `${de.value} complexity - ${g.value.warnings.length} warning(s)`
|
|
466
476
|
}, [
|
|
467
|
-
|
|
468
|
-
g.value.warnings.length > 0 ? (
|
|
469
|
-
], 10,
|
|
470
|
-
|
|
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", {
|
|
471
481
|
key: 1,
|
|
472
482
|
type: "button",
|
|
473
|
-
class:
|
|
483
|
+
class: V(["tql-toolbar-button", { "tql-toolbar-button--active": D.value }]),
|
|
474
484
|
title: "Query history",
|
|
475
|
-
onClick:
|
|
485
|
+
onClick: A(Le, ["stop"])
|
|
476
486
|
}, [...t[10] || (t[10] = [
|
|
477
|
-
|
|
487
|
+
c("i", { class: "pi pi-history" }, null, -1)
|
|
478
488
|
])], 2)) : m("", !0),
|
|
479
|
-
|
|
489
|
+
n.showPreview ? (a(), s("button", {
|
|
480
490
|
key: 2,
|
|
481
491
|
type: "button",
|
|
482
|
-
class:
|
|
492
|
+
class: V(["tql-toolbar-button", { "tql-toolbar-button--active": R.value }]),
|
|
483
493
|
title: "Preview query structure",
|
|
484
|
-
onClick:
|
|
494
|
+
onClick: A(ze, ["stop"])
|
|
485
495
|
}, [...t[11] || (t[11] = [
|
|
486
|
-
|
|
496
|
+
c("i", { class: "pi pi-sitemap" }, null, -1)
|
|
487
497
|
])], 2)) : m("", !0),
|
|
488
|
-
|
|
498
|
+
n.showSnippetButton && n.snippets && n.snippets.length > 0 ? (a(), s("button", {
|
|
489
499
|
key: 3,
|
|
490
500
|
type: "button",
|
|
491
501
|
class: "tql-toolbar-button tql-snippet-button",
|
|
492
502
|
title: "Insert snippet",
|
|
493
|
-
onClick: t[2] || (t[2] =
|
|
503
|
+
onClick: t[2] || (t[2] = A(() => {
|
|
494
504
|
}, ["stop"]))
|
|
495
505
|
}, [...t[12] || (t[12] = [
|
|
496
|
-
|
|
506
|
+
c("i", { class: "pi pi-code" }, null, -1)
|
|
497
507
|
])])) : m("", !0),
|
|
498
|
-
|
|
499
|
-
|
|
508
|
+
n.showValidation && u.value ? (a(), s("div", gt, [
|
|
509
|
+
r(ie) ? (a(), s("i", wt)) : (a(), s("i", {
|
|
500
510
|
key: 1,
|
|
501
511
|
class: "pi pi-exclamation-circle tql-icon-invalid tql-icon-clickable",
|
|
502
512
|
role: "button",
|
|
503
513
|
tabindex: "0",
|
|
504
514
|
title: "Click to show/hide errors",
|
|
505
|
-
"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.`,
|
|
506
516
|
"aria-expanded": y.value,
|
|
507
517
|
onClick: t[3] || (t[3] = (l) => y.value = !y.value),
|
|
508
518
|
onKeydown: [
|
|
509
|
-
t[4] || (t[4] =
|
|
510
|
-
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"]))
|
|
511
521
|
]
|
|
512
|
-
}, null, 40,
|
|
522
|
+
}, null, 40, bt))
|
|
513
523
|
])) : m("", !0)
|
|
514
524
|
]),
|
|
515
|
-
|
|
525
|
+
n.showHistory && D.value ? (a(), s("div", {
|
|
516
526
|
key: 3,
|
|
517
527
|
class: "tql-history-dropdown",
|
|
518
|
-
onClick: t[8] || (t[8] =
|
|
528
|
+
onClick: t[8] || (t[8] = A(() => {
|
|
519
529
|
}, ["stop"]))
|
|
520
530
|
}, [
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
"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),
|
|
524
534
|
type: "text",
|
|
525
535
|
class: "tql-history-search",
|
|
526
536
|
placeholder: "Search history...",
|
|
527
|
-
onKeydown: t[7] || (t[7] =
|
|
537
|
+
onKeydown: t[7] || (t[7] = A(() => {
|
|
528
538
|
}, ["stop"]))
|
|
529
539
|
}, null, 544), [
|
|
530
|
-
[
|
|
540
|
+
[ue, T.value]
|
|
531
541
|
])
|
|
532
542
|
]),
|
|
533
|
-
|
|
534
|
-
(
|
|
543
|
+
c("div", kt, [
|
|
544
|
+
(a(!0), s(Q, null, N(ve.value, (l) => (a(), s("div", {
|
|
535
545
|
key: l.id,
|
|
536
|
-
class:
|
|
537
|
-
onClick: (
|
|
546
|
+
class: V(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
|
|
547
|
+
onClick: (o) => Qe(l)
|
|
538
548
|
}, [
|
|
539
|
-
|
|
549
|
+
c("button", {
|
|
540
550
|
type: "button",
|
|
541
551
|
class: "tql-history-favorite",
|
|
542
552
|
title: l.isFavorite ? "Remove from favorites" : "Add to favorites",
|
|
543
|
-
onClick: (
|
|
553
|
+
onClick: (o) => Ae(l, o)
|
|
544
554
|
}, [
|
|
545
|
-
|
|
546
|
-
class:
|
|
555
|
+
c("i", {
|
|
556
|
+
class: V(l.isFavorite ? "pi pi-star-fill" : "pi pi-star")
|
|
547
557
|
}, null, 2)
|
|
548
|
-
], 8,
|
|
549
|
-
|
|
550
|
-
l.label ? (
|
|
551
|
-
|
|
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)
|
|
552
562
|
]),
|
|
553
|
-
|
|
554
|
-
], 10,
|
|
555
|
-
|
|
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)
|
|
556
566
|
])
|
|
557
567
|
])) : m("", !0),
|
|
558
|
-
|
|
559
|
-
id:
|
|
568
|
+
Ce(nt, {
|
|
569
|
+
id: le,
|
|
560
570
|
ref_key: "autocompleteRef",
|
|
561
|
-
ref:
|
|
562
|
-
items:
|
|
563
|
-
visible:
|
|
564
|
-
position:
|
|
565
|
-
onSelect:
|
|
566
|
-
onClose:
|
|
571
|
+
ref: L,
|
|
572
|
+
items: r(F),
|
|
573
|
+
visible: r(C) && x.value && Oe.value,
|
|
574
|
+
position: J.value,
|
|
575
|
+
onSelect: Je,
|
|
576
|
+
onClose: r(G)
|
|
567
577
|
}, null, 8, ["items", "visible", "position", "onClose"]),
|
|
568
|
-
(
|
|
569
|
-
|
|
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", {
|
|
570
580
|
key: 0,
|
|
571
581
|
ref_key: "validationMessagesRef",
|
|
572
|
-
ref:
|
|
573
|
-
id:
|
|
582
|
+
ref: M,
|
|
583
|
+
id: oe,
|
|
574
584
|
class: "tql-validation-messages-portal",
|
|
575
585
|
role: "alert",
|
|
576
586
|
"aria-live": "polite"
|
|
577
587
|
}, [
|
|
578
|
-
(
|
|
579
|
-
key:
|
|
588
|
+
(a(!0), s(Q, null, N(r(I).slice(0, 3), (l, o) => (a(), s("div", {
|
|
589
|
+
key: o,
|
|
580
590
|
class: "tql-error-message"
|
|
581
591
|
}, [
|
|
582
|
-
t[13] || (t[13] =
|
|
592
|
+
t[13] || (t[13] = c("i", {
|
|
583
593
|
class: "pi pi-exclamation-triangle",
|
|
584
594
|
"aria-hidden": "true"
|
|
585
595
|
}, null, -1)),
|
|
586
|
-
|
|
587
|
-
l.suggestion ? (
|
|
596
|
+
c("span", null, b(l.message), 1),
|
|
597
|
+
l.suggestion ? (a(), s("span", $t, b(l.suggestion), 1)) : m("", !0)
|
|
588
598
|
]))), 128))
|
|
589
599
|
], 512)) : m("", !0)
|
|
590
600
|
])),
|
|
591
|
-
|
|
592
|
-
(
|
|
593
|
-
key:
|
|
594
|
-
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}`])
|
|
595
605
|
}, [
|
|
596
|
-
t[14] || (t[14] =
|
|
606
|
+
t[14] || (t[14] = c("i", {
|
|
597
607
|
class: "pi pi-info-circle",
|
|
598
608
|
"aria-hidden": "true"
|
|
599
609
|
}, null, -1)),
|
|
600
|
-
|
|
610
|
+
c("span", null, b(l.message), 1)
|
|
601
611
|
], 2))), 128)),
|
|
602
|
-
g.value.suggestions.length > 0 ? (
|
|
603
|
-
(
|
|
604
|
-
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,
|
|
605
615
|
class: "tql-complexity-suggestion"
|
|
606
616
|
}, [
|
|
607
|
-
t[15] || (t[15] =
|
|
617
|
+
t[15] || (t[15] = c("i", {
|
|
608
618
|
class: "pi pi-lightbulb",
|
|
609
619
|
"aria-hidden": "true"
|
|
610
620
|
}, null, -1)),
|
|
611
|
-
|
|
621
|
+
c("span", null, b(l), 1)
|
|
612
622
|
]))), 128))
|
|
613
623
|
])) : m("", !0)
|
|
614
624
|
])) : m("", !0),
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
t[17] || (t[17] =
|
|
618
|
-
|
|
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", {
|
|
619
629
|
type: "button",
|
|
620
630
|
class: "tql-preview-close",
|
|
621
631
|
title: "Close preview",
|
|
622
632
|
onClick: t[9] || (t[9] = (l) => R.value = !1)
|
|
623
633
|
}, [...t[16] || (t[16] = [
|
|
624
|
-
|
|
634
|
+
c("i", { class: "pi pi-times" }, null, -1)
|
|
625
635
|
])])
|
|
626
636
|
]),
|
|
627
|
-
|
|
637
|
+
Ce(st, {
|
|
628
638
|
query: u.value,
|
|
629
639
|
"show-complexity": !1,
|
|
630
640
|
"show-field-usage": !0,
|
|
@@ -632,14 +642,14 @@ const ct = {
|
|
|
632
642
|
compact: ""
|
|
633
643
|
}, null, 8, ["query"])
|
|
634
644
|
])) : m("", !0),
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
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))
|
|
638
648
|
], 64)) : m("", !0)
|
|
639
649
|
])
|
|
640
650
|
], 2));
|
|
641
651
|
}
|
|
642
652
|
});
|
|
643
653
|
export {
|
|
644
|
-
|
|
654
|
+
Ut as default
|
|
645
655
|
};
|