adverich-kun-ui 0.1.160 → 0.1.161
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,9 +1,9 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
1
|
+
import { createElementBlock as i, openBlock as n, normalizeClass as x, createElementVNode as l, createCommentVNode as d, renderSlot as c, withModifiers as r, Fragment as v, renderList as w, toDisplayString as g, unref as m, createTextVNode as h } from "vue";
|
|
2
2
|
import { getValue as u, formatValue as y } from "../../../../utils/tableFormatters.js";
|
|
3
|
-
const C = { class: "flex items-center justify-between gap-2 mb-2" }, B = { key: 0 }, S = { key: 0 }, E = { key: 1 }, $ = { key: 1 }, V = ["checked"],
|
|
3
|
+
const C = { class: "flex items-center justify-between gap-2 mb-2" }, B = { key: 0 }, S = { key: 0 }, E = { key: 1 }, $ = { key: 1 }, V = ["checked"], j = { class: "flex flex-col gap-2" }, A = { class: "font-semibold text-slate-600 dark:text-slate-300" }, N = {
|
|
4
4
|
key: 0,
|
|
5
|
-
class: "mt-4"
|
|
6
|
-
}, F = {
|
|
5
|
+
class: "flex justify-between items-start mt-4 text-sm"
|
|
6
|
+
}, T = { class: "text-right" }, F = {
|
|
7
7
|
__name: "KunTableIterator",
|
|
8
8
|
props: {
|
|
9
9
|
item: Object,
|
|
@@ -18,61 +18,70 @@ const C = { class: "flex items-center justify-between gap-2 mb-2" }, B = { key:
|
|
|
18
18
|
rowClass: String
|
|
19
19
|
},
|
|
20
20
|
emits: ["toggle-expand", "toggle-select", "row-click"],
|
|
21
|
-
setup(e, { emit:
|
|
22
|
-
const k = e,
|
|
21
|
+
setup(e, { emit: f }) {
|
|
22
|
+
const k = e, o = f, b = [
|
|
23
23
|
"border border-slate-300 dark:border-slate-700 rounded p-4 bg-white dark:bg-slate-900 shadow-sm",
|
|
24
24
|
k.rowClass
|
|
25
25
|
];
|
|
26
|
-
return (a,
|
|
27
|
-
class:
|
|
28
|
-
onClick:
|
|
26
|
+
return (a, s) => (n(), i("div", {
|
|
27
|
+
class: x(b),
|
|
28
|
+
onClick: s[2] || (s[2] = (t) => o("row-click", { item: e.item, index: e.index, event: t }))
|
|
29
29
|
}, [
|
|
30
|
-
|
|
31
|
-
e.showExpand ? (
|
|
30
|
+
l("div", C, [
|
|
31
|
+
e.showExpand ? (n(), i("div", B, [
|
|
32
32
|
c(a.$slots, "expand-icon", {
|
|
33
33
|
item: e.item,
|
|
34
34
|
index: e.index
|
|
35
35
|
}, () => [
|
|
36
|
-
|
|
36
|
+
l("button", {
|
|
37
37
|
class: "text-xl font-bold focus:outline-none",
|
|
38
|
-
onClick:
|
|
38
|
+
onClick: s[0] || (s[0] = r((t) => o("toggle-expand", e.item), ["stop"]))
|
|
39
39
|
}, [
|
|
40
|
-
e.isExpanded ? (
|
|
40
|
+
e.isExpanded ? (n(), i("span", S, "−")) : (n(), i("span", E, "+"))
|
|
41
41
|
])
|
|
42
42
|
])
|
|
43
43
|
])) : d("", !0),
|
|
44
|
-
e.showSelect ? (
|
|
45
|
-
|
|
44
|
+
e.showSelect ? (n(), i("div", $, [
|
|
45
|
+
l("input", {
|
|
46
46
|
type: "checkbox",
|
|
47
47
|
checked: e.isSelected,
|
|
48
|
-
onChange:
|
|
48
|
+
onChange: s[1] || (s[1] = r((t) => o("toggle-select", e.item), ["stop"])),
|
|
49
49
|
class: "form-checkbox w-5 h-5"
|
|
50
50
|
}, null, 40, V)
|
|
51
51
|
])) : d("", !0)
|
|
52
52
|
]),
|
|
53
|
-
|
|
54
|
-
(
|
|
53
|
+
l("div", j, [
|
|
54
|
+
(n(!0), i(v, null, w(e.headers, (t) => (n(), i("div", {
|
|
55
55
|
key: t.value,
|
|
56
56
|
class: "flex justify-between text-sm"
|
|
57
57
|
}, [
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
l("div", A, g(t.label ?? t.text), 1),
|
|
59
|
+
l("div", {
|
|
60
|
+
class: x(["text-right text-slate-800 dark:text-slate-100", {
|
|
61
|
+
"text-right": t.align === "right",
|
|
62
|
+
"text-center": t.align === "center",
|
|
63
|
+
"text-left": t.align === "left" || !t.align
|
|
64
|
+
}])
|
|
65
|
+
}, [
|
|
60
66
|
c(a.$slots, `item.${t.value}`, {
|
|
61
67
|
item: e.item,
|
|
62
68
|
value: m(u)(t, e.item),
|
|
63
69
|
index: e.index
|
|
64
70
|
}, () => [
|
|
65
|
-
|
|
71
|
+
h(g(m(y)(t, m(u)(t, e.item))), 1)
|
|
66
72
|
])
|
|
67
|
-
])
|
|
73
|
+
], 2)
|
|
68
74
|
]))), 128))
|
|
69
75
|
]),
|
|
70
|
-
e.hasActions ? (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
e.hasActions ? (n(), i("div", N, [
|
|
77
|
+
s[3] || (s[3] = l("div", { class: "font-semibold text-slate-600 dark:text-slate-300" }, " Acciones ", -1)),
|
|
78
|
+
l("div", T, [
|
|
79
|
+
c(a.$slots, "item.actions", {
|
|
80
|
+
item: e.item,
|
|
81
|
+
index: e.index,
|
|
82
|
+
loading: e.loading
|
|
83
|
+
})
|
|
84
|
+
])
|
|
76
85
|
])) : d("", !0)
|
|
77
86
|
]));
|
|
78
87
|
}
|