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