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.
@@ -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 n;
7167
- const e = (n = t.meta) == null ? void 0 : n.breadcrumb;
7168
- Array.isArray(e) ? e.forEach((r) => {
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
- label: this.resolveDynamicValue(r.label, s, !1),
7171
- to: r.to ? this.resolveDynamicValue(r.to, s, !0) : void 0
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
- let e = i;
7194
- const n = /:([a-zA-Z0-9_]+)/g;
7195
- return e = e.replace(n, (r, a) => {
7196
- const o = s[a];
7197
- return o != null ? t ? o : String(o).replace(/-/g, " ") : r;
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 = {