@selfeesas/shared-components 0.1.8 → 0.1.9
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.
|
@@ -1,54 +1,51 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
const
|
|
1
|
+
import { computed as o, markRaw as X, defineComponent as V, getCurrentInstance as Q, h, useAttrs as Y, createBlock as F, openBlock as $, mergeProps as w, withCtx as q, createElementBlock as Z, Fragment as ee, renderList as te, createVNode as re } from "vue";
|
|
2
|
+
const ae = {
|
|
3
3
|
xs: 18,
|
|
4
4
|
sm: 24,
|
|
5
5
|
md: 32,
|
|
6
6
|
lg: 38,
|
|
7
7
|
xl: 46
|
|
8
|
-
},
|
|
8
|
+
}, ne = {
|
|
9
9
|
size: String
|
|
10
10
|
};
|
|
11
|
-
function le(e, t =
|
|
12
|
-
return
|
|
11
|
+
function le(e, t = ae) {
|
|
12
|
+
return o(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function P(e) {
|
|
15
|
+
return X(V(e));
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return ue(e);
|
|
19
|
-
}
|
|
20
|
-
function Ee(e, t) {
|
|
17
|
+
function K(e, t) {
|
|
21
18
|
return e !== void 0 && e() || t;
|
|
22
19
|
}
|
|
23
|
-
function
|
|
20
|
+
function A(e, t) {
|
|
24
21
|
return e !== void 0 ? t.concat(e()) : t;
|
|
25
22
|
}
|
|
26
|
-
const
|
|
23
|
+
const I = "0 0 24 24", B = (e) => e, E = (e) => `ionicons ${e}`, D = {
|
|
27
24
|
"mdi-": (e) => `mdi ${e}`,
|
|
28
|
-
"icon-":
|
|
25
|
+
"icon-": B,
|
|
29
26
|
// fontawesome equiv
|
|
30
27
|
"bt-": (e) => `bt ${e}`,
|
|
31
28
|
"eva-": (e) => `eva ${e}`,
|
|
32
|
-
"ion-md":
|
|
33
|
-
"ion-ios":
|
|
34
|
-
"ion-logo":
|
|
35
|
-
"iconfont ":
|
|
29
|
+
"ion-md": E,
|
|
30
|
+
"ion-ios": E,
|
|
31
|
+
"ion-logo": E,
|
|
32
|
+
"iconfont ": B,
|
|
36
33
|
"ti-": (e) => `themify-icon ${e}`,
|
|
37
34
|
"bi-": (e) => `bootstrap-icons ${e}`,
|
|
38
|
-
"i-":
|
|
35
|
+
"i-": B
|
|
39
36
|
// UnoCSS pure icons
|
|
40
|
-
},
|
|
37
|
+
}, T = {
|
|
41
38
|
o_: "-outlined",
|
|
42
39
|
r_: "-round",
|
|
43
40
|
s_: "-sharp"
|
|
44
|
-
},
|
|
41
|
+
}, H = {
|
|
45
42
|
sym_o_: "-outlined",
|
|
46
43
|
sym_r_: "-rounded",
|
|
47
44
|
sym_s_: "-sharp"
|
|
48
|
-
},
|
|
45
|
+
}, se = new RegExp("^(" + Object.keys(D).join("|") + ")"), oe = new RegExp("^(" + Object.keys(T).join("|") + ")"), O = new RegExp("^(" + Object.keys(H).join("|") + ")"), ue = /^[Mm]\s?[-+]?\.?\d/, ie = /^img:/, ce = /^svguse:/, de = /^ion-/, ve = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, G = P({
|
|
49
46
|
name: "QIcon",
|
|
50
47
|
props: {
|
|
51
|
-
...
|
|
48
|
+
...ne,
|
|
52
49
|
tag: {
|
|
53
50
|
type: String,
|
|
54
51
|
default: "i"
|
|
@@ -59,331 +56,140 @@ const Y = "0 0 24 24", F = (e) => e, V = (e) => `ionicons ${e}`, se = {
|
|
|
59
56
|
right: Boolean
|
|
60
57
|
},
|
|
61
58
|
setup(e, { slots: t }) {
|
|
62
|
-
const { proxy: { $q:
|
|
59
|
+
const { proxy: { $q: u } } = Q(), r = le(e), n = o(
|
|
63
60
|
() => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
|
|
64
|
-
),
|
|
65
|
-
let
|
|
66
|
-
if (
|
|
61
|
+
), i = o(() => {
|
|
62
|
+
let l, a = e.name;
|
|
63
|
+
if (a === "none" || !a)
|
|
67
64
|
return { none: !0 };
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
if (
|
|
72
|
-
if (
|
|
65
|
+
if (u.iconMapFn !== null) {
|
|
66
|
+
const s = u.iconMapFn(a);
|
|
67
|
+
if (s !== void 0)
|
|
68
|
+
if (s.icon !== void 0) {
|
|
69
|
+
if (a = s.icon, a === "none" || !a)
|
|
73
70
|
return { none: !0 };
|
|
74
71
|
} else
|
|
75
72
|
return {
|
|
76
|
-
cls:
|
|
77
|
-
content:
|
|
73
|
+
cls: s.cls,
|
|
74
|
+
content: s.content !== void 0 ? s.content : " "
|
|
78
75
|
};
|
|
79
76
|
}
|
|
80
|
-
if (
|
|
81
|
-
const [
|
|
77
|
+
if (ue.test(a) === !0) {
|
|
78
|
+
const [s, g = I] = a.split("|");
|
|
82
79
|
return {
|
|
83
80
|
svg: !0,
|
|
84
|
-
viewBox:
|
|
85
|
-
nodes:
|
|
86
|
-
const [
|
|
87
|
-
return
|
|
81
|
+
viewBox: g,
|
|
82
|
+
nodes: s.split("&&").map((d) => {
|
|
83
|
+
const [c, b, y] = d.split("@@");
|
|
84
|
+
return h("path", { style: b, d: c, transform: y });
|
|
88
85
|
})
|
|
89
86
|
};
|
|
90
87
|
}
|
|
91
|
-
if (
|
|
88
|
+
if (ie.test(a) === !0)
|
|
92
89
|
return {
|
|
93
90
|
img: !0,
|
|
94
|
-
src:
|
|
91
|
+
src: a.substring(4)
|
|
95
92
|
};
|
|
96
|
-
if (
|
|
97
|
-
const [
|
|
93
|
+
if (ce.test(a) === !0) {
|
|
94
|
+
const [s, g = I] = a.split("|");
|
|
98
95
|
return {
|
|
99
96
|
svguse: !0,
|
|
100
|
-
src:
|
|
101
|
-
viewBox:
|
|
97
|
+
src: s.substring(7),
|
|
98
|
+
viewBox: g
|
|
102
99
|
};
|
|
103
100
|
}
|
|
104
|
-
let
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
else if (
|
|
109
|
-
|
|
110
|
-
else if (
|
|
111
|
-
|
|
112
|
-
else if (
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
101
|
+
let m = " ";
|
|
102
|
+
const f = a.match(se);
|
|
103
|
+
if (f !== null)
|
|
104
|
+
l = D[f[1]](a);
|
|
105
|
+
else if (ve.test(a) === !0)
|
|
106
|
+
l = a;
|
|
107
|
+
else if (de.test(a) === !0)
|
|
108
|
+
l = `ionicons ion-${u.platform.is.ios === !0 ? "ios" : "md"}${a.substring(3)}`;
|
|
109
|
+
else if (O.test(a) === !0) {
|
|
110
|
+
l = "notranslate material-symbols";
|
|
111
|
+
const s = a.match(O);
|
|
112
|
+
s !== null && (a = a.substring(6), l += H[s[1]]), m = a;
|
|
116
113
|
} else {
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
114
|
+
l = "notranslate material-icons";
|
|
115
|
+
const s = a.match(oe);
|
|
116
|
+
s !== null && (a = a.substring(2), l += T[s[1]]), m = a;
|
|
120
117
|
}
|
|
121
118
|
return {
|
|
122
|
-
cls:
|
|
123
|
-
content:
|
|
119
|
+
cls: l,
|
|
120
|
+
content: m
|
|
124
121
|
};
|
|
125
122
|
});
|
|
126
123
|
return () => {
|
|
127
|
-
const
|
|
128
|
-
class:
|
|
129
|
-
style:
|
|
124
|
+
const l = {
|
|
125
|
+
class: n.value,
|
|
126
|
+
style: r.value,
|
|
130
127
|
"aria-hidden": "true"
|
|
131
128
|
};
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
])) :
|
|
135
|
-
|
|
136
|
-
viewBox:
|
|
137
|
-
},
|
|
138
|
-
])) :
|
|
139
|
-
|
|
140
|
-
viewBox:
|
|
129
|
+
return i.value.none === !0 ? h(e.tag, l, K(t.default)) : i.value.img === !0 ? h(e.tag, l, A(t.default, [
|
|
130
|
+
h("img", { src: i.value.src })
|
|
131
|
+
])) : i.value.svg === !0 ? h(e.tag, l, A(t.default, [
|
|
132
|
+
h("svg", {
|
|
133
|
+
viewBox: i.value.viewBox || "0 0 24 24"
|
|
134
|
+
}, i.value.nodes)
|
|
135
|
+
])) : i.value.svguse === !0 ? h(e.tag, l, A(t.default, [
|
|
136
|
+
h("svg", {
|
|
137
|
+
viewBox: i.value.viewBox
|
|
141
138
|
}, [
|
|
142
|
-
|
|
139
|
+
h("use", { "xlink:href": i.value.src })
|
|
143
140
|
])
|
|
144
|
-
])) : (
|
|
145
|
-
|
|
141
|
+
])) : (i.value.cls !== void 0 && (l.class += " " + i.value.cls), h(e.tag, l, A(t.default, [
|
|
142
|
+
i.value.content
|
|
146
143
|
])));
|
|
147
144
|
};
|
|
148
145
|
}
|
|
149
|
-
}), Pe = {
|
|
150
|
-
size: {
|
|
151
|
-
type: [String, Number],
|
|
152
|
-
default: "1em"
|
|
153
|
-
},
|
|
154
|
-
color: String
|
|
155
|
-
};
|
|
156
|
-
function Te(e) {
|
|
157
|
-
return {
|
|
158
|
-
cSize: s(() => e.size in Q ? `${Q[e.size]}px` : e.size),
|
|
159
|
-
classes: s(
|
|
160
|
-
() => "q-spinner" + (e.color ? ` text-${e.color}` : "")
|
|
161
|
-
)
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const Oe = W({
|
|
165
|
-
name: "QSpinner",
|
|
166
|
-
props: {
|
|
167
|
-
...Pe,
|
|
168
|
-
thickness: {
|
|
169
|
-
type: Number,
|
|
170
|
-
default: 5
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
setup(e) {
|
|
174
|
-
const { cSize: t, classes: a } = Te(e);
|
|
175
|
-
return () => v("svg", {
|
|
176
|
-
class: a.value + " q-spinner-mat",
|
|
177
|
-
width: t.value,
|
|
178
|
-
height: t.value,
|
|
179
|
-
viewBox: "25 25 50 50"
|
|
180
|
-
}, [
|
|
181
|
-
v("circle", {
|
|
182
|
-
class: "path",
|
|
183
|
-
cx: "50",
|
|
184
|
-
cy: "50",
|
|
185
|
-
r: "20",
|
|
186
|
-
fill: "none",
|
|
187
|
-
stroke: "currentColor",
|
|
188
|
-
"stroke-width": e.thickness,
|
|
189
|
-
"stroke-miterlimit": "10"
|
|
190
|
-
})
|
|
191
|
-
]);
|
|
192
|
-
}
|
|
193
146
|
});
|
|
194
|
-
function
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
const N = {
|
|
200
|
-
hasPassive: !1,
|
|
201
|
-
passiveCapture: !0,
|
|
202
|
-
notPassiveCapture: !0
|
|
203
|
-
};
|
|
204
|
-
try {
|
|
205
|
-
const e = Object.defineProperty({}, "passive", {
|
|
206
|
-
get() {
|
|
207
|
-
Object.assign(N, {
|
|
208
|
-
hasPassive: !0,
|
|
209
|
-
passive: { passive: !0 },
|
|
210
|
-
notPassive: { passive: !1 },
|
|
211
|
-
passiveCapture: { passive: !0, capture: !0 },
|
|
212
|
-
notPassiveCapture: { passive: !1, capture: !0 }
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
|
|
217
|
-
} catch {
|
|
218
|
-
}
|
|
219
|
-
function Me(e) {
|
|
220
|
-
return e.touches && e.touches[0] ? e = e.touches[0] : e.changedTouches && e.changedTouches[0] ? e = e.changedTouches[0] : e.targetTouches && e.targetTouches[0] && (e = e.targetTouches[0]), {
|
|
221
|
-
top: e.clientY,
|
|
222
|
-
left: e.clientX
|
|
223
|
-
};
|
|
147
|
+
function U(e, t) {
|
|
148
|
+
typeof t.type == "symbol" ? Array.isArray(t.children) === !0 && t.children.forEach((u) => {
|
|
149
|
+
U(e, u);
|
|
150
|
+
}) : e.add(t);
|
|
224
151
|
}
|
|
225
152
|
function fe(e) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
function T(e) {
|
|
232
|
-
e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
|
|
233
|
-
}
|
|
234
|
-
function ze(e, t, a) {
|
|
235
|
-
const n = `__q_${t}_evt`;
|
|
236
|
-
e[n] = e[n] !== void 0 ? e[n].concat(a) : a, a.forEach((i) => {
|
|
237
|
-
i[0].addEventListener(i[1], e[i[2]], N[i[3]]);
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
function Ke(e, t) {
|
|
241
|
-
const a = `__q_${t}_evt`;
|
|
242
|
-
e[a] !== void 0 && (e[a].forEach((n) => {
|
|
243
|
-
n[0].removeEventListener(n[1], e[n[2]], N[n[3]]);
|
|
244
|
-
}), e[a] = void 0);
|
|
245
|
-
}
|
|
246
|
-
function De(e) {
|
|
247
|
-
return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
|
|
248
|
-
}
|
|
249
|
-
function H(e, t) {
|
|
250
|
-
return De(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
|
|
251
|
-
}
|
|
252
|
-
function Ie(e, t = 250) {
|
|
253
|
-
let a = !1, n;
|
|
254
|
-
return function() {
|
|
255
|
-
return a === !1 && (a = !0, setTimeout(() => {
|
|
256
|
-
a = !1;
|
|
257
|
-
}, t), n = e.apply(this, arguments)), n;
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
function Z(e, t, a, n) {
|
|
261
|
-
a.modifiers.stop === !0 && fe(e);
|
|
262
|
-
const i = a.modifiers.color;
|
|
263
|
-
let f = a.modifiers.center;
|
|
264
|
-
f = f === !0 || n === !0;
|
|
265
|
-
const c = document.createElement("span"), u = document.createElement("span"), x = Me(e), { left: b, top: l, width: y, height: o } = t.getBoundingClientRect(), p = Math.sqrt(y * y + o * o), h = p / 2, k = `${(y - p) / 2}px`, d = f ? k : `${x.left - b - h}px`, q = `${(o - p) / 2}px`, P = f ? q : `${x.top - l - h}px`;
|
|
266
|
-
u.className = "q-ripple__inner", Ae(u, {
|
|
267
|
-
height: `${p}px`,
|
|
268
|
-
width: `${p}px`,
|
|
269
|
-
transform: `translate3d(${d},${P},0) scale3d(.2,.2,1)`,
|
|
270
|
-
opacity: 0
|
|
271
|
-
}), c.className = `q-ripple${i ? " text-" + i : ""}`, c.setAttribute("dir", "ltr"), c.appendChild(u), t.appendChild(c);
|
|
272
|
-
const B = () => {
|
|
273
|
-
c.remove(), clearTimeout(L);
|
|
274
|
-
};
|
|
275
|
-
a.abort.push(B);
|
|
276
|
-
let L = setTimeout(() => {
|
|
277
|
-
u.classList.add("q-ripple__inner--enter"), u.style.transform = `translate3d(${k},${q},0) scale3d(1,1,1)`, u.style.opacity = 0.2, L = setTimeout(() => {
|
|
278
|
-
u.classList.remove("q-ripple__inner--enter"), u.classList.add("q-ripple__inner--leave"), u.style.opacity = 0, L = setTimeout(() => {
|
|
279
|
-
c.remove(), a.abort.splice(a.abort.indexOf(B), 1);
|
|
280
|
-
}, 275);
|
|
281
|
-
}, 250);
|
|
282
|
-
}, 50);
|
|
283
|
-
}
|
|
284
|
-
function ee(e, { modifiers: t, value: a, arg: n }) {
|
|
285
|
-
const i = Object.assign({}, e.cfg.ripple, t, a);
|
|
286
|
-
e.modifiers = {
|
|
287
|
-
early: i.early === !0,
|
|
288
|
-
stop: i.stop === !0,
|
|
289
|
-
center: i.center === !0,
|
|
290
|
-
color: i.color || n,
|
|
291
|
-
keyCodes: [].concat(i.keyCodes || 13)
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
const Ne = $e(
|
|
295
|
-
{
|
|
296
|
-
name: "ripple",
|
|
297
|
-
beforeMount(e, t) {
|
|
298
|
-
const a = t.instance.$.appContext.config.globalProperties.$q.config || {};
|
|
299
|
-
if (a.ripple === !1) return;
|
|
300
|
-
const n = {
|
|
301
|
-
cfg: a,
|
|
302
|
-
enabled: t.value !== !1,
|
|
303
|
-
modifiers: {},
|
|
304
|
-
abort: [],
|
|
305
|
-
start(i) {
|
|
306
|
-
n.enabled === !0 && i.qSkipRipple !== !0 && i.type === (n.modifiers.early === !0 ? "pointerdown" : "click") && Z(i, e, n, i.qKeyEvent === !0);
|
|
307
|
-
},
|
|
308
|
-
keystart: Ie((i) => {
|
|
309
|
-
n.enabled === !0 && i.qSkipRipple !== !0 && H(i, n.modifiers.keyCodes) === !0 && i.type === `key${n.modifiers.early === !0 ? "down" : "up"}` && Z(i, e, n, !0);
|
|
310
|
-
}, 300)
|
|
311
|
-
};
|
|
312
|
-
ee(n, t), e.__qripple = n, ze(n, "main", [
|
|
313
|
-
[e, "pointerdown", "start", "passive"],
|
|
314
|
-
[e, "click", "start", "passive"],
|
|
315
|
-
[e, "keydown", "keystart", "passive"],
|
|
316
|
-
[e, "keyup", "keystart", "passive"]
|
|
317
|
-
]);
|
|
318
|
-
},
|
|
319
|
-
updated(e, t) {
|
|
320
|
-
if (t.oldValue !== t.value) {
|
|
321
|
-
const a = e.__qripple;
|
|
322
|
-
a !== void 0 && (a.enabled = t.value !== !1, a.enabled === !0 && Object(t.value) === t.value && ee(a, t));
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
beforeUnmount(e) {
|
|
326
|
-
const t = e.__qripple;
|
|
327
|
-
t !== void 0 && (t.abort.forEach((a) => {
|
|
328
|
-
a();
|
|
329
|
-
}), Ke(t, "main"), delete e._qripple);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
), ve = {
|
|
333
|
-
left: "start",
|
|
334
|
-
center: "center",
|
|
335
|
-
right: "end",
|
|
336
|
-
between: "between",
|
|
337
|
-
around: "around",
|
|
338
|
-
evenly: "evenly",
|
|
339
|
-
stretch: "stretch"
|
|
340
|
-
}, Fe = Object.keys(ve), Ve = {
|
|
341
|
-
align: {
|
|
342
|
-
type: String,
|
|
343
|
-
validator: (e) => Fe.includes(e)
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
function Qe(e) {
|
|
347
|
-
return s(() => {
|
|
348
|
-
const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
|
|
349
|
-
return `${e.vertical === !0 ? "items" : "justify"}-${ve[t]}`;
|
|
350
|
-
});
|
|
153
|
+
const t = /* @__PURE__ */ new Set();
|
|
154
|
+
return e.forEach((u) => {
|
|
155
|
+
U(t, u);
|
|
156
|
+
}), Array.from(t);
|
|
351
157
|
}
|
|
352
|
-
function
|
|
158
|
+
function me(e) {
|
|
353
159
|
return e.appContext.config.globalProperties.$router !== void 0;
|
|
354
160
|
}
|
|
355
|
-
function
|
|
161
|
+
function M(e) {
|
|
356
162
|
return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
|
|
357
163
|
}
|
|
358
|
-
function
|
|
164
|
+
function j(e, t) {
|
|
359
165
|
return (e.aliasOf || e) === (t.aliasOf || t);
|
|
360
166
|
}
|
|
361
|
-
function
|
|
362
|
-
for (const
|
|
363
|
-
const
|
|
364
|
-
if (typeof
|
|
365
|
-
if (
|
|
167
|
+
function ge(e, t) {
|
|
168
|
+
for (const u in t) {
|
|
169
|
+
const r = t[u], n = e[u];
|
|
170
|
+
if (typeof r == "string") {
|
|
171
|
+
if (r !== n)
|
|
366
172
|
return !1;
|
|
367
|
-
} else if (Array.isArray(
|
|
173
|
+
} else if (Array.isArray(n) === !1 || n.length !== r.length || r.some((i, l) => i !== n[l]))
|
|
368
174
|
return !1;
|
|
369
175
|
}
|
|
370
176
|
return !0;
|
|
371
177
|
}
|
|
372
|
-
function
|
|
373
|
-
return Array.isArray(t) === !0 ? e.length === t.length && e.every((
|
|
178
|
+
function N(e, t) {
|
|
179
|
+
return Array.isArray(t) === !0 ? e.length === t.length && e.every((u, r) => u === t[r]) : e.length === 1 && e[0] === t;
|
|
374
180
|
}
|
|
375
|
-
function
|
|
376
|
-
return Array.isArray(e) === !0 ?
|
|
181
|
+
function he(e, t) {
|
|
182
|
+
return Array.isArray(e) === !0 ? N(e, t) : Array.isArray(t) === !0 ? N(t, e) : e === t;
|
|
377
183
|
}
|
|
378
|
-
function
|
|
184
|
+
function be(e, t) {
|
|
379
185
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
380
186
|
return !1;
|
|
381
|
-
for (const
|
|
382
|
-
if (
|
|
187
|
+
for (const u in e)
|
|
188
|
+
if (he(e[u], t[u]) === !1)
|
|
383
189
|
return !1;
|
|
384
190
|
return !0;
|
|
385
191
|
}
|
|
386
|
-
const
|
|
192
|
+
const ye = {
|
|
387
193
|
// router-link
|
|
388
194
|
to: [String, Object],
|
|
389
195
|
replace: Boolean,
|
|
@@ -392,403 +198,315 @@ const Ye = {
|
|
|
392
198
|
target: String,
|
|
393
199
|
// state
|
|
394
200
|
disable: Boolean
|
|
201
|
+
}, pe = {
|
|
202
|
+
...ye,
|
|
203
|
+
// router-link
|
|
204
|
+
exact: Boolean,
|
|
205
|
+
activeClass: {
|
|
206
|
+
type: String,
|
|
207
|
+
default: "q-router-link--active"
|
|
208
|
+
},
|
|
209
|
+
exactActiveClass: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: "q-router-link--exact-active"
|
|
212
|
+
}
|
|
395
213
|
};
|
|
396
|
-
function
|
|
397
|
-
const
|
|
398
|
-
() =>
|
|
399
|
-
) :
|
|
400
|
-
() =>
|
|
401
|
-
),
|
|
402
|
-
href:
|
|
403
|
-
target:
|
|
404
|
-
} :
|
|
405
|
-
href:
|
|
406
|
-
target:
|
|
407
|
-
} : {}),
|
|
408
|
-
if (
|
|
214
|
+
function ke({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
|
|
215
|
+
const u = Q(), { props: r, proxy: n, emit: i } = u, l = me(u), a = o(() => r.disable !== !0 && r.href !== void 0), m = t === !0 ? o(
|
|
216
|
+
() => l === !0 && r.disable !== !0 && a.value !== !0 && r.to !== void 0 && r.to !== null && r.to !== ""
|
|
217
|
+
) : o(
|
|
218
|
+
() => l === !0 && a.value !== !0 && r.to !== void 0 && r.to !== null && r.to !== ""
|
|
219
|
+
), f = o(() => m.value === !0 ? R(r.to) : null), s = o(() => f.value !== null), g = o(() => a.value === !0 || s.value === !0), d = o(() => r.type === "a" || g.value === !0 ? "a" : r.tag || e || "div"), c = o(() => a.value === !0 ? {
|
|
220
|
+
href: r.href,
|
|
221
|
+
target: r.target
|
|
222
|
+
} : s.value === !0 ? {
|
|
223
|
+
href: f.value.href,
|
|
224
|
+
target: r.target
|
|
225
|
+
} : {}), b = o(() => {
|
|
226
|
+
if (s.value === !1)
|
|
409
227
|
return -1;
|
|
410
|
-
const { matched:
|
|
411
|
-
if (
|
|
228
|
+
const { matched: v } = f.value, { length: p } = v, C = v[p - 1];
|
|
229
|
+
if (C === void 0)
|
|
412
230
|
return -1;
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
231
|
+
const x = n.$route.matched;
|
|
232
|
+
if (x.length === 0)
|
|
415
233
|
return -1;
|
|
416
|
-
const
|
|
417
|
-
|
|
234
|
+
const S = x.findIndex(
|
|
235
|
+
j.bind(null, C)
|
|
418
236
|
);
|
|
419
|
-
if (
|
|
420
|
-
return
|
|
421
|
-
const
|
|
237
|
+
if (S !== -1)
|
|
238
|
+
return S;
|
|
239
|
+
const z = M(v[p - 2]);
|
|
422
240
|
return (
|
|
423
241
|
// we are dealing with nested routes
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
) :
|
|
242
|
+
p > 1 && M(C) === z && x[x.length - 1].path !== z ? x.findIndex(
|
|
243
|
+
j.bind(null, v[p - 2])
|
|
244
|
+
) : S
|
|
427
245
|
);
|
|
428
|
-
}),
|
|
429
|
-
() =>
|
|
430
|
-
),
|
|
431
|
-
() =>
|
|
432
|
-
),
|
|
433
|
-
function
|
|
246
|
+
}), y = o(
|
|
247
|
+
() => s.value === !0 && b.value !== -1 && ge(n.$route.params, f.value.params)
|
|
248
|
+
), k = o(
|
|
249
|
+
() => y.value === !0 && b.value === n.$route.matched.length - 1 && be(n.$route.params, f.value.params)
|
|
250
|
+
), _ = o(() => s.value === !0 ? k.value === !0 ? ` ${r.exactActiveClass} ${r.activeClass}` : r.exact === !0 ? "" : y.value === !0 ? ` ${r.activeClass}` : "" : "");
|
|
251
|
+
function R(v) {
|
|
434
252
|
try {
|
|
435
|
-
return
|
|
253
|
+
return n.$router.resolve(v);
|
|
436
254
|
} catch {
|
|
437
255
|
}
|
|
438
256
|
return null;
|
|
439
257
|
}
|
|
440
|
-
function
|
|
441
|
-
if (
|
|
442
|
-
return
|
|
258
|
+
function L(v, { returnRouterError: p, to: C = r.to, replace: x = r.replace } = {}) {
|
|
259
|
+
if (r.disable === !0)
|
|
260
|
+
return v.preventDefault(), Promise.resolve(!1);
|
|
443
261
|
if (
|
|
444
262
|
// don't redirect with control keys;
|
|
445
263
|
// should match RouterLink from Vue Router
|
|
446
|
-
|
|
264
|
+
v.metaKey || v.altKey || v.ctrlKey || v.shiftKey || v.button !== void 0 && v.button !== 0 || r.target === "_blank"
|
|
447
265
|
)
|
|
448
266
|
return Promise.resolve(!1);
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
return
|
|
267
|
+
v.preventDefault();
|
|
268
|
+
const S = n.$router[x === !0 ? "replace" : "push"](C);
|
|
269
|
+
return p === !0 ? S : S.then(() => {
|
|
452
270
|
}).catch(() => {
|
|
453
271
|
});
|
|
454
272
|
}
|
|
455
|
-
function
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
|
|
273
|
+
function W(v) {
|
|
274
|
+
if (s.value === !0) {
|
|
275
|
+
const p = (C) => L(v, C);
|
|
276
|
+
i("click", v, p), v.defaultPrevented !== !0 && p();
|
|
459
277
|
} else
|
|
460
|
-
|
|
278
|
+
i("click", v);
|
|
461
279
|
}
|
|
462
280
|
return {
|
|
463
|
-
hasRouterLink:
|
|
464
|
-
hasHrefLink:
|
|
465
|
-
hasLink:
|
|
466
|
-
linkTag:
|
|
467
|
-
resolvedLink:
|
|
468
|
-
linkIsActive:
|
|
469
|
-
linkIsExactActive:
|
|
470
|
-
linkClass:
|
|
471
|
-
linkAttrs:
|
|
472
|
-
getLink:
|
|
473
|
-
navigateToRouterLink:
|
|
474
|
-
navigateOnClick:
|
|
281
|
+
hasRouterLink: s,
|
|
282
|
+
hasHrefLink: a,
|
|
283
|
+
hasLink: g,
|
|
284
|
+
linkTag: d,
|
|
285
|
+
resolvedLink: f,
|
|
286
|
+
linkIsActive: y,
|
|
287
|
+
linkIsExactActive: k,
|
|
288
|
+
linkClass: _,
|
|
289
|
+
linkAttrs: c,
|
|
290
|
+
getLink: R,
|
|
291
|
+
navigateToRouterLink: L,
|
|
292
|
+
navigateOnClick: W
|
|
475
293
|
};
|
|
476
294
|
}
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
xs: 4,
|
|
480
|
-
sm: 8,
|
|
481
|
-
md: 16,
|
|
482
|
-
lg: 24,
|
|
483
|
-
xl: 32
|
|
484
|
-
}, Je = {
|
|
485
|
-
xs: 8,
|
|
486
|
-
sm: 10,
|
|
487
|
-
md: 14,
|
|
488
|
-
lg: 20,
|
|
489
|
-
xl: 24
|
|
490
|
-
}, Ze = ["button", "submit", "reset"], et = /[^\s]\/[^\s]/, tt = ["flat", "outline", "push", "unelevated"];
|
|
491
|
-
function nt(e, t) {
|
|
492
|
-
return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
|
|
493
|
-
}
|
|
494
|
-
const at = {
|
|
495
|
-
...oe,
|
|
496
|
-
...Ye,
|
|
497
|
-
type: {
|
|
498
|
-
type: String,
|
|
499
|
-
default: "button"
|
|
500
|
-
},
|
|
501
|
-
label: [Number, String],
|
|
502
|
-
icon: String,
|
|
503
|
-
iconRight: String,
|
|
504
|
-
...tt.reduce(
|
|
505
|
-
(e, t) => (e[t] = Boolean) && e,
|
|
506
|
-
{}
|
|
507
|
-
),
|
|
508
|
-
square: Boolean,
|
|
509
|
-
rounded: Boolean,
|
|
510
|
-
glossy: Boolean,
|
|
511
|
-
size: String,
|
|
512
|
-
fab: Boolean,
|
|
513
|
-
fabMini: Boolean,
|
|
514
|
-
padding: String,
|
|
515
|
-
color: String,
|
|
516
|
-
textColor: String,
|
|
517
|
-
noCaps: Boolean,
|
|
518
|
-
noWrap: Boolean,
|
|
519
|
-
dense: Boolean,
|
|
520
|
-
tabindex: [Number, String],
|
|
521
|
-
ripple: {
|
|
522
|
-
type: [Boolean, Object],
|
|
523
|
-
default: !0
|
|
524
|
-
},
|
|
525
|
-
align: {
|
|
526
|
-
...Ve.align,
|
|
527
|
-
default: "center"
|
|
528
|
-
},
|
|
529
|
-
stack: Boolean,
|
|
530
|
-
stretch: Boolean,
|
|
531
|
-
loading: {
|
|
532
|
-
type: Boolean,
|
|
533
|
-
default: null
|
|
534
|
-
},
|
|
535
|
-
disable: Boolean
|
|
536
|
-
}, rt = {
|
|
537
|
-
...at,
|
|
538
|
-
round: Boolean
|
|
539
|
-
};
|
|
540
|
-
function ut(e) {
|
|
541
|
-
const t = le(e, Je), a = Qe(e), { hasRouterLink: n, hasLink: i, linkTag: f, linkAttrs: c, navigateOnClick: u } = Ge({
|
|
542
|
-
fallbackTag: "button"
|
|
543
|
-
}), x = s(() => {
|
|
544
|
-
const d = e.fab === !1 && e.fabMini === !1 ? t.value : {};
|
|
545
|
-
return e.padding !== void 0 ? Object.assign({}, d, {
|
|
546
|
-
padding: e.padding.split(/\s+/).map((q) => q in re ? re[q] + "px" : q).join(" "),
|
|
547
|
-
minWidth: "0",
|
|
548
|
-
minHeight: "0"
|
|
549
|
-
}) : d;
|
|
550
|
-
}), b = s(
|
|
551
|
-
() => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
|
|
552
|
-
), l = s(
|
|
553
|
-
() => e.disable !== !0 && e.loading !== !0
|
|
554
|
-
), y = s(() => l.value === !0 ? e.tabindex || 0 : -1), o = s(() => nt(e, "standard")), p = s(() => {
|
|
555
|
-
const d = { tabindex: y.value };
|
|
556
|
-
return i.value === !0 ? Object.assign(d, c.value) : Ze.includes(e.type) === !0 && (d.type = e.type), f.value === "a" ? (e.disable === !0 ? d["aria-disabled"] = "true" : d.href === void 0 && (d.role = "button"), n.value !== !0 && et.test(e.type) === !0 && (d.type = e.type)) : e.disable === !0 && (d.disabled = "", d["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(d, {
|
|
557
|
-
role: "progressbar",
|
|
558
|
-
"aria-valuemin": 0,
|
|
559
|
-
"aria-valuemax": 100,
|
|
560
|
-
"aria-valuenow": e.percentage
|
|
561
|
-
}), d;
|
|
562
|
-
}), h = s(() => {
|
|
563
|
-
let d;
|
|
564
|
-
e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? d = `text-${e.textColor || e.color}` : d = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (d = `text-${e.textColor}`);
|
|
565
|
-
const q = e.round === !0 ? "round" : `rectangle${b.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
|
|
566
|
-
return `q-btn--${o.value} q-btn--${q}` + (d !== void 0 ? " " + d : "") + (l.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : "");
|
|
567
|
-
}), k = s(
|
|
568
|
-
() => a.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
|
|
569
|
-
);
|
|
570
|
-
return {
|
|
571
|
-
classes: h,
|
|
572
|
-
style: x,
|
|
573
|
-
innerClasses: k,
|
|
574
|
-
attributes: p,
|
|
575
|
-
hasLink: i,
|
|
576
|
-
linkTag: f,
|
|
577
|
-
navigateOnClick: u,
|
|
578
|
-
isActionable: l
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
const { passiveCapture: E } = N;
|
|
582
|
-
let O = null, A = null, M = null;
|
|
583
|
-
const it = W({
|
|
584
|
-
name: "QBtn",
|
|
295
|
+
const Ce = P({
|
|
296
|
+
name: "QBreadcrumbsEl",
|
|
585
297
|
props: {
|
|
586
|
-
...
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
setup(e, { slots: t, emit: a }) {
|
|
593
|
-
const { proxy: n } = U(), {
|
|
594
|
-
classes: i,
|
|
595
|
-
style: f,
|
|
596
|
-
innerClasses: c,
|
|
597
|
-
attributes: u,
|
|
598
|
-
hasLink: x,
|
|
599
|
-
linkTag: b,
|
|
600
|
-
navigateOnClick: l,
|
|
601
|
-
isActionable: y
|
|
602
|
-
} = ut(e), o = X(null), p = X(null);
|
|
603
|
-
let h = null, k, d = null;
|
|
604
|
-
const q = s(
|
|
605
|
-
() => e.label !== void 0 && e.label !== null && e.label !== ""
|
|
606
|
-
), P = s(() => e.disable === !0 || e.ripple === !1 ? !1 : {
|
|
607
|
-
keyCodes: x.value === !0 ? [13, 32] : [13],
|
|
608
|
-
...e.ripple === !0 ? {} : e.ripple
|
|
609
|
-
}), B = s(() => ({ center: e.round })), L = s(() => {
|
|
610
|
-
const r = Math.max(0, Math.min(100, e.percentage));
|
|
611
|
-
return r > 0 ? { transition: "transform 0.6s", transform: `translateX(${r - 100}%)` } : {};
|
|
612
|
-
}), g = s(() => {
|
|
613
|
-
if (e.loading === !0)
|
|
614
|
-
return {
|
|
615
|
-
onMousedown: z,
|
|
616
|
-
onTouchstart: z,
|
|
617
|
-
onClick: z,
|
|
618
|
-
onKeydown: z,
|
|
619
|
-
onKeyup: z
|
|
620
|
-
};
|
|
621
|
-
if (y.value === !0) {
|
|
622
|
-
const r = {
|
|
623
|
-
onClick: _,
|
|
624
|
-
onKeydown: w,
|
|
625
|
-
onMousedown: I
|
|
626
|
-
};
|
|
627
|
-
if (n.$q.platform.has.touch === !0) {
|
|
628
|
-
const m = e.onTouchstart !== void 0 ? "" : "Passive";
|
|
629
|
-
r[`onTouchstart${m}`] = C;
|
|
630
|
-
}
|
|
631
|
-
return r;
|
|
632
|
-
}
|
|
633
|
-
return {
|
|
634
|
-
// needed; especially for disabled <a> tags
|
|
635
|
-
onClick: T
|
|
636
|
-
};
|
|
637
|
-
}), $ = s(() => ({
|
|
638
|
-
ref: o,
|
|
639
|
-
class: "q-btn q-btn-item non-selectable no-outline " + i.value,
|
|
640
|
-
style: f.value,
|
|
641
|
-
...u.value,
|
|
642
|
-
...g.value
|
|
643
|
-
}));
|
|
644
|
-
function _(r) {
|
|
645
|
-
if (o.value !== null) {
|
|
646
|
-
if (r !== void 0) {
|
|
647
|
-
if (r.defaultPrevented === !0) return;
|
|
648
|
-
const m = document.activeElement;
|
|
649
|
-
if (e.type === "submit" && m !== document.body && o.value.contains(m) === !1 && m.contains(o.value) === !1) {
|
|
650
|
-
r.qAvoidFocus !== !0 && o.value.focus();
|
|
651
|
-
const R = () => {
|
|
652
|
-
var K;
|
|
653
|
-
document.removeEventListener("keydown", T, !0), document.removeEventListener("keyup", R, E), (K = o.value) == null || K.removeEventListener("blur", R, E);
|
|
654
|
-
};
|
|
655
|
-
document.addEventListener("keydown", T, !0), document.addEventListener("keyup", R, E), o.value.addEventListener("blur", R, E);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
l(r);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
function w(r) {
|
|
662
|
-
o.value !== null && (a("keydown", r), H(r, [13, 32]) === !0 && A !== o.value && (A !== null && j(), r.defaultPrevented !== !0 && (r.qAvoidFocus !== !0 && o.value.focus(), A = o.value, o.value.classList.add("q-btn--active"), document.addEventListener("keyup", S, !0), o.value.addEventListener("blur", S, E)), T(r)));
|
|
663
|
-
}
|
|
664
|
-
function C(r) {
|
|
665
|
-
o.value !== null && (a("touchstart", r), r.defaultPrevented !== !0 && (O !== o.value && (O !== null && j(), O = o.value, h = r.target, h.addEventListener("touchcancel", S, E), h.addEventListener("touchend", S, E)), k = !0, d !== null && clearTimeout(d), d = setTimeout(() => {
|
|
666
|
-
d = null, k = !1;
|
|
667
|
-
}, 200)));
|
|
668
|
-
}
|
|
669
|
-
function I(r) {
|
|
670
|
-
o.value !== null && (r.qSkipRipple = k === !0, a("mousedown", r), r.defaultPrevented !== !0 && M !== o.value && (M !== null && j(), M = o.value, o.value.classList.add("q-btn--active"), document.addEventListener("mouseup", S, E)));
|
|
671
|
-
}
|
|
672
|
-
function S(r) {
|
|
673
|
-
if (o.value !== null && !((r == null ? void 0 : r.type) === "blur" && document.activeElement === o.value)) {
|
|
674
|
-
if ((r == null ? void 0 : r.type) === "keyup") {
|
|
675
|
-
if (A === o.value && H(r, [13, 32]) === !0) {
|
|
676
|
-
const m = new MouseEvent("click", r);
|
|
677
|
-
m.qKeyEvent = !0, r.defaultPrevented === !0 && je(m), r.cancelBubble === !0 && fe(m), o.value.dispatchEvent(m), T(r), r.qKeyEvent = !0;
|
|
678
|
-
}
|
|
679
|
-
a("keyup", r);
|
|
680
|
-
}
|
|
681
|
-
j();
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
function j(r) {
|
|
685
|
-
var R, K;
|
|
686
|
-
const m = p.value;
|
|
687
|
-
r !== !0 && (O === o.value || M === o.value) && m !== null && m !== document.activeElement && (m.setAttribute("tabindex", -1), m.focus()), O === o.value && (h !== null && (h.removeEventListener("touchcancel", S, E), h.removeEventListener("touchend", S, E)), O = h = null), M === o.value && (document.removeEventListener("mouseup", S, E), M = null), A === o.value && (document.removeEventListener("keyup", S, !0), (R = o.value) == null || R.removeEventListener("blur", S, E), A = null), (K = o.value) == null || K.classList.remove("q-btn--active");
|
|
688
|
-
}
|
|
689
|
-
function z(r) {
|
|
690
|
-
T(r), r.qSkipRipple = !0;
|
|
298
|
+
...pe,
|
|
299
|
+
label: String,
|
|
300
|
+
icon: String,
|
|
301
|
+
tag: {
|
|
302
|
+
type: String,
|
|
303
|
+
default: "span"
|
|
691
304
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
e.
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
), r = D(t.default, r), e.iconRight !== void 0 && e.round === !1 && r.push(
|
|
709
|
-
v(J, {
|
|
710
|
-
name: e.iconRight,
|
|
711
|
-
right: e.stack !== !0 && q.value === !0,
|
|
712
|
-
role: "img"
|
|
713
|
-
})
|
|
714
|
-
);
|
|
715
|
-
const m = [
|
|
716
|
-
v("span", {
|
|
717
|
-
class: "q-focus-helper",
|
|
718
|
-
ref: p
|
|
305
|
+
},
|
|
306
|
+
emits: ["click"],
|
|
307
|
+
setup(e, { slots: t }) {
|
|
308
|
+
const { linkTag: u, linkAttrs: r, linkClass: n, navigateOnClick: i } = ke(), l = o(() => ({
|
|
309
|
+
class: "q-breadcrumbs__el q-link flex inline items-center relative-position " + (e.disable !== !0 ? "q-link--focusable" + n.value : "q-breadcrumbs__el--disable"),
|
|
310
|
+
...r.value,
|
|
311
|
+
onClick: i
|
|
312
|
+
})), a = o(
|
|
313
|
+
() => "q-breadcrumbs__el-icon" + (e.label !== void 0 ? " q-breadcrumbs__el-icon--with-label" : "")
|
|
314
|
+
);
|
|
315
|
+
return () => {
|
|
316
|
+
const m = [];
|
|
317
|
+
return e.icon !== void 0 && m.push(
|
|
318
|
+
h(G, {
|
|
319
|
+
class: a.value,
|
|
320
|
+
name: e.icon
|
|
719
321
|
})
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
}, [
|
|
725
|
-
v("span", {
|
|
726
|
-
class: "q-btn__progress-indicator fit block",
|
|
727
|
-
style: L.value
|
|
728
|
-
})
|
|
729
|
-
])
|
|
730
|
-
), m.push(
|
|
731
|
-
v("span", {
|
|
732
|
-
class: "q-btn__content text-center col items-center q-anchor--skip " + c.value
|
|
733
|
-
}, r)
|
|
734
|
-
), e.loading !== null && m.push(
|
|
735
|
-
v(me, {
|
|
736
|
-
name: "q-transition--fade"
|
|
737
|
-
}, () => e.loading === !0 ? [
|
|
738
|
-
v("span", {
|
|
739
|
-
key: "loading",
|
|
740
|
-
class: "absolute-full flex flex-center"
|
|
741
|
-
}, t.loading !== void 0 ? t.loading() : [v(Oe)])
|
|
742
|
-
] : null)
|
|
743
|
-
), he(
|
|
744
|
-
v(
|
|
745
|
-
b.value,
|
|
746
|
-
$.value,
|
|
747
|
-
m
|
|
748
|
-
),
|
|
749
|
-
[[
|
|
750
|
-
Ne,
|
|
751
|
-
P.value,
|
|
752
|
-
void 0,
|
|
753
|
-
B.value
|
|
754
|
-
]]
|
|
322
|
+
), e.label !== void 0 && m.push(e.label), h(
|
|
323
|
+
u.value,
|
|
324
|
+
{ ...l.value },
|
|
325
|
+
A(t.default, m)
|
|
755
326
|
);
|
|
756
327
|
};
|
|
757
328
|
}
|
|
758
|
-
}),
|
|
759
|
-
|
|
329
|
+
}), J = {
|
|
330
|
+
left: "start",
|
|
331
|
+
center: "center",
|
|
332
|
+
right: "end",
|
|
333
|
+
between: "between",
|
|
334
|
+
around: "around",
|
|
335
|
+
evenly: "evenly",
|
|
336
|
+
stretch: "stretch"
|
|
337
|
+
}, xe = Object.keys(J), Se = {
|
|
338
|
+
align: {
|
|
339
|
+
type: String,
|
|
340
|
+
validator: (e) => xe.includes(e)
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
function Ae(e) {
|
|
344
|
+
return o(() => {
|
|
345
|
+
const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
|
|
346
|
+
return `${e.vertical === !0 ? "items" : "justify"}-${J[t]}`;
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
const Re = ["", !0], _e = P({
|
|
350
|
+
name: "QBreadcrumbs",
|
|
760
351
|
props: {
|
|
761
|
-
|
|
352
|
+
...Se,
|
|
353
|
+
separator: {
|
|
762
354
|
type: String,
|
|
763
|
-
default: "
|
|
355
|
+
default: "/"
|
|
764
356
|
},
|
|
765
|
-
|
|
357
|
+
separatorColor: String,
|
|
358
|
+
activeColor: {
|
|
766
359
|
type: String,
|
|
767
360
|
default: "primary"
|
|
361
|
+
},
|
|
362
|
+
gutter: {
|
|
363
|
+
type: String,
|
|
364
|
+
validator: (e) => ["none", "xs", "sm", "md", "lg", "xl"].includes(e),
|
|
365
|
+
default: "sm"
|
|
768
366
|
}
|
|
367
|
+
},
|
|
368
|
+
setup(e, { slots: t }) {
|
|
369
|
+
const u = Ae(e), r = o(
|
|
370
|
+
() => `flex items-center ${u.value}${e.gutter === "none" ? "" : ` q-gutter-${e.gutter}`}`
|
|
371
|
+
), n = o(() => e.separatorColor ? ` text-${e.separatorColor}` : ""), i = o(() => ` text-${e.activeColor}`);
|
|
372
|
+
return () => {
|
|
373
|
+
if (t.default === void 0) return;
|
|
374
|
+
const l = fe(
|
|
375
|
+
K(t.default)
|
|
376
|
+
);
|
|
377
|
+
if (l.length === 0) return;
|
|
378
|
+
let a = 1;
|
|
379
|
+
const m = [], f = l.filter((g) => {
|
|
380
|
+
var d;
|
|
381
|
+
return ((d = g.type) == null ? void 0 : d.name) === "QBreadcrumbsEl";
|
|
382
|
+
}).length, s = t.separator !== void 0 ? t.separator : () => e.separator;
|
|
383
|
+
return l.forEach((g) => {
|
|
384
|
+
var d;
|
|
385
|
+
if (((d = g.type) == null ? void 0 : d.name) === "QBreadcrumbsEl") {
|
|
386
|
+
const c = a < f, b = g.props !== null && Re.includes(g.props.disable), y = (c === !0 ? "" : " q-breadcrumbs--last") + (b !== !0 && c === !0 ? i.value : "");
|
|
387
|
+
a++, m.push(
|
|
388
|
+
h("div", {
|
|
389
|
+
class: `flex items-center${y}`
|
|
390
|
+
}, [g])
|
|
391
|
+
), c === !0 && m.push(
|
|
392
|
+
h("div", {
|
|
393
|
+
class: "q-breadcrumbs__separator" + n.value
|
|
394
|
+
}, s())
|
|
395
|
+
);
|
|
396
|
+
} else
|
|
397
|
+
m.push(g);
|
|
398
|
+
}), h("div", {
|
|
399
|
+
class: "q-breadcrumbs"
|
|
400
|
+
}, [
|
|
401
|
+
h("div", { class: r.value }, m)
|
|
402
|
+
]);
|
|
403
|
+
};
|
|
769
404
|
}
|
|
770
|
-
}),
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
e
|
|
405
|
+
}), Be = /* @__PURE__ */ V({
|
|
406
|
+
inheritAttrs: !1,
|
|
407
|
+
__name: "Breadcrumbs",
|
|
408
|
+
props: {
|
|
409
|
+
activeColor: {},
|
|
410
|
+
separatorIcon: {},
|
|
411
|
+
separatorSize: {},
|
|
412
|
+
separatorColor: {},
|
|
413
|
+
store: {},
|
|
414
|
+
navStore: {},
|
|
415
|
+
route: {},
|
|
416
|
+
router: {},
|
|
417
|
+
breadcrumbConfig: {},
|
|
418
|
+
separator: {},
|
|
419
|
+
gutter: {},
|
|
420
|
+
align: {}
|
|
421
|
+
},
|
|
422
|
+
setup(e) {
|
|
423
|
+
const t = e, u = Y(), r = o(() => {
|
|
424
|
+
const { activeColor: d, separatorIcon: c, separatorSize: b, separatorColor: y, ...k } = u;
|
|
425
|
+
return k;
|
|
426
|
+
}), n = (d) => ({
|
|
427
|
+
"data-cy": d.dataCy,
|
|
428
|
+
class: "cursor-pointer text-h5",
|
|
429
|
+
color: d.color
|
|
430
|
+
}), i = o(() => t.activeColor || "primary"), l = o(() => t.separatorIcon || "chevron_right"), a = o(() => t.separatorSize || "2em"), m = o(() => t.separatorColor || "primary"), f = o(() => ({
|
|
431
|
+
store: t.store,
|
|
432
|
+
route: t.route,
|
|
433
|
+
navStore: t.navStore || {}
|
|
434
|
+
})), s = o(() => {
|
|
435
|
+
const d = [];
|
|
436
|
+
return t.breadcrumbConfig.forEach((c) => {
|
|
437
|
+
if (!c.shouldRender(f.value))
|
|
438
|
+
return;
|
|
439
|
+
const b = c.getLabel ? c.getLabel(f.value) : c.defaultLabel, y = c.getColor ? c.getColor(f.value) : "dark", k = {
|
|
440
|
+
name: c.routeName,
|
|
441
|
+
...c.getRouteParams && {
|
|
442
|
+
params: c.getRouteParams(f.value)
|
|
443
|
+
}
|
|
444
|
+
}, _ = c.clearActions ? c.clearActions.map((R) => () => R(f.value)) : [];
|
|
445
|
+
d.push({
|
|
446
|
+
label: b,
|
|
447
|
+
dataCy: c.dataCy,
|
|
448
|
+
color: y,
|
|
449
|
+
route: k,
|
|
450
|
+
clearActions: _
|
|
451
|
+
});
|
|
452
|
+
}), d;
|
|
453
|
+
}), g = (d) => {
|
|
454
|
+
d.clearActions && d.clearActions.forEach((c) => c()), t.router.push(d.route);
|
|
455
|
+
};
|
|
456
|
+
return (d, c) => ($(), F(_e, w({
|
|
457
|
+
"active-color": i.value,
|
|
458
|
+
class: "text-brown"
|
|
459
|
+
}, r.value), {
|
|
460
|
+
separator: q(() => [
|
|
461
|
+
re(G, {
|
|
462
|
+
size: a.value,
|
|
463
|
+
name: l.value,
|
|
464
|
+
color: m.value
|
|
465
|
+
}, null, 8, ["size", "name", "color"])
|
|
466
|
+
]),
|
|
467
|
+
default: q(() => [
|
|
468
|
+
($(!0), Z(ee, null, te(s.value, (b, y) => ($(), F(Ce, w({ key: y }, { ref_for: !0 }, n(b), {
|
|
469
|
+
label: b.label,
|
|
470
|
+
onClick: (k) => g(b)
|
|
471
|
+
}), null, 16, ["label", "onClick"]))), 128))
|
|
472
|
+
]),
|
|
473
|
+
_: 1
|
|
474
|
+
}, 16, ["active-color"]));
|
|
789
475
|
}
|
|
790
|
-
};
|
|
476
|
+
});
|
|
477
|
+
function Ee(e) {
|
|
478
|
+
var t, u;
|
|
479
|
+
return {
|
|
480
|
+
entity: e.entity,
|
|
481
|
+
dataCy: e.dataCy,
|
|
482
|
+
defaultLabel: e.defaultLabel,
|
|
483
|
+
routeName: e.routeName,
|
|
484
|
+
shouldRender: e.customShouldRender || (({ store: r }) => e.storeField ? !!r[e.storeField] : !0),
|
|
485
|
+
getLabel: e.getLabel || (e.labelField ? ({ store: r }) => {
|
|
486
|
+
var n;
|
|
487
|
+
return e.storeField && ((n = r[e.storeField]) == null ? void 0 : n[e.labelField]) || e.defaultLabel;
|
|
488
|
+
} : void 0),
|
|
489
|
+
getColor: e.customGetColor || (({ store: r }) => e.storeField && r[e.storeField] ? "primary" : "dark"),
|
|
490
|
+
getRouteParams: e.routeParamKey && e.routeParamField ? ({ store: r }) => {
|
|
491
|
+
var n;
|
|
492
|
+
return {
|
|
493
|
+
[e.routeParamKey]: e.storeField && ((n = r[e.storeField]) == null ? void 0 : n[e.routeParamField])
|
|
494
|
+
};
|
|
495
|
+
} : void 0,
|
|
496
|
+
clearActions: [
|
|
497
|
+
...((t = e.clearMethods) == null ? void 0 : t.map(
|
|
498
|
+
(r) => ({ store: n }) => {
|
|
499
|
+
var i;
|
|
500
|
+
return (i = n[r]) == null ? void 0 : i.call(n);
|
|
501
|
+
}
|
|
502
|
+
)) || [],
|
|
503
|
+
...((u = e.navActions) == null ? void 0 : u.map(
|
|
504
|
+
(r) => ({ navStore: n }) => r(n)
|
|
505
|
+
)) || []
|
|
506
|
+
]
|
|
507
|
+
};
|
|
508
|
+
}
|
|
791
509
|
export {
|
|
792
|
-
|
|
793
|
-
|
|
510
|
+
Be as Breadcrumbs,
|
|
511
|
+
Ee as createBreadcrumb
|
|
794
512
|
};
|