metronics-vue 1.7.23 → 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,7 +7161,7 @@ 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
7166
  var r;
7167
7167
  const e = (r = t.meta) == null ? void 0 : r.breadcrumb;
@@ -7169,9 +7169,9 @@ const Da = /* @__PURE__ */ N(Ma, [["render", $a]]), Na = {
7169
7169
  (Array.isArray(e) ? e : [e]).forEach((a) => {
7170
7170
  const o = typeof a == "object" ? a.label : a, l = typeof a == "object" ? a.to : null;
7171
7171
  i.push({
7172
- // Prettifies labels: "1st-approval" -> "1st Approval"
7172
+ // Resolve Label (e.g., "Client :client_id")
7173
7173
  label: this.resolveDynamicString(o, s, !1),
7174
- // Resolves links: "/clients/:client_id" -> "/clients/1"
7174
+ // Resolve Link (e.g., "/clients/:client_id")
7175
7175
  to: l ? this.resolveDynamicString(l, s, !0) : null
7176
7176
  });
7177
7177
  });
@@ -7183,18 +7183,13 @@ const Da = /* @__PURE__ */ N(Ma, [["render", $a]]), Na = {
7183
7183
  }
7184
7184
  },
7185
7185
  methods: {
7186
- /**
7187
- * The "Universal Resolver"
7188
- * Finds any word starting with ":" and replaces it with the route param value.
7189
- */
7190
7186
  resolveDynamicString(i, s, t) {
7191
7187
  if (!i || typeof i != "string") return i;
7192
7188
  const e = /:([a-zA-Z0-9_]+)/g;
7193
- let n = i.replace(e, (r, a) => {
7194
- const o = s[a];
7195
- return o != null ? t ? o : String(o).replace(/-/g, " ") : r;
7189
+ return i.replace(e, (n, r) => {
7190
+ const a = s[r];
7191
+ return a != null ? t ? a : String(a).replace(/-/g, " ") : n;
7196
7192
  });
7197
- return t || (n = n.replace(/\b\w/g, (r) => r.toUpperCase())), n;
7198
7193
  }
7199
7194
  }
7200
7195
  }, Ba = { class: "kt-page-title flex flex-col gap-1" }, Ra = { class: "text-gray-900 text-lg font-semibold" }, ja = {