adverich-kun-ui 0.1.607 → 0.1.609

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,12 +1,12 @@
1
- import { toRefs as Re, useModel as Ee, ref as w, watch as se, computed as te, onMounted as Me, openBlock as l, createElementBlock as a, mergeProps as O, unref as s, renderSlot as i, createCommentVNode as r, createElementVNode as b, toDisplayString as z, Fragment as oe, createBlock as F, withCtx as D, createVNode as T, normalizeClass as U, withDirectives as le, vModelText as Be, vShow as ae, normalizeProps as d, guardReactiveProps as h, createSlots as re, renderList as ne, isRef as Ve, mergeModels as ie, nextTick as He } from "vue";
2
- import { isMobile as u, mdAndUp as Ke } from "../../../../utils/_platform.js";
1
+ import { toRefs as Ee, useModel as Me, ref as w, watch as se, computed as te, onMounted as Be, openBlock as l, createElementBlock as a, mergeProps as O, unref as s, renderSlot as i, createCommentVNode as r, createElementVNode as S, toDisplayString as z, Fragment as oe, createBlock as F, withCtx as D, createVNode as T, normalizeClass as j, withDirectives as le, vModelText as Ve, vShow as ae, normalizeProps as d, guardReactiveProps as h, createSlots as re, renderList as ne, isRef as He, mergeModels as ie, nextTick as Ke } from "vue";
2
+ import { isMobile as u } from "../../../../utils/_platform.js";
3
3
  import ce from "../../../KunIcon/src/components/KunIcon.vue.js";
4
4
  import Le from "../../../../icons/IconFilter.vue.js";
5
5
  import Oe from "../../../../icons/IconSearch.vue.js";
6
6
  import ze from "./KunTableHeaders.vue.js";
7
7
  import De from "./KunTableFooter.vue.js";
8
- import Ue from "./KunTableRows.vue.js";
9
- import je from "./KunTableIterators.vue.js";
8
+ import je from "./KunTableRows.vue.js";
9
+ import Ue from "./KunTableIterators.vue.js";
10
10
  import xe from "../../../KunBtn/src/components/KunBtn.vue.js";
11
11
  import Ne from "./KunTableFilter.vue.js";
12
12
  import We from "../composables/useExpand.js";
@@ -37,8 +37,8 @@ const Ye = {
37
37
  selectedItemsModifiers: {}
38
38
  }),
39
39
  emits: /* @__PURE__ */ ie(["update:page", "update:itemsPerPage", "update:sortBy", "update:search", "focusOnSearch"], ["update:selectedItems"]),
40
- setup(j, { emit: de }) {
41
- const S = de, p = j, P = Re(p), A = Ee(j, "selectedItems"), {
40
+ setup(U, { emit: de }) {
41
+ const b = de, p = U, P = Ee(p), A = Me(U, "selectedItems"), {
42
42
  headers: x,
43
43
  showExpand: I,
44
44
  showSelect: R,
@@ -51,7 +51,8 @@ const Ye = {
51
51
  pageOptions: ge,
52
52
  items: us,
53
53
  searchable: W,
54
- debounceTime: ye
54
+ debounceTime: ye,
55
+ hideSelected: ve
55
56
  } = P, g = w(p.search);
56
57
  se(() => p.search, (e) => {
57
58
  e !== g.value && (g.value = e);
@@ -64,22 +65,22 @@ const Ye = {
64
65
  typeof n == "function" ? t.columnFunction = n : t.columnFunction = () => "";
65
66
  }
66
67
  return t;
67
- })), { filteredItems: y, setSearch: ve, modalFilter: v, applyColumnFilters: we, clearFilters: be, appliedFilters: Se } = Ge(P, ye, k);
68
+ })), { filteredItems: y, setSearch: we, modalFilter: v, applyColumnFilters: Se, clearFilters: be, appliedFilters: ke } = Ge(P, ye, k);
68
69
  se(g, (e) => {
69
- S("update:search", e), ve(e);
70
+ b("update:search", e), we(e);
70
71
  });
71
- const { options: c, paginatedItems: m, updateSort: ke } = Qe(P, S, y, k), C = (e, t = -1) => Je(e, ue.value, t), Q = (e, t = -1) => C(e, t) ?? `kun-table-row-${t}`, q = (e, t = -1) => {
72
+ const { options: c, paginatedItems: m, updateSort: Ce } = Qe(P, b, y, k), C = (e, t = -1) => Je(e, ue.value, t), Q = (e, t = -1) => C(e, t) ?? `kun-table-row-${t}`, q = (e, t = -1) => {
72
73
  var n;
73
74
  const o = C(e, t);
74
75
  return o === null ? !1 : ((n = p.actionLoadingMap) == null ? void 0 : n[o]) || !1;
75
76
  }, {
76
77
  isSelected: E,
77
78
  toggleSelect: M,
78
- toggleSelectAll: Ce,
79
+ toggleSelectAll: $e,
79
80
  allSelected: G,
80
81
  allFilteredSelected: J,
81
- someSelected: $e,
82
- moreThanPaginated: Fe,
82
+ someSelected: Fe,
83
+ moreThanPaginated: Te,
83
84
  clearSelection: X,
84
85
  selectCompleteAll: Y
85
86
  } = qe(m, A, y, C), { isExpanded: B, toggleExpand: V } = We(), f = te(() => ({
@@ -94,31 +95,31 @@ const Ye = {
94
95
  sortBy: c.sortBy,
95
96
  hasActions: p.hasActions,
96
97
  getRowKey: C
97
- })), Te = [cs, he.value], Pe = [ds, fe.value];
98
- Me(() => _());
98
+ })), Pe = [cs, he.value], Ae = [ds, fe.value];
99
+ Be(() => _());
99
100
  const Z = w(null), H = w(!0), $ = w(!1);
100
- function Ae() {
101
- Ie();
102
- }
103
101
  function Ie() {
104
- u.value && (ee(), He(() => {
102
+ Re();
103
+ }
104
+ function Re() {
105
+ u.value && (ee(), Ke(() => {
105
106
  Z.value.focus();
106
107
  }));
107
108
  }
108
109
  function _() {
109
- u.value && (K.value = "w-fit", H.value = !1, $.value = !0, S("focusOnSearch", !1));
110
+ u.value && (K.value = "w-fit", H.value = !1, $.value = !0, b("focusOnSearch", !1));
110
111
  }
111
112
  function ee() {
112
- u.value && (K.value = "w-full border", $.value = !1, H.value = !0, S("focusOnSearch", !0));
113
+ u.value && (K.value = "w-full border", $.value = !1, H.value = !0, b("focusOnSearch", !0));
113
114
  }
114
115
  const K = w("w-full border max-w-sm");
115
- return (e, t) => (l(), a("div", O({ class: Te }, e.$attrs, { style: { "user-select": "text" } }), [
116
+ return (e, t) => (l(), a("div", O({ class: Pe }, e.$attrs, { style: { "user-select": "text" } }), [
116
117
  s(W) || e.filterable || e.$slots.prependHeader || e.$slots.prependSearch || e.$slots.appendSearch ? (l(), a("div", Ye, [
117
118
  $.value || !s(u) ? (l(), a("div", Ze, [
118
119
  i(e.$slots, "prependHeader")
119
120
  ])) : r("", !0),
120
- A.value.length && s(Ke) ? (l(), a("div", _e, [
121
- b("span", es, "Se han seleccionado " + z(A.value.length) + " registros.", 1),
121
+ A.value.length && !s(ve) ? (l(), a("div", _e, [
122
+ S("span", es, "Se han seleccionado " + z(A.value.length) + " registros.", 1),
122
123
  s(m).length !== s(y).length ? (l(), a(oe, { key: 0 }, [
123
124
  s(G) && !s(J) ? (l(), a("span", {
124
125
  key: 0,
@@ -132,7 +133,7 @@ const Ye = {
132
133
  }, " Anular selección ")) : r("", !0)
133
134
  ], 64)) : r("", !0)
134
135
  ])) : r("", !0),
135
- b("div", ss, [
136
+ S("div", ss, [
136
137
  i(e.$slots, "prependSearch"),
137
138
  e.filterable && e.filters.length ? (l(), F(xe, {
138
139
  key: 0,
@@ -153,24 +154,24 @@ const Ye = {
153
154
  })) : r("", !0),
154
155
  s(W) ? (l(), a("div", {
155
156
  key: 1,
156
- class: U(["rounded flex mx-2", [K.value]])
157
+ class: j(["rounded flex mx-2", [K.value]])
157
158
  }, [
158
- le(b("input", {
159
+ le(S("input", {
159
160
  "onUpdate:modelValue": t[3] || (t[3] = (o) => g.value = o),
160
161
  type: "text",
161
162
  placeholder: e.searchPlaceholder,
162
- class: U(["w-full text-sm", s(u) ? "px-1" : "px-2 py-1"]),
163
+ class: j(["w-full text-sm", s(u) ? "px-1" : "px-2 py-1"]),
163
164
  ref_key: "searchRef",
164
165
  ref: Z,
165
166
  onFocus: ee,
166
167
  onBlur: _
167
168
  }, null, 42, ts), [
168
- [Be, g.value],
169
+ [Ve, g.value],
169
170
  [ae, H.value]
170
171
  ]),
171
172
  le(T(ce, {
172
173
  icon: Oe,
173
- onClick: Ae
174
+ onClick: Ie
174
175
  }, null, 512), [
175
176
  [ae, $.value]
176
177
  ])
@@ -178,10 +179,10 @@ const Ye = {
178
179
  i(e.$slots, "appendSearch")
179
180
  ])
180
181
  ])) : r("", !0),
181
- b("div", os, [
182
+ S("div", os, [
182
183
  s(m).length ? (l(), a("table", {
183
184
  key: 0,
184
- class: U(Pe)
185
+ class: j(Ae)
185
186
  }, [
186
187
  e.$slots.colgroup && !s(u) ? (l(), a("colgroup", ls, [
187
188
  i(e.$slots, "colgroup", d(h(f.value)))
@@ -193,18 +194,18 @@ const Ye = {
193
194
  "show-select": s(R),
194
195
  "show-expand": s(I),
195
196
  "all-selected": s(G),
196
- "more-than-paginated": s(Fe),
197
- "some-selected": s($e),
197
+ "more-than-paginated": s(Te),
198
+ "some-selected": s(Fe),
198
199
  "thead-class": e.theadClass,
199
200
  "tr-class": e.trClass,
200
201
  "th-class": e.thClass,
201
202
  "has-actions": e.hasActions,
202
203
  "action-label": e.actionLabel,
203
- onSort: s(ke),
204
- onToggleSelectAll: s(Ce),
204
+ onSort: s(Ce),
205
+ onToggleSelectAll: s($e),
205
206
  customHeaders: e.customSlots
206
207
  }, 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"])) : i(e.$slots, "thead", d(O({ key: 2 }, f.value))),
207
- s(u) ? (l(), F(je, {
208
+ s(u) ? (l(), F(Ue, {
208
209
  key: 4,
209
210
  items: s(m),
210
211
  headers: k.value,
@@ -230,7 +231,7 @@ const Ye = {
230
231
  }))
231
232
  ]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : (l(), a(oe, { key: 3 }, [
232
233
  i(e.$slots, "body.prepend", d(h(f.value))),
233
- T(Ue, {
234
+ T(je, {
234
235
  items: s(m),
235
236
  headers: k.value,
236
237
  "tbody-class": e.tbodyClass,
@@ -266,7 +267,7 @@ const Ye = {
266
267
  ])) : r("", !0)
267
268
  ])) : r("", !0),
268
269
  s(m).length ? r("", !0) : (l(), a("div", rs, [
269
- b("div", ns, z(e.noDataText), 1)
270
+ S("div", ns, z(e.noDataText), 1)
270
271
  ]))
271
272
  ]),
272
273
  s(pe) ? i(e.$slots, "footer", d(O({ key: 2 }, f.value))) : (l(), a("div", is, [
@@ -283,10 +284,10 @@ const Ye = {
283
284
  key: 3,
284
285
  filters: e.filters,
285
286
  modelValue: s(v),
286
- "onUpdate:modelValue": t[6] || (t[6] = (o) => Ve(v) ? v.value = o : null),
287
- onApplyFilters: s(we),
287
+ "onUpdate:modelValue": t[6] || (t[6] = (o) => He(v) ? v.value = o : null),
288
+ onApplyFilters: s(Se),
288
289
  onClearFilters: s(be),
289
- activeFilters: s(Se).byColumn
290
+ activeFilters: s(ke).byColumn
290
291
  }, null, 8, ["filters", "modelValue", "onApplyFilters", "onClearFilters", "activeFilters"])) : r("", !0)
291
292
  ], 16));
292
293
  }
@@ -63,6 +63,7 @@ const t = () => ({
63
63
  // --- Visualización y Estilos ---
64
64
  hideDefaultHeader: { type: Boolean, default: !1 },
65
65
  hideDefaultFooter: { type: Boolean, default: !1 },
66
+ hideSelected: { type: Boolean, default: !1 },
66
67
  // Clases personalizadas
67
68
  wrapperClass: { type: String, default: "" },
68
69
  tableClass: { type: String, default: "" },
@@ -1,36 +1,36 @@
1
- import { toRefs as Ve, useModel as Ie, computed as P, reactive as ue, ref as S, watch as m, onMounted as He, openBlock as n, createElementBlock as i, mergeProps as q, unref as o, renderSlot as d, createCommentVNode as f, createElementVNode as R, toDisplayString as ie, createBlock as K, withCtx as J, createVNode as V, normalizeClass as W, withDirectives as ce, vModelText as Oe, vShow as de, normalizeProps as y, guardReactiveProps as B, Fragment as ze, createSlots as pe, renderList as me, mergeModels as ge, nextTick as fe } from "vue";
1
+ import { toRefs as Ie, useModel as He, computed as P, reactive as ue, ref as S, watch as m, onMounted as Oe, openBlock as n, createElementBlock as i, mergeProps as q, unref as o, renderSlot as d, createCommentVNode as f, createElementVNode as R, toDisplayString as ie, createBlock as K, withCtx as J, createVNode as V, normalizeClass as W, withDirectives as ce, vModelText as ze, vShow as de, normalizeProps as y, guardReactiveProps as B, Fragment as Le, createSlots as pe, renderList as me, mergeModels as ge, nextTick as fe } from "vue";
2
2
  import { isMobile as b } from "../../../../utils/_platform.js";
3
- import { debounce as Le } from "../../../../utils/utils.js";
3
+ import { debounce as je } from "../../../../utils/utils.js";
4
4
  import he from "../../../KunIcon/src/components/KunIcon.vue.js";
5
- import je from "../../../../icons/IconFilter.vue.js";
6
- import De from "../../../../icons/IconSearch.vue.js";
7
- import Ue from "../../../KunTable/src/components/KunTableHeaders.vue.js";
8
- import Qe from "../../../KunTable/src/components/KunTableFooter.vue.js";
9
- import qe from "../../../KunTable/src/components/KunTableRows.vue.js";
10
- import Je from "../../../KunTable/src/components/KunTableIterators.vue.js";
11
- import We from "../../../KunBtn/src/components/KunBtn.vue.js";
12
- import Ge from "../../../KunTable/src/components/KunTableFilter.vue.js";
13
- import Xe from "../../../KunTable/src/composables/useExpand.js";
14
- import { resolveRowKeyValue as Ye } from "../../../KunTable/src/composables/useRowKey.js";
15
- import Ze from "../composables/KunTableServerSideProps.js";
16
- const _e = {
5
+ import De from "../../../../icons/IconFilter.vue.js";
6
+ import Ue from "../../../../icons/IconSearch.vue.js";
7
+ import Qe from "../../../KunTable/src/components/KunTableHeaders.vue.js";
8
+ import qe from "../../../KunTable/src/components/KunTableFooter.vue.js";
9
+ import Je from "../../../KunTable/src/components/KunTableRows.vue.js";
10
+ import We from "../../../KunTable/src/components/KunTableIterators.vue.js";
11
+ import Ge from "../../../KunBtn/src/components/KunBtn.vue.js";
12
+ import Xe from "../../../KunTable/src/components/KunTableFilter.vue.js";
13
+ import Ye from "../../../KunTable/src/composables/useExpand.js";
14
+ import { resolveRowKeyValue as Ze } from "../../../KunTable/src/composables/useRowKey.js";
15
+ import _e from "../composables/KunTableServerSideProps.js";
16
+ const es = {
17
17
  key: 0,
18
18
  class: "p-2 bg-surface print:hidden flex w-full justify-between"
19
- }, es = {
19
+ }, ss = {
20
20
  key: 0,
21
21
  class: "w-full flex items-center"
22
- }, ss = {
22
+ }, ts = {
23
23
  key: 1,
24
24
  class: "inline-flex items-center justify-center whitespace-nowrap"
25
- }, ts = { class: "pr-2" }, as = { class: "min-w-1/3 flex h-full items-center justify-end" }, os = ["placeholder"], ls = { class: "flex-1 overflow-auto bg-surface" }, rs = { key: 0 }, ns = { key: 5 }, us = {
25
+ }, as = { class: "pr-2" }, os = { class: "min-w-1/3 flex h-full items-center justify-end" }, ls = ["placeholder"], rs = { class: "flex-1 overflow-auto bg-surface" }, ns = { key: 0 }, us = { key: 5 }, is = {
26
26
  key: 1,
27
27
  class: "h-full flex justify-center items-center"
28
- }, is = { class: "text-center text-4xl" }, cs = {
28
+ }, cs = { class: "text-center text-4xl" }, ds = {
29
29
  key: 1,
30
30
  class: "sticky bottom-0 z-10 print:hidden"
31
- }, ds = "overflow-hidden h-full w-full flex flex-col border border-slate-200 dark:border-slate-800 rounded", ps = "table-auto w-full h-fit text-sm text-left", Ts = {
31
+ }, ps = "overflow-hidden h-full w-full flex flex-col border border-slate-200 dark:border-slate-800 rounded", ms = "table-auto w-full h-fit text-sm text-left", As = {
32
32
  __name: "KunTableServerSide",
33
- props: /* @__PURE__ */ ge(Ze(), {
33
+ props: /* @__PURE__ */ ge(_e(), {
34
34
  selectedItems: { type: Array, default: () => [] },
35
35
  selectedItemsModifiers: {}
36
36
  }),
@@ -43,7 +43,7 @@ const _e = {
43
43
  "focusOnSearch"
44
44
  ], ["update:selectedItems"]),
45
45
  setup(G, { emit: ve }) {
46
- const w = ve, r = G, ye = Ve(r), u = Ie(G, "selectedItems"), {
46
+ const w = ve, r = G, ye = Ie(r), u = He(G, "selectedItems"), {
47
47
  headers: X,
48
48
  showExpand: I,
49
49
  showSelect: H,
@@ -55,7 +55,8 @@ const _e = {
55
55
  wrapperClass: ke,
56
56
  pageOptions: Ce,
57
57
  searchable: Z,
58
- filters: _
58
+ filters: _,
59
+ hideSelected: $e
59
60
  } = ye, ee = (e) => typeof e == "string" ? [{ key: e, order: "asc" }] : Array.isArray(e) ? e.map((s) => typeof s == "string" ? { key: s, order: "asc" } : s) : [], p = P(() => {
60
61
  var e;
61
62
  return (e = r.result) != null && e.result && typeof r.result.result == "object" ? r.result.result : r.result ?? {};
@@ -120,7 +121,7 @@ const _e = {
120
121
  s.columnFunction = typeof l == "function" ? l : () => "";
121
122
  }
122
123
  return s;
123
- })), N = (e, s = -1) => Ye(e, be.value, s), te = (e, s = -1) => N(e, s) ?? `kun-table-server-row-${s}`, ae = (e, s = -1) => {
124
+ })), N = (e, s = -1) => Ze(e, be.value, s), te = (e, s = -1) => N(e, s) ?? `kun-table-server-row-${s}`, ae = (e, s = -1) => {
124
125
  var l;
125
126
  const a = N(e, s);
126
127
  return a === null ? !1 : ((l = r.actionLoadingMap) == null ? void 0 : l[a]) || !1;
@@ -135,7 +136,7 @@ const _e = {
135
136
  return;
136
137
  }
137
138
  u.value = [...u.value, e];
138
- }, L = P(() => c.value.length > 0 && c.value.every(C)), $e = P(() => c.value.some(C) && !L.value), Fe = () => {
139
+ }, L = P(() => c.value.length > 0 && c.value.every(C)), Fe = P(() => c.value.some(C) && !L.value), Be = () => {
139
140
  if (L.value) {
140
141
  oe();
141
142
  return;
@@ -145,7 +146,7 @@ const _e = {
145
146
  m(c, () => {
146
147
  u.value = u.value.filter((e, s) => c.value.some((a, l) => O(e, a, s, l)));
147
148
  }, { deep: !0 });
148
- const { isExpanded: j, toggleExpand: D } = Xe(), Be = () => {
149
+ const { isExpanded: j, toggleExpand: D } = Ye(), Te = () => {
149
150
  const [e] = t.sortBy;
150
151
  return {
151
152
  page: t.page,
@@ -157,8 +158,8 @@ const _e = {
157
158
  filters: { ...v.byColumn }
158
159
  };
159
160
  }, $ = () => {
160
- w("update:page", t.page), w("update:itemsPerPage", t.itemsPerPage), w("update:sortBy", t.sortBy), w("update:query", Be());
161
- }, Te = Le((e) => {
161
+ w("update:page", t.page), w("update:itemsPerPage", t.itemsPerPage), w("update:sortBy", t.sortBy), w("update:query", Te());
162
+ }, Ae = je((e) => {
162
163
  if (v.search = e ?? "", t.page !== 1) {
163
164
  t.page = 1;
164
165
  return;
@@ -166,7 +167,7 @@ const _e = {
166
167
  $();
167
168
  }, r.debounceTime ?? 300);
168
169
  m(T, (e) => {
169
- k.value || (w("update:search", e), Te(e));
170
+ k.value || (w("update:search", e), Ae(e));
170
171
  }), m(() => t.page, (e, s) => {
171
172
  k.value || e !== s && $();
172
173
  }), m(() => t.itemsPerPage, (e, s) => {
@@ -186,19 +187,19 @@ const _e = {
186
187
  $();
187
188
  }
188
189
  }, { deep: !0 });
189
- const Ae = (e) => {
190
+ const Ne = (e) => {
190
191
  if (v.byColumn = { ...e }, t.page !== 1) {
191
192
  t.page = 1;
192
193
  return;
193
194
  }
194
195
  $();
195
- }, Ne = () => {
196
+ }, Ee = () => {
196
197
  if (v.byColumn = {}, t.page !== 1) {
197
198
  t.page = 1;
198
199
  return;
199
200
  }
200
201
  $();
201
- }, Ee = ({ key: e, order: s }) => {
202
+ }, Re = ({ key: e, order: s }) => {
202
203
  if (t.sortBy.find((l) => l.key === e)) {
203
204
  t.sortBy = [{ key: e, order: s }];
204
205
  return;
@@ -217,13 +218,13 @@ const _e = {
217
218
  hasActions: r.hasActions,
218
219
  getRowKey: N,
219
220
  pagination: h.value
220
- })), Re = [ds, ke.value], Me = [ps, Se.value];
221
- He(() => re());
221
+ })), Me = [ps, ke.value], xe = [ms, Se.value];
222
+ Oe(() => re());
222
223
  const le = S(null), U = S(!0), x = S(!1), Q = S("w-full border max-w-sm");
223
- function xe() {
224
- Ke();
225
- }
226
224
  function Ke() {
225
+ Ve();
226
+ }
227
+ function Ve() {
227
228
  b.value && (ne(), fe(() => {
228
229
  var e;
229
230
  (e = le.value) == null || e.focus();
@@ -235,22 +236,22 @@ const _e = {
235
236
  function ne() {
236
237
  b.value && (Q.value = "w-full border", x.value = !1, U.value = !0, w("focusOnSearch", !0));
237
238
  }
238
- return (e, s) => (n(), i("div", q({ class: Re }, e.$attrs, { style: { "user-select": "text" } }), [
239
- o(Z) || e.filterable || e.$slots.prependHeader || e.$slots.prependSearch || e.$slots.appendSearch ? (n(), i("div", _e, [
240
- x.value || !o(b) ? (n(), i("div", es, [
239
+ return (e, s) => (n(), i("div", q({ class: Me }, e.$attrs, { style: { "user-select": "text" } }), [
240
+ o(Z) || e.filterable || e.$slots.prependHeader || e.$slots.prependSearch || e.$slots.appendSearch ? (n(), i("div", es, [
241
+ x.value || !o(b) ? (n(), i("div", ss, [
241
242
  d(e.$slots, "prependHeader")
242
243
  ])) : f("", !0),
243
- u.value.length ? (n(), i("div", ss, [
244
- R("span", ts, "Se han seleccionado " + ie(u.value.length) + " registros.", 1),
244
+ u.value.length && !o($e) ? (n(), i("div", ts, [
245
+ R("span", as, "Se han seleccionado " + ie(u.value.length) + " registros.", 1),
245
246
  u.value.length ? (n(), i("span", {
246
247
  key: 0,
247
248
  onClick: oe,
248
249
  class: "bg-blue-300 dark:bg-blue-700 hover:!bg-blue-500 rounded cursor-pointer px-2 ml-2"
249
250
  }, " Anular selección ")) : f("", !0)
250
251
  ])) : f("", !0),
251
- R("div", as, [
252
+ R("div", os, [
252
253
  d(e.$slots, "prependSearch"),
253
- e.filterable && o(_).length ? (n(), K(We, {
254
+ e.filterable && o(_).length ? (n(), K(Ge, {
254
255
  key: 0,
255
256
  class: "h-fit",
256
257
  onClick: s[0] || (s[0] = (a) => M.value = !0),
@@ -261,7 +262,7 @@ const _e = {
261
262
  default: J(() => [
262
263
  V(he, {
263
264
  class: "h-fit",
264
- icon: je,
265
+ icon: De,
265
266
  size: "text-lg"
266
267
  })
267
268
  ]),
@@ -280,13 +281,13 @@ const _e = {
280
281
  ref: le,
281
282
  onFocus: ne,
282
283
  onBlur: re
283
- }, null, 42, os), [
284
- [Oe, T.value],
284
+ }, null, 42, ls), [
285
+ [ze, T.value],
285
286
  [de, U.value]
286
287
  ]),
287
288
  ce(V(he, {
288
- icon: De,
289
- onClick: xe
289
+ icon: Ue,
290
+ onClick: Ke
290
291
  }, null, 512), [
291
292
  [de, x.value]
292
293
  ])
@@ -294,15 +295,15 @@ const _e = {
294
295
  d(e.$slots, "appendSearch")
295
296
  ])
296
297
  ])) : f("", !0),
297
- R("div", ls, [
298
+ R("div", rs, [
298
299
  c.value.length ? (n(), i("table", {
299
300
  key: 0,
300
- class: W(Me)
301
+ class: W(xe)
301
302
  }, [
302
- e.$slots.colgroup && !o(b) ? (n(), i("colgroup", rs, [
303
+ e.$slots.colgroup && !o(b) ? (n(), i("colgroup", ns, [
303
304
  d(e.$slots, "colgroup", y(B(F.value)))
304
305
  ])) : f("", !0),
305
- !o(Pe) && !o(b) ? (n(), K(Ue, {
306
+ !o(Pe) && !o(b) ? (n(), K(Qe, {
306
307
  key: 1,
307
308
  headers: o(X),
308
309
  "sort-by": t.sortBy,
@@ -310,17 +311,17 @@ const _e = {
310
311
  "show-expand": o(I),
311
312
  "all-selected": L.value,
312
313
  "more-than-paginated": !1,
313
- "some-selected": $e.value,
314
+ "some-selected": Fe.value,
314
315
  "thead-class": e.theadClass,
315
316
  "tr-class": e.trClass,
316
317
  "th-class": e.thClass,
317
318
  "has-actions": e.hasActions,
318
319
  "action-label": e.actionLabel,
319
- onSort: Ee,
320
- onToggleSelectAll: Fe,
320
+ onSort: Re,
321
+ onToggleSelectAll: Be,
321
322
  customHeaders: e.customSlots
322
323
  }, null, 8, ["headers", "sort-by", "show-select", "show-expand", "all-selected", "some-selected", "thead-class", "tr-class", "th-class", "has-actions", "action-label", "customHeaders"])) : d(e.$slots, "thead", y(q({ key: 2 }, F.value))),
323
- o(b) ? (n(), K(Je, {
324
+ o(b) ? (n(), K(We, {
324
325
  key: 4,
325
326
  items: c.value,
326
327
  headers: se.value,
@@ -344,9 +345,9 @@ const _e = {
344
345
  d(e.$slots, l, y(B(g)))
345
346
  ])
346
347
  }))
347
- ]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "customSlots"])) : (n(), i(ze, { key: 3 }, [
348
+ ]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "customSlots"])) : (n(), i(Le, { key: 3 }, [
348
349
  d(e.$slots, "body.prepend", y(B(F.value))),
349
- V(qe, {
350
+ V(Je, {
350
351
  items: c.value,
351
352
  headers: se.value,
352
353
  "tbody-class": e.tbodyClass,
@@ -377,15 +378,15 @@ const _e = {
377
378
  ]), 1032, ["items", "headers", "tbody-class", "row-class", "row-class-condition", "tr-class", "td-class", "selected-class", "striped-class", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "customSlots"]),
378
379
  d(e.$slots, "body.append", y(B(F.value)))
379
380
  ], 64)),
380
- e.$slots.tfoot ? (n(), i("tfoot", ns, [
381
+ e.$slots.tfoot ? (n(), i("tfoot", us, [
381
382
  d(e.$slots, "tfoot", y(B(F.value)))
382
383
  ])) : f("", !0)
383
- ])) : (n(), i("div", us, [
384
- R("div", is, ie(e.loading ? e.loadingText : e.noDataText), 1)
384
+ ])) : (n(), i("div", is, [
385
+ R("div", cs, ie(e.loading ? e.loadingText : e.noDataText), 1)
385
386
  ]))
386
387
  ]),
387
- o(we) ? d(e.$slots, "footer", y(q({ key: 2 }, F.value))) : (n(), i("div", cs, [
388
- V(Qe, {
388
+ o(we) ? d(e.$slots, "footer", y(q({ key: 2 }, F.value))) : (n(), i("div", ds, [
389
+ V(qe, {
389
390
  "items-length": h.value.total,
390
391
  "items-per-page": t.itemsPerPage,
391
392
  "current-page": t.page,
@@ -397,18 +398,18 @@ const _e = {
397
398
  "onUpdate:page": s[3] || (s[3] = (a) => t.page = a)
398
399
  }, null, 8, ["items-length", "items-per-page", "current-page", "total-pages", "from", "to", "page-options"])
399
400
  ])),
400
- e.filterable && M.value ? (n(), K(Ge, {
401
+ e.filterable && M.value ? (n(), K(Xe, {
401
402
  key: 3,
402
403
  filters: o(_),
403
404
  modelValue: M.value,
404
405
  "onUpdate:modelValue": s[4] || (s[4] = (a) => M.value = a),
405
- onApplyFilters: Ae,
406
- onClearFilters: Ne,
406
+ onApplyFilters: Ne,
407
+ onClearFilters: Ee,
407
408
  activeFilters: v.byColumn
408
409
  }, null, 8, ["filters", "modelValue", "activeFilters"])) : f("", !0)
409
410
  ], 16));
410
411
  }
411
412
  };
412
413
  export {
413
- Ts as default
414
+ As as default
414
415
  };
@@ -1,4 +1,4 @@
1
- import { computed as i, ref as x } from "vue";
1
+ import { computed as i, ref as c } from "vue";
2
2
  const s = typeof window < "u";
3
3
  function f() {
4
4
  var t, a, u, r, v;
@@ -8,7 +8,7 @@ function f() {
8
8
  let o = "Unknown OS", d = "Unknown Version";
9
9
  return /Mac/.test(l) ? (o = "Mac OS", d = (a = (t = l.match(/Mac OS X (\d+[\._]\d+[\._]\d+)/)) == null ? void 0 : t[1]) == null ? void 0 : a.replace(/_/g, ".")) : /iPhone|iPad|iPod/.test(l) ? (o = "iOS", d = ((u = l.match(/OS (\d+)[._](\d+)[._]?(\d+)?/)) == null ? void 0 : u.slice(1, 4).join(".")) || "Unknown") : /Windows/.test(l) ? (o = "Windows", d = (r = l.match(/Windows NT (\d+\.\d+)/)) == null ? void 0 : r[1]) : /Android/.test(l) ? (o = "Android", d = (v = l.match(/Android (\d+\.\d+)/)) == null ? void 0 : v[1]) : /Linux/.test(l) && (o = "Linux"), { os: o, osVersion: d };
10
10
  }
11
- const e = x(s ? window.innerWidth : 1024), m = x(s ? window.innerHeight : 768), w = f(), h = i(
11
+ const e = c(s ? window.innerWidth : 1024), m = c(s ? window.innerHeight : 768), w = f(), h = i(
12
12
  () => w.os === "iOS" || w.os === "Android" || m.value > e.value
13
13
  ), n = {
14
14
  xs: 475,
@@ -26,7 +26,7 @@ i(() => e.value >= n.xl && e.value < n.xxl);
26
26
  i(() => e.value >= n.xxl);
27
27
  i(() => e.value >= n.xs);
28
28
  i(() => e.value >= n.sm);
29
- const S = i(() => e.value >= n.md);
29
+ i(() => e.value >= n.md);
30
30
  i(() => e.value >= n.lg);
31
31
  i(() => e.value >= n.xl);
32
32
  i(() => e.value >= n.xxl);
@@ -36,16 +36,15 @@ i(() => e.value < n.lg);
36
36
  i(() => e.value < n.xl);
37
37
  i(() => e.value < n.xxl);
38
38
  i(() => e.value < n.xxl);
39
- function c() {
39
+ function x() {
40
40
  s && (e.value = window.innerWidth, m.value = window.innerHeight);
41
41
  }
42
- s && (window.addEventListener("resize", c), window.addEventListener("beforeunload", () => {
43
- window.removeEventListener("resize", c);
42
+ s && (window.addEventListener("resize", x), window.addEventListener("beforeunload", () => {
43
+ window.removeEventListener("resize", x);
44
44
  }));
45
45
  export {
46
46
  h as isMobile,
47
47
  w as kunOS,
48
- S as mdAndUp,
49
48
  m as screenHeight,
50
49
  e as screenWidth
51
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.607",
3
+ "version": "0.1.609",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",