@validol4ik/uikit 0.3.31 → 0.3.33
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/{AppButtonCopy-DhpGToMA.js → AppButtonCopy-BWIgBdrF.js} +2 -2
- package/dist/{AppButtonCopy-0BhYb2nY.cjs → AppButtonCopy-DjSpwv-H.cjs} +1 -1
- package/dist/{AppSelect-Bg_r7IT-.js → AppSelect-BssBKbak.js} +824 -808
- package/dist/{AppSelect-DYglZ5gw.cjs → AppSelect-CP8Et3oY.cjs} +1 -1
- package/dist/{QNoSsr-DIrrSzFf.cjs → QNoSsr-CqROto8y.cjs} +1 -1
- package/dist/{QNoSsr-B6NOqbLV.js → QNoSsr-DR2Z03Vq.js} +1 -1
- package/dist/{index-VwoDHcYO.js → index-B_qitL0q.js} +2 -2
- package/dist/{index-DMWwOLS3.cjs → index-C7vzyU2i.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/form/AppSelect/types.d.ts +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { computed as f, ref as T, h, getCurrentInstance as le, toRaw as $e, onMounted as tt, watch as K, onBeforeUpdate as Ll, inject as
|
|
2
|
-
import { u as Il, s as ae, h as Hl, a as Se, b as $l, c as be, Q as Ae, d as
|
|
3
|
-
import { i as
|
|
1
|
+
import { computed as f, ref as T, h, getCurrentInstance as le, toRaw as $e, onMounted as tt, watch as K, onBeforeUpdate as Ll, inject as Eo, onBeforeUnmount as ce, nextTick as ue, onDeactivated as kt, onActivated as Ol, Transition as yt, onUnmounted as Bo, Teleport as Ao, onBeforeMount as To, onUpdated as Ro, defineComponent as zo, openBlock as de, createBlock as Tt, unref as rl, withCtx as ye, createElementVNode as st, normalizeClass as ct, createElementBlock as xe, toDisplayString as Ue, createCommentVNode as Pe, createVNode as Xe, mergeProps as Fo, createTextVNode as Rt, Fragment as dt, withModifiers as Mo } from "vue";
|
|
2
|
+
import { u as Il, s as ae, h as Hl, a as Se, b as $l, c as be, Q as Ae, d as Lo, i as qt, e as Oo, f as Io, p as pe, g as Ho, j as $o, R as Po, k as Do, l as sl, m as Wo, n as ge, v as jo, o as zt, q as Pl, r as No, t as cl, w as Ko, x as Dl, y as Qo, z as Uo, B as De, D as Xo, S as Yo, _ as Go } from "./index-B_qitL0q.js";
|
|
3
|
+
import { i as Zo, b as Wl, P as Jo, c as we, r as Dt, a as jl, Q as en } from "./QNoSsr-DR2Z03Vq.js";
|
|
4
4
|
const lt = {
|
|
5
5
|
dark: {
|
|
6
6
|
type: Boolean,
|
|
7
7
|
default: null
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function ot(e, t) {
|
|
11
11
|
return f(() => e.dark === null ? t.dark.isActive : e.dark);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const l = T(null),
|
|
13
|
+
function tn(e, t) {
|
|
14
|
+
const l = T(null), o = f(() => e.disable === !0 ? null : h("span", {
|
|
15
15
|
ref: l,
|
|
16
16
|
class: "no-outline",
|
|
17
17
|
tabindex: -1
|
|
18
18
|
}));
|
|
19
|
-
function a(
|
|
20
|
-
const
|
|
21
|
-
|
|
19
|
+
function a(i) {
|
|
20
|
+
const u = t.value;
|
|
21
|
+
i !== void 0 && i.type.indexOf("key") === 0 ? u !== null && document.activeElement !== u && u.contains(document.activeElement) === !0 && u.focus() : l.value !== null && (i === void 0 || u !== null && u.contains(i.target) === !0) && l.value.focus();
|
|
22
22
|
}
|
|
23
23
|
return {
|
|
24
|
-
refocusTargetEl:
|
|
24
|
+
refocusTargetEl: o,
|
|
25
25
|
refocusTarget: a
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
const Nl = {
|
|
29
29
|
name: String
|
|
30
30
|
};
|
|
31
|
-
function
|
|
32
|
-
return (t, l,
|
|
31
|
+
function ln(e = {}) {
|
|
32
|
+
return (t, l, o) => {
|
|
33
33
|
t[l](
|
|
34
34
|
h("input", {
|
|
35
|
-
class: "hidden" + (
|
|
35
|
+
class: "hidden" + (o || ""),
|
|
36
36
|
...e.value
|
|
37
37
|
})
|
|
38
38
|
);
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function on(e) {
|
|
42
42
|
return f(() => e.name || e.for);
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const nn = {
|
|
45
45
|
xs: 30,
|
|
46
46
|
sm: 35,
|
|
47
47
|
md: 40,
|
|
48
48
|
lg: 50,
|
|
49
49
|
xl: 60
|
|
50
|
-
},
|
|
50
|
+
}, un = {
|
|
51
51
|
...lt,
|
|
52
52
|
...$l,
|
|
53
53
|
...Nl,
|
|
@@ -74,35 +74,35 @@ const oo = {
|
|
|
74
74
|
dense: Boolean,
|
|
75
75
|
disable: Boolean,
|
|
76
76
|
tabindex: [String, Number]
|
|
77
|
-
},
|
|
78
|
-
function
|
|
79
|
-
const { props: l, slots:
|
|
77
|
+
}, an = ["update:modelValue"];
|
|
78
|
+
function rn(e, t) {
|
|
79
|
+
const { props: l, slots: o, emit: a, proxy: i } = le(), { $q: u } = i, d = ot(l, u), m = T(null), { refocusTargetEl: g, refocusTarget: c } = tn(l, m), y = Il(l, nn), C = f(
|
|
80
80
|
() => l.val !== void 0 && Array.isArray(l.modelValue)
|
|
81
81
|
), r = f(() => {
|
|
82
82
|
const A = $e(l.val);
|
|
83
83
|
return C.value === !0 ? l.modelValue.findIndex((U) => $e(U) === A) : -1;
|
|
84
|
-
}),
|
|
85
|
-
() =>
|
|
84
|
+
}), v = f(() => C.value === !0 ? r.value !== -1 : $e(l.modelValue) === $e(l.trueValue)), _ = f(() => C.value === !0 ? r.value === -1 : $e(l.modelValue) === $e(l.falseValue)), S = f(
|
|
85
|
+
() => v.value === !1 && _.value === !1
|
|
86
86
|
), P = f(() => l.disable === !0 ? -1 : l.tabindex || 0), E = f(
|
|
87
87
|
() => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (l.disable === !0 ? " disabled" : "") + (d.value === !0 ? ` q-${e}--dark` : "") + (l.dense === !0 ? ` q-${e}--dense` : "") + (l.leftLabel === !0 ? " reverse" : "")
|
|
88
88
|
), q = f(() => {
|
|
89
|
-
const A =
|
|
89
|
+
const A = v.value === !0 ? "truthy" : _.value === !0 ? "falsy" : "indet", U = l.color !== void 0 && (l.keepColor === !0 || _.value !== !0) ? ` text-${l.color}` : "";
|
|
90
90
|
return `q-${e}__inner relative-position non-selectable q-${e}__inner--${A}${U}`;
|
|
91
91
|
}), R = f(() => {
|
|
92
92
|
const A = { type: "checkbox" };
|
|
93
93
|
return l.name !== void 0 && Object.assign(A, {
|
|
94
94
|
// see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
|
|
95
|
-
".checked":
|
|
96
|
-
"^checked":
|
|
95
|
+
".checked": v.value,
|
|
96
|
+
"^checked": v.value === !0 ? "checked" : void 0,
|
|
97
97
|
name: l.name,
|
|
98
98
|
value: C.value === !0 ? l.val : l.trueValue
|
|
99
99
|
}), A;
|
|
100
|
-
}), D =
|
|
100
|
+
}), D = ln(R), B = f(() => {
|
|
101
101
|
const A = {
|
|
102
102
|
tabindex: P.value,
|
|
103
103
|
role: "checkbox",
|
|
104
104
|
"aria-label": l.label,
|
|
105
|
-
"aria-checked": S.value === !0 ? "mixed" :
|
|
105
|
+
"aria-checked": S.value === !0 ? "mixed" : v.value === !0 ? "true" : "false"
|
|
106
106
|
};
|
|
107
107
|
return l.disable === !0 && (A["aria-disabled"] = "true"), A;
|
|
108
108
|
});
|
|
@@ -111,13 +111,13 @@ function ao(e, t) {
|
|
|
111
111
|
}
|
|
112
112
|
function H() {
|
|
113
113
|
if (C.value === !0) {
|
|
114
|
-
if (
|
|
114
|
+
if (v.value === !0) {
|
|
115
115
|
const A = l.modelValue.slice();
|
|
116
116
|
return A.splice(r.value, 1), A;
|
|
117
117
|
}
|
|
118
118
|
return l.modelValue.concat([l.val]);
|
|
119
119
|
}
|
|
120
|
-
if (
|
|
120
|
+
if (v.value === !0) {
|
|
121
121
|
if (l.toggleOrder !== "ft" || l.toggleIndeterminate === !1)
|
|
122
122
|
return l.falseValue;
|
|
123
123
|
} else if (_.value === !0) {
|
|
@@ -133,9 +133,9 @@ function ao(e, t) {
|
|
|
133
133
|
function G(A) {
|
|
134
134
|
(A.keyCode === 13 || A.keyCode === 32) && L(A);
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
return Object.assign(
|
|
138
|
-
const A =
|
|
136
|
+
const oe = t(v, S);
|
|
137
|
+
return Object.assign(i, { toggle: L }), () => {
|
|
138
|
+
const A = oe();
|
|
139
139
|
l.disable !== !0 && D(
|
|
140
140
|
A,
|
|
141
141
|
"unshift",
|
|
@@ -149,13 +149,13 @@ function ao(e, t) {
|
|
|
149
149
|
}, A)
|
|
150
150
|
];
|
|
151
151
|
g.value !== null && U.push(g.value);
|
|
152
|
-
const
|
|
153
|
-
return
|
|
152
|
+
const ne = l.label !== void 0 ? Hl(o.default, [l.label]) : Se(o.default);
|
|
153
|
+
return ne !== void 0 && U.push(
|
|
154
154
|
h("div", {
|
|
155
155
|
class: `q-${e}__label q-anchor--skip`
|
|
156
|
-
},
|
|
156
|
+
}, ne)
|
|
157
157
|
), h("div", {
|
|
158
|
-
ref:
|
|
158
|
+
ref: m,
|
|
159
159
|
class: E.value,
|
|
160
160
|
...B.value,
|
|
161
161
|
onClick: L,
|
|
@@ -164,7 +164,7 @@ function ao(e, t) {
|
|
|
164
164
|
}, U);
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const sn = () => h("div", {
|
|
168
168
|
key: "svg",
|
|
169
169
|
class: "q-checkbox__bg absolute"
|
|
170
170
|
}, [
|
|
@@ -182,29 +182,29 @@ const ro = () => h("div", {
|
|
|
182
182
|
d: "M4,14H20V10H4"
|
|
183
183
|
})
|
|
184
184
|
])
|
|
185
|
-
]),
|
|
185
|
+
]), cn = be({
|
|
186
186
|
name: "QCheckbox",
|
|
187
|
-
props:
|
|
188
|
-
emits:
|
|
187
|
+
props: un,
|
|
188
|
+
emits: an,
|
|
189
189
|
setup(e) {
|
|
190
|
-
const t =
|
|
191
|
-
function l(
|
|
192
|
-
const
|
|
193
|
-
() => (
|
|
190
|
+
const t = sn();
|
|
191
|
+
function l(o, a) {
|
|
192
|
+
const i = f(
|
|
193
|
+
() => (o.value === !0 ? e.checkedIcon : a.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
|
|
194
194
|
);
|
|
195
|
-
return () =>
|
|
195
|
+
return () => i.value !== null ? [
|
|
196
196
|
h("div", {
|
|
197
197
|
key: "icon",
|
|
198
198
|
class: "q-checkbox__icon-container absolute-full flex flex-center no-wrap"
|
|
199
199
|
}, [
|
|
200
200
|
h(Ae, {
|
|
201
201
|
class: "q-checkbox__icon",
|
|
202
|
-
name:
|
|
202
|
+
name: i.value
|
|
203
203
|
})
|
|
204
204
|
])
|
|
205
205
|
] : [t];
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return rn("checkbox", l);
|
|
208
208
|
}
|
|
209
209
|
}), bt = be({
|
|
210
210
|
name: "QItemSection",
|
|
@@ -230,7 +230,7 @@ const ro = () => h("div", {
|
|
|
230
230
|
lines: [Number, String]
|
|
231
231
|
},
|
|
232
232
|
setup(e, { slots: t }) {
|
|
233
|
-
const l = f(() => parseInt(e.lines, 10)),
|
|
233
|
+
const l = f(() => parseInt(e.lines, 10)), o = f(
|
|
234
234
|
() => "q-item__label" + (e.overline === !0 ? " q-item__label--overline text-overline" : "") + (e.caption === !0 ? " q-item__label--caption text-caption" : "") + (e.header === !0 ? " q-item__label--header" : "") + (l.value === 1 ? " ellipsis" : "")
|
|
235
235
|
), a = f(() => e.lines !== void 0 && l.value > 1 ? {
|
|
236
236
|
overflow: "hidden",
|
|
@@ -240,14 +240,14 @@ const ro = () => h("div", {
|
|
|
240
240
|
} : null);
|
|
241
241
|
return () => h("div", {
|
|
242
242
|
style: a.value,
|
|
243
|
-
class:
|
|
243
|
+
class: o.value
|
|
244
244
|
}, Se(t.default));
|
|
245
245
|
}
|
|
246
246
|
}), Ql = be({
|
|
247
247
|
name: "QItem",
|
|
248
248
|
props: {
|
|
249
249
|
...lt,
|
|
250
|
-
...
|
|
250
|
+
...Io,
|
|
251
251
|
tag: {
|
|
252
252
|
type: String,
|
|
253
253
|
default: "div"
|
|
@@ -265,14 +265,14 @@ const ro = () => h("div", {
|
|
|
265
265
|
},
|
|
266
266
|
emits: ["click", "keyup"],
|
|
267
267
|
setup(e, { slots: t, emit: l }) {
|
|
268
|
-
const { proxy: { $q:
|
|
269
|
-
() => e.clickable === !0 ||
|
|
268
|
+
const { proxy: { $q: o } } = le(), a = ot(e, o), { hasLink: i, linkAttrs: u, linkClass: d, linkTag: m, navigateOnClick: g } = Lo(), c = T(null), y = T(null), C = f(
|
|
269
|
+
() => e.clickable === !0 || i.value === !0 || e.tag === "label"
|
|
270
270
|
), r = f(
|
|
271
271
|
() => e.disable !== !0 && C.value === !0
|
|
272
|
-
),
|
|
273
|
-
() => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (a.value === !0 ? " q-item--dark" : "") + (
|
|
272
|
+
), v = f(
|
|
273
|
+
() => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (a.value === !0 ? " q-item--dark" : "") + (i.value === !0 && e.active === null ? d.value : e.active === !0 ? ` q-item--active${e.activeClass !== void 0 ? ` ${e.activeClass}` : ""}` : "") + (e.disable === !0 ? " disabled" : "") + (r.value === !0 ? " q-item--clickable q-link cursor-pointer " + (e.manualFocus === !0 ? "q-manual-focusable" : "q-focusable q-hoverable") + (e.focused === !0 ? " q-manual-focusable--focused" : "") : "")
|
|
274
274
|
), _ = f(() => e.insetLevel === void 0 ? null : {
|
|
275
|
-
["padding" + (
|
|
275
|
+
["padding" + (o.lang.rtl === !0 ? "Right" : "Left")]: 16 + e.insetLevel * 56 + "px"
|
|
276
276
|
});
|
|
277
277
|
function S(q) {
|
|
278
278
|
r.value === !0 && (y.value !== null && (q.qKeyEvent !== !0 && document.activeElement === c.value ? y.value.focus() : document.activeElement === y.value && c.value.focus()), g(q));
|
|
@@ -286,7 +286,7 @@ const ro = () => h("div", {
|
|
|
286
286
|
l("keyup", q);
|
|
287
287
|
}
|
|
288
288
|
function E() {
|
|
289
|
-
const q =
|
|
289
|
+
const q = Oo(t.default, []);
|
|
290
290
|
return r.value === !0 && q.unshift(
|
|
291
291
|
h("div", { class: "q-focus-helper", tabindex: -1, ref: y })
|
|
292
292
|
), q;
|
|
@@ -294,14 +294,14 @@ const ro = () => h("div", {
|
|
|
294
294
|
return () => {
|
|
295
295
|
const q = {
|
|
296
296
|
ref: c,
|
|
297
|
-
class:
|
|
297
|
+
class: v.value,
|
|
298
298
|
style: _.value,
|
|
299
299
|
role: "listitem",
|
|
300
300
|
onClick: S,
|
|
301
301
|
onKeyup: P
|
|
302
302
|
};
|
|
303
|
-
return r.value === !0 ? (q.tabindex = e.tabindex || "0", Object.assign(q,
|
|
304
|
-
|
|
303
|
+
return r.value === !0 ? (q.tabindex = e.tabindex || "0", Object.assign(q, u.value)) : C.value === !0 && (q["aria-disabled"] = "true"), h(
|
|
304
|
+
m.value,
|
|
305
305
|
q,
|
|
306
306
|
E()
|
|
307
307
|
);
|
|
@@ -312,7 +312,7 @@ let Ft, ft = 0;
|
|
|
312
312
|
const ee = new Array(256);
|
|
313
313
|
for (let e = 0; e < 256; e++)
|
|
314
314
|
ee[e] = (e + 256).toString(16).substring(1);
|
|
315
|
-
const
|
|
315
|
+
const dn = (() => {
|
|
316
316
|
const e = typeof crypto < "u" ? crypto : typeof window < "u" ? window.crypto || window.msCrypto : void 0;
|
|
317
317
|
if (e !== void 0) {
|
|
318
318
|
if (e.randomBytes !== void 0)
|
|
@@ -325,60 +325,60 @@ const co = (() => {
|
|
|
325
325
|
}
|
|
326
326
|
return (t) => {
|
|
327
327
|
const l = [];
|
|
328
|
-
for (let
|
|
328
|
+
for (let o = t; o > 0; o--)
|
|
329
329
|
l.push(Math.floor(Math.random() * 256));
|
|
330
330
|
return l;
|
|
331
331
|
};
|
|
332
332
|
})(), fl = 4096;
|
|
333
333
|
function Wt() {
|
|
334
|
-
(Ft === void 0 || ft + 16 > fl) && (ft = 0, Ft =
|
|
334
|
+
(Ft === void 0 || ft + 16 > fl) && (ft = 0, Ft = dn(fl));
|
|
335
335
|
const e = Array.prototype.slice.call(Ft, ft, ft += 16);
|
|
336
336
|
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, ee[e[0]] + ee[e[1]] + ee[e[2]] + ee[e[3]] + "-" + ee[e[4]] + ee[e[5]] + "-" + ee[e[6]] + ee[e[7]] + "-" + ee[e[8]] + ee[e[9]] + "-" + ee[e[10]] + ee[e[11]] + ee[e[12]] + ee[e[13]] + ee[e[14]] + ee[e[15]];
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function fn(e) {
|
|
339
339
|
return e ?? null;
|
|
340
340
|
}
|
|
341
341
|
function vl(e, t) {
|
|
342
342
|
return e ?? (t === !0 ? `f_${Wt()}` : null);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
if (
|
|
346
|
-
const l = e !== void 0 ? T(
|
|
344
|
+
function vn({ getValue: e, required: t = !0 } = {}) {
|
|
345
|
+
if (Zo.value === !0) {
|
|
346
|
+
const l = e !== void 0 ? T(fn(e())) : T(null);
|
|
347
347
|
return t === !0 && l.value === null && tt(() => {
|
|
348
348
|
l.value = `f_${Wt()}`;
|
|
349
|
-
}), e !== void 0 && K(e, (
|
|
350
|
-
l.value = vl(
|
|
349
|
+
}), e !== void 0 && K(e, (o) => {
|
|
350
|
+
l.value = vl(o, t);
|
|
351
351
|
}), l;
|
|
352
352
|
}
|
|
353
353
|
return e !== void 0 ? f(() => vl(e(), t)) : T(`f_${Wt()}`);
|
|
354
354
|
}
|
|
355
355
|
const ml = /^on[A-Z]/;
|
|
356
|
-
function
|
|
356
|
+
function mn() {
|
|
357
357
|
const { attrs: e, vnode: t } = le(), l = {
|
|
358
358
|
listeners: T({}),
|
|
359
359
|
attributes: T({})
|
|
360
360
|
};
|
|
361
|
-
function
|
|
362
|
-
const a = {},
|
|
363
|
-
for (const
|
|
364
|
-
|
|
365
|
-
for (const
|
|
366
|
-
ml.test(
|
|
367
|
-
l.attributes.value = a, l.listeners.value =
|
|
368
|
-
}
|
|
369
|
-
return Ll(
|
|
370
|
-
}
|
|
371
|
-
const
|
|
372
|
-
function
|
|
373
|
-
const
|
|
374
|
-
if (
|
|
375
|
-
const { props: a, proxy:
|
|
376
|
-
Object.assign(
|
|
377
|
-
|
|
361
|
+
function o() {
|
|
362
|
+
const a = {}, i = {};
|
|
363
|
+
for (const u in e)
|
|
364
|
+
u !== "class" && u !== "style" && ml.test(u) === !1 && (a[u] = e[u]);
|
|
365
|
+
for (const u in t.props)
|
|
366
|
+
ml.test(u) === !0 && (i[u] = t.props[u]);
|
|
367
|
+
l.attributes.value = a, l.listeners.value = i;
|
|
368
|
+
}
|
|
369
|
+
return Ll(o), o(), l;
|
|
370
|
+
}
|
|
371
|
+
const hn = "_q_fo_";
|
|
372
|
+
function gn({ validate: e, resetValidation: t, requiresQForm: l }) {
|
|
373
|
+
const o = Eo(hn, !1);
|
|
374
|
+
if (o !== !1) {
|
|
375
|
+
const { props: a, proxy: i } = le();
|
|
376
|
+
Object.assign(i, { validate: e, resetValidation: t }), K(() => a.disable, (u) => {
|
|
377
|
+
u === !0 ? (typeof t == "function" && t(), o.unbindComponent(i)) : o.bindComponent(i);
|
|
378
378
|
}), tt(() => {
|
|
379
|
-
a.disable !== !0 &&
|
|
379
|
+
a.disable !== !0 && o.bindComponent(i);
|
|
380
380
|
}), ce(() => {
|
|
381
|
-
a.disable !== !0 &&
|
|
381
|
+
a.disable !== !0 && o.unbindComponent(i);
|
|
382
382
|
});
|
|
383
383
|
} else l === !0 && console.error("Parent QForm not found on useFormChild()!");
|
|
384
384
|
}
|
|
@@ -405,18 +405,18 @@ const hl = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, gl = /^#[0-9a-fA-F]{4}([0-9a-fA
|
|
|
405
405
|
anyColor: (e) => pl.test(e) || vt.test(e) || mt.test(e)
|
|
406
406
|
};
|
|
407
407
|
function Ul(e, t = 250, l) {
|
|
408
|
-
let
|
|
408
|
+
let o = null;
|
|
409
409
|
function a() {
|
|
410
|
-
const
|
|
411
|
-
|
|
410
|
+
const i = arguments, u = () => {
|
|
411
|
+
o = null, l !== !0 && e.apply(this, i);
|
|
412
412
|
};
|
|
413
|
-
|
|
413
|
+
o !== null ? clearTimeout(o) : l === !0 && e.apply(this, i), o = setTimeout(u, t);
|
|
414
414
|
}
|
|
415
415
|
return a.cancel = () => {
|
|
416
|
-
|
|
416
|
+
o !== null && clearTimeout(o);
|
|
417
417
|
}, a;
|
|
418
418
|
}
|
|
419
|
-
const
|
|
419
|
+
const pn = [!0, !1, "ondemand"], bn = {
|
|
420
420
|
modelValue: {},
|
|
421
421
|
error: {
|
|
422
422
|
type: Boolean,
|
|
@@ -430,40 +430,40 @@ const po = [!0, !1, "ondemand"], bo = {
|
|
|
430
430
|
type: [Boolean, String],
|
|
431
431
|
default: !1,
|
|
432
432
|
// statement unneeded but avoids future vue implementation changes
|
|
433
|
-
validator: (e) =>
|
|
433
|
+
validator: (e) => pn.includes(e)
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
function
|
|
437
|
-
const { props: l, proxy:
|
|
438
|
-
|
|
439
|
-
let d = 0,
|
|
436
|
+
function yn(e, t) {
|
|
437
|
+
const { props: l, proxy: o } = le(), a = T(!1), i = T(null), u = T(!1);
|
|
438
|
+
gn({ validate: _, resetValidation: v });
|
|
439
|
+
let d = 0, m;
|
|
440
440
|
const g = f(
|
|
441
441
|
() => l.rules !== void 0 && l.rules !== null && l.rules.length !== 0
|
|
442
442
|
), c = f(() => l.disable !== !0 && g.value === !0 && t.value === !1), y = f(
|
|
443
443
|
() => l.error === !0 || a.value === !0
|
|
444
|
-
), C = f(() => typeof l.errorMessage == "string" && l.errorMessage.length !== 0 ? l.errorMessage :
|
|
444
|
+
), C = f(() => typeof l.errorMessage == "string" && l.errorMessage.length !== 0 ? l.errorMessage : i.value);
|
|
445
445
|
K(() => l.modelValue, () => {
|
|
446
|
-
|
|
446
|
+
u.value = !0, c.value === !0 && l.lazyRules === !1 && S();
|
|
447
447
|
});
|
|
448
448
|
function r() {
|
|
449
|
-
l.lazyRules !== "ondemand" && c.value === !0 &&
|
|
449
|
+
l.lazyRules !== "ondemand" && c.value === !0 && u.value === !0 && S();
|
|
450
450
|
}
|
|
451
451
|
K(() => l.reactiveRules, (P) => {
|
|
452
|
-
P === !0 ?
|
|
452
|
+
P === !0 ? m === void 0 && (m = K(() => l.rules, r, { immediate: !0, deep: !0 })) : m !== void 0 && (m(), m = void 0);
|
|
453
453
|
}, { immediate: !0 }), K(() => l.lazyRules, r), K(e, (P) => {
|
|
454
|
-
P === !0 ?
|
|
454
|
+
P === !0 ? u.value = !0 : c.value === !0 && l.lazyRules !== "ondemand" && S();
|
|
455
455
|
});
|
|
456
|
-
function
|
|
457
|
-
d++, t.value = !1,
|
|
456
|
+
function v() {
|
|
457
|
+
d++, t.value = !1, u.value = !1, a.value = !1, i.value = null, S.cancel();
|
|
458
458
|
}
|
|
459
459
|
function _(P = l.modelValue) {
|
|
460
460
|
if (l.disable === !0 || g.value === !1)
|
|
461
461
|
return !0;
|
|
462
462
|
const E = ++d, q = t.value !== !0 ? () => {
|
|
463
|
-
|
|
463
|
+
u.value = !0;
|
|
464
464
|
} : () => {
|
|
465
465
|
}, R = (B, L) => {
|
|
466
|
-
B === !0 && q(), a.value = B,
|
|
466
|
+
B === !0 && q(), a.value = B, i.value = L || null, t.value = !1;
|
|
467
467
|
}, D = [];
|
|
468
468
|
for (let B = 0; B < l.rules.length; B++) {
|
|
469
469
|
const L = l.rules[B];
|
|
@@ -484,21 +484,21 @@ function yo(e, t) {
|
|
|
484
484
|
}
|
|
485
485
|
const S = Ul(_, 0);
|
|
486
486
|
return ce(() => {
|
|
487
|
-
|
|
488
|
-
}), Object.assign(
|
|
489
|
-
isDirtyModel:
|
|
487
|
+
m !== void 0 && m(), S.cancel();
|
|
488
|
+
}), Object.assign(o, { resetValidation: v, validate: _ }), Wl(o, "hasError", () => y.value), {
|
|
489
|
+
isDirtyModel: u,
|
|
490
490
|
hasRules: g,
|
|
491
491
|
hasError: y,
|
|
492
492
|
errorMessage: C,
|
|
493
493
|
validate: _,
|
|
494
|
-
resetValidation:
|
|
494
|
+
resetValidation: v
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
let Be = [], et = [];
|
|
498
498
|
function Xl(e) {
|
|
499
499
|
et = et.filter((t) => t !== e);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Sn(e) {
|
|
502
502
|
Xl(e), et.push(e);
|
|
503
503
|
}
|
|
504
504
|
function bl(e) {
|
|
@@ -507,15 +507,15 @@ function bl(e) {
|
|
|
507
507
|
function Kt(e) {
|
|
508
508
|
et.length === 0 ? e() : Be.push(e);
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function wn(e) {
|
|
511
511
|
Be = Be.filter((t) => t !== e);
|
|
512
512
|
}
|
|
513
513
|
function jt(e) {
|
|
514
514
|
return e != null && ("" + e).length !== 0;
|
|
515
515
|
}
|
|
516
|
-
const
|
|
516
|
+
const xn = {
|
|
517
517
|
...lt,
|
|
518
|
-
...
|
|
518
|
+
...bn,
|
|
519
519
|
label: String,
|
|
520
520
|
stackLabel: Boolean,
|
|
521
521
|
hint: String,
|
|
@@ -545,27 +545,27 @@ const xo = {
|
|
|
545
545
|
autofocus: Boolean,
|
|
546
546
|
for: String
|
|
547
547
|
}, Qt = {
|
|
548
|
-
...
|
|
548
|
+
...xn,
|
|
549
549
|
maxlength: [Number, String]
|
|
550
550
|
}, Yl = ["update:modelValue", "clear", "focus", "blur"];
|
|
551
551
|
function Gl({ requiredForAttr: e = !0, tagProp: t, changeEvent: l = !1 } = {}) {
|
|
552
|
-
const { props:
|
|
552
|
+
const { props: o, proxy: a } = le(), i = ot(o, a.$q), u = vn({
|
|
553
553
|
required: e,
|
|
554
|
-
getValue: () =>
|
|
554
|
+
getValue: () => o.for
|
|
555
555
|
});
|
|
556
556
|
return {
|
|
557
557
|
requiredForAttr: e,
|
|
558
558
|
changeEvent: l,
|
|
559
|
-
tag: t === !0 ? f(() =>
|
|
560
|
-
isDark:
|
|
559
|
+
tag: t === !0 ? f(() => o.tag) : { value: "label" },
|
|
560
|
+
isDark: i,
|
|
561
561
|
editable: f(
|
|
562
|
-
() =>
|
|
562
|
+
() => o.disable !== !0 && o.readonly !== !0
|
|
563
563
|
),
|
|
564
564
|
innerLoading: T(!1),
|
|
565
565
|
focused: T(!1),
|
|
566
566
|
hasPopupOpen: !1,
|
|
567
|
-
splitAttrs:
|
|
568
|
-
targetUid:
|
|
567
|
+
splitAttrs: mn(),
|
|
568
|
+
targetUid: u,
|
|
569
569
|
rootRef: T(null),
|
|
570
570
|
targetRef: T(null),
|
|
571
571
|
controlRef: T(null)
|
|
@@ -590,7 +590,7 @@ function Gl({ requiredForAttr: e = !0, tagProp: t, changeEvent: l = !1 } = {}) {
|
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
592
|
function Zl(e) {
|
|
593
|
-
const { props: t, emit: l, slots:
|
|
593
|
+
const { props: t, emit: l, slots: o, attrs: a, proxy: i } = le(), { $q: u } = i;
|
|
594
594
|
let d = null;
|
|
595
595
|
e.hasValue === void 0 && (e.hasValue = f(() => jt(t.modelValue))), e.emitValue === void 0 && (e.emitValue = (k) => {
|
|
596
596
|
l("update:modelValue", k);
|
|
@@ -598,7 +598,7 @@ function Zl(e) {
|
|
|
598
598
|
onFocusin: Q,
|
|
599
599
|
onFocusout: G
|
|
600
600
|
}), Object.assign(e, {
|
|
601
|
-
clearValue:
|
|
601
|
+
clearValue: oe,
|
|
602
602
|
onControlFocusin: Q,
|
|
603
603
|
onControlFocusout: G,
|
|
604
604
|
focus: L
|
|
@@ -609,15 +609,15 @@ function Zl(e) {
|
|
|
609
609
|
}
|
|
610
610
|
}));
|
|
611
611
|
const {
|
|
612
|
-
isDirtyModel:
|
|
612
|
+
isDirtyModel: m,
|
|
613
613
|
hasRules: g,
|
|
614
614
|
hasError: c,
|
|
615
615
|
errorMessage: y,
|
|
616
616
|
resetValidation: C
|
|
617
|
-
} =
|
|
617
|
+
} = yn(e.focused, e.innerLoading), r = e.floatingLabel !== void 0 ? f(() => t.stackLabel === !0 || e.focused.value === !0 || e.floatingLabel.value === !0) : f(() => t.stackLabel === !0 || e.focused.value === !0 || e.hasValue.value === !0), v = f(
|
|
618
618
|
() => t.bottomSlots === !0 || t.hint !== void 0 || g.value === !0 || t.counter === !0 || t.error !== null
|
|
619
619
|
), _ = f(() => t.filled === !0 ? "filled" : t.outlined === !0 ? "outlined" : t.borderless === !0 ? "borderless" : t.standout ? "standout" : "standard"), S = f(
|
|
620
|
-
() => `q-field row no-wrap items-start q-field--${_.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (t.rounded === !0 ? " q-field--rounded" : "") + (t.square === !0 ? " q-field--square" : "") + (r.value === !0 ? " q-field--float" : "") + (E.value === !0 ? " q-field--labeled" : "") + (t.dense === !0 ? " q-field--dense" : "") + (t.itemAligned === !0 ? " q-field--item-aligned q-item-type" : "") + (e.isDark.value === !0 ? " q-field--dark" : "") + (e.getControl === void 0 ? " q-field--auto-height" : "") + (e.focused.value === !0 ? " q-field--focused" : "") + (c.value === !0 ? " q-field--error" : "") + (c.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (t.hideBottomSpace !== !0 &&
|
|
620
|
+
() => `q-field row no-wrap items-start q-field--${_.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (t.rounded === !0 ? " q-field--rounded" : "") + (t.square === !0 ? " q-field--square" : "") + (r.value === !0 ? " q-field--float" : "") + (E.value === !0 ? " q-field--labeled" : "") + (t.dense === !0 ? " q-field--dense" : "") + (t.itemAligned === !0 ? " q-field--item-aligned q-item-type" : "") + (e.isDark.value === !0 ? " q-field--dark" : "") + (e.getControl === void 0 ? " q-field--auto-height" : "") + (e.focused.value === !0 ? " q-field--focused" : "") + (c.value === !0 ? " q-field--error" : "") + (c.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (t.hideBottomSpace !== !0 && v.value === !0 ? " q-field--with-bottom" : "") + (t.disable === !0 ? " q-field--disabled" : t.readonly === !0 ? " q-field--readonly" : "")
|
|
621
621
|
), P = f(
|
|
622
622
|
() => "q-field__control relative-position row no-wrap" + (t.bgColor !== void 0 ? ` bg-${t.bgColor}` : "") + (c.value === !0 ? " text-negative" : typeof t.standout == "string" && t.standout.length !== 0 && e.focused.value === !0 ? ` ${t.standout}` : t.color !== void 0 ? ` text-${t.color}` : "")
|
|
623
623
|
), E = f(
|
|
@@ -644,7 +644,7 @@ function Zl(e) {
|
|
|
644
644
|
Kt(B);
|
|
645
645
|
}
|
|
646
646
|
function H() {
|
|
647
|
-
|
|
647
|
+
wn(B);
|
|
648
648
|
const k = document.activeElement;
|
|
649
649
|
k !== null && e.rootRef.value.contains(k) && k.blur();
|
|
650
650
|
}
|
|
@@ -656,62 +656,62 @@ function Zl(e) {
|
|
|
656
656
|
d = null, !(document.hasFocus() === !0 && (e.hasPopupOpen === !0 || e.controlRef === void 0 || e.controlRef.value === null || e.controlRef.value.contains(document.activeElement) !== !1)) && (e.focused.value === !0 && (e.focused.value = !1, l("blur", k)), M !== void 0 && M());
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
ae(k),
|
|
661
|
-
const M =
|
|
662
|
-
C(),
|
|
659
|
+
function oe(k) {
|
|
660
|
+
ae(k), u.platform.is.mobile !== !0 ? (e.targetRef !== void 0 && e.targetRef.value || e.rootRef.value).focus() : e.rootRef.value.contains(document.activeElement) === !0 && document.activeElement.blur(), t.type === "file" && (e.inputRef.value.value = null), l("update:modelValue", null), e.changeEvent === !0 && l("change", null), l("clear", t.modelValue), ue(() => {
|
|
661
|
+
const M = m.value;
|
|
662
|
+
C(), m.value = M;
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
665
|
function A(k) {
|
|
666
|
-
[13, 32].includes(k.keyCode) &&
|
|
666
|
+
[13, 32].includes(k.keyCode) && oe(k);
|
|
667
667
|
}
|
|
668
668
|
function U() {
|
|
669
669
|
const k = [];
|
|
670
|
-
return
|
|
670
|
+
return o.prepend !== void 0 && k.push(
|
|
671
671
|
h("div", {
|
|
672
672
|
class: "q-field__prepend q-field__marginal row no-wrap items-center",
|
|
673
673
|
key: "prepend",
|
|
674
674
|
onClick: pe
|
|
675
|
-
},
|
|
675
|
+
}, o.prepend())
|
|
676
676
|
), k.push(
|
|
677
677
|
h("div", {
|
|
678
678
|
class: "q-field__control-container col relative-position row no-wrap q-anchor--skip"
|
|
679
|
-
},
|
|
679
|
+
}, ne())
|
|
680
680
|
), c.value === !0 && t.noErrorIcon === !1 && k.push(
|
|
681
681
|
X("error", [
|
|
682
|
-
h(Ae, { name:
|
|
682
|
+
h(Ae, { name: u.iconSet.field.error, color: "negative" })
|
|
683
683
|
])
|
|
684
684
|
), t.loading === !0 || e.innerLoading.value === !0 ? k.push(
|
|
685
685
|
X(
|
|
686
686
|
"inner-loading-append",
|
|
687
|
-
|
|
687
|
+
o.loading !== void 0 ? o.loading() : [h(Ho, { color: t.color })]
|
|
688
688
|
)
|
|
689
689
|
) : t.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && k.push(
|
|
690
690
|
X("inner-clearable-append", [
|
|
691
691
|
h(Ae, {
|
|
692
692
|
class: "q-field__focusable-action",
|
|
693
|
-
name: t.clearIcon ||
|
|
693
|
+
name: t.clearIcon || u.iconSet.field.clear,
|
|
694
694
|
tabindex: 0,
|
|
695
695
|
role: "button",
|
|
696
696
|
"aria-hidden": "false",
|
|
697
|
-
"aria-label":
|
|
697
|
+
"aria-label": u.lang.label.clear,
|
|
698
698
|
onKeyup: A,
|
|
699
|
-
onClick:
|
|
699
|
+
onClick: oe
|
|
700
700
|
})
|
|
701
701
|
])
|
|
702
|
-
),
|
|
702
|
+
), o.append !== void 0 && k.push(
|
|
703
703
|
h("div", {
|
|
704
704
|
class: "q-field__append q-field__marginal row no-wrap items-center",
|
|
705
705
|
key: "append",
|
|
706
706
|
onClick: pe
|
|
707
|
-
},
|
|
707
|
+
}, o.append())
|
|
708
708
|
), e.getInnerAppend !== void 0 && k.push(
|
|
709
709
|
X("inner-append", e.getInnerAppend())
|
|
710
710
|
), e.getControlChild !== void 0 && k.push(
|
|
711
711
|
e.getControlChild()
|
|
712
712
|
), k;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function ne() {
|
|
715
715
|
const k = [];
|
|
716
716
|
return t.prefix !== void 0 && t.prefix !== null && k.push(
|
|
717
717
|
h("div", {
|
|
@@ -719,28 +719,28 @@ function Zl(e) {
|
|
|
719
719
|
}, t.prefix)
|
|
720
720
|
), e.getShadowControl !== void 0 && e.hasShadow.value === !0 && k.push(
|
|
721
721
|
e.getShadowControl()
|
|
722
|
-
), e.getControl !== void 0 ? k.push(e.getControl()) :
|
|
722
|
+
), e.getControl !== void 0 ? k.push(e.getControl()) : o.rawControl !== void 0 ? k.push(o.rawControl()) : o.control !== void 0 && k.push(
|
|
723
723
|
h("div", {
|
|
724
724
|
ref: e.targetRef,
|
|
725
725
|
class: "q-field__native row",
|
|
726
726
|
tabindex: -1,
|
|
727
727
|
...e.splitAttrs.attributes.value,
|
|
728
728
|
"data-autofocus": t.autofocus === !0 || void 0
|
|
729
|
-
},
|
|
729
|
+
}, o.control(R.value))
|
|
730
730
|
), E.value === !0 && k.push(
|
|
731
731
|
h("div", {
|
|
732
732
|
class: q.value
|
|
733
|
-
}, Se(
|
|
733
|
+
}, Se(o.label, t.label))
|
|
734
734
|
), t.suffix !== void 0 && t.suffix !== null && k.push(
|
|
735
735
|
h("div", {
|
|
736
736
|
class: "q-field__suffix no-pointer-events row items-center"
|
|
737
737
|
}, t.suffix)
|
|
738
|
-
), k.concat(Se(
|
|
738
|
+
), k.concat(Se(o.default));
|
|
739
739
|
}
|
|
740
740
|
function te() {
|
|
741
741
|
let k, M;
|
|
742
|
-
c.value === !0 ? y.value !== null ? (k = [h("div", { role: "alert" }, y.value)], M = `q--slot-error-${y.value}`) : (k = Se(
|
|
743
|
-
const se = t.counter === !0 ||
|
|
742
|
+
c.value === !0 ? y.value !== null ? (k = [h("div", { role: "alert" }, y.value)], M = `q--slot-error-${y.value}`) : (k = Se(o.error), M = "q--slot-error") : (t.hideHint !== !0 || e.focused.value === !0) && (t.hint !== void 0 ? (k = [h("div", t.hint)], M = `q--slot-hint-${t.hint}`) : (k = Se(o.hint), M = "q--slot-hint"));
|
|
743
|
+
const se = t.counter === !0 || o.counter !== void 0;
|
|
744
744
|
if (t.hideBottomSpace === !0 && se === !1 && k === void 0)
|
|
745
745
|
return;
|
|
746
746
|
const s = h("div", {
|
|
@@ -754,7 +754,7 @@ function Zl(e) {
|
|
|
754
754
|
t.hideBottomSpace === !0 ? s : h(yt, { name: "q-transition--field-message" }, () => s),
|
|
755
755
|
se === !0 ? h("div", {
|
|
756
756
|
class: "q-field__counter"
|
|
757
|
-
},
|
|
757
|
+
}, o.counter !== void 0 ? o.counter() : e.computedCounter.value) : null
|
|
758
758
|
]);
|
|
759
759
|
}
|
|
760
760
|
function X(k, M) {
|
|
@@ -767,13 +767,13 @@ function Zl(e) {
|
|
|
767
767
|
return kt(() => {
|
|
768
768
|
re = !0;
|
|
769
769
|
}), Ol(() => {
|
|
770
|
-
re === !0 && t.autofocus === !0 &&
|
|
770
|
+
re === !0 && t.autofocus === !0 && i.focus();
|
|
771
771
|
}), t.autofocus === !0 && tt(() => {
|
|
772
|
-
|
|
772
|
+
i.focus();
|
|
773
773
|
}), ce(() => {
|
|
774
774
|
d !== null && clearTimeout(d);
|
|
775
|
-
}), Object.assign(
|
|
776
|
-
const M = e.getControl === void 0 &&
|
|
775
|
+
}), Object.assign(i, { focus: L, blur: H }), function() {
|
|
776
|
+
const M = e.getControl === void 0 && o.control === void 0 ? {
|
|
777
777
|
...e.splitAttrs.attributes.value,
|
|
778
778
|
"data-autofocus": t.autofocus === !0 || void 0,
|
|
779
779
|
...D.value
|
|
@@ -787,10 +787,10 @@ function Zl(e) {
|
|
|
787
787
|
style: a.style,
|
|
788
788
|
...M
|
|
789
789
|
}, [
|
|
790
|
-
|
|
790
|
+
o.before !== void 0 ? h("div", {
|
|
791
791
|
class: "q-field__before q-field__marginal row no-wrap items-center",
|
|
792
792
|
onClick: pe
|
|
793
|
-
},
|
|
793
|
+
}, o.before()) : null,
|
|
794
794
|
h("div", {
|
|
795
795
|
class: "q-field__inner relative-position col self-stretch"
|
|
796
796
|
}, [
|
|
@@ -800,16 +800,16 @@ function Zl(e) {
|
|
|
800
800
|
tabindex: -1,
|
|
801
801
|
...e.controlEvents
|
|
802
802
|
}, U()),
|
|
803
|
-
|
|
803
|
+
v.value === !0 ? te() : null
|
|
804
804
|
]),
|
|
805
|
-
|
|
805
|
+
o.after !== void 0 ? h("div", {
|
|
806
806
|
class: "q-field__after q-field__marginal row no-wrap items-center",
|
|
807
807
|
onClick: pe
|
|
808
|
-
},
|
|
808
|
+
}, o.after()) : null
|
|
809
809
|
]);
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
|
-
const
|
|
812
|
+
const Cn = be({
|
|
813
813
|
name: "QField",
|
|
814
814
|
inheritAttrs: !1,
|
|
815
815
|
props: {
|
|
@@ -825,13 +825,13 @@ const Co = be({
|
|
|
825
825
|
Gl({ tagProp: !0 })
|
|
826
826
|
);
|
|
827
827
|
}
|
|
828
|
-
}),
|
|
828
|
+
}), kn = {
|
|
829
829
|
xs: 8,
|
|
830
830
|
sm: 10,
|
|
831
831
|
md: 14,
|
|
832
832
|
lg: 20,
|
|
833
833
|
xl: 24
|
|
834
|
-
},
|
|
834
|
+
}, qn = be({
|
|
835
835
|
name: "QChip",
|
|
836
836
|
props: {
|
|
837
837
|
...lt,
|
|
@@ -866,7 +866,7 @@ const Co = be({
|
|
|
866
866
|
},
|
|
867
867
|
emits: ["update:modelValue", "update:selected", "remove", "click"],
|
|
868
868
|
setup(e, { slots: t, emit: l }) {
|
|
869
|
-
const { proxy: { $q:
|
|
869
|
+
const { proxy: { $q: o } } = le(), a = ot(e, o), i = Il(e, kn), u = f(() => e.selected === !0 || e.icon !== void 0), d = f(() => e.selected === !0 ? e.iconSelected || o.iconSet.chip.selected : e.icon), m = f(() => e.iconRemove || o.iconSet.chip.remove), g = f(
|
|
870
870
|
() => e.disable === !1 && (e.clickable === !0 || e.selected !== null)
|
|
871
871
|
), c = f(() => {
|
|
872
872
|
const S = e.outline === !0 && e.color || e.textColor;
|
|
@@ -876,7 +876,7 @@ const Co = be({
|
|
|
876
876
|
...S,
|
|
877
877
|
role: "button",
|
|
878
878
|
"aria-hidden": "false",
|
|
879
|
-
"aria-label": e.removeAriaLabel ||
|
|
879
|
+
"aria-label": e.removeAriaLabel || o.lang.label.remove
|
|
880
880
|
};
|
|
881
881
|
return { chip: S, remove: P };
|
|
882
882
|
});
|
|
@@ -886,14 +886,14 @@ const Co = be({
|
|
|
886
886
|
function r(S) {
|
|
887
887
|
e.disable || (l("update:selected", !e.selected), l("click", S));
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function v(S) {
|
|
890
890
|
(S.keyCode === void 0 || S.keyCode === 13) && (ae(S), e.disable === !1 && (l("update:modelValue", !1), l("remove")));
|
|
891
891
|
}
|
|
892
892
|
function _() {
|
|
893
893
|
const S = [];
|
|
894
894
|
g.value === !0 && S.push(
|
|
895
895
|
h("div", { class: "q-focus-helper" })
|
|
896
|
-
),
|
|
896
|
+
), u.value === !0 && S.push(
|
|
897
897
|
h(Ae, {
|
|
898
898
|
class: "q-chip__icon q-chip__icon--left",
|
|
899
899
|
name: d.value
|
|
@@ -903,7 +903,7 @@ const Co = be({
|
|
|
903
903
|
return S.push(
|
|
904
904
|
h("div", {
|
|
905
905
|
class: "q-chip__content col row no-wrap items-center q-anchor--skip"
|
|
906
|
-
},
|
|
906
|
+
}, Do(t.default, P))
|
|
907
907
|
), e.iconRight && S.push(
|
|
908
908
|
h(Ae, {
|
|
909
909
|
class: "q-chip__icon q-chip__icon--right",
|
|
@@ -912,10 +912,10 @@ const Co = be({
|
|
|
912
912
|
), e.removable === !0 && S.push(
|
|
913
913
|
h(Ae, {
|
|
914
914
|
class: "q-chip__icon q-chip__icon--remove cursor-pointer",
|
|
915
|
-
name:
|
|
915
|
+
name: m.value,
|
|
916
916
|
...y.value.remove,
|
|
917
|
-
onClick:
|
|
918
|
-
onKeyup:
|
|
917
|
+
onClick: v,
|
|
918
|
+
onKeyup: v
|
|
919
919
|
})
|
|
920
920
|
), S;
|
|
921
921
|
}
|
|
@@ -923,51 +923,51 @@ const Co = be({
|
|
|
923
923
|
if (e.modelValue === !1) return;
|
|
924
924
|
const S = {
|
|
925
925
|
class: c.value,
|
|
926
|
-
style:
|
|
926
|
+
style: i.value
|
|
927
927
|
};
|
|
928
928
|
return g.value === !0 && Object.assign(
|
|
929
929
|
S,
|
|
930
930
|
y.value.chip,
|
|
931
931
|
{ onClick: r, onKeyup: C }
|
|
932
|
-
), $
|
|
932
|
+
), $o(
|
|
933
933
|
"div",
|
|
934
934
|
S,
|
|
935
935
|
_(),
|
|
936
936
|
"ripple",
|
|
937
937
|
e.ripple !== !1 && e.disable !== !0,
|
|
938
|
-
() => [[
|
|
938
|
+
() => [[Po, e.ripple]]
|
|
939
939
|
);
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
942
|
});
|
|
943
|
-
function
|
|
943
|
+
function Vn() {
|
|
944
944
|
if (window.getSelection !== void 0) {
|
|
945
945
|
const e = window.getSelection();
|
|
946
|
-
e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(),
|
|
946
|
+
e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(), Jo.is.mobile !== !0 && e.addRange(document.createRange()));
|
|
947
947
|
} else document.selection !== void 0 && document.selection.empty();
|
|
948
948
|
}
|
|
949
|
-
const
|
|
949
|
+
const _n = {
|
|
950
950
|
/* SSR does not know about Element */
|
|
951
951
|
target: {
|
|
952
952
|
type: [Boolean, String, Element],
|
|
953
953
|
default: !0
|
|
954
954
|
},
|
|
955
955
|
noParentEvent: Boolean
|
|
956
|
-
},
|
|
957
|
-
...
|
|
956
|
+
}, En = {
|
|
957
|
+
..._n,
|
|
958
958
|
contextMenu: Boolean
|
|
959
959
|
};
|
|
960
|
-
function
|
|
960
|
+
function Bn({
|
|
961
961
|
showing: e,
|
|
962
962
|
avoidEmit: t,
|
|
963
963
|
// required for QPopupProxy (true)
|
|
964
964
|
configureAnchorEl: l
|
|
965
965
|
// optional
|
|
966
966
|
}) {
|
|
967
|
-
const { props:
|
|
967
|
+
const { props: o, proxy: a, emit: i } = le(), u = T(null);
|
|
968
968
|
let d = null;
|
|
969
|
-
function
|
|
970
|
-
return
|
|
969
|
+
function m(r) {
|
|
970
|
+
return u.value === null ? !1 : r === void 0 || r.touches === void 0 || r.touches.length <= 1;
|
|
971
971
|
}
|
|
972
972
|
const g = {};
|
|
973
973
|
l === void 0 && (Object.assign(g, {
|
|
@@ -981,97 +981,97 @@ function Bo({
|
|
|
981
981
|
qt(r, 13) === !0 && g.toggle(r);
|
|
982
982
|
},
|
|
983
983
|
contextClick(r) {
|
|
984
|
-
a.hide(r), pe(r),
|
|
984
|
+
a.hide(r), pe(r), ue(() => {
|
|
985
985
|
a.show(r), r.qAnchorHandled = !0;
|
|
986
986
|
});
|
|
987
987
|
},
|
|
988
988
|
prevent: pe,
|
|
989
989
|
mobileTouch(r) {
|
|
990
|
-
if (g.mobileCleanup(r),
|
|
990
|
+
if (g.mobileCleanup(r), m(r) !== !0)
|
|
991
991
|
return;
|
|
992
|
-
a.hide(r),
|
|
993
|
-
const
|
|
992
|
+
a.hide(r), u.value.classList.add("non-selectable");
|
|
993
|
+
const v = r.target;
|
|
994
994
|
sl(g, "anchor", [
|
|
995
|
-
[
|
|
996
|
-
[
|
|
997
|
-
[
|
|
998
|
-
[
|
|
995
|
+
[v, "touchmove", "mobileCleanup", "passive"],
|
|
996
|
+
[v, "touchend", "mobileCleanup", "passive"],
|
|
997
|
+
[v, "touchcancel", "mobileCleanup", "passive"],
|
|
998
|
+
[u.value, "contextmenu", "prevent", "notPassive"]
|
|
999
999
|
]), d = setTimeout(() => {
|
|
1000
1000
|
d = null, a.show(r), r.qAnchorHandled = !0;
|
|
1001
1001
|
}, 300);
|
|
1002
1002
|
},
|
|
1003
1003
|
mobileCleanup(r) {
|
|
1004
|
-
|
|
1005
|
-
}
|
|
1006
|
-
}), l = function(r =
|
|
1007
|
-
if (
|
|
1008
|
-
let
|
|
1009
|
-
r === !0 ? a.$q.platform.is.mobile === !0 ?
|
|
1010
|
-
[
|
|
1011
|
-
] :
|
|
1012
|
-
[
|
|
1013
|
-
[
|
|
1014
|
-
] :
|
|
1015
|
-
[
|
|
1016
|
-
[
|
|
1017
|
-
], sl(g, "anchor",
|
|
1004
|
+
u.value.classList.remove("non-selectable"), d !== null && (clearTimeout(d), d = null), e.value === !0 && r !== void 0 && Vn();
|
|
1005
|
+
}
|
|
1006
|
+
}), l = function(r = o.contextMenu) {
|
|
1007
|
+
if (o.noParentEvent === !0 || u.value === null) return;
|
|
1008
|
+
let v;
|
|
1009
|
+
r === !0 ? a.$q.platform.is.mobile === !0 ? v = [
|
|
1010
|
+
[u.value, "touchstart", "mobileTouch", "passive"]
|
|
1011
|
+
] : v = [
|
|
1012
|
+
[u.value, "mousedown", "hide", "passive"],
|
|
1013
|
+
[u.value, "contextmenu", "contextClick", "notPassive"]
|
|
1014
|
+
] : v = [
|
|
1015
|
+
[u.value, "click", "toggle", "passive"],
|
|
1016
|
+
[u.value, "keyup", "toggleKey", "passive"]
|
|
1017
|
+
], sl(g, "anchor", v);
|
|
1018
1018
|
});
|
|
1019
1019
|
function c() {
|
|
1020
|
-
|
|
1020
|
+
Wo(g, "anchor");
|
|
1021
1021
|
}
|
|
1022
1022
|
function y(r) {
|
|
1023
|
-
for (
|
|
1024
|
-
|
|
1023
|
+
for (u.value = r; u.value.classList.contains("q-anchor--skip"); )
|
|
1024
|
+
u.value = u.value.parentNode;
|
|
1025
1025
|
l();
|
|
1026
1026
|
}
|
|
1027
1027
|
function C() {
|
|
1028
|
-
if (
|
|
1029
|
-
|
|
1030
|
-
else if (
|
|
1028
|
+
if (o.target === !1 || o.target === "" || a.$el.parentNode === null)
|
|
1029
|
+
u.value = null;
|
|
1030
|
+
else if (o.target === !0)
|
|
1031
1031
|
y(a.$el.parentNode);
|
|
1032
1032
|
else {
|
|
1033
|
-
let r =
|
|
1034
|
-
if (typeof
|
|
1033
|
+
let r = o.target;
|
|
1034
|
+
if (typeof o.target == "string")
|
|
1035
1035
|
try {
|
|
1036
|
-
r = document.querySelector(
|
|
1036
|
+
r = document.querySelector(o.target);
|
|
1037
1037
|
} catch {
|
|
1038
1038
|
r = void 0;
|
|
1039
1039
|
}
|
|
1040
|
-
r != null ? (
|
|
1040
|
+
r != null ? (u.value = r.$el || r, l()) : (u.value = null, console.error(`Anchor: target "${o.target}" not found`));
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
return K(() =>
|
|
1044
|
-
|
|
1045
|
-
}), K(() =>
|
|
1046
|
-
|
|
1047
|
-
}), K(() =>
|
|
1048
|
-
|
|
1043
|
+
return K(() => o.contextMenu, (r) => {
|
|
1044
|
+
u.value !== null && (c(), l(r));
|
|
1045
|
+
}), K(() => o.target, () => {
|
|
1046
|
+
u.value !== null && c(), C();
|
|
1047
|
+
}), K(() => o.noParentEvent, (r) => {
|
|
1048
|
+
u.value !== null && (r === !0 ? c() : l());
|
|
1049
1049
|
}), tt(() => {
|
|
1050
|
-
C(), t !== !0 &&
|
|
1050
|
+
C(), t !== !0 && o.modelValue === !0 && u.value === null && i("update:modelValue", !1);
|
|
1051
1051
|
}), ce(() => {
|
|
1052
1052
|
d !== null && clearTimeout(d), c();
|
|
1053
1053
|
}), {
|
|
1054
|
-
anchorEl:
|
|
1055
|
-
canShow:
|
|
1054
|
+
anchorEl: u,
|
|
1055
|
+
canShow: m,
|
|
1056
1056
|
anchorEvents: g
|
|
1057
1057
|
};
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function An(e, t) {
|
|
1060
1060
|
const l = T(null);
|
|
1061
|
-
let
|
|
1062
|
-
function a(d,
|
|
1063
|
-
const g = `${
|
|
1064
|
-
d !== window && d[g]("scroll", c, ge.passive), window[g]("scroll", c, ge.passive),
|
|
1061
|
+
let o;
|
|
1062
|
+
function a(d, m) {
|
|
1063
|
+
const g = `${m !== void 0 ? "add" : "remove"}EventListener`, c = m !== void 0 ? m : o;
|
|
1064
|
+
d !== window && d[g]("scroll", c, ge.passive), window[g]("scroll", c, ge.passive), o = m;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function i() {
|
|
1067
1067
|
l.value !== null && (a(l.value), l.value = null);
|
|
1068
1068
|
}
|
|
1069
|
-
const
|
|
1070
|
-
l.value !== null && (
|
|
1069
|
+
const u = K(() => e.noParentEvent, () => {
|
|
1070
|
+
l.value !== null && (i(), t());
|
|
1071
1071
|
});
|
|
1072
|
-
return ce(
|
|
1072
|
+
return ce(u), {
|
|
1073
1073
|
localScrollTarget: l,
|
|
1074
|
-
unconfigureScrollTarget:
|
|
1074
|
+
unconfigureScrollTarget: i,
|
|
1075
1075
|
changeScrollEvent: a
|
|
1076
1076
|
};
|
|
1077
1077
|
}
|
|
@@ -1081,78 +1081,78 @@ const Jl = {
|
|
|
1081
1081
|
default: null
|
|
1082
1082
|
},
|
|
1083
1083
|
"onUpdate:modelValue": [Function, Array]
|
|
1084
|
-
},
|
|
1084
|
+
}, eo = [
|
|
1085
1085
|
"beforeShow",
|
|
1086
1086
|
"show",
|
|
1087
1087
|
"beforeHide",
|
|
1088
1088
|
"hide"
|
|
1089
1089
|
];
|
|
1090
|
-
function
|
|
1090
|
+
function to({
|
|
1091
1091
|
showing: e,
|
|
1092
1092
|
canShow: t,
|
|
1093
1093
|
// optional
|
|
1094
1094
|
hideOnRouteChange: l,
|
|
1095
1095
|
// optional
|
|
1096
|
-
handleShow:
|
|
1096
|
+
handleShow: o,
|
|
1097
1097
|
// optional
|
|
1098
1098
|
handleHide: a,
|
|
1099
1099
|
// optional
|
|
1100
|
-
processOnMount:
|
|
1100
|
+
processOnMount: i
|
|
1101
1101
|
// optional
|
|
1102
1102
|
}) {
|
|
1103
|
-
const
|
|
1103
|
+
const u = le(), { props: d, emit: m, proxy: g } = u;
|
|
1104
1104
|
let c;
|
|
1105
1105
|
function y(E) {
|
|
1106
|
-
e.value === !0 ?
|
|
1106
|
+
e.value === !0 ? v(E) : C(E);
|
|
1107
1107
|
}
|
|
1108
1108
|
function C(E) {
|
|
1109
1109
|
if (d.disable === !0 || E !== void 0 && E.qAnchorHandled === !0 || t !== void 0 && t(E) !== !0)
|
|
1110
1110
|
return;
|
|
1111
1111
|
const q = d["onUpdate:modelValue"] !== void 0;
|
|
1112
|
-
q === !0 && (
|
|
1112
|
+
q === !0 && (m("update:modelValue", !0), c = E, ue(() => {
|
|
1113
1113
|
c === E && (c = void 0);
|
|
1114
1114
|
})), (d.modelValue === null || q === !1) && r(E);
|
|
1115
1115
|
}
|
|
1116
1116
|
function r(E) {
|
|
1117
|
-
e.value !== !0 && (e.value = !0,
|
|
1117
|
+
e.value !== !0 && (e.value = !0, m("beforeShow", E), o !== void 0 ? o(E) : m("show", E));
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function v(E) {
|
|
1120
1120
|
if (d.disable === !0)
|
|
1121
1121
|
return;
|
|
1122
1122
|
const q = d["onUpdate:modelValue"] !== void 0;
|
|
1123
|
-
q === !0 && (
|
|
1123
|
+
q === !0 && (m("update:modelValue", !1), c = E, ue(() => {
|
|
1124
1124
|
c === E && (c = void 0);
|
|
1125
1125
|
})), (d.modelValue === null || q === !1) && _(E);
|
|
1126
1126
|
}
|
|
1127
1127
|
function _(E) {
|
|
1128
|
-
e.value !== !1 && (e.value = !1,
|
|
1128
|
+
e.value !== !1 && (e.value = !1, m("beforeHide", E), a !== void 0 ? a(E) : m("hide", E));
|
|
1129
1129
|
}
|
|
1130
1130
|
function S(E) {
|
|
1131
|
-
d.disable === !0 && E === !0 ? d["onUpdate:modelValue"] !== void 0 &&
|
|
1131
|
+
d.disable === !0 && E === !0 ? d["onUpdate:modelValue"] !== void 0 && m("update:modelValue", !1) : E === !0 !== e.value && (E === !0 ? r : _)(c);
|
|
1132
1132
|
}
|
|
1133
|
-
K(() => d.modelValue, S), l !== void 0 &&
|
|
1134
|
-
l.value === !0 && e.value === !0 &&
|
|
1133
|
+
K(() => d.modelValue, S), l !== void 0 && jo(u) === !0 && K(() => g.$route.fullPath, () => {
|
|
1134
|
+
l.value === !0 && e.value === !0 && v();
|
|
1135
1135
|
}), tt(() => {
|
|
1136
1136
|
S(d.modelValue);
|
|
1137
1137
|
});
|
|
1138
|
-
const P = { show: C, hide:
|
|
1138
|
+
const P = { show: C, hide: v, toggle: y };
|
|
1139
1139
|
return Object.assign(g, P), P;
|
|
1140
1140
|
}
|
|
1141
1141
|
const yl = {};
|
|
1142
|
-
let
|
|
1143
|
-
function
|
|
1142
|
+
let Tn = 1, Rn = document.body;
|
|
1143
|
+
function zn(e, t) {
|
|
1144
1144
|
const l = document.createElement("div");
|
|
1145
|
-
if (l.id = t !== void 0 ? `q-portal--${t}--${
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1145
|
+
if (l.id = t !== void 0 ? `q-portal--${t}--${Tn++}` : e, yl.globalNodes !== void 0) {
|
|
1146
|
+
const o = yl.globalNodes.class;
|
|
1147
|
+
o !== void 0 && (l.className = o);
|
|
1148
1148
|
}
|
|
1149
|
-
return
|
|
1149
|
+
return Rn.appendChild(l), l;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function Fn(e) {
|
|
1152
1152
|
e.remove();
|
|
1153
1153
|
}
|
|
1154
1154
|
const Je = [];
|
|
1155
|
-
function
|
|
1155
|
+
function Mn(e, t) {
|
|
1156
1156
|
do {
|
|
1157
1157
|
if (e.$options.name === "QMenu") {
|
|
1158
1158
|
if (e.hide(t), e.$props.separateClosePopup === !0)
|
|
@@ -1164,13 +1164,13 @@ function Mo(e, t) {
|
|
|
1164
1164
|
e = zt(e);
|
|
1165
1165
|
} while (e != null);
|
|
1166
1166
|
}
|
|
1167
|
-
const
|
|
1167
|
+
const Ln = be({
|
|
1168
1168
|
name: "QPortal",
|
|
1169
1169
|
setup(e, { slots: t }) {
|
|
1170
1170
|
return () => t.default();
|
|
1171
1171
|
}
|
|
1172
1172
|
});
|
|
1173
|
-
function
|
|
1173
|
+
function On(e) {
|
|
1174
1174
|
for (e = e.parent; e != null; ) {
|
|
1175
1175
|
if (e.type.name === "QGlobalDialog")
|
|
1176
1176
|
return !0;
|
|
@@ -1180,34 +1180,34 @@ function Oo(e) {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
return !1;
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1184
|
-
const a = T(!1),
|
|
1185
|
-
let
|
|
1186
|
-
const d = {},
|
|
1183
|
+
function lo(e, t, l, o) {
|
|
1184
|
+
const a = T(!1), i = T(!1);
|
|
1185
|
+
let u = null;
|
|
1186
|
+
const d = {}, m = o === "dialog" && On(e);
|
|
1187
1187
|
function g(y) {
|
|
1188
1188
|
if (y === !0) {
|
|
1189
|
-
bl(d),
|
|
1189
|
+
bl(d), i.value = !0;
|
|
1190
1190
|
return;
|
|
1191
1191
|
}
|
|
1192
|
-
|
|
1192
|
+
i.value = !1, a.value === !1 && (m === !1 && u === null && (u = zn(!1, o)), a.value = !0, Je.push(e.proxy), Sn(d));
|
|
1193
1193
|
}
|
|
1194
1194
|
function c(y) {
|
|
1195
|
-
if (
|
|
1195
|
+
if (i.value = !1, y !== !0) return;
|
|
1196
1196
|
bl(d), a.value = !1;
|
|
1197
1197
|
const C = Je.indexOf(e.proxy);
|
|
1198
|
-
C !== -1 && Je.splice(C, 1),
|
|
1198
|
+
C !== -1 && Je.splice(C, 1), u !== null && (Fn(u), u = null);
|
|
1199
1199
|
}
|
|
1200
|
-
return
|
|
1200
|
+
return Bo(() => {
|
|
1201
1201
|
c(!0);
|
|
1202
1202
|
}), e.proxy.__qPortal = !0, Wl(e.proxy, "contentEl", () => t.value), {
|
|
1203
1203
|
showPortal: g,
|
|
1204
1204
|
hidePortal: c,
|
|
1205
1205
|
portalIsActive: a,
|
|
1206
|
-
portalIsAccessible:
|
|
1207
|
-
renderPortal: () =>
|
|
1206
|
+
portalIsAccessible: i,
|
|
1207
|
+
renderPortal: () => m === !0 ? l() : a.value === !0 ? [h(Ao, { to: u }, h(Ln, l))] : void 0
|
|
1208
1208
|
};
|
|
1209
1209
|
}
|
|
1210
|
-
const
|
|
1210
|
+
const oo = {
|
|
1211
1211
|
transitionShow: {
|
|
1212
1212
|
type: String,
|
|
1213
1213
|
default: "fade"
|
|
@@ -1221,17 +1221,17 @@ const nn = {
|
|
|
1221
1221
|
default: 300
|
|
1222
1222
|
}
|
|
1223
1223
|
};
|
|
1224
|
-
function
|
|
1224
|
+
function no(e, t = () => {
|
|
1225
1225
|
}, l = () => {
|
|
1226
1226
|
}) {
|
|
1227
1227
|
return {
|
|
1228
1228
|
transitionProps: f(() => {
|
|
1229
|
-
const
|
|
1229
|
+
const o = `q-transition--${e.transitionShow || t()}`, a = `q-transition--${e.transitionHide || l()}`;
|
|
1230
1230
|
return {
|
|
1231
1231
|
appear: !0,
|
|
1232
|
-
enterFromClass: `${
|
|
1233
|
-
enterActiveClass: `${
|
|
1234
|
-
enterToClass: `${
|
|
1232
|
+
enterFromClass: `${o}-enter-from`,
|
|
1233
|
+
enterActiveClass: `${o}-enter-active`,
|
|
1234
|
+
enterToClass: `${o}-enter-to`,
|
|
1235
1235
|
leaveFromClass: `${a}-leave-from`,
|
|
1236
1236
|
leaveActiveClass: `${a}-leave-active`,
|
|
1237
1237
|
leaveToClass: `${a}-leave-to`
|
|
@@ -1240,7 +1240,7 @@ function on(e, t = () => {
|
|
|
1240
1240
|
transitionStyle: f(() => `--q-transition-duration: ${e.transitionDuration}ms`)
|
|
1241
1241
|
};
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function io() {
|
|
1244
1244
|
let e;
|
|
1245
1245
|
const t = le();
|
|
1246
1246
|
function l() {
|
|
@@ -1248,14 +1248,14 @@ function un() {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
return kt(l), ce(l), {
|
|
1250
1250
|
removeTick: l,
|
|
1251
|
-
registerTick(
|
|
1252
|
-
e =
|
|
1253
|
-
e ===
|
|
1251
|
+
registerTick(o) {
|
|
1252
|
+
e = o, ue(() => {
|
|
1253
|
+
e === o && (Pl(t) === !1 && e(), e = void 0);
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
1256
|
};
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function uo() {
|
|
1259
1259
|
let e = null;
|
|
1260
1260
|
const t = le();
|
|
1261
1261
|
function l() {
|
|
@@ -1263,31 +1263,31 @@ function an() {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
return kt(l), ce(l), {
|
|
1265
1265
|
removeTimeout: l,
|
|
1266
|
-
registerTimeout(
|
|
1266
|
+
registerTimeout(o, a) {
|
|
1267
1267
|
l(), Pl(t) === !1 && (e = setTimeout(() => {
|
|
1268
|
-
e = null,
|
|
1268
|
+
e = null, o();
|
|
1269
1269
|
}, a));
|
|
1270
1270
|
}
|
|
1271
1271
|
};
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1274
|
-
function $
|
|
1275
|
-
let l =
|
|
1273
|
+
const In = [Element, String], Hn = [null, document, document.body, document.scrollingElement, document.documentElement];
|
|
1274
|
+
function $n(e, t) {
|
|
1275
|
+
let l = No(t);
|
|
1276
1276
|
if (l === void 0) {
|
|
1277
1277
|
if (e == null)
|
|
1278
1278
|
return window;
|
|
1279
1279
|
l = e.closest(".scroll,.scroll-y,.overflow-auto");
|
|
1280
1280
|
}
|
|
1281
|
-
return
|
|
1281
|
+
return Hn.includes(l) ? window : l;
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function Pn(e) {
|
|
1284
1284
|
return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop;
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function Dn(e) {
|
|
1287
1287
|
return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft;
|
|
1288
1288
|
}
|
|
1289
1289
|
let ht;
|
|
1290
|
-
function
|
|
1290
|
+
function Wn() {
|
|
1291
1291
|
if (ht !== void 0)
|
|
1292
1292
|
return ht;
|
|
1293
1293
|
const e = document.createElement("p"), t = document.createElement("div");
|
|
@@ -1305,32 +1305,32 @@ function Wo() {
|
|
|
1305
1305
|
}), t.appendChild(e), document.body.appendChild(t);
|
|
1306
1306
|
const l = e.offsetWidth;
|
|
1307
1307
|
t.style.overflow = "scroll";
|
|
1308
|
-
let
|
|
1309
|
-
return l ===
|
|
1308
|
+
let o = e.offsetWidth;
|
|
1309
|
+
return l === o && (o = t.clientWidth), t.remove(), ht = l - o, ht;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function jn(e, t = !0) {
|
|
1312
1312
|
return !e || e.nodeType !== Node.ELEMENT_NODE ? !1 : t ? e.scrollHeight > e.clientHeight && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-y"])) : e.scrollWidth > e.clientWidth && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-x"]));
|
|
1313
1313
|
}
|
|
1314
1314
|
const Te = [];
|
|
1315
1315
|
let je;
|
|
1316
|
-
function
|
|
1316
|
+
function Nn(e) {
|
|
1317
1317
|
je = e.keyCode === 27;
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Kn() {
|
|
1320
1320
|
je === !0 && (je = !1);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function Qn(e) {
|
|
1323
1323
|
je === !0 && (je = !1, qt(e, 27) === !0 && Te[Te.length - 1](e));
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1326
|
-
window[e]("keydown",
|
|
1325
|
+
function ao(e) {
|
|
1326
|
+
window[e]("keydown", Nn), window[e]("blur", Kn), window[e]("keyup", Qn), je = !1;
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
we.is.desktop === !0 && (Te.push(e), Te.length === 1 &&
|
|
1328
|
+
function ro(e) {
|
|
1329
|
+
we.is.desktop === !0 && (Te.push(e), Te.length === 1 && ao("addEventListener"));
|
|
1330
1330
|
}
|
|
1331
1331
|
function St(e) {
|
|
1332
1332
|
const t = Te.indexOf(e);
|
|
1333
|
-
t !== -1 && (Te.splice(t, 1), Te.length === 0 &&
|
|
1333
|
+
t !== -1 && (Te.splice(t, 1), Te.length === 0 && ao("removeEventListener"));
|
|
1334
1334
|
}
|
|
1335
1335
|
const { notPassiveCapture: wt } = ge, Re = [];
|
|
1336
1336
|
function xt(e) {
|
|
@@ -1339,26 +1339,26 @@ function xt(e) {
|
|
|
1339
1339
|
return;
|
|
1340
1340
|
let l = Je.length - 1;
|
|
1341
1341
|
for (; l >= 0; ) {
|
|
1342
|
-
const
|
|
1343
|
-
if (
|
|
1342
|
+
const o = Je[l].$;
|
|
1343
|
+
if (o.type.name === "QTooltip") {
|
|
1344
1344
|
l--;
|
|
1345
1345
|
continue;
|
|
1346
1346
|
}
|
|
1347
|
-
if (
|
|
1347
|
+
if (o.type.name !== "QDialog")
|
|
1348
1348
|
break;
|
|
1349
|
-
if (
|
|
1349
|
+
if (o.props.seamless !== !0)
|
|
1350
1350
|
return;
|
|
1351
1351
|
l--;
|
|
1352
1352
|
}
|
|
1353
|
-
for (let
|
|
1354
|
-
const a = Re[
|
|
1353
|
+
for (let o = Re.length - 1; o >= 0; o--) {
|
|
1354
|
+
const a = Re[o];
|
|
1355
1355
|
if ((a.anchorEl.value === null || a.anchorEl.value.contains(t) === !1) && (t === document.body || a.innerRef.value !== null && a.innerRef.value.contains(t) === !1))
|
|
1356
1356
|
e.qClickOutside = !0, a.onClickOutside(e);
|
|
1357
1357
|
else
|
|
1358
1358
|
return;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Un(e) {
|
|
1362
1362
|
Re.push(e), Re.length === 1 && (document.addEventListener("mousedown", xt, wt), document.addEventListener("touchstart", xt, wt));
|
|
1363
1363
|
}
|
|
1364
1364
|
function Sl(e) {
|
|
@@ -1370,7 +1370,7 @@ function Cl(e) {
|
|
|
1370
1370
|
const t = e.split(" ");
|
|
1371
1371
|
return t.length !== 2 ? !1 : ["top", "center", "bottom"].includes(t[0]) !== !0 ? (console.error("Anchor/Self position must start with one of top/center/bottom"), !1) : ["left", "middle", "right", "start", "end"].includes(t[1]) !== !0 ? (console.error("Anchor/Self position must end with one of left/middle/right/start/end"), !1) : !0;
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function Xn(e) {
|
|
1374
1374
|
return e ? !(e.length !== 2 || typeof e[0] != "number" || typeof e[1] != "number") : !0;
|
|
1375
1375
|
}
|
|
1376
1376
|
const Nt = {
|
|
@@ -1389,33 +1389,33 @@ function kl(e, t) {
|
|
|
1389
1389
|
horizontal: Nt[`${l[1]}#${t === !0 ? "rtl" : "ltr"}`]
|
|
1390
1390
|
};
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1393
|
-
let { top: l, left:
|
|
1394
|
-
return t !== void 0 && (l -= t[1],
|
|
1392
|
+
function Yn(e, t) {
|
|
1393
|
+
let { top: l, left: o, right: a, bottom: i, width: u, height: d } = e.getBoundingClientRect();
|
|
1394
|
+
return t !== void 0 && (l -= t[1], o -= t[0], i += t[1], a += t[0], u += t[0], d += t[1]), {
|
|
1395
1395
|
top: l,
|
|
1396
|
-
bottom:
|
|
1396
|
+
bottom: i,
|
|
1397
1397
|
height: d,
|
|
1398
|
-
left:
|
|
1398
|
+
left: o,
|
|
1399
1399
|
right: a,
|
|
1400
|
-
width:
|
|
1401
|
-
middle:
|
|
1402
|
-
center: l + (
|
|
1400
|
+
width: u,
|
|
1401
|
+
middle: o + (a - o) / 2,
|
|
1402
|
+
center: l + (i - l) / 2
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1406
|
-
let { top:
|
|
1407
|
-
return
|
|
1408
|
-
top:
|
|
1409
|
-
bottom:
|
|
1405
|
+
function Gn(e, t, l) {
|
|
1406
|
+
let { top: o, left: a } = e.getBoundingClientRect();
|
|
1407
|
+
return o += t.top, a += t.left, l !== void 0 && (o += l[1], a += l[0]), {
|
|
1408
|
+
top: o,
|
|
1409
|
+
bottom: o + 1,
|
|
1410
1410
|
height: 1,
|
|
1411
1411
|
left: a,
|
|
1412
1412
|
right: a + 1,
|
|
1413
1413
|
width: 1,
|
|
1414
1414
|
middle: a,
|
|
1415
|
-
center:
|
|
1415
|
+
center: o
|
|
1416
1416
|
};
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function Zn(e, t) {
|
|
1419
1419
|
return {
|
|
1420
1420
|
top: 0,
|
|
1421
1421
|
center: t / 2,
|
|
@@ -1425,29 +1425,29 @@ function Zo(e, t) {
|
|
|
1425
1425
|
right: e
|
|
1426
1426
|
};
|
|
1427
1427
|
}
|
|
1428
|
-
function ql(e, t, l,
|
|
1428
|
+
function ql(e, t, l, o) {
|
|
1429
1429
|
return {
|
|
1430
|
-
top: e[l.vertical] - t[
|
|
1431
|
-
left: e[l.horizontal] - t[
|
|
1430
|
+
top: e[l.vertical] - t[o.vertical],
|
|
1431
|
+
left: e[l.horizontal] - t[o.horizontal]
|
|
1432
1432
|
};
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function so(e, t = 0) {
|
|
1435
1435
|
if (e.targetEl === null || e.anchorEl === null || t > 5)
|
|
1436
1436
|
return;
|
|
1437
1437
|
if (e.targetEl.offsetHeight === 0 || e.targetEl.offsetWidth === 0) {
|
|
1438
1438
|
setTimeout(() => {
|
|
1439
|
-
|
|
1439
|
+
so(e, t + 1);
|
|
1440
1440
|
}, 10);
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
1443
|
const {
|
|
1444
1444
|
targetEl: l,
|
|
1445
|
-
offset:
|
|
1445
|
+
offset: o,
|
|
1446
1446
|
anchorEl: a,
|
|
1447
|
-
anchorOrigin:
|
|
1448
|
-
selfOrigin:
|
|
1447
|
+
anchorOrigin: i,
|
|
1448
|
+
selfOrigin: u,
|
|
1449
1449
|
absoluteOffset: d,
|
|
1450
|
-
fit:
|
|
1450
|
+
fit: m,
|
|
1451
1451
|
cover: g,
|
|
1452
1452
|
maxHeight: c,
|
|
1453
1453
|
maxWidth: y
|
|
@@ -1456,7 +1456,7 @@ function cn(e, t = 0) {
|
|
|
1456
1456
|
const B = document.body.style, { offsetLeft: L, offsetTop: H } = window.visualViewport;
|
|
1457
1457
|
L !== wl && (B.setProperty("--q-pe-left", L + "px"), wl = L), H !== xl && (B.setProperty("--q-pe-top", H + "px"), xl = H);
|
|
1458
1458
|
}
|
|
1459
|
-
const { scrollLeft: C, scrollTop: r } = l,
|
|
1459
|
+
const { scrollLeft: C, scrollTop: r } = l, v = d === void 0 ? Yn(a, g === !0 ? [0, 0] : o) : Gn(a, d, o);
|
|
1460
1460
|
Object.assign(l.style, {
|
|
1461
1461
|
top: 0,
|
|
1462
1462
|
left: 0,
|
|
@@ -1466,73 +1466,73 @@ function cn(e, t = 0) {
|
|
|
1466
1466
|
maxHeight: c,
|
|
1467
1467
|
visibility: "visible"
|
|
1468
1468
|
});
|
|
1469
|
-
const { offsetWidth: _, offsetHeight: S } = l, { elWidth: P, elHeight: E } =
|
|
1469
|
+
const { offsetWidth: _, offsetHeight: S } = l, { elWidth: P, elHeight: E } = m === !0 || g === !0 ? { elWidth: Math.max(v.width, _), elHeight: g === !0 ? Math.max(v.height, S) : S } : { elWidth: _, elHeight: S };
|
|
1470
1470
|
let q = { maxWidth: y, maxHeight: c };
|
|
1471
|
-
(
|
|
1472
|
-
const R =
|
|
1473
|
-
let D = ql(
|
|
1474
|
-
if (d === void 0 ||
|
|
1475
|
-
Lt(D,
|
|
1471
|
+
(m === !0 || g === !0) && (q.minWidth = v.width + "px", g === !0 && (q.minHeight = v.height + "px")), Object.assign(l.style, q);
|
|
1472
|
+
const R = Zn(P, E);
|
|
1473
|
+
let D = ql(v, R, i, u);
|
|
1474
|
+
if (d === void 0 || o === void 0)
|
|
1475
|
+
Lt(D, v, R, i, u);
|
|
1476
1476
|
else {
|
|
1477
1477
|
const { top: B, left: L } = D;
|
|
1478
|
-
Lt(D,
|
|
1478
|
+
Lt(D, v, R, i, u);
|
|
1479
1479
|
let H = !1;
|
|
1480
1480
|
if (D.top !== B) {
|
|
1481
1481
|
H = !0;
|
|
1482
|
-
const Q = 2 *
|
|
1483
|
-
|
|
1482
|
+
const Q = 2 * o[1];
|
|
1483
|
+
v.center = v.top -= Q, v.bottom -= Q + 2;
|
|
1484
1484
|
}
|
|
1485
1485
|
if (D.left !== L) {
|
|
1486
1486
|
H = !0;
|
|
1487
|
-
const Q = 2 *
|
|
1488
|
-
|
|
1487
|
+
const Q = 2 * o[0];
|
|
1488
|
+
v.middle = v.left -= Q, v.right -= Q + 2;
|
|
1489
1489
|
}
|
|
1490
|
-
H === !0 && (D = ql(
|
|
1490
|
+
H === !0 && (D = ql(v, R, i, u), Lt(D, v, R, i, u));
|
|
1491
1491
|
}
|
|
1492
1492
|
q = {
|
|
1493
1493
|
top: D.top + "px",
|
|
1494
1494
|
left: D.left + "px"
|
|
1495
|
-
}, D.maxHeight !== void 0 && (q.maxHeight = D.maxHeight + "px",
|
|
1495
|
+
}, D.maxHeight !== void 0 && (q.maxHeight = D.maxHeight + "px", v.height > D.maxHeight && (q.minHeight = q.maxHeight)), D.maxWidth !== void 0 && (q.maxWidth = D.maxWidth + "px", v.width > D.maxWidth && (q.minWidth = q.maxWidth)), Object.assign(l.style, q), l.scrollTop !== r && (l.scrollTop = r), l.scrollLeft !== C && (l.scrollLeft = C);
|
|
1496
1496
|
}
|
|
1497
|
-
function Lt(e, t, l,
|
|
1498
|
-
const
|
|
1499
|
-
if (e.top < 0 || e.top +
|
|
1497
|
+
function Lt(e, t, l, o, a) {
|
|
1498
|
+
const i = l.bottom, u = l.right, d = Wn(), m = window.innerHeight - d, g = document.body.clientWidth;
|
|
1499
|
+
if (e.top < 0 || e.top + i > m)
|
|
1500
1500
|
if (a.vertical === "center")
|
|
1501
|
-
e.top = t[
|
|
1502
|
-
else if (t[
|
|
1501
|
+
e.top = t[o.vertical] > m / 2 ? Math.max(0, m - i) : 0, e.maxHeight = Math.min(i, m);
|
|
1502
|
+
else if (t[o.vertical] > m / 2) {
|
|
1503
1503
|
const c = Math.min(
|
|
1504
|
-
|
|
1505
|
-
|
|
1504
|
+
m,
|
|
1505
|
+
o.vertical === "center" ? t.center : o.vertical === a.vertical ? t.bottom : t.top
|
|
1506
1506
|
);
|
|
1507
|
-
e.maxHeight = Math.min(
|
|
1507
|
+
e.maxHeight = Math.min(i, c), e.top = Math.max(0, c - i);
|
|
1508
1508
|
} else
|
|
1509
1509
|
e.top = Math.max(
|
|
1510
1510
|
0,
|
|
1511
|
-
|
|
1512
|
-
), e.maxHeight = Math.min(
|
|
1513
|
-
if (e.left < 0 || e.left +
|
|
1514
|
-
if (e.maxWidth = Math.min(
|
|
1515
|
-
e.left = t[
|
|
1516
|
-
else if (t[
|
|
1511
|
+
o.vertical === "center" ? t.center : o.vertical === a.vertical ? t.top : t.bottom
|
|
1512
|
+
), e.maxHeight = Math.min(i, m - e.top);
|
|
1513
|
+
if (e.left < 0 || e.left + u > g)
|
|
1514
|
+
if (e.maxWidth = Math.min(u, g), a.horizontal === "middle")
|
|
1515
|
+
e.left = t[o.horizontal] > g / 2 ? Math.max(0, g - u) : 0;
|
|
1516
|
+
else if (t[o.horizontal] > g / 2) {
|
|
1517
1517
|
const c = Math.min(
|
|
1518
1518
|
g,
|
|
1519
|
-
|
|
1519
|
+
o.horizontal === "middle" ? t.middle : o.horizontal === a.horizontal ? t.right : t.left
|
|
1520
1520
|
);
|
|
1521
|
-
e.maxWidth = Math.min(
|
|
1521
|
+
e.maxWidth = Math.min(u, c), e.left = Math.max(0, c - e.maxWidth);
|
|
1522
1522
|
} else
|
|
1523
1523
|
e.left = Math.max(
|
|
1524
1524
|
0,
|
|
1525
|
-
|
|
1526
|
-
), e.maxWidth = Math.min(
|
|
1525
|
+
o.horizontal === "middle" ? t.middle : o.horizontal === a.horizontal ? t.left : t.right
|
|
1526
|
+
), e.maxWidth = Math.min(u, g - e.left);
|
|
1527
1527
|
}
|
|
1528
|
-
const
|
|
1528
|
+
const Jn = be({
|
|
1529
1529
|
name: "QMenu",
|
|
1530
1530
|
inheritAttrs: !1,
|
|
1531
1531
|
props: {
|
|
1532
|
-
...
|
|
1532
|
+
...En,
|
|
1533
1533
|
...Jl,
|
|
1534
1534
|
...lt,
|
|
1535
|
-
...
|
|
1535
|
+
...oo,
|
|
1536
1536
|
persistent: Boolean,
|
|
1537
1537
|
autoClose: Boolean,
|
|
1538
1538
|
separateClosePopup: Boolean,
|
|
@@ -1552,9 +1552,9 @@ const Jo = be({
|
|
|
1552
1552
|
},
|
|
1553
1553
|
offset: {
|
|
1554
1554
|
type: Array,
|
|
1555
|
-
validator:
|
|
1555
|
+
validator: Xn
|
|
1556
1556
|
},
|
|
1557
|
-
scrollTarget:
|
|
1557
|
+
scrollTarget: In,
|
|
1558
1558
|
touchPosition: Boolean,
|
|
1559
1559
|
maxHeight: {
|
|
1560
1560
|
type: String,
|
|
@@ -1566,22 +1566,22 @@ const Jo = be({
|
|
|
1566
1566
|
}
|
|
1567
1567
|
},
|
|
1568
1568
|
emits: [
|
|
1569
|
-
...
|
|
1569
|
+
...eo,
|
|
1570
1570
|
"click",
|
|
1571
1571
|
"escapeKey"
|
|
1572
1572
|
],
|
|
1573
|
-
setup(e, { slots: t, emit: l, attrs:
|
|
1574
|
-
let a = null,
|
|
1575
|
-
const
|
|
1573
|
+
setup(e, { slots: t, emit: l, attrs: o }) {
|
|
1574
|
+
let a = null, i, u, d;
|
|
1575
|
+
const m = le(), { proxy: g } = m, { $q: c } = g, y = T(null), C = T(!1), r = f(
|
|
1576
1576
|
() => e.persistent !== !0 && e.noRouteDismiss !== !0
|
|
1577
|
-
),
|
|
1577
|
+
), v = ot(e, c), { registerTick: _, removeTick: S } = io(), { registerTimeout: P } = uo(), { transitionProps: E, transitionStyle: q } = no(e), { localScrollTarget: R, changeScrollEvent: D, unconfigureScrollTarget: B } = An(e, O), { anchorEl: L, canShow: H } = Bn({ showing: C }), { hide: Q } = to({
|
|
1578
1578
|
showing: C,
|
|
1579
1579
|
canShow: H,
|
|
1580
1580
|
handleShow: se,
|
|
1581
1581
|
handleHide: s,
|
|
1582
1582
|
hideOnRouteChange: r,
|
|
1583
1583
|
processOnMount: !0
|
|
1584
|
-
}), { showPortal: G, hidePortal:
|
|
1584
|
+
}), { showPortal: G, hidePortal: oe, renderPortal: A } = lo(m, y, N, "menu"), U = {
|
|
1585
1585
|
anchorEl: L,
|
|
1586
1586
|
innerRef: y,
|
|
1587
1587
|
onClickOutside(b) {
|
|
@@ -1589,18 +1589,18 @@ const Jo = be({
|
|
|
1589
1589
|
return Q(b), // always prevent touch event
|
|
1590
1590
|
(b.type === "touchstart" || b.target.classList.contains("q-dialog__backdrop")) && ae(b), !0;
|
|
1591
1591
|
}
|
|
1592
|
-
},
|
|
1592
|
+
}, ne = f(
|
|
1593
1593
|
() => kl(
|
|
1594
1594
|
e.anchor || (e.cover === !0 ? "center middle" : "bottom start"),
|
|
1595
1595
|
c.lang.rtl
|
|
1596
1596
|
)
|
|
1597
|
-
), te = f(() => e.cover === !0 ?
|
|
1598
|
-
() => (e.square === !0 ? " q-menu--square" : "") + (
|
|
1597
|
+
), te = f(() => e.cover === !0 ? ne.value : kl(e.self || "top start", c.lang.rtl)), X = f(
|
|
1598
|
+
() => (e.square === !0 ? " q-menu--square" : "") + (v.value === !0 ? " q-menu--dark q-dark" : "")
|
|
1599
1599
|
), re = f(() => e.autoClose === !0 ? { onClick: V } : {}), k = f(
|
|
1600
1600
|
() => C.value === !0 && e.persistent !== !0
|
|
1601
1601
|
);
|
|
1602
1602
|
K(k, (b) => {
|
|
1603
|
-
b === !0 ? (
|
|
1603
|
+
b === !0 ? (ro(F), Un(U)) : (St(F), Sl(U));
|
|
1604
1604
|
});
|
|
1605
1605
|
function M() {
|
|
1606
1606
|
Kt(() => {
|
|
@@ -1609,14 +1609,14 @@ const Jo = be({
|
|
|
1609
1609
|
});
|
|
1610
1610
|
}
|
|
1611
1611
|
function se(b) {
|
|
1612
|
-
if (a = e.noRefocus === !1 ? document.activeElement : null, jl(I), G(), O(),
|
|
1613
|
-
const Z =
|
|
1612
|
+
if (a = e.noRefocus === !1 ? document.activeElement : null, jl(I), G(), O(), i = void 0, b !== void 0 && (e.touchPosition || e.contextMenu)) {
|
|
1613
|
+
const Z = Ko(b);
|
|
1614
1614
|
if (Z.left !== void 0) {
|
|
1615
1615
|
const { top: ve, left: ze } = L.value.getBoundingClientRect();
|
|
1616
|
-
|
|
1616
|
+
i = { left: Z.left - ze, top: Z.top - ve };
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
|
|
1619
|
+
u === void 0 && (u = K(
|
|
1620
1620
|
() => c.screen.width + "|" + c.screen.height + "|" + e.self + "|" + e.anchor + "|" + c.lang.rtl,
|
|
1621
1621
|
z
|
|
1622
1622
|
)), e.noFocus !== !0 && document.activeElement.blur(), _(() => {
|
|
@@ -1626,19 +1626,19 @@ const Jo = be({
|
|
|
1626
1626
|
}, e.transitionDuration);
|
|
1627
1627
|
}
|
|
1628
1628
|
function s(b) {
|
|
1629
|
-
S(),
|
|
1629
|
+
S(), oe(), p(!0), a !== null && // menu was hidden from code or ESC plugin
|
|
1630
1630
|
(b === void 0 || b.qClickOutside !== !0) && (((b && b.type.indexOf("key") === 0 ? a.closest('[tabindex]:not([tabindex^="-"])') : void 0) || a).focus(), a = null), P(() => {
|
|
1631
|
-
|
|
1631
|
+
oe(!0), l("hide", b);
|
|
1632
1632
|
}, e.transitionDuration);
|
|
1633
1633
|
}
|
|
1634
1634
|
function p(b) {
|
|
1635
|
-
|
|
1635
|
+
i = void 0, u !== void 0 && (u(), u = void 0), (b === !0 || C.value === !0) && (Dt(I), B(), Sl(U), St(F)), b !== !0 && (a = null);
|
|
1636
1636
|
}
|
|
1637
1637
|
function O() {
|
|
1638
|
-
(L.value !== null || e.scrollTarget !== void 0) && (R.value = $
|
|
1638
|
+
(L.value !== null || e.scrollTarget !== void 0) && (R.value = $n(L.value, e.scrollTarget), D(R.value, z));
|
|
1639
1639
|
}
|
|
1640
1640
|
function V(b) {
|
|
1641
|
-
d !== !0 ? (
|
|
1641
|
+
d !== !0 ? (Mn(g, b), l("click", b)) : d = !1;
|
|
1642
1642
|
}
|
|
1643
1643
|
function I(b) {
|
|
1644
1644
|
k.value === !0 && e.noFocus !== !0 && Dl(y.value, b.target) !== !0 && M();
|
|
@@ -1647,13 +1647,13 @@ const Jo = be({
|
|
|
1647
1647
|
l("escapeKey"), Q(b);
|
|
1648
1648
|
}
|
|
1649
1649
|
function z() {
|
|
1650
|
-
|
|
1650
|
+
so({
|
|
1651
1651
|
targetEl: y.value,
|
|
1652
1652
|
offset: e.offset,
|
|
1653
1653
|
anchorEl: L.value,
|
|
1654
|
-
anchorOrigin:
|
|
1654
|
+
anchorOrigin: ne.value,
|
|
1655
1655
|
selfOrigin: te.value,
|
|
1656
|
-
absoluteOffset:
|
|
1656
|
+
absoluteOffset: i,
|
|
1657
1657
|
fit: e.fit,
|
|
1658
1658
|
cover: e.cover,
|
|
1659
1659
|
maxHeight: e.maxHeight,
|
|
@@ -1666,15 +1666,15 @@ const Jo = be({
|
|
|
1666
1666
|
E.value,
|
|
1667
1667
|
() => C.value === !0 ? h("div", {
|
|
1668
1668
|
role: "menu",
|
|
1669
|
-
...
|
|
1669
|
+
...o,
|
|
1670
1670
|
ref: y,
|
|
1671
1671
|
tabindex: -1,
|
|
1672
1672
|
class: [
|
|
1673
1673
|
"q-menu q-position-engine scroll" + X.value,
|
|
1674
|
-
|
|
1674
|
+
o.class
|
|
1675
1675
|
],
|
|
1676
1676
|
style: [
|
|
1677
|
-
|
|
1677
|
+
o.style,
|
|
1678
1678
|
q.value
|
|
1679
1679
|
],
|
|
1680
1680
|
...re.value
|
|
@@ -1684,29 +1684,29 @@ const Jo = be({
|
|
|
1684
1684
|
return ce(p), Object.assign(g, { focus: M, updatePosition: z }), A;
|
|
1685
1685
|
}
|
|
1686
1686
|
});
|
|
1687
|
-
function
|
|
1688
|
-
function
|
|
1687
|
+
function ei(e, t, l) {
|
|
1688
|
+
function o() {
|
|
1689
1689
|
}
|
|
1690
1690
|
return ce(() => {
|
|
1691
1691
|
e.value === !0 && void 0;
|
|
1692
1692
|
}), {
|
|
1693
|
-
removeFromHistory:
|
|
1693
|
+
removeFromHistory: o,
|
|
1694
1694
|
addToHistory() {
|
|
1695
1695
|
}
|
|
1696
1696
|
};
|
|
1697
1697
|
}
|
|
1698
1698
|
let Ye = 0, Ot, It, Ze, Ht = !1, Vl, _l, El, Ee = null;
|
|
1699
|
-
function
|
|
1700
|
-
|
|
1699
|
+
function ti(e) {
|
|
1700
|
+
li(e) && ae(e);
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function li(e) {
|
|
1703
1703
|
if (e.target === document.body || e.target.classList.contains("q-layout__backdrop"))
|
|
1704
1704
|
return !0;
|
|
1705
|
-
const t =
|
|
1706
|
-
for (let
|
|
1707
|
-
const
|
|
1708
|
-
if (
|
|
1709
|
-
return
|
|
1705
|
+
const t = Qo(e), l = e.shiftKey && !e.deltaX, o = !l && Math.abs(e.deltaX) <= Math.abs(e.deltaY), a = l || o ? e.deltaY : e.deltaX;
|
|
1706
|
+
for (let i = 0; i < t.length; i++) {
|
|
1707
|
+
const u = t[i];
|
|
1708
|
+
if (jn(u, o))
|
|
1709
|
+
return o ? a < 0 && u.scrollTop === 0 ? !0 : a > 0 && u.scrollTop + u.clientHeight === u.scrollHeight : a < 0 && u.scrollLeft === 0 ? !0 : a > 0 && u.scrollLeft + u.clientWidth === u.scrollWidth;
|
|
1710
1710
|
}
|
|
1711
1711
|
return !0;
|
|
1712
1712
|
}
|
|
@@ -1716,19 +1716,19 @@ function Bl(e) {
|
|
|
1716
1716
|
function gt(e) {
|
|
1717
1717
|
Ht !== !0 && (Ht = !0, requestAnimationFrame(() => {
|
|
1718
1718
|
Ht = !1;
|
|
1719
|
-
const { height: t } = e.target, { clientHeight: l, scrollTop:
|
|
1720
|
-
(Ze === void 0 || t !== window.innerHeight) && (Ze = l - t, document.scrollingElement.scrollTop =
|
|
1719
|
+
const { height: t } = e.target, { clientHeight: l, scrollTop: o } = document.scrollingElement;
|
|
1720
|
+
(Ze === void 0 || t !== window.innerHeight) && (Ze = l - t, document.scrollingElement.scrollTop = o), o > Ze && (document.scrollingElement.scrollTop -= Math.ceil((o - Ze) / 8));
|
|
1721
1721
|
}));
|
|
1722
1722
|
}
|
|
1723
1723
|
function Al(e) {
|
|
1724
1724
|
const t = document.body, l = window.visualViewport !== void 0;
|
|
1725
1725
|
if (e === "add") {
|
|
1726
|
-
const { overflowY:
|
|
1727
|
-
Ot =
|
|
1726
|
+
const { overflowY: o, overflowX: a } = window.getComputedStyle(t);
|
|
1727
|
+
Ot = Dn(window), It = Pn(window), Vl = t.style.left, _l = t.style.top, El = window.location.href, t.style.left = `-${Ot}px`, t.style.top = `-${It}px`, a !== "hidden" && (a === "scroll" || t.scrollWidth > window.innerWidth) && t.classList.add("q-body--force-scrollbar-x"), o !== "hidden" && (o === "scroll" || t.scrollHeight > window.innerHeight) && t.classList.add("q-body--force-scrollbar-y"), t.classList.add("q-body--prevent-scroll"), document.qScrollPrevented = !0, we.is.ios === !0 && (l === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", gt, ge.passiveCapture), window.visualViewport.addEventListener("scroll", gt, ge.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", Bl, ge.passiveCapture));
|
|
1728
1728
|
}
|
|
1729
|
-
we.is.desktop === !0 && we.is.mac === !0 && window[`${e}EventListener`]("wheel",
|
|
1729
|
+
we.is.desktop === !0 && we.is.mac === !0 && window[`${e}EventListener`]("wheel", ti, ge.notPassive), e === "remove" && (we.is.ios === !0 && (l === !0 ? (window.visualViewport.removeEventListener("resize", gt, ge.passiveCapture), window.visualViewport.removeEventListener("scroll", gt, ge.passiveCapture)) : window.removeEventListener("scroll", Bl, ge.passiveCapture)), t.classList.remove("q-body--prevent-scroll"), t.classList.remove("q-body--force-scrollbar-x"), t.classList.remove("q-body--force-scrollbar-y"), document.qScrollPrevented = !1, t.style.left = Vl, t.style.top = _l, window.location.href === El && window.scrollTo(Ot, It), Ze = void 0);
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function oi(e) {
|
|
1732
1732
|
let t = "add";
|
|
1733
1733
|
if (e === !0) {
|
|
1734
1734
|
if (Ye++, Ee !== null) {
|
|
@@ -1749,16 +1749,16 @@ function nu(e) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
Al(t);
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function ni() {
|
|
1753
1753
|
let e;
|
|
1754
1754
|
return {
|
|
1755
1755
|
preventBodyScroll(t) {
|
|
1756
|
-
t !== e && (e !== void 0 || t === !0) && (e = t,
|
|
1756
|
+
t !== e && (e !== void 0 || t === !0) && (e = t, oi(t));
|
|
1757
1757
|
}
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
1760
|
let pt = 0;
|
|
1761
|
-
const
|
|
1761
|
+
const ii = {
|
|
1762
1762
|
standard: "fixed-full flex-center",
|
|
1763
1763
|
top: "fixed-top justify-center",
|
|
1764
1764
|
bottom: "fixed-bottom justify-center",
|
|
@@ -1770,12 +1770,12 @@ const uu = {
|
|
|
1770
1770
|
bottom: ["slide-up", "slide-down"],
|
|
1771
1771
|
right: ["slide-left", "slide-right"],
|
|
1772
1772
|
left: ["slide-right", "slide-left"]
|
|
1773
|
-
},
|
|
1773
|
+
}, ui = be({
|
|
1774
1774
|
name: "QDialog",
|
|
1775
1775
|
inheritAttrs: !1,
|
|
1776
1776
|
props: {
|
|
1777
1777
|
...Jl,
|
|
1778
|
-
...
|
|
1778
|
+
...oo,
|
|
1779
1779
|
transitionShow: String,
|
|
1780
1780
|
// override useTransitionProps
|
|
1781
1781
|
transitionHide: String,
|
|
@@ -1802,46 +1802,46 @@ const uu = {
|
|
|
1802
1802
|
}
|
|
1803
1803
|
},
|
|
1804
1804
|
emits: [
|
|
1805
|
-
...
|
|
1805
|
+
...eo,
|
|
1806
1806
|
"shake",
|
|
1807
1807
|
"click",
|
|
1808
1808
|
"escapeKey"
|
|
1809
1809
|
],
|
|
1810
|
-
setup(e, { slots: t, emit: l, attrs:
|
|
1811
|
-
const a = le(),
|
|
1812
|
-
let
|
|
1810
|
+
setup(e, { slots: t, emit: l, attrs: o }) {
|
|
1811
|
+
const a = le(), i = T(null), u = T(!1), d = T(!1);
|
|
1812
|
+
let m = null, g = null, c, y;
|
|
1813
1813
|
const C = f(
|
|
1814
1814
|
() => e.persistent !== !0 && e.noRouteDismiss !== !0 && e.seamless !== !0
|
|
1815
|
-
), { preventBodyScroll: r } =
|
|
1815
|
+
), { preventBodyScroll: r } = ni(), { registerTimeout: v } = uo(), { registerTick: _, removeTick: S } = io(), { transitionProps: P, transitionStyle: E } = no(
|
|
1816
1816
|
e,
|
|
1817
1817
|
() => Tl[e.position][0],
|
|
1818
1818
|
() => Tl[e.position][1]
|
|
1819
|
-
), q = f(() => E.value + (e.backdropFilter !== void 0 ? `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}` : "")), { showPortal: R, hidePortal: D, portalIsAccessible: B, renderPortal: L } =
|
|
1819
|
+
), q = f(() => E.value + (e.backdropFilter !== void 0 ? `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}` : "")), { showPortal: R, hidePortal: D, portalIsAccessible: B, renderPortal: L } = lo(
|
|
1820
1820
|
a,
|
|
1821
|
-
|
|
1821
|
+
i,
|
|
1822
1822
|
O,
|
|
1823
1823
|
"dialog"
|
|
1824
|
-
), { hide: H } =
|
|
1825
|
-
showing:
|
|
1824
|
+
), { hide: H } = to({
|
|
1825
|
+
showing: u,
|
|
1826
1826
|
hideOnRouteChange: C,
|
|
1827
1827
|
handleShow: U,
|
|
1828
|
-
handleHide:
|
|
1828
|
+
handleHide: ne,
|
|
1829
1829
|
processOnMount: !0
|
|
1830
1830
|
});
|
|
1831
|
-
|
|
1831
|
+
ei(u);
|
|
1832
1832
|
const Q = f(
|
|
1833
|
-
() => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${
|
|
1834
|
-
), G = f(() =>
|
|
1833
|
+
() => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${ii[e.position]}` + (d.value === !0 ? " q-dialog__inner--animating" : "") + (e.fullWidth === !0 ? " q-dialog__inner--fullwidth" : "") + (e.fullHeight === !0 ? " q-dialog__inner--fullheight" : "") + (e.square === !0 ? " q-dialog__inner--square" : "")
|
|
1834
|
+
), G = f(() => u.value === !0 && e.seamless !== !0), oe = f(() => e.autoClose === !0 ? { onClick: se } : {}), A = f(() => [
|
|
1835
1835
|
`q-dialog fullscreen no-pointer-events q-dialog--${G.value === !0 ? "modal" : "seamless"}`,
|
|
1836
|
-
|
|
1836
|
+
o.class
|
|
1837
1837
|
]);
|
|
1838
1838
|
K(() => e.maximized, (V) => {
|
|
1839
|
-
|
|
1839
|
+
u.value === !0 && M(V);
|
|
1840
1840
|
}), K(G, (V) => {
|
|
1841
|
-
r(V), V === !0 ? (jl(p),
|
|
1841
|
+
r(V), V === !0 ? (jl(p), ro(re)) : (Dt(p), St(re));
|
|
1842
1842
|
});
|
|
1843
1843
|
function U(V) {
|
|
1844
|
-
g = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, M(e.maximized), R(), d.value = !0, e.noFocus !== !0 ? (document.activeElement !== null && document.activeElement.blur(), _(te)) : S(),
|
|
1844
|
+
g = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, M(e.maximized), R(), d.value = !0, e.noFocus !== !0 ? (document.activeElement !== null && document.activeElement.blur(), _(te)) : S(), v(() => {
|
|
1845
1845
|
if (a.proxy.$q.platform.is.ios === !0) {
|
|
1846
1846
|
if (e.seamless !== !0 && document.activeElement) {
|
|
1847
1847
|
const { top: I, bottom: F } = document.activeElement.getBoundingClientRect(), { innerHeight: z } = window, N = window.visualViewport !== void 0 ? window.visualViewport.height : z;
|
|
@@ -1850,19 +1850,19 @@ const uu = {
|
|
|
1850
1850
|
F >= z ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + F - N / 2)
|
|
1851
1851
|
)), document.activeElement.scrollIntoView();
|
|
1852
1852
|
}
|
|
1853
|
-
y = !0,
|
|
1853
|
+
y = !0, i.value.click(), y = !1;
|
|
1854
1854
|
}
|
|
1855
1855
|
R(!0), d.value = !1, l("show", V);
|
|
1856
1856
|
}, e.transitionDuration);
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1859
|
-
S(), k(!0), d.value = !0, D(), g !== null && (((V && V.type.indexOf("key") === 0 ? g.closest('[tabindex]:not([tabindex^="-"])') : void 0) || g).focus(), g = null),
|
|
1858
|
+
function ne(V) {
|
|
1859
|
+
S(), k(!0), d.value = !0, D(), g !== null && (((V && V.type.indexOf("key") === 0 ? g.closest('[tabindex]:not([tabindex^="-"])') : void 0) || g).focus(), g = null), v(() => {
|
|
1860
1860
|
D(!0), d.value = !1, l("hide", V);
|
|
1861
1861
|
}, e.transitionDuration);
|
|
1862
1862
|
}
|
|
1863
1863
|
function te(V) {
|
|
1864
1864
|
Kt(() => {
|
|
1865
|
-
let I =
|
|
1865
|
+
let I = i.value;
|
|
1866
1866
|
if (I !== null) {
|
|
1867
1867
|
if (V !== void 0) {
|
|
1868
1868
|
const F = I.querySelector(V);
|
|
@@ -1877,16 +1877,16 @@ const uu = {
|
|
|
1877
1877
|
}
|
|
1878
1878
|
function X(V) {
|
|
1879
1879
|
V && typeof V.focus == "function" ? V.focus({ preventScroll: !0 }) : te(), l("shake");
|
|
1880
|
-
const I =
|
|
1881
|
-
I !== null && (I.classList.remove("q-animate--scale"), I.classList.add("q-animate--scale"),
|
|
1882
|
-
|
|
1880
|
+
const I = i.value;
|
|
1881
|
+
I !== null && (I.classList.remove("q-animate--scale"), I.classList.add("q-animate--scale"), m !== null && clearTimeout(m), m = setTimeout(() => {
|
|
1882
|
+
m = null, i.value !== null && (I.classList.remove("q-animate--scale"), te());
|
|
1883
1883
|
}, 170));
|
|
1884
1884
|
}
|
|
1885
1885
|
function re() {
|
|
1886
1886
|
e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && X() : (l("escapeKey"), H()));
|
|
1887
1887
|
}
|
|
1888
1888
|
function k(V) {
|
|
1889
|
-
|
|
1889
|
+
m !== null && (clearTimeout(m), m = null), (V === !0 || u.value === !0) && (M(!1), e.seamless !== !0 && (r(!1), Dt(p), St(re))), V !== !0 && (g = null);
|
|
1890
1890
|
}
|
|
1891
1891
|
function M(V) {
|
|
1892
1892
|
V === !0 ? c !== !0 && (pt < 1 && document.body.classList.add("q-body--dialog"), pt++, c = !0) : c === !0 && (pt < 2 && document.body.classList.remove("q-body--dialog"), pt--, c = !1);
|
|
@@ -1898,7 +1898,7 @@ const uu = {
|
|
|
1898
1898
|
e.persistent !== !0 && e.noBackdropDismiss !== !0 ? H(V) : e.noShake !== !0 && X();
|
|
1899
1899
|
}
|
|
1900
1900
|
function p(V) {
|
|
1901
|
-
e.allowFocusOutside !== !0 && B.value === !0 && Dl(
|
|
1901
|
+
e.allowFocusOutside !== !0 && B.value === !0 && Dl(i.value, V.target) !== !0 && te('[tabindex]:not([tabindex="-1"])');
|
|
1902
1902
|
}
|
|
1903
1903
|
Object.assign(a.proxy, {
|
|
1904
1904
|
// expose public methods
|
|
@@ -1913,7 +1913,7 @@ const uu = {
|
|
|
1913
1913
|
return h("div", {
|
|
1914
1914
|
role: "dialog",
|
|
1915
1915
|
"aria-modal": G.value === !0 ? "true" : "false",
|
|
1916
|
-
...
|
|
1916
|
+
...o,
|
|
1917
1917
|
class: A.value
|
|
1918
1918
|
}, [
|
|
1919
1919
|
h(yt, {
|
|
@@ -1929,12 +1929,12 @@ const uu = {
|
|
|
1929
1929
|
h(
|
|
1930
1930
|
yt,
|
|
1931
1931
|
P.value,
|
|
1932
|
-
() =>
|
|
1933
|
-
ref:
|
|
1932
|
+
() => u.value === !0 ? h("div", {
|
|
1933
|
+
ref: i,
|
|
1934
1934
|
class: Q.value,
|
|
1935
1935
|
style: E.value,
|
|
1936
1936
|
tabindex: -1,
|
|
1937
|
-
...
|
|
1937
|
+
...oe.value
|
|
1938
1938
|
}, Se(t.default)) : null
|
|
1939
1939
|
)
|
|
1940
1940
|
]);
|
|
@@ -1956,60 +1956,60 @@ let Ct = !1;
|
|
|
1956
1956
|
height: "1px"
|
|
1957
1957
|
}), document.body.appendChild(e), e.appendChild(t), e.scrollLeft = -1e3, Ct = e.scrollLeft >= 0, e.remove();
|
|
1958
1958
|
}
|
|
1959
|
-
const fe = 1e3,
|
|
1959
|
+
const fe = 1e3, ai = [
|
|
1960
1960
|
"start",
|
|
1961
1961
|
"center",
|
|
1962
1962
|
"end",
|
|
1963
1963
|
"start-force",
|
|
1964
1964
|
"center-force",
|
|
1965
1965
|
"end-force"
|
|
1966
|
-
],
|
|
1966
|
+
], co = Array.prototype.filter, ri = window.getComputedStyle(document.body).overflowAnchor === void 0 ? Uo : function(e, t) {
|
|
1967
1967
|
e !== null && (e._qOverflowAnimationFrame !== void 0 && cancelAnimationFrame(e._qOverflowAnimationFrame), e._qOverflowAnimationFrame = requestAnimationFrame(() => {
|
|
1968
1968
|
if (e === null)
|
|
1969
1969
|
return;
|
|
1970
1970
|
e._qOverflowAnimationFrame = void 0;
|
|
1971
1971
|
const l = e.children || [];
|
|
1972
|
-
|
|
1972
|
+
co.call(l, (a) => a.dataset && a.dataset.qVsAnchor !== void 0).forEach((a) => {
|
|
1973
1973
|
delete a.dataset.qVsAnchor;
|
|
1974
1974
|
});
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1975
|
+
const o = l[t];
|
|
1976
|
+
o && o.dataset && (o.dataset.qVsAnchor = "");
|
|
1977
1977
|
}));
|
|
1978
1978
|
};
|
|
1979
1979
|
function We(e, t) {
|
|
1980
1980
|
return e + t;
|
|
1981
1981
|
}
|
|
1982
|
-
function $t(e, t, l,
|
|
1983
|
-
const
|
|
1982
|
+
function $t(e, t, l, o, a, i, u, d) {
|
|
1983
|
+
const m = e === window ? document.scrollingElement || document.documentElement : e, g = a === !0 ? "offsetWidth" : "offsetHeight", c = {
|
|
1984
1984
|
scrollStart: 0,
|
|
1985
|
-
scrollViewSize: -
|
|
1985
|
+
scrollViewSize: -u - d,
|
|
1986
1986
|
scrollMaxSize: 0,
|
|
1987
|
-
offsetStart: -
|
|
1987
|
+
offsetStart: -u,
|
|
1988
1988
|
offsetEnd: -d
|
|
1989
1989
|
};
|
|
1990
|
-
if (a === !0 ? (e === window ? (c.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, c.scrollViewSize += document.documentElement.clientWidth) : (c.scrollStart =
|
|
1990
|
+
if (a === !0 ? (e === window ? (c.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, c.scrollViewSize += document.documentElement.clientWidth) : (c.scrollStart = m.scrollLeft, c.scrollViewSize += m.clientWidth), c.scrollMaxSize = m.scrollWidth, i === !0 && (c.scrollStart = (Ct === !0 ? c.scrollMaxSize - c.scrollViewSize : 0) - c.scrollStart)) : (e === window ? (c.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0, c.scrollViewSize += document.documentElement.clientHeight) : (c.scrollStart = m.scrollTop, c.scrollViewSize += m.clientHeight), c.scrollMaxSize = m.scrollHeight), l !== null)
|
|
1991
1991
|
for (let y = l.previousElementSibling; y !== null; y = y.previousElementSibling)
|
|
1992
1992
|
y.classList.contains("q-virtual-scroll--skip") === !1 && (c.offsetStart += y[g]);
|
|
1993
|
-
if (
|
|
1994
|
-
for (let y =
|
|
1993
|
+
if (o !== null)
|
|
1994
|
+
for (let y = o.nextElementSibling; y !== null; y = y.nextElementSibling)
|
|
1995
1995
|
y.classList.contains("q-virtual-scroll--skip") === !1 && (c.offsetEnd += y[g]);
|
|
1996
1996
|
if (t !== e) {
|
|
1997
|
-
const y =
|
|
1997
|
+
const y = m.getBoundingClientRect(), C = t.getBoundingClientRect();
|
|
1998
1998
|
a === !0 ? (c.offsetStart += C.left - y.left, c.offsetEnd -= C.width) : (c.offsetStart += C.top - y.top, c.offsetEnd -= C.height), e !== window && (c.offsetStart += c.scrollStart), c.offsetEnd += c.scrollMaxSize - c.offsetStart;
|
|
1999
1999
|
}
|
|
2000
2000
|
return c;
|
|
2001
2001
|
}
|
|
2002
|
-
function Rl(e, t, l,
|
|
2003
|
-
t === "end" && (t = (e === window ? document.body : e)[l === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? l === !0 ? (
|
|
2002
|
+
function Rl(e, t, l, o) {
|
|
2003
|
+
t === "end" && (t = (e === window ? document.body : e)[l === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? l === !0 ? (o === !0 && (t = (Ct === !0 ? document.body.scrollWidth - document.documentElement.clientWidth : 0) - t), window.scrollTo(t, window.pageYOffset || window.scrollY || document.body.scrollTop || 0)) : window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, t) : l === !0 ? (o === !0 && (t = (Ct === !0 ? e.scrollWidth - e.offsetWidth : 0) - t), e.scrollLeft = t) : e.scrollTop = t;
|
|
2004
2004
|
}
|
|
2005
|
-
function Ge(e, t, l,
|
|
2006
|
-
if (l >=
|
|
2005
|
+
function Ge(e, t, l, o) {
|
|
2006
|
+
if (l >= o)
|
|
2007
2007
|
return 0;
|
|
2008
|
-
const a = t.length,
|
|
2009
|
-
let d = e.slice(
|
|
2010
|
-
return l % fe !== 0 && (d -= t.slice(
|
|
2008
|
+
const a = t.length, i = Math.floor(l / fe), u = Math.floor((o - 1) / fe) + 1;
|
|
2009
|
+
let d = e.slice(i, u).reduce(We, 0);
|
|
2010
|
+
return l % fe !== 0 && (d -= t.slice(i * fe, l).reduce(We, 0)), o % fe !== 0 && o !== a && (d -= t.slice(o, u * fe).reduce(We, 0)), d;
|
|
2011
2011
|
}
|
|
2012
|
-
const
|
|
2012
|
+
const si = {
|
|
2013
2013
|
virtualScrollSliceSize: {
|
|
2014
2014
|
type: [Number, String],
|
|
2015
2015
|
default: 10
|
|
@@ -2038,21 +2038,21 @@ const su = {
|
|
|
2038
2038
|
}, zl = {
|
|
2039
2039
|
virtualScrollHorizontal: Boolean,
|
|
2040
2040
|
onVirtualScroll: Function,
|
|
2041
|
-
...
|
|
2041
|
+
...si
|
|
2042
2042
|
};
|
|
2043
|
-
function
|
|
2043
|
+
function ci({
|
|
2044
2044
|
virtualScrollLength: e,
|
|
2045
2045
|
getVirtualScrollTarget: t,
|
|
2046
2046
|
getVirtualScrollEl: l,
|
|
2047
|
-
virtualScrollItemSizeComputed:
|
|
2047
|
+
virtualScrollItemSizeComputed: o
|
|
2048
2048
|
// optional
|
|
2049
2049
|
}) {
|
|
2050
|
-
const a = le(), { props:
|
|
2050
|
+
const a = le(), { props: i, emit: u, proxy: d } = a, { $q: m } = d;
|
|
2051
2051
|
let g, c, y, C = [], r;
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2054
|
-
const B = f(() =>
|
|
2055
|
-
() => B.value + ";" +
|
|
2052
|
+
const v = T(0), _ = T(0), S = T({}), P = T(null), E = T(null), q = T(null), R = T({ from: 0, to: 0 }), D = f(() => i.tableColspan !== void 0 ? i.tableColspan : 100);
|
|
2053
|
+
o === void 0 && (o = f(() => i.virtualScrollItemSize));
|
|
2054
|
+
const B = f(() => o.value + ";" + i.virtualScrollHorizontal), L = f(
|
|
2055
|
+
() => B.value + ";" + i.virtualScrollSliceRatioBefore + ";" + i.virtualScrollSliceRatioAfter
|
|
2056
2056
|
);
|
|
2057
2057
|
K(L, () => {
|
|
2058
2058
|
X();
|
|
@@ -2072,20 +2072,20 @@ function cu({
|
|
|
2072
2072
|
l(),
|
|
2073
2073
|
P.value,
|
|
2074
2074
|
E.value,
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2075
|
+
i.virtualScrollHorizontal,
|
|
2076
|
+
m.lang.rtl,
|
|
2077
|
+
i.virtualScrollStickySizeStart,
|
|
2078
|
+
i.virtualScrollStickySizeEnd
|
|
2079
2079
|
);
|
|
2080
2080
|
y !== V.scrollViewSize && X(V.scrollViewSize), A(
|
|
2081
2081
|
O,
|
|
2082
2082
|
V,
|
|
2083
2083
|
Math.min(e.value - 1, Math.max(0, parseInt(s, 10) || 0)),
|
|
2084
2084
|
0,
|
|
2085
|
-
|
|
2085
|
+
ai.indexOf(p) !== -1 ? p : c !== -1 && s > c ? "end" : "start"
|
|
2086
2086
|
);
|
|
2087
2087
|
}
|
|
2088
|
-
function
|
|
2088
|
+
function oe() {
|
|
2089
2089
|
const s = t();
|
|
2090
2090
|
if (s == null || s.nodeType === 8)
|
|
2091
2091
|
return;
|
|
@@ -2094,10 +2094,10 @@ function cu({
|
|
|
2094
2094
|
l(),
|
|
2095
2095
|
P.value,
|
|
2096
2096
|
E.value,
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2097
|
+
i.virtualScrollHorizontal,
|
|
2098
|
+
m.lang.rtl,
|
|
2099
|
+
i.virtualScrollStickySizeStart,
|
|
2100
|
+
i.virtualScrollStickySizeEnd
|
|
2101
2101
|
), O = e.value - 1, V = p.scrollMaxSize - p.offsetStart - p.offsetEnd - _.value;
|
|
2102
2102
|
if (g === p.scrollStart)
|
|
2103
2103
|
return;
|
|
@@ -2117,8 +2117,8 @@ function cu({
|
|
|
2117
2117
|
return;
|
|
2118
2118
|
}
|
|
2119
2119
|
let F = 0, z = p.scrollStart - p.offsetStart, N = z;
|
|
2120
|
-
if (z <= V && z + p.scrollViewSize >=
|
|
2121
|
-
z -=
|
|
2120
|
+
if (z <= V && z + p.scrollViewSize >= v.value)
|
|
2121
|
+
z -= v.value, F = R.value.from, N = z;
|
|
2122
2122
|
else
|
|
2123
2123
|
for (let b = 0; z >= C[b] && F < O; b++)
|
|
2124
2124
|
z -= C[b], F += fe;
|
|
@@ -2141,13 +2141,13 @@ function cu({
|
|
|
2141
2141
|
return;
|
|
2142
2142
|
}
|
|
2143
2143
|
const { activeElement: ze } = document, me = q.value;
|
|
2144
|
-
ve === !0 && me !== null && me !== ze && me.contains(ze) === !0 && (me.addEventListener("focusout",
|
|
2145
|
-
me !== null && me.removeEventListener("focusout",
|
|
2146
|
-
})),
|
|
2147
|
-
const
|
|
2144
|
+
ve === !0 && me !== null && me !== ze && me.contains(ze) === !0 && (me.addEventListener("focusout", ne), setTimeout(() => {
|
|
2145
|
+
me !== null && me.removeEventListener("focusout", ne);
|
|
2146
|
+
})), ri(me, O - b);
|
|
2147
|
+
const nt = z !== void 0 ? r.slice(b, O).reduce(We, 0) : 0;
|
|
2148
2148
|
if (ve === !0) {
|
|
2149
2149
|
const ke = Z >= R.value.from && b <= R.value.to ? R.value.to : Z;
|
|
2150
|
-
R.value = { from: b, to: ke },
|
|
2150
|
+
R.value = { from: b, to: ke }, v.value = Ge(C, r, 0, b), _.value = Ge(C, r, Z, e.value), requestAnimationFrame(() => {
|
|
2151
2151
|
R.value.to !== Z && g === p.scrollStart && (R.value = { from: R.value.from, to: Z }, _.value = Ge(C, r, Z, e.value));
|
|
2152
2152
|
});
|
|
2153
2153
|
}
|
|
@@ -2155,27 +2155,27 @@ function cu({
|
|
|
2155
2155
|
if (g !== p.scrollStart)
|
|
2156
2156
|
return;
|
|
2157
2157
|
ve === !0 && U(b);
|
|
2158
|
-
const ke = r.slice(b, O).reduce(We, 0), qe = ke + p.offsetStart +
|
|
2158
|
+
const ke = r.slice(b, O).reduce(We, 0), qe = ke + p.offsetStart + v.value, it = qe + r[O];
|
|
2159
2159
|
let Ne = qe + V;
|
|
2160
2160
|
if (z !== void 0) {
|
|
2161
|
-
const Vt = ke -
|
|
2162
|
-
Ne = F !== !0 && Ke < qe &&
|
|
2161
|
+
const Vt = ke - nt, Ke = p.scrollStart + Vt;
|
|
2162
|
+
Ne = F !== !0 && Ke < qe && it < Ke + p.scrollViewSize ? Ke : z === "end" ? it - p.scrollViewSize : qe - (z === "start" ? 0 : Math.round((p.scrollViewSize - r[O]) / 2));
|
|
2163
2163
|
}
|
|
2164
2164
|
g = Ne, Rl(
|
|
2165
2165
|
s,
|
|
2166
2166
|
Ne,
|
|
2167
|
-
|
|
2168
|
-
|
|
2167
|
+
i.virtualScrollHorizontal,
|
|
2168
|
+
m.lang.rtl
|
|
2169
2169
|
), k(O);
|
|
2170
2170
|
});
|
|
2171
2171
|
}
|
|
2172
2172
|
function U(s) {
|
|
2173
2173
|
const p = q.value;
|
|
2174
2174
|
if (p) {
|
|
2175
|
-
const O =
|
|
2175
|
+
const O = co.call(
|
|
2176
2176
|
p.children,
|
|
2177
2177
|
(b) => b.classList && b.classList.contains("q-virtual-scroll--skip") === !1
|
|
2178
|
-
), V = O.length, I =
|
|
2178
|
+
), V = O.length, I = i.virtualScrollHorizontal === !0 ? (b) => b.getBoundingClientRect().width : (b) => b.offsetHeight;
|
|
2179
2179
|
let F = s, z, N;
|
|
2180
2180
|
for (let b = 0; b < V; ) {
|
|
2181
2181
|
for (z = I(O[b]), b++; b < V && O[b].classList.contains("q-virtual-scroll--with-prev") === !0; )
|
|
@@ -2184,11 +2184,11 @@ function cu({
|
|
|
2184
2184
|
}
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2187
|
+
function ne() {
|
|
2188
2188
|
q.value !== null && q.value !== void 0 && q.value.focus();
|
|
2189
2189
|
}
|
|
2190
2190
|
function te(s, p) {
|
|
2191
|
-
const O = 1 *
|
|
2191
|
+
const O = 1 * o.value;
|
|
2192
2192
|
(p === !0 || Array.isArray(r) === !1) && (r = []);
|
|
2193
2193
|
const V = r.length;
|
|
2194
2194
|
r.length = e.value;
|
|
@@ -2203,7 +2203,7 @@ function cu({
|
|
|
2203
2203
|
z += r[b];
|
|
2204
2204
|
C.push(z);
|
|
2205
2205
|
}
|
|
2206
|
-
c = -1, g = void 0,
|
|
2206
|
+
c = -1, g = void 0, v.value = Ge(C, r, 0, R.value.from), _.value = Ge(C, r, R.value.to, e.value), s >= 0 ? (U(R.value.from), ue(() => {
|
|
2207
2207
|
G(s);
|
|
2208
2208
|
})) : M();
|
|
2209
2209
|
}
|
|
@@ -2215,17 +2215,17 @@ function cu({
|
|
|
2215
2215
|
l(),
|
|
2216
2216
|
P.value,
|
|
2217
2217
|
E.value,
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2218
|
+
i.virtualScrollHorizontal,
|
|
2219
|
+
m.lang.rtl,
|
|
2220
|
+
i.virtualScrollStickySizeStart,
|
|
2221
|
+
i.virtualScrollStickySizeEnd
|
|
2222
2222
|
).scrollViewSize);
|
|
2223
2223
|
}
|
|
2224
2224
|
y = s;
|
|
2225
|
-
const p = parseFloat(
|
|
2225
|
+
const p = parseFloat(i.virtualScrollSliceRatioBefore) || 0, O = parseFloat(i.virtualScrollSliceRatioAfter) || 0, V = 1 + p + O, I = s === void 0 || s <= 0 ? 1 : Math.ceil(s / o.value), F = Math.max(
|
|
2226
2226
|
1,
|
|
2227
2227
|
I,
|
|
2228
|
-
Math.ceil((
|
|
2228
|
+
Math.ceil((i.virtualScrollSliceSize > 0 ? i.virtualScrollSliceSize : 10) / V)
|
|
2229
2229
|
);
|
|
2230
2230
|
S.value = {
|
|
2231
2231
|
total: Math.ceil(F * V),
|
|
@@ -2236,8 +2236,8 @@ function cu({
|
|
|
2236
2236
|
};
|
|
2237
2237
|
}
|
|
2238
2238
|
function re(s, p) {
|
|
2239
|
-
const O =
|
|
2240
|
-
["--q-virtual-scroll-item-" + O]:
|
|
2239
|
+
const O = i.virtualScrollHorizontal === !0 ? "width" : "height", V = {
|
|
2240
|
+
["--q-virtual-scroll-item-" + O]: o.value + "px"
|
|
2241
2241
|
};
|
|
2242
2242
|
return [
|
|
2243
2243
|
s === "tbody" ? h(s, {
|
|
@@ -2247,7 +2247,7 @@ function cu({
|
|
|
2247
2247
|
}, [
|
|
2248
2248
|
h("tr", [
|
|
2249
2249
|
h("td", {
|
|
2250
|
-
style: { [O]: `${
|
|
2250
|
+
style: { [O]: `${v.value}px`, ...V },
|
|
2251
2251
|
colspan: D.value
|
|
2252
2252
|
})
|
|
2253
2253
|
])
|
|
@@ -2255,7 +2255,7 @@ function cu({
|
|
|
2255
2255
|
class: "q-virtual-scroll__padding",
|
|
2256
2256
|
key: "before",
|
|
2257
2257
|
ref: P,
|
|
2258
|
-
style: { [O]: `${
|
|
2258
|
+
style: { [O]: `${v.value}px`, ...V }
|
|
2259
2259
|
}),
|
|
2260
2260
|
h(s, {
|
|
2261
2261
|
class: "q-virtual-scroll__content",
|
|
@@ -2283,7 +2283,7 @@ function cu({
|
|
|
2283
2283
|
];
|
|
2284
2284
|
}
|
|
2285
2285
|
function k(s) {
|
|
2286
|
-
c !== s && (
|
|
2286
|
+
c !== s && (i.onVirtualScroll !== void 0 && u("virtualScroll", {
|
|
2287
2287
|
index: s,
|
|
2288
2288
|
from: R.value.from,
|
|
2289
2289
|
to: R.value.to - 1,
|
|
@@ -2293,10 +2293,10 @@ function cu({
|
|
|
2293
2293
|
}
|
|
2294
2294
|
X();
|
|
2295
2295
|
const M = Ul(
|
|
2296
|
-
|
|
2297
|
-
|
|
2296
|
+
oe,
|
|
2297
|
+
m.platform.is.ios === !0 ? 120 : 35
|
|
2298
2298
|
);
|
|
2299
|
-
|
|
2299
|
+
To(() => {
|
|
2300
2300
|
X();
|
|
2301
2301
|
});
|
|
2302
2302
|
let se = !1;
|
|
@@ -2308,8 +2308,8 @@ function cu({
|
|
|
2308
2308
|
g !== void 0 && s !== void 0 && s !== null && s.nodeType !== 8 ? Rl(
|
|
2309
2309
|
s,
|
|
2310
2310
|
g,
|
|
2311
|
-
|
|
2312
|
-
|
|
2311
|
+
i.virtualScrollHorizontal,
|
|
2312
|
+
m.lang.rtl
|
|
2313
2313
|
) : G(c);
|
|
2314
2314
|
}), ce(() => {
|
|
2315
2315
|
M.cancel();
|
|
@@ -2325,13 +2325,13 @@ function cu({
|
|
|
2325
2325
|
refresh: Q
|
|
2326
2326
|
};
|
|
2327
2327
|
}
|
|
2328
|
-
const
|
|
2329
|
-
function
|
|
2328
|
+
const di = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/, fi = /[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u, vi = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/, mi = /[a-z0-9_ -]$/i;
|
|
2329
|
+
function hi(e) {
|
|
2330
2330
|
return function(l) {
|
|
2331
2331
|
if (l.type === "compositionend" || l.type === "change") {
|
|
2332
2332
|
if (l.target.qComposing !== !0) return;
|
|
2333
2333
|
l.target.qComposing = !1, e(l);
|
|
2334
|
-
} else l.type === "compositionupdate" && l.target.qComposing !== !0 && typeof l.data == "string" && (we.is.firefox === !0 ?
|
|
2334
|
+
} else l.type === "compositionupdate" && l.target.qComposing !== !0 && typeof l.data == "string" && (we.is.firefox === !0 ? mi.test(l.data) === !1 : di.test(l.data) === !0 || fi.test(l.data) === !0 || vi.test(l.data) === !0) === !0 && (l.target.qComposing = !0);
|
|
2335
2335
|
};
|
|
2336
2336
|
}
|
|
2337
2337
|
function Ce(e, t) {
|
|
@@ -2340,47 +2340,47 @@ function Ce(e, t) {
|
|
|
2340
2340
|
if (e !== null && t !== null && typeof e == "object" && typeof t == "object") {
|
|
2341
2341
|
if (e.constructor !== t.constructor)
|
|
2342
2342
|
return !1;
|
|
2343
|
-
let l,
|
|
2343
|
+
let l, o;
|
|
2344
2344
|
if (e.constructor === Array) {
|
|
2345
2345
|
if (l = e.length, l !== t.length)
|
|
2346
2346
|
return !1;
|
|
2347
|
-
for (
|
|
2348
|
-
if (Ce(e[
|
|
2347
|
+
for (o = l; o-- !== 0; )
|
|
2348
|
+
if (Ce(e[o], t[o]) !== !0)
|
|
2349
2349
|
return !1;
|
|
2350
2350
|
return !0;
|
|
2351
2351
|
}
|
|
2352
2352
|
if (e.constructor === Map) {
|
|
2353
2353
|
if (e.size !== t.size)
|
|
2354
2354
|
return !1;
|
|
2355
|
-
let
|
|
2356
|
-
for (
|
|
2357
|
-
if (t.has(
|
|
2355
|
+
let i = e.entries();
|
|
2356
|
+
for (o = i.next(); o.done !== !0; ) {
|
|
2357
|
+
if (t.has(o.value[0]) !== !0)
|
|
2358
2358
|
return !1;
|
|
2359
|
-
|
|
2359
|
+
o = i.next();
|
|
2360
2360
|
}
|
|
2361
|
-
for (
|
|
2362
|
-
if (Ce(
|
|
2361
|
+
for (i = e.entries(), o = i.next(); o.done !== !0; ) {
|
|
2362
|
+
if (Ce(o.value[1], t.get(o.value[0])) !== !0)
|
|
2363
2363
|
return !1;
|
|
2364
|
-
|
|
2364
|
+
o = i.next();
|
|
2365
2365
|
}
|
|
2366
2366
|
return !0;
|
|
2367
2367
|
}
|
|
2368
2368
|
if (e.constructor === Set) {
|
|
2369
2369
|
if (e.size !== t.size)
|
|
2370
2370
|
return !1;
|
|
2371
|
-
const
|
|
2372
|
-
for (
|
|
2373
|
-
if (t.has(
|
|
2371
|
+
const i = e.entries();
|
|
2372
|
+
for (o = i.next(); o.done !== !0; ) {
|
|
2373
|
+
if (t.has(o.value[0]) !== !0)
|
|
2374
2374
|
return !1;
|
|
2375
|
-
|
|
2375
|
+
o = i.next();
|
|
2376
2376
|
}
|
|
2377
2377
|
return !0;
|
|
2378
2378
|
}
|
|
2379
2379
|
if (e.buffer != null && e.buffer.constructor === ArrayBuffer) {
|
|
2380
2380
|
if (l = e.length, l !== t.length)
|
|
2381
2381
|
return !1;
|
|
2382
|
-
for (
|
|
2383
|
-
if (e[
|
|
2382
|
+
for (o = l; o-- !== 0; )
|
|
2383
|
+
if (e[o] !== t[o])
|
|
2384
2384
|
return !1;
|
|
2385
2385
|
return !0;
|
|
2386
2386
|
}
|
|
@@ -2390,12 +2390,12 @@ function Ce(e, t) {
|
|
|
2390
2390
|
return e.valueOf() === t.valueOf();
|
|
2391
2391
|
if (e.toString !== Object.prototype.toString)
|
|
2392
2392
|
return e.toString() === t.toString();
|
|
2393
|
-
const a = Object.keys(e).filter((
|
|
2394
|
-
if (l = a.length, l !== Object.keys(t).filter((
|
|
2393
|
+
const a = Object.keys(e).filter((i) => e[i] !== void 0);
|
|
2394
|
+
if (l = a.length, l !== Object.keys(t).filter((i) => t[i] !== void 0).length)
|
|
2395
2395
|
return !1;
|
|
2396
|
-
for (
|
|
2397
|
-
const
|
|
2398
|
-
if (Ce(e[
|
|
2396
|
+
for (o = l; o-- !== 0; ) {
|
|
2397
|
+
const i = a[o];
|
|
2398
|
+
if (Ce(e[i], t[i]) !== !0)
|
|
2399
2399
|
return !1;
|
|
2400
2400
|
}
|
|
2401
2401
|
return !0;
|
|
@@ -2405,17 +2405,17 @@ function Ce(e, t) {
|
|
|
2405
2405
|
function Fl(e, t, l) {
|
|
2406
2406
|
if (l <= t)
|
|
2407
2407
|
return t;
|
|
2408
|
-
const
|
|
2409
|
-
let a = t + (e - t) %
|
|
2410
|
-
return a < t && (a =
|
|
2408
|
+
const o = l - t + 1;
|
|
2409
|
+
let a = t + (e - t) % o;
|
|
2410
|
+
return a < t && (a = o + a), a === 0 ? 0 : a;
|
|
2411
2411
|
}
|
|
2412
|
-
const Ml = (e) => ["add", "add-unique", "toggle"].includes(e),
|
|
2412
|
+
const Ml = (e) => ["add", "add-unique", "toggle"].includes(e), gi = ".*+?^${}()|[]\\", pi = Object.keys(Qt);
|
|
2413
2413
|
function Pt(e, t) {
|
|
2414
2414
|
if (typeof e == "function") return e;
|
|
2415
2415
|
const l = e !== void 0 ? e : t;
|
|
2416
|
-
return (
|
|
2416
|
+
return (o) => o !== null && typeof o == "object" && l in o ? o[l] : o;
|
|
2417
2417
|
}
|
|
2418
|
-
const
|
|
2418
|
+
const bi = be({
|
|
2419
2419
|
name: "QSelect",
|
|
2420
2420
|
inheritAttrs: !1,
|
|
2421
2421
|
props: {
|
|
@@ -2502,70 +2502,70 @@ const bu = be({
|
|
|
2502
2502
|
"filterAbort"
|
|
2503
2503
|
],
|
|
2504
2504
|
setup(e, { slots: t, emit: l }) {
|
|
2505
|
-
const { proxy:
|
|
2506
|
-
let y = null, C = null, r,
|
|
2507
|
-
const D = T(null), B = T(null), L = T(null), H = T(null), Q = T(null), G =
|
|
2508
|
-
virtualScrollSliceRange:
|
|
2505
|
+
const { proxy: o } = le(), { $q: a } = o, i = T(!1), u = T(!1), d = T(-1), m = T(""), g = T(!1), c = T(!1);
|
|
2506
|
+
let y = null, C = null, r, v, _, S = null, P, E, q, R;
|
|
2507
|
+
const D = T(null), B = T(null), L = T(null), H = T(null), Q = T(null), G = on(e), oe = hi(ol), A = f(() => Array.isArray(e.options) ? e.options.length : 0), U = f(() => e.virtualScrollItemSize === void 0 ? e.optionsDense === !0 ? 24 : 48 : e.virtualScrollItemSize), {
|
|
2508
|
+
virtualScrollSliceRange: ne,
|
|
2509
2509
|
virtualScrollSliceSizeComputed: te,
|
|
2510
2510
|
localResetVirtualScroll: X,
|
|
2511
2511
|
padVirtualScroll: re,
|
|
2512
2512
|
onVirtualScrollEvt: k,
|
|
2513
2513
|
scrollTo: M,
|
|
2514
2514
|
setVirtualScrollSize: se
|
|
2515
|
-
} =
|
|
2515
|
+
} = ci({
|
|
2516
2516
|
virtualScrollLength: A,
|
|
2517
|
-
getVirtualScrollTarget:
|
|
2517
|
+
getVirtualScrollTarget: ho,
|
|
2518
2518
|
getVirtualScrollEl: tl,
|
|
2519
2519
|
virtualScrollItemSizeComputed: U
|
|
2520
2520
|
}), s = Gl(), p = f(() => {
|
|
2521
|
-
const
|
|
2521
|
+
const n = e.mapOptions === !0 && e.multiple !== !0, w = e.modelValue !== void 0 && (e.modelValue !== null || n === !0) ? e.multiple === !0 && Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : [];
|
|
2522
2522
|
if (e.mapOptions === !0 && Array.isArray(e.options) === !0) {
|
|
2523
|
-
const x = e.mapOptions === !0 && r !== void 0 ? r : [], $ = w.map((j) =>
|
|
2524
|
-
return e.modelValue === null &&
|
|
2523
|
+
const x = e.mapOptions === !0 && r !== void 0 ? r : [], $ = w.map((j) => mo(j, x));
|
|
2524
|
+
return e.modelValue === null && n === !0 ? $.filter((j) => j !== null) : $;
|
|
2525
2525
|
}
|
|
2526
2526
|
return w;
|
|
2527
2527
|
}), O = f(() => {
|
|
2528
|
-
const
|
|
2529
|
-
return
|
|
2528
|
+
const n = {};
|
|
2529
|
+
return pi.forEach((w) => {
|
|
2530
2530
|
const x = e[w];
|
|
2531
|
-
x !== void 0 && (
|
|
2532
|
-
}),
|
|
2531
|
+
x !== void 0 && (n[w] = x);
|
|
2532
|
+
}), n;
|
|
2533
2533
|
}), V = f(() => e.optionsDark === null ? s.isDark.value : e.optionsDark), I = f(() => jt(p.value)), F = f(() => {
|
|
2534
|
-
let
|
|
2535
|
-
return e.hideSelected === !0 || p.value.length === 0 ? [
|
|
2534
|
+
let n = "q-field__input q-placeholder col";
|
|
2535
|
+
return e.hideSelected === !0 || p.value.length === 0 ? [n, e.inputClass] : (n += " q-field__input--padding", e.inputClass === void 0 ? n : [n, e.inputClass]);
|
|
2536
2536
|
}), z = f(
|
|
2537
2537
|
() => (e.virtualScrollHorizontal === !0 ? "q-virtual-scroll--horizontal" : "") + (e.popupContentClass ? " " + e.popupContentClass : "")
|
|
2538
2538
|
), N = f(() => A.value === 0), b = f(
|
|
2539
|
-
() => p.value.map((
|
|
2540
|
-
), Z = f(() => e.displayValue !== void 0 ? e.displayValue : b.value), ve = f(() => e.optionsHtml === !0 ? () => !0 : (
|
|
2541
|
-
const
|
|
2539
|
+
() => p.value.map((n) => ie.value(n)).join(", ")
|
|
2540
|
+
), Z = f(() => e.displayValue !== void 0 ? e.displayValue : b.value), ve = f(() => e.optionsHtml === !0 ? () => !0 : (n) => n != null && n.html === !0), ze = f(() => e.displayValueHtml === !0 || e.displayValue === void 0 && (e.optionsHtml === !0 || p.value.some(ve.value))), me = f(() => s.focused.value === !0 ? e.tabindex : -1), nt = f(() => {
|
|
2541
|
+
const n = {
|
|
2542
2542
|
tabindex: e.tabindex,
|
|
2543
2543
|
role: "combobox",
|
|
2544
2544
|
"aria-label": e.label,
|
|
2545
2545
|
"aria-readonly": e.readonly === !0 ? "true" : "false",
|
|
2546
2546
|
"aria-autocomplete": e.useInput === !0 ? "list" : "none",
|
|
2547
|
-
"aria-expanded":
|
|
2547
|
+
"aria-expanded": i.value === !0 ? "true" : "false",
|
|
2548
2548
|
"aria-controls": `${s.targetUid.value}_lb`
|
|
2549
2549
|
};
|
|
2550
|
-
return d.value >= 0 && (
|
|
2550
|
+
return d.value >= 0 && (n["aria-activedescendant"] = `${s.targetUid.value}_${d.value}`), n;
|
|
2551
2551
|
}), ke = f(() => ({
|
|
2552
2552
|
id: `${s.targetUid.value}_lb`,
|
|
2553
2553
|
role: "listbox",
|
|
2554
2554
|
"aria-multiselectable": e.multiple === !0 ? "true" : "false"
|
|
2555
|
-
})), qe = f(() => p.value.map((
|
|
2555
|
+
})), qe = f(() => p.value.map((n, w) => ({
|
|
2556
2556
|
index: w,
|
|
2557
|
-
opt:
|
|
2558
|
-
html: ve.value(
|
|
2557
|
+
opt: n,
|
|
2558
|
+
html: ve.value(n),
|
|
2559
2559
|
selected: !0,
|
|
2560
|
-
removeAtIndex:
|
|
2560
|
+
removeAtIndex: vo,
|
|
2561
2561
|
toggleOption: Ve,
|
|
2562
2562
|
tabindex: me.value
|
|
2563
|
-
}))),
|
|
2563
|
+
}))), it = f(() => {
|
|
2564
2564
|
if (A.value === 0)
|
|
2565
2565
|
return [];
|
|
2566
|
-
const { from:
|
|
2567
|
-
return e.options.slice(
|
|
2568
|
-
const j = Fe.value(x) === !0, W = Et(x) === !0, J =
|
|
2566
|
+
const { from: n, to: w } = ne.value;
|
|
2567
|
+
return e.options.slice(n, w).map((x, $) => {
|
|
2568
|
+
const j = Fe.value(x) === !0, W = Et(x) === !0, J = n + $, Y = {
|
|
2569
2569
|
clickable: !0,
|
|
2570
2570
|
active: W,
|
|
2571
2571
|
activeClass: Ke.value,
|
|
@@ -2583,12 +2583,12 @@ const bu = be({
|
|
|
2583
2583
|
}
|
|
2584
2584
|
};
|
|
2585
2585
|
return j !== !0 && (d.value === J && (Y.focused = !0), a.platform.is.desktop === !0 && (Y.onMousemove = () => {
|
|
2586
|
-
|
|
2586
|
+
i.value === !0 && Me(J);
|
|
2587
2587
|
})), {
|
|
2588
2588
|
index: J,
|
|
2589
2589
|
opt: x,
|
|
2590
2590
|
html: ve.value(x),
|
|
2591
|
-
label:
|
|
2591
|
+
label: ie.value(x),
|
|
2592
2592
|
selected: Y.active,
|
|
2593
2593
|
focused: Y.focused,
|
|
2594
2594
|
toggleOption: Ve,
|
|
@@ -2598,46 +2598,46 @@ const bu = be({
|
|
|
2598
2598
|
});
|
|
2599
2599
|
}), Ne = f(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : a.iconSet.arrow.dropdown), Vt = f(
|
|
2600
2600
|
() => e.optionsCover === !1 && e.outlined !== !0 && e.standout !== !0 && e.borderless !== !0 && e.rounded !== !0
|
|
2601
|
-
), Ke = f(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), he = f(() => Pt(e.optionValue, "value")),
|
|
2602
|
-
const
|
|
2603
|
-
onInput:
|
|
2601
|
+
), Ke = f(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), he = f(() => Pt(e.optionValue, "value")), ie = f(() => Pt(e.optionLabel, "label")), Fe = f(() => Pt(e.optionDisable, "disable")), ut = f(() => p.value.map(he.value)), fo = f(() => {
|
|
2602
|
+
const n = {
|
|
2603
|
+
onInput: ol,
|
|
2604
2604
|
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
|
2605
2605
|
// switching focus before confirming composition choice
|
|
2606
2606
|
// this also fixes the issue where some browsers e.g. iOS Chrome
|
|
2607
2607
|
// fires "change" instead of "input" on autocomplete.
|
|
2608
|
-
onChange:
|
|
2608
|
+
onChange: oe,
|
|
2609
2609
|
onKeydown: el,
|
|
2610
2610
|
onKeyup: Zt,
|
|
2611
2611
|
onKeypress: Jt,
|
|
2612
2612
|
onFocus: Yt,
|
|
2613
2613
|
onClick(w) {
|
|
2614
|
-
|
|
2614
|
+
v === !0 && De(w);
|
|
2615
2615
|
}
|
|
2616
2616
|
};
|
|
2617
|
-
return
|
|
2617
|
+
return n.onCompositionstart = n.onCompositionupdate = n.onCompositionend = oe, n;
|
|
2618
2618
|
});
|
|
2619
|
-
K(p, (
|
|
2620
|
-
r =
|
|
2621
|
-
}, { immediate: !0 }), K(() => e.fillInput, He), K(
|
|
2622
|
-
function Ut(
|
|
2623
|
-
return e.emitValue === !0 ? he.value(
|
|
2624
|
-
}
|
|
2625
|
-
function _t(
|
|
2626
|
-
if (
|
|
2619
|
+
K(p, (n) => {
|
|
2620
|
+
r = n, e.useInput === !0 && e.fillInput === !0 && e.multiple !== !0 && s.innerLoading.value !== !0 && (u.value !== !0 && i.value !== !0 || I.value !== !0) && (_ !== !0 && He(), (u.value === !0 || i.value === !0) && Le(""));
|
|
2621
|
+
}, { immediate: !0 }), K(() => e.fillInput, He), K(i, Bt), K(A, _o);
|
|
2622
|
+
function Ut(n) {
|
|
2623
|
+
return e.emitValue === !0 ? he.value(n) : n;
|
|
2624
|
+
}
|
|
2625
|
+
function _t(n) {
|
|
2626
|
+
if (n !== -1 && n < p.value.length)
|
|
2627
2627
|
if (e.multiple === !0) {
|
|
2628
2628
|
const w = e.modelValue.slice();
|
|
2629
|
-
l("remove", { index:
|
|
2629
|
+
l("remove", { index: n, value: w.splice(n, 1)[0] }), l("update:modelValue", w);
|
|
2630
2630
|
} else
|
|
2631
2631
|
l("update:modelValue", null);
|
|
2632
2632
|
}
|
|
2633
|
-
function
|
|
2634
|
-
_t(
|
|
2633
|
+
function vo(n) {
|
|
2634
|
+
_t(n), s.focus();
|
|
2635
2635
|
}
|
|
2636
|
-
function Xt(
|
|
2637
|
-
const x = Ut(
|
|
2636
|
+
function Xt(n, w) {
|
|
2637
|
+
const x = Ut(n);
|
|
2638
2638
|
if (e.multiple !== !0) {
|
|
2639
2639
|
e.fillInput === !0 && Qe(
|
|
2640
|
-
|
|
2640
|
+
ie.value(n),
|
|
2641
2641
|
!0,
|
|
2642
2642
|
!0
|
|
2643
2643
|
), l("update:modelValue", x);
|
|
@@ -2647,140 +2647,140 @@ const bu = be({
|
|
|
2647
2647
|
l("add", { index: 0, value: x }), l("update:modelValue", e.multiple === !0 ? [x] : x);
|
|
2648
2648
|
return;
|
|
2649
2649
|
}
|
|
2650
|
-
if (w === !0 && Et(
|
|
2650
|
+
if (w === !0 && Et(n) === !0 || e.maxValues !== void 0 && e.modelValue.length >= e.maxValues)
|
|
2651
2651
|
return;
|
|
2652
2652
|
const $ = e.modelValue.slice();
|
|
2653
2653
|
l("add", { index: $.length, value: x }), $.push(x), l("update:modelValue", $);
|
|
2654
2654
|
}
|
|
2655
|
-
function Ve(
|
|
2656
|
-
if (s.editable.value !== !0 ||
|
|
2655
|
+
function Ve(n, w) {
|
|
2656
|
+
if (s.editable.value !== !0 || n === void 0 || Fe.value(n) === !0)
|
|
2657
2657
|
return;
|
|
2658
|
-
const x = he.value(
|
|
2658
|
+
const x = he.value(n);
|
|
2659
2659
|
if (e.multiple !== !0) {
|
|
2660
2660
|
w !== !0 && (Qe(
|
|
2661
|
-
e.fillInput === !0 ?
|
|
2661
|
+
e.fillInput === !0 ? ie.value(n) : "",
|
|
2662
2662
|
!0,
|
|
2663
2663
|
!0
|
|
2664
|
-
), _e()), B.value !== null && B.value.focus(), (p.value.length === 0 || Ce(he.value(p.value[0]), x) !== !0) && l("update:modelValue", e.emitValue === !0 ? x :
|
|
2664
|
+
), _e()), B.value !== null && B.value.focus(), (p.value.length === 0 || Ce(he.value(p.value[0]), x) !== !0) && l("update:modelValue", e.emitValue === !0 ? x : n);
|
|
2665
2665
|
return;
|
|
2666
2666
|
}
|
|
2667
|
-
if ((
|
|
2668
|
-
const W = e.emitValue === !0 ? x :
|
|
2667
|
+
if ((v !== !0 || g.value === !0) && s.focus(), Yt(), p.value.length === 0) {
|
|
2668
|
+
const W = e.emitValue === !0 ? x : n;
|
|
2669
2669
|
l("add", { index: 0, value: W }), l("update:modelValue", e.multiple === !0 ? [W] : W);
|
|
2670
2670
|
return;
|
|
2671
2671
|
}
|
|
2672
|
-
const $ = e.modelValue.slice(), j =
|
|
2672
|
+
const $ = e.modelValue.slice(), j = ut.value.findIndex((W) => Ce(W, x));
|
|
2673
2673
|
if (j !== -1)
|
|
2674
2674
|
l("remove", { index: j, value: $.splice(j, 1)[0] });
|
|
2675
2675
|
else {
|
|
2676
2676
|
if (e.maxValues !== void 0 && $.length >= e.maxValues)
|
|
2677
2677
|
return;
|
|
2678
|
-
const W = e.emitValue === !0 ? x :
|
|
2678
|
+
const W = e.emitValue === !0 ? x : n;
|
|
2679
2679
|
l("add", { index: $.length, value: W }), $.push(W);
|
|
2680
2680
|
}
|
|
2681
2681
|
l("update:modelValue", $);
|
|
2682
2682
|
}
|
|
2683
|
-
function Me(
|
|
2683
|
+
function Me(n) {
|
|
2684
2684
|
if (a.platform.is.desktop !== !0) return;
|
|
2685
|
-
const w =
|
|
2685
|
+
const w = n !== -1 && n < A.value ? n : -1;
|
|
2686
2686
|
d.value !== w && (d.value = w);
|
|
2687
2687
|
}
|
|
2688
|
-
function at(
|
|
2689
|
-
if (
|
|
2688
|
+
function at(n = 1, w) {
|
|
2689
|
+
if (i.value === !0) {
|
|
2690
2690
|
let x = d.value;
|
|
2691
2691
|
do
|
|
2692
2692
|
x = Fl(
|
|
2693
|
-
x +
|
|
2693
|
+
x + n,
|
|
2694
2694
|
-1,
|
|
2695
2695
|
A.value - 1
|
|
2696
2696
|
);
|
|
2697
2697
|
while (x !== -1 && x !== d.value && Fe.value(e.options[x]) === !0);
|
|
2698
2698
|
d.value !== x && (Me(x), M(x), w !== !0 && e.useInput === !0 && e.fillInput === !0 && rt(
|
|
2699
|
-
x >= 0 ?
|
|
2699
|
+
x >= 0 ? ie.value(e.options[x]) : P,
|
|
2700
2700
|
!0
|
|
2701
2701
|
));
|
|
2702
2702
|
}
|
|
2703
2703
|
}
|
|
2704
|
-
function
|
|
2705
|
-
const x = ($) => Ce(he.value($),
|
|
2706
|
-
return e.options.find(x) || w.find(x) ||
|
|
2704
|
+
function mo(n, w) {
|
|
2705
|
+
const x = ($) => Ce(he.value($), n);
|
|
2706
|
+
return e.options.find(x) || w.find(x) || n;
|
|
2707
2707
|
}
|
|
2708
|
-
function Et(
|
|
2709
|
-
const w = he.value(
|
|
2710
|
-
return
|
|
2708
|
+
function Et(n) {
|
|
2709
|
+
const w = he.value(n);
|
|
2710
|
+
return ut.value.find((x) => Ce(x, w)) !== void 0;
|
|
2711
2711
|
}
|
|
2712
|
-
function Yt(
|
|
2713
|
-
e.useInput === !0 && B.value !== null && (
|
|
2712
|
+
function Yt(n) {
|
|
2713
|
+
e.useInput === !0 && B.value !== null && (n === void 0 || B.value === n.target && n.target.value === b.value) && B.value.select();
|
|
2714
2714
|
}
|
|
2715
|
-
function Gt(
|
|
2716
|
-
qt(
|
|
2715
|
+
function Gt(n) {
|
|
2716
|
+
qt(n, 27) === !0 && i.value === !0 && (De(n), _e(), He()), l("keyup", n);
|
|
2717
2717
|
}
|
|
2718
|
-
function Zt(
|
|
2719
|
-
const { value: w } =
|
|
2720
|
-
if (
|
|
2721
|
-
Gt(
|
|
2718
|
+
function Zt(n) {
|
|
2719
|
+
const { value: w } = n.target;
|
|
2720
|
+
if (n.keyCode !== void 0) {
|
|
2721
|
+
Gt(n);
|
|
2722
2722
|
return;
|
|
2723
2723
|
}
|
|
2724
|
-
if (
|
|
2724
|
+
if (n.target.value = "", y !== null && (clearTimeout(y), y = null), C !== null && (clearTimeout(C), C = null), He(), typeof w == "string" && w.length !== 0) {
|
|
2725
2725
|
const x = w.toLocaleLowerCase(), $ = (W) => {
|
|
2726
2726
|
const J = e.options.find((Y) => String(W.value(Y)).toLocaleLowerCase() === x);
|
|
2727
2727
|
return J === void 0 ? !1 : (p.value.indexOf(J) === -1 ? Ve(J) : _e(), !0);
|
|
2728
2728
|
}, j = (W) => {
|
|
2729
|
-
$(he) !== !0 && W !== !0 && $(
|
|
2729
|
+
$(he) !== !0 && W !== !0 && $(ie) !== !0 && Le(w, !0, () => j(!0));
|
|
2730
2730
|
};
|
|
2731
2731
|
j();
|
|
2732
2732
|
} else
|
|
2733
|
-
s.clearValue(
|
|
2733
|
+
s.clearValue(n);
|
|
2734
2734
|
}
|
|
2735
|
-
function Jt(
|
|
2736
|
-
l("keypress",
|
|
2735
|
+
function Jt(n) {
|
|
2736
|
+
l("keypress", n);
|
|
2737
2737
|
}
|
|
2738
|
-
function el(
|
|
2739
|
-
if (l("keydown",
|
|
2738
|
+
function el(n) {
|
|
2739
|
+
if (l("keydown", n), Xo(n) === !0)
|
|
2740
2740
|
return;
|
|
2741
|
-
const w =
|
|
2742
|
-
if (
|
|
2743
|
-
pe(
|
|
2741
|
+
const w = m.value.length !== 0 && (e.newValueMode !== void 0 || e.onNewValue !== void 0), x = n.shiftKey !== !0 && e.disableTabSelection !== !0 && e.multiple !== !0 && (d.value !== -1 || w === !0);
|
|
2742
|
+
if (n.keyCode === 27) {
|
|
2743
|
+
pe(n);
|
|
2744
2744
|
return;
|
|
2745
2745
|
}
|
|
2746
|
-
if (
|
|
2746
|
+
if (n.keyCode === 9 && x === !1) {
|
|
2747
2747
|
Oe();
|
|
2748
2748
|
return;
|
|
2749
2749
|
}
|
|
2750
|
-
if (
|
|
2751
|
-
if (
|
|
2752
|
-
ae(
|
|
2750
|
+
if (n.target === void 0 || n.target.id !== s.targetUid.value || s.editable.value !== !0) return;
|
|
2751
|
+
if (n.keyCode === 40 && s.innerLoading.value !== !0 && i.value === !1) {
|
|
2752
|
+
ae(n), Ie();
|
|
2753
2753
|
return;
|
|
2754
2754
|
}
|
|
2755
|
-
if (
|
|
2755
|
+
if (n.keyCode === 8 && (e.useChips === !0 || e.clearable === !0) && e.hideSelected !== !0 && m.value.length === 0) {
|
|
2756
2756
|
e.multiple === !0 && Array.isArray(e.modelValue) === !0 ? _t(e.modelValue.length - 1) : e.multiple !== !0 && e.modelValue !== null && l("update:modelValue", null);
|
|
2757
2757
|
return;
|
|
2758
2758
|
}
|
|
2759
|
-
(
|
|
2759
|
+
(n.keyCode === 35 || n.keyCode === 36) && (typeof m.value != "string" || m.value.length === 0) && (ae(n), d.value = -1, at(n.keyCode === 36 ? 1 : -1, e.multiple)), (n.keyCode === 33 || n.keyCode === 34) && te.value !== void 0 && (ae(n), d.value = Math.max(
|
|
2760
2760
|
-1,
|
|
2761
2761
|
Math.min(
|
|
2762
2762
|
A.value,
|
|
2763
|
-
d.value + (
|
|
2763
|
+
d.value + (n.keyCode === 33 ? -1 : 1) * te.value.view
|
|
2764
2764
|
)
|
|
2765
|
-
), at(
|
|
2765
|
+
), at(n.keyCode === 33 ? 1 : -1, e.multiple)), (n.keyCode === 38 || n.keyCode === 40) && (ae(n), at(n.keyCode === 38 ? -1 : 1, e.multiple));
|
|
2766
2766
|
const $ = A.value;
|
|
2767
|
-
if ((q === void 0 || R < Date.now()) && (q = ""), $ > 0 && e.useInput !== !0 &&
|
|
2768
|
-
|
|
2769
|
-
const j =
|
|
2770
|
-
R = Date.now() + 1500, W === !1 && (ae(
|
|
2771
|
-
const J = new RegExp("^" + q.split("").map((At) =>
|
|
2767
|
+
if ((q === void 0 || R < Date.now()) && (q = ""), $ > 0 && e.useInput !== !0 && n.key !== void 0 && n.key.length === 1 && n.altKey === !1 && n.ctrlKey === !1 && n.metaKey === !1 && (n.keyCode !== 32 || q.length !== 0)) {
|
|
2768
|
+
i.value !== !0 && Ie(n);
|
|
2769
|
+
const j = n.key.toLocaleLowerCase(), W = q.length === 1 && q[0] === j;
|
|
2770
|
+
R = Date.now() + 1500, W === !1 && (ae(n), q += j);
|
|
2771
|
+
const J = new RegExp("^" + q.split("").map((At) => gi.indexOf(At) !== -1 ? "\\" + At : At).join(".*"), "i");
|
|
2772
2772
|
let Y = d.value;
|
|
2773
|
-
if (W === !0 || Y < 0 || J.test(
|
|
2773
|
+
if (W === !0 || Y < 0 || J.test(ie.value(e.options[Y])) !== !0)
|
|
2774
2774
|
do
|
|
2775
2775
|
Y = Fl(Y + 1, -1, $ - 1);
|
|
2776
|
-
while (Y !== d.value && (Fe.value(e.options[Y]) === !0 || J.test(
|
|
2777
|
-
d.value !== Y &&
|
|
2778
|
-
Me(Y), M(Y), Y >= 0 && e.useInput === !0 && e.fillInput === !0 && rt(
|
|
2776
|
+
while (Y !== d.value && (Fe.value(e.options[Y]) === !0 || J.test(ie.value(e.options[Y])) !== !0));
|
|
2777
|
+
d.value !== Y && ue(() => {
|
|
2778
|
+
Me(Y), M(Y), Y >= 0 && e.useInput === !0 && e.fillInput === !0 && rt(ie.value(e.options[Y]), !0);
|
|
2779
2779
|
});
|
|
2780
2780
|
return;
|
|
2781
2781
|
}
|
|
2782
|
-
if (!(
|
|
2783
|
-
if (
|
|
2782
|
+
if (!(n.keyCode !== 13 && (n.keyCode !== 32 || e.useInput === !0 || q !== "") && (n.keyCode !== 9 || x === !1))) {
|
|
2783
|
+
if (n.keyCode !== 9 && ae(n), d.value !== -1 && d.value < $) {
|
|
2784
2784
|
Ve(e.options[d.value]);
|
|
2785
2785
|
return;
|
|
2786
2786
|
}
|
|
@@ -2795,31 +2795,31 @@ const bu = be({
|
|
|
2795
2795
|
return;
|
|
2796
2796
|
(J === "toggle" ? Ve : Xt)(W, J === "add-unique"), e.multiple !== !0 && (B.value !== null && B.value.focus(), _e());
|
|
2797
2797
|
};
|
|
2798
|
-
if (e.onNewValue !== void 0 ? l("newValue",
|
|
2798
|
+
if (e.onNewValue !== void 0 ? l("newValue", m.value, j) : j(m.value), e.multiple !== !0)
|
|
2799
2799
|
return;
|
|
2800
2800
|
}
|
|
2801
|
-
|
|
2801
|
+
i.value === !0 ? Oe() : s.innerLoading.value !== !0 && Ie();
|
|
2802
2802
|
}
|
|
2803
2803
|
}
|
|
2804
2804
|
function tl() {
|
|
2805
|
-
return
|
|
2805
|
+
return v === !0 ? Q.value : L.value !== null && L.value.contentEl !== null ? L.value.contentEl : void 0;
|
|
2806
2806
|
}
|
|
2807
|
-
function
|
|
2807
|
+
function ho() {
|
|
2808
2808
|
return tl();
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2811
|
-
return e.hideSelected === !0 ? [] : t["selected-item"] !== void 0 ? qe.value.map((
|
|
2810
|
+
function go() {
|
|
2811
|
+
return e.hideSelected === !0 ? [] : t["selected-item"] !== void 0 ? qe.value.map((n) => t["selected-item"](n)).slice() : t.selected !== void 0 ? [].concat(t.selected()) : e.useChips === !0 ? qe.value.map((n, w) => h(qn, {
|
|
2812
2812
|
key: "option-" + w,
|
|
2813
|
-
removable: s.editable.value === !0 && Fe.value(
|
|
2813
|
+
removable: s.editable.value === !0 && Fe.value(n.opt) !== !0,
|
|
2814
2814
|
dense: !0,
|
|
2815
2815
|
textColor: e.color,
|
|
2816
2816
|
tabindex: me.value,
|
|
2817
2817
|
onRemove() {
|
|
2818
|
-
|
|
2818
|
+
n.removeAtIndex(w);
|
|
2819
2819
|
}
|
|
2820
2820
|
}, () => h("span", {
|
|
2821
2821
|
class: "ellipsis",
|
|
2822
|
-
[
|
|
2822
|
+
[n.html === !0 ? "innerHTML" : "textContent"]: ie.value(n.opt)
|
|
2823
2823
|
}))) : [
|
|
2824
2824
|
h("span", {
|
|
2825
2825
|
[ze.value === !0 ? "innerHTML" : "textContent"]: Z.value
|
|
@@ -2828,8 +2828,8 @@ const bu = be({
|
|
|
2828
2828
|
}
|
|
2829
2829
|
function ll() {
|
|
2830
2830
|
if (N.value === !0)
|
|
2831
|
-
return t["no-option"] !== void 0 ? t["no-option"]({ inputValue:
|
|
2832
|
-
const
|
|
2831
|
+
return t["no-option"] !== void 0 ? t["no-option"]({ inputValue: m.value }) : void 0;
|
|
2832
|
+
const n = t.option !== void 0 ? t.option : (x) => h(Ql, {
|
|
2833
2833
|
key: x.index,
|
|
2834
2834
|
...x.itemProps
|
|
2835
2835
|
}, () => h(
|
|
@@ -2841,72 +2841,72 @@ const bu = be({
|
|
|
2841
2841
|
})
|
|
2842
2842
|
)
|
|
2843
2843
|
));
|
|
2844
|
-
let w = re("div",
|
|
2844
|
+
let w = re("div", it.value.map(n));
|
|
2845
2845
|
return t["before-options"] !== void 0 && (w = t["before-options"]().concat(w)), Hl(t["after-options"], w);
|
|
2846
2846
|
}
|
|
2847
|
-
function
|
|
2848
|
-
const x = w === !0 ? { ...
|
|
2847
|
+
function po(n, w) {
|
|
2848
|
+
const x = w === !0 ? { ...nt.value, ...s.splitAttrs.attributes.value } : void 0, $ = {
|
|
2849
2849
|
ref: w === !0 ? B : void 0,
|
|
2850
2850
|
key: "i_t",
|
|
2851
2851
|
class: F.value,
|
|
2852
2852
|
style: e.inputStyle,
|
|
2853
|
-
value:
|
|
2853
|
+
value: m.value !== void 0 ? m.value : "",
|
|
2854
2854
|
// required for Android in order to show ENTER key when in form
|
|
2855
2855
|
type: "search",
|
|
2856
2856
|
...x,
|
|
2857
2857
|
id: w === !0 ? s.targetUid.value : void 0,
|
|
2858
2858
|
maxlength: e.maxlength,
|
|
2859
2859
|
autocomplete: e.autocomplete,
|
|
2860
|
-
"data-autofocus":
|
|
2860
|
+
"data-autofocus": n === !0 || e.autofocus === !0 || void 0,
|
|
2861
2861
|
disabled: e.disable === !0,
|
|
2862
2862
|
readonly: e.readonly === !0,
|
|
2863
|
-
...
|
|
2863
|
+
...fo.value
|
|
2864
2864
|
};
|
|
2865
|
-
return
|
|
2865
|
+
return n !== !0 && v === !0 && (Array.isArray($.class) === !0 ? $.class = [...$.class, "no-pointer-events"] : $.class += " no-pointer-events"), h("input", $);
|
|
2866
2866
|
}
|
|
2867
|
-
function
|
|
2868
|
-
y !== null && (clearTimeout(y), y = null), C !== null && (clearTimeout(C), C = null), !(
|
|
2869
|
-
y = null, Le(
|
|
2867
|
+
function ol(n) {
|
|
2868
|
+
y !== null && (clearTimeout(y), y = null), C !== null && (clearTimeout(C), C = null), !(n && n.target && n.target.qComposing === !0) && (rt(n.target.value || ""), _ = !0, P = m.value, s.focused.value !== !0 && (v !== !0 || g.value === !0) && s.focus(), e.onFilter !== void 0 && (y = setTimeout(() => {
|
|
2869
|
+
y = null, Le(m.value);
|
|
2870
2870
|
}, e.inputDebounce)));
|
|
2871
2871
|
}
|
|
2872
|
-
function rt(
|
|
2873
|
-
|
|
2874
|
-
C = null, l("inputValue",
|
|
2872
|
+
function rt(n, w) {
|
|
2873
|
+
m.value !== n && (m.value = n, w === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? l("inputValue", n) : C = setTimeout(() => {
|
|
2874
|
+
C = null, l("inputValue", n);
|
|
2875
2875
|
}, e.inputDebounce));
|
|
2876
2876
|
}
|
|
2877
|
-
function Qe(
|
|
2878
|
-
_ = x !== !0, e.useInput === !0 && (rt(
|
|
2877
|
+
function Qe(n, w, x) {
|
|
2878
|
+
_ = x !== !0, e.useInput === !0 && (rt(n, !0), (w === !0 || x !== !0) && (P = n), w !== !0 && Le(n));
|
|
2879
2879
|
}
|
|
2880
|
-
function Le(
|
|
2880
|
+
function Le(n, w, x) {
|
|
2881
2881
|
if (e.onFilter === void 0 || w !== !0 && s.focused.value !== !0)
|
|
2882
2882
|
return;
|
|
2883
|
-
s.innerLoading.value === !0 ? l("filterAbort") : (s.innerLoading.value = !0, c.value = !0),
|
|
2883
|
+
s.innerLoading.value === !0 ? l("filterAbort") : (s.innerLoading.value = !0, c.value = !0), n !== "" && e.multiple !== !0 && p.value.length !== 0 && _ !== !0 && n === ie.value(p.value[0]) && (n = "");
|
|
2884
2884
|
const $ = setTimeout(() => {
|
|
2885
|
-
|
|
2885
|
+
i.value === !0 && (i.value = !1);
|
|
2886
2886
|
}, 10);
|
|
2887
2887
|
S !== null && clearTimeout(S), S = $, l(
|
|
2888
2888
|
"filter",
|
|
2889
|
-
|
|
2889
|
+
n,
|
|
2890
2890
|
(j, W) => {
|
|
2891
|
-
(w === !0 || s.focused.value === !0) && S === $ && (clearTimeout(S), typeof j == "function" && j(), c.value = !1,
|
|
2892
|
-
s.innerLoading.value = !1, s.editable.value === !0 && (w === !0 ?
|
|
2893
|
-
W(
|
|
2894
|
-
}), typeof x == "function" &&
|
|
2895
|
-
x(
|
|
2891
|
+
(w === !0 || s.focused.value === !0) && S === $ && (clearTimeout(S), typeof j == "function" && j(), c.value = !1, ue(() => {
|
|
2892
|
+
s.innerLoading.value = !1, s.editable.value === !0 && (w === !0 ? i.value === !0 && _e() : i.value === !0 ? Bt(!0) : i.value = !0), typeof W == "function" && ue(() => {
|
|
2893
|
+
W(o);
|
|
2894
|
+
}), typeof x == "function" && ue(() => {
|
|
2895
|
+
x(o);
|
|
2896
2896
|
});
|
|
2897
2897
|
}));
|
|
2898
2898
|
},
|
|
2899
2899
|
() => {
|
|
2900
|
-
s.focused.value === !0 && S === $ && (clearTimeout(S), s.innerLoading.value = !1, c.value = !1),
|
|
2900
|
+
s.focused.value === !0 && S === $ && (clearTimeout(S), s.innerLoading.value = !1, c.value = !1), i.value === !0 && (i.value = !1);
|
|
2901
2901
|
}
|
|
2902
2902
|
);
|
|
2903
2903
|
}
|
|
2904
|
-
function
|
|
2905
|
-
return h(
|
|
2904
|
+
function bo() {
|
|
2905
|
+
return h(Jn, {
|
|
2906
2906
|
ref: L,
|
|
2907
2907
|
class: z.value,
|
|
2908
2908
|
style: e.popupContentStyle,
|
|
2909
|
-
modelValue:
|
|
2909
|
+
modelValue: i.value,
|
|
2910
2910
|
fit: e.menuShrink !== !0,
|
|
2911
2911
|
cover: e.optionsCover === !0 && N.value !== !0 && e.useInput !== !0,
|
|
2912
2912
|
anchor: e.menuAnchor,
|
|
@@ -2924,28 +2924,28 @@ const bu = be({
|
|
|
2924
2924
|
separateClosePopup: !0,
|
|
2925
2925
|
...ke.value,
|
|
2926
2926
|
onScrollPassive: k,
|
|
2927
|
-
onBeforeShow:
|
|
2928
|
-
onBeforeHide:
|
|
2929
|
-
onShow:
|
|
2927
|
+
onBeforeShow: il,
|
|
2928
|
+
onBeforeHide: yo,
|
|
2929
|
+
onShow: So
|
|
2930
2930
|
}, ll);
|
|
2931
2931
|
}
|
|
2932
|
-
function
|
|
2933
|
-
|
|
2932
|
+
function yo(n) {
|
|
2933
|
+
ul(n), Oe();
|
|
2934
2934
|
}
|
|
2935
|
-
function
|
|
2935
|
+
function So() {
|
|
2936
2936
|
se();
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2939
|
-
De(
|
|
2938
|
+
function wo(n) {
|
|
2939
|
+
De(n), B.value !== null && B.value.focus(), g.value = !0, window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);
|
|
2940
2940
|
}
|
|
2941
|
-
function
|
|
2942
|
-
De(
|
|
2941
|
+
function xo(n) {
|
|
2942
|
+
De(n), ue(() => {
|
|
2943
2943
|
g.value = !1;
|
|
2944
2944
|
});
|
|
2945
2945
|
}
|
|
2946
|
-
function
|
|
2947
|
-
const
|
|
2948
|
-
h(
|
|
2946
|
+
function Co() {
|
|
2947
|
+
const n = [
|
|
2948
|
+
h(Cn, {
|
|
2949
2949
|
class: `col-auto ${s.fieldClass.value}`,
|
|
2950
2950
|
...O.value,
|
|
2951
2951
|
for: s.targetUid.value,
|
|
@@ -2954,10 +2954,10 @@ const bu = be({
|
|
|
2954
2954
|
loading: c.value,
|
|
2955
2955
|
itemAligned: !1,
|
|
2956
2956
|
filled: !0,
|
|
2957
|
-
stackLabel:
|
|
2957
|
+
stackLabel: m.value.length !== 0,
|
|
2958
2958
|
...s.splitAttrs.listeners.value,
|
|
2959
|
-
onFocus:
|
|
2960
|
-
onBlur:
|
|
2959
|
+
onFocus: wo,
|
|
2960
|
+
onBlur: xo
|
|
2961
2961
|
}, {
|
|
2962
2962
|
...t,
|
|
2963
2963
|
rawControl: () => s.getControl(!0),
|
|
@@ -2965,7 +2965,7 @@ const bu = be({
|
|
|
2965
2965
|
after: void 0
|
|
2966
2966
|
})
|
|
2967
2967
|
];
|
|
2968
|
-
return
|
|
2968
|
+
return i.value === !0 && n.push(
|
|
2969
2969
|
h("div", {
|
|
2970
2970
|
ref: Q,
|
|
2971
2971
|
class: z.value + " scroll",
|
|
@@ -2974,55 +2974,55 @@ const bu = be({
|
|
|
2974
2974
|
onClick: pe,
|
|
2975
2975
|
onScrollPassive: k
|
|
2976
2976
|
}, ll())
|
|
2977
|
-
), h(
|
|
2977
|
+
), h(ui, {
|
|
2978
2978
|
ref: H,
|
|
2979
|
-
modelValue:
|
|
2979
|
+
modelValue: u.value,
|
|
2980
2980
|
position: e.useInput === !0 ? "top" : void 0,
|
|
2981
2981
|
transitionShow: E,
|
|
2982
2982
|
transitionHide: e.transitionHide,
|
|
2983
2983
|
transitionDuration: e.transitionDuration,
|
|
2984
2984
|
noRouteDismiss: e.popupNoRouteDismiss,
|
|
2985
|
-
onBeforeShow:
|
|
2986
|
-
onBeforeHide:
|
|
2987
|
-
onHide:
|
|
2988
|
-
onShow:
|
|
2985
|
+
onBeforeShow: il,
|
|
2986
|
+
onBeforeHide: ko,
|
|
2987
|
+
onHide: qo,
|
|
2988
|
+
onShow: Vo
|
|
2989
2989
|
}, () => h("div", {
|
|
2990
2990
|
class: "q-select__dialog" + (V.value === !0 ? " q-select__dialog--dark q-dark" : "") + (g.value === !0 ? " q-select__dialog--focused" : "")
|
|
2991
|
-
},
|
|
2991
|
+
}, n));
|
|
2992
2992
|
}
|
|
2993
|
-
function
|
|
2994
|
-
|
|
2993
|
+
function ko(n) {
|
|
2994
|
+
ul(n), H.value !== null && H.value.__updateRefocusTarget(
|
|
2995
2995
|
s.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")
|
|
2996
2996
|
), s.focused.value = !1;
|
|
2997
2997
|
}
|
|
2998
|
-
function
|
|
2999
|
-
_e(), s.focused.value === !1 && l("blur",
|
|
2998
|
+
function qo(n) {
|
|
2999
|
+
_e(), s.focused.value === !1 && l("blur", n), He();
|
|
3000
3000
|
}
|
|
3001
|
-
function
|
|
3002
|
-
const
|
|
3003
|
-
(
|
|
3001
|
+
function Vo() {
|
|
3002
|
+
const n = document.activeElement;
|
|
3003
|
+
(n === null || n.id !== s.targetUid.value) && B.value !== null && B.value !== n && B.value.focus(), se();
|
|
3004
3004
|
}
|
|
3005
3005
|
function Oe() {
|
|
3006
|
-
|
|
3006
|
+
u.value !== !0 && (d.value = -1, i.value === !0 && (i.value = !1), s.focused.value === !1 && (S !== null && (clearTimeout(S), S = null), s.innerLoading.value === !0 && (l("filterAbort"), s.innerLoading.value = !1, c.value = !1)));
|
|
3007
3007
|
}
|
|
3008
|
-
function Ie(
|
|
3009
|
-
s.editable.value === !0 && (
|
|
3008
|
+
function Ie(n) {
|
|
3009
|
+
s.editable.value === !0 && (v === !0 ? (s.onControlFocusin(n), u.value = !0, ue(() => {
|
|
3010
3010
|
s.focus();
|
|
3011
|
-
})) : s.focus(), e.onFilter !== void 0 ? Le(
|
|
3011
|
+
})) : s.focus(), e.onFilter !== void 0 ? Le(m.value) : (N.value !== !0 || t["no-option"] !== void 0) && (i.value = !0));
|
|
3012
3012
|
}
|
|
3013
3013
|
function _e() {
|
|
3014
|
-
|
|
3014
|
+
u.value = !1, Oe();
|
|
3015
3015
|
}
|
|
3016
3016
|
function He() {
|
|
3017
3017
|
e.useInput === !0 && Qe(
|
|
3018
|
-
e.multiple !== !0 && e.fillInput === !0 && p.value.length !== 0 &&
|
|
3018
|
+
e.multiple !== !0 && e.fillInput === !0 && p.value.length !== 0 && ie.value(p.value[0]) || "",
|
|
3019
3019
|
!0,
|
|
3020
3020
|
!0
|
|
3021
3021
|
);
|
|
3022
3022
|
}
|
|
3023
|
-
function Bt(
|
|
3023
|
+
function Bt(n) {
|
|
3024
3024
|
let w = -1;
|
|
3025
|
-
if (
|
|
3025
|
+
if (n === !0) {
|
|
3026
3026
|
if (p.value.length !== 0) {
|
|
3027
3027
|
const x = he.value(p.value[0]);
|
|
3028
3028
|
w = e.options.findIndex(($) => Ce(he.value($), x));
|
|
@@ -3031,26 +3031,26 @@ const bu = be({
|
|
|
3031
3031
|
}
|
|
3032
3032
|
Me(w);
|
|
3033
3033
|
}
|
|
3034
|
-
function
|
|
3035
|
-
|
|
3036
|
-
|
|
3034
|
+
function _o(n, w) {
|
|
3035
|
+
i.value === !0 && s.innerLoading.value === !1 && (X(-1, !0), ue(() => {
|
|
3036
|
+
i.value === !0 && s.innerLoading.value === !1 && (n > w ? X() : Bt(!0));
|
|
3037
3037
|
}));
|
|
3038
3038
|
}
|
|
3039
|
-
function
|
|
3040
|
-
|
|
3039
|
+
function nl() {
|
|
3040
|
+
u.value === !1 && L.value !== null && L.value.updatePosition();
|
|
3041
3041
|
}
|
|
3042
|
-
function
|
|
3043
|
-
|
|
3042
|
+
function il(n) {
|
|
3043
|
+
n !== void 0 && De(n), l("popupShow", n), s.hasPopupOpen = !0, s.onControlFocusin(n);
|
|
3044
3044
|
}
|
|
3045
|
-
function
|
|
3046
|
-
|
|
3045
|
+
function ul(n) {
|
|
3046
|
+
n !== void 0 && De(n), l("popupHide", n), s.hasPopupOpen = !1, s.onControlFocusout(n);
|
|
3047
3047
|
}
|
|
3048
3048
|
function al() {
|
|
3049
|
-
|
|
3049
|
+
v = a.platform.is.mobile !== !0 && e.behavior !== "dialog" ? !1 : e.behavior !== "menu" && (e.useInput === !0 ? t["no-option"] !== void 0 || e.onFilter !== void 0 || N.value === !1 : !0), E = a.platform.is.ios === !0 && v === !0 && e.useInput === !0 ? "fade" : e.transitionShow;
|
|
3050
3050
|
}
|
|
3051
|
-
return Ll(al),
|
|
3051
|
+
return Ll(al), Ro(nl), al(), ce(() => {
|
|
3052
3052
|
y !== null && clearTimeout(y), C !== null && clearTimeout(C);
|
|
3053
|
-
}), Object.assign(
|
|
3053
|
+
}), Object.assign(o, {
|
|
3054
3054
|
showPopup: Ie,
|
|
3055
3055
|
hidePopup: _e,
|
|
3056
3056
|
removeAtIndex: _t,
|
|
@@ -3060,13 +3060,13 @@ const bu = be({
|
|
|
3060
3060
|
setOptionIndex: Me,
|
|
3061
3061
|
moveOptionSelection: at,
|
|
3062
3062
|
filter: Le,
|
|
3063
|
-
updateMenuPosition:
|
|
3063
|
+
updateMenuPosition: nl,
|
|
3064
3064
|
updateInputValue: Qe,
|
|
3065
3065
|
isOptionSelected: Et,
|
|
3066
3066
|
getEmittingOptionValue: Ut,
|
|
3067
|
-
isOptionDisabled: (...
|
|
3068
|
-
getOptionValue: (...
|
|
3069
|
-
getOptionLabel: (...
|
|
3067
|
+
isOptionDisabled: (...n) => Fe.value.apply(null, n) === !0,
|
|
3068
|
+
getOptionValue: (...n) => he.value.apply(null, n),
|
|
3069
|
+
getOptionLabel: (...n) => ie.value.apply(null, n)
|
|
3070
3070
|
}), Object.assign(s, {
|
|
3071
3071
|
innerValue: p,
|
|
3072
3072
|
fieldClass: f(
|
|
@@ -3077,36 +3077,36 @@ const bu = be({
|
|
|
3077
3077
|
hasValue: I,
|
|
3078
3078
|
showPopup: Ie,
|
|
3079
3079
|
floatingLabel: f(
|
|
3080
|
-
() => e.hideSelected !== !0 && I.value === !0 || typeof
|
|
3080
|
+
() => e.hideSelected !== !0 && I.value === !0 || typeof m.value == "number" || m.value.length !== 0 || jt(e.displayValue)
|
|
3081
3081
|
),
|
|
3082
3082
|
getControlChild: () => {
|
|
3083
|
-
if (s.editable.value !== !1 && (
|
|
3084
|
-
return
|
|
3083
|
+
if (s.editable.value !== !1 && (u.value === !0 || N.value !== !0 || t["no-option"] !== void 0))
|
|
3084
|
+
return v === !0 ? Co() : bo();
|
|
3085
3085
|
s.hasPopupOpen === !0 && (s.hasPopupOpen = !1);
|
|
3086
3086
|
},
|
|
3087
3087
|
controlEvents: {
|
|
3088
|
-
onFocusin(
|
|
3089
|
-
s.onControlFocusin(
|
|
3088
|
+
onFocusin(n) {
|
|
3089
|
+
s.onControlFocusin(n);
|
|
3090
3090
|
},
|
|
3091
|
-
onFocusout(
|
|
3092
|
-
s.onControlFocusout(
|
|
3091
|
+
onFocusout(n) {
|
|
3092
|
+
s.onControlFocusout(n, () => {
|
|
3093
3093
|
He(), Oe();
|
|
3094
3094
|
});
|
|
3095
3095
|
},
|
|
3096
|
-
onClick(
|
|
3097
|
-
if (pe(
|
|
3096
|
+
onClick(n) {
|
|
3097
|
+
if (pe(n), v !== !0 && i.value === !0) {
|
|
3098
3098
|
Oe(), B.value !== null && B.value.focus();
|
|
3099
3099
|
return;
|
|
3100
3100
|
}
|
|
3101
|
-
Ie(
|
|
3101
|
+
Ie(n);
|
|
3102
3102
|
}
|
|
3103
3103
|
},
|
|
3104
|
-
getControl: (
|
|
3105
|
-
const w =
|
|
3104
|
+
getControl: (n) => {
|
|
3105
|
+
const w = go(), x = n === !0 || u.value !== !0 || v !== !0;
|
|
3106
3106
|
if (e.useInput === !0)
|
|
3107
|
-
w.push(
|
|
3107
|
+
w.push(po(n, x));
|
|
3108
3108
|
else if (s.editable.value === !0) {
|
|
3109
|
-
const j = x === !0 ?
|
|
3109
|
+
const j = x === !0 ? nt.value : void 0;
|
|
3110
3110
|
w.push(
|
|
3111
3111
|
h("input", {
|
|
3112
3112
|
ref: x === !0 ? B : void 0,
|
|
@@ -3115,7 +3115,7 @@ const bu = be({
|
|
|
3115
3115
|
id: x === !0 ? s.targetUid.value : void 0,
|
|
3116
3116
|
value: Z.value,
|
|
3117
3117
|
readonly: !0,
|
|
3118
|
-
"data-autofocus":
|
|
3118
|
+
"data-autofocus": n === !0 || e.autofocus === !0 || void 0,
|
|
3119
3119
|
...j,
|
|
3120
3120
|
onKeydown: el,
|
|
3121
3121
|
onKeyup: Gt,
|
|
@@ -3130,8 +3130,8 @@ const bu = be({
|
|
|
3130
3130
|
})
|
|
3131
3131
|
);
|
|
3132
3132
|
}
|
|
3133
|
-
if (G.value !== void 0 && e.disable !== !0 &&
|
|
3134
|
-
const j =
|
|
3133
|
+
if (G.value !== void 0 && e.disable !== !0 && ut.value.length !== 0) {
|
|
3134
|
+
const j = ut.value.map((W) => h("option", { value: W, selected: !0 }));
|
|
3135
3135
|
w.push(
|
|
3136
3136
|
h("select", {
|
|
3137
3137
|
class: "hidden",
|
|
@@ -3149,17 +3149,17 @@ const bu = be({
|
|
|
3149
3149
|
},
|
|
3150
3150
|
getInnerAppend: () => e.loading !== !0 && c.value !== !0 && e.hideDropdownIcon !== !0 ? [
|
|
3151
3151
|
h(Ae, {
|
|
3152
|
-
class: "q-select__dropdown-icon" + (
|
|
3152
|
+
class: "q-select__dropdown-icon" + (i.value === !0 ? " rotate-180" : ""),
|
|
3153
3153
|
name: Ne.value
|
|
3154
3154
|
})
|
|
3155
3155
|
] : null
|
|
3156
3156
|
}), Zl(s);
|
|
3157
3157
|
}
|
|
3158
|
-
}),
|
|
3158
|
+
}), yi = { class: "app-select__amount" }, Si = /* @__PURE__ */ zo({
|
|
3159
3159
|
__name: "AppSelect",
|
|
3160
3160
|
props: {
|
|
3161
3161
|
modelValue: {},
|
|
3162
|
-
size: { default:
|
|
3162
|
+
size: { default: Yo.MD },
|
|
3163
3163
|
options: {},
|
|
3164
3164
|
multiple: { type: Boolean },
|
|
3165
3165
|
label: {},
|
|
@@ -3175,35 +3175,51 @@ const bu = be({
|
|
|
3175
3175
|
},
|
|
3176
3176
|
emits: ["update:modelValue"],
|
|
3177
3177
|
setup(e, { emit: t }) {
|
|
3178
|
-
const l = e,
|
|
3178
|
+
const l = e, o = t, a = T(!1), i = T(""), u = f({
|
|
3179
3179
|
get() {
|
|
3180
|
-
|
|
3180
|
+
if (l.modelValue) {
|
|
3181
|
+
if (l.multiple && Array.isArray(l.modelValue))
|
|
3182
|
+
return l.options.filter(
|
|
3183
|
+
(r) => l.modelValue.includes(r.value)
|
|
3184
|
+
);
|
|
3185
|
+
if (!Array.isArray(l.modelValue))
|
|
3186
|
+
return l.options.find(
|
|
3187
|
+
(r) => r.value === l.modelValue
|
|
3188
|
+
);
|
|
3189
|
+
}
|
|
3181
3190
|
},
|
|
3182
3191
|
set(r) {
|
|
3183
|
-
|
|
3192
|
+
if (!r) {
|
|
3193
|
+
o("update:modelValue", void 0);
|
|
3194
|
+
return;
|
|
3195
|
+
}
|
|
3196
|
+
if (l.multiple && Array.isArray(r)) {
|
|
3197
|
+
const v = r.map((_) => _.value);
|
|
3198
|
+
o("update:modelValue", v);
|
|
3199
|
+
} else Array.isArray(r) || o("update:modelValue", r.value);
|
|
3184
3200
|
}
|
|
3185
3201
|
}), d = f(() => {
|
|
3186
3202
|
var r;
|
|
3187
|
-
if (Array.isArray(
|
|
3188
|
-
if (l.multiple &&
|
|
3203
|
+
if (Array.isArray(u.value)) {
|
|
3204
|
+
if (l.multiple && u.value.length == 0)
|
|
3189
3205
|
return l.placeholder;
|
|
3190
|
-
} else return ((r =
|
|
3206
|
+
} else return ((r = u.value) == null ? void 0 : r.label) || l.placeholder || "";
|
|
3191
3207
|
return "";
|
|
3192
|
-
}),
|
|
3193
|
-
(r) => r.label.toLowerCase().includes(
|
|
3208
|
+
}), m = f(() => !(!l.clearable || !l.modelValue || l.modelValue && Array.isArray(l.modelValue) && !l.modelValue.length)), g = f(() => i.value ? l.options.filter(
|
|
3209
|
+
(r) => r.label.toLowerCase().includes(i.value.toLowerCase())
|
|
3194
3210
|
) : l.options), c = f(() => {
|
|
3195
3211
|
if (l.rules)
|
|
3196
3212
|
return l.required ? [...l.rules, dl] : l.rules;
|
|
3197
3213
|
if (l.required)
|
|
3198
3214
|
return [dl];
|
|
3199
3215
|
}), y = () => {
|
|
3200
|
-
|
|
3201
|
-
}, C = (r,
|
|
3202
|
-
|
|
3203
|
-
|
|
3216
|
+
u.value = void 0;
|
|
3217
|
+
}, C = (r, v) => {
|
|
3218
|
+
v(() => {
|
|
3219
|
+
i.value = r;
|
|
3204
3220
|
});
|
|
3205
3221
|
};
|
|
3206
|
-
return (r,
|
|
3222
|
+
return (r, v) => (de(), Tt(rl(en), null, {
|
|
3207
3223
|
default: ye(() => [
|
|
3208
3224
|
st("div", {
|
|
3209
3225
|
class: ct(["app-select", [{ "app-select_opened": a.value }, `app-select_${r.size}`]])
|
|
@@ -3212,7 +3228,7 @@ const bu = be({
|
|
|
3212
3228
|
key: 0,
|
|
3213
3229
|
class: ct(["app-select__label", { "app-select__label_bold": r.required }])
|
|
3214
3230
|
}, Ue(r.required ? `${r.label} *` : r.label), 3)) : Pe("", !0),
|
|
3215
|
-
Xe(rl(
|
|
3231
|
+
Xe(rl(bi), {
|
|
3216
3232
|
standout: "",
|
|
3217
3233
|
"hide-bottom-space": "",
|
|
3218
3234
|
"hide-dropdown-icon": "",
|
|
@@ -3221,61 +3237,61 @@ const bu = be({
|
|
|
3221
3237
|
"popup-content-class": `app-select-menu app-select-menu_${r.size}`,
|
|
3222
3238
|
placeholder: r.filtering && "Почніть вводити",
|
|
3223
3239
|
"input-debounce": "50",
|
|
3224
|
-
modelValue:
|
|
3225
|
-
"onUpdate:modelValue":
|
|
3240
|
+
modelValue: u.value,
|
|
3241
|
+
"onUpdate:modelValue": v[0] || (v[0] = (_) => u.value = _),
|
|
3226
3242
|
options: g.value,
|
|
3227
3243
|
multiple: r.multiple,
|
|
3228
|
-
"use-input": r.filtering && (Array.isArray(
|
|
3244
|
+
"use-input": r.filtering && (Array.isArray(u.value) || !u.value),
|
|
3229
3245
|
rules: c.value,
|
|
3230
3246
|
"lazy-rules": r.lazyRules,
|
|
3231
3247
|
autofocus: r.autofocus,
|
|
3232
3248
|
disable: r.disabled,
|
|
3233
3249
|
loading: r.loading,
|
|
3234
3250
|
onFilter: C,
|
|
3235
|
-
onPopupShow:
|
|
3236
|
-
onPopupHide:
|
|
3251
|
+
onPopupShow: v[1] || (v[1] = (_) => a.value = !0),
|
|
3252
|
+
onPopupHide: v[2] || (v[2] = (_) => a.value = !1)
|
|
3237
3253
|
}, {
|
|
3238
3254
|
append: ye(() => [
|
|
3239
|
-
|
|
3255
|
+
m.value ? (de(), xe("i", {
|
|
3240
3256
|
key: 0,
|
|
3241
3257
|
class: "icon-kl icon-kl-close app-select__clear",
|
|
3242
|
-
onClick:
|
|
3258
|
+
onClick: Mo(y, ["stop", "prevent"])
|
|
3243
3259
|
})) : Pe("", !0),
|
|
3244
|
-
|
|
3260
|
+
v[3] || (v[3] = st("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
|
|
3245
3261
|
]),
|
|
3246
3262
|
selected: ye(() => {
|
|
3247
3263
|
var _, S;
|
|
3248
3264
|
return [
|
|
3249
|
-
Array.isArray(
|
|
3250
|
-
!r.filtering ||
|
|
3265
|
+
Array.isArray(u.value) ? (de(), xe(dt, { key: 0 }, [
|
|
3266
|
+
!r.filtering || u.value.length ? (de(), xe("span", {
|
|
3251
3267
|
key: 0,
|
|
3252
3268
|
class: ct([
|
|
3253
3269
|
"app-select__selected",
|
|
3254
3270
|
{
|
|
3255
|
-
"app-select__placeholder": !((_ =
|
|
3271
|
+
"app-select__placeholder": !((_ = u.value) != null && _.length) && r.placeholder
|
|
3256
3272
|
}
|
|
3257
3273
|
])
|
|
3258
3274
|
}, [
|
|
3259
|
-
(S =
|
|
3260
|
-
|
|
3261
|
-
st("span",
|
|
3275
|
+
(S = u.value) != null && S.length ? (de(), xe(dt, { key: 0 }, [
|
|
3276
|
+
v[4] || (v[4] = Rt(" Вибрано ")),
|
|
3277
|
+
st("span", yi, Ue(u.value.length), 1)
|
|
3262
3278
|
], 64)) : (de(), xe(dt, { key: 1 }, [
|
|
3263
3279
|
Rt(Ue(l.placeholder), 1)
|
|
3264
3280
|
], 64))
|
|
3265
3281
|
], 2)) : Pe("", !0)
|
|
3266
3282
|
], 64)) : (de(), xe(dt, { key: 1 }, [
|
|
3267
|
-
!r.filtering ||
|
|
3283
|
+
!r.filtering || u.value ? (de(), xe("span", {
|
|
3268
3284
|
key: 0,
|
|
3269
3285
|
class: ct([
|
|
3270
3286
|
"app-select__selected",
|
|
3271
|
-
{ "app-select__placeholder": !
|
|
3287
|
+
{ "app-select__placeholder": !u.value && r.placeholder }
|
|
3272
3288
|
])
|
|
3273
3289
|
}, Ue(d.value), 3)) : Pe("", !0)
|
|
3274
3290
|
], 64))
|
|
3275
3291
|
];
|
|
3276
3292
|
}),
|
|
3277
3293
|
option: ye((_) => [
|
|
3278
|
-
Xe(Ql,
|
|
3294
|
+
Xe(Ql, Fo({
|
|
3279
3295
|
class: ["app-select__option", { "app-select__option_selected": _.selected }]
|
|
3280
3296
|
}, _.itemProps), {
|
|
3281
3297
|
default: ye(() => [
|
|
@@ -3285,7 +3301,7 @@ const bu = be({
|
|
|
3285
3301
|
avatar: ""
|
|
3286
3302
|
}, {
|
|
3287
3303
|
default: ye(() => [
|
|
3288
|
-
Xe(
|
|
3304
|
+
Xe(cn, {
|
|
3289
3305
|
size: "30px",
|
|
3290
3306
|
"model-value": _.selected,
|
|
3291
3307
|
"onUpdate:modelValue": () => _.toggleOption(_.opt)
|
|
@@ -3298,7 +3314,7 @@ const bu = be({
|
|
|
3298
3314
|
class: "option-done",
|
|
3299
3315
|
avatar: ""
|
|
3300
3316
|
}, {
|
|
3301
|
-
default: ye(() =>
|
|
3317
|
+
default: ye(() => v[5] || (v[5] = [
|
|
3302
3318
|
st("i", { class: "icon-kl icon-kl-check option-done__icon" }, null, -1)
|
|
3303
3319
|
])),
|
|
3304
3320
|
_: 1
|
|
@@ -3325,7 +3341,7 @@ const bu = be({
|
|
|
3325
3341
|
_: 1
|
|
3326
3342
|
}));
|
|
3327
3343
|
}
|
|
3328
|
-
}),
|
|
3344
|
+
}), ki = /* @__PURE__ */ Go(Si, [["__scopeId", "data-v-bd31170e"]]);
|
|
3329
3345
|
export {
|
|
3330
|
-
|
|
3346
|
+
ki as default
|
|
3331
3347
|
};
|