adverich-kun-ui 0.1.335 → 0.1.336
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed as m, createElementBlock as o, openBlock as i, normalizeClass as f, createElementVNode as l, createCommentVNode as r, renderSlot as u, withModifiers as v, Fragment as h, renderList as B, toDisplayString as C, createBlock as $, resolveDynamicComponent as
|
|
1
|
+
import { computed as m, createElementBlock as o, openBlock as i, normalizeClass as f, createElementVNode as l, createCommentVNode as r, renderSlot as u, withModifiers as v, Fragment as h, renderList as B, toDisplayString as C, createBlock as $, resolveDynamicComponent as j, unref as d, createTextVNode as E } from "vue";
|
|
2
2
|
import { getValue as x, formatValue as V } from "../../../../utils/tableFormatters.js";
|
|
3
|
-
const A = { class: "flex items-center justify-between gap-2 mb-2 print:hidden" }, N = { key: 0 },
|
|
3
|
+
const A = { class: "flex items-center justify-between gap-2 mb-2 print:hidden" }, N = { key: 0 }, O = { key: 0 }, T = { key: 1 }, D = { key: 1 }, F = ["checked"], R = { class: "flex flex-col gap-2" }, z = { class: "font-semibold text-slate-600 dark:text-slate-300" }, I = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex justify-between items-start mt-4 text-sm"
|
|
6
6
|
}, K = { class: "text-right" }, L = "p-4 shadow-sm", M = "bg-slate-100 dark:bg-slate-900", H = {
|
|
@@ -14,7 +14,7 @@ const A = { class: "flex items-center justify-between gap-2 mb-2 print:hidden" }
|
|
|
14
14
|
isExpanded: Boolean,
|
|
15
15
|
isSelected: Boolean,
|
|
16
16
|
hasActions: Boolean,
|
|
17
|
-
loading: Boolean,
|
|
17
|
+
loading: { type: [Boolean, Object], default: !1 },
|
|
18
18
|
rowClass: String,
|
|
19
19
|
border: { type: String, default: "border border-slate-300 dark:border-slate-700" },
|
|
20
20
|
rounded: { type: String, default: "rounded-sm" },
|
|
@@ -22,13 +22,13 @@ const A = { class: "flex items-center justify-between gap-2 mb-2 print:hidden" }
|
|
|
22
22
|
customSlots: Object
|
|
23
23
|
},
|
|
24
24
|
emits: ["toggle-expand", "toggle-select", "row-click"],
|
|
25
|
-
setup(e, { emit:
|
|
26
|
-
const n = e, c =
|
|
27
|
-
function
|
|
25
|
+
setup(e, { emit: b }) {
|
|
26
|
+
const n = e, c = b;
|
|
27
|
+
function k(a, s) {
|
|
28
28
|
const t = typeof n.rowClassCondition == "function" ? n.rowClassCondition({ item: a, index: s }) : n.rowClassCondition;
|
|
29
29
|
return (t == null ? void 0 : t.trim()) || "";
|
|
30
30
|
}
|
|
31
|
-
const w = m(() => n.rowClass || M), y = m(() =>
|
|
31
|
+
const w = m(() => n.rowClass || M), y = m(() => k(n.item, n.index)), S = m(() => [
|
|
32
32
|
L,
|
|
33
33
|
y.value || w.value,
|
|
34
34
|
n.isSelected ? n.selectedClass : "",
|
|
@@ -49,17 +49,17 @@ const A = { class: "flex items-center justify-between gap-2 mb-2 print:hidden" }
|
|
|
49
49
|
class: "text-xl font-bold focus:outline-none",
|
|
50
50
|
onClick: s[0] || (s[0] = v((t) => c("toggle-expand", e.item), ["stop"]))
|
|
51
51
|
}, [
|
|
52
|
-
e.isExpanded ? (i(), o("span",
|
|
52
|
+
e.isExpanded ? (i(), o("span", O, "−")) : (i(), o("span", T, "+"))
|
|
53
53
|
])
|
|
54
54
|
])
|
|
55
55
|
])) : r("", !0),
|
|
56
|
-
e.showSelect ? (i(), o("div",
|
|
56
|
+
e.showSelect ? (i(), o("div", D, [
|
|
57
57
|
l("input", {
|
|
58
58
|
type: "checkbox",
|
|
59
59
|
checked: e.isSelected,
|
|
60
60
|
onChange: s[1] || (s[1] = v((t) => c("toggle-select", e.item), ["stop"])),
|
|
61
61
|
class: "form-checkbox w-5 h-5"
|
|
62
|
-
}, null, 40,
|
|
62
|
+
}, null, 40, F)
|
|
63
63
|
])) : r("", !0)
|
|
64
64
|
]),
|
|
65
65
|
l("div", R, [
|
|
@@ -77,7 +77,7 @@ const A = { class: "flex items-center justify-between gap-2 mb-2 print:hidden" }
|
|
|
77
77
|
"text-left": t.align === "left" || !t.align
|
|
78
78
|
}])
|
|
79
79
|
}, [
|
|
80
|
-
(g = e.customSlots) != null && g[`item.${t.value}`] ? (i(), $(
|
|
80
|
+
(g = e.customSlots) != null && g[`item.${t.value}`] ? (i(), $(j(e.customSlots[`item.${t.value}`]), {
|
|
81
81
|
key: 0,
|
|
82
82
|
item: e.item,
|
|
83
83
|
value: d(x)(t, e.item),
|
|
@@ -89,7 +89,7 @@ const A = { class: "flex items-center justify-between gap-2 mb-2 print:hidden" }
|
|
|
89
89
|
value: d(x)(t, e.item),
|
|
90
90
|
index: e.index
|
|
91
91
|
}, () => [
|
|
92
|
-
|
|
92
|
+
E(C(d(V)(t, d(x)(t, e.item))), 1)
|
|
93
93
|
])
|
|
94
94
|
], 2)
|
|
95
95
|
]);
|