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