energy-components 1.10.0-beta.0 → 1.10.1
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/accordion.es.js +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/breadcrumbs.es.js +22 -21
- package/dist/components/button.es.js +56 -48
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/directAccess.es.js +1 -1
- package/dist/components/dragAndDrop.es.js +1 -1
- package/dist/components/dropdown.es.js +19 -18
- package/dist/components/fileUploadItem.es.js +1 -1
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/{icon-svg-YXBqzlJN.js → icon-svg-DuzOdbk1.js} +4360 -2853
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +60 -48
- package/dist/components/modal.es.js +1 -1
- package/dist/components/multiselectcontentwrapper.es.js +25 -22
- package/dist/components/pagination.es.js +129 -80
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/progressBar.es.js +1 -1
- package/dist/components/quantitySelector.es.js +1 -1
- package/dist/components/radioButton.es.js +1 -1
- package/dist/components/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +48 -43
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/breadcrumbs.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +95 -84
- package/dist/components/tableslotedcomponent.es.js +1 -1
- package/dist/components/tag.es.js +15 -15
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +64 -53
- package/dist/components/tooltip.es.js +293 -295
- package/dist/energy-components.es.js +8274 -6668
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/button/button.vue.d.ts +15 -0
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +1 -1
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +1 -1
- package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +9 -2
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +4 -4
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +1 -1
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +17 -0
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +7 -5
- package/dist/types/src/components/navigation/link/link.vue.d.ts +15 -0
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +29 -0
- package/dist/types/src/setupTests.d.ts +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, ref as a, computed as v, createElementBlock as s, openBlock as i, Fragment as u, withDirectives as f, createElementVNode as r, vModelText as C, renderList as L, normalizeClass as x, createVNode as g, toDisplayString as h } from "vue";
|
|
2
|
-
import { i as m, R as k } from "./icon-svg-
|
|
2
|
+
import { i as m, R as k } from "./icon-svg-DuzOdbk1.js";
|
|
3
3
|
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/iconList.css';const y = { class: "rds-e-icon-list" }, D = ["onClick"], N = /* @__PURE__ */ p({
|
|
5
5
|
__name: "icon-list",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as k, ref as u, toRefs as h, computed as $, watch as w, nextTick as S, createElementBlock as t, openBlock as s, normalizeClass as m, createElementVNode as a, createCommentVNode as o, createVNode as b, toDisplayString as r, renderSlot as v } from "vue";
|
|
2
|
-
import { R as _ } from "./icon-svg-
|
|
2
|
+
import { R as _ } from "./icon-svg-DuzOdbk1.js";
|
|
3
3
|
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/infoBox.css';const q = { class: "alert" }, B = {
|
|
5
5
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as v } from "./icon-svg-
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/link.css';const
|
|
1
|
+
import { defineComponent as L, toRefs as N, computed as f, createBlock as p, openBlock as s, resolveDynamicComponent as V, unref as e, normalizeStyle as $, normalizeClass as _, withCtx as M, createCommentVNode as d, createElementBlock as I, mergeProps as k, renderSlot as D, createTextVNode as R, toDisplayString as j } from "vue";
|
|
2
|
+
import { R as v } from "./icon-svg-DuzOdbk1.js";
|
|
3
|
+
import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/link.css';const P = /* @__PURE__ */ L({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -23,7 +23,7 @@ import './style/link.css';const O = /* @__PURE__ */ E({
|
|
|
23
23
|
icon: {
|
|
24
24
|
type: Object,
|
|
25
25
|
default: () => ({ name: "", modifier: "" }),
|
|
26
|
-
validator: (
|
|
26
|
+
validator: (o) => typeof o.name == "string" && (o.modifier === void 0 || typeof o.modifier == "string") ? !0 : (console.error("El icono debe tener una propiedad name de tipo string y una propiedad modifier opcional de tipo string"), !1)
|
|
27
27
|
},
|
|
28
28
|
/**
|
|
29
29
|
* <span>Tag del link</span>
|
|
@@ -60,6 +60,13 @@ import './style/link.css';const O = /* @__PURE__ */ E({
|
|
|
60
60
|
type: Boolean,
|
|
61
61
|
default: !1
|
|
62
62
|
},
|
|
63
|
+
/**
|
|
64
|
+
* <span>Indica si la flecha del link debe ser pequeña</span>
|
|
65
|
+
*/
|
|
66
|
+
arrowSmall: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
63
70
|
/**
|
|
64
71
|
* <span>Indica si el icono esta a la derecha</span>
|
|
65
72
|
*/
|
|
@@ -82,42 +89,45 @@ import './style/link.css';const O = /* @__PURE__ */ E({
|
|
|
82
89
|
default: ""
|
|
83
90
|
}
|
|
84
91
|
},
|
|
85
|
-
setup(
|
|
86
|
-
const y =
|
|
87
|
-
text:
|
|
88
|
-
to:
|
|
92
|
+
setup(o) {
|
|
93
|
+
const y = o, {
|
|
94
|
+
text: w,
|
|
95
|
+
to: g,
|
|
89
96
|
icon: r,
|
|
90
97
|
tag: u,
|
|
91
|
-
disabled:
|
|
98
|
+
disabled: i,
|
|
92
99
|
inverse: m,
|
|
93
|
-
arrow:
|
|
100
|
+
arrow: c,
|
|
94
101
|
right: t,
|
|
95
102
|
underline: h,
|
|
96
|
-
customClass:
|
|
97
|
-
color: l
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
customClass: b,
|
|
104
|
+
color: l,
|
|
105
|
+
arrowSmall: x
|
|
106
|
+
} = N(y), z = f(() => l.value ? { color: l.value } : void 0), E = f(() => {
|
|
107
|
+
var n, B;
|
|
100
108
|
const a = ["rds-e-link"];
|
|
101
|
-
return m.value && a.push("rds-e-link--inverse"), h.value && a.push("rds-e-link--underline"),
|
|
102
|
-
}), S =
|
|
109
|
+
return m.value && a.push("rds-e-link--inverse"), h.value && a.push("rds-e-link--underline"), i.value && a.push("rds-e-style-state-disabled"), ((n = r == null ? void 0 : r.value) == null ? void 0 : n.name) !== "arrow" && a.push("rds-e-arrow-link"), ((B = r == null ? void 0 : r.value) == null ? void 0 : B.name) !== "arrow" && m.value && a.push("rds-e-arrow-link__icon--inverse"), b.value === "rds-e-breadcrumbs__link--text" && a.push("rds-e-link__breadcrumbs"), a.join(" ");
|
|
110
|
+
}), S = f(() => {
|
|
103
111
|
var n;
|
|
104
112
|
const a = ["rds-e-arrow-link__icon--arrow"];
|
|
105
|
-
return r != null && r.value && (a.push("rds-e-arrow-link__icon"),
|
|
113
|
+
return r != null && r.value && (a.push("rds-e-arrow-link__icon"), i.value && a.push("rds-e-arrow-link__icon--disabled")), ((n = r == null ? void 0 : r.value) == null ? void 0 : n.name) !== "arrow" && m.value && a.push("rds-e-arrow-link__icon--inverse"), a.push(
|
|
106
114
|
t.value ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left"
|
|
107
115
|
), a.join(" ");
|
|
108
|
-
}),
|
|
116
|
+
}), C = f(() => {
|
|
109
117
|
var a;
|
|
110
|
-
return
|
|
118
|
+
return c.value || ((a = r == null ? void 0 : r.value) == null ? void 0 : a.name);
|
|
111
119
|
});
|
|
112
|
-
return (a, n) => (
|
|
113
|
-
class: _(
|
|
114
|
-
to: e(u) === "router-link" ? e(
|
|
115
|
-
href: e(u) === "a" ? e(
|
|
116
|
-
disable: e(
|
|
117
|
-
style:
|
|
120
|
+
return (a, n) => (s(), p(V(e(u) === "a" ? e(u) : "router-link"), {
|
|
121
|
+
class: _(E.value),
|
|
122
|
+
to: e(u) === "router-link" ? e(g) : null,
|
|
123
|
+
href: e(u) === "a" ? e(g) : null,
|
|
124
|
+
disable: e(i),
|
|
125
|
+
style: $(z.value),
|
|
126
|
+
tabindex: e(i) ? -1 : void 0,
|
|
127
|
+
"aria-disabled": e(i)
|
|
118
128
|
}, {
|
|
119
|
-
default:
|
|
120
|
-
e(r).name && !e(t) && !e(
|
|
129
|
+
default: M(() => [
|
|
130
|
+
e(r).name && !e(t) && !e(c) ? (s(), p(v, k({
|
|
121
131
|
key: 0,
|
|
122
132
|
name: e(r).name
|
|
123
133
|
}, {
|
|
@@ -125,46 +135,48 @@ import './style/link.css';const O = /* @__PURE__ */ E({
|
|
|
125
135
|
}, {
|
|
126
136
|
class: ["rds-e-link__icon-left", S.value],
|
|
127
137
|
style: e(l) ? { color: e(l) } : void 0
|
|
128
|
-
}), null, 16, ["name", "class", "style"])) :
|
|
129
|
-
e(t) ? (
|
|
138
|
+
}), null, 16, ["name", "class", "style"])) : d("", !0),
|
|
139
|
+
e(t) ? (s(), I("span", {
|
|
130
140
|
key: 1,
|
|
131
|
-
class: _(["rds-e-link__text", [e(
|
|
132
|
-
"rds-e-mr-xs":
|
|
141
|
+
class: _(["rds-e-link__text", [e(b), {
|
|
142
|
+
"rds-e-mr-xs": C.value,
|
|
133
143
|
"rds-e-link__text--underline": e(h)
|
|
134
144
|
}]])
|
|
135
145
|
}, [
|
|
136
|
-
|
|
137
|
-
|
|
146
|
+
D(a.$slots, "default", {}, () => [
|
|
147
|
+
R(j(e(w)), 1)
|
|
138
148
|
], !0)
|
|
139
|
-
], 2)) :
|
|
140
|
-
e(
|
|
141
|
-
name: e(t) ? "arrow_right" : "arrow_left"
|
|
149
|
+
], 2)) : d("", !0),
|
|
150
|
+
e(c) ? (s(), p(v, k({ key: 2 }, {
|
|
151
|
+
name: e(t) ? "arrow_right" : "arrow_left",
|
|
152
|
+
size: e(x) ? 16 : void 0
|
|
142
153
|
}, {
|
|
143
154
|
class: ["rds-e-arrow-link__icon--arrow", [
|
|
144
|
-
e(t) ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left"
|
|
155
|
+
e(t) ? "rds-e-arrow-link__icon--animation-right" : "rds-e-arrow-link__icon--animation-left",
|
|
156
|
+
{ "rds-flex rds-flex-center-center": e(x) }
|
|
145
157
|
]],
|
|
146
158
|
style: e(l) ? { color: e(l) } : void 0
|
|
147
|
-
}), null, 16, ["class", "style"])) :
|
|
148
|
-
e(t) ?
|
|
159
|
+
}), null, 16, ["class", "style"])) : d("", !0),
|
|
160
|
+
e(t) ? d("", !0) : (s(), I("span", {
|
|
149
161
|
key: 3,
|
|
150
|
-
class: _(["rds-e-link__text", { "rds-e-ml-xs":
|
|
162
|
+
class: _(["rds-e-link__text", { "rds-e-ml-xs": C.value }])
|
|
151
163
|
}, [
|
|
152
|
-
|
|
153
|
-
|
|
164
|
+
D(a.$slots, "default", {}, () => [
|
|
165
|
+
R(j(e(w)), 1)
|
|
154
166
|
], !0)
|
|
155
167
|
], 2)),
|
|
156
|
-
e(r).name && e(t) && !e(
|
|
168
|
+
e(r).name && e(t) && !e(c) ? (s(), p(v, k({
|
|
157
169
|
key: 4,
|
|
158
170
|
name: e(r).name
|
|
159
171
|
}, e(r), {
|
|
160
172
|
class: ["rds-e-link__icon-right", S.value],
|
|
161
173
|
style: e(l) ? { color: e(l) } : void 0
|
|
162
|
-
}), null, 16, ["name", "class", "style"])) :
|
|
174
|
+
}), null, 16, ["name", "class", "style"])) : d("", !0)
|
|
163
175
|
]),
|
|
164
176
|
_: 3
|
|
165
|
-
}, 8, ["class", "to", "href", "disable", "style"]));
|
|
177
|
+
}, 8, ["class", "to", "href", "disable", "style", "tabindex", "aria-disabled"]));
|
|
166
178
|
}
|
|
167
|
-
}),
|
|
179
|
+
}), F = /* @__PURE__ */ O(P, [["__scopeId", "data-v-377c1eda"]]);
|
|
168
180
|
export {
|
|
169
|
-
|
|
181
|
+
F as default
|
|
170
182
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as C, ref as v, computed as R, createBlock as u, createCommentVNode as d, openBlock as l, unref as n, withCtx as p, createVNode as k, withModifiers as b, normalizeStyle as g, createElementVNode as a, createElementBlock as c, renderSlot as i } from "vue";
|
|
2
2
|
import w from "./overlay.es.js";
|
|
3
3
|
import S from "./card.es.js";
|
|
4
|
-
import { R as q } from "./icon-svg-
|
|
4
|
+
import { R as q } from "./icon-svg-DuzOdbk1.js";
|
|
5
5
|
import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
import './style/modal.css';const $ = { class: "rds-e-modal__container" }, B = { class: "rds-e-modal__header" }, O = {
|
|
7
7
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as o, openBlock as c, normalizeStyle as
|
|
1
|
+
import { createElementBlock as o, openBlock as c, normalizeStyle as _, withModifiers as u, normalizeClass as m, createElementVNode as s, renderSlot as i, createCommentVNode as r, withDirectives as b, createTextVNode as g, toDisplayString as h, Fragment as S, renderList as y, vShow as f } from "vue";
|
|
2
2
|
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
import './style/multiselectcontentwrapper.css';const w = {
|
|
4
4
|
name: "MultiselectContentWrapper",
|
|
@@ -37,7 +37,10 @@ import './style/multiselectcontentwrapper.css';const w = {
|
|
|
37
37
|
showNoResults: Boolean,
|
|
38
38
|
showNoOptions: Boolean,
|
|
39
39
|
small: Boolean,
|
|
40
|
-
contentStyle:
|
|
40
|
+
contentStyle: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: () => ({})
|
|
43
|
+
},
|
|
41
44
|
customStyle: Object
|
|
42
45
|
},
|
|
43
46
|
emits: ["focus"]
|
|
@@ -53,36 +56,36 @@ function k(l, n, e, G, C, D) {
|
|
|
53
56
|
tabindex: "-1",
|
|
54
57
|
onMousedown: n[1] || (n[1] = u(() => {
|
|
55
58
|
}, ["prevent"])),
|
|
56
|
-
style:
|
|
59
|
+
style: _(e.customStyle),
|
|
57
60
|
ref: "wrapper"
|
|
58
61
|
}, [
|
|
59
|
-
|
|
62
|
+
s("ul", {
|
|
60
63
|
class: "multiselect__content",
|
|
61
|
-
style:
|
|
64
|
+
style: _(e.contentStyle),
|
|
62
65
|
role: "listbox",
|
|
63
66
|
id: "listbox-" + (e.teleported ? "teleported-" : "") + e.id,
|
|
64
67
|
"aria-multiselectable": e.multiple
|
|
65
68
|
}, [
|
|
66
69
|
i(l.$slots, "beforeList", {}, void 0, !0),
|
|
67
70
|
e.multiple && e.max === e.internalValue.length ? (c(), o("li", M, [
|
|
68
|
-
|
|
71
|
+
s("span", v, [
|
|
69
72
|
i(l.$slots, "maxElements", {}, () => [
|
|
70
73
|
g("Maximum of " + h(e.max) + " options selected. First remove a selected option to select another.", 1)
|
|
71
74
|
], !0)
|
|
72
75
|
])
|
|
73
76
|
])) : r("", !0),
|
|
74
|
-
!e.max || e.internalValue.length < e.max ? (c(!0), o(S, { key: 1 }, y(e.filteredOptions, (t,
|
|
77
|
+
!e.max || e.internalValue.length < e.max ? (c(!0), o(S, { key: 1 }, y(e.filteredOptions, (t, a) => (c(), o("li", {
|
|
75
78
|
class: "multiselect__element",
|
|
76
|
-
key:
|
|
79
|
+
key: a,
|
|
77
80
|
"aria-selected": e.isSelected(t),
|
|
78
|
-
id: e.id + "-" +
|
|
81
|
+
id: e.id + "-" + a,
|
|
79
82
|
role: t && (t.$isLabel || t.$isDisabled) ? null : "option"
|
|
80
83
|
}, [
|
|
81
84
|
t && (t.$isLabel || t.$isDisabled) ? r("", !0) : (c(), o("span", {
|
|
82
85
|
key: 0,
|
|
83
|
-
class: m([e.optionHighlight(
|
|
86
|
+
class: m([e.optionHighlight(a, t), "multiselect__option"]),
|
|
84
87
|
onClick: u((d) => e.select(t), ["stop"]),
|
|
85
|
-
onMouseenter: u((d) => e.pointerSet(
|
|
88
|
+
onMouseenter: u((d) => e.pointerSet(a), ["self"]),
|
|
86
89
|
"data-select": t && t.isTag ? e.tagPlaceholder : e.selectLabelText,
|
|
87
90
|
"data-selected": e.selectedLabelText,
|
|
88
91
|
"data-deselect": e.deselectLabelText
|
|
@@ -90,30 +93,30 @@ function k(l, n, e, G, C, D) {
|
|
|
90
93
|
i(l.$slots, "option", {
|
|
91
94
|
option: t,
|
|
92
95
|
search: e.search,
|
|
93
|
-
index:
|
|
96
|
+
index: a
|
|
94
97
|
}, () => [
|
|
95
|
-
|
|
98
|
+
s("span", null, h(e.getOptionLabel(t)), 1)
|
|
96
99
|
], !0)
|
|
97
100
|
], 42, x)),
|
|
98
101
|
t && (t.$isLabel || t.$isDisabled) ? (c(), o("span", {
|
|
99
102
|
key: 1,
|
|
100
103
|
"data-select": e.groupSelect && e.selectGroupLabelText,
|
|
101
104
|
"data-deselect": e.groupSelect && e.deselectGroupLabelText,
|
|
102
|
-
class: m([e.groupHighlight(
|
|
103
|
-
onMouseenter: u((d) => e.groupSelect && e.pointerSet(
|
|
105
|
+
class: m([e.groupHighlight(a, t), "multiselect__option"]),
|
|
106
|
+
onMouseenter: u((d) => e.groupSelect && e.pointerSet(a), ["self"]),
|
|
104
107
|
onMousedown: u((d) => e.selectGroup(t), ["prevent"])
|
|
105
108
|
}, [
|
|
106
109
|
i(l.$slots, "option", {
|
|
107
110
|
option: t,
|
|
108
111
|
search: e.search,
|
|
109
|
-
index:
|
|
112
|
+
index: a
|
|
110
113
|
}, () => [
|
|
111
|
-
|
|
114
|
+
s("span", null, h(e.getOptionLabel(t)), 1)
|
|
112
115
|
], !0)
|
|
113
116
|
], 42, B)) : r("", !0)
|
|
114
117
|
], 8, T))), 128)) : r("", !0),
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
b(s("li", null, [
|
|
119
|
+
s("span", F, [
|
|
117
120
|
i(l.$slots, "noResult", { search: e.search }, () => [
|
|
118
121
|
n[2] || (n[2] = g("No elements found. Consider changing the search query."))
|
|
119
122
|
], !0)
|
|
@@ -121,8 +124,8 @@ function k(l, n, e, G, C, D) {
|
|
|
121
124
|
], 512), [
|
|
122
125
|
[f, e.showNoResults && e.filteredOptions.length === 0 && e.search && !e.loading]
|
|
123
126
|
]),
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
b(s("li", null, [
|
|
128
|
+
s("span", N, [
|
|
126
129
|
i(l.$slots, "noOptions", {}, () => [
|
|
127
130
|
n[3] || (n[3] = g("List is empty."))
|
|
128
131
|
], !0)
|
|
@@ -134,7 +137,7 @@ function k(l, n, e, G, C, D) {
|
|
|
134
137
|
], 12, O)
|
|
135
138
|
], 38);
|
|
136
139
|
}
|
|
137
|
-
const A = /* @__PURE__ */ L(w, [["render", k], ["__scopeId", "data-v-
|
|
140
|
+
const A = /* @__PURE__ */ L(w, [["render", k], ["__scopeId", "data-v-58844ad4"]]);
|
|
138
141
|
export {
|
|
139
142
|
A as default
|
|
140
143
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/pagination.css';const
|
|
1
|
+
import { defineComponent as H, toRefs as O, ref as U, computed as u, watch as z, onBeforeMount as G, createElementBlock as g, openBlock as o, createElementVNode as m, createCommentVNode as _, createBlock as k, createVNode as P, Fragment as J, renderList as K, toDisplayString as C, unref as Q } from "vue";
|
|
2
|
+
import f from "./actionButton.es.js";
|
|
3
|
+
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/pagination.css';const X = { class: "rds-e-pagination-container rds-flex" }, Y = { class: "rds-e-pagination" }, Z = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "rds-e-pagination__item rds-e-pagination__item-elipsis"
|
|
7
|
+
}, T = {
|
|
5
8
|
key: 0,
|
|
6
9
|
class: "rds-e-pagination-leyend"
|
|
7
|
-
},
|
|
10
|
+
}, I = /* @__PURE__ */ H({
|
|
8
11
|
__name: "pagination",
|
|
9
12
|
props: {
|
|
10
13
|
/**
|
|
@@ -70,134 +73,180 @@ import './style/pagination.css';const J = { class: "rds-e-pagination-container r
|
|
|
70
73
|
disableFirstLoad: {
|
|
71
74
|
type: Boolean,
|
|
72
75
|
default: !1
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Habilita la funcionalidad de elipsis (...) para mostrar páginas ocultas.
|
|
79
|
+
* Cuando se hace click en las elipsis, se emite un evento con las páginas ocultas.
|
|
80
|
+
*/
|
|
81
|
+
enableEllipsis: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: !1
|
|
73
84
|
}
|
|
74
85
|
},
|
|
75
|
-
emits: ["pageChanged"],
|
|
76
|
-
setup(
|
|
77
|
-
const
|
|
78
|
-
itemsPerPage:
|
|
79
|
-
totalItems:
|
|
86
|
+
emits: ["pageChanged", "ellipsisClicked"],
|
|
87
|
+
setup(y, { expose: M, emit: E }) {
|
|
88
|
+
const b = y, B = E, {
|
|
89
|
+
itemsPerPage: p,
|
|
90
|
+
totalItems: t,
|
|
80
91
|
totalPages: r,
|
|
81
|
-
hideLeyend:
|
|
82
|
-
disableFirstLoad:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
|
|
92
|
+
hideLeyend: L,
|
|
93
|
+
disableFirstLoad: $,
|
|
94
|
+
enableEllipsis: S
|
|
95
|
+
} = O(b), i = U(b.currentPage), c = u(() => typeof (t == null ? void 0 : t.value) == "number" && t.value >= 0), d = u(() => c.value && typeof (t == null ? void 0 : t.value) == "number" ? t.value <= 0 || p.value <= 0 ? 1 : Math.ceil(t.value / p.value) : typeof (r == null ? void 0 : r.value) == "number" && r.value > 0 ? r.value : (typeof (r == null ? void 0 : r.value) > "u" && typeof (t == null ? void 0 : t.value) > "u" && console.warn("[RDSPagination] Props `totalItems` o `totalPages` son requeridas."), 1)), w = u(() => c.value && !L.value && typeof (t == null ? void 0 : t.value) == "number" && t.value > 0), F = u(() => !c.value || typeof (t == null ? void 0 : t.value) != "number" || t.value === 0 ? 0 : (i.value - 1) * p.value + 1), q = u(() => {
|
|
96
|
+
if (!c.value || typeof (t == null ? void 0 : t.value) != "number") return 0;
|
|
97
|
+
const e = i.value * p.value;
|
|
98
|
+
return Math.min(e, t.value);
|
|
99
|
+
}), x = u(() => i.value === 1), N = u(() => i.value === d.value), D = u(() => {
|
|
100
|
+
const e = [], a = d.value, l = i.value;
|
|
101
|
+
if (!S.value) {
|
|
102
|
+
if (a <= 3)
|
|
103
|
+
for (let n = 1; n <= a; n++)
|
|
104
|
+
e.push(n);
|
|
105
|
+
else l === 1 ? e.push(1, 2, Math.min(3, a)) : l === a ? e.push(Math.max(1, a - 2), a - 1, a) : e.push(l - 1, l, l + 1);
|
|
106
|
+
return [...new Set(e)].filter((n) => typeof n == "number" && n >= 1 && n <= a);
|
|
107
|
+
}
|
|
108
|
+
if (a <= 5) {
|
|
109
|
+
for (let n = 1; n <= a; n++)
|
|
110
|
+
e.push(n);
|
|
111
|
+
return e;
|
|
112
|
+
}
|
|
113
|
+
return e.push(1), l <= 3 ? (e.push(2, 3), a > 4 && e.push("ellipsis_end"), e.push(a)) : l >= a - 2 ? (a > 4 && e.push("ellipsis_start"), e.push(a - 2, a - 1, a)) : (e.push("ellipsis_start"), e.push(l - 1, l, l + 1), e.push("ellipsis_end"), e.push(a)), e.filter((n, s, h) => h.indexOf(n) === s);
|
|
114
|
+
}), R = (e) => {
|
|
115
|
+
const a = d.value, l = i.value, n = [];
|
|
116
|
+
if (e === "ellipsis_start")
|
|
117
|
+
for (let s = 2; s < l - 1; s++)
|
|
118
|
+
n.push(s);
|
|
119
|
+
else if (e === "ellipsis_end")
|
|
120
|
+
for (let s = l + 2; s < a; s++)
|
|
121
|
+
n.push(s);
|
|
122
|
+
return n;
|
|
123
|
+
}, j = (e) => {
|
|
124
|
+
const a = R(e);
|
|
125
|
+
B("ellipsisClicked", {
|
|
126
|
+
hiddenPages: a,
|
|
127
|
+
ellipsisType: e,
|
|
128
|
+
currentPage: i.value,
|
|
129
|
+
totalPages: d.value
|
|
130
|
+
});
|
|
131
|
+
}, V = (e) => {
|
|
132
|
+
let a = i.value;
|
|
133
|
+
const l = d.value;
|
|
134
|
+
if ("navigator" in e)
|
|
135
|
+
switch (e.navigator) {
|
|
99
136
|
case "next":
|
|
100
|
-
|
|
137
|
+
i.value < l && (a = i.value + 1);
|
|
101
138
|
break;
|
|
102
139
|
case "prev":
|
|
103
|
-
|
|
140
|
+
i.value > 1 && (a = i.value - 1);
|
|
104
141
|
break;
|
|
105
142
|
case "first":
|
|
106
|
-
|
|
143
|
+
i.value !== 1 && (a = 1);
|
|
107
144
|
break;
|
|
108
145
|
case "last":
|
|
109
|
-
|
|
146
|
+
i.value !== l && (a = l);
|
|
110
147
|
break;
|
|
111
148
|
}
|
|
112
|
-
else "page" in
|
|
113
|
-
return a !==
|
|
114
|
-
},
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
let
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
...
|
|
121
|
-
page:
|
|
122
|
-
offset:
|
|
123
|
-
limit:
|
|
124
|
-
end:
|
|
149
|
+
else "page" in e && typeof e.page == "number" && e.page >= 1 && e.page <= l && e.page !== i.value && (a = e.page);
|
|
150
|
+
return a !== i.value ? (i.value = a, !0) : !1;
|
|
151
|
+
}, v = (e, a = !1) => {
|
|
152
|
+
if (V(e) || a) {
|
|
153
|
+
const n = p.value, s = (i.value - 1) * n;
|
|
154
|
+
let h = s + n;
|
|
155
|
+
c.value && typeof (t == null ? void 0 : t.value) == "number" && (h = Math.min(s + n, t.value));
|
|
156
|
+
const A = {
|
|
157
|
+
...e,
|
|
158
|
+
page: i.value,
|
|
159
|
+
offset: s,
|
|
160
|
+
limit: n,
|
|
161
|
+
end: h,
|
|
125
162
|
reset: a || void 0
|
|
126
163
|
};
|
|
127
|
-
|
|
164
|
+
B("pageChanged", A);
|
|
128
165
|
}
|
|
129
166
|
};
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
}),
|
|
167
|
+
return z(() => b.currentPage, (e) => {
|
|
168
|
+
e !== i.value && e >= 1 && e <= d.value && (i.value = e);
|
|
169
|
+
}), G(() => {
|
|
170
|
+
$.value || v({ navigator: "first", page: 1 });
|
|
171
|
+
}), M({
|
|
133
172
|
/** Resetea la paginación a la primera página y emite el evento pageChanged. */
|
|
134
173
|
resetPagination: () => {
|
|
135
|
-
|
|
174
|
+
i.value !== 1 && v({ page: 1 }, !0);
|
|
136
175
|
}
|
|
137
|
-
}), (
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
176
|
+
}), (e, a) => (o(), g("div", X, [
|
|
177
|
+
m("ul", Y, [
|
|
178
|
+
m("li", null, [
|
|
179
|
+
y.jumpTo ? (o(), k(f, {
|
|
141
180
|
key: 0,
|
|
142
181
|
class: "rds-e-pagination__actionBtn",
|
|
143
182
|
variant: "ghost",
|
|
144
183
|
small: "",
|
|
145
184
|
icon: "back",
|
|
146
185
|
"aria-label": "First Page",
|
|
147
|
-
disabled:
|
|
148
|
-
onClick: a[0] || (a[0] = (
|
|
149
|
-
}, null, 8, ["disabled"])) :
|
|
186
|
+
disabled: x.value,
|
|
187
|
+
onClick: a[0] || (a[0] = (l) => v({ navigator: "first" }))
|
|
188
|
+
}, null, 8, ["disabled"])) : _("", !0)
|
|
150
189
|
]),
|
|
151
|
-
|
|
152
|
-
P(
|
|
190
|
+
m("li", null, [
|
|
191
|
+
P(f, {
|
|
153
192
|
class: "rds-e-pagination__actionBtn",
|
|
154
193
|
variant: "ghost",
|
|
155
194
|
small: "",
|
|
156
195
|
icon: "arrow_left",
|
|
157
196
|
"aria-label": "Prev page",
|
|
158
|
-
disabled:
|
|
159
|
-
onClick: a[1] || (a[1] = (
|
|
197
|
+
disabled: x.value,
|
|
198
|
+
onClick: a[1] || (a[1] = (l) => v({ navigator: "prev" }))
|
|
160
199
|
}, null, 8, ["disabled"])
|
|
161
200
|
]),
|
|
162
|
-
(o(!0), g(
|
|
163
|
-
|
|
201
|
+
(o(!0), g(J, null, K(D.value, (l) => (o(), g("li", { key: l }, [
|
|
202
|
+
typeof l == "string" && l.includes("ellipsis") ? (o(), g("div", Z, [
|
|
203
|
+
P(f, {
|
|
204
|
+
variant: "ghost",
|
|
205
|
+
small: "",
|
|
206
|
+
text: "...",
|
|
207
|
+
icon: "",
|
|
208
|
+
"aria-label": "Más páginas",
|
|
209
|
+
onClick: (n) => j(l)
|
|
210
|
+
}, null, 8, ["onClick"])
|
|
211
|
+
])) : (o(), k(f, {
|
|
212
|
+
key: 1,
|
|
164
213
|
class: "rds-e-pagination__item",
|
|
165
|
-
variant:
|
|
214
|
+
variant: l === i.value && b.selected ? "primary" : "ghost",
|
|
166
215
|
small: "",
|
|
167
|
-
text: String(
|
|
216
|
+
text: String(l),
|
|
168
217
|
icon: "",
|
|
169
|
-
"aria-label": `page number ${
|
|
170
|
-
onClick: (
|
|
171
|
-
}, null, 8, ["variant", "text", "aria-label", "onClick"])
|
|
218
|
+
"aria-label": `page number ${l}`,
|
|
219
|
+
onClick: (n) => v({ page: l })
|
|
220
|
+
}, null, 8, ["variant", "text", "aria-label", "onClick"]))
|
|
172
221
|
]))), 128)),
|
|
173
|
-
|
|
174
|
-
P(
|
|
222
|
+
m("li", null, [
|
|
223
|
+
P(f, {
|
|
175
224
|
class: "rds-e-pagination__actionBtn",
|
|
176
225
|
variant: "ghost",
|
|
177
226
|
icon: "arrow_right",
|
|
178
227
|
small: "",
|
|
179
228
|
"aria-label": "next page",
|
|
180
|
-
disabled:
|
|
181
|
-
onClick: a[2] || (a[2] = (
|
|
229
|
+
disabled: N.value,
|
|
230
|
+
onClick: a[2] || (a[2] = (l) => v({ navigator: "next" }))
|
|
182
231
|
}, null, 8, ["disabled"])
|
|
183
232
|
]),
|
|
184
|
-
|
|
185
|
-
|
|
233
|
+
m("li", null, [
|
|
234
|
+
y.jumpTo ? (o(), k(f, {
|
|
186
235
|
key: 0,
|
|
187
236
|
class: "rds-e-pagination__actionBtn",
|
|
188
237
|
variant: "ghost",
|
|
189
238
|
small: "",
|
|
190
239
|
icon: "last",
|
|
191
240
|
"aria-label": "last page",
|
|
192
|
-
disabled:
|
|
193
|
-
onClick: a[3] || (a[3] = (
|
|
194
|
-
}, null, 8, ["disabled"])) :
|
|
241
|
+
disabled: N.value,
|
|
242
|
+
onClick: a[3] || (a[3] = (l) => v({ navigator: "last" }))
|
|
243
|
+
}, null, 8, ["disabled"])) : _("", !0)
|
|
195
244
|
])
|
|
196
245
|
]),
|
|
197
|
-
|
|
246
|
+
w.value ? (o(), g("p", T, " Mostrando resultados " + C(F.value) + "-" + C(q.value) + " de " + C(Q(t)), 1)) : _("", !0)
|
|
198
247
|
]));
|
|
199
248
|
}
|
|
200
|
-
}),
|
|
249
|
+
}), te = /* @__PURE__ */ W(I, [["__scopeId", "data-v-7bb8233b"]]);
|
|
201
250
|
export {
|
|
202
|
-
|
|
251
|
+
te as default
|
|
203
252
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, toRefs as y, computed as g, createElementBlock as t, openBlock as s, normalizeClass as h, createElementVNode as i, createCommentVNode as o, createVNode as a, toDisplayString as c, renderSlot as l } from "vue";
|
|
2
|
-
import { R as d } from "./icon-svg-
|
|
2
|
+
import { R as d } from "./icon-svg-DuzOdbk1.js";
|
|
3
3
|
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/persistentToast.css';const $ = { class: "alert" }, S = {
|
|
5
5
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as y, computed as r, createElementBlock as o, openBlock as a, normalizeClass as i, createCommentVNode as n, createElementVNode as t, renderSlot as m, normalizeProps as g, mergeProps as B, createVNode as S, createTextVNode as k, guardReactiveProps as h, toDisplayString as p, normalizeStyle as x } from "vue";
|
|
2
|
-
import { R as C } from "./icon-svg-
|
|
2
|
+
import { R as C } from "./icon-svg-DuzOdbk1.js";
|
|
3
3
|
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import './style/progressBar.css';const w = {
|
|
5
5
|
key: 0,
|