@validol4ik/uikit 0.9.2 → 0.9.4
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-BiBpclZl.js → AppButtonCopy-CBOiSOFe.js} +1 -1
- package/dist/{AppButtonCopy-Dc5ffnX-.cjs → AppButtonCopy-CJq8F3gr.cjs} +1 -1
- package/dist/{AppSelect-Bg-_7HlU.cjs → AppSelect-BOROROsn.cjs} +1 -1
- package/dist/{AppSelect-C2Py88wq.js → AppSelect-CZfoTaTG.js} +200 -198
- package/dist/{DropdownButton-57ZytzS3.cjs → DropdownButton-BQrXTfDg.cjs} +1 -1
- package/dist/{DropdownButton-D9kVbgTX.js → DropdownButton-C37a5e17.js} +2 -2
- package/dist/{QMenu-g9kJyakP.js → QMenu-Ci2SWpGp.js} +1 -1
- package/dist/{QMenu-J73Przg7.cjs → QMenu-DGfnSFI-.cjs} +1 -1
- package/dist/{index-BqPXkbjY.js → index-CTeqfCv_.js} +118 -116
- package/dist/{index-1IrDAwxv.cjs → index-Cekw313Q.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCurrentInstance as re, ref as M, onBeforeUpdate as el, inject as _l, watch as J, onMounted as tl, onBeforeUnmount as Ve, computed as r, nextTick as fe, onDeactivated as ll, onActivated as ol, h as g, Transition as gt, onBeforeMount as Al, onUpdated as Bl, defineComponent as zl, openBlock as ce, createElementBlock as de, normalizeClass as Xe, toDisplayString as Ye, createCommentVNode as Ze, createVNode as Tt, unref as El, withCtx as rt, mergeProps as Rl, Fragment as Je, createTextVNode as Ot, createElementVNode as Mt, withModifiers as Fl } from "vue";
|
|
2
|
-
import { u as pt, s as ae, p as ge, a as bt, Q as Oe, b as Tl, h as qe, c as xe, d as Ol, e as Ml, f as Il, g as Ll, R as Hl, i as Pl, j as $l, k as nl, l as Dl, m as we, n as jl, o as Kl, q as Nl, r as
|
|
3
|
-
import { a as ul, u as Gl, r as eo, g as to, b as lo, h as oo, c as no, d as uo, e as io, f as ao, i as ro, j as so, k as co, l as fo, m as It, n as vo, Q as mo } from "./QMenu-
|
|
2
|
+
import { u as pt, s as ae, p as ge, a as bt, Q as Oe, b as Tl, h as qe, c as xe, d as Ol, e as Ml, f as Il, g as Ll, R as Hl, i as Pl, j as $l, k as nl, l as Dl, m as we, n as jl, o as Kl, q as Nl, r as Ul, t as Ql, v as Wl, w as Te, x as Xl, S as Yl, P as Zl, _ as Jl } from "./index-CTeqfCv_.js";
|
|
3
|
+
import { a as ul, u as Gl, r as eo, g as to, b as lo, h as oo, c as no, d as uo, e as io, f as ao, i as ro, j as so, k as co, l as fo, m as It, n as vo, Q as mo } from "./QMenu-Ci2SWpGp.js";
|
|
4
4
|
import { b as go, c as ke, r as Lt, a as ho } from "./focusout-DjvPXP_b.js";
|
|
5
5
|
const Ht = (e) => e ? !0 : "Обовʼязкове поле", Pt = /^on[A-Z]/;
|
|
6
6
|
function po() {
|
|
@@ -87,27 +87,27 @@ function Co(e, t) {
|
|
|
87
87
|
const { props: o, proxy: n } = re(), d = M(!1), u = M(null), a = M(!1);
|
|
88
88
|
So({ validate: h, resetValidation: T });
|
|
89
89
|
let b = 0, S;
|
|
90
|
-
const
|
|
90
|
+
const _ = r(
|
|
91
91
|
() => o.rules !== void 0 && o.rules !== null && o.rules.length !== 0
|
|
92
|
-
), f = r(() => o.disable !== !0 &&
|
|
92
|
+
), f = r(() => o.disable !== !0 && _.value === !0 && t.value === !1), w = r(
|
|
93
93
|
() => o.error === !0 || d.value === !0
|
|
94
|
-
),
|
|
94
|
+
), k = r(() => typeof o.errorMessage == "string" && o.errorMessage.length !== 0 ? o.errorMessage : u.value);
|
|
95
95
|
J(() => o.modelValue, () => {
|
|
96
96
|
a.value = !0, f.value === !0 && o.lazyRules === !1 && m();
|
|
97
97
|
});
|
|
98
98
|
function C() {
|
|
99
99
|
o.lazyRules !== "ondemand" && f.value === !0 && a.value === !0 && m();
|
|
100
100
|
}
|
|
101
|
-
J(() => o.reactiveRules, (
|
|
102
|
-
|
|
103
|
-
}, { immediate: !0 }), J(() => o.lazyRules, C), J(e, (
|
|
104
|
-
|
|
101
|
+
J(() => o.reactiveRules, (q) => {
|
|
102
|
+
q === !0 ? S === void 0 && (S = J(() => o.rules, C, { immediate: !0, deep: !0 })) : S !== void 0 && (S(), S = void 0);
|
|
103
|
+
}, { immediate: !0 }), J(() => o.lazyRules, C), J(e, (q) => {
|
|
104
|
+
q === !0 ? a.value = !0 : f.value === !0 && o.lazyRules !== "ondemand" && m();
|
|
105
105
|
});
|
|
106
106
|
function T() {
|
|
107
107
|
b++, t.value = !1, a.value = !1, d.value = !1, u.value = null, m.cancel();
|
|
108
108
|
}
|
|
109
|
-
function h(
|
|
110
|
-
if (o.disable === !0 ||
|
|
109
|
+
function h(q = o.modelValue) {
|
|
110
|
+
if (o.disable === !0 || _.value === !1)
|
|
111
111
|
return !0;
|
|
112
112
|
const D = ++b, B = t.value !== !0 ? () => {
|
|
113
113
|
a.value = !0;
|
|
@@ -118,7 +118,7 @@ function Co(e, t) {
|
|
|
118
118
|
for (let O = 0; O < o.rules.length; O++) {
|
|
119
119
|
const P = o.rules[O];
|
|
120
120
|
let $;
|
|
121
|
-
if (typeof P == "function" ? $ = P(
|
|
121
|
+
if (typeof P == "function" ? $ = P(q, st) : typeof P == "string" && st[P] !== void 0 && ($ = st[P](q)), $ === !1 || typeof $ == "string")
|
|
122
122
|
return I(!0, $), !1;
|
|
123
123
|
$ !== !0 && $ !== void 0 && Y.push($);
|
|
124
124
|
}
|
|
@@ -137,9 +137,9 @@ function Co(e, t) {
|
|
|
137
137
|
S == null || S(), m.cancel();
|
|
138
138
|
}), Object.assign(n, { resetValidation: T, validate: h }), go(n, "hasError", () => w.value), {
|
|
139
139
|
isDirtyModel: a,
|
|
140
|
-
hasRules:
|
|
140
|
+
hasRules: _,
|
|
141
141
|
hasError: w,
|
|
142
|
-
errorMessage:
|
|
142
|
+
errorMessage: k,
|
|
143
143
|
validate: h,
|
|
144
144
|
resetValidation: T
|
|
145
145
|
};
|
|
@@ -238,21 +238,21 @@ function sl(e) {
|
|
|
238
238
|
focus: P
|
|
239
239
|
}), e.computedCounter === void 0 && (e.computedCounter = r(() => {
|
|
240
240
|
if (t.counter !== !1) {
|
|
241
|
-
const p = typeof t.modelValue == "string" || typeof t.modelValue == "number" ? ("" + t.modelValue).length : Array.isArray(t.modelValue) === !0 ? t.modelValue.length : 0,
|
|
242
|
-
return p + (
|
|
241
|
+
const p = typeof t.modelValue == "string" || typeof t.modelValue == "number" ? ("" + t.modelValue).length : Array.isArray(t.modelValue) === !0 ? t.modelValue.length : 0, V = t.maxlength !== void 0 ? t.maxlength : t.maxValues;
|
|
242
|
+
return p + (V !== void 0 ? " / " + V : "");
|
|
243
243
|
}
|
|
244
244
|
}));
|
|
245
245
|
const {
|
|
246
246
|
isDirtyModel: S,
|
|
247
|
-
hasRules:
|
|
247
|
+
hasRules: _,
|
|
248
248
|
hasError: f,
|
|
249
249
|
errorMessage: w,
|
|
250
|
-
resetValidation:
|
|
250
|
+
resetValidation: k
|
|
251
251
|
} = Co(e.focused, e.innerLoading), C = e.floatingLabel !== void 0 ? r(() => t.stackLabel === !0 || e.focused.value === !0 || e.floatingLabel.value === !0) : r(() => t.stackLabel === !0 || e.focused.value === !0 || e.hasValue.value === !0), T = r(
|
|
252
|
-
() => t.bottomSlots === !0 || t.hint !== void 0 ||
|
|
252
|
+
() => t.bottomSlots === !0 || t.hint !== void 0 || _.value === !0 || t.counter === !0 || t.error !== null
|
|
253
253
|
), h = r(() => t.filled === !0 ? "filled" : t.outlined === !0 ? "outlined" : t.borderless === !0 ? "borderless" : t.standout ? "standout" : "standard"), m = r(
|
|
254
254
|
() => `q-field row no-wrap items-start q-field--${h.value}` + (e.fieldClass !== void 0 ? ` ${e.fieldClass.value}` : "") + (t.rounded === !0 ? " q-field--rounded" : "") + (t.square === !0 ? " q-field--square" : "") + (C.value === !0 ? " q-field--float" : "") + (D.value === !0 ? " q-field--labeled" : "") + (t.dense === !0 ? " q-field--dense" : "") + (t.itemAligned === !0 ? " q-field--item-aligned q-item-type" : "") + (e.isDark.value === !0 ? " q-field--dark" : "") + (e.getControl === void 0 ? " q-field--auto-height" : "") + (e.focused.value === !0 ? " q-field--focused" : "") + (f.value === !0 ? " q-field--error" : "") + (f.value === !0 || e.focused.value === !0 ? " q-field--highlighted" : "") + (t.hideBottomSpace !== !0 && T.value === !0 ? " q-field--with-bottom" : "") + (t.disable === !0 ? " q-field--disabled" : t.readonly === !0 ? " q-field--readonly" : "")
|
|
255
|
-
),
|
|
255
|
+
), q = r(
|
|
256
256
|
() => "q-field__control relative-position row no-wrap" + (t.bgColor !== void 0 ? ` bg-${t.bgColor}` : "") + (f.value === !0 ? " text-negative" : typeof t.standout == "string" && t.standout.length !== 0 && e.focused.value === !0 ? ` ${t.standout}` : t.color !== void 0 ? ` text-${t.color}` : "")
|
|
257
257
|
), D = r(
|
|
258
258
|
() => t.labelSlot === !0 || t.label !== void 0
|
|
@@ -272,8 +272,8 @@ function sl(e) {
|
|
|
272
272
|
function O() {
|
|
273
273
|
var W;
|
|
274
274
|
const p = document.activeElement;
|
|
275
|
-
let
|
|
276
|
-
|
|
275
|
+
let V = (W = e.targetRef) == null ? void 0 : W.value;
|
|
276
|
+
V && (p === null || p.id !== e.targetUid.value) && (V.hasAttribute("tabindex") === !0 || (V = V.querySelector("[tabindex]")), V !== p && (V == null || V.focus({ preventScroll: !0 })));
|
|
277
277
|
}
|
|
278
278
|
function P() {
|
|
279
279
|
ul(O);
|
|
@@ -286,19 +286,19 @@ function sl(e) {
|
|
|
286
286
|
function oe(p) {
|
|
287
287
|
b !== null && (clearTimeout(b), b = null), e.editable.value === !0 && e.focused.value === !1 && (e.focused.value = !0, o("focus", p));
|
|
288
288
|
}
|
|
289
|
-
function X(p,
|
|
289
|
+
function X(p, V) {
|
|
290
290
|
b !== null && clearTimeout(b), b = setTimeout(() => {
|
|
291
|
-
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, o("blur", p)),
|
|
291
|
+
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, o("blur", p)), V == null || V());
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
function ne(p) {
|
|
295
|
-
var
|
|
296
|
-
ae(p), a.platform.is.mobile !== !0 ? (((
|
|
295
|
+
var V;
|
|
296
|
+
ae(p), a.platform.is.mobile !== !0 ? (((V = e.targetRef) == null ? void 0 : V.value) || e.rootRef.value).focus() : e.rootRef.value.contains(document.activeElement) === !0 && document.activeElement.blur(), t.type === "file" && (e.inputRef.value.value = null), o("update:modelValue", null), e.changeEvent === !0 && o("change", null), o("clear", t.modelValue), fe(() => {
|
|
297
297
|
const W = S.value;
|
|
298
|
-
|
|
298
|
+
k(), S.value = W;
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function Q(p) {
|
|
302
302
|
[13, 32].includes(p.keyCode) && ne(p);
|
|
303
303
|
}
|
|
304
304
|
function se() {
|
|
@@ -314,16 +314,16 @@ function sl(e) {
|
|
|
314
314
|
class: "q-field__control-container col relative-position row no-wrap q-anchor--skip"
|
|
315
315
|
}, ve())
|
|
316
316
|
), f.value === !0 && t.noErrorIcon === !1 && p.push(
|
|
317
|
-
|
|
317
|
+
U("error", [
|
|
318
318
|
g(Oe, { name: a.iconSet.field.error, color: "negative" })
|
|
319
319
|
])
|
|
320
320
|
), t.loading === !0 || e.innerLoading.value === !0 ? p.push(
|
|
321
|
-
|
|
321
|
+
U(
|
|
322
322
|
"inner-loading-append",
|
|
323
323
|
n.loading !== void 0 ? n.loading() : [g(Tl, { color: t.color })]
|
|
324
324
|
)
|
|
325
325
|
) : t.clearable === !0 && e.hasValue.value === !0 && e.editable.value === !0 && p.push(
|
|
326
|
-
|
|
326
|
+
U("inner-clearable-append", [
|
|
327
327
|
g(Oe, {
|
|
328
328
|
class: "q-field__focusable-action",
|
|
329
329
|
name: t.clearIcon || a.iconSet.field.clear,
|
|
@@ -331,7 +331,7 @@ function sl(e) {
|
|
|
331
331
|
role: "button",
|
|
332
332
|
"aria-hidden": "false",
|
|
333
333
|
"aria-label": a.lang.label.clear,
|
|
334
|
-
onKeyup:
|
|
334
|
+
onKeyup: Q,
|
|
335
335
|
onClick: ne
|
|
336
336
|
})
|
|
337
337
|
])
|
|
@@ -342,7 +342,7 @@ function sl(e) {
|
|
|
342
342
|
onClick: ge
|
|
343
343
|
}, n.append())
|
|
344
344
|
), e.getInnerAppend !== void 0 && p.push(
|
|
345
|
-
|
|
345
|
+
U("inner-append", e.getInnerAppend())
|
|
346
346
|
), e.getControlChild !== void 0 && p.push(
|
|
347
347
|
e.getControlChild()
|
|
348
348
|
), p;
|
|
@@ -374,12 +374,12 @@ function sl(e) {
|
|
|
374
374
|
), p.concat(qe(n.default));
|
|
375
375
|
}
|
|
376
376
|
function Z() {
|
|
377
|
-
let p,
|
|
378
|
-
f.value === !0 ? w.value !== null ? (p = [g("div", { role: "alert" }, w.value)],
|
|
377
|
+
let p, V;
|
|
378
|
+
f.value === !0 ? w.value !== null ? (p = [g("div", { role: "alert" }, w.value)], V = `q--slot-error-${w.value}`) : (p = qe(n.error), V = "q--slot-error") : (t.hideHint !== !0 || e.focused.value === !0) && (t.hint !== void 0 ? (p = [g("div", t.hint)], V = `q--slot-hint-${t.hint}`) : (p = qe(n.hint), V = "q--slot-hint"));
|
|
379
379
|
const W = t.counter === !0 || n.counter !== void 0;
|
|
380
380
|
if (t.hideBottomSpace === !0 && W === !1 && p === void 0) return;
|
|
381
381
|
const i = g("div", {
|
|
382
|
-
key:
|
|
382
|
+
key: V,
|
|
383
383
|
class: "q-field__messages col"
|
|
384
384
|
}, p);
|
|
385
385
|
return g("div", {
|
|
@@ -392,11 +392,11 @@ function sl(e) {
|
|
|
392
392
|
}, n.counter !== void 0 ? n.counter() : e.computedCounter.value) : null
|
|
393
393
|
]);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
return
|
|
395
|
+
function U(p, V) {
|
|
396
|
+
return V === null ? null : g("div", {
|
|
397
397
|
key: p,
|
|
398
398
|
class: "q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"
|
|
399
|
-
},
|
|
399
|
+
}, V);
|
|
400
400
|
}
|
|
401
401
|
let ue = !1;
|
|
402
402
|
return ll(() => {
|
|
@@ -408,7 +408,7 @@ function sl(e) {
|
|
|
408
408
|
}), Ve(() => {
|
|
409
409
|
b !== null && clearTimeout(b);
|
|
410
410
|
}), Object.assign(u, { focus: P, blur: $ }), function() {
|
|
411
|
-
const
|
|
411
|
+
const V = e.getControl === void 0 && n.control === void 0 ? {
|
|
412
412
|
...e.splitAttrs.attributes.value,
|
|
413
413
|
"data-autofocus": t.autofocus === !0 || void 0,
|
|
414
414
|
...Y.value
|
|
@@ -420,7 +420,7 @@ function sl(e) {
|
|
|
420
420
|
d.class
|
|
421
421
|
],
|
|
422
422
|
style: d.style,
|
|
423
|
-
...
|
|
423
|
+
...V
|
|
424
424
|
}, [
|
|
425
425
|
n.before !== void 0 ? g("div", {
|
|
426
426
|
class: "q-field__before q-field__marginal row no-wrap items-center",
|
|
@@ -431,7 +431,7 @@ function sl(e) {
|
|
|
431
431
|
}, [
|
|
432
432
|
g("div", {
|
|
433
433
|
ref: e.controlRef,
|
|
434
|
-
class:
|
|
434
|
+
class: q.value,
|
|
435
435
|
tabindex: -1,
|
|
436
436
|
...e.controlEvents
|
|
437
437
|
}, se()),
|
|
@@ -501,21 +501,21 @@ const ko = xe({
|
|
|
501
501
|
},
|
|
502
502
|
emits: ["update:modelValue", "update:selected", "remove", "click"],
|
|
503
503
|
setup(e, { slots: t, emit: o }) {
|
|
504
|
-
const { proxy: { $q: n } } = re(), d = bt(e, n), u = Ml(e, Vo), a = r(() => e.selected === !0 || e.icon !== void 0), b = r(() => e.selected === !0 ? e.iconSelected || n.iconSet.chip.selected : e.icon), S = r(() => e.iconRemove || n.iconSet.chip.remove),
|
|
504
|
+
const { proxy: { $q: n } } = re(), d = bt(e, n), u = Ml(e, Vo), a = r(() => e.selected === !0 || e.icon !== void 0), b = r(() => e.selected === !0 ? e.iconSelected || n.iconSet.chip.selected : e.icon), S = r(() => e.iconRemove || n.iconSet.chip.remove), _ = r(
|
|
505
505
|
() => e.disable === !1 && (e.clickable === !0 || e.selected !== null)
|
|
506
506
|
), f = r(() => {
|
|
507
507
|
const m = e.outline === !0 && e.color || e.textColor;
|
|
508
|
-
return "q-chip row inline no-wrap items-center" + (e.outline === !1 && e.color !== void 0 ? ` bg-${e.color}` : "") + (m ? ` text-${m} 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" : "") + (
|
|
508
|
+
return "q-chip row inline no-wrap items-center" + (e.outline === !1 && e.color !== void 0 ? ` bg-${e.color}` : "") + (m ? ` text-${m} 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" : "") + (_.value === !0 ? " q-chip--clickable cursor-pointer non-selectable q-hoverable" : "") + (e.square === !0 ? " q-chip--square" : "") + (d.value === !0 ? " q-chip--dark q-dark" : "");
|
|
509
509
|
}), w = r(() => {
|
|
510
|
-
const m = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 },
|
|
510
|
+
const m = e.disable === !0 ? { tabindex: -1, "aria-disabled": "true" } : { tabindex: e.tabindex || 0 }, q = {
|
|
511
511
|
...m,
|
|
512
512
|
role: "button",
|
|
513
513
|
"aria-hidden": "false",
|
|
514
514
|
"aria-label": e.removeAriaLabel || n.lang.label.remove
|
|
515
515
|
};
|
|
516
|
-
return { chip: m, remove:
|
|
516
|
+
return { chip: m, remove: q };
|
|
517
517
|
});
|
|
518
|
-
function
|
|
518
|
+
function k(m) {
|
|
519
519
|
m.keyCode === 13 && C(m);
|
|
520
520
|
}
|
|
521
521
|
function C(m) {
|
|
@@ -526,7 +526,7 @@ const ko = xe({
|
|
|
526
526
|
}
|
|
527
527
|
function h() {
|
|
528
528
|
const m = [];
|
|
529
|
-
|
|
529
|
+
_.value === !0 && m.push(
|
|
530
530
|
g("div", { class: "q-focus-helper" })
|
|
531
531
|
), a.value === !0 && m.push(
|
|
532
532
|
g(Oe, {
|
|
@@ -534,11 +534,11 @@ const ko = xe({
|
|
|
534
534
|
name: b.value
|
|
535
535
|
})
|
|
536
536
|
);
|
|
537
|
-
const
|
|
537
|
+
const q = e.label !== void 0 ? [g("div", { class: "ellipsis" }, [e.label])] : void 0;
|
|
538
538
|
return m.push(
|
|
539
539
|
g("div", {
|
|
540
540
|
class: "q-chip__content col row no-wrap items-center q-anchor--skip"
|
|
541
|
-
}, Ll(t.default,
|
|
541
|
+
}, Ll(t.default, q))
|
|
542
542
|
), e.iconRight && m.push(
|
|
543
543
|
g(Oe, {
|
|
544
544
|
class: "q-chip__icon q-chip__icon--right",
|
|
@@ -560,10 +560,10 @@ const ko = xe({
|
|
|
560
560
|
class: f.value,
|
|
561
561
|
style: u.value
|
|
562
562
|
};
|
|
563
|
-
return
|
|
563
|
+
return _.value === !0 && Object.assign(
|
|
564
564
|
m,
|
|
565
565
|
w.value.chip,
|
|
566
|
-
{ onClick: C, onKeyup:
|
|
566
|
+
{ onClick: C, onKeyup: k }
|
|
567
567
|
), Il(
|
|
568
568
|
"div",
|
|
569
569
|
m,
|
|
@@ -596,19 +596,19 @@ const ko = xe({
|
|
|
596
596
|
},
|
|
597
597
|
emits: ["click", "keyup"],
|
|
598
598
|
setup(e, { slots: t, emit: o }) {
|
|
599
|
-
const { proxy: { $q: n } } = re(), d = bt(e, n), { hasLink: u, linkAttrs: a, linkClass: b, linkTag: S, navigateOnClick:
|
|
599
|
+
const { proxy: { $q: n } } = re(), d = bt(e, n), { hasLink: u, linkAttrs: a, linkClass: b, linkTag: S, navigateOnClick: _ } = $l(), f = M(null), w = M(null), k = r(
|
|
600
600
|
() => e.clickable === !0 || u.value === !0 || e.tag === "label"
|
|
601
601
|
), C = r(
|
|
602
|
-
() => e.disable !== !0 &&
|
|
602
|
+
() => e.disable !== !0 && k.value === !0
|
|
603
603
|
), T = r(
|
|
604
604
|
() => "q-item q-item-type row no-wrap" + (e.dense === !0 ? " q-item--dense" : "") + (d.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" : "") + (C.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" : "") : "")
|
|
605
605
|
), h = r(() => e.insetLevel === void 0 ? null : {
|
|
606
606
|
["padding" + (n.lang.rtl === !0 ? "Right" : "Left")]: 16 + e.insetLevel * 56 + "px"
|
|
607
607
|
});
|
|
608
608
|
function m(B) {
|
|
609
|
-
C.value === !0 && (w.value !== null && B.qAvoidFocus !== !0 && (B.qKeyEvent !== !0 && document.activeElement === f.value ? w.value.focus() : document.activeElement === w.value && f.value.focus()),
|
|
609
|
+
C.value === !0 && (w.value !== null && B.qAvoidFocus !== !0 && (B.qKeyEvent !== !0 && document.activeElement === f.value ? w.value.focus() : document.activeElement === w.value && f.value.focus()), _(B));
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function q(B) {
|
|
612
612
|
if (C.value === !0 && nl(B, [13, 32]) === !0) {
|
|
613
613
|
ae(B), B.qKeyEvent = !0;
|
|
614
614
|
const I = new MouseEvent("click", B);
|
|
@@ -629,9 +629,9 @@ const ko = xe({
|
|
|
629
629
|
style: h.value,
|
|
630
630
|
role: "listitem",
|
|
631
631
|
onClick: m,
|
|
632
|
-
onKeyup:
|
|
632
|
+
onKeyup: q
|
|
633
633
|
};
|
|
634
|
-
return C.value === !0 ? (B.tabindex = e.tabindex || "0", Object.assign(B, a.value)) :
|
|
634
|
+
return C.value === !0 ? (B.tabindex = e.tabindex || "0", Object.assign(B, a.value)) : k.value === !0 && (B["aria-disabled"] = "true"), g(
|
|
635
635
|
S.value,
|
|
636
636
|
B,
|
|
637
637
|
D()
|
|
@@ -687,7 +687,7 @@ function zo(e, t, o) {
|
|
|
687
687
|
}
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
let Pe = 0, ct, dt, De, ft = !1, Kt, Nt,
|
|
690
|
+
let Pe = 0, ct, dt, De, ft = !1, Kt, Nt, Ut, Ce = null;
|
|
691
691
|
function Eo(e) {
|
|
692
692
|
Ro(e) && ae(e);
|
|
693
693
|
}
|
|
@@ -702,7 +702,7 @@ function Ro(e) {
|
|
|
702
702
|
}
|
|
703
703
|
return !0;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Qt(e) {
|
|
706
706
|
e.target === document && (document.scrollingElement.scrollTop = document.scrollingElement.scrollTop);
|
|
707
707
|
}
|
|
708
708
|
function tt(e) {
|
|
@@ -716,9 +716,9 @@ function Wt(e) {
|
|
|
716
716
|
const t = document.body, o = window.visualViewport !== void 0;
|
|
717
717
|
if (e === "add") {
|
|
718
718
|
const { overflowY: n, overflowX: d } = window.getComputedStyle(t);
|
|
719
|
-
ct = to(window), dt = lo(window), Kt = t.style.left, Nt = t.style.top,
|
|
719
|
+
ct = to(window), dt = lo(window), Kt = t.style.left, Nt = t.style.top, Ut = window.location.href, t.style.left = `-${ct}px`, t.style.top = `-${dt}px`, d !== "hidden" && (d === "scroll" || t.scrollWidth > window.innerWidth) && t.classList.add("q-body--force-scrollbar-x"), n !== "hidden" && (n === "scroll" || t.scrollHeight > window.innerHeight) && t.classList.add("q-body--force-scrollbar-y"), t.classList.add("q-body--prevent-scroll"), document.qScrollPrevented = !0, ke.is.ios === !0 && (o === !0 ? (window.scrollTo(0, 0), window.visualViewport.addEventListener("resize", tt, we.passiveCapture), window.visualViewport.addEventListener("scroll", tt, we.passiveCapture), window.scrollTo(0, 0)) : window.addEventListener("scroll", Qt, we.passiveCapture));
|
|
720
720
|
}
|
|
721
|
-
ke.is.desktop === !0 && ke.is.mac === !0 && window[`${e}EventListener`]("wheel", Eo, we.notPassive), e === "remove" && (ke.is.ios === !0 && (o === !0 ? (window.visualViewport.removeEventListener("resize", tt, we.passiveCapture), window.visualViewport.removeEventListener("scroll", tt, we.passiveCapture)) : window.removeEventListener("scroll",
|
|
721
|
+
ke.is.desktop === !0 && ke.is.mac === !0 && window[`${e}EventListener`]("wheel", Eo, we.notPassive), e === "remove" && (ke.is.ios === !0 && (o === !0 ? (window.visualViewport.removeEventListener("resize", tt, we.passiveCapture), window.visualViewport.removeEventListener("scroll", tt, we.passiveCapture)) : window.removeEventListener("scroll", Qt, we.passiveCapture)), t.classList.remove("q-body--prevent-scroll"), t.classList.remove("q-body--force-scrollbar-x"), t.classList.remove("q-body--force-scrollbar-y"), document.qScrollPrevented = !1, t.style.left = Kt, t.style.top = Nt, window.location.href === Ut && window.scrollTo(ct, dt), De = void 0);
|
|
722
722
|
}
|
|
723
723
|
function Fo(e) {
|
|
724
724
|
let t = "add";
|
|
@@ -799,10 +799,10 @@ const Oo = {
|
|
|
799
799
|
],
|
|
800
800
|
setup(e, { slots: t, emit: o, attrs: n }) {
|
|
801
801
|
const d = re(), u = M(null), a = M(!1), b = M(!1);
|
|
802
|
-
let S = null,
|
|
803
|
-
const
|
|
802
|
+
let S = null, _ = null, f, w;
|
|
803
|
+
const k = r(
|
|
804
804
|
() => e.persistent !== !0 && e.noRouteDismiss !== !0 && e.seamless !== !0
|
|
805
|
-
), { preventBodyScroll: C } = To(), { registerTimeout: T } = ao(), { registerTick: h, removeTick: m } = ro(), { transitionProps:
|
|
805
|
+
), { preventBodyScroll: C } = To(), { registerTimeout: T } = ao(), { registerTick: h, removeTick: m } = ro(), { transitionProps: q, transitionStyle: D } = so(
|
|
806
806
|
e,
|
|
807
807
|
() => Xt[e.position][0],
|
|
808
808
|
() => Xt[e.position][1]
|
|
@@ -813,7 +813,7 @@ const Oo = {
|
|
|
813
813
|
"dialog"
|
|
814
814
|
), { hide: $ } = fo({
|
|
815
815
|
showing: a,
|
|
816
|
-
hideOnRouteChange:
|
|
816
|
+
hideOnRouteChange: k,
|
|
817
817
|
handleShow: se,
|
|
818
818
|
handleHide: ve,
|
|
819
819
|
processOnMount: !0
|
|
@@ -821,24 +821,24 @@ const Oo = {
|
|
|
821
821
|
zo(a);
|
|
822
822
|
const oe = r(
|
|
823
823
|
() => `q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized === !0 ? "maximized" : "minimized"} q-dialog__inner--${e.position} ${Oo[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" : "")
|
|
824
|
-
), X = r(() => a.value === !0 && e.seamless !== !0), ne = r(() => e.autoClose === !0 ? { onClick: W } : {}),
|
|
824
|
+
), X = r(() => a.value === !0 && e.seamless !== !0), ne = r(() => e.autoClose === !0 ? { onClick: W } : {}), Q = r(() => [
|
|
825
825
|
`q-dialog fullscreen no-pointer-events q-dialog--${X.value === !0 ? "modal" : "seamless"}`,
|
|
826
826
|
n.class
|
|
827
827
|
]);
|
|
828
828
|
J(() => e.maximized, (y) => {
|
|
829
|
-
a.value === !0 &&
|
|
829
|
+
a.value === !0 && V(y);
|
|
830
830
|
}), J(X, (y) => {
|
|
831
831
|
C(y), y === !0 ? (ho(c), vo(ue)) : (Lt(c), It(ue));
|
|
832
832
|
});
|
|
833
833
|
function se(y) {
|
|
834
834
|
var E;
|
|
835
|
-
|
|
835
|
+
_ = e.noRefocus === !1 && document.activeElement !== null ? document.activeElement : null, V(e.maximized), I(), b.value = !0, e.noFocus !== !0 ? ((E = document.activeElement) == null || E.blur(), h(Z)) : m(), T(() => {
|
|
836
836
|
if (d.proxy.$q.platform.is.ios === !0) {
|
|
837
837
|
if (e.seamless !== !0 && document.activeElement) {
|
|
838
|
-
const { top: R, bottom: A } = document.activeElement.getBoundingClientRect(), { innerHeight: j } = window,
|
|
839
|
-
R > 0 && A >
|
|
840
|
-
document.scrollingElement.scrollHeight -
|
|
841
|
-
A >= j ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + A -
|
|
838
|
+
const { top: R, bottom: A } = document.activeElement.getBoundingClientRect(), { innerHeight: j } = window, x = window.visualViewport !== void 0 ? window.visualViewport.height : j;
|
|
839
|
+
R > 0 && A > x / 2 && (document.scrollingElement.scrollTop = Math.min(
|
|
840
|
+
document.scrollingElement.scrollHeight - x,
|
|
841
|
+
A >= j ? 1 / 0 : Math.ceil(document.scrollingElement.scrollTop + A - x / 2)
|
|
842
842
|
)), document.activeElement.scrollIntoView();
|
|
843
843
|
}
|
|
844
844
|
w = !0, u.value.click(), w = !1;
|
|
@@ -847,7 +847,7 @@ const Oo = {
|
|
|
847
847
|
}, e.transitionDuration);
|
|
848
848
|
}
|
|
849
849
|
function ve(y) {
|
|
850
|
-
m(), p(!0), b.value = !0, Y(),
|
|
850
|
+
m(), p(!0), b.value = !0, Y(), _ !== null && ((((y == null ? void 0 : y.type.indexOf("key")) === 0 ? _.closest('[tabindex]:not([tabindex^="-"])') : void 0) || _).focus(), _ = null), T(() => {
|
|
851
851
|
Y(!0), b.value = !1, o("hide", y);
|
|
852
852
|
}, e.transitionDuration);
|
|
853
853
|
}
|
|
@@ -866,7 +866,7 @@ const Oo = {
|
|
|
866
866
|
}
|
|
867
867
|
});
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function U(y) {
|
|
870
870
|
y && typeof y.focus == "function" ? y.focus({ preventScroll: !0 }) : Z(), o("shake");
|
|
871
871
|
const E = u.value;
|
|
872
872
|
E !== null && (E.classList.remove("q-animate--scale"), E.classList.add("q-animate--scale"), S !== null && clearTimeout(S), S = setTimeout(() => {
|
|
@@ -874,19 +874,19 @@ const Oo = {
|
|
|
874
874
|
}, 170));
|
|
875
875
|
}
|
|
876
876
|
function ue() {
|
|
877
|
-
e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 &&
|
|
877
|
+
e.seamless !== !0 && (e.persistent === !0 || e.noEscDismiss === !0 ? e.maximized !== !0 && e.noShake !== !0 && U() : (o("escapeKey"), $()));
|
|
878
878
|
}
|
|
879
879
|
function p(y) {
|
|
880
|
-
S !== null && (clearTimeout(S), S = null), (y === !0 || a.value === !0) && (
|
|
880
|
+
S !== null && (clearTimeout(S), S = null), (y === !0 || a.value === !0) && (V(!1), e.seamless !== !0 && (C(!1), Lt(c), It(ue))), y !== !0 && (_ = null);
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function V(y) {
|
|
883
883
|
y === !0 ? f !== !0 && (lt < 1 && document.body.classList.add("q-body--dialog"), lt++, f = !0) : f === !0 && (lt < 2 && document.body.classList.remove("q-body--dialog"), lt--, f = !1);
|
|
884
884
|
}
|
|
885
885
|
function W(y) {
|
|
886
886
|
w !== !0 && ($(y), o("click", y));
|
|
887
887
|
}
|
|
888
888
|
function i(y) {
|
|
889
|
-
e.persistent !== !0 && e.noBackdropDismiss !== !0 ? $(y) : e.noShake !== !0 &&
|
|
889
|
+
e.persistent !== !0 && e.noBackdropDismiss !== !0 ? $(y) : e.noShake !== !0 && U();
|
|
890
890
|
}
|
|
891
891
|
function c(y) {
|
|
892
892
|
e.allowFocusOutside !== !0 && O.value === !0 && Kl(u.value, y.target) !== !0 && Z('[tabindex]:not([tabindex="-1"])');
|
|
@@ -894,10 +894,10 @@ const Oo = {
|
|
|
894
894
|
Object.assign(d.proxy, {
|
|
895
895
|
// expose public methods
|
|
896
896
|
focus: Z,
|
|
897
|
-
shake:
|
|
897
|
+
shake: U,
|
|
898
898
|
// private but needed by QSelect
|
|
899
899
|
__updateRefocusTarget(y) {
|
|
900
|
-
|
|
900
|
+
_ = y || null;
|
|
901
901
|
}
|
|
902
902
|
}), Ve(p);
|
|
903
903
|
function z() {
|
|
@@ -905,7 +905,7 @@ const Oo = {
|
|
|
905
905
|
role: "dialog",
|
|
906
906
|
"aria-modal": X.value === !0 ? "true" : "false",
|
|
907
907
|
...n,
|
|
908
|
-
class:
|
|
908
|
+
class: Q.value
|
|
909
909
|
}, [
|
|
910
910
|
g(gt, {
|
|
911
911
|
name: "q-transition--fade",
|
|
@@ -919,7 +919,7 @@ const Oo = {
|
|
|
919
919
|
}) : null),
|
|
920
920
|
g(
|
|
921
921
|
gt,
|
|
922
|
-
|
|
922
|
+
q.value,
|
|
923
923
|
() => a.value === !0 ? g("div", {
|
|
924
924
|
ref: u,
|
|
925
925
|
class: oe.value,
|
|
@@ -970,7 +970,7 @@ function Me(e, t) {
|
|
|
970
970
|
return e + t;
|
|
971
971
|
}
|
|
972
972
|
function vt(e, t, o, n, d, u, a, b) {
|
|
973
|
-
const S = e === window ? document.scrollingElement || document.documentElement : e,
|
|
973
|
+
const S = e === window ? document.scrollingElement || document.documentElement : e, _ = d === !0 ? "offsetWidth" : "offsetHeight", f = {
|
|
974
974
|
scrollStart: 0,
|
|
975
975
|
scrollViewSize: -a - b,
|
|
976
976
|
scrollMaxSize: 0,
|
|
@@ -979,13 +979,13 @@ function vt(e, t, o, n, d, u, a, b) {
|
|
|
979
979
|
};
|
|
980
980
|
if (d === !0 ? (e === window ? (f.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, f.scrollViewSize += document.documentElement.clientWidth) : (f.scrollStart = S.scrollLeft, f.scrollViewSize += S.clientWidth), f.scrollMaxSize = S.scrollWidth, u === !0 && (f.scrollStart = (ot === !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 = S.scrollTop, f.scrollViewSize += S.clientHeight), f.scrollMaxSize = S.scrollHeight), o !== null)
|
|
981
981
|
for (let w = o.previousElementSibling; w !== null; w = w.previousElementSibling)
|
|
982
|
-
w.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetStart += w[
|
|
982
|
+
w.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetStart += w[_]);
|
|
983
983
|
if (n !== null)
|
|
984
984
|
for (let w = n.nextElementSibling; w !== null; w = w.nextElementSibling)
|
|
985
|
-
w.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetEnd += w[
|
|
985
|
+
w.classList.contains("q-virtual-scroll--skip") === !1 && (f.offsetEnd += w[_]);
|
|
986
986
|
if (t !== e) {
|
|
987
|
-
const w = S.getBoundingClientRect(),
|
|
988
|
-
d === !0 ? (f.offsetStart +=
|
|
987
|
+
const w = S.getBoundingClientRect(), k = t.getBoundingClientRect();
|
|
988
|
+
d === !0 ? (f.offsetStart += k.left - w.left, f.offsetEnd -= k.width) : (f.offsetStart += k.top - w.top, f.offsetEnd -= k.height), e !== window && (f.offsetStart += f.scrollStart), f.offsetEnd += f.scrollMaxSize - f.offsetStart;
|
|
989
989
|
}
|
|
990
990
|
return f;
|
|
991
991
|
}
|
|
@@ -1038,14 +1038,14 @@ function Po({
|
|
|
1038
1038
|
// optional
|
|
1039
1039
|
}) {
|
|
1040
1040
|
const d = re(), { props: u, emit: a, proxy: b } = d, { $q: S } = b;
|
|
1041
|
-
let
|
|
1042
|
-
const T = M(0), h = M(0), m = M({}),
|
|
1041
|
+
let _, f, w, k = [], C;
|
|
1042
|
+
const T = M(0), h = M(0), m = M({}), q = M(null), D = M(null), B = M(null), I = M({ from: 0, to: 0 }), Y = r(() => u.tableColspan !== void 0 ? u.tableColspan : 100);
|
|
1043
1043
|
n === void 0 && (n = r(() => u.virtualScrollItemSize));
|
|
1044
1044
|
const O = r(() => n.value + ";" + u.virtualScrollHorizontal), P = r(
|
|
1045
1045
|
() => O.value + ";" + u.virtualScrollSliceRatioBefore + ";" + u.virtualScrollSliceRatioAfter
|
|
1046
1046
|
);
|
|
1047
1047
|
J(P, () => {
|
|
1048
|
-
|
|
1048
|
+
U();
|
|
1049
1049
|
}), J(O, $);
|
|
1050
1050
|
function $() {
|
|
1051
1051
|
Z(f, !0);
|
|
@@ -1059,14 +1059,14 @@ function Po({
|
|
|
1059
1059
|
const y = vt(
|
|
1060
1060
|
z,
|
|
1061
1061
|
o(),
|
|
1062
|
-
|
|
1062
|
+
q.value,
|
|
1063
1063
|
D.value,
|
|
1064
1064
|
u.virtualScrollHorizontal,
|
|
1065
1065
|
S.lang.rtl,
|
|
1066
1066
|
u.virtualScrollStickySizeStart,
|
|
1067
1067
|
u.virtualScrollStickySizeEnd
|
|
1068
1068
|
);
|
|
1069
|
-
w !== y.scrollViewSize &&
|
|
1069
|
+
w !== y.scrollViewSize && U(y.scrollViewSize), Q(
|
|
1070
1070
|
z,
|
|
1071
1071
|
y,
|
|
1072
1072
|
Math.min(e.value - 1, Math.max(0, parseInt(i, 10) || 0)),
|
|
@@ -1080,26 +1080,26 @@ function Po({
|
|
|
1080
1080
|
const c = vt(
|
|
1081
1081
|
i,
|
|
1082
1082
|
o(),
|
|
1083
|
-
|
|
1083
|
+
q.value,
|
|
1084
1084
|
D.value,
|
|
1085
1085
|
u.virtualScrollHorizontal,
|
|
1086
1086
|
S.lang.rtl,
|
|
1087
1087
|
u.virtualScrollStickySizeStart,
|
|
1088
1088
|
u.virtualScrollStickySizeEnd
|
|
1089
1089
|
), z = e.value - 1, y = c.scrollMaxSize - c.offsetStart - c.offsetEnd - h.value;
|
|
1090
|
-
if (
|
|
1090
|
+
if (_ === c.scrollStart) return;
|
|
1091
1091
|
if (c.scrollMaxSize <= 0) {
|
|
1092
|
-
|
|
1092
|
+
Q(i, c, 0, 0);
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
w !== c.scrollViewSize &&
|
|
1095
|
+
w !== c.scrollViewSize && U(c.scrollViewSize), se(I.value.from);
|
|
1096
1096
|
const E = Math.floor(c.scrollMaxSize - Math.max(c.scrollViewSize, c.offsetEnd) - Math.min(C[z], c.scrollViewSize / 2));
|
|
1097
1097
|
if (E > 0 && Math.ceil(c.scrollStart) >= E) {
|
|
1098
|
-
|
|
1098
|
+
Q(
|
|
1099
1099
|
i,
|
|
1100
1100
|
c,
|
|
1101
1101
|
z,
|
|
1102
|
-
c.scrollMaxSize - c.offsetEnd -
|
|
1102
|
+
c.scrollMaxSize - c.offsetEnd - k.reduce(Me, 0)
|
|
1103
1103
|
);
|
|
1104
1104
|
return;
|
|
1105
1105
|
}
|
|
@@ -1107,22 +1107,22 @@ function Po({
|
|
|
1107
1107
|
if (A <= y && A + c.scrollViewSize >= T.value)
|
|
1108
1108
|
A -= T.value, R = I.value.from, j = A;
|
|
1109
1109
|
else
|
|
1110
|
-
for (let
|
|
1111
|
-
A -=
|
|
1110
|
+
for (let x = 0; A >= k[x] && R < z; x++)
|
|
1111
|
+
A -= k[x], R += le;
|
|
1112
1112
|
for (; A > 0 && R < z; )
|
|
1113
1113
|
A -= C[R], A > -c.scrollViewSize ? (R++, j = A) : j = C[R] + A;
|
|
1114
|
-
|
|
1114
|
+
Q(
|
|
1115
1115
|
i,
|
|
1116
1116
|
c,
|
|
1117
1117
|
R,
|
|
1118
1118
|
j
|
|
1119
1119
|
);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function Q(i, c, z, y, E) {
|
|
1122
1122
|
const R = typeof E == "string" && E.indexOf("-force") !== -1, A = R === !0 ? E.replace("-force", "") : E, j = A !== void 0 ? A : "start";
|
|
1123
|
-
let
|
|
1124
|
-
G > e.value && (G = e.value,
|
|
1125
|
-
const me =
|
|
1123
|
+
let x = Math.max(0, z - m.value[j]), G = x + m.value.total;
|
|
1124
|
+
G > e.value && (G = e.value, x = Math.max(0, G - m.value.total)), _ = c.scrollStart;
|
|
1125
|
+
const me = x !== I.value.from || G !== I.value.to;
|
|
1126
1126
|
if (me === !1 && A === void 0) {
|
|
1127
1127
|
p(z);
|
|
1128
1128
|
return;
|
|
@@ -1130,24 +1130,24 @@ function Po({
|
|
|
1130
1130
|
const { activeElement: je } = document, te = B.value;
|
|
1131
1131
|
me === !0 && te !== null && te !== je && te.contains(je) === !0 && (te.addEventListener("focusout", ve), setTimeout(() => {
|
|
1132
1132
|
te == null || te.removeEventListener("focusout", ve);
|
|
1133
|
-
})), Lo(te, z -
|
|
1134
|
-
const Ke = A !== void 0 ? C.slice(
|
|
1133
|
+
})), Lo(te, z - x);
|
|
1134
|
+
const Ke = A !== void 0 ? C.slice(x, z).reduce(Me, 0) : 0;
|
|
1135
1135
|
if (me === !0) {
|
|
1136
|
-
const pe = G >= I.value.from &&
|
|
1137
|
-
I.value = { from:
|
|
1138
|
-
I.value.to !== G &&
|
|
1136
|
+
const pe = G >= I.value.from && x <= I.value.to ? I.value.to : G;
|
|
1137
|
+
I.value = { from: x, to: pe }, T.value = $e(k, C, 0, x), h.value = $e(k, C, G, e.value), requestAnimationFrame(() => {
|
|
1138
|
+
I.value.to !== G && _ === c.scrollStart && (I.value = { from: I.value.from, to: G }, h.value = $e(k, C, G, e.value));
|
|
1139
1139
|
});
|
|
1140
1140
|
}
|
|
1141
1141
|
requestAnimationFrame(() => {
|
|
1142
|
-
if (
|
|
1143
|
-
me === !0 && se(
|
|
1144
|
-
const pe = C.slice(
|
|
1142
|
+
if (_ !== c.scrollStart) return;
|
|
1143
|
+
me === !0 && se(x);
|
|
1144
|
+
const pe = C.slice(x, z).reduce(Me, 0), be = pe + c.offsetStart + T.value, Ne = be + C[z];
|
|
1145
1145
|
let Ie = be + y;
|
|
1146
1146
|
if (A !== void 0) {
|
|
1147
1147
|
const nt = pe - Ke, Le = c.scrollStart + nt;
|
|
1148
1148
|
Ie = R !== !0 && Le < be && Ne < Le + c.scrollViewSize ? Le : A === "end" ? Ne - c.scrollViewSize : be - (A === "start" ? 0 : Math.round((c.scrollViewSize - C[z]) / 2));
|
|
1149
1149
|
}
|
|
1150
|
-
|
|
1150
|
+
_ = Ie, Yt(
|
|
1151
1151
|
i,
|
|
1152
1152
|
Ie,
|
|
1153
1153
|
u.virtualScrollHorizontal,
|
|
@@ -1160,13 +1160,13 @@ function Po({
|
|
|
1160
1160
|
if (c) {
|
|
1161
1161
|
const z = cl.call(
|
|
1162
1162
|
c.children,
|
|
1163
|
-
(
|
|
1164
|
-
), y = z.length, E = u.virtualScrollHorizontal === !0 ? (
|
|
1163
|
+
(x) => x.classList && x.classList.contains("q-virtual-scroll--skip") === !1
|
|
1164
|
+
), y = z.length, E = u.virtualScrollHorizontal === !0 ? (x) => x.getBoundingClientRect().width : (x) => x.offsetHeight;
|
|
1165
1165
|
let R = i, A, j;
|
|
1166
|
-
for (let
|
|
1167
|
-
for (A = E(z[
|
|
1168
|
-
A += E(z[
|
|
1169
|
-
j = A - C[R], j !== 0 && (C[R] += j,
|
|
1166
|
+
for (let x = 0; x < y; ) {
|
|
1167
|
+
for (A = E(z[x]), x++; x < y && z[x].classList.contains("q-virtual-scroll--with-prev") === !0; )
|
|
1168
|
+
A += E(z[x]), x++;
|
|
1169
|
+
j = A - C[R], j !== 0 && (C[R] += j, k[Math.floor(R / le)] += j), R++;
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
@@ -1182,25 +1182,25 @@ function Po({
|
|
|
1182
1182
|
for (let R = e.value - 1; R >= y; R--)
|
|
1183
1183
|
C[R] = z;
|
|
1184
1184
|
const E = Math.floor((e.value - 1) / le);
|
|
1185
|
-
|
|
1185
|
+
k = [];
|
|
1186
1186
|
for (let R = 0; R <= E; R++) {
|
|
1187
1187
|
let A = 0;
|
|
1188
1188
|
const j = Math.min((R + 1) * le, e.value);
|
|
1189
|
-
for (let
|
|
1190
|
-
A += C[
|
|
1191
|
-
|
|
1189
|
+
for (let x = R * le; x < j; x++)
|
|
1190
|
+
A += C[x];
|
|
1191
|
+
k.push(A);
|
|
1192
1192
|
}
|
|
1193
|
-
f = -1,
|
|
1193
|
+
f = -1, _ = void 0, T.value = $e(k, C, 0, I.value.from), h.value = $e(k, C, I.value.to, e.value), i >= 0 ? (se(I.value.from), fe(() => {
|
|
1194
1194
|
X(i);
|
|
1195
|
-
})) :
|
|
1195
|
+
})) : V();
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function U(i) {
|
|
1198
1198
|
if (i === void 0 && typeof window < "u") {
|
|
1199
1199
|
const A = t();
|
|
1200
1200
|
A != null && A.nodeType !== 8 && (i = vt(
|
|
1201
1201
|
A,
|
|
1202
1202
|
o(),
|
|
1203
|
-
|
|
1203
|
+
q.value,
|
|
1204
1204
|
D.value,
|
|
1205
1205
|
u.virtualScrollHorizontal,
|
|
1206
1206
|
S.lang.rtl,
|
|
@@ -1230,7 +1230,7 @@ function Po({
|
|
|
1230
1230
|
i === "tbody" ? g(i, {
|
|
1231
1231
|
class: "q-virtual-scroll__padding",
|
|
1232
1232
|
key: "before",
|
|
1233
|
-
ref:
|
|
1233
|
+
ref: q
|
|
1234
1234
|
}, [
|
|
1235
1235
|
g("tr", [
|
|
1236
1236
|
g("td", {
|
|
@@ -1241,7 +1241,7 @@ function Po({
|
|
|
1241
1241
|
]) : g(i, {
|
|
1242
1242
|
class: "q-virtual-scroll__padding",
|
|
1243
1243
|
key: "before",
|
|
1244
|
-
ref:
|
|
1244
|
+
ref: q,
|
|
1245
1245
|
style: { [z]: `${T.value}px`, ...y }
|
|
1246
1246
|
}),
|
|
1247
1247
|
g(i, {
|
|
@@ -1278,13 +1278,13 @@ function Po({
|
|
|
1278
1278
|
ref: b
|
|
1279
1279
|
}), f = i);
|
|
1280
1280
|
}
|
|
1281
|
-
|
|
1282
|
-
const
|
|
1281
|
+
U();
|
|
1282
|
+
const V = il(
|
|
1283
1283
|
ne,
|
|
1284
1284
|
S.platform.is.ios === !0 ? 120 : 35
|
|
1285
1285
|
);
|
|
1286
1286
|
Al(() => {
|
|
1287
|
-
|
|
1287
|
+
U();
|
|
1288
1288
|
});
|
|
1289
1289
|
let W = !1;
|
|
1290
1290
|
return ll(() => {
|
|
@@ -1292,19 +1292,19 @@ function Po({
|
|
|
1292
1292
|
}), ol(() => {
|
|
1293
1293
|
if (W !== !0) return;
|
|
1294
1294
|
const i = t();
|
|
1295
|
-
|
|
1295
|
+
_ !== void 0 && i !== void 0 && i !== null && i.nodeType !== 8 ? Yt(
|
|
1296
1296
|
i,
|
|
1297
|
-
|
|
1297
|
+
_,
|
|
1298
1298
|
u.virtualScrollHorizontal,
|
|
1299
1299
|
S.lang.rtl
|
|
1300
1300
|
) : X(f);
|
|
1301
1301
|
}), Ve(() => {
|
|
1302
|
-
|
|
1302
|
+
V.cancel();
|
|
1303
1303
|
}), Object.assign(b, { scrollTo: X, reset: $, refresh: oe }), {
|
|
1304
1304
|
virtualScrollSliceRange: I,
|
|
1305
1305
|
virtualScrollSliceSizeComputed: m,
|
|
1306
|
-
setVirtualScrollSize:
|
|
1307
|
-
onVirtualScrollEvt:
|
|
1306
|
+
setVirtualScrollSize: U,
|
|
1307
|
+
onVirtualScrollEvt: V,
|
|
1308
1308
|
localResetVirtualScroll: Z,
|
|
1309
1309
|
padVirtualScroll: ue,
|
|
1310
1310
|
scrollTo: X,
|
|
@@ -1396,7 +1396,7 @@ function Jt(e, t, o) {
|
|
|
1396
1396
|
let d = t + (e - t) % n;
|
|
1397
1397
|
return d < t && (d = n + d), d === 0 ? 0 : d;
|
|
1398
1398
|
}
|
|
1399
|
-
const Gt = (e) => ["add", "add-unique", "toggle"].includes(e),
|
|
1399
|
+
const Gt = (e) => ["add", "add-unique", "toggle"].includes(e), Uo = ".*+?^${}()|[]\\", Qo = Object.keys(St);
|
|
1400
1400
|
function mt(e, t) {
|
|
1401
1401
|
if (typeof e == "function") return e;
|
|
1402
1402
|
const o = e !== void 0 ? e : t;
|
|
@@ -1407,7 +1407,7 @@ const Wo = xe({
|
|
|
1407
1407
|
inheritAttrs: !1,
|
|
1408
1408
|
props: {
|
|
1409
1409
|
...Zt,
|
|
1410
|
-
...
|
|
1410
|
+
...Ul,
|
|
1411
1411
|
...St,
|
|
1412
1412
|
// override of useFieldProps > modelValue
|
|
1413
1413
|
modelValue: {
|
|
@@ -1489,18 +1489,18 @@ const Wo = xe({
|
|
|
1489
1489
|
"filterAbort"
|
|
1490
1490
|
],
|
|
1491
1491
|
setup(e, { slots: t, emit: o }) {
|
|
1492
|
-
const { proxy: n } = re(), { $q: d } = n, u = M(!1), a = M(!1), b = M(-1), S = M(""),
|
|
1493
|
-
let w = null,
|
|
1494
|
-
const Y = M(null), O = M(null), P = M(null), $ = M(null), oe = M(null), X =
|
|
1492
|
+
const { proxy: n } = re(), { $q: d } = n, u = M(!1), a = M(!1), b = M(-1), S = M(""), _ = M(!1), f = M(!1);
|
|
1493
|
+
let w = null, k = null, C, T, h, m = null, q, D, B, I;
|
|
1494
|
+
const Y = M(null), O = M(null), P = M(null), $ = M(null), oe = M(null), X = Ql(e), ne = No(Bt), Q = r(() => Array.isArray(e.options) ? e.options.length : 0), se = r(() => e.virtualScrollItemSize === void 0 ? e.optionsDense === !0 ? 24 : 48 : e.virtualScrollItemSize), {
|
|
1495
1495
|
virtualScrollSliceRange: ve,
|
|
1496
1496
|
virtualScrollSliceSizeComputed: Z,
|
|
1497
|
-
localResetVirtualScroll:
|
|
1497
|
+
localResetVirtualScroll: U,
|
|
1498
1498
|
padVirtualScroll: ue,
|
|
1499
1499
|
onVirtualScrollEvt: p,
|
|
1500
|
-
scrollTo:
|
|
1500
|
+
scrollTo: V,
|
|
1501
1501
|
setVirtualScrollSize: W
|
|
1502
1502
|
} = Po({
|
|
1503
|
-
virtualScrollLength:
|
|
1503
|
+
virtualScrollLength: Q,
|
|
1504
1504
|
getVirtualScrollTarget: ml,
|
|
1505
1505
|
getVirtualScrollEl: _t,
|
|
1506
1506
|
virtualScrollItemSizeComputed: se
|
|
@@ -1513,7 +1513,7 @@ const Wo = xe({
|
|
|
1513
1513
|
return s;
|
|
1514
1514
|
}), z = r(() => {
|
|
1515
1515
|
const l = {};
|
|
1516
|
-
return
|
|
1516
|
+
return Qo.forEach((s) => {
|
|
1517
1517
|
const v = e[s];
|
|
1518
1518
|
v !== void 0 && (l[s] = v);
|
|
1519
1519
|
}), l;
|
|
@@ -1522,9 +1522,9 @@ const Wo = xe({
|
|
|
1522
1522
|
return e.hideSelected === !0 || c.value.length === 0 ? [l, e.inputClass] : (l += " q-field__input--padding", e.inputClass === void 0 ? l : [l, e.inputClass]);
|
|
1523
1523
|
}), A = r(
|
|
1524
1524
|
() => (e.virtualScrollHorizontal === !0 ? "q-virtual-scroll--horizontal" : "") + (e.popupContentClass ? " " + e.popupContentClass : "")
|
|
1525
|
-
), j = r(() =>
|
|
1525
|
+
), j = r(() => Q.value === 0), x = r(
|
|
1526
1526
|
() => c.value.map((l) => ee.value(l)).join(", ")
|
|
1527
|
-
), G = r(() => e.displayValue !== void 0 ? e.displayValue :
|
|
1527
|
+
), G = r(() => e.displayValue !== void 0 ? e.displayValue : x.value), me = r(() => e.optionsHtml === !0 ? () => !0 : (l) => (l == null ? void 0 : l.html) === !0), je = r(() => e.displayValueHtml === !0 || e.displayValue === void 0 && (e.optionsHtml === !0 || c.value.some(me.value))), te = r(() => i.focused.value === !0 ? e.tabindex : -1), Ke = r(() => {
|
|
1528
1528
|
const l = {
|
|
1529
1529
|
tabindex: e.tabindex,
|
|
1530
1530
|
role: "combobox",
|
|
@@ -1548,7 +1548,7 @@ const Wo = xe({
|
|
|
1548
1548
|
toggleOption: Se,
|
|
1549
1549
|
tabindex: te.value
|
|
1550
1550
|
}))), Ne = r(() => {
|
|
1551
|
-
if (
|
|
1551
|
+
if (Q.value === 0)
|
|
1552
1552
|
return [];
|
|
1553
1553
|
const { from: l, to: s } = ve.value;
|
|
1554
1554
|
return e.options.slice(l, s).map((v, F) => {
|
|
@@ -1585,7 +1585,7 @@ const Wo = xe({
|
|
|
1585
1585
|
});
|
|
1586
1586
|
}), Ie = r(() => e.dropdownIcon !== void 0 ? e.dropdownIcon : d.iconSet.arrow.dropdown), nt = r(
|
|
1587
1587
|
() => e.optionsCover === !1 && e.outlined !== !0 && e.standout !== !0 && e.borderless !== !0 && e.rounded !== !0
|
|
1588
|
-
), Le = r(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), ie = r(() => mt(e.optionValue, "value")), ee = r(() => mt(e.optionLabel, "label")), _e = r(() => mt(e.optionDisable, "disable")),
|
|
1588
|
+
), Le = r(() => e.optionsSelectedClass !== void 0 ? e.optionsSelectedClass : e.color !== void 0 ? `text-${e.color}` : ""), ie = r(() => mt(e.optionValue, "value")), ee = r(() => mt(e.optionLabel, "label")), _e = r(() => mt(e.optionDisable, "disable")), Ue = r(() => c.value.map(ie.value)), dl = r(() => {
|
|
1589
1589
|
const l = {
|
|
1590
1590
|
onInput: Bt,
|
|
1591
1591
|
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
|
@@ -1605,7 +1605,7 @@ const Wo = xe({
|
|
|
1605
1605
|
});
|
|
1606
1606
|
J(c, (l) => {
|
|
1607
1607
|
C = l, e.useInput === !0 && e.fillInput === !0 && e.multiple !== !0 && i.innerLoading.value !== !0 && (a.value !== !0 && u.value !== !0 || E.value !== !0) && (h !== !0 && Re(), (a.value === !0 || u.value === !0) && Be(""));
|
|
1608
|
-
}, { immediate: !0 }), J(() => e.fillInput, Re), J(u, at), J(
|
|
1608
|
+
}, { immediate: !0 }), J(() => e.fillInput, Re), J(u, at), J(Q, xl);
|
|
1609
1609
|
function yt(l) {
|
|
1610
1610
|
return e.emitValue === !0 ? ie.value(l) : l;
|
|
1611
1611
|
}
|
|
@@ -1650,12 +1650,12 @@ const Wo = xe({
|
|
|
1650
1650
|
), ye()), (K = O.value) == null || K.focus(), (c.value.length === 0 || he(ie.value(c.value[0]), v) !== !0) && o("update:modelValue", e.emitValue === !0 ? v : l);
|
|
1651
1651
|
return;
|
|
1652
1652
|
}
|
|
1653
|
-
if ((T !== !0 ||
|
|
1653
|
+
if ((T !== !0 || _.value === !0) && i.focus(), Ct(), c.value.length === 0) {
|
|
1654
1654
|
const H = e.emitValue === !0 ? v : l;
|
|
1655
1655
|
o("add", { index: 0, value: H }), o("update:modelValue", e.multiple === !0 ? [H] : H);
|
|
1656
1656
|
return;
|
|
1657
1657
|
}
|
|
1658
|
-
const F = e.modelValue.slice(), L =
|
|
1658
|
+
const F = e.modelValue.slice(), L = Ue.value.findIndex((H) => he(H, v));
|
|
1659
1659
|
if (L !== -1)
|
|
1660
1660
|
o("remove", { index: L, value: F.splice(L, 1)[0] });
|
|
1661
1661
|
else {
|
|
@@ -1667,21 +1667,21 @@ const Wo = xe({
|
|
|
1667
1667
|
}
|
|
1668
1668
|
function Ae(l) {
|
|
1669
1669
|
if (d.platform.is.desktop !== !0) return;
|
|
1670
|
-
const s = l !== -1 && l <
|
|
1670
|
+
const s = l !== -1 && l < Q.value ? l : -1;
|
|
1671
1671
|
b.value !== s && (b.value = s);
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1673
|
+
function Qe(l = 1, s) {
|
|
1674
1674
|
if (u.value === !0) {
|
|
1675
1675
|
let v = b.value;
|
|
1676
1676
|
do
|
|
1677
1677
|
v = Jt(
|
|
1678
1678
|
v + l,
|
|
1679
1679
|
-1,
|
|
1680
|
-
|
|
1680
|
+
Q.value - 1
|
|
1681
1681
|
);
|
|
1682
1682
|
while (v !== -1 && v !== b.value && _e.value(e.options[v]) === !0);
|
|
1683
|
-
b.value !== v && (Ae(v),
|
|
1684
|
-
v >= 0 ? ee.value(e.options[v]) :
|
|
1683
|
+
b.value !== v && (Ae(v), V(v), s !== !0 && e.useInput === !0 && e.fillInput === !0 && We(
|
|
1684
|
+
v >= 0 ? ee.value(e.options[v]) : q,
|
|
1685
1685
|
!0
|
|
1686
1686
|
));
|
|
1687
1687
|
}
|
|
@@ -1692,10 +1692,10 @@ const Wo = xe({
|
|
|
1692
1692
|
}
|
|
1693
1693
|
function it(l) {
|
|
1694
1694
|
const s = ie.value(l);
|
|
1695
|
-
return
|
|
1695
|
+
return Ue.value.find((v) => he(v, s)) !== void 0;
|
|
1696
1696
|
}
|
|
1697
1697
|
function Ct(l) {
|
|
1698
|
-
e.useInput === !0 && O.value !== null && (l === void 0 || O.value === l.target && l.target.value ===
|
|
1698
|
+
e.useInput === !0 && O.value !== null && (l === void 0 || O.value === l.target && l.target.value === x.value) && O.value.select();
|
|
1699
1699
|
}
|
|
1700
1700
|
function qt(l) {
|
|
1701
1701
|
nl(l, 27) === !0 && u.value === !0 && (Te(l), ye(), Re()), o("keyup", l);
|
|
@@ -1706,7 +1706,7 @@ const Wo = xe({
|
|
|
1706
1706
|
qt(l);
|
|
1707
1707
|
return;
|
|
1708
1708
|
}
|
|
1709
|
-
if (l.target.value = "", w !== null && (clearTimeout(w), w = null),
|
|
1709
|
+
if (l.target.value = "", w !== null && (clearTimeout(w), w = null), k !== null && (clearTimeout(k), k = null), Re(), typeof s == "string" && s.length !== 0) {
|
|
1710
1710
|
const v = s.toLocaleLowerCase(), F = (K) => {
|
|
1711
1711
|
const H = e.options.find((N) => String(K.value(N)).toLocaleLowerCase() === v);
|
|
1712
1712
|
return H === void 0 ? !1 : (c.value.indexOf(H) === -1 ? Se(H) : ye(), !0);
|
|
@@ -1740,26 +1740,26 @@ const Wo = xe({
|
|
|
1740
1740
|
e.multiple === !0 && Array.isArray(e.modelValue) === !0 ? ut(e.modelValue.length - 1) : e.multiple !== !0 && e.modelValue !== null && o("update:modelValue", null);
|
|
1741
1741
|
return;
|
|
1742
1742
|
}
|
|
1743
|
-
(l.keyCode === 35 || l.keyCode === 36) && (typeof S.value != "string" || S.value.length === 0) && (ae(l), b.value = -1,
|
|
1743
|
+
(l.keyCode === 35 || l.keyCode === 36) && (typeof S.value != "string" || S.value.length === 0) && (ae(l), b.value = -1, Qe(l.keyCode === 36 ? 1 : -1, e.multiple)), (l.keyCode === 33 || l.keyCode === 34) && Z.value !== void 0 && (ae(l), b.value = Math.max(
|
|
1744
1744
|
-1,
|
|
1745
1745
|
Math.min(
|
|
1746
|
-
|
|
1746
|
+
Q.value,
|
|
1747
1747
|
b.value + (l.keyCode === 33 ? -1 : 1) * Z.value.view
|
|
1748
1748
|
)
|
|
1749
|
-
),
|
|
1750
|
-
const F =
|
|
1749
|
+
), Qe(l.keyCode === 33 ? 1 : -1, e.multiple)), (l.keyCode === 38 || l.keyCode === 40) && (ae(l), Qe(l.keyCode === 38 ? -1 : 1, e.multiple));
|
|
1750
|
+
const F = Q.value;
|
|
1751
1751
|
if ((B === void 0 || I < Date.now()) && (B = ""), F > 0 && e.useInput !== !0 && l.key !== void 0 && l.key.length === 1 && l.altKey === !1 && l.ctrlKey === !1 && l.metaKey === !1 && (l.keyCode !== 32 || B.length !== 0)) {
|
|
1752
1752
|
u.value !== !0 && Ee(l);
|
|
1753
1753
|
const L = l.key.toLocaleLowerCase(), K = B.length === 1 && B[0] === L;
|
|
1754
1754
|
I = Date.now() + 1500, K === !1 && (ae(l), B += L);
|
|
1755
|
-
const H = new RegExp("^" + B.split("").map((Fe) =>
|
|
1755
|
+
const H = new RegExp("^" + B.split("").map((Fe) => Uo.indexOf(Fe) !== -1 ? "\\" + Fe : Fe).join(".*"), "i");
|
|
1756
1756
|
let N = b.value;
|
|
1757
1757
|
if (K === !0 || N < 0 || H.test(ee.value(e.options[N])) !== !0)
|
|
1758
1758
|
do
|
|
1759
1759
|
N = Jt(N + 1, -1, F - 1);
|
|
1760
1760
|
while (N !== b.value && (_e.value(e.options[N]) === !0 || H.test(ee.value(e.options[N])) !== !0));
|
|
1761
1761
|
b.value !== N && fe(() => {
|
|
1762
|
-
Ae(N),
|
|
1762
|
+
Ae(N), V(N), N >= 0 && e.useInput === !0 && e.fillInput === !0 && We(ee.value(e.options[N]), !0);
|
|
1763
1763
|
});
|
|
1764
1764
|
return;
|
|
1765
1765
|
}
|
|
@@ -1848,17 +1848,17 @@ const Wo = xe({
|
|
|
1848
1848
|
return l !== !0 && T === !0 && (Array.isArray(F.class) === !0 ? F.class = [...F.class, "no-pointer-events"] : F.class += " no-pointer-events"), g("input", F);
|
|
1849
1849
|
}
|
|
1850
1850
|
function Bt(l) {
|
|
1851
|
-
w !== null && (clearTimeout(w), w = null),
|
|
1851
|
+
w !== null && (clearTimeout(w), w = null), k !== null && (clearTimeout(k), k = null), !(l && l.target && l.target.qComposing === !0) && (We(l.target.value || ""), h = !0, q = S.value, i.focused.value !== !0 && (T !== !0 || _.value === !0) && i.focus(), e.onFilter !== void 0 && (w = setTimeout(() => {
|
|
1852
1852
|
w = null, Be(S.value);
|
|
1853
1853
|
}, e.inputDebounce)));
|
|
1854
1854
|
}
|
|
1855
1855
|
function We(l, s) {
|
|
1856
|
-
S.value !== l && (S.value = l, s === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? o("inputValue", l) :
|
|
1857
|
-
|
|
1856
|
+
S.value !== l && (S.value = l, s === !0 || e.inputDebounce === 0 || e.inputDebounce === "0" ? o("inputValue", l) : k = setTimeout(() => {
|
|
1857
|
+
k = null, o("inputValue", l);
|
|
1858
1858
|
}, e.inputDebounce));
|
|
1859
1859
|
}
|
|
1860
1860
|
function He(l, s, v) {
|
|
1861
|
-
h = v !== !0, e.useInput === !0 && (We(l, !0), (s === !0 || v !== !0) && (
|
|
1861
|
+
h = v !== !0, e.useInput === !0 && (We(l, !0), (s === !0 || v !== !0) && (q = l), s !== !0 && Be(l));
|
|
1862
1862
|
}
|
|
1863
1863
|
function Be(l, s, v) {
|
|
1864
1864
|
if (e.onFilter === void 0 || s !== !0 && i.focused.value !== !0) return;
|
|
@@ -1919,11 +1919,11 @@ const Wo = xe({
|
|
|
1919
1919
|
}
|
|
1920
1920
|
function yl(l) {
|
|
1921
1921
|
var s;
|
|
1922
|
-
Te(l), (s = O.value) == null || s.focus(),
|
|
1922
|
+
Te(l), (s = O.value) == null || s.focus(), _.value = !0, window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0);
|
|
1923
1923
|
}
|
|
1924
1924
|
function wl(l) {
|
|
1925
1925
|
Te(l), fe(() => {
|
|
1926
|
-
|
|
1926
|
+
_.value = !1;
|
|
1927
1927
|
});
|
|
1928
1928
|
}
|
|
1929
1929
|
function Cl() {
|
|
@@ -1970,7 +1970,7 @@ const Wo = xe({
|
|
|
1970
1970
|
onHide: kl,
|
|
1971
1971
|
onShow: Vl
|
|
1972
1972
|
}, () => g("div", {
|
|
1973
|
-
class: "q-select__dialog" + (y.value === !0 ? " q-select__dialog--dark q-dark" : "") + (
|
|
1973
|
+
class: "q-select__dialog" + (y.value === !0 ? " q-select__dialog--dark q-dark" : "") + (_.value === !0 ? " q-select__dialog--focused" : "")
|
|
1974
1974
|
}, l));
|
|
1975
1975
|
}
|
|
1976
1976
|
function ql(l) {
|
|
@@ -2010,13 +2010,13 @@ const Wo = xe({
|
|
|
2010
2010
|
const v = ie.value(c.value[0]);
|
|
2011
2011
|
s = e.options.findIndex((F) => he(ie.value(F), v));
|
|
2012
2012
|
}
|
|
2013
|
-
|
|
2013
|
+
U(s);
|
|
2014
2014
|
}
|
|
2015
2015
|
Ae(s);
|
|
2016
2016
|
}
|
|
2017
2017
|
function xl(l, s) {
|
|
2018
|
-
u.value === !0 && i.innerLoading.value === !1 && (
|
|
2019
|
-
u.value === !0 && i.innerLoading.value === !1 && (l > s ?
|
|
2018
|
+
u.value === !0 && i.innerLoading.value === !1 && (U(-1, !0), fe(() => {
|
|
2019
|
+
u.value === !0 && i.innerLoading.value === !1 && (l > s ? U() : at(!0));
|
|
2020
2020
|
}));
|
|
2021
2021
|
}
|
|
2022
2022
|
function zt() {
|
|
@@ -2032,7 +2032,7 @@ const Wo = xe({
|
|
|
2032
2032
|
T = d.platform.is.mobile !== !0 && e.behavior !== "dialog" ? !1 : e.behavior !== "menu" && (e.useInput === !0 ? t["no-option"] !== void 0 || e.onFilter !== void 0 || j.value === !1 : !0), D = d.platform.is.ios === !0 && T === !0 && e.useInput === !0 ? "fade" : e.transitionShow;
|
|
2033
2033
|
}
|
|
2034
2034
|
return el(Ft), Bl(zt), Ft(), Ve(() => {
|
|
2035
|
-
w !== null && clearTimeout(w),
|
|
2035
|
+
w !== null && clearTimeout(w), k !== null && clearTimeout(k);
|
|
2036
2036
|
}), Object.assign(n, {
|
|
2037
2037
|
showPopup: Ee,
|
|
2038
2038
|
hidePopup: ye,
|
|
@@ -2041,7 +2041,7 @@ const Wo = xe({
|
|
|
2041
2041
|
toggleOption: Se,
|
|
2042
2042
|
getOptionIndex: () => b.value,
|
|
2043
2043
|
setOptionIndex: Ae,
|
|
2044
|
-
moveOptionSelection:
|
|
2044
|
+
moveOptionSelection: Qe,
|
|
2045
2045
|
filter: Be,
|
|
2046
2046
|
updateMenuPosition: zt,
|
|
2047
2047
|
updateInputValue: He,
|
|
@@ -2114,8 +2114,8 @@ const Wo = xe({
|
|
|
2114
2114
|
})
|
|
2115
2115
|
);
|
|
2116
2116
|
}
|
|
2117
|
-
if (X.value !== void 0 && e.disable !== !0 &&
|
|
2118
|
-
const L =
|
|
2117
|
+
if (X.value !== void 0 && e.disable !== !0 && Ue.value.length !== 0) {
|
|
2118
|
+
const L = Ue.value.map((K) => g("option", { value: K, selected: !0 }));
|
|
2119
2119
|
s.push(
|
|
2120
2120
|
g("select", {
|
|
2121
2121
|
class: "hidden",
|
|
@@ -2181,7 +2181,7 @@ const Wo = xe({
|
|
|
2181
2181
|
return;
|
|
2182
2182
|
}
|
|
2183
2183
|
if (o.multiple && Array.isArray(h)) {
|
|
2184
|
-
const m = h.map((
|
|
2184
|
+
const m = h.map((q) => q.value);
|
|
2185
2185
|
n("update:modelValue", m);
|
|
2186
2186
|
} else Array.isArray(h) || n("update:modelValue", h.value);
|
|
2187
2187
|
}
|
|
@@ -2192,7 +2192,7 @@ const Wo = xe({
|
|
|
2192
2192
|
return o.placeholder;
|
|
2193
2193
|
} else return ((h = a.value) == null ? void 0 : h.label) || o.placeholder || "";
|
|
2194
2194
|
return "";
|
|
2195
|
-
}), S = r(() => !(!o.clearable || !o.modelValue || o.modelValue && Array.isArray(o.modelValue) && !o.modelValue.length)),
|
|
2195
|
+
}), S = r(() => !(!o.clearable || !o.modelValue || o.modelValue && Array.isArray(o.modelValue) && !o.modelValue.length)), _ = r(() => u.value ? o.options.filter(
|
|
2196
2196
|
(h) => h.label.toLowerCase().includes(u.value.toLowerCase())
|
|
2197
2197
|
) : o.options), f = r(() => {
|
|
2198
2198
|
if (o.rules)
|
|
@@ -2201,7 +2201,7 @@ const Wo = xe({
|
|
|
2201
2201
|
return [Ht];
|
|
2202
2202
|
}), w = () => {
|
|
2203
2203
|
d.value = !0, n("popupShow");
|
|
2204
|
-
},
|
|
2204
|
+
}, k = () => {
|
|
2205
2205
|
d.value = !1, n("popupHide");
|
|
2206
2206
|
}, C = () => {
|
|
2207
2207
|
a.value = void 0;
|
|
@@ -2228,8 +2228,8 @@ const Wo = xe({
|
|
|
2228
2228
|
placeholder: h.filtering && "Почніть вводити",
|
|
2229
2229
|
"input-debounce": "50",
|
|
2230
2230
|
modelValue: a.value,
|
|
2231
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
2232
|
-
options:
|
|
2231
|
+
"onUpdate:modelValue": m[0] || (m[0] = (q) => a.value = q),
|
|
2232
|
+
options: _.value,
|
|
2233
2233
|
multiple: h.multiple,
|
|
2234
2234
|
"use-input": h.filtering && (Array.isArray(a.value) || !a.value),
|
|
2235
2235
|
rules: f.value,
|
|
@@ -2240,7 +2240,7 @@ const Wo = xe({
|
|
|
2240
2240
|
"menu-offset": [0, 2],
|
|
2241
2241
|
onFilter: T,
|
|
2242
2242
|
onPopupShow: w,
|
|
2243
|
-
onPopupHide:
|
|
2243
|
+
onPopupHide: k
|
|
2244
2244
|
}, {
|
|
2245
2245
|
append: rt(() => [
|
|
2246
2246
|
S.value ? (ce(), de("i", {
|
|
@@ -2251,7 +2251,7 @@ const Wo = xe({
|
|
|
2251
2251
|
m[1] || (m[1] = Mt("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
|
|
2252
2252
|
]),
|
|
2253
2253
|
selected: rt(() => {
|
|
2254
|
-
var
|
|
2254
|
+
var q, D;
|
|
2255
2255
|
return [
|
|
2256
2256
|
Array.isArray(a.value) ? (ce(), de(Je, { key: 0 }, [
|
|
2257
2257
|
!h.filtering || a.value.length ? (ce(), de("span", {
|
|
@@ -2259,7 +2259,7 @@ const Wo = xe({
|
|
|
2259
2259
|
class: Xe([
|
|
2260
2260
|
"app-select__selected",
|
|
2261
2261
|
{
|
|
2262
|
-
"app-select__placeholder": !((
|
|
2262
|
+
"app-select__placeholder": !((q = a.value) != null && q.length) && h.placeholder
|
|
2263
2263
|
}
|
|
2264
2264
|
])
|
|
2265
2265
|
}, [
|
|
@@ -2281,22 +2281,24 @@ const Wo = xe({
|
|
|
2281
2281
|
], 64))
|
|
2282
2282
|
];
|
|
2283
2283
|
}),
|
|
2284
|
-
option: rt((
|
|
2284
|
+
option: rt((q) => [
|
|
2285
2285
|
Tt(Zl, Rl({
|
|
2286
2286
|
"no-arrow": "",
|
|
2287
|
-
label:
|
|
2288
|
-
checked:
|
|
2289
|
-
active:
|
|
2287
|
+
label: q.opt.label,
|
|
2288
|
+
checked: q.opt.done,
|
|
2289
|
+
active: q.selected,
|
|
2290
2290
|
"is-mobile": h.isMobile,
|
|
2291
2291
|
checkbox: o.multiple,
|
|
2292
|
-
"model-value":
|
|
2293
|
-
},
|
|
2292
|
+
"model-value": q.selected
|
|
2293
|
+
}, o.multiple ? { ...q.itemProps, onClick: void 0 } : q.itemProps, {
|
|
2294
|
+
"onUpdate:modelValue": () => q.toggleOption(q.opt)
|
|
2295
|
+
}), null, 16, ["label", "checked", "active", "is-mobile", "checkbox", "model-value", "onUpdate:modelValue"])
|
|
2294
2296
|
]),
|
|
2295
2297
|
_: 1
|
|
2296
2298
|
}, 8, ["popup-content-class", "placeholder", "modelValue", "options", "multiple", "use-input", "rules", "lazy-rules", "autofocus", "disable", "loading"])
|
|
2297
2299
|
], 2));
|
|
2298
2300
|
}
|
|
2299
|
-
}), tn = /* @__PURE__ */ Jl(Yo, [["__scopeId", "data-v-
|
|
2301
|
+
}), tn = /* @__PURE__ */ Jl(Yo, [["__scopeId", "data-v-21482233"]]);
|
|
2300
2302
|
export {
|
|
2301
2303
|
tn as default
|
|
2302
2304
|
};
|