adverich-kun-ui 0.1.294 → 0.1.295
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.
|
@@ -75,7 +75,7 @@ const Ae = ["placeholder"], Me = { key: 0 }, Ee = { key: 5 }, Re = { class: "h-f
|
|
|
75
75
|
return (e, t) => (l(), m("div", A({ class: ne }, e.$attrs, { style: { "user-select": "text" } }), [
|
|
76
76
|
s(B) || e.filterable || e.$slots.prependSearch || e.$slots.appendSearch ? (l(), m("div", {
|
|
77
77
|
key: 0,
|
|
78
|
-
class: j(["p-2 bg-slate-200 dark:bg-slate-800", {
|
|
78
|
+
class: j(["p-2 bg-slate-200 dark:bg-slate-800 print:hidden", {
|
|
79
79
|
"justify-start flex": e.searchPosition === "start",
|
|
80
80
|
"justify-center flex": e.searchPosition === "center",
|
|
81
81
|
"justify-end flex": e.searchPosition === "end"
|
|
@@ -75,7 +75,7 @@ const j = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
|
|
|
75
75
|
checked: n.allSelected,
|
|
76
76
|
"aria-checked": n.someSelected && !n.allSelected ? "mixed" : n.allSelected ? "true" : "false",
|
|
77
77
|
onChange: x,
|
|
78
|
-
class: "h-6 w-6 text-blue-600 transition-all duration-200 ease-in-out rounded border-gray-300 dark:border-slate-600 checked:bg-blue-600 checked:border-blue-600 indeterminate:bg-blue-400 indeterminate:border-blue-400"
|
|
78
|
+
class: "h-6 w-6 text-blue-600 transition-all duration-200 ease-in-out rounded print:hidden border-gray-300 dark:border-slate-600 checked:bg-blue-600 checked:border-blue-600 indeterminate:bg-blue-400 indeterminate:border-blue-400"
|
|
79
79
|
}, null, 40, R)
|
|
80
80
|
])) : d("", !0),
|
|
81
81
|
(o(!0), r(E, null, T(n.headers, (e) => (o(), r("th", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as k, createElementBlock as
|
|
1
|
+
import { computed as k, createElementBlock as l, openBlock as n, normalizeClass as o, createCommentVNode as r, renderSlot as u, createElementVNode as y, withModifiers as v, Fragment as w, renderList as S, createBlock as h, resolveDynamicComponent as B, unref as c, createTextVNode as $, toDisplayString as A } from "vue";
|
|
2
2
|
import { getValue as x, formatValue as E } from "../../../../utils/tableFormatters.js";
|
|
3
3
|
const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 dark:hover:bg-slate-600 border-t border-slate-300 dark:border-slate-700", D = "bg-slate-100 dark:bg-slate-900", F = "px-3 py-2 whitespace-nowrap text-sm text-black dark:text-white", z = {
|
|
4
4
|
__name: "KunTableRow",
|
|
@@ -22,40 +22,40 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["toggle-expand", "toggle-select", "row-click"],
|
|
24
24
|
setup(e, { emit: C }) {
|
|
25
|
-
const
|
|
25
|
+
const i = e, m = C, b = k(() => [
|
|
26
26
|
j,
|
|
27
27
|
D,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
i.rowClass,
|
|
29
|
+
i.trClass,
|
|
30
|
+
i.stripedClass,
|
|
31
|
+
i.isSelected ? i.selectedClass : ""
|
|
32
32
|
]);
|
|
33
33
|
function d(a, s, t) {
|
|
34
|
-
return typeof
|
|
34
|
+
return typeof i.tdClass == "function" ? i.tdClass({ item: a, header: s, index: t }) : i.tdClass;
|
|
35
35
|
}
|
|
36
|
-
const f = k(() => ["text-center",
|
|
37
|
-
return (a, s) => (n(),
|
|
36
|
+
const f = k(() => ["text-center", i.actionsAlign]);
|
|
37
|
+
return (a, s) => (n(), l("tr", {
|
|
38
38
|
class: o(b.value),
|
|
39
39
|
onClick: s[2] || (s[2] = (t) => m("row-click", { item: e.item, index: e.index, event: t }))
|
|
40
40
|
}, [
|
|
41
|
-
e.showExpand ? (n(),
|
|
41
|
+
e.showExpand ? (n(), l("td", {
|
|
42
42
|
key: 0,
|
|
43
|
-
class: o(d(e.item, "expand", e.index))
|
|
43
|
+
class: o(["print:hidden", d(e.item, "expand", e.index)])
|
|
44
44
|
}, [
|
|
45
|
-
a.$slots.expandIcon ?
|
|
45
|
+
a.$slots.expandIcon ? u(a.$slots, "expand-icon", {
|
|
46
46
|
key: 0,
|
|
47
47
|
item: e.item,
|
|
48
48
|
index: e.index
|
|
49
|
-
}) : (n(),
|
|
49
|
+
}) : (n(), l("button", {
|
|
50
50
|
key: 1,
|
|
51
51
|
onClick: s[0] || (s[0] = (t) => m("toggle-expand", e.item))
|
|
52
52
|
}, [
|
|
53
|
-
e.isExpanded ? (n(),
|
|
53
|
+
e.isExpanded ? (n(), l("span", T, "−")) : (n(), l("span", V, "+"))
|
|
54
54
|
]))
|
|
55
|
-
], 2)) :
|
|
56
|
-
e.showSelect ? (n(),
|
|
55
|
+
], 2)) : r("", !0),
|
|
56
|
+
e.showSelect ? (n(), l("td", {
|
|
57
57
|
key: 1,
|
|
58
|
-
class: o([d(e.item, "checkbox", e.index), "h-full w-10 flex flex-col items-center justify-center"])
|
|
58
|
+
class: o([d(e.item, "checkbox", e.index), "h-full w-10 flex flex-col items-center justify-center print:hidden"])
|
|
59
59
|
}, [
|
|
60
60
|
y("input", {
|
|
61
61
|
type: "checkbox",
|
|
@@ -63,10 +63,10 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
|
|
|
63
63
|
onChange: s[1] || (s[1] = v((t) => m("toggle-select", e.item), ["stop"])),
|
|
64
64
|
class: "h-5 w-5 text-blue-600 transition-all duration-200 ease-in-out rounded"
|
|
65
65
|
}, null, 40, N)
|
|
66
|
-
], 2)) :
|
|
67
|
-
(n(!0),
|
|
66
|
+
], 2)) : r("", !0),
|
|
67
|
+
(n(!0), l(w, null, S(e.headers, (t) => {
|
|
68
68
|
var g;
|
|
69
|
-
return n(),
|
|
69
|
+
return n(), l("td", {
|
|
70
70
|
key: t.value,
|
|
71
71
|
class: o([
|
|
72
72
|
F,
|
|
@@ -80,7 +80,7 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
|
|
|
80
80
|
value: c(x)(t, e.item),
|
|
81
81
|
index: e.index,
|
|
82
82
|
header: t
|
|
83
|
-
}, null, 8, ["item", "value", "index", "header"])) :
|
|
83
|
+
}, null, 8, ["item", "value", "index", "header"])) : u(a.$slots, `item.${t.value}`, {
|
|
84
84
|
key: 1,
|
|
85
85
|
item: e.item,
|
|
86
86
|
value: c(x)(t, e.item),
|
|
@@ -91,16 +91,16 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
|
|
|
91
91
|
])
|
|
92
92
|
], 2);
|
|
93
93
|
}), 128)),
|
|
94
|
-
e.hasActions ? (n(),
|
|
94
|
+
e.hasActions ? (n(), l("td", {
|
|
95
95
|
key: 2,
|
|
96
|
-
class: o([d(e.item, "actions", e.index), f.value])
|
|
96
|
+
class: o(["print:hidden", [d(e.item, "actions", e.index), f.value]])
|
|
97
97
|
}, [
|
|
98
|
-
|
|
98
|
+
u(a.$slots, "item.actions", {
|
|
99
99
|
item: e.item,
|
|
100
100
|
index: e.index,
|
|
101
101
|
loading: e.loading
|
|
102
102
|
})
|
|
103
|
-
], 2)) :
|
|
103
|
+
], 2)) : r("", !0)
|
|
104
104
|
], 2));
|
|
105
105
|
}
|
|
106
106
|
};
|