@validol4ik/uikit 0.6.6 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AppButtonCopy-4GxKBcWx.cjs → AppButtonCopy-BvczyeX-.cjs} +1 -1
- package/dist/{AppButtonCopy-CcsAzDik.js → AppButtonCopy-CT_lXO96.js} +5 -5
- package/dist/{AppSelect-BtUUK2ea.js → AppSelect-B0FVWo0o.js} +893 -900
- package/dist/AppSelect-BbPJo5N3.cjs +1 -0
- package/dist/DropdownButton-DF_WGSQl.cjs +1 -0
- package/dist/{DropdownButton-CZwBMGcA.js → DropdownButton-Ylu19LP3.js} +123 -113
- package/dist/QMenu-BAujF7Kn.cjs +1 -0
- package/dist/{QMenu-P1hqLpnc.js → QMenu-CrIbSuC4.js} +104 -109
- package/dist/index-CDsBnBqp.cjs +1 -0
- package/dist/index-DqEqQq1H.js +1265 -0
- package/dist/types/components/AppIcon/AppIcon.vue.d.ts +1 -1
- package/dist/types/components/buttons/AppButton/AppButton.vue.d.ts +2 -1
- package/dist/types/components/buttons/AppButton/types.d.ts +4 -1
- package/dist/types/components/buttons/DropdownButton/DropdownButton.vue.d.ts +2 -1
- package/dist/types/components/buttons/DropdownButton/types.d.ts +4 -1
- package/dist/types/components/form/AppCodeInput/AppCodeInput.vue.d.ts +3 -1
- package/dist/types/components/form/AppSelect/AppSelect.vue.d.ts +1 -1
- package/dist/types/components/form/AppToggle/AppToggle.vue.d.ts +3 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +2 -2
- package/dist/AppSelect-Tg7_Uj55.cjs +0 -1
- package/dist/DropdownButton-DXQzSYcl.cjs +0 -1
- package/dist/QMenu-cWjMyOHy.cjs +0 -1
- package/dist/index-CNCrt1w6.cjs +0 -1
- package/dist/index-CtoDgaeS.js +0 -1264
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import { b as
|
|
1
|
+
import { ref as O, computed as r, h as s, getCurrentInstance as se, toRaw as Oe, onBeforeUpdate as ol, inject as Ol, watch as G, onMounted as nl, onBeforeUnmount as Ae, nextTick as ve, onDeactivated as ul, onActivated as il, Transition as Ct, onBeforeMount as Ml, onUpdated as Ll, defineComponent as $l, createElementBlock as fe, openBlock as ae, normalizeClass as et, createCommentVNode as Me, createVNode as je, toDisplayString as Ke, unref as Hl, withCtx as ge, mergeProps as Pl, createBlock as $t, createElementVNode as mt, createTextVNode as gt, Fragment as tt, withModifiers as Dl } from "vue";
|
|
2
|
+
import { u as al, a as rt, b as st, d as rl, e as sl, h as pe, s as ne, c as ye, Q as _e, f as jl, g as Kl, i as cl, j as Nl, p as he, k as Ql, l as Ul, m as Wl, R as Xl, n as qe, o as Yl, q as Zl, r as Jl, t as Gl, v as Le, S as eo, _ as to } from "./index-DqEqQq1H.js";
|
|
3
|
+
import { a as dl, u as lo, r as oo, g as no, b as uo, h as io, c as ao, d as ro, e as so, f as co, i as fo, j as vo, k as mo, l as go, m as Ht, n as ho, Q as bo } from "./QMenu-CrIbSuC4.js";
|
|
4
|
+
import { b as po, c as Ve, r as Pt, a as yo } from "./focusout-DjvPXP_b.js";
|
|
5
5
|
function So(e, l) {
|
|
6
|
-
const t =
|
|
6
|
+
const t = O(null), n = r(() => e.disable === !0 ? null : s("span", {
|
|
7
7
|
ref: t,
|
|
8
8
|
class: "no-outline",
|
|
9
9
|
tabindex: -1
|
|
10
10
|
}));
|
|
11
|
-
function
|
|
11
|
+
function c(u) {
|
|
12
12
|
const a = l.value;
|
|
13
|
-
u
|
|
13
|
+
(u == null ? void 0 : u.qAvoidFocus) !== !0 && ((u == null ? void 0 : u.type.indexOf("key")) === 0 ? document.activeElement !== a && (a == null ? void 0 : a.contains(document.activeElement)) === !0 && a.focus() : t.value !== null && (u === void 0 || (a == null ? void 0 : a.contains(u.target)) === !0) && t.value.focus());
|
|
14
14
|
}
|
|
15
15
|
return {
|
|
16
16
|
refocusTargetEl: n,
|
|
17
|
-
refocusTarget:
|
|
17
|
+
refocusTarget: c
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
const fl = {
|
|
@@ -23,7 +23,7 @@ const fl = {
|
|
|
23
23
|
function wo(e = {}) {
|
|
24
24
|
return (l, t, n) => {
|
|
25
25
|
l[t](
|
|
26
|
-
|
|
26
|
+
s("input", {
|
|
27
27
|
class: "hidden" + (n || ""),
|
|
28
28
|
...e.value
|
|
29
29
|
})
|
|
@@ -41,7 +41,7 @@ const ko = {
|
|
|
41
41
|
xl: 60
|
|
42
42
|
}, qo = {
|
|
43
43
|
...rt,
|
|
44
|
-
...
|
|
44
|
+
...al,
|
|
45
45
|
...fl,
|
|
46
46
|
modelValue: {
|
|
47
47
|
required: !0,
|
|
@@ -66,46 +66,46 @@ const ko = {
|
|
|
66
66
|
dense: Boolean,
|
|
67
67
|
disable: Boolean,
|
|
68
68
|
tabindex: [String, Number]
|
|
69
|
-
},
|
|
70
|
-
function
|
|
71
|
-
const { props: t, slots: n, emit:
|
|
69
|
+
}, xo = ["update:modelValue"];
|
|
70
|
+
function Vo(e, l) {
|
|
71
|
+
const { props: t, slots: n, emit: c, proxy: u } = se(), { $q: a } = u, b = st(t, a), p = O(null), { refocusTargetEl: V, refocusTarget: f } = So(t, p), C = rl(t, ko), k = r(
|
|
72
72
|
() => t.val !== void 0 && Array.isArray(t.modelValue)
|
|
73
|
-
),
|
|
74
|
-
const
|
|
75
|
-
return k.value === !0 ? t.modelValue.findIndex((
|
|
76
|
-
}), y = r(() => k.value === !0 ?
|
|
73
|
+
), g = r(() => {
|
|
74
|
+
const x = Oe(t.val);
|
|
75
|
+
return k.value === !0 ? t.modelValue.findIndex((X) => Oe(X) === x) : -1;
|
|
76
|
+
}), y = r(() => k.value === !0 ? g.value !== -1 : Oe(t.modelValue) === Oe(t.trueValue)), q = r(() => k.value === !0 ? g.value === -1 : Oe(t.modelValue) === Oe(t.falseValue)), S = r(
|
|
77
77
|
() => y.value === !1 && q.value === !1
|
|
78
|
-
), $ = r(() => t.disable === !0 ? -1 : t.tabindex || 0),
|
|
79
|
-
() => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (t.disable === !0 ? " disabled" : "") + (
|
|
78
|
+
), $ = r(() => t.disable === !0 ? -1 : t.tabindex || 0), j = r(
|
|
79
|
+
() => `q-${e} cursor-pointer no-outline row inline no-wrap items-center` + (t.disable === !0 ? " disabled" : "") + (b.value === !0 ? ` q-${e}--dark` : "") + (t.dense === !0 ? ` q-${e}--dense` : "") + (t.leftLabel === !0 ? " reverse" : "")
|
|
80
80
|
), _ = r(() => {
|
|
81
|
-
const
|
|
82
|
-
return `q-${e}__inner relative-position non-selectable q-${e}__inner--${
|
|
83
|
-
}),
|
|
84
|
-
const
|
|
85
|
-
return t.name !== void 0 && Object.assign(
|
|
81
|
+
const x = y.value === !0 ? "truthy" : q.value === !0 ? "falsy" : "indet", X = t.color !== void 0 && (t.keepColor === !0 || q.value !== !0) ? ` text-${t.color}` : "";
|
|
82
|
+
return `q-${e}__inner relative-position non-selectable q-${e}__inner--${x}${X}`;
|
|
83
|
+
}), M = r(() => {
|
|
84
|
+
const x = { type: "checkbox" };
|
|
85
|
+
return t.name !== void 0 && Object.assign(x, {
|
|
86
86
|
// see https://vuejs.org/guide/extras/render-function.html#creating-vnodes (.prop)
|
|
87
87
|
".checked": y.value,
|
|
88
88
|
"^checked": y.value === !0 ? "checked" : void 0,
|
|
89
89
|
name: t.name,
|
|
90
90
|
value: k.value === !0 ? t.val : t.trueValue
|
|
91
|
-
}),
|
|
92
|
-
}), Y = wo(
|
|
93
|
-
const
|
|
91
|
+
}), x;
|
|
92
|
+
}), Y = wo(M), R = r(() => {
|
|
93
|
+
const x = {
|
|
94
94
|
tabindex: $.value,
|
|
95
95
|
role: "checkbox",
|
|
96
96
|
"aria-label": t.label,
|
|
97
97
|
"aria-checked": S.value === !0 ? "mixed" : y.value === !0 ? "true" : "false"
|
|
98
98
|
};
|
|
99
|
-
return t.disable === !0 && (
|
|
99
|
+
return t.disable === !0 && (x["aria-disabled"] = "true"), x;
|
|
100
100
|
});
|
|
101
|
-
function L(
|
|
102
|
-
|
|
101
|
+
function L(x) {
|
|
102
|
+
x !== void 0 && (ne(x), f(x)), t.disable !== !0 && c("update:modelValue", H(), x);
|
|
103
103
|
}
|
|
104
104
|
function H() {
|
|
105
105
|
if (k.value === !0) {
|
|
106
106
|
if (y.value === !0) {
|
|
107
|
-
const
|
|
108
|
-
return
|
|
107
|
+
const x = t.modelValue.slice();
|
|
108
|
+
return x.splice(g.value, 1), x;
|
|
109
109
|
}
|
|
110
110
|
return t.modelValue.concat([t.val]);
|
|
111
111
|
}
|
|
@@ -119,86 +119,86 @@ function xo(e, l) {
|
|
|
119
119
|
return t.toggleOrder !== "ft" ? t.trueValue : t.falseValue;
|
|
120
120
|
return t.indeterminateValue;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
(
|
|
122
|
+
function le(x) {
|
|
123
|
+
(x.keyCode === 13 || x.keyCode === 32) && ne(x);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
(
|
|
125
|
+
function W(x) {
|
|
126
|
+
(x.keyCode === 13 || x.keyCode === 32) && L(x);
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const oe = l(y, S);
|
|
129
129
|
return Object.assign(u, { toggle: L }), () => {
|
|
130
|
-
const
|
|
130
|
+
const x = oe();
|
|
131
131
|
t.disable !== !0 && Y(
|
|
132
|
-
|
|
132
|
+
x,
|
|
133
133
|
"unshift",
|
|
134
134
|
` q-${e}__native absolute q-ma-none q-pa-none`
|
|
135
135
|
);
|
|
136
|
-
const
|
|
137
|
-
|
|
136
|
+
const X = [
|
|
137
|
+
s("div", {
|
|
138
138
|
class: _.value,
|
|
139
139
|
style: C.value,
|
|
140
140
|
"aria-hidden": "true"
|
|
141
|
-
},
|
|
141
|
+
}, x)
|
|
142
142
|
];
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
return
|
|
146
|
-
|
|
143
|
+
V.value !== null && X.push(V.value);
|
|
144
|
+
const ue = t.label !== void 0 ? sl(n.default, [t.label]) : pe(n.default);
|
|
145
|
+
return ue !== void 0 && X.push(
|
|
146
|
+
s("div", {
|
|
147
147
|
class: `q-${e}__label q-anchor--skip`
|
|
148
|
-
},
|
|
149
|
-
),
|
|
150
|
-
ref:
|
|
151
|
-
class:
|
|
152
|
-
...
|
|
148
|
+
}, ue)
|
|
149
|
+
), s("div", {
|
|
150
|
+
ref: p,
|
|
151
|
+
class: j.value,
|
|
152
|
+
...R.value,
|
|
153
153
|
onClick: L,
|
|
154
|
-
onKeydown:
|
|
155
|
-
onKeyup:
|
|
156
|
-
},
|
|
154
|
+
onKeydown: le,
|
|
155
|
+
onKeyup: W
|
|
156
|
+
}, X);
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const _o = () =>
|
|
159
|
+
const _o = () => s("div", {
|
|
160
160
|
key: "svg",
|
|
161
161
|
class: "q-checkbox__bg absolute"
|
|
162
162
|
}, [
|
|
163
|
-
|
|
163
|
+
s("svg", {
|
|
164
164
|
class: "q-checkbox__svg fit absolute-full",
|
|
165
165
|
viewBox: "0 0 24 24"
|
|
166
166
|
}, [
|
|
167
|
-
|
|
167
|
+
s("path", {
|
|
168
168
|
class: "q-checkbox__truthy",
|
|
169
169
|
fill: "none",
|
|
170
170
|
d: "M1.73,12.91 8.1,19.28 22.79,4.59"
|
|
171
171
|
}),
|
|
172
|
-
|
|
172
|
+
s("path", {
|
|
173
173
|
class: "q-checkbox__indet",
|
|
174
174
|
d: "M4,14H20V10H4"
|
|
175
175
|
})
|
|
176
176
|
])
|
|
177
|
-
]),
|
|
177
|
+
]), Ao = ye({
|
|
178
178
|
name: "QCheckbox",
|
|
179
179
|
props: qo,
|
|
180
|
-
emits:
|
|
180
|
+
emits: xo,
|
|
181
181
|
setup(e) {
|
|
182
182
|
const l = _o();
|
|
183
|
-
function t(n,
|
|
183
|
+
function t(n, c) {
|
|
184
184
|
const u = r(
|
|
185
|
-
() => (n.value === !0 ? e.checkedIcon :
|
|
185
|
+
() => (n.value === !0 ? e.checkedIcon : c.value === !0 ? e.indeterminateIcon : e.uncheckedIcon) || null
|
|
186
186
|
);
|
|
187
187
|
return () => u.value !== null ? [
|
|
188
|
-
|
|
188
|
+
s("div", {
|
|
189
189
|
key: "icon",
|
|
190
190
|
class: "q-checkbox__icon-container absolute-full flex flex-center no-wrap"
|
|
191
191
|
}, [
|
|
192
|
-
|
|
192
|
+
s(_e, {
|
|
193
193
|
class: "q-checkbox__icon",
|
|
194
194
|
name: u.value
|
|
195
195
|
})
|
|
196
196
|
])
|
|
197
197
|
] : [l];
|
|
198
198
|
}
|
|
199
|
-
return
|
|
199
|
+
return Vo("checkbox", t);
|
|
200
200
|
}
|
|
201
|
-
}),
|
|
201
|
+
}), it = ye({
|
|
202
202
|
name: "QItemSection",
|
|
203
203
|
props: {
|
|
204
204
|
avatar: Boolean,
|
|
@@ -211,7 +211,7 @@ const _o = () => c("div", {
|
|
|
211
211
|
const t = r(
|
|
212
212
|
() => `q-item__section column q-item__section--${e.avatar === !0 || e.side === !0 || e.thumbnail === !0 ? "side" : "main"}` + (e.top === !0 ? " q-item__section--top justify-start" : " justify-center") + (e.avatar === !0 ? " q-item__section--avatar" : "") + (e.thumbnail === !0 ? " q-item__section--thumbnail" : "") + (e.noWrap === !0 ? " q-item__section--nowrap" : "")
|
|
213
213
|
);
|
|
214
|
-
return () =>
|
|
214
|
+
return () => s("div", { class: t.value }, pe(l.default));
|
|
215
215
|
}
|
|
216
216
|
}), vl = ye({
|
|
217
217
|
name: "QItemLabel",
|
|
@@ -224,22 +224,22 @@ const _o = () => c("div", {
|
|
|
224
224
|
setup(e, { slots: l }) {
|
|
225
225
|
const t = r(() => parseInt(e.lines, 10)), n = r(
|
|
226
226
|
() => "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" : "") + (t.value === 1 ? " ellipsis" : "")
|
|
227
|
-
),
|
|
227
|
+
), c = r(() => e.lines !== void 0 && t.value > 1 ? {
|
|
228
228
|
overflow: "hidden",
|
|
229
229
|
display: "-webkit-box",
|
|
230
230
|
"-webkit-box-orient": "vertical",
|
|
231
231
|
"-webkit-line-clamp": t.value
|
|
232
232
|
} : null);
|
|
233
|
-
return () =>
|
|
234
|
-
style:
|
|
233
|
+
return () => s("div", {
|
|
234
|
+
style: c.value,
|
|
235
235
|
class: n.value
|
|
236
|
-
},
|
|
236
|
+
}, pe(l.default));
|
|
237
237
|
}
|
|
238
238
|
}), ml = ye({
|
|
239
239
|
name: "QItem",
|
|
240
240
|
props: {
|
|
241
241
|
...rt,
|
|
242
|
-
...
|
|
242
|
+
...jl,
|
|
243
243
|
tag: {
|
|
244
244
|
type: String,
|
|
245
245
|
default: "div"
|
|
@@ -257,30 +257,30 @@ const _o = () => c("div", {
|
|
|
257
257
|
},
|
|
258
258
|
emits: ["click", "keyup"],
|
|
259
259
|
setup(e, { slots: l, emit: t }) {
|
|
260
|
-
const { proxy: { $q: n } } =
|
|
260
|
+
const { proxy: { $q: n } } = se(), c = st(e, n), { hasLink: u, linkAttrs: a, linkClass: b, linkTag: p, navigateOnClick: V } = Kl(), f = O(null), C = O(null), k = r(
|
|
261
261
|
() => e.clickable === !0 || u.value === !0 || e.tag === "label"
|
|
262
|
-
),
|
|
262
|
+
), g = r(
|
|
263
263
|
() => e.disable !== !0 && k.value === !0
|
|
264
264
|
), y = r(
|
|
265
|
-
() => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (
|
|
265
|
+
() => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (c.value === !0 ? " q-item--dark" : "") + (u.value === !0 && e.active === null ? b.value : e.active === !0 ? ` q-item--active${e.activeClass !== void 0 ? ` ${e.activeClass}` : ""}` : "") + (e.disable === !0 ? " disabled" : "") + (g.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" : "") : "")
|
|
266
266
|
), q = r(() => e.insetLevel === void 0 ? null : {
|
|
267
267
|
["padding" + (n.lang.rtl === !0 ? "Right" : "Left")]: 16 + e.insetLevel * 56 + "px"
|
|
268
268
|
});
|
|
269
269
|
function S(_) {
|
|
270
|
-
|
|
270
|
+
g.value === !0 && (C.value !== null && _.qAvoidFocus !== !0 && (_.qKeyEvent !== !0 && document.activeElement === f.value ? C.value.focus() : document.activeElement === C.value && f.value.focus()), V(_));
|
|
271
271
|
}
|
|
272
272
|
function $(_) {
|
|
273
|
-
if (
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
|
|
273
|
+
if (g.value === !0 && cl(_, [13, 32]) === !0) {
|
|
274
|
+
ne(_), _.qKeyEvent = !0;
|
|
275
|
+
const M = new MouseEvent("click", _);
|
|
276
|
+
M.qKeyEvent = !0, f.value.dispatchEvent(M);
|
|
277
277
|
}
|
|
278
278
|
t("keyup", _);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const _ =
|
|
282
|
-
return
|
|
283
|
-
|
|
280
|
+
function j() {
|
|
281
|
+
const _ = Nl(l.default, []);
|
|
282
|
+
return g.value === !0 && _.unshift(
|
|
283
|
+
s("div", { class: "q-focus-helper", tabindex: -1, ref: C })
|
|
284
284
|
), _;
|
|
285
285
|
}
|
|
286
286
|
return () => {
|
|
@@ -292,44 +292,44 @@ const _o = () => c("div", {
|
|
|
292
292
|
onClick: S,
|
|
293
293
|
onKeyup: $
|
|
294
294
|
};
|
|
295
|
-
return
|
|
296
|
-
|
|
295
|
+
return g.value === !0 ? (_.tabindex = e.tabindex || "0", Object.assign(_, a.value)) : k.value === !0 && (_["aria-disabled"] = "true"), s(
|
|
296
|
+
p.value,
|
|
297
297
|
_,
|
|
298
|
-
|
|
298
|
+
j()
|
|
299
299
|
);
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
302
|
}), Dt = (e) => e ? !0 : "Обовʼязкове поле", jt = /^on[A-Z]/;
|
|
303
|
-
function
|
|
304
|
-
const { attrs: e, vnode: l } =
|
|
305
|
-
listeners:
|
|
306
|
-
attributes:
|
|
303
|
+
function Bo() {
|
|
304
|
+
const { attrs: e, vnode: l } = se(), t = {
|
|
305
|
+
listeners: O({}),
|
|
306
|
+
attributes: O({})
|
|
307
307
|
};
|
|
308
308
|
function n() {
|
|
309
|
-
const
|
|
309
|
+
const c = {}, u = {};
|
|
310
310
|
for (const a in e)
|
|
311
|
-
a !== "class" && a !== "style" && jt.test(a) === !1 && (
|
|
311
|
+
a !== "class" && a !== "style" && jt.test(a) === !1 && (c[a] = e[a]);
|
|
312
312
|
for (const a in l.props)
|
|
313
313
|
jt.test(a) === !0 && (u[a] = l.props[a]);
|
|
314
|
-
t.attributes.value =
|
|
314
|
+
t.attributes.value = c, t.listeners.value = u;
|
|
315
315
|
}
|
|
316
316
|
return ol(n), n(), t;
|
|
317
317
|
}
|
|
318
318
|
const Eo = "_q_fo_";
|
|
319
|
-
function
|
|
319
|
+
function zo({ validate: e, resetValidation: l, requiresQForm: t }) {
|
|
320
320
|
const n = Ol(Eo, !1);
|
|
321
321
|
if (n !== !1) {
|
|
322
|
-
const { props:
|
|
323
|
-
Object.assign(u, { validate: e, resetValidation: l }),
|
|
322
|
+
const { props: c, proxy: u } = se();
|
|
323
|
+
Object.assign(u, { validate: e, resetValidation: l }), G(() => c.disable, (a) => {
|
|
324
324
|
a === !0 ? (typeof l == "function" && l(), n.unbindComponent(u)) : n.bindComponent(u);
|
|
325
325
|
}), nl(() => {
|
|
326
|
-
|
|
327
|
-
}),
|
|
328
|
-
|
|
326
|
+
c.disable !== !0 && n.bindComponent(u);
|
|
327
|
+
}), Ae(() => {
|
|
328
|
+
c.disable !== !0 && n.unbindComponent(u);
|
|
329
329
|
});
|
|
330
330
|
} else t === !0 && console.error("Parent QForm not found on useFormChild()!");
|
|
331
331
|
}
|
|
332
|
-
const Kt = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, Nt = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, Qt = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,
|
|
332
|
+
const Kt = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, Nt = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, Qt = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, lt = /^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])\)$/, ot = /^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)\)$/, ht = {
|
|
333
333
|
date: (e) => /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),
|
|
334
334
|
time: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),
|
|
335
335
|
fulltime: (e) => /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),
|
|
@@ -344,26 +344,26 @@ const Kt = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, Nt = /^#[0-9a-fA-F]{4}([0-9a-fA
|
|
|
344
344
|
hexColor: (e) => Kt.test(e),
|
|
345
345
|
hexaColor: (e) => Nt.test(e),
|
|
346
346
|
hexOrHexaColor: (e) => Qt.test(e),
|
|
347
|
-
rgbColor: (e) =>
|
|
348
|
-
rgbaColor: (e) =>
|
|
349
|
-
rgbOrRgbaColor: (e) =>
|
|
350
|
-
hexOrRgbColor: (e) => Kt.test(e) ||
|
|
351
|
-
hexaOrRgbaColor: (e) => Nt.test(e) ||
|
|
352
|
-
anyColor: (e) => Qt.test(e) ||
|
|
347
|
+
rgbColor: (e) => lt.test(e),
|
|
348
|
+
rgbaColor: (e) => ot.test(e),
|
|
349
|
+
rgbOrRgbaColor: (e) => lt.test(e) || ot.test(e),
|
|
350
|
+
hexOrRgbColor: (e) => Kt.test(e) || lt.test(e),
|
|
351
|
+
hexaOrRgbaColor: (e) => Nt.test(e) || ot.test(e),
|
|
352
|
+
anyColor: (e) => Qt.test(e) || lt.test(e) || ot.test(e)
|
|
353
353
|
};
|
|
354
354
|
function gl(e, l = 250, t) {
|
|
355
355
|
let n = null;
|
|
356
|
-
function
|
|
356
|
+
function c() {
|
|
357
357
|
const u = arguments, a = () => {
|
|
358
|
-
n = null,
|
|
358
|
+
n = null, e.apply(this, u);
|
|
359
359
|
};
|
|
360
360
|
n !== null ? clearTimeout(n) : t === !0 && e.apply(this, u), n = setTimeout(a, l);
|
|
361
361
|
}
|
|
362
|
-
return
|
|
362
|
+
return c.cancel = () => {
|
|
363
363
|
n !== null && clearTimeout(n);
|
|
364
|
-
},
|
|
364
|
+
}, c;
|
|
365
365
|
}
|
|
366
|
-
const
|
|
366
|
+
const Ro = [!0, !1, "ondemand"], Fo = {
|
|
367
367
|
modelValue: {},
|
|
368
368
|
error: {
|
|
369
369
|
type: Boolean,
|
|
@@ -377,64 +377,64 @@ const zo = [!0, !1, "ondemand"], Fo = {
|
|
|
377
377
|
type: [Boolean, String],
|
|
378
378
|
default: !1,
|
|
379
379
|
// statement unneeded but avoids future vue implementation changes
|
|
380
|
-
validator: (e) =>
|
|
380
|
+
validator: (e) => Ro.includes(e)
|
|
381
381
|
}
|
|
382
382
|
};
|
|
383
383
|
function Io(e, l) {
|
|
384
|
-
const { props: t, proxy: n } =
|
|
385
|
-
|
|
386
|
-
let
|
|
387
|
-
const
|
|
384
|
+
const { props: t, proxy: n } = se(), c = O(!1), u = O(null), a = O(!1);
|
|
385
|
+
zo({ validate: q, resetValidation: y });
|
|
386
|
+
let b = 0, p;
|
|
387
|
+
const V = r(
|
|
388
388
|
() => t.rules !== void 0 && t.rules !== null && t.rules.length !== 0
|
|
389
|
-
), f = r(() => t.disable !== !0 &&
|
|
390
|
-
() => t.error === !0 ||
|
|
389
|
+
), f = r(() => t.disable !== !0 && V.value === !0 && l.value === !1), C = r(
|
|
390
|
+
() => t.error === !0 || c.value === !0
|
|
391
391
|
), k = r(() => typeof t.errorMessage == "string" && t.errorMessage.length !== 0 ? t.errorMessage : u.value);
|
|
392
|
-
|
|
392
|
+
G(() => t.modelValue, () => {
|
|
393
393
|
a.value = !0, f.value === !0 && t.lazyRules === !1 && S();
|
|
394
394
|
});
|
|
395
|
-
function
|
|
395
|
+
function g() {
|
|
396
396
|
t.lazyRules !== "ondemand" && f.value === !0 && a.value === !0 && S();
|
|
397
397
|
}
|
|
398
|
-
|
|
399
|
-
$ === !0 ?
|
|
400
|
-
}, { immediate: !0 }),
|
|
398
|
+
G(() => t.reactiveRules, ($) => {
|
|
399
|
+
$ === !0 ? p === void 0 && (p = G(() => t.rules, g, { immediate: !0, deep: !0 })) : p !== void 0 && (p(), p = void 0);
|
|
400
|
+
}, { immediate: !0 }), G(() => t.lazyRules, g), G(e, ($) => {
|
|
401
401
|
$ === !0 ? a.value = !0 : f.value === !0 && t.lazyRules !== "ondemand" && S();
|
|
402
402
|
});
|
|
403
403
|
function y() {
|
|
404
|
-
|
|
404
|
+
b++, l.value = !1, a.value = !1, c.value = !1, u.value = null, S.cancel();
|
|
405
405
|
}
|
|
406
406
|
function q($ = t.modelValue) {
|
|
407
|
-
if (t.disable === !0 ||
|
|
407
|
+
if (t.disable === !0 || V.value === !1)
|
|
408
408
|
return !0;
|
|
409
|
-
const
|
|
409
|
+
const j = ++b, _ = l.value !== !0 ? () => {
|
|
410
410
|
a.value = !0;
|
|
411
411
|
} : () => {
|
|
412
|
-
},
|
|
413
|
-
|
|
412
|
+
}, M = (R, L) => {
|
|
413
|
+
R === !0 && _(), c.value = R, u.value = L || null, l.value = !1;
|
|
414
414
|
}, Y = [];
|
|
415
|
-
for (let
|
|
416
|
-
const L = t.rules[
|
|
415
|
+
for (let R = 0; R < t.rules.length; R++) {
|
|
416
|
+
const L = t.rules[R];
|
|
417
417
|
let H;
|
|
418
418
|
if (typeof L == "function" ? H = L($, ht) : typeof L == "string" && ht[L] !== void 0 && (H = ht[L]($)), H === !1 || typeof H == "string")
|
|
419
|
-
return
|
|
419
|
+
return M(!0, H), !1;
|
|
420
420
|
H !== !0 && H !== void 0 && Y.push(H);
|
|
421
421
|
}
|
|
422
|
-
return Y.length === 0 ? (
|
|
423
|
-
(
|
|
424
|
-
if (
|
|
425
|
-
return
|
|
426
|
-
const L =
|
|
427
|
-
return
|
|
422
|
+
return Y.length === 0 ? (M(!1), !0) : (l.value = !0, Promise.all(Y).then(
|
|
423
|
+
(R) => {
|
|
424
|
+
if (R === void 0 || Array.isArray(R) === !1 || R.length === 0)
|
|
425
|
+
return j === b && M(!1), !0;
|
|
426
|
+
const L = R.find((H) => H === !1 || typeof H == "string");
|
|
427
|
+
return j === b && M(L !== void 0, L), L === void 0;
|
|
428
428
|
},
|
|
429
|
-
(
|
|
429
|
+
(R) => (j === b && (console.error(R), M(!0)), !1)
|
|
430
430
|
));
|
|
431
431
|
}
|
|
432
432
|
const S = gl(q, 0);
|
|
433
|
-
return
|
|
434
|
-
|
|
435
|
-
}), Object.assign(n, { resetValidation: y, validate: q }),
|
|
433
|
+
return Ae(() => {
|
|
434
|
+
p == null || p(), S.cancel();
|
|
435
|
+
}), Object.assign(n, { resetValidation: y, validate: q }), po(n, "hasError", () => C.value), {
|
|
436
436
|
isDirtyModel: a,
|
|
437
|
-
hasRules:
|
|
437
|
+
hasRules: V,
|
|
438
438
|
hasError: C,
|
|
439
439
|
errorMessage: k,
|
|
440
440
|
validate: q,
|
|
@@ -479,8 +479,8 @@ const To = {
|
|
|
479
479
|
...To,
|
|
480
480
|
maxlength: [Number, String]
|
|
481
481
|
}, hl = ["update:modelValue", "clear", "focus", "blur"];
|
|
482
|
-
function
|
|
483
|
-
const { props: n, proxy:
|
|
482
|
+
function bl({ requiredForAttr: e = !0, tagProp: l, changeEvent: t = !1 } = {}) {
|
|
483
|
+
const { props: n, proxy: c } = se(), u = st(n, c.$q), a = lo({
|
|
484
484
|
required: e,
|
|
485
485
|
getValue: () => n.for
|
|
486
486
|
});
|
|
@@ -492,14 +492,14 @@ function pl({ requiredForAttr: e = !0, tagProp: l, changeEvent: t = !1 } = {}) {
|
|
|
492
492
|
editable: r(
|
|
493
493
|
() => n.disable !== !0 && n.readonly !== !0
|
|
494
494
|
),
|
|
495
|
-
innerLoading:
|
|
496
|
-
focused:
|
|
495
|
+
innerLoading: O(!1),
|
|
496
|
+
focused: O(!1),
|
|
497
497
|
hasPopupOpen: !1,
|
|
498
|
-
splitAttrs:
|
|
498
|
+
splitAttrs: Bo(),
|
|
499
499
|
targetUid: a,
|
|
500
|
-
rootRef:
|
|
501
|
-
targetRef:
|
|
502
|
-
controlRef:
|
|
500
|
+
rootRef: O(null),
|
|
501
|
+
targetRef: O(null),
|
|
502
|
+
controlRef: O(null)
|
|
503
503
|
/**
|
|
504
504
|
* user supplied additionals:
|
|
505
505
|
|
|
@@ -520,220 +520,221 @@ function pl({ requiredForAttr: e = !0, tagProp: l, changeEvent: t = !1 } = {}) {
|
|
|
520
520
|
*/
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
const { props: l, emit: t, slots: n, attrs:
|
|
525
|
-
let
|
|
523
|
+
function pl(e) {
|
|
524
|
+
const { props: l, emit: t, slots: n, attrs: c, proxy: u } = se(), { $q: a } = u;
|
|
525
|
+
let b = null;
|
|
526
526
|
e.hasValue === void 0 && (e.hasValue = r(() => kt(l.modelValue))), e.emitValue === void 0 && (e.emitValue = (h) => {
|
|
527
527
|
t("update:modelValue", h);
|
|
528
528
|
}), e.controlEvents === void 0 && (e.controlEvents = {
|
|
529
|
-
onFocusin:
|
|
530
|
-
onFocusout:
|
|
529
|
+
onFocusin: le,
|
|
530
|
+
onFocusout: W
|
|
531
531
|
}), Object.assign(e, {
|
|
532
|
-
clearValue:
|
|
533
|
-
onControlFocusin:
|
|
534
|
-
onControlFocusout:
|
|
532
|
+
clearValue: oe,
|
|
533
|
+
onControlFocusin: le,
|
|
534
|
+
onControlFocusout: W,
|
|
535
535
|
focus: L
|
|
536
536
|
}), e.computedCounter === void 0 && (e.computedCounter = r(() => {
|
|
537
537
|
if (l.counter !== !1) {
|
|
538
|
-
const h = typeof l.modelValue == "string" || typeof l.modelValue == "number" ? ("" + l.modelValue).length : Array.isArray(l.modelValue) === !0 ? l.modelValue.length : 0,
|
|
539
|
-
return h + (
|
|
538
|
+
const h = typeof l.modelValue == "string" || typeof l.modelValue == "number" ? ("" + l.modelValue).length : Array.isArray(l.modelValue) === !0 ? l.modelValue.length : 0, A = l.maxlength !== void 0 ? l.maxlength : l.maxValues;
|
|
539
|
+
return h + (A !== void 0 ? " / " + A : "");
|
|
540
540
|
}
|
|
541
541
|
}));
|
|
542
542
|
const {
|
|
543
|
-
isDirtyModel:
|
|
544
|
-
hasRules:
|
|
543
|
+
isDirtyModel: p,
|
|
544
|
+
hasRules: V,
|
|
545
545
|
hasError: f,
|
|
546
546
|
errorMessage: C,
|
|
547
547
|
resetValidation: k
|
|
548
|
-
} = Io(e.focused, e.innerLoading),
|
|
549
|
-
() => l.bottomSlots === !0 || l.hint !== void 0 ||
|
|
548
|
+
} = Io(e.focused, e.innerLoading), g = e.floatingLabel !== void 0 ? r(() => l.stackLabel === !0 || e.focused.value === !0 || e.floatingLabel.value === !0) : r(() => l.stackLabel === !0 || e.focused.value === !0 || e.hasValue.value === !0), y = r(
|
|
549
|
+
() => l.bottomSlots === !0 || l.hint !== void 0 || V.value === !0 || l.counter === !0 || l.error !== null
|
|
550
550
|
), q = r(() => l.filled === !0 ? "filled" : l.outlined === !0 ? "outlined" : l.borderless === !0 ? "borderless" : l.standout ? "standout" : "standard"), S = r(
|
|
551
|
-
() => `q-field row no-wrap items-start q-field--${q.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (l.rounded === !0 ? " q-field--rounded" : "") + (l.square === !0 ? " q-field--square" : "") + (
|
|
551
|
+
() => `q-field row no-wrap items-start q-field--${q.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (l.rounded === !0 ? " q-field--rounded" : "") + (l.square === !0 ? " q-field--square" : "") + (g.value === !0 ? " q-field--float" : "") + (j.value === !0 ? " q-field--labeled" : "") + (l.dense === !0 ? " q-field--dense" : "") + (l.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" : "") + (f.value === !0 ? " q-field--error" : "") + (f.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (l.hideBottomSpace !== !0 && y.value === !0 ? " q-field--with-bottom" : "") + (l.disable === !0 ? " q-field--disabled" : l.readonly === !0 ? " q-field--readonly" : "")
|
|
552
552
|
), $ = r(
|
|
553
553
|
() => "q-field__control relative-position row no-wrap" + (l.bgColor !== void 0 ? ` bg-${l.bgColor}` : "") + (f.value === !0 ? " text-negative" : typeof l.standout == "string" && l.standout.length !== 0 && e.focused.value === !0 ? ` ${l.standout}` : l.color !== void 0 ? ` text-${l.color}` : "")
|
|
554
|
-
),
|
|
554
|
+
), j = r(
|
|
555
555
|
() => l.labelSlot === !0 || l.label !== void 0
|
|
556
556
|
), _ = r(
|
|
557
557
|
() => "q-field__label no-pointer-events absolute ellipsis" + (l.labelColor !== void 0 && f.value !== !0 ? ` text-${l.labelColor}` : "")
|
|
558
|
-
),
|
|
558
|
+
), M = r(() => ({
|
|
559
559
|
id: e.targetUid.value,
|
|
560
560
|
editable: e.editable.value,
|
|
561
561
|
focused: e.focused.value,
|
|
562
|
-
floatingLabel:
|
|
562
|
+
floatingLabel: g.value,
|
|
563
563
|
modelValue: l.modelValue,
|
|
564
564
|
emitValue: e.emitValue
|
|
565
565
|
})), Y = r(() => {
|
|
566
566
|
const h = {};
|
|
567
567
|
return e.targetUid.value && (h.for = e.targetUid.value), l.disable === !0 && (h["aria-disabled"] = "true"), h;
|
|
568
568
|
});
|
|
569
|
-
function
|
|
569
|
+
function R() {
|
|
570
|
+
var Z;
|
|
570
571
|
const h = document.activeElement;
|
|
571
|
-
let
|
|
572
|
-
|
|
572
|
+
let A = (Z = e.targetRef) == null ? void 0 : Z.value;
|
|
573
|
+
A && (h === null || h.id !== e.targetUid.value) && (A.hasAttribute("tabindex") === !0 || (A = A.querySelector("[tabindex]")), A !== h && (A == null || A.focus({ preventScroll: !0 })));
|
|
573
574
|
}
|
|
574
575
|
function L() {
|
|
575
|
-
dl(
|
|
576
|
+
dl(R);
|
|
576
577
|
}
|
|
577
578
|
function H() {
|
|
578
|
-
oo(
|
|
579
|
+
oo(R);
|
|
579
580
|
const h = document.activeElement;
|
|
580
581
|
h !== null && e.rootRef.value.contains(h) && h.blur();
|
|
581
582
|
}
|
|
582
|
-
function
|
|
583
|
-
|
|
583
|
+
function le(h) {
|
|
584
|
+
b !== null && (clearTimeout(b), b = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, t("focus", h));
|
|
584
585
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
function W(h, A) {
|
|
587
|
+
b !== null && clearTimeout(b), b = setTimeout(() => {
|
|
588
|
+
b = 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, t("blur", h)), A == null || A());
|
|
588
589
|
});
|
|
589
590
|
}
|
|
590
|
-
function
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
591
|
+
function oe(h) {
|
|
592
|
+
var A;
|
|
593
|
+
ne(h), a.platform.is.mobile !== !0 ? (((A = e.targetRef) == null ? void 0 : A.value) || e.rootRef.value).focus() : e.rootRef.value.contains(document.activeElement) === !0 && document.activeElement.blur(), l.type === "file" && (e.inputRef.value.value = null), t("update:modelValue", null), e.changeEvent === !0 && t("change", null), t("clear", l.modelValue), ve(() => {
|
|
594
|
+
const Z = p.value;
|
|
595
|
+
k(), p.value = Z;
|
|
594
596
|
});
|
|
595
597
|
}
|
|
596
|
-
function
|
|
597
|
-
[13, 32].includes(h.keyCode) &&
|
|
598
|
+
function x(h) {
|
|
599
|
+
[13, 32].includes(h.keyCode) && oe(h);
|
|
598
600
|
}
|
|
599
|
-
function
|
|
601
|
+
function X() {
|
|
600
602
|
const h = [];
|
|
601
603
|
return n.prepend !== void 0 && h.push(
|
|
602
|
-
|
|
604
|
+
s("div", {
|
|
603
605
|
class: "q-field__prepend q-field__marginal row no-wrap items-center",
|
|
604
606
|
key: "prepend",
|
|
605
607
|
onClick: he
|
|
606
608
|
}, n.prepend())
|
|
607
609
|
), h.push(
|
|
608
|
-
|
|
610
|
+
s("div", {
|
|
609
611
|
class: "q-field__control-container col relative-position row no-wrap q-anchor--skip"
|
|
610
|
-
},
|
|
612
|
+
}, ue())
|
|
611
613
|
), f.value === !0 && l.noErrorIcon === !1 && h.push(
|
|
612
|
-
|
|
613
|
-
|
|
614
|
+
U("error", [
|
|
615
|
+
s(_e, { name: a.iconSet.field.error, color: "negative" })
|
|
614
616
|
])
|
|
615
617
|
), l.loading === !0 || e.innerLoading.value === !0 ? h.push(
|
|
616
|
-
|
|
618
|
+
U(
|
|
617
619
|
"inner-loading-append",
|
|
618
|
-
n.loading !== void 0 ? n.loading() : [
|
|
620
|
+
n.loading !== void 0 ? n.loading() : [s(Ql, { color: l.color })]
|
|
619
621
|
)
|
|
620
622
|
) : l.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && h.push(
|
|
621
|
-
|
|
622
|
-
|
|
623
|
+
U("inner-clearable-append", [
|
|
624
|
+
s(_e, {
|
|
623
625
|
class: "q-field__focusable-action",
|
|
624
626
|
name: l.clearIcon || a.iconSet.field.clear,
|
|
625
627
|
tabindex: 0,
|
|
626
628
|
role: "button",
|
|
627
629
|
"aria-hidden": "false",
|
|
628
630
|
"aria-label": a.lang.label.clear,
|
|
629
|
-
onKeyup:
|
|
630
|
-
onClick:
|
|
631
|
+
onKeyup: x,
|
|
632
|
+
onClick: oe
|
|
631
633
|
})
|
|
632
634
|
])
|
|
633
635
|
), n.append !== void 0 && h.push(
|
|
634
|
-
|
|
636
|
+
s("div", {
|
|
635
637
|
class: "q-field__append q-field__marginal row no-wrap items-center",
|
|
636
638
|
key: "append",
|
|
637
639
|
onClick: he
|
|
638
640
|
}, n.append())
|
|
639
641
|
), e.getInnerAppend !== void 0 && h.push(
|
|
640
|
-
|
|
642
|
+
U("inner-append", e.getInnerAppend())
|
|
641
643
|
), e.getControlChild !== void 0 && h.push(
|
|
642
644
|
e.getControlChild()
|
|
643
645
|
), h;
|
|
644
646
|
}
|
|
645
|
-
function
|
|
647
|
+
function ue() {
|
|
646
648
|
const h = [];
|
|
647
649
|
return l.prefix !== void 0 && l.prefix !== null && h.push(
|
|
648
|
-
|
|
650
|
+
s("div", {
|
|
649
651
|
class: "q-field__prefix no-pointer-events row items-center"
|
|
650
652
|
}, l.prefix)
|
|
651
653
|
), e.getShadowControl !== void 0 && e.hasShadow.value === !0 && h.push(
|
|
652
654
|
e.getShadowControl()
|
|
655
|
+
), j.value === !0 && h.push(
|
|
656
|
+
s("div", {
|
|
657
|
+
class: _.value
|
|
658
|
+
}, pe(n.label, l.label))
|
|
653
659
|
), e.getControl !== void 0 ? h.push(e.getControl()) : n.rawControl !== void 0 ? h.push(n.rawControl()) : n.control !== void 0 && h.push(
|
|
654
|
-
|
|
660
|
+
s("div", {
|
|
655
661
|
ref: e.targetRef,
|
|
656
662
|
class: "q-field__native row",
|
|
657
663
|
tabindex: -1,
|
|
658
664
|
...e.splitAttrs.attributes.value,
|
|
659
665
|
"data-autofocus": l.autofocus === !0 || void 0
|
|
660
|
-
}, n.control(
|
|
661
|
-
), K.value === !0 && h.push(
|
|
662
|
-
c("div", {
|
|
663
|
-
class: _.value
|
|
664
|
-
}, be(n.label, l.label))
|
|
666
|
+
}, n.control(M.value))
|
|
665
667
|
), l.suffix !== void 0 && l.suffix !== null && h.push(
|
|
666
|
-
|
|
668
|
+
s("div", {
|
|
667
669
|
class: "q-field__suffix no-pointer-events row items-center"
|
|
668
670
|
}, l.suffix)
|
|
669
|
-
), h.concat(
|
|
671
|
+
), h.concat(pe(n.default));
|
|
670
672
|
}
|
|
671
|
-
function
|
|
672
|
-
let h,
|
|
673
|
-
f.value === !0 ? C.value !== null ? (h = [
|
|
674
|
-
const
|
|
675
|
-
if (l.hideBottomSpace === !0 &&
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
key: E,
|
|
673
|
+
function J() {
|
|
674
|
+
let h, A;
|
|
675
|
+
f.value === !0 ? C.value !== null ? (h = [s("div", { role: "alert" }, C.value)], A = `q--slot-error-${C.value}`) : (h = pe(n.error), A = "q--slot-error") : (l.hideHint !== !0 || e.focused.value === !0) && (l.hint !== void 0 ? (h = [s("div", l.hint)], A = `q--slot-hint-${l.hint}`) : (h = pe(n.hint), A = "q--slot-hint"));
|
|
676
|
+
const Z = l.counter === !0 || n.counter !== void 0;
|
|
677
|
+
if (l.hideBottomSpace === !0 && Z === !1 && h === void 0) return;
|
|
678
|
+
const i = s("div", {
|
|
679
|
+
key: A,
|
|
679
680
|
class: "q-field__messages col"
|
|
680
681
|
}, h);
|
|
681
|
-
return
|
|
682
|
+
return s("div", {
|
|
682
683
|
class: "q-field__bottom row items-start q-field__bottom--" + (l.hideBottomSpace !== !0 ? "animated" : "stale"),
|
|
683
684
|
onClick: he
|
|
684
685
|
}, [
|
|
685
|
-
l.hideBottomSpace === !0 ? i :
|
|
686
|
-
|
|
686
|
+
l.hideBottomSpace === !0 ? i : s(Ct, { name: "q-transition--field-message" }, () => i),
|
|
687
|
+
Z === !0 ? s("div", {
|
|
687
688
|
class: "q-field__counter"
|
|
688
689
|
}, n.counter !== void 0 ? n.counter() : e.computedCounter.value) : null
|
|
689
690
|
]);
|
|
690
691
|
}
|
|
691
|
-
function
|
|
692
|
-
return
|
|
692
|
+
function U(h, A) {
|
|
693
|
+
return A === null ? null : s("div", {
|
|
693
694
|
key: h,
|
|
694
695
|
class: "q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"
|
|
695
|
-
},
|
|
696
|
+
}, A);
|
|
696
697
|
}
|
|
697
|
-
let
|
|
698
|
+
let ce = !1;
|
|
698
699
|
return ul(() => {
|
|
699
|
-
|
|
700
|
+
ce = !0;
|
|
700
701
|
}), il(() => {
|
|
701
|
-
|
|
702
|
+
ce === !0 && l.autofocus === !0 && u.focus();
|
|
702
703
|
}), l.autofocus === !0 && nl(() => {
|
|
703
704
|
u.focus();
|
|
704
|
-
}),
|
|
705
|
-
|
|
705
|
+
}), Ae(() => {
|
|
706
|
+
b !== null && clearTimeout(b);
|
|
706
707
|
}), Object.assign(u, { focus: L, blur: H }), function() {
|
|
707
|
-
const
|
|
708
|
+
const A = e.getControl === void 0 && n.control === void 0 ? {
|
|
708
709
|
...e.splitAttrs.attributes.value,
|
|
709
710
|
"data-autofocus": l.autofocus === !0 || void 0,
|
|
710
711
|
...Y.value
|
|
711
712
|
} : Y.value;
|
|
712
|
-
return
|
|
713
|
+
return s(e.tag.value, {
|
|
713
714
|
ref: e.rootRef,
|
|
714
715
|
class: [
|
|
715
716
|
S.value,
|
|
716
|
-
|
|
717
|
+
c.class
|
|
717
718
|
],
|
|
718
|
-
style:
|
|
719
|
-
...
|
|
719
|
+
style: c.style,
|
|
720
|
+
...A
|
|
720
721
|
}, [
|
|
721
|
-
n.before !== void 0 ?
|
|
722
|
+
n.before !== void 0 ? s("div", {
|
|
722
723
|
class: "q-field__before q-field__marginal row no-wrap items-center",
|
|
723
724
|
onClick: he
|
|
724
725
|
}, n.before()) : null,
|
|
725
|
-
|
|
726
|
+
s("div", {
|
|
726
727
|
class: "q-field__inner relative-position col self-stretch"
|
|
727
728
|
}, [
|
|
728
|
-
|
|
729
|
+
s("div", {
|
|
729
730
|
ref: e.controlRef,
|
|
730
731
|
class: $.value,
|
|
731
732
|
tabindex: -1,
|
|
732
733
|
...e.controlEvents
|
|
733
|
-
},
|
|
734
|
-
y.value === !0 ?
|
|
734
|
+
}, X()),
|
|
735
|
+
y.value === !0 ? J() : null
|
|
735
736
|
]),
|
|
736
|
-
n.after !== void 0 ?
|
|
737
|
+
n.after !== void 0 ? s("div", {
|
|
737
738
|
class: "q-field__after q-field__marginal row no-wrap items-center",
|
|
738
739
|
onClick: he
|
|
739
740
|
}, n.after()) : null
|
|
@@ -752,8 +753,8 @@ const Oo = ye({
|
|
|
752
753
|
},
|
|
753
754
|
emits: hl,
|
|
754
755
|
setup() {
|
|
755
|
-
return
|
|
756
|
-
|
|
756
|
+
return pl(
|
|
757
|
+
bl({ tagProp: !0 })
|
|
757
758
|
);
|
|
758
759
|
}
|
|
759
760
|
}), Mo = {
|
|
@@ -766,7 +767,7 @@ const Oo = ye({
|
|
|
766
767
|
name: "QChip",
|
|
767
768
|
props: {
|
|
768
769
|
...rt,
|
|
769
|
-
...
|
|
770
|
+
...al,
|
|
770
771
|
dense: Boolean,
|
|
771
772
|
icon: String,
|
|
772
773
|
iconRight: String,
|
|
@@ -797,11 +798,11 @@ const Oo = ye({
|
|
|
797
798
|
},
|
|
798
799
|
emits: ["update:modelValue", "update:selected", "remove", "click"],
|
|
799
800
|
setup(e, { slots: l, emit: t }) {
|
|
800
|
-
const { proxy: { $q: n } } =
|
|
801
|
+
const { proxy: { $q: n } } = se(), c = st(e, n), u = rl(e, Mo), a = r(() => e.selected === !0 || e.icon !== void 0), b = r(() => e.selected === !0 ? e.iconSelected || n.iconSet.chip.selected : e.icon), p = r(() => e.iconRemove || n.iconSet.chip.remove), V = r(
|
|
801
802
|
() => e.disable === !1 && (e.clickable === !0 || e.selected !== null)
|
|
802
803
|
), f = r(() => {
|
|
803
804
|
const S = e.outline === !0 && e.color || e.textColor;
|
|
804
|
-
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" : "") + (
|
|
805
|
+
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" : "") + (V.value === !0 ? " q-chip--clickable cursor-pointer non-selectable q-hoverable" : "") + (e.square === !0 ? " q-chip--square" : "") + (c.value === !0 ? " q-chip--dark q-dark" : "");
|
|
805
806
|
}), C = r(() => {
|
|
806
807
|
const S = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 }, $ = {
|
|
807
808
|
...S,
|
|
@@ -812,38 +813,38 @@ const Oo = ye({
|
|
|
812
813
|
return { chip: S, remove: $ };
|
|
813
814
|
});
|
|
814
815
|
function k(S) {
|
|
815
|
-
S.keyCode === 13 &&
|
|
816
|
+
S.keyCode === 13 && g(S);
|
|
816
817
|
}
|
|
817
|
-
function
|
|
818
|
+
function g(S) {
|
|
818
819
|
e.disable || (t("update:selected", !e.selected), t("click", S));
|
|
819
820
|
}
|
|
820
821
|
function y(S) {
|
|
821
|
-
(S.keyCode === void 0 || S.keyCode === 13) && (
|
|
822
|
+
(S.keyCode === void 0 || S.keyCode === 13) && (ne(S), e.disable === !1 && (t("update:modelValue", !1), t("remove")));
|
|
822
823
|
}
|
|
823
824
|
function q() {
|
|
824
825
|
const S = [];
|
|
825
|
-
|
|
826
|
-
|
|
826
|
+
V.value === !0 && S.push(
|
|
827
|
+
s("div", { class: "q-focus-helper" })
|
|
827
828
|
), a.value === !0 && S.push(
|
|
828
|
-
|
|
829
|
+
s(_e, {
|
|
829
830
|
class: "q-chip__icon q-chip__icon--left",
|
|
830
|
-
name:
|
|
831
|
+
name: b.value
|
|
831
832
|
})
|
|
832
833
|
);
|
|
833
|
-
const $ = e.label !== void 0 ? [
|
|
834
|
+
const $ = e.label !== void 0 ? [s("div", { class: "ellipsis" }, [e.label])] : void 0;
|
|
834
835
|
return S.push(
|
|
835
|
-
|
|
836
|
+
s("div", {
|
|
836
837
|
class: "q-chip__content col row no-wrap items-center q-anchor--skip"
|
|
837
|
-
},
|
|
838
|
+
}, Wl(l.default, $))
|
|
838
839
|
), e.iconRight && S.push(
|
|
839
|
-
|
|
840
|
+
s(_e, {
|
|
840
841
|
class: "q-chip__icon q-chip__icon--right",
|
|
841
842
|
name: e.iconRight
|
|
842
843
|
})
|
|
843
844
|
), e.removable === !0 && S.push(
|
|
844
|
-
|
|
845
|
+
s(_e, {
|
|
845
846
|
class: "q-chip__icon q-chip__icon--remove cursor-pointer",
|
|
846
|
-
name:
|
|
847
|
+
name: p.value,
|
|
847
848
|
...C.value.remove,
|
|
848
849
|
onClick: y,
|
|
849
850
|
onKeyup: y
|
|
@@ -856,17 +857,17 @@ const Oo = ye({
|
|
|
856
857
|
class: f.value,
|
|
857
858
|
style: u.value
|
|
858
859
|
};
|
|
859
|
-
return
|
|
860
|
+
return V.value === !0 && Object.assign(
|
|
860
861
|
S,
|
|
861
862
|
C.value.chip,
|
|
862
|
-
{ onClick:
|
|
863
|
+
{ onClick: g, onKeyup: k }
|
|
863
864
|
), Ul(
|
|
864
865
|
"div",
|
|
865
866
|
S,
|
|
866
867
|
q(),
|
|
867
868
|
"ripple",
|
|
868
869
|
e.ripple !== !1 && e.disable !== !0,
|
|
869
|
-
() => [[
|
|
870
|
+
() => [[Xl, e.ripple]]
|
|
870
871
|
);
|
|
871
872
|
};
|
|
872
873
|
}
|
|
@@ -874,7 +875,7 @@ const Oo = ye({
|
|
|
874
875
|
function $o(e, l, t) {
|
|
875
876
|
function n() {
|
|
876
877
|
}
|
|
877
|
-
return
|
|
878
|
+
return Ae(() => {
|
|
878
879
|
e.value === !0 && void 0;
|
|
879
880
|
}), {
|
|
880
881
|
removeFromHistory: n,
|
|
@@ -882,54 +883,52 @@ function $o(e, l, t) {
|
|
|
882
883
|
}
|
|
883
884
|
};
|
|
884
885
|
}
|
|
885
|
-
let
|
|
886
|
+
let Ne = 0, bt, pt, Ue, yt = !1, Ut, Wt, Xt, xe = null;
|
|
886
887
|
function Ho(e) {
|
|
887
|
-
Po(e) &&
|
|
888
|
+
Po(e) && ne(e);
|
|
888
889
|
}
|
|
889
890
|
function Po(e) {
|
|
890
891
|
if (e.target === document.body || e.target.classList.contains("q-layout__backdrop"))
|
|
891
892
|
return !0;
|
|
892
|
-
const l = Yl(e), t = e.shiftKey && !e.deltaX, n = !t && Math.abs(e.deltaX) <= Math.abs(e.deltaY),
|
|
893
|
+
const l = Yl(e), t = e.shiftKey && !e.deltaX, n = !t && Math.abs(e.deltaX) <= Math.abs(e.deltaY), c = t || n ? e.deltaY : e.deltaX;
|
|
893
894
|
for (let u = 0; u < l.length; u++) {
|
|
894
895
|
const a = l[u];
|
|
895
896
|
if (io(a, n))
|
|
896
|
-
return n ?
|
|
897
|
+
return n ? c < 0 && a.scrollTop === 0 ? !0 : c > 0 && a.scrollTop + a.clientHeight === a.scrollHeight : c < 0 && a.scrollLeft === 0 ? !0 : c > 0 && a.scrollLeft + a.clientWidth === a.scrollWidth;
|
|
897
898
|
}
|
|
898
899
|
return !0;
|
|
899
900
|
}
|
|
900
901
|
function Yt(e) {
|
|
901
902
|
e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop);
|
|
902
903
|
}
|
|
903
|
-
function
|
|
904
|
+
function nt(e) {
|
|
904
905
|
yt !== !0 && (yt = !0, requestAnimationFrame(() => {
|
|
905
906
|
yt = !1;
|
|
906
907
|
const { height: l } = e.target, { clientHeight: t, scrollTop: n } = document.scrollingElement;
|
|
907
|
-
(
|
|
908
|
+
(Ue === void 0 || l !== window.innerHeight) && (Ue = t - l, document.scrollingElement.scrollTop = n), n > Ue && (document.scrollingElement.scrollTop -= Math.ceil((n - Ue) / 8));
|
|
908
909
|
}));
|
|
909
910
|
}
|
|
910
911
|
function Zt(e) {
|
|
911
912
|
const l = document.body, t = window.visualViewport !== void 0;
|
|
912
913
|
if (e === "add") {
|
|
913
|
-
const { overflowY: n, overflowX:
|
|
914
|
-
|
|
914
|
+
const { overflowY: n, overflowX: c } = window.getComputedStyle(l);
|
|
915
|
+
bt = no(window), pt = uo(window), Ut = l.style.left, Wt = l.style.top, Xt = window.location.href, l.style.left = `-${bt}px`, l.style.top = `-${pt}px`, c !== "hidden" && (c === "scroll" || l.scrollWidth > window.innerWidth) && l.classList.add("q-body--force-scrollbar-x"), n !== "hidden" && (n === "scroll" || l.scrollHeight > window.innerHeight) && l.classList.add("q-body--force-scrollbar-y"), l.classList.add("q-body--prevent-scroll"), document.qScrollPrevented = !0, Ve.is.ios === !0 && (t === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", nt, qe.passiveCapture), window.visualViewport.addEventListener("scroll", nt, qe.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", Yt, qe.passiveCapture));
|
|
915
916
|
}
|
|
916
|
-
|
|
917
|
+
Ve.is.desktop === !0 && Ve.is.mac === !0 && window[`${e}EventListener`]("wheel", Ho, qe.notPassive), e === "remove" && (Ve.is.ios === !0 && (t === !0 ? (window.visualViewport.removeEventListener("resize", nt, qe.passiveCapture), window.visualViewport.removeEventListener("scroll", nt, qe.passiveCapture)) : window.removeEventListener("scroll", Yt, qe.passiveCapture)), l.classList.remove("q-body--prevent-scroll"), l.classList.remove("q-body--force-scrollbar-x"), l.classList.remove("q-body--force-scrollbar-y"), document.qScrollPrevented = !1, l.style.left = Ut, l.style.top = Wt, window.location.href === Xt && window.scrollTo(bt, pt), Ue = void 0);
|
|
917
918
|
}
|
|
918
919
|
function Do(e) {
|
|
919
920
|
let l = "add";
|
|
920
921
|
if (e === !0) {
|
|
921
|
-
if (
|
|
922
|
-
clearTimeout(
|
|
922
|
+
if (Ne++, xe !== null) {
|
|
923
|
+
clearTimeout(xe), xe = null;
|
|
923
924
|
return;
|
|
924
925
|
}
|
|
925
|
-
if (
|
|
926
|
-
return;
|
|
926
|
+
if (Ne > 1) return;
|
|
927
927
|
} else {
|
|
928
|
-
if (
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
Zt(l), Ve = null;
|
|
928
|
+
if (Ne === 0 || (Ne--, Ne > 0)) return;
|
|
929
|
+
if (l = "remove", Ve.is.ios === !0 && Ve.is.nativeMobile === !0) {
|
|
930
|
+
xe !== null && clearTimeout(xe), xe = setTimeout(() => {
|
|
931
|
+
Zt(l), xe = null;
|
|
933
932
|
}, 100);
|
|
934
933
|
return;
|
|
935
934
|
}
|
|
@@ -944,7 +943,7 @@ function jo() {
|
|
|
944
943
|
}
|
|
945
944
|
};
|
|
946
945
|
}
|
|
947
|
-
let
|
|
946
|
+
let ut = 0;
|
|
948
947
|
const Ko = {
|
|
949
948
|
standard: "fixed-full flex-center",
|
|
950
949
|
top: "fixed-top justify-center",
|
|
@@ -961,8 +960,8 @@ const Ko = {
|
|
|
961
960
|
name: "QDialog",
|
|
962
961
|
inheritAttrs: !1,
|
|
963
962
|
props: {
|
|
964
|
-
...
|
|
965
|
-
...
|
|
963
|
+
...so,
|
|
964
|
+
...ro,
|
|
966
965
|
transitionShow: String,
|
|
967
966
|
// override useTransitionProps
|
|
968
967
|
transitionHide: String,
|
|
@@ -989,147 +988,148 @@ const Ko = {
|
|
|
989
988
|
}
|
|
990
989
|
},
|
|
991
990
|
emits: [
|
|
992
|
-
...
|
|
991
|
+
...ao,
|
|
993
992
|
"shake",
|
|
994
993
|
"click",
|
|
995
994
|
"escapeKey"
|
|
996
995
|
],
|
|
997
996
|
setup(e, { slots: l, emit: t, attrs: n }) {
|
|
998
|
-
const
|
|
999
|
-
let
|
|
997
|
+
const c = se(), u = O(null), a = O(!1), b = O(!1);
|
|
998
|
+
let p = null, V = null, f, C;
|
|
1000
999
|
const k = r(
|
|
1001
1000
|
() => e.persistent !== !0 && e.noRouteDismiss !== !0 && e.seamless !== !0
|
|
1002
|
-
), { preventBodyScroll:
|
|
1001
|
+
), { preventBodyScroll: g } = jo(), { registerTimeout: y } = co(), { registerTick: q, removeTick: S } = fo(), { transitionProps: $, transitionStyle: j } = vo(
|
|
1003
1002
|
e,
|
|
1004
1003
|
() => Jt[e.position][0],
|
|
1005
1004
|
() => Jt[e.position][1]
|
|
1006
|
-
), _ = r(() =>
|
|
1007
|
-
|
|
1005
|
+
), _ = r(() => j.value + (e.backdropFilter !== void 0 ? `;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}` : "")), { showPortal: M, hidePortal: Y, portalIsAccessible: R, renderPortal: L } = mo(
|
|
1006
|
+
c,
|
|
1008
1007
|
u,
|
|
1009
|
-
|
|
1008
|
+
z,
|
|
1010
1009
|
"dialog"
|
|
1011
|
-
), { hide: H } =
|
|
1010
|
+
), { hide: H } = go({
|
|
1012
1011
|
showing: a,
|
|
1013
1012
|
hideOnRouteChange: k,
|
|
1014
|
-
handleShow:
|
|
1015
|
-
handleHide:
|
|
1013
|
+
handleShow: X,
|
|
1014
|
+
handleHide: ue,
|
|
1016
1015
|
processOnMount: !0
|
|
1017
1016
|
});
|
|
1018
1017
|
$o(a);
|
|
1019
|
-
const
|
|
1020
|
-
() => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${Ko[e.position]}` + (
|
|
1021
|
-
),
|
|
1022
|
-
`q-dialog fullscreen no-pointer-events q-dialog--${
|
|
1018
|
+
const le = r(
|
|
1019
|
+
() => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${Ko[e.position]}` + (b.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" : "")
|
|
1020
|
+
), W = r(() => a.value === !0 && e.seamless !== !0), oe = r(() => e.autoClose === !0 ? { onClick: Z } : {}), x = r(() => [
|
|
1021
|
+
`q-dialog fullscreen no-pointer-events q-dialog--${W.value === !0 ? "modal" : "seamless"}`,
|
|
1023
1022
|
n.class
|
|
1024
1023
|
]);
|
|
1025
|
-
|
|
1026
|
-
a.value === !0 &&
|
|
1027
|
-
}),
|
|
1028
|
-
|
|
1024
|
+
G(() => e.maximized, (w) => {
|
|
1025
|
+
a.value === !0 && A(w);
|
|
1026
|
+
}), G(W, (w) => {
|
|
1027
|
+
g(w), w === !0 ? (yo(v), ho(ce)) : (Pt(v), Ht(ce));
|
|
1029
1028
|
});
|
|
1030
|
-
function
|
|
1031
|
-
|
|
1032
|
-
|
|
1029
|
+
function X(w) {
|
|
1030
|
+
var F;
|
|
1031
|
+
V = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, A(e.maximized), M(), b.value = !0, e.noFocus !== !0 ? ((F = document.activeElement) == null || F.blur(), q(J)) : S(), y(() => {
|
|
1032
|
+
if (c.proxy.$q.platform.is.ios === !0) {
|
|
1033
1033
|
if (e.seamless !== !0 && document.activeElement) {
|
|
1034
|
-
const { top:
|
|
1035
|
-
|
|
1036
|
-
document.scrollingElement.scrollHeight -
|
|
1037
|
-
|
|
1034
|
+
const { top: I, bottom: E } = document.activeElement.getBoundingClientRect(), { innerHeight: K } = window, B = window.visualViewport !== void 0 ? window.visualViewport.height : K;
|
|
1035
|
+
I > 0 && E > B / 2 && (document.scrollingElement.scrollTop = Math.min(
|
|
1036
|
+
document.scrollingElement.scrollHeight - B,
|
|
1037
|
+
E >= K ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + E - B / 2)
|
|
1038
1038
|
)), document.activeElement.scrollIntoView();
|
|
1039
1039
|
}
|
|
1040
1040
|
C = !0, u.value.click(), C = !1;
|
|
1041
1041
|
}
|
|
1042
|
-
|
|
1042
|
+
M(!0), b.value = !1, t("show", w);
|
|
1043
1043
|
}, e.transitionDuration);
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
S(), h(!0),
|
|
1047
|
-
Y(!0),
|
|
1045
|
+
function ue(w) {
|
|
1046
|
+
S(), h(!0), b.value = !0, Y(), V !== null && ((((w == null ? void 0 : w.type.indexOf("key")) === 0 ? V.closest('[tabindex]:not([tabindex^="-"])') : void 0) || V).focus(), V = null), y(() => {
|
|
1047
|
+
Y(!0), b.value = !1, t("hide", w);
|
|
1048
1048
|
}, e.transitionDuration);
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function J(w) {
|
|
1051
1051
|
dl(() => {
|
|
1052
|
-
let
|
|
1053
|
-
if (
|
|
1052
|
+
let F = u.value;
|
|
1053
|
+
if (F !== null) {
|
|
1054
1054
|
if (w !== void 0) {
|
|
1055
|
-
const
|
|
1056
|
-
if (
|
|
1057
|
-
|
|
1055
|
+
const I = F.querySelector(w);
|
|
1056
|
+
if (I !== null) {
|
|
1057
|
+
I.focus({ preventScroll: !0 });
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
|
-
|
|
1061
|
+
F.contains(document.activeElement) !== !0 && (F = F.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || F.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || F.querySelector("[autofocus], [data-autofocus]") || F, F.focus({ preventScroll: !0 }));
|
|
1062
1062
|
}
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
w && typeof w.focus == "function" ? w.focus({ preventScroll: !0 }) :
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
|
|
1065
|
+
function U(w) {
|
|
1066
|
+
w && typeof w.focus == "function" ? w.focus({ preventScroll: !0 }) : J(), t("shake");
|
|
1067
|
+
const F = u.value;
|
|
1068
|
+
F !== null && (F.classList.remove("q-animate--scale"), F.classList.add("q-animate--scale"), p !== null && clearTimeout(p), p = setTimeout(() => {
|
|
1069
|
+
p = null, u.value !== null && (F.classList.remove("q-animate--scale"), J());
|
|
1070
1070
|
}, 170));
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 &&
|
|
1072
|
+
function ce() {
|
|
1073
|
+
e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && U() : (t("escapeKey"), H()));
|
|
1074
1074
|
}
|
|
1075
1075
|
function h(w) {
|
|
1076
|
-
|
|
1076
|
+
p !== null && (clearTimeout(p), p = null), (w === !0 || a.value === !0) && (A(!1), e.seamless !== !0 && (g(!1), Pt(v), Ht(ce))), w !== !0 && (V = null);
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1079
|
-
w === !0 ? f !== !0 && (
|
|
1078
|
+
function A(w) {
|
|
1079
|
+
w === !0 ? f !== !0 && (ut < 1 && document.body.classList.add("q-body--dialog"), ut++, f = !0) : f === !0 && (ut < 2 && document.body.classList.remove("q-body--dialog"), ut--, f = !1);
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Z(w) {
|
|
1082
1082
|
C !== !0 && (H(w), t("click", w));
|
|
1083
1083
|
}
|
|
1084
1084
|
function i(w) {
|
|
1085
|
-
e.persistent !== !0 && e.noBackdropDismiss !== !0 ? H(w) : e.noShake !== !0 &&
|
|
1085
|
+
e.persistent !== !0 && e.noBackdropDismiss !== !0 ? H(w) : e.noShake !== !0 && U();
|
|
1086
1086
|
}
|
|
1087
1087
|
function v(w) {
|
|
1088
|
-
e.allowFocusOutside !== !0 &&
|
|
1088
|
+
e.allowFocusOutside !== !0 && R.value === !0 && Zl(u.value, w.target) !== !0 && J('[tabindex]:not([tabindex="-1"])');
|
|
1089
1089
|
}
|
|
1090
|
-
Object.assign(
|
|
1090
|
+
Object.assign(c.proxy, {
|
|
1091
1091
|
// expose public methods
|
|
1092
|
-
focus:
|
|
1093
|
-
shake:
|
|
1092
|
+
focus: J,
|
|
1093
|
+
shake: U,
|
|
1094
1094
|
// private but needed by QSelect
|
|
1095
1095
|
__updateRefocusTarget(w) {
|
|
1096
|
-
|
|
1096
|
+
V = w || null;
|
|
1097
1097
|
}
|
|
1098
|
-
}),
|
|
1099
|
-
function
|
|
1100
|
-
return
|
|
1098
|
+
}), Ae(h);
|
|
1099
|
+
function z() {
|
|
1100
|
+
return s("div", {
|
|
1101
1101
|
role: "dialog",
|
|
1102
|
-
"aria-modal":
|
|
1102
|
+
"aria-modal": W.value === !0 ? "true" : "false",
|
|
1103
1103
|
...n,
|
|
1104
|
-
class:
|
|
1104
|
+
class: x.value
|
|
1105
1105
|
}, [
|
|
1106
|
-
|
|
1106
|
+
s(Ct, {
|
|
1107
1107
|
name: "q-transition--fade",
|
|
1108
1108
|
appear: !0
|
|
1109
|
-
}, () =>
|
|
1109
|
+
}, () => W.value === !0 ? s("div", {
|
|
1110
1110
|
class: "q-dialog__backdrop fixed-full",
|
|
1111
1111
|
style: _.value,
|
|
1112
1112
|
"aria-hidden": "true",
|
|
1113
1113
|
tabindex: -1,
|
|
1114
1114
|
onClick: i
|
|
1115
1115
|
}) : null),
|
|
1116
|
-
|
|
1116
|
+
s(
|
|
1117
1117
|
Ct,
|
|
1118
1118
|
$.value,
|
|
1119
|
-
() => a.value === !0 ?
|
|
1119
|
+
() => a.value === !0 ? s("div", {
|
|
1120
1120
|
ref: u,
|
|
1121
|
-
class:
|
|
1122
|
-
style:
|
|
1121
|
+
class: le.value,
|
|
1122
|
+
style: j.value,
|
|
1123
1123
|
tabindex: -1,
|
|
1124
|
-
...
|
|
1125
|
-
},
|
|
1124
|
+
...oe.value
|
|
1125
|
+
}, pe(l.default)) : null
|
|
1126
1126
|
)
|
|
1127
1127
|
]);
|
|
1128
1128
|
}
|
|
1129
1129
|
return L;
|
|
1130
1130
|
}
|
|
1131
1131
|
});
|
|
1132
|
-
let
|
|
1132
|
+
let at = !1;
|
|
1133
1133
|
{
|
|
1134
1134
|
const e = document.createElement("div");
|
|
1135
1135
|
e.setAttribute("dir", "rtl"), Object.assign(e.style, {
|
|
@@ -1141,9 +1141,9 @@ let it = !1;
|
|
|
1141
1141
|
Object.assign(l.style, {
|
|
1142
1142
|
width: "1000px",
|
|
1143
1143
|
height: "1px"
|
|
1144
|
-
}), document.body.appendChild(e), e.appendChild(l), e.scrollLeft = -1e3,
|
|
1144
|
+
}), document.body.appendChild(e), e.appendChild(l), e.scrollLeft = -1e3, at = e.scrollLeft >= 0, e.remove();
|
|
1145
1145
|
}
|
|
1146
|
-
const
|
|
1146
|
+
const re = 1e3, Qo = [
|
|
1147
1147
|
"start",
|
|
1148
1148
|
"center",
|
|
1149
1149
|
"end",
|
|
@@ -1152,49 +1152,48 @@ const ie = 1e3, Qo = [
|
|
|
1152
1152
|
"end-force"
|
|
1153
1153
|
], yl = Array.prototype.filter, Uo = window.getComputedStyle(document.body).overflowAnchor === void 0 ? Jl : function(e, l) {
|
|
1154
1154
|
e !== null && (e._qOverflowAnimationFrame !== void 0 && cancelAnimationFrame(e._qOverflowAnimationFrame), e._qOverflowAnimationFrame = requestAnimationFrame(() => {
|
|
1155
|
-
if (e === null)
|
|
1156
|
-
return;
|
|
1155
|
+
if (e === null) return;
|
|
1157
1156
|
e._qOverflowAnimationFrame = void 0;
|
|
1158
1157
|
const t = e.children || [];
|
|
1159
|
-
yl.call(t, (
|
|
1160
|
-
delete
|
|
1158
|
+
yl.call(t, (c) => c.dataset && c.dataset.qVsAnchor !== void 0).forEach((c) => {
|
|
1159
|
+
delete c.dataset.qVsAnchor;
|
|
1161
1160
|
});
|
|
1162
1161
|
const n = t[l];
|
|
1163
|
-
n && n.dataset && (n.dataset.qVsAnchor = "");
|
|
1162
|
+
n != null && n.dataset && (n.dataset.qVsAnchor = "");
|
|
1164
1163
|
}));
|
|
1165
1164
|
};
|
|
1166
|
-
function
|
|
1165
|
+
function $e(e, l) {
|
|
1167
1166
|
return e + l;
|
|
1168
1167
|
}
|
|
1169
|
-
function St(e, l, t, n,
|
|
1170
|
-
const
|
|
1168
|
+
function St(e, l, t, n, c, u, a, b) {
|
|
1169
|
+
const p = e === window ? document.scrollingElement || document.documentElement : e, V = c === !0 ? "offsetWidth" : "offsetHeight", f = {
|
|
1171
1170
|
scrollStart: 0,
|
|
1172
|
-
scrollViewSize: -a -
|
|
1171
|
+
scrollViewSize: -a - b,
|
|
1173
1172
|
scrollMaxSize: 0,
|
|
1174
1173
|
offsetStart: -a,
|
|
1175
|
-
offsetEnd: -
|
|
1174
|
+
offsetEnd: -b
|
|
1176
1175
|
};
|
|
1177
|
-
if (
|
|
1176
|
+
if (c === !0 ? (e === window ? (f.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, f.scrollViewSize += document.documentElement.clientWidth) : (f.scrollStart = p.scrollLeft, f.scrollViewSize += p.clientWidth), f.scrollMaxSize = p.scrollWidth, u === !0 && (f.scrollStart = (at === !0 ? f.scrollMaxSize - f.scrollViewSize : 0) - f.scrollStart)) : (e === window ? (f.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0, f.scrollViewSize += document.documentElement.clientHeight) : (f.scrollStart = p.scrollTop, f.scrollViewSize += p.clientHeight), f.scrollMaxSize = p.scrollHeight), t !== null)
|
|
1178
1177
|
for (let C = t.previousElementSibling; C !== null; C = C.previousElementSibling)
|
|
1179
|
-
C.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetStart += C[
|
|
1178
|
+
C.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetStart += C[V]);
|
|
1180
1179
|
if (n !== null)
|
|
1181
1180
|
for (let C = n.nextElementSibling; C !== null; C = C.nextElementSibling)
|
|
1182
|
-
C.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetEnd += C[
|
|
1181
|
+
C.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetEnd += C[V]);
|
|
1183
1182
|
if (l !== e) {
|
|
1184
|
-
const C =
|
|
1185
|
-
|
|
1183
|
+
const C = p.getBoundingClientRect(), k = l.getBoundingClientRect();
|
|
1184
|
+
c === !0 ? (f.offsetStart += k.left - C.left, f.offsetEnd -= k.width) : (f.offsetStart += k.top - C.top, f.offsetEnd -= k.height), e !== window && (f.offsetStart += f.scrollStart), f.offsetEnd += f.scrollMaxSize - f.offsetStart;
|
|
1186
1185
|
}
|
|
1187
1186
|
return f;
|
|
1188
1187
|
}
|
|
1189
1188
|
function Gt(e, l, t, n) {
|
|
1190
|
-
l === "end" && (l = (e === window ? document.body : e)[t === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? t === !0 ? (n === !0 && (l = (
|
|
1189
|
+
l === "end" && (l = (e === window ? document.body : e)[t === !0 ? "scrollWidth" : "scrollHeight"]), e === window ? t === !0 ? (n === !0 && (l = (at === !0 ? document.body.scrollWidth - document.documentElement.clientWidth : 0) - l), window.scrollTo(l, window.pageYOffset || window.scrollY || document.body.scrollTop || 0)) : window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, l) : t === !0 ? (n === !0 && (l = (at === !0 ? e.scrollWidth - e.offsetWidth : 0) - l), e.scrollLeft = l) : e.scrollTop = l;
|
|
1191
1190
|
}
|
|
1192
|
-
function
|
|
1191
|
+
function Qe(e, l, t, n) {
|
|
1193
1192
|
if (t >= n)
|
|
1194
1193
|
return 0;
|
|
1195
|
-
const
|
|
1196
|
-
let
|
|
1197
|
-
return t %
|
|
1194
|
+
const c = l.length, u = Math.floor(t / re), a = Math.floor((n - 1) / re) + 1;
|
|
1195
|
+
let b = e.slice(u, a).reduce($e, 0);
|
|
1196
|
+
return t % re !== 0 && (b -= l.slice(u * re, t).reduce($e, 0)), n % re !== 0 && n !== c && (b -= l.slice(n, a * re).reduce($e, 0)), b;
|
|
1198
1197
|
}
|
|
1199
1198
|
const Wo = {
|
|
1200
1199
|
virtualScrollSliceSize: {
|
|
@@ -1234,282 +1233,279 @@ function Xo({
|
|
|
1234
1233
|
virtualScrollItemSizeComputed: n
|
|
1235
1234
|
// optional
|
|
1236
1235
|
}) {
|
|
1237
|
-
const
|
|
1238
|
-
let
|
|
1239
|
-
const y =
|
|
1236
|
+
const c = se(), { props: u, emit: a, proxy: b } = c, { $q: p } = b;
|
|
1237
|
+
let V, f, C, k = [], g;
|
|
1238
|
+
const y = O(0), q = O(0), S = O({}), $ = O(null), j = O(null), _ = O(null), M = O({ from: 0, to: 0 }), Y = r(() => u.tableColspan !== void 0 ? u.tableColspan : 100);
|
|
1240
1239
|
n === void 0 && (n = r(() => u.virtualScrollItemSize));
|
|
1241
|
-
const
|
|
1242
|
-
() =>
|
|
1240
|
+
const R = r(() => n.value + ";" + u.virtualScrollHorizontal), L = r(
|
|
1241
|
+
() => R.value + ";" + u.virtualScrollSliceRatioBefore + ";" + u.virtualScrollSliceRatioAfter
|
|
1243
1242
|
);
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
}),
|
|
1243
|
+
G(L, () => {
|
|
1244
|
+
U();
|
|
1245
|
+
}), G(R, H);
|
|
1247
1246
|
function H() {
|
|
1248
|
-
|
|
1247
|
+
J(f, !0);
|
|
1249
1248
|
}
|
|
1250
|
-
function
|
|
1251
|
-
|
|
1249
|
+
function le(i) {
|
|
1250
|
+
J(i === void 0 ? f : i);
|
|
1252
1251
|
}
|
|
1253
|
-
function
|
|
1254
|
-
const
|
|
1255
|
-
if (
|
|
1256
|
-
return;
|
|
1252
|
+
function W(i, v) {
|
|
1253
|
+
const z = l();
|
|
1254
|
+
if (z == null || z.nodeType === 8) return;
|
|
1257
1255
|
const w = St(
|
|
1258
|
-
|
|
1256
|
+
z,
|
|
1259
1257
|
t(),
|
|
1260
1258
|
$.value,
|
|
1261
|
-
|
|
1259
|
+
j.value,
|
|
1262
1260
|
u.virtualScrollHorizontal,
|
|
1263
|
-
|
|
1261
|
+
p.lang.rtl,
|
|
1264
1262
|
u.virtualScrollStickySizeStart,
|
|
1265
1263
|
u.virtualScrollStickySizeEnd
|
|
1266
1264
|
);
|
|
1267
|
-
C !== w.scrollViewSize &&
|
|
1268
|
-
|
|
1265
|
+
C !== w.scrollViewSize && U(w.scrollViewSize), x(
|
|
1266
|
+
z,
|
|
1269
1267
|
w,
|
|
1270
1268
|
Math.min(e.value - 1, Math.max(0, parseInt(i, 10) || 0)),
|
|
1271
1269
|
0,
|
|
1272
1270
|
Qo.indexOf(v) !== -1 ? v : f !== -1 && i > f ? "end" : "start"
|
|
1273
1271
|
);
|
|
1274
1272
|
}
|
|
1275
|
-
function
|
|
1273
|
+
function oe() {
|
|
1276
1274
|
const i = l();
|
|
1277
|
-
if (i == null || i.nodeType === 8)
|
|
1278
|
-
return;
|
|
1275
|
+
if (i == null || i.nodeType === 8) return;
|
|
1279
1276
|
const v = St(
|
|
1280
1277
|
i,
|
|
1281
1278
|
t(),
|
|
1282
1279
|
$.value,
|
|
1283
|
-
|
|
1280
|
+
j.value,
|
|
1284
1281
|
u.virtualScrollHorizontal,
|
|
1285
|
-
|
|
1282
|
+
p.lang.rtl,
|
|
1286
1283
|
u.virtualScrollStickySizeStart,
|
|
1287
1284
|
u.virtualScrollStickySizeEnd
|
|
1288
|
-
),
|
|
1289
|
-
if (
|
|
1290
|
-
return;
|
|
1285
|
+
), z = e.value - 1, w = v.scrollMaxSize - v.offsetStart - v.offsetEnd - q.value;
|
|
1286
|
+
if (V === v.scrollStart) return;
|
|
1291
1287
|
if (v.scrollMaxSize <= 0) {
|
|
1292
|
-
|
|
1288
|
+
x(i, v, 0, 0);
|
|
1293
1289
|
return;
|
|
1294
1290
|
}
|
|
1295
|
-
C !== v.scrollViewSize &&
|
|
1296
|
-
const
|
|
1297
|
-
if (
|
|
1298
|
-
|
|
1291
|
+
C !== v.scrollViewSize && U(v.scrollViewSize), X(M.value.from);
|
|
1292
|
+
const F = Math.floor(v.scrollMaxSize - Math.max(v.scrollViewSize, v.offsetEnd) - Math.min(g[z], v.scrollViewSize / 2));
|
|
1293
|
+
if (F > 0 && Math.ceil(v.scrollStart) >= F) {
|
|
1294
|
+
x(
|
|
1299
1295
|
i,
|
|
1300
1296
|
v,
|
|
1301
|
-
|
|
1302
|
-
v.scrollMaxSize - v.offsetEnd - k.reduce(
|
|
1297
|
+
z,
|
|
1298
|
+
v.scrollMaxSize - v.offsetEnd - k.reduce($e, 0)
|
|
1303
1299
|
);
|
|
1304
1300
|
return;
|
|
1305
1301
|
}
|
|
1306
|
-
let
|
|
1307
|
-
if (
|
|
1308
|
-
|
|
1302
|
+
let I = 0, E = v.scrollStart - v.offsetStart, K = E;
|
|
1303
|
+
if (E <= w && E + v.scrollViewSize >= y.value)
|
|
1304
|
+
E -= y.value, I = M.value.from, K = E;
|
|
1309
1305
|
else
|
|
1310
|
-
for (let
|
|
1311
|
-
|
|
1312
|
-
for (;
|
|
1313
|
-
|
|
1314
|
-
|
|
1306
|
+
for (let B = 0; E >= k[B] && I < z; B++)
|
|
1307
|
+
E -= k[B], I += re;
|
|
1308
|
+
for (; E > 0 && I < z; )
|
|
1309
|
+
E -= g[I], E > -v.scrollViewSize ? (I++, K = E) : K = g[I] + E;
|
|
1310
|
+
x(
|
|
1315
1311
|
i,
|
|
1316
1312
|
v,
|
|
1317
|
-
|
|
1318
|
-
|
|
1313
|
+
I,
|
|
1314
|
+
K
|
|
1319
1315
|
);
|
|
1320
1316
|
}
|
|
1321
|
-
function
|
|
1322
|
-
const
|
|
1323
|
-
let
|
|
1324
|
-
|
|
1325
|
-
const me =
|
|
1326
|
-
if (me === !1 &&
|
|
1327
|
-
h(
|
|
1317
|
+
function x(i, v, z, w, F) {
|
|
1318
|
+
const I = typeof F == "string" && F.indexOf("-force") !== -1, E = I === !0 ? F.replace("-force", "") : F, K = E !== void 0 ? E : "start";
|
|
1319
|
+
let B = Math.max(0, z - S.value[K]), ee = B + S.value.total;
|
|
1320
|
+
ee > e.value && (ee = e.value, B = Math.max(0, ee - S.value.total)), V = v.scrollStart;
|
|
1321
|
+
const me = B !== M.value.from || ee !== M.value.to;
|
|
1322
|
+
if (me === !1 && E === void 0) {
|
|
1323
|
+
h(z);
|
|
1328
1324
|
return;
|
|
1329
1325
|
}
|
|
1330
|
-
const { activeElement:
|
|
1331
|
-
me === !0 &&
|
|
1332
|
-
|
|
1333
|
-
})), Uo(
|
|
1334
|
-
const
|
|
1326
|
+
const { activeElement: We } = document, ie = _.value;
|
|
1327
|
+
me === !0 && ie !== null && ie !== We && ie.contains(We) === !0 && (ie.addEventListener("focusout", ue), setTimeout(() => {
|
|
1328
|
+
ie == null || ie.removeEventListener("focusout", ue);
|
|
1329
|
+
})), Uo(ie, z - B);
|
|
1330
|
+
const Xe = E !== void 0 ? g.slice(B, z).reduce($e, 0) : 0;
|
|
1335
1331
|
if (me === !0) {
|
|
1336
|
-
const Se =
|
|
1337
|
-
|
|
1338
|
-
|
|
1332
|
+
const Se = ee >= M.value.from && B <= M.value.to ? M.value.to : ee;
|
|
1333
|
+
M.value = { from: B, to: Se }, y.value = Qe(k, g, 0, B), q.value = Qe(k, g, ee, e.value), requestAnimationFrame(() => {
|
|
1334
|
+
M.value.to !== ee && V === v.scrollStart && (M.value = { from: M.value.from, to: ee }, q.value = Qe(k, g, ee, e.value));
|
|
1339
1335
|
});
|
|
1340
1336
|
}
|
|
1341
1337
|
requestAnimationFrame(() => {
|
|
1342
|
-
if (
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
$e = A !== !0 && He < we && Xe < He + v.scrollViewSize ? He : z === "end" ? Xe - v.scrollViewSize : we - (z === "start" ? 0 : Math.round((v.scrollViewSize - s[R]) / 2));
|
|
1338
|
+
if (V !== v.scrollStart) return;
|
|
1339
|
+
me === !0 && X(B);
|
|
1340
|
+
const Se = g.slice(B, z).reduce($e, 0), we = Se + v.offsetStart + y.value, Ye = we + g[z];
|
|
1341
|
+
let He = we + w;
|
|
1342
|
+
if (E !== void 0) {
|
|
1343
|
+
const ct = Se - Xe, Pe = v.scrollStart + ct;
|
|
1344
|
+
He = I !== !0 && Pe < we && Ye < Pe + v.scrollViewSize ? Pe : E === "end" ? Ye - v.scrollViewSize : we - (E === "start" ? 0 : Math.round((v.scrollViewSize - g[z]) / 2));
|
|
1350
1345
|
}
|
|
1351
|
-
|
|
1346
|
+
V = He, Gt(
|
|
1352
1347
|
i,
|
|
1353
|
-
|
|
1348
|
+
He,
|
|
1354
1349
|
u.virtualScrollHorizontal,
|
|
1355
|
-
|
|
1356
|
-
), h(
|
|
1350
|
+
p.lang.rtl
|
|
1351
|
+
), h(z);
|
|
1357
1352
|
});
|
|
1358
1353
|
}
|
|
1359
|
-
function
|
|
1354
|
+
function X(i) {
|
|
1360
1355
|
const v = _.value;
|
|
1361
1356
|
if (v) {
|
|
1362
|
-
const
|
|
1357
|
+
const z = yl.call(
|
|
1363
1358
|
v.children,
|
|
1364
|
-
(
|
|
1365
|
-
), w =
|
|
1366
|
-
let
|
|
1367
|
-
for (let
|
|
1368
|
-
for (
|
|
1369
|
-
|
|
1370
|
-
|
|
1359
|
+
(B) => B.classList && B.classList.contains("q-virtual-scroll--skip") === !1
|
|
1360
|
+
), w = z.length, F = u.virtualScrollHorizontal === !0 ? (B) => B.getBoundingClientRect().width : (B) => B.offsetHeight;
|
|
1361
|
+
let I = i, E, K;
|
|
1362
|
+
for (let B = 0; B < w; ) {
|
|
1363
|
+
for (E = F(z[B]), B++; B < w && z[B].classList.contains("q-virtual-scroll--with-prev") === !0; )
|
|
1364
|
+
E += F(z[B]), B++;
|
|
1365
|
+
K = E - g[I], K !== 0 && (g[I] += K, k[Math.floor(I / re)] += K), I++;
|
|
1371
1366
|
}
|
|
1372
1367
|
}
|
|
1373
1368
|
}
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1369
|
+
function ue() {
|
|
1370
|
+
var i;
|
|
1371
|
+
(i = _.value) == null || i.focus();
|
|
1376
1372
|
}
|
|
1377
|
-
function
|
|
1378
|
-
const
|
|
1379
|
-
(v === !0 || Array.isArray(
|
|
1380
|
-
const w =
|
|
1381
|
-
|
|
1382
|
-
for (let
|
|
1383
|
-
|
|
1384
|
-
const
|
|
1373
|
+
function J(i, v) {
|
|
1374
|
+
const z = 1 * n.value;
|
|
1375
|
+
(v === !0 || Array.isArray(g) === !1) && (g = []);
|
|
1376
|
+
const w = g.length;
|
|
1377
|
+
g.length = e.value;
|
|
1378
|
+
for (let I = e.value - 1; I >= w; I--)
|
|
1379
|
+
g[I] = z;
|
|
1380
|
+
const F = Math.floor((e.value - 1) / re);
|
|
1385
1381
|
k = [];
|
|
1386
|
-
for (let
|
|
1387
|
-
let
|
|
1388
|
-
const
|
|
1389
|
-
for (let
|
|
1390
|
-
|
|
1391
|
-
k.push(
|
|
1392
|
-
}
|
|
1393
|
-
f = -1,
|
|
1394
|
-
|
|
1395
|
-
})) :
|
|
1382
|
+
for (let I = 0; I <= F; I++) {
|
|
1383
|
+
let E = 0;
|
|
1384
|
+
const K = Math.min((I + 1) * re, e.value);
|
|
1385
|
+
for (let B = I * re; B < K; B++)
|
|
1386
|
+
E += g[B];
|
|
1387
|
+
k.push(E);
|
|
1388
|
+
}
|
|
1389
|
+
f = -1, V = void 0, y.value = Qe(k, g, 0, M.value.from), q.value = Qe(k, g, M.value.to, e.value), i >= 0 ? (X(M.value.from), ve(() => {
|
|
1390
|
+
W(i);
|
|
1391
|
+
})) : A();
|
|
1396
1392
|
}
|
|
1397
|
-
function
|
|
1393
|
+
function U(i) {
|
|
1398
1394
|
if (i === void 0 && typeof window < "u") {
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
|
|
1395
|
+
const E = l();
|
|
1396
|
+
E != null && E.nodeType !== 8 && (i = St(
|
|
1397
|
+
E,
|
|
1402
1398
|
t(),
|
|
1403
1399
|
$.value,
|
|
1404
|
-
|
|
1400
|
+
j.value,
|
|
1405
1401
|
u.virtualScrollHorizontal,
|
|
1406
|
-
|
|
1402
|
+
p.lang.rtl,
|
|
1407
1403
|
u.virtualScrollStickySizeStart,
|
|
1408
1404
|
u.virtualScrollStickySizeEnd
|
|
1409
1405
|
).scrollViewSize);
|
|
1410
1406
|
}
|
|
1411
1407
|
C = i;
|
|
1412
|
-
const v = parseFloat(u.virtualScrollSliceRatioBefore) || 0,
|
|
1408
|
+
const v = parseFloat(u.virtualScrollSliceRatioBefore) || 0, z = parseFloat(u.virtualScrollSliceRatioAfter) || 0, w = 1 + v + z, F = i === void 0 || i <= 0 ? 1 : Math.ceil(i / n.value), I = Math.max(
|
|
1413
1409
|
1,
|
|
1414
|
-
|
|
1410
|
+
F,
|
|
1415
1411
|
Math.ceil((u.virtualScrollSliceSize > 0 ? u.virtualScrollSliceSize : 10) / w)
|
|
1416
1412
|
);
|
|
1417
1413
|
S.value = {
|
|
1418
|
-
total: Math.ceil(
|
|
1419
|
-
start: Math.ceil(
|
|
1420
|
-
center: Math.ceil(
|
|
1421
|
-
end: Math.ceil(
|
|
1422
|
-
view:
|
|
1414
|
+
total: Math.ceil(I * w),
|
|
1415
|
+
start: Math.ceil(I * v),
|
|
1416
|
+
center: Math.ceil(I * (0.5 + v)),
|
|
1417
|
+
end: Math.ceil(I * (1 + v)),
|
|
1418
|
+
view: F
|
|
1423
1419
|
};
|
|
1424
1420
|
}
|
|
1425
|
-
function
|
|
1426
|
-
const
|
|
1427
|
-
["--q-virtual-scroll-item-" +
|
|
1421
|
+
function ce(i, v) {
|
|
1422
|
+
const z = u.virtualScrollHorizontal === !0 ? "width" : "height", w = {
|
|
1423
|
+
["--q-virtual-scroll-item-" + z]: n.value + "px"
|
|
1428
1424
|
};
|
|
1429
1425
|
return [
|
|
1430
|
-
i === "tbody" ?
|
|
1426
|
+
i === "tbody" ? s(i, {
|
|
1431
1427
|
class: "q-virtual-scroll__padding",
|
|
1432
1428
|
key: "before",
|
|
1433
1429
|
ref: $
|
|
1434
1430
|
}, [
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
style: { [
|
|
1431
|
+
s("tr", [
|
|
1432
|
+
s("td", {
|
|
1433
|
+
style: { [z]: `${y.value}px`, ...w },
|
|
1438
1434
|
colspan: Y.value
|
|
1439
1435
|
})
|
|
1440
1436
|
])
|
|
1441
|
-
]) :
|
|
1437
|
+
]) : s(i, {
|
|
1442
1438
|
class: "q-virtual-scroll__padding",
|
|
1443
1439
|
key: "before",
|
|
1444
1440
|
ref: $,
|
|
1445
|
-
style: { [
|
|
1441
|
+
style: { [z]: `${y.value}px`, ...w }
|
|
1446
1442
|
}),
|
|
1447
|
-
|
|
1443
|
+
s(i, {
|
|
1448
1444
|
class: "q-virtual-scroll__content",
|
|
1449
1445
|
key: "content",
|
|
1450
1446
|
ref: _,
|
|
1451
1447
|
tabindex: -1
|
|
1452
1448
|
}, v.flat()),
|
|
1453
|
-
i === "tbody" ?
|
|
1449
|
+
i === "tbody" ? s(i, {
|
|
1454
1450
|
class: "q-virtual-scroll__padding",
|
|
1455
1451
|
key: "after",
|
|
1456
|
-
ref:
|
|
1452
|
+
ref: j
|
|
1457
1453
|
}, [
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
style: { [
|
|
1454
|
+
s("tr", [
|
|
1455
|
+
s("td", {
|
|
1456
|
+
style: { [z]: `${q.value}px`, ...w },
|
|
1461
1457
|
colspan: Y.value
|
|
1462
1458
|
})
|
|
1463
1459
|
])
|
|
1464
|
-
]) :
|
|
1460
|
+
]) : s(i, {
|
|
1465
1461
|
class: "q-virtual-scroll__padding",
|
|
1466
1462
|
key: "after",
|
|
1467
|
-
ref:
|
|
1468
|
-
style: { [
|
|
1463
|
+
ref: j,
|
|
1464
|
+
style: { [z]: `${q.value}px`, ...w }
|
|
1469
1465
|
})
|
|
1470
1466
|
];
|
|
1471
1467
|
}
|
|
1472
1468
|
function h(i) {
|
|
1473
1469
|
f !== i && (u.onVirtualScroll !== void 0 && a("virtualScroll", {
|
|
1474
1470
|
index: i,
|
|
1475
|
-
from:
|
|
1476
|
-
to:
|
|
1471
|
+
from: M.value.from,
|
|
1472
|
+
to: M.value.to - 1,
|
|
1477
1473
|
direction: i < f ? "decrease" : "increase",
|
|
1478
|
-
ref:
|
|
1474
|
+
ref: b
|
|
1479
1475
|
}), f = i);
|
|
1480
1476
|
}
|
|
1481
|
-
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
-
|
|
1477
|
+
U();
|
|
1478
|
+
const A = gl(
|
|
1479
|
+
oe,
|
|
1480
|
+
p.platform.is.ios === !0 ? 120 : 35
|
|
1485
1481
|
);
|
|
1486
1482
|
Ml(() => {
|
|
1487
|
-
|
|
1483
|
+
U();
|
|
1488
1484
|
});
|
|
1489
|
-
let
|
|
1485
|
+
let Z = !1;
|
|
1490
1486
|
return ul(() => {
|
|
1491
|
-
|
|
1487
|
+
Z = !0;
|
|
1492
1488
|
}), il(() => {
|
|
1493
|
-
if (
|
|
1489
|
+
if (Z !== !0) return;
|
|
1494
1490
|
const i = l();
|
|
1495
|
-
|
|
1491
|
+
V !== void 0 && i !== void 0 && i !== null && i.nodeType !== 8 ? Gt(
|
|
1496
1492
|
i,
|
|
1497
|
-
|
|
1493
|
+
V,
|
|
1498
1494
|
u.virtualScrollHorizontal,
|
|
1499
|
-
|
|
1500
|
-
) :
|
|
1501
|
-
}),
|
|
1502
|
-
|
|
1503
|
-
}), Object.assign(
|
|
1504
|
-
virtualScrollSliceRange:
|
|
1495
|
+
p.lang.rtl
|
|
1496
|
+
) : W(f);
|
|
1497
|
+
}), Ae(() => {
|
|
1498
|
+
A.cancel();
|
|
1499
|
+
}), Object.assign(b, { scrollTo: W, reset: H, refresh: le }), {
|
|
1500
|
+
virtualScrollSliceRange: M,
|
|
1505
1501
|
virtualScrollSliceSizeComputed: S,
|
|
1506
|
-
setVirtualScrollSize:
|
|
1507
|
-
onVirtualScrollEvt:
|
|
1508
|
-
localResetVirtualScroll:
|
|
1509
|
-
padVirtualScroll:
|
|
1510
|
-
scrollTo:
|
|
1502
|
+
setVirtualScrollSize: U,
|
|
1503
|
+
onVirtualScrollEvt: A,
|
|
1504
|
+
localResetVirtualScroll: J,
|
|
1505
|
+
padVirtualScroll: ce,
|
|
1506
|
+
scrollTo: W,
|
|
1511
1507
|
reset: H,
|
|
1512
|
-
refresh:
|
|
1508
|
+
refresh: le
|
|
1513
1509
|
};
|
|
1514
1510
|
}
|
|
1515
1511
|
const Yo = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/, Zo = /[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u, Jo = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/, Go = /[a-z0-9_ -]$/i;
|
|
@@ -1518,10 +1514,10 @@ function en(e) {
|
|
|
1518
1514
|
if (t.type === "compositionend" || t.type === "change") {
|
|
1519
1515
|
if (t.target.qComposing !== !0) return;
|
|
1520
1516
|
t.target.qComposing = !1, e(t);
|
|
1521
|
-
} else t.type === "compositionupdate" && t.target.qComposing !== !0 && typeof t.data == "string" && (
|
|
1517
|
+
} else t.type === "compositionupdate" && t.target.qComposing !== !0 && typeof t.data == "string" && (Ve.is.firefox === !0 ? Go.test(t.data) === !1 : Yo.test(t.data) === !0 || Zo.test(t.data) === !0 || Jo.test(t.data) === !0) === !0 && (t.target.qComposing = !0);
|
|
1522
1518
|
};
|
|
1523
1519
|
}
|
|
1524
|
-
function
|
|
1520
|
+
function be(e, l) {
|
|
1525
1521
|
if (e === l)
|
|
1526
1522
|
return !0;
|
|
1527
1523
|
if (e !== null && l !== null && typeof e == "object" && typeof l == "object") {
|
|
@@ -1532,7 +1528,7 @@ function pe(e, l) {
|
|
|
1532
1528
|
if (t = e.length, t !== l.length)
|
|
1533
1529
|
return !1;
|
|
1534
1530
|
for (n = t; n-- !== 0; )
|
|
1535
|
-
if (
|
|
1531
|
+
if (be(e[n], l[n]) !== !0)
|
|
1536
1532
|
return !1;
|
|
1537
1533
|
return !0;
|
|
1538
1534
|
}
|
|
@@ -1546,7 +1542,7 @@ function pe(e, l) {
|
|
|
1546
1542
|
n = u.next();
|
|
1547
1543
|
}
|
|
1548
1544
|
for (u = e.entries(), n = u.next(); n.done !== !0; ) {
|
|
1549
|
-
if (
|
|
1545
|
+
if (be(n.value[1], l.get(n.value[0])) !== !0)
|
|
1550
1546
|
return !1;
|
|
1551
1547
|
n = u.next();
|
|
1552
1548
|
}
|
|
@@ -1577,12 +1573,12 @@ function pe(e, l) {
|
|
|
1577
1573
|
return e.valueOf() === l.valueOf();
|
|
1578
1574
|
if (e.toString !== Object.prototype.toString)
|
|
1579
1575
|
return e.toString() === l.toString();
|
|
1580
|
-
const
|
|
1581
|
-
if (t =
|
|
1576
|
+
const c = Object.keys(e).filter((u) => e[u] !== void 0);
|
|
1577
|
+
if (t = c.length, t !== Object.keys(l).filter((u) => l[u] !== void 0).length)
|
|
1582
1578
|
return !1;
|
|
1583
1579
|
for (n = t; n-- !== 0; ) {
|
|
1584
|
-
const u =
|
|
1585
|
-
if (
|
|
1580
|
+
const u = c[n];
|
|
1581
|
+
if (be(e[u], l[u]) !== !0)
|
|
1586
1582
|
return !1;
|
|
1587
1583
|
}
|
|
1588
1584
|
return !0;
|
|
@@ -1593,8 +1589,8 @@ function tl(e, l, t) {
|
|
|
1593
1589
|
if (t <= l)
|
|
1594
1590
|
return l;
|
|
1595
1591
|
const n = t - l + 1;
|
|
1596
|
-
let
|
|
1597
|
-
return
|
|
1592
|
+
let c = l + (e - l) % n;
|
|
1593
|
+
return c < l && (c = n + c), c === 0 ? 0 : c;
|
|
1598
1594
|
}
|
|
1599
1595
|
const ll = (e) => ["add", "add-unique", "toggle"].includes(e), tn = ".*+?^${}()|[]\\", ln = Object.keys(qt);
|
|
1600
1596
|
function wt(e, l) {
|
|
@@ -1689,42 +1685,42 @@ const on = ye({
|
|
|
1689
1685
|
"filterAbort"
|
|
1690
1686
|
],
|
|
1691
1687
|
setup(e, { slots: l, emit: t }) {
|
|
1692
|
-
const { proxy: n } =
|
|
1693
|
-
let C = null, k = null,
|
|
1694
|
-
const Y =
|
|
1695
|
-
virtualScrollSliceRange:
|
|
1696
|
-
virtualScrollSliceSizeComputed:
|
|
1697
|
-
localResetVirtualScroll:
|
|
1698
|
-
padVirtualScroll:
|
|
1688
|
+
const { proxy: n } = se(), { $q: c } = n, u = O(!1), a = O(!1), b = O(-1), p = O(""), V = O(!1), f = O(!1);
|
|
1689
|
+
let C = null, k = null, g, y, q, S = null, $, j, _, M;
|
|
1690
|
+
const Y = O(null), R = O(null), L = O(null), H = O(null), le = O(null), W = Co(e), oe = en(It), x = r(() => Array.isArray(e.options) ? e.options.length : 0), X = r(() => e.virtualScrollItemSize === void 0 ? e.optionsDense === !0 ? 24 : 48 : e.virtualScrollItemSize), {
|
|
1691
|
+
virtualScrollSliceRange: ue,
|
|
1692
|
+
virtualScrollSliceSizeComputed: J,
|
|
1693
|
+
localResetVirtualScroll: U,
|
|
1694
|
+
padVirtualScroll: ce,
|
|
1699
1695
|
onVirtualScrollEvt: h,
|
|
1700
|
-
scrollTo:
|
|
1701
|
-
setVirtualScrollSize:
|
|
1696
|
+
scrollTo: A,
|
|
1697
|
+
setVirtualScrollSize: Z
|
|
1702
1698
|
} = Xo({
|
|
1703
|
-
virtualScrollLength:
|
|
1699
|
+
virtualScrollLength: x,
|
|
1704
1700
|
getVirtualScrollTarget: kl,
|
|
1705
|
-
getVirtualScrollEl:
|
|
1706
|
-
virtualScrollItemSizeComputed:
|
|
1707
|
-
}), i =
|
|
1708
|
-
const o = e.mapOptions === !0 && e.multiple !== !0,
|
|
1701
|
+
getVirtualScrollEl: Rt,
|
|
1702
|
+
virtualScrollItemSizeComputed: X
|
|
1703
|
+
}), i = bl(), v = r(() => {
|
|
1704
|
+
const o = e.mapOptions === !0 && e.multiple !== !0, d = e.modelValue !== void 0 && (e.modelValue !== null || o === !0) ? e.multiple === !0 && Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : [];
|
|
1709
1705
|
if (e.mapOptions === !0 && Array.isArray(e.options) === !0) {
|
|
1710
|
-
const
|
|
1711
|
-
return e.modelValue === null && o === !0 ?
|
|
1706
|
+
const m = e.mapOptions === !0 && g !== void 0 ? g : [], T = d.map((P) => Cl(P, m));
|
|
1707
|
+
return e.modelValue === null && o === !0 ? T.filter((P) => P !== null) : T;
|
|
1712
1708
|
}
|
|
1713
|
-
return
|
|
1714
|
-
}),
|
|
1709
|
+
return d;
|
|
1710
|
+
}), z = r(() => {
|
|
1715
1711
|
const o = {};
|
|
1716
|
-
return ln.forEach((
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1712
|
+
return ln.forEach((d) => {
|
|
1713
|
+
const m = e[d];
|
|
1714
|
+
m !== void 0 && (o[d] = m);
|
|
1719
1715
|
}), o;
|
|
1720
|
-
}), w = r(() => e.optionsDark === null ? i.isDark.value : e.optionsDark),
|
|
1716
|
+
}), w = r(() => e.optionsDark === null ? i.isDark.value : e.optionsDark), F = r(() => kt(v.value)), I = r(() => {
|
|
1721
1717
|
let o = "q-field__input q-placeholder col";
|
|
1722
1718
|
return e.hideSelected === !0 || v.value.length === 0 ? [o, e.inputClass] : (o += " q-field__input--padding", e.inputClass === void 0 ? o : [o, e.inputClass]);
|
|
1723
|
-
}),
|
|
1719
|
+
}), E = r(
|
|
1724
1720
|
() => (e.virtualScrollHorizontal === !0 ? "q-virtual-scroll--horizontal" : "") + (e.popupContentClass ? " " + e.popupContentClass : "")
|
|
1725
|
-
),
|
|
1726
|
-
() => v.value.map((o) =>
|
|
1727
|
-
),
|
|
1721
|
+
), K = r(() => x.value === 0), B = r(
|
|
1722
|
+
() => v.value.map((o) => te.value(o)).join(", ")
|
|
1723
|
+
), ee = r(() => e.displayValue !== void 0 ? e.displayValue : B.value), me = r(() => e.optionsHtml === !0 ? () => !0 : (o) => (o == null ? void 0 : o.html) === !0), We = r(() => e.displayValueHtml === !0 || e.displayValue === void 0 && (e.optionsHtml === !0 || v.value.some(me.value))), ie = r(() => i.focused.value === !0 ? e.tabindex : -1), Xe = r(() => {
|
|
1728
1724
|
const o = {
|
|
1729
1725
|
tabindex: e.tabindex,
|
|
1730
1726
|
role: "combobox",
|
|
@@ -1734,314 +1730,310 @@ const on = ye({
|
|
|
1734
1730
|
"aria-expanded": u.value === !0 ? "true" : "false",
|
|
1735
1731
|
"aria-controls": `${i.targetUid.value}_lb`
|
|
1736
1732
|
};
|
|
1737
|
-
return
|
|
1733
|
+
return b.value >= 0 && (o["aria-activedescendant"] = `${i.targetUid.value}_${b.value}`), o;
|
|
1738
1734
|
}), Se = r(() => ({
|
|
1739
1735
|
id: `${i.targetUid.value}_lb`,
|
|
1740
1736
|
role: "listbox",
|
|
1741
1737
|
"aria-multiselectable": e.multiple === !0 ? "true" : "false"
|
|
1742
|
-
})), we = r(() => v.value.map((o,
|
|
1743
|
-
index:
|
|
1738
|
+
})), we = r(() => v.value.map((o, d) => ({
|
|
1739
|
+
index: d,
|
|
1744
1740
|
opt: o,
|
|
1745
1741
|
html: me.value(o),
|
|
1746
1742
|
selected: !0,
|
|
1747
1743
|
removeAtIndex: wl,
|
|
1748
1744
|
toggleOption: Ce,
|
|
1749
|
-
tabindex:
|
|
1750
|
-
}))),
|
|
1751
|
-
if (
|
|
1745
|
+
tabindex: ie.value
|
|
1746
|
+
}))), Ye = r(() => {
|
|
1747
|
+
if (x.value === 0)
|
|
1752
1748
|
return [];
|
|
1753
|
-
const { from: o, to:
|
|
1754
|
-
return e.options.slice(o,
|
|
1755
|
-
const
|
|
1749
|
+
const { from: o, to: d } = ue.value;
|
|
1750
|
+
return e.options.slice(o, d).map((m, T) => {
|
|
1751
|
+
const P = Be.value(m) === !0, N = ft(m) === !0, D = o + T, Q = {
|
|
1756
1752
|
clickable: !0,
|
|
1757
|
-
active:
|
|
1758
|
-
activeClass:
|
|
1753
|
+
active: N,
|
|
1754
|
+
activeClass: Pe.value,
|
|
1759
1755
|
manualFocus: !0,
|
|
1760
1756
|
focused: !1,
|
|
1761
|
-
disable:
|
|
1757
|
+
disable: P,
|
|
1762
1758
|
tabindex: -1,
|
|
1763
1759
|
dense: e.optionsDense,
|
|
1764
1760
|
dark: w.value,
|
|
1765
1761
|
role: "option",
|
|
1766
|
-
"aria-selected":
|
|
1767
|
-
id: `${i.targetUid.value}_${
|
|
1762
|
+
"aria-selected": N === !0 ? "true" : "false",
|
|
1763
|
+
id: `${i.targetUid.value}_${D}`,
|
|
1768
1764
|
onClick: () => {
|
|
1769
|
-
Ce(
|
|
1765
|
+
Ce(m);
|
|
1770
1766
|
}
|
|
1771
1767
|
};
|
|
1772
|
-
return
|
|
1773
|
-
u.value === !0 && Ee(
|
|
1768
|
+
return P !== !0 && (b.value === D && (Q.focused = !0), c.platform.is.desktop === !0 && (Q.onMousemove = () => {
|
|
1769
|
+
u.value === !0 && Ee(D);
|
|
1774
1770
|
})), {
|
|
1775
|
-
index:
|
|
1776
|
-
opt:
|
|
1777
|
-
html: me.value(
|
|
1778
|
-
label:
|
|
1779
|
-
selected:
|
|
1780
|
-
focused:
|
|
1771
|
+
index: D,
|
|
1772
|
+
opt: m,
|
|
1773
|
+
html: me.value(m),
|
|
1774
|
+
label: te.value(m),
|
|
1775
|
+
selected: Q.active,
|
|
1776
|
+
focused: Q.focused,
|
|
1781
1777
|
toggleOption: Ce,
|
|
1782
1778
|
setOptionIndex: Ee,
|
|
1783
|
-
itemProps:
|
|
1779
|
+
itemProps: Q
|
|
1784
1780
|
};
|
|
1785
1781
|
});
|
|
1786
|
-
}),
|
|
1782
|
+
}), He = r(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : c.iconSet.arrow.dropdown), ct = r(
|
|
1787
1783
|
() => e.optionsCover === !1 && e.outlined !== !0 && e.standout !== !0 && e.borderless !== !0 && e.rounded !== !0
|
|
1788
|
-
),
|
|
1784
|
+
), Pe = r(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), de = r(() => wt(e.optionValue, "value")), te = r(() => wt(e.optionLabel, "label")), Be = r(() => wt(e.optionDisable, "disable")), Ze = r(() => v.value.map(de.value)), Sl = r(() => {
|
|
1789
1785
|
const o = {
|
|
1790
1786
|
onInput: It,
|
|
1791
1787
|
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
|
1792
1788
|
// switching focus before confirming composition choice
|
|
1793
1789
|
// this also fixes the issue where some browsers e.g. iOS Chrome
|
|
1794
1790
|
// fires "change" instead of "input" on autocomplete.
|
|
1795
|
-
onChange:
|
|
1796
|
-
onKeydown:
|
|
1797
|
-
onKeyup:
|
|
1791
|
+
onChange: oe,
|
|
1792
|
+
onKeydown: zt,
|
|
1793
|
+
onKeyup: Bt,
|
|
1798
1794
|
onKeypress: Et,
|
|
1799
1795
|
onFocus: _t,
|
|
1800
|
-
onClick(
|
|
1801
|
-
y === !0 &&
|
|
1796
|
+
onClick(d) {
|
|
1797
|
+
y === !0 && Le(d);
|
|
1802
1798
|
}
|
|
1803
1799
|
};
|
|
1804
|
-
return o.onCompositionstart = o.onCompositionupdate = o.onCompositionend =
|
|
1800
|
+
return o.onCompositionstart = o.onCompositionupdate = o.onCompositionend = oe, o;
|
|
1805
1801
|
});
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
}, { immediate: !0 }),
|
|
1809
|
-
function
|
|
1802
|
+
G(v, (o) => {
|
|
1803
|
+
g = o, e.useInput === !0 && e.fillInput === !0 && e.multiple !== !0 && i.innerLoading.value !== !0 && (a.value !== !0 && u.value !== !0 || F.value !== !0) && (q !== !0 && Ie(), (a.value === !0 || u.value === !0) && ze(""));
|
|
1804
|
+
}, { immediate: !0 }), G(() => e.fillInput, Ie), G(u, vt), G(x, Tl);
|
|
1805
|
+
function xt(o) {
|
|
1810
1806
|
return e.emitValue === !0 ? de.value(o) : o;
|
|
1811
1807
|
}
|
|
1812
|
-
function
|
|
1808
|
+
function dt(o) {
|
|
1813
1809
|
if (o !== -1 && o < v.value.length)
|
|
1814
1810
|
if (e.multiple === !0) {
|
|
1815
|
-
const
|
|
1816
|
-
t("remove", { index: o, value:
|
|
1811
|
+
const d = e.modelValue.slice();
|
|
1812
|
+
t("remove", { index: o, value: d.splice(o, 1)[0] }), t("update:modelValue", d);
|
|
1817
1813
|
} else
|
|
1818
1814
|
t("update:modelValue", null);
|
|
1819
1815
|
}
|
|
1820
1816
|
function wl(o) {
|
|
1821
|
-
|
|
1817
|
+
dt(o), i.focus();
|
|
1822
1818
|
}
|
|
1823
|
-
function
|
|
1824
|
-
const
|
|
1819
|
+
function Vt(o, d) {
|
|
1820
|
+
const m = xt(o);
|
|
1825
1821
|
if (e.multiple !== !0) {
|
|
1826
|
-
e.fillInput === !0 &&
|
|
1827
|
-
|
|
1822
|
+
e.fillInput === !0 && De(
|
|
1823
|
+
te.value(o),
|
|
1828
1824
|
!0,
|
|
1829
1825
|
!0
|
|
1830
|
-
), t("update:modelValue",
|
|
1826
|
+
), t("update:modelValue", m);
|
|
1831
1827
|
return;
|
|
1832
1828
|
}
|
|
1833
1829
|
if (v.value.length === 0) {
|
|
1834
|
-
t("add", { index: 0, value:
|
|
1830
|
+
t("add", { index: 0, value: m }), t("update:modelValue", e.multiple === !0 ? [m] : m);
|
|
1835
1831
|
return;
|
|
1836
1832
|
}
|
|
1837
|
-
if (
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
t("add", { index: F.length, value: g }), F.push(g), t("update:modelValue", F);
|
|
1833
|
+
if (d === !0 && ft(o) === !0 || e.maxValues !== void 0 && e.modelValue.length >= e.maxValues) return;
|
|
1834
|
+
const T = e.modelValue.slice();
|
|
1835
|
+
t("add", { index: T.length, value: m }), T.push(m), t("update:modelValue", T);
|
|
1841
1836
|
}
|
|
1842
|
-
function Ce(o,
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
const
|
|
1837
|
+
function Ce(o, d) {
|
|
1838
|
+
var N;
|
|
1839
|
+
if (i.editable.value !== !0 || o === void 0 || Be.value(o) === !0) return;
|
|
1840
|
+
const m = de.value(o);
|
|
1846
1841
|
if (e.multiple !== !0) {
|
|
1847
|
-
|
|
1848
|
-
e.fillInput === !0 ?
|
|
1842
|
+
d !== !0 && (De(
|
|
1843
|
+
e.fillInput === !0 ? te.value(o) : "",
|
|
1849
1844
|
!0,
|
|
1850
1845
|
!0
|
|
1851
|
-
), ke()),
|
|
1846
|
+
), ke()), (N = R.value) == null || N.focus(), (v.value.length === 0 || be(de.value(v.value[0]), m) !== !0) && t("update:modelValue", e.emitValue === !0 ? m : o);
|
|
1852
1847
|
return;
|
|
1853
1848
|
}
|
|
1854
|
-
if ((y !== !0 ||
|
|
1855
|
-
const
|
|
1856
|
-
t("add", { index: 0, value:
|
|
1849
|
+
if ((y !== !0 || V.value === !0) && i.focus(), _t(), v.value.length === 0) {
|
|
1850
|
+
const D = e.emitValue === !0 ? m : o;
|
|
1851
|
+
t("add", { index: 0, value: D }), t("update:modelValue", e.multiple === !0 ? [D] : D);
|
|
1857
1852
|
return;
|
|
1858
1853
|
}
|
|
1859
|
-
const
|
|
1860
|
-
if (
|
|
1861
|
-
t("remove", { index:
|
|
1854
|
+
const T = e.modelValue.slice(), P = Ze.value.findIndex((D) => be(D, m));
|
|
1855
|
+
if (P !== -1)
|
|
1856
|
+
t("remove", { index: P, value: T.splice(P, 1)[0] });
|
|
1862
1857
|
else {
|
|
1863
|
-
if (e.maxValues !== void 0 &&
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
t("add", { index: F.length, value: P }), F.push(P);
|
|
1858
|
+
if (e.maxValues !== void 0 && T.length >= e.maxValues) return;
|
|
1859
|
+
const D = e.emitValue === !0 ? m : o;
|
|
1860
|
+
t("add", { index: T.length, value: D }), T.push(D);
|
|
1867
1861
|
}
|
|
1868
|
-
t("update:modelValue",
|
|
1862
|
+
t("update:modelValue", T);
|
|
1869
1863
|
}
|
|
1870
1864
|
function Ee(o) {
|
|
1871
|
-
if (
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1865
|
+
if (c.platform.is.desktop !== !0) return;
|
|
1866
|
+
const d = o !== -1 && o < x.value ? o : -1;
|
|
1867
|
+
b.value !== d && (b.value = d);
|
|
1874
1868
|
}
|
|
1875
|
-
function
|
|
1869
|
+
function Je(o = 1, d) {
|
|
1876
1870
|
if (u.value === !0) {
|
|
1877
|
-
let
|
|
1871
|
+
let m = b.value;
|
|
1878
1872
|
do
|
|
1879
|
-
|
|
1880
|
-
|
|
1873
|
+
m = tl(
|
|
1874
|
+
m + o,
|
|
1881
1875
|
-1,
|
|
1882
|
-
|
|
1876
|
+
x.value - 1
|
|
1883
1877
|
);
|
|
1884
|
-
while (
|
|
1885
|
-
|
|
1886
|
-
|
|
1878
|
+
while (m !== -1 && m !== b.value && Be.value(e.options[m]) === !0);
|
|
1879
|
+
b.value !== m && (Ee(m), A(m), d !== !0 && e.useInput === !0 && e.fillInput === !0 && Ge(
|
|
1880
|
+
m >= 0 ? te.value(e.options[m]) : $,
|
|
1887
1881
|
!0
|
|
1888
1882
|
));
|
|
1889
1883
|
}
|
|
1890
1884
|
}
|
|
1891
|
-
function Cl(o,
|
|
1892
|
-
const
|
|
1893
|
-
return e.options.find(
|
|
1885
|
+
function Cl(o, d) {
|
|
1886
|
+
const m = (T) => be(de.value(T), o);
|
|
1887
|
+
return e.options.find(m) || d.find(m) || o;
|
|
1894
1888
|
}
|
|
1895
|
-
function
|
|
1896
|
-
const
|
|
1897
|
-
return
|
|
1889
|
+
function ft(o) {
|
|
1890
|
+
const d = de.value(o);
|
|
1891
|
+
return Ze.value.find((m) => be(m, d)) !== void 0;
|
|
1898
1892
|
}
|
|
1899
1893
|
function _t(o) {
|
|
1900
|
-
e.useInput === !0 &&
|
|
1901
|
-
}
|
|
1902
|
-
function Bt(o) {
|
|
1903
|
-
cl(o, 27) === !0 && u.value === !0 && (Me(o), ke(), Ie()), t("keyup", o);
|
|
1894
|
+
e.useInput === !0 && R.value !== null && (o === void 0 || R.value === o.target && o.target.value === B.value) && R.value.select();
|
|
1904
1895
|
}
|
|
1905
1896
|
function At(o) {
|
|
1906
|
-
|
|
1897
|
+
cl(o, 27) === !0 && u.value === !0 && (Le(o), ke(), Ie()), t("keyup", o);
|
|
1898
|
+
}
|
|
1899
|
+
function Bt(o) {
|
|
1900
|
+
const { value: d } = o.target;
|
|
1907
1901
|
if (o.keyCode !== void 0) {
|
|
1908
|
-
|
|
1902
|
+
At(o);
|
|
1909
1903
|
return;
|
|
1910
1904
|
}
|
|
1911
|
-
if (o.target.value = "", C !== null && (clearTimeout(C), C = null), k !== null && (clearTimeout(k), k = null), Ie(), typeof
|
|
1912
|
-
const
|
|
1913
|
-
const
|
|
1914
|
-
return
|
|
1915
|
-
},
|
|
1916
|
-
|
|
1905
|
+
if (o.target.value = "", C !== null && (clearTimeout(C), C = null), k !== null && (clearTimeout(k), k = null), Ie(), typeof d == "string" && d.length !== 0) {
|
|
1906
|
+
const m = d.toLocaleLowerCase(), T = (N) => {
|
|
1907
|
+
const D = e.options.find((Q) => String(N.value(Q)).toLocaleLowerCase() === m);
|
|
1908
|
+
return D === void 0 ? !1 : (v.value.indexOf(D) === -1 ? Ce(D) : ke(), !0);
|
|
1909
|
+
}, P = (N) => {
|
|
1910
|
+
T(de) !== !0 && N !== !0 && T(te) !== !0 && ze(d, !0, () => P(!0));
|
|
1917
1911
|
};
|
|
1918
|
-
|
|
1912
|
+
P();
|
|
1919
1913
|
} else
|
|
1920
1914
|
i.clearValue(o);
|
|
1921
1915
|
}
|
|
1922
1916
|
function Et(o) {
|
|
1923
1917
|
t("keypress", o);
|
|
1924
1918
|
}
|
|
1925
|
-
function
|
|
1926
|
-
if (t("keydown", o), Gl(o) === !0)
|
|
1927
|
-
|
|
1928
|
-
const m = b.value.length !== 0 && (e.newValueMode !== void 0 || e.onNewValue !== void 0), g = o.shiftKey !== !0 && e.disableTabSelection !== !0 && e.multiple !== !0 && (p.value !== -1 || m === !0);
|
|
1919
|
+
function zt(o) {
|
|
1920
|
+
if (t("keydown", o), Gl(o) === !0) return;
|
|
1921
|
+
const d = p.value.length !== 0 && (e.newValueMode !== void 0 || e.onNewValue !== void 0), m = o.shiftKey !== !0 && e.disableTabSelection !== !0 && e.multiple !== !0 && (b.value !== -1 || d === !0);
|
|
1929
1922
|
if (o.keyCode === 27) {
|
|
1930
1923
|
he(o);
|
|
1931
1924
|
return;
|
|
1932
1925
|
}
|
|
1933
|
-
if (o.keyCode === 9 &&
|
|
1934
|
-
|
|
1926
|
+
if (o.keyCode === 9 && m === !1) {
|
|
1927
|
+
Re();
|
|
1935
1928
|
return;
|
|
1936
1929
|
}
|
|
1937
1930
|
if (o.target === void 0 || o.target.id !== i.targetUid.value || i.editable.value !== !0) return;
|
|
1938
1931
|
if (o.keyCode === 40 && i.innerLoading.value !== !0 && u.value === !1) {
|
|
1939
|
-
|
|
1932
|
+
ne(o), Fe();
|
|
1940
1933
|
return;
|
|
1941
1934
|
}
|
|
1942
|
-
if (o.keyCode === 8 && (e.useChips === !0 || e.clearable === !0) && e.hideSelected !== !0 &&
|
|
1943
|
-
e.multiple === !0 && Array.isArray(e.modelValue) === !0 ?
|
|
1935
|
+
if (o.keyCode === 8 && (e.useChips === !0 || e.clearable === !0) && e.hideSelected !== !0 && p.value.length === 0) {
|
|
1936
|
+
e.multiple === !0 && Array.isArray(e.modelValue) === !0 ? dt(e.modelValue.length - 1) : e.multiple !== !0 && e.modelValue !== null && t("update:modelValue", null);
|
|
1944
1937
|
return;
|
|
1945
1938
|
}
|
|
1946
|
-
(o.keyCode === 35 || o.keyCode === 36) && (typeof
|
|
1939
|
+
(o.keyCode === 35 || o.keyCode === 36) && (typeof p.value != "string" || p.value.length === 0) && (ne(o), b.value = -1, Je(o.keyCode === 36 ? 1 : -1, e.multiple)), (o.keyCode === 33 || o.keyCode === 34) && J.value !== void 0 && (ne(o), b.value = Math.max(
|
|
1947
1940
|
-1,
|
|
1948
1941
|
Math.min(
|
|
1949
|
-
|
|
1950
|
-
|
|
1942
|
+
x.value,
|
|
1943
|
+
b.value + (o.keyCode === 33 ? -1 : 1) * J.value.view
|
|
1951
1944
|
)
|
|
1952
|
-
),
|
|
1953
|
-
const
|
|
1954
|
-
if ((_ === void 0 ||
|
|
1945
|
+
), Je(o.keyCode === 33 ? 1 : -1, e.multiple)), (o.keyCode === 38 || o.keyCode === 40) && (ne(o), Je(o.keyCode === 38 ? -1 : 1, e.multiple));
|
|
1946
|
+
const T = x.value;
|
|
1947
|
+
if ((_ === void 0 || M < Date.now()) && (_ = ""), T > 0 && e.useInput !== !0 && o.key !== void 0 && o.key.length === 1 && o.altKey === !1 && o.ctrlKey === !1 && o.metaKey === !1 && (o.keyCode !== 32 || _.length !== 0)) {
|
|
1955
1948
|
u.value !== !0 && Fe(o);
|
|
1956
|
-
const
|
|
1957
|
-
|
|
1958
|
-
const
|
|
1959
|
-
let
|
|
1960
|
-
if (
|
|
1949
|
+
const P = o.key.toLocaleLowerCase(), N = _.length === 1 && _[0] === P;
|
|
1950
|
+
M = Date.now() + 1500, N === !1 && (ne(o), _ += P);
|
|
1951
|
+
const D = new RegExp("^" + _.split("").map((Te) => tn.indexOf(Te) !== -1 ? "\\" + Te : Te).join(".*"), "i");
|
|
1952
|
+
let Q = b.value;
|
|
1953
|
+
if (N === !0 || Q < 0 || D.test(te.value(e.options[Q])) !== !0)
|
|
1961
1954
|
do
|
|
1962
|
-
|
|
1963
|
-
while (
|
|
1964
|
-
|
|
1965
|
-
Ee(
|
|
1955
|
+
Q = tl(Q + 1, -1, T - 1);
|
|
1956
|
+
while (Q !== b.value && (Be.value(e.options[Q]) === !0 || D.test(te.value(e.options[Q])) !== !0));
|
|
1957
|
+
b.value !== Q && ve(() => {
|
|
1958
|
+
Ee(Q), A(Q), Q >= 0 && e.useInput === !0 && e.fillInput === !0 && Ge(te.value(e.options[Q]), !0);
|
|
1966
1959
|
});
|
|
1967
1960
|
return;
|
|
1968
1961
|
}
|
|
1969
|
-
if (!(o.keyCode !== 13 && (o.keyCode !== 32 || e.useInput === !0 || _ !== "") && (o.keyCode !== 9 ||
|
|
1970
|
-
if (o.keyCode !== 9 &&
|
|
1971
|
-
Ce(e.options[
|
|
1962
|
+
if (!(o.keyCode !== 13 && (o.keyCode !== 32 || e.useInput === !0 || _ !== "") && (o.keyCode !== 9 || m === !1))) {
|
|
1963
|
+
if (o.keyCode !== 9 && ne(o), b.value !== -1 && b.value < T) {
|
|
1964
|
+
Ce(e.options[b.value]);
|
|
1972
1965
|
return;
|
|
1973
1966
|
}
|
|
1974
|
-
if (
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1967
|
+
if (d === !0) {
|
|
1968
|
+
const P = (N, D) => {
|
|
1969
|
+
var Te;
|
|
1970
|
+
if (D) {
|
|
1971
|
+
if (ll(D) !== !0) return;
|
|
1979
1972
|
} else
|
|
1980
|
-
|
|
1981
|
-
if (
|
|
1982
|
-
|
|
1983
|
-
(X === "toggle" ? Ce : xt)(P, X === "add-unique"), e.multiple !== !0 && (B.value !== null && B.value.focus(), ke());
|
|
1973
|
+
D = e.newValueMode;
|
|
1974
|
+
if (De("", e.multiple !== !0, !0), N == null) return;
|
|
1975
|
+
(D === "toggle" ? Ce : Vt)(N, D === "add-unique"), e.multiple !== !0 && ((Te = R.value) == null || Te.focus(), ke());
|
|
1984
1976
|
};
|
|
1985
|
-
if (e.onNewValue !== void 0 ? t("newValue",
|
|
1986
|
-
return;
|
|
1977
|
+
if (e.onNewValue !== void 0 ? t("newValue", p.value, P) : P(p.value), e.multiple !== !0) return;
|
|
1987
1978
|
}
|
|
1988
|
-
u.value === !0 ?
|
|
1979
|
+
u.value === !0 ? Re() : i.innerLoading.value !== !0 && Fe();
|
|
1989
1980
|
}
|
|
1990
1981
|
}
|
|
1991
|
-
function
|
|
1992
|
-
return y === !0 ?
|
|
1982
|
+
function Rt() {
|
|
1983
|
+
return y === !0 ? le.value : L.value !== null && L.value.contentEl !== null ? L.value.contentEl : void 0;
|
|
1993
1984
|
}
|
|
1994
1985
|
function kl() {
|
|
1995
|
-
return
|
|
1986
|
+
return Rt();
|
|
1996
1987
|
}
|
|
1997
1988
|
function ql() {
|
|
1998
|
-
return e.hideSelected === !0 ? [] : l["selected-item"] !== void 0 ? we.value.map((o) => l["selected-item"](o)).slice() : l.selected !== void 0 ? [].concat(l.selected()) : e.useChips === !0 ? we.value.map((o,
|
|
1999
|
-
key: "option-" +
|
|
2000
|
-
removable: i.editable.value === !0 &&
|
|
1989
|
+
return e.hideSelected === !0 ? [] : l["selected-item"] !== void 0 ? we.value.map((o) => l["selected-item"](o)).slice() : l.selected !== void 0 ? [].concat(l.selected()) : e.useChips === !0 ? we.value.map((o, d) => s(Lo, {
|
|
1990
|
+
key: "option-" + d,
|
|
1991
|
+
removable: i.editable.value === !0 && Be.value(o.opt) !== !0,
|
|
2001
1992
|
dense: !0,
|
|
2002
1993
|
textColor: e.color,
|
|
2003
|
-
tabindex:
|
|
1994
|
+
tabindex: ie.value,
|
|
2004
1995
|
onRemove() {
|
|
2005
|
-
o.removeAtIndex(
|
|
1996
|
+
o.removeAtIndex(d);
|
|
2006
1997
|
}
|
|
2007
|
-
}, () =>
|
|
1998
|
+
}, () => s("span", {
|
|
2008
1999
|
class: "ellipsis",
|
|
2009
|
-
[o.html === !0 ? "innerHTML" : "textContent"]:
|
|
2000
|
+
[o.html === !0 ? "innerHTML" : "textContent"]: te.value(o.opt)
|
|
2010
2001
|
}))) : [
|
|
2011
|
-
|
|
2012
|
-
|
|
2002
|
+
s("span", {
|
|
2003
|
+
class: "ellipsis",
|
|
2004
|
+
[We.value === !0 ? "innerHTML" : "textContent"]: ee.value
|
|
2013
2005
|
})
|
|
2014
2006
|
];
|
|
2015
2007
|
}
|
|
2016
2008
|
function Ft() {
|
|
2017
|
-
if (
|
|
2018
|
-
return l["no-option"] !== void 0 ? l["no-option"]({ inputValue:
|
|
2019
|
-
const o = l.option !== void 0 ? l.option : (
|
|
2020
|
-
key:
|
|
2021
|
-
...
|
|
2022
|
-
}, () =>
|
|
2023
|
-
|
|
2024
|
-
() =>
|
|
2009
|
+
if (K.value === !0)
|
|
2010
|
+
return l["no-option"] !== void 0 ? l["no-option"]({ inputValue: p.value }) : void 0;
|
|
2011
|
+
const o = l.option !== void 0 ? l.option : (m) => s(ml, {
|
|
2012
|
+
key: m.index,
|
|
2013
|
+
...m.itemProps
|
|
2014
|
+
}, () => s(
|
|
2015
|
+
it,
|
|
2016
|
+
() => s(
|
|
2025
2017
|
vl,
|
|
2026
|
-
() =>
|
|
2027
|
-
[
|
|
2018
|
+
() => s("span", {
|
|
2019
|
+
[m.html === !0 ? "innerHTML" : "textContent"]: m.label
|
|
2028
2020
|
})
|
|
2029
2021
|
)
|
|
2030
2022
|
));
|
|
2031
|
-
let
|
|
2032
|
-
return l["before-options"] !== void 0 && (
|
|
2023
|
+
let d = ce("div", Ye.value.map(o));
|
|
2024
|
+
return l["before-options"] !== void 0 && (d = l["before-options"]().concat(d)), sl(l["after-options"], d);
|
|
2033
2025
|
}
|
|
2034
|
-
function
|
|
2035
|
-
const
|
|
2036
|
-
ref:
|
|
2026
|
+
function xl(o, d) {
|
|
2027
|
+
const m = d === !0 ? { ...Xe.value, ...i.splitAttrs.attributes.value } : void 0, T = {
|
|
2028
|
+
ref: d === !0 ? R : void 0,
|
|
2037
2029
|
key: "i_t",
|
|
2038
|
-
class:
|
|
2030
|
+
class: I.value,
|
|
2039
2031
|
style: e.inputStyle,
|
|
2040
|
-
value:
|
|
2032
|
+
value: p.value !== void 0 ? p.value : "",
|
|
2041
2033
|
// required for Android in order to show ENTER key when in form
|
|
2042
2034
|
type: "search",
|
|
2043
|
-
...
|
|
2044
|
-
id:
|
|
2035
|
+
...m,
|
|
2036
|
+
id: d === !0 ? i.targetUid.value : void 0,
|
|
2045
2037
|
maxlength: e.maxlength,
|
|
2046
2038
|
autocomplete: e.autocomplete,
|
|
2047
2039
|
"data-autofocus": o === !0 || e.autofocus === !0 || void 0,
|
|
@@ -2049,53 +2041,52 @@ const on = ye({
|
|
|
2049
2041
|
readonly: e.readonly === !0,
|
|
2050
2042
|
...Sl.value
|
|
2051
2043
|
};
|
|
2052
|
-
return o !== !0 && y === !0 && (Array.isArray(
|
|
2044
|
+
return o !== !0 && y === !0 && (Array.isArray(T.class) === !0 ? T.class = [...T.class, "no-pointer-events"] : T.class += " no-pointer-events"), s("input", T);
|
|
2053
2045
|
}
|
|
2054
2046
|
function It(o) {
|
|
2055
|
-
C !== null && (clearTimeout(C), C = null), k !== null && (clearTimeout(k), k = null), !(o && o.target && o.target.qComposing === !0) && (
|
|
2056
|
-
C = null,
|
|
2047
|
+
C !== null && (clearTimeout(C), C = null), k !== null && (clearTimeout(k), k = null), !(o && o.target && o.target.qComposing === !0) && (Ge(o.target.value || ""), q = !0, $ = p.value, i.focused.value !== !0 && (y !== !0 || V.value === !0) && i.focus(), e.onFilter !== void 0 && (C = setTimeout(() => {
|
|
2048
|
+
C = null, ze(p.value);
|
|
2057
2049
|
}, e.inputDebounce)));
|
|
2058
2050
|
}
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2051
|
+
function Ge(o, d) {
|
|
2052
|
+
p.value !== o && (p.value = o, d === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? t("inputValue", o) : k = setTimeout(() => {
|
|
2061
2053
|
k = null, t("inputValue", o);
|
|
2062
2054
|
}, e.inputDebounce));
|
|
2063
2055
|
}
|
|
2064
|
-
function
|
|
2065
|
-
q =
|
|
2056
|
+
function De(o, d, m) {
|
|
2057
|
+
q = m !== !0, e.useInput === !0 && (Ge(o, !0), (d === !0 || m !== !0) && ($ = o), d !== !0 && ze(o));
|
|
2066
2058
|
}
|
|
2067
|
-
function
|
|
2068
|
-
if (e.onFilter === void 0 ||
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
const F = setTimeout(() => {
|
|
2059
|
+
function ze(o, d, m) {
|
|
2060
|
+
if (e.onFilter === void 0 || d !== !0 && i.focused.value !== !0) return;
|
|
2061
|
+
i.innerLoading.value === !0 ? t("filterAbort") : (i.innerLoading.value = !0, f.value = !0), o !== "" && e.multiple !== !0 && v.value.length !== 0 && q !== !0 && o === te.value(v.value[0]) && (o = "");
|
|
2062
|
+
const T = setTimeout(() => {
|
|
2072
2063
|
u.value === !0 && (u.value = !1);
|
|
2073
2064
|
}, 10);
|
|
2074
|
-
S !== null && clearTimeout(S), S =
|
|
2065
|
+
S !== null && clearTimeout(S), S = T, t(
|
|
2075
2066
|
"filter",
|
|
2076
2067
|
o,
|
|
2077
|
-
(
|
|
2078
|
-
(
|
|
2079
|
-
i.innerLoading.value = !1, i.editable.value === !0 && (
|
|
2080
|
-
|
|
2081
|
-
}), typeof
|
|
2082
|
-
|
|
2068
|
+
(P, N) => {
|
|
2069
|
+
(d === !0 || i.focused.value === !0) && S === T && (clearTimeout(S), typeof P == "function" && P(), f.value = !1, ve(() => {
|
|
2070
|
+
i.innerLoading.value = !1, i.editable.value === !0 && (d === !0 ? u.value === !0 && ke() : u.value === !0 ? vt(!0) : u.value = !0), typeof N == "function" && ve(() => {
|
|
2071
|
+
N(n);
|
|
2072
|
+
}), typeof m == "function" && ve(() => {
|
|
2073
|
+
m(n);
|
|
2083
2074
|
});
|
|
2084
2075
|
}));
|
|
2085
2076
|
},
|
|
2086
2077
|
() => {
|
|
2087
|
-
i.focused.value === !0 && S ===
|
|
2078
|
+
i.focused.value === !0 && S === T && (clearTimeout(S), i.innerLoading.value = !1, f.value = !1), u.value === !0 && (u.value = !1);
|
|
2088
2079
|
}
|
|
2089
2080
|
);
|
|
2090
2081
|
}
|
|
2091
|
-
function
|
|
2092
|
-
return
|
|
2082
|
+
function Vl() {
|
|
2083
|
+
return s(bo, {
|
|
2093
2084
|
ref: L,
|
|
2094
|
-
class:
|
|
2085
|
+
class: E.value,
|
|
2095
2086
|
style: e.popupContentStyle,
|
|
2096
2087
|
modelValue: u.value,
|
|
2097
2088
|
fit: e.menuShrink !== !0,
|
|
2098
|
-
cover: e.optionsCover === !0 &&
|
|
2089
|
+
cover: e.optionsCover === !0 && K.value !== !0 && e.useInput !== !0,
|
|
2099
2090
|
anchor: e.menuAnchor,
|
|
2100
2091
|
self: e.menuSelf,
|
|
2101
2092
|
offset: e.menuOffset,
|
|
@@ -2104,7 +2095,7 @@ const on = ye({
|
|
|
2104
2095
|
noRefocus: !0,
|
|
2105
2096
|
noFocus: !0,
|
|
2106
2097
|
noRouteDismiss: e.popupNoRouteDismiss,
|
|
2107
|
-
square:
|
|
2098
|
+
square: ct.value,
|
|
2108
2099
|
transitionShow: e.transitionShow,
|
|
2109
2100
|
transitionHide: e.transitionHide,
|
|
2110
2101
|
transitionDuration: e.transitionDuration,
|
|
@@ -2113,37 +2104,38 @@ const on = ye({
|
|
|
2113
2104
|
onScrollPassive: h,
|
|
2114
2105
|
onBeforeShow: Ot,
|
|
2115
2106
|
onBeforeHide: _l,
|
|
2116
|
-
onShow:
|
|
2107
|
+
onShow: Al
|
|
2117
2108
|
}, Ft);
|
|
2118
2109
|
}
|
|
2119
2110
|
function _l(o) {
|
|
2120
|
-
Mt(o),
|
|
2111
|
+
Mt(o), Re();
|
|
2121
2112
|
}
|
|
2122
|
-
function
|
|
2123
|
-
|
|
2113
|
+
function Al() {
|
|
2114
|
+
Z();
|
|
2124
2115
|
}
|
|
2125
|
-
function
|
|
2126
|
-
|
|
2116
|
+
function Bl(o) {
|
|
2117
|
+
var d;
|
|
2118
|
+
Le(o), (d = R.value) == null || d.focus(), V.value = !0, window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);
|
|
2127
2119
|
}
|
|
2128
2120
|
function El(o) {
|
|
2129
|
-
|
|
2130
|
-
|
|
2121
|
+
Le(o), ve(() => {
|
|
2122
|
+
V.value = !1;
|
|
2131
2123
|
});
|
|
2132
2124
|
}
|
|
2133
|
-
function
|
|
2125
|
+
function zl() {
|
|
2134
2126
|
const o = [
|
|
2135
|
-
|
|
2127
|
+
s(Oo, {
|
|
2136
2128
|
class: `col-auto ${i.fieldClass.value}`,
|
|
2137
|
-
...
|
|
2129
|
+
...z.value,
|
|
2138
2130
|
for: i.targetUid.value,
|
|
2139
2131
|
dark: w.value,
|
|
2140
2132
|
square: !0,
|
|
2141
2133
|
loading: f.value,
|
|
2142
2134
|
itemAligned: !1,
|
|
2143
2135
|
filled: !0,
|
|
2144
|
-
stackLabel:
|
|
2136
|
+
stackLabel: p.value.length !== 0,
|
|
2145
2137
|
...i.splitAttrs.listeners.value,
|
|
2146
|
-
onFocus:
|
|
2138
|
+
onFocus: Bl,
|
|
2147
2139
|
onBlur: El
|
|
2148
2140
|
}, {
|
|
2149
2141
|
...l,
|
|
@@ -2153,31 +2145,31 @@ const on = ye({
|
|
|
2153
2145
|
})
|
|
2154
2146
|
];
|
|
2155
2147
|
return u.value === !0 && o.push(
|
|
2156
|
-
|
|
2157
|
-
ref:
|
|
2158
|
-
class:
|
|
2148
|
+
s("div", {
|
|
2149
|
+
ref: le,
|
|
2150
|
+
class: E.value + " scroll",
|
|
2159
2151
|
style: e.popupContentStyle,
|
|
2160
2152
|
...Se.value,
|
|
2161
2153
|
onClick: he,
|
|
2162
2154
|
onScrollPassive: h
|
|
2163
2155
|
}, Ft())
|
|
2164
|
-
),
|
|
2156
|
+
), s(No, {
|
|
2165
2157
|
ref: H,
|
|
2166
2158
|
modelValue: a.value,
|
|
2167
2159
|
position: e.useInput === !0 ? "top" : void 0,
|
|
2168
|
-
transitionShow:
|
|
2160
|
+
transitionShow: j,
|
|
2169
2161
|
transitionHide: e.transitionHide,
|
|
2170
2162
|
transitionDuration: e.transitionDuration,
|
|
2171
2163
|
noRouteDismiss: e.popupNoRouteDismiss,
|
|
2172
2164
|
onBeforeShow: Ot,
|
|
2173
|
-
onBeforeHide:
|
|
2165
|
+
onBeforeHide: Rl,
|
|
2174
2166
|
onHide: Fl,
|
|
2175
2167
|
onShow: Il
|
|
2176
|
-
}, () =>
|
|
2177
|
-
class: "q-select__dialog" + (w.value === !0 ? " q-select__dialog--dark q-dark" : "") + (
|
|
2168
|
+
}, () => s("div", {
|
|
2169
|
+
class: "q-select__dialog" + (w.value === !0 ? " q-select__dialog--dark q-dark" : "") + (V.value === !0 ? " q-select__dialog--focused" : "")
|
|
2178
2170
|
}, o));
|
|
2179
2171
|
}
|
|
2180
|
-
function
|
|
2172
|
+
function Rl(o) {
|
|
2181
2173
|
Mt(o), H.value !== null && H.value.__updateRefocusTarget(
|
|
2182
2174
|
i.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")
|
|
2183
2175
|
), i.focused.value = !1;
|
|
@@ -2187,88 +2179,88 @@ const on = ye({
|
|
|
2187
2179
|
}
|
|
2188
2180
|
function Il() {
|
|
2189
2181
|
const o = document.activeElement;
|
|
2190
|
-
(o === null || o.id !== i.targetUid.value) &&
|
|
2182
|
+
(o === null || o.id !== i.targetUid.value) && R.value !== null && R.value !== o && R.value.focus(), Z();
|
|
2191
2183
|
}
|
|
2192
|
-
function
|
|
2193
|
-
a.value !== !0 && (
|
|
2184
|
+
function Re() {
|
|
2185
|
+
a.value !== !0 && (b.value = -1, u.value === !0 && (u.value = !1), i.focused.value === !1 && (S !== null && (clearTimeout(S), S = null), i.innerLoading.value === !0 && (t("filterAbort"), i.innerLoading.value = !1, f.value = !1)));
|
|
2194
2186
|
}
|
|
2195
2187
|
function Fe(o) {
|
|
2196
2188
|
i.editable.value === !0 && (y === !0 ? (i.onControlFocusin(o), a.value = !0, ve(() => {
|
|
2197
2189
|
i.focus();
|
|
2198
|
-
})) : i.focus(), e.onFilter !== void 0 ?
|
|
2190
|
+
})) : i.focus(), e.onFilter !== void 0 ? ze(p.value) : (K.value !== !0 || l["no-option"] !== void 0) && (u.value = !0));
|
|
2199
2191
|
}
|
|
2200
2192
|
function ke() {
|
|
2201
|
-
a.value = !1,
|
|
2193
|
+
a.value = !1, Re();
|
|
2202
2194
|
}
|
|
2203
2195
|
function Ie() {
|
|
2204
|
-
e.useInput === !0 &&
|
|
2205
|
-
e.multiple !== !0 && e.fillInput === !0 && v.value.length !== 0 &&
|
|
2196
|
+
e.useInput === !0 && De(
|
|
2197
|
+
e.multiple !== !0 && e.fillInput === !0 && v.value.length !== 0 && te.value(v.value[0]) || "",
|
|
2206
2198
|
!0,
|
|
2207
2199
|
!0
|
|
2208
2200
|
);
|
|
2209
2201
|
}
|
|
2210
|
-
function
|
|
2211
|
-
let
|
|
2202
|
+
function vt(o) {
|
|
2203
|
+
let d = -1;
|
|
2212
2204
|
if (o === !0) {
|
|
2213
2205
|
if (v.value.length !== 0) {
|
|
2214
|
-
const
|
|
2215
|
-
|
|
2206
|
+
const m = de.value(v.value[0]);
|
|
2207
|
+
d = e.options.findIndex((T) => be(de.value(T), m));
|
|
2216
2208
|
}
|
|
2217
|
-
|
|
2209
|
+
U(d);
|
|
2218
2210
|
}
|
|
2219
|
-
Ee(
|
|
2211
|
+
Ee(d);
|
|
2220
2212
|
}
|
|
2221
|
-
function Tl(o,
|
|
2222
|
-
u.value === !0 && i.innerLoading.value === !1 && (
|
|
2223
|
-
u.value === !0 && i.innerLoading.value === !1 && (o >
|
|
2213
|
+
function Tl(o, d) {
|
|
2214
|
+
u.value === !0 && i.innerLoading.value === !1 && (U(-1, !0), ve(() => {
|
|
2215
|
+
u.value === !0 && i.innerLoading.value === !1 && (o > d ? U() : vt(!0));
|
|
2224
2216
|
}));
|
|
2225
2217
|
}
|
|
2226
2218
|
function Tt() {
|
|
2227
2219
|
a.value === !1 && L.value !== null && L.value.updatePosition();
|
|
2228
2220
|
}
|
|
2229
2221
|
function Ot(o) {
|
|
2230
|
-
o !== void 0 &&
|
|
2222
|
+
o !== void 0 && Le(o), t("popupShow", o), i.hasPopupOpen = !0, i.onControlFocusin(o);
|
|
2231
2223
|
}
|
|
2232
2224
|
function Mt(o) {
|
|
2233
|
-
o !== void 0 &&
|
|
2225
|
+
o !== void 0 && Le(o), t("popupHide", o), i.hasPopupOpen = !1, i.onControlFocusout(o);
|
|
2234
2226
|
}
|
|
2235
2227
|
function Lt() {
|
|
2236
|
-
y =
|
|
2228
|
+
y = c.platform.is.mobile !== !0 && e.behavior !== "dialog" ? !1 : e.behavior !== "menu" && (e.useInput === !0 ? l["no-option"] !== void 0 || e.onFilter !== void 0 || K.value === !1 : !0), j = c.platform.is.ios === !0 && y === !0 && e.useInput === !0 ? "fade" : e.transitionShow;
|
|
2237
2229
|
}
|
|
2238
|
-
return ol(Lt), Ll(Tt), Lt(),
|
|
2230
|
+
return ol(Lt), Ll(Tt), Lt(), Ae(() => {
|
|
2239
2231
|
C !== null && clearTimeout(C), k !== null && clearTimeout(k);
|
|
2240
2232
|
}), Object.assign(n, {
|
|
2241
2233
|
showPopup: Fe,
|
|
2242
2234
|
hidePopup: ke,
|
|
2243
|
-
removeAtIndex:
|
|
2244
|
-
add:
|
|
2235
|
+
removeAtIndex: dt,
|
|
2236
|
+
add: Vt,
|
|
2245
2237
|
toggleOption: Ce,
|
|
2246
|
-
getOptionIndex: () =>
|
|
2238
|
+
getOptionIndex: () => b.value,
|
|
2247
2239
|
setOptionIndex: Ee,
|
|
2248
|
-
moveOptionSelection:
|
|
2249
|
-
filter:
|
|
2240
|
+
moveOptionSelection: Je,
|
|
2241
|
+
filter: ze,
|
|
2250
2242
|
updateMenuPosition: Tt,
|
|
2251
|
-
updateInputValue:
|
|
2252
|
-
isOptionSelected:
|
|
2253
|
-
getEmittingOptionValue:
|
|
2254
|
-
isOptionDisabled: (...o) =>
|
|
2243
|
+
updateInputValue: De,
|
|
2244
|
+
isOptionSelected: ft,
|
|
2245
|
+
getEmittingOptionValue: xt,
|
|
2246
|
+
isOptionDisabled: (...o) => Be.value.apply(null, o) === !0,
|
|
2255
2247
|
getOptionValue: (...o) => de.value.apply(null, o),
|
|
2256
|
-
getOptionLabel: (...o) =>
|
|
2248
|
+
getOptionLabel: (...o) => te.value.apply(null, o)
|
|
2257
2249
|
}), Object.assign(i, {
|
|
2258
2250
|
innerValue: v,
|
|
2259
2251
|
fieldClass: r(
|
|
2260
2252
|
() => `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"}`
|
|
2261
2253
|
),
|
|
2262
2254
|
inputRef: Y,
|
|
2263
|
-
targetRef:
|
|
2264
|
-
hasValue:
|
|
2255
|
+
targetRef: R,
|
|
2256
|
+
hasValue: F,
|
|
2265
2257
|
showPopup: Fe,
|
|
2266
2258
|
floatingLabel: r(
|
|
2267
|
-
() => e.hideSelected !== !0 &&
|
|
2259
|
+
() => e.hideSelected !== !0 && F.value === !0 || typeof p.value == "number" || p.value.length !== 0 || kt(e.displayValue)
|
|
2268
2260
|
),
|
|
2269
2261
|
getControlChild: () => {
|
|
2270
|
-
if (i.editable.value !== !1 && (a.value === !0 ||
|
|
2271
|
-
return y === !0 ?
|
|
2262
|
+
if (i.editable.value !== !1 && (a.value === !0 || K.value !== !0 || l["no-option"] !== void 0))
|
|
2263
|
+
return y === !0 ? zl() : Vl();
|
|
2272
2264
|
i.hasPopupOpen === !0 && (i.hasPopupOpen = !1);
|
|
2273
2265
|
},
|
|
2274
2266
|
controlEvents: {
|
|
@@ -2277,70 +2269,71 @@ const on = ye({
|
|
|
2277
2269
|
},
|
|
2278
2270
|
onFocusout(o) {
|
|
2279
2271
|
i.onControlFocusout(o, () => {
|
|
2280
|
-
Ie(),
|
|
2272
|
+
Ie(), Re();
|
|
2281
2273
|
});
|
|
2282
2274
|
},
|
|
2283
2275
|
onClick(o) {
|
|
2276
|
+
var d;
|
|
2284
2277
|
if (he(o), y !== !0 && u.value === !0) {
|
|
2285
|
-
|
|
2278
|
+
Re(), (d = R.value) == null || d.focus();
|
|
2286
2279
|
return;
|
|
2287
2280
|
}
|
|
2288
2281
|
Fe(o);
|
|
2289
2282
|
}
|
|
2290
2283
|
},
|
|
2291
2284
|
getControl: (o) => {
|
|
2292
|
-
const
|
|
2285
|
+
const d = ql(), m = o === !0 || a.value !== !0 || y !== !0;
|
|
2293
2286
|
if (e.useInput === !0)
|
|
2294
|
-
|
|
2287
|
+
d.push(xl(o, m));
|
|
2295
2288
|
else if (i.editable.value === !0) {
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
ref:
|
|
2289
|
+
const P = m === !0 ? Xe.value : void 0;
|
|
2290
|
+
d.push(
|
|
2291
|
+
s("input", {
|
|
2292
|
+
ref: m === !0 ? R : void 0,
|
|
2300
2293
|
key: "d_t",
|
|
2301
2294
|
class: "q-select__focus-target",
|
|
2302
|
-
id:
|
|
2303
|
-
value:
|
|
2295
|
+
id: m === !0 ? i.targetUid.value : void 0,
|
|
2296
|
+
value: ee.value,
|
|
2304
2297
|
readonly: !0,
|
|
2305
2298
|
"data-autofocus": o === !0 || e.autofocus === !0 || void 0,
|
|
2306
|
-
...
|
|
2307
|
-
onKeydown:
|
|
2308
|
-
onKeyup:
|
|
2299
|
+
...P,
|
|
2300
|
+
onKeydown: zt,
|
|
2301
|
+
onKeyup: At,
|
|
2309
2302
|
onKeypress: Et
|
|
2310
2303
|
})
|
|
2311
|
-
),
|
|
2312
|
-
|
|
2304
|
+
), m === !0 && typeof e.autocomplete == "string" && e.autocomplete.length !== 0 && d.push(
|
|
2305
|
+
s("input", {
|
|
2313
2306
|
class: "q-select__autocomplete-input",
|
|
2314
2307
|
autocomplete: e.autocomplete,
|
|
2315
2308
|
tabindex: -1,
|
|
2316
|
-
onKeyup:
|
|
2309
|
+
onKeyup: Bt
|
|
2317
2310
|
})
|
|
2318
2311
|
);
|
|
2319
2312
|
}
|
|
2320
|
-
if (
|
|
2321
|
-
const
|
|
2322
|
-
|
|
2323
|
-
|
|
2313
|
+
if (W.value !== void 0 && e.disable !== !0 && Ze.value.length !== 0) {
|
|
2314
|
+
const P = Ze.value.map((N) => s("option", { value: N, selected: !0 }));
|
|
2315
|
+
d.push(
|
|
2316
|
+
s("select", {
|
|
2324
2317
|
class: "hidden",
|
|
2325
|
-
name:
|
|
2318
|
+
name: W.value,
|
|
2326
2319
|
multiple: e.multiple
|
|
2327
|
-
},
|
|
2320
|
+
}, P)
|
|
2328
2321
|
);
|
|
2329
2322
|
}
|
|
2330
|
-
const
|
|
2331
|
-
return
|
|
2323
|
+
const T = e.useInput === !0 || m !== !0 ? void 0 : i.splitAttrs.attributes.value;
|
|
2324
|
+
return s("div", {
|
|
2332
2325
|
class: "q-field__native row items-center",
|
|
2333
|
-
...
|
|
2326
|
+
...T,
|
|
2334
2327
|
...i.splitAttrs.listeners.value
|
|
2335
|
-
},
|
|
2328
|
+
}, d);
|
|
2336
2329
|
},
|
|
2337
2330
|
getInnerAppend: () => e.loading !== !0 && f.value !== !0 && e.hideDropdownIcon !== !0 ? [
|
|
2338
|
-
|
|
2331
|
+
s(_e, {
|
|
2339
2332
|
class: "q-select__dropdown-icon" + (u.value === !0 ? " rotate-180" : ""),
|
|
2340
|
-
name:
|
|
2333
|
+
name: He.value
|
|
2341
2334
|
})
|
|
2342
2335
|
] : null
|
|
2343
|
-
}),
|
|
2336
|
+
}), pl(i);
|
|
2344
2337
|
}
|
|
2345
2338
|
}), nn = { class: "app-select__amount" }, un = /* @__PURE__ */ $l({
|
|
2346
2339
|
__name: "AppSelect",
|
|
@@ -2363,38 +2356,38 @@ const on = ye({
|
|
|
2363
2356
|
},
|
|
2364
2357
|
emits: ["update:modelValue"],
|
|
2365
2358
|
setup(e, { emit: l }) {
|
|
2366
|
-
const t = e, n = l,
|
|
2359
|
+
const t = e, n = l, c = O(!1), u = O(""), a = r({
|
|
2367
2360
|
get() {
|
|
2368
2361
|
if (t.modelValue) {
|
|
2369
2362
|
if (t.multiple && Array.isArray(t.modelValue))
|
|
2370
2363
|
return t.options.filter(
|
|
2371
|
-
(
|
|
2364
|
+
(g) => t.modelValue.includes(g.value)
|
|
2372
2365
|
);
|
|
2373
2366
|
if (!Array.isArray(t.modelValue))
|
|
2374
2367
|
return t.options.find(
|
|
2375
|
-
(
|
|
2368
|
+
(g) => g.value === t.modelValue
|
|
2376
2369
|
);
|
|
2377
2370
|
}
|
|
2378
2371
|
},
|
|
2379
|
-
set(
|
|
2380
|
-
if (!
|
|
2372
|
+
set(g) {
|
|
2373
|
+
if (!g) {
|
|
2381
2374
|
n("update:modelValue", void 0);
|
|
2382
2375
|
return;
|
|
2383
2376
|
}
|
|
2384
|
-
if (t.multiple && Array.isArray(
|
|
2385
|
-
const y =
|
|
2377
|
+
if (t.multiple && Array.isArray(g)) {
|
|
2378
|
+
const y = g.map((q) => q.value);
|
|
2386
2379
|
n("update:modelValue", y);
|
|
2387
|
-
} else Array.isArray(
|
|
2380
|
+
} else Array.isArray(g) || n("update:modelValue", g.value);
|
|
2388
2381
|
}
|
|
2389
|
-
}),
|
|
2390
|
-
var
|
|
2382
|
+
}), b = r(() => {
|
|
2383
|
+
var g;
|
|
2391
2384
|
if (Array.isArray(a.value)) {
|
|
2392
2385
|
if (t.multiple && a.value.length == 0)
|
|
2393
2386
|
return t.placeholder;
|
|
2394
|
-
} else return ((
|
|
2387
|
+
} else return ((g = a.value) == null ? void 0 : g.label) || t.placeholder || "";
|
|
2395
2388
|
return "";
|
|
2396
|
-
}),
|
|
2397
|
-
(
|
|
2389
|
+
}), p = r(() => !(!t.clearable || !t.modelValue || t.modelValue && Array.isArray(t.modelValue) && !t.modelValue.length)), V = r(() => u.value ? t.options.filter(
|
|
2390
|
+
(g) => g.label.toLowerCase().includes(u.value.toLowerCase())
|
|
2398
2391
|
) : t.options), f = r(() => {
|
|
2399
2392
|
if (t.rules)
|
|
2400
2393
|
return t.required ? [...t.rules, Dt] : t.rules;
|
|
@@ -2402,18 +2395,18 @@ const on = ye({
|
|
|
2402
2395
|
return [Dt];
|
|
2403
2396
|
}), C = () => {
|
|
2404
2397
|
a.value = void 0;
|
|
2405
|
-
}, k = (
|
|
2398
|
+
}, k = (g, y) => {
|
|
2406
2399
|
y(() => {
|
|
2407
|
-
u.value =
|
|
2400
|
+
u.value = g;
|
|
2408
2401
|
});
|
|
2409
2402
|
};
|
|
2410
|
-
return (
|
|
2411
|
-
class:
|
|
2403
|
+
return (g, y) => (ae(), fe("div", {
|
|
2404
|
+
class: et(["app-select", [{ "app-select_opened": c.value }, `app-select_${e.size}`]])
|
|
2412
2405
|
}, [
|
|
2413
|
-
|
|
2406
|
+
e.label ? (ae(), fe("label", {
|
|
2414
2407
|
key: 0,
|
|
2415
|
-
class:
|
|
2416
|
-
},
|
|
2408
|
+
class: et(["app-select__label", { "app-select__label_bold": e.required }])
|
|
2409
|
+
}, Ke(e.required ? `${e.label} *` : e.label), 3)) : Me("", !0),
|
|
2417
2410
|
je(Hl(on), {
|
|
2418
2411
|
standout: "",
|
|
2419
2412
|
"hide-bottom-space": "",
|
|
@@ -2421,59 +2414,59 @@ const on = ye({
|
|
|
2421
2414
|
"no-error-icon": "",
|
|
2422
2415
|
behavior: "menu",
|
|
2423
2416
|
"popup-no-route-dismiss": "",
|
|
2424
|
-
"popup-content-class": `app-select-menu app-select-menu_${
|
|
2425
|
-
placeholder:
|
|
2417
|
+
"popup-content-class": `app-select-menu app-select-menu_${e.size} ${e.menuClass}`,
|
|
2418
|
+
placeholder: e.filtering && "Почніть вводити",
|
|
2426
2419
|
"input-debounce": "50",
|
|
2427
2420
|
modelValue: a.value,
|
|
2428
2421
|
"onUpdate:modelValue": y[0] || (y[0] = (q) => a.value = q),
|
|
2429
|
-
options:
|
|
2430
|
-
multiple:
|
|
2431
|
-
"use-input":
|
|
2422
|
+
options: V.value,
|
|
2423
|
+
multiple: e.multiple,
|
|
2424
|
+
"use-input": e.filtering && (Array.isArray(a.value) || !a.value),
|
|
2432
2425
|
rules: f.value,
|
|
2433
|
-
"lazy-rules":
|
|
2434
|
-
autofocus:
|
|
2435
|
-
disable:
|
|
2436
|
-
loading:
|
|
2426
|
+
"lazy-rules": e.lazyRules,
|
|
2427
|
+
autofocus: e.autofocus,
|
|
2428
|
+
disable: e.disabled,
|
|
2429
|
+
loading: e.loading,
|
|
2437
2430
|
onFilter: k,
|
|
2438
|
-
onPopupShow: y[1] || (y[1] = (q) =>
|
|
2439
|
-
onPopupHide: y[2] || (y[2] = (q) =>
|
|
2431
|
+
onPopupShow: y[1] || (y[1] = (q) => c.value = !0),
|
|
2432
|
+
onPopupHide: y[2] || (y[2] = (q) => c.value = !1)
|
|
2440
2433
|
}, {
|
|
2441
2434
|
append: ge(() => [
|
|
2442
|
-
|
|
2435
|
+
p.value ? (ae(), fe("i", {
|
|
2443
2436
|
key: 0,
|
|
2444
2437
|
class: "icon-kl icon-kl-circle-close app-select__clear",
|
|
2445
2438
|
onClick: Dl(C, ["stop", "prevent"])
|
|
2446
|
-
})) :
|
|
2439
|
+
})) : Me("", !0),
|
|
2447
2440
|
y[3] || (y[3] = mt("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
|
|
2448
2441
|
]),
|
|
2449
2442
|
selected: ge(() => {
|
|
2450
2443
|
var q, S;
|
|
2451
2444
|
return [
|
|
2452
|
-
Array.isArray(a.value) ? (
|
|
2453
|
-
!
|
|
2445
|
+
Array.isArray(a.value) ? (ae(), fe(tt, { key: 0 }, [
|
|
2446
|
+
!e.filtering || a.value.length ? (ae(), fe("span", {
|
|
2454
2447
|
key: 0,
|
|
2455
|
-
class:
|
|
2448
|
+
class: et([
|
|
2456
2449
|
"app-select__selected",
|
|
2457
2450
|
{
|
|
2458
|
-
"app-select__placeholder": !((q = a.value) != null && q.length) &&
|
|
2451
|
+
"app-select__placeholder": !((q = a.value) != null && q.length) && e.placeholder
|
|
2459
2452
|
}
|
|
2460
2453
|
])
|
|
2461
2454
|
}, [
|
|
2462
|
-
(S = a.value) != null && S.length ? (
|
|
2463
|
-
y[4] || (y[4] = gt(" Вибрано ")),
|
|
2464
|
-
mt("span", nn,
|
|
2465
|
-
], 64)) : (
|
|
2466
|
-
gt(
|
|
2455
|
+
(S = a.value) != null && S.length ? (ae(), fe(tt, { key: 0 }, [
|
|
2456
|
+
y[4] || (y[4] = gt(" Вибрано ", -1)),
|
|
2457
|
+
mt("span", nn, Ke(a.value.length), 1)
|
|
2458
|
+
], 64)) : (ae(), fe(tt, { key: 1 }, [
|
|
2459
|
+
gt(Ke(t.placeholder), 1)
|
|
2467
2460
|
], 64))
|
|
2468
|
-
], 2)) :
|
|
2469
|
-
], 64)) : (
|
|
2470
|
-
!
|
|
2461
|
+
], 2)) : Me("", !0)
|
|
2462
|
+
], 64)) : (ae(), fe(tt, { key: 1 }, [
|
|
2463
|
+
!e.filtering || a.value ? (ae(), fe("span", {
|
|
2471
2464
|
key: 0,
|
|
2472
|
-
class:
|
|
2465
|
+
class: et([
|
|
2473
2466
|
"app-select__selected",
|
|
2474
|
-
{ "app-select__placeholder": !a.value &&
|
|
2467
|
+
{ "app-select__placeholder": !a.value && e.placeholder }
|
|
2475
2468
|
])
|
|
2476
|
-
},
|
|
2469
|
+
}, Ke(b.value), 3)) : Me("", !0)
|
|
2477
2470
|
], 64))
|
|
2478
2471
|
];
|
|
2479
2472
|
}),
|
|
@@ -2482,35 +2475,35 @@ const on = ye({
|
|
|
2482
2475
|
class: ["app-select__option", { "app-select__option_selected": q.selected }]
|
|
2483
2476
|
}, q.itemProps), {
|
|
2484
2477
|
default: ge(() => [
|
|
2485
|
-
t.multiple ? (
|
|
2478
|
+
t.multiple ? (ae(), $t(it, {
|
|
2486
2479
|
key: 0,
|
|
2487
2480
|
class: "option-multiple",
|
|
2488
2481
|
avatar: ""
|
|
2489
2482
|
}, {
|
|
2490
2483
|
default: ge(() => [
|
|
2491
|
-
je(
|
|
2484
|
+
je(Ao, {
|
|
2492
2485
|
size: "30px",
|
|
2493
2486
|
"model-value": q.selected,
|
|
2494
2487
|
"onUpdate:modelValue": () => q.toggleOption(q.opt)
|
|
2495
2488
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
2496
2489
|
]),
|
|
2497
2490
|
_: 2
|
|
2498
|
-
}, 1024)) :
|
|
2499
|
-
q.opt.done ? (
|
|
2491
|
+
}, 1024)) : Me("", !0),
|
|
2492
|
+
q.opt.done ? (ae(), $t(it, {
|
|
2500
2493
|
key: 1,
|
|
2501
2494
|
class: "option-done",
|
|
2502
2495
|
avatar: ""
|
|
2503
2496
|
}, {
|
|
2504
|
-
default: ge(() => y[5] || (y[5] = [
|
|
2497
|
+
default: ge(() => [...y[5] || (y[5] = [
|
|
2505
2498
|
mt("i", { class: "icon-kl icon-kl-check option-done__icon" }, null, -1)
|
|
2506
|
-
])),
|
|
2499
|
+
])]),
|
|
2507
2500
|
_: 1
|
|
2508
|
-
})) :
|
|
2509
|
-
je(
|
|
2501
|
+
})) : Me("", !0),
|
|
2502
|
+
je(it, null, {
|
|
2510
2503
|
default: ge(() => [
|
|
2511
2504
|
je(vl, null, {
|
|
2512
2505
|
default: ge(() => [
|
|
2513
|
-
gt(
|
|
2506
|
+
gt(Ke(q.opt.label), 1)
|
|
2514
2507
|
]),
|
|
2515
2508
|
_: 2
|
|
2516
2509
|
}, 1024)
|