@validol4ik/uikit 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-C6-5YUxD.js → index-B3ClYuZF.js} +1 -1
- package/dist/{index-DF6N-CK6.js → index-B7i_chyx.js} +2 -2
- package/dist/{index-Pak3gzlA.cjs → index-BNgXKI6Q.cjs} +1 -1
- package/dist/{index-BuiADnd0.js → index-CjvD9fEe.js} +1063 -1027
- package/dist/{index-2fej2P8s.cjs → index-DJsI5Qyh.cjs} +1 -1
- package/dist/{index-phyx1ik1.cjs → index-DTcaHgxl.cjs} +1 -1
- package/dist/style.css +1 -0
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +1 -1
- package/dist/icons.css +0 -1
- package/dist/index.css +0 -1
- package/dist/index2.css +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as f, ref as T, h, getCurrentInstance as le, toRaw as
|
|
2
|
-
import { u as
|
|
3
|
-
import { i as
|
|
1
|
+
import { computed as f, ref as T, h, getCurrentInstance as le, toRaw as He, onMounted as tt, watch as K, onBeforeUpdate as Fl, inject as Vo, onBeforeUnmount as ce, nextTick as ue, onDeactivated as xt, onActivated as jl, Transition as bt, onUnmounted as Eo, Teleport as Bo, onBeforeMount as Ao, onUpdated as To, defineComponent as Ro, openBlock as de, createElementBlock as ye, normalizeClass as st, toDisplayString as Ue, createCommentVNode as $e, createVNode as Xe, unref as zo, withCtx as we, mergeProps as Mo, createBlock as al, createElementVNode as At, createTextVNode as Tt, Fragment as ct, withModifiers as Fo } from "vue";
|
|
2
|
+
import { u as Ll, s as ae, h as Ol, a as Se, b as Il, c as be, Q as Ae, d as jo, i as qt, e as Lo, f as Oo, p as pe, g as Io, j as Ho, R as $o, k as Po, l as rl, m as Do, n as ge, v as Wo, o as Rt, q as Hl, r as No, t as sl, w as Ko, x as $l, y as Qo, z as Uo, B as Pe, D as Xo, S as Yo, _ as Go } from "./index-B7i_chyx.js";
|
|
3
|
+
import { i as Zo, b as Pl, P as Jo, c as _e, r as $t, a as Dl } from "./focusout-DjvPXP_b.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 en(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
|
|
@@ -21,36 +21,36 @@ function eo(e, t) {
|
|
|
21
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
|
-
const
|
|
28
|
+
const Wl = {
|
|
29
29
|
name: String
|
|
30
30
|
};
|
|
31
|
-
function
|
|
32
|
-
return (t, l,
|
|
31
|
+
function tn(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 ln(e) {
|
|
42
42
|
return f(() => e.name || e.for);
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const on = {
|
|
45
45
|
xs: 30,
|
|
46
46
|
sm: 35,
|
|
47
47
|
md: 40,
|
|
48
48
|
lg: 50,
|
|
49
49
|
xl: 60
|
|
50
|
-
},
|
|
50
|
+
}, nn = {
|
|
51
51
|
...lt,
|
|
52
|
-
...
|
|
53
|
-
...
|
|
52
|
+
...Il,
|
|
53
|
+
...Wl,
|
|
54
54
|
modelValue: {
|
|
55
55
|
required: !0,
|
|
56
56
|
default: null
|
|
@@ -74,19 +74,19 @@ const no = {
|
|
|
74
74
|
dense: Boolean,
|
|
75
75
|
disable: Boolean,
|
|
76
76
|
tabindex: [String, Number]
|
|
77
|
-
},
|
|
78
|
-
function
|
|
79
|
-
const { props: l, slots:
|
|
77
|
+
}, un = ["update:modelValue"];
|
|
78
|
+
function an(e, t) {
|
|
79
|
+
const { props: l, slots: o, emit: a, proxy: i } = le(), { $q: u } = i, d = ot(l, u), v = T(null), { refocusTargetEl: g, refocusTarget: c } = en(l, v), y = Ll(l, on), x = f(
|
|
80
80
|
() => l.val !== void 0 && Array.isArray(l.modelValue)
|
|
81
81
|
), r = f(() => {
|
|
82
|
-
const A =
|
|
83
|
-
return
|
|
84
|
-
}), m = f(() =>
|
|
85
|
-
() => m.value === !1 &&
|
|
86
|
-
),
|
|
82
|
+
const A = He(l.val);
|
|
83
|
+
return x.value === !0 ? l.modelValue.findIndex((U) => He(U) === A) : -1;
|
|
84
|
+
}), m = f(() => x.value === !0 ? r.value !== -1 : He(l.modelValue) === He(l.trueValue)), V = f(() => x.value === !0 ? r.value === -1 : He(l.modelValue) === He(l.falseValue)), S = f(
|
|
85
|
+
() => m.value === !1 && V.value === !1
|
|
86
|
+
), $ = 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
|
-
),
|
|
89
|
-
const A = m.value === !0 ? "truthy" :
|
|
88
|
+
), C = f(() => {
|
|
89
|
+
const A = m.value === !0 ? "truthy" : V.value === !0 ? "falsy" : "indet", U = l.color !== void 0 && (l.keepColor === !0 || V.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" };
|
|
@@ -95,22 +95,22 @@ function uo(e, t) {
|
|
|
95
95
|
".checked": m.value,
|
|
96
96
|
"^checked": m.value === !0 ? "checked" : void 0,
|
|
97
97
|
name: l.name,
|
|
98
|
-
value:
|
|
98
|
+
value: x.value === !0 ? l.val : l.trueValue
|
|
99
99
|
}), A;
|
|
100
|
-
}),
|
|
100
|
+
}), P = tn(R), B = f(() => {
|
|
101
101
|
const A = {
|
|
102
|
-
tabindex:
|
|
102
|
+
tabindex: $.value,
|
|
103
103
|
role: "checkbox",
|
|
104
104
|
"aria-label": l.label,
|
|
105
105
|
"aria-checked": S.value === !0 ? "mixed" : m.value === !0 ? "true" : "false"
|
|
106
106
|
};
|
|
107
107
|
return l.disable === !0 && (A["aria-disabled"] = "true"), A;
|
|
108
108
|
});
|
|
109
|
-
function
|
|
110
|
-
A !== void 0 && (ae(A), c(A)), l.disable !== !0 && a("update:modelValue",
|
|
109
|
+
function j(A) {
|
|
110
|
+
A !== void 0 && (ae(A), c(A)), l.disable !== !0 && a("update:modelValue", I(), A);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
112
|
+
function I() {
|
|
113
|
+
if (x.value === !0) {
|
|
114
114
|
if (m.value === !0) {
|
|
115
115
|
const A = l.modelValue.slice();
|
|
116
116
|
return A.splice(r.value, 1), A;
|
|
@@ -120,7 +120,7 @@ function uo(e, t) {
|
|
|
120
120
|
if (m.value === !0) {
|
|
121
121
|
if (l.toggleOrder !== "ft" || l.toggleIndeterminate === !1)
|
|
122
122
|
return l.falseValue;
|
|
123
|
-
} else if (
|
|
123
|
+
} else if (V.value === !0) {
|
|
124
124
|
if (l.toggleOrder === "ft" || l.toggleIndeterminate === !1)
|
|
125
125
|
return l.trueValue;
|
|
126
126
|
} else
|
|
@@ -131,40 +131,40 @@ function uo(e, t) {
|
|
|
131
131
|
(A.keyCode === 13 || A.keyCode === 32) && ae(A);
|
|
132
132
|
}
|
|
133
133
|
function G(A) {
|
|
134
|
-
(A.keyCode === 13 || A.keyCode === 32) &&
|
|
134
|
+
(A.keyCode === 13 || A.keyCode === 32) && j(A);
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
return Object.assign(i, { toggle:
|
|
138
|
-
const A =
|
|
139
|
-
l.disable !== !0 &&
|
|
136
|
+
const oe = t(m, S);
|
|
137
|
+
return Object.assign(i, { toggle: j }), () => {
|
|
138
|
+
const A = oe();
|
|
139
|
+
l.disable !== !0 && P(
|
|
140
140
|
A,
|
|
141
141
|
"unshift",
|
|
142
142
|
` q-${e}__native absolute q-ma-none q-pa-none`
|
|
143
143
|
);
|
|
144
144
|
const U = [
|
|
145
145
|
h("div", {
|
|
146
|
-
class:
|
|
146
|
+
class: C.value,
|
|
147
147
|
style: y.value,
|
|
148
148
|
"aria-hidden": "true"
|
|
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 ? Ol(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
158
|
ref: v,
|
|
159
159
|
class: E.value,
|
|
160
160
|
...B.value,
|
|
161
|
-
onClick:
|
|
161
|
+
onClick: j,
|
|
162
162
|
onKeydown: Q,
|
|
163
163
|
onKeyup: G
|
|
164
164
|
}, U);
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const rn = () => h("div", {
|
|
168
168
|
key: "svg",
|
|
169
169
|
class: "q-checkbox__bg absolute"
|
|
170
170
|
}, [
|
|
@@ -182,15 +182,15 @@ const ao = () => h("div", {
|
|
|
182
182
|
d: "M4,14H20V10H4"
|
|
183
183
|
})
|
|
184
184
|
])
|
|
185
|
-
]),
|
|
185
|
+
]), sn = be({
|
|
186
186
|
name: "QCheckbox",
|
|
187
|
-
props:
|
|
188
|
-
emits:
|
|
187
|
+
props: nn,
|
|
188
|
+
emits: un,
|
|
189
189
|
setup(e) {
|
|
190
|
-
const t =
|
|
191
|
-
function l(
|
|
190
|
+
const t = rn();
|
|
191
|
+
function l(o, a) {
|
|
192
192
|
const i = f(
|
|
193
|
-
() => (
|
|
193
|
+
() => (o.value === !0 ? e.checkedIcon : a.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
|
|
194
194
|
);
|
|
195
195
|
return () => i.value !== null ? [
|
|
196
196
|
h("div", {
|
|
@@ -204,7 +204,7 @@ const ao = () => h("div", {
|
|
|
204
204
|
])
|
|
205
205
|
] : [t];
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return an("checkbox", l);
|
|
208
208
|
}
|
|
209
209
|
}), pt = be({
|
|
210
210
|
name: "QItemSection",
|
|
@@ -230,7 +230,7 @@ const ao = () => 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 ao = () => 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
|
}), Kl = be({
|
|
247
247
|
name: "QItem",
|
|
248
248
|
props: {
|
|
249
249
|
...lt,
|
|
250
|
-
...
|
|
250
|
+
...Oo,
|
|
251
251
|
tag: {
|
|
252
252
|
type: String,
|
|
253
253
|
default: "div"
|
|
@@ -265,44 +265,44 @@ const ao = () => h("div", {
|
|
|
265
265
|
},
|
|
266
266
|
emits: ["click", "keyup"],
|
|
267
267
|
setup(e, { slots: t, emit: l }) {
|
|
268
|
-
const { proxy: { $q:
|
|
268
|
+
const { proxy: { $q: o } } = le(), a = ot(e, o), { hasLink: i, linkAttrs: u, linkClass: d, linkTag: v, navigateOnClick: g } = jo(), c = T(null), y = T(null), x = f(
|
|
269
269
|
() => e.clickable === !0 || i.value === !0 || e.tag === "label"
|
|
270
270
|
), r = f(
|
|
271
|
-
() => e.disable !== !0 &&
|
|
271
|
+
() => e.disable !== !0 && x.value === !0
|
|
272
272
|
), m = f(
|
|
273
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
|
-
),
|
|
275
|
-
["padding" + (
|
|
274
|
+
), V = f(() => e.insetLevel === void 0 ? null : {
|
|
275
|
+
["padding" + (o.lang.rtl === !0 ? "Right" : "Left")]: 16 + e.insetLevel * 56 + "px"
|
|
276
276
|
});
|
|
277
|
-
function S(
|
|
278
|
-
r.value === !0 && (y.value !== null && (
|
|
277
|
+
function S(C) {
|
|
278
|
+
r.value === !0 && (y.value !== null && (C.qKeyEvent !== !0 && document.activeElement === c.value ? y.value.focus() : document.activeElement === y.value && c.value.focus()), g(C));
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
if (r.value === !0 &&
|
|
282
|
-
ae(
|
|
283
|
-
const R = new MouseEvent("click",
|
|
280
|
+
function $(C) {
|
|
281
|
+
if (r.value === !0 && qt(C, [13, 32]) === !0) {
|
|
282
|
+
ae(C), C.qKeyEvent = !0;
|
|
283
|
+
const R = new MouseEvent("click", C);
|
|
284
284
|
R.qKeyEvent = !0, c.value.dispatchEvent(R);
|
|
285
285
|
}
|
|
286
|
-
l("keyup",
|
|
286
|
+
l("keyup", C);
|
|
287
287
|
}
|
|
288
288
|
function E() {
|
|
289
|
-
const
|
|
290
|
-
return r.value === !0 &&
|
|
289
|
+
const C = Lo(t.default, []);
|
|
290
|
+
return r.value === !0 && C.unshift(
|
|
291
291
|
h("div", { class: "q-focus-helper", tabindex: -1, ref: y })
|
|
292
|
-
),
|
|
292
|
+
), C;
|
|
293
293
|
}
|
|
294
294
|
return () => {
|
|
295
|
-
const
|
|
295
|
+
const C = {
|
|
296
296
|
ref: c,
|
|
297
297
|
class: m.value,
|
|
298
|
-
style:
|
|
298
|
+
style: V.value,
|
|
299
299
|
role: "listitem",
|
|
300
300
|
onClick: S,
|
|
301
|
-
onKeyup:
|
|
301
|
+
onKeyup: $
|
|
302
302
|
};
|
|
303
|
-
return r.value === !0 ? (
|
|
303
|
+
return r.value === !0 ? (C.tabindex = e.tabindex || "0", Object.assign(C, u.value)) : x.value === !0 && (C["aria-disabled"] = "true"), h(
|
|
304
304
|
v.value,
|
|
305
|
-
|
|
305
|
+
C,
|
|
306
306
|
E()
|
|
307
307
|
);
|
|
308
308
|
};
|
|
@@ -312,7 +312,7 @@ let zt, dt = 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 cn = (() => {
|
|
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,40 +325,40 @@ const so = (() => {
|
|
|
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
|
})(), dl = 4096;
|
|
333
|
-
function
|
|
334
|
-
(zt === void 0 || dt + 16 > dl) && (dt = 0, zt =
|
|
333
|
+
function Pt() {
|
|
334
|
+
(zt === void 0 || dt + 16 > dl) && (dt = 0, zt = cn(dl));
|
|
335
335
|
const e = Array.prototype.slice.call(zt, dt, dt += 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 dn(e) {
|
|
339
339
|
return e ?? null;
|
|
340
340
|
}
|
|
341
341
|
function fl(e, t) {
|
|
342
|
-
return e ?? (t === !0 ? `f_${
|
|
342
|
+
return e ?? (t === !0 ? `f_${Pt()}` : null);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
if (
|
|
346
|
-
const l = e !== void 0 ? T(
|
|
344
|
+
function fn({ getValue: e, required: t = !0 } = {}) {
|
|
345
|
+
if (Zo.value === !0) {
|
|
346
|
+
const l = e !== void 0 ? T(dn(e())) : T(null);
|
|
347
347
|
return t === !0 && l.value === null && tt(() => {
|
|
348
|
-
l.value = `f_${
|
|
349
|
-
}), e !== void 0 && K(e, (
|
|
350
|
-
l.value = fl(
|
|
348
|
+
l.value = `f_${Pt()}`;
|
|
349
|
+
}), e !== void 0 && K(e, (o) => {
|
|
350
|
+
l.value = fl(o, t);
|
|
351
351
|
}), l;
|
|
352
352
|
}
|
|
353
|
-
return e !== void 0 ? f(() => fl(e(), t)) : T(`f_${
|
|
353
|
+
return e !== void 0 ? f(() => fl(e(), t)) : T(`f_${Pt()}`);
|
|
354
354
|
}
|
|
355
355
|
const vl = /^on[A-Z]/;
|
|
356
|
-
function
|
|
356
|
+
function vn() {
|
|
357
357
|
const { attrs: e, vnode: t } = le(), l = {
|
|
358
358
|
listeners: T({}),
|
|
359
359
|
attributes: T({})
|
|
360
360
|
};
|
|
361
|
-
function
|
|
361
|
+
function o() {
|
|
362
362
|
const a = {}, i = {};
|
|
363
363
|
for (const u in e)
|
|
364
364
|
u !== "class" && u !== "style" && vl.test(u) === !1 && (a[u] = e[u]);
|
|
@@ -366,23 +366,23 @@ function vo() {
|
|
|
366
366
|
vl.test(u) === !0 && (i[u] = t.props[u]);
|
|
367
367
|
l.attributes.value = a, l.listeners.value = i;
|
|
368
368
|
}
|
|
369
|
-
return
|
|
369
|
+
return Fl(o), o(), l;
|
|
370
370
|
}
|
|
371
|
-
const
|
|
372
|
-
function
|
|
373
|
-
const
|
|
374
|
-
if (
|
|
371
|
+
const mn = "_q_fo_";
|
|
372
|
+
function hn({ validate: e, resetValidation: t, requiresQForm: l }) {
|
|
373
|
+
const o = Vo(mn, !1);
|
|
374
|
+
if (o !== !1) {
|
|
375
375
|
const { props: a, proxy: i } = le();
|
|
376
376
|
Object.assign(i, { validate: e, resetValidation: t }), K(() => a.disable, (u) => {
|
|
377
|
-
u === !0 ? (typeof t == "function" && t(),
|
|
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
|
}
|
|
385
|
-
const ml = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, hl = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, gl = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, ft = /^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/, vt = /^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,
|
|
385
|
+
const ml = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, hl = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, gl = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, ft = /^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/, vt = /^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/, Mt = {
|
|
386
386
|
date: (e) => /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),
|
|
387
387
|
time: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),
|
|
388
388
|
fulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),
|
|
@@ -405,18 +405,18 @@ const ml = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, hl = /^#[0-9a-fA-F]{4}([0-9a-fA
|
|
|
405
405
|
anyColor: (e) => gl.test(e) || ft.test(e) || vt.test(e)
|
|
406
406
|
};
|
|
407
407
|
function Ql(e, t = 250, l) {
|
|
408
|
-
let
|
|
408
|
+
let o = null;
|
|
409
409
|
function a() {
|
|
410
410
|
const i = arguments, u = () => {
|
|
411
|
-
|
|
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 gn = [!0, !1, "ondemand"], pn = {
|
|
420
420
|
modelValue: {},
|
|
421
421
|
error: {
|
|
422
422
|
type: Boolean,
|
|
@@ -430,67 +430,67 @@ const go = [!0, !1, "ondemand"], po = {
|
|
|
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) => gn.includes(e)
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
function
|
|
437
|
-
const { props: l, proxy:
|
|
438
|
-
|
|
436
|
+
function bn(e, t) {
|
|
437
|
+
const { props: l, proxy: o } = le(), a = T(!1), i = T(null), u = T(!1);
|
|
438
|
+
hn({ validate: V, resetValidation: m });
|
|
439
439
|
let d = 0, v;
|
|
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
|
-
),
|
|
444
|
+
), x = 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
449
|
l.lazyRules !== "ondemand" && c.value === !0 && u.value === !0 && S();
|
|
450
450
|
}
|
|
451
|
-
K(() => l.reactiveRules, (
|
|
452
|
-
|
|
453
|
-
}, { immediate: !0 }), K(() => l.lazyRules, r), K(e, (
|
|
454
|
-
|
|
451
|
+
K(() => l.reactiveRules, ($) => {
|
|
452
|
+
$ === !0 ? v === void 0 && (v = K(() => l.rules, r, { immediate: !0, deep: !0 })) : v !== void 0 && (v(), v = void 0);
|
|
453
|
+
}, { immediate: !0 }), K(() => l.lazyRules, r), K(e, ($) => {
|
|
454
|
+
$ === !0 ? u.value = !0 : c.value === !0 && l.lazyRules !== "ondemand" && S();
|
|
455
455
|
});
|
|
456
456
|
function m() {
|
|
457
457
|
d++, t.value = !1, u.value = !1, a.value = !1, i.value = null, S.cancel();
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function V($ = l.modelValue) {
|
|
460
460
|
if (l.disable === !0 || g.value === !1)
|
|
461
461
|
return !0;
|
|
462
|
-
const E = ++d,
|
|
462
|
+
const E = ++d, C = t.value !== !0 ? () => {
|
|
463
463
|
u.value = !0;
|
|
464
464
|
} : () => {
|
|
465
|
-
}, R = (B,
|
|
466
|
-
B === !0 &&
|
|
467
|
-
},
|
|
465
|
+
}, R = (B, j) => {
|
|
466
|
+
B === !0 && C(), a.value = B, i.value = j || null, t.value = !1;
|
|
467
|
+
}, P = [];
|
|
468
468
|
for (let B = 0; B < l.rules.length; B++) {
|
|
469
|
-
const
|
|
470
|
-
let
|
|
471
|
-
if (typeof
|
|
472
|
-
return R(!0,
|
|
473
|
-
|
|
469
|
+
const j = l.rules[B];
|
|
470
|
+
let I;
|
|
471
|
+
if (typeof j == "function" ? I = j($, Mt) : typeof j == "string" && Mt[j] !== void 0 && (I = Mt[j]($)), I === !1 || typeof I == "string")
|
|
472
|
+
return R(!0, I), !1;
|
|
473
|
+
I !== !0 && I !== void 0 && P.push(I);
|
|
474
474
|
}
|
|
475
|
-
return
|
|
475
|
+
return P.length === 0 ? (R(!1), !0) : (t.value = !0, Promise.all(P).then(
|
|
476
476
|
(B) => {
|
|
477
477
|
if (B === void 0 || Array.isArray(B) === !1 || B.length === 0)
|
|
478
478
|
return E === d && R(!1), !0;
|
|
479
|
-
const
|
|
480
|
-
return E === d && R(
|
|
479
|
+
const j = B.find((I) => I === !1 || typeof I == "string");
|
|
480
|
+
return E === d && R(j !== void 0, j), j === void 0;
|
|
481
481
|
},
|
|
482
482
|
(B) => (E === d && (console.error(B), R(!0)), !1)
|
|
483
483
|
));
|
|
484
484
|
}
|
|
485
|
-
const S = Ql(
|
|
485
|
+
const S = Ql(V, 0);
|
|
486
486
|
return ce(() => {
|
|
487
487
|
v !== void 0 && v(), S.cancel();
|
|
488
|
-
}), Object.assign(
|
|
488
|
+
}), Object.assign(o, { resetValidation: m, validate: V }), Pl(o, "hasError", () => y.value), {
|
|
489
489
|
isDirtyModel: u,
|
|
490
490
|
hasRules: g,
|
|
491
491
|
hasError: y,
|
|
492
|
-
errorMessage:
|
|
493
|
-
validate:
|
|
492
|
+
errorMessage: x,
|
|
493
|
+
validate: V,
|
|
494
494
|
resetValidation: m
|
|
495
495
|
};
|
|
496
496
|
}
|
|
@@ -498,7 +498,7 @@ let Be = [], et = [];
|
|
|
498
498
|
function Ul(e) {
|
|
499
499
|
et = et.filter((t) => t !== e);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function yn(e) {
|
|
502
502
|
Ul(e), et.push(e);
|
|
503
503
|
}
|
|
504
504
|
function pl(e) {
|
|
@@ -507,15 +507,15 @@ function pl(e) {
|
|
|
507
507
|
function Nt(e) {
|
|
508
508
|
et.length === 0 ? e() : Be.push(e);
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Sn(e) {
|
|
511
511
|
Be = Be.filter((t) => t !== e);
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Dt(e) {
|
|
514
514
|
return e != null && ("" + e).length !== 0;
|
|
515
515
|
}
|
|
516
|
-
const
|
|
516
|
+
const _n = {
|
|
517
517
|
...lt,
|
|
518
|
-
...
|
|
518
|
+
...pn,
|
|
519
519
|
label: String,
|
|
520
520
|
stackLabel: Boolean,
|
|
521
521
|
hint: String,
|
|
@@ -545,26 +545,26 @@ const wo = {
|
|
|
545
545
|
autofocus: Boolean,
|
|
546
546
|
for: String
|
|
547
547
|
}, Kt = {
|
|
548
|
-
...
|
|
548
|
+
..._n,
|
|
549
549
|
maxlength: [Number, String]
|
|
550
550
|
}, Xl = ["update:modelValue", "clear", "focus", "blur"];
|
|
551
551
|
function Yl({ requiredForAttr: e = !0, tagProp: t, changeEvent: l = !1 } = {}) {
|
|
552
|
-
const { props:
|
|
552
|
+
const { props: o, proxy: a } = le(), i = ot(o, a.$q), u = fn({
|
|
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(() =>
|
|
559
|
+
tag: t === !0 ? f(() => o.tag) : { value: "label" },
|
|
560
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:
|
|
567
|
+
splitAttrs: vn(),
|
|
568
568
|
targetUid: u,
|
|
569
569
|
rootRef: T(null),
|
|
570
570
|
targetRef: T(null),
|
|
@@ -590,22 +590,22 @@ function Yl({ requiredForAttr: e = !0, tagProp: t, changeEvent: l = !1 } = {}) {
|
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
592
|
function Gl(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
|
-
e.hasValue === void 0 && (e.hasValue = f(() =>
|
|
596
|
-
l("update:modelValue",
|
|
595
|
+
e.hasValue === void 0 && (e.hasValue = f(() => Dt(t.modelValue))), e.emitValue === void 0 && (e.emitValue = (q) => {
|
|
596
|
+
l("update:modelValue", q);
|
|
597
597
|
}), e.controlEvents === void 0 && (e.controlEvents = {
|
|
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
|
-
focus:
|
|
604
|
+
focus: j
|
|
605
605
|
}), e.computedCounter === void 0 && (e.computedCounter = f(() => {
|
|
606
606
|
if (t.counter !== !1) {
|
|
607
|
-
const
|
|
608
|
-
return
|
|
607
|
+
const q = typeof t.modelValue == "string" || typeof t.modelValue == "number" ? ("" + t.modelValue).length : Array.isArray(t.modelValue) === !0 ? t.modelValue.length : 0, F = t.maxlength !== void 0 ? t.maxlength : t.maxValues;
|
|
608
|
+
return q + (F !== void 0 ? " / " + F : "");
|
|
609
609
|
}
|
|
610
610
|
}));
|
|
611
611
|
const {
|
|
@@ -613,16 +613,16 @@ function Gl(e) {
|
|
|
613
613
|
hasRules: g,
|
|
614
614
|
hasError: c,
|
|
615
615
|
errorMessage: y,
|
|
616
|
-
resetValidation:
|
|
617
|
-
} =
|
|
616
|
+
resetValidation: x
|
|
617
|
+
} = bn(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), m = f(
|
|
618
618
|
() => t.bottomSlots === !0 || t.hint !== void 0 || g.value === !0 || t.counter === !0 || t.error !== null
|
|
619
|
-
),
|
|
620
|
-
() => `q-field row no-wrap items-start q-field--${
|
|
621
|
-
),
|
|
619
|
+
), V = 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--${V.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 && m.value === !0 ? " q-field--with-bottom" : "") + (t.disable === !0 ? " q-field--disabled" : t.readonly === !0 ? " q-field--readonly" : "")
|
|
621
|
+
), $ = 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(
|
|
624
624
|
() => t.labelSlot === !0 || t.label !== void 0
|
|
625
|
-
),
|
|
625
|
+
), C = f(
|
|
626
626
|
() => "q-field__label no-pointer-events absolute ellipsis" + (t.labelColor !== void 0 && c.value !== !0 ? ` text-${t.labelColor}` : "")
|
|
627
627
|
), R = f(() => ({
|
|
628
628
|
id: e.targetUid.value,
|
|
@@ -631,62 +631,62 @@ function Gl(e) {
|
|
|
631
631
|
floatingLabel: r.value,
|
|
632
632
|
modelValue: t.modelValue,
|
|
633
633
|
emitValue: e.emitValue
|
|
634
|
-
})),
|
|
635
|
-
const
|
|
636
|
-
return e.targetUid.value && (
|
|
634
|
+
})), P = f(() => {
|
|
635
|
+
const q = {};
|
|
636
|
+
return e.targetUid.value && (q.for = e.targetUid.value), t.disable === !0 && (q["aria-disabled"] = "true"), q;
|
|
637
637
|
});
|
|
638
638
|
function B() {
|
|
639
|
-
const
|
|
640
|
-
let
|
|
641
|
-
|
|
639
|
+
const q = document.activeElement;
|
|
640
|
+
let F = e.targetRef !== void 0 && e.targetRef.value;
|
|
641
|
+
F && (q === null || q.id !== e.targetUid.value) && (F.hasAttribute("tabindex") === !0 || (F = F.querySelector("[tabindex]")), F && F !== q && F.focus({ preventScroll: !0 }));
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function j() {
|
|
644
644
|
Nt(B);
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
|
|
648
|
-
const
|
|
649
|
-
|
|
646
|
+
function I() {
|
|
647
|
+
Sn(B);
|
|
648
|
+
const q = document.activeElement;
|
|
649
|
+
q !== null && e.rootRef.value.contains(q) && q.blur();
|
|
650
650
|
}
|
|
651
|
-
function Q(
|
|
652
|
-
d !== null && (clearTimeout(d), d = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, l("focus",
|
|
651
|
+
function Q(q) {
|
|
652
|
+
d !== null && (clearTimeout(d), d = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, l("focus", q));
|
|
653
653
|
}
|
|
654
|
-
function G(
|
|
654
|
+
function G(q, F) {
|
|
655
655
|
d !== null && clearTimeout(d), d = setTimeout(() => {
|
|
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",
|
|
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", q)), F !== void 0 && F());
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
ae(
|
|
661
|
-
const
|
|
662
|
-
|
|
659
|
+
function oe(q) {
|
|
660
|
+
ae(q), 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 F = v.value;
|
|
662
|
+
x(), v.value = F;
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
|
-
function A(
|
|
666
|
-
[13, 32].includes(
|
|
665
|
+
function A(q) {
|
|
666
|
+
[13, 32].includes(q.keyCode) && oe(q);
|
|
667
667
|
}
|
|
668
668
|
function U() {
|
|
669
|
-
const
|
|
670
|
-
return
|
|
669
|
+
const q = [];
|
|
670
|
+
return o.prepend !== void 0 && q.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
|
-
},
|
|
676
|
-
),
|
|
675
|
+
}, o.prepend())
|
|
676
|
+
), q.push(
|
|
677
677
|
h("div", {
|
|
678
678
|
class: "q-field__control-container col relative-position row no-wrap q-anchor--skip"
|
|
679
|
-
},
|
|
680
|
-
), c.value === !0 && t.noErrorIcon === !1 &&
|
|
679
|
+
}, ne())
|
|
680
|
+
), c.value === !0 && t.noErrorIcon === !1 && q.push(
|
|
681
681
|
X("error", [
|
|
682
682
|
h(Ae, { name: u.iconSet.field.error, color: "negative" })
|
|
683
683
|
])
|
|
684
|
-
), t.loading === !0 || e.innerLoading.value === !0 ?
|
|
684
|
+
), t.loading === !0 || e.innerLoading.value === !0 ? q.push(
|
|
685
685
|
X(
|
|
686
686
|
"inner-loading-append",
|
|
687
|
-
|
|
687
|
+
o.loading !== void 0 ? o.loading() : [h(Io, { color: t.color })]
|
|
688
688
|
)
|
|
689
|
-
) : t.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 &&
|
|
689
|
+
) : t.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && q.push(
|
|
690
690
|
X("inner-clearable-append", [
|
|
691
691
|
h(Ae, {
|
|
692
692
|
class: "q-field__focusable-action",
|
|
@@ -696,57 +696,57 @@ function Gl(e) {
|
|
|
696
696
|
"aria-hidden": "false",
|
|
697
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 && q.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
|
-
},
|
|
708
|
-
), e.getInnerAppend !== void 0 &&
|
|
707
|
+
}, o.append())
|
|
708
|
+
), e.getInnerAppend !== void 0 && q.push(
|
|
709
709
|
X("inner-append", e.getInnerAppend())
|
|
710
|
-
), e.getControlChild !== void 0 &&
|
|
710
|
+
), e.getControlChild !== void 0 && q.push(
|
|
711
711
|
e.getControlChild()
|
|
712
|
-
),
|
|
712
|
+
), q;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
const
|
|
716
|
-
return t.prefix !== void 0 && t.prefix !== null &&
|
|
714
|
+
function ne() {
|
|
715
|
+
const q = [];
|
|
716
|
+
return t.prefix !== void 0 && t.prefix !== null && q.push(
|
|
717
717
|
h("div", {
|
|
718
718
|
class: "q-field__prefix no-pointer-events row items-center"
|
|
719
719
|
}, t.prefix)
|
|
720
|
-
), e.getShadowControl !== void 0 && e.hasShadow.value === !0 &&
|
|
720
|
+
), e.getShadowControl !== void 0 && e.hasShadow.value === !0 && q.push(
|
|
721
721
|
e.getShadowControl()
|
|
722
|
-
), e.getControl !== void 0 ?
|
|
722
|
+
), e.getControl !== void 0 ? q.push(e.getControl()) : o.rawControl !== void 0 ? q.push(o.rawControl()) : o.control !== void 0 && q.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
|
-
},
|
|
730
|
-
), E.value === !0 &&
|
|
729
|
+
}, o.control(R.value))
|
|
730
|
+
), E.value === !0 && q.push(
|
|
731
731
|
h("div", {
|
|
732
|
-
class:
|
|
733
|
-
}, Se(
|
|
734
|
-
), t.suffix !== void 0 && t.suffix !== null &&
|
|
732
|
+
class: C.value
|
|
733
|
+
}, Se(o.label, t.label))
|
|
734
|
+
), t.suffix !== void 0 && t.suffix !== null && q.push(
|
|
735
735
|
h("div", {
|
|
736
736
|
class: "q-field__suffix no-pointer-events row items-center"
|
|
737
737
|
}, t.suffix)
|
|
738
|
-
),
|
|
738
|
+
), q.concat(Se(o.default));
|
|
739
739
|
}
|
|
740
740
|
function te() {
|
|
741
|
-
let
|
|
742
|
-
c.value === !0 ? y.value !== null ? (
|
|
743
|
-
const se = t.counter === !0 ||
|
|
744
|
-
if (t.hideBottomSpace === !0 && se === !1 &&
|
|
741
|
+
let q, F;
|
|
742
|
+
c.value === !0 ? y.value !== null ? (q = [h("div", { role: "alert" }, y.value)], F = `q--slot-error-${y.value}`) : (q = Se(o.error), F = "q--slot-error") : (t.hideHint !== !0 || e.focused.value === !0) && (t.hint !== void 0 ? (q = [h("div", t.hint)], F = `q--slot-hint-${t.hint}`) : (q = Se(o.hint), F = "q--slot-hint"));
|
|
743
|
+
const se = t.counter === !0 || o.counter !== void 0;
|
|
744
|
+
if (t.hideBottomSpace === !0 && se === !1 && q === void 0)
|
|
745
745
|
return;
|
|
746
746
|
const s = h("div", {
|
|
747
|
-
key:
|
|
747
|
+
key: F,
|
|
748
748
|
class: "q-field__messages col"
|
|
749
|
-
},
|
|
749
|
+
}, q);
|
|
750
750
|
return h("div", {
|
|
751
751
|
class: "q-field__bottom row items-start q-field__bottom--" + (t.hideBottomSpace !== !0 ? "animated" : "stale"),
|
|
752
752
|
onClick: pe
|
|
@@ -754,30 +754,30 @@ function Gl(e) {
|
|
|
754
754
|
t.hideBottomSpace === !0 ? s : h(bt, { 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
|
-
function X(
|
|
761
|
-
return
|
|
762
|
-
key:
|
|
760
|
+
function X(q, F) {
|
|
761
|
+
return F === null ? null : h("div", {
|
|
762
|
+
key: q,
|
|
763
763
|
class: "q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"
|
|
764
|
-
},
|
|
764
|
+
}, F);
|
|
765
765
|
}
|
|
766
766
|
let re = !1;
|
|
767
|
-
return
|
|
767
|
+
return xt(() => {
|
|
768
768
|
re = !0;
|
|
769
|
-
}),
|
|
769
|
+
}), jl(() => {
|
|
770
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(i, { focus:
|
|
776
|
-
const
|
|
775
|
+
}), Object.assign(i, { focus: j, blur: I }), function() {
|
|
776
|
+
const F = e.getControl === void 0 && o.control === void 0 ? {
|
|
777
777
|
...e.splitAttrs.attributes.value,
|
|
778
778
|
"data-autofocus": t.autofocus === !0 || void 0,
|
|
779
|
-
...
|
|
780
|
-
} :
|
|
779
|
+
...P.value
|
|
780
|
+
} : P.value;
|
|
781
781
|
return h(e.tag.value, {
|
|
782
782
|
ref: e.rootRef,
|
|
783
783
|
class: [
|
|
@@ -785,31 +785,31 @@ function Gl(e) {
|
|
|
785
785
|
a.class
|
|
786
786
|
],
|
|
787
787
|
style: a.style,
|
|
788
|
-
...
|
|
788
|
+
...F
|
|
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
|
}, [
|
|
797
797
|
h("div", {
|
|
798
798
|
ref: e.controlRef,
|
|
799
|
-
class:
|
|
799
|
+
class: $.value,
|
|
800
800
|
tabindex: -1,
|
|
801
801
|
...e.controlEvents
|
|
802
802
|
}, U()),
|
|
803
803
|
m.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 wn = be({
|
|
813
813
|
name: "QField",
|
|
814
814
|
inheritAttrs: !1,
|
|
815
815
|
props: {
|
|
@@ -825,17 +825,17 @@ const xo = be({
|
|
|
825
825
|
Yl({ tagProp: !0 })
|
|
826
826
|
);
|
|
827
827
|
}
|
|
828
|
-
}),
|
|
828
|
+
}), xn = {
|
|
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,
|
|
838
|
-
...
|
|
838
|
+
...Il,
|
|
839
839
|
dense: Boolean,
|
|
840
840
|
icon: String,
|
|
841
841
|
iconRight: String,
|
|
@@ -866,21 +866,21 @@ const xo = 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 = Ll(e, xn), u = f(() => e.selected === !0 || e.icon !== void 0), d = f(() => e.selected === !0 ? e.iconSelected || o.iconSet.chip.selected : e.icon), v = 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;
|
|
873
873
|
return "q-chip row inline no-wrap items-center" + (e.outline === !1 && e.color !== void 0 ? ` bg-${e.color}` : "") + (S ? ` text-${S} q-chip--colored` : "") + (e.disable === !0 ? " disabled" : "") + (e.dense === !0 ? " q-chip--dense" : "") + (e.outline === !0 ? " q-chip--outline" : "") + (e.selected === !0 ? " q-chip--selected" : "") + (g.value === !0 ? " q-chip--clickable cursor-pointer non-selectable q-hoverable" : "") + (e.square === !0 ? " q-chip--square" : "") + (a.value === !0 ? " q-chip--dark q-dark" : "");
|
|
874
874
|
}), y = f(() => {
|
|
875
|
-
const S = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 },
|
|
875
|
+
const S = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 }, $ = {
|
|
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
|
-
return { chip: S, remove:
|
|
881
|
+
return { chip: S, remove: $ };
|
|
882
882
|
});
|
|
883
|
-
function
|
|
883
|
+
function x(S) {
|
|
884
884
|
S.keyCode === 13 && r(S);
|
|
885
885
|
}
|
|
886
886
|
function r(S) {
|
|
@@ -889,7 +889,7 @@ const xo = be({
|
|
|
889
889
|
function m(S) {
|
|
890
890
|
(S.keyCode === void 0 || S.keyCode === 13) && (ae(S), e.disable === !1 && (l("update:modelValue", !1), l("remove")));
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function V() {
|
|
893
893
|
const S = [];
|
|
894
894
|
g.value === !0 && S.push(
|
|
895
895
|
h("div", { class: "q-focus-helper" })
|
|
@@ -899,11 +899,11 @@ const xo = be({
|
|
|
899
899
|
name: d.value
|
|
900
900
|
})
|
|
901
901
|
);
|
|
902
|
-
const
|
|
902
|
+
const $ = e.label !== void 0 ? [h("div", { class: "ellipsis" }, [e.label])] : void 0;
|
|
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
|
+
}, Po(t.default, $))
|
|
907
907
|
), e.iconRight && S.push(
|
|
908
908
|
h(Ae, {
|
|
909
909
|
class: "q-chip__icon q-chip__icon--right",
|
|
@@ -928,43 +928,43 @@ const xo = be({
|
|
|
928
928
|
return g.value === !0 && Object.assign(
|
|
929
929
|
S,
|
|
930
930
|
y.value.chip,
|
|
931
|
-
{ onClick: r, onKeyup:
|
|
932
|
-
),
|
|
931
|
+
{ onClick: r, onKeyup: x }
|
|
932
|
+
), Ho(
|
|
933
933
|
"div",
|
|
934
934
|
S,
|
|
935
|
-
|
|
935
|
+
V(),
|
|
936
936
|
"ripple",
|
|
937
937
|
e.ripple !== !1 && e.disable !== !0,
|
|
938
|
-
() => [[
|
|
938
|
+
() => [[$o, e.ripple]]
|
|
939
939
|
);
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
942
|
});
|
|
943
|
-
function
|
|
943
|
+
function Cn() {
|
|
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 kn = {
|
|
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
|
+
}, Vn = {
|
|
957
|
+
...kn,
|
|
958
958
|
contextMenu: Boolean
|
|
959
959
|
};
|
|
960
|
-
function
|
|
960
|
+
function En({
|
|
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
969
|
function v(r) {
|
|
970
970
|
return u.value === null ? !1 : r === void 0 || r.touches === void 0 || r.touches.length <= 1;
|
|
@@ -978,7 +978,7 @@ function Eo({
|
|
|
978
978
|
a.toggle(r), r.qAnchorHandled = !0;
|
|
979
979
|
},
|
|
980
980
|
toggleKey(r) {
|
|
981
|
-
|
|
981
|
+
qt(r, 13) === !0 && g.toggle(r);
|
|
982
982
|
},
|
|
983
983
|
contextClick(r) {
|
|
984
984
|
a.hide(r), pe(r), ue(() => {
|
|
@@ -1001,10 +1001,10 @@ function Eo({
|
|
|
1001
1001
|
}, 300);
|
|
1002
1002
|
},
|
|
1003
1003
|
mobileCleanup(r) {
|
|
1004
|
-
u.value.classList.remove("non-selectable"), d !== null && (clearTimeout(d), d = null), e.value === !0 && r !== void 0 &&
|
|
1004
|
+
u.value.classList.remove("non-selectable"), d !== null && (clearTimeout(d), d = null), e.value === !0 && r !== void 0 && Cn();
|
|
1005
1005
|
}
|
|
1006
|
-
}), l = function(r =
|
|
1007
|
-
if (
|
|
1006
|
+
}), l = function(r = o.contextMenu) {
|
|
1007
|
+
if (o.noParentEvent === !0 || u.value === null) return;
|
|
1008
1008
|
let m;
|
|
1009
1009
|
r === !0 ? a.$q.platform.is.mobile === !0 ? m = [
|
|
1010
1010
|
[u.value, "touchstart", "mobileTouch", "passive"]
|
|
@@ -1017,37 +1017,37 @@ function Eo({
|
|
|
1017
1017
|
], rl(g, "anchor", m);
|
|
1018
1018
|
});
|
|
1019
1019
|
function c() {
|
|
1020
|
-
|
|
1020
|
+
Do(g, "anchor");
|
|
1021
1021
|
}
|
|
1022
1022
|
function y(r) {
|
|
1023
1023
|
for (u.value = r; u.value.classList.contains("q-anchor--skip"); )
|
|
1024
1024
|
u.value = u.value.parentNode;
|
|
1025
1025
|
l();
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1028
|
-
if (
|
|
1027
|
+
function x() {
|
|
1028
|
+
if (o.target === !1 || o.target === "" || a.$el.parentNode === null)
|
|
1029
1029
|
u.value = null;
|
|
1030
|
-
else if (
|
|
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 ? (u.value = r.$el || r, l()) : (u.value = null, console.error(`Anchor: target "${
|
|
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(() =>
|
|
1043
|
+
return K(() => o.contextMenu, (r) => {
|
|
1044
1044
|
u.value !== null && (c(), l(r));
|
|
1045
|
-
}), K(() =>
|
|
1046
|
-
u.value !== null && c(),
|
|
1047
|
-
}), K(() =>
|
|
1045
|
+
}), K(() => o.target, () => {
|
|
1046
|
+
u.value !== null && c(), x();
|
|
1047
|
+
}), K(() => o.noParentEvent, (r) => {
|
|
1048
1048
|
u.value !== null && (r === !0 ? c() : l());
|
|
1049
1049
|
}), tt(() => {
|
|
1050
|
-
|
|
1050
|
+
x(), t !== !0 && o.modelValue === !0 && u.value === null && i("update:modelValue", !1);
|
|
1051
1051
|
}), ce(() => {
|
|
1052
1052
|
d !== null && clearTimeout(d), c();
|
|
1053
1053
|
}), {
|
|
@@ -1056,12 +1056,12 @@ function Eo({
|
|
|
1056
1056
|
anchorEvents: g
|
|
1057
1057
|
};
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function Bn(e, t) {
|
|
1060
1060
|
const l = T(null);
|
|
1061
|
-
let
|
|
1061
|
+
let o;
|
|
1062
1062
|
function a(d, v) {
|
|
1063
|
-
const g = `${v !== void 0 ? "add" : "remove"}EventListener`, c = v !== void 0 ? v :
|
|
1064
|
-
d !== window && d[g]("scroll", c, ge.passive), window[g]("scroll", c, ge.passive),
|
|
1063
|
+
const g = `${v !== void 0 ? "add" : "remove"}EventListener`, c = v !== void 0 ? v : o;
|
|
1064
|
+
d !== window && d[g]("scroll", c, ge.passive), window[g]("scroll", c, ge.passive), o = v;
|
|
1065
1065
|
}
|
|
1066
1066
|
function i() {
|
|
1067
1067
|
l.value !== null && (a(l.value), l.value = null);
|
|
@@ -1087,13 +1087,13 @@ const Zl = {
|
|
|
1087
1087
|
"beforeHide",
|
|
1088
1088
|
"hide"
|
|
1089
1089
|
];
|
|
1090
|
-
function
|
|
1090
|
+
function eo({
|
|
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
|
|
@@ -1103,56 +1103,56 @@ function en({
|
|
|
1103
1103
|
const u = le(), { props: d, emit: v, proxy: g } = u;
|
|
1104
1104
|
let c;
|
|
1105
1105
|
function y(E) {
|
|
1106
|
-
e.value === !0 ? m(E) :
|
|
1106
|
+
e.value === !0 ? m(E) : x(E);
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function x(E) {
|
|
1109
1109
|
if (d.disable === !0 || E !== void 0 && E.qAnchorHandled === !0 || t !== void 0 && t(E) !== !0)
|
|
1110
1110
|
return;
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1111
|
+
const C = d["onUpdate:modelValue"] !== void 0;
|
|
1112
|
+
C === !0 && (v("update:modelValue", !0), c = E, ue(() => {
|
|
1113
1113
|
c === E && (c = void 0);
|
|
1114
|
-
})), (d.modelValue === null ||
|
|
1114
|
+
})), (d.modelValue === null || C === !1) && r(E);
|
|
1115
1115
|
}
|
|
1116
1116
|
function r(E) {
|
|
1117
|
-
e.value !== !0 && (e.value = !0, v("beforeShow", E),
|
|
1117
|
+
e.value !== !0 && (e.value = !0, v("beforeShow", E), o !== void 0 ? o(E) : v("show", E));
|
|
1118
1118
|
}
|
|
1119
1119
|
function m(E) {
|
|
1120
1120
|
if (d.disable === !0)
|
|
1121
1121
|
return;
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1122
|
+
const C = d["onUpdate:modelValue"] !== void 0;
|
|
1123
|
+
C === !0 && (v("update:modelValue", !1), c = E, ue(() => {
|
|
1124
1124
|
c === E && (c = void 0);
|
|
1125
|
-
})), (d.modelValue === null ||
|
|
1125
|
+
})), (d.modelValue === null || C === !1) && V(E);
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function V(E) {
|
|
1128
1128
|
e.value !== !1 && (e.value = !1, v("beforeHide", E), a !== void 0 ? a(E) : v("hide", E));
|
|
1129
1129
|
}
|
|
1130
1130
|
function S(E) {
|
|
1131
|
-
d.disable === !0 && E === !0 ? d["onUpdate:modelValue"] !== void 0 && v("update:modelValue", !1) : E === !0 !== e.value && (E === !0 ? r :
|
|
1131
|
+
d.disable === !0 && E === !0 ? d["onUpdate:modelValue"] !== void 0 && v("update:modelValue", !1) : E === !0 !== e.value && (E === !0 ? r : V)(c);
|
|
1132
1132
|
}
|
|
1133
|
-
K(() => d.modelValue, S), l !== void 0 &&
|
|
1133
|
+
K(() => d.modelValue, S), l !== void 0 && Wo(u) === !0 && K(() => g.$route.fullPath, () => {
|
|
1134
1134
|
l.value === !0 && e.value === !0 && m();
|
|
1135
1135
|
}), tt(() => {
|
|
1136
1136
|
S(d.modelValue);
|
|
1137
1137
|
});
|
|
1138
|
-
const
|
|
1139
|
-
return Object.assign(g,
|
|
1138
|
+
const $ = { show: x, hide: m, toggle: y };
|
|
1139
|
+
return Object.assign(g, $), $;
|
|
1140
1140
|
}
|
|
1141
1141
|
const bl = {};
|
|
1142
|
-
let
|
|
1143
|
-
function
|
|
1142
|
+
let An = 1, Tn = document.body;
|
|
1143
|
+
function Rn(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}--${An++}` : e, bl.globalNodes !== void 0) {
|
|
1146
|
+
const o = bl.globalNodes.class;
|
|
1147
|
+
o !== void 0 && (l.className = o);
|
|
1148
1148
|
}
|
|
1149
|
-
return
|
|
1149
|
+
return Tn.appendChild(l), l;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function zn(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 Fo(e, t) {
|
|
|
1164
1164
|
e = Rt(e);
|
|
1165
1165
|
} while (e != null);
|
|
1166
1166
|
}
|
|
1167
|
-
const
|
|
1167
|
+
const Fn = be({
|
|
1168
1168
|
name: "QPortal",
|
|
1169
1169
|
setup(e, { slots: t }) {
|
|
1170
1170
|
return () => t.default();
|
|
1171
1171
|
}
|
|
1172
1172
|
});
|
|
1173
|
-
function
|
|
1173
|
+
function jn(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 Lo(e) {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
return !1;
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function to(e, t, l, o) {
|
|
1184
1184
|
const a = T(!1), i = T(!1);
|
|
1185
1185
|
let u = null;
|
|
1186
|
-
const d = {}, v =
|
|
1186
|
+
const d = {}, v = o === "dialog" && jn(e);
|
|
1187
1187
|
function g(y) {
|
|
1188
1188
|
if (y === !0) {
|
|
1189
1189
|
pl(d), i.value = !0;
|
|
1190
1190
|
return;
|
|
1191
1191
|
}
|
|
1192
|
-
i.value = !1, a.value === !1 && (v === !1 && u === null && (u =
|
|
1192
|
+
i.value = !1, a.value === !1 && (v === !1 && u === null && (u = Rn(!1, o)), a.value = !0, Je.push(e.proxy), yn(d));
|
|
1193
1193
|
}
|
|
1194
1194
|
function c(y) {
|
|
1195
1195
|
if (i.value = !1, y !== !0) return;
|
|
1196
1196
|
pl(d), a.value = !1;
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1197
|
+
const x = Je.indexOf(e.proxy);
|
|
1198
|
+
x !== -1 && Je.splice(x, 1), u !== null && (zn(u), u = null);
|
|
1199
1199
|
}
|
|
1200
|
-
return
|
|
1200
|
+
return Eo(() => {
|
|
1201
1201
|
c(!0);
|
|
1202
|
-
}), e.proxy.__qPortal = !0,
|
|
1202
|
+
}), e.proxy.__qPortal = !0, Pl(e.proxy, "contentEl", () => t.value), {
|
|
1203
1203
|
showPortal: g,
|
|
1204
1204
|
hidePortal: c,
|
|
1205
1205
|
portalIsActive: a,
|
|
1206
1206
|
portalIsAccessible: i,
|
|
1207
|
-
renderPortal: () => v === !0 ? l() : a.value === !0 ? [h(
|
|
1207
|
+
renderPortal: () => v === !0 ? l() : a.value === !0 ? [h(Bo, { to: u }, h(Fn, l))] : void 0
|
|
1208
1208
|
};
|
|
1209
1209
|
}
|
|
1210
|
-
const
|
|
1210
|
+
const lo = {
|
|
1211
1211
|
transitionShow: {
|
|
1212
1212
|
type: String,
|
|
1213
1213
|
default: "fade"
|
|
@@ -1221,17 +1221,17 @@ const ln = {
|
|
|
1221
1221
|
default: 300
|
|
1222
1222
|
}
|
|
1223
1223
|
};
|
|
1224
|
-
function
|
|
1224
|
+
function oo(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,54 +1240,54 @@ function nn(e, t = () => {
|
|
|
1240
1240
|
transitionStyle: f(() => `--q-transition-duration: ${e.transitionDuration}ms`)
|
|
1241
1241
|
};
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function no() {
|
|
1244
1244
|
let e;
|
|
1245
1245
|
const t = le();
|
|
1246
1246
|
function l() {
|
|
1247
1247
|
e = void 0;
|
|
1248
1248
|
}
|
|
1249
|
-
return
|
|
1249
|
+
return xt(l), ce(l), {
|
|
1250
1250
|
removeTick: l,
|
|
1251
|
-
registerTick(
|
|
1252
|
-
e =
|
|
1253
|
-
e ===
|
|
1251
|
+
registerTick(o) {
|
|
1252
|
+
e = o, ue(() => {
|
|
1253
|
+
e === o && (Hl(t) === !1 && e(), e = void 0);
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
1256
|
};
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function io() {
|
|
1259
1259
|
let e = null;
|
|
1260
1260
|
const t = le();
|
|
1261
1261
|
function l() {
|
|
1262
1262
|
e !== null && (clearTimeout(e), e = null);
|
|
1263
1263
|
}
|
|
1264
|
-
return
|
|
1264
|
+
return xt(l), ce(l), {
|
|
1265
1265
|
removeTimeout: l,
|
|
1266
|
-
registerTimeout(
|
|
1267
|
-
l(),
|
|
1268
|
-
e = null,
|
|
1266
|
+
registerTimeout(o, a) {
|
|
1267
|
+
l(), Hl(t) === !1 && (e = setTimeout(() => {
|
|
1268
|
+
e = null, o();
|
|
1269
1269
|
}, a));
|
|
1270
1270
|
}
|
|
1271
1271
|
};
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1274
|
-
function
|
|
1275
|
-
let l =
|
|
1273
|
+
const Ln = [Element, String], On = [null, document, document.body, document.scrollingElement, document.documentElement];
|
|
1274
|
+
function In(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 On.includes(l) ? window : l;
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function Hn(e) {
|
|
1284
1284
|
return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop;
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function $n(e) {
|
|
1287
1287
|
return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft;
|
|
1288
1288
|
}
|
|
1289
1289
|
let mt;
|
|
1290
|
-
function
|
|
1290
|
+
function Pn() {
|
|
1291
1291
|
if (mt !== void 0)
|
|
1292
1292
|
return mt;
|
|
1293
1293
|
const e = document.createElement("p"), t = document.createElement("div");
|
|
@@ -1305,117 +1305,117 @@ function Do() {
|
|
|
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(), mt = l - o, mt;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Dn(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
|
-
let
|
|
1316
|
-
function
|
|
1317
|
-
|
|
1315
|
+
let We;
|
|
1316
|
+
function Wn(e) {
|
|
1317
|
+
We = e.keyCode === 27;
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1320
|
-
|
|
1319
|
+
function Nn() {
|
|
1320
|
+
We === !0 && (We = !1);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1323
|
-
|
|
1322
|
+
function Kn(e) {
|
|
1323
|
+
We === !0 && (We = !1, qt(e, 27) === !0 && Te[Te.length - 1](e));
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1326
|
-
window[e]("keydown",
|
|
1325
|
+
function uo(e) {
|
|
1326
|
+
window[e]("keydown", Wn), window[e]("blur", Nn), window[e]("keyup", Kn), We = !1;
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
|
|
1328
|
+
function ao(e) {
|
|
1329
|
+
_e.is.desktop === !0 && (Te.push(e), Te.length === 1 && uo("addEventListener"));
|
|
1330
1330
|
}
|
|
1331
1331
|
function yt(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 && uo("removeEventListener"));
|
|
1334
1334
|
}
|
|
1335
1335
|
const { notPassiveCapture: St } = ge, Re = [];
|
|
1336
|
-
function
|
|
1336
|
+
function _t(e) {
|
|
1337
1337
|
const t = e.target;
|
|
1338
1338
|
if (t === void 0 || t.nodeType === 8 || t.classList.contains("no-pointer-events") === !0)
|
|
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
|
|
1362
|
-
Re.push(e), Re.length === 1 && (document.addEventListener("mousedown",
|
|
1361
|
+
function Qn(e) {
|
|
1362
|
+
Re.push(e), Re.length === 1 && (document.addEventListener("mousedown", _t, St), document.addEventListener("touchstart", _t, St));
|
|
1363
1363
|
}
|
|
1364
1364
|
function yl(e) {
|
|
1365
1365
|
const t = Re.findIndex((l) => l === e);
|
|
1366
|
-
t !== -1 && (Re.splice(t, 1), Re.length === 0 && (document.removeEventListener("mousedown",
|
|
1366
|
+
t !== -1 && (Re.splice(t, 1), Re.length === 0 && (document.removeEventListener("mousedown", _t, St), document.removeEventListener("touchstart", _t, St)));
|
|
1367
1367
|
}
|
|
1368
|
-
let Sl,
|
|
1369
|
-
function
|
|
1368
|
+
let Sl, _l;
|
|
1369
|
+
function wl(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 Un(e) {
|
|
1374
1374
|
return e ? !(e.length !== 2 || typeof e[0] != "number" || typeof e[1] != "number") : !0;
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1376
|
+
const Wt = {
|
|
1377
1377
|
"start#ltr": "left",
|
|
1378
1378
|
"start#rtl": "right",
|
|
1379
1379
|
"end#ltr": "right",
|
|
1380
1380
|
"end#rtl": "left"
|
|
1381
1381
|
};
|
|
1382
1382
|
["left", "middle", "right"].forEach((e) => {
|
|
1383
|
-
|
|
1383
|
+
Wt[`${e}#ltr`] = e, Wt[`${e}#rtl`] = e;
|
|
1384
1384
|
});
|
|
1385
|
-
function
|
|
1385
|
+
function xl(e, t) {
|
|
1386
1386
|
const l = e.split(" ");
|
|
1387
1387
|
return {
|
|
1388
1388
|
vertical: l[0],
|
|
1389
|
-
horizontal:
|
|
1389
|
+
horizontal: Wt[`${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 Xn(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
1396
|
bottom: i,
|
|
1397
1397
|
height: d,
|
|
1398
|
-
left:
|
|
1398
|
+
left: o,
|
|
1399
1399
|
right: a,
|
|
1400
1400
|
width: u,
|
|
1401
|
-
middle:
|
|
1401
|
+
middle: o + (a - o) / 2,
|
|
1402
1402
|
center: l + (i - l) / 2
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1406
|
-
let { top:
|
|
1407
|
-
return
|
|
1408
|
-
top:
|
|
1409
|
-
bottom:
|
|
1405
|
+
function Yn(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 Gn(e, t) {
|
|
1419
1419
|
return {
|
|
1420
1420
|
top: 0,
|
|
1421
1421
|
center: t / 2,
|
|
@@ -1425,24 +1425,24 @@ function Go(e, t) {
|
|
|
1425
1425
|
right: e
|
|
1426
1426
|
};
|
|
1427
1427
|
}
|
|
1428
|
-
function
|
|
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 ro(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
|
+
ro(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
1447
|
anchorOrigin: i,
|
|
1448
1448
|
selfOrigin: u,
|
|
@@ -1452,11 +1452,11 @@ function sn(e, t = 0) {
|
|
|
1452
1452
|
maxHeight: c,
|
|
1453
1453
|
maxWidth: y
|
|
1454
1454
|
} = e;
|
|
1455
|
-
if (
|
|
1456
|
-
const B = document.body.style, { offsetLeft:
|
|
1457
|
-
|
|
1455
|
+
if (_e.is.ios === !0 && window.visualViewport !== void 0) {
|
|
1456
|
+
const B = document.body.style, { offsetLeft: j, offsetTop: I } = window.visualViewport;
|
|
1457
|
+
j !== Sl && (B.setProperty("--q-pe-left", j + "px"), Sl = j), I !== _l && (B.setProperty("--q-pe-top", I + "px"), _l = I);
|
|
1458
1458
|
}
|
|
1459
|
-
const { scrollLeft:
|
|
1459
|
+
const { scrollLeft: x, scrollTop: r } = l, m = d === void 0 ? Xn(a, g === !0 ? [0, 0] : o) : Yn(a, d, o);
|
|
1460
1460
|
Object.assign(l.style, {
|
|
1461
1461
|
top: 0,
|
|
1462
1462
|
left: 0,
|
|
@@ -1466,73 +1466,73 @@ function sn(e, t = 0) {
|
|
|
1466
1466
|
maxHeight: c,
|
|
1467
1467
|
visibility: "visible"
|
|
1468
1468
|
});
|
|
1469
|
-
const { offsetWidth:
|
|
1470
|
-
let
|
|
1471
|
-
(v === !0 || g === !0) && (
|
|
1472
|
-
const R =
|
|
1473
|
-
let
|
|
1474
|
-
if (d === void 0 ||
|
|
1475
|
-
|
|
1469
|
+
const { offsetWidth: V, offsetHeight: S } = l, { elWidth: $, elHeight: E } = v === !0 || g === !0 ? { elWidth: Math.max(m.width, V), elHeight: g === !0 ? Math.max(m.height, S) : S } : { elWidth: V, elHeight: S };
|
|
1470
|
+
let C = { maxWidth: y, maxHeight: c };
|
|
1471
|
+
(v === !0 || g === !0) && (C.minWidth = m.width + "px", g === !0 && (C.minHeight = m.height + "px")), Object.assign(l.style, C);
|
|
1472
|
+
const R = Gn($, E);
|
|
1473
|
+
let P = ql(m, R, i, u);
|
|
1474
|
+
if (d === void 0 || o === void 0)
|
|
1475
|
+
Ft(P, m, R, i, u);
|
|
1476
1476
|
else {
|
|
1477
|
-
const { top: B, left:
|
|
1478
|
-
|
|
1479
|
-
let
|
|
1480
|
-
if (
|
|
1481
|
-
|
|
1482
|
-
const Q = 2 *
|
|
1477
|
+
const { top: B, left: j } = P;
|
|
1478
|
+
Ft(P, m, R, i, u);
|
|
1479
|
+
let I = !1;
|
|
1480
|
+
if (P.top !== B) {
|
|
1481
|
+
I = !0;
|
|
1482
|
+
const Q = 2 * o[1];
|
|
1483
1483
|
m.center = m.top -= Q, m.bottom -= Q + 2;
|
|
1484
1484
|
}
|
|
1485
|
-
if (
|
|
1486
|
-
|
|
1487
|
-
const Q = 2 *
|
|
1485
|
+
if (P.left !== j) {
|
|
1486
|
+
I = !0;
|
|
1487
|
+
const Q = 2 * o[0];
|
|
1488
1488
|
m.middle = m.left -= Q, m.right -= Q + 2;
|
|
1489
1489
|
}
|
|
1490
|
-
|
|
1490
|
+
I === !0 && (P = ql(m, R, i, u), Ft(P, m, R, i, u));
|
|
1491
1491
|
}
|
|
1492
|
-
|
|
1493
|
-
top:
|
|
1494
|
-
left:
|
|
1495
|
-
},
|
|
1492
|
+
C = {
|
|
1493
|
+
top: P.top + "px",
|
|
1494
|
+
left: P.left + "px"
|
|
1495
|
+
}, P.maxHeight !== void 0 && (C.maxHeight = P.maxHeight + "px", m.height > P.maxHeight && (C.minHeight = C.maxHeight)), P.maxWidth !== void 0 && (C.maxWidth = P.maxWidth + "px", m.width > P.maxWidth && (C.minWidth = C.maxWidth)), Object.assign(l.style, C), l.scrollTop !== r && (l.scrollTop = r), l.scrollLeft !== x && (l.scrollLeft = x);
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const i = l.bottom, u = l.right, d =
|
|
1497
|
+
function Ft(e, t, l, o, a) {
|
|
1498
|
+
const i = l.bottom, u = l.right, d = Pn(), v = window.innerHeight - d, g = document.body.clientWidth;
|
|
1499
1499
|
if (e.top < 0 || e.top + i > v)
|
|
1500
1500
|
if (a.vertical === "center")
|
|
1501
|
-
e.top = t[
|
|
1502
|
-
else if (t[
|
|
1501
|
+
e.top = t[o.vertical] > v / 2 ? Math.max(0, v - i) : 0, e.maxHeight = Math.min(i, v);
|
|
1502
|
+
else if (t[o.vertical] > v / 2) {
|
|
1503
1503
|
const c = Math.min(
|
|
1504
1504
|
v,
|
|
1505
|
-
|
|
1505
|
+
o.vertical === "center" ? t.center : o.vertical === a.vertical ? t.bottom : t.top
|
|
1506
1506
|
);
|
|
1507
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
|
-
|
|
1511
|
+
o.vertical === "center" ? t.center : o.vertical === a.vertical ? t.top : t.bottom
|
|
1512
1512
|
), e.maxHeight = Math.min(i, v - e.top);
|
|
1513
1513
|
if (e.left < 0 || e.left + u > g)
|
|
1514
1514
|
if (e.maxWidth = Math.min(u, g), a.horizontal === "middle")
|
|
1515
|
-
e.left = t[
|
|
1516
|
-
else if (t[
|
|
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
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
|
-
|
|
1525
|
+
o.horizontal === "middle" ? t.middle : o.horizontal === a.horizontal ? t.left : t.right
|
|
1526
1526
|
), e.maxWidth = Math.min(u, g - e.left);
|
|
1527
1527
|
}
|
|
1528
|
-
const
|
|
1528
|
+
const Zn = be({
|
|
1529
1529
|
name: "QMenu",
|
|
1530
1530
|
inheritAttrs: !1,
|
|
1531
1531
|
props: {
|
|
1532
|
-
...
|
|
1532
|
+
...Vn,
|
|
1533
1533
|
...Zl,
|
|
1534
1534
|
...lt,
|
|
1535
|
-
...
|
|
1535
|
+
...lo,
|
|
1536
1536
|
persistent: Boolean,
|
|
1537
1537
|
autoClose: Boolean,
|
|
1538
1538
|
separateClosePopup: Boolean,
|
|
@@ -1544,17 +1544,17 @@ const Zo = be({
|
|
|
1544
1544
|
square: Boolean,
|
|
1545
1545
|
anchor: {
|
|
1546
1546
|
type: String,
|
|
1547
|
-
validator:
|
|
1547
|
+
validator: wl
|
|
1548
1548
|
},
|
|
1549
1549
|
self: {
|
|
1550
1550
|
type: String,
|
|
1551
|
-
validator:
|
|
1551
|
+
validator: wl
|
|
1552
1552
|
},
|
|
1553
1553
|
offset: {
|
|
1554
1554
|
type: Array,
|
|
1555
|
-
validator:
|
|
1555
|
+
validator: Un
|
|
1556
1556
|
},
|
|
1557
|
-
scrollTarget:
|
|
1557
|
+
scrollTarget: Ln,
|
|
1558
1558
|
touchPosition: Boolean,
|
|
1559
1559
|
maxHeight: {
|
|
1560
1560
|
type: String,
|
|
@@ -1570,88 +1570,88 @@ const Zo = be({
|
|
|
1570
1570
|
"click",
|
|
1571
1571
|
"escapeKey"
|
|
1572
1572
|
],
|
|
1573
|
-
setup(e, { slots: t, emit: l, attrs:
|
|
1573
|
+
setup(e, { slots: t, emit: l, attrs: o }) {
|
|
1574
1574
|
let a = null, i, u, d;
|
|
1575
|
-
const v = le(), { proxy: g } = v, { $q: c } = g, y = T(null),
|
|
1575
|
+
const v = le(), { proxy: g } = v, { $q: c } = g, y = T(null), x = T(!1), r = f(
|
|
1576
1576
|
() => e.persistent !== !0 && e.noRouteDismiss !== !0
|
|
1577
|
-
), m =
|
|
1578
|
-
showing:
|
|
1579
|
-
canShow:
|
|
1577
|
+
), m = ot(e, c), { registerTick: V, removeTick: S } = no(), { registerTimeout: $ } = io(), { transitionProps: E, transitionStyle: C } = oo(e), { localScrollTarget: R, changeScrollEvent: P, unconfigureScrollTarget: B } = Bn(e, L), { anchorEl: j, canShow: I } = En({ showing: x }), { hide: Q } = eo({
|
|
1578
|
+
showing: x,
|
|
1579
|
+
canShow: I,
|
|
1580
1580
|
handleShow: se,
|
|
1581
1581
|
handleHide: s,
|
|
1582
1582
|
hideOnRouteChange: r,
|
|
1583
1583
|
processOnMount: !0
|
|
1584
|
-
}), { showPortal: G, hidePortal:
|
|
1585
|
-
anchorEl:
|
|
1584
|
+
}), { showPortal: G, hidePortal: oe, renderPortal: A } = to(v, y, N, "menu"), U = {
|
|
1585
|
+
anchorEl: j,
|
|
1586
1586
|
innerRef: y,
|
|
1587
1587
|
onClickOutside(b) {
|
|
1588
|
-
if (e.persistent !== !0 &&
|
|
1588
|
+
if (e.persistent !== !0 && x.value === !0)
|
|
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
|
-
},
|
|
1593
|
-
() =>
|
|
1592
|
+
}, ne = f(
|
|
1593
|
+
() => xl(
|
|
1594
1594
|
e.anchor || (e.cover === !0 ? "center middle" : "bottom start"),
|
|
1595
1595
|
c.lang.rtl
|
|
1596
1596
|
)
|
|
1597
|
-
), te = f(() => e.cover === !0 ?
|
|
1597
|
+
), te = f(() => e.cover === !0 ? ne.value : xl(e.self || "top start", c.lang.rtl)), X = f(
|
|
1598
1598
|
() => (e.square === !0 ? " q-menu--square" : "") + (m.value === !0 ? " q-menu--dark q-dark" : "")
|
|
1599
|
-
), re = f(() => e.autoClose === !0 ? { onClick:
|
|
1600
|
-
() =>
|
|
1599
|
+
), re = f(() => e.autoClose === !0 ? { onClick: k } : {}), q = f(
|
|
1600
|
+
() => x.value === !0 && e.persistent !== !0
|
|
1601
1601
|
);
|
|
1602
|
-
K(
|
|
1603
|
-
b === !0 ? (
|
|
1602
|
+
K(q, (b) => {
|
|
1603
|
+
b === !0 ? (ao(M), Qn(U)) : (yt(M), yl(U));
|
|
1604
1604
|
});
|
|
1605
|
-
function
|
|
1605
|
+
function F() {
|
|
1606
1606
|
Nt(() => {
|
|
1607
1607
|
let b = y.value;
|
|
1608
1608
|
b && b.contains(document.activeElement) !== !0 && (b = b.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || b.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || b.querySelector("[autofocus], [data-autofocus]") || b, b.focus({ preventScroll: !0 }));
|
|
1609
1609
|
});
|
|
1610
1610
|
}
|
|
1611
1611
|
function se(b) {
|
|
1612
|
-
if (a = e.noRefocus === !1 ? document.activeElement : null,
|
|
1613
|
-
const Z =
|
|
1612
|
+
if (a = e.noRefocus === !1 ? document.activeElement : null, Dl(O), G(), L(), i = void 0, b !== void 0 && (e.touchPosition || e.contextMenu)) {
|
|
1613
|
+
const Z = Ko(b);
|
|
1614
1614
|
if (Z.left !== void 0) {
|
|
1615
|
-
const { top: ve, left: ze } =
|
|
1615
|
+
const { top: ve, left: ze } = j.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
|
-
)), e.noFocus !== !0 && document.activeElement.blur(),
|
|
1623
|
-
z(), e.noFocus !== !0 &&
|
|
1624
|
-
}),
|
|
1622
|
+
)), e.noFocus !== !0 && document.activeElement.blur(), V(() => {
|
|
1623
|
+
z(), e.noFocus !== !0 && F();
|
|
1624
|
+
}), $(() => {
|
|
1625
1625
|
c.platform.is.ios === !0 && (d = e.autoClose, y.value.click()), z(), G(!0), l("show", b);
|
|
1626
1626
|
}, e.transitionDuration);
|
|
1627
1627
|
}
|
|
1628
1628
|
function s(b) {
|
|
1629
|
-
S(),
|
|
1630
|
-
(b === void 0 || b.qClickOutside !== !0) && (((b && b.type.indexOf("key") === 0 ? a.closest('[tabindex]:not([tabindex^="-"])') : void 0) || a).focus(), a = null),
|
|
1631
|
-
|
|
1629
|
+
S(), oe(), p(!0), a !== null && // menu was hidden from code or ESC plugin
|
|
1630
|
+
(b === void 0 || b.qClickOutside !== !0) && (((b && b.type.indexOf("key") === 0 ? a.closest('[tabindex]:not([tabindex^="-"])') : void 0) || a).focus(), a = null), $(() => {
|
|
1631
|
+
oe(!0), l("hide", b);
|
|
1632
1632
|
}, e.transitionDuration);
|
|
1633
1633
|
}
|
|
1634
1634
|
function p(b) {
|
|
1635
|
-
i = void 0, u !== void 0 && (u(), u = void 0), (b === !0 ||
|
|
1635
|
+
i = void 0, u !== void 0 && (u(), u = void 0), (b === !0 || x.value === !0) && ($t(O), B(), yl(U), yt(M)), b !== !0 && (a = null);
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1638
|
-
(
|
|
1637
|
+
function L() {
|
|
1638
|
+
(j.value !== null || e.scrollTarget !== void 0) && (R.value = In(j.value, e.scrollTarget), P(R.value, z));
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1641
|
-
d !== !0 ? (
|
|
1640
|
+
function k(b) {
|
|
1641
|
+
d !== !0 ? (Mn(g, b), l("click", b)) : d = !1;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1644
|
-
|
|
1643
|
+
function O(b) {
|
|
1644
|
+
q.value === !0 && e.noFocus !== !0 && $l(y.value, b.target) !== !0 && F();
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1646
|
+
function M(b) {
|
|
1647
1647
|
l("escapeKey"), Q(b);
|
|
1648
1648
|
}
|
|
1649
1649
|
function z() {
|
|
1650
|
-
|
|
1650
|
+
ro({
|
|
1651
1651
|
targetEl: y.value,
|
|
1652
1652
|
offset: e.offset,
|
|
1653
|
-
anchorEl:
|
|
1654
|
-
anchorOrigin:
|
|
1653
|
+
anchorEl: j.value,
|
|
1654
|
+
anchorOrigin: ne.value,
|
|
1655
1655
|
selfOrigin: te.value,
|
|
1656
1656
|
absoluteOffset: i,
|
|
1657
1657
|
fit: e.fit,
|
|
@@ -1664,49 +1664,49 @@ const Zo = be({
|
|
|
1664
1664
|
return h(
|
|
1665
1665
|
bt,
|
|
1666
1666
|
E.value,
|
|
1667
|
-
() =>
|
|
1667
|
+
() => x.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
|
-
|
|
1678
|
-
|
|
1677
|
+
o.style,
|
|
1678
|
+
C.value
|
|
1679
1679
|
],
|
|
1680
1680
|
...re.value
|
|
1681
1681
|
}, Se(t.default)) : null
|
|
1682
1682
|
);
|
|
1683
1683
|
}
|
|
1684
|
-
return ce(p), Object.assign(g, { focus:
|
|
1684
|
+
return ce(p), Object.assign(g, { focus: F, updatePosition: z }), A;
|
|
1685
1685
|
}
|
|
1686
1686
|
});
|
|
1687
|
-
function
|
|
1688
|
-
function
|
|
1687
|
+
function Jn(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
|
-
let Ye = 0,
|
|
1698
|
+
let Ye = 0, jt, Lt, Ze, Ot = !1, Cl, kl, Vl, Ee = null;
|
|
1699
1699
|
function ei(e) {
|
|
1700
1700
|
ti(e) && ae(e);
|
|
1701
1701
|
}
|
|
1702
1702
|
function ti(e) {
|
|
1703
1703
|
if (e.target === document.body || e.target.classList.contains("q-layout__backdrop"))
|
|
1704
1704
|
return !0;
|
|
1705
|
-
const t =
|
|
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
1706
|
for (let i = 0; i < t.length; i++) {
|
|
1707
1707
|
const u = t[i];
|
|
1708
|
-
if (
|
|
1709
|
-
return
|
|
1708
|
+
if (Dn(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
|
}
|
|
@@ -1714,19 +1714,19 @@ function El(e) {
|
|
|
1714
1714
|
e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop);
|
|
1715
1715
|
}
|
|
1716
1716
|
function ht(e) {
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
const { height: t } = e.target, { clientHeight: l, scrollTop:
|
|
1720
|
-
(Ze === void 0 || t !== window.innerHeight) && (Ze = l - t, document.scrollingElement.scrollTop =
|
|
1717
|
+
Ot !== !0 && (Ot = !0, requestAnimationFrame(() => {
|
|
1718
|
+
Ot = !1;
|
|
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 Bl(e) {
|
|
1724
1724
|
const t = document.body, l = window.visualViewport !== void 0;
|
|
1725
1725
|
if (e === "add") {
|
|
1726
|
-
const { overflowY:
|
|
1727
|
-
|
|
1726
|
+
const { overflowY: o, overflowX: a } = window.getComputedStyle(t);
|
|
1727
|
+
jt = $n(window), Lt = Hn(window), Cl = t.style.left, kl = t.style.top, Vl = window.location.href, t.style.left = `-${jt}px`, t.style.top = `-${Lt}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, _e.is.ios === !0 && (l === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", ht, ge.passiveCapture), window.visualViewport.addEventListener("scroll", ht, ge.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", El, ge.passiveCapture));
|
|
1728
1728
|
}
|
|
1729
|
-
|
|
1729
|
+
_e.is.desktop === !0 && _e.is.mac === !0 && window[`${e}EventListener`]("wheel", ei, ge.notPassive), e === "remove" && (_e.is.ios === !0 && (l === !0 ? (window.visualViewport.removeEventListener("resize", ht, ge.passiveCapture), window.visualViewport.removeEventListener("scroll", ht, ge.passiveCapture)) : window.removeEventListener("scroll", El, 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 = Cl, t.style.top = kl, window.location.href === Vl && window.scrollTo(jt, Lt), Ze = void 0);
|
|
1730
1730
|
}
|
|
1731
1731
|
function li(e) {
|
|
1732
1732
|
let t = "add";
|
|
@@ -1740,7 +1740,7 @@ function li(e) {
|
|
|
1740
1740
|
} else {
|
|
1741
1741
|
if (Ye === 0 || (Ye--, Ye > 0))
|
|
1742
1742
|
return;
|
|
1743
|
-
if (t = "remove",
|
|
1743
|
+
if (t = "remove", _e.is.ios === !0 && _e.is.nativeMobile === !0) {
|
|
1744
1744
|
Ee !== null && clearTimeout(Ee), Ee = setTimeout(() => {
|
|
1745
1745
|
Bl(t), Ee = null;
|
|
1746
1746
|
}, 100);
|
|
@@ -1749,7 +1749,7 @@ function li(e) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
Bl(t);
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function oi() {
|
|
1753
1753
|
let e;
|
|
1754
1754
|
return {
|
|
1755
1755
|
preventBodyScroll(t) {
|
|
@@ -1758,7 +1758,7 @@ function ni() {
|
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
1760
|
let gt = 0;
|
|
1761
|
-
const
|
|
1761
|
+
const ni = {
|
|
1762
1762
|
standard: "fixed-full flex-center",
|
|
1763
1763
|
top: "fixed-top justify-center",
|
|
1764
1764
|
bottom: "fixed-bottom justify-center",
|
|
@@ -1775,7 +1775,7 @@ const oi = {
|
|
|
1775
1775
|
inheritAttrs: !1,
|
|
1776
1776
|
props: {
|
|
1777
1777
|
...Zl,
|
|
1778
|
-
...
|
|
1778
|
+
...lo,
|
|
1779
1779
|
transitionShow: String,
|
|
1780
1780
|
// override useTransitionProps
|
|
1781
1781
|
transitionHide: String,
|
|
@@ -1807,113 +1807,113 @@ const oi = {
|
|
|
1807
1807
|
"click",
|
|
1808
1808
|
"escapeKey"
|
|
1809
1809
|
],
|
|
1810
|
-
setup(e, { slots: t, emit: l, attrs:
|
|
1810
|
+
setup(e, { slots: t, emit: l, attrs: o }) {
|
|
1811
1811
|
const a = le(), i = T(null), u = T(!1), d = T(!1);
|
|
1812
1812
|
let v = null, g = null, c, y;
|
|
1813
|
-
const
|
|
1813
|
+
const x = f(
|
|
1814
1814
|
() => e.persistent !== !0 && e.noRouteDismiss !== !0 && e.seamless !== !0
|
|
1815
|
-
), { preventBodyScroll: r } =
|
|
1815
|
+
), { preventBodyScroll: r } = oi(), { registerTimeout: m } = io(), { registerTick: V, removeTick: S } = no(), { transitionProps: $, transitionStyle: E } = oo(
|
|
1816
1816
|
e,
|
|
1817
1817
|
() => Al[e.position][0],
|
|
1818
1818
|
() => Al[e.position][1]
|
|
1819
|
-
),
|
|
1819
|
+
), C = f(() => E.value + (e.backdropFilter !== void 0 ? `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}` : "")), { showPortal: R, hidePortal: P, portalIsAccessible: B, renderPortal: j } = to(
|
|
1820
1820
|
a,
|
|
1821
1821
|
i,
|
|
1822
|
-
|
|
1822
|
+
L,
|
|
1823
1823
|
"dialog"
|
|
1824
|
-
), { hide:
|
|
1824
|
+
), { hide: I } = eo({
|
|
1825
1825
|
showing: u,
|
|
1826
|
-
hideOnRouteChange:
|
|
1826
|
+
hideOnRouteChange: x,
|
|
1827
1827
|
handleShow: U,
|
|
1828
|
-
handleHide:
|
|
1828
|
+
handleHide: ne,
|
|
1829
1829
|
processOnMount: !0
|
|
1830
1830
|
});
|
|
1831
|
-
|
|
1831
|
+
Jn(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(() => u.value === !0 && e.seamless !== !0),
|
|
1833
|
+
() => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${ni[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
|
-
K(() => e.maximized, (
|
|
1839
|
-
u.value === !0 &&
|
|
1840
|
-
}), K(G, (
|
|
1841
|
-
r(
|
|
1838
|
+
K(() => e.maximized, (k) => {
|
|
1839
|
+
u.value === !0 && F(k);
|
|
1840
|
+
}), K(G, (k) => {
|
|
1841
|
+
r(k), k === !0 ? (Dl(p), ao(re)) : ($t(p), yt(re));
|
|
1842
1842
|
});
|
|
1843
|
-
function U(
|
|
1844
|
-
g = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null,
|
|
1843
|
+
function U(k) {
|
|
1844
|
+
g = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, F(e.maximized), R(), d.value = !0, e.noFocus !== !0 ? (document.activeElement !== null && document.activeElement.blur(), V(te)) : S(), m(() => {
|
|
1845
1845
|
if (a.proxy.$q.platform.is.ios === !0) {
|
|
1846
1846
|
if (e.seamless !== !0 && document.activeElement) {
|
|
1847
|
-
const { top:
|
|
1848
|
-
|
|
1847
|
+
const { top: O, bottom: M } = document.activeElement.getBoundingClientRect(), { innerHeight: z } = window, N = window.visualViewport !== void 0 ? window.visualViewport.height : z;
|
|
1848
|
+
O > 0 && M > N / 2 && (document.scrollingElement.scrollTop = Math.min(
|
|
1849
1849
|
document.scrollingElement.scrollHeight - N,
|
|
1850
|
-
|
|
1850
|
+
M >= z ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + M - N / 2)
|
|
1851
1851
|
)), document.activeElement.scrollIntoView();
|
|
1852
1852
|
}
|
|
1853
1853
|
y = !0, i.value.click(), y = !1;
|
|
1854
1854
|
}
|
|
1855
|
-
R(!0), d.value = !1, l("show",
|
|
1855
|
+
R(!0), d.value = !1, l("show", k);
|
|
1856
1856
|
}, e.transitionDuration);
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1859
|
-
S(),
|
|
1860
|
-
|
|
1858
|
+
function ne(k) {
|
|
1859
|
+
S(), q(!0), d.value = !0, P(), g !== null && (((k && k.type.indexOf("key") === 0 ? g.closest('[tabindex]:not([tabindex^="-"])') : void 0) || g).focus(), g = null), m(() => {
|
|
1860
|
+
P(!0), d.value = !1, l("hide", k);
|
|
1861
1861
|
}, e.transitionDuration);
|
|
1862
1862
|
}
|
|
1863
|
-
function te(
|
|
1863
|
+
function te(k) {
|
|
1864
1864
|
Nt(() => {
|
|
1865
|
-
let
|
|
1866
|
-
if (
|
|
1867
|
-
if (
|
|
1868
|
-
const
|
|
1869
|
-
if (
|
|
1870
|
-
|
|
1865
|
+
let O = i.value;
|
|
1866
|
+
if (O !== null) {
|
|
1867
|
+
if (k !== void 0) {
|
|
1868
|
+
const M = O.querySelector(k);
|
|
1869
|
+
if (M !== null) {
|
|
1870
|
+
M.focus({ preventScroll: !0 });
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
|
-
|
|
1874
|
+
O.contains(document.activeElement) !== !0 && (O = O.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || O.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || O.querySelector("[autofocus], [data-autofocus]") || O, O.focus({ preventScroll: !0 }));
|
|
1875
1875
|
}
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
1878
|
-
function X(
|
|
1879
|
-
|
|
1880
|
-
const
|
|
1881
|
-
|
|
1882
|
-
v = null, i.value !== null && (
|
|
1878
|
+
function X(k) {
|
|
1879
|
+
k && typeof k.focus == "function" ? k.focus({ preventScroll: !0 }) : te(), l("shake");
|
|
1880
|
+
const O = i.value;
|
|
1881
|
+
O !== null && (O.classList.remove("q-animate--scale"), O.classList.add("q-animate--scale"), v !== null && clearTimeout(v), v = setTimeout(() => {
|
|
1882
|
+
v = null, i.value !== null && (O.classList.remove("q-animate--scale"), te());
|
|
1883
1883
|
}, 170));
|
|
1884
1884
|
}
|
|
1885
1885
|
function re() {
|
|
1886
|
-
e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && X() : (l("escapeKey"),
|
|
1886
|
+
e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && X() : (l("escapeKey"), I()));
|
|
1887
1887
|
}
|
|
1888
|
-
function k
|
|
1889
|
-
v !== null && (clearTimeout(v), v = null), (
|
|
1888
|
+
function q(k) {
|
|
1889
|
+
v !== null && (clearTimeout(v), v = null), (k === !0 || u.value === !0) && (F(!1), e.seamless !== !0 && (r(!1), $t(p), yt(re))), k !== !0 && (g = null);
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1892
|
-
|
|
1891
|
+
function F(k) {
|
|
1892
|
+
k === !0 ? c !== !0 && (gt < 1 && document.body.classList.add("q-body--dialog"), gt++, c = !0) : c === !0 && (gt < 2 && document.body.classList.remove("q-body--dialog"), gt--, c = !1);
|
|
1893
1893
|
}
|
|
1894
|
-
function se(
|
|
1895
|
-
y !== !0 && (
|
|
1894
|
+
function se(k) {
|
|
1895
|
+
y !== !0 && (I(k), l("click", k));
|
|
1896
1896
|
}
|
|
1897
|
-
function s(
|
|
1898
|
-
e.persistent !== !0 && e.noBackdropDismiss !== !0 ?
|
|
1897
|
+
function s(k) {
|
|
1898
|
+
e.persistent !== !0 && e.noBackdropDismiss !== !0 ? I(k) : e.noShake !== !0 && X();
|
|
1899
1899
|
}
|
|
1900
|
-
function p(
|
|
1901
|
-
e.allowFocusOutside !== !0 && B.value === !0 &&
|
|
1900
|
+
function p(k) {
|
|
1901
|
+
e.allowFocusOutside !== !0 && B.value === !0 && $l(i.value, k.target) !== !0 && te('[tabindex]:not([tabindex="-1"])');
|
|
1902
1902
|
}
|
|
1903
1903
|
Object.assign(a.proxy, {
|
|
1904
1904
|
// expose public methods
|
|
1905
1905
|
focus: te,
|
|
1906
1906
|
shake: X,
|
|
1907
1907
|
// private but needed by QSelect
|
|
1908
|
-
__updateRefocusTarget(
|
|
1909
|
-
g =
|
|
1908
|
+
__updateRefocusTarget(k) {
|
|
1909
|
+
g = k || null;
|
|
1910
1910
|
}
|
|
1911
|
-
}), ce(
|
|
1912
|
-
function
|
|
1911
|
+
}), ce(q);
|
|
1912
|
+
function L() {
|
|
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(bt, {
|
|
@@ -1921,28 +1921,28 @@ const oi = {
|
|
|
1921
1921
|
appear: !0
|
|
1922
1922
|
}, () => G.value === !0 ? h("div", {
|
|
1923
1923
|
class: "q-dialog__backdrop fixed-full",
|
|
1924
|
-
style:
|
|
1924
|
+
style: C.value,
|
|
1925
1925
|
"aria-hidden": "true",
|
|
1926
1926
|
tabindex: -1,
|
|
1927
1927
|
onClick: s
|
|
1928
1928
|
}) : null),
|
|
1929
1929
|
h(
|
|
1930
1930
|
bt,
|
|
1931
|
-
|
|
1931
|
+
$.value,
|
|
1932
1932
|
() => u.value === !0 ? h("div", {
|
|
1933
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
|
]);
|
|
1941
1941
|
}
|
|
1942
|
-
return
|
|
1942
|
+
return j;
|
|
1943
1943
|
}
|
|
1944
1944
|
});
|
|
1945
|
-
let
|
|
1945
|
+
let wt = !1;
|
|
1946
1946
|
{
|
|
1947
1947
|
const e = document.createElement("div");
|
|
1948
1948
|
e.setAttribute("dir", "rtl"), Object.assign(e.style, {
|
|
@@ -1954,7 +1954,7 @@ let xt = !1;
|
|
|
1954
1954
|
Object.assign(t.style, {
|
|
1955
1955
|
width: "1000px",
|
|
1956
1956
|
height: "1px"
|
|
1957
|
-
}), document.body.appendChild(e), e.appendChild(t), e.scrollLeft = -1e3,
|
|
1957
|
+
}), document.body.appendChild(e), e.appendChild(t), e.scrollLeft = -1e3, wt = e.scrollLeft >= 0, e.remove();
|
|
1958
1958
|
}
|
|
1959
1959
|
const fe = 1e3, ui = [
|
|
1960
1960
|
"start",
|
|
@@ -1963,23 +1963,23 @@ const fe = 1e3, ui = [
|
|
|
1963
1963
|
"start-force",
|
|
1964
1964
|
"center-force",
|
|
1965
1965
|
"end-force"
|
|
1966
|
-
],
|
|
1966
|
+
], so = Array.prototype.filter, ai = 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
|
+
so.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
|
-
function
|
|
1979
|
+
function De(e, t) {
|
|
1980
1980
|
return e + t;
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1982
|
+
function It(e, t, l, o, a, i, u, d) {
|
|
1983
1983
|
const v = e === window ? document.scrollingElement || document.documentElement : e, g = a === !0 ? "offsetWidth" : "offsetHeight", c = {
|
|
1984
1984
|
scrollStart: 0,
|
|
1985
1985
|
scrollViewSize: -u - d,
|
|
@@ -1987,27 +1987,27 @@ function Ht(e, t, l, n, a, i, u, d) {
|
|
|
1987
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 = v.scrollLeft, c.scrollViewSize += v.clientWidth), c.scrollMaxSize = v.scrollWidth, i === !0 && (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 = v.scrollLeft, c.scrollViewSize += v.clientWidth), c.scrollMaxSize = v.scrollWidth, i === !0 && (c.scrollStart = (wt === !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 = v.scrollTop, c.scrollViewSize += v.clientHeight), c.scrollMaxSize = v.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 = v.getBoundingClientRect(),
|
|
1998
|
-
a === !0 ? (c.offsetStart +=
|
|
1997
|
+
const y = v.getBoundingClientRect(), x = t.getBoundingClientRect();
|
|
1998
|
+
a === !0 ? (c.offsetStart += x.left - y.left, c.offsetEnd -= x.width) : (c.offsetStart += x.top - y.top, c.offsetEnd -= x.height), e !== window && (c.offsetStart += c.scrollStart), c.offsetEnd += c.scrollMaxSize - c.offsetStart;
|
|
1999
1999
|
}
|
|
2000
2000
|
return c;
|
|
2001
2001
|
}
|
|
2002
|
-
function Tl(e, t, l,
|
|
2003
|
-
t === "end" && (t = (e === window ? document.body : e)[l === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? l === !0 ? (
|
|
2002
|
+
function Tl(e, t, l, o) {
|
|
2003
|
+
t === "end" && (t = (e === window ? document.body : e)[l === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? l === !0 ? (o === !0 && (t = (wt === !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 = (wt === !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, i = Math.floor(l / fe), u = Math.floor((
|
|
2009
|
-
let d = e.slice(i, u).reduce(
|
|
2010
|
-
return l % fe !== 0 && (d -= t.slice(i * fe, l).reduce(
|
|
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(De, 0);
|
|
2010
|
+
return l % fe !== 0 && (d -= t.slice(i * fe, l).reduce(De, 0)), o % fe !== 0 && o !== a && (d -= t.slice(o, u * fe).reduce(De, 0)), d;
|
|
2011
2011
|
}
|
|
2012
2012
|
const ri = {
|
|
2013
2013
|
virtualScrollSliceSize: {
|
|
@@ -2044,61 +2044,61 @@ function si({
|
|
|
2044
2044
|
virtualScrollLength: e,
|
|
2045
2045
|
getVirtualScrollTarget: t,
|
|
2046
2046
|
getVirtualScrollEl: l,
|
|
2047
|
-
virtualScrollItemSizeComputed:
|
|
2047
|
+
virtualScrollItemSizeComputed: o
|
|
2048
2048
|
// optional
|
|
2049
2049
|
}) {
|
|
2050
2050
|
const a = le(), { props: i, emit: u, proxy: d } = a, { $q: v } = d;
|
|
2051
|
-
let g, c, y,
|
|
2052
|
-
const m = T(0),
|
|
2053
|
-
|
|
2054
|
-
const B = f(() =>
|
|
2051
|
+
let g, c, y, x = [], r;
|
|
2052
|
+
const m = T(0), V = T(0), S = T({}), $ = T(null), E = T(null), C = T(null), R = T({ from: 0, to: 0 }), P = f(() => i.tableColspan !== void 0 ? i.tableColspan : 100);
|
|
2053
|
+
o === void 0 && (o = f(() => i.virtualScrollItemSize));
|
|
2054
|
+
const B = f(() => o.value + ";" + i.virtualScrollHorizontal), j = f(
|
|
2055
2055
|
() => B.value + ";" + i.virtualScrollSliceRatioBefore + ";" + i.virtualScrollSliceRatioAfter
|
|
2056
2056
|
);
|
|
2057
|
-
K(
|
|
2057
|
+
K(j, () => {
|
|
2058
2058
|
X();
|
|
2059
|
-
}), K(B,
|
|
2060
|
-
function
|
|
2059
|
+
}), K(B, I);
|
|
2060
|
+
function I() {
|
|
2061
2061
|
te(c, !0);
|
|
2062
2062
|
}
|
|
2063
2063
|
function Q(s) {
|
|
2064
2064
|
te(s === void 0 ? c : s);
|
|
2065
2065
|
}
|
|
2066
2066
|
function G(s, p) {
|
|
2067
|
-
const
|
|
2068
|
-
if (
|
|
2067
|
+
const L = t();
|
|
2068
|
+
if (L == null || L.nodeType === 8)
|
|
2069
2069
|
return;
|
|
2070
|
-
const
|
|
2071
|
-
|
|
2070
|
+
const k = It(
|
|
2071
|
+
L,
|
|
2072
2072
|
l(),
|
|
2073
|
-
|
|
2073
|
+
$.value,
|
|
2074
2074
|
E.value,
|
|
2075
2075
|
i.virtualScrollHorizontal,
|
|
2076
2076
|
v.lang.rtl,
|
|
2077
2077
|
i.virtualScrollStickySizeStart,
|
|
2078
2078
|
i.virtualScrollStickySizeEnd
|
|
2079
2079
|
);
|
|
2080
|
-
y !==
|
|
2081
|
-
|
|
2082
|
-
|
|
2080
|
+
y !== k.scrollViewSize && X(k.scrollViewSize), A(
|
|
2081
|
+
L,
|
|
2082
|
+
k,
|
|
2083
2083
|
Math.min(e.value - 1, Math.max(0, parseInt(s, 10) || 0)),
|
|
2084
2084
|
0,
|
|
2085
2085
|
ui.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;
|
|
2092
|
-
const p =
|
|
2092
|
+
const p = It(
|
|
2093
2093
|
s,
|
|
2094
2094
|
l(),
|
|
2095
|
-
|
|
2095
|
+
$.value,
|
|
2096
2096
|
E.value,
|
|
2097
2097
|
i.virtualScrollHorizontal,
|
|
2098
2098
|
v.lang.rtl,
|
|
2099
2099
|
i.virtualScrollStickySizeStart,
|
|
2100
2100
|
i.virtualScrollStickySizeEnd
|
|
2101
|
-
),
|
|
2101
|
+
), L = e.value - 1, k = p.scrollMaxSize - p.offsetStart - p.offsetEnd - V.value;
|
|
2102
2102
|
if (g === p.scrollStart)
|
|
2103
2103
|
return;
|
|
2104
2104
|
if (p.scrollMaxSize <= 0) {
|
|
@@ -2106,114 +2106,114 @@ function si({
|
|
|
2106
2106
|
return;
|
|
2107
2107
|
}
|
|
2108
2108
|
y !== p.scrollViewSize && X(p.scrollViewSize), U(R.value.from);
|
|
2109
|
-
const
|
|
2110
|
-
if (
|
|
2109
|
+
const O = Math.floor(p.scrollMaxSize - Math.max(p.scrollViewSize, p.offsetEnd) - Math.min(r[L], p.scrollViewSize / 2));
|
|
2110
|
+
if (O > 0 && Math.ceil(p.scrollStart) >= O) {
|
|
2111
2111
|
A(
|
|
2112
2112
|
s,
|
|
2113
2113
|
p,
|
|
2114
|
-
|
|
2115
|
-
p.scrollMaxSize - p.offsetEnd -
|
|
2114
|
+
L,
|
|
2115
|
+
p.scrollMaxSize - p.offsetEnd - x.reduce(De, 0)
|
|
2116
2116
|
);
|
|
2117
2117
|
return;
|
|
2118
2118
|
}
|
|
2119
|
-
let
|
|
2120
|
-
if (z <=
|
|
2121
|
-
z -= m.value,
|
|
2119
|
+
let M = 0, z = p.scrollStart - p.offsetStart, N = z;
|
|
2120
|
+
if (z <= k && z + p.scrollViewSize >= m.value)
|
|
2121
|
+
z -= m.value, M = R.value.from, N = z;
|
|
2122
2122
|
else
|
|
2123
|
-
for (let b = 0; z >=
|
|
2124
|
-
z -=
|
|
2125
|
-
for (; z > 0 &&
|
|
2126
|
-
z -= r[
|
|
2123
|
+
for (let b = 0; z >= x[b] && M < L; b++)
|
|
2124
|
+
z -= x[b], M += fe;
|
|
2125
|
+
for (; z > 0 && M < L; )
|
|
2126
|
+
z -= r[M], z > -p.scrollViewSize ? (M++, N = z) : N = r[M] + z;
|
|
2127
2127
|
A(
|
|
2128
2128
|
s,
|
|
2129
2129
|
p,
|
|
2130
|
-
|
|
2130
|
+
M,
|
|
2131
2131
|
N
|
|
2132
2132
|
);
|
|
2133
2133
|
}
|
|
2134
|
-
function A(s, p,
|
|
2135
|
-
const
|
|
2136
|
-
let b = Math.max(0,
|
|
2134
|
+
function A(s, p, L, k, O) {
|
|
2135
|
+
const M = typeof O == "string" && O.indexOf("-force") !== -1, z = M === !0 ? O.replace("-force", "") : O, N = z !== void 0 ? z : "start";
|
|
2136
|
+
let b = Math.max(0, L - S.value[N]), Z = b + S.value.total;
|
|
2137
2137
|
Z > e.value && (Z = e.value, b = Math.max(0, Z - S.value.total)), g = p.scrollStart;
|
|
2138
2138
|
const ve = b !== R.value.from || Z !== R.value.to;
|
|
2139
2139
|
if (ve === !1 && z === void 0) {
|
|
2140
|
-
|
|
2140
|
+
q(L);
|
|
2141
2141
|
return;
|
|
2142
2142
|
}
|
|
2143
|
-
const { activeElement: ze } = document, me =
|
|
2144
|
-
ve === !0 && me !== null && me !== ze && me.contains(ze) === !0 && (me.addEventListener("focusout",
|
|
2145
|
-
me !== null && me.removeEventListener("focusout",
|
|
2146
|
-
})), ai(me,
|
|
2147
|
-
const
|
|
2143
|
+
const { activeElement: ze } = document, me = C.value;
|
|
2144
|
+
ve === !0 && me !== null && me !== ze && me.contains(ze) === !0 && (me.addEventListener("focusout", ne), setTimeout(() => {
|
|
2145
|
+
me !== null && me.removeEventListener("focusout", ne);
|
|
2146
|
+
})), ai(me, L - b);
|
|
2147
|
+
const nt = z !== void 0 ? r.slice(b, L).reduce(De, 0) : 0;
|
|
2148
2148
|
if (ve === !0) {
|
|
2149
|
-
const
|
|
2150
|
-
R.value = { from: b, to:
|
|
2151
|
-
R.value.to !== Z && g === p.scrollStart && (R.value = { from: R.value.from, to: Z },
|
|
2149
|
+
const qe = Z >= R.value.from && b <= R.value.to ? R.value.to : Z;
|
|
2150
|
+
R.value = { from: b, to: qe }, m.value = Ge(x, r, 0, b), V.value = Ge(x, r, Z, e.value), requestAnimationFrame(() => {
|
|
2151
|
+
R.value.to !== Z && g === p.scrollStart && (R.value = { from: R.value.from, to: Z }, V.value = Ge(x, r, Z, e.value));
|
|
2152
2152
|
});
|
|
2153
2153
|
}
|
|
2154
2154
|
requestAnimationFrame(() => {
|
|
2155
2155
|
if (g !== p.scrollStart)
|
|
2156
2156
|
return;
|
|
2157
2157
|
ve === !0 && U(b);
|
|
2158
|
-
const
|
|
2159
|
-
let Ne =
|
|
2158
|
+
const qe = r.slice(b, L).reduce(De, 0), Ce = qe + p.offsetStart + m.value, it = Ce + r[L];
|
|
2159
|
+
let Ne = Ce + k;
|
|
2160
2160
|
if (z !== void 0) {
|
|
2161
|
-
const
|
|
2162
|
-
Ne =
|
|
2161
|
+
const Ct = qe - nt, Ke = p.scrollStart + Ct;
|
|
2162
|
+
Ne = M !== !0 && Ke < Ce && it < Ke + p.scrollViewSize ? Ke : z === "end" ? it - p.scrollViewSize : Ce - (z === "start" ? 0 : Math.round((p.scrollViewSize - r[L]) / 2));
|
|
2163
2163
|
}
|
|
2164
2164
|
g = Ne, Tl(
|
|
2165
2165
|
s,
|
|
2166
2166
|
Ne,
|
|
2167
2167
|
i.virtualScrollHorizontal,
|
|
2168
2168
|
v.lang.rtl
|
|
2169
|
-
),
|
|
2169
|
+
), q(L);
|
|
2170
2170
|
});
|
|
2171
2171
|
}
|
|
2172
2172
|
function U(s) {
|
|
2173
|
-
const p =
|
|
2173
|
+
const p = C.value;
|
|
2174
2174
|
if (p) {
|
|
2175
|
-
const
|
|
2175
|
+
const L = so.call(
|
|
2176
2176
|
p.children,
|
|
2177
2177
|
(b) => b.classList && b.classList.contains("q-virtual-scroll--skip") === !1
|
|
2178
|
-
),
|
|
2179
|
-
let
|
|
2180
|
-
for (let b = 0; b <
|
|
2181
|
-
for (z =
|
|
2182
|
-
z +=
|
|
2183
|
-
N = z - r[
|
|
2178
|
+
), k = L.length, O = i.virtualScrollHorizontal === !0 ? (b) => b.getBoundingClientRect().width : (b) => b.offsetHeight;
|
|
2179
|
+
let M = s, z, N;
|
|
2180
|
+
for (let b = 0; b < k; ) {
|
|
2181
|
+
for (z = O(L[b]), b++; b < k && L[b].classList.contains("q-virtual-scroll--with-prev") === !0; )
|
|
2182
|
+
z += O(L[b]), b++;
|
|
2183
|
+
N = z - r[M], N !== 0 && (r[M] += N, x[Math.floor(M / fe)] += N), M++;
|
|
2184
2184
|
}
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2188
|
-
|
|
2187
|
+
function ne() {
|
|
2188
|
+
C.value !== null && C.value !== void 0 && C.value.focus();
|
|
2189
2189
|
}
|
|
2190
2190
|
function te(s, p) {
|
|
2191
|
-
const
|
|
2191
|
+
const L = 1 * o.value;
|
|
2192
2192
|
(p === !0 || Array.isArray(r) === !1) && (r = []);
|
|
2193
|
-
const
|
|
2193
|
+
const k = r.length;
|
|
2194
2194
|
r.length = e.value;
|
|
2195
|
-
for (let
|
|
2196
|
-
r[
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2199
|
-
for (let
|
|
2195
|
+
for (let M = e.value - 1; M >= k; M--)
|
|
2196
|
+
r[M] = L;
|
|
2197
|
+
const O = Math.floor((e.value - 1) / fe);
|
|
2198
|
+
x = [];
|
|
2199
|
+
for (let M = 0; M <= O; M++) {
|
|
2200
2200
|
let z = 0;
|
|
2201
|
-
const N = Math.min((
|
|
2202
|
-
for (let b =
|
|
2201
|
+
const N = Math.min((M + 1) * fe, e.value);
|
|
2202
|
+
for (let b = M * fe; b < N; b++)
|
|
2203
2203
|
z += r[b];
|
|
2204
|
-
|
|
2204
|
+
x.push(z);
|
|
2205
2205
|
}
|
|
2206
|
-
c = -1, g = void 0, m.value = Ge(
|
|
2206
|
+
c = -1, g = void 0, m.value = Ge(x, r, 0, R.value.from), V.value = Ge(x, r, R.value.to, e.value), s >= 0 ? (U(R.value.from), ue(() => {
|
|
2207
2207
|
G(s);
|
|
2208
|
-
})) :
|
|
2208
|
+
})) : F();
|
|
2209
2209
|
}
|
|
2210
2210
|
function X(s) {
|
|
2211
2211
|
if (s === void 0 && typeof window < "u") {
|
|
2212
2212
|
const z = t();
|
|
2213
|
-
z != null && z.nodeType !== 8 && (s =
|
|
2213
|
+
z != null && z.nodeType !== 8 && (s = It(
|
|
2214
2214
|
z,
|
|
2215
2215
|
l(),
|
|
2216
|
-
|
|
2216
|
+
$.value,
|
|
2217
2217
|
E.value,
|
|
2218
2218
|
i.virtualScrollHorizontal,
|
|
2219
2219
|
v.lang.rtl,
|
|
@@ -2222,45 +2222,45 @@ function si({
|
|
|
2222
2222
|
).scrollViewSize);
|
|
2223
2223
|
}
|
|
2224
2224
|
y = s;
|
|
2225
|
-
const p = parseFloat(i.virtualScrollSliceRatioBefore) || 0,
|
|
2225
|
+
const p = parseFloat(i.virtualScrollSliceRatioBefore) || 0, L = parseFloat(i.virtualScrollSliceRatioAfter) || 0, k = 1 + p + L, O = s === void 0 || s <= 0 ? 1 : Math.ceil(s / o.value), M = Math.max(
|
|
2226
2226
|
1,
|
|
2227
|
-
|
|
2228
|
-
Math.ceil((i.virtualScrollSliceSize > 0 ? i.virtualScrollSliceSize : 10) /
|
|
2227
|
+
O,
|
|
2228
|
+
Math.ceil((i.virtualScrollSliceSize > 0 ? i.virtualScrollSliceSize : 10) / k)
|
|
2229
2229
|
);
|
|
2230
2230
|
S.value = {
|
|
2231
|
-
total: Math.ceil(
|
|
2232
|
-
start: Math.ceil(
|
|
2233
|
-
center: Math.ceil(
|
|
2234
|
-
end: Math.ceil(
|
|
2235
|
-
view:
|
|
2231
|
+
total: Math.ceil(M * k),
|
|
2232
|
+
start: Math.ceil(M * p),
|
|
2233
|
+
center: Math.ceil(M * (0.5 + p)),
|
|
2234
|
+
end: Math.ceil(M * (1 + p)),
|
|
2235
|
+
view: O
|
|
2236
2236
|
};
|
|
2237
2237
|
}
|
|
2238
2238
|
function re(s, p) {
|
|
2239
|
-
const
|
|
2240
|
-
["--q-virtual-scroll-item-" +
|
|
2239
|
+
const L = i.virtualScrollHorizontal === !0 ? "width" : "height", k = {
|
|
2240
|
+
["--q-virtual-scroll-item-" + L]: o.value + "px"
|
|
2241
2241
|
};
|
|
2242
2242
|
return [
|
|
2243
2243
|
s === "tbody" ? h(s, {
|
|
2244
2244
|
class: "q-virtual-scroll__padding",
|
|
2245
2245
|
key: "before",
|
|
2246
|
-
ref:
|
|
2246
|
+
ref: $
|
|
2247
2247
|
}, [
|
|
2248
2248
|
h("tr", [
|
|
2249
2249
|
h("td", {
|
|
2250
|
-
style: { [
|
|
2251
|
-
colspan:
|
|
2250
|
+
style: { [L]: `${m.value}px`, ...k },
|
|
2251
|
+
colspan: P.value
|
|
2252
2252
|
})
|
|
2253
2253
|
])
|
|
2254
2254
|
]) : h(s, {
|
|
2255
2255
|
class: "q-virtual-scroll__padding",
|
|
2256
2256
|
key: "before",
|
|
2257
|
-
ref:
|
|
2258
|
-
style: { [
|
|
2257
|
+
ref: $,
|
|
2258
|
+
style: { [L]: `${m.value}px`, ...k }
|
|
2259
2259
|
}),
|
|
2260
2260
|
h(s, {
|
|
2261
2261
|
class: "q-virtual-scroll__content",
|
|
2262
2262
|
key: "content",
|
|
2263
|
-
ref:
|
|
2263
|
+
ref: C,
|
|
2264
2264
|
tabindex: -1
|
|
2265
2265
|
}, p.flat()),
|
|
2266
2266
|
s === "tbody" ? h(s, {
|
|
@@ -2270,19 +2270,19 @@ function si({
|
|
|
2270
2270
|
}, [
|
|
2271
2271
|
h("tr", [
|
|
2272
2272
|
h("td", {
|
|
2273
|
-
style: { [
|
|
2274
|
-
colspan:
|
|
2273
|
+
style: { [L]: `${V.value}px`, ...k },
|
|
2274
|
+
colspan: P.value
|
|
2275
2275
|
})
|
|
2276
2276
|
])
|
|
2277
2277
|
]) : h(s, {
|
|
2278
2278
|
class: "q-virtual-scroll__padding",
|
|
2279
2279
|
key: "after",
|
|
2280
2280
|
ref: E,
|
|
2281
|
-
style: { [
|
|
2281
|
+
style: { [L]: `${V.value}px`, ...k }
|
|
2282
2282
|
})
|
|
2283
2283
|
];
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2285
|
+
function q(s) {
|
|
2286
2286
|
c !== s && (i.onVirtualScroll !== void 0 && u("virtualScroll", {
|
|
2287
2287
|
index: s,
|
|
2288
2288
|
from: R.value.from,
|
|
@@ -2292,17 +2292,17 @@ function si({
|
|
|
2292
2292
|
}), c = s);
|
|
2293
2293
|
}
|
|
2294
2294
|
X();
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2295
|
+
const F = Ql(
|
|
2296
|
+
oe,
|
|
2297
2297
|
v.platform.is.ios === !0 ? 120 : 35
|
|
2298
2298
|
);
|
|
2299
|
-
|
|
2299
|
+
Ao(() => {
|
|
2300
2300
|
X();
|
|
2301
2301
|
});
|
|
2302
2302
|
let se = !1;
|
|
2303
|
-
return
|
|
2303
|
+
return xt(() => {
|
|
2304
2304
|
se = !0;
|
|
2305
|
-
}),
|
|
2305
|
+
}), jl(() => {
|
|
2306
2306
|
if (se !== !0) return;
|
|
2307
2307
|
const s = t();
|
|
2308
2308
|
g !== void 0 && s !== void 0 && s !== null && s.nodeType !== 8 ? Tl(
|
|
@@ -2312,16 +2312,16 @@ function si({
|
|
|
2312
2312
|
v.lang.rtl
|
|
2313
2313
|
) : G(c);
|
|
2314
2314
|
}), ce(() => {
|
|
2315
|
-
|
|
2316
|
-
}), Object.assign(d, { scrollTo: G, reset:
|
|
2315
|
+
F.cancel();
|
|
2316
|
+
}), Object.assign(d, { scrollTo: G, reset: I, refresh: Q }), {
|
|
2317
2317
|
virtualScrollSliceRange: R,
|
|
2318
2318
|
virtualScrollSliceSizeComputed: S,
|
|
2319
2319
|
setVirtualScrollSize: X,
|
|
2320
|
-
onVirtualScrollEvt:
|
|
2320
|
+
onVirtualScrollEvt: F,
|
|
2321
2321
|
localResetVirtualScroll: te,
|
|
2322
2322
|
padVirtualScroll: re,
|
|
2323
2323
|
scrollTo: G,
|
|
2324
|
-
reset:
|
|
2324
|
+
reset: I,
|
|
2325
2325
|
refresh: Q
|
|
2326
2326
|
};
|
|
2327
2327
|
}
|
|
@@ -2331,21 +2331,21 @@ function mi(e) {
|
|
|
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" && (
|
|
2334
|
+
} else l.type === "compositionupdate" && l.target.qComposing !== !0 && typeof l.data == "string" && (_e.is.firefox === !0 ? vi.test(l.data) === !1 : ci.test(l.data) === !0 || di.test(l.data) === !0 || fi.test(l.data) === !0) === !0 && (l.target.qComposing = !0);
|
|
2335
2335
|
};
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function xe(e, t) {
|
|
2338
2338
|
if (e === t)
|
|
2339
2339
|
return !0;
|
|
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 (
|
|
2347
|
+
for (o = l; o-- !== 0; )
|
|
2348
|
+
if (xe(e[o], t[o]) !== !0)
|
|
2349
2349
|
return !1;
|
|
2350
2350
|
return !0;
|
|
2351
2351
|
}
|
|
@@ -2353,15 +2353,15 @@ function Ce(e, t) {
|
|
|
2353
2353
|
if (e.size !== t.size)
|
|
2354
2354
|
return !1;
|
|
2355
2355
|
let i = e.entries();
|
|
2356
|
-
for (
|
|
2357
|
-
if (t.has(
|
|
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 (i = e.entries(),
|
|
2362
|
-
if (
|
|
2361
|
+
for (i = e.entries(), o = i.next(); o.done !== !0; ) {
|
|
2362
|
+
if (xe(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
|
}
|
|
@@ -2369,18 +2369,18 @@ function Ce(e, t) {
|
|
|
2369
2369
|
if (e.size !== t.size)
|
|
2370
2370
|
return !1;
|
|
2371
2371
|
const i = e.entries();
|
|
2372
|
-
for (
|
|
2373
|
-
if (t.has(
|
|
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
|
}
|
|
@@ -2393,9 +2393,9 @@ function Ce(e, t) {
|
|
|
2393
2393
|
const a = Object.keys(e).filter((i) => e[i] !== void 0);
|
|
2394
2394
|
if (l = a.length, l !== Object.keys(t).filter((i) => t[i] !== void 0).length)
|
|
2395
2395
|
return !1;
|
|
2396
|
-
for (
|
|
2397
|
-
const i = a[
|
|
2398
|
-
if (
|
|
2396
|
+
for (o = l; o-- !== 0; ) {
|
|
2397
|
+
const i = a[o];
|
|
2398
|
+
if (xe(e[i], t[i]) !== !0)
|
|
2399
2399
|
return !1;
|
|
2400
2400
|
}
|
|
2401
2401
|
return !0;
|
|
@@ -2405,22 +2405,22 @@ function Ce(e, t) {
|
|
|
2405
2405
|
function zl(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
|
|
2413
|
-
function
|
|
2412
|
+
const Ml = (e) => ["add", "add-unique", "toggle"].includes(e), hi = ".*+?^${}()|[]\\", gi = Object.keys(Kt);
|
|
2413
|
+
function Ht(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
2418
|
const pi = be({
|
|
2419
2419
|
name: "QSelect",
|
|
2420
2420
|
inheritAttrs: !1,
|
|
2421
2421
|
props: {
|
|
2422
2422
|
...Rl,
|
|
2423
|
-
...
|
|
2423
|
+
...Wl,
|
|
2424
2424
|
...Kt,
|
|
2425
2425
|
// override of useFieldProps > modelValue
|
|
2426
2426
|
modelValue: {
|
|
@@ -2460,7 +2460,7 @@ const pi = be({
|
|
|
2460
2460
|
useChips: Boolean,
|
|
2461
2461
|
newValueMode: {
|
|
2462
2462
|
type: String,
|
|
2463
|
-
validator:
|
|
2463
|
+
validator: Ml
|
|
2464
2464
|
},
|
|
2465
2465
|
mapOptions: Boolean,
|
|
2466
2466
|
emitValue: Boolean,
|
|
@@ -2502,43 +2502,43 @@ const pi = be({
|
|
|
2502
2502
|
"filterAbort"
|
|
2503
2503
|
],
|
|
2504
2504
|
setup(e, { slots: t, emit: l }) {
|
|
2505
|
-
const { proxy:
|
|
2506
|
-
let y = null,
|
|
2507
|
-
const
|
|
2508
|
-
virtualScrollSliceRange:
|
|
2505
|
+
const { proxy: o } = le(), { $q: a } = o, i = T(!1), u = T(!1), d = T(-1), v = T(""), g = T(!1), c = T(!1);
|
|
2506
|
+
let y = null, x = null, r, m, V, S = null, $, E, C, R;
|
|
2507
|
+
const P = T(null), B = T(null), j = T(null), I = T(null), Q = T(null), G = ln(e), oe = mi(ll), 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
|
-
onVirtualScrollEvt:
|
|
2513
|
-
scrollTo:
|
|
2512
|
+
onVirtualScrollEvt: q,
|
|
2513
|
+
scrollTo: F,
|
|
2514
2514
|
setVirtualScrollSize: se
|
|
2515
2515
|
} = si({
|
|
2516
2516
|
virtualScrollLength: A,
|
|
2517
|
-
getVirtualScrollTarget:
|
|
2517
|
+
getVirtualScrollTarget: mo,
|
|
2518
2518
|
getVirtualScrollEl: el,
|
|
2519
2519
|
virtualScrollItemSizeComputed: U
|
|
2520
2520
|
}), s = Yl(), p = f(() => {
|
|
2521
|
-
const
|
|
2521
|
+
const n = e.mapOptions === !0 && e.multiple !== !0, _ = 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
|
|
2524
|
-
return e.modelValue === null &&
|
|
2523
|
+
const w = e.mapOptions === !0 && r !== void 0 ? r : [], H = _.map((W) => vo(W, w));
|
|
2524
|
+
return e.modelValue === null && n === !0 ? H.filter((W) => W !== null) : H;
|
|
2525
2525
|
}
|
|
2526
|
-
return
|
|
2527
|
-
}),
|
|
2528
|
-
const
|
|
2529
|
-
return gi.forEach((
|
|
2530
|
-
const
|
|
2531
|
-
|
|
2532
|
-
}),
|
|
2533
|
-
}),
|
|
2534
|
-
let
|
|
2535
|
-
return e.hideSelected === !0 || p.value.length === 0 ? [
|
|
2526
|
+
return _;
|
|
2527
|
+
}), L = f(() => {
|
|
2528
|
+
const n = {};
|
|
2529
|
+
return gi.forEach((_) => {
|
|
2530
|
+
const w = e[_];
|
|
2531
|
+
w !== void 0 && (n[_] = w);
|
|
2532
|
+
}), n;
|
|
2533
|
+
}), k = f(() => e.optionsDark === null ? s.isDark.value : e.optionsDark), O = f(() => Dt(p.value)), M = f(() => {
|
|
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,
|
|
@@ -2547,279 +2547,279 @@ const pi = be({
|
|
|
2547
2547
|
"aria-expanded": i.value === !0 ? "true" : "false",
|
|
2548
2548
|
"aria-controls": `${s.targetUid.value}_lb`
|
|
2549
2549
|
};
|
|
2550
|
-
return d.value >= 0 && (
|
|
2551
|
-
}),
|
|
2550
|
+
return d.value >= 0 && (n["aria-activedescendant"] = `${s.targetUid.value}_${d.value}`), n;
|
|
2551
|
+
}), qe = f(() => ({
|
|
2552
2552
|
id: `${s.targetUid.value}_lb`,
|
|
2553
2553
|
role: "listbox",
|
|
2554
2554
|
"aria-multiselectable": e.multiple === !0 ? "true" : "false"
|
|
2555
|
-
})),
|
|
2556
|
-
index:
|
|
2557
|
-
opt:
|
|
2558
|
-
html: ve.value(
|
|
2555
|
+
})), Ce = f(() => p.value.map((n, _) => ({
|
|
2556
|
+
index: _,
|
|
2557
|
+
opt: n,
|
|
2558
|
+
html: ve.value(n),
|
|
2559
2559
|
selected: !0,
|
|
2560
|
-
removeAtIndex:
|
|
2561
|
-
toggleOption:
|
|
2560
|
+
removeAtIndex: fo,
|
|
2561
|
+
toggleOption: ke,
|
|
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
|
|
2566
|
+
const { from: n, to: _ } = ne.value;
|
|
2567
|
+
return e.options.slice(n, _).map((w, H) => {
|
|
2568
|
+
const W = Me.value(w) === !0, D = Vt(w) === !0, J = n + H, Y = {
|
|
2569
2569
|
clickable: !0,
|
|
2570
|
-
active:
|
|
2570
|
+
active: D,
|
|
2571
2571
|
activeClass: Ke.value,
|
|
2572
2572
|
manualFocus: !0,
|
|
2573
2573
|
focused: !1,
|
|
2574
|
-
disable:
|
|
2574
|
+
disable: W,
|
|
2575
2575
|
tabindex: -1,
|
|
2576
2576
|
dense: e.optionsDense,
|
|
2577
|
-
dark:
|
|
2577
|
+
dark: k.value,
|
|
2578
2578
|
role: "option",
|
|
2579
|
-
"aria-selected":
|
|
2579
|
+
"aria-selected": D === !0 ? "true" : "false",
|
|
2580
2580
|
id: `${s.targetUid.value}_${J}`,
|
|
2581
2581
|
onClick: () => {
|
|
2582
|
-
|
|
2582
|
+
ke(w);
|
|
2583
2583
|
}
|
|
2584
2584
|
};
|
|
2585
|
-
return
|
|
2586
|
-
i.value === !0 &&
|
|
2585
|
+
return W !== !0 && (d.value === J && (Y.focused = !0), a.platform.is.desktop === !0 && (Y.onMousemove = () => {
|
|
2586
|
+
i.value === !0 && Fe(J);
|
|
2587
2587
|
})), {
|
|
2588
2588
|
index: J,
|
|
2589
|
-
opt:
|
|
2590
|
-
html: ve.value(
|
|
2591
|
-
label: ie.value(
|
|
2589
|
+
opt: w,
|
|
2590
|
+
html: ve.value(w),
|
|
2591
|
+
label: ie.value(w),
|
|
2592
2592
|
selected: Y.active,
|
|
2593
2593
|
focused: Y.focused,
|
|
2594
|
-
toggleOption:
|
|
2595
|
-
setOptionIndex:
|
|
2594
|
+
toggleOption: ke,
|
|
2595
|
+
setOptionIndex: Fe,
|
|
2596
2596
|
itemProps: Y
|
|
2597
2597
|
};
|
|
2598
2598
|
});
|
|
2599
|
-
}), Ne = f(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : a.iconSet.arrow.dropdown),
|
|
2599
|
+
}), Ne = f(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : a.iconSet.arrow.dropdown), Ct = 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(() =>
|
|
2602
|
-
const
|
|
2601
|
+
), Ke = f(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), he = f(() => Ht(e.optionValue, "value")), ie = f(() => Ht(e.optionLabel, "label")), Me = f(() => Ht(e.optionDisable, "disable")), ut = f(() => p.value.map(he.value)), co = f(() => {
|
|
2602
|
+
const n = {
|
|
2603
2603
|
onInput: ll,
|
|
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: Jt,
|
|
2610
2610
|
onKeyup: Gt,
|
|
2611
2611
|
onKeypress: Zt,
|
|
2612
2612
|
onFocus: Xt,
|
|
2613
|
-
onClick(
|
|
2614
|
-
m === !0 &&
|
|
2613
|
+
onClick(_) {
|
|
2614
|
+
m === !0 && Pe(_);
|
|
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,
|
|
2622
|
-
function Qt(
|
|
2623
|
-
return e.emitValue === !0 ? he.value(
|
|
2624
|
-
}
|
|
2625
|
-
function
|
|
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 || O.value !== !0) && (V !== !0 && Ie(), (u.value === !0 || i.value === !0) && je(""));
|
|
2621
|
+
}, { immediate: !0 }), K(() => e.fillInput, Ie), K(i, Et), K(A, ko);
|
|
2622
|
+
function Qt(n) {
|
|
2623
|
+
return e.emitValue === !0 ? he.value(n) : n;
|
|
2624
|
+
}
|
|
2625
|
+
function kt(n) {
|
|
2626
|
+
if (n !== -1 && n < p.value.length)
|
|
2627
2627
|
if (e.multiple === !0) {
|
|
2628
|
-
const
|
|
2629
|
-
l("remove", { index:
|
|
2628
|
+
const _ = e.modelValue.slice();
|
|
2629
|
+
l("remove", { index: n, value: _.splice(n, 1)[0] }), l("update:modelValue", _);
|
|
2630
2630
|
} else
|
|
2631
2631
|
l("update:modelValue", null);
|
|
2632
2632
|
}
|
|
2633
|
-
function
|
|
2634
|
-
|
|
2633
|
+
function fo(n) {
|
|
2634
|
+
kt(n), s.focus();
|
|
2635
2635
|
}
|
|
2636
|
-
function Ut(
|
|
2637
|
-
const
|
|
2636
|
+
function Ut(n, _) {
|
|
2637
|
+
const w = Qt(n);
|
|
2638
2638
|
if (e.multiple !== !0) {
|
|
2639
2639
|
e.fillInput === !0 && Qe(
|
|
2640
|
-
ie.value(
|
|
2640
|
+
ie.value(n),
|
|
2641
2641
|
!0,
|
|
2642
2642
|
!0
|
|
2643
|
-
), l("update:modelValue",
|
|
2643
|
+
), l("update:modelValue", w);
|
|
2644
2644
|
return;
|
|
2645
2645
|
}
|
|
2646
2646
|
if (p.value.length === 0) {
|
|
2647
|
-
l("add", { index: 0, value:
|
|
2647
|
+
l("add", { index: 0, value: w }), l("update:modelValue", e.multiple === !0 ? [w] : w);
|
|
2648
2648
|
return;
|
|
2649
2649
|
}
|
|
2650
|
-
if (
|
|
2650
|
+
if (_ === !0 && Vt(n) === !0 || e.maxValues !== void 0 && e.modelValue.length >= e.maxValues)
|
|
2651
2651
|
return;
|
|
2652
|
-
const
|
|
2653
|
-
l("add", { index:
|
|
2652
|
+
const H = e.modelValue.slice();
|
|
2653
|
+
l("add", { index: H.length, value: w }), H.push(w), l("update:modelValue", H);
|
|
2654
2654
|
}
|
|
2655
|
-
function
|
|
2656
|
-
if (s.editable.value !== !0 ||
|
|
2655
|
+
function ke(n, _) {
|
|
2656
|
+
if (s.editable.value !== !0 || n === void 0 || Me.value(n) === !0)
|
|
2657
2657
|
return;
|
|
2658
|
-
const
|
|
2658
|
+
const w = he.value(n);
|
|
2659
2659
|
if (e.multiple !== !0) {
|
|
2660
|
-
|
|
2661
|
-
e.fillInput === !0 ? ie.value(
|
|
2660
|
+
_ !== !0 && (Qe(
|
|
2661
|
+
e.fillInput === !0 ? ie.value(n) : "",
|
|
2662
2662
|
!0,
|
|
2663
2663
|
!0
|
|
2664
|
-
),
|
|
2664
|
+
), Ve()), B.value !== null && B.value.focus(), (p.value.length === 0 || xe(he.value(p.value[0]), w) !== !0) && l("update:modelValue", e.emitValue === !0 ? w : n);
|
|
2665
2665
|
return;
|
|
2666
2666
|
}
|
|
2667
2667
|
if ((m !== !0 || g.value === !0) && s.focus(), Xt(), p.value.length === 0) {
|
|
2668
|
-
const
|
|
2669
|
-
l("add", { index: 0, value:
|
|
2668
|
+
const D = e.emitValue === !0 ? w : n;
|
|
2669
|
+
l("add", { index: 0, value: D }), l("update:modelValue", e.multiple === !0 ? [D] : D);
|
|
2670
2670
|
return;
|
|
2671
2671
|
}
|
|
2672
|
-
const
|
|
2673
|
-
if (
|
|
2674
|
-
l("remove", { index:
|
|
2672
|
+
const H = e.modelValue.slice(), W = ut.value.findIndex((D) => xe(D, w));
|
|
2673
|
+
if (W !== -1)
|
|
2674
|
+
l("remove", { index: W, value: H.splice(W, 1)[0] });
|
|
2675
2675
|
else {
|
|
2676
|
-
if (e.maxValues !== void 0 &&
|
|
2676
|
+
if (e.maxValues !== void 0 && H.length >= e.maxValues)
|
|
2677
2677
|
return;
|
|
2678
|
-
const
|
|
2679
|
-
l("add", { index:
|
|
2678
|
+
const D = e.emitValue === !0 ? w : n;
|
|
2679
|
+
l("add", { index: H.length, value: D }), H.push(D);
|
|
2680
2680
|
}
|
|
2681
|
-
l("update:modelValue",
|
|
2681
|
+
l("update:modelValue", H);
|
|
2682
2682
|
}
|
|
2683
|
-
function
|
|
2683
|
+
function Fe(n) {
|
|
2684
2684
|
if (a.platform.is.desktop !== !0) return;
|
|
2685
|
-
const
|
|
2686
|
-
d.value !==
|
|
2685
|
+
const _ = n !== -1 && n < A.value ? n : -1;
|
|
2686
|
+
d.value !== _ && (d.value = _);
|
|
2687
2687
|
}
|
|
2688
|
-
function at(
|
|
2688
|
+
function at(n = 1, _) {
|
|
2689
2689
|
if (i.value === !0) {
|
|
2690
|
-
let
|
|
2690
|
+
let w = d.value;
|
|
2691
2691
|
do
|
|
2692
|
-
|
|
2693
|
-
|
|
2692
|
+
w = zl(
|
|
2693
|
+
w + n,
|
|
2694
2694
|
-1,
|
|
2695
2695
|
A.value - 1
|
|
2696
2696
|
);
|
|
2697
|
-
while (
|
|
2698
|
-
d.value !==
|
|
2699
|
-
|
|
2697
|
+
while (w !== -1 && w !== d.value && Me.value(e.options[w]) === !0);
|
|
2698
|
+
d.value !== w && (Fe(w), F(w), _ !== !0 && e.useInput === !0 && e.fillInput === !0 && rt(
|
|
2699
|
+
w >= 0 ? ie.value(e.options[w]) : $,
|
|
2700
2700
|
!0
|
|
2701
2701
|
));
|
|
2702
2702
|
}
|
|
2703
2703
|
}
|
|
2704
|
-
function
|
|
2705
|
-
const
|
|
2706
|
-
return e.options.find(
|
|
2704
|
+
function vo(n, _) {
|
|
2705
|
+
const w = (H) => xe(he.value(H), n);
|
|
2706
|
+
return e.options.find(w) || _.find(w) || n;
|
|
2707
2707
|
}
|
|
2708
|
-
function
|
|
2709
|
-
const
|
|
2710
|
-
return ut.value.find((
|
|
2708
|
+
function Vt(n) {
|
|
2709
|
+
const _ = he.value(n);
|
|
2710
|
+
return ut.value.find((w) => xe(w, _)) !== void 0;
|
|
2711
2711
|
}
|
|
2712
|
-
function Xt(
|
|
2713
|
-
e.useInput === !0 && B.value !== null && (
|
|
2712
|
+
function Xt(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 Yt(
|
|
2716
|
-
|
|
2715
|
+
function Yt(n) {
|
|
2716
|
+
qt(n, 27) === !0 && i.value === !0 && (Pe(n), Ve(), Ie()), l("keyup", n);
|
|
2717
2717
|
}
|
|
2718
|
-
function Gt(
|
|
2719
|
-
const { value:
|
|
2720
|
-
if (
|
|
2721
|
-
Yt(
|
|
2718
|
+
function Gt(n) {
|
|
2719
|
+
const { value: _ } = n.target;
|
|
2720
|
+
if (n.keyCode !== void 0) {
|
|
2721
|
+
Yt(n);
|
|
2722
2722
|
return;
|
|
2723
2723
|
}
|
|
2724
|
-
if (
|
|
2725
|
-
const
|
|
2726
|
-
const J = e.options.find((Y) => String(
|
|
2727
|
-
return J === void 0 ? !1 : (p.value.indexOf(J) === -1 ?
|
|
2728
|
-
},
|
|
2729
|
-
|
|
2724
|
+
if (n.target.value = "", y !== null && (clearTimeout(y), y = null), x !== null && (clearTimeout(x), x = null), Ie(), typeof _ == "string" && _.length !== 0) {
|
|
2725
|
+
const w = _.toLocaleLowerCase(), H = (D) => {
|
|
2726
|
+
const J = e.options.find((Y) => String(D.value(Y)).toLocaleLowerCase() === w);
|
|
2727
|
+
return J === void 0 ? !1 : (p.value.indexOf(J) === -1 ? ke(J) : Ve(), !0);
|
|
2728
|
+
}, W = (D) => {
|
|
2729
|
+
H(he) !== !0 && D !== !0 && H(ie) !== !0 && je(_, !0, () => W(!0));
|
|
2730
2730
|
};
|
|
2731
|
-
|
|
2731
|
+
W();
|
|
2732
2732
|
} else
|
|
2733
|
-
s.clearValue(
|
|
2733
|
+
s.clearValue(n);
|
|
2734
2734
|
}
|
|
2735
|
-
function Zt(
|
|
2736
|
-
l("keypress",
|
|
2735
|
+
function Zt(n) {
|
|
2736
|
+
l("keypress", n);
|
|
2737
2737
|
}
|
|
2738
|
-
function Jt(
|
|
2739
|
-
if (l("keydown",
|
|
2738
|
+
function Jt(n) {
|
|
2739
|
+
if (l("keydown", n), Xo(n) === !0)
|
|
2740
2740
|
return;
|
|
2741
|
-
const
|
|
2742
|
-
if (
|
|
2743
|
-
pe(
|
|
2741
|
+
const _ = v.value.length !== 0 && (e.newValueMode !== void 0 || e.onNewValue !== void 0), w = n.shiftKey !== !0 && e.disableTabSelection !== !0 && e.multiple !== !0 && (d.value !== -1 || _ === !0);
|
|
2742
|
+
if (n.keyCode === 27) {
|
|
2743
|
+
pe(n);
|
|
2744
2744
|
return;
|
|
2745
2745
|
}
|
|
2746
|
-
if (
|
|
2747
|
-
|
|
2746
|
+
if (n.keyCode === 9 && w === !1) {
|
|
2747
|
+
Le();
|
|
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), Oe();
|
|
2753
2753
|
return;
|
|
2754
2754
|
}
|
|
2755
|
-
if (
|
|
2756
|
-
e.multiple === !0 && Array.isArray(e.modelValue) === !0 ?
|
|
2755
|
+
if (n.keyCode === 8 && (e.useChips === !0 || e.clearable === !0) && e.hideSelected !== !0 && v.value.length === 0) {
|
|
2756
|
+
e.multiple === !0 && Array.isArray(e.modelValue) === !0 ? kt(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 v.value != "string" || v.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(
|
|
2766
|
-
const
|
|
2767
|
-
if ((
|
|
2768
|
-
i.value !== !0 &&
|
|
2769
|
-
const
|
|
2770
|
-
R = Date.now() + 1500,
|
|
2771
|
-
const J = new RegExp("^" +
|
|
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
|
+
const H = A.value;
|
|
2767
|
+
if ((C === void 0 || R < Date.now()) && (C = ""), H > 0 && e.useInput !== !0 && n.key !== void 0 && n.key.length === 1 && n.altKey === !1 && n.ctrlKey === !1 && n.metaKey === !1 && (n.keyCode !== 32 || C.length !== 0)) {
|
|
2768
|
+
i.value !== !0 && Oe(n);
|
|
2769
|
+
const W = n.key.toLocaleLowerCase(), D = C.length === 1 && C[0] === W;
|
|
2770
|
+
R = Date.now() + 1500, D === !1 && (ae(n), C += W);
|
|
2771
|
+
const J = new RegExp("^" + C.split("").map((Bt) => hi.indexOf(Bt) !== -1 ? "\\" + Bt : Bt).join(".*"), "i");
|
|
2772
2772
|
let Y = d.value;
|
|
2773
|
-
if (
|
|
2773
|
+
if (D === !0 || Y < 0 || J.test(ie.value(e.options[Y])) !== !0)
|
|
2774
2774
|
do
|
|
2775
|
-
Y = zl(Y + 1, -1,
|
|
2776
|
-
while (Y !== d.value && (
|
|
2775
|
+
Y = zl(Y + 1, -1, H - 1);
|
|
2776
|
+
while (Y !== d.value && (Me.value(e.options[Y]) === !0 || J.test(ie.value(e.options[Y])) !== !0));
|
|
2777
2777
|
d.value !== Y && ue(() => {
|
|
2778
|
-
|
|
2778
|
+
Fe(Y), F(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 (
|
|
2784
|
-
|
|
2782
|
+
if (!(n.keyCode !== 13 && (n.keyCode !== 32 || e.useInput === !0 || C !== "") && (n.keyCode !== 9 || w === !1))) {
|
|
2783
|
+
if (n.keyCode !== 9 && ae(n), d.value !== -1 && d.value < H) {
|
|
2784
|
+
ke(e.options[d.value]);
|
|
2785
2785
|
return;
|
|
2786
2786
|
}
|
|
2787
|
-
if (
|
|
2788
|
-
const
|
|
2787
|
+
if (_ === !0) {
|
|
2788
|
+
const W = (D, J) => {
|
|
2789
2789
|
if (J) {
|
|
2790
|
-
if (
|
|
2790
|
+
if (Ml(J) !== !0)
|
|
2791
2791
|
return;
|
|
2792
2792
|
} else
|
|
2793
2793
|
J = e.newValueMode;
|
|
2794
|
-
if (Qe("", e.multiple !== !0, !0),
|
|
2794
|
+
if (Qe("", e.multiple !== !0, !0), D == null)
|
|
2795
2795
|
return;
|
|
2796
|
-
(J === "toggle" ?
|
|
2796
|
+
(J === "toggle" ? ke : Ut)(D, J === "add-unique"), e.multiple !== !0 && (B.value !== null && B.value.focus(), Ve());
|
|
2797
2797
|
};
|
|
2798
|
-
if (e.onNewValue !== void 0 ? l("newValue", v.value,
|
|
2798
|
+
if (e.onNewValue !== void 0 ? l("newValue", v.value, W) : W(v.value), e.multiple !== !0)
|
|
2799
2799
|
return;
|
|
2800
2800
|
}
|
|
2801
|
-
i.value === !0 ?
|
|
2801
|
+
i.value === !0 ? Le() : s.innerLoading.value !== !0 && Oe();
|
|
2802
2802
|
}
|
|
2803
2803
|
}
|
|
2804
2804
|
function el() {
|
|
2805
|
-
return m === !0 ? Q.value :
|
|
2805
|
+
return m === !0 ? Q.value : j.value !== null && j.value.contentEl !== null ? j.value.contentEl : void 0;
|
|
2806
2806
|
}
|
|
2807
|
-
function
|
|
2807
|
+
function mo() {
|
|
2808
2808
|
return el();
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2811
|
-
return e.hideSelected === !0 ? [] : t["selected-item"] !== void 0 ?
|
|
2812
|
-
key: "option-" +
|
|
2813
|
-
removable: s.editable.value === !0 &&
|
|
2810
|
+
function ho() {
|
|
2811
|
+
return e.hideSelected === !0 ? [] : t["selected-item"] !== void 0 ? Ce.value.map((n) => t["selected-item"](n)).slice() : t.selected !== void 0 ? [].concat(t.selected()) : e.useChips === !0 ? Ce.value.map((n, _) => h(qn, {
|
|
2812
|
+
key: "option-" + _,
|
|
2813
|
+
removable: s.editable.value === !0 && Me.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(_);
|
|
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
|
|
@@ -2829,81 +2829,81 @@ const pi = be({
|
|
|
2829
2829
|
function tl() {
|
|
2830
2830
|
if (N.value === !0)
|
|
2831
2831
|
return t["no-option"] !== void 0 ? t["no-option"]({ inputValue: v.value }) : void 0;
|
|
2832
|
-
const
|
|
2833
|
-
key:
|
|
2834
|
-
...
|
|
2832
|
+
const n = t.option !== void 0 ? t.option : (w) => h(Kl, {
|
|
2833
|
+
key: w.index,
|
|
2834
|
+
...w.itemProps
|
|
2835
2835
|
}, () => h(
|
|
2836
2836
|
pt,
|
|
2837
2837
|
() => h(
|
|
2838
2838
|
Nl,
|
|
2839
2839
|
() => h("span", {
|
|
2840
|
-
[
|
|
2840
|
+
[w.html === !0 ? "innerHTML" : "textContent"]: w.label
|
|
2841
2841
|
})
|
|
2842
2842
|
)
|
|
2843
2843
|
));
|
|
2844
|
-
let
|
|
2845
|
-
return t["before-options"] !== void 0 && (
|
|
2844
|
+
let _ = re("div", it.value.map(n));
|
|
2845
|
+
return t["before-options"] !== void 0 && (_ = t["before-options"]().concat(_)), Ol(t["after-options"], _);
|
|
2846
2846
|
}
|
|
2847
|
-
function
|
|
2848
|
-
const
|
|
2849
|
-
ref:
|
|
2847
|
+
function go(n, _) {
|
|
2848
|
+
const w = _ === !0 ? { ...nt.value, ...s.splitAttrs.attributes.value } : void 0, H = {
|
|
2849
|
+
ref: _ === !0 ? B : void 0,
|
|
2850
2850
|
key: "i_t",
|
|
2851
|
-
class:
|
|
2851
|
+
class: M.value,
|
|
2852
2852
|
style: e.inputStyle,
|
|
2853
2853
|
value: v.value !== void 0 ? v.value : "",
|
|
2854
2854
|
// required for Android in order to show ENTER key when in form
|
|
2855
2855
|
type: "search",
|
|
2856
|
-
...
|
|
2857
|
-
id:
|
|
2856
|
+
...w,
|
|
2857
|
+
id: _ === !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
|
+
...co.value
|
|
2864
2864
|
};
|
|
2865
|
-
return
|
|
2865
|
+
return n !== !0 && m === !0 && (Array.isArray(H.class) === !0 ? H.class = [...H.class, "no-pointer-events"] : H.class += " no-pointer-events"), h("input", H);
|
|
2866
2866
|
}
|
|
2867
|
-
function ll(
|
|
2868
|
-
y !== null && (clearTimeout(y), y = null),
|
|
2869
|
-
y = null,
|
|
2867
|
+
function ll(n) {
|
|
2868
|
+
y !== null && (clearTimeout(y), y = null), x !== null && (clearTimeout(x), x = null), !(n && n.target && n.target.qComposing === !0) && (rt(n.target.value || ""), V = !0, $ = v.value, s.focused.value !== !0 && (m !== !0 || g.value === !0) && s.focus(), e.onFilter !== void 0 && (y = setTimeout(() => {
|
|
2869
|
+
y = null, je(v.value);
|
|
2870
2870
|
}, e.inputDebounce)));
|
|
2871
2871
|
}
|
|
2872
|
-
function rt(
|
|
2873
|
-
v.value !==
|
|
2874
|
-
|
|
2872
|
+
function rt(n, _) {
|
|
2873
|
+
v.value !== n && (v.value = n, _ === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? l("inputValue", n) : x = setTimeout(() => {
|
|
2874
|
+
x = null, l("inputValue", n);
|
|
2875
2875
|
}, e.inputDebounce));
|
|
2876
2876
|
}
|
|
2877
|
-
function Qe(
|
|
2878
|
-
|
|
2877
|
+
function Qe(n, _, w) {
|
|
2878
|
+
V = w !== !0, e.useInput === !0 && (rt(n, !0), (_ === !0 || w !== !0) && ($ = n), _ !== !0 && je(n));
|
|
2879
2879
|
}
|
|
2880
|
-
function
|
|
2881
|
-
if (e.onFilter === void 0 ||
|
|
2880
|
+
function je(n, _, w) {
|
|
2881
|
+
if (e.onFilter === void 0 || _ !== !0 && s.focused.value !== !0)
|
|
2882
2882
|
return;
|
|
2883
|
-
s.innerLoading.value === !0 ? l("filterAbort") : (s.innerLoading.value = !0, c.value = !0),
|
|
2884
|
-
const
|
|
2883
|
+
s.innerLoading.value === !0 ? l("filterAbort") : (s.innerLoading.value = !0, c.value = !0), n !== "" && e.multiple !== !0 && p.value.length !== 0 && V !== !0 && n === ie.value(p.value[0]) && (n = "");
|
|
2884
|
+
const H = setTimeout(() => {
|
|
2885
2885
|
i.value === !0 && (i.value = !1);
|
|
2886
2886
|
}, 10);
|
|
2887
|
-
S !== null && clearTimeout(S), S =
|
|
2887
|
+
S !== null && clearTimeout(S), S = H, l(
|
|
2888
2888
|
"filter",
|
|
2889
|
-
|
|
2890
|
-
(
|
|
2891
|
-
(
|
|
2892
|
-
s.innerLoading.value = !1, s.editable.value === !0 && (
|
|
2893
|
-
|
|
2894
|
-
}), typeof
|
|
2895
|
-
|
|
2889
|
+
n,
|
|
2890
|
+
(W, D) => {
|
|
2891
|
+
(_ === !0 || s.focused.value === !0) && S === H && (clearTimeout(S), typeof W == "function" && W(), c.value = !1, ue(() => {
|
|
2892
|
+
s.innerLoading.value = !1, s.editable.value === !0 && (_ === !0 ? i.value === !0 && Ve() : i.value === !0 ? Et(!0) : i.value = !0), typeof D == "function" && ue(() => {
|
|
2893
|
+
D(o);
|
|
2894
|
+
}), typeof w == "function" && ue(() => {
|
|
2895
|
+
w(o);
|
|
2896
2896
|
});
|
|
2897
2897
|
}));
|
|
2898
2898
|
},
|
|
2899
2899
|
() => {
|
|
2900
|
-
s.focused.value === !0 && S ===
|
|
2900
|
+
s.focused.value === !0 && S === H && (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(
|
|
2906
|
-
ref:
|
|
2904
|
+
function po() {
|
|
2905
|
+
return h(Zn, {
|
|
2906
|
+
ref: j,
|
|
2907
2907
|
class: z.value,
|
|
2908
2908
|
style: e.popupContentStyle,
|
|
2909
2909
|
modelValue: i.value,
|
|
@@ -2912,52 +2912,52 @@ const pi = be({
|
|
|
2912
2912
|
anchor: e.menuAnchor,
|
|
2913
2913
|
self: e.menuSelf,
|
|
2914
2914
|
offset: e.menuOffset,
|
|
2915
|
-
dark:
|
|
2915
|
+
dark: k.value,
|
|
2916
2916
|
noParentEvent: !0,
|
|
2917
2917
|
noRefocus: !0,
|
|
2918
2918
|
noFocus: !0,
|
|
2919
2919
|
noRouteDismiss: e.popupNoRouteDismiss,
|
|
2920
|
-
square:
|
|
2920
|
+
square: Ct.value,
|
|
2921
2921
|
transitionShow: e.transitionShow,
|
|
2922
2922
|
transitionHide: e.transitionHide,
|
|
2923
2923
|
transitionDuration: e.transitionDuration,
|
|
2924
2924
|
separateClosePopup: !0,
|
|
2925
|
-
...
|
|
2926
|
-
onScrollPassive:
|
|
2927
|
-
onBeforeShow:
|
|
2928
|
-
onBeforeHide:
|
|
2929
|
-
onShow:
|
|
2925
|
+
...qe.value,
|
|
2926
|
+
onScrollPassive: q,
|
|
2927
|
+
onBeforeShow: nl,
|
|
2928
|
+
onBeforeHide: bo,
|
|
2929
|
+
onShow: yo
|
|
2930
2930
|
}, tl);
|
|
2931
2931
|
}
|
|
2932
|
-
function
|
|
2933
|
-
il(
|
|
2932
|
+
function bo(n) {
|
|
2933
|
+
il(n), Le();
|
|
2934
2934
|
}
|
|
2935
|
-
function
|
|
2935
|
+
function yo() {
|
|
2936
2936
|
se();
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2939
|
-
|
|
2938
|
+
function So(n) {
|
|
2939
|
+
Pe(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
|
-
|
|
2941
|
+
function _o(n) {
|
|
2942
|
+
Pe(n), ue(() => {
|
|
2943
2943
|
g.value = !1;
|
|
2944
2944
|
});
|
|
2945
2945
|
}
|
|
2946
|
-
function
|
|
2947
|
-
const
|
|
2948
|
-
h(
|
|
2946
|
+
function wo() {
|
|
2947
|
+
const n = [
|
|
2948
|
+
h(wn, {
|
|
2949
2949
|
class: `col-auto ${s.fieldClass.value}`,
|
|
2950
|
-
...
|
|
2950
|
+
...L.value,
|
|
2951
2951
|
for: s.targetUid.value,
|
|
2952
|
-
dark:
|
|
2952
|
+
dark: k.value,
|
|
2953
2953
|
square: !0,
|
|
2954
2954
|
loading: c.value,
|
|
2955
2955
|
itemAligned: !1,
|
|
2956
2956
|
filled: !0,
|
|
2957
2957
|
stackLabel: v.value.length !== 0,
|
|
2958
2958
|
...s.splitAttrs.listeners.value,
|
|
2959
|
-
onFocus:
|
|
2960
|
-
onBlur:
|
|
2959
|
+
onFocus: So,
|
|
2960
|
+
onBlur: _o
|
|
2961
2961
|
}, {
|
|
2962
2962
|
...t,
|
|
2963
2963
|
rawControl: () => s.getControl(!0),
|
|
@@ -2965,163 +2965,163 @@ const pi = be({
|
|
|
2965
2965
|
after: void 0
|
|
2966
2966
|
})
|
|
2967
2967
|
];
|
|
2968
|
-
return i.value === !0 &&
|
|
2968
|
+
return i.value === !0 && n.push(
|
|
2969
2969
|
h("div", {
|
|
2970
2970
|
ref: Q,
|
|
2971
2971
|
class: z.value + " scroll",
|
|
2972
2972
|
style: e.popupContentStyle,
|
|
2973
|
-
...
|
|
2973
|
+
...qe.value,
|
|
2974
2974
|
onClick: pe,
|
|
2975
|
-
onScrollPassive:
|
|
2975
|
+
onScrollPassive: q
|
|
2976
2976
|
}, tl())
|
|
2977
2977
|
), h(ii, {
|
|
2978
|
-
ref:
|
|
2978
|
+
ref: I,
|
|
2979
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: nl,
|
|
2986
|
+
onBeforeHide: xo,
|
|
2987
|
+
onHide: qo,
|
|
2988
|
+
onShow: Co
|
|
2989
2989
|
}, () => h("div", {
|
|
2990
|
-
class: "q-select__dialog" + (
|
|
2991
|
-
},
|
|
2990
|
+
class: "q-select__dialog" + (k.value === !0 ? " q-select__dialog--dark q-dark" : "") + (g.value === !0 ? " q-select__dialog--focused" : "")
|
|
2991
|
+
}, n));
|
|
2992
2992
|
}
|
|
2993
|
-
function
|
|
2994
|
-
il(
|
|
2993
|
+
function xo(n) {
|
|
2994
|
+
il(n), I.value !== null && I.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
|
-
|
|
2998
|
+
function qo(n) {
|
|
2999
|
+
Ve(), s.focused.value === !1 && l("blur", n), Ie();
|
|
3000
3000
|
}
|
|
3001
|
-
function
|
|
3002
|
-
const
|
|
3003
|
-
(
|
|
3001
|
+
function Co() {
|
|
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
|
-
function
|
|
3005
|
+
function Le() {
|
|
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
|
|
3009
|
-
s.editable.value === !0 && (m === !0 ? (s.onControlFocusin(
|
|
3008
|
+
function Oe(n) {
|
|
3009
|
+
s.editable.value === !0 && (m === !0 ? (s.onControlFocusin(n), u.value = !0, ue(() => {
|
|
3010
3010
|
s.focus();
|
|
3011
|
-
})) : s.focus(), e.onFilter !== void 0 ?
|
|
3011
|
+
})) : s.focus(), e.onFilter !== void 0 ? je(v.value) : (N.value !== !0 || t["no-option"] !== void 0) && (i.value = !0));
|
|
3012
3012
|
}
|
|
3013
|
-
function
|
|
3014
|
-
u.value = !1,
|
|
3013
|
+
function Ve() {
|
|
3014
|
+
u.value = !1, Le();
|
|
3015
3015
|
}
|
|
3016
|
-
function
|
|
3016
|
+
function Ie() {
|
|
3017
3017
|
e.useInput === !0 && Qe(
|
|
3018
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 Et(
|
|
3024
|
-
let
|
|
3025
|
-
if (
|
|
3023
|
+
function Et(n) {
|
|
3024
|
+
let _ = -1;
|
|
3025
|
+
if (n === !0) {
|
|
3026
3026
|
if (p.value.length !== 0) {
|
|
3027
|
-
const
|
|
3028
|
-
|
|
3027
|
+
const w = he.value(p.value[0]);
|
|
3028
|
+
_ = e.options.findIndex((H) => xe(he.value(H), w));
|
|
3029
3029
|
}
|
|
3030
|
-
X(
|
|
3030
|
+
X(_);
|
|
3031
3031
|
}
|
|
3032
|
-
|
|
3032
|
+
Fe(_);
|
|
3033
3033
|
}
|
|
3034
|
-
function
|
|
3034
|
+
function ko(n, _) {
|
|
3035
3035
|
i.value === !0 && s.innerLoading.value === !1 && (X(-1, !0), ue(() => {
|
|
3036
|
-
i.value === !0 && s.innerLoading.value === !1 && (
|
|
3036
|
+
i.value === !0 && s.innerLoading.value === !1 && (n > _ ? X() : Et(!0));
|
|
3037
3037
|
}));
|
|
3038
3038
|
}
|
|
3039
|
-
function
|
|
3040
|
-
u.value === !1 &&
|
|
3039
|
+
function ol() {
|
|
3040
|
+
u.value === !1 && j.value !== null && j.value.updatePosition();
|
|
3041
3041
|
}
|
|
3042
|
-
function
|
|
3043
|
-
|
|
3042
|
+
function nl(n) {
|
|
3043
|
+
n !== void 0 && Pe(n), l("popupShow", n), s.hasPopupOpen = !0, s.onControlFocusin(n);
|
|
3044
3044
|
}
|
|
3045
|
-
function il(
|
|
3046
|
-
|
|
3045
|
+
function il(n) {
|
|
3046
|
+
n !== void 0 && Pe(n), l("popupHide", n), s.hasPopupOpen = !1, s.onControlFocusout(n);
|
|
3047
3047
|
}
|
|
3048
3048
|
function ul() {
|
|
3049
3049
|
m = 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 && m === !0 && e.useInput === !0 ? "fade" : e.transitionShow;
|
|
3050
3050
|
}
|
|
3051
|
-
return
|
|
3052
|
-
y !== null && clearTimeout(y),
|
|
3053
|
-
}), Object.assign(
|
|
3054
|
-
showPopup:
|
|
3055
|
-
hidePopup:
|
|
3056
|
-
removeAtIndex:
|
|
3051
|
+
return Fl(ul), To(ol), ul(), ce(() => {
|
|
3052
|
+
y !== null && clearTimeout(y), x !== null && clearTimeout(x);
|
|
3053
|
+
}), Object.assign(o, {
|
|
3054
|
+
showPopup: Oe,
|
|
3055
|
+
hidePopup: Ve,
|
|
3056
|
+
removeAtIndex: kt,
|
|
3057
3057
|
add: Ut,
|
|
3058
|
-
toggleOption:
|
|
3058
|
+
toggleOption: ke,
|
|
3059
3059
|
getOptionIndex: () => d.value,
|
|
3060
|
-
setOptionIndex:
|
|
3060
|
+
setOptionIndex: Fe,
|
|
3061
3061
|
moveOptionSelection: at,
|
|
3062
|
-
filter:
|
|
3063
|
-
updateMenuPosition:
|
|
3062
|
+
filter: je,
|
|
3063
|
+
updateMenuPosition: ol,
|
|
3064
3064
|
updateInputValue: Qe,
|
|
3065
|
-
isOptionSelected:
|
|
3065
|
+
isOptionSelected: Vt,
|
|
3066
3066
|
getEmittingOptionValue: Qt,
|
|
3067
|
-
isOptionDisabled: (...
|
|
3068
|
-
getOptionValue: (...
|
|
3069
|
-
getOptionLabel: (...
|
|
3067
|
+
isOptionDisabled: (...n) => Me.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(
|
|
3073
3073
|
() => `q-select q-field--auto-height q-select--with${e.useInput !== !0 ? "out" : ""}-input q-select--with${e.useChips !== !0 ? "out" : ""}-chips q-select--${e.multiple === !0 ? "multiple" : "single"}`
|
|
3074
3074
|
),
|
|
3075
|
-
inputRef:
|
|
3075
|
+
inputRef: P,
|
|
3076
3076
|
targetRef: B,
|
|
3077
|
-
hasValue:
|
|
3078
|
-
showPopup:
|
|
3077
|
+
hasValue: O,
|
|
3078
|
+
showPopup: Oe,
|
|
3079
3079
|
floatingLabel: f(
|
|
3080
|
-
() => e.hideSelected !== !0 &&
|
|
3080
|
+
() => e.hideSelected !== !0 && O.value === !0 || typeof v.value == "number" || v.value.length !== 0 || Dt(e.displayValue)
|
|
3081
3081
|
),
|
|
3082
3082
|
getControlChild: () => {
|
|
3083
3083
|
if (s.editable.value !== !1 && (u.value === !0 || N.value !== !0 || t["no-option"] !== void 0))
|
|
3084
|
-
return m === !0 ?
|
|
3084
|
+
return m === !0 ? wo() : po();
|
|
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(
|
|
3093
|
-
|
|
3091
|
+
onFocusout(n) {
|
|
3092
|
+
s.onControlFocusout(n, () => {
|
|
3093
|
+
Ie(), Le();
|
|
3094
3094
|
});
|
|
3095
3095
|
},
|
|
3096
|
-
onClick(
|
|
3097
|
-
if (pe(
|
|
3098
|
-
|
|
3096
|
+
onClick(n) {
|
|
3097
|
+
if (pe(n), m !== !0 && i.value === !0) {
|
|
3098
|
+
Le(), B.value !== null && B.value.focus();
|
|
3099
3099
|
return;
|
|
3100
3100
|
}
|
|
3101
|
-
|
|
3101
|
+
Oe(n);
|
|
3102
3102
|
}
|
|
3103
3103
|
},
|
|
3104
|
-
getControl: (
|
|
3105
|
-
const
|
|
3104
|
+
getControl: (n) => {
|
|
3105
|
+
const _ = ho(), w = n === !0 || u.value !== !0 || m !== !0;
|
|
3106
3106
|
if (e.useInput === !0)
|
|
3107
|
-
|
|
3107
|
+
_.push(go(n, w));
|
|
3108
3108
|
else if (s.editable.value === !0) {
|
|
3109
|
-
const
|
|
3110
|
-
|
|
3109
|
+
const W = w === !0 ? nt.value : void 0;
|
|
3110
|
+
_.push(
|
|
3111
3111
|
h("input", {
|
|
3112
|
-
ref:
|
|
3112
|
+
ref: w === !0 ? B : void 0,
|
|
3113
3113
|
key: "d_t",
|
|
3114
3114
|
class: "q-select__focus-target",
|
|
3115
|
-
id:
|
|
3115
|
+
id: w === !0 ? s.targetUid.value : void 0,
|
|
3116
3116
|
value: Z.value,
|
|
3117
3117
|
readonly: !0,
|
|
3118
|
-
"data-autofocus":
|
|
3119
|
-
...
|
|
3118
|
+
"data-autofocus": n === !0 || e.autofocus === !0 || void 0,
|
|
3119
|
+
...W,
|
|
3120
3120
|
onKeydown: Jt,
|
|
3121
3121
|
onKeyup: Yt,
|
|
3122
3122
|
onKeypress: Zt
|
|
3123
3123
|
})
|
|
3124
|
-
),
|
|
3124
|
+
), w === !0 && typeof e.autocomplete == "string" && e.autocomplete.length !== 0 && _.push(
|
|
3125
3125
|
h("input", {
|
|
3126
3126
|
class: "q-select__autocomplete-input",
|
|
3127
3127
|
autocomplete: e.autocomplete,
|
|
@@ -3131,21 +3131,21 @@ const pi = be({
|
|
|
3131
3131
|
);
|
|
3132
3132
|
}
|
|
3133
3133
|
if (G.value !== void 0 && e.disable !== !0 && ut.value.length !== 0) {
|
|
3134
|
-
const
|
|
3135
|
-
|
|
3134
|
+
const W = ut.value.map((D) => h("option", { value: D, selected: !0 }));
|
|
3135
|
+
_.push(
|
|
3136
3136
|
h("select", {
|
|
3137
3137
|
class: "hidden",
|
|
3138
3138
|
name: G.value,
|
|
3139
3139
|
multiple: e.multiple
|
|
3140
|
-
},
|
|
3140
|
+
}, W)
|
|
3141
3141
|
);
|
|
3142
3142
|
}
|
|
3143
|
-
const
|
|
3143
|
+
const H = e.useInput === !0 || w !== !0 ? void 0 : s.splitAttrs.attributes.value;
|
|
3144
3144
|
return h("div", {
|
|
3145
3145
|
class: "q-field__native row items-center",
|
|
3146
|
-
|
|
3146
|
+
...H,
|
|
3147
3147
|
...s.splitAttrs.listeners.value
|
|
3148
|
-
},
|
|
3148
|
+
}, _);
|
|
3149
3149
|
},
|
|
3150
3150
|
getInnerAppend: () => e.loading !== !0 && c.value !== !0 && e.hideDropdownIcon !== !0 ? [
|
|
3151
3151
|
h(Ae, {
|
|
@@ -3155,11 +3155,11 @@ const pi = be({
|
|
|
3155
3155
|
] : null
|
|
3156
3156
|
}), Gl(s);
|
|
3157
3157
|
}
|
|
3158
|
-
}), bi = { class: "app-select__amount" }, yi = /* @__PURE__ */
|
|
3158
|
+
}), bi = { class: "app-select__amount" }, yi = /* @__PURE__ */ Ro({
|
|
3159
3159
|
__name: "index",
|
|
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,12 +3175,12 @@ const pi = 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
|
return l.modelValue;
|
|
3181
3181
|
},
|
|
3182
3182
|
set(r) {
|
|
3183
|
-
|
|
3183
|
+
o("update:modelValue", r);
|
|
3184
3184
|
}
|
|
3185
3185
|
}), d = f(() => {
|
|
3186
3186
|
var r;
|
|
@@ -3198,7 +3198,7 @@ const pi = be({
|
|
|
3198
3198
|
return [cl];
|
|
3199
3199
|
}), y = () => {
|
|
3200
3200
|
u.value = void 0;
|
|
3201
|
-
},
|
|
3201
|
+
}, x = (r, m) => {
|
|
3202
3202
|
m(() => {
|
|
3203
3203
|
i.value = r;
|
|
3204
3204
|
});
|
|
@@ -3209,8 +3209,8 @@ const pi = be({
|
|
|
3209
3209
|
r.label ? (de(), ye("label", {
|
|
3210
3210
|
key: 0,
|
|
3211
3211
|
class: st(["app-select__label", { "app-select__label_bold": r.required }])
|
|
3212
|
-
}, Ue(r.required ? `${r.label} *` : r.label), 3)) :
|
|
3213
|
-
Xe(
|
|
3212
|
+
}, Ue(r.required ? `${r.label} *` : r.label), 3)) : $e("", !0),
|
|
3213
|
+
Xe(zo(pi), {
|
|
3214
3214
|
standout: "",
|
|
3215
3215
|
"hide-bottom-space": "",
|
|
3216
3216
|
"hide-dropdown-icon": "",
|
|
@@ -3220,7 +3220,7 @@ const pi = be({
|
|
|
3220
3220
|
placeholder: r.filtering && "Почніть вводити",
|
|
3221
3221
|
"input-debounce": "50",
|
|
3222
3222
|
modelValue: u.value,
|
|
3223
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
3223
|
+
"onUpdate:modelValue": m[0] || (m[0] = (V) => u.value = V),
|
|
3224
3224
|
options: g.value,
|
|
3225
3225
|
multiple: r.multiple,
|
|
3226
3226
|
"use-input": r.filtering && (Array.isArray(u.value) || !u.value),
|
|
@@ -3229,20 +3229,20 @@ const pi = be({
|
|
|
3229
3229
|
autofocus: r.autofocus,
|
|
3230
3230
|
disable: r.disabled,
|
|
3231
3231
|
loading: r.loading,
|
|
3232
|
-
onFilter:
|
|
3233
|
-
onPopupShow: m[1] || (m[1] = (
|
|
3234
|
-
onPopupHide: m[2] || (m[2] = (
|
|
3232
|
+
onFilter: x,
|
|
3233
|
+
onPopupShow: m[1] || (m[1] = (V) => a.value = !0),
|
|
3234
|
+
onPopupHide: m[2] || (m[2] = (V) => a.value = !1)
|
|
3235
3235
|
}, {
|
|
3236
|
-
append:
|
|
3236
|
+
append: we(() => [
|
|
3237
3237
|
v.value ? (de(), ye("i", {
|
|
3238
3238
|
key: 0,
|
|
3239
3239
|
class: "icon-kl icon-kl-close app-select__clear",
|
|
3240
|
-
onClick:
|
|
3241
|
-
})) :
|
|
3240
|
+
onClick: Fo(y, ["stop", "prevent"])
|
|
3241
|
+
})) : $e("", !0),
|
|
3242
3242
|
m[3] || (m[3] = At("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
|
|
3243
3243
|
]),
|
|
3244
|
-
selected:
|
|
3245
|
-
var
|
|
3244
|
+
selected: we(() => {
|
|
3245
|
+
var V, S;
|
|
3246
3246
|
return [
|
|
3247
3247
|
Array.isArray(u.value) ? (de(), ye(ct, { key: 0 }, [
|
|
3248
3248
|
!r.filtering || u.value.length ? (de(), ye("span", {
|
|
@@ -3250,7 +3250,7 @@ const pi = be({
|
|
|
3250
3250
|
class: st([
|
|
3251
3251
|
"app-select__selected",
|
|
3252
3252
|
{
|
|
3253
|
-
"app-select__placeholder": !((
|
|
3253
|
+
"app-select__placeholder": !((V = u.value) != null && V.length) && r.placeholder
|
|
3254
3254
|
}
|
|
3255
3255
|
])
|
|
3256
3256
|
}, [
|
|
@@ -3260,7 +3260,7 @@ const pi = be({
|
|
|
3260
3260
|
], 64)) : (de(), ye(ct, { key: 1 }, [
|
|
3261
3261
|
Tt(Ue(l.placeholder), 1)
|
|
3262
3262
|
], 64))
|
|
3263
|
-
], 2)) :
|
|
3263
|
+
], 2)) : $e("", !0)
|
|
3264
3264
|
], 64)) : (de(), ye(ct, { key: 1 }, [
|
|
3265
3265
|
!r.filtering || u.value ? (de(), ye("span", {
|
|
3266
3266
|
key: 0,
|
|
@@ -3268,44 +3268,44 @@ const pi = be({
|
|
|
3268
3268
|
"app-select__selected",
|
|
3269
3269
|
{ "app-select__placeholder": !u.value && r.placeholder }
|
|
3270
3270
|
])
|
|
3271
|
-
}, Ue(d.value), 3)) :
|
|
3271
|
+
}, Ue(d.value), 3)) : $e("", !0)
|
|
3272
3272
|
], 64))
|
|
3273
3273
|
];
|
|
3274
3274
|
}),
|
|
3275
|
-
option:
|
|
3276
|
-
Xe(Kl,
|
|
3277
|
-
class: ["app-select__option", { "app-select__option_selected":
|
|
3278
|
-
},
|
|
3279
|
-
default:
|
|
3275
|
+
option: we((V) => [
|
|
3276
|
+
Xe(Kl, Mo({
|
|
3277
|
+
class: ["app-select__option", { "app-select__option_selected": V.selected }]
|
|
3278
|
+
}, V.itemProps), {
|
|
3279
|
+
default: we(() => [
|
|
3280
3280
|
l.multiple ? (de(), al(pt, {
|
|
3281
3281
|
key: 0,
|
|
3282
3282
|
class: "option-multiple",
|
|
3283
3283
|
avatar: ""
|
|
3284
3284
|
}, {
|
|
3285
|
-
default:
|
|
3286
|
-
Xe(
|
|
3285
|
+
default: we(() => [
|
|
3286
|
+
Xe(sn, {
|
|
3287
3287
|
size: "30px",
|
|
3288
|
-
"model-value":
|
|
3289
|
-
"onUpdate:modelValue": () =>
|
|
3288
|
+
"model-value": V.selected,
|
|
3289
|
+
"onUpdate:modelValue": () => V.toggleOption(V.opt)
|
|
3290
3290
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
3291
3291
|
]),
|
|
3292
3292
|
_: 2
|
|
3293
|
-
}, 1024)) :
|
|
3294
|
-
|
|
3293
|
+
}, 1024)) : $e("", !0),
|
|
3294
|
+
V.opt.done ? (de(), al(pt, {
|
|
3295
3295
|
key: 1,
|
|
3296
3296
|
class: "option-done",
|
|
3297
3297
|
avatar: ""
|
|
3298
3298
|
}, {
|
|
3299
|
-
default:
|
|
3299
|
+
default: we(() => m[5] || (m[5] = [
|
|
3300
3300
|
At("i", { class: "icon-kl icon-kl-check option-done__icon" }, null, -1)
|
|
3301
3301
|
])),
|
|
3302
3302
|
_: 1
|
|
3303
|
-
})) :
|
|
3303
|
+
})) : $e("", !0),
|
|
3304
3304
|
Xe(pt, null, {
|
|
3305
|
-
default:
|
|
3305
|
+
default: we(() => [
|
|
3306
3306
|
Xe(Nl, null, {
|
|
3307
|
-
default:
|
|
3308
|
-
Tt(Ue(
|
|
3307
|
+
default: we(() => [
|
|
3308
|
+
Tt(Ue(V.opt.label), 1)
|
|
3309
3309
|
]),
|
|
3310
3310
|
_: 2
|
|
3311
3311
|
}, 1024)
|
|
@@ -3320,7 +3320,43 @@ const pi = be({
|
|
|
3320
3320
|
}, 8, ["popup-content-class", "placeholder", "modelValue", "options", "multiple", "use-input", "rules", "lazy-rules", "autofocus", "disable", "loading"])
|
|
3321
3321
|
], 2));
|
|
3322
3322
|
}
|
|
3323
|
-
}),
|
|
3323
|
+
}), Si = {
|
|
3324
|
+
"app-select": "_app-select_1ji8j_2",
|
|
3325
|
+
"app-select__label": "_app-select__label_1ji8j_5",
|
|
3326
|
+
"app-select__label_bold": "_app-select__label_bold_1ji8j_8",
|
|
3327
|
+
"app-select__drop-icon": "_app-select__drop-icon_1ji8j_11",
|
|
3328
|
+
"app-select__clear": "_app-select__clear_1ji8j_16",
|
|
3329
|
+
"app-select__selected": "_app-select__selected_1ji8j_25",
|
|
3330
|
+
"app-select__amount": "_app-select__amount_1ji8j_28",
|
|
3331
|
+
"app-select__placeholder": "_app-select__placeholder_1ji8j_37",
|
|
3332
|
+
"app-select__option": "_app-select__option_1ji8j_40",
|
|
3333
|
+
"app-select__option_selected": "_app-select__option_selected_1ji8j_43",
|
|
3334
|
+
"q-item__label": "_q-item__label_1ji8j_43",
|
|
3335
|
+
"q-item__section--avatar": "_q-item__section--avatar_1ji8j_46",
|
|
3336
|
+
"q-field": "_q-field_1ji8j_51",
|
|
3337
|
+
"q-field__control": "_q-field__control_1ji8j_51",
|
|
3338
|
+
"q-placeholder": "_q-placeholder_1ji8j_58",
|
|
3339
|
+
"q-spinner": "_q-spinner_1ji8j_61",
|
|
3340
|
+
"app-select_opened": "_app-select_opened_1ji8j_64",
|
|
3341
|
+
"app-select_sm": "_app-select_sm_1ji8j_67",
|
|
3342
|
+
"q-field__native": "_q-field__native_1ji8j_87",
|
|
3343
|
+
"q-field__append": "_q-field__append_1ji8j_92",
|
|
3344
|
+
"q-field__prepend": "_q-field__prepend_1ji8j_93",
|
|
3345
|
+
"q-field__before": "_q-field__before_1ji8j_94",
|
|
3346
|
+
"q-field__after": "_q-field__after_1ji8j_95",
|
|
3347
|
+
"q-field__input": "_q-field__input_1ji8j_99",
|
|
3348
|
+
"q-field__bottom": "_q-field__bottom_1ji8j_104",
|
|
3349
|
+
"app-select_md": "_app-select_md_1ji8j_108",
|
|
3350
|
+
"app-select_lg": "_app-select_lg_1ji8j_146",
|
|
3351
|
+
"option-multiple": "_option-multiple_1ji8j_172",
|
|
3352
|
+
"option-done": "_option-done_1ji8j_176",
|
|
3353
|
+
"option-done__icon": "_option-done__icon_1ji8j_179",
|
|
3354
|
+
"app-select-menu_sm": "_app-select-menu_sm_1ji8j_184",
|
|
3355
|
+
"q-item": "_q-item_1ji8j_43",
|
|
3356
|
+
"app-select-menu_md": "_app-select-menu_md_1ji8j_191"
|
|
3357
|
+
}, _i = {
|
|
3358
|
+
$style: Si
|
|
3359
|
+
}, Ci = /* @__PURE__ */ Go(yi, [["__cssModules", _i], ["__scopeId", "data-v-df2ac657"]]);
|
|
3324
3360
|
export {
|
|
3325
3361
|
Ci as default
|
|
3326
3362
|
};
|