metronics-vue 1.7.20 → 1.7.21
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
|
@@ -6817,7 +6817,7 @@ function to() {
|
|
|
6817
6817
|
var eo = to();
|
|
6818
6818
|
const ut = /* @__PURE__ */ Jr(eo);
|
|
6819
6819
|
let yn = 1;
|
|
6820
|
-
const
|
|
6820
|
+
const va = () => {
|
|
6821
6821
|
const i = $n(null);
|
|
6822
6822
|
function s() {
|
|
6823
6823
|
i.value.hide();
|
|
@@ -7158,25 +7158,36 @@ function Do(i, s, t, e, n, r) {
|
|
|
7158
7158
|
], 2);
|
|
7159
7159
|
}
|
|
7160
7160
|
const No = /* @__PURE__ */ N($o, [["render", Do]]), Bo = {
|
|
7161
|
+
name: "KtPageTitle",
|
|
7161
7162
|
computed: {
|
|
7163
|
+
/**
|
|
7164
|
+
* Pulls breadcrumb metadata from the current route and resolves
|
|
7165
|
+
* dynamic parameters (like :client_id) into actual values.
|
|
7166
|
+
*/
|
|
7162
7167
|
computedBreadcrumbs() {
|
|
7163
7168
|
var t;
|
|
7164
7169
|
const i = [], s = this.$route.params;
|
|
7165
7170
|
for (const e of this.$route.matched) {
|
|
7166
7171
|
const n = (t = e.meta) == null ? void 0 : t.breadcrumb;
|
|
7167
7172
|
if (Array.isArray(n)) {
|
|
7168
|
-
const r = n.map((o) =>
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7173
|
+
const r = n.map((o) => {
|
|
7174
|
+
const a = o.to ? this.resolveDynamicString(o.to, s) : void 0;
|
|
7175
|
+
return {
|
|
7176
|
+
label: this.resolveDynamicString(o.label, s),
|
|
7177
|
+
to: a
|
|
7178
|
+
};
|
|
7179
|
+
});
|
|
7172
7180
|
i.push(...r);
|
|
7173
7181
|
} else typeof n == "string" && i.push({
|
|
7174
7182
|
label: this.resolveDynamicString(n, s),
|
|
7175
|
-
to:
|
|
7183
|
+
to: this.resolveDynamicString(e.path, s)
|
|
7176
7184
|
});
|
|
7177
7185
|
}
|
|
7178
7186
|
return i;
|
|
7179
7187
|
},
|
|
7188
|
+
/**
|
|
7189
|
+
* Uses the last item in the breadcrumb array as the H1 page title.
|
|
7190
|
+
*/
|
|
7180
7191
|
pageTitle() {
|
|
7181
7192
|
const i = this.computedBreadcrumbs[this.computedBreadcrumbs.length - 1];
|
|
7182
7193
|
return (i == null ? void 0 : i.label) || "Unnamed Page";
|
|
@@ -7184,49 +7195,50 @@ const No = /* @__PURE__ */ N($o, [["render", Do]]), Bo = {
|
|
|
7184
7195
|
},
|
|
7185
7196
|
methods: {
|
|
7186
7197
|
/**
|
|
7187
|
-
* Replaces placeholders
|
|
7188
|
-
*
|
|
7198
|
+
* Replaces :key placeholders with actual values from $route.params.
|
|
7199
|
+
* @param {String} template - The string containing placeholders (e.g., "/path/:id")
|
|
7200
|
+
* @param {Object} params - The current route params object
|
|
7189
7201
|
*/
|
|
7190
7202
|
resolveDynamicString(i, s) {
|
|
7191
7203
|
if (!i || typeof i != "string") return i;
|
|
7192
7204
|
let t = i;
|
|
7193
7205
|
return Object.keys(s).forEach((e) => {
|
|
7194
7206
|
const n = s[e];
|
|
7195
|
-
if (n) {
|
|
7196
|
-
const r = n.toString().replace(/-/g, " ")
|
|
7197
|
-
t = t.replace(
|
|
7207
|
+
if (n != null) {
|
|
7208
|
+
const r = new RegExp(`:${e}\\b`, "g"), a = i.includes("/") ? n : n.toString().replace(/-/g, " ");
|
|
7209
|
+
t = t.replace(r, a);
|
|
7198
7210
|
}
|
|
7199
7211
|
}), t;
|
|
7200
7212
|
}
|
|
7201
7213
|
}
|
|
7202
|
-
}, Ro = { class: "text-gray-900 text-lg font-semibold" },
|
|
7214
|
+
}, Ro = { class: "mb-5" }, jo = { class: "text-gray-900 text-lg font-semibold mb-1" }, qo = {
|
|
7203
7215
|
key: 0,
|
|
7204
7216
|
class: "text-gray-400 text-sm mx-1"
|
|
7205
|
-
},
|
|
7217
|
+
}, zo = {
|
|
7206
7218
|
key: 2,
|
|
7207
|
-
class: "text-gray-500"
|
|
7219
|
+
class: "text-gray-500 text-sm font-normal"
|
|
7208
7220
|
};
|
|
7209
|
-
function
|
|
7221
|
+
function Vo(i, s, t, e, n, r) {
|
|
7210
7222
|
const o = G("kt-breadcrumbs-el"), a = G("kt-breadcrumbs");
|
|
7211
|
-
return C(), A("div",
|
|
7212
|
-
P("h1",
|
|
7223
|
+
return C(), A("div", Ro, [
|
|
7224
|
+
P("h1", jo, V(r.pageTitle), 1),
|
|
7213
7225
|
lt(a, null, {
|
|
7214
7226
|
default: mt(() => [
|
|
7215
7227
|
(C(!0), A(it, null, wt(r.computedBreadcrumbs, (l, c) => (C(), A(it, { key: c }, [
|
|
7216
|
-
c > 0 ? (C(), A("span",
|
|
7228
|
+
c > 0 ? (C(), A("span", qo, " / ")) : B("", !0),
|
|
7217
7229
|
l.to ? (C(), J(o, {
|
|
7218
7230
|
key: 1,
|
|
7219
7231
|
to: l.to,
|
|
7220
7232
|
label: l.label
|
|
7221
|
-
}, null, 8, ["to", "label"])) : (C(), A("span",
|
|
7233
|
+
}, null, 8, ["to", "label"])) : (C(), A("span", zo, V(l.label), 1))
|
|
7222
7234
|
], 64))), 128))
|
|
7223
7235
|
]),
|
|
7224
7236
|
_: 1
|
|
7225
7237
|
})
|
|
7226
7238
|
]);
|
|
7227
7239
|
}
|
|
7228
|
-
const
|
|
7229
|
-
function
|
|
7240
|
+
const Ho = /* @__PURE__ */ N(Bo, [["render", Vo]]), Fo = {};
|
|
7241
|
+
function Uo(i, s) {
|
|
7230
7242
|
const t = G("kt-card");
|
|
7231
7243
|
return C(), A("div", null, [
|
|
7232
7244
|
lt(t, { class: "p-4 animate-pulse flex flex-col gap-4" }, {
|
|
@@ -7238,7 +7250,7 @@ function Fo(i, s) {
|
|
|
7238
7250
|
})
|
|
7239
7251
|
]);
|
|
7240
7252
|
}
|
|
7241
|
-
const
|
|
7253
|
+
const Ko = /* @__PURE__ */ N(Fo, [["render", Uo]]), Wo = {
|
|
7242
7254
|
props: {
|
|
7243
7255
|
modelValue: String,
|
|
7244
7256
|
options: {
|
|
@@ -7270,34 +7282,34 @@ const Uo = /* @__PURE__ */ N(Ho, [["render", Fo]]), Ko = {
|
|
|
7270
7282
|
this.$emit("update:modelValue", i);
|
|
7271
7283
|
}
|
|
7272
7284
|
}
|
|
7273
|
-
},
|
|
7285
|
+
}, Yo = {
|
|
7274
7286
|
key: 0,
|
|
7275
7287
|
class: "form-label flex items-center max-w-full pb-2"
|
|
7276
|
-
},
|
|
7288
|
+
}, Zo = {
|
|
7277
7289
|
key: 0,
|
|
7278
7290
|
class: "text-danger pl-1"
|
|
7279
|
-
},
|
|
7291
|
+
}, Xo = { class: "btn-group w-full flex" }, Go = ["onClick", "disabled"], Jo = {
|
|
7280
7292
|
key: 1,
|
|
7281
7293
|
class: "text-xs text-red-500"
|
|
7282
7294
|
};
|
|
7283
|
-
function
|
|
7295
|
+
function Qo(i, s, t, e, n, r) {
|
|
7284
7296
|
return C(), A(it, null, [
|
|
7285
|
-
t.label ? (C(), A("label",
|
|
7297
|
+
t.label ? (C(), A("label", Yo, [
|
|
7286
7298
|
ct(V(t.label) + ": ", 1),
|
|
7287
|
-
t.required ? (C(), A("span",
|
|
7299
|
+
t.required ? (C(), A("span", Zo, " * ")) : B("", !0)
|
|
7288
7300
|
])) : B("", !0),
|
|
7289
|
-
P("div",
|
|
7301
|
+
P("div", Xo, [
|
|
7290
7302
|
(C(!0), A(it, null, wt(t.options, (o, a) => (C(), A("button", {
|
|
7291
7303
|
key: o.value,
|
|
7292
7304
|
class: q(["btn flex-1 justify-center", t.modelValue === o.value ? "btn-primary" : "btn-light"]),
|
|
7293
7305
|
onClick: (l) => r.setActive(o.value),
|
|
7294
7306
|
disabled: t.disabled
|
|
7295
|
-
}, V(o.name), 11,
|
|
7307
|
+
}, V(o.name), 11, Go))), 128))
|
|
7296
7308
|
]),
|
|
7297
|
-
i.inputRequired && i.touched ? (C(), A("span",
|
|
7309
|
+
i.inputRequired && i.touched ? (C(), A("span", Jo, " This field is required! ")) : B("", !0)
|
|
7298
7310
|
], 64);
|
|
7299
7311
|
}
|
|
7300
|
-
const
|
|
7312
|
+
const ta = /* @__PURE__ */ N(Wo, [["render", Qo]]), ea = {
|
|
7301
7313
|
__name: "KtChip",
|
|
7302
7314
|
props: {
|
|
7303
7315
|
label: String,
|
|
@@ -7316,7 +7328,7 @@ const Qo = /* @__PURE__ */ N(Ko, [["render", Jo]]), ta = {
|
|
|
7316
7328
|
class: q(t.value)
|
|
7317
7329
|
}, V(i.label), 3));
|
|
7318
7330
|
}
|
|
7319
|
-
},
|
|
7331
|
+
}, na = {
|
|
7320
7332
|
props: {
|
|
7321
7333
|
title: {
|
|
7322
7334
|
type: String,
|
|
@@ -7346,47 +7358,47 @@ const Qo = /* @__PURE__ */ N(Ko, [["render", Jo]]), ta = {
|
|
|
7346
7358
|
this.disabled || (this.active = !this.active, await Dn(), this.active ? this.contentHeight = this.$refs.content.scrollHeight + "px" : this.contentHeight = "0px");
|
|
7347
7359
|
}
|
|
7348
7360
|
}
|
|
7349
|
-
},
|
|
7361
|
+
}, ia = { class: "accordion-item border rounded-xl relative bg-white" }, sa = ["disabled"], ra = { class: "text-lg uppercase text-gray-900 font-medium flex gap-3 w-full" }, oa = {
|
|
7350
7362
|
key: 0,
|
|
7351
7363
|
class: "flex items-center"
|
|
7352
|
-
},
|
|
7364
|
+
}, aa = {
|
|
7353
7365
|
key: 0,
|
|
7354
7366
|
class: "ki-outline ki-down text-gray-600 text-md"
|
|
7355
|
-
},
|
|
7367
|
+
}, la = {
|
|
7356
7368
|
key: 1,
|
|
7357
7369
|
class: "ki-outline ki-up text-gray-600 text-md"
|
|
7358
|
-
},
|
|
7370
|
+
}, ca = { class: "flex flex-row gap-4 items-center" }, da = { key: 0 }, ua = {
|
|
7359
7371
|
key: 0,
|
|
7360
7372
|
class: "ki-outline ki-down text-gray-600 text-md"
|
|
7361
|
-
},
|
|
7373
|
+
}, ha = {
|
|
7362
7374
|
key: 1,
|
|
7363
7375
|
class: "ki-outline ki-up text-gray-600 text-md"
|
|
7364
|
-
},
|
|
7376
|
+
}, fa = {
|
|
7365
7377
|
key: 0,
|
|
7366
7378
|
class: "tooltip-disabled"
|
|
7367
|
-
},
|
|
7368
|
-
function
|
|
7379
|
+
}, pa = { class: "text-gray-700 text-md p-4" };
|
|
7380
|
+
function ga(i, s, t, e, n, r) {
|
|
7369
7381
|
const o = G("kt-icon");
|
|
7370
|
-
return C(), A("div",
|
|
7382
|
+
return C(), A("div", ia, [
|
|
7371
7383
|
P("button", {
|
|
7372
7384
|
class: q(["accordion-toggle p-4 flex justify-between items-center w-full", { "opacity-50 cursor-not-allowed": t.disabled }]),
|
|
7373
7385
|
disabled: t.disabled,
|
|
7374
7386
|
onClick: s[0] || (s[0] = (...a) => r.toggleAccordion && r.toggleAccordion(...a))
|
|
7375
7387
|
}, [
|
|
7376
|
-
P("span",
|
|
7377
|
-
t.actionFirst ? (C(), A("div",
|
|
7378
|
-
n.active ? (C(), A("i",
|
|
7388
|
+
P("span", ra, [
|
|
7389
|
+
t.actionFirst ? (C(), A("div", oa, [
|
|
7390
|
+
n.active ? (C(), A("i", la)) : (C(), A("i", aa))
|
|
7379
7391
|
])) : B("", !0),
|
|
7380
7392
|
R(i.$slots, "title")
|
|
7381
7393
|
]),
|
|
7382
|
-
P("div",
|
|
7394
|
+
P("div", ca, [
|
|
7383
7395
|
R(i.$slots, "slot-right"),
|
|
7384
|
-
t.actionFirst ? B("", !0) : (C(), A("div",
|
|
7385
|
-
n.active ? (C(), A("i",
|
|
7396
|
+
t.actionFirst ? B("", !0) : (C(), A("div", da, [
|
|
7397
|
+
n.active ? (C(), A("i", ha)) : (C(), A("i", ua))
|
|
7386
7398
|
]))
|
|
7387
7399
|
])
|
|
7388
|
-
], 10,
|
|
7389
|
-
t.disabled ? (C(), A("div",
|
|
7400
|
+
], 10, sa),
|
|
7401
|
+
t.disabled ? (C(), A("div", fa, [
|
|
7390
7402
|
lt(o, {
|
|
7391
7403
|
class: "text-3xl text-blue-100",
|
|
7392
7404
|
name: "ki-outline ki-information"
|
|
@@ -7401,21 +7413,21 @@ function pa(i, s, t, e, n, r) {
|
|
|
7401
7413
|
class: q(["accordion-content transition-all duration-700 ease-in-out", { "border-t": n.active }]),
|
|
7402
7414
|
style: en({ height: n.active ? n.contentHeight : "0px" })
|
|
7403
7415
|
}, [
|
|
7404
|
-
P("div",
|
|
7416
|
+
P("div", pa, [
|
|
7405
7417
|
R(i.$slots, "content")
|
|
7406
7418
|
])
|
|
7407
7419
|
], 6)
|
|
7408
7420
|
]);
|
|
7409
7421
|
}
|
|
7410
|
-
const
|
|
7422
|
+
const ma = /* @__PURE__ */ N(na, [["render", ga]]), wn = {
|
|
7411
7423
|
install(i, s) {
|
|
7412
|
-
i.component("KtCard", gn), i.component("KtCardHeader", mn), i.component("KtCardBody", _n), i.component("KtCardTitle", bn), i.component("KtIcon", pe), i.component("KtButton", Pe), i.component("KtAvatar", es), i.component("KtBreadcrumbs", fs), i.component("KtBreadcrumbsEl", ms), i.component("KtMenu", ys), i.component("KtMenuItem", ks), i.component("KtMenuLink", Is), i.component("KtSubMenu", Ts), i.component("KtPagination", vn), i.component("KtTable", er), i.component("KtBadge", ss), i.component("KtSwitch", ar), i.component("KtSeparator", ur), i.component("KtInput", Cr), i.component("KtInputLabel", Tr), i.component("KtTextarea", Rr), i.component("KtSelect", Qe), i.component("KtDialog", Gr), i.component("KtDialogHeader", oo), i.component("KtDialogBody", uo), i.component("KtDialogFooter", go), i.component("KtDialogContent", vo), i.component("KtDialogManager", Eo), i.component("ktTab", Oo), i.component("ktTabPanel", Ao), i.component("ktTabPanels", Mo), i.component("ktTabs", No), i.component("KtPageTitle",
|
|
7424
|
+
i.component("KtCard", gn), i.component("KtCardHeader", mn), i.component("KtCardBody", _n), i.component("KtCardTitle", bn), i.component("KtIcon", pe), i.component("KtButton", Pe), i.component("KtAvatar", es), i.component("KtBreadcrumbs", fs), i.component("KtBreadcrumbsEl", ms), i.component("KtMenu", ys), i.component("KtMenuItem", ks), i.component("KtMenuLink", Is), i.component("KtSubMenu", Ts), i.component("KtPagination", vn), i.component("KtTable", er), i.component("KtBadge", ss), i.component("KtSwitch", ar), i.component("KtSeparator", ur), i.component("KtInput", Cr), i.component("KtInputLabel", Tr), i.component("KtTextarea", Rr), i.component("KtSelect", Qe), i.component("KtDialog", Gr), i.component("KtDialogHeader", oo), i.component("KtDialogBody", uo), i.component("KtDialogFooter", go), i.component("KtDialogContent", vo), i.component("KtDialogManager", Eo), i.component("ktTab", Oo), i.component("ktTabPanel", Ao), i.component("ktTabPanels", Mo), i.component("ktTabs", No), i.component("KtPageTitle", Ho), i.component("KtSkeletonCard", Ko), i.component("KtButtonGroup", ta), i.component("KtSelect", Qe), i.component("KtChip", ea), i.component("KtAccordion", ma);
|
|
7413
7425
|
}
|
|
7414
7426
|
};
|
|
7415
7427
|
export {
|
|
7416
7428
|
Kt as KTComponent,
|
|
7417
7429
|
wn as KtPlugin,
|
|
7418
7430
|
no as dialog,
|
|
7419
|
-
|
|
7431
|
+
va as useDialog
|
|
7420
7432
|
};
|
|
7421
7433
|
//# sourceMappingURL=metronics-vue.es.js.map
|