@tellaro/tql 2.0.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 +70 -65
- package/dist/src/index.d.ts +2 -2
- package/dist/src/types.d.ts +53 -7
- package/dist/src/validator.d.ts +135 -1
- package/dist/src/validator.js +192 -113
- 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 +11 -4
- 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
package/dist/src/validator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseTql as w } from "./parser.js";
|
|
2
|
-
const
|
|
2
|
+
const u = 1e3, r = [
|
|
3
3
|
"text",
|
|
4
4
|
"keyword",
|
|
5
5
|
"long",
|
|
@@ -17,7 +17,7 @@ const c = 1e3, i = [
|
|
|
17
17
|
"nested",
|
|
18
18
|
"object",
|
|
19
19
|
"geo_point"
|
|
20
|
-
],
|
|
20
|
+
], h = [
|
|
21
21
|
"long",
|
|
22
22
|
"integer",
|
|
23
23
|
"short",
|
|
@@ -27,17 +27,17 @@ const c = 1e3, i = [
|
|
|
27
27
|
"half_float",
|
|
28
28
|
"scaled_float",
|
|
29
29
|
"unsigned_long"
|
|
30
|
-
],
|
|
30
|
+
], l = [...h, "date", "keyword"], c = [...h, "date"], y = {
|
|
31
31
|
// Equality (all types) — and now that is what it says.
|
|
32
32
|
//
|
|
33
33
|
// The transcribed twelve-element list this replaces claimed "all types" while omitting
|
|
34
34
|
// five: `short`, `byte`, `half_float`, `scaled_float` and `unsigned_long` are all in the
|
|
35
35
|
// `TqlFieldType` union and were all absent, so `port eq 443` on a `short` field warned
|
|
36
36
|
// that equality "may not work well" with it.
|
|
37
|
-
eq:
|
|
38
|
-
ne:
|
|
39
|
-
"=":
|
|
40
|
-
"!=":
|
|
37
|
+
eq: r,
|
|
38
|
+
ne: r,
|
|
39
|
+
"=": r,
|
|
40
|
+
"!=": r,
|
|
41
41
|
eq_ci: ["text", "keyword"],
|
|
42
42
|
// Ordered comparison — numeric, date, AND keyword.
|
|
43
43
|
//
|
|
@@ -54,22 +54,26 @@ const c = 1e3, i = [
|
|
|
54
54
|
//
|
|
55
55
|
// Every numeric width is listed via ALL_NUMERIC_FIELD_TYPES so the five narrow ones cannot
|
|
56
56
|
// fall out again the way they did from `eq`.
|
|
57
|
-
gt:
|
|
58
|
-
gte:
|
|
59
|
-
lt:
|
|
60
|
-
lte:
|
|
61
|
-
">":
|
|
62
|
-
">=":
|
|
63
|
-
"<":
|
|
64
|
-
"<=":
|
|
57
|
+
gt: l,
|
|
58
|
+
gte: l,
|
|
59
|
+
lt: l,
|
|
60
|
+
lte: l,
|
|
61
|
+
">": l,
|
|
62
|
+
">=": l,
|
|
63
|
+
"<": l,
|
|
64
|
+
"<=": l,
|
|
65
65
|
// String operations
|
|
66
66
|
//
|
|
67
|
-
// ## The `_cs` operators list `text`, and that is deliberate —
|
|
67
|
+
// ## The `_cs` operators list `text`, and that is deliberate — the rule lives in the caller
|
|
68
68
|
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
69
|
+
// The engines REFUSE every `_cs` operator when the field cannot answer it — an ANALYZED
|
|
70
|
+
// field with no case-preserving subfield, and for the whole-value six ALSO any field with
|
|
71
|
+
// no un-analyzed string form at all. The analyzer lowercased every token it indexed, so
|
|
72
|
+
// the case the query asks about is not in the index; before the refusal both engines fell
|
|
73
|
+
// back to the analyzed field and returned zero hits with no error.
|
|
74
|
+
//
|
|
75
|
+
// "An analyzed field" alone is the MEMBERSHIP half, and stating it as the whole rule is
|
|
76
|
+
// how this shipped wrong for six operators once already. See `caseSensitiveSupport`.
|
|
73
77
|
//
|
|
74
78
|
// ALL EIGHT are covered, and the set arrived in two commits rather than one, which is why
|
|
75
79
|
// it is stated as a rule and not as a list of six:
|
|
@@ -88,21 +92,32 @@ const c = 1e3, i = [
|
|
|
88
92
|
// would leave a reader correct about `contains_cs` and wrong about `in_cs`, silently —
|
|
89
93
|
// which is the exact failure the engines' own interim pin existed to prevent.
|
|
90
94
|
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
95
|
+
// ### Why the rule is not in THIS table (tql#206)
|
|
96
|
+
//
|
|
97
|
+
// It keys on the MAPPING, not on the field type. The engines refuse only when there is no
|
|
98
|
+
// case-preserving form — a `text` field WITH a `keyword` subfield translates fine, and
|
|
99
|
+
// that is the commonest shape in ECS. So `type === "text"` does not decide the question,
|
|
100
|
+
// and dropping `text` from the eight `_cs` rows below would be that wrong check by another
|
|
101
|
+
// name. The rows stay exactly as they are.
|
|
102
|
+
//
|
|
103
|
+
// NOTE the table they are in. These rows are in THIS table, `OPERATOR_TYPE_COMPATIBILITY`,
|
|
104
|
+
// which emits a WARNING. `OPERATOR_REQUIRED_FIELD_TYPES` further down emits an ERROR and
|
|
105
|
+
// holds exactly three rows — `cidr`, `not_cidr`, `!cidr`. tql#206 named the wrong one, and
|
|
106
|
+
// the mistake was copied into this file, its spec, `docs/developer/field-routing.md` and
|
|
107
|
+
// the CHANGELOG before review caught it; `tests/completionOperatorTableParity.spec.ts`
|
|
108
|
+
// had the distinction right the whole time. Moving these rows into the ERROR table is the
|
|
109
|
+
// OTHER wrong fix, and is guarded in the spec alongside the first one.
|
|
99
110
|
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
111
|
+
// What CHANGED at tql#206 is that the question turned out to be answerable from the schema
|
|
112
|
+
// this package already receives. `TqlValidationOptions.fieldTypes` is a FLAT
|
|
113
|
+
// `Record<name, type>`, and a host that flattens an index mapping puts each multifield in
|
|
114
|
+
// as its own entry — `message` → `text` alongside `message.keyword` → `keyword`. That is a
|
|
115
|
+
// sibling LOOKUP, not a schema change, and it is what `caseSensitiveSupport` below does.
|
|
116
|
+
// The verdict is three-valued (`supported` / `unsupported` / `unknown`) and only the middle
|
|
117
|
+
// one produces a diagnostic, which is why this table can stay permissive and the caller can
|
|
118
|
+
// still be specific. See that function for the predicate and its blind spots.
|
|
104
119
|
//
|
|
105
|
-
// `tests/
|
|
120
|
+
// `tests/caseSensitiveOperatorMapping.spec.ts` derives the engines' refusal set from their
|
|
106
121
|
// own sources and asserts this note names all of it — so a third `_cs` round cannot leave
|
|
107
122
|
// this paragraph quietly under-claiming the way the six-name version did.
|
|
108
123
|
contains: ["text", "keyword"],
|
|
@@ -142,9 +157,9 @@ const c = 1e3, i = [
|
|
|
142
157
|
// `keyword` and `text` stay out, and that is a decision rather than an omission: Python's
|
|
143
158
|
// `keyword_ops` excludes `between` while including `gte`, which is the divergence pinned
|
|
144
159
|
// in `tests/collectionAndNullSemantics.spec.ts`.
|
|
145
|
-
between:
|
|
146
|
-
not_between:
|
|
147
|
-
"!between":
|
|
160
|
+
between: c,
|
|
161
|
+
not_between: c,
|
|
162
|
+
"!between": c,
|
|
148
163
|
// Membership — the same set as `eq`, because `in` IS a disjunction of equalities and both
|
|
149
164
|
// evaluators implement it that way. The transcribed list this replaces omitted the five
|
|
150
165
|
// narrow numeric widths plus `nested`, `object` and `geo_point`.
|
|
@@ -157,9 +172,9 @@ const c = 1e3, i = [
|
|
|
157
172
|
// and `keyword is null`, and this table has always sided with the evaluator on it (`date`
|
|
158
173
|
// and `boolean` were in the transcribed list too). Widening to the remaining types applies
|
|
159
174
|
// the existing stance consistently; it does not take a new position.
|
|
160
|
-
in:
|
|
161
|
-
not_in:
|
|
162
|
-
"!in":
|
|
175
|
+
in: r,
|
|
176
|
+
not_in: r,
|
|
177
|
+
"!in": r,
|
|
163
178
|
in_cs: ["text", "keyword"],
|
|
164
179
|
not_in_cs: ["text", "keyword"],
|
|
165
180
|
"!in_cs": ["text", "keyword"],
|
|
@@ -174,12 +189,12 @@ const c = 1e3, i = [
|
|
|
174
189
|
// Sharing the constant is what keeps the four honest. As four separate transcriptions they
|
|
175
190
|
// had already drifted from the union by five types apiece, and nothing would have caught
|
|
176
191
|
// two of them drifting from each other.
|
|
177
|
-
exists:
|
|
178
|
-
not_exists:
|
|
179
|
-
"!exists":
|
|
180
|
-
is:
|
|
181
|
-
is_not:
|
|
182
|
-
"!is":
|
|
192
|
+
exists: r,
|
|
193
|
+
not_exists: r,
|
|
194
|
+
"!exists": r,
|
|
195
|
+
is: r,
|
|
196
|
+
is_not: r,
|
|
197
|
+
"!is": r,
|
|
183
198
|
// IP-specific operators
|
|
184
199
|
cidr: ["ip"],
|
|
185
200
|
not_cidr: ["ip"],
|
|
@@ -202,20 +217,58 @@ const c = 1e3, i = [
|
|
|
202
217
|
// Restricting these six to `nested | object | keyword | text` therefore described neither
|
|
203
218
|
// engine. `related.ip any ["10.0.0.1"]` is the ordinary case for an IP field, not an
|
|
204
219
|
// abuse of one.
|
|
205
|
-
any:
|
|
206
|
-
all:
|
|
207
|
-
none:
|
|
208
|
-
not_any:
|
|
209
|
-
not_all:
|
|
210
|
-
not_none:
|
|
211
|
-
"!any":
|
|
212
|
-
"!all":
|
|
213
|
-
"!none":
|
|
214
|
-
},
|
|
220
|
+
any: r,
|
|
221
|
+
all: r,
|
|
222
|
+
none: r,
|
|
223
|
+
not_any: r,
|
|
224
|
+
not_all: r,
|
|
225
|
+
not_none: r,
|
|
226
|
+
"!any": r,
|
|
227
|
+
"!all": r,
|
|
228
|
+
"!none": r
|
|
229
|
+
}, g = {
|
|
215
230
|
cidr: ["ip"],
|
|
216
231
|
not_cidr: ["ip"],
|
|
217
232
|
"!cidr": ["ip"]
|
|
218
|
-
},
|
|
233
|
+
}, p = [
|
|
234
|
+
"contains_cs",
|
|
235
|
+
"not_contains_cs",
|
|
236
|
+
"!contains_cs",
|
|
237
|
+
"startswith_cs",
|
|
238
|
+
"not_startswith_cs",
|
|
239
|
+
"!startswith_cs",
|
|
240
|
+
"endswith_cs",
|
|
241
|
+
"not_endswith_cs",
|
|
242
|
+
"!endswith_cs"
|
|
243
|
+
], _ = [
|
|
244
|
+
"in_cs",
|
|
245
|
+
"not_in_cs",
|
|
246
|
+
"!in_cs"
|
|
247
|
+
], b = [
|
|
248
|
+
...p,
|
|
249
|
+
..._
|
|
250
|
+
];
|
|
251
|
+
function m(o, t) {
|
|
252
|
+
if (!t)
|
|
253
|
+
return "unknown";
|
|
254
|
+
const e = t[o];
|
|
255
|
+
if (!e)
|
|
256
|
+
return "unknown";
|
|
257
|
+
if (e === "keyword" || t[`${o}.keyword`] === "keyword")
|
|
258
|
+
return "present";
|
|
259
|
+
const i = `${o}.`;
|
|
260
|
+
for (const [n, s] of Object.entries(t))
|
|
261
|
+
if (!(s !== "keyword" || !n.startsWith(i)) && !n.slice(i.length).includes("."))
|
|
262
|
+
return "present";
|
|
263
|
+
return "absent";
|
|
264
|
+
}
|
|
265
|
+
function v(o, t, e) {
|
|
266
|
+
if (!b.includes(t))
|
|
267
|
+
return "supported";
|
|
268
|
+
const i = m(o, e);
|
|
269
|
+
return i !== "absent" ? i === "present" ? "supported" : "unknown" : _.includes(t) ? e?.[o] === "text" ? "unsupported" : "supported" : "unsupported";
|
|
270
|
+
}
|
|
271
|
+
const E = {
|
|
219
272
|
eq: ["string", "number", "boolean"],
|
|
220
273
|
ne: ["string", "number", "boolean"],
|
|
221
274
|
"=": ["string", "number", "boolean"],
|
|
@@ -284,7 +337,7 @@ const c = 1e3, i = [
|
|
|
284
337
|
"!all": ["string", "number", "boolean"],
|
|
285
338
|
"!none": ["string", "number", "boolean"]
|
|
286
339
|
};
|
|
287
|
-
class
|
|
340
|
+
class k {
|
|
288
341
|
options;
|
|
289
342
|
errors;
|
|
290
343
|
warnings;
|
|
@@ -396,18 +449,18 @@ class b {
|
|
|
396
449
|
const e = t.condition;
|
|
397
450
|
if (e.type !== "comparison")
|
|
398
451
|
return;
|
|
399
|
-
const
|
|
400
|
-
if (!Array.isArray(
|
|
452
|
+
const i = e.value;
|
|
453
|
+
if (!Array.isArray(i) || i.length < 2)
|
|
401
454
|
return;
|
|
402
|
-
const
|
|
455
|
+
const n = t.operator.toLowerCase(), s = t.negated ? `not ${n}` : n, a = t.field.name;
|
|
403
456
|
this.addError(
|
|
404
|
-
`'${
|
|
405
|
-
|
|
406
|
-
|
|
457
|
+
`'${s}' takes a single value and tests it against each element of '${a}'; it does not take a list.`,
|
|
458
|
+
i[0].start,
|
|
459
|
+
i[i.length - 1].end,
|
|
407
460
|
1,
|
|
408
461
|
1,
|
|
409
462
|
"TYPE_MISMATCH",
|
|
410
|
-
`Use \`in\` for membership: \`${
|
|
463
|
+
`Use \`in\` for membership: \`${a} in [...]\` (or \`${a} not in [...]\` to exclude).`
|
|
411
464
|
);
|
|
412
465
|
}
|
|
413
466
|
/**
|
|
@@ -426,7 +479,7 @@ class b {
|
|
|
426
479
|
), this.options.fieldTypes && t.field.type === "field") {
|
|
427
480
|
const n = this.options.fieldTypes[e];
|
|
428
481
|
if (n) {
|
|
429
|
-
const s =
|
|
482
|
+
const s = g[t.operator];
|
|
430
483
|
s && !s.includes(n) && this.addError(
|
|
431
484
|
`Operator '${t.operator}' requires field type ${s.join(" or ")}, but '${e}' is type '${n}'`,
|
|
432
485
|
t.start,
|
|
@@ -438,11 +491,32 @@ class b {
|
|
|
438
491
|
);
|
|
439
492
|
}
|
|
440
493
|
}
|
|
494
|
+
let i = !1;
|
|
495
|
+
if (t.field.type === "field" && v(e, t.operator, this.options.fieldTypes) === "unsupported") {
|
|
496
|
+
i = !0;
|
|
497
|
+
const n = t.operator.replace(/_cs$/, ""), s = this.options.fieldTypes?.[e], a = s === "text" ? `'${e}' is an analyzed text field with no case-preserving subfield in the supplied schema, so the analyzer lowercased every token it indexed and the case '${t.operator}' asks about is not in the index` : `'${e}' is type '${s}' and has no un-analyzed string form, which is what '${t.operator}' matches against`;
|
|
498
|
+
this.addWarning(
|
|
499
|
+
// "The query engine", singular and unqualified, and kept that way deliberately.
|
|
500
|
+
// It was written this way because "both engines" was FALSE in twelve cells —
|
|
501
|
+
// Rust permitted `_cs` on `geo_point` and `unsigned_long`. tql#210 fixed that in
|
|
502
|
+
// this same PR, so "both" would now be accurate. It stays singular anyway: the
|
|
503
|
+
// user does not choose the engine, the sentence is about what will go wrong
|
|
504
|
+
// rather than about who refuses, and a message that counts engines is a message
|
|
505
|
+
// that goes stale the next time one of them changes.
|
|
506
|
+
`${a}. The query engine refuses this at execution.`,
|
|
507
|
+
t.start,
|
|
508
|
+
t.end,
|
|
509
|
+
1,
|
|
510
|
+
1,
|
|
511
|
+
"UNANSWERABLE_MAPPING",
|
|
512
|
+
s === "text" ? `Use the case-insensitive '${n}', or query a keyword subfield (\`${e}.keyword\`) if the index has one this schema does not list.` : `Use the case-insensitive '${n}', or compare '${e}' with an operator suited to '${s}'.`
|
|
513
|
+
);
|
|
514
|
+
}
|
|
441
515
|
if (this.options.fieldTypes && t.field.type === "field") {
|
|
442
516
|
const n = this.options.fieldTypes[e];
|
|
443
517
|
if (n) {
|
|
444
|
-
const s =
|
|
445
|
-
!
|
|
518
|
+
const s = y[t.operator], a = g[t.operator];
|
|
519
|
+
!i && !a && s && !s.includes(n) && this.addWarning(
|
|
446
520
|
`Operator '${t.operator}' may not work well with field type '${n}'`,
|
|
447
521
|
t.start,
|
|
448
522
|
t.end,
|
|
@@ -454,7 +528,7 @@ class b {
|
|
|
454
528
|
}
|
|
455
529
|
}
|
|
456
530
|
if (!Array.isArray(t.value) && t.value.type === "literal") {
|
|
457
|
-
const n =
|
|
531
|
+
const n = E[t.operator];
|
|
458
532
|
n && !n.includes(t.value.valueType) && this.addWarning(
|
|
459
533
|
`Operator '${t.operator}' expects ${n.join(" or ")} value`,
|
|
460
534
|
t.value.start,
|
|
@@ -466,9 +540,9 @@ class b {
|
|
|
466
540
|
}
|
|
467
541
|
if ((t.operator === "regexp" || t.operator === "regex" || t.operator === "not_regexp" || t.operator === "not_regex" || t.operator === "matches" || t.operator === "not_matches") && !Array.isArray(t.value) && t.value.valueType === "string" && typeof t.value.value == "string") {
|
|
468
542
|
const n = Array.from(t.value.value).length;
|
|
469
|
-
if (n >
|
|
543
|
+
if (n > u)
|
|
470
544
|
this.addError(
|
|
471
|
-
`Regex pattern is ${n} characters, which exceeds the maximum supported length of ${
|
|
545
|
+
`Regex pattern is ${n} characters, which exceeds the maximum supported length of ${u}. The query cannot run as written.`,
|
|
472
546
|
t.value.start,
|
|
473
547
|
t.value.end,
|
|
474
548
|
1,
|
|
@@ -498,10 +572,10 @@ class b {
|
|
|
498
572
|
suggestField(t) {
|
|
499
573
|
if (!this.options.availableFields || this.options.availableFields.length === 0)
|
|
500
574
|
return "check available fields";
|
|
501
|
-
let e = this.options.availableFields[0],
|
|
502
|
-
for (const
|
|
503
|
-
const
|
|
504
|
-
|
|
575
|
+
let e = this.options.availableFields[0], i = this.levenshteinDistance(t, e);
|
|
576
|
+
for (const n of this.options.availableFields) {
|
|
577
|
+
const s = this.levenshteinDistance(t, n);
|
|
578
|
+
s < i && (i = s, e = n);
|
|
505
579
|
}
|
|
506
580
|
return e;
|
|
507
581
|
}
|
|
@@ -509,56 +583,56 @@ class b {
|
|
|
509
583
|
* Calculate Levenshtein distance between two strings
|
|
510
584
|
*/
|
|
511
585
|
levenshteinDistance(t, e) {
|
|
512
|
-
const
|
|
513
|
-
for (let
|
|
514
|
-
n
|
|
515
|
-
for (let
|
|
516
|
-
|
|
517
|
-
for (let
|
|
518
|
-
for (let
|
|
519
|
-
e.charAt(
|
|
520
|
-
n
|
|
521
|
-
n[s
|
|
522
|
-
n
|
|
586
|
+
const i = [];
|
|
587
|
+
for (let n = 0; n <= e.length; n++)
|
|
588
|
+
i[n] = [n];
|
|
589
|
+
for (let n = 0; n <= t.length; n++)
|
|
590
|
+
i[0][n] = n;
|
|
591
|
+
for (let n = 1; n <= e.length; n++)
|
|
592
|
+
for (let s = 1; s <= t.length; s++)
|
|
593
|
+
e.charAt(n - 1) === t.charAt(s - 1) ? i[n][s] = i[n - 1][s - 1] : i[n][s] = Math.min(
|
|
594
|
+
i[n - 1][s - 1] + 1,
|
|
595
|
+
i[n][s - 1] + 1,
|
|
596
|
+
i[n - 1][s] + 1
|
|
523
597
|
);
|
|
524
|
-
return
|
|
598
|
+
return i[e.length][t.length];
|
|
525
599
|
}
|
|
526
|
-
addError(t, e, n, s,
|
|
600
|
+
addError(t, e, i, n, s, a, d) {
|
|
527
601
|
this.errors.push({
|
|
528
602
|
message: t,
|
|
529
603
|
start: e,
|
|
530
|
-
end:
|
|
531
|
-
line:
|
|
532
|
-
column:
|
|
604
|
+
end: i,
|
|
605
|
+
line: n,
|
|
606
|
+
column: s,
|
|
533
607
|
severity: "error",
|
|
534
|
-
code:
|
|
608
|
+
code: a,
|
|
535
609
|
suggestion: d
|
|
536
610
|
});
|
|
537
611
|
}
|
|
538
|
-
addWarning(t, e, n, s,
|
|
612
|
+
addWarning(t, e, i, n, s, a, d) {
|
|
539
613
|
this.warnings.push({
|
|
540
614
|
message: t,
|
|
541
615
|
start: e,
|
|
542
|
-
end:
|
|
543
|
-
line:
|
|
544
|
-
column:
|
|
616
|
+
end: i,
|
|
617
|
+
line: n,
|
|
618
|
+
column: s,
|
|
545
619
|
severity: "warning",
|
|
546
|
-
code:
|
|
620
|
+
code: a,
|
|
547
621
|
suggestion: d
|
|
548
622
|
});
|
|
549
623
|
}
|
|
550
624
|
}
|
|
551
|
-
function
|
|
552
|
-
return new
|
|
625
|
+
function f(o, t) {
|
|
626
|
+
return new k(t).validate(o);
|
|
553
627
|
}
|
|
554
|
-
function
|
|
555
|
-
return
|
|
628
|
+
function $(o) {
|
|
629
|
+
return f(o).valid;
|
|
556
630
|
}
|
|
557
|
-
function
|
|
558
|
-
const e =
|
|
631
|
+
function A(o, t) {
|
|
632
|
+
const e = f(o, t);
|
|
559
633
|
return [...e.errors, ...e.warnings];
|
|
560
634
|
}
|
|
561
|
-
function
|
|
635
|
+
function I(o) {
|
|
562
636
|
const t = [];
|
|
563
637
|
o.valid ? t.push("Query is valid") : t.push("Query has errors:");
|
|
564
638
|
for (const e of o.errors)
|
|
@@ -569,14 +643,19 @@ function E(o) {
|
|
|
569
643
|
`);
|
|
570
644
|
}
|
|
571
645
|
export {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
646
|
+
r as ALL_FIELD_TYPES,
|
|
647
|
+
c as BETWEEN_FIELD_TYPES,
|
|
648
|
+
_ as CASE_SENSITIVE_MEMBERSHIP_OPERATORS,
|
|
649
|
+
b as CASE_SENSITIVE_OPERATORS,
|
|
650
|
+
p as CASE_SENSITIVE_WHOLE_VALUE_OPERATORS,
|
|
651
|
+
u as MAX_REGEX_PATTERN_LENGTH,
|
|
652
|
+
h as NUMERIC_FIELD_TYPES,
|
|
653
|
+
l as ORDERED_FIELD_TYPES,
|
|
654
|
+
k as TqlValidator,
|
|
655
|
+
m as casePreservingForm,
|
|
656
|
+
v as caseSensitiveSupport,
|
|
657
|
+
I as formatValidationResult,
|
|
658
|
+
A as getTqlIssues,
|
|
659
|
+
$ as isValidTqlSyntax,
|
|
660
|
+
f as validateTql
|
|
582
661
|
};
|
package/dist/tql.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tql-autocomplete-dropdown[data-v-e29dd6a7]{position:fixed;top:var(--dropdown-top);left:var(--dropdown-left);z-index:9999;min-width:280px;max-width:450px;max-height:var(--dropdown-max-height);background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);box-shadow:0 4px 16px #00000026;overflow:hidden;display:flex;flex-direction:column}.tql-completion-list[data-v-e29dd6a7]{overflow-y:auto;max-height:calc(var(--dropdown-max-height) - 60px)}.tql-completion-item[data-v-e29dd6a7]{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;cursor:pointer;transition:background-color .15s}.tql-completion-item[data-v-e29dd6a7]:hover,.tql-completion-item.selected[data-v-e29dd6a7]{background:var(--highlight-bg, #f0f0f0)}.tql-completion-icon[data-v-e29dd6a7]{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;font-size:.75rem}.tql-completion-icon.tql-completion-kind-field[data-v-e29dd6a7]{background:var(--blue-100, #e3f2fd);color:var(--blue-600, #1e88e5)}.tql-completion-icon.tql-completion-kind-operator[data-v-e29dd6a7]{background:var(--pink-100, #fce4ec);color:var(--pink-600, #d81b60)}.tql-completion-icon.tql-completion-kind-value[data-v-e29dd6a7]{background:var(--green-100, #e8f5e9);color:var(--green-600, #43a047)}.tql-completion-icon.tql-completion-kind-keyword[data-v-e29dd6a7]{background:var(--purple-100, #f3e5f5);color:var(--purple-600, #8e24aa)}.tql-completion-icon.tql-completion-kind-snippet[data-v-e29dd6a7]{background:var(--orange-100, #fff3e0);color:var(--orange-600, #fb8c00)}.tql-completion-icon.tql-completion-kind-mutator[data-v-e29dd6a7]{background:var(--cyan-100, #e0f7fa);color:var(--cyan-600, #00acc1)}.tql-completion-icon.tql-completion-kind-aggregation[data-v-e29dd6a7]{background:var(--indigo-100, #e8eaf6);color:var(--indigo-600, #3949ab)}.tql-completion-icon.tql-completion-kind-logicalOp[data-v-e29dd6a7]{background:var(--yellow-100, #fffde7);color:var(--yellow-700, #fbc02d)}.tql-completion-icon.tql-completion-kind-typeHint[data-v-e29dd6a7]{background:var(--teal-100, #e0f2f1);color:var(--teal-600, #00897b)}.tql-completion-icon.tql-completion-kind-visualization[data-v-e29dd6a7]{background:var(--red-100, #ffebee);color:var(--red-600, #e53935)}.tql-completion-content[data-v-e29dd6a7]{flex:1;display:flex;flex-direction:column;min-width:0}.tql-completion-label[data-v-e29dd6a7]{font-family:Courier New,monospace;font-size:.875rem;font-weight:500;color:var(--text-color, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-detail[data-v-e29dd6a7]{font-size:.75rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-kind-badge[data-v-e29dd6a7]{font-size:.625rem;padding:.125rem .375rem;background:var(--surface-100, #f5f5f5);border-radius:3px;color:var(--text-color-secondary, #666);text-transform:uppercase;letter-spacing:.025em}.tql-completion-docs[data-v-e29dd6a7]{padding:.5rem .75rem;border-top:1px solid var(--surface-border, #ddd);background:var(--surface-50, #fafafa);font-size:.75rem;color:var(--text-color-secondary, #666);max-height:60px;overflow-y:auto}.tql-preview[data-v-3521fa37]{font-family:ui-monospace,monospace;font-size:13px;line-height:1.5;padding:12px;border:1px solid var(--tql-preview-border, #e0e0e0);border-radius:6px;background:var(--tql-preview-bg, #fafafa)}.tql-preview--compact[data-v-3521fa37]{padding:8px;font-size:12px}.tql-preview--empty[data-v-3521fa37]{color:var(--tql-preview-muted, #888)}.tql-preview__empty[data-v-3521fa37]{text-align:center;padding:20px}.tql-preview__complexity[data-v-3521fa37]{display:flex;align-items:center;gap:12px;margin-bottom:12px}.tql-preview__complexity-badge[data-v-3521fa37]{padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;text-transform:uppercase}.tql-preview--low .tql-preview__complexity-badge[data-v-3521fa37]{background:var(--tql-preview-low-bg, #e8f5e9);color:var(--tql-preview-low-text, #2e7d32)}.tql-preview--medium .tql-preview__complexity-badge[data-v-3521fa37]{background:var(--tql-preview-medium-bg, #fff3e0);color:var(--tql-preview-medium-text, #e65100)}.tql-preview--high .tql-preview__complexity-badge[data-v-3521fa37]{background:var(--tql-preview-high-bg, #ffebee);color:var(--tql-preview-high-text, #c62828)}.tql-preview__field-count[data-v-3521fa37]{color:var(--tql-preview-muted, #666);font-size:12px}.tql-preview__warnings[data-v-3521fa37]{margin-bottom:12px}.tql-preview__warning[data-v-3521fa37]{display:flex;align-items:flex-start;gap:8px;padding:6px 8px;border-radius:4px;margin-bottom:4px}.tql-preview__warning--info[data-v-3521fa37]{background:var(--tql-preview-info-bg, #e3f2fd);color:var(--tql-preview-info-text, #1565c0)}.tql-preview__warning--warning[data-v-3521fa37]{background:var(--tql-preview-warning-bg, #fff3e0);color:var(--tql-preview-warning-text, #e65100)}.tql-preview__warning--error[data-v-3521fa37]{background:var(--tql-preview-error-bg, #ffebee);color:var(--tql-preview-error-text, #c62828)}.tql-preview__warning-icon[data-v-3521fa37]{font-weight:700;width:16px;text-align:center}.tql-preview__warning-text[data-v-3521fa37]{flex:1}.tql-preview__suggestions[data-v-3521fa37]{margin-bottom:12px;padding:8px;background:var(--tql-preview-suggestion-bg, #f5f5f5);border-radius:4px}.tql-preview__suggestions-header[data-v-3521fa37]{font-weight:600;margin-bottom:4px;color:var(--tql-preview-header, #333)}.tql-preview__suggestions-list[data-v-3521fa37]{margin:0;padding-left:20px}.tql-preview__suggestion[data-v-3521fa37]{color:var(--tql-preview-muted, #666);margin:2px 0}.tql-preview__tree[data-v-3521fa37]{margin-bottom:12px}.tql-preview__tree-header[data-v-3521fa37],.tql-preview__fields-header[data-v-3521fa37],.tql-preview__operators-header[data-v-3521fa37]{font-weight:600;margin-bottom:8px;color:var(--tql-preview-header, #333);font-size:12px;text-transform:uppercase;letter-spacing:.5px}.tql-preview__tree-content[data-v-3521fa37]{border:1px solid var(--tql-preview-tree-border, #e0e0e0);border-radius:4px;background:var(--tql-preview-tree-bg, #fff);padding:8px}.tql-preview__node[data-v-3521fa37]{margin:2px 0}.tql-preview__node-content[data-v-3521fa37]{display:flex;align-items:center;gap:4px;padding:2px 4px;border-radius:3px;cursor:pointer}.tql-preview__node-content[data-v-3521fa37]:hover{background:var(--tql-preview-node-hover, #f0f0f0)}.tql-preview__node-toggle[data-v-3521fa37]{width:16px;height:16px;border:none;background:var(--tql-preview-toggle-bg, #e0e0e0);border-radius:3px;cursor:pointer;font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center}.tql-preview__node-toggle[data-v-3521fa37]:hover{background:var(--tql-preview-toggle-hover, #d0d0d0)}.tql-preview__node-toggle--leaf[data-v-3521fa37]{visibility:hidden}.tql-preview__node-type[data-v-3521fa37]{font-weight:600;color:var(--tql-preview-node-type, #666)}.tql-preview__node--and .tql-preview__node-type[data-v-3521fa37]{color:var(--tql-preview-and, #1976d2)}.tql-preview__node--or .tql-preview__node-type[data-v-3521fa37]{color:var(--tql-preview-or, #7b1fa2)}.tql-preview__node--not .tql-preview__node-type[data-v-3521fa37]{color:var(--tql-preview-not, #c62828)}.tql-preview__node--group .tql-preview__node-type[data-v-3521fa37]{color:var(--tql-preview-group, #666)}.tql-preview__node-label[data-v-3521fa37]{flex:1}.tql-preview__fields-list[data-v-3521fa37]{display:flex;flex-direction:column;gap:4px}.tql-preview__field[data-v-3521fa37]{display:flex;align-items:center;gap:6px;padding:4px 8px;background:var(--tql-preview-field-bg, #fff);border:1px solid var(--tql-preview-field-border, #e0e0e0);border-radius:4px;cursor:pointer}.tql-preview__field[data-v-3521fa37]:hover{background:var(--tql-preview-field-hover, #f5f5f5)}.tql-preview__field-name[data-v-3521fa37]{font-weight:600;color:var(--tql-preview-field-name, #1976d2)}.tql-preview__field-mutators[data-v-3521fa37]{color:var(--tql-preview-mutator, #7b1fa2)}.tql-preview__field-operator[data-v-3521fa37]{color:var(--tql-preview-operator, #666)}.tql-preview__field-value[data-v-3521fa37]{color:var(--tql-preview-value, #2e7d32)}.tql-preview__match-type[data-v-3521fa37]{margin-left:auto;padding:1px 4px;border-radius:3px;font-size:10px;font-weight:600;background:var(--tql-preview-match-bg, #f0f0f0)}.tql-preview__match-type--exact[data-v-3521fa37]{background:var(--tql-preview-match-exact-bg, #e8f5e9);color:var(--tql-preview-match-exact, #2e7d32)}.tql-preview__match-type--wildcard[data-v-3521fa37]{background:var(--tql-preview-match-wildcard-bg, #fff3e0);color:var(--tql-preview-match-wildcard, #e65100)}.tql-preview__match-type--regex[data-v-3521fa37]{background:var(--tql-preview-match-regex-bg, #fce4ec);color:var(--tql-preview-match-regex, #c2185b)}.tql-preview__match-type--range[data-v-3521fa37]{background:var(--tql-preview-match-range-bg, #e3f2fd);color:var(--tql-preview-match-range, #1565c0)}.tql-preview__match-type--cidr[data-v-3521fa37]{background:var(--tql-preview-match-cidr-bg, #f3e5f5);color:var(--tql-preview-match-cidr, #7b1fa2)}.tql-preview__operators-list[data-v-3521fa37]{display:flex;flex-wrap:wrap;gap:8px}.tql-preview__operator[data-v-3521fa37]{padding:2px 6px;background:var(--tql-preview-op-bg, #f0f0f0);border-radius:3px;font-size:11px}.tql-input-wrapper[data-v-7ce615f9]{position:relative;display:flex;align-items:flex-start;border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);background:var(--surface-ground, #fff);transition:border-color .2s,box-shadow .2s}.tql-input-wrapper.tql-input-has-min-height[data-v-7ce615f9],.tql-input-wrapper.tql-input-has-min-height .tql-input[data-v-7ce615f9]{min-height:var(--tql-min-height)}.tql-input-wrapper.tql-input-focused[data-v-7ce615f9]{border-color:var(--primary-color, #3b82f6);box-shadow:0 0 0 2px var(--primary-100, rgba(59, 130, 246, .2))}.tql-input-wrapper.tql-input-invalid[data-v-7ce615f9]{border-color:var(--red-500, #ef4444)}.tql-input-wrapper.tql-input-invalid.tql-input-focused[data-v-7ce615f9]{box-shadow:0 0 0 2px var(--red-100, rgba(239, 68, 68, .2))}.tql-input-wrapper.tql-input-disabled[data-v-7ce615f9]{opacity:.6;cursor:not-allowed}.tql-highlight-layer[data-v-7ce615f9]{position:absolute;inset:0;box-sizing:border-box;padding:.5rem 8rem .5rem .75rem;border:none;pointer-events:none;white-space:pre;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;overflow:hidden}.tql-input-multiline .tql-highlight-layer[data-v-7ce615f9]{overflow-y:auto;white-space:pre-wrap;word-wrap:break-word}.tql-input[data-v-7ce615f9]{flex:1;width:100%;box-sizing:border-box;padding:.5rem 8rem .5rem .75rem;border:none;background:transparent;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;color:var(--text-color, #333);outline:none;resize:none}.tql-input.tql-input-highlighted[data-v-7ce615f9]{color:transparent;caret-color:var(--text-color, #333)}.tql-input[data-v-7ce615f9]::placeholder{color:var(--text-color-secondary, #666);opacity:.7}.tql-input[data-v-7ce615f9]:disabled{cursor:not-allowed}.tql-token-field[data-v-7ce615f9]{color:var(--tql-field-color, var(--blue-600, #2563eb))}.tql-token-operator[data-v-7ce615f9]{color:var(--tql-operator-color, var(--pink-600, #db2777));font-weight:500}.tql-token-logicalOp[data-v-7ce615f9]{color:var(--tql-logical-color, var(--purple-600, #9333ea));font-weight:600}.tql-token-collectionOp[data-v-7ce615f9]{color:var(--tql-collection-color, var(--indigo-600, #4f46e5));font-weight:600}.tql-token-string[data-v-7ce615f9]{color:var(--tql-string-color, var(--green-600, #16a34a))}.tql-token-number[data-v-7ce615f9]{color:var(--tql-number-color, var(--orange-600, #ea580c))}.tql-token-boolean[data-v-7ce615f9]{color:var(--tql-boolean-color, var(--cyan-600, #0891b2))}.tql-token-null[data-v-7ce615f9]{color:var(--tql-null-color, var(--gray-500, #6b7280));font-style:italic}.tql-token-mutator[data-v-7ce615f9]{color:var(--tql-mutator-color, var(--teal-600, #0d9488));font-style:italic}.tql-token-aggregation[data-v-7ce615f9]{color:var(--tql-aggregation-color, var(--indigo-600, #4f46e5))}.tql-token-keyword[data-v-7ce615f9]{color:var(--tql-keyword-color, var(--purple-500, #a855f7))}.tql-token-typeHint[data-v-7ce615f9]{color:var(--tql-typehint-color, var(--teal-500, #14b8a6))}.tql-token-visualization[data-v-7ce615f9]{color:var(--tql-viz-color, var(--red-500, #ef4444))}.tql-token-arrow[data-v-7ce615f9]{color:var(--tql-arrow-color, var(--gray-600, #4b5563));font-weight:600}.tql-token-doubleColon[data-v-7ce615f9]{color:var(--tql-colon-color, var(--gray-500, #6b7280))}.tql-token-paren[data-v-7ce615f9],.tql-token-bracket[data-v-7ce615f9]{color:var(--tql-bracket-color, var(--gray-600, #4b5563))}.tql-token-error[data-v-7ce615f9]{color:var(--tql-error-color, var(--red-600, #dc2626));text-decoration:wavy underline;text-decoration-color:var(--red-400, #f87171)}.tql-token-error-range[data-v-7ce615f9]{background-color:var(--red-50, #fef2f2)}.tql-token-unknown[data-v-7ce615f9]{color:var(--text-color-secondary, #666)}.tql-validation-icon[data-v-7ce615f9]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.tql-input-multiline .tql-validation-icon[data-v-7ce615f9]{top:.75rem;transform:none}.tql-icon-valid[data-v-7ce615f9]{color:var(--green-500, #22c55e)}.tql-icon-invalid[data-v-7ce615f9]{color:var(--red-500, #ef4444)}.tql-icon-clickable[data-v-7ce615f9]{cursor:pointer;transition:transform .2s}.tql-icon-clickable[data-v-7ce615f9]:hover{transform:scale(1.2)}.tql-icon-clickable[data-v-7ce615f9]:focus{outline:2px solid var(--primary-color, #3b82f6);outline-offset:2px;border-radius:50%}.tql-snippet-button[data-v-7ce615f9]{position:absolute;right:2rem;top:50%;transform:translateY(-50%);padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 6px);transition:color .2s,background-color .2s}.tql-snippet-button[data-v-7ce615f9]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-input-multiline .tql-snippet-button[data-v-7ce615f9]{top:.75rem;transform:none}.tql-input-resizable-textarea[data-v-7ce615f9]{resize:vertical;min-height:80px}.tql-input-wrapper.tql-input-resizable[data-v-7ce615f9]{height:auto}.tql-input-wrapper.tql-input-resizable .tql-highlight-layer[data-v-7ce615f9]{height:100%}.tql-validation-messages[data-v-7ce615f9]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--red-200, #fecaca);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:10;box-shadow:0 2px 8px #0000001a}.tql-input-autocomplete-active .tql-validation-messages[data-v-7ce615f9],.tql-input-autocomplete-active .tql-complexity-warnings[data-v-7ce615f9],.tql-input-autocomplete-active .tql-history-dropdown[data-v-7ce615f9],.tql-input-autocomplete-active .tql-preview-panel[data-v-7ce615f9]{display:none!important}.tql-error-message[data-v-7ce615f9]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-error-message i[data-v-7ce615f9]{margin-top:.125rem;font-size:.75rem}.tql-error-suggestion[data-v-7ce615f9]{display:block;color:var(--text-color-secondary, #666);font-style:italic;margin-left:1.25rem}.sr-only[data-v-7ce615f9]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tql-toolbar[data-v-7ce615f9]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:.25rem}.tql-input-multiline .tql-toolbar[data-v-7ce615f9]{top:.5rem;transform:none}.tql-toolbar-button[data-v-7ce615f9]{padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px);transition:color .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.tql-toolbar-button[data-v-7ce615f9]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-toolbar-button--active[data-v-7ce615f9]{color:var(--primary-color, #3b82f6);background:var(--primary-100, rgba(59, 130, 246, .1))}.tql-validation-status[data-v-7ce615f9]{display:flex;align-items:center}.tql-complexity-badge[data-v-7ce615f9]{display:flex;align-items:center;gap:.25rem;padding:.125rem .5rem;border-radius:9999px;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em}.tql-complexity-low[data-v-7ce615f9]{background:var(--green-100, #dcfce7);color:var(--green-700, #15803d)}.tql-complexity-medium[data-v-7ce615f9]{background:var(--yellow-100, #fef9c3);color:var(--yellow-700, #a16207)}.tql-complexity-high[data-v-7ce615f9]{background:var(--red-100, #fee2e2);color:var(--red-700, #b91c1c)}.tql-complexity-count[data-v-7ce615f9]{display:inline-flex;align-items:center;justify-content:center;min-width:1rem;height:1rem;padding:0 .25rem;border-radius:9999px;background:currentColor;color:#fff;font-size:.5rem}.tql-complexity-low .tql-complexity-count[data-v-7ce615f9]{background:var(--green-600, #16a34a)}.tql-complexity-medium .tql-complexity-count[data-v-7ce615f9]{background:var(--yellow-600, #ca8a04)}.tql-complexity-high .tql-complexity-count[data-v-7ce615f9]{background:var(--red-600, #dc2626)}.tql-complexity-warnings[data-v-7ce615f9]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:9;box-shadow:0 2px 8px #0000001a}.tql-complexity-warning[data-v-7ce615f9]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem}.tql-complexity-warning i[data-v-7ce615f9]{margin-top:.125rem;font-size:.75rem}.tql-complexity-warning--info[data-v-7ce615f9]{color:var(--blue-600, #2563eb)}.tql-complexity-warning--warning[data-v-7ce615f9]{color:var(--yellow-600, #ca8a04)}.tql-complexity-warning--error[data-v-7ce615f9]{color:var(--red-600, #dc2626)}.tql-complexity-suggestions[data-v-7ce615f9]{margin-top:.5rem;padding-top:.5rem;border-top:1px solid var(--surface-border, #e0e0e0)}.tql-complexity-suggestion[data-v-7ce615f9]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--text-color-secondary, #666)}.tql-complexity-suggestion i[data-v-7ce615f9]{color:var(--yellow-500, #eab308)}.tql-history-dropdown[data-v-7ce615f9]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:20;box-shadow:0 4px 12px #00000026;max-height:300px;overflow:hidden;display:flex;flex-direction:column}.tql-history-header[data-v-7ce615f9]{padding:.5rem;border-bottom:1px solid var(--surface-border, #e0e0e0)}.tql-history-search[data-v-7ce615f9]{width:100%;padding:.375rem .5rem;border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 4px);font-size:.75rem;outline:none}.tql-history-search[data-v-7ce615f9]:focus{border-color:var(--primary-color, #3b82f6)}.tql-history-list[data-v-7ce615f9]{overflow-y:auto;flex:1}.tql-history-item[data-v-7ce615f9]{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem;cursor:pointer;border-bottom:1px solid var(--surface-50, #f9fafb);transition:background-color .15s}.tql-history-item[data-v-7ce615f9]:hover{background:var(--surface-100, #f5f5f5)}.tql-history-item--favorite[data-v-7ce615f9]{background:var(--yellow-50, #fefce8)}.tql-history-item--favorite[data-v-7ce615f9]:hover{background:var(--yellow-100, #fef9c3)}.tql-history-favorite[data-v-7ce615f9]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #999);cursor:pointer;flex-shrink:0}.tql-history-favorite[data-v-7ce615f9]:hover,.tql-history-item--favorite .tql-history-favorite[data-v-7ce615f9]{color:var(--yellow-500, #eab308)}.tql-history-content[data-v-7ce615f9]{flex:1;min-width:0}.tql-history-label[data-v-7ce615f9]{font-size:.6875rem;font-weight:600;color:var(--text-color, #333);margin-bottom:.125rem}.tql-history-query[data-v-7ce615f9]{font-family:Courier New,monospace;font-size:.6875rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-history-time[data-v-7ce615f9]{font-size:.625rem;color:var(--text-color-secondary, #999);flex-shrink:0}.tql-history-empty[data-v-7ce615f9]{padding:1rem;text-align:center;color:var(--text-color-secondary, #666);font-size:.75rem}.tql-preview-panel[data-v-7ce615f9]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:15;box-shadow:0 4px 12px #00000026;max-height:400px;overflow:hidden;display:flex;flex-direction:column}.tql-preview-header[data-v-7ce615f9]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;border-bottom:1px solid var(--surface-border, #e0e0e0);font-size:.75rem;font-weight:600;color:var(--text-color, #333)}.tql-preview-close[data-v-7ce615f9]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px)}.tql-preview-close[data-v-7ce615f9]:hover{background:var(--surface-100, #f5f5f5);color:var(--text-color, #333)}.tql-preview-panel[data-v-7ce615f9] .tql-preview{border:none;border-radius:0;max-height:350px;overflow-y:auto}.tql-validation-messages-portal{position:fixed;top:var(--tql-msg-top, 0);left:var(--tql-msg-left, 0);width:var(--tql-msg-width, auto);z-index:9998;background:var(--surface-overlay, #fff);border:2px solid var(--red-500, #ef4444);border-radius:var(--border-radius, 6px);padding:.5rem;box-shadow:0 4px 12px #00000026}.tql-validation-messages-portal .tql-error-message{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-validation-messages-portal .tql-error-message i{margin-top:.125rem;font-size:.75rem}.tql-validation-messages-portal .tql-error-suggestion{display:block;color:var(--text-color-secondary, #6b7280);font-style:italic;margin-left:1.25rem}.tql-chart[data-v-dc05ff8b]{position:relative;width:100%;background:#12121e;border-radius:10px;overflow:hidden}.tql-chart__canvas[data-v-dc05ff8b]{display:block;width:100%!important;height:100%!important}.tql-chart__metric[data-v-dc05ff8b]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:8px}.tql-chart__metric-value[data-v-dc05ff8b]{font-size:3.5rem;font-weight:700;letter-spacing:-.02em;color:#818cf8;line-height:1}.tql-chart__metric-title[data-v-dc05ff8b]{font-size:.9rem;color:#888;letter-spacing:.03em}.tql-chart__tooltip[data-v-dc05ff8b]{position:absolute;opacity:0;pointer-events:auto;background:#1e1e2e;border:1px solid #333;border-radius:8px;padding:10px 14px;font-size:.8rem;transition:opacity .15s;z-index:10;transform:translate(-50%,-110%)}.tql-chart__tooltip[data-v-dc05ff8b] .tt-title{color:#e0e0e0;font-weight:600;margin-bottom:2px}.tql-chart__tooltip[data-v-dc05ff8b] .tt-val{color:#a0a0b0;margin-bottom:6px}.tql-chart__tooltip[data-v-dc05ff8b] .tt-link{color:#818cf8;text-decoration:none;font-weight:500}.tql-chart__tooltip[data-v-dc05ff8b] .tt-link:hover{text-decoration:underline}
|
|
1
|
+
.tql-autocomplete-dropdown[data-v-e29dd6a7]{position:fixed;top:var(--dropdown-top);left:var(--dropdown-left);z-index:9999;min-width:280px;max-width:450px;max-height:var(--dropdown-max-height);background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);box-shadow:0 4px 16px #00000026;overflow:hidden;display:flex;flex-direction:column}.tql-completion-list[data-v-e29dd6a7]{overflow-y:auto;max-height:calc(var(--dropdown-max-height) - 60px)}.tql-completion-item[data-v-e29dd6a7]{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;cursor:pointer;transition:background-color .15s}.tql-completion-item[data-v-e29dd6a7]:hover,.tql-completion-item.selected[data-v-e29dd6a7]{background:var(--highlight-bg, #f0f0f0)}.tql-completion-icon[data-v-e29dd6a7]{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;font-size:.75rem}.tql-completion-icon.tql-completion-kind-field[data-v-e29dd6a7]{background:var(--blue-100, #e3f2fd);color:var(--blue-600, #1e88e5)}.tql-completion-icon.tql-completion-kind-operator[data-v-e29dd6a7]{background:var(--pink-100, #fce4ec);color:var(--pink-600, #d81b60)}.tql-completion-icon.tql-completion-kind-value[data-v-e29dd6a7]{background:var(--green-100, #e8f5e9);color:var(--green-600, #43a047)}.tql-completion-icon.tql-completion-kind-keyword[data-v-e29dd6a7]{background:var(--purple-100, #f3e5f5);color:var(--purple-600, #8e24aa)}.tql-completion-icon.tql-completion-kind-snippet[data-v-e29dd6a7]{background:var(--orange-100, #fff3e0);color:var(--orange-600, #fb8c00)}.tql-completion-icon.tql-completion-kind-mutator[data-v-e29dd6a7]{background:var(--cyan-100, #e0f7fa);color:var(--cyan-600, #00acc1)}.tql-completion-icon.tql-completion-kind-aggregation[data-v-e29dd6a7]{background:var(--indigo-100, #e8eaf6);color:var(--indigo-600, #3949ab)}.tql-completion-icon.tql-completion-kind-logicalOp[data-v-e29dd6a7]{background:var(--yellow-100, #fffde7);color:var(--yellow-700, #fbc02d)}.tql-completion-icon.tql-completion-kind-typeHint[data-v-e29dd6a7]{background:var(--teal-100, #e0f2f1);color:var(--teal-600, #00897b)}.tql-completion-icon.tql-completion-kind-visualization[data-v-e29dd6a7]{background:var(--red-100, #ffebee);color:var(--red-600, #e53935)}.tql-completion-content[data-v-e29dd6a7]{flex:1;display:flex;flex-direction:column;min-width:0}.tql-completion-label[data-v-e29dd6a7]{font-family:Courier New,monospace;font-size:.875rem;font-weight:500;color:var(--text-color, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-detail[data-v-e29dd6a7]{font-size:.75rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-kind-badge[data-v-e29dd6a7]{font-size:.625rem;padding:.125rem .375rem;background:var(--surface-100, #f5f5f5);border-radius:3px;color:var(--text-color-secondary, #666);text-transform:uppercase;letter-spacing:.025em}.tql-completion-docs[data-v-e29dd6a7]{padding:.5rem .75rem;border-top:1px solid var(--surface-border, #ddd);background:var(--surface-50, #fafafa);font-size:.75rem;color:var(--text-color-secondary, #666);max-height:60px;overflow-y:auto}.tql-preview[data-v-53107944]{font-family:ui-monospace,monospace;font-size:13px;line-height:1.5;padding:12px;border:1px solid var(--tql-preview-border, #e0e0e0);border-radius:6px;background:var(--tql-preview-bg, #fafafa)}.tql-preview--compact[data-v-53107944]{padding:8px;font-size:12px}.tql-preview--empty[data-v-53107944]{color:var(--tql-preview-muted, #888)}.tql-preview__empty[data-v-53107944]{text-align:center;padding:20px}.tql-preview__complexity[data-v-53107944]{display:flex;align-items:center;gap:12px;margin-bottom:12px}.tql-preview__complexity-badge[data-v-53107944]{padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;text-transform:uppercase}.tql-preview--low .tql-preview__complexity-badge[data-v-53107944]{background:var(--tql-preview-low-bg, #e8f5e9);color:var(--tql-preview-low-text, #2e7d32)}.tql-preview--medium .tql-preview__complexity-badge[data-v-53107944]{background:var(--tql-preview-medium-bg, #fff3e0);color:var(--tql-preview-medium-text, #e65100)}.tql-preview--high .tql-preview__complexity-badge[data-v-53107944]{background:var(--tql-preview-high-bg, #ffebee);color:var(--tql-preview-high-text, #c62828)}.tql-preview__field-count[data-v-53107944]{color:var(--tql-preview-muted, #666);font-size:12px}.tql-preview__warnings[data-v-53107944]{margin-bottom:12px}.tql-preview__warning[data-v-53107944]{display:flex;align-items:flex-start;gap:8px;padding:6px 8px;border-radius:4px;margin-bottom:4px}.tql-preview__warning--info[data-v-53107944]{background:var(--tql-preview-info-bg, #e3f2fd);color:var(--tql-preview-info-text, #1565c0)}.tql-preview__warning--warning[data-v-53107944]{background:var(--tql-preview-warning-bg, #fff3e0);color:var(--tql-preview-warning-text, #e65100)}.tql-preview__warning--error[data-v-53107944]{background:var(--tql-preview-error-bg, #ffebee);color:var(--tql-preview-error-text, #c62828)}.tql-preview__warning-icon[data-v-53107944]{font-weight:700;width:16px;text-align:center}.tql-preview__warning-text[data-v-53107944]{flex:1}.tql-preview__suggestions[data-v-53107944]{margin-bottom:12px;padding:8px;background:var(--tql-preview-suggestion-bg, #f5f5f5);border-radius:4px}.tql-preview__suggestions-header[data-v-53107944]{font-weight:600;margin-bottom:4px;color:var(--tql-preview-header, #333)}.tql-preview__suggestions-list[data-v-53107944]{margin:0;padding-left:20px}.tql-preview__suggestion[data-v-53107944]{color:var(--tql-preview-muted, #666);margin:2px 0}.tql-preview__tree[data-v-53107944]{margin-bottom:12px}.tql-preview__tree-header[data-v-53107944],.tql-preview__fields-header[data-v-53107944],.tql-preview__operators-header[data-v-53107944]{font-weight:600;margin-bottom:8px;color:var(--tql-preview-header, #333);font-size:12px;text-transform:uppercase;letter-spacing:.5px}.tql-preview__tree-content[data-v-53107944]{border:1px solid var(--tql-preview-tree-border, #e0e0e0);border-radius:4px;background:var(--tql-preview-tree-bg, #fff);padding:8px}.tql-preview__node[data-v-53107944]{margin:2px 0}.tql-preview__node-content[data-v-53107944]{display:flex;align-items:center;gap:4px;padding:2px 4px;border-radius:3px;cursor:pointer}.tql-preview__node-content[data-v-53107944]:hover{background:var(--tql-preview-node-hover, #f0f0f0)}.tql-preview__node-toggle[data-v-53107944]{width:16px;height:16px;border:none;background:var(--tql-preview-toggle-bg, #e0e0e0);border-radius:3px;cursor:pointer;font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center}.tql-preview__node-toggle[data-v-53107944]:hover{background:var(--tql-preview-toggle-hover, #d0d0d0)}.tql-preview__node-toggle--leaf[data-v-53107944]{visibility:hidden}.tql-preview__node-type[data-v-53107944]{font-weight:600;color:var(--tql-preview-node-type, #666)}.tql-preview__node--and .tql-preview__node-type[data-v-53107944]{color:var(--tql-preview-and, #1976d2)}.tql-preview__node--or .tql-preview__node-type[data-v-53107944]{color:var(--tql-preview-or, #7b1fa2)}.tql-preview__node--not .tql-preview__node-type[data-v-53107944]{color:var(--tql-preview-not, #c62828)}.tql-preview__node--group .tql-preview__node-type[data-v-53107944]{color:var(--tql-preview-group, #666)}.tql-preview__node-label[data-v-53107944]{flex:1}.tql-preview__fields-list[data-v-53107944]{display:flex;flex-direction:column;gap:4px}.tql-preview__field[data-v-53107944]{display:flex;align-items:center;gap:6px;padding:4px 8px;background:var(--tql-preview-field-bg, #fff);border:1px solid var(--tql-preview-field-border, #e0e0e0);border-radius:4px;cursor:pointer}.tql-preview__field[data-v-53107944]:hover{background:var(--tql-preview-field-hover, #f5f5f5)}.tql-preview__field-name[data-v-53107944]{font-weight:600;color:var(--tql-preview-field-name, #1976d2)}.tql-preview__field-mutators[data-v-53107944]{color:var(--tql-preview-mutator, #7b1fa2)}.tql-preview__field-operator[data-v-53107944]{color:var(--tql-preview-operator, #666)}.tql-preview__field-value[data-v-53107944]{color:var(--tql-preview-value, #2e7d32)}.tql-preview__match-type[data-v-53107944]{margin-left:auto;padding:1px 4px;border-radius:3px;font-size:10px;font-weight:600;background:var(--tql-preview-match-bg, #f0f0f0)}.tql-preview__match-type--exact[data-v-53107944]{background:var(--tql-preview-match-exact-bg, #e8f5e9);color:var(--tql-preview-match-exact, #2e7d32)}.tql-preview__match-type--wildcard[data-v-53107944]{background:var(--tql-preview-match-wildcard-bg, #fff3e0);color:var(--tql-preview-match-wildcard, #e65100)}.tql-preview__match-type--regex[data-v-53107944]{background:var(--tql-preview-match-regex-bg, #fce4ec);color:var(--tql-preview-match-regex, #c2185b)}.tql-preview__match-type--range[data-v-53107944]{background:var(--tql-preview-match-range-bg, #e3f2fd);color:var(--tql-preview-match-range, #1565c0)}.tql-preview__match-type--cidr[data-v-53107944]{background:var(--tql-preview-match-cidr-bg, #f3e5f5);color:var(--tql-preview-match-cidr, #7b1fa2)}.tql-preview__operators-list[data-v-53107944]{display:flex;flex-wrap:wrap;gap:8px}.tql-preview__operator[data-v-53107944]{padding:2px 6px;background:var(--tql-preview-op-bg, #f0f0f0);border-radius:3px;font-size:11px}.tql-input-wrapper[data-v-d513cd4d]{position:relative;display:flex;align-items:flex-start;border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);background:var(--surface-ground, #fff);transition:border-color .2s,box-shadow .2s}.tql-input-wrapper.tql-input-has-min-height[data-v-d513cd4d],.tql-input-wrapper.tql-input-has-min-height .tql-input[data-v-d513cd4d]{min-height:var(--tql-min-height)}.tql-input-wrapper.tql-input-focused[data-v-d513cd4d]{border-color:var(--primary-color, #3b82f6);box-shadow:0 0 0 2px var(--primary-100, rgba(59, 130, 246, .2))}.tql-input-wrapper.tql-input-invalid[data-v-d513cd4d]{border-color:var(--red-500, #ef4444)}.tql-input-wrapper.tql-input-invalid.tql-input-focused[data-v-d513cd4d]{box-shadow:0 0 0 2px var(--red-100, rgba(239, 68, 68, .2))}.tql-input-wrapper.tql-input-disabled[data-v-d513cd4d]{opacity:.6;cursor:not-allowed}.tql-highlight-layer[data-v-d513cd4d]{position:absolute;inset:0;box-sizing:border-box;padding:.5rem 8rem .5rem .75rem;border:none;pointer-events:none;white-space:pre;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;overflow:hidden}.tql-input-multiline .tql-highlight-layer[data-v-d513cd4d]{overflow-y:auto;white-space:pre-wrap;word-wrap:break-word}.tql-input[data-v-d513cd4d]{flex:1;width:100%;box-sizing:border-box;padding:.5rem 8rem .5rem .75rem;border:none;background:transparent;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;color:var(--text-color, #333);outline:none;resize:none}.tql-input.tql-input-highlighted[data-v-d513cd4d]{color:transparent;caret-color:var(--text-color, #333)}.tql-input[data-v-d513cd4d]::placeholder{color:var(--text-color-secondary, #666);opacity:.7}.tql-input[data-v-d513cd4d]:disabled{cursor:not-allowed}.tql-token-field[data-v-d513cd4d]{color:var(--tql-field-color, var(--blue-600, #2563eb))}.tql-token-operator[data-v-d513cd4d]{color:var(--tql-operator-color, var(--pink-600, #db2777));font-weight:500}.tql-token-logicalOp[data-v-d513cd4d]{color:var(--tql-logical-color, var(--purple-600, #9333ea));font-weight:600}.tql-token-collectionOp[data-v-d513cd4d]{color:var(--tql-collection-color, var(--indigo-600, #4f46e5));font-weight:600}.tql-token-string[data-v-d513cd4d]{color:var(--tql-string-color, var(--green-600, #16a34a))}.tql-token-number[data-v-d513cd4d]{color:var(--tql-number-color, var(--orange-600, #ea580c))}.tql-token-boolean[data-v-d513cd4d]{color:var(--tql-boolean-color, var(--cyan-600, #0891b2))}.tql-token-null[data-v-d513cd4d]{color:var(--tql-null-color, var(--gray-500, #6b7280));font-style:italic}.tql-token-mutator[data-v-d513cd4d]{color:var(--tql-mutator-color, var(--teal-600, #0d9488));font-style:italic}.tql-token-aggregation[data-v-d513cd4d]{color:var(--tql-aggregation-color, var(--indigo-600, #4f46e5))}.tql-token-keyword[data-v-d513cd4d]{color:var(--tql-keyword-color, var(--purple-500, #a855f7))}.tql-token-typeHint[data-v-d513cd4d]{color:var(--tql-typehint-color, var(--teal-500, #14b8a6))}.tql-token-visualization[data-v-d513cd4d]{color:var(--tql-viz-color, var(--red-500, #ef4444))}.tql-token-arrow[data-v-d513cd4d]{color:var(--tql-arrow-color, var(--gray-600, #4b5563));font-weight:600}.tql-token-doubleColon[data-v-d513cd4d]{color:var(--tql-colon-color, var(--gray-500, #6b7280))}.tql-token-paren[data-v-d513cd4d],.tql-token-bracket[data-v-d513cd4d]{color:var(--tql-bracket-color, var(--gray-600, #4b5563))}.tql-token-error[data-v-d513cd4d]{color:var(--tql-error-color, var(--red-600, #dc2626));text-decoration:wavy underline;text-decoration-color:var(--red-400, #f87171)}.tql-token-error-range[data-v-d513cd4d]{background-color:var(--red-50, #fef2f2)}.tql-token-unknown[data-v-d513cd4d]{color:var(--text-color-secondary, #666)}.tql-validation-icon[data-v-d513cd4d]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.tql-input-multiline .tql-validation-icon[data-v-d513cd4d]{top:.75rem;transform:none}.tql-icon-valid[data-v-d513cd4d]{color:var(--green-500, #22c55e)}.tql-icon-invalid[data-v-d513cd4d]{color:var(--red-500, #ef4444)}.tql-icon-clickable[data-v-d513cd4d]{cursor:pointer;transition:transform .2s}.tql-icon-clickable[data-v-d513cd4d]:hover{transform:scale(1.2)}.tql-icon-clickable[data-v-d513cd4d]:focus{outline:2px solid var(--primary-color, #3b82f6);outline-offset:2px;border-radius:50%}.tql-snippet-button[data-v-d513cd4d]{position:absolute;right:2rem;top:50%;transform:translateY(-50%);padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 6px);transition:color .2s,background-color .2s}.tql-snippet-button[data-v-d513cd4d]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-input-multiline .tql-snippet-button[data-v-d513cd4d]{top:.75rem;transform:none}.tql-input-resizable-textarea[data-v-d513cd4d]{resize:vertical;min-height:80px}.tql-input-wrapper.tql-input-resizable[data-v-d513cd4d]{height:auto}.tql-input-wrapper.tql-input-resizable .tql-highlight-layer[data-v-d513cd4d]{height:100%}.tql-validation-messages[data-v-d513cd4d]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--red-200, #fecaca);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:10;box-shadow:0 2px 8px #0000001a}.tql-input-autocomplete-active .tql-validation-messages[data-v-d513cd4d],.tql-input-autocomplete-active .tql-complexity-warnings[data-v-d513cd4d],.tql-input-autocomplete-active .tql-history-dropdown[data-v-d513cd4d],.tql-input-autocomplete-active .tql-preview-panel[data-v-d513cd4d]{display:none!important}.tql-error-message[data-v-d513cd4d]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-error-message i[data-v-d513cd4d]{margin-top:.125rem;font-size:.75rem}.tql-error-suggestion[data-v-d513cd4d]{display:block;color:var(--text-color-secondary, #666);font-style:italic;margin-left:1.25rem}.sr-only[data-v-d513cd4d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tql-toolbar[data-v-d513cd4d]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:.25rem}.tql-input-multiline .tql-toolbar[data-v-d513cd4d]{top:.5rem;transform:none}.tql-toolbar-button[data-v-d513cd4d]{padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px);transition:color .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.tql-toolbar-button[data-v-d513cd4d]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-toolbar-button--active[data-v-d513cd4d]{color:var(--primary-color, #3b82f6);background:var(--primary-100, rgba(59, 130, 246, .1))}.tql-validation-status[data-v-d513cd4d]{display:flex;align-items:center}.tql-complexity-badge[data-v-d513cd4d]{display:flex;align-items:center;gap:.25rem;padding:.125rem .5rem;border-radius:9999px;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em}.tql-complexity-low[data-v-d513cd4d]{background:var(--green-100, #dcfce7);color:var(--green-700, #15803d)}.tql-complexity-medium[data-v-d513cd4d]{background:var(--yellow-100, #fef9c3);color:var(--yellow-700, #a16207)}.tql-complexity-high[data-v-d513cd4d]{background:var(--red-100, #fee2e2);color:var(--red-700, #b91c1c)}.tql-complexity-count[data-v-d513cd4d]{display:inline-flex;align-items:center;justify-content:center;min-width:1rem;height:1rem;padding:0 .25rem;border-radius:9999px;background:currentColor;color:#fff;font-size:.5rem}.tql-complexity-low .tql-complexity-count[data-v-d513cd4d]{background:var(--green-600, #16a34a)}.tql-complexity-medium .tql-complexity-count[data-v-d513cd4d]{background:var(--yellow-600, #ca8a04)}.tql-complexity-high .tql-complexity-count[data-v-d513cd4d]{background:var(--red-600, #dc2626)}.tql-complexity-warnings[data-v-d513cd4d]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:9;box-shadow:0 2px 8px #0000001a}.tql-complexity-warning[data-v-d513cd4d]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem}.tql-complexity-warning i[data-v-d513cd4d]{margin-top:.125rem;font-size:.75rem}.tql-complexity-warning--info[data-v-d513cd4d]{color:var(--blue-600, #2563eb)}.tql-complexity-warning--warning[data-v-d513cd4d]{color:var(--yellow-600, #ca8a04)}.tql-complexity-warning--error[data-v-d513cd4d]{color:var(--red-600, #dc2626)}.tql-complexity-suggestions[data-v-d513cd4d]{margin-top:.5rem;padding-top:.5rem;border-top:1px solid var(--surface-border, #e0e0e0)}.tql-complexity-suggestion[data-v-d513cd4d]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--text-color-secondary, #666)}.tql-complexity-suggestion i[data-v-d513cd4d]{color:var(--yellow-500, #eab308)}.tql-history-dropdown[data-v-d513cd4d]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:20;box-shadow:0 4px 12px #00000026;max-height:300px;overflow:hidden;display:flex;flex-direction:column}.tql-history-header[data-v-d513cd4d]{padding:.5rem;border-bottom:1px solid var(--surface-border, #e0e0e0)}.tql-history-search[data-v-d513cd4d]{width:100%;padding:.375rem .5rem;border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 4px);font-size:.75rem;outline:none}.tql-history-search[data-v-d513cd4d]:focus{border-color:var(--primary-color, #3b82f6)}.tql-history-list[data-v-d513cd4d]{overflow-y:auto;flex:1}.tql-history-item[data-v-d513cd4d]{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem;cursor:pointer;border-bottom:1px solid var(--surface-50, #f9fafb);transition:background-color .15s}.tql-history-item[data-v-d513cd4d]:hover{background:var(--surface-100, #f5f5f5)}.tql-history-item--favorite[data-v-d513cd4d]{background:var(--yellow-50, #fefce8)}.tql-history-item--favorite[data-v-d513cd4d]:hover{background:var(--yellow-100, #fef9c3)}.tql-history-favorite[data-v-d513cd4d]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #999);cursor:pointer;flex-shrink:0}.tql-history-favorite[data-v-d513cd4d]:hover,.tql-history-item--favorite .tql-history-favorite[data-v-d513cd4d]{color:var(--yellow-500, #eab308)}.tql-history-content[data-v-d513cd4d]{flex:1;min-width:0}.tql-history-label[data-v-d513cd4d]{font-size:.6875rem;font-weight:600;color:var(--text-color, #333);margin-bottom:.125rem}.tql-history-query[data-v-d513cd4d]{font-family:Courier New,monospace;font-size:.6875rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-history-time[data-v-d513cd4d]{font-size:.625rem;color:var(--text-color-secondary, #999);flex-shrink:0}.tql-history-empty[data-v-d513cd4d]{padding:1rem;text-align:center;color:var(--text-color-secondary, #666);font-size:.75rem}.tql-preview-panel[data-v-d513cd4d]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:15;box-shadow:0 4px 12px #00000026;max-height:400px;overflow:hidden;display:flex;flex-direction:column}.tql-preview-header[data-v-d513cd4d]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;border-bottom:1px solid var(--surface-border, #e0e0e0);font-size:.75rem;font-weight:600;color:var(--text-color, #333)}.tql-preview-close[data-v-d513cd4d]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px)}.tql-preview-close[data-v-d513cd4d]:hover{background:var(--surface-100, #f5f5f5);color:var(--text-color, #333)}.tql-preview-panel[data-v-d513cd4d] .tql-preview{border:none;border-radius:0;max-height:350px;overflow-y:auto}.tql-validation-messages-portal{position:fixed;top:var(--tql-msg-top, 0);left:var(--tql-msg-left, 0);width:var(--tql-msg-width, auto);z-index:9998;background:var(--surface-overlay, #fff);border:2px solid var(--red-500, #ef4444);border-radius:var(--border-radius, 6px);padding:.5rem;box-shadow:0 4px 12px #00000026}.tql-validation-messages-portal .tql-error-message{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-validation-messages-portal .tql-error-message i{margin-top:.125rem;font-size:.75rem}.tql-validation-messages-portal .tql-error-suggestion{display:block;color:var(--text-color-secondary, #6b7280);font-style:italic;margin-left:1.25rem}.tql-chart[data-v-9f8e5a68]{position:relative;width:100%;background:#12121e;border-radius:10px;overflow:hidden}.tql-chart__canvas[data-v-9f8e5a68]{display:block;width:100%!important;height:100%!important}.tql-chart__metric[data-v-9f8e5a68]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:8px}.tql-chart__metric-value[data-v-9f8e5a68]{font-size:3.5rem;font-weight:700;letter-spacing:-.02em;color:#818cf8;line-height:1}.tql-chart__metric-title[data-v-9f8e5a68]{font-size:.9rem;color:#888;letter-spacing:.03em}.tql-chart__tooltip[data-v-9f8e5a68]{position:absolute;opacity:0;pointer-events:auto;background:#1e1e2e;border:1px solid #333;border-radius:8px;padding:10px 14px;font-size:.8rem;transition:opacity .15s;z-index:10;transform:translate(-50%,-110%)}.tql-chart__tooltip[data-v-9f8e5a68] .tt-title{color:#e0e0e0;font-weight:600;margin-bottom:2px}.tql-chart__tooltip[data-v-9f8e5a68] .tt-val{color:#a0a0b0;margin-bottom:6px}.tql-chart__tooltip[data-v-9f8e5a68] .tt-link{color:#818cf8;text-decoration:none;font-weight:500}.tql-chart__tooltip[data-v-9f8e5a68] .tt-link:hover{text-decoration:underline}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import { TqlCompletionItem } from '../src/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
id?: string;
|
|
4
|
+
items: TqlCompletionItem[];
|
|
5
|
+
visible: boolean;
|
|
6
|
+
position: {
|
|
7
|
+
top: number;
|
|
8
|
+
left: number;
|
|
9
|
+
};
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
13
|
+
selectCurrent: () => void;
|
|
14
|
+
moveUp: () => void;
|
|
15
|
+
moveDown: () => void;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
select: (item: TqlCompletionItem) => any;
|
|
18
|
+
close: () => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onSelect?: ((item: TqlCompletionItem) => any) | undefined;
|
|
21
|
+
onClose?: (() => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
|
+
listRef: HTMLDivElement;
|
|
24
|
+
}, any>;
|
|
2
25
|
export default _default;
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { TqlStatsResult, DrilldownEvent } from '../src/chart/index';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
result: TqlStatsResult;
|
|
4
|
+
chartType?: string;
|
|
5
|
+
height?: string;
|
|
6
|
+
drilldown?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
drilldown: (event: DrilldownEvent) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onDrilldown?: ((event: DrilldownEvent) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
drilldown: boolean;
|
|
14
|
+
chartType: string;
|
|
15
|
+
height: string;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
+
canvasRef: HTMLCanvasElement;
|
|
18
|
+
tooltipRef: HTMLDivElement;
|
|
19
|
+
}, HTMLDivElement>;
|
|
2
20
|
export default _default;
|
package/dist/vue/TqlChart.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TqlChart.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9f8e5a68"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|