adverich-kun-ui 0.1.558 → 0.1.560
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,20 +1,20 @@
|
|
|
1
|
-
import { mergeModels as X, toRefs as
|
|
2
|
-
import { isMobile as
|
|
1
|
+
import { mergeModels as X, toRefs as Fe, useModel as Te, ref as b, watch as Y, computed as Z, onMounted as Pe, createElementBlock as a, openBlock as o, mergeProps as z, createCommentVNode as r, createElementVNode as S, renderSlot as n, createBlock as $, unref as s, toDisplayString as D, Fragment as _, withCtx as j, createVNode as F, normalizeClass as x, withDirectives as ee, vModelText as Ae, vShow as se, normalizeProps as u, guardReactiveProps as g, createSlots as te, renderList as oe, isRef as Ie, nextTick as Ee } from "vue";
|
|
2
|
+
import { isMobile as p } from "../../../../utils/_platform.js";
|
|
3
3
|
import le from "../../../KunIcon/src/components/KunIcon.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
const
|
|
4
|
+
import Be from "../../../../icons/IconFilter.vue.js";
|
|
5
|
+
import Me from "../../../../icons/IconSearch.vue.js";
|
|
6
|
+
import He from "./KunTableHeaders.vue.js";
|
|
7
|
+
import Ve from "./KunTableFooter.vue.js";
|
|
8
|
+
import Oe from "./KunTableRows.vue.js";
|
|
9
|
+
import Re from "./KunTableIterators.vue.js";
|
|
10
|
+
import ze from "../../../KunBtn/src/components/KunBtn.vue.js";
|
|
11
|
+
import De from "./KunTableFilter.vue.js";
|
|
12
|
+
import je from "../composables/useExpand.js";
|
|
13
|
+
import xe from "../composables/useOptions.js";
|
|
14
|
+
import Le from "../composables/useSelect.js";
|
|
15
|
+
import Ue from "../composables/useFilter.js";
|
|
16
|
+
import Ne from "../composables/KunTableProps.js";
|
|
17
|
+
const Ke = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "p-2 bg-surface print:hidden flex w-full justify-between"
|
|
20
20
|
}, We = {
|
|
@@ -29,252 +29,244 @@ const Ue = {
|
|
|
29
29
|
}, es = { class: "text-center text-4xl" }, ss = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "sticky bottom-0 z-10 print:hidden"
|
|
32
|
-
},
|
|
32
|
+
}, ts = "overflow-hidden h-full w-full flex flex-col border border-slate-200 dark:border-slate-800 rounded", os = "table-auto w-full h-fit text-sm text-left", Ss = {
|
|
33
33
|
__name: "KunTable",
|
|
34
|
-
props: /* @__PURE__ */ X(
|
|
34
|
+
props: /* @__PURE__ */ X(Ne(), {
|
|
35
35
|
selectedItems: { type: Array, default: () => [] },
|
|
36
36
|
selectedItemsModifiers: {}
|
|
37
37
|
}),
|
|
38
38
|
emits: /* @__PURE__ */ X(["update:page", "update:itemsPerPage", "update:sortBy", "update:search", "focusOnSearch"], ["update:selectedItems"]),
|
|
39
|
-
setup(
|
|
40
|
-
const C =
|
|
41
|
-
headers:
|
|
42
|
-
showExpand:
|
|
43
|
-
showSelect:
|
|
44
|
-
rowClass:
|
|
45
|
-
hideDefaultFooter:
|
|
46
|
-
hideDefaultHeader:
|
|
39
|
+
setup(L, { emit: ae }) {
|
|
40
|
+
const C = ae, m = L, T = Fe(m), v = Te(L, "selectedItems"), {
|
|
41
|
+
headers: U,
|
|
42
|
+
showExpand: P,
|
|
43
|
+
showSelect: A,
|
|
44
|
+
rowClass: N,
|
|
45
|
+
hideDefaultFooter: re,
|
|
46
|
+
hideDefaultHeader: ne,
|
|
47
47
|
tableClass: ie,
|
|
48
48
|
wrapperClass: ce,
|
|
49
|
-
pageOptions:
|
|
49
|
+
pageOptions: de,
|
|
50
50
|
items: ls,
|
|
51
|
-
searchable:
|
|
52
|
-
debounceTime:
|
|
53
|
-
} =
|
|
54
|
-
Y(() =>
|
|
51
|
+
searchable: K,
|
|
52
|
+
debounceTime: ue
|
|
53
|
+
} = T, y = b(m.search);
|
|
54
|
+
Y(() => m.search, (e) => {
|
|
55
55
|
e !== y.value && (y.value = e);
|
|
56
56
|
});
|
|
57
|
-
const
|
|
58
|
-
var l
|
|
59
|
-
const
|
|
57
|
+
const I = Z(() => m.headers.map((e) => {
|
|
58
|
+
var l;
|
|
59
|
+
const t = { ...e };
|
|
60
60
|
if (e.columnType === "function" && typeof e.columnFunction == "string") {
|
|
61
|
-
const
|
|
62
|
-
typeof
|
|
63
|
-
`[KunTable] No se encontró la función "${e.columnFunction}" en functionMap`
|
|
64
|
-
), o.columnFunction = () => "");
|
|
61
|
+
const d = (l = m.functionMap) == null ? void 0 : l[e.columnFunction];
|
|
62
|
+
typeof d == "function" ? t.columnFunction = d : t.columnFunction = () => "";
|
|
65
63
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
typeof i == "function" ? o.columnRowText = i : (console.log(`columnType: ${e.columnType}`), console.log(`columnFunction: ${e.columnFunction}`), console.log(`columnRowText: ${e.columnRowText}`), console.warn(
|
|
69
|
-
`[KunTable] No se encontró la función "${e.columnRowText}" en functionMap`
|
|
70
|
-
), o.columnRowText = () => "");
|
|
71
|
-
}
|
|
72
|
-
return o;
|
|
73
|
-
})), { filteredItems: g, setSearch: pe, modalFilter: b, applyColumnFilters: me, clearFilters: fe, appliedFilters: ge } = Ke(P, de, M);
|
|
64
|
+
return t;
|
|
65
|
+
})), { filteredItems: f, setSearch: pe, modalFilter: w, applyColumnFilters: me, clearFilters: fe, appliedFilters: he } = Ue(T, ue, I);
|
|
74
66
|
Y(y, (e) => {
|
|
75
67
|
C("update:search", e), pe(e);
|
|
76
68
|
});
|
|
77
|
-
const { options:
|
|
78
|
-
items:
|
|
79
|
-
headers:
|
|
80
|
-
page:
|
|
81
|
-
itemsPerPage:
|
|
82
|
-
toggleSelect:
|
|
83
|
-
isSelected:
|
|
84
|
-
toggleExpand:
|
|
85
|
-
isExpanded:
|
|
86
|
-
sortBy:
|
|
87
|
-
hasActions:
|
|
88
|
-
})), Se = [
|
|
69
|
+
const { options: i, paginatedItems: c, updateSort: ge } = xe(T, C, f), { isSelected: E, toggleSelect: B, toggleSelectAll: ve, allSelected: ye, someSelected: we, moreThanPaginated: be, clearSelection: W, selectCompleteAll: Q } = Le(c, v, f), { isExpanded: M, toggleExpand: H } = je(), h = Z(() => ({
|
|
70
|
+
items: c.value,
|
|
71
|
+
headers: U.value,
|
|
72
|
+
page: i.page,
|
|
73
|
+
itemsPerPage: i.itemsPerPage,
|
|
74
|
+
toggleSelect: B,
|
|
75
|
+
isSelected: E,
|
|
76
|
+
toggleExpand: H,
|
|
77
|
+
isExpanded: M,
|
|
78
|
+
sortBy: i.sortBy,
|
|
79
|
+
hasActions: m.hasActions
|
|
80
|
+
})), Se = [ts, ce.value], Ce = [os, ie.value];
|
|
89
81
|
Pe(() => G());
|
|
90
|
-
const q =
|
|
91
|
-
function
|
|
82
|
+
const q = b(null), V = b(!0), k = b(!1);
|
|
83
|
+
function ke() {
|
|
92
84
|
$e();
|
|
93
85
|
}
|
|
94
86
|
function $e() {
|
|
95
|
-
|
|
87
|
+
p.value && (J(), Ee(() => {
|
|
96
88
|
q.value.focus();
|
|
97
89
|
}));
|
|
98
90
|
}
|
|
99
91
|
function G() {
|
|
100
|
-
|
|
92
|
+
p.value && (O.value = "w-fit", V.value = !1, k.value = !0, C("focusOnSearch", !1));
|
|
101
93
|
}
|
|
102
94
|
function J() {
|
|
103
|
-
|
|
95
|
+
p.value && (O.value = "w-full border", k.value = !1, V.value = !0, C("focusOnSearch", !0));
|
|
104
96
|
}
|
|
105
|
-
const
|
|
106
|
-
return (e,
|
|
107
|
-
s(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
])) :
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
s(
|
|
114
|
-
s(
|
|
97
|
+
const O = b("w-full border max-w-sm");
|
|
98
|
+
return (e, t) => (o(), a("div", z({ class: Se }, e.$attrs, { style: { "user-select": "text" } }), [
|
|
99
|
+
s(K) || e.filterable || e.$slots.prependHeader || e.$slots.prependSearch || e.$slots.appendSearch ? (o(), a("div", Ke, [
|
|
100
|
+
k.value || !s(p) ? (o(), a("div", We, [
|
|
101
|
+
n(e.$slots, "prependHeader")
|
|
102
|
+
])) : r("", !0),
|
|
103
|
+
v.value.length ? (o(), a("div", Qe, [
|
|
104
|
+
S("span", qe, "Se han seleccionado " + D(v.value.length) + " registros.", 1),
|
|
105
|
+
s(c).length !== s(f).length ? (o(), a(_, { key: 0 }, [
|
|
106
|
+
s(c).length === v.value.length ? (o(), a("span", {
|
|
115
107
|
key: 0,
|
|
116
|
-
onClick:
|
|
108
|
+
onClick: t[0] || (t[0] = (...l) => s(Q) && s(Q)(...l)),
|
|
117
109
|
class: "bg-secondary hover:!bg-blue-500 rounded cursor-pointer px-2 ml-2"
|
|
118
|
-
}, " Seleccionar todos los " +
|
|
119
|
-
s(
|
|
110
|
+
}, " Seleccionar todos los " + D(s(f).length) + " registros ", 1)) : r("", !0),
|
|
111
|
+
s(f).length === v.value.length ? (o(), a("span", {
|
|
120
112
|
key: 1,
|
|
121
|
-
onClick:
|
|
113
|
+
onClick: t[1] || (t[1] = (...l) => s(W) && s(W)(...l)),
|
|
122
114
|
class: "bg-secondary hover:!bg-blue-500 rounded cursor-pointer px-2 ml-2"
|
|
123
|
-
}, " Anular selección ")) :
|
|
124
|
-
], 64)) :
|
|
125
|
-
])) :
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
e.filterable && e.filters.length ? (
|
|
115
|
+
}, " Anular selección ")) : r("", !0)
|
|
116
|
+
], 64)) : r("", !0)
|
|
117
|
+
])) : r("", !0),
|
|
118
|
+
S("div", Ge, [
|
|
119
|
+
n(e.$slots, "prependSearch"),
|
|
120
|
+
e.filterable && e.filters.length ? (o(), $(ze, {
|
|
129
121
|
key: 0,
|
|
130
122
|
class: "h-fit",
|
|
131
|
-
onClick:
|
|
123
|
+
onClick: t[2] || (t[2] = (l) => w.value = !0),
|
|
132
124
|
rounded: "rounded-full",
|
|
133
125
|
size: "xs",
|
|
134
126
|
bgColor: "bg-green-200 dark:bg-green-800"
|
|
135
127
|
}, {
|
|
136
|
-
default:
|
|
128
|
+
default: j(() => [
|
|
137
129
|
F(le, {
|
|
138
130
|
class: "h-fit",
|
|
139
|
-
icon:
|
|
131
|
+
icon: Be,
|
|
140
132
|
size: "text-lg"
|
|
141
133
|
})
|
|
142
134
|
]),
|
|
143
135
|
_: 1
|
|
144
|
-
})) :
|
|
145
|
-
s(
|
|
136
|
+
})) : r("", !0),
|
|
137
|
+
s(K) ? (o(), a("div", {
|
|
146
138
|
key: 1,
|
|
147
|
-
class:
|
|
139
|
+
class: x(["rounded flex mx-2", [O.value]])
|
|
148
140
|
}, [
|
|
149
|
-
ee(
|
|
150
|
-
"onUpdate:modelValue":
|
|
141
|
+
ee(S("input", {
|
|
142
|
+
"onUpdate:modelValue": t[3] || (t[3] = (l) => y.value = l),
|
|
151
143
|
type: "text",
|
|
152
144
|
placeholder: e.searchPlaceholder,
|
|
153
|
-
class:
|
|
145
|
+
class: x(["w-full text-sm", s(p) ? "px-1" : "px-2 py-1"]),
|
|
154
146
|
ref_key: "searchRef",
|
|
155
147
|
ref: q,
|
|
156
148
|
onFocus: J,
|
|
157
149
|
onBlur: G
|
|
158
150
|
}, null, 42, Je), [
|
|
159
151
|
[Ae, y.value],
|
|
160
|
-
[se,
|
|
152
|
+
[se, V.value]
|
|
161
153
|
]),
|
|
162
154
|
ee(F(le, {
|
|
163
|
-
icon:
|
|
164
|
-
onClick:
|
|
155
|
+
icon: Me,
|
|
156
|
+
onClick: ke
|
|
165
157
|
}, null, 512), [
|
|
166
|
-
[se,
|
|
158
|
+
[se, k.value]
|
|
167
159
|
])
|
|
168
|
-
], 2)) :
|
|
169
|
-
|
|
160
|
+
], 2)) : r("", !0),
|
|
161
|
+
n(e.$slots, "appendSearch")
|
|
170
162
|
])
|
|
171
|
-
])) :
|
|
172
|
-
|
|
173
|
-
s(
|
|
163
|
+
])) : r("", !0),
|
|
164
|
+
S("div", Xe, [
|
|
165
|
+
s(c).length ? (o(), a("table", {
|
|
174
166
|
key: 0,
|
|
175
|
-
class:
|
|
167
|
+
class: x(Ce)
|
|
176
168
|
}, [
|
|
177
|
-
e.$slots.colgroup && !s(
|
|
178
|
-
|
|
179
|
-
])) :
|
|
180
|
-
!s(
|
|
169
|
+
e.$slots.colgroup && !s(p) ? (o(), a("colgroup", Ye, [
|
|
170
|
+
n(e.$slots, "colgroup", u(g(h.value)))
|
|
171
|
+
])) : r("", !0),
|
|
172
|
+
!s(ne) && !s(p) ? (o(), $(He, {
|
|
181
173
|
key: 1,
|
|
182
|
-
headers: s(
|
|
183
|
-
"sort-by": s(
|
|
184
|
-
"show-select": s(
|
|
185
|
-
"show-expand": s(
|
|
186
|
-
"all-selected": s(
|
|
174
|
+
headers: s(U),
|
|
175
|
+
"sort-by": s(i).sortBy,
|
|
176
|
+
"show-select": s(A),
|
|
177
|
+
"show-expand": s(P),
|
|
178
|
+
"all-selected": s(ye),
|
|
187
179
|
"more-than-paginated": s(be),
|
|
188
|
-
"some-selected": s(
|
|
180
|
+
"some-selected": s(we),
|
|
189
181
|
"thead-class": e.theadClass,
|
|
190
182
|
"tr-class": e.trClass,
|
|
191
183
|
"th-class": e.thClass,
|
|
192
184
|
"has-actions": e.hasActions,
|
|
193
185
|
"action-label": e.actionLabel,
|
|
194
|
-
onSort: s(
|
|
186
|
+
onSort: s(ge),
|
|
195
187
|
onToggleSelectAll: s(ve),
|
|
196
188
|
customHeaders: e.customSlots
|
|
197
|
-
}, null, 8, ["headers", "sort-by", "show-select", "show-expand", "all-selected", "more-than-paginated", "some-selected", "thead-class", "tr-class", "th-class", "has-actions", "action-label", "onSort", "onToggleSelectAll", "customHeaders"])) :
|
|
198
|
-
s(
|
|
189
|
+
}, null, 8, ["headers", "sort-by", "show-select", "show-expand", "all-selected", "more-than-paginated", "some-selected", "thead-class", "tr-class", "th-class", "has-actions", "action-label", "onSort", "onToggleSelectAll", "customHeaders"])) : n(e.$slots, "thead", u(z({ key: 2 }, h.value))),
|
|
190
|
+
s(p) ? (o(), $(Re, {
|
|
199
191
|
key: 4,
|
|
200
|
-
items: s(
|
|
201
|
-
headers:
|
|
202
|
-
"row-class": s(
|
|
192
|
+
items: s(c),
|
|
193
|
+
headers: I.value,
|
|
194
|
+
"row-class": s(N),
|
|
203
195
|
"row-class-condition": e.rowClassCondition,
|
|
204
|
-
"is-selected": s(
|
|
205
|
-
"is-expanded": s(
|
|
206
|
-
"show-select": s(
|
|
207
|
-
"show-expand": s(
|
|
196
|
+
"is-selected": s(E),
|
|
197
|
+
"is-expanded": s(M),
|
|
198
|
+
"show-select": s(A),
|
|
199
|
+
"show-expand": s(P),
|
|
208
200
|
"has-actions": e.hasActions,
|
|
209
201
|
"action-loading-map": e.actionLoadingMap,
|
|
210
|
-
onToggleExpand: s(
|
|
211
|
-
onToggleSelect: s(
|
|
202
|
+
onToggleExpand: s(H),
|
|
203
|
+
onToggleSelect: s(B),
|
|
212
204
|
customSlots: e.customSlots
|
|
213
|
-
},
|
|
214
|
-
|
|
205
|
+
}, te({ _: 2 }, [
|
|
206
|
+
oe(e.$slots, (l, d) => ({
|
|
215
207
|
name: d,
|
|
216
|
-
fn:
|
|
217
|
-
|
|
208
|
+
fn: j((R) => [
|
|
209
|
+
n(e.$slots, d, u(g(R)))
|
|
218
210
|
])
|
|
219
211
|
}))
|
|
220
|
-
]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : (
|
|
221
|
-
|
|
222
|
-
F(
|
|
223
|
-
items: s(
|
|
224
|
-
headers:
|
|
212
|
+
]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : (o(), a(_, { key: 3 }, [
|
|
213
|
+
n(e.$slots, "body.prepend", u(g(h.value))),
|
|
214
|
+
F(Oe, {
|
|
215
|
+
items: s(c),
|
|
216
|
+
headers: I.value,
|
|
225
217
|
"tbody-class": e.tbodyClass,
|
|
226
|
-
"row-class": s(
|
|
218
|
+
"row-class": s(N),
|
|
227
219
|
"row-class-condition": e.rowClassCondition,
|
|
228
220
|
"tr-class": e.trClass,
|
|
229
221
|
"td-class": e.tdClass,
|
|
230
222
|
"selected-class": e.selectedClass,
|
|
231
223
|
"striped-class": e.stripedClass,
|
|
232
|
-
"is-selected": s(
|
|
233
|
-
"is-expanded": s(
|
|
234
|
-
"show-select": s(
|
|
235
|
-
"show-expand": s(
|
|
224
|
+
"is-selected": s(E),
|
|
225
|
+
"is-expanded": s(M),
|
|
226
|
+
"show-select": s(A),
|
|
227
|
+
"show-expand": s(P),
|
|
236
228
|
"has-actions": e.hasActions,
|
|
237
229
|
"action-loading-map": e.actionLoadingMap,
|
|
238
|
-
onToggleExpand: s(
|
|
239
|
-
onToggleSelect: s(
|
|
230
|
+
onToggleExpand: s(H),
|
|
231
|
+
onToggleSelect: s(B),
|
|
240
232
|
customSlots: e.customSlots
|
|
241
|
-
},
|
|
242
|
-
|
|
233
|
+
}, te({ _: 2 }, [
|
|
234
|
+
oe(e.$slots, (l, d) => ({
|
|
243
235
|
name: d,
|
|
244
|
-
fn:
|
|
245
|
-
|
|
236
|
+
fn: j((R) => [
|
|
237
|
+
n(e.$slots, d, u(g(R)))
|
|
246
238
|
])
|
|
247
239
|
}))
|
|
248
240
|
]), 1032, ["items", "headers", "tbody-class", "row-class", "row-class-condition", "tr-class", "td-class", "selected-class", "striped-class", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"]),
|
|
249
|
-
|
|
241
|
+
n(e.$slots, "body.append", u(g(h.value)))
|
|
250
242
|
], 64)),
|
|
251
|
-
e.$slots.tfoot ? (
|
|
252
|
-
|
|
253
|
-
])) :
|
|
254
|
-
])) :
|
|
255
|
-
s(
|
|
256
|
-
|
|
243
|
+
e.$slots.tfoot ? (o(), a("tfoot", Ze, [
|
|
244
|
+
n(e.$slots, "tfoot", u(g(h.value)))
|
|
245
|
+
])) : r("", !0)
|
|
246
|
+
])) : r("", !0),
|
|
247
|
+
s(c).length ? r("", !0) : (o(), a("div", _e, [
|
|
248
|
+
S("div", es, D(e.noDataText), 1)
|
|
257
249
|
]))
|
|
258
250
|
]),
|
|
259
|
-
s(
|
|
260
|
-
F(
|
|
261
|
-
"items-length": s(
|
|
262
|
-
"items-per-page": s(
|
|
263
|
-
"current-page": s(
|
|
264
|
-
"page-options": s(
|
|
265
|
-
"onUpdate:itemsPerPage":
|
|
266
|
-
"onUpdate:page":
|
|
251
|
+
s(re) ? n(e.$slots, "footer", u(z({ key: 2 }, h.value))) : (o(), a("div", ss, [
|
|
252
|
+
F(Ve, {
|
|
253
|
+
"items-length": s(f).length,
|
|
254
|
+
"items-per-page": s(i).itemsPerPage,
|
|
255
|
+
"current-page": s(i).page,
|
|
256
|
+
"page-options": s(de),
|
|
257
|
+
"onUpdate:itemsPerPage": t[4] || (t[4] = (l) => s(i).itemsPerPage = l),
|
|
258
|
+
"onUpdate:page": t[5] || (t[5] = (l) => s(i).page = l)
|
|
267
259
|
}, null, 8, ["items-length", "items-per-page", "current-page", "page-options"])
|
|
268
260
|
])),
|
|
269
|
-
e.filterable && s(
|
|
261
|
+
e.filterable && s(w) ? (o(), $(De, {
|
|
270
262
|
key: 3,
|
|
271
263
|
filters: e.filters,
|
|
272
|
-
modelValue: s(
|
|
273
|
-
"onUpdate:modelValue":
|
|
264
|
+
modelValue: s(w),
|
|
265
|
+
"onUpdate:modelValue": t[6] || (t[6] = (l) => Ie(w) ? w.value = l : null),
|
|
274
266
|
onApplyFilters: s(me),
|
|
275
267
|
onClearFilters: s(fe),
|
|
276
|
-
activeFilters: s(
|
|
277
|
-
}, null, 8, ["filters", "modelValue", "onApplyFilters", "onClearFilters", "activeFilters"])) :
|
|
268
|
+
activeFilters: s(he).byColumn
|
|
269
|
+
}, null, 8, ["filters", "modelValue", "onApplyFilters", "onClearFilters", "activeFilters"])) : r("", !0)
|
|
278
270
|
], 16));
|
|
279
271
|
}
|
|
280
272
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as i, watch as h } from "vue";
|
|
2
2
|
function V(e, n) {
|
|
3
|
-
const u =
|
|
4
|
-
|
|
3
|
+
const u = i(e.modelValue), a = i(null), t = i(null);
|
|
4
|
+
h(() => e.modelValue, (l) => {
|
|
5
5
|
u.value = l, n("update:modelValue", l);
|
|
6
6
|
});
|
|
7
|
-
function
|
|
8
|
-
|
|
7
|
+
function c() {
|
|
8
|
+
e.disabled || (clearTimeout(t.value), a.value = setTimeout(() => {
|
|
9
9
|
u.value = !0, n("update:modelValue", !0);
|
|
10
10
|
}, +e.openDelay));
|
|
11
11
|
}
|
|
@@ -15,7 +15,7 @@ function V(e, n) {
|
|
|
15
15
|
}, +e.closeDelay);
|
|
16
16
|
}
|
|
17
17
|
function d() {
|
|
18
|
-
u.value ? o() :
|
|
18
|
+
u.value ? o() : c();
|
|
19
19
|
}
|
|
20
20
|
function f() {
|
|
21
21
|
e.disabled || !e.openOnClick || d();
|
|
@@ -23,10 +23,10 @@ function V(e, n) {
|
|
|
23
23
|
function m(l) {
|
|
24
24
|
if (!e.openOnHover || e.disabled) return;
|
|
25
25
|
clearTimeout(a.value), clearTimeout(t.value);
|
|
26
|
-
const
|
|
26
|
+
const T = l === "enter" ? e.openDelay : e.closeDelay;
|
|
27
27
|
setTimeout(() => {
|
|
28
28
|
u.value = l === "enter";
|
|
29
|
-
}, +
|
|
29
|
+
}, +T);
|
|
30
30
|
}
|
|
31
31
|
function v() {
|
|
32
32
|
e.openOnFocus && (u.value = !0);
|
|
@@ -36,7 +36,7 @@ function V(e, n) {
|
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
38
|
menuVisible: u,
|
|
39
|
-
showMenu:
|
|
39
|
+
showMenu: c,
|
|
40
40
|
hideMenu: o,
|
|
41
41
|
toggleMenu: d,
|
|
42
42
|
handleActivatorClick: f,
|