@quidgest/ui 0.9.2 → 0.9.4
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/ui.esm.js +373 -367
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.js +68 -67
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +1 -1
- package/package.json +1 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { getCurrentInstance as De, computed as w, ref as T, provide as ze, inject as Ce, watch as P, defineComponent as S, openBlock as u, createElementBlock as p, normalizeClass as E, normalizeStyle as pe, createElementVNode as Y, withModifiers as de, createVNode as A, unref as v, createCommentVNode as I, Fragment as
|
|
1
|
+
import { getCurrentInstance as De, computed as w, ref as T, provide as ze, inject as Ce, watch as P, defineComponent as S, openBlock as u, createElementBlock as p, normalizeClass as E, normalizeStyle as pe, createElementVNode as Y, withModifiers as de, createVNode as A, unref as v, createCommentVNode as I, Fragment as oe, createTextVNode as ue, toDisplayString as N, renderSlot as m, toRef as Le, mergeModels as H, useModel as X, createBlock as V, withCtx as _, renderList as ye, resolveDynamicComponent as Qe, h as Se, normalizeProps as ne, mergeProps as se, reactive as He, onBeforeUnmount as Ke, onMounted as Ae, nextTick as U, Teleport as Ge, Transition as We, withKeys as je, createSlots as _e, withDirectives as Pe, vModelDynamic as Xe, guardReactiveProps as ie } from "vue";
|
|
2
2
|
function ge(t) {
|
|
3
3
|
return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
|
|
4
4
|
}
|
|
5
5
|
function xe(t) {
|
|
6
6
|
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
7
7
|
}
|
|
8
|
-
function ke(t = {},
|
|
8
|
+
function ke(t = {}, o = {}) {
|
|
9
9
|
const e = {};
|
|
10
|
-
for (const
|
|
11
|
-
e[
|
|
12
|
-
for (const
|
|
13
|
-
const a = t[
|
|
10
|
+
for (const n in t)
|
|
11
|
+
e[n] = t[n];
|
|
12
|
+
for (const n in o) {
|
|
13
|
+
const a = t[n], r = o[n];
|
|
14
14
|
if (xe(a) && xe(r)) {
|
|
15
|
-
e[
|
|
15
|
+
e[n] = ke(
|
|
16
16
|
a,
|
|
17
17
|
r
|
|
18
18
|
);
|
|
19
19
|
continue;
|
|
20
20
|
}
|
|
21
|
-
e[
|
|
21
|
+
e[n] = r;
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
@@ -28,17 +28,17 @@ function Ye() {
|
|
|
28
28
|
const t = De();
|
|
29
29
|
if (!t)
|
|
30
30
|
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
31
|
+
const o = t.type.name ?? t.type.__name;
|
|
32
|
+
if (!o)
|
|
33
33
|
throw new Error("[Quidgest UI] Could not determine component name");
|
|
34
|
-
const e = Me(),
|
|
35
|
-
return w(() => ke(
|
|
34
|
+
const e = Me(), n = (r = e.value) == null ? void 0 : r.Global, a = (d = e.value) == null ? void 0 : d[o];
|
|
35
|
+
return w(() => ke(n, a));
|
|
36
36
|
}
|
|
37
37
|
function Fe(t) {
|
|
38
38
|
if (ge(t))
|
|
39
39
|
return;
|
|
40
|
-
const
|
|
41
|
-
ze(we,
|
|
40
|
+
const o = Me(), e = T(t), n = w(() => ge(e.value) ? o.value : ke(o.value, e.value));
|
|
41
|
+
ze(we, n);
|
|
42
42
|
}
|
|
43
43
|
function Me() {
|
|
44
44
|
const t = Ce(we, void 0);
|
|
@@ -53,10 +53,10 @@ function Ze() {
|
|
|
53
53
|
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
54
54
|
return t;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const
|
|
56
|
+
function Vo(t) {
|
|
57
|
+
const o = Ze(), e = {
|
|
58
58
|
activeTheme: T(t),
|
|
59
|
-
themes:
|
|
59
|
+
themes: o.themes
|
|
60
60
|
};
|
|
61
61
|
return ze(ce, e), e;
|
|
62
62
|
}
|
|
@@ -130,82 +130,82 @@ function tt(t) {
|
|
|
130
130
|
if (!et(t))
|
|
131
131
|
throw new Error("Invalid color format");
|
|
132
132
|
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
133
|
-
const
|
|
134
|
-
return { r:
|
|
133
|
+
const o = parseInt(t.slice(1, 3), 16), e = parseInt(t.slice(3, 5), 16), n = parseInt(t.slice(5, 7), 16);
|
|
134
|
+
return { r: o, g: e, b: n };
|
|
135
135
|
}
|
|
136
136
|
function Re(t) {
|
|
137
137
|
return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([A-Za-z])/g, "$1-$2").replace(/([A-Za-z])([0-9])/g, "$1-$2").toLowerCase();
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function ot() {
|
|
140
140
|
let t = document.getElementById(
|
|
141
141
|
ce
|
|
142
142
|
);
|
|
143
143
|
return t || (t = document.createElement("style"), t.id = ce, document.head.appendChild(t)), t;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
let
|
|
147
|
-
for (const
|
|
148
|
-
|
|
145
|
+
function nt(t) {
|
|
146
|
+
let o = "";
|
|
147
|
+
for (const n of t) {
|
|
148
|
+
o += `.q-theme--${n.name} {
|
|
149
149
|
`;
|
|
150
|
-
const a =
|
|
150
|
+
const a = n.scheme;
|
|
151
151
|
let r;
|
|
152
152
|
for (r in a) {
|
|
153
153
|
const d = a[r];
|
|
154
154
|
if (d) {
|
|
155
|
-
|
|
155
|
+
o += ` ${Ve(r)}: ${d};
|
|
156
156
|
`;
|
|
157
157
|
const i = tt(d);
|
|
158
|
-
|
|
158
|
+
o += ` ${Ve(r)}-rgb: ${i.r} ${i.g} ${i.b};
|
|
159
159
|
`;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
o += `}
|
|
163
163
|
`;
|
|
164
164
|
}
|
|
165
|
-
const e =
|
|
166
|
-
e.textContent =
|
|
165
|
+
const e = ot();
|
|
166
|
+
e.textContent = o;
|
|
167
167
|
}
|
|
168
168
|
function Ve(t) {
|
|
169
169
|
return t ? `--q-theme-${Re(t)}` : "";
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Eo(t = {}) {
|
|
172
172
|
return { install: (e) => {
|
|
173
|
-
const
|
|
174
|
-
for (const r in
|
|
175
|
-
e.component(r,
|
|
173
|
+
const n = t.components || {};
|
|
174
|
+
for (const r in n)
|
|
175
|
+
e.component(r, n[r]);
|
|
176
176
|
const a = t.defaults || {};
|
|
177
177
|
e.provide(we, T(a)), lt(e, t.themes);
|
|
178
178
|
} };
|
|
179
179
|
}
|
|
180
|
-
function lt(t,
|
|
180
|
+
function lt(t, o) {
|
|
181
181
|
const e = [];
|
|
182
|
-
let
|
|
183
|
-
if (!
|
|
184
|
-
|
|
185
|
-
name:
|
|
182
|
+
let n;
|
|
183
|
+
if (!o)
|
|
184
|
+
n = "default", e.push({
|
|
185
|
+
name: n,
|
|
186
186
|
mode: "light",
|
|
187
187
|
scheme: Be
|
|
188
188
|
});
|
|
189
189
|
else
|
|
190
|
-
for (const a of
|
|
190
|
+
for (const a of o.themes) {
|
|
191
191
|
const d = { ...a.mode === "light" ? Be : Je, ...a.colors };
|
|
192
192
|
e.push({
|
|
193
193
|
name: a.name,
|
|
194
194
|
mode: a.mode,
|
|
195
195
|
scheme: d
|
|
196
|
-
}), a.name ===
|
|
196
|
+
}), a.name === o.defaultTheme && (n = a.name);
|
|
197
197
|
}
|
|
198
|
-
if (
|
|
198
|
+
if (n) {
|
|
199
199
|
const a = {
|
|
200
|
-
activeTheme: T(
|
|
200
|
+
activeTheme: T(n),
|
|
201
201
|
themes: e
|
|
202
202
|
};
|
|
203
|
-
|
|
203
|
+
nt(e), P(a.activeTheme, at, { immediate: !0 }), t.provide(ce, a);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
function at(t) {
|
|
207
|
-
const
|
|
208
|
-
|
|
207
|
+
const o = document.documentElement, n = Array.from(o.classList).filter((a) => !a.startsWith("q-theme"));
|
|
208
|
+
o.className = n.join(" "), o.classList.add(`q-theme--${t}`);
|
|
209
209
|
}
|
|
210
210
|
const st = /* @__PURE__ */ Y("svg", { viewBox: "25 25 50 50" }, [
|
|
211
211
|
/* @__PURE__ */ Y("circle", {
|
|
@@ -227,29 +227,29 @@ const st = /* @__PURE__ */ Y("svg", { viewBox: "25 25 50 50" }, [
|
|
|
227
227
|
class: { default: void 0 }
|
|
228
228
|
},
|
|
229
229
|
setup(t) {
|
|
230
|
-
const
|
|
231
|
-
"font-size":
|
|
230
|
+
const o = t, e = w(() => ({
|
|
231
|
+
"font-size": o.size !== 48 ? `${o.size}px` : void 0
|
|
232
232
|
}));
|
|
233
|
-
return (
|
|
234
|
-
class: E(["q-spinner-loader",
|
|
233
|
+
return (n, a) => (u(), p("div", {
|
|
234
|
+
class: E(["q-spinner-loader", o.class]),
|
|
235
235
|
style: pe(e.value)
|
|
236
236
|
}, it, 6));
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
|
-
function dt(t,
|
|
240
|
-
var
|
|
241
|
-
const e = Re(
|
|
242
|
-
return e ? typeof ((
|
|
239
|
+
function dt(t, o) {
|
|
240
|
+
var n;
|
|
241
|
+
const e = Re(o);
|
|
242
|
+
return e ? typeof ((n = t.props) == null ? void 0 : n[e]) < "u" : !1;
|
|
243
243
|
}
|
|
244
244
|
function B(t) {
|
|
245
|
-
const
|
|
246
|
-
return
|
|
245
|
+
const o = t.setup;
|
|
246
|
+
return o && (t.setup = (e, n) => {
|
|
247
247
|
const a = Ye();
|
|
248
248
|
if (ge(a.value))
|
|
249
|
-
return
|
|
249
|
+
return o(e, n);
|
|
250
250
|
const r = De();
|
|
251
251
|
if (r === null)
|
|
252
|
-
return
|
|
252
|
+
return o(e, n);
|
|
253
253
|
const d = new Proxy(e, {
|
|
254
254
|
get(i, c) {
|
|
255
255
|
var g;
|
|
@@ -257,7 +257,7 @@ function B(t) {
|
|
|
257
257
|
return typeof c == "string" && !dt(r.vnode, c) ? k ?? q : q;
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
|
-
return
|
|
260
|
+
return o(d, n);
|
|
261
261
|
}), t;
|
|
262
262
|
}
|
|
263
263
|
const $e = B(rt), ut = ["disabled"], ct = {
|
|
@@ -279,10 +279,10 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
279
279
|
class: { default: void 0 }
|
|
280
280
|
},
|
|
281
281
|
emits: ["click"],
|
|
282
|
-
setup(t, { emit:
|
|
283
|
-
const e = t,
|
|
282
|
+
setup(t, { emit: o }) {
|
|
283
|
+
const e = t, n = o, a = w(() => e.disabled || e.loading);
|
|
284
284
|
function r(i) {
|
|
285
|
-
a.value ||
|
|
285
|
+
a.value || n("click", i);
|
|
286
286
|
}
|
|
287
287
|
const d = w(() => {
|
|
288
288
|
const i = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
|
|
@@ -310,11 +310,11 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
310
310
|
A(v($e), { size: 20 })
|
|
311
311
|
])) : I("", !0),
|
|
312
312
|
Y("span", ft, [
|
|
313
|
-
i.iconOnRight ? (u(), p(
|
|
313
|
+
i.iconOnRight ? (u(), p(oe, { key: 0 }, [
|
|
314
314
|
ue(N(e.label), 1)
|
|
315
315
|
], 64)) : I("", !0),
|
|
316
316
|
m(i.$slots, "default"),
|
|
317
|
-
i.iconOnRight ? I("", !0) : (u(), p(
|
|
317
|
+
i.iconOnRight ? I("", !0) : (u(), p(oe, { key: 1 }, [
|
|
318
318
|
ue(N(e.label), 1)
|
|
319
319
|
], 64))
|
|
320
320
|
])
|
|
@@ -329,21 +329,21 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
329
329
|
class: { default: void 0 }
|
|
330
330
|
},
|
|
331
331
|
setup(t) {
|
|
332
|
-
const
|
|
332
|
+
const o = t;
|
|
333
333
|
return Fe({
|
|
334
334
|
QButton: {
|
|
335
335
|
bStyle: "secondary",
|
|
336
|
-
disabled: Le(
|
|
337
|
-
borderless: Le(
|
|
336
|
+
disabled: Le(o, "disabled"),
|
|
337
|
+
borderless: Le(o, "borderless"),
|
|
338
338
|
elevated: !1
|
|
339
339
|
}
|
|
340
|
-
}), (e,
|
|
340
|
+
}), (e, n) => (u(), p("div", {
|
|
341
341
|
class: E([
|
|
342
342
|
"q-btn-group",
|
|
343
343
|
{
|
|
344
|
-
"q-btn-group--elevated":
|
|
344
|
+
"q-btn-group--elevated": o.elevated
|
|
345
345
|
},
|
|
346
|
-
|
|
346
|
+
o.class
|
|
347
347
|
])
|
|
348
348
|
}, [
|
|
349
349
|
m(e.$slots, "default")
|
|
@@ -364,24 +364,24 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
364
364
|
}),
|
|
365
365
|
emits: ["update:modelValue"],
|
|
366
366
|
setup(t) {
|
|
367
|
-
const
|
|
368
|
-
function
|
|
369
|
-
e.value === a.key && !
|
|
367
|
+
const o = t, e = X(t, "modelValue");
|
|
368
|
+
function n(a) {
|
|
369
|
+
e.value === a.key && !o.required ? e.value = void 0 : e.value = a.key;
|
|
370
370
|
}
|
|
371
371
|
return (a, r) => (u(), V(v(vt), {
|
|
372
372
|
"b-style": "secondary",
|
|
373
|
-
class: E(
|
|
374
|
-
disabled:
|
|
375
|
-
borderless:
|
|
376
|
-
elevated:
|
|
373
|
+
class: E(o.class),
|
|
374
|
+
disabled: o.disabled,
|
|
375
|
+
borderless: o.borderless,
|
|
376
|
+
elevated: o.elevated
|
|
377
377
|
}, {
|
|
378
378
|
default: _(() => [
|
|
379
|
-
(u(!0), p(
|
|
379
|
+
(u(!0), p(oe, null, ye(o.options, (d) => (u(), V(v(fe), {
|
|
380
380
|
key: d.key,
|
|
381
381
|
title: d.title,
|
|
382
382
|
label: d.label,
|
|
383
383
|
active: e.value === d.key,
|
|
384
|
-
onClick: () =>
|
|
384
|
+
onClick: () => n(d)
|
|
385
385
|
}, {
|
|
386
386
|
default: _(() => [
|
|
387
387
|
m(a.$slots, d.key)
|
|
@@ -392,7 +392,7 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
392
392
|
_: 3
|
|
393
393
|
}, 8, ["class", "disabled", "borderless", "elevated"]));
|
|
394
394
|
}
|
|
395
|
-
}),
|
|
395
|
+
}), To = B(ht), bt = /* @__PURE__ */ S({
|
|
396
396
|
__name: "QIcon",
|
|
397
397
|
props: {
|
|
398
398
|
icon: {},
|
|
@@ -401,8 +401,8 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
401
401
|
class: { default: void 0 }
|
|
402
402
|
},
|
|
403
403
|
setup(t) {
|
|
404
|
-
const
|
|
405
|
-
switch (
|
|
404
|
+
const o = t, e = w(() => {
|
|
405
|
+
switch (o.type) {
|
|
406
406
|
case "svg":
|
|
407
407
|
return St;
|
|
408
408
|
case "font":
|
|
@@ -413,10 +413,10 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
413
413
|
return;
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
|
-
return (
|
|
417
|
-
class: E(
|
|
418
|
-
icon:
|
|
419
|
-
size:
|
|
416
|
+
return (n, a) => (u(), V(Qe(e.value), {
|
|
417
|
+
class: E(o.class),
|
|
418
|
+
icon: o.icon,
|
|
419
|
+
size: o.size
|
|
420
420
|
}, null, 8, ["class", "icon", "size"]));
|
|
421
421
|
}
|
|
422
422
|
}), yt = /* @__PURE__ */ S({
|
|
@@ -429,11 +429,11 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
429
429
|
class: { default: void 0 }
|
|
430
430
|
},
|
|
431
431
|
setup(t) {
|
|
432
|
-
const
|
|
433
|
-
"font-size":
|
|
432
|
+
const o = t, e = w(() => o.variant ? `${o.library}-${o.variant}` : o.library), n = w(() => o.library && o.icon ? `${o.library}-${o.icon}` : o.icon), a = w(() => ({
|
|
433
|
+
"font-size": o.size !== void 0 ? `${o.size}px` : void 0
|
|
434
434
|
}));
|
|
435
435
|
return (r, d) => (u(), p("i", {
|
|
436
|
-
class: E(["q-icon", "q-icon__font", e.value,
|
|
436
|
+
class: E(["q-icon", "q-icon__font", e.value, n.value, o.class]),
|
|
437
437
|
style: pe(a.value)
|
|
438
438
|
}, null, 6));
|
|
439
439
|
}
|
|
@@ -445,12 +445,12 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
445
445
|
class: {}
|
|
446
446
|
},
|
|
447
447
|
setup(t) {
|
|
448
|
-
const
|
|
449
|
-
"font-size":
|
|
448
|
+
const o = t, e = w(() => ({
|
|
449
|
+
"font-size": o.size !== void 0 ? `${o.size}px` : void 0
|
|
450
450
|
}));
|
|
451
|
-
return (
|
|
452
|
-
src:
|
|
453
|
-
class: E(["q-icon", "q-icon__img",
|
|
451
|
+
return (n, a) => (u(), p("img", {
|
|
452
|
+
src: o.icon,
|
|
453
|
+
class: E(["q-icon", "q-icon__img", o.class]),
|
|
454
454
|
style: pe(e.value)
|
|
455
455
|
}, null, 14, gt));
|
|
456
456
|
}
|
|
@@ -468,8 +468,8 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
468
468
|
const t = this.getSvgContent(this.svgElSource);
|
|
469
469
|
if (!t)
|
|
470
470
|
return Se("div", this.$attrs);
|
|
471
|
-
const
|
|
472
|
-
return this.copySvgAttrs(
|
|
471
|
+
const o = {};
|
|
472
|
+
return this.copySvgAttrs(o, this.svgElSource), this.copySvgAttrs(o, t), this.copyComponentAttrs(o, this.$attrs), o.innerHTML = t.innerHTML, Se("svg", o);
|
|
473
473
|
},
|
|
474
474
|
props: {
|
|
475
475
|
/**
|
|
@@ -520,15 +520,15 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
520
520
|
await this.getSource(this.src);
|
|
521
521
|
},
|
|
522
522
|
methods: {
|
|
523
|
-
copySvgAttrs(t,
|
|
524
|
-
const e =
|
|
523
|
+
copySvgAttrs(t, o) {
|
|
524
|
+
const e = o.attributes;
|
|
525
525
|
if (e)
|
|
526
|
-
for (const
|
|
527
|
-
t[
|
|
526
|
+
for (const n of e)
|
|
527
|
+
t[n.name] = n.value;
|
|
528
528
|
},
|
|
529
|
-
copyComponentAttrs(t,
|
|
530
|
-
for (const [e,
|
|
531
|
-
|
|
529
|
+
copyComponentAttrs(t, o) {
|
|
530
|
+
for (const [e, n] of Object.entries(o))
|
|
531
|
+
n !== !1 && n !== null && n !== void 0 && (t[e] = n);
|
|
532
532
|
},
|
|
533
533
|
getSvgContent(t) {
|
|
534
534
|
return this.symbol && (t = t.getElementById(this.symbol), !t) ? null : (this.transformSource && (t = t.cloneNode(!0), t = this.transformSource(t)), this.title && (this.transformSource || (t = t.cloneNode(!0)), wt(t, this.title)), t);
|
|
@@ -540,10 +540,10 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
540
540
|
async getSource(t) {
|
|
541
541
|
try {
|
|
542
542
|
re[t] || (re[t] = $t(this.download(t))), this.svgElSource && re[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
543
|
-
const
|
|
544
|
-
this.svgElSource =
|
|
545
|
-
} catch (
|
|
546
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete re[t], this.$emit("error",
|
|
543
|
+
const o = await re[t];
|
|
544
|
+
this.svgElSource = o, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
545
|
+
} catch (o) {
|
|
546
|
+
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete re[t], this.$emit("error", o);
|
|
547
547
|
}
|
|
548
548
|
},
|
|
549
549
|
/**
|
|
@@ -552,10 +552,10 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
552
552
|
* @returns {PromiseWithState<Element>}
|
|
553
553
|
*/
|
|
554
554
|
async download(t) {
|
|
555
|
-
const
|
|
556
|
-
if (!
|
|
555
|
+
const o = await fetch(t);
|
|
556
|
+
if (!o.ok)
|
|
557
557
|
throw new Error("Error loading SVG");
|
|
558
|
-
const e = await
|
|
558
|
+
const e = await o.text(), r = new DOMParser().parseFromString(e, "text/xml").getElementsByTagName("svg")[0];
|
|
559
559
|
if (!r)
|
|
560
560
|
throw new Error("Loaded file is not a valid SVG");
|
|
561
561
|
return r;
|
|
@@ -568,26 +568,26 @@ const $e = B(rt), ut = ["disabled"], ct = {
|
|
|
568
568
|
},
|
|
569
569
|
expose: []
|
|
570
570
|
});
|
|
571
|
-
function wt(t,
|
|
571
|
+
function wt(t, o) {
|
|
572
572
|
const e = t.getElementsByTagName("title");
|
|
573
573
|
if (e.length)
|
|
574
|
-
e[0].textContent =
|
|
574
|
+
e[0].textContent = o;
|
|
575
575
|
else {
|
|
576
|
-
const
|
|
577
|
-
|
|
576
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
577
|
+
n.textContent = o, t.insertBefore(n, t.firstChild);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
function $t(t) {
|
|
581
581
|
if (t.getIsPending)
|
|
582
582
|
return t;
|
|
583
|
-
let
|
|
583
|
+
let o = !0;
|
|
584
584
|
const e = t.then(
|
|
585
|
-
(
|
|
586
|
-
(
|
|
587
|
-
throw
|
|
585
|
+
(n) => (o = !1, n),
|
|
586
|
+
(n) => {
|
|
587
|
+
throw o = !1, n;
|
|
588
588
|
}
|
|
589
589
|
);
|
|
590
|
-
return e.getIsPending = () =>
|
|
590
|
+
return e.getIsPending = () => o, e;
|
|
591
591
|
}
|
|
592
592
|
const qt = /* @__PURE__ */ S({
|
|
593
593
|
__name: "QIconSvg",
|
|
@@ -598,15 +598,15 @@ const qt = /* @__PURE__ */ S({
|
|
|
598
598
|
class: { default: void 0 }
|
|
599
599
|
},
|
|
600
600
|
emits: ["loaded", "unloaded"],
|
|
601
|
-
setup(t, { emit:
|
|
602
|
-
const e = t,
|
|
601
|
+
setup(t, { emit: o }) {
|
|
602
|
+
const e = t, n = o, a = w(() => ({
|
|
603
603
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
604
604
|
}));
|
|
605
605
|
function r(i) {
|
|
606
|
-
|
|
606
|
+
n("loaded", i);
|
|
607
607
|
}
|
|
608
608
|
function d() {
|
|
609
|
-
|
|
609
|
+
n("unloaded");
|
|
610
610
|
}
|
|
611
611
|
return (i, c) => (u(), V(v(kt), {
|
|
612
612
|
class: E(["q-icon", "q-icon__svg", e.class]),
|
|
@@ -634,10 +634,10 @@ const qt = /* @__PURE__ */ S({
|
|
|
634
634
|
modelModifiers: {}
|
|
635
635
|
}),
|
|
636
636
|
emits: ["update:modelValue"],
|
|
637
|
-
setup(t, { expose:
|
|
638
|
-
const e = t,
|
|
637
|
+
setup(t, { expose: o }) {
|
|
638
|
+
const e = t, n = X(t, "modelValue"), a = T(!1), r = w(() => d.value.length > 1 ? "div" : "ul"), d = w(() => e.groups.length ? e.groups : [{ id: "", title: "" }]), i = T(null);
|
|
639
639
|
function c(f) {
|
|
640
|
-
|
|
640
|
+
n.value = f;
|
|
641
641
|
}
|
|
642
642
|
function q() {
|
|
643
643
|
a.value = !0;
|
|
@@ -649,10 +649,10 @@ const qt = /* @__PURE__ */ S({
|
|
|
649
649
|
var l;
|
|
650
650
|
if ((l = i.value) != null && l.contains(f.relatedTarget))
|
|
651
651
|
return;
|
|
652
|
-
let
|
|
653
|
-
|
|
652
|
+
let y;
|
|
653
|
+
n.value ? y = e.items.findIndex((h) => h[e.itemValue] === n.value) : y = G();
|
|
654
654
|
const $ = a.value;
|
|
655
|
-
z(
|
|
655
|
+
z(y, $);
|
|
656
656
|
}
|
|
657
657
|
function F(f) {
|
|
658
658
|
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(f.key) && f.preventDefault(), f.key) {
|
|
@@ -684,13 +684,13 @@ const qt = /* @__PURE__ */ S({
|
|
|
684
684
|
break;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
function z(f,
|
|
687
|
+
function z(f, y = !1) {
|
|
688
688
|
var l;
|
|
689
|
-
(l = L()[f]) == null || l.focus({ preventScroll:
|
|
689
|
+
(l = L()[f]) == null || l.focus({ preventScroll: y });
|
|
690
690
|
}
|
|
691
691
|
function L() {
|
|
692
|
-
var
|
|
693
|
-
const f = (
|
|
692
|
+
var y;
|
|
693
|
+
const f = (y = i.value) == null ? void 0 : y.querySelectorAll("li");
|
|
694
694
|
return f ? Array.from(f) : [];
|
|
695
695
|
}
|
|
696
696
|
function K(f) {
|
|
@@ -700,29 +700,29 @@ const qt = /* @__PURE__ */ S({
|
|
|
700
700
|
return L().indexOf(document.activeElement);
|
|
701
701
|
}
|
|
702
702
|
function G() {
|
|
703
|
-
const f = L(),
|
|
704
|
-
return
|
|
703
|
+
const f = L(), y = f.find(($) => Z($));
|
|
704
|
+
return y ? f.indexOf(y) : -1;
|
|
705
705
|
}
|
|
706
706
|
function C() {
|
|
707
|
-
const f = L(),
|
|
708
|
-
return
|
|
707
|
+
const f = L(), y = [...f].reverse().find(($) => Z($));
|
|
708
|
+
return y ? f.indexOf(y) : -1;
|
|
709
709
|
}
|
|
710
|
-
function M(f,
|
|
711
|
-
return
|
|
710
|
+
function M(f, y, $) {
|
|
711
|
+
return y === "prev" && f === 0 || y === "next" && f === $.length - 1;
|
|
712
712
|
}
|
|
713
713
|
function W(f) {
|
|
714
|
-
const
|
|
715
|
-
return R(
|
|
714
|
+
const y = le();
|
|
715
|
+
return R(y, f);
|
|
716
716
|
}
|
|
717
|
-
function R(f,
|
|
717
|
+
function R(f, y) {
|
|
718
718
|
const $ = L();
|
|
719
|
-
if (M(f,
|
|
719
|
+
if (M(f, y, $))
|
|
720
720
|
return f;
|
|
721
|
-
let l = f + (
|
|
721
|
+
let l = f + (y === "next" ? 1 : -1);
|
|
722
722
|
for (; !Z($[l]); ) {
|
|
723
|
-
if (M(l,
|
|
723
|
+
if (M(l, y, $))
|
|
724
724
|
return f;
|
|
725
|
-
l +=
|
|
725
|
+
l += y === "next" ? 1 : -1;
|
|
726
726
|
}
|
|
727
727
|
return l;
|
|
728
728
|
}
|
|
@@ -730,15 +730,15 @@ const qt = /* @__PURE__ */ S({
|
|
|
730
730
|
return f.tabIndex === -2;
|
|
731
731
|
}
|
|
732
732
|
function J(f) {
|
|
733
|
-
return f ? e.items.filter((
|
|
733
|
+
return f ? e.items.filter((y) => y.group === f) : e.items;
|
|
734
734
|
}
|
|
735
|
-
return
|
|
735
|
+
return o({
|
|
736
736
|
focusItem: z,
|
|
737
737
|
getItem: K,
|
|
738
738
|
getAdjacentItemIndex: R,
|
|
739
739
|
getFirstFocusableItemIndex: G,
|
|
740
740
|
getLastFocusableItemIndex: C
|
|
741
|
-
}), (f,
|
|
741
|
+
}), (f, y) => (u(), V(Qe(r.value), {
|
|
742
742
|
ref_key: "listRef",
|
|
743
743
|
ref: i,
|
|
744
744
|
class: E(["q-list", { "q-list--disabled": e.disabled }, e.class]),
|
|
@@ -750,20 +750,20 @@ const qt = /* @__PURE__ */ S({
|
|
|
750
750
|
onKeydown: F
|
|
751
751
|
}, {
|
|
752
752
|
default: _(() => [
|
|
753
|
-
(u(!0), p(
|
|
753
|
+
(u(!0), p(oe, null, ye(d.value, ($) => (u(), V(v(Ft), {
|
|
754
754
|
key: $.id,
|
|
755
755
|
title: d.value.length === 1 ? void 0 : $.title,
|
|
756
756
|
disabled: $.disabled
|
|
757
757
|
}, {
|
|
758
758
|
default: _(() => [
|
|
759
|
-
(u(!0), p(
|
|
759
|
+
(u(!0), p(oe, null, ye(J($.id), (l) => (u(), V(v(At), {
|
|
760
760
|
key: l[e.itemValue],
|
|
761
761
|
value: l[e.itemValue],
|
|
762
762
|
label: l[e.itemLabel],
|
|
763
763
|
icon: l.icon,
|
|
764
764
|
disabled: e.disabled || l.disabled,
|
|
765
765
|
highlighted: e.highlighted === l[e.itemValue],
|
|
766
|
-
selected:
|
|
766
|
+
selected: n.value === l[e.itemValue],
|
|
767
767
|
onSelect: c
|
|
768
768
|
}, {
|
|
769
769
|
default: _(() => [
|
|
@@ -783,7 +783,7 @@ let Bt = 0;
|
|
|
783
783
|
function me(t) {
|
|
784
784
|
return t || `uid-${++Bt}`;
|
|
785
785
|
}
|
|
786
|
-
const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Et = { class: "q-list-item__check-container" }, Tt = {
|
|
786
|
+
const Vt = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Et = { class: "q-list-item__check-container" }, Tt = {
|
|
787
787
|
check: {
|
|
788
788
|
icon: "check"
|
|
789
789
|
}
|
|
@@ -799,16 +799,17 @@ const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Et = { class: "q-l
|
|
|
799
799
|
disabled: { type: Boolean }
|
|
800
800
|
},
|
|
801
801
|
emits: ["select"],
|
|
802
|
-
setup(t, { emit:
|
|
803
|
-
const e = t,
|
|
802
|
+
setup(t, { emit: o }) {
|
|
803
|
+
const e = t, n = o, a = me();
|
|
804
804
|
function r() {
|
|
805
|
-
e.disabled ||
|
|
805
|
+
e.disabled || n("select", e.value);
|
|
806
806
|
}
|
|
807
807
|
function d(i) {
|
|
808
808
|
i.key === "Tab" && r(), (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.stopPropagation(), r());
|
|
809
809
|
}
|
|
810
810
|
return (i, c) => (u(), p("li", {
|
|
811
811
|
id: v(a),
|
|
812
|
+
"data-key": e.value,
|
|
812
813
|
role: "option",
|
|
813
814
|
tabindex: e.disabled ? void 0 : -2,
|
|
814
815
|
class: E([
|
|
@@ -825,7 +826,7 @@ const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Et = { class: "q-l
|
|
|
825
826
|
onClick: de(r, ["stop", "prevent"])
|
|
826
827
|
}, [
|
|
827
828
|
m(i.$slots, "default", {}, () => [
|
|
828
|
-
e.icon ? (u(), V(v(te),
|
|
829
|
+
e.icon ? (u(), V(v(te), ne(se({ key: 0 }, e.icon)), null, 16)) : I("", !0),
|
|
829
830
|
ue(" " + N(e.label), 1)
|
|
830
831
|
]),
|
|
831
832
|
Y("div", Et, [
|
|
@@ -840,33 +841,33 @@ const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Et = { class: "q-l
|
|
|
840
841
|
disabled: { type: Boolean }
|
|
841
842
|
},
|
|
842
843
|
setup(t) {
|
|
843
|
-
const
|
|
844
|
-
return (
|
|
844
|
+
const o = t, e = me();
|
|
845
|
+
return (n, a) => (u(), p("ul", {
|
|
845
846
|
class: "q-list-item-group",
|
|
846
847
|
role: "group",
|
|
847
|
-
"aria-labelledby":
|
|
848
|
+
"aria-labelledby": o.title ? v(e) : void 0
|
|
848
849
|
}, [
|
|
849
|
-
|
|
850
|
+
o.title ? (u(), p("li", {
|
|
850
851
|
key: 0,
|
|
851
852
|
id: v(e),
|
|
852
853
|
class: "q-list-item-group__title",
|
|
853
854
|
role: "presentation"
|
|
854
|
-
}, N(
|
|
855
|
-
m(
|
|
855
|
+
}, N(o.title), 9, Ct)) : I("", !0),
|
|
856
|
+
m(n.$slots, "default")
|
|
856
857
|
], 8, zt));
|
|
857
858
|
}
|
|
858
859
|
}), Oe = B(xt), At = B(Dt), Ft = B(Qt);
|
|
859
|
-
function Mt(t,
|
|
860
|
-
const a = t.getBoundingClientRect(), r = a.x + window.scrollX, d = a.y + window.scrollY, i =
|
|
860
|
+
function Mt(t, o, e = "right", n) {
|
|
861
|
+
const a = t.getBoundingClientRect(), r = a.x + window.scrollX, d = a.y + window.scrollY, i = o == null ? void 0 : o.getBoundingClientRect(), c = (i == null ? void 0 : i.width) ?? 0, q = (i == null ? void 0 : i.height) ?? 0;
|
|
861
862
|
let k = e;
|
|
862
863
|
i && !Ue(a, i, k) && (k = Rt(a, i, k));
|
|
863
864
|
const g = { x: 0, y: 0, placement: k };
|
|
864
865
|
switch (k) {
|
|
865
866
|
case "top":
|
|
866
|
-
|
|
867
|
+
n === "anchor" ? g.x = r : g.x = r + (a.width - c) / 2, g.y = d - q;
|
|
867
868
|
break;
|
|
868
869
|
case "bottom":
|
|
869
|
-
|
|
870
|
+
n === "anchor" ? g.x = r : g.x = r + (a.width - c) / 2, g.y = d + a.height;
|
|
870
871
|
break;
|
|
871
872
|
case "left":
|
|
872
873
|
g.x = r - c, g.y = d + a.height / 2 - q / 2;
|
|
@@ -875,41 +876,41 @@ function Mt(t, n, e = "right", o) {
|
|
|
875
876
|
g.x = r + a.width, g.y = d + a.height / 2 - q / 2;
|
|
876
877
|
break;
|
|
877
878
|
}
|
|
878
|
-
return
|
|
879
|
+
return n === "anchor" && a.width >= c && (g.width = a.width), g;
|
|
879
880
|
}
|
|
880
|
-
function Ue(t,
|
|
881
|
-
let
|
|
881
|
+
function Ue(t, o, e) {
|
|
882
|
+
let n = !1, a = !1;
|
|
882
883
|
switch (e) {
|
|
883
884
|
case "top":
|
|
884
|
-
|
|
885
|
+
n = Te(t, o), a = t.top > o.height;
|
|
885
886
|
break;
|
|
886
887
|
case "bottom":
|
|
887
|
-
|
|
888
|
+
n = Te(t, o), a = window.innerHeight - t.top - t.height > o.height;
|
|
888
889
|
break;
|
|
889
890
|
case "left":
|
|
890
|
-
|
|
891
|
+
n = t.left > o.width, a = Ee(t, o);
|
|
891
892
|
break;
|
|
892
893
|
case "right":
|
|
893
|
-
|
|
894
|
+
n = window.innerWidth - t.left - t.width > o.width, a = Ee(t, o);
|
|
894
895
|
break;
|
|
895
896
|
}
|
|
896
|
-
return
|
|
897
|
+
return n && a;
|
|
897
898
|
}
|
|
898
|
-
function Ee(t,
|
|
899
|
-
return window.innerHeight - t.top - t.height / 2 >
|
|
899
|
+
function Ee(t, o) {
|
|
900
|
+
return window.innerHeight - t.top - t.height / 2 > o.height / 2 && t.top + t.height / 2 > o.height / 2;
|
|
900
901
|
}
|
|
901
|
-
function Te(t,
|
|
902
|
-
return window.innerWidth - t.left - t.width / 2 >
|
|
902
|
+
function Te(t, o) {
|
|
903
|
+
return window.innerWidth - t.left - t.width / 2 > o.width / 2 && t.left + t.width / 2 > o.width / 2;
|
|
903
904
|
}
|
|
904
|
-
function Rt(t,
|
|
905
|
-
const
|
|
905
|
+
function Rt(t, o, e) {
|
|
906
|
+
const n = {
|
|
906
907
|
top: ["bottom", "left", "right"],
|
|
907
908
|
bottom: ["top", "left", "right"],
|
|
908
909
|
left: ["right", "top", "bottom"],
|
|
909
910
|
right: ["left", "top", "bottom"]
|
|
910
911
|
};
|
|
911
|
-
for (const a of
|
|
912
|
-
if (Ue(t,
|
|
912
|
+
for (const a of n[e])
|
|
913
|
+
if (Ue(t, o, a))
|
|
913
914
|
return a;
|
|
914
915
|
return e;
|
|
915
916
|
}
|
|
@@ -942,8 +943,8 @@ const Ot = ["role"], Ut = {
|
|
|
942
943
|
modelModifiers: {}
|
|
943
944
|
}),
|
|
944
945
|
emits: /* @__PURE__ */ H(["enter", "leave"], ["update:modelValue"]),
|
|
945
|
-
setup(t, { emit:
|
|
946
|
-
const e = t,
|
|
946
|
+
setup(t, { emit: o }) {
|
|
947
|
+
const e = t, n = o, a = X(t, "modelValue"), r = w(() => [
|
|
947
948
|
"q-overlay",
|
|
948
949
|
`q-overlay--${i.placement}`,
|
|
949
950
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
@@ -1020,10 +1021,10 @@ const Ot = ["role"], Ut = {
|
|
|
1020
1021
|
}
|
|
1021
1022
|
let K;
|
|
1022
1023
|
function le() {
|
|
1023
|
-
|
|
1024
|
+
n("enter");
|
|
1024
1025
|
}
|
|
1025
1026
|
function G() {
|
|
1026
|
-
window.clearTimeout(K), K = window.setTimeout(() => i.animating = !1, 200),
|
|
1027
|
+
window.clearTimeout(K), K = window.setTimeout(() => i.animating = !1, 200), n("leave");
|
|
1027
1028
|
}
|
|
1028
1029
|
let C;
|
|
1029
1030
|
function M() {
|
|
@@ -1078,7 +1079,7 @@ const Ot = ["role"], Ut = {
|
|
|
1078
1079
|
return;
|
|
1079
1080
|
ae(e.anchor) ? (k(), J = window.setTimeout(f, 100)) : L();
|
|
1080
1081
|
}
|
|
1081
|
-
function
|
|
1082
|
+
function y() {
|
|
1082
1083
|
W(), e.spy && f(), e.anchor && document.addEventListener("scroll", L);
|
|
1083
1084
|
}
|
|
1084
1085
|
function $() {
|
|
@@ -1093,7 +1094,7 @@ const Ot = ["role"], Ut = {
|
|
|
1093
1094
|
}), P(
|
|
1094
1095
|
a,
|
|
1095
1096
|
(l) => {
|
|
1096
|
-
l ?
|
|
1097
|
+
l ? y() : $();
|
|
1097
1098
|
},
|
|
1098
1099
|
{ immediate: !0 }
|
|
1099
1100
|
), (l, h) => (u(), V(Ge, {
|
|
@@ -1163,12 +1164,12 @@ const Ot = ["role"], Ut = {
|
|
|
1163
1164
|
required: { type: Boolean },
|
|
1164
1165
|
class: { default: void 0 }
|
|
1165
1166
|
},
|
|
1166
|
-
setup(t, { expose:
|
|
1167
|
-
const e = t,
|
|
1168
|
-
return
|
|
1167
|
+
setup(t, { expose: o }) {
|
|
1168
|
+
const e = t, n = me(e.id), a = T(null), r = w(() => e.required && !e.readonly && !e.disabled);
|
|
1169
|
+
return o({
|
|
1169
1170
|
fieldRef: a
|
|
1170
1171
|
}), (d, i) => (u(), p("div", {
|
|
1171
|
-
id: v(
|
|
1172
|
+
id: v(n),
|
|
1172
1173
|
class: E([
|
|
1173
1174
|
"q-field",
|
|
1174
1175
|
`q-field--${e.size}`,
|
|
@@ -1227,11 +1228,11 @@ const Ot = ["role"], Ut = {
|
|
|
1227
1228
|
modelModifiers: {}
|
|
1228
1229
|
}),
|
|
1229
1230
|
emits: ["update:modelValue"],
|
|
1230
|
-
setup(t, { expose:
|
|
1231
|
-
const e = t,
|
|
1231
|
+
setup(t, { expose: o }) {
|
|
1232
|
+
const e = t, n = X(t, "modelValue"), a = me(e.id), r = T(null), d = T(null), i = w(
|
|
1232
1233
|
() => e.readonly || e.disabled ? "" : e.placeholder
|
|
1233
1234
|
);
|
|
1234
|
-
return
|
|
1235
|
+
return o({
|
|
1235
1236
|
fieldRef: w(() => {
|
|
1236
1237
|
var c;
|
|
1237
1238
|
return (c = r.value) == null ? void 0 : c.fieldRef;
|
|
@@ -1256,7 +1257,7 @@ const Ot = ["role"], Ut = {
|
|
|
1256
1257
|
]),
|
|
1257
1258
|
default: _(() => [
|
|
1258
1259
|
Pe(Y("input", se({
|
|
1259
|
-
"onUpdate:modelValue": q[0] || (q[0] = (k) =>
|
|
1260
|
+
"onUpdate:modelValue": q[0] || (q[0] = (k) => n.value = k),
|
|
1260
1261
|
ref_key: "inputRef",
|
|
1261
1262
|
ref: d,
|
|
1262
1263
|
id: v(a),
|
|
@@ -1269,7 +1270,7 @@ const Ot = ["role"], Ut = {
|
|
|
1269
1270
|
disabled: e.disabled,
|
|
1270
1271
|
maxlength: e.maxLength
|
|
1271
1272
|
}, c.$attrs), null, 16, Yt), [
|
|
1272
|
-
[Xe,
|
|
1273
|
+
[Xe, n.value]
|
|
1273
1274
|
])
|
|
1274
1275
|
]),
|
|
1275
1276
|
_: 2
|
|
@@ -1297,22 +1298,22 @@ const Ot = ["role"], Ut = {
|
|
|
1297
1298
|
} : void 0
|
|
1298
1299
|
]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required"]));
|
|
1299
1300
|
}
|
|
1300
|
-
}), Jt = B(Zt),
|
|
1301
|
+
}), Jt = B(Zt), eo = ["data-key"], to = {
|
|
1301
1302
|
key: 0,
|
|
1302
1303
|
class: "q-select__loader"
|
|
1303
|
-
},
|
|
1304
|
+
}, oo = {
|
|
1304
1305
|
key: 2,
|
|
1305
1306
|
class: "q-select__loader"
|
|
1306
|
-
},
|
|
1307
|
+
}, no = {
|
|
1307
1308
|
noData: "No data available"
|
|
1308
|
-
},
|
|
1309
|
+
}, lo = {
|
|
1309
1310
|
chevron: {
|
|
1310
1311
|
icon: "chevron-down"
|
|
1311
1312
|
},
|
|
1312
1313
|
clear: {
|
|
1313
1314
|
icon: "close"
|
|
1314
1315
|
}
|
|
1315
|
-
},
|
|
1316
|
+
}, ao = /* @__PURE__ */ S({
|
|
1316
1317
|
__name: "QCombobox",
|
|
1317
1318
|
props: /* @__PURE__ */ H({
|
|
1318
1319
|
id: { default: void 0 },
|
|
@@ -1331,8 +1332,8 @@ const Ot = ["role"], Ut = {
|
|
|
1331
1332
|
itemLabel: { default: "label" },
|
|
1332
1333
|
emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
1333
1334
|
size: { default: void 0 },
|
|
1334
|
-
texts: { default: () =>
|
|
1335
|
-
icons: { default: () =>
|
|
1335
|
+
texts: { default: () => no },
|
|
1336
|
+
icons: { default: () => lo },
|
|
1336
1337
|
class: { default: void 0 }
|
|
1337
1338
|
}, {
|
|
1338
1339
|
modelValue: {
|
|
@@ -1345,42 +1346,41 @@ const Ot = ["role"], Ut = {
|
|
|
1345
1346
|
searchModifiers: {}
|
|
1346
1347
|
}),
|
|
1347
1348
|
emits: /* @__PURE__ */ H(["before-show", "before-hide", "show", "hide"], ["update:modelValue", "update:open", "update:search"]),
|
|
1348
|
-
setup(t, { expose:
|
|
1349
|
-
const
|
|
1350
|
-
Ae(
|
|
1351
|
-
|
|
1352
|
-
});
|
|
1353
|
-
const F = w(() => o.clearable && !o.readonly && !o.disabled), D = w(() => {
|
|
1349
|
+
setup(t, { expose: o, emit: e }) {
|
|
1350
|
+
const n = t, a = e, r = X(t, "modelValue"), d = X(t, "open"), i = X(t, "search"), c = T(void 0), q = T(null), k = T(null), g = T(null);
|
|
1351
|
+
Ae(M);
|
|
1352
|
+
const F = w(() => n.clearable && !n.readonly && !n.disabled), D = w(() => {
|
|
1354
1353
|
var s;
|
|
1355
|
-
return
|
|
1356
|
-
(
|
|
1354
|
+
return n.filterMode === "manual" || !G.value ? n.items : (s = n.items) == null ? void 0 : s.filter(
|
|
1355
|
+
(b) => b[n.itemLabel].toLowerCase().startsWith(i.value.toLowerCase())
|
|
1357
1356
|
);
|
|
1358
1357
|
}), z = w(() => {
|
|
1359
1358
|
var s;
|
|
1360
|
-
return (s =
|
|
1359
|
+
return (s = n.items) == null ? void 0 : s.find((b) => b[n.itemValue] === r.value);
|
|
1361
1360
|
}), L = w(() => z.value === void 0), K = w(() => {
|
|
1362
1361
|
const s = c.value;
|
|
1363
1362
|
if (s !== void 0 && D.value[s])
|
|
1364
1363
|
return D.value[s];
|
|
1365
1364
|
}), le = w(() => {
|
|
1366
|
-
var
|
|
1365
|
+
var b;
|
|
1367
1366
|
if (c.value === void 0)
|
|
1368
1367
|
return;
|
|
1369
|
-
const s = (
|
|
1368
|
+
const s = (b = k.value) == null ? void 0 : b.getItem(c.value);
|
|
1370
1369
|
return s == null ? void 0 : s.id;
|
|
1371
1370
|
}), G = w(() => {
|
|
1372
1371
|
var s;
|
|
1373
|
-
return i.value.length > 0 && i.value !== ((s = z.value) == null ? void 0 : s[
|
|
1372
|
+
return i.value.length > 0 && i.value !== ((s = z.value) == null ? void 0 : s[n.itemLabel]);
|
|
1374
1373
|
});
|
|
1375
1374
|
function C(s) {
|
|
1376
1375
|
r.value = s, R();
|
|
1377
1376
|
}
|
|
1378
1377
|
function M() {
|
|
1379
|
-
var
|
|
1380
|
-
|
|
1378
|
+
var b;
|
|
1379
|
+
const s = ((b = z.value) == null ? void 0 : b[n.itemLabel]) || "";
|
|
1380
|
+
i.value !== s && (i.value = s);
|
|
1381
1381
|
}
|
|
1382
1382
|
function W() {
|
|
1383
|
-
d.value ||
|
|
1383
|
+
d.value || n.readonly || n.disabled || (a("before-show"), d.value = !0, ee());
|
|
1384
1384
|
}
|
|
1385
1385
|
function R() {
|
|
1386
1386
|
d.value && (a("before-hide"), d.value = !1, c.value = void 0);
|
|
@@ -1389,7 +1389,7 @@ const Ot = ["role"], Ut = {
|
|
|
1389
1389
|
d.value ? R() : f();
|
|
1390
1390
|
}
|
|
1391
1391
|
function J() {
|
|
1392
|
-
F.value && (r.value =
|
|
1392
|
+
F.value && (r.value = n.emptyValue, c.value = void 0, ee());
|
|
1393
1393
|
}
|
|
1394
1394
|
function f() {
|
|
1395
1395
|
if (W(), z.value !== void 0) {
|
|
@@ -1397,9 +1397,9 @@ const Ot = ["role"], Ut = {
|
|
|
1397
1397
|
s !== -1 && U(() => Ie(s));
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1401
|
-
var
|
|
1402
|
-
if (!(!s.key ||
|
|
1400
|
+
function y(s) {
|
|
1401
|
+
var b, x;
|
|
1402
|
+
if (!(!s.key || n.readonly || n.disabled))
|
|
1403
1403
|
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(s.key) && (s.preventDefault(), s.stopPropagation()), s.key === "Escape")
|
|
1404
1404
|
M(), d.value && R();
|
|
1405
1405
|
else if (["ArrowDown", "ArrowUp"].includes(s.key))
|
|
@@ -1416,17 +1416,17 @@ const Ot = ["role"], Ut = {
|
|
|
1416
1416
|
else if (s.key === "Enter") {
|
|
1417
1417
|
if (K.value === void 0)
|
|
1418
1418
|
return;
|
|
1419
|
-
C(K.value[
|
|
1419
|
+
C(K.value[n.itemValue]);
|
|
1420
1420
|
} else
|
|
1421
|
-
s.key === "Home" ? c.value = (
|
|
1421
|
+
s.key === "Home" ? c.value = (b = k.value) == null ? void 0 : b.getFirstFocusableItemIndex() : s.key === "End" ? c.value = (x = k.value) == null ? void 0 : x.getLastFocusableItemIndex() : (/^[a-z]$/i.test(s.key) || s.key === "Backspace") && W();
|
|
1422
1422
|
}
|
|
1423
1423
|
function $() {
|
|
1424
|
-
var s,
|
|
1424
|
+
var s, b;
|
|
1425
1425
|
if (L.value)
|
|
1426
|
-
c.value = (
|
|
1426
|
+
c.value = (b = k.value) == null ? void 0 : b.getFirstFocusableItemIndex();
|
|
1427
1427
|
else {
|
|
1428
1428
|
const x = D.value.findIndex(
|
|
1429
|
-
(Q) => Q[
|
|
1429
|
+
(Q) => Q[n.itemValue] === r.value
|
|
1430
1430
|
);
|
|
1431
1431
|
x === -1 ? c.value = (s = k.value) == null ? void 0 : s.getFirstFocusableItemIndex() : c.value = x;
|
|
1432
1432
|
}
|
|
@@ -1435,17 +1435,17 @@ const Ot = ["role"], Ut = {
|
|
|
1435
1435
|
var s;
|
|
1436
1436
|
c.value = (s = k.value) == null ? void 0 : s.getLastFocusableItemIndex();
|
|
1437
1437
|
}
|
|
1438
|
-
function h(s,
|
|
1438
|
+
function h(s, b) {
|
|
1439
1439
|
var x;
|
|
1440
|
-
c.value = (x = k.value) == null ? void 0 : x.getAdjacentItemIndex(s,
|
|
1440
|
+
c.value = (x = k.value) == null ? void 0 : x.getAdjacentItemIndex(s, b);
|
|
1441
1441
|
}
|
|
1442
1442
|
function O(s) {
|
|
1443
|
-
var
|
|
1444
|
-
!((
|
|
1443
|
+
var b, x, Q;
|
|
1444
|
+
!((b = g.value) != null && b.contains(s.relatedTarget)) && !((Q = (x = q.value) == null ? void 0 : x.fieldRef) != null && Q.contains(s.relatedTarget)) ? (R(), F.value && !i.value && (r.value = n.emptyValue), M()) : (s.preventDefault(), s.stopPropagation());
|
|
1445
1445
|
}
|
|
1446
1446
|
function ee() {
|
|
1447
|
-
var s,
|
|
1448
|
-
(
|
|
1447
|
+
var s, b;
|
|
1448
|
+
(b = (s = q.value) == null ? void 0 : s.inputRef) == null || b.focus();
|
|
1449
1449
|
}
|
|
1450
1450
|
function j() {
|
|
1451
1451
|
ee();
|
|
@@ -1458,62 +1458,63 @@ const Ot = ["role"], Ut = {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
function Ie(s) {
|
|
1460
1460
|
var x;
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1461
|
+
const b = (x = k.value) == null ? void 0 : x.getItem(s);
|
|
1462
|
+
b == null || b.scrollIntoView({ block: "nearest", inline: "start" });
|
|
1463
1463
|
}
|
|
1464
1464
|
return P(r, M), P(
|
|
1465
|
-
() =>
|
|
1466
|
-
(s,
|
|
1465
|
+
() => n.items,
|
|
1466
|
+
(s, b) => {
|
|
1467
1467
|
if (!L.value) {
|
|
1468
|
-
const x =
|
|
1469
|
-
i.value === (x == null ? void 0 : x[
|
|
1468
|
+
const x = b.find((Q) => Q[n.itemValue] === r.value);
|
|
1469
|
+
i.value === (x == null ? void 0 : x[n.itemLabel]) && M();
|
|
1470
1470
|
}
|
|
1471
1471
|
},
|
|
1472
1472
|
{ deep: !0 }
|
|
1473
1473
|
), P(c, (s) => {
|
|
1474
1474
|
s !== void 0 && Ie(s);
|
|
1475
1475
|
}), P(i, (s) => {
|
|
1476
|
-
s && d.value &&
|
|
1476
|
+
s && d.value && n.selectionMode === "automatic" && U($);
|
|
1477
1477
|
}), P(
|
|
1478
|
-
() =>
|
|
1478
|
+
() => n.loading,
|
|
1479
1479
|
(s) => {
|
|
1480
1480
|
!s && d.value && U($);
|
|
1481
1481
|
}
|
|
1482
|
-
),
|
|
1482
|
+
), o({
|
|
1483
1483
|
triggerEl: q
|
|
1484
|
-
}), (s,
|
|
1484
|
+
}), (s, b) => {
|
|
1485
1485
|
var x;
|
|
1486
|
-
return u(), p(
|
|
1486
|
+
return u(), p(oe, null, [
|
|
1487
1487
|
A(v(Jt), {
|
|
1488
1488
|
modelValue: i.value,
|
|
1489
|
-
"onUpdate:modelValue":
|
|
1490
|
-
id:
|
|
1491
|
-
label:
|
|
1492
|
-
required:
|
|
1489
|
+
"onUpdate:modelValue": b[0] || (b[0] = (Q) => i.value = Q),
|
|
1490
|
+
id: n.id,
|
|
1491
|
+
label: n.label,
|
|
1492
|
+
required: n.required,
|
|
1493
1493
|
ref_key: "triggerEl",
|
|
1494
1494
|
ref: q,
|
|
1495
1495
|
role: "combobox",
|
|
1496
|
-
placeholder:
|
|
1496
|
+
placeholder: n.placeholder,
|
|
1497
1497
|
class: E([
|
|
1498
1498
|
"q-combobox",
|
|
1499
1499
|
{
|
|
1500
|
-
"q-combobox--readonly":
|
|
1501
|
-
"q-combobox--disabled":
|
|
1500
|
+
"q-combobox--readonly": n.readonly,
|
|
1501
|
+
"q-combobox--disabled": n.disabled,
|
|
1502
1502
|
"q-combobox--expanded": d.value
|
|
1503
1503
|
},
|
|
1504
|
-
|
|
1504
|
+
n.class
|
|
1505
1505
|
]),
|
|
1506
|
-
readonly:
|
|
1507
|
-
disabled:
|
|
1506
|
+
readonly: n.readonly,
|
|
1507
|
+
disabled: n.disabled,
|
|
1508
|
+
"data-loading": n.loading,
|
|
1508
1509
|
autocomplete: "off",
|
|
1509
1510
|
"aria-expanded": d.value,
|
|
1510
1511
|
"aria-haspopup": "listbox",
|
|
1511
1512
|
"aria-autocomplete": "list",
|
|
1512
1513
|
"aria-activedescendant": le.value,
|
|
1513
|
-
size:
|
|
1514
|
+
size: n.size,
|
|
1514
1515
|
onClick: f,
|
|
1515
1516
|
onFocusout: O,
|
|
1516
|
-
onKeydown: de(
|
|
1517
|
+
onKeydown: de(y, ["stop"])
|
|
1517
1518
|
}, _e({
|
|
1518
1519
|
"label.prepend": _(() => [
|
|
1519
1520
|
m(s.$slots, "label.prepend")
|
|
@@ -1532,21 +1533,21 @@ const Ot = ["role"], Ut = {
|
|
|
1532
1533
|
onClick: J
|
|
1533
1534
|
}, {
|
|
1534
1535
|
default: _(() => [
|
|
1535
|
-
A(v(te),
|
|
1536
|
+
A(v(te), ne(ie(n.icons.clear)), null, 16)
|
|
1536
1537
|
]),
|
|
1537
1538
|
_: 1
|
|
1538
1539
|
})) : I("", !0),
|
|
1539
|
-
|
|
1540
|
+
n.readonly ? I("", !0) : (u(), V(v(fe), {
|
|
1540
1541
|
key: 1,
|
|
1541
1542
|
class: "q-combobox__chevron",
|
|
1542
1543
|
"b-style": "plain",
|
|
1543
1544
|
borderless: "",
|
|
1544
1545
|
tabindex: "-1",
|
|
1545
|
-
disabled:
|
|
1546
|
+
disabled: n.disabled,
|
|
1546
1547
|
onClick: Z
|
|
1547
1548
|
}, {
|
|
1548
1549
|
default: _(() => [
|
|
1549
|
-
A(v(te),
|
|
1550
|
+
A(v(te), ne(ie(n.icons.chevron)), null, 16)
|
|
1550
1551
|
]),
|
|
1551
1552
|
_: 1
|
|
1552
1553
|
}, 8, ["disabled"]))
|
|
@@ -1567,10 +1568,10 @@ const Ot = ["role"], Ut = {
|
|
|
1567
1568
|
]),
|
|
1568
1569
|
key: "1"
|
|
1569
1570
|
} : void 0
|
|
1570
|
-
]), 1032, ["modelValue", "id", "label", "required", "placeholder", "class", "readonly", "disabled", "aria-expanded", "aria-activedescendant", "size"]),
|
|
1571
|
+
]), 1032, ["modelValue", "id", "label", "required", "placeholder", "class", "readonly", "disabled", "data-loading", "aria-expanded", "aria-activedescendant", "size"]),
|
|
1571
1572
|
A(v(he), {
|
|
1572
1573
|
modelValue: d.value,
|
|
1573
|
-
"onUpdate:modelValue":
|
|
1574
|
+
"onUpdate:modelValue": b[2] || (b[2] = (Q) => d.value = Q),
|
|
1574
1575
|
spy: "",
|
|
1575
1576
|
trigger: "manual",
|
|
1576
1577
|
placement: "bottom",
|
|
@@ -1586,11 +1587,13 @@ const Ot = ["role"], Ut = {
|
|
|
1586
1587
|
Y("div", {
|
|
1587
1588
|
ref_key: "contentRef",
|
|
1588
1589
|
ref: g,
|
|
1590
|
+
"data-testid": "combobox-dropdown",
|
|
1591
|
+
"data-key": n.id,
|
|
1589
1592
|
class: "q-select__body",
|
|
1590
1593
|
onFocusout: O
|
|
1591
1594
|
}, [
|
|
1592
1595
|
m(s.$slots, "body.prepend"),
|
|
1593
|
-
|
|
1596
|
+
n.loading ? (u(), p("div", to, [
|
|
1594
1597
|
A(v($e), { size: 24 })
|
|
1595
1598
|
])) : D.value.length ? (u(), V(v(Oe), {
|
|
1596
1599
|
key: 1,
|
|
@@ -1599,23 +1602,23 @@ const Ot = ["role"], Ut = {
|
|
|
1599
1602
|
class: "q-select__items",
|
|
1600
1603
|
modelValue: r.value,
|
|
1601
1604
|
"onUpdate:modelValue": [
|
|
1602
|
-
|
|
1605
|
+
b[1] || (b[1] = (be) => r.value = be),
|
|
1603
1606
|
C
|
|
1604
1607
|
],
|
|
1605
|
-
highlighted: (Q = K.value) == null ? void 0 : Q[
|
|
1608
|
+
highlighted: (Q = K.value) == null ? void 0 : Q[n.itemValue],
|
|
1606
1609
|
items: D.value,
|
|
1607
1610
|
groups: s.groups,
|
|
1608
|
-
"item-label":
|
|
1609
|
-
"item-value":
|
|
1611
|
+
"item-label": n.itemLabel,
|
|
1612
|
+
"item-value": n.itemValue,
|
|
1610
1613
|
onMouseup: j
|
|
1611
1614
|
}, {
|
|
1612
1615
|
item: _(({ item: be }) => [
|
|
1613
1616
|
m(s.$slots, "item", { item: be })
|
|
1614
1617
|
]),
|
|
1615
1618
|
_: 3
|
|
1616
|
-
}, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (u(), p("div",
|
|
1619
|
+
}, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (u(), p("div", oo, N(s.texts.noData), 1)),
|
|
1617
1620
|
m(s.$slots, "body.append")
|
|
1618
|
-
],
|
|
1621
|
+
], 40, eo)
|
|
1619
1622
|
];
|
|
1620
1623
|
}),
|
|
1621
1624
|
_: 3
|
|
@@ -1623,13 +1626,13 @@ const Ot = ["role"], Ut = {
|
|
|
1623
1626
|
], 64);
|
|
1624
1627
|
};
|
|
1625
1628
|
}
|
|
1626
|
-
}),
|
|
1629
|
+
}), Do = B(ao), so = {
|
|
1627
1630
|
key: 0,
|
|
1628
1631
|
class: "q-input-group__prepend"
|
|
1629
|
-
},
|
|
1632
|
+
}, io = { key: 0 }, ro = {
|
|
1630
1633
|
key: 1,
|
|
1631
1634
|
class: "q-input-group__append"
|
|
1632
|
-
},
|
|
1635
|
+
}, uo = { key: 0 }, co = /* @__PURE__ */ S({
|
|
1633
1636
|
__name: "QInputGroup",
|
|
1634
1637
|
props: {
|
|
1635
1638
|
id: { default: void 0 },
|
|
@@ -1641,29 +1644,29 @@ const Ot = ["role"], Ut = {
|
|
|
1641
1644
|
class: { default: void 0 }
|
|
1642
1645
|
},
|
|
1643
1646
|
setup(t) {
|
|
1644
|
-
const
|
|
1647
|
+
const o = t;
|
|
1645
1648
|
return Fe({
|
|
1646
1649
|
QField: {
|
|
1647
1650
|
size: "block"
|
|
1648
1651
|
}
|
|
1649
|
-
}), (e,
|
|
1650
|
-
id:
|
|
1651
|
-
class: E(["q-input-group",
|
|
1652
|
-
label:
|
|
1653
|
-
required:
|
|
1654
|
-
size:
|
|
1652
|
+
}), (e, n) => (u(), V(v(qe), {
|
|
1653
|
+
id: o.id,
|
|
1654
|
+
class: E(["q-input-group", o.class]),
|
|
1655
|
+
label: o.label,
|
|
1656
|
+
required: o.required,
|
|
1657
|
+
size: o.size
|
|
1655
1658
|
}, {
|
|
1656
1659
|
default: _(() => [
|
|
1657
|
-
e.$slots.prepend ||
|
|
1658
|
-
|
|
1659
|
-
A(v(te),
|
|
1660
|
+
e.$slots.prepend || o.prependIcon ? (u(), p("div", so, [
|
|
1661
|
+
o.prependIcon ? (u(), p("span", io, [
|
|
1662
|
+
A(v(te), ne(ie(o.prependIcon)), null, 16)
|
|
1660
1663
|
])) : I("", !0),
|
|
1661
1664
|
m(e.$slots, "prepend")
|
|
1662
1665
|
])) : I("", !0),
|
|
1663
1666
|
m(e.$slots, "default"),
|
|
1664
|
-
e.$slots.append ||
|
|
1665
|
-
|
|
1666
|
-
A(v(te),
|
|
1667
|
+
e.$slots.append || o.appendIcon ? (u(), p("div", ro, [
|
|
1668
|
+
o.appendIcon ? (u(), p("span", uo, [
|
|
1669
|
+
A(v(te), ne(ie(o.appendIcon)), null, 16)
|
|
1667
1670
|
])) : I("", !0),
|
|
1668
1671
|
m(e.$slots, "append")
|
|
1669
1672
|
])) : I("", !0)
|
|
@@ -1671,24 +1674,24 @@ const Ot = ["role"], Ut = {
|
|
|
1671
1674
|
_: 3
|
|
1672
1675
|
}, 8, ["id", "class", "label", "required", "size"]));
|
|
1673
1676
|
}
|
|
1674
|
-
}),
|
|
1677
|
+
}), zo = B(co), fo = /* @__PURE__ */ S({
|
|
1675
1678
|
__name: "QLineLoader",
|
|
1676
1679
|
props: {
|
|
1677
1680
|
class: { default: void 0 }
|
|
1678
1681
|
},
|
|
1679
1682
|
setup(t) {
|
|
1680
|
-
const
|
|
1681
|
-
return (e,
|
|
1682
|
-
class: E(["q-line-loader",
|
|
1683
|
+
const o = t;
|
|
1684
|
+
return (e, n) => (u(), p("div", {
|
|
1685
|
+
class: E(["q-line-loader", o.class])
|
|
1683
1686
|
}, null, 2));
|
|
1684
1687
|
}
|
|
1685
|
-
}),
|
|
1688
|
+
}), Co = B(fo), po = {
|
|
1686
1689
|
key: 0,
|
|
1687
1690
|
class: "q-popover__header"
|
|
1688
|
-
},
|
|
1691
|
+
}, mo = {
|
|
1689
1692
|
key: 1,
|
|
1690
1693
|
class: "q-popover__body"
|
|
1691
|
-
},
|
|
1694
|
+
}, vo = ["innerHTML"], ho = { key: 1 }, bo = /* @__PURE__ */ S({
|
|
1692
1695
|
inheritAttrs: !1,
|
|
1693
1696
|
__name: "QPopover",
|
|
1694
1697
|
props: /* @__PURE__ */ H({
|
|
@@ -1706,52 +1709,52 @@ const Ot = ["role"], Ut = {
|
|
|
1706
1709
|
}),
|
|
1707
1710
|
emits: ["update:modelValue"],
|
|
1708
1711
|
setup(t) {
|
|
1709
|
-
const
|
|
1710
|
-
return (
|
|
1712
|
+
const o = t, e = X(t, "modelValue");
|
|
1713
|
+
return (n, a) => (u(), V(v(he), {
|
|
1711
1714
|
"model-value": e.value,
|
|
1712
1715
|
class: "q-popover",
|
|
1713
1716
|
trigger: "click",
|
|
1714
|
-
anchor:
|
|
1715
|
-
arrow:
|
|
1716
|
-
attach:
|
|
1717
|
-
disabled:
|
|
1718
|
-
placement:
|
|
1717
|
+
anchor: o.anchor,
|
|
1718
|
+
arrow: o.arrow,
|
|
1719
|
+
attach: o.attach,
|
|
1720
|
+
disabled: o.disabled,
|
|
1721
|
+
placement: o.placement
|
|
1719
1722
|
}, {
|
|
1720
1723
|
default: _(() => [
|
|
1721
|
-
|
|
1722
|
-
ue(N(
|
|
1723
|
-
m(
|
|
1724
|
+
o.title || n.$slots.header ? (u(), p("h3", po, [
|
|
1725
|
+
ue(N(o.title) + " ", 1),
|
|
1726
|
+
m(n.$slots, "header")
|
|
1724
1727
|
])) : I("", !0),
|
|
1725
|
-
|
|
1726
|
-
|
|
1728
|
+
o.text || n.$slots.body ? (u(), p("div", mo, [
|
|
1729
|
+
o.html ? (u(), p("span", {
|
|
1727
1730
|
key: 0,
|
|
1728
|
-
innerHTML:
|
|
1729
|
-
}, null, 8,
|
|
1730
|
-
m(
|
|
1731
|
+
innerHTML: o.text
|
|
1732
|
+
}, null, 8, vo)) : (u(), p("span", ho, N(o.text), 1)),
|
|
1733
|
+
m(n.$slots, "body")
|
|
1731
1734
|
])) : I("", !0)
|
|
1732
1735
|
]),
|
|
1733
1736
|
_: 3
|
|
1734
1737
|
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement"]));
|
|
1735
1738
|
}
|
|
1736
|
-
}),
|
|
1739
|
+
}), Qo = B(bo), yo = {
|
|
1737
1740
|
key: 0,
|
|
1738
1741
|
class: "q-select__value"
|
|
1739
|
-
},
|
|
1742
|
+
}, go = {
|
|
1740
1743
|
key: 1,
|
|
1741
1744
|
class: "q-select__placeholder"
|
|
1742
|
-
},
|
|
1745
|
+
}, _o = ["data-key"], ko = {
|
|
1743
1746
|
key: 0,
|
|
1744
1747
|
class: "q-select__loader"
|
|
1745
|
-
},
|
|
1748
|
+
}, wo = {
|
|
1746
1749
|
placeholder: "Choose..."
|
|
1747
|
-
},
|
|
1750
|
+
}, $o = {
|
|
1748
1751
|
chevron: {
|
|
1749
1752
|
icon: "chevron-down"
|
|
1750
1753
|
},
|
|
1751
1754
|
clear: {
|
|
1752
1755
|
icon: "close"
|
|
1753
1756
|
}
|
|
1754
|
-
},
|
|
1757
|
+
}, qo = /* @__PURE__ */ S({
|
|
1755
1758
|
__name: "QSelect",
|
|
1756
1759
|
props: /* @__PURE__ */ H({
|
|
1757
1760
|
id: { default: void 0 },
|
|
@@ -1761,14 +1764,14 @@ const Ot = ["role"], Ut = {
|
|
|
1761
1764
|
disabled: { type: Boolean },
|
|
1762
1765
|
required: { type: Boolean },
|
|
1763
1766
|
loading: { type: Boolean },
|
|
1764
|
-
icons: { default: () =>
|
|
1767
|
+
icons: { default: () => $o },
|
|
1765
1768
|
items: {},
|
|
1766
1769
|
groups: { default: () => [] },
|
|
1767
1770
|
itemValue: { default: "key" },
|
|
1768
1771
|
itemLabel: { default: "label" },
|
|
1769
1772
|
emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
1770
1773
|
size: { default: void 0 },
|
|
1771
|
-
texts: { default: () =>
|
|
1774
|
+
texts: { default: () => wo },
|
|
1772
1775
|
class: { default: "" }
|
|
1773
1776
|
}, {
|
|
1774
1777
|
modelValue: {
|
|
@@ -1777,8 +1780,8 @@ const Ot = ["role"], Ut = {
|
|
|
1777
1780
|
modelModifiers: {}
|
|
1778
1781
|
}),
|
|
1779
1782
|
emits: /* @__PURE__ */ H(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
|
|
1780
|
-
setup(t, { emit:
|
|
1781
|
-
const e = t,
|
|
1783
|
+
setup(t, { emit: o }) {
|
|
1784
|
+
const e = t, n = o, a = X(t, "modelValue"), r = T(!1), d = T(""), i = T(null), c = T(null), q = T(null), k = w(() => g.value === void 0), g = w(
|
|
1782
1785
|
() => {
|
|
1783
1786
|
var l;
|
|
1784
1787
|
return (l = e.items) == null ? void 0 : l.find((h) => h[e.itemValue] === a.value);
|
|
@@ -1802,10 +1805,10 @@ const Ot = ["role"], Ut = {
|
|
|
1802
1805
|
!((h = q.value) != null && h.contains(l.relatedTarget)) && !((ee = (O = i.value) == null ? void 0 : O.fieldRef) != null && ee.contains(l.relatedTarget)) && C();
|
|
1803
1806
|
}
|
|
1804
1807
|
function G() {
|
|
1805
|
-
r.value || (
|
|
1808
|
+
r.value || (n("before-show"), r.value = !0);
|
|
1806
1809
|
}
|
|
1807
1810
|
function C() {
|
|
1808
|
-
r.value && (
|
|
1811
|
+
r.value && (n("before-hide"), r.value = !1);
|
|
1809
1812
|
}
|
|
1810
1813
|
function M() {
|
|
1811
1814
|
r.value ? C() : G();
|
|
@@ -1828,16 +1831,16 @@ const Ot = ["role"], Ut = {
|
|
|
1828
1831
|
}
|
|
1829
1832
|
function Z() {
|
|
1830
1833
|
var l;
|
|
1831
|
-
e.loading ? (l = q.value) == null || l.focus() :
|
|
1834
|
+
e.loading ? (l = q.value) == null || l.focus() : y(), n("show");
|
|
1832
1835
|
}
|
|
1833
1836
|
function J() {
|
|
1834
|
-
f(),
|
|
1837
|
+
f(), n("hide");
|
|
1835
1838
|
}
|
|
1836
1839
|
function f() {
|
|
1837
1840
|
var l, h;
|
|
1838
1841
|
(h = (l = i.value) == null ? void 0 : l.fieldRef) == null || h.focus();
|
|
1839
1842
|
}
|
|
1840
|
-
function
|
|
1843
|
+
function y() {
|
|
1841
1844
|
var l;
|
|
1842
1845
|
(l = c.value) == null || l.$el.focus();
|
|
1843
1846
|
}
|
|
@@ -1848,11 +1851,11 @@ const Ot = ["role"], Ut = {
|
|
|
1848
1851
|
return P(
|
|
1849
1852
|
() => e.loading,
|
|
1850
1853
|
(l) => {
|
|
1851
|
-
!l && r.value && U(
|
|
1854
|
+
!l && r.value && U(y);
|
|
1852
1855
|
}
|
|
1853
1856
|
), (l, h) => {
|
|
1854
1857
|
var O, ee;
|
|
1855
|
-
return u(), p(
|
|
1858
|
+
return u(), p(oe, null, [
|
|
1856
1859
|
A(v(qe), {
|
|
1857
1860
|
id: e.id,
|
|
1858
1861
|
label: e.label,
|
|
@@ -1872,6 +1875,7 @@ const Ot = ["role"], Ut = {
|
|
|
1872
1875
|
]),
|
|
1873
1876
|
readonly: e.readonly,
|
|
1874
1877
|
disabled: e.disabled,
|
|
1878
|
+
"data-loading": e.loading,
|
|
1875
1879
|
"aria-expanded": r.value,
|
|
1876
1880
|
"aria-haspopup": "listbox",
|
|
1877
1881
|
size: e.size,
|
|
@@ -1889,7 +1893,7 @@ const Ot = ["role"], Ut = {
|
|
|
1889
1893
|
onClick: L
|
|
1890
1894
|
}, {
|
|
1891
1895
|
default: _(() => [
|
|
1892
|
-
A(v(te),
|
|
1896
|
+
A(v(te), ne(ie(e.icons.clear)), null, 16)
|
|
1893
1897
|
]),
|
|
1894
1898
|
_: 1
|
|
1895
1899
|
})) : I("", !0),
|
|
@@ -1903,17 +1907,17 @@ const Ot = ["role"], Ut = {
|
|
|
1903
1907
|
onClick: M
|
|
1904
1908
|
}, {
|
|
1905
1909
|
default: _(() => [
|
|
1906
|
-
A(v(te),
|
|
1910
|
+
A(v(te), ne(ie(e.icons.chevron)), null, 16)
|
|
1907
1911
|
]),
|
|
1908
1912
|
_: 1
|
|
1909
1913
|
}, 8, ["disabled"]))
|
|
1910
1914
|
]),
|
|
1911
1915
|
default: _(() => [
|
|
1912
|
-
k.value ? (u(), p("span",
|
|
1913
|
-
!e.readonly && !e.disabled ? (u(), p(
|
|
1916
|
+
k.value ? (u(), p("span", go, [
|
|
1917
|
+
!e.readonly && !e.disabled ? (u(), p(oe, { key: 0 }, [
|
|
1914
1918
|
ue(N(l.texts.placeholder), 1)
|
|
1915
1919
|
], 64)) : I("", !0)
|
|
1916
|
-
])) : (u(), p("span",
|
|
1920
|
+
])) : (u(), p("span", yo, N(F.value), 1))
|
|
1917
1921
|
]),
|
|
1918
1922
|
_: 2
|
|
1919
1923
|
}, [
|
|
@@ -1923,7 +1927,7 @@ const Ot = ["role"], Ut = {
|
|
|
1923
1927
|
var j, ve;
|
|
1924
1928
|
return [
|
|
1925
1929
|
m(l.$slots, "prepend"),
|
|
1926
|
-
(j = g.value) != null && j.icon ? (u(), V(v(te),
|
|
1930
|
+
(j = g.value) != null && j.icon ? (u(), V(v(te), ne(se({ key: 0 }, (ve = g.value) == null ? void 0 : ve.icon)), null, 16)) : I("", !0)
|
|
1927
1931
|
];
|
|
1928
1932
|
}),
|
|
1929
1933
|
key: "0"
|
|
@@ -1935,7 +1939,7 @@ const Ot = ["role"], Ut = {
|
|
|
1935
1939
|
]),
|
|
1936
1940
|
key: "1"
|
|
1937
1941
|
} : void 0
|
|
1938
|
-
]), 1032, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "aria-expanded", "size"]),
|
|
1942
|
+
]), 1032, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "data-loading", "aria-expanded", "size"]),
|
|
1939
1943
|
A(v(he), {
|
|
1940
1944
|
modelValue: r.value,
|
|
1941
1945
|
"onUpdate:modelValue": h[1] || (h[1] = (j) => r.value = j),
|
|
@@ -1952,13 +1956,15 @@ const Ot = ["role"], Ut = {
|
|
|
1952
1956
|
Y("div", {
|
|
1953
1957
|
ref_key: "contentRef",
|
|
1954
1958
|
ref: q,
|
|
1959
|
+
"data-testid": "combobox-dropdown",
|
|
1960
|
+
"data-key": e.id,
|
|
1955
1961
|
class: "q-select__body",
|
|
1956
1962
|
tabindex: "-1",
|
|
1957
1963
|
onFocusout: le,
|
|
1958
1964
|
onKeydown: de(R, ["stop"])
|
|
1959
1965
|
}, [
|
|
1960
1966
|
m(l.$slots, "body.prepend"),
|
|
1961
|
-
e.loading ? (u(), p("div",
|
|
1967
|
+
e.loading ? (u(), p("div", ko, [
|
|
1962
1968
|
A(v($e), { size: 24 })
|
|
1963
1969
|
])) : (u(), V(v(Oe), {
|
|
1964
1970
|
key: 1,
|
|
@@ -1981,27 +1987,27 @@ const Ot = ["role"], Ut = {
|
|
|
1981
1987
|
_: 3
|
|
1982
1988
|
}, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
|
|
1983
1989
|
m(l.$slots, "body.append")
|
|
1984
|
-
],
|
|
1990
|
+
], 40, _o)
|
|
1985
1991
|
]),
|
|
1986
1992
|
_: 3
|
|
1987
1993
|
}, 8, ["modelValue", "anchor"])
|
|
1988
1994
|
], 64);
|
|
1989
1995
|
};
|
|
1990
1996
|
}
|
|
1991
|
-
}),
|
|
1997
|
+
}), Ao = B(qo), Io = /* @__PURE__ */ S({
|
|
1992
1998
|
__name: "QThemeProvider",
|
|
1993
1999
|
props: {
|
|
1994
2000
|
theme: {}
|
|
1995
2001
|
},
|
|
1996
2002
|
setup(t) {
|
|
1997
|
-
const
|
|
1998
|
-
return (e,
|
|
1999
|
-
class: E(["q-theme-provider", `q-theme--${
|
|
2003
|
+
const o = t;
|
|
2004
|
+
return (e, n) => (u(), p("div", {
|
|
2005
|
+
class: E(["q-theme-provider", `q-theme--${o.theme}`])
|
|
2000
2006
|
}, [
|
|
2001
2007
|
m(e.$slots, "default")
|
|
2002
2008
|
], 2));
|
|
2003
2009
|
}
|
|
2004
|
-
}),
|
|
2010
|
+
}), Fo = B(Io), Lo = ["innerHTML"], So = { key: 1 }, xo = /* @__PURE__ */ S({
|
|
2005
2011
|
__name: "QTooltip",
|
|
2006
2012
|
props: /* @__PURE__ */ H({
|
|
2007
2013
|
id: { default: void 0 },
|
|
@@ -2022,62 +2028,62 @@ const Ot = ["role"], Ut = {
|
|
|
2022
2028
|
}),
|
|
2023
2029
|
emits: ["update:modelValue"],
|
|
2024
2030
|
setup(t) {
|
|
2025
|
-
const
|
|
2026
|
-
return (a, r) => (u(), p(
|
|
2031
|
+
const o = t, e = X(t, "modelValue"), n = me(o.id);
|
|
2032
|
+
return (a, r) => (u(), p(oe, null, [
|
|
2027
2033
|
m(a.$slots, "anchor", {
|
|
2028
|
-
props: { "aria-describedby": v(
|
|
2034
|
+
props: { "aria-describedby": v(n) }
|
|
2029
2035
|
}),
|
|
2030
2036
|
A(v(he), {
|
|
2031
2037
|
"model-value": e.value,
|
|
2032
|
-
anchor:
|
|
2038
|
+
anchor: o.anchor,
|
|
2033
2039
|
role: "tooltip",
|
|
2034
|
-
id: v(
|
|
2035
|
-
appearance:
|
|
2036
|
-
arrow:
|
|
2037
|
-
attach:
|
|
2038
|
-
class: E(["q-tooltip",
|
|
2039
|
-
delay:
|
|
2040
|
-
disabled:
|
|
2041
|
-
placement:
|
|
2042
|
-
trigger:
|
|
2040
|
+
id: v(n),
|
|
2041
|
+
appearance: o.appearance,
|
|
2042
|
+
arrow: o.arrow,
|
|
2043
|
+
attach: o.attach,
|
|
2044
|
+
class: E(["q-tooltip", o.class]),
|
|
2045
|
+
delay: o.delay,
|
|
2046
|
+
disabled: o.disabled,
|
|
2047
|
+
placement: o.placement,
|
|
2048
|
+
trigger: o.trigger
|
|
2043
2049
|
}, {
|
|
2044
2050
|
default: _(() => [
|
|
2045
|
-
|
|
2051
|
+
o.html ? (u(), p("span", {
|
|
2046
2052
|
key: 0,
|
|
2047
|
-
innerHTML:
|
|
2048
|
-
}, null, 8,
|
|
2053
|
+
innerHTML: o.text
|
|
2054
|
+
}, null, 8, Lo)) : (u(), p("span", So, N(o.text), 1))
|
|
2049
2055
|
]),
|
|
2050
2056
|
_: 1
|
|
2051
2057
|
}, 8, ["model-value", "anchor", "id", "appearance", "arrow", "attach", "class", "delay", "disabled", "placement", "trigger"])
|
|
2052
2058
|
], 64));
|
|
2053
2059
|
}
|
|
2054
|
-
}),
|
|
2060
|
+
}), Mo = B(xo);
|
|
2055
2061
|
export {
|
|
2056
2062
|
fe as QButton,
|
|
2057
2063
|
vt as QButtonGroup,
|
|
2058
|
-
|
|
2059
|
-
|
|
2064
|
+
To as QButtonToggle,
|
|
2065
|
+
Do as QCombobox,
|
|
2060
2066
|
qe as QField,
|
|
2061
2067
|
te as QIcon,
|
|
2062
2068
|
It as QIconFont,
|
|
2063
2069
|
Lt as QIconImg,
|
|
2064
2070
|
St as QIconSvg,
|
|
2065
|
-
|
|
2066
|
-
|
|
2071
|
+
zo as QInputGroup,
|
|
2072
|
+
Co as QLineLoader,
|
|
2067
2073
|
Oe as QList,
|
|
2068
2074
|
At as QListItem,
|
|
2069
2075
|
Ft as QListItemGroup,
|
|
2070
2076
|
he as QOverlay,
|
|
2071
|
-
|
|
2072
|
-
|
|
2077
|
+
Qo as QPopover,
|
|
2078
|
+
Ao as QSelect,
|
|
2073
2079
|
$e as QSpinnerLoader,
|
|
2074
2080
|
Jt as QTextField,
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2081
|
+
Fo as QThemeProvider,
|
|
2082
|
+
Mo as QTooltip,
|
|
2083
|
+
Eo as createFramework,
|
|
2078
2084
|
Je as defaultDarkColorScheme,
|
|
2079
2085
|
Be as defaultLightColorScheme,
|
|
2080
|
-
|
|
2086
|
+
Vo as provideTheme,
|
|
2081
2087
|
Ze as useTheme
|
|
2082
2088
|
};
|
|
2083
2089
|
//# sourceMappingURL=ui.esm.js.map
|