metronics-vue 1.7.22 → 1.7.23
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
|
@@ -7163,16 +7163,17 @@ const Da = /* @__PURE__ */ N(Ma, [["render", $a]]), Na = {
|
|
|
7163
7163
|
computedBreadcrumbs() {
|
|
7164
7164
|
const i = [], s = 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
|
+
// Prettifies labels: "1st-approval" -> "1st Approval"
|
|
7173
|
+
label: this.resolveDynamicString(o, s, !1),
|
|
7174
|
+
// Resolves links: "/clients/:client_id" -> "/clients/1"
|
|
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
|
},
|
|
@@ -7183,19 +7184,17 @@ const Da = /* @__PURE__ */ N(Ma, [["render", $a]]), Na = {
|
|
|
7183
7184
|
},
|
|
7184
7185
|
methods: {
|
|
7185
7186
|
/**
|
|
7186
|
-
*
|
|
7187
|
-
*
|
|
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)
|
|
7187
|
+
* The "Universal Resolver"
|
|
7188
|
+
* Finds any word starting with ":" and replaces it with the route param value.
|
|
7190
7189
|
*/
|
|
7191
|
-
|
|
7190
|
+
resolveDynamicString(i, s, t) {
|
|
7192
7191
|
if (!i || typeof i != "string") return i;
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
return e = e.replace(n, (r, a) => {
|
|
7192
|
+
const e = /:([a-zA-Z0-9_]+)/g;
|
|
7193
|
+
let n = i.replace(e, (r, a) => {
|
|
7196
7194
|
const o = s[a];
|
|
7197
7195
|
return o != null ? t ? o : String(o).replace(/-/g, " ") : r;
|
|
7198
|
-
})
|
|
7196
|
+
});
|
|
7197
|
+
return t || (n = n.replace(/\b\w/g, (r) => r.toUpperCase())), n;
|
|
7199
7198
|
}
|
|
7200
7199
|
}
|
|
7201
7200
|
}, Ba = { class: "kt-page-title flex flex-col gap-1" }, Ra = { class: "text-gray-900 text-lg font-semibold" }, ja = {
|