energy-components 1.22.0 → 1.24.0
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.
- package/dist/components/link.es.js +84 -85
- package/dist/components/multiselect.es.js +52 -52
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/tablepaginatedcomponent.es.js +55 -49
- package/dist/energy-components.es.js +2967 -2962
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/table/table-paginated/TablePaginatedComponent.vue.d.ts +8 -4
- package/dist/types/src/components/navigation/link/link.vue.d.ts +8 -5
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, toRefs as
|
|
1
|
+
import { defineComponent as H, toRefs as V, ref as s, watch as F, watchEffect as M, createElementBlock as h, openBlock as m, createBlock as N, withDirectives as K, Fragment as z, renderList as b, unref as A, renderSlot as P, mergeProps as q, createSlots as B, withCtx as C, normalizeProps as w, guardReactiveProps as E, createVNode as G, vShow as J } from "vue";
|
|
2
2
|
import Q from "./tableslotedcomponent.es.js";
|
|
3
3
|
import U from "./pagination.es.js";
|
|
4
4
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -30,19 +30,19 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
30
30
|
disableFirstLoad: { type: Boolean }
|
|
31
31
|
},
|
|
32
32
|
emits: ["update:options", "update:reset", "update:selection", "update:selectedAll", "update:sort", "onItemExpansion"],
|
|
33
|
-
setup(
|
|
34
|
-
const t =
|
|
35
|
-
loading:
|
|
33
|
+
setup(u, { expose: I, emit: x }) {
|
|
34
|
+
const t = u, i = x, {
|
|
35
|
+
loading: L,
|
|
36
36
|
items: d,
|
|
37
|
-
selectableKey:
|
|
37
|
+
selectableKey: y,
|
|
38
38
|
header: $,
|
|
39
|
-
asynchrone:
|
|
40
|
-
} =
|
|
39
|
+
asynchrone: k
|
|
40
|
+
} = V(t), v = s(), r = s([]), n = s([]), p = s({
|
|
41
41
|
item: {
|
|
42
42
|
header: $,
|
|
43
|
-
items:
|
|
43
|
+
items: r
|
|
44
44
|
},
|
|
45
|
-
selectableKey:
|
|
45
|
+
selectableKey: y,
|
|
46
46
|
listChecked: n,
|
|
47
47
|
checkedAll: t.checkedAll,
|
|
48
48
|
initChecked: [],
|
|
@@ -53,68 +53,74 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
53
53
|
hideSelectAll: t.hideSelectAll,
|
|
54
54
|
showEmptyState: t.showEmptyState,
|
|
55
55
|
mockItems: t.itemsPerPage[0]
|
|
56
|
-
}),
|
|
57
|
-
|
|
56
|
+
}), S = s(null), f = s(1), c = s(), D = () => {
|
|
57
|
+
r.value = [], f.value = 1, c.value = void 0, i("update:reset");
|
|
58
58
|
}, O = () => {
|
|
59
|
-
|
|
59
|
+
r.value = d.value;
|
|
60
60
|
}, T = (e) => {
|
|
61
|
-
const
|
|
61
|
+
const l = {};
|
|
62
62
|
if ("pagination" in e) {
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const a = e.pagination;
|
|
64
|
+
a.reset && D();
|
|
65
65
|
let o = !1;
|
|
66
|
-
|
|
66
|
+
c.value = a, (a.page ?? 0) > f.value && (f.value = a.page ?? 0, o = !0), c.value && (c.value.isNewPage = o);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
c.value && Object.assign(l, c.value), v.value && v.value.clearVisibleDetails(), i("update:options", l);
|
|
69
69
|
}, _ = (e) => {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
if (p.value.checkedAll && n.value.length === 0) {
|
|
71
|
+
const a = r.value.map(
|
|
72
|
+
(o) => String(o[y.value || "id"])
|
|
73
|
+
);
|
|
74
|
+
n.value = [...a], p.value.checkedAll = !1, i("update:selectedAll", !1);
|
|
75
|
+
}
|
|
76
|
+
const l = n.value.indexOf(e);
|
|
77
|
+
l > -1 ? n.value.splice(l, 1) : n.value.push(e), i("update:selection", n.value);
|
|
72
78
|
}, j = () => {
|
|
73
79
|
var e;
|
|
74
|
-
(e =
|
|
80
|
+
(e = S.value) == null || e.resetPagination();
|
|
75
81
|
}, R = (e) => {
|
|
76
|
-
e && (n.value = []),
|
|
82
|
+
e && (n.value = []), p.value.checkedAll = e, i("update:selectedAll", e);
|
|
77
83
|
};
|
|
78
|
-
return n.value = [...t.initChecked],
|
|
84
|
+
return n.value = [...t.initChecked], k.value || (r.value = d.value), F(d, () => {
|
|
79
85
|
O();
|
|
80
|
-
}, { deep: !0 }),
|
|
81
|
-
if (!
|
|
82
|
-
const e = (t.activePage - 1) * t.itemsPerPage[0],
|
|
83
|
-
|
|
86
|
+
}, { deep: !0 }), M(() => {
|
|
87
|
+
if (!k.value && d.value.length >= 0) {
|
|
88
|
+
const e = (t.activePage - 1) * t.itemsPerPage[0], l = e + t.itemsPerPage[0];
|
|
89
|
+
r.value = d.value.slice(e, l);
|
|
84
90
|
}
|
|
85
|
-
}),
|
|
91
|
+
}), I({
|
|
86
92
|
/** Fuerza a refrescar la paginacion y la tabla */
|
|
87
93
|
$reset: j
|
|
88
|
-
}), (e,
|
|
89
|
-
e.$slots.mobile &&
|
|
94
|
+
}), (e, l) => (m(), h("div", X, [
|
|
95
|
+
e.$slots.mobile && u.isMobileDevice ? (m(!0), h(z, { key: 0 }, b(A(d), (a, o) => (m(), h("div", {
|
|
90
96
|
key: `mobile-${o}`,
|
|
91
|
-
class: "
|
|
97
|
+
class: "table_paginated__mobile_item"
|
|
92
98
|
}, [
|
|
93
|
-
P(e.$slots, "mobile", { item:
|
|
94
|
-
]))), 128)) : (
|
|
99
|
+
P(e.$slots, "mobile", { item: a }, void 0, !0)
|
|
100
|
+
]))), 128)) : (m(), N(Q, q({
|
|
95
101
|
key: 1,
|
|
96
102
|
ref_key: "tableSloted",
|
|
97
|
-
ref:
|
|
103
|
+
ref: v,
|
|
98
104
|
class: "mb-5"
|
|
99
|
-
},
|
|
100
|
-
loading:
|
|
101
|
-
"is-mobile-device":
|
|
102
|
-
"items-expanded":
|
|
105
|
+
}, p.value, {
|
|
106
|
+
loading: A(L),
|
|
107
|
+
"is-mobile-device": u.isMobileDevice,
|
|
108
|
+
"items-expanded": u.itemsExpanded,
|
|
103
109
|
onOnClickCheckbox: _,
|
|
104
110
|
onSelectAll: R,
|
|
105
|
-
onOnItemExpansion:
|
|
106
|
-
onOnHeaderSort:
|
|
111
|
+
onOnItemExpansion: l[0] || (l[0] = (a) => i("onItemExpansion", a)),
|
|
112
|
+
onOnHeaderSort: l[1] || (l[1] = (a) => i("update:sort", a))
|
|
107
113
|
}), B({ _: 2 }, [
|
|
108
|
-
|
|
114
|
+
b(e.$slots, (a, o) => ({
|
|
109
115
|
name: o,
|
|
110
|
-
fn: C((
|
|
111
|
-
P(e.$slots, o, w(
|
|
116
|
+
fn: C((g) => [
|
|
117
|
+
P(e.$slots, o, w(E(g || {})), void 0, !0)
|
|
112
118
|
])
|
|
113
119
|
}))
|
|
114
120
|
]), 1040, ["loading", "is-mobile-device", "items-expanded"])),
|
|
115
121
|
K(G(U, {
|
|
116
122
|
ref_key: "paginationComponentRef",
|
|
117
|
-
ref:
|
|
123
|
+
ref: S,
|
|
118
124
|
class: "rds-mt-16",
|
|
119
125
|
"total-items": t.totalItemsLength,
|
|
120
126
|
"current-page": t.activePage,
|
|
@@ -123,20 +129,20 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
123
129
|
"jump-to": t.jumpTo,
|
|
124
130
|
selected: !0,
|
|
125
131
|
"disable-first-load": t.disableFirstLoad,
|
|
126
|
-
onPageChanged:
|
|
132
|
+
onPageChanged: l[2] || (l[2] = (a) => T({ pagination: a }))
|
|
127
133
|
}, B({ _: 2 }, [
|
|
128
|
-
|
|
134
|
+
b(e.$slots, (a, o) => ({
|
|
129
135
|
name: o,
|
|
130
|
-
fn: C((
|
|
131
|
-
P(e.$slots, o, w(
|
|
136
|
+
fn: C((g) => [
|
|
137
|
+
P(e.$slots, o, w(E(g || {})), void 0, !0)
|
|
132
138
|
])
|
|
133
139
|
}))
|
|
134
140
|
]), 1032, ["total-items", "current-page", "items-per-page", "hide-leyend", "jump-to", "disable-first-load"]), [
|
|
135
|
-
[J, !
|
|
141
|
+
[J, !u.hidePagination]
|
|
136
142
|
])
|
|
137
143
|
]));
|
|
138
144
|
}
|
|
139
|
-
}), le = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-
|
|
145
|
+
}), le = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-6be5535e"]]);
|
|
140
146
|
export {
|
|
141
147
|
le as default
|
|
142
148
|
};
|