@quidgest/ui 0.7.23 → 0.8.1
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.d.ts +94 -61
- package/dist/ui.css +75 -68
- package/dist/ui.esm.js +991 -1012
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +5 -4
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +99 -110
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +107 -98
- package/package.json +1 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,61 +1,71 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
function
|
|
3
|
-
return
|
|
1
|
+
import { getCurrentInstance as Be, computed as k, ref as q, provide as Se, inject as xe, watch as F, defineComponent as B, openBlock as u, createElementBlock as v, normalizeClass as V, normalizeStyle as se, createElementVNode as P, withModifiers as te, createVNode as j, unref as y, createCommentVNode as L, Fragment as J, createTextVNode as oe, toDisplayString as M, renderSlot as b, toRef as ge, createBlock as x, withCtx as $, renderList as ce, resolveDynamicComponent as Ve, h as _e, normalizeProps as re, mergeProps as Z, reactive as Fe, onBeforeUnmount as Re, onMounted as Ee, nextTick as W, Teleport as Oe, Transition as Ue, withKeys as Me, createSlots as pe, withDirectives as Ne, vModelDynamic as He, guardReactiveProps as ke } from "vue";
|
|
2
|
+
function fe(t) {
|
|
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
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function we(t) {
|
|
6
|
+
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function me(t = {}, n = {}) {
|
|
9
9
|
const o = {};
|
|
10
|
-
for (const e in
|
|
11
|
-
o[e] =
|
|
12
|
-
for (const e in
|
|
13
|
-
const l =
|
|
14
|
-
if (
|
|
15
|
-
o[e] =
|
|
10
|
+
for (const e in t)
|
|
11
|
+
o[e] = t[e];
|
|
12
|
+
for (const e in n) {
|
|
13
|
+
const l = t[e], r = n[e];
|
|
14
|
+
if (we(l) && we(r)) {
|
|
15
|
+
o[e] = me(
|
|
16
16
|
l,
|
|
17
|
-
|
|
17
|
+
r
|
|
18
18
|
);
|
|
19
19
|
continue;
|
|
20
20
|
}
|
|
21
|
-
o[e] =
|
|
21
|
+
o[e] = r;
|
|
22
22
|
}
|
|
23
23
|
return o;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
if (!n)
|
|
30
|
-
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
31
|
-
const t = n.type.name ?? n.type.__name;
|
|
25
|
+
const ve = "q-defaults";
|
|
26
|
+
function Ke() {
|
|
27
|
+
var r, s;
|
|
28
|
+
const t = Be();
|
|
32
29
|
if (!t)
|
|
30
|
+
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
31
|
+
const n = t.type.name ?? t.type.__name;
|
|
32
|
+
if (!n)
|
|
33
33
|
throw new Error("[Quidgest UI] Could not determine component name");
|
|
34
|
-
const o =
|
|
35
|
-
return
|
|
34
|
+
const o = Te(), e = (r = o.value) == null ? void 0 : r.Global, l = (s = o.value) == null ? void 0 : s[n];
|
|
35
|
+
return k(() => me(e, l));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
if (
|
|
37
|
+
function De(t) {
|
|
38
|
+
if (fe(t))
|
|
39
39
|
return;
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const n = Te(), o = q(t), e = k(() => fe(o.value) ? n.value : me(n.value, o.value));
|
|
41
|
+
Se(ve, e);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
43
|
+
function Te() {
|
|
44
|
+
const t = xe(ve, void 0);
|
|
45
|
+
if (!t)
|
|
46
46
|
throw new Error("[Quidgest UI] Could not find defaults instance");
|
|
47
|
-
return
|
|
47
|
+
return t;
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
const ae = "q-theme";
|
|
50
|
+
function Ge() {
|
|
51
|
+
const t = xe(ae);
|
|
52
|
+
if (!t)
|
|
53
|
+
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
54
|
+
return t;
|
|
55
|
+
}
|
|
56
|
+
function wn(t) {
|
|
57
|
+
const n = Ge(), o = {
|
|
58
|
+
activeTheme: q(t),
|
|
59
|
+
themes: n.themes
|
|
60
|
+
};
|
|
61
|
+
return Se(ae, o), o;
|
|
62
|
+
}
|
|
63
|
+
const $e = {
|
|
64
|
+
primary: "#007dbe",
|
|
65
|
+
primaryLight: "#cde5ff",
|
|
66
|
+
primaryDark: "#006398",
|
|
67
|
+
secondary: "#001d31",
|
|
68
|
+
highlight: "#be4300",
|
|
59
69
|
info: "#17a2b8",
|
|
60
70
|
infoLight: "#bceff7",
|
|
61
71
|
infoDark: "#11798a",
|
|
@@ -68,6 +78,11 @@ const Ie = {
|
|
|
68
78
|
danger: "#b71c1c",
|
|
69
79
|
dangerLight: "#f5bebe",
|
|
70
80
|
dangerDark: "#891515",
|
|
81
|
+
background: "#fff",
|
|
82
|
+
container: "#fff",
|
|
83
|
+
neutral: "#72787e",
|
|
84
|
+
neutralLight: "#c2c7ce",
|
|
85
|
+
neutralDark: "#2b3137",
|
|
71
86
|
onBackground: "#1e2436",
|
|
72
87
|
onPrimary: "#fff",
|
|
73
88
|
onSecondary: "#fff",
|
|
@@ -76,16 +91,12 @@ const Ie = {
|
|
|
76
91
|
onWarning: "#fff",
|
|
77
92
|
onDanger: "#fff",
|
|
78
93
|
onInfo: "#fff"
|
|
79
|
-
},
|
|
94
|
+
}, We = {
|
|
80
95
|
primary: "#018BD2",
|
|
81
96
|
primaryLight: "#cce7f6",
|
|
82
97
|
primaryDark: "#006fac",
|
|
83
98
|
secondary: "#11294d",
|
|
84
|
-
secondaryLight: "#707f94",
|
|
85
|
-
secondaryDark: "#040a13",
|
|
86
99
|
highlight: "#FFAD54",
|
|
87
|
-
background: "#1e2436",
|
|
88
|
-
container: "#21323d",
|
|
89
100
|
info: "#3DB6D1",
|
|
90
101
|
infoLight: "#5aa2bc",
|
|
91
102
|
infoDark: "#0c616a",
|
|
@@ -98,6 +109,11 @@ const Ie = {
|
|
|
98
109
|
danger: "#FC4B6C",
|
|
99
110
|
dangerLight: "#FF7A88",
|
|
100
111
|
dangerDark: "#B21929",
|
|
112
|
+
background: "#1e2436",
|
|
113
|
+
container: "#21323d",
|
|
114
|
+
neutral: "#dee3eb",
|
|
115
|
+
neutralLight: "#2b3137",
|
|
116
|
+
neutralDark: "#ecf1f9",
|
|
101
117
|
onBackground: "#fff",
|
|
102
118
|
onPrimary: "#fff",
|
|
103
119
|
onSecondary: "#fff",
|
|
@@ -107,164 +123,92 @@ const Ie = {
|
|
|
107
123
|
onDanger: "#fff",
|
|
108
124
|
onInfo: "#fff"
|
|
109
125
|
};
|
|
110
|
-
function
|
|
111
|
-
|
|
112
|
-
throw new Error("Invalid color format");
|
|
113
|
-
n.length === 4 && (n = "#" + n[1] + n[1] + n[2] + n[2] + n[3] + n[3]);
|
|
114
|
-
const t = parseInt(n.slice(1, 3), 16), o = parseInt(n.slice(3, 5), 16), e = parseInt(n.slice(5, 7), 16);
|
|
115
|
-
return { r: t, g: o, b: e };
|
|
126
|
+
function je(t) {
|
|
127
|
+
return /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t);
|
|
116
128
|
}
|
|
117
|
-
function Pe(
|
|
118
|
-
if (t
|
|
119
|
-
throw new Error("
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return o.l = o.l + e * (100 - o.l), Ae(o);
|
|
129
|
+
function Pe(t) {
|
|
130
|
+
if (!je(t))
|
|
131
|
+
throw new Error("Invalid color format");
|
|
132
|
+
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
133
|
+
const n = parseInt(t.slice(1, 3), 16), o = parseInt(t.slice(3, 5), 16), e = parseInt(t.slice(5, 7), 16);
|
|
134
|
+
return { r: n, g: o, b: e };
|
|
124
135
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
127
|
-
throw new Error("Amount must be in the range [0, 100]");
|
|
128
|
-
if (t === 0)
|
|
129
|
-
return n;
|
|
130
|
-
const o = Fe(n), e = t / 100;
|
|
131
|
-
return o.l = o.l - e * o.l, Ae(o);
|
|
136
|
+
function ze(t) {
|
|
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();
|
|
132
138
|
}
|
|
133
|
-
function
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
function Xe() {
|
|
140
|
+
let t = document.getElementById(
|
|
141
|
+
ae
|
|
142
|
+
);
|
|
143
|
+
return t || (t = document.createElement("style"), t.id = ae, document.head.appendChild(t)), t;
|
|
136
144
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
r /= 6;
|
|
145
|
+
function Ye(t) {
|
|
146
|
+
let n = "";
|
|
147
|
+
for (const e of t) {
|
|
148
|
+
n += `.q-theme--${e.name} {
|
|
149
|
+
`;
|
|
150
|
+
const l = e.scheme;
|
|
151
|
+
let r;
|
|
152
|
+
for (r in l) {
|
|
153
|
+
const s = l[r];
|
|
154
|
+
if (s) {
|
|
155
|
+
n += ` ${qe(r)}: ${s};
|
|
156
|
+
`;
|
|
157
|
+
const d = Pe(s);
|
|
158
|
+
n += ` ${qe(r)}-rgb: ${d.r} ${d.g} ${d.b};
|
|
159
|
+
`;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
n += `}
|
|
163
|
+
`;
|
|
157
164
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
s: Math.round(i * 100),
|
|
161
|
-
l: Math.round(p * 100)
|
|
162
|
-
};
|
|
165
|
+
const o = Xe();
|
|
166
|
+
o.textContent = n;
|
|
163
167
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
-
let l, a, r;
|
|
167
|
-
if (o === 0)
|
|
168
|
-
l = a = r = e;
|
|
169
|
-
else {
|
|
170
|
-
const i = e < 0.5 ? e * (1 + o) : e + o - e * o, p = 2 * e - i;
|
|
171
|
-
l = fe(p, i, t + 1 / 3), a = fe(p, i, t), r = fe(p, i, t - 1 / 3);
|
|
172
|
-
}
|
|
173
|
-
return {
|
|
174
|
-
r: Math.round(l * 255),
|
|
175
|
-
g: Math.round(a * 255),
|
|
176
|
-
b: Math.round(r * 255)
|
|
177
|
-
};
|
|
168
|
+
function qe(t) {
|
|
169
|
+
return t ? `--q-theme-${ze(t)}` : "";
|
|
178
170
|
}
|
|
179
|
-
function
|
|
180
|
-
return
|
|
171
|
+
function $n(t = {}) {
|
|
172
|
+
return { install: (o) => {
|
|
173
|
+
const e = t.components || {};
|
|
174
|
+
for (const r in e)
|
|
175
|
+
o.component(r, e[r]);
|
|
176
|
+
const l = t.defaults || {};
|
|
177
|
+
o.provide(ve, q(l)), Ze(o, t.themes);
|
|
178
|
+
} };
|
|
181
179
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
function Ze(t, n) {
|
|
181
|
+
const o = [];
|
|
182
|
+
let e;
|
|
185
183
|
if (!n)
|
|
186
|
-
|
|
187
|
-
return n;
|
|
188
|
-
}
|
|
189
|
-
function Je(n, t) {
|
|
190
|
-
let o = null;
|
|
191
|
-
if (t)
|
|
192
|
-
for (const e of t.themes) {
|
|
193
|
-
const l = e.mode === "light" ? Ie : Ye;
|
|
194
|
-
if (e.colors) {
|
|
195
|
-
let a;
|
|
196
|
-
for (a in e.colors) {
|
|
197
|
-
const r = e.colors[a];
|
|
198
|
-
if (r && !a.startsWith("on") && !a.endsWith("Light") && !a.endsWith("Dark")) {
|
|
199
|
-
const i = Ce(r), p = `${a}Light`, m = `${a}Dark`;
|
|
200
|
-
p in e.colors || (e.colors[p] = qe(Pe(i, 85))), m in e.colors || (e.colors[m] = qe(Ze(i, 25)));
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
e.colors = et(l, e.colors), e.name === t.defaultTheme && (o = e);
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
const e = "default";
|
|
208
|
-
o = {
|
|
184
|
+
e = "default", o.push({
|
|
209
185
|
name: e,
|
|
210
186
|
mode: "light",
|
|
211
|
-
|
|
212
|
-
}, t = {
|
|
213
|
-
defaultTheme: e,
|
|
214
|
-
themes: [o]
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
if (o) {
|
|
218
|
-
const e = q({
|
|
219
|
-
activeTheme: o.name,
|
|
220
|
-
themes: t.themes
|
|
187
|
+
scheme: $e
|
|
221
188
|
});
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
re
|
|
238
|
-
);
|
|
239
|
-
t || (t = document.createElement("style"), t.type = "text/css", t.id = re, document.head.appendChild(t));
|
|
240
|
-
let o = `:root {
|
|
241
|
-
`, e;
|
|
242
|
-
for (e in n) {
|
|
243
|
-
const l = n[e];
|
|
244
|
-
if (l) {
|
|
245
|
-
o += ` ${Se(e)}: ${l};
|
|
246
|
-
`;
|
|
247
|
-
const a = Ce(l);
|
|
248
|
-
o += ` ${Se(e)}-rgb: ${a.r} ${a.g} ${a.b};
|
|
249
|
-
`;
|
|
250
|
-
}
|
|
189
|
+
else
|
|
190
|
+
for (const l of n.themes) {
|
|
191
|
+
const s = { ...l.mode === "light" ? $e : We, ...l.colors };
|
|
192
|
+
o.push({
|
|
193
|
+
name: l.name,
|
|
194
|
+
mode: l.mode,
|
|
195
|
+
scheme: s
|
|
196
|
+
}), l.name === n.defaultTheme && (e = l.name);
|
|
197
|
+
}
|
|
198
|
+
if (e) {
|
|
199
|
+
const l = {
|
|
200
|
+
activeTheme: q(e),
|
|
201
|
+
themes: o
|
|
202
|
+
};
|
|
203
|
+
Ye(o), F(l.activeTheme, Je, { immediate: !0 }), t.provide(ae, l);
|
|
251
204
|
}
|
|
252
|
-
o += "}", t.textContent = o;
|
|
253
205
|
}
|
|
254
|
-
function
|
|
255
|
-
|
|
206
|
+
function Je(t) {
|
|
207
|
+
const n = document.documentElement, e = Array.from(n.classList).filter((l) => !l.startsWith("q-theme"));
|
|
208
|
+
n.className = e.join(" "), n.classList.add(`q-theme--${t}`);
|
|
256
209
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
const e = n.components || {};
|
|
260
|
-
for (const a in e)
|
|
261
|
-
o.component(a, e[a]);
|
|
262
|
-
const l = n.defaults || {};
|
|
263
|
-
o.provide(ye, q(l)), Je(o, n.themes);
|
|
264
|
-
} };
|
|
265
|
-
}
|
|
266
|
-
const nt = /* @__PURE__ */ W("svg", { viewBox: "25 25 50 50" }, [
|
|
267
|
-
/* @__PURE__ */ W("circle", {
|
|
210
|
+
const et = /* @__PURE__ */ P("svg", { viewBox: "25 25 50 50" }, [
|
|
211
|
+
/* @__PURE__ */ P("circle", {
|
|
268
212
|
class: "path",
|
|
269
213
|
cx: "50",
|
|
270
214
|
cy: "50",
|
|
@@ -274,51 +218,52 @@ const nt = /* @__PURE__ */ W("svg", { viewBox: "25 25 50 50" }, [
|
|
|
274
218
|
"stroke-width": "5",
|
|
275
219
|
"stroke-miterlimit": "10"
|
|
276
220
|
})
|
|
277
|
-
], -1),
|
|
278
|
-
|
|
279
|
-
],
|
|
221
|
+
], -1), tt = [
|
|
222
|
+
et
|
|
223
|
+
], nt = /* @__PURE__ */ B({
|
|
280
224
|
__name: "QSpinnerLoader",
|
|
281
225
|
props: {
|
|
282
226
|
size: { default: 48 },
|
|
283
227
|
class: { default: void 0 }
|
|
284
228
|
},
|
|
285
|
-
setup(
|
|
286
|
-
const
|
|
287
|
-
"font-size":
|
|
229
|
+
setup(t) {
|
|
230
|
+
const n = t, o = k(() => ({
|
|
231
|
+
"font-size": n.size !== 48 ? `${n.size}px` : void 0
|
|
288
232
|
}));
|
|
289
|
-
return (e, l) => (
|
|
290
|
-
class:
|
|
233
|
+
return (e, l) => (u(), v("div", {
|
|
234
|
+
class: V(["q-spinner-loader", n.class]),
|
|
291
235
|
style: se(o.value)
|
|
292
|
-
},
|
|
236
|
+
}, tt, 6));
|
|
293
237
|
}
|
|
294
238
|
});
|
|
295
|
-
function
|
|
296
|
-
var
|
|
297
|
-
|
|
239
|
+
function lt(t, n) {
|
|
240
|
+
var e;
|
|
241
|
+
const o = ze(n);
|
|
242
|
+
return o ? typeof ((e = t.props) == null ? void 0 : e[o]) < "u" : !1;
|
|
298
243
|
}
|
|
299
|
-
function
|
|
300
|
-
const
|
|
301
|
-
return
|
|
302
|
-
const l =
|
|
303
|
-
if (
|
|
304
|
-
return
|
|
305
|
-
const
|
|
306
|
-
if (
|
|
307
|
-
return
|
|
308
|
-
const
|
|
309
|
-
get(
|
|
310
|
-
var
|
|
311
|
-
const
|
|
312
|
-
return typeof
|
|
244
|
+
function S(t) {
|
|
245
|
+
const n = t.setup;
|
|
246
|
+
return n && (t.setup = (o, e) => {
|
|
247
|
+
const l = Ke();
|
|
248
|
+
if (fe(l.value))
|
|
249
|
+
return n(o, e);
|
|
250
|
+
const r = Be();
|
|
251
|
+
if (r === null)
|
|
252
|
+
return n(o, e);
|
|
253
|
+
const s = new Proxy(o, {
|
|
254
|
+
get(d, m) {
|
|
255
|
+
var p;
|
|
256
|
+
const h = Reflect.get(d, m), _ = (p = l.value) == null ? void 0 : p[m];
|
|
257
|
+
return typeof m == "string" && !lt(r.vnode, m) ? _ ?? h : h;
|
|
313
258
|
}
|
|
314
259
|
});
|
|
315
|
-
return
|
|
316
|
-
}),
|
|
260
|
+
return n(s, e);
|
|
261
|
+
}), t;
|
|
317
262
|
}
|
|
318
|
-
const
|
|
263
|
+
const he = S(nt), ot = ["disabled"], at = {
|
|
319
264
|
key: 0,
|
|
320
265
|
class: "q-btn__spinner"
|
|
321
|
-
},
|
|
266
|
+
}, st = { class: "q-btn__content" }, it = /* @__PURE__ */ B({
|
|
322
267
|
__name: "QButton",
|
|
323
268
|
props: {
|
|
324
269
|
active: { type: Boolean },
|
|
@@ -334,17 +279,17 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
334
279
|
class: { default: void 0 }
|
|
335
280
|
},
|
|
336
281
|
emits: ["click"],
|
|
337
|
-
setup(
|
|
338
|
-
const o =
|
|
339
|
-
function
|
|
340
|
-
l.value || o("click",
|
|
282
|
+
setup(t, { emit: n }) {
|
|
283
|
+
const o = n, e = t, l = k(() => e.disabled || e.loading);
|
|
284
|
+
function r(d) {
|
|
285
|
+
l.value || o("click", d);
|
|
341
286
|
}
|
|
342
|
-
const
|
|
343
|
-
const
|
|
287
|
+
const s = k(() => {
|
|
288
|
+
const d = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
|
|
344
289
|
return [
|
|
345
290
|
"q-btn",
|
|
346
291
|
`q-btn--${e.bStyle}`,
|
|
347
|
-
|
|
292
|
+
d,
|
|
348
293
|
{
|
|
349
294
|
"q-btn--active": e.active,
|
|
350
295
|
"q-btn--borderless": e.borderless,
|
|
@@ -355,57 +300,56 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
355
300
|
e.class
|
|
356
301
|
];
|
|
357
302
|
});
|
|
358
|
-
return (
|
|
303
|
+
return (d, m) => (u(), v("button", {
|
|
359
304
|
type: "button",
|
|
360
|
-
class:
|
|
305
|
+
class: V(s.value),
|
|
361
306
|
disabled: l.value,
|
|
362
|
-
onClick:
|
|
307
|
+
onClick: te(r, ["stop", "prevent"])
|
|
363
308
|
}, [
|
|
364
|
-
|
|
365
|
-
|
|
309
|
+
d.loading ? (u(), v("div", at, [
|
|
310
|
+
j(y(he), { size: 20 })
|
|
366
311
|
])) : L("", !0),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
312
|
+
P("span", st, [
|
|
313
|
+
d.iconOnRight ? (u(), v(J, { key: 0 }, [
|
|
314
|
+
oe(M(e.label), 1)
|
|
370
315
|
], 64)) : L("", !0),
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
316
|
+
b(d.$slots, "default"),
|
|
317
|
+
d.iconOnRight ? L("", !0) : (u(), v(J, { key: 1 }, [
|
|
318
|
+
oe(M(e.label), 1)
|
|
374
319
|
], 64))
|
|
375
320
|
])
|
|
376
|
-
], 10,
|
|
321
|
+
], 10, ot));
|
|
377
322
|
}
|
|
378
|
-
}),
|
|
323
|
+
}), rt = S(it), dt = /* @__PURE__ */ B({
|
|
379
324
|
__name: "QButtonGroup",
|
|
380
325
|
props: {
|
|
381
|
-
bStyle: { default: void 0 },
|
|
382
326
|
disabled: { type: Boolean },
|
|
383
327
|
borderless: { type: Boolean },
|
|
384
328
|
elevated: { type: Boolean },
|
|
385
329
|
class: { default: void 0 }
|
|
386
330
|
},
|
|
387
|
-
setup(
|
|
388
|
-
const
|
|
389
|
-
return
|
|
331
|
+
setup(t) {
|
|
332
|
+
const n = t;
|
|
333
|
+
return De({
|
|
390
334
|
QButton: {
|
|
391
|
-
bStyle:
|
|
392
|
-
disabled:
|
|
393
|
-
borderless:
|
|
335
|
+
bStyle: "secondary",
|
|
336
|
+
disabled: ge(n, "disabled"),
|
|
337
|
+
borderless: ge(n, "borderless"),
|
|
394
338
|
elevated: !1
|
|
395
339
|
}
|
|
396
|
-
}), (o, e) => (
|
|
397
|
-
class:
|
|
340
|
+
}), (o, e) => (u(), v("div", {
|
|
341
|
+
class: V([
|
|
398
342
|
"q-btn-group",
|
|
399
343
|
{
|
|
400
|
-
"q-btn-group--elevated":
|
|
344
|
+
"q-btn-group--elevated": n.elevated
|
|
401
345
|
},
|
|
402
|
-
|
|
346
|
+
n.class
|
|
403
347
|
])
|
|
404
348
|
}, [
|
|
405
|
-
|
|
349
|
+
b(o.$slots, "default")
|
|
406
350
|
], 2));
|
|
407
351
|
}
|
|
408
|
-
}),
|
|
352
|
+
}), ut = S(dt), ct = /* @__PURE__ */ B({
|
|
409
353
|
__name: "QButtonToggle",
|
|
410
354
|
props: {
|
|
411
355
|
modelValue: {},
|
|
@@ -413,44 +357,44 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
413
357
|
disabled: { type: Boolean },
|
|
414
358
|
borderless: { type: Boolean },
|
|
415
359
|
elevated: { type: Boolean },
|
|
416
|
-
|
|
360
|
+
required: { type: Boolean },
|
|
417
361
|
class: {}
|
|
418
362
|
},
|
|
419
363
|
emits: ["update:modelValue"],
|
|
420
|
-
setup(
|
|
421
|
-
const o =
|
|
364
|
+
setup(t, { emit: n }) {
|
|
365
|
+
const o = n, e = t, l = q(e.modelValue);
|
|
422
366
|
F(
|
|
423
367
|
() => e.modelValue,
|
|
424
|
-
(
|
|
368
|
+
(d) => l.value = d
|
|
425
369
|
);
|
|
426
|
-
const
|
|
370
|
+
const r = k({
|
|
427
371
|
get() {
|
|
428
372
|
return l.value;
|
|
429
373
|
},
|
|
430
|
-
set(
|
|
431
|
-
l.value =
|
|
374
|
+
set(d) {
|
|
375
|
+
l.value = d, o("update:modelValue", d);
|
|
432
376
|
}
|
|
433
377
|
});
|
|
434
|
-
function
|
|
435
|
-
|
|
378
|
+
function s(d) {
|
|
379
|
+
r.value === d.key && !e.required ? r.value = void 0 : r.value = d.key;
|
|
436
380
|
}
|
|
437
|
-
return (
|
|
381
|
+
return (d, m) => (u(), x(y(ut), {
|
|
438
382
|
"b-style": "secondary",
|
|
439
|
-
class:
|
|
383
|
+
class: V(e.class),
|
|
440
384
|
disabled: e.disabled,
|
|
441
385
|
borderless: e.borderless,
|
|
442
386
|
elevated: e.elevated
|
|
443
387
|
}, {
|
|
444
|
-
default:
|
|
445
|
-
(
|
|
446
|
-
key:
|
|
447
|
-
title:
|
|
448
|
-
label:
|
|
449
|
-
active:
|
|
450
|
-
onClick: () =>
|
|
388
|
+
default: $(() => [
|
|
389
|
+
(u(!0), v(J, null, ce(e.options, (h) => (u(), x(y(rt), {
|
|
390
|
+
key: h.key,
|
|
391
|
+
title: h.title,
|
|
392
|
+
label: h.label,
|
|
393
|
+
active: r.value === h.key,
|
|
394
|
+
onClick: () => s(h)
|
|
451
395
|
}, {
|
|
452
|
-
default:
|
|
453
|
-
|
|
396
|
+
default: $(() => [
|
|
397
|
+
b(d.$slots, h.key)
|
|
454
398
|
]),
|
|
455
399
|
_: 2
|
|
456
400
|
}, 1032, ["title", "label", "active", "onClick"]))), 128))
|
|
@@ -458,7 +402,7 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
458
402
|
_: 3
|
|
459
403
|
}, 8, ["class", "disabled", "borderless", "elevated"]));
|
|
460
404
|
}
|
|
461
|
-
}),
|
|
405
|
+
}), qn = S(ct), ft = /* @__PURE__ */ B({
|
|
462
406
|
__name: "QIcon",
|
|
463
407
|
props: {
|
|
464
408
|
icon: {},
|
|
@@ -466,26 +410,26 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
466
410
|
size: { default: void 0 },
|
|
467
411
|
class: { default: void 0 }
|
|
468
412
|
},
|
|
469
|
-
setup(
|
|
470
|
-
const
|
|
471
|
-
switch (
|
|
413
|
+
setup(t) {
|
|
414
|
+
const n = t, o = k(() => {
|
|
415
|
+
switch (n.type) {
|
|
472
416
|
case "svg":
|
|
473
|
-
return It;
|
|
474
|
-
case "font":
|
|
475
417
|
return wt;
|
|
418
|
+
case "font":
|
|
419
|
+
return _t;
|
|
476
420
|
case "img":
|
|
477
|
-
return
|
|
421
|
+
return kt;
|
|
478
422
|
default:
|
|
479
423
|
return;
|
|
480
424
|
}
|
|
481
425
|
});
|
|
482
|
-
return (e, l) => (
|
|
483
|
-
class:
|
|
484
|
-
icon:
|
|
485
|
-
size:
|
|
426
|
+
return (e, l) => (u(), x(Ve(o.value), {
|
|
427
|
+
class: V(n.class),
|
|
428
|
+
icon: n.icon,
|
|
429
|
+
size: n.size
|
|
486
430
|
}, null, 8, ["class", "icon", "size"]));
|
|
487
431
|
}
|
|
488
|
-
}),
|
|
432
|
+
}), pt = /* @__PURE__ */ B({
|
|
489
433
|
__name: "QIconFont",
|
|
490
434
|
props: {
|
|
491
435
|
icon: {},
|
|
@@ -494,44 +438,44 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
494
438
|
size: { default: void 0 },
|
|
495
439
|
class: { default: void 0 }
|
|
496
440
|
},
|
|
497
|
-
setup(
|
|
498
|
-
const
|
|
499
|
-
"font-size":
|
|
441
|
+
setup(t) {
|
|
442
|
+
const n = t, o = k(() => n.variant ? `${n.library}-${n.variant}` : n.library), e = k(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon), l = k(() => ({
|
|
443
|
+
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
500
444
|
}));
|
|
501
|
-
return (
|
|
502
|
-
class:
|
|
445
|
+
return (r, s) => (u(), v("i", {
|
|
446
|
+
class: V(["q-icon", "q-icon__font", o.value, e.value, n.class]),
|
|
503
447
|
style: se(l.value)
|
|
504
448
|
}, null, 6));
|
|
505
449
|
}
|
|
506
|
-
}),
|
|
450
|
+
}), mt = ["src"], vt = /* @__PURE__ */ B({
|
|
507
451
|
__name: "QIconImg",
|
|
508
452
|
props: {
|
|
509
453
|
icon: {},
|
|
510
454
|
size: {},
|
|
511
455
|
class: {}
|
|
512
456
|
},
|
|
513
|
-
setup(
|
|
514
|
-
const
|
|
515
|
-
"font-size":
|
|
457
|
+
setup(t) {
|
|
458
|
+
const n = t, o = k(() => ({
|
|
459
|
+
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
516
460
|
}));
|
|
517
|
-
return (e, l) => (
|
|
518
|
-
src:
|
|
519
|
-
class:
|
|
461
|
+
return (e, l) => (u(), v("img", {
|
|
462
|
+
src: n.icon,
|
|
463
|
+
class: V(["q-icon", "q-icon__img", n.class]),
|
|
520
464
|
style: se(o.value)
|
|
521
|
-
}, null, 14,
|
|
465
|
+
}, null, 14, mt));
|
|
522
466
|
}
|
|
523
|
-
}), le = {},
|
|
467
|
+
}), le = {}, ht = B({
|
|
524
468
|
name: "InlineSvg",
|
|
525
469
|
emits: ["loaded", "unloaded", "error"],
|
|
526
470
|
inheritAttrs: !1,
|
|
527
471
|
render() {
|
|
528
472
|
if (!this.svgElSource)
|
|
529
473
|
return null;
|
|
530
|
-
const
|
|
531
|
-
if (!
|
|
532
|
-
return
|
|
533
|
-
const
|
|
534
|
-
return this.copySvgAttrs(
|
|
474
|
+
const t = this.getSvgContent(this.svgElSource);
|
|
475
|
+
if (!t)
|
|
476
|
+
return _e("div", this.$attrs);
|
|
477
|
+
const n = {};
|
|
478
|
+
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML, _e("svg", n);
|
|
535
479
|
},
|
|
536
480
|
props: {
|
|
537
481
|
src: {
|
|
@@ -565,30 +509,30 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
565
509
|
await this.getSource(this.src);
|
|
566
510
|
},
|
|
567
511
|
methods: {
|
|
568
|
-
copySvgAttrs(
|
|
569
|
-
const o =
|
|
512
|
+
copySvgAttrs(t, n) {
|
|
513
|
+
const o = n.attributes;
|
|
570
514
|
if (o)
|
|
571
515
|
for (const e of o)
|
|
572
|
-
|
|
516
|
+
t[e.name] = e.value;
|
|
573
517
|
},
|
|
574
|
-
copyComponentAttrs(
|
|
575
|
-
for (const [o, e] of Object.entries(
|
|
576
|
-
e !== !1 && e !== null && e !== void 0 && (
|
|
518
|
+
copyComponentAttrs(t, n) {
|
|
519
|
+
for (const [o, e] of Object.entries(n))
|
|
520
|
+
e !== !1 && e !== null && e !== void 0 && (t[o] = e);
|
|
577
521
|
},
|
|
578
|
-
getSvgContent(
|
|
579
|
-
return this.symbol && (
|
|
522
|
+
getSvgContent(t) {
|
|
523
|
+
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)), bt(t, this.title)), t);
|
|
580
524
|
},
|
|
581
525
|
/**
|
|
582
526
|
* Get svgElSource
|
|
583
527
|
* @param {string} src
|
|
584
528
|
*/
|
|
585
|
-
async getSource(
|
|
529
|
+
async getSource(t) {
|
|
586
530
|
try {
|
|
587
|
-
le[
|
|
588
|
-
const
|
|
589
|
-
this.svgElSource =
|
|
590
|
-
} catch (
|
|
591
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete le[
|
|
531
|
+
le[t] || (le[t] = yt(this.download(t))), this.svgElSource && le[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
532
|
+
const n = await le[t];
|
|
533
|
+
this.svgElSource = n, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
534
|
+
} catch (n) {
|
|
535
|
+
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete le[t], this.$emit("error", n);
|
|
592
536
|
}
|
|
593
537
|
},
|
|
594
538
|
/**
|
|
@@ -596,44 +540,44 @@ const be = V(ot), st = ["disabled"], it = {
|
|
|
596
540
|
* @param {string} url
|
|
597
541
|
* @returns {PromiseWithState<Element>}
|
|
598
542
|
*/
|
|
599
|
-
async download(
|
|
600
|
-
const
|
|
601
|
-
if (!
|
|
543
|
+
async download(t) {
|
|
544
|
+
const n = await fetch(t);
|
|
545
|
+
if (!n.ok)
|
|
602
546
|
throw new Error("Error loading SVG");
|
|
603
|
-
const o = await
|
|
604
|
-
if (!
|
|
547
|
+
const o = await n.text(), r = new DOMParser().parseFromString(o, "text/xml").getElementsByTagName("svg")[0];
|
|
548
|
+
if (!r)
|
|
605
549
|
throw new Error("Loaded file is not a valid SVG");
|
|
606
|
-
return
|
|
550
|
+
return r;
|
|
607
551
|
}
|
|
608
552
|
},
|
|
609
553
|
watch: {
|
|
610
|
-
src(
|
|
611
|
-
this.getSource(
|
|
554
|
+
src(t) {
|
|
555
|
+
this.getSource(t);
|
|
612
556
|
}
|
|
613
557
|
}
|
|
614
558
|
});
|
|
615
|
-
function
|
|
616
|
-
const o =
|
|
559
|
+
function bt(t, n) {
|
|
560
|
+
const o = t.getElementsByTagName("title");
|
|
617
561
|
if (o.length)
|
|
618
|
-
o[0].textContent =
|
|
562
|
+
o[0].textContent = n;
|
|
619
563
|
else {
|
|
620
564
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
621
|
-
e.textContent =
|
|
565
|
+
e.textContent = n, t.insertBefore(e, t.firstChild);
|
|
622
566
|
}
|
|
623
567
|
}
|
|
624
|
-
function
|
|
625
|
-
if (
|
|
626
|
-
return
|
|
627
|
-
let
|
|
628
|
-
const o =
|
|
629
|
-
(e) => (
|
|
568
|
+
function yt(t) {
|
|
569
|
+
if (t.getIsPending)
|
|
570
|
+
return t;
|
|
571
|
+
let n = !0;
|
|
572
|
+
const o = t.then(
|
|
573
|
+
(e) => (n = !1, e),
|
|
630
574
|
(e) => {
|
|
631
|
-
throw
|
|
575
|
+
throw n = !1, e;
|
|
632
576
|
}
|
|
633
577
|
);
|
|
634
|
-
return o.getIsPending = () =>
|
|
578
|
+
return o.getIsPending = () => n, o;
|
|
635
579
|
}
|
|
636
|
-
const
|
|
580
|
+
const gt = /* @__PURE__ */ B({
|
|
637
581
|
__name: "QIconSvg",
|
|
638
582
|
props: {
|
|
639
583
|
icon: {},
|
|
@@ -642,26 +586,26 @@ const kt = /* @__PURE__ */ x({
|
|
|
642
586
|
class: { default: void 0 }
|
|
643
587
|
},
|
|
644
588
|
emits: ["loaded", "unloaded"],
|
|
645
|
-
setup(
|
|
646
|
-
const o =
|
|
589
|
+
setup(t, { emit: n }) {
|
|
590
|
+
const o = n, e = t, l = k(() => ({
|
|
647
591
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
648
592
|
}));
|
|
649
|
-
function
|
|
650
|
-
o("loaded",
|
|
593
|
+
function r(d) {
|
|
594
|
+
o("loaded", d);
|
|
651
595
|
}
|
|
652
|
-
function
|
|
596
|
+
function s() {
|
|
653
597
|
o("unloaded");
|
|
654
598
|
}
|
|
655
|
-
return (
|
|
656
|
-
class:
|
|
599
|
+
return (d, m) => (u(), x(y(ht), {
|
|
600
|
+
class: V(["q-icon", "q-icon__svg", e.class]),
|
|
657
601
|
src: e.bundle,
|
|
658
602
|
symbol: e.icon,
|
|
659
603
|
style: se(l.value),
|
|
660
|
-
onLoaded:
|
|
661
|
-
onUnloaded:
|
|
604
|
+
onLoaded: r,
|
|
605
|
+
onUnloaded: s
|
|
662
606
|
}, null, 8, ["class", "src", "symbol", "style"]));
|
|
663
607
|
}
|
|
664
|
-
}), ee =
|
|
608
|
+
}), ee = S(ft), _t = S(pt), kt = S(vt), wt = S(gt), $t = /* @__PURE__ */ B({
|
|
665
609
|
__name: "QList",
|
|
666
610
|
props: {
|
|
667
611
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -674,145 +618,145 @@ const kt = /* @__PURE__ */ x({
|
|
|
674
618
|
class: { default: void 0 }
|
|
675
619
|
},
|
|
676
620
|
emits: ["update:modelValue"],
|
|
677
|
-
setup(
|
|
678
|
-
const e = o, l =
|
|
679
|
-
function
|
|
680
|
-
|
|
621
|
+
setup(t, { expose: n, emit: o }) {
|
|
622
|
+
const e = o, l = t, r = q(l.modelValue), s = q(!1), d = k(() => m.value.length > 1 ? "div" : "ul"), m = k(() => l.groups.length ? l.groups : [{ id: "", title: "" }]), h = q(null);
|
|
623
|
+
function _(a) {
|
|
624
|
+
r.value = a, e("update:modelValue", a);
|
|
681
625
|
}
|
|
682
|
-
function
|
|
683
|
-
|
|
626
|
+
function p() {
|
|
627
|
+
s.value = !0;
|
|
684
628
|
}
|
|
685
|
-
function
|
|
686
|
-
|
|
629
|
+
function z() {
|
|
630
|
+
s.value = !1;
|
|
687
631
|
}
|
|
688
|
-
function
|
|
689
|
-
var
|
|
690
|
-
if ((
|
|
632
|
+
function T(a) {
|
|
633
|
+
var I;
|
|
634
|
+
if ((I = h.value) != null && I.contains(a.relatedTarget))
|
|
691
635
|
return;
|
|
692
|
-
let
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
O(
|
|
636
|
+
let f;
|
|
637
|
+
r.value ? f = l.items.findIndex((ue) => ue[l.itemValue] === r.value) : f = A();
|
|
638
|
+
const g = s.value;
|
|
639
|
+
O(f, g);
|
|
696
640
|
}
|
|
697
|
-
function
|
|
698
|
-
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
641
|
+
function D(a) {
|
|
642
|
+
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(a.key) && a.preventDefault(), a.key) {
|
|
699
643
|
case "ArrowDown":
|
|
700
|
-
|
|
644
|
+
Q("next");
|
|
701
645
|
break;
|
|
702
646
|
case "ArrowUp":
|
|
703
|
-
|
|
647
|
+
Q("prev");
|
|
704
648
|
break;
|
|
705
649
|
case "Home":
|
|
706
|
-
|
|
650
|
+
Q("first");
|
|
707
651
|
break;
|
|
708
652
|
case "End":
|
|
709
|
-
|
|
653
|
+
Q("last");
|
|
710
654
|
break;
|
|
711
655
|
}
|
|
712
656
|
}
|
|
713
|
-
function
|
|
714
|
-
switch (
|
|
657
|
+
function Q(a) {
|
|
658
|
+
switch (a) {
|
|
715
659
|
case "next":
|
|
716
660
|
case "prev":
|
|
717
|
-
O(
|
|
661
|
+
O(U(a));
|
|
718
662
|
break;
|
|
719
663
|
case "first":
|
|
720
|
-
O(
|
|
664
|
+
O(A());
|
|
721
665
|
break;
|
|
722
666
|
case "last":
|
|
723
|
-
O(
|
|
667
|
+
O(N());
|
|
724
668
|
break;
|
|
725
669
|
}
|
|
726
670
|
}
|
|
727
|
-
function O(
|
|
728
|
-
var
|
|
729
|
-
(
|
|
671
|
+
function O(a, f = !1) {
|
|
672
|
+
var I;
|
|
673
|
+
(I = R()[a]) == null || I.focus({ preventScroll: f });
|
|
730
674
|
}
|
|
731
|
-
function
|
|
732
|
-
var
|
|
733
|
-
const
|
|
734
|
-
return
|
|
675
|
+
function R() {
|
|
676
|
+
var f;
|
|
677
|
+
const a = (f = h.value) == null ? void 0 : f.querySelectorAll("li");
|
|
678
|
+
return a ? Array.from(a) : [];
|
|
735
679
|
}
|
|
736
|
-
function
|
|
737
|
-
return
|
|
680
|
+
function C(a) {
|
|
681
|
+
return R()[a];
|
|
738
682
|
}
|
|
739
|
-
function
|
|
740
|
-
return
|
|
683
|
+
function X() {
|
|
684
|
+
return R().indexOf(document.activeElement);
|
|
741
685
|
}
|
|
742
|
-
function
|
|
743
|
-
const
|
|
744
|
-
return
|
|
745
|
-
}
|
|
746
|
-
function
|
|
747
|
-
const
|
|
748
|
-
return
|
|
749
|
-
}
|
|
750
|
-
function
|
|
751
|
-
return
|
|
752
|
-
}
|
|
753
|
-
function
|
|
754
|
-
const
|
|
755
|
-
return K(
|
|
756
|
-
}
|
|
757
|
-
function K(
|
|
758
|
-
const
|
|
759
|
-
if (
|
|
760
|
-
return
|
|
761
|
-
let
|
|
762
|
-
for (; !
|
|
763
|
-
if (
|
|
764
|
-
return
|
|
765
|
-
|
|
686
|
+
function A() {
|
|
687
|
+
const a = R(), f = a.find((g) => Y(g));
|
|
688
|
+
return f ? a.indexOf(f) : -1;
|
|
689
|
+
}
|
|
690
|
+
function N() {
|
|
691
|
+
const a = R(), f = [...a].reverse().find((g) => Y(g));
|
|
692
|
+
return f ? a.indexOf(f) : -1;
|
|
693
|
+
}
|
|
694
|
+
function H(a, f, g) {
|
|
695
|
+
return f === "prev" && a === 0 || f === "next" && a === g.length - 1;
|
|
696
|
+
}
|
|
697
|
+
function U(a) {
|
|
698
|
+
const f = X();
|
|
699
|
+
return K(f, a);
|
|
700
|
+
}
|
|
701
|
+
function K(a, f) {
|
|
702
|
+
const g = R();
|
|
703
|
+
if (H(a, f, g))
|
|
704
|
+
return a;
|
|
705
|
+
let I = a + (f === "next" ? 1 : -1);
|
|
706
|
+
for (; !Y(g[I]); ) {
|
|
707
|
+
if (H(I, f, g))
|
|
708
|
+
return a;
|
|
709
|
+
I += f === "next" ? 1 : -1;
|
|
766
710
|
}
|
|
767
|
-
return
|
|
711
|
+
return I;
|
|
768
712
|
}
|
|
769
|
-
function
|
|
770
|
-
return
|
|
713
|
+
function Y(a) {
|
|
714
|
+
return a.tabIndex === -2;
|
|
771
715
|
}
|
|
772
|
-
function
|
|
773
|
-
return
|
|
716
|
+
function c(a) {
|
|
717
|
+
return a ? l.items.filter((f) => f.group === a) : l.items;
|
|
774
718
|
}
|
|
775
719
|
return F(
|
|
776
720
|
() => l.modelValue,
|
|
777
|
-
(
|
|
778
|
-
|
|
721
|
+
(a) => {
|
|
722
|
+
r.value = a;
|
|
779
723
|
}
|
|
780
|
-
),
|
|
724
|
+
), n({
|
|
781
725
|
focusItem: O,
|
|
782
|
-
getItem:
|
|
726
|
+
getItem: C,
|
|
783
727
|
getAdjacentItemIndex: K,
|
|
784
|
-
getFirstFocusableItemIndex:
|
|
785
|
-
getLastFocusableItemIndex:
|
|
786
|
-
}), (
|
|
728
|
+
getFirstFocusableItemIndex: A,
|
|
729
|
+
getLastFocusableItemIndex: N
|
|
730
|
+
}), (a, f) => (u(), x(Ve(d.value), {
|
|
787
731
|
ref_key: "listRef",
|
|
788
|
-
ref:
|
|
789
|
-
class:
|
|
732
|
+
ref: h,
|
|
733
|
+
class: V(["q-list", { "q-list--disabled": l.disabled }, l.class]),
|
|
790
734
|
role: "listbox",
|
|
791
735
|
tabindex: l.disabled ? -1 : 0,
|
|
792
|
-
onFocus:
|
|
793
|
-
onMousedown:
|
|
794
|
-
onMouseup:
|
|
795
|
-
onKeydown:
|
|
736
|
+
onFocus: T,
|
|
737
|
+
onMousedown: p,
|
|
738
|
+
onMouseup: z,
|
|
739
|
+
onKeydown: D
|
|
796
740
|
}, {
|
|
797
|
-
default:
|
|
798
|
-
(
|
|
799
|
-
key:
|
|
800
|
-
title:
|
|
801
|
-
disabled:
|
|
741
|
+
default: $(() => [
|
|
742
|
+
(u(!0), v(J, null, ce(m.value, (g) => (u(), x(y(Tt), {
|
|
743
|
+
key: g.id,
|
|
744
|
+
title: m.value.length === 1 ? void 0 : g.title,
|
|
745
|
+
disabled: g.disabled
|
|
802
746
|
}, {
|
|
803
|
-
default:
|
|
804
|
-
(
|
|
805
|
-
key:
|
|
806
|
-
value:
|
|
807
|
-
label:
|
|
808
|
-
icon:
|
|
809
|
-
disabled: l.disabled ||
|
|
810
|
-
highlighted: l.highlighted ===
|
|
811
|
-
selected:
|
|
812
|
-
onSelect:
|
|
747
|
+
default: $(() => [
|
|
748
|
+
(u(!0), v(J, null, ce(c(g.id), (I) => (u(), x(y(Dt), {
|
|
749
|
+
key: I[l.itemValue],
|
|
750
|
+
value: I[l.itemValue],
|
|
751
|
+
label: I[l.itemLabel],
|
|
752
|
+
icon: I.icon,
|
|
753
|
+
disabled: l.disabled || I.disabled,
|
|
754
|
+
highlighted: l.highlighted === I[l.itemValue],
|
|
755
|
+
selected: r.value === I[l.itemValue],
|
|
756
|
+
onSelect: _
|
|
813
757
|
}, {
|
|
814
|
-
default:
|
|
815
|
-
|
|
758
|
+
default: $(() => [
|
|
759
|
+
b(a.$slots, "item", { item: I })
|
|
816
760
|
]),
|
|
817
761
|
_: 2
|
|
818
762
|
}, 1032, ["value", "label", "icon", "disabled", "highlighted", "selected"]))), 128))
|
|
@@ -824,15 +768,15 @@ const kt = /* @__PURE__ */ x({
|
|
|
824
768
|
}, 40, ["class", "tabindex"]));
|
|
825
769
|
}
|
|
826
770
|
});
|
|
827
|
-
let
|
|
828
|
-
function
|
|
829
|
-
return `uid-${++
|
|
771
|
+
let qt = 0;
|
|
772
|
+
function ie(t) {
|
|
773
|
+
return t || `uid-${++qt}`;
|
|
830
774
|
}
|
|
831
|
-
const
|
|
775
|
+
const It = ["id", "tabindex", "aria-label", "aria-selected"], Lt = { class: "q-list-item__check-container" }, Bt = {
|
|
832
776
|
check: {
|
|
833
777
|
icon: "check"
|
|
834
778
|
}
|
|
835
|
-
},
|
|
779
|
+
}, St = /* @__PURE__ */ B({
|
|
836
780
|
__name: "QListItem",
|
|
837
781
|
props: {
|
|
838
782
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
@@ -840,23 +784,23 @@ const Lt = ["id", "tabindex", "aria-label", "aria-selected"], Bt = { class: "q-l
|
|
|
840
784
|
icon: { default: void 0 },
|
|
841
785
|
selected: { type: Boolean },
|
|
842
786
|
highlighted: { type: Boolean },
|
|
843
|
-
icons: { default: () =>
|
|
787
|
+
icons: { default: () => Bt },
|
|
844
788
|
disabled: { type: Boolean }
|
|
845
789
|
},
|
|
846
790
|
emits: ["select"],
|
|
847
|
-
setup(
|
|
848
|
-
const o =
|
|
849
|
-
function
|
|
791
|
+
setup(t, { emit: n }) {
|
|
792
|
+
const o = n, e = t, l = ie();
|
|
793
|
+
function r() {
|
|
850
794
|
e.disabled || o("select", e.value);
|
|
851
795
|
}
|
|
852
|
-
function
|
|
853
|
-
|
|
796
|
+
function s(d) {
|
|
797
|
+
d.key === "Tab" && r(), (d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(), r());
|
|
854
798
|
}
|
|
855
|
-
return (
|
|
856
|
-
id:
|
|
799
|
+
return (d, m) => (u(), v("li", {
|
|
800
|
+
id: y(l),
|
|
857
801
|
role: "option",
|
|
858
802
|
tabindex: e.disabled ? void 0 : -2,
|
|
859
|
-
class:
|
|
803
|
+
class: V([
|
|
860
804
|
"q-list-item",
|
|
861
805
|
{
|
|
862
806
|
"q-list-item--disabled": e.disabled,
|
|
@@ -866,87 +810,87 @@ const Lt = ["id", "tabindex", "aria-label", "aria-selected"], Bt = { class: "q-l
|
|
|
866
810
|
]),
|
|
867
811
|
"aria-label": e.label,
|
|
868
812
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
869
|
-
onKeydown:
|
|
870
|
-
onClick:
|
|
813
|
+
onKeydown: s,
|
|
814
|
+
onClick: te(r, ["stop", "prevent"])
|
|
871
815
|
}, [
|
|
872
|
-
|
|
873
|
-
e.icon ? (
|
|
874
|
-
|
|
816
|
+
b(d.$slots, "default", {}, () => [
|
|
817
|
+
e.icon ? (u(), x(y(ee), re(Z({ key: 0 }, e.icon)), null, 16)) : L("", !0),
|
|
818
|
+
oe(" " + M(e.label), 1)
|
|
875
819
|
]),
|
|
876
|
-
|
|
877
|
-
e.selected ? (
|
|
820
|
+
P("div", Lt, [
|
|
821
|
+
e.selected ? (u(), x(y(ee), Z({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : L("", !0)
|
|
878
822
|
])
|
|
879
|
-
], 42,
|
|
823
|
+
], 42, It));
|
|
880
824
|
}
|
|
881
|
-
}),
|
|
825
|
+
}), xt = ["aria-labelledby"], Vt = ["id"], Et = /* @__PURE__ */ B({
|
|
882
826
|
__name: "QListItemGroup",
|
|
883
827
|
props: {
|
|
884
828
|
title: { default: "" },
|
|
885
829
|
disabled: { type: Boolean }
|
|
886
830
|
},
|
|
887
|
-
setup(
|
|
888
|
-
const
|
|
889
|
-
return (e, l) => (
|
|
831
|
+
setup(t) {
|
|
832
|
+
const n = t, o = ie();
|
|
833
|
+
return (e, l) => (u(), v("ul", {
|
|
890
834
|
class: "q-list-item-group",
|
|
891
835
|
role: "group",
|
|
892
|
-
"aria-labelledby":
|
|
836
|
+
"aria-labelledby": n.title ? y(o) : void 0
|
|
893
837
|
}, [
|
|
894
|
-
|
|
838
|
+
n.title ? (u(), v("li", {
|
|
895
839
|
key: 0,
|
|
896
|
-
id:
|
|
840
|
+
id: y(o),
|
|
897
841
|
class: "q-list-item-group__title",
|
|
898
842
|
role: "presentation"
|
|
899
|
-
},
|
|
900
|
-
|
|
901
|
-
], 8,
|
|
843
|
+
}, M(n.title), 9, Vt)) : L("", !0),
|
|
844
|
+
b(e.$slots, "default")
|
|
845
|
+
], 8, xt));
|
|
902
846
|
}
|
|
903
|
-
}),
|
|
904
|
-
function
|
|
905
|
-
const l =
|
|
906
|
-
let
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
switch (
|
|
847
|
+
}), Ce = S($t), Dt = S(St), Tt = S(Et);
|
|
848
|
+
function zt(t, n, o = "right", e) {
|
|
849
|
+
const l = t.getBoundingClientRect(), r = l.x + window.scrollX, s = l.y + window.scrollY, d = n == null ? void 0 : n.getBoundingClientRect(), m = (d == null ? void 0 : d.width) ?? 0, h = (d == null ? void 0 : d.height) ?? 0;
|
|
850
|
+
let _ = o;
|
|
851
|
+
d && !Qe(l, d, _) && (_ = Ct(l, d, _));
|
|
852
|
+
const p = { x: 0, y: 0, placement: _ };
|
|
853
|
+
switch (_) {
|
|
910
854
|
case "top":
|
|
911
|
-
e === "anchor" ?
|
|
855
|
+
e === "anchor" ? p.x = r : p.x = r + (l.width - m) / 2, p.y = s - h;
|
|
912
856
|
break;
|
|
913
857
|
case "bottom":
|
|
914
|
-
e === "anchor" ?
|
|
858
|
+
e === "anchor" ? p.x = r : p.x = r + (l.width - m) / 2, p.y = s + l.height;
|
|
915
859
|
break;
|
|
916
860
|
case "left":
|
|
917
|
-
|
|
861
|
+
p.x = r - m, p.y = s + l.height / 2 - h / 2;
|
|
918
862
|
break;
|
|
919
863
|
case "right":
|
|
920
|
-
|
|
864
|
+
p.x = r + l.width, p.y = s + l.height / 2 - h / 2;
|
|
921
865
|
break;
|
|
922
866
|
}
|
|
923
|
-
return e === "anchor" && l.width >=
|
|
867
|
+
return e === "anchor" && l.width >= m && (p.width = l.width), p;
|
|
924
868
|
}
|
|
925
|
-
function
|
|
869
|
+
function Qe(t, n, o) {
|
|
926
870
|
let e = !1, l = !1;
|
|
927
871
|
switch (o) {
|
|
928
872
|
case "top":
|
|
929
|
-
e =
|
|
873
|
+
e = Le(t, n), l = t.top > n.height;
|
|
930
874
|
break;
|
|
931
875
|
case "bottom":
|
|
932
|
-
e =
|
|
876
|
+
e = Le(t, n), l = window.innerHeight - t.top - t.height > n.height;
|
|
933
877
|
break;
|
|
934
878
|
case "left":
|
|
935
|
-
e =
|
|
879
|
+
e = t.left > n.width, l = Ie(t, n);
|
|
936
880
|
break;
|
|
937
881
|
case "right":
|
|
938
|
-
e = window.innerWidth -
|
|
882
|
+
e = window.innerWidth - t.left - t.width > n.width, l = Ie(t, n);
|
|
939
883
|
break;
|
|
940
884
|
}
|
|
941
885
|
return e && l;
|
|
942
886
|
}
|
|
943
|
-
function
|
|
944
|
-
return window.innerHeight -
|
|
887
|
+
function Ie(t, n) {
|
|
888
|
+
return window.innerHeight - t.top - t.height / 2 > n.height / 2 && t.top + t.height / 2 > n.height / 2;
|
|
945
889
|
}
|
|
946
|
-
function
|
|
947
|
-
return window.innerWidth -
|
|
890
|
+
function Le(t, n) {
|
|
891
|
+
return window.innerWidth - t.left - t.width / 2 > n.width / 2 && t.left + t.width / 2 > n.width / 2;
|
|
948
892
|
}
|
|
949
|
-
function
|
|
893
|
+
function Ct(t, n, o) {
|
|
950
894
|
const e = {
|
|
951
895
|
top: ["bottom", "left", "right"],
|
|
952
896
|
bottom: ["top", "left", "right"],
|
|
@@ -954,18 +898,18 @@ function At(n, t, o) {
|
|
|
954
898
|
right: ["left", "top", "bottom"]
|
|
955
899
|
};
|
|
956
900
|
for (const l of e[o])
|
|
957
|
-
if (
|
|
901
|
+
if (Qe(t, n, l))
|
|
958
902
|
return l;
|
|
959
903
|
return o;
|
|
960
904
|
}
|
|
961
|
-
function
|
|
962
|
-
return typeof
|
|
905
|
+
function ne(t) {
|
|
906
|
+
return typeof t == "string" ? document.querySelector(t) : t && "$el" in t ? t.$el : t;
|
|
963
907
|
}
|
|
964
|
-
const Qt = ["role"],
|
|
908
|
+
const Qt = ["role"], At = {
|
|
965
909
|
key: 0,
|
|
966
910
|
role: "presentation",
|
|
967
911
|
class: "q-overlay__arrow"
|
|
968
|
-
},
|
|
912
|
+
}, Ft = /* @__PURE__ */ B({
|
|
969
913
|
inheritAttrs: !1,
|
|
970
914
|
__name: "QOverlay",
|
|
971
915
|
props: {
|
|
@@ -976,7 +920,6 @@ const Qt = ["role"], Rt = {
|
|
|
976
920
|
attach: { default: "body" },
|
|
977
921
|
backdropBlur: { type: Boolean },
|
|
978
922
|
delay: { default: 500 },
|
|
979
|
-
disabled: { type: Boolean },
|
|
980
923
|
offset: { default: 8 },
|
|
981
924
|
placement: { default: "right" },
|
|
982
925
|
spy: { type: Boolean },
|
|
@@ -986,182 +929,202 @@ const Qt = ["role"], Rt = {
|
|
|
986
929
|
class: { default: void 0 }
|
|
987
930
|
},
|
|
988
931
|
emits: ["enter", "leave"],
|
|
989
|
-
setup(
|
|
990
|
-
const o =
|
|
932
|
+
setup(t, { emit: n }) {
|
|
933
|
+
const o = n, e = t, l = k(() => [
|
|
991
934
|
"q-overlay",
|
|
992
|
-
`q-overlay--${
|
|
935
|
+
`q-overlay--${s.placement}`,
|
|
993
936
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
994
937
|
e.class
|
|
995
|
-
]),
|
|
996
|
-
() => (
|
|
997
|
-
),
|
|
938
|
+
]), r = k(
|
|
939
|
+
() => (s.visible || s.animating) && e.trigger === "click"
|
|
940
|
+
), s = Fe({
|
|
998
941
|
visible: e.modelValue,
|
|
999
942
|
animating: !1,
|
|
1000
943
|
top: 0,
|
|
1001
944
|
left: 0,
|
|
1002
945
|
width: 0,
|
|
1003
946
|
placement: e.placement
|
|
1004
|
-
})
|
|
947
|
+
});
|
|
1005
948
|
F(
|
|
1006
949
|
() => e.modelValue,
|
|
1007
|
-
() =>
|
|
950
|
+
() => s.visible = e.modelValue
|
|
1008
951
|
), F(
|
|
1009
|
-
() =>
|
|
1010
|
-
() =>
|
|
952
|
+
() => s.visible,
|
|
953
|
+
() => s.animating = !0
|
|
1011
954
|
);
|
|
1012
|
-
const
|
|
1013
|
-
let
|
|
1014
|
-
switch (
|
|
955
|
+
const d = k(() => {
|
|
956
|
+
let a = 0, f = 0;
|
|
957
|
+
switch (s.placement) {
|
|
1015
958
|
case "top":
|
|
1016
|
-
|
|
959
|
+
f = -(e.offset || 0);
|
|
1017
960
|
break;
|
|
1018
961
|
case "bottom":
|
|
1019
|
-
|
|
962
|
+
f = e.offset || 0;
|
|
1020
963
|
break;
|
|
1021
964
|
case "left":
|
|
1022
|
-
|
|
965
|
+
a = -(e.offset || 0);
|
|
1023
966
|
break;
|
|
1024
967
|
case "right":
|
|
1025
|
-
|
|
968
|
+
a = e.offset || 0;
|
|
1026
969
|
break;
|
|
1027
970
|
}
|
|
1028
|
-
const
|
|
1029
|
-
top: `${
|
|
1030
|
-
left: `${
|
|
971
|
+
const g = {
|
|
972
|
+
top: `${s.top + f}px`,
|
|
973
|
+
left: `${s.left + a}px`
|
|
1031
974
|
};
|
|
1032
|
-
return
|
|
975
|
+
return s.width !== void 0 && ["top", "bottom"].includes(s.placement) && (g.width = `${s.width}px`), g;
|
|
1033
976
|
}), m = q(null);
|
|
1034
|
-
function
|
|
977
|
+
function h() {
|
|
1035
978
|
if (e.anchor) {
|
|
1036
|
-
const
|
|
1037
|
-
if (
|
|
1038
|
-
const
|
|
1039
|
-
|
|
979
|
+
const a = ne(e.anchor);
|
|
980
|
+
if (a) {
|
|
981
|
+
const f = zt(
|
|
982
|
+
a,
|
|
1040
983
|
m.value,
|
|
1041
984
|
e.placement,
|
|
1042
985
|
e.width
|
|
1043
986
|
);
|
|
1044
|
-
|
|
987
|
+
s.left = f.x, s.top = f.y, s.width = f.width, s.placement = f.placement;
|
|
1045
988
|
}
|
|
1046
989
|
}
|
|
1047
990
|
}
|
|
1048
|
-
F([() =>
|
|
991
|
+
F([() => s.visible, () => e.placement], h);
|
|
1049
992
|
let _;
|
|
1050
|
-
function
|
|
993
|
+
function p() {
|
|
994
|
+
T(0);
|
|
995
|
+
}
|
|
996
|
+
function z() {
|
|
997
|
+
T(e.delay);
|
|
998
|
+
}
|
|
999
|
+
function T(a) {
|
|
1051
1000
|
_ || (_ = window.setTimeout(() => {
|
|
1052
|
-
|
|
1053
|
-
var
|
|
1054
|
-
e.trigger === "click" && ((
|
|
1001
|
+
s.visible = !0, W(() => {
|
|
1002
|
+
var f;
|
|
1003
|
+
e.trigger === "click" && ((f = m.value) == null || f.focus());
|
|
1055
1004
|
});
|
|
1056
|
-
},
|
|
1005
|
+
}, a));
|
|
1057
1006
|
}
|
|
1058
|
-
function
|
|
1059
|
-
clearTimeout(_), _ = void 0,
|
|
1007
|
+
function D() {
|
|
1008
|
+
clearTimeout(_), _ = void 0, s.visible = !1, W(() => {
|
|
1060
1009
|
if (e.anchor && e.trigger === "click") {
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1010
|
+
const a = ne(e.anchor);
|
|
1011
|
+
a == null || a.focus();
|
|
1063
1012
|
}
|
|
1064
1013
|
});
|
|
1065
1014
|
}
|
|
1066
|
-
let
|
|
1067
|
-
function
|
|
1015
|
+
let Q;
|
|
1016
|
+
function O() {
|
|
1068
1017
|
o("enter");
|
|
1069
1018
|
}
|
|
1070
|
-
function
|
|
1071
|
-
window.clearTimeout(
|
|
1019
|
+
function R() {
|
|
1020
|
+
window.clearTimeout(Q), Q = window.setTimeout(() => s.animating = !1, 200), o("leave");
|
|
1072
1021
|
}
|
|
1073
|
-
let
|
|
1074
|
-
function
|
|
1075
|
-
|
|
1022
|
+
let C;
|
|
1023
|
+
function X() {
|
|
1024
|
+
W(() => {
|
|
1076
1025
|
if (!e.anchor)
|
|
1077
1026
|
return;
|
|
1078
|
-
const
|
|
1079
|
-
if (
|
|
1027
|
+
const a = ne(e.anchor);
|
|
1028
|
+
if (a)
|
|
1080
1029
|
switch (e.trigger) {
|
|
1081
1030
|
case "click":
|
|
1082
|
-
|
|
1031
|
+
a.addEventListener("click", p);
|
|
1083
1032
|
break;
|
|
1084
1033
|
case "hover":
|
|
1085
|
-
|
|
1034
|
+
a.addEventListener("mouseenter", z), a.addEventListener("mouseleave", D), a.addEventListener("focusin", p), a.addEventListener("focusout", D);
|
|
1086
1035
|
break;
|
|
1087
1036
|
}
|
|
1088
1037
|
});
|
|
1089
1038
|
}
|
|
1090
|
-
function
|
|
1091
|
-
|
|
1039
|
+
function A() {
|
|
1040
|
+
W(() => {
|
|
1092
1041
|
if (!e.anchor)
|
|
1093
1042
|
return;
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1043
|
+
const a = ne(e.anchor);
|
|
1044
|
+
a && (window.addEventListener("scroll", h), window.addEventListener("resize", h), C = new MutationObserver(h), C.observe(a, {
|
|
1096
1045
|
attributes: !1,
|
|
1097
1046
|
childList: !0,
|
|
1098
1047
|
characterData: !0,
|
|
1099
1048
|
subtree: !0
|
|
1100
|
-
}),
|
|
1049
|
+
}), h());
|
|
1101
1050
|
});
|
|
1102
1051
|
}
|
|
1103
|
-
function
|
|
1104
|
-
window.removeEventListener("scroll", f), window.removeEventListener("resize", f), z == null || z.disconnect();
|
|
1105
|
-
}
|
|
1106
|
-
let M;
|
|
1107
|
-
function U() {
|
|
1052
|
+
function N() {
|
|
1108
1053
|
if (!e.anchor)
|
|
1109
1054
|
return;
|
|
1110
|
-
|
|
1055
|
+
const a = ne(e.anchor);
|
|
1056
|
+
if (a)
|
|
1057
|
+
switch (e.trigger) {
|
|
1058
|
+
case "click":
|
|
1059
|
+
a.removeEventListener("click", p);
|
|
1060
|
+
break;
|
|
1061
|
+
case "hover":
|
|
1062
|
+
a.removeEventListener("mouseenter", z), a.removeEventListener("mouseleave", D), a.removeEventListener("focusin", p), a.removeEventListener("focusout", D);
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1111
1065
|
}
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1066
|
+
function H() {
|
|
1067
|
+
window.removeEventListener("scroll", h), window.removeEventListener("resize", h), C == null || C.disconnect();
|
|
1114
1068
|
}
|
|
1069
|
+
let U;
|
|
1115
1070
|
function K() {
|
|
1116
|
-
|
|
1071
|
+
if (!e.anchor)
|
|
1072
|
+
return;
|
|
1073
|
+
ne(e.anchor) ? (h(), U = window.setTimeout(K, 100)) : D();
|
|
1117
1074
|
}
|
|
1118
|
-
|
|
1119
|
-
()
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
)
|
|
1125
|
-
()
|
|
1126
|
-
|
|
1127
|
-
|
|
1075
|
+
function Y() {
|
|
1076
|
+
A(), e.spy && K();
|
|
1077
|
+
}
|
|
1078
|
+
function c() {
|
|
1079
|
+
H(), e.spy && (clearTimeout(U), U = void 0);
|
|
1080
|
+
}
|
|
1081
|
+
return Re(() => {
|
|
1082
|
+
N(), c();
|
|
1083
|
+
}), Ee(() => {
|
|
1084
|
+
W(() => {
|
|
1085
|
+
X(), h();
|
|
1086
|
+
});
|
|
1087
|
+
}), F(
|
|
1088
|
+
() => s.visible,
|
|
1089
|
+
(a) => {
|
|
1090
|
+
a ? Y() : c();
|
|
1128
1091
|
},
|
|
1129
1092
|
{ immediate: !0 }
|
|
1130
|
-
), (
|
|
1131
|
-
disabled: !
|
|
1093
|
+
), (a, f) => (u(), x(Oe, {
|
|
1094
|
+
disabled: !s.visible && !s.animating || !e.attach,
|
|
1132
1095
|
to: e.attach
|
|
1133
1096
|
}, [
|
|
1134
|
-
|
|
1097
|
+
r.value ? (u(), v("div", {
|
|
1135
1098
|
key: 0,
|
|
1136
|
-
class:
|
|
1099
|
+
class: V([
|
|
1137
1100
|
"q-overlay__underlay",
|
|
1138
1101
|
{ "q-overlay__underlay--blur": e.backdropBlur }
|
|
1139
1102
|
])
|
|
1140
1103
|
}, null, 2)) : L("", !0),
|
|
1141
|
-
|
|
1104
|
+
j(Ue, {
|
|
1142
1105
|
name: e.transition,
|
|
1143
1106
|
appear: "",
|
|
1144
|
-
onEnter:
|
|
1145
|
-
onLeave:
|
|
1107
|
+
onEnter: O,
|
|
1108
|
+
onLeave: R
|
|
1146
1109
|
}, {
|
|
1147
|
-
default:
|
|
1148
|
-
|
|
1110
|
+
default: $(() => [
|
|
1111
|
+
s.visible ? (u(), v("div", {
|
|
1149
1112
|
key: 0,
|
|
1150
|
-
class:
|
|
1151
|
-
style: se(
|
|
1113
|
+
class: V(l.value),
|
|
1114
|
+
style: se(d.value)
|
|
1152
1115
|
}, [
|
|
1153
|
-
|
|
1116
|
+
P("div", Z({
|
|
1154
1117
|
class: "q-overlay__content",
|
|
1155
1118
|
ref_key: "overlayRef",
|
|
1156
1119
|
ref: m,
|
|
1157
1120
|
tabindex: "-1",
|
|
1158
|
-
role:
|
|
1159
|
-
},
|
|
1160
|
-
onKeydown:
|
|
1161
|
-
onBlur:
|
|
1121
|
+
role: r.value ? "dialog" : void 0
|
|
1122
|
+
}, a.$attrs, {
|
|
1123
|
+
onKeydown: Me(D, ["escape"]),
|
|
1124
|
+
onBlur: D
|
|
1162
1125
|
}), [
|
|
1163
|
-
e.arrow ? (
|
|
1164
|
-
|
|
1126
|
+
e.arrow ? (u(), v("div", At)) : L("", !0),
|
|
1127
|
+
b(a.$slots, "default")
|
|
1165
1128
|
], 16, Qt)
|
|
1166
1129
|
], 6)) : L("", !0)
|
|
1167
1130
|
]),
|
|
@@ -1169,80 +1132,81 @@ const Qt = ["role"], Rt = {
|
|
|
1169
1132
|
}, 8, ["name"])
|
|
1170
1133
|
], 8, ["disabled", "to"]));
|
|
1171
1134
|
}
|
|
1172
|
-
}), de =
|
|
1135
|
+
}), de = S(Ft), Rt = ["id"], Ot = {
|
|
1173
1136
|
key: 0,
|
|
1174
1137
|
class: "q-field__label"
|
|
1175
|
-
},
|
|
1138
|
+
}, Ut = ["for"], Mt = {
|
|
1176
1139
|
key: 0,
|
|
1177
1140
|
class: "q-field__prepend"
|
|
1178
|
-
},
|
|
1141
|
+
}, Nt = {
|
|
1179
1142
|
key: 1,
|
|
1180
1143
|
class: "q-field__append"
|
|
1181
|
-
},
|
|
1144
|
+
}, Ht = {
|
|
1182
1145
|
key: 1,
|
|
1183
1146
|
class: "q-field__extras"
|
|
1184
|
-
},
|
|
1147
|
+
}, Kt = /* @__PURE__ */ B({
|
|
1185
1148
|
inheritAttrs: !1,
|
|
1186
1149
|
__name: "QField",
|
|
1187
1150
|
props: {
|
|
1188
|
-
id: { default:
|
|
1151
|
+
id: { default: void 0 },
|
|
1189
1152
|
label: { default: "" },
|
|
1153
|
+
for: { default: void 0 },
|
|
1190
1154
|
size: { default: "medium" },
|
|
1191
1155
|
readonly: { type: Boolean },
|
|
1192
1156
|
disabled: { type: Boolean },
|
|
1193
1157
|
required: { type: Boolean },
|
|
1194
1158
|
class: { default: void 0 }
|
|
1195
1159
|
},
|
|
1196
|
-
setup(
|
|
1197
|
-
const o =
|
|
1198
|
-
return
|
|
1199
|
-
fieldRef:
|
|
1200
|
-
}), (
|
|
1201
|
-
id:
|
|
1202
|
-
class:
|
|
1160
|
+
setup(t, { expose: n }) {
|
|
1161
|
+
const o = t, e = ie(o.id), l = q(null), r = k(() => o.required && !o.readonly && !o.disabled);
|
|
1162
|
+
return n({
|
|
1163
|
+
fieldRef: l
|
|
1164
|
+
}), (s, d) => (u(), v("div", {
|
|
1165
|
+
id: y(e),
|
|
1166
|
+
class: V([
|
|
1203
1167
|
"q-field",
|
|
1204
1168
|
`q-field--${o.size}`,
|
|
1205
1169
|
{
|
|
1206
1170
|
"q-field--readonly": o.readonly,
|
|
1207
1171
|
"q-field--disabled": o.disabled,
|
|
1208
|
-
"q-field--required":
|
|
1172
|
+
"q-field--required": r.value
|
|
1209
1173
|
},
|
|
1210
1174
|
o.class
|
|
1211
1175
|
])
|
|
1212
1176
|
}, [
|
|
1213
|
-
o.label ? (
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
for: o.
|
|
1217
|
-
},
|
|
1218
|
-
|
|
1177
|
+
o.label ? (u(), v("div", Ot, [
|
|
1178
|
+
b(s.$slots, "label.prepend"),
|
|
1179
|
+
P("label", {
|
|
1180
|
+
for: o.for
|
|
1181
|
+
}, M(o.label), 9, Ut),
|
|
1182
|
+
b(s.$slots, "label.append")
|
|
1219
1183
|
])) : L("", !0),
|
|
1220
|
-
|
|
1221
|
-
|
|
1184
|
+
b(s.$slots, "control", {}, () => [
|
|
1185
|
+
P("div", Z({
|
|
1222
1186
|
class: "q-field__control",
|
|
1223
1187
|
ref_key: "fieldRef",
|
|
1224
|
-
ref:
|
|
1225
|
-
},
|
|
1226
|
-
|
|
1227
|
-
|
|
1188
|
+
ref: l
|
|
1189
|
+
}, s.$attrs), [
|
|
1190
|
+
s.$slots.prepend ? (u(), v("div", Mt, [
|
|
1191
|
+
b(s.$slots, "prepend")
|
|
1228
1192
|
])) : L("", !0),
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1193
|
+
b(s.$slots, "default"),
|
|
1194
|
+
s.$slots.append ? (u(), v("div", Nt, [
|
|
1195
|
+
b(s.$slots, "append")
|
|
1232
1196
|
])) : L("", !0)
|
|
1233
1197
|
], 16)
|
|
1234
1198
|
]),
|
|
1235
|
-
|
|
1236
|
-
|
|
1199
|
+
s.$slots.extras ? (u(), v("div", Ht, [
|
|
1200
|
+
b(s.$slots, "extras")
|
|
1237
1201
|
])) : L("", !0)
|
|
1238
|
-
], 10,
|
|
1202
|
+
], 10, Rt));
|
|
1239
1203
|
}
|
|
1240
|
-
}),
|
|
1204
|
+
}), be = S(Kt), Gt = ["id", "type", "role", "required", "placeholder", "readonly", "disabled", "maxlength"], Wt = /* @__PURE__ */ B({
|
|
1241
1205
|
inheritAttrs: !1,
|
|
1242
1206
|
__name: "QTextField",
|
|
1243
1207
|
props: {
|
|
1244
1208
|
modelValue: { default: "" },
|
|
1245
|
-
id: { default:
|
|
1209
|
+
id: { default: void 0 },
|
|
1246
1210
|
placeholder: { default: "" },
|
|
1247
1211
|
label: { default: "" },
|
|
1248
1212
|
size: { default: void 0 },
|
|
@@ -1255,99 +1219,100 @@ const Qt = ["role"], Rt = {
|
|
|
1255
1219
|
class: { default: void 0 }
|
|
1256
1220
|
},
|
|
1257
1221
|
emits: ["update:modelValue"],
|
|
1258
|
-
setup(
|
|
1259
|
-
const e = o, l =
|
|
1222
|
+
setup(t, { expose: n, emit: o }) {
|
|
1223
|
+
const e = o, l = t, r = ie(l.id), s = q(l.modelValue), d = q(null), m = q(null), h = k({
|
|
1260
1224
|
get() {
|
|
1261
|
-
return
|
|
1225
|
+
return s.value;
|
|
1262
1226
|
},
|
|
1263
|
-
set(
|
|
1264
|
-
|
|
1227
|
+
set(p) {
|
|
1228
|
+
s.value = p, e("update:modelValue", p);
|
|
1265
1229
|
}
|
|
1266
|
-
}),
|
|
1230
|
+
}), _ = k(
|
|
1267
1231
|
() => l.readonly || l.disabled ? "" : l.placeholder
|
|
1268
1232
|
);
|
|
1269
1233
|
return F(
|
|
1270
1234
|
() => l.modelValue,
|
|
1271
|
-
(
|
|
1272
|
-
),
|
|
1273
|
-
fieldRef:
|
|
1274
|
-
var
|
|
1275
|
-
return (
|
|
1235
|
+
(p) => s.value = p
|
|
1236
|
+
), n({
|
|
1237
|
+
fieldRef: k(() => {
|
|
1238
|
+
var p;
|
|
1239
|
+
return (p = d.value) == null ? void 0 : p.fieldRef;
|
|
1276
1240
|
}),
|
|
1277
|
-
inputRef:
|
|
1278
|
-
}), (
|
|
1241
|
+
inputRef: m
|
|
1242
|
+
}), (p, z) => (u(), x(y(be), {
|
|
1279
1243
|
ref_key: "fieldRef",
|
|
1280
|
-
ref:
|
|
1281
|
-
class:
|
|
1282
|
-
|
|
1244
|
+
ref: d,
|
|
1245
|
+
class: V(["q-text-field", l.class]),
|
|
1246
|
+
for: y(r),
|
|
1283
1247
|
label: l.label,
|
|
1284
1248
|
size: l.size,
|
|
1285
1249
|
readonly: l.readonly,
|
|
1286
1250
|
disabled: l.disabled,
|
|
1287
1251
|
required: l.required
|
|
1288
|
-
},
|
|
1289
|
-
"label.prepend":
|
|
1290
|
-
|
|
1252
|
+
}, pe({
|
|
1253
|
+
"label.prepend": $(() => [
|
|
1254
|
+
b(p.$slots, "label.prepend")
|
|
1291
1255
|
]),
|
|
1292
|
-
"label.append":
|
|
1293
|
-
|
|
1256
|
+
"label.append": $(() => [
|
|
1257
|
+
b(p.$slots, "label.append")
|
|
1294
1258
|
]),
|
|
1295
|
-
default:
|
|
1296
|
-
|
|
1297
|
-
"onUpdate:modelValue":
|
|
1259
|
+
default: $(() => [
|
|
1260
|
+
Ne(P("input", Z({
|
|
1261
|
+
"onUpdate:modelValue": z[0] || (z[0] = (T) => h.value = T),
|
|
1298
1262
|
ref_key: "inputRef",
|
|
1299
|
-
ref:
|
|
1263
|
+
ref: m,
|
|
1264
|
+
id: y(r),
|
|
1300
1265
|
class: "q-text-field__input",
|
|
1301
1266
|
type: l.type,
|
|
1302
1267
|
role: l.role,
|
|
1303
1268
|
required: l.required,
|
|
1304
|
-
placeholder:
|
|
1269
|
+
placeholder: _.value,
|
|
1305
1270
|
readonly: l.readonly,
|
|
1306
1271
|
disabled: l.disabled,
|
|
1307
1272
|
maxlength: l.maxLength
|
|
1308
|
-
},
|
|
1309
|
-
[
|
|
1273
|
+
}, p.$attrs), null, 16, Gt), [
|
|
1274
|
+
[He, h.value]
|
|
1310
1275
|
])
|
|
1311
1276
|
]),
|
|
1312
1277
|
_: 2
|
|
1313
1278
|
}, [
|
|
1314
|
-
|
|
1279
|
+
p.$slots.prepend ? {
|
|
1315
1280
|
name: "prepend",
|
|
1316
|
-
fn:
|
|
1317
|
-
|
|
1281
|
+
fn: $(() => [
|
|
1282
|
+
b(p.$slots, "prepend")
|
|
1318
1283
|
]),
|
|
1319
1284
|
key: "0"
|
|
1320
1285
|
} : void 0,
|
|
1321
|
-
|
|
1286
|
+
p.$slots.append ? {
|
|
1322
1287
|
name: "append",
|
|
1323
|
-
fn:
|
|
1324
|
-
|
|
1288
|
+
fn: $(() => [
|
|
1289
|
+
b(p.$slots, "append")
|
|
1325
1290
|
]),
|
|
1326
1291
|
key: "1"
|
|
1327
1292
|
} : void 0,
|
|
1328
|
-
|
|
1293
|
+
p.$slots.extras ? {
|
|
1329
1294
|
name: "extras",
|
|
1330
|
-
fn:
|
|
1331
|
-
|
|
1295
|
+
fn: $(() => [
|
|
1296
|
+
b(p.$slots, "extras")
|
|
1332
1297
|
]),
|
|
1333
1298
|
key: "2"
|
|
1334
1299
|
} : void 0
|
|
1335
|
-
]), 1032, ["class", "
|
|
1300
|
+
]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required"]));
|
|
1336
1301
|
}
|
|
1337
|
-
}),
|
|
1302
|
+
}), jt = S(Wt), Pt = {
|
|
1338
1303
|
key: 2,
|
|
1339
1304
|
class: "q-select__loader"
|
|
1340
|
-
},
|
|
1305
|
+
}, Xt = {
|
|
1341
1306
|
noData: "No data available"
|
|
1342
|
-
},
|
|
1307
|
+
}, Yt = {
|
|
1343
1308
|
clear: {
|
|
1344
1309
|
icon: "close"
|
|
1345
1310
|
}
|
|
1346
|
-
},
|
|
1311
|
+
}, Zt = /* @__PURE__ */ B({
|
|
1347
1312
|
__name: "QCombobox",
|
|
1348
1313
|
props: {
|
|
1349
1314
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
1350
|
-
id: { default:
|
|
1315
|
+
id: { default: void 0 },
|
|
1351
1316
|
placeholder: { default: "" },
|
|
1352
1317
|
selectionMode: { default: "automatic" },
|
|
1353
1318
|
filterMode: { default: "builtin" },
|
|
@@ -1362,239 +1327,239 @@ const Qt = ["role"], Rt = {
|
|
|
1362
1327
|
itemValue: { default: "key" },
|
|
1363
1328
|
itemLabel: { default: "label" },
|
|
1364
1329
|
size: { default: void 0 },
|
|
1365
|
-
texts: { default: () =>
|
|
1366
|
-
icons: { default: () =>
|
|
1330
|
+
texts: { default: () => Xt },
|
|
1331
|
+
icons: { default: () => Yt },
|
|
1367
1332
|
class: { default: void 0 }
|
|
1368
1333
|
},
|
|
1369
1334
|
emits: ["update:modelValue", "update:inputValue", "before-show", "before-hide", "show", "hide"],
|
|
1370
|
-
setup(
|
|
1371
|
-
const e = o, l =
|
|
1372
|
-
|
|
1373
|
-
const
|
|
1335
|
+
setup(t, { expose: n, emit: o }) {
|
|
1336
|
+
const e = o, l = t, r = q(l.modelValue), s = q(!1), d = q(""), m = q(void 0), h = q(null), _ = q(null), p = q(null);
|
|
1337
|
+
Ee(A);
|
|
1338
|
+
const z = k(
|
|
1374
1339
|
() => l.clearable && !l.readonly && !l.disabled && !l.loading
|
|
1375
|
-
),
|
|
1376
|
-
var
|
|
1377
|
-
return l.filterMode === "manual" || !
|
|
1378
|
-
(w) => w[l.itemLabel].toLowerCase().startsWith(
|
|
1340
|
+
), T = k(() => {
|
|
1341
|
+
var i;
|
|
1342
|
+
return l.filterMode === "manual" || !R.value ? l.items : (i = l.items) == null ? void 0 : i.filter(
|
|
1343
|
+
(w) => w[l.itemLabel].toLowerCase().startsWith(d.value.toLowerCase())
|
|
1379
1344
|
);
|
|
1380
|
-
}),
|
|
1381
|
-
var
|
|
1382
|
-
return (
|
|
1383
|
-
}),
|
|
1384
|
-
const
|
|
1385
|
-
if (
|
|
1386
|
-
return
|
|
1387
|
-
}), O =
|
|
1345
|
+
}), D = k(() => {
|
|
1346
|
+
var i;
|
|
1347
|
+
return (i = l.items) == null ? void 0 : i.find((w) => w[l.itemValue] === r.value);
|
|
1348
|
+
}), Q = k(() => {
|
|
1349
|
+
const i = m.value;
|
|
1350
|
+
if (i !== void 0 && T.value[i])
|
|
1351
|
+
return T.value[i];
|
|
1352
|
+
}), O = k(() => {
|
|
1388
1353
|
var w;
|
|
1389
|
-
if (
|
|
1354
|
+
if (m.value === void 0)
|
|
1390
1355
|
return;
|
|
1391
|
-
const
|
|
1392
|
-
return
|
|
1393
|
-
}),
|
|
1394
|
-
var
|
|
1395
|
-
return
|
|
1356
|
+
const i = (w = _.value) == null ? void 0 : w.getItem(m.value);
|
|
1357
|
+
return i == null ? void 0 : i.id;
|
|
1358
|
+
}), R = k(() => {
|
|
1359
|
+
var i;
|
|
1360
|
+
return d.value.length > 0 && d.value !== ((i = D.value) == null ? void 0 : i[l.itemLabel]);
|
|
1396
1361
|
});
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1362
|
+
function C(i) {
|
|
1363
|
+
r.value = i, A(), e("update:modelValue", i);
|
|
1399
1364
|
}
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1365
|
+
function X(i) {
|
|
1366
|
+
C(i), H();
|
|
1402
1367
|
}
|
|
1403
|
-
function
|
|
1404
|
-
var
|
|
1405
|
-
|
|
1368
|
+
function A() {
|
|
1369
|
+
var i;
|
|
1370
|
+
d.value = ((i = D.value) == null ? void 0 : i[l.itemLabel]) || "";
|
|
1406
1371
|
}
|
|
1407
|
-
function
|
|
1408
|
-
|
|
1372
|
+
function N() {
|
|
1373
|
+
s.value || l.readonly || l.disabled || (e("before-show"), s.value = !0);
|
|
1409
1374
|
}
|
|
1410
|
-
function
|
|
1411
|
-
|
|
1375
|
+
function H() {
|
|
1376
|
+
s.value && (e("before-hide"), s.value = !1, m.value = void 0);
|
|
1412
1377
|
}
|
|
1413
|
-
function
|
|
1414
|
-
|
|
1378
|
+
function U() {
|
|
1379
|
+
C(void 0), m.value = void 0;
|
|
1415
1380
|
}
|
|
1416
1381
|
function K() {
|
|
1417
|
-
if (
|
|
1418
|
-
const
|
|
1419
|
-
|
|
1382
|
+
if (N(), D.value !== void 0) {
|
|
1383
|
+
const i = T.value.indexOf(D.value);
|
|
1384
|
+
i !== -1 && W(() => ye(i));
|
|
1420
1385
|
}
|
|
1421
1386
|
}
|
|
1422
|
-
function
|
|
1423
|
-
var w,
|
|
1424
|
-
if (!(!
|
|
1425
|
-
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
1426
|
-
|
|
1427
|
-
else if (["ArrowDown", "ArrowUp"].includes(
|
|
1428
|
-
|
|
1429
|
-
if (
|
|
1430
|
-
|
|
1387
|
+
function Y(i) {
|
|
1388
|
+
var w, E;
|
|
1389
|
+
if (!(!i.key || l.readonly || l.disabled))
|
|
1390
|
+
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(i.key) && (i.preventDefault(), i.stopPropagation()), i.key === "Escape")
|
|
1391
|
+
s.value ? H() : U();
|
|
1392
|
+
else if (["ArrowDown", "ArrowUp"].includes(i.key))
|
|
1393
|
+
s.value ? W(() => {
|
|
1394
|
+
if (m.value === void 0)
|
|
1395
|
+
c();
|
|
1431
1396
|
else {
|
|
1432
|
-
const G =
|
|
1433
|
-
|
|
1397
|
+
const G = i.key === "ArrowDown" ? "next" : "prev";
|
|
1398
|
+
f(m.value, G);
|
|
1434
1399
|
}
|
|
1435
|
-
}) : (
|
|
1436
|
-
|
|
1400
|
+
}) : (N(), W(() => {
|
|
1401
|
+
i.key === "ArrowDown" ? c() : a();
|
|
1437
1402
|
}));
|
|
1438
|
-
else if (
|
|
1439
|
-
if (
|
|
1403
|
+
else if (i.key === "Enter") {
|
|
1404
|
+
if (Q.value === void 0)
|
|
1440
1405
|
return;
|
|
1441
|
-
|
|
1406
|
+
X(Q.value[l.itemValue]);
|
|
1442
1407
|
} else
|
|
1443
|
-
|
|
1408
|
+
i.key === "Home" ? m.value = (w = _.value) == null ? void 0 : w.getFirstFocusableItemIndex() : i.key === "End" ? m.value = (E = _.value) == null ? void 0 : E.getLastFocusableItemIndex() : (/^[a-z]$/i.test(i.key) || i.key === "Backspace") && N();
|
|
1444
1409
|
}
|
|
1445
|
-
function
|
|
1446
|
-
var
|
|
1447
|
-
if (
|
|
1448
|
-
const
|
|
1449
|
-
(G) => G[l.itemValue] ===
|
|
1410
|
+
function c() {
|
|
1411
|
+
var i, w;
|
|
1412
|
+
if (r.value !== void 0) {
|
|
1413
|
+
const E = T.value.findIndex(
|
|
1414
|
+
(G) => G[l.itemValue] === r.value
|
|
1450
1415
|
);
|
|
1451
|
-
|
|
1416
|
+
E === -1 ? m.value = (i = _.value) == null ? void 0 : i.getFirstFocusableItemIndex() : m.value = E;
|
|
1452
1417
|
} else
|
|
1453
|
-
|
|
1418
|
+
m.value = (w = _.value) == null ? void 0 : w.getFirstFocusableItemIndex();
|
|
1454
1419
|
}
|
|
1455
|
-
function
|
|
1456
|
-
var
|
|
1457
|
-
|
|
1420
|
+
function a() {
|
|
1421
|
+
var i;
|
|
1422
|
+
m.value = (i = _.value) == null ? void 0 : i.getLastFocusableItemIndex();
|
|
1458
1423
|
}
|
|
1459
|
-
function
|
|
1460
|
-
var
|
|
1461
|
-
|
|
1424
|
+
function f(i, w) {
|
|
1425
|
+
var E;
|
|
1426
|
+
m.value = (E = _.value) == null ? void 0 : E.getAdjacentItemIndex(i, w);
|
|
1462
1427
|
}
|
|
1463
|
-
function
|
|
1464
|
-
var w,
|
|
1465
|
-
!((w =
|
|
1428
|
+
function g(i) {
|
|
1429
|
+
var w, E, G;
|
|
1430
|
+
!((w = p.value) != null && w.contains(i.relatedTarget)) && !((G = (E = h.value) == null ? void 0 : E.fieldRef) != null && G.contains(i.relatedTarget)) ? (H(), A()) : (i.preventDefault(), i.stopPropagation());
|
|
1466
1431
|
}
|
|
1467
|
-
function
|
|
1468
|
-
var
|
|
1469
|
-
(w = (
|
|
1432
|
+
function I() {
|
|
1433
|
+
var i, w;
|
|
1434
|
+
(w = (i = h.value) == null ? void 0 : i.inputRef) == null || w.focus();
|
|
1470
1435
|
}
|
|
1471
1436
|
function ue() {
|
|
1472
1437
|
e("show");
|
|
1473
1438
|
}
|
|
1474
|
-
function
|
|
1439
|
+
function Ae() {
|
|
1475
1440
|
e("hide");
|
|
1476
1441
|
}
|
|
1477
|
-
function
|
|
1478
|
-
var
|
|
1479
|
-
const w = (
|
|
1442
|
+
function ye(i) {
|
|
1443
|
+
var E;
|
|
1444
|
+
const w = (E = _.value) == null ? void 0 : E.getItem(i);
|
|
1480
1445
|
w == null || w.scrollIntoView({ block: "nearest", inline: "start" });
|
|
1481
1446
|
}
|
|
1482
1447
|
return F(
|
|
1483
1448
|
() => l.modelValue,
|
|
1484
|
-
(
|
|
1485
|
-
|
|
1449
|
+
(i) => {
|
|
1450
|
+
r.value = i, A();
|
|
1486
1451
|
}
|
|
1487
|
-
), F(
|
|
1488
|
-
|
|
1489
|
-
}), F(
|
|
1490
|
-
!
|
|
1491
|
-
}),
|
|
1492
|
-
triggerEl:
|
|
1493
|
-
}), (
|
|
1494
|
-
|
|
1495
|
-
modelValue:
|
|
1496
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
1452
|
+
), F(m, (i) => {
|
|
1453
|
+
i !== void 0 && ye(i);
|
|
1454
|
+
}), F(d, (i) => {
|
|
1455
|
+
!i && z.value ? U() : s.value && l.selectionMode === "automatic" && W(c), e("update:inputValue", i);
|
|
1456
|
+
}), n({
|
|
1457
|
+
triggerEl: h
|
|
1458
|
+
}), (i, w) => (u(), v(J, null, [
|
|
1459
|
+
j(y(jt), {
|
|
1460
|
+
modelValue: d.value,
|
|
1461
|
+
"onUpdate:modelValue": w[0] || (w[0] = (E) => d.value = E),
|
|
1497
1462
|
id: l.id,
|
|
1498
1463
|
label: l.label,
|
|
1499
1464
|
required: l.required,
|
|
1500
1465
|
ref_key: "triggerEl",
|
|
1501
|
-
ref:
|
|
1466
|
+
ref: h,
|
|
1502
1467
|
role: "combobox",
|
|
1503
1468
|
placeholder: l.placeholder,
|
|
1504
|
-
class:
|
|
1469
|
+
class: V(["q-combobox", l.class]),
|
|
1505
1470
|
readonly: l.readonly,
|
|
1506
1471
|
disabled: l.disabled,
|
|
1507
|
-
"aria-expanded":
|
|
1472
|
+
"aria-expanded": s.value,
|
|
1508
1473
|
"aria-haspopup": "listbox",
|
|
1509
1474
|
"aria-autocomplete": "list",
|
|
1510
1475
|
"aria-activedescendant": O.value,
|
|
1511
1476
|
size: l.size,
|
|
1512
1477
|
onClick: K,
|
|
1513
|
-
onFocusout:
|
|
1514
|
-
onKeydown:
|
|
1515
|
-
},
|
|
1516
|
-
"label.prepend":
|
|
1517
|
-
|
|
1478
|
+
onFocusout: g,
|
|
1479
|
+
onKeydown: te(Y, ["stop"])
|
|
1480
|
+
}, pe({
|
|
1481
|
+
"label.prepend": $(() => [
|
|
1482
|
+
b(i.$slots, "label.prepend")
|
|
1518
1483
|
]),
|
|
1519
|
-
"label.append":
|
|
1520
|
-
|
|
1484
|
+
"label.append": $(() => [
|
|
1485
|
+
b(i.$slots, "label.append")
|
|
1521
1486
|
]),
|
|
1522
1487
|
_: 2
|
|
1523
1488
|
}, [
|
|
1524
|
-
|
|
1489
|
+
i.$slots.prepend ? {
|
|
1525
1490
|
name: "prepend",
|
|
1526
|
-
fn:
|
|
1527
|
-
|
|
1491
|
+
fn: $(() => [
|
|
1492
|
+
b(i.$slots, "prepend")
|
|
1528
1493
|
]),
|
|
1529
1494
|
key: "0"
|
|
1530
1495
|
} : void 0,
|
|
1531
|
-
|
|
1496
|
+
z.value && d.value || i.$slots.append ? {
|
|
1532
1497
|
name: "append",
|
|
1533
|
-
fn:
|
|
1534
|
-
|
|
1498
|
+
fn: $(() => [
|
|
1499
|
+
z.value && d.value ? (u(), x(y(ee), Z({ key: 0 }, l.icons.clear, {
|
|
1535
1500
|
class: "q-combobox__clear",
|
|
1536
|
-
onClick:
|
|
1501
|
+
onClick: te(U, ["stop", "prevent"])
|
|
1537
1502
|
}), null, 16)) : L("", !0),
|
|
1538
|
-
|
|
1503
|
+
b(i.$slots, "append")
|
|
1539
1504
|
]),
|
|
1540
1505
|
key: "1"
|
|
1541
1506
|
} : void 0,
|
|
1542
|
-
|
|
1507
|
+
i.$slots.extras ? {
|
|
1543
1508
|
name: "extras",
|
|
1544
|
-
fn:
|
|
1545
|
-
|
|
1509
|
+
fn: $(() => [
|
|
1510
|
+
b(i.$slots, "extras")
|
|
1546
1511
|
]),
|
|
1547
1512
|
key: "2"
|
|
1548
1513
|
} : void 0
|
|
1549
1514
|
]), 1032, ["modelValue", "id", "label", "required", "placeholder", "class", "readonly", "disabled", "aria-expanded", "aria-activedescendant", "size"]),
|
|
1550
|
-
|
|
1551
|
-
"model-value":
|
|
1515
|
+
j(y(de), {
|
|
1516
|
+
"model-value": s.value,
|
|
1552
1517
|
spy: "",
|
|
1553
1518
|
trigger: "manual",
|
|
1554
1519
|
placement: "bottom",
|
|
1555
1520
|
width: "anchor",
|
|
1556
1521
|
offset: 4,
|
|
1557
|
-
anchor:
|
|
1522
|
+
anchor: h.value,
|
|
1558
1523
|
onEnter: ue,
|
|
1559
|
-
onLeave:
|
|
1524
|
+
onLeave: Ae
|
|
1560
1525
|
}, {
|
|
1561
|
-
default:
|
|
1562
|
-
var
|
|
1526
|
+
default: $(() => {
|
|
1527
|
+
var E;
|
|
1563
1528
|
return [
|
|
1564
|
-
|
|
1529
|
+
P("div", {
|
|
1565
1530
|
ref_key: "contentRef",
|
|
1566
|
-
ref:
|
|
1531
|
+
ref: p,
|
|
1567
1532
|
class: "q-select__body",
|
|
1568
|
-
onFocusout:
|
|
1533
|
+
onFocusout: g
|
|
1569
1534
|
}, [
|
|
1570
|
-
|
|
1571
|
-
l.loading ? (
|
|
1535
|
+
b(i.$slots, "body.prepend"),
|
|
1536
|
+
l.loading ? (u(), x(y(he), {
|
|
1572
1537
|
key: 0,
|
|
1573
1538
|
class: "q-select__loader",
|
|
1574
1539
|
size: 24
|
|
1575
|
-
})) :
|
|
1540
|
+
})) : T.value.length ? (u(), x(y(Ce), {
|
|
1576
1541
|
key: 1,
|
|
1577
1542
|
ref_key: "listRef",
|
|
1578
|
-
ref:
|
|
1543
|
+
ref: _,
|
|
1579
1544
|
class: "q-select__items",
|
|
1580
|
-
modelValue:
|
|
1545
|
+
modelValue: r.value,
|
|
1581
1546
|
"onUpdate:modelValue": [
|
|
1582
|
-
w[1] || (w[1] = (G) =>
|
|
1583
|
-
|
|
1547
|
+
w[1] || (w[1] = (G) => r.value = G),
|
|
1548
|
+
X
|
|
1584
1549
|
],
|
|
1585
|
-
highlighted: (
|
|
1586
|
-
items:
|
|
1587
|
-
groups:
|
|
1550
|
+
highlighted: (E = Q.value) == null ? void 0 : E[l.itemValue],
|
|
1551
|
+
items: T.value,
|
|
1552
|
+
groups: i.groups,
|
|
1588
1553
|
"item-label": l.itemLabel,
|
|
1589
1554
|
"item-value": l.itemValue,
|
|
1590
|
-
onMouseup:
|
|
1555
|
+
onMouseup: I
|
|
1591
1556
|
}, {
|
|
1592
|
-
item:
|
|
1593
|
-
|
|
1557
|
+
item: $(({ item: G }) => [
|
|
1558
|
+
b(i.$slots, "item", { item: G })
|
|
1594
1559
|
]),
|
|
1595
1560
|
_: 3
|
|
1596
|
-
}, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (
|
|
1597
|
-
|
|
1561
|
+
}, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (u(), v("div", Pt, M(i.texts.noData), 1)),
|
|
1562
|
+
b(i.$slots, "body.append")
|
|
1598
1563
|
], 544)
|
|
1599
1564
|
];
|
|
1600
1565
|
}),
|
|
@@ -1602,16 +1567,16 @@ const Qt = ["role"], Rt = {
|
|
|
1602
1567
|
}, 8, ["model-value", "anchor"])
|
|
1603
1568
|
], 64));
|
|
1604
1569
|
}
|
|
1605
|
-
}),
|
|
1570
|
+
}), In = S(Zt), Jt = {
|
|
1606
1571
|
key: 0,
|
|
1607
1572
|
class: "q-input-group__prepend"
|
|
1608
|
-
},
|
|
1573
|
+
}, en = { key: 0 }, tn = {
|
|
1609
1574
|
key: 1,
|
|
1610
1575
|
class: "q-input-group__append"
|
|
1611
|
-
},
|
|
1576
|
+
}, nn = { key: 0 }, ln = /* @__PURE__ */ B({
|
|
1612
1577
|
__name: "QInputGroup",
|
|
1613
1578
|
props: {
|
|
1614
|
-
id: { default:
|
|
1579
|
+
id: { default: void 0 },
|
|
1615
1580
|
label: { default: "" },
|
|
1616
1581
|
required: { type: Boolean },
|
|
1617
1582
|
prependIcon: { default: void 0 },
|
|
@@ -1619,55 +1584,55 @@ const Qt = ["role"], Rt = {
|
|
|
1619
1584
|
size: { default: "large" },
|
|
1620
1585
|
class: { default: void 0 }
|
|
1621
1586
|
},
|
|
1622
|
-
setup(
|
|
1623
|
-
const
|
|
1624
|
-
return
|
|
1587
|
+
setup(t) {
|
|
1588
|
+
const n = t;
|
|
1589
|
+
return De({
|
|
1625
1590
|
QField: {
|
|
1626
1591
|
size: "block"
|
|
1627
1592
|
}
|
|
1628
|
-
}), (o, e) => (
|
|
1629
|
-
id:
|
|
1630
|
-
class:
|
|
1631
|
-
label:
|
|
1632
|
-
required:
|
|
1633
|
-
size:
|
|
1593
|
+
}), (o, e) => (u(), x(y(be), {
|
|
1594
|
+
id: n.id,
|
|
1595
|
+
class: V(["q-input-group", n.class]),
|
|
1596
|
+
label: n.label,
|
|
1597
|
+
required: n.required,
|
|
1598
|
+
size: n.size
|
|
1634
1599
|
}, {
|
|
1635
|
-
default:
|
|
1636
|
-
o.$slots.prepend ||
|
|
1637
|
-
|
|
1638
|
-
|
|
1600
|
+
default: $(() => [
|
|
1601
|
+
o.$slots.prepend || n.prependIcon ? (u(), v("div", Jt, [
|
|
1602
|
+
n.prependIcon ? (u(), v("span", en, [
|
|
1603
|
+
j(y(ee), re(ke(n.prependIcon)), null, 16)
|
|
1639
1604
|
])) : L("", !0),
|
|
1640
|
-
|
|
1605
|
+
b(o.$slots, "prepend")
|
|
1641
1606
|
])) : L("", !0),
|
|
1642
|
-
|
|
1643
|
-
o.$slots.append ||
|
|
1644
|
-
|
|
1645
|
-
|
|
1607
|
+
b(o.$slots, "default"),
|
|
1608
|
+
o.$slots.append || n.appendIcon ? (u(), v("div", tn, [
|
|
1609
|
+
n.appendIcon ? (u(), v("span", nn, [
|
|
1610
|
+
j(y(ee), re(ke(n.appendIcon)), null, 16)
|
|
1646
1611
|
])) : L("", !0),
|
|
1647
|
-
|
|
1612
|
+
b(o.$slots, "append")
|
|
1648
1613
|
])) : L("", !0)
|
|
1649
1614
|
]),
|
|
1650
1615
|
_: 3
|
|
1651
1616
|
}, 8, ["id", "class", "label", "required", "size"]));
|
|
1652
1617
|
}
|
|
1653
|
-
}),
|
|
1618
|
+
}), Ln = S(ln), on = /* @__PURE__ */ B({
|
|
1654
1619
|
__name: "QLineLoader",
|
|
1655
1620
|
props: {
|
|
1656
1621
|
class: { default: void 0 }
|
|
1657
1622
|
},
|
|
1658
|
-
setup(
|
|
1659
|
-
const
|
|
1660
|
-
return (o, e) => (
|
|
1661
|
-
class:
|
|
1623
|
+
setup(t) {
|
|
1624
|
+
const n = t;
|
|
1625
|
+
return (o, e) => (u(), v("div", {
|
|
1626
|
+
class: V(["q-line-loader", n.class])
|
|
1662
1627
|
}, null, 2));
|
|
1663
1628
|
}
|
|
1664
|
-
}),
|
|
1629
|
+
}), Bn = S(on), an = {
|
|
1665
1630
|
key: 0,
|
|
1666
1631
|
class: "q-popover__header"
|
|
1667
|
-
},
|
|
1632
|
+
}, sn = {
|
|
1668
1633
|
key: 1,
|
|
1669
1634
|
class: "q-popover__body"
|
|
1670
|
-
},
|
|
1635
|
+
}, rn = ["innerHTML"], dn = { key: 1 }, un = /* @__PURE__ */ B({
|
|
1671
1636
|
inheritAttrs: !1,
|
|
1672
1637
|
__name: "QPopover",
|
|
1673
1638
|
props: {
|
|
@@ -1678,260 +1643,259 @@ const Qt = ["role"], Rt = {
|
|
|
1678
1643
|
disabled: { type: Boolean },
|
|
1679
1644
|
html: { type: Boolean, default: !0 },
|
|
1680
1645
|
placement: { default: "right" },
|
|
1681
|
-
spy: { type: Boolean, default: !0 },
|
|
1682
1646
|
text: {},
|
|
1683
1647
|
title: {}
|
|
1684
1648
|
},
|
|
1685
|
-
setup(
|
|
1686
|
-
const
|
|
1687
|
-
return (o, e) => (
|
|
1688
|
-
"model-value":
|
|
1649
|
+
setup(t) {
|
|
1650
|
+
const n = t;
|
|
1651
|
+
return (o, e) => (u(), x(y(de), {
|
|
1652
|
+
"model-value": n.modelValue,
|
|
1689
1653
|
class: "q-popover",
|
|
1690
1654
|
trigger: "click",
|
|
1691
|
-
anchor:
|
|
1692
|
-
arrow:
|
|
1693
|
-
attach:
|
|
1694
|
-
disabled:
|
|
1695
|
-
placement:
|
|
1696
|
-
spy: t.spy
|
|
1655
|
+
anchor: n.anchor,
|
|
1656
|
+
arrow: n.arrow,
|
|
1657
|
+
attach: n.attach,
|
|
1658
|
+
disabled: n.disabled,
|
|
1659
|
+
placement: n.placement
|
|
1697
1660
|
}, {
|
|
1698
|
-
default:
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1661
|
+
default: $(() => [
|
|
1662
|
+
n.title || o.$slots.header ? (u(), v("h3", an, [
|
|
1663
|
+
oe(M(n.title) + " ", 1),
|
|
1664
|
+
b(o.$slots, "header")
|
|
1702
1665
|
])) : L("", !0),
|
|
1703
|
-
|
|
1704
|
-
|
|
1666
|
+
n.text || o.$slots.body ? (u(), v("div", sn, [
|
|
1667
|
+
n.html ? (u(), v("span", {
|
|
1705
1668
|
key: 0,
|
|
1706
|
-
innerHTML:
|
|
1707
|
-
}, null, 8,
|
|
1708
|
-
|
|
1669
|
+
innerHTML: n.text
|
|
1670
|
+
}, null, 8, rn)) : (u(), v("span", dn, M(n.text), 1)),
|
|
1671
|
+
b(o.$slots, "body")
|
|
1709
1672
|
])) : L("", !0)
|
|
1710
1673
|
]),
|
|
1711
1674
|
_: 3
|
|
1712
|
-
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement"
|
|
1675
|
+
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement"]));
|
|
1713
1676
|
}
|
|
1714
|
-
}),
|
|
1677
|
+
}), Sn = S(un), cn = {
|
|
1715
1678
|
key: 0,
|
|
1716
1679
|
class: "q-select__value"
|
|
1717
|
-
},
|
|
1680
|
+
}, fn = {
|
|
1718
1681
|
key: 1,
|
|
1719
1682
|
class: "q-select__placeholder"
|
|
1720
|
-
},
|
|
1683
|
+
}, pn = {
|
|
1684
|
+
key: 0,
|
|
1685
|
+
class: "q-select__loader"
|
|
1686
|
+
}, mn = {
|
|
1721
1687
|
placeholder: "Choose..."
|
|
1722
|
-
},
|
|
1688
|
+
}, vn = {
|
|
1723
1689
|
chevron: {
|
|
1724
1690
|
icon: "chevron-down"
|
|
1725
1691
|
},
|
|
1726
1692
|
clear: {
|
|
1727
1693
|
icon: "close"
|
|
1728
1694
|
}
|
|
1729
|
-
},
|
|
1695
|
+
}, hn = /* @__PURE__ */ B({
|
|
1730
1696
|
__name: "QSelect",
|
|
1731
1697
|
props: {
|
|
1732
1698
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
1733
|
-
id: { default:
|
|
1699
|
+
id: { default: void 0 },
|
|
1734
1700
|
label: { default: "" },
|
|
1735
1701
|
clearable: { type: Boolean },
|
|
1736
1702
|
readonly: { type: Boolean },
|
|
1737
1703
|
disabled: { type: Boolean },
|
|
1738
1704
|
required: { type: Boolean },
|
|
1739
1705
|
loading: { type: Boolean },
|
|
1740
|
-
icons: { default: () =>
|
|
1706
|
+
icons: { default: () => vn },
|
|
1741
1707
|
items: {},
|
|
1742
1708
|
groups: { default: () => [] },
|
|
1743
1709
|
itemValue: { default: "key" },
|
|
1744
1710
|
itemLabel: { default: "label" },
|
|
1745
1711
|
size: { default: void 0 },
|
|
1746
|
-
texts: { default: () =>
|
|
1712
|
+
texts: { default: () => mn },
|
|
1747
1713
|
class: { default: "" }
|
|
1748
1714
|
},
|
|
1749
1715
|
emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
|
|
1750
|
-
setup(
|
|
1751
|
-
const o =
|
|
1716
|
+
setup(t, { emit: n }) {
|
|
1717
|
+
const o = n, e = t, l = q(e.modelValue), r = q(!1), s = q(""), d = q(null), m = q(null), h = q(null), _ = k(
|
|
1752
1718
|
() => {
|
|
1753
|
-
var
|
|
1754
|
-
return (
|
|
1719
|
+
var c;
|
|
1720
|
+
return (c = e.items) == null ? void 0 : c.find((a) => a[e.itemValue] === l.value);
|
|
1755
1721
|
}
|
|
1756
|
-
),
|
|
1757
|
-
() =>
|
|
1758
|
-
),
|
|
1722
|
+
), p = k(
|
|
1723
|
+
() => _.value ? _.value[e.itemLabel] : ""
|
|
1724
|
+
), z = k(
|
|
1759
1725
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1760
1726
|
);
|
|
1761
|
-
function
|
|
1762
|
-
l.value =
|
|
1727
|
+
function T(c) {
|
|
1728
|
+
l.value = c, o("update:modelValue", c), C();
|
|
1763
1729
|
}
|
|
1764
|
-
function
|
|
1765
|
-
|
|
1730
|
+
function D() {
|
|
1731
|
+
z.value && T(void 0);
|
|
1766
1732
|
}
|
|
1767
|
-
function
|
|
1768
|
-
e.readonly || e.disabled || (
|
|
1733
|
+
function Q() {
|
|
1734
|
+
e.readonly || e.disabled || (r.value ? C() : R());
|
|
1769
1735
|
}
|
|
1770
|
-
function O(
|
|
1771
|
-
var
|
|
1772
|
-
!((
|
|
1736
|
+
function O(c) {
|
|
1737
|
+
var a, f, g;
|
|
1738
|
+
!((a = h.value) != null && a.contains(c.relatedTarget)) && !((g = (f = d.value) == null ? void 0 : f.fieldRef) != null && g.contains(c.relatedTarget)) && C();
|
|
1773
1739
|
}
|
|
1774
|
-
function
|
|
1775
|
-
|
|
1740
|
+
function R() {
|
|
1741
|
+
r.value || (o("before-show"), r.value = !0);
|
|
1776
1742
|
}
|
|
1777
|
-
function
|
|
1778
|
-
|
|
1779
|
-
}
|
|
1780
|
-
let
|
|
1781
|
-
function
|
|
1782
|
-
if (!(!
|
|
1783
|
-
if (window.clearTimeout(
|
|
1784
|
-
|
|
1785
|
-
for (let
|
|
1786
|
-
if (e.items[
|
|
1787
|
-
|
|
1743
|
+
function C() {
|
|
1744
|
+
r.value && (o("before-hide"), r.value = !1);
|
|
1745
|
+
}
|
|
1746
|
+
let X;
|
|
1747
|
+
function A(c) {
|
|
1748
|
+
if (!(!c.key || e.readonly || e.disabled)) {
|
|
1749
|
+
if (window.clearTimeout(X), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(c.key) && (c.preventDefault(), c.stopPropagation()), ["Enter", " "].includes(c.key) && (r.value = !0), ["Escape", "Tab"].includes(c.key) && (r.value ? r.value = !1 : e.clearable && c.key === "Escape" && D()), c.key === "Delete" && e.clearable && D(), /^[a-z]$/i.test(c.key)) {
|
|
1750
|
+
s.value += c.key.toLowerCase();
|
|
1751
|
+
for (let a = 0; a < e.items.length; a++)
|
|
1752
|
+
if (e.items[a][e.itemLabel].toLowerCase().startsWith(s.value)) {
|
|
1753
|
+
Y(a);
|
|
1788
1754
|
break;
|
|
1789
1755
|
}
|
|
1790
1756
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1757
|
+
X = window.setTimeout(function() {
|
|
1758
|
+
s.value = "";
|
|
1793
1759
|
}, 500);
|
|
1794
1760
|
}
|
|
1795
1761
|
}
|
|
1796
|
-
function
|
|
1797
|
-
var
|
|
1798
|
-
e.loading ? (
|
|
1762
|
+
function N() {
|
|
1763
|
+
var c;
|
|
1764
|
+
e.loading ? (c = h.value) == null || c.focus() : K(), o("show");
|
|
1799
1765
|
}
|
|
1800
|
-
function
|
|
1801
|
-
|
|
1766
|
+
function H() {
|
|
1767
|
+
U(), o("hide");
|
|
1802
1768
|
}
|
|
1803
|
-
function
|
|
1804
|
-
var
|
|
1805
|
-
(
|
|
1769
|
+
function U() {
|
|
1770
|
+
var c, a;
|
|
1771
|
+
(a = (c = d.value) == null ? void 0 : c.fieldRef) == null || a.focus();
|
|
1806
1772
|
}
|
|
1807
1773
|
function K() {
|
|
1808
|
-
var
|
|
1809
|
-
(
|
|
1774
|
+
var c;
|
|
1775
|
+
(c = m.value) == null || c.$el.focus();
|
|
1810
1776
|
}
|
|
1811
|
-
function
|
|
1812
|
-
var
|
|
1813
|
-
(
|
|
1777
|
+
function Y(c) {
|
|
1778
|
+
var a;
|
|
1779
|
+
(a = m.value) == null || a.focusItem(c);
|
|
1814
1780
|
}
|
|
1815
1781
|
return F(
|
|
1816
1782
|
() => e.modelValue,
|
|
1817
|
-
(
|
|
1818
|
-
l.value =
|
|
1783
|
+
(c) => {
|
|
1784
|
+
l.value = c;
|
|
1819
1785
|
}
|
|
1820
1786
|
), F(
|
|
1821
1787
|
() => e.loading,
|
|
1822
|
-
(
|
|
1823
|
-
!
|
|
1788
|
+
(c) => {
|
|
1789
|
+
!c && r.value && W(K);
|
|
1824
1790
|
}
|
|
1825
|
-
), (
|
|
1826
|
-
var
|
|
1827
|
-
return
|
|
1828
|
-
|
|
1791
|
+
), (c, a) => {
|
|
1792
|
+
var f;
|
|
1793
|
+
return u(), v(J, null, [
|
|
1794
|
+
j(y(be), {
|
|
1829
1795
|
id: e.id,
|
|
1830
1796
|
label: e.label,
|
|
1831
1797
|
required: e.required,
|
|
1832
1798
|
ref_key: "triggerEl",
|
|
1833
|
-
ref:
|
|
1799
|
+
ref: d,
|
|
1834
1800
|
role: "combobox",
|
|
1835
|
-
tabindex:
|
|
1836
|
-
class:
|
|
1801
|
+
tabindex: e.disabled ? -1 : 0,
|
|
1802
|
+
class: V([
|
|
1837
1803
|
"q-select",
|
|
1838
1804
|
{
|
|
1839
1805
|
"q-select--readonly": e.readonly,
|
|
1840
1806
|
"q-select--disabled": e.disabled,
|
|
1841
|
-
"q-select--expanded":
|
|
1807
|
+
"q-select--expanded": r.value
|
|
1842
1808
|
},
|
|
1843
1809
|
e.class
|
|
1844
1810
|
]),
|
|
1845
1811
|
readonly: e.readonly,
|
|
1846
1812
|
disabled: e.disabled,
|
|
1847
|
-
"aria-expanded":
|
|
1813
|
+
"aria-expanded": r.value,
|
|
1848
1814
|
"aria-haspopup": "listbox",
|
|
1849
1815
|
size: e.size,
|
|
1850
|
-
onClick:
|
|
1851
|
-
onKeydown:
|
|
1852
|
-
},
|
|
1853
|
-
append:
|
|
1854
|
-
|
|
1855
|
-
|
|
1816
|
+
onClick: Q,
|
|
1817
|
+
onKeydown: te(A, ["stop"])
|
|
1818
|
+
}, pe({
|
|
1819
|
+
append: $(() => [
|
|
1820
|
+
b(c.$slots, "append"),
|
|
1821
|
+
z.value && l.value ? (u(), x(y(ee), Z({ key: 0 }, e.icons.clear, {
|
|
1856
1822
|
class: "q-select__clear",
|
|
1857
|
-
onClick:
|
|
1823
|
+
onClick: te(D, ["stop", "prevent"])
|
|
1858
1824
|
}), null, 16)) : L("", !0),
|
|
1859
|
-
e.readonly ? L("", !0) : (
|
|
1825
|
+
e.readonly ? L("", !0) : (u(), x(y(ee), Z({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16))
|
|
1860
1826
|
]),
|
|
1861
|
-
default:
|
|
1862
|
-
l.value !== void 0 ? (
|
|
1863
|
-
!e.readonly && !e.disabled ? (
|
|
1864
|
-
|
|
1827
|
+
default: $(() => [
|
|
1828
|
+
l.value !== void 0 ? (u(), v("span", cn, M(p.value), 1)) : (u(), v("span", fn, [
|
|
1829
|
+
!e.readonly && !e.disabled ? (u(), v(J, { key: 0 }, [
|
|
1830
|
+
oe(M(c.texts.placeholder), 1)
|
|
1865
1831
|
], 64)) : L("", !0)
|
|
1866
1832
|
]))
|
|
1867
1833
|
]),
|
|
1868
1834
|
_: 2
|
|
1869
1835
|
}, [
|
|
1870
|
-
(
|
|
1836
|
+
(f = _.value) != null && f.icon || c.$slots.prepend ? {
|
|
1871
1837
|
name: "prepend",
|
|
1872
|
-
fn:
|
|
1873
|
-
var
|
|
1838
|
+
fn: $(() => {
|
|
1839
|
+
var g, I;
|
|
1874
1840
|
return [
|
|
1875
|
-
|
|
1876
|
-
(
|
|
1841
|
+
b(c.$slots, "prepend"),
|
|
1842
|
+
(g = _.value) != null && g.icon ? (u(), x(y(ee), re(Z({ key: 0 }, (I = _.value) == null ? void 0 : I.icon)), null, 16)) : L("", !0)
|
|
1877
1843
|
];
|
|
1878
1844
|
}),
|
|
1879
1845
|
key: "0"
|
|
1880
1846
|
} : void 0,
|
|
1881
|
-
|
|
1847
|
+
c.$slots.extras ? {
|
|
1882
1848
|
name: "extras",
|
|
1883
|
-
fn:
|
|
1884
|
-
|
|
1849
|
+
fn: $(() => [
|
|
1850
|
+
b(c.$slots, "extras")
|
|
1885
1851
|
]),
|
|
1886
1852
|
key: "1"
|
|
1887
1853
|
} : void 0
|
|
1888
|
-
]), 1032, ["id", "label", "required", "class", "readonly", "disabled", "aria-expanded", "size"]),
|
|
1889
|
-
|
|
1890
|
-
"model-value":
|
|
1854
|
+
]), 1032, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "aria-expanded", "size"]),
|
|
1855
|
+
j(y(de), {
|
|
1856
|
+
"model-value": r.value,
|
|
1891
1857
|
spy: "",
|
|
1892
1858
|
trigger: "manual",
|
|
1893
1859
|
placement: "bottom",
|
|
1894
1860
|
width: "anchor",
|
|
1895
|
-
anchor:
|
|
1861
|
+
anchor: d.value,
|
|
1896
1862
|
offset: 2,
|
|
1897
|
-
onEnter:
|
|
1898
|
-
onLeave:
|
|
1863
|
+
onEnter: N,
|
|
1864
|
+
onLeave: H
|
|
1899
1865
|
}, {
|
|
1900
|
-
default:
|
|
1901
|
-
|
|
1866
|
+
default: $(() => [
|
|
1867
|
+
P("div", {
|
|
1902
1868
|
ref_key: "contentRef",
|
|
1903
|
-
ref:
|
|
1869
|
+
ref: h,
|
|
1904
1870
|
class: "q-select__body",
|
|
1905
1871
|
tabindex: "-1",
|
|
1906
1872
|
onFocusout: O,
|
|
1907
|
-
onKeydown:
|
|
1873
|
+
onKeydown: te(A, ["stop"])
|
|
1908
1874
|
}, [
|
|
1909
|
-
|
|
1910
|
-
e.loading ? (
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
size: 24
|
|
1914
|
-
})) : (c(), B($(Qe), {
|
|
1875
|
+
b(c.$slots, "body.prepend"),
|
|
1876
|
+
e.loading ? (u(), v("div", pn, [
|
|
1877
|
+
j(y(he), { size: 24 })
|
|
1878
|
+
])) : (u(), x(y(Ce), {
|
|
1915
1879
|
key: 1,
|
|
1916
1880
|
ref_key: "listRef",
|
|
1917
|
-
ref:
|
|
1881
|
+
ref: m,
|
|
1918
1882
|
class: "q-select__items",
|
|
1919
1883
|
modelValue: l.value,
|
|
1920
1884
|
"onUpdate:modelValue": [
|
|
1921
|
-
|
|
1922
|
-
|
|
1885
|
+
a[0] || (a[0] = (g) => l.value = g),
|
|
1886
|
+
T
|
|
1923
1887
|
],
|
|
1924
1888
|
items: e.items,
|
|
1925
|
-
groups:
|
|
1889
|
+
groups: c.groups,
|
|
1926
1890
|
"item-label": e.itemLabel,
|
|
1927
1891
|
"item-value": e.itemValue
|
|
1928
1892
|
}, {
|
|
1929
|
-
item:
|
|
1930
|
-
|
|
1893
|
+
item: $(({ item: g }) => [
|
|
1894
|
+
b(c.$slots, "item", { item: g })
|
|
1931
1895
|
]),
|
|
1932
1896
|
_: 3
|
|
1933
1897
|
}, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
|
|
1934
|
-
|
|
1898
|
+
b(c.$slots, "body.append")
|
|
1935
1899
|
], 544)
|
|
1936
1900
|
]),
|
|
1937
1901
|
_: 3
|
|
@@ -1939,11 +1903,24 @@ const Qt = ["role"], Rt = {
|
|
|
1939
1903
|
], 64);
|
|
1940
1904
|
};
|
|
1941
1905
|
}
|
|
1942
|
-
}), xn =
|
|
1906
|
+
}), xn = S(hn), bn = /* @__PURE__ */ B({
|
|
1907
|
+
__name: "QThemeProvider",
|
|
1908
|
+
props: {
|
|
1909
|
+
theme: {}
|
|
1910
|
+
},
|
|
1911
|
+
setup(t) {
|
|
1912
|
+
const n = t;
|
|
1913
|
+
return (o, e) => (u(), v("div", {
|
|
1914
|
+
class: V(["q-theme-provider", `q-theme--${n.theme}`])
|
|
1915
|
+
}, [
|
|
1916
|
+
b(o.$slots, "default")
|
|
1917
|
+
], 2));
|
|
1918
|
+
}
|
|
1919
|
+
}), Vn = S(bn), yn = ["innerHTML"], gn = { key: 1 }, _n = /* @__PURE__ */ B({
|
|
1943
1920
|
__name: "QTooltip",
|
|
1944
1921
|
props: {
|
|
1945
1922
|
modelValue: { type: Boolean },
|
|
1946
|
-
id: { default:
|
|
1923
|
+
id: { default: void 0 },
|
|
1947
1924
|
anchor: {},
|
|
1948
1925
|
appearance: { default: "inverted" },
|
|
1949
1926
|
arrow: { type: Boolean, default: !0 },
|
|
@@ -1956,61 +1933,63 @@ const Qt = ["role"], Rt = {
|
|
|
1956
1933
|
trigger: { default: "hover" },
|
|
1957
1934
|
class: { default: void 0 }
|
|
1958
1935
|
},
|
|
1959
|
-
setup(
|
|
1960
|
-
const t = n;
|
|
1961
|
-
return (
|
|
1962
|
-
|
|
1963
|
-
props: { "aria-describedby":
|
|
1936
|
+
setup(t) {
|
|
1937
|
+
const n = t, o = ie(n.id);
|
|
1938
|
+
return (e, l) => (u(), v(J, null, [
|
|
1939
|
+
b(e.$slots, "anchor", {
|
|
1940
|
+
props: { "aria-describedby": y(o) }
|
|
1964
1941
|
}),
|
|
1965
|
-
|
|
1966
|
-
"model-value":
|
|
1967
|
-
anchor:
|
|
1942
|
+
j(y(de), {
|
|
1943
|
+
"model-value": n.modelValue,
|
|
1944
|
+
anchor: n.anchor,
|
|
1968
1945
|
role: "tooltip",
|
|
1969
|
-
id:
|
|
1970
|
-
appearance:
|
|
1971
|
-
arrow:
|
|
1972
|
-
attach:
|
|
1973
|
-
class:
|
|
1974
|
-
delay:
|
|
1975
|
-
disabled:
|
|
1976
|
-
placement:
|
|
1977
|
-
trigger:
|
|
1946
|
+
id: y(o),
|
|
1947
|
+
appearance: n.appearance,
|
|
1948
|
+
arrow: n.arrow,
|
|
1949
|
+
attach: n.attach,
|
|
1950
|
+
class: V(["q-tooltip", n.class]),
|
|
1951
|
+
delay: n.delay,
|
|
1952
|
+
disabled: n.disabled,
|
|
1953
|
+
placement: n.placement,
|
|
1954
|
+
trigger: n.trigger
|
|
1978
1955
|
}, {
|
|
1979
|
-
default:
|
|
1980
|
-
|
|
1956
|
+
default: $(() => [
|
|
1957
|
+
n.html ? (u(), v("span", {
|
|
1981
1958
|
key: 0,
|
|
1982
|
-
innerHTML:
|
|
1983
|
-
}, null, 8,
|
|
1959
|
+
innerHTML: n.text
|
|
1960
|
+
}, null, 8, yn)) : (u(), v("span", gn, M(n.text), 1))
|
|
1984
1961
|
]),
|
|
1985
1962
|
_: 1
|
|
1986
1963
|
}, 8, ["model-value", "anchor", "id", "appearance", "arrow", "attach", "class", "delay", "disabled", "placement", "trigger"])
|
|
1987
1964
|
], 64));
|
|
1988
1965
|
}
|
|
1989
|
-
}),
|
|
1966
|
+
}), En = S(_n);
|
|
1990
1967
|
export {
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1968
|
+
rt as QButton,
|
|
1969
|
+
ut as QButtonGroup,
|
|
1970
|
+
qn as QButtonToggle,
|
|
1971
|
+
In as QCombobox,
|
|
1972
|
+
be as QField,
|
|
1996
1973
|
ee as QIcon,
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
1974
|
+
_t as QIconFont,
|
|
1975
|
+
kt as QIconImg,
|
|
1976
|
+
wt as QIconSvg,
|
|
1977
|
+
Ln as QInputGroup,
|
|
1978
|
+
Bn as QLineLoader,
|
|
1979
|
+
Ce as QList,
|
|
1980
|
+
Dt as QListItem,
|
|
1981
|
+
Tt as QListItemGroup,
|
|
2005
1982
|
de as QOverlay,
|
|
2006
|
-
|
|
1983
|
+
Sn as QPopover,
|
|
2007
1984
|
xn as QSelect,
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
Vn as
|
|
1985
|
+
he as QSpinnerLoader,
|
|
1986
|
+
jt as QTextField,
|
|
1987
|
+
Vn as QThemeProvider,
|
|
1988
|
+
En as QTooltip,
|
|
2011
1989
|
$n as createFramework,
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
wn as
|
|
1990
|
+
We as defaultDarkColorScheme,
|
|
1991
|
+
$e as defaultLightColorScheme,
|
|
1992
|
+
wn as provideTheme,
|
|
1993
|
+
Ge as useTheme
|
|
2015
1994
|
};
|
|
2016
1995
|
//# sourceMappingURL=ui.esm.js.map
|