metronics-vue 1.7.22 → 1.7.24
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/metronics-vue.es.js
CHANGED
|
@@ -7161,18 +7161,19 @@ const Da = /* @__PURE__ */ N(Ma, [["render", $a]]), Na = {
|
|
|
7161
7161
|
name: "KtPageTitle",
|
|
7162
7162
|
computed: {
|
|
7163
7163
|
computedBreadcrumbs() {
|
|
7164
|
-
const i = [], s = this.$route.params;
|
|
7164
|
+
const i = [], s = this.$route.matched.reduce((t, e) => ({ ...t, ...e.params }), { ...this.$route.params });
|
|
7165
7165
|
return this.$route.matched.forEach((t) => {
|
|
7166
|
-
var
|
|
7167
|
-
const e = (
|
|
7168
|
-
|
|
7166
|
+
var r;
|
|
7167
|
+
const e = (r = t.meta) == null ? void 0 : r.breadcrumb;
|
|
7168
|
+
if (!e) return;
|
|
7169
|
+
(Array.isArray(e) ? e : [e]).forEach((a) => {
|
|
7170
|
+
const o = typeof a == "object" ? a.label : a, l = typeof a == "object" ? a.to : null;
|
|
7169
7171
|
i.push({
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
+
// Resolve Label (e.g., "Client :client_id")
|
|
7173
|
+
label: this.resolveDynamicString(o, s, !1),
|
|
7174
|
+
// Resolve Link (e.g., "/clients/:client_id")
|
|
7175
|
+
to: l ? this.resolveDynamicString(l, s, !0) : null
|
|
7172
7176
|
});
|
|
7173
|
-
}) : typeof e == "string" && i.push({
|
|
7174
|
-
label: this.resolveDynamicValue(e, s, !1),
|
|
7175
|
-
to: this.resolveDynamicValue(t.path, s, !0)
|
|
7176
7177
|
});
|
|
7177
7178
|
}), i;
|
|
7178
7179
|
},
|
|
@@ -7182,20 +7183,13 @@ const Da = /* @__PURE__ */ N(Ma, [["render", $a]]), Na = {
|
|
|
7182
7183
|
}
|
|
7183
7184
|
},
|
|
7184
7185
|
methods: {
|
|
7185
|
-
|
|
7186
|
-
* Generic resolver for any route parameter.
|
|
7187
|
-
* @param {String} template - The string containing :placeholders
|
|
7188
|
-
* @param {Object} params - The current route params ($route.params)
|
|
7189
|
-
* @param {Boolean} isPath - Whether to keep raw values (true) or format for UI (false)
|
|
7190
|
-
*/
|
|
7191
|
-
resolveDynamicValue(i, s, t) {
|
|
7186
|
+
resolveDynamicString(i, s, t) {
|
|
7192
7187
|
if (!i || typeof i != "string") return i;
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
}), e;
|
|
7188
|
+
const e = /:([a-zA-Z0-9_]+)/g;
|
|
7189
|
+
return i.replace(e, (n, r) => {
|
|
7190
|
+
const a = s[r];
|
|
7191
|
+
return a != null ? t ? a : String(a).replace(/-/g, " ") : n;
|
|
7192
|
+
});
|
|
7199
7193
|
}
|
|
7200
7194
|
}
|
|
7201
7195
|
}, Ba = { class: "kt-page-title flex flex-col gap-1" }, Ra = { class: "text-gray-900 text-lg font-semibold" }, ja = {
|