wave-ui 3.17.0 → 3.17.2
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/wave-ui.es.js
CHANGED
|
@@ -4,8 +4,8 @@ var de = (e) => {
|
|
|
4
4
|
};
|
|
5
5
|
var Ie = (e, t, i) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
6
6
|
var H = (e, t, i) => Ie(e, typeof t != "symbol" ? t + "" : t, i), ue = (e, t, i) => t.has(e) || de("Cannot " + i);
|
|
7
|
-
var Y = (e, t, i) => (ue(e, t, "read from private field"), i ? i.call(e) : t.get(e)), te = (e, t, i) => t.has(e) ? de("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), ie = (e, t, i,
|
|
8
|
-
import { reactive as Z, resolveComponent as $, openBlock as
|
|
7
|
+
var Y = (e, t, i) => (ue(e, t, "read from private field"), i ? i.call(e) : t.get(e)), te = (e, t, i) => t.has(e) ? de("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), ie = (e, t, i, s) => (ue(e, t, "write to private field"), s ? s.call(e, i) : t.set(e, i), i);
|
|
8
|
+
import { reactive as Z, resolveComponent as $, openBlock as o, createBlock as b, Teleport as Ve, createVNode as T, TransitionGroup as ae, normalizeClass as m, withCtx as f, createElementBlock as u, Fragment as v, renderList as x, mergeProps as _, createElementVNode as w, createCommentVNode as p, createApp as Te, defineComponent as Le, inject as Re, withKeys as A, withModifiers as M, renderSlot as c, createTextVNode as B, toDisplayString as S, normalizeStyle as R, toHandlers as ne, Transition as O, resolveDynamicComponent as L, normalizeProps as le, resolveDirective as ke, withDirectives as W, createSlots as ee, vShow as re, vModelText as ve, vModelDynamic as xe, KeepAlive as Oe } from "vue";
|
|
9
9
|
const Pe = Z({
|
|
10
10
|
on: "#app",
|
|
11
11
|
// Sets the Wave UI root node. If not found, will default to `body`.
|
|
@@ -70,18 +70,18 @@ const Pe = Z({
|
|
|
70
70
|
if (!Object.keys(t).length) t = Object.assign(t, e);
|
|
71
71
|
else
|
|
72
72
|
for (const i in e) {
|
|
73
|
-
const
|
|
74
|
-
typeof
|
|
73
|
+
const s = e[i];
|
|
74
|
+
typeof s == "object" && typeof t[i] == "object" ? Ce(e[i], t[i]) : t[i] = s;
|
|
75
75
|
}
|
|
76
76
|
return t;
|
|
77
77
|
}, j = (e) => console.warn(`Wave UI: ${e}`), F = (e) => console.error(`Wave UI: ${e}`), ze = (e) => {
|
|
78
78
|
["light", "dark"].forEach((t) => {
|
|
79
|
-
var
|
|
79
|
+
var s, a, l;
|
|
80
80
|
const i = e.colors[t];
|
|
81
81
|
i.shades = {};
|
|
82
82
|
for (const n in i) {
|
|
83
83
|
if (n === "shades") continue;
|
|
84
|
-
const r = i[n], d = { label: n, color: (l = (
|
|
84
|
+
const r = i[n], d = { label: n, color: (l = (a = ((s = i[n]) == null ? void 0 : s.color) ?? i[n]) == null ? void 0 : a.replace) == null ? void 0 : l.call(a, "#", "") }, h = d.color;
|
|
85
85
|
if (h) {
|
|
86
86
|
h.length === 3 && (d.color = h[0] + "" + h[0] + h[1] + h[1] + h[2] + h[2]);
|
|
87
87
|
for (let y = 1; y <= 6; y++) {
|
|
@@ -93,10 +93,10 @@ const Pe = Z({
|
|
|
93
93
|
});
|
|
94
94
|
}, he = (e, t) => {
|
|
95
95
|
const i = {
|
|
96
|
-
...t.reduce((
|
|
97
|
-
|
|
98
|
-
const l = (
|
|
99
|
-
return { ...
|
|
96
|
+
...t.reduce((s, a) => {
|
|
97
|
+
s[a.label] = a.color;
|
|
98
|
+
const l = (a.shades || []).reduce((n, r) => (n[r.label] = r.color, n), {});
|
|
99
|
+
return { ...s, ...l };
|
|
100
100
|
}, { ...e, ...e.shades })
|
|
101
101
|
};
|
|
102
102
|
return delete i.shades, i;
|
|
@@ -121,21 +121,21 @@ function We(e) {
|
|
|
121
121
|
return Me(e) && e || Ee(e) && Ae(e) || F(`expected color hex string, got '${e}'`) || "";
|
|
122
122
|
}
|
|
123
123
|
function ce(e) {
|
|
124
|
-
const t = We(e), i = parseInt(t.substring(1, 3), 16),
|
|
124
|
+
const t = We(e), i = parseInt(t.substring(1, 3), 16), s = parseInt(t.substring(3, 5), 16), a = parseInt(t.substring(5, 7), 16), l = t.length === 9 ? parseInt(t.substring(7, 9), 16) / 255 : 1;
|
|
125
125
|
return {
|
|
126
126
|
red: i,
|
|
127
|
-
green:
|
|
128
|
-
blue:
|
|
127
|
+
green: s,
|
|
128
|
+
blue: a,
|
|
129
129
|
alpha: l,
|
|
130
130
|
hasAlpha: t.length === 9
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function pe(e, t, i,
|
|
134
|
-
return `#${J(e)}${J(t)}${J(i)}${
|
|
133
|
+
function pe(e, t, i, s) {
|
|
134
|
+
return `#${J(e)}${J(t)}${J(i)}${s ? J(Math.floor(s * 255)) : ""}`;
|
|
135
135
|
}
|
|
136
136
|
function Se(e, t, i = 50) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const s = ce(e), a = ce(t), l = G(i, 0, 100) / 100, n = 2 * l - 1, r = s.alpha - a.alpha, d = ((n * r === -1 ? n : (n + r) / (1 + n * r)) + 1) / 2, h = 1 - d, y = G(Math.round(s.red * d + a.red * h), 0, 255), k = G(Math.round(s.green * d + a.green * h), 0, 255), g = G(Math.round(s.blue * d + a.blue * h), 0, 255), V = s.alpha * l + a.alpha * (1 - l);
|
|
138
|
+
return s.hasAlpha || a.hasAlpha || V !== 1 ? pe(y, k, g, V) : pe(y, k, g);
|
|
139
139
|
}
|
|
140
140
|
function Ne(e, t = 15) {
|
|
141
141
|
return Se("#ffffff", e, t);
|
|
@@ -498,36 +498,36 @@ let se = { keys: [], values: [] }, fe = null;
|
|
|
498
498
|
const De = (e, t) => {
|
|
499
499
|
var V;
|
|
500
500
|
let i = "";
|
|
501
|
-
const
|
|
501
|
+
const s = {}, { info: a, warning: l, success: n, error: r, shades: d, ...h } = e, { cssScope: y } = U;
|
|
502
502
|
for (const I in h)
|
|
503
503
|
i += `${y} .${I}--bg{background-color:var(--w-${I}-color)}${y} .${I}{color:var(--w-${I}-color)}`;
|
|
504
504
|
for (const I in d)
|
|
505
505
|
i += `${y} .${I}--bg{background-color:${d[I]}}${y} .${I}{color:${d[I]}}`;
|
|
506
|
-
const k = { ...h, info:
|
|
507
|
-
for (const I in k)
|
|
506
|
+
const k = { ...h, info: a, warning: l, success: n, error: r };
|
|
507
|
+
for (const I in k) s[I] = ((V = k[I]) == null ? void 0 : V.color) ?? k[I];
|
|
508
508
|
if (t)
|
|
509
|
-
for (const I in d)
|
|
509
|
+
for (const I in d) s[I] = d[I];
|
|
510
510
|
let g = "";
|
|
511
|
-
return Object.entries(
|
|
511
|
+
return Object.entries(s).forEach(([I, z]) => {
|
|
512
512
|
g += `--w-${I}-color: ${z};`;
|
|
513
513
|
}), `:root{${g}}${i}`;
|
|
514
514
|
}, He = (e, t) => {
|
|
515
515
|
let i = "";
|
|
516
|
-
const { cssScope:
|
|
517
|
-
return e.forEach(({ min:
|
|
516
|
+
const { cssScope: s } = U;
|
|
517
|
+
return e.forEach(({ min: a, label: l }) => {
|
|
518
518
|
if (l === "xs")
|
|
519
519
|
for (let n = 0; n < t; n++)
|
|
520
|
-
i += `${
|
|
520
|
+
i += `${s} .${l}${t - n}{width:${parseFloat(((t - n) * 100 / t).toFixed(4))}%;}`;
|
|
521
521
|
else {
|
|
522
|
-
i += `@media(min-width:${
|
|
522
|
+
i += `@media(min-width:${a}px){`;
|
|
523
523
|
for (let n = 0; n < t; n++)
|
|
524
|
-
i += `${
|
|
524
|
+
i += `${s} .${l}${t - n}{width:${parseFloat(((t - n) * 100 / t).toFixed(4))}%;}`;
|
|
525
525
|
i += "}";
|
|
526
526
|
}
|
|
527
527
|
}), i;
|
|
528
528
|
}, Fe = (e) => {
|
|
529
529
|
let t = "";
|
|
530
|
-
const { cssScope: i, baseIncrement:
|
|
530
|
+
const { cssScope: i, baseIncrement: s } = U, a = [
|
|
531
531
|
"show{display:block}",
|
|
532
532
|
"hide{display:none}",
|
|
533
533
|
"d-flex{display:flex}",
|
|
@@ -565,26 +565,26 @@ const De = (e, t) => {
|
|
|
565
565
|
"justify-space-evenly{justify-content:space-evenly}"
|
|
566
566
|
], l = Array(12).fill();
|
|
567
567
|
return e.forEach(({ label: n, min: r }) => {
|
|
568
|
-
n !== "xs" && (t += `@media(min-width:${r}px){` +
|
|
569
|
-
l.map((d, h) => `.w-grid.${n}u-columns${h + 1}{grid-template-columns:repeat(${h + 1},1fr);}`).join("") + l.map((d, h) => `.w-flex.${n}u-gap${h + 1},.w-grid.${n}u-gap${h + 1}{gap:${(h + 1) *
|
|
568
|
+
n !== "xs" && (t += `@media(min-width:${r}px){` + a.map((d) => `${i} .${n}u-${d}`).join("") + // w-grid columns and gap.
|
|
569
|
+
l.map((d, h) => `.w-grid.${n}u-columns${h + 1}{grid-template-columns:repeat(${h + 1},1fr);}`).join("") + l.map((d, h) => `.w-flex.${n}u-gap${h + 1},.w-grid.${n}u-gap${h + 1}{gap:${(h + 1) * s}px;}`).join("") + `.w-flex.${n}u-gap0,.w-flex.${n}u-gap0{gap:0}}`);
|
|
570
570
|
}), e.forEach(({ label: n, min: r, max: d }) => {
|
|
571
|
-
t += `@media (min-width:${r}px) and (max-width:${d}px){` +
|
|
572
|
-
l.map((h, y) => `.w-grid.${n}-columns${y + 1}{grid-template-columns:repeat(${y + 1},1fr);}`).join("") + l.map((h, y) => `.w-flex.${n}-gap${y + 1},.w-grid.${n}-gap${y + 1}{gap:${(y + 1) *
|
|
571
|
+
t += `@media (min-width:${r}px) and (max-width:${d}px){` + a.map((h) => `${i} .${n}-${h}`).join("") + // w-grid columns and gap.
|
|
572
|
+
l.map((h, y) => `.w-grid.${n}-columns${y + 1}{grid-template-columns:repeat(${y + 1},1fr);}`).join("") + l.map((h, y) => `.w-flex.${n}-gap${y + 1},.w-grid.${n}-gap${y + 1}{gap:${(y + 1) * s}px;}`).join("") + `.w-flex.${n}-gap0,.w-flex.${n}-gap0{gap:0}}`;
|
|
573
573
|
}), e.forEach(({ label: n, max: r }) => {
|
|
574
|
-
n !== "xl" && (t += `@media (max-width:${r}px){` +
|
|
575
|
-
l.map((d, h) => `.w-grid.${n}d-columns${h + 1}{grid-template-columns:repeat(${h + 1},1fr);}`).join("") + l.map((d, h) => `.w-flex.${n}d-gap${h + 1},.w-grid.${n}d-gap${h + 1}{gap:${(h + 1) *
|
|
574
|
+
n !== "xl" && (t += `@media (max-width:${r}px){` + a.map((d) => `${i} .${n}d-${d}`).join("") + // w-grid columns and gap.
|
|
575
|
+
l.map((d, h) => `.w-grid.${n}d-columns${h + 1}{grid-template-columns:repeat(${h + 1},1fr);}`).join("") + l.map((d, h) => `.w-flex.${n}d-gap${h + 1},.w-grid.${n}d-gap${h + 1}{gap:${(h + 1) * s}px;}`).join("") + `.w-flex.${n}d-gap0,.w-flex.${n}d-gap0{gap:0}}`);
|
|
576
576
|
}), t;
|
|
577
577
|
}, ge = (e) => {
|
|
578
578
|
const t = window.innerWidth, i = se.values.slice(0);
|
|
579
|
-
i.push(t), i.sort((
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
name:
|
|
583
|
-
xs:
|
|
584
|
-
sm:
|
|
585
|
-
md:
|
|
586
|
-
lg:
|
|
587
|
-
xl:
|
|
579
|
+
i.push(t), i.sort((a, l) => a - l);
|
|
580
|
+
const s = se.keys[i.indexOf(t)] || "xl";
|
|
581
|
+
s !== fe && (fe = s, e.breakpoint = {
|
|
582
|
+
name: s,
|
|
583
|
+
xs: s === "xs",
|
|
584
|
+
sm: s === "sm",
|
|
585
|
+
md: s === "md",
|
|
586
|
+
lg: s === "lg",
|
|
587
|
+
xl: s === "xl",
|
|
588
588
|
width: t
|
|
589
589
|
}), e.breakpoint.width = window.innerWidth;
|
|
590
590
|
}, je = (e) => {
|
|
@@ -592,29 +592,29 @@ const De = (e, t) => {
|
|
|
592
592
|
if (se = { keys: Object.keys(t.breakpoints), values: Object.values(t.breakpoints) }, !document.getElementById("wave-ui-styles")) {
|
|
593
593
|
const i = document.createElement("style");
|
|
594
594
|
i.id = "wave-ui-styles", i.innerHTML = qe(t);
|
|
595
|
-
const
|
|
596
|
-
|
|
595
|
+
const s = document.head.querySelectorAll('style,link[rel="stylesheet"]')[0];
|
|
596
|
+
s ? s.before(i) : document.head.appendChild(i);
|
|
597
597
|
}
|
|
598
598
|
ge(e), window.addEventListener("resize", () => ge(e));
|
|
599
599
|
}, Ue = (e, t, i) => {
|
|
600
600
|
if (!document.getElementById("wave-ui-colors")) {
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
|
|
601
|
+
const s = document.createElement("style");
|
|
602
|
+
s.id = "wave-ui-colors", s.innerHTML = De(e, t);
|
|
603
|
+
const a = document.head.querySelectorAll('style,link[rel="stylesheet"]')[0];
|
|
604
|
+
a ? a.before(s) : document.head.appendChild(s);
|
|
605
605
|
}
|
|
606
606
|
}, qe = (e) => {
|
|
607
607
|
const t = Object.entries(e.breakpoints), i = t.map(([l, n], r) => {
|
|
608
608
|
const [, d = 0] = t[r - 1] || [];
|
|
609
609
|
return { label: l, min: d ? d + 1 : 0, max: n };
|
|
610
|
-
}),
|
|
611
|
-
U.cssScope =
|
|
612
|
-
let
|
|
613
|
-
return
|
|
610
|
+
}), s = getComputedStyle(document.documentElement);
|
|
611
|
+
U.cssScope = s.getPropertyValue("--w-css-scope"), U.baseIncrement = parseInt(s.getPropertyValue("--w-base-increment"));
|
|
612
|
+
let a = "";
|
|
613
|
+
return a += He(i, e.css.grid), e.css.breakpointLayoutClasses && (a += Fe(i)), a;
|
|
614
614
|
}, Xe = ["innerHTML"];
|
|
615
|
-
function Ye(e, t, i,
|
|
615
|
+
function Ye(e, t, i, s, a, l) {
|
|
616
616
|
const n = $("w-alert");
|
|
617
|
-
return
|
|
617
|
+
return o(), b(Ve, { to: ".w-app" }, [
|
|
618
618
|
T(ae, {
|
|
619
619
|
class: m(["w-notification-manager", { "w-notification-manager--left": l.conf.align === "left" }]),
|
|
620
620
|
tag: "div",
|
|
@@ -622,8 +622,8 @@ function Ye(e, t, i, o, s, l) {
|
|
|
622
622
|
appear: ""
|
|
623
623
|
}, {
|
|
624
624
|
default: f(() => [
|
|
625
|
-
(
|
|
626
|
-
r._value ? (
|
|
625
|
+
(o(!0), u(v, null, x(l.notifications, (r) => (o(), u(v, null, [
|
|
626
|
+
r._value ? (o(), b(n, _({
|
|
627
627
|
class: "white--bg",
|
|
628
628
|
key: r._uid,
|
|
629
629
|
modelValue: r._value,
|
|
@@ -646,8 +646,8 @@ function Ye(e, t, i, o, s, l) {
|
|
|
646
646
|
}
|
|
647
647
|
const C = (e, t) => {
|
|
648
648
|
const i = e.__vccOpts || e;
|
|
649
|
-
for (const [
|
|
650
|
-
i[
|
|
649
|
+
for (const [s, a] of t)
|
|
650
|
+
i[s] = a;
|
|
651
651
|
return i;
|
|
652
652
|
}, Ge = {
|
|
653
653
|
name: "w-notification-manager",
|
|
@@ -667,7 +667,7 @@ const C = (e, t) => {
|
|
|
667
667
|
},
|
|
668
668
|
methods: {
|
|
669
669
|
notifProps(e) {
|
|
670
|
-
const { _value: t, _uid: i, message:
|
|
670
|
+
const { _value: t, _uid: i, message: s, timeout: a, ...l } = e;
|
|
671
671
|
return l.dismiss && (l.dismiss = !0), l;
|
|
672
672
|
}
|
|
673
673
|
}
|
|
@@ -696,11 +696,11 @@ const N = class N {
|
|
|
696
696
|
};
|
|
697
697
|
if (typeof t[0] == "object") i = { ...i, ...t[0] };
|
|
698
698
|
else {
|
|
699
|
-
const [
|
|
699
|
+
const [s, a, l] = t;
|
|
700
700
|
i = {
|
|
701
701
|
...i,
|
|
702
|
-
message:
|
|
703
|
-
[
|
|
702
|
+
message: s || "",
|
|
703
|
+
[a === void 0 ? "info" : a]: !0,
|
|
704
704
|
timeout: l || l === 0 ? parseFloat(l) : 4e3
|
|
705
705
|
};
|
|
706
706
|
}
|
|
@@ -713,17 +713,17 @@ const N = class N {
|
|
|
713
713
|
D = new WeakMap(), te(N, D);
|
|
714
714
|
let oe = N;
|
|
715
715
|
const Qe = (e, t, i) => {
|
|
716
|
-
const
|
|
717
|
-
e.appendChild(
|
|
718
|
-
const
|
|
716
|
+
const s = document.createElement("div");
|
|
717
|
+
e.appendChild(s);
|
|
718
|
+
const a = Te(Le({
|
|
719
719
|
...Je,
|
|
720
720
|
inject: ["$waveui"]
|
|
721
721
|
})).provide("$waveui", i);
|
|
722
722
|
for (const l in t) {
|
|
723
723
|
const n = t[l];
|
|
724
|
-
|
|
724
|
+
a.component(n.name, { ...n, inject: ["$waveui"] });
|
|
725
725
|
}
|
|
726
|
-
|
|
726
|
+
a.mount(s), s.remove();
|
|
727
727
|
};
|
|
728
728
|
let be = !1;
|
|
729
729
|
const Ze = (e) => {
|
|
@@ -732,19 +732,19 @@ const Ze = (e) => {
|
|
|
732
732
|
e.preferredTheme = i.matches ? "dark" : "light", e.switchTheme(e.preferredTheme);
|
|
733
733
|
});
|
|
734
734
|
}, et = (e, t) => {
|
|
735
|
-
var i,
|
|
736
|
-
for (const
|
|
737
|
-
if ((i = e.props) != null && i[
|
|
738
|
-
e.props[
|
|
735
|
+
var i, s;
|
|
736
|
+
for (const a in t)
|
|
737
|
+
if ((i = e.props) != null && i[a])
|
|
738
|
+
e.props[a].default = t[a];
|
|
739
739
|
else {
|
|
740
740
|
let l = !1;
|
|
741
741
|
if (Array.isArray(e.mixins) && e.mixins.length) {
|
|
742
742
|
for (const n of e.mixins)
|
|
743
|
-
if ((
|
|
744
|
-
n.props[
|
|
743
|
+
if ((s = n == null ? void 0 : n.props) != null && s[a]) {
|
|
744
|
+
n.props[a].default = t[a], l = !0;
|
|
745
745
|
break;
|
|
746
746
|
}
|
|
747
|
-
l || j(`Attempting to set a preset on a prop that doesn't exist: \`${e.name}.${
|
|
747
|
+
l || j(`Attempting to set a preset on a prop that doesn't exist: \`${e.name}.${a}\`.`);
|
|
748
748
|
continue;
|
|
749
749
|
}
|
|
750
750
|
}
|
|
@@ -778,10 +778,10 @@ const K = class K {
|
|
|
778
778
|
},
|
|
779
779
|
// Callable from this.$waveui.
|
|
780
780
|
switchTheme(t, i = !1) {
|
|
781
|
-
var
|
|
782
|
-
this.theme = t, document.documentElement.setAttribute("data-theme", t), (l = (
|
|
783
|
-
const
|
|
784
|
-
Ue(
|
|
781
|
+
var a, l;
|
|
782
|
+
this.theme = t, document.documentElement.setAttribute("data-theme", t), (l = (a = document.head.querySelector("#wave-ui-colors")) == null ? void 0 : a.remove) == null || l.call(a);
|
|
783
|
+
const s = this.config.colors[this.theme];
|
|
784
|
+
Ue(s, this.config.css.colorShadeCssVariables), this.colors = he(s, me);
|
|
785
785
|
}
|
|
786
786
|
});
|
|
787
787
|
if (Y(K, X)) return;
|
|
@@ -789,13 +789,13 @@ const K = class K {
|
|
|
789
789
|
const n = { ...i.colors };
|
|
790
790
|
i.colors.light || (i.colors.light = n), i.colors.dark || (i.colors.dark = n), i.colors = { light: i.colors.light, dark: i.colors.dark };
|
|
791
791
|
}
|
|
792
|
-
let { components:
|
|
793
|
-
|
|
792
|
+
let { components: s, ...a } = i;
|
|
793
|
+
a = this.$waveui.config = Ce(a), a.css.colorShades && ze(a);
|
|
794
794
|
const l = Z(this.$waveui);
|
|
795
|
-
t.config.globalProperties.$waveui = l, t.provide("$waveui", l),
|
|
795
|
+
t.config.globalProperties.$waveui = l, t.provide("$waveui", l), a.theme !== "auto" && (this.$waveui.colors = he(a.colors[a.theme], me));
|
|
796
796
|
}
|
|
797
797
|
static install(t, i = {}) {
|
|
798
|
-
var
|
|
798
|
+
var a;
|
|
799
799
|
t.directive("focus", {
|
|
800
800
|
// Wait for the next tick to focus the newly mounted element.
|
|
801
801
|
mounted: (l) => setTimeout(() => l.focus(), 0)
|
|
@@ -807,10 +807,10 @@ const K = class K {
|
|
|
807
807
|
window.addEventListener("scroll", r);
|
|
808
808
|
}
|
|
809
809
|
});
|
|
810
|
-
const { components:
|
|
811
|
-
for (const l in
|
|
812
|
-
const n =
|
|
813
|
-
(
|
|
810
|
+
const { components: s = {} } = i || {};
|
|
811
|
+
for (const l in s) {
|
|
812
|
+
const n = s[l];
|
|
813
|
+
(a = i.presets) != null && a[n.name] && et(n, i.presets[n.name]), t.component(n.name, n);
|
|
814
814
|
}
|
|
815
815
|
t.mixin({
|
|
816
816
|
// Add a mixin to capture the first mounted hook, trigger the Wave UI init then unregister the mixin straight away.
|
|
@@ -818,7 +818,7 @@ const K = class K {
|
|
|
818
818
|
if (!be) {
|
|
819
819
|
be = !0;
|
|
820
820
|
const l = Re("$waveui"), { config: n } = l, r = document.querySelector(n.on) || document.body;
|
|
821
|
-
r.classList.add("w-app"), n.theme === "auto" ? Ze(l) : l.switchTheme(n.theme, !0), je(l), Qe(r,
|
|
821
|
+
r.classList.add("w-app"), n.theme === "auto" ? Ze(l) : l.switchTheme(n.theme, !0), je(l), Qe(r, s, l), t._context.mixins.find((d) => d.mounted && delete d.mounted);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
}), new K(t, i), ie(K, X, !0);
|
|
@@ -827,68 +827,68 @@ const K = class K {
|
|
|
827
827
|
X = new WeakMap(), te(K, X, !1);
|
|
828
828
|
let q = K;
|
|
829
829
|
const P = (e = {}) => (typeof e == "string" ? e = { [e]: !0 } : Array.isArray(e) && (e = { [e.join(" ")]: !0 }), e), tt = ["aria-expanded"], it = ["tabindex"], lt = ["innerHTML"], st = ["innerHTML"];
|
|
830
|
-
function ot(e, t, i,
|
|
830
|
+
function ot(e, t, i, s, a, l) {
|
|
831
831
|
const n = $("w-button"), r = $("w-transition-expand");
|
|
832
|
-
return
|
|
832
|
+
return o(), u("div", {
|
|
833
833
|
class: m(["w-accordion__item", l.itemClasses]),
|
|
834
|
-
"aria-expanded":
|
|
834
|
+
"aria-expanded": l.accordionItem._expanded ? "true" : "false"
|
|
835
835
|
}, [
|
|
836
836
|
w("div", {
|
|
837
837
|
class: m(["w-accordion__item-title", l.titleClasses]),
|
|
838
|
-
onClick: t[4] || (t[4] = (d) => !
|
|
839
|
-
onFocus: t[5] || (t[5] = (d) => e.$emit("focus", l.
|
|
840
|
-
onKeypress: t[6] || (t[6] = A((d) => !
|
|
841
|
-
tabindex: !
|
|
838
|
+
onClick: t[4] || (t[4] = (d) => !l.accordionItem._disabled && l.toggleItem(l.accordionItem, d)),
|
|
839
|
+
onFocus: t[5] || (t[5] = (d) => e.$emit("focus", l.accordionItem)),
|
|
840
|
+
onKeypress: t[6] || (t[6] = A((d) => !l.accordionItem._disabled && l.toggleItem(l.accordionItem, d), ["enter"])),
|
|
841
|
+
tabindex: !l.accordionItem._disabled && 0
|
|
842
842
|
}, [
|
|
843
|
-
l.options.expandIcon && !l.options.expandIconRight ? (
|
|
843
|
+
l.options.expandIcon && !l.options.expandIconRight ? (o(), b(n, {
|
|
844
844
|
key: 0,
|
|
845
|
-
class: m(["w-accordion__expand-icon", { "w-accordion__expand-icon--expanded":
|
|
846
|
-
icon:
|
|
845
|
+
class: m(["w-accordion__expand-icon", { "w-accordion__expand-icon--expanded": l.accordionItem._expanded, "w-accordion__expand-icon--rotate90": l.options.expandIconRotate90 }]),
|
|
846
|
+
icon: l.accordionItem._expanded && l.options.collapseIcon || l.options.expandIcon,
|
|
847
847
|
"icon-props": l.options.expandIconProps,
|
|
848
|
-
disabled:
|
|
848
|
+
disabled: l.accordionItem._disabled || null,
|
|
849
849
|
tabindex: -1,
|
|
850
850
|
text: "",
|
|
851
851
|
onKeypress: t[0] || (t[0] = M(() => {
|
|
852
852
|
}, ["stop"])),
|
|
853
|
-
onClick: t[1] || (t[1] = M((d) => !
|
|
853
|
+
onClick: t[1] || (t[1] = M((d) => !l.accordionItem._disabled && l.toggleItem(l.accordionItem, d), ["stop"]))
|
|
854
854
|
}, null, 8, ["icon", "icon-props", "disabled", "class"])) : p("", !0),
|
|
855
855
|
c(e.$slots, "title", {
|
|
856
|
-
item: l.
|
|
857
|
-
expanded:
|
|
858
|
-
index:
|
|
856
|
+
item: l.accordionItem,
|
|
857
|
+
expanded: l.accordionItem._expanded,
|
|
858
|
+
index: l.accordionItem._index + 1
|
|
859
859
|
}, () => [
|
|
860
860
|
w("div", {
|
|
861
861
|
class: "grow",
|
|
862
|
-
innerHTML:
|
|
862
|
+
innerHTML: l.accordionItem[l.options.itemTitleKey]
|
|
863
863
|
}, null, 8, lt)
|
|
864
864
|
]),
|
|
865
|
-
l.options.expandIcon && l.options.expandIconRight ? (
|
|
865
|
+
l.options.expandIcon && l.options.expandIconRight ? (o(), b(n, {
|
|
866
866
|
key: 1,
|
|
867
|
-
class: m(["w-accordion__expand-icon", { "w-accordion__expand-icon--expanded":
|
|
868
|
-
icon:
|
|
867
|
+
class: m(["w-accordion__expand-icon", { "w-accordion__expand-icon--expanded": l.accordionItem._expanded, "w-accordion__expand-icon--rotate90": l.options.expandIconRotate90 }]),
|
|
868
|
+
icon: l.accordionItem._expanded && l.options.collapseIcon || l.options.expandIcon,
|
|
869
869
|
text: "",
|
|
870
870
|
onKeypress: t[2] || (t[2] = M(() => {
|
|
871
871
|
}, ["stop"])),
|
|
872
|
-
onClick: t[3] || (t[3] = M((d) => !
|
|
872
|
+
onClick: t[3] || (t[3] = M((d) => !l.accordionItem._disabled && l.toggleItem(l.accordionItem, d), ["stop"]))
|
|
873
873
|
}, null, 8, ["icon", "class"])) : p("", !0)
|
|
874
874
|
], 42, it),
|
|
875
875
|
T(r, {
|
|
876
876
|
y: "",
|
|
877
|
-
onAfterLeave: t[7] || (t[7] = (d) => l.onEndOfCollapse(
|
|
877
|
+
onAfterLeave: t[7] || (t[7] = (d) => l.onEndOfCollapse(l.accordionItem)),
|
|
878
878
|
duration: l.options.duration
|
|
879
879
|
}, {
|
|
880
880
|
default: f(() => [
|
|
881
|
-
|
|
881
|
+
l.accordionItem._expanded ? (o(), u("div", {
|
|
882
882
|
key: 0,
|
|
883
883
|
class: m(["w-accordion__item-content", l.contentClasses])
|
|
884
884
|
}, [
|
|
885
885
|
c(e.$slots, "content", {
|
|
886
|
-
item: l.
|
|
887
|
-
expanded:
|
|
888
|
-
index:
|
|
886
|
+
item: l.accordionItem,
|
|
887
|
+
expanded: l.accordionItem._expanded,
|
|
888
|
+
index: l.accordionItem._index + 1
|
|
889
889
|
}, () => [
|
|
890
890
|
w("div", {
|
|
891
|
-
innerHTML:
|
|
891
|
+
innerHTML: l.accordionItem[l.options.itemContentKey]
|
|
892
892
|
}, null, 8, st)
|
|
893
893
|
])
|
|
894
894
|
], 2)) : p("", !0)
|
|
@@ -907,24 +907,27 @@ const at = {
|
|
|
907
907
|
"itemClasses",
|
|
908
908
|
"titleClasses",
|
|
909
909
|
"contentClasses",
|
|
910
|
-
"
|
|
910
|
+
"onItemToggle",
|
|
911
911
|
"onEndOfCollapse",
|
|
912
912
|
"getOriginalItem",
|
|
913
|
-
"registerItem"
|
|
913
|
+
"registerItem",
|
|
914
|
+
"state"
|
|
914
915
|
],
|
|
915
916
|
emits: ["focus"],
|
|
916
917
|
data() {
|
|
917
|
-
var e
|
|
918
|
+
var e;
|
|
918
919
|
return {
|
|
919
|
-
|
|
920
|
-
...this.item || {},
|
|
921
|
-
_index: ((e = this.item) == null ? void 0 : e._index) ?? 0,
|
|
922
|
-
_expanded: ((t = this.item) == null ? void 0 : t._expanded) || !1,
|
|
923
|
-
_disabled: ((i = this.item) == null ? void 0 : i._disabled) || !1
|
|
924
|
-
}
|
|
920
|
+
accordionItemIndex: (e = this.item) == null ? void 0 : e._index
|
|
925
921
|
};
|
|
926
922
|
},
|
|
927
923
|
computed: {
|
|
924
|
+
accordionItem: {
|
|
925
|
+
get() {
|
|
926
|
+
return this.state.accordionItems[this.accordionItemIndex] || {};
|
|
927
|
+
},
|
|
928
|
+
set() {
|
|
929
|
+
}
|
|
930
|
+
},
|
|
928
931
|
itemClass() {
|
|
929
932
|
return {
|
|
930
933
|
"w-accordion__item--expanded": this.accordionItem._expanded,
|
|
@@ -934,16 +937,26 @@ const at = {
|
|
|
934
937
|
};
|
|
935
938
|
}
|
|
936
939
|
},
|
|
940
|
+
methods: {
|
|
941
|
+
toggleItem(e, t) {
|
|
942
|
+
e._expanded = !e._expanded, this.onItemToggle(e), t.target.blur(), setTimeout(() => t.target.focus(), 300);
|
|
943
|
+
}
|
|
944
|
+
},
|
|
937
945
|
created() {
|
|
938
|
-
this.registerItem(
|
|
946
|
+
this.accordionItemIndex = this.registerItem({
|
|
947
|
+
_index: 0,
|
|
948
|
+
_expanded: !1,
|
|
949
|
+
_disabled: !1,
|
|
950
|
+
...this.item || {}
|
|
951
|
+
});
|
|
939
952
|
}
|
|
940
953
|
}, Be = /* @__PURE__ */ C(at, [["render", ot]]);
|
|
941
|
-
function nt(e, t, i,
|
|
954
|
+
function nt(e, t, i, s, a, l) {
|
|
942
955
|
const n = $("w-accordion-item");
|
|
943
|
-
return
|
|
956
|
+
return o(), u("div", {
|
|
944
957
|
class: m(["w-accordion", l.accordionClasses])
|
|
945
958
|
}, [
|
|
946
|
-
l.accordionItemsProvided ? c(e.$slots, "default", { key: 0 }) : !isNaN(i.items) || (i.items || []).length ? (
|
|
959
|
+
l.accordionItemsProvided ? c(e.$slots, "default", { key: 0 }) : !isNaN(i.items) || (i.items || []).length ? (o(!0), u(v, { key: 1 }, x(e.state.accordionItems, (r, d) => (o(), b(n, {
|
|
947
960
|
key: d,
|
|
948
961
|
class: m(i.itemClass),
|
|
949
962
|
item: r,
|
|
@@ -1013,25 +1026,26 @@ const rt = {
|
|
|
1013
1026
|
itemClasses: P(this.itemClasses),
|
|
1014
1027
|
titleClasses: this.titleClasses,
|
|
1015
1028
|
contentClasses: this.contentClasses,
|
|
1016
|
-
|
|
1029
|
+
onItemToggle: this.onItemToggle,
|
|
1017
1030
|
onEndOfCollapse: this.onEndOfCollapse,
|
|
1018
1031
|
getOriginalItem: this.getOriginalItem,
|
|
1019
1032
|
options: this.$props,
|
|
1020
|
-
registerItem: this.registerItem
|
|
1033
|
+
registerItem: this.registerItem,
|
|
1034
|
+
state: this.state
|
|
1021
1035
|
};
|
|
1022
1036
|
},
|
|
1023
1037
|
data: () => ({
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1038
|
+
state: {
|
|
1039
|
+
accordionItems: []
|
|
1040
|
+
}
|
|
1027
1041
|
}),
|
|
1028
1042
|
computed: {
|
|
1029
1043
|
// Detect if the accordion items are directly provided through slot using WAccordionItem.
|
|
1030
1044
|
accordionItemsProvided() {
|
|
1031
1045
|
var e, t, i;
|
|
1032
|
-
return (i = (t = (e = this.$slots).default) == null ? void 0 : t.call(e)) == null ? void 0 : i.some((
|
|
1033
|
-
var
|
|
1034
|
-
return (
|
|
1046
|
+
return (i = (t = (e = this.$slots).default) == null ? void 0 : t.call(e)) == null ? void 0 : i.some((s) => {
|
|
1047
|
+
var a;
|
|
1048
|
+
return (a = s == null ? void 0 : s.type) == null ? void 0 : a.name;
|
|
1035
1049
|
});
|
|
1036
1050
|
},
|
|
1037
1051
|
accordionClasses() {
|
|
@@ -1057,56 +1071,56 @@ const rt = {
|
|
|
1057
1071
|
}
|
|
1058
1072
|
},
|
|
1059
1073
|
methods: {
|
|
1060
|
-
|
|
1061
|
-
e._expanded = !
|
|
1062
|
-
const
|
|
1063
|
-
this
|
|
1064
|
-
const o = i.map((s) => s._expanded || !1);
|
|
1065
|
-
this.$emit("update:modelValue", o), this.$emit("input", o), this.$emit("item-expand", { item: e, expanded: e._expanded }), t.target.blur(), setTimeout(() => t.target.focus(), 300);
|
|
1074
|
+
onItemToggle(e) {
|
|
1075
|
+
this.expandSingle && this.state.accordionItems.forEach((i) => i._index !== e._index && (i._expanded = !1));
|
|
1076
|
+
const t = this.state.accordionItems.map((i) => i._expanded || !1);
|
|
1077
|
+
this.$emit("update:modelValue", t), this.$emit("input", t), this.$emit("item-expand", { item: e, expanded: e._expanded });
|
|
1066
1078
|
},
|
|
1067
1079
|
onEndOfCollapse(e) {
|
|
1068
1080
|
this.$emit("item-collapsed", { item: e, expanded: e._expanded });
|
|
1069
1081
|
},
|
|
1070
1082
|
// Return the original accordion item (so there is no `_index`, etc.).
|
|
1071
1083
|
getOriginalItem(e) {
|
|
1072
|
-
return
|
|
1084
|
+
return this.items[e._index];
|
|
1073
1085
|
},
|
|
1074
1086
|
updateItems() {
|
|
1075
|
-
let e =
|
|
1076
|
-
this.
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1087
|
+
let e = this.state.accordionItems;
|
|
1088
|
+
!this.accordionItemsProvided && this.items && (e = (typeof this.items == "number" ? Array(this.items).fill({}) : this.items) || []), this.state.accordionItems = e.map((t, i) => {
|
|
1089
|
+
var s;
|
|
1090
|
+
return {
|
|
1091
|
+
...t,
|
|
1092
|
+
_index: i,
|
|
1093
|
+
_expanded: ((s = this.modelValue) == null ? void 0 : s[i]) ?? !1,
|
|
1094
|
+
_disabled: !!t.disabled
|
|
1095
|
+
};
|
|
1096
|
+
});
|
|
1082
1097
|
},
|
|
1083
1098
|
// Provide-injected in and used from w-accordion-item.
|
|
1084
1099
|
// Only when w-accordion-item is directly used outside of Wave UI.
|
|
1085
1100
|
registerItem(e) {
|
|
1086
1101
|
var t;
|
|
1087
|
-
this.
|
|
1102
|
+
return this.accordionItemsProvided && (e._index = this.state.accordionItems.length, e._expanded = ((t = this.modelValue) == null ? void 0 : t[e._index]) ?? !1, e._disabled = !!e.disabled, this.state.accordionItems.push(e)), e._index;
|
|
1088
1103
|
}
|
|
1089
1104
|
},
|
|
1090
1105
|
created() {
|
|
1091
|
-
this.updateItems();
|
|
1106
|
+
!this.accordionItemsProvided && this.items && this.updateItems();
|
|
1092
1107
|
},
|
|
1093
1108
|
watch: {
|
|
1094
1109
|
modelValue() {
|
|
1095
1110
|
this.updateItems();
|
|
1096
1111
|
},
|
|
1097
1112
|
items() {
|
|
1098
|
-
this.updateItems();
|
|
1099
1113
|
}
|
|
1100
1114
|
}
|
|
1101
1115
|
}, dt = /* @__PURE__ */ C(rt, [["render", nt]]), ut = { class: "w-alert__content" };
|
|
1102
|
-
function ht(e, t, i,
|
|
1116
|
+
function ht(e, t, i, s, a, l) {
|
|
1103
1117
|
const n = $("w-icon"), r = $("w-button");
|
|
1104
|
-
return
|
|
1118
|
+
return a.show ? (o(), u("div", {
|
|
1105
1119
|
key: 0,
|
|
1106
1120
|
class: m(["w-alert", l.classes])
|
|
1107
1121
|
}, [
|
|
1108
|
-
l.type || i.icon || i.dismiss ? (
|
|
1109
|
-
l.type || i.icon ? (
|
|
1122
|
+
l.type || i.icon || i.dismiss ? (o(), u(v, { key: 0 }, [
|
|
1123
|
+
l.type || i.icon ? (o(), b(n, {
|
|
1110
1124
|
key: 0,
|
|
1111
1125
|
class: "w-alert__icon"
|
|
1112
1126
|
}, {
|
|
@@ -1118,11 +1132,11 @@ function ht(e, t, i, o, s, l) {
|
|
|
1118
1132
|
w("div", ut, [
|
|
1119
1133
|
c(e.$slots, "default")
|
|
1120
1134
|
]),
|
|
1121
|
-
i.dismiss ? (
|
|
1135
|
+
i.dismiss ? (o(), b(r, {
|
|
1122
1136
|
key: 1,
|
|
1123
1137
|
class: "w-alert__dismiss",
|
|
1124
1138
|
onClick: t[0] || (t[0] = (d) => {
|
|
1125
|
-
e.$emit("update:modelValue",
|
|
1139
|
+
e.$emit("update:modelValue", a.show = !1), e.$emit("input", !1), e.$emit("close", !1);
|
|
1126
1140
|
}),
|
|
1127
1141
|
icon: "wi-cross",
|
|
1128
1142
|
color: "inherit",
|
|
@@ -1215,14 +1229,14 @@ const ct = {
|
|
|
1215
1229
|
}
|
|
1216
1230
|
}
|
|
1217
1231
|
}, pt = /* @__PURE__ */ C(ct, [["render", ht]]), mt = { class: "w-autocomplete__selection" }, ft = ["innerHTML"], gt = ["innerHTML"], bt = ["value"], yt = ["onClick"], wt = ["innerHTML"], kt = ["innerHTML"];
|
|
1218
|
-
function vt(e, t, i,
|
|
1232
|
+
function vt(e, t, i, s, a, l) {
|
|
1219
1233
|
const n = $("w-button"), r = $("w-transition-slide-fade");
|
|
1220
|
-
return
|
|
1234
|
+
return o(), u("div", {
|
|
1221
1235
|
class: m(["w-autocomplete", l.classes]),
|
|
1222
1236
|
onClick: t[5] || (t[5] = (...d) => l.onClick && l.onClick(...d)),
|
|
1223
1237
|
style: R(e.$attrs.style)
|
|
1224
1238
|
}, [
|
|
1225
|
-
e.selection.length ? (
|
|
1239
|
+
e.selection.length ? (o(!0), u(v, { key: 0 }, x(e.selection, (d, h) => (o(), u("div", mt, [
|
|
1226
1240
|
c(e.$slots, "selection", {
|
|
1227
1241
|
item: d,
|
|
1228
1242
|
unselect: (y) => l.unselectItem(y)
|
|
@@ -1239,7 +1253,7 @@ function vt(e, t, i, o, s, l) {
|
|
|
1239
1253
|
}, null, 8, ["onClick"])
|
|
1240
1254
|
])
|
|
1241
1255
|
]))), 256)) : p("", !0),
|
|
1242
|
-
!e.selection.length && !e.keywords && i.placeholder ? (
|
|
1256
|
+
!e.selection.length && !e.keywords && i.placeholder ? (o(), u("div", {
|
|
1243
1257
|
key: 1,
|
|
1244
1258
|
class: "w-autocomplete__placeholder",
|
|
1245
1259
|
innerHTML: i.placeholder
|
|
@@ -1251,7 +1265,7 @@ function vt(e, t, i, o, s, l) {
|
|
|
1251
1265
|
}, ne(l.inputEventListeners, !0), l.inputAttrs), null, 16, bt),
|
|
1252
1266
|
T(r, null, {
|
|
1253
1267
|
default: f(() => [
|
|
1254
|
-
e.menuOpen ? (
|
|
1268
|
+
e.menuOpen ? (o(), u("ul", {
|
|
1255
1269
|
key: 0,
|
|
1256
1270
|
class: "w-autocomplete__menu",
|
|
1257
1271
|
ref: "menu",
|
|
@@ -1260,7 +1274,7 @@ function vt(e, t, i, o, s, l) {
|
|
|
1260
1274
|
onTouchstart: t[3] || (t[3] = (d) => e.menuIsBeingClicked = !0),
|
|
1261
1275
|
onTouchend: t[4] || (t[4] = (...d) => l.setEndOfMenuClick && l.setEndOfMenuClick(...d))
|
|
1262
1276
|
}, [
|
|
1263
|
-
(
|
|
1277
|
+
(o(!0), u(v, null, x(l.filteredItems, (d, h) => (o(), u("li", {
|
|
1264
1278
|
key: h,
|
|
1265
1279
|
onClick: M((y) => (l.selectItem(d), e.$emit("item-click", d)), ["stop"]),
|
|
1266
1280
|
class: m({ highlighted: e.highlightedItem === d.uid })
|
|
@@ -1274,7 +1288,7 @@ function vt(e, t, i, o, s, l) {
|
|
|
1274
1288
|
}, null, 8, wt)
|
|
1275
1289
|
])
|
|
1276
1290
|
], 10, yt))), 128)),
|
|
1277
|
-
l.filteredItems.length ? p("", !0) : (
|
|
1291
|
+
l.filteredItems.length ? p("", !0) : (o(), u("li", {
|
|
1278
1292
|
key: 0,
|
|
1279
1293
|
class: m(["w-autocomplete__no-match", { "w-autocomplete__no-match--default": !e.$slots.noMatch }])
|
|
1280
1294
|
}, [
|
|
@@ -1285,7 +1299,7 @@ function vt(e, t, i, o, s, l) {
|
|
|
1285
1299
|
}, null, 8, kt)
|
|
1286
1300
|
])
|
|
1287
1301
|
], 2)),
|
|
1288
|
-
e.$slots["extra-item"] ? (
|
|
1302
|
+
e.$slots["extra-item"] ? (o(), u("li", {
|
|
1289
1303
|
key: 1,
|
|
1290
1304
|
class: m(["w-autocomplete__extra-item", { highlighted: e.highlightedItem === "extra-item" }]),
|
|
1291
1305
|
onClick: t[0] || (t[0] = (...d) => l.selectExtraItem && l.selectExtraItem(...d))
|
|
@@ -1348,7 +1362,7 @@ const Ct = {
|
|
|
1348
1362
|
},
|
|
1349
1363
|
filteredItems() {
|
|
1350
1364
|
let e = this.optimizedItemsForSearch;
|
|
1351
|
-
const t = (i) => !this.selection.find((
|
|
1365
|
+
const t = (i) => !this.selection.find((s) => s.uid === i.uid);
|
|
1352
1366
|
return this.keywords ? e = e.filter((i) => i.searchable.includes(this.normalizedKeywords) ? this.multiple && !this.allowDuplicates ? t(i) : !0 : !1) : this.multiple && !this.allowDuplicates && (e = e.filter(t)), e;
|
|
1353
1367
|
},
|
|
1354
1368
|
highlightedItemIndex() {
|
|
@@ -1434,14 +1448,14 @@ const Ct = {
|
|
|
1434
1448
|
e.preventDefault(), this.highlightedItem === "extra-item" ? this.selectExtraItem() : this.highlightedItemIndex >= 0 && this.selectItem(this.filteredItems[this.highlightedItemIndex]);
|
|
1435
1449
|
else if ([38, 40].includes(e.keyCode)) {
|
|
1436
1450
|
e.preventDefault();
|
|
1437
|
-
let
|
|
1438
|
-
|
|
1439
|
-
const
|
|
1440
|
-
if (
|
|
1441
|
-
if (this.$slots["extra-item"] &&
|
|
1451
|
+
let s = this.highlightedItemIndex;
|
|
1452
|
+
s === -1 ? s = e.keyCode === 38 ? t - 1 : 0 : s = (s + (e.keyCode === 38 ? -1 : 1) + t) % t, this.$slots["extra-item"] && s === t - 1 ? this.highlightedItem = "extra-item" : this.highlightedItem = ((i = this.filteredItems[s]) == null ? void 0 : i.uid) || 0;
|
|
1453
|
+
const a = this.$refs.menu;
|
|
1454
|
+
if (a)
|
|
1455
|
+
if (this.$slots["extra-item"] && s === t - 1) a.scrollTop = a.scrollHeight;
|
|
1442
1456
|
else {
|
|
1443
|
-
const { offsetHeight: l, offsetTop: n } =
|
|
1444
|
-
|
|
1457
|
+
const { offsetHeight: l, offsetTop: n } = a.childNodes[s] || {};
|
|
1458
|
+
a.scrollTop + a.offsetHeight - l < n ? a.scrollTop = n - a.offsetHeight + l : a.scrollTop > n && (a.scrollTop = n);
|
|
1445
1459
|
}
|
|
1446
1460
|
} else !this.multiple && this.selection.length && e.key.length === 1 && e.preventDefault();
|
|
1447
1461
|
},
|
|
@@ -1477,13 +1491,13 @@ const Ct = {
|
|
|
1477
1491
|
watch: {
|
|
1478
1492
|
modelValue(e) {
|
|
1479
1493
|
this.selection = [], e && (Array.isArray(e) ? e : [e]).forEach((i) => {
|
|
1480
|
-
this.selection.push(this.optimizedItemsForSearch.find((
|
|
1494
|
+
this.selection.push(this.optimizedItemsForSearch.find((s) => s[this.itemValueKey] === +i));
|
|
1481
1495
|
});
|
|
1482
1496
|
}
|
|
1483
1497
|
}
|
|
1484
1498
|
}, St = /* @__PURE__ */ C(Ct, [["render", vt]]), Bt = { class: "w-app" };
|
|
1485
|
-
function _t(e, t, i,
|
|
1486
|
-
return
|
|
1499
|
+
function _t(e, t, i, s, a, l) {
|
|
1500
|
+
return o(), u("div", Bt, [
|
|
1487
1501
|
c(e.$slots, "default")
|
|
1488
1502
|
]);
|
|
1489
1503
|
}
|
|
@@ -1504,14 +1518,14 @@ const $t = {
|
|
|
1504
1518
|
textRight: { type: Boolean }
|
|
1505
1519
|
}
|
|
1506
1520
|
}, It = /* @__PURE__ */ C($t, [["render", _t]]), Vt = { class: "w-badge-wrap" };
|
|
1507
|
-
function Tt(e, t, i,
|
|
1508
|
-
return
|
|
1521
|
+
function Tt(e, t, i, s, a, l) {
|
|
1522
|
+
return o(), u("div", Vt, [
|
|
1509
1523
|
c(e.$slots, "default"),
|
|
1510
1524
|
T(O, {
|
|
1511
1525
|
name: `${i.transition}`
|
|
1512
1526
|
}, {
|
|
1513
1527
|
default: f(() => [
|
|
1514
|
-
i.modelValue ? (
|
|
1528
|
+
i.modelValue ? (o(), u("div", {
|
|
1515
1529
|
key: 0,
|
|
1516
1530
|
class: m(["w-badge", l.classes]),
|
|
1517
1531
|
style: R(l.styles),
|
|
@@ -1593,18 +1607,18 @@ const Lt = {
|
|
|
1593
1607
|
}
|
|
1594
1608
|
}
|
|
1595
1609
|
}, Rt = /* @__PURE__ */ C(Lt, [["render", Tt]]), xt = ["innerHTML"];
|
|
1596
|
-
function Ot(e, t, i,
|
|
1610
|
+
function Ot(e, t, i, s, a, l) {
|
|
1597
1611
|
const n = $("w-icon");
|
|
1598
|
-
return
|
|
1612
|
+
return o(), u("div", {
|
|
1599
1613
|
class: m(["w-breadcrumbs", l.classes])
|
|
1600
1614
|
}, [
|
|
1601
|
-
(
|
|
1602
|
-
d && e.$slots.separator ? (
|
|
1615
|
+
(o(!0), u(v, null, x(i.items, (r, d) => (o(), u(v, null, [
|
|
1616
|
+
d && e.$slots.separator ? (o(), u("span", {
|
|
1603
1617
|
class: m(["w-breadcrumbs__separator", i.separatorColor]),
|
|
1604
1618
|
key: `${d}a`
|
|
1605
1619
|
}, [
|
|
1606
1620
|
c(e.$slots, "separator", { index: d })
|
|
1607
|
-
], 2)) : d ? (
|
|
1621
|
+
], 2)) : d ? (o(), b(n, {
|
|
1608
1622
|
class: m(["w-breadcrumbs__separator", i.separatorColor]),
|
|
1609
1623
|
key: `${d}b`
|
|
1610
1624
|
}, {
|
|
@@ -1613,8 +1627,8 @@ function Ot(e, t, i, o, s, l) {
|
|
|
1613
1627
|
]),
|
|
1614
1628
|
_: 2
|
|
1615
1629
|
}, 1032, ["class"])) : p("", !0),
|
|
1616
|
-
r[i.itemRouteKey] && (d < i.items.length - 1 || i.linkLastItem) ? (
|
|
1617
|
-
e.$slots.item ? (
|
|
1630
|
+
r[i.itemRouteKey] && (d < i.items.length - 1 || i.linkLastItem) ? (o(), u(v, { key: 2 }, [
|
|
1631
|
+
e.$slots.item ? (o(), b(L(l.hasRouter ? "router-link" : "a"), {
|
|
1618
1632
|
class: m(["w-breadcrumbs__item", i.color || null]),
|
|
1619
1633
|
key: `${d}c`,
|
|
1620
1634
|
to: l.hasRouter && r[i.itemRouteKey],
|
|
@@ -1628,7 +1642,7 @@ function Ot(e, t, i, o, s, l) {
|
|
|
1628
1642
|
})
|
|
1629
1643
|
]),
|
|
1630
1644
|
_: 2
|
|
1631
|
-
}, 1032, ["to", "href", "class"])) : (
|
|
1645
|
+
}, 1032, ["to", "href", "class"])) : (o(), b(L(l.hasRouter ? "router-link" : "a"), {
|
|
1632
1646
|
class: m(["w-breadcrumbs__item", i.color || null]),
|
|
1633
1647
|
key: `${d}d`,
|
|
1634
1648
|
to: l.hasRouter && r[i.itemRouteKey],
|
|
@@ -1640,7 +1654,7 @@ function Ot(e, t, i, o, s, l) {
|
|
|
1640
1654
|
item: r,
|
|
1641
1655
|
index: d + 1,
|
|
1642
1656
|
isLast: d === i.items.length - 1
|
|
1643
|
-
}) : (
|
|
1657
|
+
}) : (o(), u("span", {
|
|
1644
1658
|
key: `${d}f`,
|
|
1645
1659
|
innerHTML: r[i.itemLabelKey]
|
|
1646
1660
|
}, null, 8, xt))
|
|
@@ -1682,16 +1696,16 @@ const Pt = {
|
|
|
1682
1696
|
key: 0,
|
|
1683
1697
|
class: "w-button__loader"
|
|
1684
1698
|
};
|
|
1685
|
-
function Et(e, t, i,
|
|
1699
|
+
function Et(e, t, i, s, a, l) {
|
|
1686
1700
|
const n = $("w-icon");
|
|
1687
|
-
return
|
|
1701
|
+
return o(), b(L(!i.disabled && i.route ? "a" : "button"), _({
|
|
1688
1702
|
class: ["w-button", l.classes],
|
|
1689
1703
|
type: !i.route && i.type,
|
|
1690
1704
|
href: !i.disabled && i.route && (l.externalLink ? i.route : l.resolvedRoute) || null,
|
|
1691
1705
|
disabled: !!i.disabled || null
|
|
1692
1706
|
}, l.attrs, { style: l.styles }), {
|
|
1693
1707
|
default: f(() => [
|
|
1694
|
-
i.icon ? (
|
|
1708
|
+
i.icon ? (o(), b(n, le(_({ key: 0 }, i.iconProps || {})), {
|
|
1695
1709
|
default: f(() => [
|
|
1696
1710
|
B(S(i.icon), 1)
|
|
1697
1711
|
]),
|
|
@@ -1699,7 +1713,7 @@ function Et(e, t, i, o, s, l) {
|
|
|
1699
1713
|
}, 16)) : c(e.$slots, "default", { key: 1 }),
|
|
1700
1714
|
T(O, { name: "scale-fade" }, {
|
|
1701
1715
|
default: f(() => [
|
|
1702
|
-
i.loading ? (
|
|
1716
|
+
i.loading ? (o(), u("div", Mt, [
|
|
1703
1717
|
c(e.$slots, "loading", {}, () => [
|
|
1704
1718
|
t[0] || (t[0] = w("svg", { viewBox: "0 0 40 40" }, [
|
|
1705
1719
|
w("circle", {
|
|
@@ -1823,9 +1837,9 @@ const At = {
|
|
|
1823
1837
|
}
|
|
1824
1838
|
}
|
|
1825
1839
|
}, Wt = /* @__PURE__ */ C(At, [["render", Et]]), Nt = ["innerHTML"];
|
|
1826
|
-
function Kt(e, t, i,
|
|
1840
|
+
function Kt(e, t, i, s, a, l) {
|
|
1827
1841
|
const n = $("button-partial");
|
|
1828
|
-
return i.tooltip ? (
|
|
1842
|
+
return i.tooltip ? (o(), b(L("w-tooltip"), le(_({ key: 0 }, i.tooltipProps)), {
|
|
1829
1843
|
activator: f(({ on: r }) => [
|
|
1830
1844
|
T(n, _(l.buttonProps, ne(r)), {
|
|
1831
1845
|
default: f(() => [
|
|
@@ -1838,7 +1852,7 @@ function Kt(e, t, i, o, s, l) {
|
|
|
1838
1852
|
w("div", { innerHTML: i.tooltip }, null, 8, Nt)
|
|
1839
1853
|
]),
|
|
1840
1854
|
_: 3
|
|
1841
|
-
}, 16)) : (
|
|
1855
|
+
}, 16)) : (o(), b(n, le(_({ key: 1 }, l.buttonProps)), {
|
|
1842
1856
|
loading: f(() => [
|
|
1843
1857
|
c(e.$slots, "loading")
|
|
1844
1858
|
]),
|
|
@@ -1900,22 +1914,22 @@ const Dt = {
|
|
|
1900
1914
|
}
|
|
1901
1915
|
}
|
|
1902
1916
|
}, Ht = /* @__PURE__ */ C(Dt, [["render", Kt]]), Ft = ["innerHTML"];
|
|
1903
|
-
function jt(e, t, i,
|
|
1917
|
+
function jt(e, t, i, s, a, l) {
|
|
1904
1918
|
const n = $("w-image");
|
|
1905
|
-
return
|
|
1919
|
+
return o(), u("div", {
|
|
1906
1920
|
class: m(["w-card", l.classes])
|
|
1907
1921
|
}, [
|
|
1908
|
-
e.$slots.title ? (
|
|
1922
|
+
e.$slots.title ? (o(), u("div", {
|
|
1909
1923
|
key: 0,
|
|
1910
1924
|
class: m(["w-card__title", { "w-card__title--has-toolbar": e.$slots.title && l.titleHasToolbar, ...l.titleClasses }])
|
|
1911
1925
|
}, [
|
|
1912
1926
|
c(e.$slots, "title")
|
|
1913
|
-
], 2)) : i.title ? (
|
|
1927
|
+
], 2)) : i.title ? (o(), u("div", {
|
|
1914
1928
|
key: 1,
|
|
1915
1929
|
class: m(["w-card__title", { "w-card__title--has-toolbar": e.$slots.title && l.titleHasToolbar, ...l.titleClasses }]),
|
|
1916
1930
|
innerHTML: i.title
|
|
1917
1931
|
}, null, 10, Ft)) : p("", !0),
|
|
1918
|
-
i.image ? (
|
|
1932
|
+
i.image ? (o(), b(n, _({
|
|
1919
1933
|
key: 2,
|
|
1920
1934
|
class: "w-card__image",
|
|
1921
1935
|
src: i.image
|
|
@@ -1930,7 +1944,7 @@ function jt(e, t, i, o, s, l) {
|
|
|
1930
1944
|
}, [
|
|
1931
1945
|
c(e.$slots, "default")
|
|
1932
1946
|
], 2),
|
|
1933
|
-
e.$slots.actions ? (
|
|
1947
|
+
e.$slots.actions ? (o(), u("div", {
|
|
1934
1948
|
key: 3,
|
|
1935
1949
|
class: m(["w-card__actions", { "w-card__actions--has-toolbar": l.actionsHasToolbar }])
|
|
1936
1950
|
}, [
|
|
@@ -2037,12 +2051,12 @@ const Ut = {
|
|
|
2037
2051
|
}
|
|
2038
2052
|
}
|
|
2039
2053
|
}, Xt = ["id", "name", "checked", "disabled", "required", "tabindex", "aria-checked"], Yt = ["for"], Gt = ["for", "innerHTML"], Jt = ["for"], Qt = ["for", "innerHTML"];
|
|
2040
|
-
function Zt(e, t, i,
|
|
2041
|
-
return
|
|
2054
|
+
function Zt(e, t, i, s, a, l) {
|
|
2055
|
+
return o(), b(L(e.formRegister && !l.wCheckboxes ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: a.isChecked, disabled: e.isDisabled, readonly: e.isReadonly }, {
|
|
2042
2056
|
valid: e.valid,
|
|
2043
2057
|
"onUpdate:valid": t[5] || (t[5] = (n) => e.valid = n),
|
|
2044
2058
|
onReset: t[6] || (t[6] = (n) => {
|
|
2045
|
-
e.$emit("update:modelValue",
|
|
2059
|
+
e.$emit("update:modelValue", a.isChecked = null), e.$emit("input", null);
|
|
2046
2060
|
}),
|
|
2047
2061
|
class: l.classes
|
|
2048
2062
|
}), {
|
|
@@ -2052,7 +2066,7 @@ function Zt(e, t, i, o, s, l) {
|
|
|
2052
2066
|
id: `w-checkbox--${e._.uid}`,
|
|
2053
2067
|
type: "checkbox",
|
|
2054
2068
|
name: e.inputName,
|
|
2055
|
-
checked:
|
|
2069
|
+
checked: a.isChecked || null,
|
|
2056
2070
|
disabled: e.isDisabled || e.isReadonly || null,
|
|
2057
2071
|
required: e.required || null,
|
|
2058
2072
|
tabindex: e.tabindex || null,
|
|
@@ -2060,11 +2074,11 @@ function Zt(e, t, i, o, s, l) {
|
|
|
2060
2074
|
onBlur: t[1] || (t[1] = (n) => e.$emit("blur", n)),
|
|
2061
2075
|
onChange: t[2] || (t[2] = (n) => l.onInput()),
|
|
2062
2076
|
onKeypress: t[3] || (t[3] = A((...n) => l.onInput && l.onInput(...n), ["enter"])),
|
|
2063
|
-
"aria-checked":
|
|
2077
|
+
"aria-checked": a.isChecked || "false",
|
|
2064
2078
|
role: "checkbox"
|
|
2065
2079
|
}, null, 40, Xt),
|
|
2066
|
-
l.hasLabel && i.labelOnLeft ? (
|
|
2067
|
-
e.$slots.default ? (
|
|
2080
|
+
l.hasLabel && i.labelOnLeft ? (o(), u(v, { key: 0 }, [
|
|
2081
|
+
e.$slots.default ? (o(), u("label", {
|
|
2068
2082
|
key: 0,
|
|
2069
2083
|
class: m(["w-checkbox__label w-form-el-shakable pr2", e.labelClasses]),
|
|
2070
2084
|
for: `w-checkbox--${e._.uid}`
|
|
@@ -2072,7 +2086,7 @@ function Zt(e, t, i, o, s, l) {
|
|
|
2072
2086
|
c(e.$slots, "default", {}, () => [
|
|
2073
2087
|
B(S(i.label), 1)
|
|
2074
2088
|
])
|
|
2075
|
-
], 10, Yt)) : i.label ? (
|
|
2089
|
+
], 10, Yt)) : i.label ? (o(), u("label", {
|
|
2076
2090
|
key: 1,
|
|
2077
2091
|
class: m(["w-checkbox__label w-form-el-shakable pr2", e.labelClasses]),
|
|
2078
2092
|
for: `w-checkbox--${e._.uid}`,
|
|
@@ -2089,8 +2103,8 @@ function Zt(e, t, i, o, s, l) {
|
|
|
2089
2103
|
w("polyline", { points: "1 5 4 8 10 2" })
|
|
2090
2104
|
], -1)
|
|
2091
2105
|
]), 2),
|
|
2092
|
-
l.hasLabel && !i.labelOnLeft ? (
|
|
2093
|
-
e.$slots.default ? (
|
|
2106
|
+
l.hasLabel && !i.labelOnLeft ? (o(), u(v, { key: 1 }, [
|
|
2107
|
+
e.$slots.default ? (o(), u("label", {
|
|
2094
2108
|
key: 0,
|
|
2095
2109
|
class: m(["w-checkbox__label w-form-el-shakable pl2", e.labelClasses]),
|
|
2096
2110
|
for: `w-checkbox--${e._.uid}`
|
|
@@ -2098,7 +2112,7 @@ function Zt(e, t, i, o, s, l) {
|
|
|
2098
2112
|
c(e.$slots, "default", {}, () => [
|
|
2099
2113
|
B(S(i.label), 1)
|
|
2100
2114
|
])
|
|
2101
|
-
], 10, Jt)) : i.label ? (
|
|
2115
|
+
], 10, Jt)) : i.label ? (o(), u("label", {
|
|
2102
2116
|
key: 1,
|
|
2103
2117
|
class: m(["w-checkbox__label w-form-el-shakable pl2", e.labelClasses]),
|
|
2104
2118
|
for: `w-checkbox--${e._.uid}`,
|
|
@@ -2177,9 +2191,9 @@ const ei = {
|
|
|
2177
2191
|
}
|
|
2178
2192
|
}
|
|
2179
2193
|
}, ti = /* @__PURE__ */ C(ei, [["render", Zt]]), ii = ["innerHTML"];
|
|
2180
|
-
function li(e, t, i,
|
|
2194
|
+
function li(e, t, i, s, a, l) {
|
|
2181
2195
|
const n = $("w-checkbox");
|
|
2182
|
-
return
|
|
2196
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: l.checkboxItems.some((r) => r._isChecked), disabled: e.isDisabled }, {
|
|
2183
2197
|
valid: e.valid,
|
|
2184
2198
|
"onUpdate:valid": t[1] || (t[1] = (r) => e.valid = r),
|
|
2185
2199
|
onReset: l.reset,
|
|
@@ -2188,7 +2202,7 @@ function li(e, t, i, o, s, l) {
|
|
|
2188
2202
|
class: l.classes
|
|
2189
2203
|
}), {
|
|
2190
2204
|
default: f(() => [
|
|
2191
|
-
(
|
|
2205
|
+
(o(!0), u(v, null, x(l.checkboxItems, (r, d) => (o(), b(n, _({
|
|
2192
2206
|
key: d,
|
|
2193
2207
|
"model-value": r._isChecked,
|
|
2194
2208
|
"onUpdate:modelValue": (h) => l.toggleCheck(r, h),
|
|
@@ -2207,7 +2221,7 @@ function li(e, t, i, o, s, l) {
|
|
|
2207
2221
|
checked: !!r._isChecked,
|
|
2208
2222
|
index: d + 1,
|
|
2209
2223
|
innerHTML: r.label
|
|
2210
|
-
}) : r.label ? (
|
|
2224
|
+
}) : r.label ? (o(), u("div", {
|
|
2211
2225
|
key: 1,
|
|
2212
2226
|
innerHTML: r.label
|
|
2213
2227
|
}, null, 8, ii)) : p("", !0)
|
|
@@ -2273,7 +2287,7 @@ const si = {
|
|
|
2273
2287
|
},
|
|
2274
2288
|
toggleCheck(e, t) {
|
|
2275
2289
|
e._isChecked = t;
|
|
2276
|
-
const i = this.checkboxItems.filter((
|
|
2290
|
+
const i = this.checkboxItems.filter((s) => s._isChecked).map((s) => this.returnValues ? s.returnValue : s.value);
|
|
2277
2291
|
this.$emit("update:modelValue", i), this.$emit("input", i);
|
|
2278
2292
|
},
|
|
2279
2293
|
// Return the original item (so there is no `_index`, etc.).
|
|
@@ -2282,9 +2296,9 @@ const si = {
|
|
|
2282
2296
|
}
|
|
2283
2297
|
}
|
|
2284
2298
|
}, oi = /* @__PURE__ */ C(si, [["render", li]]);
|
|
2285
|
-
function ai(e, t, i,
|
|
2299
|
+
function ai(e, t, i, s, a, l) {
|
|
2286
2300
|
const n = $("w-button"), r = $("w-flex"), d = $("w-menu"), h = ke("focus");
|
|
2287
|
-
return
|
|
2301
|
+
return o(), b(d, _({
|
|
2288
2302
|
modelValue: e.showPopup,
|
|
2289
2303
|
"onUpdate:modelValue": t[2] || (t[2] = (y) => e.showPopup = y)
|
|
2290
2304
|
}, l.wMenuProps), {
|
|
@@ -2310,7 +2324,7 @@ function ai(e, t, i, o, s, l) {
|
|
|
2310
2324
|
w("div", {
|
|
2311
2325
|
class: m(["w-flex justify-end", i.inline ? "ml2" : "mt2"])
|
|
2312
2326
|
}, [
|
|
2313
|
-
i.cancel !== !1 ? (
|
|
2327
|
+
i.cancel !== !1 ? (o(), b(n, _({
|
|
2314
2328
|
key: 0,
|
|
2315
2329
|
class: "mr2"
|
|
2316
2330
|
}, l.cancelButtonProps, {
|
|
@@ -2325,7 +2339,7 @@ function ai(e, t, i, o, s, l) {
|
|
|
2325
2339
|
]),
|
|
2326
2340
|
_: 3
|
|
2327
2341
|
}, 16, ["bg-color", "onClick"])) : p("", !0),
|
|
2328
|
-
W((
|
|
2342
|
+
W((o(), b(n, _(l.confirmButtonProps, {
|
|
2329
2343
|
"bg-color": (l.confirmButton || {}).bgColor || "success",
|
|
2330
2344
|
onKeyup: t[1] || (t[1] = A((y) => !i.persistent && l.onCancel(), ["escape"])),
|
|
2331
2345
|
onClick: l.onConfirm
|
|
@@ -2461,8 +2475,8 @@ const ni = {
|
|
|
2461
2475
|
}
|
|
2462
2476
|
}
|
|
2463
2477
|
}, ri = /* @__PURE__ */ C(ni, [["render", ai]]);
|
|
2464
|
-
function di(e, t, i,
|
|
2465
|
-
return
|
|
2478
|
+
function di(e, t, i, s, a, l) {
|
|
2479
|
+
return o(), u("div", {
|
|
2466
2480
|
class: m(["w-date-picker", l.classes]),
|
|
2467
2481
|
style: R(l.styles)
|
|
2468
2482
|
}, [
|
|
@@ -2488,11 +2502,11 @@ const ui = {
|
|
|
2488
2502
|
}
|
|
2489
2503
|
}
|
|
2490
2504
|
}, hi = /* @__PURE__ */ C(ui, [["render", di]]);
|
|
2491
|
-
function ci(e, t, i,
|
|
2505
|
+
function ci(e, t, i, s, a, l) {
|
|
2492
2506
|
const n = $("w-card"), r = $("w-overlay");
|
|
2493
|
-
return
|
|
2507
|
+
return o(), b(r, {
|
|
2494
2508
|
class: m(["w-dialog", l.classes]),
|
|
2495
|
-
"model-value":
|
|
2509
|
+
"model-value": a.showWrapper,
|
|
2496
2510
|
persistent: i.persistent,
|
|
2497
2511
|
"persistent-no-animation": i.persistentNoAnimation,
|
|
2498
2512
|
onClick: l.onOutsideClick,
|
|
@@ -2538,7 +2552,7 @@ function ci(e, t, i, o, s, l) {
|
|
|
2538
2552
|
key: "1"
|
|
2539
2553
|
} : void 0
|
|
2540
2554
|
]), 1032, ["color", "bg-color", "class", "title-class", "content-class", "title", "style"]), [
|
|
2541
|
-
[re,
|
|
2555
|
+
[re, a.showContent]
|
|
2542
2556
|
])
|
|
2543
2557
|
]),
|
|
2544
2558
|
_: 3
|
|
@@ -2627,8 +2641,8 @@ const pi = {
|
|
|
2627
2641
|
}
|
|
2628
2642
|
}
|
|
2629
2643
|
}, mi = /* @__PURE__ */ C(pi, [["render", ci]]), fi = ["role", "aria-orientation"];
|
|
2630
|
-
function gi(e, t, i,
|
|
2631
|
-
return
|
|
2644
|
+
function gi(e, t, i, s, a, l) {
|
|
2645
|
+
return o(), u("div", {
|
|
2632
2646
|
class: m(["w-divider", l.classes]),
|
|
2633
2647
|
role: e.$slots.default ? null : "presentation",
|
|
2634
2648
|
"aria-orientation": i.vertical ? "vertical" : "horizontal"
|
|
@@ -2657,22 +2671,22 @@ const bi = {
|
|
|
2657
2671
|
}
|
|
2658
2672
|
}
|
|
2659
2673
|
}, yi = /* @__PURE__ */ C(bi, [["render", gi]]), wi = { class: "w-drawer-wrap__pushable" };
|
|
2660
|
-
function ki(e, t, i,
|
|
2674
|
+
function ki(e, t, i, s, a, l) {
|
|
2661
2675
|
const n = $("w-overlay");
|
|
2662
|
-
return
|
|
2676
|
+
return a.showWrapper || i.pushContent ? (o(), u("div", {
|
|
2663
2677
|
key: 0,
|
|
2664
2678
|
class: m(["w-drawer-wrap", l.wrapperClasses])
|
|
2665
2679
|
}, [
|
|
2666
|
-
i.pushContent ? (
|
|
2680
|
+
i.pushContent ? (o(), u("div", {
|
|
2667
2681
|
key: 0,
|
|
2668
2682
|
class: "w-drawer-wrap__track",
|
|
2669
2683
|
style: R(l.trackStyles)
|
|
2670
2684
|
}, [
|
|
2671
2685
|
w("div", wi, [
|
|
2672
|
-
i.noOverlay ? p("", !0) : (
|
|
2686
|
+
i.noOverlay ? p("", !0) : (o(), b(n, {
|
|
2673
2687
|
key: 0,
|
|
2674
|
-
modelValue:
|
|
2675
|
-
"onUpdate:modelValue": t[0] || (t[0] = (r) =>
|
|
2688
|
+
modelValue: a.showDrawer,
|
|
2689
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => a.showDrawer = r),
|
|
2676
2690
|
onClick: l.onOutsideClick,
|
|
2677
2691
|
persistent: i.persistent,
|
|
2678
2692
|
"persistent-no-animation": "",
|
|
@@ -2687,7 +2701,7 @@ function ki(e, t, i, o, s, l) {
|
|
|
2687
2701
|
onAfterLeave: l.onClose
|
|
2688
2702
|
}, {
|
|
2689
2703
|
default: f(() => [
|
|
2690
|
-
|
|
2704
|
+
a.showDrawer ? (o(), b(L(i.tag || "aside"), {
|
|
2691
2705
|
key: 0,
|
|
2692
2706
|
class: m(["w-drawer", l.drawerClasses]),
|
|
2693
2707
|
ref: "drawer",
|
|
@@ -2701,11 +2715,11 @@ function ki(e, t, i, o, s, l) {
|
|
|
2701
2715
|
]),
|
|
2702
2716
|
_: 3
|
|
2703
2717
|
}, 8, ["onBeforeLeave", "onAfterLeave"])
|
|
2704
|
-
], 4)) : (
|
|
2705
|
-
i.noOverlay ? p("", !0) : (
|
|
2718
|
+
], 4)) : (o(), u(v, { key: 1 }, [
|
|
2719
|
+
i.noOverlay ? p("", !0) : (o(), b(n, {
|
|
2706
2720
|
key: 0,
|
|
2707
|
-
modelValue:
|
|
2708
|
-
"onUpdate:modelValue": t[1] || (t[1] = (r) =>
|
|
2721
|
+
modelValue: a.showDrawer,
|
|
2722
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => a.showDrawer = r),
|
|
2709
2723
|
onClick: l.onOutsideClick,
|
|
2710
2724
|
persistent: i.persistent,
|
|
2711
2725
|
"persistent-no-animation": "",
|
|
@@ -2719,7 +2733,7 @@ function ki(e, t, i, o, s, l) {
|
|
|
2719
2733
|
onAfterLeave: l.onClose
|
|
2720
2734
|
}, {
|
|
2721
2735
|
default: f(() => [
|
|
2722
|
-
|
|
2736
|
+
a.showDrawer ? (o(), b(L(i.tag || "aside"), {
|
|
2723
2737
|
key: 0,
|
|
2724
2738
|
class: m(["w-drawer", l.drawerClasses]),
|
|
2725
2739
|
ref: "drawer",
|
|
@@ -2850,8 +2864,8 @@ const vi = { left: "right", right: "left", top: "down", bottom: "up" }, Ci = {
|
|
|
2850
2864
|
}
|
|
2851
2865
|
}
|
|
2852
2866
|
}, Si = /* @__PURE__ */ C(Ci, [["render", ki]]);
|
|
2853
|
-
function Bi(e, t, i,
|
|
2854
|
-
return
|
|
2867
|
+
function Bi(e, t, i, s, a, l) {
|
|
2868
|
+
return o(), b(L(i.tag), {
|
|
2855
2869
|
class: m(["w-flex", l.classes])
|
|
2856
2870
|
}, {
|
|
2857
2871
|
default: f(() => [
|
|
@@ -2908,8 +2922,8 @@ const _i = {
|
|
|
2908
2922
|
}
|
|
2909
2923
|
}
|
|
2910
2924
|
}, $i = /* @__PURE__ */ C(_i, [["render", Bi]]);
|
|
2911
|
-
function Ii(e, t, i,
|
|
2912
|
-
return
|
|
2925
|
+
function Ii(e, t, i, s, a, l) {
|
|
2926
|
+
return o(), u("form", {
|
|
2913
2927
|
class: m(["w-form", l.classes]),
|
|
2914
2928
|
onSubmit: t[0] || (t[0] = (...n) => l.onSubmit && l.onSubmit(...n)),
|
|
2915
2929
|
onReset: t[1] || (t[1] = (...n) => l.reset && l.reset(...n)),
|
|
@@ -2991,8 +3005,8 @@ const Vi = async (e, t) => {
|
|
|
2991
3005
|
let t = 0;
|
|
2992
3006
|
return await (async () => {
|
|
2993
3007
|
var i;
|
|
2994
|
-
for (const
|
|
2995
|
-
!((i =
|
|
3008
|
+
for (const s of this.formElements)
|
|
3009
|
+
!((i = s.validators) != null && i.length) || s.disabled || s.readonly || (await this.checkElementValidators(s), t += ~~!s.Validation.isValid, s.$emit("update:valid", s.Validation.isValid));
|
|
2996
3010
|
})(), this.updateErrorsCount(t), this.status = !t, this.$emit("validate", { e, errorsCount: t }), this.$emit(this.status ? "success" : "error", { e, errorsCount: t }), this.status;
|
|
2997
3011
|
},
|
|
2998
3012
|
async validateElement(e) {
|
|
@@ -3002,9 +3016,9 @@ const Vi = async (e, t) => {
|
|
|
3002
3016
|
// message in the form element.
|
|
3003
3017
|
async checkElementValidators(e) {
|
|
3004
3018
|
let t = !1, i = "";
|
|
3005
|
-
await Vi(e.validators, async (
|
|
3006
|
-
const
|
|
3007
|
-
return t = typeof
|
|
3019
|
+
await Vi(e.validators, async (s) => {
|
|
3020
|
+
const a = await (typeof s == "function" && s(e.inputValue));
|
|
3021
|
+
return t = typeof a != "string", i = t ? "" : a, !t;
|
|
3008
3022
|
}), e.hasJustReset = !1, e.Validation.isValid = t, e.Validation.message = i;
|
|
3009
3023
|
},
|
|
3010
3024
|
// Reset is called from:
|
|
@@ -3014,7 +3028,7 @@ const Vi = async (e, t) => {
|
|
|
3014
3028
|
this.status = null, this.formElements.forEach((t) => t.reset()), this.updateErrorsCount(0, !0), this.$emit("reset", e);
|
|
3015
3029
|
},
|
|
3016
3030
|
updateErrorsCount(e = null, t = !1) {
|
|
3017
|
-
this.errorsCount = e !== null ? e : this.formElements.reduce((i,
|
|
3031
|
+
this.errorsCount = e !== null ? e : this.formElements.reduce((i, s) => i + ~~(s.Validation.isValid === !1), 0), this.status = t ? null : !this.errorsCount, this.$emit("update:modelValue", this.status), this.$emit("input", this.status), this.$emit("update:errorsCount", this.errorsCount);
|
|
3018
3032
|
},
|
|
3019
3033
|
onSubmit(e) {
|
|
3020
3034
|
this.validate(e), this.$emit("submit", e), (!this.allowSubmit || !this.status) && e.preventDefault();
|
|
@@ -3029,9 +3043,9 @@ const Vi = async (e, t) => {
|
|
|
3029
3043
|
}
|
|
3030
3044
|
}
|
|
3031
3045
|
}, Li = /* @__PURE__ */ C(Ti, [["render", Ii]]);
|
|
3032
|
-
function Ri(e, t, i,
|
|
3046
|
+
function Ri(e, t, i, s, a, l) {
|
|
3033
3047
|
const n = $("w-transition-expand");
|
|
3034
|
-
return
|
|
3048
|
+
return o(), u("div", {
|
|
3035
3049
|
class: m(l.classes)
|
|
3036
3050
|
}, [
|
|
3037
3051
|
w("div", {
|
|
@@ -3041,7 +3055,7 @@ function Ri(e, t, i, o, s, l) {
|
|
|
3041
3055
|
], 2),
|
|
3042
3056
|
T(n, { y: "" }, {
|
|
3043
3057
|
default: f(() => [
|
|
3044
|
-
e.Validation.message ? (
|
|
3058
|
+
e.Validation.message ? (o(), u("div", {
|
|
3045
3059
|
key: 0,
|
|
3046
3060
|
class: m(["w-form-el__error", l.formProps.validationColor])
|
|
3047
3061
|
}, [
|
|
@@ -3130,8 +3144,8 @@ const xi = {
|
|
|
3130
3144
|
this.formUnregister && this.formUnregister(this);
|
|
3131
3145
|
}
|
|
3132
3146
|
}, Oi = /* @__PURE__ */ C(xi, [["render", Ri]]);
|
|
3133
|
-
function Pi(e, t, i,
|
|
3134
|
-
return
|
|
3147
|
+
function Pi(e, t, i, s, a, l) {
|
|
3148
|
+
return o(), b(L(i.tag), {
|
|
3135
3149
|
class: m(["w-grid", l.classes])
|
|
3136
3150
|
}, {
|
|
3137
3151
|
default: f(() => [
|
|
@@ -3176,24 +3190,24 @@ const zi = {
|
|
|
3176
3190
|
},
|
|
3177
3191
|
classes() {
|
|
3178
3192
|
let e = null;
|
|
3179
|
-
typeof this.columns == "object" && (e = Object.entries(this.breakpointsColumns).reduce((i, [
|
|
3193
|
+
typeof this.columns == "object" && (e = Object.entries(this.breakpointsColumns).reduce((i, [s, a]) => (i[`${s}-columns${a}`] = !0, i), {}));
|
|
3180
3194
|
let t = null;
|
|
3181
|
-
return typeof this.gap == "object" && (t = Object.entries(this.breakpointsGap).reduce((i, [
|
|
3195
|
+
return typeof this.gap == "object" && (t = Object.entries(this.breakpointsGap).reduce((i, [s, a]) => (i[`${s}-gap${a}`] = !0, i), {})), {
|
|
3182
3196
|
...e || { [`columns${this.columns}`]: this.columns },
|
|
3183
3197
|
...t || { [`gap${this.gap}`]: this.gap }
|
|
3184
3198
|
};
|
|
3185
3199
|
}
|
|
3186
3200
|
}
|
|
3187
3201
|
}, Mi = /* @__PURE__ */ C(zi, [["render", Pi]]);
|
|
3188
|
-
function Ei(e, t, i,
|
|
3189
|
-
return
|
|
3202
|
+
function Ei(e, t, i, s, a, l) {
|
|
3203
|
+
return o(), b(L(i.tag || "i"), {
|
|
3190
3204
|
class: m(["w-icon", l.classes]),
|
|
3191
3205
|
role: "icon",
|
|
3192
3206
|
"aria-hidden": "true",
|
|
3193
3207
|
style: R(l.readIcon() && l.styles)
|
|
3194
3208
|
}, {
|
|
3195
3209
|
default: f(() => [
|
|
3196
|
-
l.hasLigature ? (
|
|
3210
|
+
l.hasLigature ? (o(), u(v, { key: 0 }, [
|
|
3197
3211
|
B(S(e.icon), 1)
|
|
3198
3212
|
], 64)) : p("", !0)
|
|
3199
3213
|
]),
|
|
@@ -3273,9 +3287,9 @@ const Ai = {
|
|
|
3273
3287
|
key: 0,
|
|
3274
3288
|
class: "w-image__loader"
|
|
3275
3289
|
}, Ki = ["innerHTML"];
|
|
3276
|
-
function Di(e, t, i,
|
|
3290
|
+
function Di(e, t, i, s, a, l) {
|
|
3277
3291
|
const n = $("w-progress");
|
|
3278
|
-
return
|
|
3292
|
+
return o(), b(L(l.wrapperTag), {
|
|
3279
3293
|
class: m(["w-image", l.wrapperClasses]),
|
|
3280
3294
|
style: R(l.wrapperStyles)
|
|
3281
3295
|
}, {
|
|
@@ -3285,23 +3299,23 @@ function Di(e, t, i, o, s, l) {
|
|
|
3285
3299
|
appear: ""
|
|
3286
3300
|
}, {
|
|
3287
3301
|
default: f(() => [
|
|
3288
|
-
|
|
3302
|
+
a.loaded ? (o(), b(L(l.normalized.tag), {
|
|
3289
3303
|
key: 0,
|
|
3290
3304
|
class: m(["w-image__image", l.imageClasses]),
|
|
3291
3305
|
style: R(l.imageStyles),
|
|
3292
|
-
src: l.normalized.tag === "img" ?
|
|
3306
|
+
src: l.normalized.tag === "img" ? a.computedImg.src : null
|
|
3293
3307
|
}, null, 8, ["class", "style", "src"])) : p("", !0)
|
|
3294
3308
|
]),
|
|
3295
3309
|
_: 1
|
|
3296
3310
|
}, 8, ["name"]),
|
|
3297
|
-
!i.noSpinner &&
|
|
3298
|
-
e.$slots.loading ? c(e.$slots, "loading", { key: 0 }) : (
|
|
3311
|
+
!i.noSpinner && a.loading ? (o(), u("span", Ni, [
|
|
3312
|
+
e.$slots.loading ? c(e.$slots, "loading", { key: 0 }) : (o(), b(n, _({
|
|
3299
3313
|
key: 1,
|
|
3300
3314
|
circle: "",
|
|
3301
3315
|
indeterminate: ""
|
|
3302
3316
|
}, i.spinnerColor ? { color: i.spinnerColor } : {}), null, 16))
|
|
3303
3317
|
])) : p("", !0),
|
|
3304
|
-
e.$slots.default ? (
|
|
3318
|
+
e.$slots.default ? (o(), b(L(l.wrapperTag), {
|
|
3305
3319
|
key: 1,
|
|
3306
3320
|
class: m(["w-image__content", i.contentClass])
|
|
3307
3321
|
}, {
|
|
@@ -3310,12 +3324,12 @@ function Di(e, t, i, o, s, l) {
|
|
|
3310
3324
|
]),
|
|
3311
3325
|
_: 3
|
|
3312
3326
|
}, 8, ["class"])) : p("", !0),
|
|
3313
|
-
e.$slots.caption ? (
|
|
3327
|
+
e.$slots.caption ? (o(), u("figcaption", {
|
|
3314
3328
|
key: 2,
|
|
3315
3329
|
class: m(["w-image__caption caption", i.captionClass])
|
|
3316
3330
|
}, [
|
|
3317
3331
|
c(e.$slots, "caption")
|
|
3318
|
-
], 2)) : i.caption ? (
|
|
3332
|
+
], 2)) : i.caption ? (o(), u("figcaption", {
|
|
3319
3333
|
key: 3,
|
|
3320
3334
|
class: m(["w-image__caption caption", i.captionClass]),
|
|
3321
3335
|
innerHTML: i.caption
|
|
@@ -3386,13 +3400,13 @@ const Hi = {
|
|
|
3386
3400
|
wrapperStyles() {
|
|
3387
3401
|
let e = this.normalized.width;
|
|
3388
3402
|
const t = this.normalized.height;
|
|
3389
|
-
let i = this.normalized.maxWidth,
|
|
3390
|
-
return
|
|
3403
|
+
let i = this.normalized.maxWidth, s = this.normalized.ratio;
|
|
3404
|
+
return s && !e && !t ? e = "100%" : !e && !t ? (e = "100%", i = this.normalized.maxWidth || `${this.computedImg.width}px`, s = s || this.computedImg.width / this.computedImg.height) : (e && !t || t && !e) && (s = s || this.computedImg.width / this.computedImg.height), {
|
|
3391
3405
|
width: e,
|
|
3392
3406
|
height: t,
|
|
3393
3407
|
maxWidth: i,
|
|
3394
3408
|
maxHeight: this.normalized.maxHeight,
|
|
3395
|
-
aspectRatio:
|
|
3409
|
+
aspectRatio: s
|
|
3396
3410
|
};
|
|
3397
3411
|
},
|
|
3398
3412
|
imageClasses() {
|
|
@@ -3413,8 +3427,8 @@ const Hi = {
|
|
|
3413
3427
|
if (!this.loading)
|
|
3414
3428
|
return this.loading = !0, this.loaded = !1, this.$emit("loading", e ? this.fallback : this.src), new Promise((t) => {
|
|
3415
3429
|
const i = new Image();
|
|
3416
|
-
i.onload = (
|
|
3417
|
-
this.$emit("error",
|
|
3430
|
+
i.onload = (s) => (this.computedImg.width = s.target.width, this.computedImg.height = s.target.height, this.computedImg.ratio = s.target.height / s.target.width, this.loading = !1, this.loaded = !0, this.computedImg.src = e ? this.fallback : this.src, this.$emit("loaded", this.computedImg.src), t(i)), i.onerror = (s) => {
|
|
3431
|
+
this.$emit("error", s), this.fallback && !e ? (this.loading = !1, this.loadImage(!0)) : (this.loading = !1, this.loaded = !1);
|
|
3418
3432
|
}, i.src = e ? this.fallback : this.src;
|
|
3419
3433
|
});
|
|
3420
3434
|
}
|
|
@@ -3437,29 +3451,29 @@ const Hi = {
|
|
|
3437
3451
|
class: "w-input__no-file",
|
|
3438
3452
|
key: "no-file"
|
|
3439
3453
|
}, Gi = ["for"], Ji = ["src"], Qi = ["for"];
|
|
3440
|
-
function Zi(e, t, i,
|
|
3454
|
+
function Zi(e, t, i, s, a, l) {
|
|
3441
3455
|
const n = $("w-icon"), r = $("w-progress");
|
|
3442
|
-
return
|
|
3456
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: a.inputValue, disabled: e.isDisabled, readonly: e.isReadonly, isFocused: a.isFocused }, {
|
|
3443
3457
|
valid: e.valid,
|
|
3444
3458
|
"onUpdate:valid": t[10] || (t[10] = (d) => e.valid = d),
|
|
3445
3459
|
onReset: t[11] || (t[11] = (d) => {
|
|
3446
|
-
e.$emit("update:modelValue",
|
|
3460
|
+
e.$emit("update:modelValue", a.inputValue = ""), e.$emit("input", "");
|
|
3447
3461
|
}),
|
|
3448
3462
|
wrap: l.hasLabel && i.labelPosition !== "inside",
|
|
3449
3463
|
class: l.classes,
|
|
3450
3464
|
style: e.$attrs.style
|
|
3451
3465
|
}), {
|
|
3452
3466
|
default: f(() => [
|
|
3453
|
-
i.type === "hidden" ? W((
|
|
3467
|
+
i.type === "hidden" ? W((o(), u("input", {
|
|
3454
3468
|
key: 0,
|
|
3455
3469
|
type: "hidden",
|
|
3456
3470
|
name: e.name || null,
|
|
3457
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) =>
|
|
3471
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => a.inputValue = d)
|
|
3458
3472
|
}, null, 8, ji)), [
|
|
3459
|
-
[ve,
|
|
3460
|
-
]) : (
|
|
3461
|
-
i.labelPosition === "left" ? (
|
|
3462
|
-
e.$slots.default || i.label ? (
|
|
3473
|
+
[ve, a.inputValue]
|
|
3474
|
+
]) : (o(), u(v, { key: 1 }, [
|
|
3475
|
+
i.labelPosition === "left" ? (o(), u(v, { key: 0 }, [
|
|
3476
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
3463
3477
|
key: 0,
|
|
3464
3478
|
class: m(["w-input__label w-input__label--left w-form-el-shakable", e.labelClasses]),
|
|
3465
3479
|
for: `w-input--${e._.uid}`
|
|
@@ -3475,7 +3489,7 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3475
3489
|
c(e.$slots, "icon-left", {
|
|
3476
3490
|
inputId: `w-input--${e._.uid}`
|
|
3477
3491
|
}, () => [
|
|
3478
|
-
i.innerIconLeft ? (
|
|
3492
|
+
i.innerIconLeft ? (o(), b(n, {
|
|
3479
3493
|
key: 0,
|
|
3480
3494
|
class: "w-input__icon w-input__icon--inner-left",
|
|
3481
3495
|
tag: "label",
|
|
@@ -3488,11 +3502,11 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3488
3502
|
_: 1
|
|
3489
3503
|
}, 8, ["for"])) : p("", !0)
|
|
3490
3504
|
]),
|
|
3491
|
-
i.type !== "file" ? W((
|
|
3505
|
+
i.type !== "file" ? W((o(), u("input", _({
|
|
3492
3506
|
key: 0,
|
|
3493
3507
|
class: "w-input__input",
|
|
3494
3508
|
ref: "input",
|
|
3495
|
-
"onUpdate:modelValue": t[2] || (t[2] = (d) =>
|
|
3509
|
+
"onUpdate:modelValue": t[2] || (t[2] = (d) => a.inputValue = d),
|
|
3496
3510
|
onInput: t[3] || (t[3] = (...d) => l.onInput && l.onInput(...d)),
|
|
3497
3511
|
onFocus: t[4] || (t[4] = (...d) => l.onFocus && l.onFocus(...d)),
|
|
3498
3512
|
onBlur: t[5] || (t[5] = (...d) => l.onBlur && l.onBlur(...d)),
|
|
@@ -3511,8 +3525,8 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3511
3525
|
required: e.required || null,
|
|
3512
3526
|
tabindex: e.tabindex || null
|
|
3513
3527
|
}, l.attrs), null, 16, qi)), [
|
|
3514
|
-
[xe,
|
|
3515
|
-
]) : (
|
|
3528
|
+
[xe, a.inputValue]
|
|
3529
|
+
]) : (o(), u(v, { key: 1 }, [
|
|
3516
3530
|
w("input", _({
|
|
3517
3531
|
ref: "input",
|
|
3518
3532
|
id: `w-input--${e._.uid}`,
|
|
@@ -3534,18 +3548,18 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3534
3548
|
for: `w-input--${e._.uid}`
|
|
3535
3549
|
}, {
|
|
3536
3550
|
default: f(() => [
|
|
3537
|
-
!
|
|
3551
|
+
!a.inputFiles.length && a.isFocused ? (o(), u("span", Yi, [
|
|
3538
3552
|
c(e.$slots, "no-file", {}, () => [
|
|
3539
|
-
e.$slots["no-file"] === void 0 ? (
|
|
3553
|
+
e.$slots["no-file"] === void 0 ? (o(), u(v, { key: 0 }, [
|
|
3540
3554
|
B("No file")
|
|
3541
3555
|
], 64)) : p("", !0)
|
|
3542
3556
|
])
|
|
3543
3557
|
])) : p("", !0),
|
|
3544
|
-
(
|
|
3558
|
+
(o(!0), u(v, null, x(a.inputFiles, (d, h) => (o(), u("span", {
|
|
3545
3559
|
key: d.lastModified
|
|
3546
3560
|
}, [
|
|
3547
3561
|
B(S(h ? ", " : ""), 1),
|
|
3548
|
-
(
|
|
3562
|
+
(o(), u("span", {
|
|
3549
3563
|
class: "filename",
|
|
3550
3564
|
key: `${h}b`
|
|
3551
3565
|
}, S(d.base), 1)),
|
|
@@ -3555,8 +3569,8 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3555
3569
|
_: 3
|
|
3556
3570
|
}, 8, ["for"])
|
|
3557
3571
|
], 64)),
|
|
3558
|
-
i.labelPosition === "inside" && l.showLabelInside ? (
|
|
3559
|
-
e.$slots.default || i.label ? (
|
|
3572
|
+
i.labelPosition === "inside" && l.showLabelInside ? (o(), u(v, { key: 2 }, [
|
|
3573
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
3560
3574
|
key: 0,
|
|
3561
3575
|
class: m(["w-input__label w-input__label--inside w-form-el-shakable", e.labelClasses])
|
|
3562
3576
|
}, [
|
|
@@ -3568,7 +3582,7 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3568
3582
|
c(e.$slots, "icon-right", {
|
|
3569
3583
|
inputId: `w-input--${e._.uid}`
|
|
3570
3584
|
}, () => [
|
|
3571
|
-
i.innerIconRight ? (
|
|
3585
|
+
i.innerIconRight ? (o(), b(n, {
|
|
3572
3586
|
key: 0,
|
|
3573
3587
|
class: "w-input__icon w-input__icon--inner-right",
|
|
3574
3588
|
tag: "label",
|
|
@@ -3581,7 +3595,7 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3581
3595
|
_: 1
|
|
3582
3596
|
}, 8, ["for"])) : p("", !0)
|
|
3583
3597
|
]),
|
|
3584
|
-
l.hasLoading || i.showProgress && (l.uploadInProgress || l.uploadComplete) ? (
|
|
3598
|
+
l.hasLoading || i.showProgress && (l.uploadInProgress || l.uploadComplete) ? (o(), b(r, {
|
|
3585
3599
|
key: 3,
|
|
3586
3600
|
class: "fill-width",
|
|
3587
3601
|
size: "2",
|
|
@@ -3589,28 +3603,28 @@ function Zi(e, t, i, o, s, l) {
|
|
|
3589
3603
|
"model-value": i.showProgress ? (l.uploadInProgress || l.uploadComplete) && l.overallFilesProgress : l.loadingValue
|
|
3590
3604
|
}, null, 8, ["color", "model-value"])) : p("", !0)
|
|
3591
3605
|
], 2),
|
|
3592
|
-
i.type === "file" && i.preview &&
|
|
3606
|
+
i.type === "file" && i.preview && a.inputFiles.length ? (o(), u("label", {
|
|
3593
3607
|
key: 1,
|
|
3594
3608
|
class: "d-flex",
|
|
3595
3609
|
for: `w-input--${e._.uid}`
|
|
3596
3610
|
}, [
|
|
3597
|
-
(
|
|
3598
|
-
d.progress < 100 ? (
|
|
3611
|
+
(o(!0), u(v, null, x(a.inputFiles, (d, h) => (o(), u(v, null, [
|
|
3612
|
+
d.progress < 100 ? (o(), u("i", {
|
|
3599
3613
|
class: "w-icon wi-spinner w-icon--spin size--sm w-input__file-preview primary",
|
|
3600
3614
|
key: `${h}a`
|
|
3601
|
-
})) : d.preview ? (
|
|
3615
|
+
})) : d.preview ? (o(), u("img", {
|
|
3602
3616
|
class: "w-input__file-preview",
|
|
3603
3617
|
key: `${h}b`,
|
|
3604
3618
|
src: d.preview,
|
|
3605
3619
|
alt: ""
|
|
3606
|
-
}, null, 8, Ji)) : (
|
|
3620
|
+
}, null, 8, Ji)) : (o(), u("i", {
|
|
3607
3621
|
class: m(["w-icon w-input__file-preview primary size--md", i.preview && typeof i.preview == "string" ? i.preview : "wi-file"]),
|
|
3608
3622
|
key: `${h}c`
|
|
3609
3623
|
}, null, 2))
|
|
3610
3624
|
], 64))), 256))
|
|
3611
3625
|
], 8, Gi)) : p("", !0),
|
|
3612
|
-
i.labelPosition === "right" ? (
|
|
3613
|
-
e.$slots.default || i.label ? (
|
|
3626
|
+
i.labelPosition === "right" ? (o(), u(v, { key: 2 }, [
|
|
3627
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
3614
3628
|
key: 0,
|
|
3615
3629
|
class: m(["w-input__label w-input__label--right w-form-el-shakable", e.labelClasses]),
|
|
3616
3630
|
for: `w-input--${e._.uid}`
|
|
@@ -3716,7 +3730,7 @@ const el = {
|
|
|
3716
3730
|
return !this.staticLabel || !this.hasValue && !this.placeholder;
|
|
3717
3731
|
},
|
|
3718
3732
|
overallFilesProgress() {
|
|
3719
|
-
const t = +this.inputFiles.reduce((i,
|
|
3733
|
+
const t = +this.inputFiles.reduce((i, s) => i + s.progress, 0) / this.inputFiles.length;
|
|
3720
3734
|
return this.$emit("update:overallProgress", this.inputFiles.length ? t : 0), t;
|
|
3721
3735
|
},
|
|
3722
3736
|
uploadInProgress() {
|
|
@@ -3774,10 +3788,10 @@ const el = {
|
|
|
3774
3788
|
// For file input.
|
|
3775
3789
|
onFileChange(e) {
|
|
3776
3790
|
this.inputFiles = [...e.target.files].map((i) => {
|
|
3777
|
-
const [,
|
|
3791
|
+
const [, s = "", a = "", l = ""] = i.name.match(/^(.*?)\.([^.]*)$|(.*)/), n = Z({
|
|
3778
3792
|
name: i.name,
|
|
3779
|
-
base:
|
|
3780
|
-
extension:
|
|
3793
|
+
base: s || l,
|
|
3794
|
+
extension: a,
|
|
3781
3795
|
type: i.type,
|
|
3782
3796
|
size: i.size,
|
|
3783
3797
|
lastModified: i.lastModified,
|
|
@@ -3792,8 +3806,8 @@ const el = {
|
|
|
3792
3806
|
},
|
|
3793
3807
|
// For file input.
|
|
3794
3808
|
readFile(e, t) {
|
|
3795
|
-
const i = new FileReader(),
|
|
3796
|
-
this.preview && !
|
|
3809
|
+
const i = new FileReader(), s = typeof this.preview == "string", a = e.type && e.type.startsWith("image/");
|
|
3810
|
+
this.preview && !s && a ? i.addEventListener("load", (l) => {
|
|
3797
3811
|
t.preview = l.target.result;
|
|
3798
3812
|
}) : delete t.preview, i.addEventListener("progress", (l) => {
|
|
3799
3813
|
l.loaded && l.total && (t.progress = l.loaded * 100 / l.total);
|
|
@@ -3811,16 +3825,16 @@ const el = {
|
|
|
3811
3825
|
}
|
|
3812
3826
|
}
|
|
3813
3827
|
}, tl = /* @__PURE__ */ C(el, [["render", Zi]]);
|
|
3814
|
-
function il(e, t, i,
|
|
3828
|
+
function il(e, t, i, s, a, l) {
|
|
3815
3829
|
const n = $("w-icon"), r = $("w-list", !0);
|
|
3816
|
-
return
|
|
3830
|
+
return o(), u("ul", {
|
|
3817
3831
|
class: m(["w-list", l.classes])
|
|
3818
3832
|
}, [
|
|
3819
|
-
(
|
|
3833
|
+
(o(!0), u(v, null, x(e.listItems, (d, h) => (o(), u("li", {
|
|
3820
3834
|
class: m(["w-list__item", { "w-list__item--parent": (d.children || []).length }]),
|
|
3821
3835
|
key: h
|
|
3822
3836
|
}, [
|
|
3823
|
-
i.icon ? (
|
|
3837
|
+
i.icon ? (o(), b(n, {
|
|
3824
3838
|
key: 0,
|
|
3825
3839
|
class: "w-list__item-bullet"
|
|
3826
3840
|
}, {
|
|
@@ -3829,7 +3843,7 @@ function il(e, t, i, o, s, l) {
|
|
|
3829
3843
|
]),
|
|
3830
3844
|
_: 1
|
|
3831
3845
|
})) : p("", !0),
|
|
3832
|
-
e.$slots[`item.${h + 1}`] || e.$slots.item || e.$slots.default ? (
|
|
3846
|
+
e.$slots[`item.${h + 1}`] || e.$slots.item || e.$slots.default ? (o(), b(L(i.checklist ? "w-checkbox" : i.nav && !d.disabled && d.route ? l.hasRouter ? "router-link" : "a" : "div"), _({
|
|
3833
3847
|
key: 1,
|
|
3834
3848
|
class: "w-list__item-label",
|
|
3835
3849
|
ref_for: !0
|
|
@@ -3855,12 +3869,12 @@ function il(e, t, i, o, s, l) {
|
|
|
3855
3869
|
])
|
|
3856
3870
|
]),
|
|
3857
3871
|
_: 2
|
|
3858
|
-
}, 1040)) : (
|
|
3872
|
+
}, 1040)) : (o(), b(L(i.checklist ? "w-checkbox" : i.nav && !d.disabled && d.route ? l.hasRouter ? "router-link" : "a" : "div"), _({
|
|
3859
3873
|
key: 2,
|
|
3860
3874
|
class: "w-list__item-label",
|
|
3861
3875
|
ref_for: !0
|
|
3862
3876
|
}, l.liLabelProps(d, h, d._selected)), null, 16)),
|
|
3863
|
-
(d.children || []).length ? (
|
|
3877
|
+
(d.children || []).length ? (o(), b(r, _({
|
|
3864
3878
|
key: 3,
|
|
3865
3879
|
ref_for: !0
|
|
3866
3880
|
}, e.$props, {
|
|
@@ -4004,7 +4018,7 @@ const ll = {
|
|
|
4004
4018
|
};
|
|
4005
4019
|
},
|
|
4006
4020
|
liLabelProps(e, t, i) {
|
|
4007
|
-
const
|
|
4021
|
+
const s = this.$slots[`item.${t + 1}`] || this.$slots.item, a = () => {
|
|
4008
4022
|
if (!e.disabled) {
|
|
4009
4023
|
const d = this.cleanLi(e);
|
|
4010
4024
|
this.$emit("item-click", d), this.$emit("item-select", d);
|
|
@@ -4020,12 +4034,12 @@ const ll = {
|
|
|
4020
4034
|
id: this.listId ? `${this.listId}_item-${t + 1}` : null,
|
|
4021
4035
|
role: "option"
|
|
4022
4036
|
};
|
|
4023
|
-
return this.checklist ? (r.modelValue = e._selected, r.color = e[this.itemColorKey] || this.color, r.round = this.roundCheckboxes, r.disabled = e.disabled,
|
|
4037
|
+
return this.checklist ? (r.modelValue = e._selected, r.color = e[this.itemColorKey] || this.color, r.round = this.roundCheckboxes, r.disabled = e.disabled, s || (r.label = e._label || null), r.onFocus = () => e._focused = !0, r.onBlur = () => e._focused = !1, r.onInput = (d) => this.selectItem(e, d), r.onClick = (d) => {
|
|
4024
4038
|
const h = d.target.querySelector('input[type="checkbox"]');
|
|
4025
|
-
h && (h.focus(), h.click()),
|
|
4039
|
+
h && (h.focus(), h.click()), a();
|
|
4026
4040
|
}) : this.nav ? (!e.disabled && e[this.itemRouteKey] && (r.onKeydown = n, r.onMousedown = l, this.$router ? (r.to = e[this.itemRouteKey], r.onClick = (d) => {
|
|
4027
|
-
d.preventDefault(), this.$router.push(e[this.itemRouteKey]),
|
|
4028
|
-
}) : (r.href = e[this.itemRouteKey], r.onClick =
|
|
4041
|
+
d.preventDefault(), this.$router.push(e[this.itemRouteKey]), a();
|
|
4042
|
+
}) : (r.href = e[this.itemRouteKey], r.onClick = a)), s || (r.innerHTML = e._label)) : (this.isSelectable && (e.disabled || (r.tabindex = 0), r.onClick = a, r.onKeydown = n, r.onMousedown = l), s || (r.innerHTML = e._label)), r;
|
|
4029
4043
|
},
|
|
4030
4044
|
// Convert the received items selection to array if it is a unique value.
|
|
4031
4045
|
// Also accept objects if returnObject is true and convert to the object's value.
|
|
@@ -4038,7 +4052,7 @@ const ll = {
|
|
|
4038
4052
|
emitSelection() {
|
|
4039
4053
|
const e = this.selectedItems.map((i) => {
|
|
4040
4054
|
if (!this.returnObject) return i._value;
|
|
4041
|
-
const { _value:
|
|
4055
|
+
const { _value: s, _selected: a, ...l } = i;
|
|
4042
4056
|
return l;
|
|
4043
4057
|
}), t = this.isMultipleSelect ? e : e[0] !== void 0 ? e[0] : null;
|
|
4044
4058
|
this.$emit("update:modelValue", t), this.$emit("input", t);
|
|
@@ -4049,7 +4063,7 @@ const ll = {
|
|
|
4049
4063
|
e === void 0 && (e = this.enabledItemsIndexes[i]), this.$el.querySelector(`#${this.listId}_item-${e + 1}`).focus();
|
|
4050
4064
|
},
|
|
4051
4065
|
cleanLi(e) {
|
|
4052
|
-
const { _index: t, _value: i, _label:
|
|
4066
|
+
const { _index: t, _value: i, _label: s, _selected: a, _focused: l, ...n } = e;
|
|
4053
4067
|
return n;
|
|
4054
4068
|
},
|
|
4055
4069
|
refreshListItems() {
|
|
@@ -4069,7 +4083,7 @@ const ll = {
|
|
|
4069
4083
|
this.isMultipleSelect || this.listItems.forEach((i) => i._selected = !1);
|
|
4070
4084
|
const t = this.checkSelection(e);
|
|
4071
4085
|
this.listItems.forEach((i) => {
|
|
4072
|
-
i._selected = t.find((
|
|
4086
|
+
i._selected = t.find((s) => i._value === s) !== void 0;
|
|
4073
4087
|
});
|
|
4074
4088
|
}
|
|
4075
4089
|
},
|
|
@@ -4177,40 +4191,40 @@ const ll = {
|
|
|
4177
4191
|
},
|
|
4178
4192
|
// ! \ This function uses the DOM - NO SSR (only trigger from beforeMount and later).
|
|
4179
4193
|
getActivatorCoordinates() {
|
|
4180
|
-
const { top: e, left: t, width: i, height:
|
|
4181
|
-
let
|
|
4194
|
+
const { top: e, left: t, width: i, height: s } = this.activatorEl.getBoundingClientRect();
|
|
4195
|
+
let a = { top: e, left: t, width: i, height: s };
|
|
4182
4196
|
if (!this.fixed) {
|
|
4183
4197
|
const { top: l, left: n } = this.detachableParentEl.getBoundingClientRect(), r = window.getComputedStyle(this.detachableParentEl, null);
|
|
4184
|
-
|
|
4185
|
-
...
|
|
4198
|
+
a = {
|
|
4199
|
+
...a,
|
|
4186
4200
|
top: e - l + this.detachableParentEl.scrollTop - parseInt(r.getPropertyValue("border-top-width")),
|
|
4187
4201
|
left: t - n + this.detachableParentEl.scrollLeft - parseInt(r.getPropertyValue("border-left-width"))
|
|
4188
4202
|
};
|
|
4189
4203
|
}
|
|
4190
|
-
return
|
|
4204
|
+
return a;
|
|
4191
4205
|
},
|
|
4192
4206
|
// ! \ This function uses the DOM - NO SSR (only trigger from beforeMount and later).
|
|
4193
4207
|
computeDetachableCoords() {
|
|
4194
|
-
let { top: e, left: t, width: i, height:
|
|
4208
|
+
let { top: e, left: t, width: i, height: s } = this.getActivatorCoordinates();
|
|
4195
4209
|
if (!this.detachableEl) return;
|
|
4196
4210
|
this.detachableEl.style.visibility = "hidden", this.detachableEl.style.display = "flex";
|
|
4197
|
-
const
|
|
4211
|
+
const a = window.getComputedStyle(this.detachableEl, null);
|
|
4198
4212
|
switch (this.position) {
|
|
4199
4213
|
case "top": {
|
|
4200
|
-
e -= this.detachableEl.offsetHeight, this.alignRight ? t += i - this.detachableEl.offsetWidth + parseInt(
|
|
4214
|
+
e -= this.detachableEl.offsetHeight, this.alignRight ? t += i - this.detachableEl.offsetWidth + parseInt(a.getPropertyValue("border-right-width")) : this.alignLeft || (t += (i - this.detachableEl.offsetWidth) / 2);
|
|
4201
4215
|
break;
|
|
4202
4216
|
}
|
|
4203
4217
|
case "bottom": {
|
|
4204
|
-
e +=
|
|
4218
|
+
e += s, this.alignRight ? t += i - this.detachableEl.offsetWidth + parseInt(a.getPropertyValue("border-right-width")) : this.alignLeft || (t += (i - this.detachableEl.offsetWidth) / 2);
|
|
4205
4219
|
break;
|
|
4206
4220
|
}
|
|
4207
4221
|
case "left": {
|
|
4208
|
-
t -= this.detachableEl.offsetWidth, this.alignBottom ? e +=
|
|
4222
|
+
t -= this.detachableEl.offsetWidth, this.alignBottom ? e += s - this.detachableEl.offsetHeight : this.alignTop || (e += (s - this.detachableEl.offsetHeight) / 2);
|
|
4209
4223
|
break;
|
|
4210
4224
|
}
|
|
4211
4225
|
case "right": {
|
|
4212
|
-
t += i, this.alignBottom ? e +=
|
|
4213
|
-
parseInt(
|
|
4226
|
+
t += i, this.alignBottom ? e += s - this.detachableEl.offsetHeight + parseInt(a.getPropertyValue("margin-top")) : this.alignTop || (e += (s - this.detachableEl.offsetHeight) / 2 + // top: 50% of activator - half menu height.
|
|
4227
|
+
parseInt(a.getPropertyValue("margin-top")));
|
|
4214
4228
|
break;
|
|
4215
4229
|
}
|
|
4216
4230
|
}
|
|
@@ -4241,11 +4255,11 @@ const ll = {
|
|
|
4241
4255
|
const e = typeof this.activator == "string";
|
|
4242
4256
|
Object.entries(this.activatorEventHandlers).forEach(([t, i]) => {
|
|
4243
4257
|
t = t.replace("mouseenter", "mouseover").replace("mouseleave", "mouseout");
|
|
4244
|
-
const
|
|
4258
|
+
const s = (a) => {
|
|
4245
4259
|
var l;
|
|
4246
|
-
(e && ((l =
|
|
4260
|
+
(e && ((l = a.target) != null && l.matches) && a.target.matches(this.activator) || a.target === this.activatorEl || this.activatorEl.contains(a.target)) && i(a);
|
|
4247
4261
|
};
|
|
4248
|
-
document.addEventListener(t,
|
|
4262
|
+
document.addEventListener(t, s), this.docEventListenersHandlers.push({ eventName: t, handler: s });
|
|
4249
4263
|
});
|
|
4250
4264
|
}
|
|
4251
4265
|
},
|
|
@@ -4269,16 +4283,16 @@ const ll = {
|
|
|
4269
4283
|
}
|
|
4270
4284
|
}
|
|
4271
4285
|
};
|
|
4272
|
-
function ol(e, t, i,
|
|
4286
|
+
function ol(e, t, i, s, a, l) {
|
|
4273
4287
|
const n = $("w-card"), r = $("w-overlay");
|
|
4274
|
-
return
|
|
4288
|
+
return o(), u(v, null, [
|
|
4275
4289
|
c(e.$slots, "activator", { on: l.activatorEventHandlers }),
|
|
4276
4290
|
T(O, {
|
|
4277
4291
|
name: l.transitionName,
|
|
4278
4292
|
appear: ""
|
|
4279
4293
|
}, {
|
|
4280
4294
|
default: f(() => [
|
|
4281
|
-
i.custom && e.detachableVisible ? (
|
|
4295
|
+
i.custom && e.detachableVisible ? (o(), u("div", _({
|
|
4282
4296
|
key: 0,
|
|
4283
4297
|
class: "w-menu",
|
|
4284
4298
|
ref: "detachable"
|
|
@@ -4290,7 +4304,7 @@ function ol(e, t, i, o, s, l) {
|
|
|
4290
4304
|
style: l.styles
|
|
4291
4305
|
}), [
|
|
4292
4306
|
c(e.$slots, "default")
|
|
4293
|
-
], 16)) : e.detachableVisible ? (
|
|
4307
|
+
], 16)) : e.detachableVisible ? (o(), b(n, _({
|
|
4294
4308
|
key: 1,
|
|
4295
4309
|
class: "w-menu",
|
|
4296
4310
|
ref: "detachable"
|
|
@@ -4329,7 +4343,7 @@ function ol(e, t, i, o, s, l) {
|
|
|
4329
4343
|
]),
|
|
4330
4344
|
_: 3
|
|
4331
4345
|
}, 8, ["name"]),
|
|
4332
|
-
i.overlay ? (
|
|
4346
|
+
i.overlay ? (o(), b(r, _({
|
|
4333
4347
|
key: 0,
|
|
4334
4348
|
ref: "overlay",
|
|
4335
4349
|
"model-value": e.detachableVisible,
|
|
@@ -4515,14 +4529,14 @@ const al = {
|
|
|
4515
4529
|
}
|
|
4516
4530
|
// watch, mounted & beforeDestroy hooks are set in the detachable.js mixin.
|
|
4517
4531
|
}, nl = /* @__PURE__ */ C(al, [["render", ol]]);
|
|
4518
|
-
function rl(e, t, i,
|
|
4532
|
+
function rl(e, t, i, s, a, l) {
|
|
4519
4533
|
const n = $("w-alert");
|
|
4520
|
-
return
|
|
4534
|
+
return o(), b(O, {
|
|
4521
4535
|
name: l.transitionName,
|
|
4522
4536
|
appear: ""
|
|
4523
4537
|
}, {
|
|
4524
4538
|
default: f(() => [
|
|
4525
|
-
|
|
4539
|
+
a.show ? (o(), u("div", {
|
|
4526
4540
|
key: 0,
|
|
4527
4541
|
class: m(["w-notification", l.classes]),
|
|
4528
4542
|
style: R(l.styles)
|
|
@@ -4667,15 +4681,15 @@ const dl = {
|
|
|
4667
4681
|
}
|
|
4668
4682
|
}
|
|
4669
4683
|
}, ul = /* @__PURE__ */ C(dl, [["render", rl]]);
|
|
4670
|
-
function hl(e, t, i,
|
|
4684
|
+
function hl(e, t, i, s, a, l) {
|
|
4671
4685
|
const n = ke("focus");
|
|
4672
|
-
return
|
|
4686
|
+
return o(), b(O, {
|
|
4673
4687
|
name: "fade",
|
|
4674
4688
|
appear: "",
|
|
4675
4689
|
onAfterLeave: l.onClose
|
|
4676
4690
|
}, {
|
|
4677
4691
|
default: f(() => [
|
|
4678
|
-
i.modelValue ? W((
|
|
4692
|
+
i.modelValue ? W((o(), u("div", {
|
|
4679
4693
|
key: 0,
|
|
4680
4694
|
class: m(["w-overlay", l.classes]),
|
|
4681
4695
|
ref: "overlay",
|
|
@@ -4752,8 +4766,8 @@ const cl = {
|
|
|
4752
4766
|
}
|
|
4753
4767
|
}
|
|
4754
4768
|
}, pl = /* @__PURE__ */ C(cl, [["render", hl]]), ml = { class: "w-parallax" };
|
|
4755
|
-
function fl(e, t, i,
|
|
4756
|
-
return
|
|
4769
|
+
function fl(e, t, i, s, a, l) {
|
|
4770
|
+
return o(), u("div", ml);
|
|
4757
4771
|
}
|
|
4758
4772
|
const gl = {
|
|
4759
4773
|
name: "w-parallax",
|
|
@@ -4761,16 +4775,16 @@ const gl = {
|
|
|
4761
4775
|
emits: [],
|
|
4762
4776
|
data: () => ({})
|
|
4763
4777
|
}, bl = /* @__PURE__ */ C(gl, [["render", fl]]), yl = ["viewBox"], wl = ["cx", "cy", "r", "stroke-dasharray", "stroke-width"], kl = ["cx", "cy", "r", "stroke-width", "stroke-linecap", "stroke-dasharray"];
|
|
4764
|
-
function vl(e, t, i,
|
|
4765
|
-
return
|
|
4778
|
+
function vl(e, t, i, s, a, l) {
|
|
4779
|
+
return o(), u("div", {
|
|
4766
4780
|
class: m(["w-progress", l.classes]),
|
|
4767
4781
|
style: R(l.styles)
|
|
4768
4782
|
}, [
|
|
4769
|
-
i.circle ? (
|
|
4783
|
+
i.circle ? (o(), u("svg", {
|
|
4770
4784
|
key: 1,
|
|
4771
4785
|
viewBox: `${l.circleCenter / 2} ${l.circleCenter / 2} ${l.circleCenter} ${l.circleCenter}`
|
|
4772
4786
|
}, [
|
|
4773
|
-
i.bgColor || this.progressValue > -1 ? (
|
|
4787
|
+
i.bgColor || this.progressValue > -1 ? (o(), u("circle", {
|
|
4774
4788
|
key: 0,
|
|
4775
4789
|
class: m(["bg", i.bgColor || null]),
|
|
4776
4790
|
cx: l.circleCenter,
|
|
@@ -4791,12 +4805,12 @@ function vl(e, t, i, o, s, l) {
|
|
|
4791
4805
|
"stroke-dasharray": e.circleCircumference,
|
|
4792
4806
|
style: R(`stroke-dashoffset: ${(1 - l.progressValue / 100) * e.circleCircumference}`)
|
|
4793
4807
|
}, null, 12, kl)
|
|
4794
|
-
], 8, yl)) : (
|
|
4808
|
+
], 8, yl)) : (o(), u("div", {
|
|
4795
4809
|
key: 0,
|
|
4796
4810
|
class: m(["w-progress__progress", { full: l.progressValue === 100 }]),
|
|
4797
4811
|
style: R(`width: ${l.progressValue}%`)
|
|
4798
4812
|
}, null, 6)),
|
|
4799
|
-
i.label || e.$slots.default ? (
|
|
4813
|
+
i.label || e.$slots.default ? (o(), u("div", {
|
|
4800
4814
|
key: 2,
|
|
4801
4815
|
class: m(["w-progress__label", i.labelColor || !1])
|
|
4802
4816
|
}, [
|
|
@@ -4876,8 +4890,8 @@ const Q = 40, Cl = Q / 2, Sl = Math.round(Q * 3.14 * 100) / 100, Bl = {
|
|
|
4876
4890
|
}
|
|
4877
4891
|
}
|
|
4878
4892
|
}, _l = /* @__PURE__ */ C(Bl, [["render", vl]]), $l = ["id", "name", "checked", "disabled", "required", "tabindex", "aria-checked"], Il = ["for"], Vl = ["for", "innerHTML"], Tl = ["for"], Ll = ["for", "innerHTML"];
|
|
4879
|
-
function Rl(e, t, i,
|
|
4880
|
-
return
|
|
4893
|
+
function Rl(e, t, i, s, a, l) {
|
|
4894
|
+
return o(), b(L(e.formRegister && !l.wRadios ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: e.inputValue, disabled: e.isDisabled, readonly: e.isReadonly }, {
|
|
4881
4895
|
valid: e.valid,
|
|
4882
4896
|
"onUpdate:valid": t[3] || (t[3] = (n) => e.valid = n),
|
|
4883
4897
|
onReset: t[4] || (t[4] = (n) => {
|
|
@@ -4900,8 +4914,8 @@ function Rl(e, t, i, o, s, l) {
|
|
|
4900
4914
|
"aria-checked": e.inputValue || "false",
|
|
4901
4915
|
role: "radio"
|
|
4902
4916
|
}, null, 40, $l),
|
|
4903
|
-
l.hasLabel && i.labelOnLeft ? (
|
|
4904
|
-
e.$slots.default ? (
|
|
4917
|
+
l.hasLabel && i.labelOnLeft ? (o(), u(v, { key: 0 }, [
|
|
4918
|
+
e.$slots.default ? (o(), u("label", {
|
|
4905
4919
|
key: 0,
|
|
4906
4920
|
class: m(["w-radio__label w-form-el-shakable pr2", e.labelClasses]),
|
|
4907
4921
|
for: `w-radio--${e._.uid}`
|
|
@@ -4909,7 +4923,7 @@ function Rl(e, t, i, o, s, l) {
|
|
|
4909
4923
|
c(e.$slots, "default", {}, () => [
|
|
4910
4924
|
B(S(i.label), 1)
|
|
4911
4925
|
])
|
|
4912
|
-
], 10, Il)) : i.label ? (
|
|
4926
|
+
], 10, Il)) : i.label ? (o(), u("label", {
|
|
4913
4927
|
key: 1,
|
|
4914
4928
|
class: m(["w-radio__label w-form-el-shakable pr2", e.labelClasses]),
|
|
4915
4929
|
for: `w-radio--${e._.uid}`,
|
|
@@ -4922,8 +4936,8 @@ function Rl(e, t, i, o, s, l) {
|
|
|
4922
4936
|
e.$refs.input.focus(), e.$refs.input.click();
|
|
4923
4937
|
})
|
|
4924
4938
|
}, null, 2),
|
|
4925
|
-
l.hasLabel && !i.labelOnLeft ? (
|
|
4926
|
-
e.$slots.default ? (
|
|
4939
|
+
l.hasLabel && !i.labelOnLeft ? (o(), u(v, { key: 1 }, [
|
|
4940
|
+
e.$slots.default ? (o(), u("label", {
|
|
4927
4941
|
key: 0,
|
|
4928
4942
|
class: m(["w-radio__label w-form-el-shakable pl2", e.labelClasses]),
|
|
4929
4943
|
for: `w-radio--${e._.uid}`
|
|
@@ -4931,7 +4945,7 @@ function Rl(e, t, i, o, s, l) {
|
|
|
4931
4945
|
c(e.$slots, "default", {}, () => [
|
|
4932
4946
|
B(S(i.label), 1)
|
|
4933
4947
|
])
|
|
4934
|
-
], 10, Tl)) : i.label ? (
|
|
4948
|
+
], 10, Tl)) : i.label ? (o(), u("label", {
|
|
4935
4949
|
key: 1,
|
|
4936
4950
|
class: m(["w-radio__label w-form-el-shakable pl2", e.labelClasses]),
|
|
4937
4951
|
for: `w-radio--${e._.uid}`,
|
|
@@ -5008,9 +5022,9 @@ const xl = {
|
|
|
5008
5022
|
}
|
|
5009
5023
|
}
|
|
5010
5024
|
}, Ol = /* @__PURE__ */ C(xl, [["render", Rl]]), Pl = ["innerHTML"];
|
|
5011
|
-
function zl(e, t, i,
|
|
5025
|
+
function zl(e, t, i, s, a, l) {
|
|
5012
5026
|
const n = $("w-radio");
|
|
5013
|
-
return
|
|
5027
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: e.inputValue, disabled: e.isDisabled }, {
|
|
5014
5028
|
valid: e.valid,
|
|
5015
5029
|
"onUpdate:valid": t[1] || (t[1] = (r) => e.valid = r),
|
|
5016
5030
|
onReset: t[2] || (t[2] = (r) => {
|
|
@@ -5021,7 +5035,7 @@ function zl(e, t, i, o, s, l) {
|
|
|
5021
5035
|
class: l.classes
|
|
5022
5036
|
}), {
|
|
5023
5037
|
default: f(() => [
|
|
5024
|
-
(
|
|
5038
|
+
(o(!0), u(v, null, x(l.radioItems, (r, d) => (o(), b(n, _({
|
|
5025
5039
|
key: d,
|
|
5026
5040
|
"model-value": r.value === i.modelValue,
|
|
5027
5041
|
"onUpdate:modelValue": (h) => l.onInput(r),
|
|
@@ -5040,7 +5054,7 @@ function zl(e, t, i, o, s, l) {
|
|
|
5040
5054
|
index: d + 1,
|
|
5041
5055
|
checked: r.value === i.modelValue,
|
|
5042
5056
|
innerHTML: r.label
|
|
5043
|
-
}) : r.label ? (
|
|
5057
|
+
}) : r.label ? (o(), u("div", {
|
|
5044
5058
|
key: 1,
|
|
5045
5059
|
innerHTML: r.label
|
|
5046
5060
|
}, null, 8, Pl)) : p("", !0)
|
|
@@ -5105,12 +5119,12 @@ const Ml = {
|
|
|
5105
5119
|
}
|
|
5106
5120
|
}
|
|
5107
5121
|
}, El = /* @__PURE__ */ C(Ml, [["render", zl]]), Al = ["id", "name", "value"], Wl = ["disabled", "onMouseenter", "onClick", "tabindex"];
|
|
5108
|
-
function Nl(e, t, i,
|
|
5109
|
-
return
|
|
5122
|
+
function Nl(e, t, i, s, a, l) {
|
|
5123
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: a.rating, disabled: e.isDisabled, readonly: e.isReadonly }, {
|
|
5110
5124
|
valid: e.valid,
|
|
5111
5125
|
"onUpdate:valid": t[4] || (t[4] = (n) => e.valid = n),
|
|
5112
5126
|
onReset: t[5] || (t[5] = (n) => {
|
|
5113
|
-
e.$emit("update:modelValue",
|
|
5127
|
+
e.$emit("update:modelValue", a.rating = null), e.$emit("input", null);
|
|
5114
5128
|
}),
|
|
5115
5129
|
class: l.classes
|
|
5116
5130
|
}), {
|
|
@@ -5119,9 +5133,9 @@ function Nl(e, t, i, o, s, l) {
|
|
|
5119
5133
|
id: e.inputName,
|
|
5120
5134
|
name: e.inputName,
|
|
5121
5135
|
type: "hidden",
|
|
5122
|
-
value:
|
|
5136
|
+
value: a.rating
|
|
5123
5137
|
}, null, 8, Al),
|
|
5124
|
-
(
|
|
5138
|
+
(o(!0), u(v, null, x(i.max, (n) => (o(), u(v, { key: n }, [
|
|
5125
5139
|
e.$slots.item ? c(e.$slots, "item", {
|
|
5126
5140
|
key: 0,
|
|
5127
5141
|
index: n + 1
|
|
@@ -5129,8 +5143,8 @@ function Nl(e, t, i, o, s, l) {
|
|
|
5129
5143
|
w("button", {
|
|
5130
5144
|
class: m(["w-rating__button", l.buttonClasses(n)]),
|
|
5131
5145
|
disabled: e.isDisabled || e.isReadonly,
|
|
5132
|
-
onMouseenter: (r) =>
|
|
5133
|
-
onMouseleave: t[0] || (t[0] = (r) =>
|
|
5146
|
+
onMouseenter: (r) => a.hover = n,
|
|
5147
|
+
onMouseleave: t[0] || (t[0] = (r) => a.hover = 0),
|
|
5134
5148
|
onClick: (r) => l.onButtonClick(n),
|
|
5135
5149
|
onFocus: t[1] || (t[1] = (...r) => l.onFocus && l.onFocus(...r)),
|
|
5136
5150
|
onBlur: t[2] || (t[2] = (...r) => l.onBlur && l.onBlur(...r)),
|
|
@@ -5138,7 +5152,7 @@ function Nl(e, t, i, o, s, l) {
|
|
|
5138
5152
|
type: "button",
|
|
5139
5153
|
tabindex: n === 1 ? 0 : -1
|
|
5140
5154
|
}, [
|
|
5141
|
-
n - 1 === ~~
|
|
5155
|
+
n - 1 === ~~a.rating && a.rating - ~~a.rating ? (o(), u("i", {
|
|
5142
5156
|
key: 0,
|
|
5143
5157
|
class: m(["w-icon", `${i.icon} ${i.color}`]),
|
|
5144
5158
|
role: "icon",
|
|
@@ -5246,8 +5260,8 @@ const Kl = {
|
|
|
5246
5260
|
}
|
|
5247
5261
|
}
|
|
5248
5262
|
}, Dl = /* @__PURE__ */ C(Kl, [["render", Nl]]);
|
|
5249
|
-
function Hl(e, t, i,
|
|
5250
|
-
return
|
|
5263
|
+
function Hl(e, t, i, s, a, l) {
|
|
5264
|
+
return o(), u(v, null, [
|
|
5251
5265
|
w("div", _({
|
|
5252
5266
|
class: ["w-scrollable", l.scrollableClasses],
|
|
5253
5267
|
ref: "scrollable",
|
|
@@ -5313,8 +5327,8 @@ const Fl = {
|
|
|
5313
5327
|
}),
|
|
5314
5328
|
computed: {
|
|
5315
5329
|
isHorizontal() {
|
|
5316
|
-
var e, t, i,
|
|
5317
|
-
return this.mounted ? (console.log("💂♂️", (e = this.$refs.scrollable) == null ? void 0 : e.scrollWidth, (t = this.$refs.scrollable) == null ? void 0 : t.offsetWidth), this.width && !this.height || ((i = this.$refs.scrollable) == null ? void 0 : i.scrollWidth) > ((
|
|
5330
|
+
var e, t, i, s;
|
|
5331
|
+
return this.mounted ? (console.log("💂♂️", (e = this.$refs.scrollable) == null ? void 0 : e.scrollWidth, (t = this.$refs.scrollable) == null ? void 0 : t.offsetWidth), this.width && !this.height || ((i = this.$refs.scrollable) == null ? void 0 : i.scrollWidth) > ((s = this.$refs.scrollable) == null ? void 0 : s.offsetWidth)) : !1;
|
|
5318
5332
|
},
|
|
5319
5333
|
m() {
|
|
5320
5334
|
return Fl[this.isHorizontal ? "h" : "v"];
|
|
@@ -5349,8 +5363,8 @@ const Fl = {
|
|
|
5349
5363
|
methods: {
|
|
5350
5364
|
onTrackMouseDown(e) {
|
|
5351
5365
|
if (this.isDisabled || this.isReadonly || "ontouchstart" in window && e.type === "mousedown") return;
|
|
5352
|
-
const { top: t, left: i, width:
|
|
5353
|
-
this.isHorizontal ? (this.$refs.track.width =
|
|
5366
|
+
const { top: t, left: i, width: s, height: a } = this.$refs.track.getBoundingClientRect();
|
|
5367
|
+
this.isHorizontal ? (this.$refs.track.width = s, this.$refs.track.left = i) : (this.$refs.track.height = a, this.$refs.track.top = t), this.dragging = !0, this.computeScroll(e.type === "touchstart" ? e.touches[0][this.m.clientXorY] : e[this.m.clientXorY]), this.scroll(), document.addEventListener(e.type === "touchstart" ? "touchmove" : "mousemove", this.onDrag), document.addEventListener(e.type === "touchstart" ? "touchend" : "mouseup", this.onMouseUp, { once: !0 });
|
|
5354
5368
|
},
|
|
5355
5369
|
onDrag(e) {
|
|
5356
5370
|
this.computeScroll(e.type === "touchmove" ? e.touches[0][this.m.clientXorY] : e[this.m.clientXorY]), this.scroll();
|
|
@@ -5370,7 +5384,7 @@ const Fl = {
|
|
|
5370
5384
|
this.scrollable.hovered && (this.scrollValuePercent <= 0 && e[this.m.deltaXorY] < 0 || this.scrollValuePercent >= 100 - this.thumbSizePercent && e[this.m.deltaXorY] > 0 || (e.preventDefault(), this.scrollValuePercent += e[this.m.deltaXorY] * 0.05, this.scrollValuePercent = Math.max(0, Math.min(this.scrollValuePercent, 100)), this.scroll()));
|
|
5371
5385
|
},
|
|
5372
5386
|
computeScroll(e) {
|
|
5373
|
-
const { top: t, left: i, width:
|
|
5387
|
+
const { top: t, left: i, width: s, height: a } = this.$refs.scrollable.getBoundingClientRect(), l = this.isHorizontal ? i : t, n = this.isHorizontal ? s : a;
|
|
5374
5388
|
this.scrollValuePercent = Math.max(0, Math.min((e - l) / n * 100, 100));
|
|
5375
5389
|
},
|
|
5376
5390
|
scroll() {
|
|
@@ -5390,9 +5404,9 @@ const Fl = {
|
|
|
5390
5404
|
key: 0,
|
|
5391
5405
|
class: "w-select__selection-slot"
|
|
5392
5406
|
}, Yl = ["innerHTML"], Gl = ["value", "name"];
|
|
5393
|
-
function Jl(e, t, i,
|
|
5407
|
+
function Jl(e, t, i, s, a, l) {
|
|
5394
5408
|
const n = $("w-icon"), r = $("w-list"), d = $("w-menu");
|
|
5395
|
-
return
|
|
5409
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: l.selectionString, disabled: e.isDisabled, readonly: e.isReadonly, isFocused: e.isFocused }, {
|
|
5396
5410
|
valid: e.valid,
|
|
5397
5411
|
"onUpdate:valid": t[12] || (t[12] = (h) => e.valid = h),
|
|
5398
5412
|
onReset: l.onReset,
|
|
@@ -5400,8 +5414,8 @@ function Jl(e, t, i, o, s, l) {
|
|
|
5400
5414
|
class: l.classes
|
|
5401
5415
|
}), {
|
|
5402
5416
|
default: f(() => [
|
|
5403
|
-
i.labelPosition === "left" ? (
|
|
5404
|
-
e.$slots.default || i.label ? (
|
|
5417
|
+
i.labelPosition === "left" ? (o(), u(v, { key: 0 }, [
|
|
5418
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
5405
5419
|
key: 0,
|
|
5406
5420
|
class: m(["w-select__label w-select__label--left w-form-el-shakable", e.labelClasses]),
|
|
5407
5421
|
onClick: t[0] || (t[0] = (h) => e.$refs["selection-input"].click())
|
|
@@ -5433,7 +5447,7 @@ function Jl(e, t, i, o, s, l) {
|
|
|
5433
5447
|
"aria-activedescendant": `w-select-menu--${e._.uid}_item-1`
|
|
5434
5448
|
}, [
|
|
5435
5449
|
c(e.$slots, "icon-left", {}, () => [
|
|
5436
|
-
i.innerIconLeft ? (
|
|
5450
|
+
i.innerIconLeft ? (o(), b(n, {
|
|
5437
5451
|
key: 0,
|
|
5438
5452
|
class: "w-select__icon w-select__icon--inner-left",
|
|
5439
5453
|
tag: "label",
|
|
@@ -5445,7 +5459,7 @@ function Jl(e, t, i, o, s, l) {
|
|
|
5445
5459
|
_: 1
|
|
5446
5460
|
})) : p("", !0)
|
|
5447
5461
|
]),
|
|
5448
|
-
e.$slots.selection ? (
|
|
5462
|
+
e.$slots.selection ? (o(), u("div", Xl, [
|
|
5449
5463
|
c(e.$slots, "selection", {
|
|
5450
5464
|
item: i.multiple ? e.inputValue : e.inputValue[0]
|
|
5451
5465
|
})
|
|
@@ -5457,14 +5471,14 @@ function Jl(e, t, i, o, s, l) {
|
|
|
5457
5471
|
onBlur: t[3] || (t[3] = (...h) => l.onBlur && l.onBlur(...h)),
|
|
5458
5472
|
onKeydown: t[4] || (t[4] = (h) => !e.isDisabled && !e.isReadonly && l.onKeydown(h))
|
|
5459
5473
|
}, l.selectionAttributes, { innerHTML: l.selectionHtml }), null, 16, Yl),
|
|
5460
|
-
(
|
|
5474
|
+
(o(!0), u(v, null, x(e.inputValue.length ? e.inputValue : [{}], (h, y) => (o(), u("input", {
|
|
5461
5475
|
key: y,
|
|
5462
5476
|
type: "hidden",
|
|
5463
5477
|
value: h.value === void 0 ? "" : h.value.toString(),
|
|
5464
5478
|
name: e.inputName + (i.multiple ? "[]" : "")
|
|
5465
5479
|
}, null, 8, Gl))), 128)),
|
|
5466
|
-
i.labelPosition === "inside" && l.showLabelInside ? (
|
|
5467
|
-
e.$slots.default || i.label ? (
|
|
5480
|
+
i.labelPosition === "inside" && l.showLabelInside ? (o(), u(v, { key: 1 }, [
|
|
5481
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
5468
5482
|
key: 0,
|
|
5469
5483
|
class: m(["w-select__label w-select__label--inside w-form-el-shakable", e.labelClasses])
|
|
5470
5484
|
}, [
|
|
@@ -5474,7 +5488,7 @@ function Jl(e, t, i, o, s, l) {
|
|
|
5474
5488
|
], 2)) : p("", !0)
|
|
5475
5489
|
], 64)) : p("", !0),
|
|
5476
5490
|
c(e.$slots, "icon-right", {}, () => [
|
|
5477
|
-
i.innerIconRight ? (
|
|
5491
|
+
i.innerIconRight ? (o(), b(n, {
|
|
5478
5492
|
key: 0,
|
|
5479
5493
|
class: "w-select__icon w-select__icon--inner-right",
|
|
5480
5494
|
tag: "label",
|
|
@@ -5533,8 +5547,8 @@ function Jl(e, t, i, o, s, l) {
|
|
|
5533
5547
|
]),
|
|
5534
5548
|
_: 3
|
|
5535
5549
|
}, 16, ["modelValue", "onClose", "menu-class", "append-to"]),
|
|
5536
|
-
i.labelPosition === "right" ? (
|
|
5537
|
-
e.$slots.default || i.label ? (
|
|
5550
|
+
i.labelPosition === "right" ? (o(), u(v, { key: 1 }, [
|
|
5551
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
5538
5552
|
key: 0,
|
|
5539
5553
|
class: m(["w-select__label w-select__label--right w-form-el-shakable", e.labelClasses]),
|
|
5540
5554
|
onClick: t[11] || (t[11] = (h) => e.$refs["selection-input"].click())
|
|
@@ -5690,20 +5704,20 @@ const Ql = {
|
|
|
5690
5704
|
const i = this.selectItems;
|
|
5691
5705
|
if (t === void 0) t = e.keyCode === 38 ? i.length - 1 : 0;
|
|
5692
5706
|
else {
|
|
5693
|
-
const
|
|
5694
|
-
t = (t + i.length +
|
|
5707
|
+
const a = e.keyCode === 38 ? -1 : 1;
|
|
5708
|
+
t = (t + i.length + a) % i.length;
|
|
5695
5709
|
}
|
|
5696
|
-
let
|
|
5710
|
+
let s = !1;
|
|
5697
5711
|
if (i[t].disabled) {
|
|
5698
|
-
const
|
|
5699
|
-
let l = (t +
|
|
5712
|
+
const a = e.keyCode === 38 ? -1 : 1;
|
|
5713
|
+
let l = (t + a + i.length) % i.length;
|
|
5700
5714
|
const n = i.length;
|
|
5701
5715
|
let r = 0;
|
|
5702
5716
|
for (; r < n && i[l].disabled; )
|
|
5703
|
-
l = (l + i.length +
|
|
5704
|
-
r >= n && (
|
|
5717
|
+
l = (l + i.length + a) % i.length, r++;
|
|
5718
|
+
r >= n && (s = !0), t = l;
|
|
5705
5719
|
}
|
|
5706
|
-
|
|
5720
|
+
s || this.onInput(i[t]);
|
|
5707
5721
|
}
|
|
5708
5722
|
else e.key.length === 1 && this.focusItemOnQuickLookup(e);
|
|
5709
5723
|
},
|
|
@@ -5711,14 +5725,14 @@ const Ql = {
|
|
|
5711
5725
|
e.key.length === 1 && this.focusItemOnQuickLookup(e);
|
|
5712
5726
|
},
|
|
5713
5727
|
focusItemOnQuickLookup(e) {
|
|
5714
|
-
var
|
|
5728
|
+
var s, a, l;
|
|
5715
5729
|
this.quickLookup.timeout && clearTimeout(this.quickLookup.timeout), this.quickLookup.timeout = setTimeout(() => this.quickLookup.string = "", 1e3), this.quickLookup.string += e.key;
|
|
5716
5730
|
const t = new RegExp(`^${this.quickLookup.string}`, "i"), i = this.selectItems.findIndex(
|
|
5717
5731
|
(n) => !n.disabled && n[this.itemLabelKey].match(t)
|
|
5718
5732
|
) + 1;
|
|
5719
5733
|
if (i) {
|
|
5720
5734
|
const n = `.w-list__item:nth-child(${i}) .w-list__item-label`;
|
|
5721
|
-
(l = (
|
|
5735
|
+
(l = (a = (s = this.$refs["w-list"]) == null ? void 0 : s.$el) == null ? void 0 : a.querySelector(n)) == null || l.focus();
|
|
5722
5736
|
}
|
|
5723
5737
|
},
|
|
5724
5738
|
// The items are given by the w-list component.
|
|
@@ -5746,8 +5760,8 @@ const Ql = {
|
|
|
5746
5760
|
e = Array.isArray(e) ? e : e !== void 0 ? [e] : [];
|
|
5747
5761
|
const t = this.selectItems.map((i) => i.value);
|
|
5748
5762
|
return e.map((i) => {
|
|
5749
|
-
let
|
|
5750
|
-
return i && typeof i == "object" && (
|
|
5763
|
+
let s = i;
|
|
5764
|
+
return i && typeof i == "object" && (s = i[this.itemValueKey] ?? i[this.itemLabelKey] ?? i), this.selectItems[t.indexOf(s)];
|
|
5751
5765
|
}).filter((i) => i !== void 0);
|
|
5752
5766
|
},
|
|
5753
5767
|
// Open the dropdown selection list.
|
|
@@ -5782,8 +5796,8 @@ const Ql = {
|
|
|
5782
5796
|
key: 0,
|
|
5783
5797
|
class: "w-slider__step-labels"
|
|
5784
5798
|
}, rs = ["onClick"], ds = ["for"], us = ["for", "innerHTML"];
|
|
5785
|
-
function hs(e, t, i,
|
|
5786
|
-
return
|
|
5799
|
+
function hs(e, t, i, s, a, l) {
|
|
5800
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: e.rangeValueScaled, disabled: e.isDisabled, readonly: e.isReadonly }, {
|
|
5787
5801
|
valid: e.valid,
|
|
5788
5802
|
"onUpdate:valid": t[8] || (t[8] = (n) => e.valid = n),
|
|
5789
5803
|
onReset: t[9] || (t[9] = (n) => {
|
|
@@ -5793,13 +5807,13 @@ function hs(e, t, i, o, s, l) {
|
|
|
5793
5807
|
class: l.wrapperClasses
|
|
5794
5808
|
}), {
|
|
5795
5809
|
default: f(() => [
|
|
5796
|
-
e.$slots["label-left"] ? (
|
|
5810
|
+
e.$slots["label-left"] ? (o(), u("label", {
|
|
5797
5811
|
key: 0,
|
|
5798
5812
|
class: m(["w-slider__label w-slider__label--left w-form-el-shakable", e.labelClasses]),
|
|
5799
5813
|
for: `button--${e._.uid}`
|
|
5800
5814
|
}, [
|
|
5801
5815
|
c(e.$slots, "label-left")
|
|
5802
|
-
], 10, es)) : i.labelLeft ? (
|
|
5816
|
+
], 10, es)) : i.labelLeft ? (o(), u("label", {
|
|
5803
5817
|
key: 1,
|
|
5804
5818
|
class: m(["w-slider__label w-slider__label--left w-form-el-shakable", e.labelClasses]),
|
|
5805
5819
|
for: `button--${e._.uid}`,
|
|
@@ -5845,12 +5859,12 @@ function hs(e, t, i, o, s, l) {
|
|
|
5845
5859
|
onClick: t[3] || (t[3] = M(() => {
|
|
5846
5860
|
}, ["prevent"]))
|
|
5847
5861
|
}, null, 42, ss),
|
|
5848
|
-
i.thumbLabel ? (
|
|
5862
|
+
i.thumbLabel ? (o(), u("label", {
|
|
5849
5863
|
key: 0,
|
|
5850
5864
|
class: m(["w-slider__thumb-label", l.thumbClasses]),
|
|
5851
5865
|
for: `button--${e._.uid}`
|
|
5852
5866
|
}, [
|
|
5853
|
-
i.thumbLabel === "droplet" ? (
|
|
5867
|
+
i.thumbLabel === "droplet" ? (o(), u("div", as, [
|
|
5854
5868
|
c(e.$slots, "label", { value: e.rangeValueScaled }, () => [
|
|
5855
5869
|
B(S(~~e.rangeValueScaled), 1)
|
|
5856
5870
|
])
|
|
@@ -5863,18 +5877,18 @@ function hs(e, t, i, o, s, l) {
|
|
|
5863
5877
|
], 10, os)) : p("", !0)
|
|
5864
5878
|
], 4)
|
|
5865
5879
|
], 42, ls),
|
|
5866
|
-
i.stepLabels && i.step ? (
|
|
5880
|
+
i.stepLabels && i.step ? (o(), u("div", ns, [
|
|
5867
5881
|
w("div", {
|
|
5868
5882
|
class: "w-slider__step-label",
|
|
5869
5883
|
onClick: t[6] || (t[6] = (n) => l.onStepLabelClick(0))
|
|
5870
5884
|
}, S(this.minVal), 1),
|
|
5871
|
-
(
|
|
5885
|
+
(o(!0), u(v, null, x(~~l.numberOfSteps, (n) => (o(), u("div", {
|
|
5872
5886
|
class: "w-slider__step-label",
|
|
5873
5887
|
key: n,
|
|
5874
5888
|
onClick: (r) => l.onStepLabelClick(n * (100 / l.numberOfSteps)),
|
|
5875
5889
|
style: R(`left: ${n * (100 / l.numberOfSteps)}%`)
|
|
5876
5890
|
}, S(l.percentToScaled(n * (100 / l.numberOfSteps))), 13, rs))), 128)),
|
|
5877
|
-
~~l.numberOfSteps !== l.numberOfSteps ? (
|
|
5891
|
+
~~l.numberOfSteps !== l.numberOfSteps ? (o(), u("div", {
|
|
5878
5892
|
key: 0,
|
|
5879
5893
|
class: "w-slider__step-label",
|
|
5880
5894
|
onClick: t[7] || (t[7] = (n) => l.onStepLabelClick(100)),
|
|
@@ -5882,13 +5896,13 @@ function hs(e, t, i, o, s, l) {
|
|
|
5882
5896
|
}, S(this.maxVal), 1)) : p("", !0)
|
|
5883
5897
|
])) : p("", !0)
|
|
5884
5898
|
]),
|
|
5885
|
-
e.$slots["label-right"] ? (
|
|
5899
|
+
e.$slots["label-right"] ? (o(), u("label", {
|
|
5886
5900
|
key: 2,
|
|
5887
5901
|
class: m(["w-slider__label w-slider__label--right w-form-el-shakable", e.labelClasses]),
|
|
5888
5902
|
for: `button--${e._.uid}`
|
|
5889
5903
|
}, [
|
|
5890
5904
|
c(e.$slots, "label-right")
|
|
5891
|
-
], 10, ds)) : i.labelRight ? (
|
|
5905
|
+
], 10, ds)) : i.labelRight ? (o(), u("label", {
|
|
5892
5906
|
key: 3,
|
|
5893
5907
|
class: m(["w-slider__label w-slider__label--right w-form-el-shakable", e.labelClasses]),
|
|
5894
5908
|
for: `button--${e._.uid}`,
|
|
@@ -6036,13 +6050,13 @@ const cs = {
|
|
|
6036
6050
|
}
|
|
6037
6051
|
}
|
|
6038
6052
|
}, ps = /* @__PURE__ */ C(cs, [["render", hs]]), ms = { key: 0 };
|
|
6039
|
-
function fs(e, t, i,
|
|
6040
|
-
return i.modelValue || i.modelValue === void 0 ? (
|
|
6053
|
+
function fs(e, t, i, s, a, l) {
|
|
6054
|
+
return i.modelValue || i.modelValue === void 0 ? (o(), u("div", {
|
|
6041
6055
|
key: 0,
|
|
6042
6056
|
class: m(["w-spinner", l.classes]),
|
|
6043
6057
|
style: R(l.styles)
|
|
6044
6058
|
}, [
|
|
6045
|
-
l.isThreeDots ? (
|
|
6059
|
+
l.isThreeDots ? (o(), u("span", ms)) : p("", !0)
|
|
6046
6060
|
], 6)) : p("", !0);
|
|
6047
6061
|
}
|
|
6048
6062
|
const gs = {
|
|
@@ -6084,8 +6098,8 @@ const gs = {
|
|
|
6084
6098
|
}
|
|
6085
6099
|
}
|
|
6086
6100
|
}, bs = /* @__PURE__ */ C(gs, [["render", fs]]);
|
|
6087
|
-
function ys(e, t, i,
|
|
6088
|
-
return
|
|
6101
|
+
function ys(e, t, i, s, a, l) {
|
|
6102
|
+
return o(), u("div", {
|
|
6089
6103
|
class: m(["w-steps", l.classes])
|
|
6090
6104
|
}, null, 2);
|
|
6091
6105
|
}
|
|
@@ -6112,13 +6126,13 @@ const ws = {
|
|
|
6112
6126
|
key: 1,
|
|
6113
6127
|
class: "w-switch__thumb"
|
|
6114
6128
|
}, _s = ["for"];
|
|
6115
|
-
function $s(e, t, i,
|
|
6129
|
+
function $s(e, t, i, s, a, l) {
|
|
6116
6130
|
const n = $("w-progress");
|
|
6117
|
-
return
|
|
6131
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: a.isOn, disabled: e.isDisabled, readonly: e.isReadonly }, {
|
|
6118
6132
|
valid: e.valid,
|
|
6119
6133
|
"onUpdate:valid": t[3] || (t[3] = (r) => e.valid = r),
|
|
6120
6134
|
onReset: t[4] || (t[4] = (r) => {
|
|
6121
|
-
e.$emit("update:modelValue",
|
|
6135
|
+
e.$emit("update:modelValue", a.isOn = null), e.$emit("input", null);
|
|
6122
6136
|
}),
|
|
6123
6137
|
class: l.classes,
|
|
6124
6138
|
style: e.$attrs.style
|
|
@@ -6129,7 +6143,7 @@ function $s(e, t, i, o, s, l) {
|
|
|
6129
6143
|
id: `w-switch--${e._.uid}`,
|
|
6130
6144
|
type: "checkbox",
|
|
6131
6145
|
name: e.inputName,
|
|
6132
|
-
checked:
|
|
6146
|
+
checked: a.isOn,
|
|
6133
6147
|
disabled: e.isDisabled || e.isReadonly || null,
|
|
6134
6148
|
readonly: e.isReadonly || null,
|
|
6135
6149
|
"aria-readonly": e.isReadonly ? "true" : "false",
|
|
@@ -6138,11 +6152,11 @@ function $s(e, t, i, o, s, l) {
|
|
|
6138
6152
|
}, l.attrs, {
|
|
6139
6153
|
onChange: t[0] || (t[0] = (r) => l.onInput()),
|
|
6140
6154
|
onFocus: t[1] || (t[1] = (r) => e.$emit("focus", r)),
|
|
6141
|
-
"aria-checked":
|
|
6155
|
+
"aria-checked": a.isOn || "false",
|
|
6142
6156
|
role: "switch"
|
|
6143
6157
|
}), null, 16, vs),
|
|
6144
|
-
l.hasLabel && i.labelOnLeft ? (
|
|
6145
|
-
e.$slots.default || i.label ? (
|
|
6158
|
+
l.hasLabel && i.labelOnLeft ? (o(), u(v, { key: 0 }, [
|
|
6159
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
6146
6160
|
key: 0,
|
|
6147
6161
|
class: m(["w-switch__label w-switch__label--left w-form-el-shakable", e.labelClasses]),
|
|
6148
6162
|
for: `w-switch--${e._.uid}`
|
|
@@ -6158,19 +6172,19 @@ function $s(e, t, i, o, s, l) {
|
|
|
6158
6172
|
e.$refs.input.focus(), e.$refs.input.click();
|
|
6159
6173
|
})
|
|
6160
6174
|
}, [
|
|
6161
|
-
e.$slots.track ? (
|
|
6175
|
+
e.$slots.track ? (o(), u("div", Ss, [
|
|
6162
6176
|
c(e.$slots, "track")
|
|
6163
6177
|
])) : p("", !0),
|
|
6164
|
-
e.$slots.thumb || i.loading ? (
|
|
6165
|
-
i.loading ? (
|
|
6178
|
+
e.$slots.thumb || i.loading ? (o(), u("div", Bs, [
|
|
6179
|
+
i.loading ? (o(), b(n, _({
|
|
6166
6180
|
key: 0,
|
|
6167
6181
|
circle: "",
|
|
6168
6182
|
color: "inherit"
|
|
6169
6183
|
}, typeof i.loading == "number" && { "model-value": i.loading }), null, 16)) : c(e.$slots, "thumb", { key: 1 })
|
|
6170
6184
|
])) : p("", !0)
|
|
6171
6185
|
], 2),
|
|
6172
|
-
l.hasLabel && !i.labelOnLeft ? (
|
|
6173
|
-
e.$slots.default || i.label ? (
|
|
6186
|
+
l.hasLabel && !i.labelOnLeft ? (o(), u(v, { key: 1 }, [
|
|
6187
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
6174
6188
|
key: 0,
|
|
6175
6189
|
class: m(["w-switch__label w-switch__label--right w-form-el-shakable", e.labelClasses]),
|
|
6176
6190
|
for: `w-switch--${e._.uid}`
|
|
@@ -6261,8 +6275,8 @@ const Is = {
|
|
|
6261
6275
|
}
|
|
6262
6276
|
}
|
|
6263
6277
|
}, Vs = /* @__PURE__ */ C(Is, [["render", $s]]), Ts = { class: "w-tabs__content" };
|
|
6264
|
-
function Ls(e, t, i,
|
|
6265
|
-
return
|
|
6278
|
+
function Ls(e, t, i, s, a, l) {
|
|
6279
|
+
return o(), u("div", Ts, [
|
|
6266
6280
|
c(e.$slots, "default", { item: i.item })
|
|
6267
6281
|
]);
|
|
6268
6282
|
}
|
|
@@ -6277,16 +6291,16 @@ const Rs = {
|
|
|
6277
6291
|
key: 0,
|
|
6278
6292
|
class: "w-tabs__content-wrap"
|
|
6279
6293
|
}, Es = ["innerHTML"], As = ["innerHTML"];
|
|
6280
|
-
function Ws(e, t, i,
|
|
6294
|
+
function Ws(e, t, i, s, a, l) {
|
|
6281
6295
|
const n = $("tab-content");
|
|
6282
|
-
return
|
|
6296
|
+
return o(), u("div", {
|
|
6283
6297
|
class: m(["w-tabs", l.tabsClasses])
|
|
6284
6298
|
}, [
|
|
6285
6299
|
w("div", {
|
|
6286
6300
|
class: m(["w-tabs__bar", l.tabsBarClasses]),
|
|
6287
6301
|
ref: "tabs-bar"
|
|
6288
6302
|
}, [
|
|
6289
|
-
(
|
|
6303
|
+
(o(!0), u(v, null, x(e.tabs, (r, d) => (o(), u("div", {
|
|
6290
6304
|
class: m(["w-tabs__bar-item", l.barItemClasses(r)]),
|
|
6291
6305
|
key: d,
|
|
6292
6306
|
onClick: (h) => !r._disabled && r._uid !== e.activeTabUid && l.openTab(r._uid),
|
|
@@ -6312,22 +6326,22 @@ function Ws(e, t, i, o, s, l) {
|
|
|
6312
6326
|
}, null, 8, Ps)
|
|
6313
6327
|
])
|
|
6314
6328
|
], 42, Os))), 128)),
|
|
6315
|
-
e.$slots["tabs-bar-extra"] ? (
|
|
6329
|
+
e.$slots["tabs-bar-extra"] ? (o(), u("div", zs, [
|
|
6316
6330
|
c(e.$slots, "tabs-bar-extra")
|
|
6317
6331
|
])) : p("", !0),
|
|
6318
|
-
!i.noSlider && !i.card ? (
|
|
6332
|
+
!i.noSlider && !i.card ? (o(), u("div", {
|
|
6319
6333
|
key: 1,
|
|
6320
6334
|
class: m(["w-tabs__slider", i.sliderColor]),
|
|
6321
6335
|
style: R(l.sliderStyles)
|
|
6322
6336
|
}, null, 6)) : p("", !0)
|
|
6323
6337
|
], 2),
|
|
6324
|
-
e.tabs.length ? (
|
|
6325
|
-
i.keepInDom ? (
|
|
6338
|
+
e.tabs.length ? (o(), u("div", Ms, [
|
|
6339
|
+
i.keepInDom ? (o(), b(ae, {
|
|
6326
6340
|
key: 0,
|
|
6327
6341
|
name: l.transitionName
|
|
6328
6342
|
}, {
|
|
6329
6343
|
default: f(() => [
|
|
6330
|
-
(
|
|
6344
|
+
(o(!0), u(v, null, x(e.tabs, (r, d) => W((o(), b(n, {
|
|
6331
6345
|
key: r._uid,
|
|
6332
6346
|
item: r,
|
|
6333
6347
|
class: m(l.contentClasses)
|
|
@@ -6344,7 +6358,7 @@ function Ws(e, t, i, o, s, l) {
|
|
|
6344
6358
|
index: r._index + 1,
|
|
6345
6359
|
active: r._index === l.activeTab._index
|
|
6346
6360
|
}, () => [
|
|
6347
|
-
r[i.itemContentKey] ? (
|
|
6361
|
+
r[i.itemContentKey] ? (o(), u("div", {
|
|
6348
6362
|
key: 0,
|
|
6349
6363
|
innerHTML: r[i.itemContentKey]
|
|
6350
6364
|
}, null, 8, Es)) : p("", !0)
|
|
@@ -6356,22 +6370,22 @@ function Ws(e, t, i, o, s, l) {
|
|
|
6356
6370
|
])), 128))
|
|
6357
6371
|
]),
|
|
6358
6372
|
_: 3
|
|
6359
|
-
}, 8, ["name"])) : (
|
|
6373
|
+
}, 8, ["name"])) : (o(), b(O, {
|
|
6360
6374
|
key: 1,
|
|
6361
6375
|
name: l.transitionName,
|
|
6362
6376
|
mode: l.transitionMode
|
|
6363
6377
|
}, {
|
|
6364
6378
|
default: f(() => [
|
|
6365
|
-
(
|
|
6379
|
+
(o(), b(Oe, {
|
|
6366
6380
|
exclude: i.keepAlive ? "" : "tab-content"
|
|
6367
6381
|
}, [
|
|
6368
|
-
(
|
|
6382
|
+
(o(), b(n, {
|
|
6369
6383
|
key: e.activeTabUid,
|
|
6370
6384
|
item: l.activeTab,
|
|
6371
6385
|
class: m(i.contentClass)
|
|
6372
6386
|
}, {
|
|
6373
6387
|
default: f(({ item: r }) => [
|
|
6374
|
-
r ? (
|
|
6388
|
+
r ? (o(), u(v, { key: 0 }, [
|
|
6375
6389
|
e.$slots[`item-content.${r._index + 1}`] ? c(e.$slots, `item-content.${r._index + 1}`, {
|
|
6376
6390
|
key: 0,
|
|
6377
6391
|
item: l.getOriginalItem(r),
|
|
@@ -6383,7 +6397,7 @@ function Ws(e, t, i, o, s, l) {
|
|
|
6383
6397
|
index: r._index + 1,
|
|
6384
6398
|
active: r._uid === e.activeTabUid
|
|
6385
6399
|
}, () => [
|
|
6386
|
-
r[i.itemContentKey] ? (
|
|
6400
|
+
r[i.itemContentKey] ? (o(), u("div", {
|
|
6387
6401
|
key: 0,
|
|
6388
6402
|
innerHTML: r[i.itemContentKey]
|
|
6389
6403
|
}, null, 8, As)) : p("", !0)
|
|
@@ -6505,10 +6519,10 @@ const Ns = {
|
|
|
6505
6519
|
}));
|
|
6506
6520
|
},
|
|
6507
6521
|
reopenTheActiveTab() {
|
|
6508
|
-
var t, i,
|
|
6522
|
+
var t, i, s;
|
|
6509
6523
|
if (this.tabs.length === 1) return this.openTab(this.tabs[0]._uid);
|
|
6510
6524
|
let e = (t = this.tabsByUid[this.activeTabUid]) == null ? void 0 : t._uid;
|
|
6511
|
-
e || (e = (i = this.tabs[this.activeTabIndex]) == null ? void 0 : i._uid), e || (e = (
|
|
6525
|
+
e || (e = (i = this.tabs[this.activeTabIndex]) == null ? void 0 : i._uid), e || (e = (s = this.tabs[Math.max(this.activeTabIndex - 1, this.tabs.length - 1)]) == null ? void 0 : s._uid), e && this.openTab(e);
|
|
6512
6526
|
},
|
|
6513
6527
|
onResize() {
|
|
6514
6528
|
this.updateSlider(!1);
|
|
@@ -6537,16 +6551,16 @@ const Ns = {
|
|
|
6537
6551
|
this.activeTabEl = t && t.querySelector(".w-tabs__bar-item--active");
|
|
6538
6552
|
}
|
|
6539
6553
|
if (!this.fillBar && this.activeTabEl) {
|
|
6540
|
-
const { left: t, width: i } = this.activeTabEl.getBoundingClientRect(),
|
|
6541
|
-
this.slider.left = `${t -
|
|
6554
|
+
const { left: t, width: i } = this.activeTabEl.getBoundingClientRect(), s = this.activeTabEl.parentNode, { left: a } = s.getBoundingClientRect(), { borderLeftWidth: l } = getComputedStyle(s);
|
|
6555
|
+
this.slider.left = `${t - a - parseInt(l) + s.scrollLeft}px`, this.slider.width = `${i}px`;
|
|
6542
6556
|
} else
|
|
6543
6557
|
this.slider.left = `${this.activeTab._index * 100 / this.tabs.length}%`, this.slider.width = `${100 / this.tabs.length}%`;
|
|
6544
6558
|
},
|
|
6545
6559
|
updateActiveTab(e) {
|
|
6546
6560
|
var t, i;
|
|
6547
6561
|
typeof e == "string" ? e = ~~e : (isNaN(e) || e < 0) && (e = 0), (t = this.tabs[e]) != null && t._uid && (this.openTab((i = this.tabs[e]) == null ? void 0 : i._uid), this.$nextTick(() => {
|
|
6548
|
-
const
|
|
6549
|
-
this.activeTabEl =
|
|
6562
|
+
const s = this.$refs["tabs-bar"];
|
|
6563
|
+
this.activeTabEl = s && s.querySelector(`.w-tabs__bar-item:nth-child(${e + 1})`), this.activeTabEl && this.activeTabEl.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
6550
6564
|
}));
|
|
6551
6565
|
},
|
|
6552
6566
|
// Return the original item (so there is no `_index`, etc.).
|
|
@@ -6604,9 +6618,9 @@ const Ns = {
|
|
|
6604
6618
|
key: 0,
|
|
6605
6619
|
class: "w-table__pagination w-pagination"
|
|
6606
6620
|
}, mo = { class: "pages-wrap" }, fo = { class: "w-pagination__results" };
|
|
6607
|
-
function go(e, t, i,
|
|
6621
|
+
function go(e, t, i, s, a, l) {
|
|
6608
6622
|
const n = $("w-icon"), r = $("w-progress"), d = $("w-transition-fade"), h = $("w-transition-expand"), y = $("w-select"), k = $("w-button");
|
|
6609
|
-
return
|
|
6623
|
+
return o(), u("div", {
|
|
6610
6624
|
class: m(["w-table w-table--wrap", l.classes])
|
|
6611
6625
|
}, [
|
|
6612
6626
|
w("div", Ds, [
|
|
@@ -6617,20 +6631,20 @@ function go(e, t, i, o, s, l) {
|
|
|
6617
6631
|
onMouseout: t[3] || (t[3] = (...g) => l.onMouseOut && l.onMouseOut(...g))
|
|
6618
6632
|
}, [
|
|
6619
6633
|
w("colgroup", Hs, [
|
|
6620
|
-
(
|
|
6634
|
+
(o(!0), u(v, null, x(i.headers, (g, V) => (o(), u("col", {
|
|
6621
6635
|
class: m(["w-table__col", l.colClasses[V]]),
|
|
6622
6636
|
key: V,
|
|
6623
6637
|
width: g.width || null
|
|
6624
6638
|
}, null, 10, Fs))), 128))
|
|
6625
6639
|
], 512),
|
|
6626
|
-
i.noHeaders ? p("", !0) : (
|
|
6640
|
+
i.noHeaders ? p("", !0) : (o(), u("thead", js, [
|
|
6627
6641
|
w("tr", null, [
|
|
6628
|
-
(
|
|
6642
|
+
(o(!0), u(v, null, x(i.headers, (g, V) => (o(), u("th", {
|
|
6629
6643
|
class: m(["w-table__header", l.headerClasses(g)]),
|
|
6630
6644
|
key: V,
|
|
6631
6645
|
onClick: (I) => !e.colResizing.dragging && g.sortable !== !1 && l.sortTable(g)
|
|
6632
6646
|
}, [
|
|
6633
|
-
g.sortable !== !1 && g.align === "right" ? (
|
|
6647
|
+
g.sortable !== !1 && g.align === "right" ? (o(), b(n, {
|
|
6634
6648
|
key: 0,
|
|
6635
6649
|
class: m(["w-table__header-sort", l.headerSortClasses(g)])
|
|
6636
6650
|
}, {
|
|
@@ -6639,7 +6653,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6639
6653
|
])),
|
|
6640
6654
|
_: 2
|
|
6641
6655
|
}, 1032, ["class"])) : p("", !0),
|
|
6642
|
-
g.label ? (
|
|
6656
|
+
g.label ? (o(), u(v, { key: 1 }, [
|
|
6643
6657
|
e.$slots["header-label"] ? c(e.$slots, "header-label", {
|
|
6644
6658
|
key: 0,
|
|
6645
6659
|
header: g,
|
|
@@ -6647,12 +6661,12 @@ function go(e, t, i, o, s, l) {
|
|
|
6647
6661
|
index: V + 1
|
|
6648
6662
|
}, () => [
|
|
6649
6663
|
B(S(g.label || ""), 1)
|
|
6650
|
-
]) : (
|
|
6664
|
+
]) : (o(), u("span", {
|
|
6651
6665
|
key: 1,
|
|
6652
6666
|
innerHTML: g.label || ""
|
|
6653
6667
|
}, null, 8, qs))
|
|
6654
6668
|
], 64)) : p("", !0),
|
|
6655
|
-
g.sortable !== !1 && g.align !== "right" ? (
|
|
6669
|
+
g.sortable !== !1 && g.align !== "right" ? (o(), b(n, {
|
|
6656
6670
|
key: 2,
|
|
6657
6671
|
class: m(["w-table__header-sort", l.headerSortClasses(g)])
|
|
6658
6672
|
}, {
|
|
@@ -6661,7 +6675,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6661
6675
|
])),
|
|
6662
6676
|
_: 2
|
|
6663
6677
|
}, 1032, ["class"])) : p("", !0),
|
|
6664
|
-
V < i.headers.length - 1 && i.resizableColumns ? (
|
|
6678
|
+
V < i.headers.length - 1 && i.resizableColumns ? (o(), u("span", {
|
|
6665
6679
|
key: 3,
|
|
6666
6680
|
class: m(["w-table__col-resizer", { "w-table__col-resizer--hover": e.colResizing.hover === V, "w-table__col-resizer--active": e.colResizing.columnIndex === V }]),
|
|
6667
6681
|
onClick: t[0] || (t[0] = M(() => {
|
|
@@ -6671,7 +6685,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6671
6685
|
]),
|
|
6672
6686
|
T(d, null, {
|
|
6673
6687
|
default: f(() => [
|
|
6674
|
-
i.loading === "header" ? (
|
|
6688
|
+
i.loading === "header" ? (o(), u("tr", Xs, [
|
|
6675
6689
|
w("td", {
|
|
6676
6690
|
colspan: i.headers.length
|
|
6677
6691
|
}, [
|
|
@@ -6683,7 +6697,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6683
6697
|
})
|
|
6684
6698
|
])),
|
|
6685
6699
|
w("tbody", null, [
|
|
6686
|
-
i.loading === !0 ? (
|
|
6700
|
+
i.loading === !0 ? (o(), u("tr", Gs, [
|
|
6687
6701
|
w("td", {
|
|
6688
6702
|
colspan: i.headers.length
|
|
6689
6703
|
}, [
|
|
@@ -6694,7 +6708,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6694
6708
|
])
|
|
6695
6709
|
])
|
|
6696
6710
|
], 8, Js)
|
|
6697
|
-
])) : l.tableItems.length ? p("", !0) : (
|
|
6711
|
+
])) : l.tableItems.length ? p("", !0) : (o(), u("tr", Zs, [
|
|
6698
6712
|
w("td", {
|
|
6699
6713
|
class: "w-table__cell text-center",
|
|
6700
6714
|
colspan: i.headers.length
|
|
@@ -6704,20 +6718,20 @@ function go(e, t, i, o, s, l) {
|
|
|
6704
6718
|
])
|
|
6705
6719
|
], 8, eo)
|
|
6706
6720
|
])),
|
|
6707
|
-
l.tableItems.length && i.loading !== !0 ? (
|
|
6721
|
+
l.tableItems.length && i.loading !== !0 ? (o(!0), u(v, { key: 2 }, x(l.paginatedItems, (g, V) => (o(), u(v, { key: V }, [
|
|
6708
6722
|
e.$slots.item ? c(e.$slots, "item", {
|
|
6709
6723
|
key: 0,
|
|
6710
6724
|
item: g,
|
|
6711
6725
|
index: V + 1,
|
|
6712
6726
|
select: () => l.doSelectRow(g, V),
|
|
6713
6727
|
classes: { "w-table__row": !0, "w-table__row--selected": l.selectedRowsByUid[g._uid] !== void 0, "w-table__row--expanded": l.expandedRowsByUid[g._uid] !== void 0 }
|
|
6714
|
-
}) : (
|
|
6728
|
+
}) : (o(), u("tr", {
|
|
6715
6729
|
key: 1,
|
|
6716
6730
|
class: m(["w-table__row", { "w-table__row--selected": l.selectedRowsByUid[g._uid] !== void 0, "w-table__row--expanded": l.expandedRowsByUid[g._uid] !== void 0 }]),
|
|
6717
6731
|
onClick: (I) => l.doSelectRow(g, V)
|
|
6718
6732
|
}, [
|
|
6719
|
-
(
|
|
6720
|
-
e.$slots[`item-cell.${I.key}`] || e.$slots[`item-cell.${z + 1}`] || e.$slots["item-cell"] ? (
|
|
6733
|
+
(o(!0), u(v, null, x(i.headers, (I, z) => (o(), u(v, null, [
|
|
6734
|
+
e.$slots[`item-cell.${I.key}`] || e.$slots[`item-cell.${z + 1}`] || e.$slots["item-cell"] ? (o(), u("td", {
|
|
6721
6735
|
class: m(["w-table__cell", { [`text-${I.align || "left"}`]: !0, "w-table__cell--sticky": I.sticky }]),
|
|
6722
6736
|
key: `${z}-a`,
|
|
6723
6737
|
"data-label": I.label
|
|
@@ -6741,11 +6755,11 @@ function go(e, t, i, o, s, l) {
|
|
|
6741
6755
|
label: g[I.key] || "",
|
|
6742
6756
|
index: V + 1
|
|
6743
6757
|
}) : p("", !0),
|
|
6744
|
-
z < i.headers.length - 1 && i.resizableColumns ? (
|
|
6758
|
+
z < i.headers.length - 1 && i.resizableColumns ? (o(), u("span", {
|
|
6745
6759
|
key: 3,
|
|
6746
6760
|
class: m(["w-table__col-resizer", { "w-table__col-resizer--hover": e.colResizing.hover === z, "w-table__col-resizer--active": e.colResizing.columnIndex === z }])
|
|
6747
6761
|
}, null, 2)) : p("", !0)
|
|
6748
|
-
], 10, io)) : (
|
|
6762
|
+
], 10, io)) : (o(), u("td", {
|
|
6749
6763
|
class: m(["w-table__cell", { [`text-${I.align || "left"}`]: !0, "w-table__cell--sticky": I.sticky }]),
|
|
6750
6764
|
key: `${z}-b`,
|
|
6751
6765
|
"data-label": I.label
|
|
@@ -6753,27 +6767,27 @@ function go(e, t, i, o, s, l) {
|
|
|
6753
6767
|
w("div", {
|
|
6754
6768
|
innerHTML: g[I.key] || ""
|
|
6755
6769
|
}, null, 8, so),
|
|
6756
|
-
z < i.headers.length - 1 && i.resizableColumns ? (
|
|
6770
|
+
z < i.headers.length - 1 && i.resizableColumns ? (o(), u("span", {
|
|
6757
6771
|
key: 0,
|
|
6758
6772
|
class: m(["w-table__col-resizer", { "w-table__col-resizer--hover": e.colResizing.hover === z, "w-table__col-resizer--active": e.colResizing.columnIndex === z }])
|
|
6759
6773
|
}, null, 2)) : p("", !0)
|
|
6760
6774
|
], 10, lo))
|
|
6761
6775
|
], 64))), 256))
|
|
6762
6776
|
], 10, to)),
|
|
6763
|
-
l.expandedRowsByUid[g._uid] ? (
|
|
6777
|
+
l.expandedRowsByUid[g._uid] ? (o(), u("tr", oo, [
|
|
6764
6778
|
w("td", {
|
|
6765
6779
|
class: "w-table__cell",
|
|
6766
6780
|
colspan: i.headers.length
|
|
6767
6781
|
}, [
|
|
6768
6782
|
T(h, { y: "" }, {
|
|
6769
6783
|
default: f(() => [
|
|
6770
|
-
l.expandedRowsByUid[g._uid] ? (
|
|
6784
|
+
l.expandedRowsByUid[g._uid] ? (o(), u("div", no, [
|
|
6771
6785
|
c(e.$slots, "row-expansion", {
|
|
6772
6786
|
item: g,
|
|
6773
6787
|
index: V + 1
|
|
6774
6788
|
})
|
|
6775
6789
|
])) : p("", !0),
|
|
6776
|
-
V < i.headers.length - 1 && i.resizableColumns ? (
|
|
6790
|
+
V < i.headers.length - 1 && i.resizableColumns ? (o(), u("span", {
|
|
6777
6791
|
key: 1,
|
|
6778
6792
|
class: m(["w-table__col-resizer", { "w-table__col-resizer--hover": e.colResizing.hover === V, "w-table__col-resizer--active": e.colResizing.columnIndex === e.j }])
|
|
6779
6793
|
}, null, 2)) : p("", !0)
|
|
@@ -6783,12 +6797,12 @@ function go(e, t, i, o, s, l) {
|
|
|
6783
6797
|
], 8, ao)
|
|
6784
6798
|
])) : p("", !0)
|
|
6785
6799
|
], 64))), 128)) : p("", !0),
|
|
6786
|
-
e.$slots["extra-row"] ? (
|
|
6800
|
+
e.$slots["extra-row"] ? (o(), u("div", ro, [
|
|
6787
6801
|
c(e.$slots, "extra-row")
|
|
6788
6802
|
])) : p("", !0)
|
|
6789
6803
|
]),
|
|
6790
|
-
e.$slots.footer || e.$slots["footer-row"] ? (
|
|
6791
|
-
e.$slots["footer-row"] ? c(e.$slots, "footer-row", { key: 0 }) : e.$slots.footer ? (
|
|
6804
|
+
e.$slots.footer || e.$slots["footer-row"] ? (o(), u("tfoot", uo, [
|
|
6805
|
+
e.$slots["footer-row"] ? c(e.$slots, "footer-row", { key: 0 }) : e.$slots.footer ? (o(), u("tr", ho, [
|
|
6792
6806
|
w("td", {
|
|
6793
6807
|
class: "w-table__cell",
|
|
6794
6808
|
colspan: i.headers.length
|
|
@@ -6799,7 +6813,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6799
6813
|
])) : p("", !0)
|
|
6800
6814
|
], 32)
|
|
6801
6815
|
]),
|
|
6802
|
-
i.pagination && e.paginationConfig ? (
|
|
6816
|
+
i.pagination && e.paginationConfig ? (o(), u("div", po, [
|
|
6803
6817
|
c(e.$slots, "pagination", {
|
|
6804
6818
|
range: `${e.paginationConfig.start}-${e.paginationConfig.end}`,
|
|
6805
6819
|
total: e.paginationConfig.total,
|
|
@@ -6807,7 +6821,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6807
6821
|
page: e.paginationConfig.page,
|
|
6808
6822
|
goToPage: l.goToPage
|
|
6809
6823
|
}, () => [
|
|
6810
|
-
e.paginationConfig.itemsPerPageOptions ? (
|
|
6824
|
+
e.paginationConfig.itemsPerPageOptions ? (o(), b(y, {
|
|
6811
6825
|
key: 0,
|
|
6812
6826
|
class: "w-pagination__items-per-page",
|
|
6813
6827
|
modelValue: e.paginationConfig.itemsPerPage,
|
|
@@ -6827,8 +6841,8 @@ function go(e, t, i, o, s, l) {
|
|
|
6827
6841
|
text: "",
|
|
6828
6842
|
lg: ""
|
|
6829
6843
|
}, null, 8, ["disabled"]),
|
|
6830
|
-
e.paginationConfig.pagesCount > 7 ? (
|
|
6831
|
-
[1, e.paginationConfig.pagesCount, e.paginationConfig.page - 1, e.paginationConfig.page, e.paginationConfig.page + 1].includes(g) ? (
|
|
6844
|
+
e.paginationConfig.pagesCount > 7 ? (o(!0), u(v, { key: 0 }, x(e.paginationConfig.pagesCount, (g) => (o(), u(v, { key: g }, [
|
|
6845
|
+
[1, e.paginationConfig.pagesCount, e.paginationConfig.page - 1, e.paginationConfig.page, e.paginationConfig.page + 1].includes(g) ? (o(), b(k, {
|
|
6832
6846
|
key: 0,
|
|
6833
6847
|
class: m(["w-pagination__page", { "w-pagination__page--active": g === e.paginationConfig.page }]),
|
|
6834
6848
|
onClick: (V) => g !== e.paginationConfig.page && l.goToPage(g),
|
|
@@ -6839,7 +6853,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6839
6853
|
B(S(g), 1)
|
|
6840
6854
|
]),
|
|
6841
6855
|
_: 2
|
|
6842
|
-
}, 1032, ["onClick", "class"])) : [1, e.paginationConfig.pagesCount, e.paginationConfig.page - 1, e.paginationConfig.page, e.paginationConfig.page + 1].includes(g - 1) ? (
|
|
6856
|
+
}, 1032, ["onClick", "class"])) : [1, e.paginationConfig.pagesCount, e.paginationConfig.page - 1, e.paginationConfig.page, e.paginationConfig.page + 1].includes(g - 1) ? (o(), b(k, {
|
|
6843
6857
|
key: 1,
|
|
6844
6858
|
class: m(["w-pagination__page", { "w-pagination__page--active": g === e.paginationConfig.page }]),
|
|
6845
6859
|
onClick: (V) => g !== e.paginationConfig.page && l.goToPage(g),
|
|
@@ -6851,7 +6865,7 @@ function go(e, t, i, o, s, l) {
|
|
|
6851
6865
|
])),
|
|
6852
6866
|
_: 2
|
|
6853
6867
|
}, 1032, ["onClick", "class"])) : p("", !0)
|
|
6854
|
-
], 64))), 128)) : (
|
|
6868
|
+
], 64))), 128)) : (o(!0), u(v, { key: 1 }, x(e.paginationConfig.pagesCount, (g) => (o(), b(k, {
|
|
6855
6869
|
class: m(["w-pagination__page", { "w-pagination__page--active": g === e.paginationConfig.page }]),
|
|
6856
6870
|
key: g,
|
|
6857
6871
|
onClick: (V) => g !== e.paginationConfig.page && l.goToPage(g),
|
|
@@ -6981,7 +6995,7 @@ const we = 15, bo = {
|
|
|
6981
6995
|
sortedItems() {
|
|
6982
6996
|
if (!this.activeSorting.length || this.sortFunction || this.fetch) return this.filteredItems;
|
|
6983
6997
|
const e = this.activeSorting[0].replace(/^[+-]/, ""), t = this.activeSorting[0][0] === "-";
|
|
6984
|
-
return [...this.filteredItems].sort((i,
|
|
6998
|
+
return [...this.filteredItems].sort((i, s) => (i = i[e], s = s[e], !isNaN(i) && !isNaN(s) && (i = parseFloat(i), s = parseFloat(s)), (i > s ? 1 : -1) * (t ? -1 : 1)));
|
|
6985
6999
|
},
|
|
6986
7000
|
paginatedItems() {
|
|
6987
7001
|
return typeof this.fetch == "function" ? this.sortedItems : this.sortedItems.slice(this.paginationConfig.start - 1, this.paginationConfig.end);
|
|
@@ -7046,22 +7060,22 @@ const we = 15, bo = {
|
|
|
7046
7060
|
t && this.activeSortingKeys[e.key] === "-" ? this.activeSorting = [] : this.activeSorting[0] = (t ? "-" : "+") + e.key, this.$emit("update:sort", this.activeSorting), typeof this.sortFunction == "function" ? await this.sortFunction(this.activeSorting) : typeof this.fetch == "function" && await this.callApiFetch();
|
|
7047
7061
|
},
|
|
7048
7062
|
doSelectRow(e, t) {
|
|
7049
|
-
const i = this.expandableRows === "" ? !0 : this.expandableRows,
|
|
7063
|
+
const i = this.expandableRows === "" ? !0 : this.expandableRows, s = this.selectableRows === "" ? !0 : this.selectableRows;
|
|
7050
7064
|
if (i) {
|
|
7051
|
-
const
|
|
7052
|
-
|
|
7065
|
+
const a = this.expandedRowsByUid[e._uid] === void 0;
|
|
7066
|
+
a ? this.expandableRows.toString() === "1" ? this.expandedRowsInternal = [e._uid] : this.expandedRowsInternal.push(e._uid) : this.expandedRowsInternal = this.expandedRowsInternal.filter((l) => l !== e._uid), this.$emit(
|
|
7053
7067
|
"row-expand",
|
|
7054
7068
|
{
|
|
7055
7069
|
item: e,
|
|
7056
7070
|
index: t,
|
|
7057
|
-
expanded:
|
|
7071
|
+
expanded: a,
|
|
7058
7072
|
expandedRows: this.expandedRowsInternal.map((l) => this.filteredItems[l])
|
|
7059
7073
|
}
|
|
7060
7074
|
), this.$emit("update:expanded-rows", this.expandedRowsInternal);
|
|
7061
|
-
} else if (
|
|
7062
|
-
let
|
|
7075
|
+
} else if (s) {
|
|
7076
|
+
let a = !1;
|
|
7063
7077
|
const l = this.selectedRowsByUid[e._uid] === void 0;
|
|
7064
|
-
l ? (this.selectableRows.toString() === "1" ? this.selectedRowsInternal = [e._uid] : this.selectedRowsInternal.push(e._uid),
|
|
7078
|
+
l ? (this.selectableRows.toString() === "1" ? this.selectedRowsInternal = [e._uid] : this.selectedRowsInternal.push(e._uid), a = !0) : (!this.forceSelection || this.selectedRowsInternal.length > 1) && (this.selectedRowsInternal = this.selectedRowsInternal.filter((n) => n !== e._uid), a = !0), a && (this.$emit(
|
|
7065
7079
|
"row-select",
|
|
7066
7080
|
{
|
|
7067
7081
|
item: e,
|
|
@@ -7096,15 +7110,15 @@ const we = 15, bo = {
|
|
|
7096
7110
|
* (losing the 2 columns width). So do a direct DOM manipulation using `.style.width`.
|
|
7097
7111
|
*/
|
|
7098
7112
|
onResizerMouseMove(e) {
|
|
7099
|
-
const { startCursorX: t, columnEl: i, nextColumnEl:
|
|
7113
|
+
const { startCursorX: t, columnEl: i, nextColumnEl: s, colWidth: a, nextColWidth: l } = this.colResizing;
|
|
7100
7114
|
this.colResizing.dragging = !0;
|
|
7101
|
-
const n = e.pageX - t, r =
|
|
7102
|
-
i.style.width =
|
|
7103
|
-
const y = n < 0 && i.offsetWidth > d || i.offsetWidth <= we, k = n > 0 &&
|
|
7115
|
+
const n = e.pageX - t, r = a + l, d = a + n, h = l - n;
|
|
7116
|
+
i.style.width = a + n + "px", s.style.width = l - n + "px";
|
|
7117
|
+
const y = n < 0 && i.offsetWidth > d || i.offsetWidth <= we, k = n > 0 && s.offsetWidth > h;
|
|
7104
7118
|
if (y) {
|
|
7105
7119
|
const g = Math.max(i.offsetWidth, we);
|
|
7106
|
-
i.style.width = g + "px",
|
|
7107
|
-
} else k && (i.style.width = r -
|
|
7120
|
+
i.style.width = g + "px", s.style.width = r - g + "px";
|
|
7121
|
+
} else k && (i.style.width = r - s.offsetWidth + "px", s.style.width = s.offsetWidth + "px");
|
|
7108
7122
|
},
|
|
7109
7123
|
onResizerMouseUp() {
|
|
7110
7124
|
document.removeEventListener("mousemove", this.onResizerMouseMove), document.removeEventListener("mouseup", this.onResizerMouseUp), setTimeout(() => {
|
|
@@ -7116,8 +7130,8 @@ const we = 15, bo = {
|
|
|
7116
7130
|
}, 0);
|
|
7117
7131
|
},
|
|
7118
7132
|
initPagination() {
|
|
7119
|
-
var
|
|
7120
|
-
const e = ((
|
|
7133
|
+
var s, a;
|
|
7134
|
+
const e = ((s = this.pagination) == null ? void 0 : s.itemsPerPage) ?? 20, t = ((a = this.pagination) == null ? void 0 : a.itemsPerPageOptions) || [20, 100, { label: "All", value: 0 }];
|
|
7121
7135
|
t.find((l) => ((l == null ? void 0 : l.value) ?? l) === +e) || t.push(e), this.paginationConfig.itemsPerPageOptions = t.map((l) => ({
|
|
7122
7136
|
label: ["string", "number"].includes(typeof l) ? l.toString() : l.label || l.value,
|
|
7123
7137
|
value: ["string", "number"].includes(typeof l) ? ~~l : l.value ?? l.label
|
|
@@ -7146,8 +7160,8 @@ const we = 15, bo = {
|
|
|
7146
7160
|
updatePaginationConfig({ itemsPerPage: e, page: t, total: i }) {
|
|
7147
7161
|
if (i && (this.paginationConfig.total = i), e !== void 0) {
|
|
7148
7162
|
this.paginationConfig.itemsPerPage = e, e = e || this.paginationConfig.total, this.paginationConfig.page = t || this.paginationConfig.page || 1, t = this.paginationConfig.page, i = this.paginationConfig.total;
|
|
7149
|
-
const
|
|
7150
|
-
this.paginationConfig.start = 1, this.paginationConfig.end = i >=
|
|
7163
|
+
const s = e * t;
|
|
7164
|
+
this.paginationConfig.start = 1, this.paginationConfig.end = i >= s ? s : i % s, this.paginationConfig.pagesCount = Math.ceil(i / e);
|
|
7151
7165
|
}
|
|
7152
7166
|
t && this.goToPage(t);
|
|
7153
7167
|
},
|
|
@@ -7166,13 +7180,13 @@ const we = 15, bo = {
|
|
|
7166
7180
|
* While waiting for the call to resolve, nothing in the table will change.
|
|
7167
7181
|
*/
|
|
7168
7182
|
async callApiFetch() {
|
|
7169
|
-
const { page: e, start: t, end: i, total:
|
|
7183
|
+
const { page: e, start: t, end: i, total: s, itemsPerPage: a } = this.paginationConfig;
|
|
7170
7184
|
return await this.fetch({
|
|
7171
7185
|
page: e,
|
|
7172
7186
|
start: t,
|
|
7173
|
-
end: i ||
|
|
7174
|
-
total:
|
|
7175
|
-
itemsPerPage:
|
|
7187
|
+
end: i || s,
|
|
7188
|
+
total: s,
|
|
7189
|
+
itemsPerPage: a || s,
|
|
7176
7190
|
sorting: this.activeSorting
|
|
7177
7191
|
});
|
|
7178
7192
|
}
|
|
@@ -7207,8 +7221,8 @@ const we = 15, bo = {
|
|
|
7207
7221
|
}
|
|
7208
7222
|
}
|
|
7209
7223
|
}, yo = /* @__PURE__ */ C(bo, [["render", go]]), wo = ["role", "aria-pressed", "tabindex"];
|
|
7210
|
-
function ko(e, t, i,
|
|
7211
|
-
return
|
|
7224
|
+
function ko(e, t, i, s, a, l) {
|
|
7225
|
+
return o(), u("span", {
|
|
7212
7226
|
class: m(["w-tag", l.classes]),
|
|
7213
7227
|
onClick: t[1] || (t[1] = (n) => {
|
|
7214
7228
|
e.$emit("update:modelValue", !i.modelValue), e.$emit("input", !i.modelValue);
|
|
@@ -7222,7 +7236,7 @@ function ko(e, t, i, o, s, l) {
|
|
|
7222
7236
|
style: R(l.styles)
|
|
7223
7237
|
}, [
|
|
7224
7238
|
c(e.$slots, "default"),
|
|
7225
|
-
i.closable && i.modelValue ? (
|
|
7239
|
+
i.closable && i.modelValue ? (o(), u("i", {
|
|
7226
7240
|
key: 0,
|
|
7227
7241
|
class: "w-icon w-tag__closable wi-cross",
|
|
7228
7242
|
onClick: t[0] || (t[0] = M((n) => {
|
|
@@ -7283,21 +7297,21 @@ const vo = {
|
|
|
7283
7297
|
}
|
|
7284
7298
|
}
|
|
7285
7299
|
}, Co = /* @__PURE__ */ C(vo, [["render", ko]]), So = ["for"], Bo = ["id", "name", "placeholder", "rows", "cols", "readonly", "aria-readonly", "disabled", "required", "tabindex"], _o = ["for"];
|
|
7286
|
-
function $o(e, t, i,
|
|
7300
|
+
function $o(e, t, i, s, a, l) {
|
|
7287
7301
|
const n = $("w-icon");
|
|
7288
|
-
return
|
|
7302
|
+
return o(), b(L(e.formRegister ? "w-form-element" : "div"), _({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: a.inputValue, disabled: e.isDisabled, readonly: e.isReadonly, isFocused: a.isFocused }, {
|
|
7289
7303
|
valid: e.valid,
|
|
7290
7304
|
"onUpdate:valid": t[6] || (t[6] = (r) => e.valid = r),
|
|
7291
7305
|
wrap: l.hasLabel && i.labelPosition !== "inside",
|
|
7292
7306
|
onReset: t[7] || (t[7] = (r) => {
|
|
7293
|
-
e.$emit("update:modelValue",
|
|
7307
|
+
e.$emit("update:modelValue", a.inputValue = ""), e.$emit("input", "");
|
|
7294
7308
|
}),
|
|
7295
7309
|
class: l.classes,
|
|
7296
7310
|
style: e.$attrs.style
|
|
7297
7311
|
}), {
|
|
7298
7312
|
default: f(() => [
|
|
7299
|
-
i.labelPosition === "left" ? (
|
|
7300
|
-
e.$slots.default || i.label ? (
|
|
7313
|
+
i.labelPosition === "left" ? (o(), u(v, { key: 0 }, [
|
|
7314
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
7301
7315
|
key: 0,
|
|
7302
7316
|
class: m(["w-textarea__label w-textarea__label--left w-form-el-shakable", e.labelClasses]),
|
|
7303
7317
|
for: `w-textarea--${e._.uid}`
|
|
@@ -7313,7 +7327,7 @@ function $o(e, t, i, o, s, l) {
|
|
|
7313
7327
|
c(e.$slots, "icon-left", {
|
|
7314
7328
|
inputId: `w-textarea--${e._.uid}`
|
|
7315
7329
|
}, () => [
|
|
7316
|
-
i.innerIconLeft ? (
|
|
7330
|
+
i.innerIconLeft ? (o(), b(n, {
|
|
7317
7331
|
key: 0,
|
|
7318
7332
|
class: "w-textarea__icon w-textarea__icon--inner-left",
|
|
7319
7333
|
tag: "label",
|
|
@@ -7329,7 +7343,7 @@ function $o(e, t, i, o, s, l) {
|
|
|
7329
7343
|
W(w("textarea", _({
|
|
7330
7344
|
class: "w-textarea__textarea",
|
|
7331
7345
|
ref: "textarea",
|
|
7332
|
-
"onUpdate:modelValue": t[1] || (t[1] = (r) =>
|
|
7346
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => a.inputValue = r)
|
|
7333
7347
|
}, l.attrs, {
|
|
7334
7348
|
onInput: t[2] || (t[2] = (...r) => l.onInput && l.onInput(...r)),
|
|
7335
7349
|
onFocus: t[3] || (t[3] = (...r) => l.onFocus && l.onFocus(...r)),
|
|
@@ -7345,10 +7359,10 @@ function $o(e, t, i, o, s, l) {
|
|
|
7345
7359
|
required: e.required || null,
|
|
7346
7360
|
tabindex: e.tabindex || null
|
|
7347
7361
|
}), null, 16, Bo), [
|
|
7348
|
-
[ve,
|
|
7362
|
+
[ve, a.inputValue]
|
|
7349
7363
|
]),
|
|
7350
|
-
i.labelPosition === "inside" && l.showLabelInside ? (
|
|
7351
|
-
e.$slots.default || i.label ? (
|
|
7364
|
+
i.labelPosition === "inside" && l.showLabelInside ? (o(), u(v, { key: 0 }, [
|
|
7365
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
7352
7366
|
key: 0,
|
|
7353
7367
|
class: m(["w-textarea__label w-textarea__label--inside w-form-el-shakable", e.labelClasses])
|
|
7354
7368
|
}, [
|
|
@@ -7360,7 +7374,7 @@ function $o(e, t, i, o, s, l) {
|
|
|
7360
7374
|
c(e.$slots, "icon-right", {
|
|
7361
7375
|
inputId: `w-textarea--${e._.uid}`
|
|
7362
7376
|
}, () => [
|
|
7363
|
-
i.innerIconRight ? (
|
|
7377
|
+
i.innerIconRight ? (o(), b(n, {
|
|
7364
7378
|
key: 0,
|
|
7365
7379
|
class: "w-textarea__icon w-textarea__icon--inner-right",
|
|
7366
7380
|
tag: "label",
|
|
@@ -7374,8 +7388,8 @@ function $o(e, t, i, o, s, l) {
|
|
|
7374
7388
|
}, 8, ["for"])) : p("", !0)
|
|
7375
7389
|
])
|
|
7376
7390
|
], 2),
|
|
7377
|
-
i.labelPosition === "right" ? (
|
|
7378
|
-
e.$slots.default || i.label ? (
|
|
7391
|
+
i.labelPosition === "right" ? (o(), u(v, { key: 1 }, [
|
|
7392
|
+
e.$slots.default || i.label ? (o(), u("label", {
|
|
7379
7393
|
key: 0,
|
|
7380
7394
|
class: m(["w-textarea__label w-textarea__label--right w-form-el-shakable", e.labelClasses]),
|
|
7381
7395
|
for: `w-textarea--${e._.uid}`
|
|
@@ -7516,15 +7530,15 @@ const Io = {
|
|
|
7516
7530
|
}
|
|
7517
7531
|
}
|
|
7518
7532
|
}, Vo = /* @__PURE__ */ C(Io, [["render", $o]]), To = ["innerHTML"], Lo = ["innerHTML"];
|
|
7519
|
-
function Ro(e, t, i,
|
|
7520
|
-
return
|
|
7533
|
+
function Ro(e, t, i, s, a, l) {
|
|
7534
|
+
return o(), u("ul", {
|
|
7521
7535
|
class: m(["w-timeline", l.classes])
|
|
7522
7536
|
}, [
|
|
7523
|
-
(
|
|
7537
|
+
(o(!0), u(v, null, x(i.items, (n, r) => (o(), u("li", {
|
|
7524
7538
|
class: "w-timeline-item",
|
|
7525
7539
|
key: r
|
|
7526
7540
|
}, [
|
|
7527
|
-
(
|
|
7541
|
+
(o(), b(L(n[i.itemIconKey] || i.icon ? "w-icon" : "div"), {
|
|
7528
7542
|
class: m(["w-timeline-item__bullet", { [n[i.itemColorKey] || i.color]: n[i.itemColorKey] || i.color }])
|
|
7529
7543
|
}, {
|
|
7530
7544
|
default: f(() => [
|
|
@@ -7576,8 +7590,8 @@ const xo = {
|
|
|
7576
7590
|
}
|
|
7577
7591
|
}
|
|
7578
7592
|
}, Oo = /* @__PURE__ */ C(xo, [["render", Ro]]);
|
|
7579
|
-
function Po(e, t, i,
|
|
7580
|
-
return
|
|
7593
|
+
function Po(e, t, i, s, a, l) {
|
|
7594
|
+
return o(), u("div", {
|
|
7581
7595
|
class: m(["w-toolbar", l.classes]),
|
|
7582
7596
|
style: R(l.styles)
|
|
7583
7597
|
}, [
|
|
@@ -7636,15 +7650,15 @@ const zo = {
|
|
|
7636
7650
|
}
|
|
7637
7651
|
}
|
|
7638
7652
|
}, Mo = /* @__PURE__ */ C(zo, [["render", Po]]);
|
|
7639
|
-
function Eo(e, t, i,
|
|
7640
|
-
return
|
|
7653
|
+
function Eo(e, t, i, s, a, l) {
|
|
7654
|
+
return o(), u(v, null, [
|
|
7641
7655
|
c(e.$slots, "activator", { on: l.activatorEventHandlers }),
|
|
7642
7656
|
T(O, {
|
|
7643
7657
|
name: l.transitionName,
|
|
7644
7658
|
appear: ""
|
|
7645
7659
|
}, {
|
|
7646
7660
|
default: f(() => [
|
|
7647
|
-
e.detachableVisible ? (
|
|
7661
|
+
e.detachableVisible ? (o(), u("div", {
|
|
7648
7662
|
class: m(["w-tooltip", l.classes]),
|
|
7649
7663
|
ref: "detachable",
|
|
7650
7664
|
key: e._.uid,
|
|
@@ -7794,8 +7808,8 @@ const Ao = {
|
|
|
7794
7808
|
}
|
|
7795
7809
|
// watch, mounted & beforeDestroy hooks are set in the detachable.js mixin.
|
|
7796
7810
|
}, Wo = /* @__PURE__ */ C(Ao, [["render", Eo]]);
|
|
7797
|
-
function No(e, t, i,
|
|
7798
|
-
return
|
|
7811
|
+
function No(e, t, i, s, a, l) {
|
|
7812
|
+
return o(), b(O, _({ name: "bounce" }, e.$props), {
|
|
7799
7813
|
default: f(() => [
|
|
7800
7814
|
c(e.$slots, "default")
|
|
7801
7815
|
]),
|
|
@@ -7809,8 +7823,8 @@ const Ko = {
|
|
|
7809
7823
|
duration: { type: [Number, String] }
|
|
7810
7824
|
}
|
|
7811
7825
|
}, Do = /* @__PURE__ */ C(Ko, [["render", No]]);
|
|
7812
|
-
function Ho(e, t, i,
|
|
7813
|
-
return
|
|
7826
|
+
function Ho(e, t, i, s, a, l) {
|
|
7827
|
+
return o(), b(O, {
|
|
7814
7828
|
name: "expand",
|
|
7815
7829
|
mode: "out-in",
|
|
7816
7830
|
css: !1,
|
|
@@ -7921,8 +7935,8 @@ const Fo = {
|
|
|
7921
7935
|
}
|
|
7922
7936
|
}
|
|
7923
7937
|
}, jo = /* @__PURE__ */ C(Fo, [["render", Ho]]);
|
|
7924
|
-
function Uo(e, t, i,
|
|
7925
|
-
return
|
|
7938
|
+
function Uo(e, t, i, s, a, l) {
|
|
7939
|
+
return o(), b(O, _({ name: "fade" }, e.$props), {
|
|
7926
7940
|
default: f(() => [
|
|
7927
7941
|
c(e.$slots, "default")
|
|
7928
7942
|
]),
|
|
@@ -7936,8 +7950,8 @@ const qo = {
|
|
|
7936
7950
|
duration: { type: [Number, String] }
|
|
7937
7951
|
}
|
|
7938
7952
|
}, Xo = /* @__PURE__ */ C(qo, [["render", Uo]]);
|
|
7939
|
-
function Yo(e, t, i,
|
|
7940
|
-
return
|
|
7953
|
+
function Yo(e, t, i, s, a, l) {
|
|
7954
|
+
return o(), b(O, _({ name: "scale" }, e.$props), {
|
|
7941
7955
|
default: f(() => [
|
|
7942
7956
|
c(e.$slots, "default")
|
|
7943
7957
|
]),
|
|
@@ -7951,8 +7965,8 @@ const Go = {
|
|
|
7951
7965
|
duration: { type: [Number, String] }
|
|
7952
7966
|
}
|
|
7953
7967
|
}, Jo = /* @__PURE__ */ C(Go, [["render", Yo]]);
|
|
7954
|
-
function Qo(e, t, i,
|
|
7955
|
-
return
|
|
7968
|
+
function Qo(e, t, i, s, a, l) {
|
|
7969
|
+
return o(), b(O, _({ name: "scale-fade" }, e.$props), {
|
|
7956
7970
|
default: f(() => [
|
|
7957
7971
|
c(e.$slots, "default")
|
|
7958
7972
|
]),
|
|
@@ -7966,8 +7980,8 @@ const Zo = {
|
|
|
7966
7980
|
duration: { type: [Number, String] }
|
|
7967
7981
|
}
|
|
7968
7982
|
}, ea = /* @__PURE__ */ C(Zo, [["render", Qo]]);
|
|
7969
|
-
function ta(e, t, i,
|
|
7970
|
-
return
|
|
7983
|
+
function ta(e, t, i, s, a, l) {
|
|
7984
|
+
return o(), b(O, _({ name: l.transitionName }, e.$props), {
|
|
7971
7985
|
default: f(() => [
|
|
7972
7986
|
c(e.$slots, "default")
|
|
7973
7987
|
]),
|
|
@@ -7993,8 +8007,8 @@ const ia = {
|
|
|
7993
8007
|
}
|
|
7994
8008
|
}
|
|
7995
8009
|
}, la = /* @__PURE__ */ C(ia, [["render", ta]]);
|
|
7996
|
-
function sa(e, t, i,
|
|
7997
|
-
return
|
|
8010
|
+
function sa(e, t, i, s, a, l) {
|
|
8011
|
+
return o(), b(O, _({ name: l.transitionName }, e.$props), {
|
|
7998
8012
|
default: f(() => [
|
|
7999
8013
|
c(e.$slots, "default")
|
|
8000
8014
|
]),
|
|
@@ -8020,8 +8034,8 @@ const oa = {
|
|
|
8020
8034
|
}
|
|
8021
8035
|
}
|
|
8022
8036
|
}, aa = /* @__PURE__ */ C(oa, [["render", sa]]);
|
|
8023
|
-
function na(e, t, i,
|
|
8024
|
-
return
|
|
8037
|
+
function na(e, t, i, s, a, l) {
|
|
8038
|
+
return o(), b(O, _({ name: "twist" }, e.$props), {
|
|
8025
8039
|
default: f(() => [
|
|
8026
8040
|
c(e.$slots, "default")
|
|
8027
8041
|
]),
|
|
@@ -8038,16 +8052,16 @@ const ra = {
|
|
|
8038
8052
|
key: 1,
|
|
8039
8053
|
class: "ml1"
|
|
8040
8054
|
};
|
|
8041
|
-
function ca(e, t, i,
|
|
8055
|
+
function ca(e, t, i, s, a, l) {
|
|
8042
8056
|
const n = $("w-button"), r = $("w-icon"), d = $("w-tree", !0);
|
|
8043
|
-
return
|
|
8057
|
+
return o(), u("ul", {
|
|
8044
8058
|
class: m(["w-tree", l.classes])
|
|
8045
8059
|
}, [
|
|
8046
|
-
(
|
|
8060
|
+
(o(!0), u(v, null, x(e.currentDepthItems, (h, y) => (o(), u("li", {
|
|
8047
8061
|
class: m(["w-tree__item", l.itemClasses(h)]),
|
|
8048
8062
|
key: y
|
|
8049
8063
|
}, [
|
|
8050
|
-
(
|
|
8064
|
+
(o(), b(L(l.getTreeItemComponent(h)), _({
|
|
8051
8065
|
class: "w-tree__item-label",
|
|
8052
8066
|
ref_for: !0
|
|
8053
8067
|
}, h.route && { [!e.$router || l.hasExternalLink(h) ? "href" : "to"]: h.route }, {
|
|
@@ -8056,7 +8070,7 @@ function ca(e, t, i, o, s, l) {
|
|
|
8056
8070
|
tabindex: l.getTreeItemTabindex(h)
|
|
8057
8071
|
}), {
|
|
8058
8072
|
default: f(() => [
|
|
8059
|
-
(h.children || h.branch) && (i.expandOpenIcon && h.open || i.expandIcon) && !(i.unexpandableEmpty && !h.children) ? (
|
|
8073
|
+
(h.children || h.branch) && (i.expandOpenIcon && h.open || i.expandIcon) && !(i.unexpandableEmpty && !h.children) ? (o(), b(n, {
|
|
8060
8074
|
key: 0,
|
|
8061
8075
|
class: "w-tree__item-expand",
|
|
8062
8076
|
onClick: M((k) => !i.disabled && !h.disabled && l.onLabelClick(h, k), ["stop"]),
|
|
@@ -8076,7 +8090,7 @@ function ca(e, t, i, o, s, l) {
|
|
|
8076
8090
|
}, () => {
|
|
8077
8091
|
var k;
|
|
8078
8092
|
return [
|
|
8079
|
-
l.itemIcon(h) ? (
|
|
8093
|
+
l.itemIcon(h) ? (o(), b(r, {
|
|
8080
8094
|
key: 0,
|
|
8081
8095
|
class: "w-tree__item-icon",
|
|
8082
8096
|
color: h.originalItem[i.itemIconColorKey] || i.iconColor
|
|
@@ -8089,19 +8103,19 @@ function ca(e, t, i, o, s, l) {
|
|
|
8089
8103
|
w("span", {
|
|
8090
8104
|
innerHTML: h.label
|
|
8091
8105
|
}, null, 8, ua),
|
|
8092
|
-
i.counts && (h.children || h.branch) ? (
|
|
8106
|
+
i.counts && (h.children || h.branch) ? (o(), u("span", ha, "(" + S(((k = h.originalItem.children) == null ? void 0 : k.length) || 0) + ")", 1)) : p("", !0)
|
|
8093
8107
|
];
|
|
8094
8108
|
})
|
|
8095
8109
|
]),
|
|
8096
8110
|
_: 2
|
|
8097
8111
|
}, 1040, ["onClick", "onKeydown", "tabindex"])),
|
|
8098
|
-
(
|
|
8112
|
+
(o(), b(L(i.noTransition ? "div" : "w-transition-expand"), {
|
|
8099
8113
|
y: !i.noTransition || null,
|
|
8100
8114
|
onAfterEnter: (k) => e.$emit("open", l.emitPayload(h)),
|
|
8101
8115
|
onAfterLeave: (k) => e.$emit("close", l.emitPayload(h))
|
|
8102
8116
|
}, {
|
|
8103
8117
|
default: f(() => [
|
|
8104
|
-
h.children && h.open ? (
|
|
8118
|
+
h.children && h.open ? (o(), b(d, _({
|
|
8105
8119
|
key: 0,
|
|
8106
8120
|
ref_for: !0
|
|
8107
8121
|
}, e.$props, {
|
|
@@ -8194,26 +8208,26 @@ const pa = {
|
|
|
8194
8208
|
updateCurrentDepthTree(e, t = []) {
|
|
8195
8209
|
if (this.currentDepthItems = [], !Array.isArray(e) && typeof e != "object")
|
|
8196
8210
|
return j(`[w-tree] the tree items must be of type array or object, ${typeof e} received.`);
|
|
8197
|
-
Array.isArray(e) || (e = [e]), e.forEach((i,
|
|
8211
|
+
Array.isArray(e) || (e = [e]), e.forEach((i, s) => {
|
|
8198
8212
|
var l, n;
|
|
8199
|
-
const
|
|
8213
|
+
const a = {
|
|
8200
8214
|
originalItem: i,
|
|
8201
8215
|
// Store the original item to return it on event emits.
|
|
8202
|
-
_uid: this.depth.toString() + (
|
|
8216
|
+
_uid: this.depth.toString() + (s + 1),
|
|
8203
8217
|
label: i[this.itemLabelKey],
|
|
8204
8218
|
children: !!i.children,
|
|
8205
8219
|
// The children tree remains available in originalItem.
|
|
8206
8220
|
branch: i.branch,
|
|
8207
8221
|
route: i[this.itemRouteKey],
|
|
8208
8222
|
disabled: i[this.itemDisabledKey],
|
|
8209
|
-
selected: ((l = t[
|
|
8223
|
+
selected: ((l = t[s]) == null ? void 0 : l.selected) || !1,
|
|
8210
8224
|
depth: this.depth,
|
|
8211
|
-
open: !!((n = t[
|
|
8225
|
+
open: !!((n = t[s]) != null && n.open || this.expandAll || i[this.itemOpenKey]),
|
|
8212
8226
|
parent: this.parent || null,
|
|
8213
8227
|
path: []
|
|
8214
8228
|
// Ancestors path from root to leaf including self.
|
|
8215
8229
|
};
|
|
8216
|
-
|
|
8230
|
+
a.path = this.getTreeItemPath(a), this.currentDepthItems.push(a);
|
|
8217
8231
|
});
|
|
8218
8232
|
},
|
|
8219
8233
|
getTreeItemComponent(e) {
|
|
@@ -8254,13 +8268,13 @@ const pa = {
|
|
|
8254
8268
|
},
|
|
8255
8269
|
onLabelClick(e, t) {
|
|
8256
8270
|
e[this.itemRouteKey] && this.$router && !this.hasExternalLink(e) && t.preventDefault(), (e.children || e.branch && !this.unexpandableEmpty) && this.expandDepth(e), this.selectable && (e.selected = !e.selected);
|
|
8257
|
-
const
|
|
8258
|
-
this.$emit("click",
|
|
8271
|
+
const s = this.emitPayload(e, t);
|
|
8272
|
+
this.$emit("click", s), this.emitItemSelection(e, t);
|
|
8259
8273
|
},
|
|
8260
8274
|
onLabelKeydown(e, t) {
|
|
8261
8275
|
if (!(t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) && [13, 32, 37, 38, 39, 40].includes(t.keyCode) && ((e.children || e.branch) && ([13, 32].includes(t.keyCode) ? this.expandDepth(e) && t.preventDefault() : t.keyCode === 37 ? this.expandDepth(e, !1) && t.preventDefault() : t.keyCode === 39 && this.expandDepth(e, !0) && t.preventDefault()), [38, 40].includes(t.keyCode))) {
|
|
8262
|
-
const
|
|
8263
|
-
[...
|
|
8276
|
+
const s = this.$el.closest(".w-tree--depth0").querySelectorAll('.w-tree__item-label[tabindex="0"]'), a = t.target.closest(".w-tree__item-label"), l = t.keyCode === 38 ? -1 : 1;
|
|
8277
|
+
[...s].some((n, r) => n.isSameNode(a) ? (s[r + l] && s[r + l].focus(), !0) : !1);
|
|
8264
8278
|
}
|
|
8265
8279
|
t.keyCode === 13 && (this.selectable && (e.selected = !e.selected), this.emitItemSelection(e, t));
|
|
8266
8280
|
},
|