energy-components 1.6.0 → 1.8.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/accordion.es.js +13 -13
- package/dist/components/accordionGroup.es.js +2 -2
- package/dist/components/actionButton.es.js +2 -2
- package/dist/components/breadcrumbs.es.js +3 -3
- package/dist/components/button.es.js +17 -17
- package/dist/components/card.es.js +5 -5
- package/dist/components/checkbox.es.js +5 -5
- package/dist/components/datepicker.es.js +588 -590
- package/dist/components/divider.es.js +2 -2
- package/dist/components/dragAndDrop.es.js +187 -0
- package/dist/components/dropdown.es.js +92 -92
- package/dist/components/filterChip.es.js +2 -2
- package/dist/components/floatingActionButton.es.js +2 -2
- package/dist/components/{icon-svg-DGp2yHJn.js → icon-svg-_WCkLP8-.js} +36 -71
- package/dist/components/iconList.es.js +4 -4
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +81 -75
- package/dist/components/indicator.es.js +6 -6
- package/dist/components/infoBox.es.js +16 -16
- package/dist/components/link.es.js +2 -2
- package/dist/components/modal.es.js +26 -26
- package/dist/components/multiselect.es.js +5 -5
- package/dist/components/multiselectcontentwrapper.es.js +6 -6
- package/dist/components/overlay.es.js +3 -3
- package/dist/components/pagination.es.js +32 -21
- package/dist/components/persistentToast.es.js +12 -12
- package/dist/components/progressBar.es.js +86 -0
- package/dist/components/quantitySelector.es.js +9 -9
- package/dist/components/{radio-group.vue_vue_type_script_setup_true_lang-B-kg-575.js → radio-group.vue_vue_type_script_setup_true_lang-DpguLlRK.js} +2 -2
- package/dist/components/radioButton.es.js +4 -4
- package/dist/components/radioGroup.es.js +1 -1
- package/dist/components/selectionChip.es.js +3 -3
- package/dist/components/sidebar.es.js +13 -13
- package/dist/components/sidedrawer.es.js +41 -29
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/dragAndDrop.css +1 -0
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/icon-svg.css +1 -1
- package/dist/components/style/pagination.css +1 -1
- package/dist/components/style/progressBar.css +1 -0
- package/dist/components/style/sidedrawer.css +1 -1
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/tabBar.css +1 -1
- package/dist/components/style/tablepaginatedcomponent.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/tooltip.css +1 -1
- package/dist/components/switch.es.js +45 -38
- package/dist/components/tabBar.es.js +72 -55
- package/dist/components/tablepaginatedcomponent.es.js +42 -40
- package/dist/components/tableslotedcomponent.es.js +26 -26
- package/dist/components/tag.es.js +2 -2
- package/dist/components/textArea.es.js +2 -2
- package/dist/components/textField.es.js +30 -30
- package/dist/components/toggle.es.js +2 -2
- package/dist/components/tooltip.es.js +337 -325
- package/dist/energy-components.es.js +5062 -4776
- package/dist/energy-components.umd.js +2 -1
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +1 -1
- package/dist/types/src/components/buttons/button/button.vue.d.ts +8 -13
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +1 -1
- package/dist/types/src/components/content/accordion/accordion.vue.d.ts +6 -17
- package/dist/types/src/components/content/acordion-group/accordion-group.vue.d.ts +6 -11
- package/dist/types/src/components/content/card/card.vue.d.ts +6 -11
- package/dist/types/src/components/content/divider/divider.vue.d.ts +1 -1
- package/dist/types/src/components/content/table/table-paginated/TablePaginatedComponent.vue.d.ts +88 -0
- package/dist/types/src/components/content/table/table-sloted/TableSlotedComponent.vue.d.ts +32 -31
- package/dist/types/src/components/content/tag/tag.vue.d.ts +1 -1
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +1 -4
- package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +8 -18
- package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +8 -12
- package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +101 -0
- package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +20 -1
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +6 -11
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +258 -0
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +203 -0
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +30 -550
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +3 -5
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +2 -5
- package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +1 -1
- package/dist/types/src/components/input/radio-button/radio-group.vue.d.ts +6 -11
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +3 -5
- package/dist/types/src/components/input/switch/switch.vue.d.ts +24 -21
- package/dist/types/src/components/input/text-area/text-area.vue.d.ts +12 -15
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +12 -19
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +1 -1
- package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +10 -17
- package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +23 -16
- package/dist/types/src/components/navigation/link/link.vue.d.ts +7 -11
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +18 -1
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +24 -18
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +10 -141
- package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +5 -10
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +8 -19
- package/dist/types/src/helpers/mobileMockup.vue.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as
|
|
3
|
-
import { _ as
|
|
4
|
-
import './style/switch.css';const N = ["id", "disabled", "checked"],
|
|
1
|
+
import { defineComponent as p, ref as r, computed as y, onMounted as g, onBeforeUnmount as S, createElementBlock as u, openBlock as d, normalizeClass as V, createElementVNode as m, createCommentVNode as h, renderSlot as B, createBlock as _, createTextVNode as C, toDisplayString as x } from "vue";
|
|
2
|
+
import { R as E } from "./icon-svg-_WCkLP8-.js";
|
|
3
|
+
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './style/switch.css';const N = ["id", "disabled", "checked"], L = ["for", "aria-label"], I = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "rds-e-switch__label-text"
|
|
7
|
-
},
|
|
7
|
+
}, R = /* @__PURE__ */ p({
|
|
8
8
|
__name: "switch",
|
|
9
|
-
props:
|
|
9
|
+
props: {
|
|
10
10
|
/**
|
|
11
11
|
* ID del interruptor
|
|
12
12
|
*/
|
|
@@ -35,6 +35,13 @@ import './style/switch.css';const N = ["id", "disabled", "checked"], D = ["for",
|
|
|
35
35
|
type: Boolean,
|
|
36
36
|
default: !1
|
|
37
37
|
},
|
|
38
|
+
/**
|
|
39
|
+
* v-model valor de entrada y salida
|
|
40
|
+
*/
|
|
41
|
+
modelValue: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: void 0
|
|
44
|
+
},
|
|
38
45
|
/**
|
|
39
46
|
* Si el interruptor está marcado o no
|
|
40
47
|
*/
|
|
@@ -42,59 +49,59 @@ import './style/switch.css';const N = ["id", "disabled", "checked"], D = ["for",
|
|
|
42
49
|
type: Boolean,
|
|
43
50
|
default: !1
|
|
44
51
|
}
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
o.value && (l.value = !0);
|
|
53
|
-
}, v = () => l.value = !1, s = (t) => {
|
|
54
|
-
t.key === "Tab" && (o.value = !0);
|
|
52
|
+
},
|
|
53
|
+
emits: ["update:modelValue", "update:checked"],
|
|
54
|
+
setup(e, { emit: f }) {
|
|
55
|
+
const t = e, s = f, a = r(!1), l = r(!1), w = y(() => t.modelValue !== void 0 ? t.modelValue : t.checked), v = () => {
|
|
56
|
+
l.value && (a.value = !0);
|
|
57
|
+
}, b = () => a.value = !1, c = (o) => {
|
|
58
|
+
o.key === "Tab" && (l.value = !0);
|
|
55
59
|
}, i = () => {
|
|
56
|
-
|
|
57
|
-
}, k = (
|
|
58
|
-
const n =
|
|
59
|
-
|
|
60
|
+
l.value = !1;
|
|
61
|
+
}, k = (o) => {
|
|
62
|
+
const n = o.target.checked;
|
|
63
|
+
s("update:modelValue", n), s("update:checked", n);
|
|
60
64
|
};
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
return g(() => {
|
|
66
|
+
t.modelValue !== void 0 && t.checked !== !1 && console.warn(
|
|
67
|
+
`[RDSSwitch] Warning: Avoid using both 'v-model' (or ':modelValue') and ':checked' props simultaneously on the same component instance (id: ${t.id}).
|
|
68
|
+
'v-model'/'modelValue' will always take precedence.`
|
|
69
|
+
), window.addEventListener("keydown", c), window.addEventListener("mousedown", i);
|
|
70
|
+
}), S(() => {
|
|
71
|
+
window.removeEventListener("keydown", c), window.removeEventListener("mousedown", i);
|
|
72
|
+
}), (o, n) => (d(), u("div", {
|
|
73
|
+
class: V(["rds-e-switch", { "rds-e-switch--focused": a.value }])
|
|
67
74
|
}, [
|
|
68
75
|
m("input", {
|
|
69
76
|
id: e.id.toString(),
|
|
70
77
|
class: "rds-e-switch__input",
|
|
71
78
|
type: "checkbox",
|
|
72
79
|
disabled: e.disabled,
|
|
73
|
-
checked:
|
|
80
|
+
checked: w.value,
|
|
74
81
|
onChange: k,
|
|
75
|
-
onFocus:
|
|
76
|
-
onBlur:
|
|
82
|
+
onFocus: v,
|
|
83
|
+
onBlur: b
|
|
77
84
|
}, null, 40, N),
|
|
78
85
|
m("label", {
|
|
79
86
|
class: "rds-e-switch__label",
|
|
80
87
|
for: e.id.toString(),
|
|
81
88
|
"aria-label": e.label
|
|
82
89
|
}, [
|
|
83
|
-
e.label ||
|
|
84
|
-
|
|
85
|
-
x(
|
|
90
|
+
e.label || o.$slots["text-label"] ? (d(), u("span", I, [
|
|
91
|
+
B(o.$slots, "text-label", {}, () => [
|
|
92
|
+
C(x(e.label), 1)
|
|
86
93
|
], !0),
|
|
87
|
-
e.icon ? (d(), _(
|
|
94
|
+
e.icon ? (d(), _(E, {
|
|
88
95
|
key: 0,
|
|
89
96
|
name: e.icon,
|
|
90
97
|
class: "rds-e-switch__label-icon",
|
|
91
98
|
"aria-hidden": "true"
|
|
92
|
-
}, null, 8, ["name"])) :
|
|
93
|
-
])) :
|
|
94
|
-
], 8,
|
|
99
|
+
}, null, 8, ["name"])) : h("", !0)
|
|
100
|
+
])) : h("", !0)
|
|
101
|
+
], 8, L)
|
|
95
102
|
], 2));
|
|
96
103
|
}
|
|
97
|
-
}),
|
|
104
|
+
}), M = /* @__PURE__ */ D(R, [["__scopeId", "data-v-16659a57"]]);
|
|
98
105
|
export {
|
|
99
|
-
|
|
106
|
+
M as default
|
|
100
107
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { R as w } from "./icon-svg-
|
|
1
|
+
import { defineComponent as E, mergeModels as C, toRefs as N, useModel as W, ref as _, computed as h, onMounted as $, nextTick as K, onUnmounted as F, watch as L, createElementBlock as d, openBlock as s, normalizeClass as c, createCommentVNode as g, createElementVNode as v, createVNode as R, Fragment as P, renderList as q, unref as H, withKeys as S, withModifiers as A, createBlock as O, createTextVNode as U, toDisplayString as j, renderSlot as G } from "vue";
|
|
2
|
+
import { R as w } from "./icon-svg-_WCkLP8-.js";
|
|
3
3
|
import { d as J } from "./functions-DIHwdgF0.js";
|
|
4
4
|
import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "onKeydown"], Y = { class: "rds-e-top-bar__item-title" }, Z = {
|
|
6
6
|
class: "rds-e-top-bar__content",
|
|
7
7
|
role: "tabpanel"
|
|
8
|
-
}, ee = /* @__PURE__ */
|
|
8
|
+
}, ee = /* @__PURE__ */ E({
|
|
9
9
|
__name: "tab-bar",
|
|
10
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ C({
|
|
11
11
|
/**
|
|
12
12
|
* Pestaña activa
|
|
13
13
|
*/
|
|
@@ -36,6 +36,13 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
36
36
|
type: Boolean,
|
|
37
37
|
default: !1
|
|
38
38
|
},
|
|
39
|
+
/**
|
|
40
|
+
* <span>Indica si el Tab-bar es inverso</span>
|
|
41
|
+
*/
|
|
42
|
+
inverse: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
39
46
|
/**
|
|
40
47
|
* Si es `true`, se mostrara un divider entre el top-bar y el contenido.
|
|
41
48
|
*/
|
|
@@ -49,8 +56,8 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
49
56
|
*/
|
|
50
57
|
beforeTabChange: {
|
|
51
58
|
type: Function,
|
|
52
|
-
default: (
|
|
53
|
-
if (
|
|
59
|
+
default: (r, f) => {
|
|
60
|
+
if (r === f.id) return Promise.resolve(!0);
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
}, {
|
|
@@ -60,92 +67,102 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
60
67
|
},
|
|
61
68
|
activeTabModifiers: {}
|
|
62
69
|
}),
|
|
63
|
-
emits: /* @__PURE__ */
|
|
64
|
-
setup(
|
|
65
|
-
const i =
|
|
66
|
-
options:
|
|
67
|
-
} =
|
|
70
|
+
emits: /* @__PURE__ */ C(["activeTabChanged"], ["update:activeTab"]),
|
|
71
|
+
setup(r, { emit: f }) {
|
|
72
|
+
const i = r, V = f, {
|
|
73
|
+
options: o
|
|
74
|
+
} = N(i), M = W(r, "activeTab"), a = _(""), b = _(null), l = _(null);
|
|
68
75
|
let p = [];
|
|
69
|
-
const y = h(() => l.value ? l.value.scrollWidth > l.value.clientWidth : !1), z = h(() =>
|
|
76
|
+
const y = h(() => l.value ? l.value.scrollWidth > l.value.clientWidth : !1), z = h(() => o.value.findIndex((t) => t.id === a.value) > 0 && y.value), D = h(() => l.value ? o.value.findIndex((t) => t.id === a.value) < i.options.length - 1 && y.value : !1), k = (e) => {
|
|
70
77
|
const t = i.options.find((n) => n.id === a.value);
|
|
71
78
|
return e ? t : t == null ? void 0 : t.id;
|
|
72
|
-
},
|
|
73
|
-
const t =
|
|
79
|
+
}, u = async (e) => {
|
|
80
|
+
const t = o.value.find((m) => m.id === e);
|
|
74
81
|
return t ? await i.beforeTabChange(e, t) ? (a.value = e, !0) : !1 : (console.error(`[RDSTabBar]: Tab with id ${e} not found`), !1);
|
|
75
|
-
},
|
|
76
|
-
let e =
|
|
77
|
-
for (; e > 0 && (e--, !await
|
|
82
|
+
}, T = async () => {
|
|
83
|
+
let e = o.value.findIndex((t) => t.id === a.value);
|
|
84
|
+
for (; e > 0 && (e--, !await u(o.value[e].id)); )
|
|
78
85
|
;
|
|
79
|
-
},
|
|
80
|
-
let e =
|
|
81
|
-
for (; e < i.options.length - 1 && (e++, !await
|
|
86
|
+
}, x = async () => {
|
|
87
|
+
let e = o.value.findIndex((t) => t.id === a.value);
|
|
88
|
+
for (; e < i.options.length - 1 && (e++, !await u(o.value[e].id)); )
|
|
82
89
|
;
|
|
83
90
|
};
|
|
84
|
-
function
|
|
85
|
-
const t =
|
|
91
|
+
function I(e) {
|
|
92
|
+
const t = o.value.findIndex((n) => n.id === e);
|
|
86
93
|
p[t] && p[t].scrollIntoView({
|
|
87
94
|
behavior: "smooth",
|
|
88
95
|
block: "nearest",
|
|
89
96
|
inline: "start"
|
|
90
97
|
});
|
|
91
98
|
}
|
|
92
|
-
const
|
|
93
|
-
|
|
99
|
+
const B = () => {
|
|
100
|
+
I(a.value);
|
|
94
101
|
};
|
|
95
|
-
return
|
|
96
|
-
await
|
|
102
|
+
return $(async () => {
|
|
103
|
+
if (await K(), b.value && (p = Array.from(
|
|
97
104
|
b.value.children
|
|
98
|
-
)),
|
|
105
|
+
)), i.activeTab) {
|
|
106
|
+
const e = o.value.find((t) => t.id === i.activeTab);
|
|
107
|
+
e ? a.value = e.id : (console.error(`[RDSTabBar]: Tab with id ${i.activeTab} not found. Picking the first tab instead.`), a.value = i.options[0].id ?? "");
|
|
108
|
+
} else
|
|
109
|
+
a.value = i.options[0].id ?? "";
|
|
110
|
+
window.addEventListener("resize", J(B, 200));
|
|
99
111
|
}), F(() => {
|
|
100
|
-
window.removeEventListener("resize",
|
|
112
|
+
window.removeEventListener("resize", B);
|
|
101
113
|
}), L(a, (e) => {
|
|
102
|
-
|
|
103
|
-
}), L(M, (e) =>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
114
|
+
I(e), V("activeTabChanged", k(!1));
|
|
115
|
+
}), L(M, (e) => {
|
|
116
|
+
u(e);
|
|
117
|
+
}, { immediate: !0 }), (e, t) => (s(), d("div", {
|
|
118
|
+
class: c(["rds-e-top-bar", {
|
|
119
|
+
"rds-e-top-bar--fluid": r.fluid,
|
|
120
|
+
"rds-e-top-bar--divider": r.divider,
|
|
121
|
+
"rds-e-top-bar--inverse": r.inverse
|
|
107
122
|
}])
|
|
108
123
|
}, [
|
|
109
124
|
z.value ? (s(), d("div", {
|
|
110
125
|
key: 0,
|
|
111
|
-
class:
|
|
126
|
+
class: c([
|
|
112
127
|
"rds-e-top-bar__button",
|
|
113
|
-
|
|
128
|
+
r.backgroundAlternative ? "rds-e-top-bar__button--left-bg2" : "rds-e-top-bar__button--left"
|
|
114
129
|
]),
|
|
115
|
-
onClick:
|
|
130
|
+
onClick: T
|
|
116
131
|
}, [
|
|
117
132
|
R(w, {
|
|
118
133
|
class: "rds-e-top-bar__icon",
|
|
119
134
|
name: "arrow_left"
|
|
120
135
|
})
|
|
121
136
|
], 2)) : g("", !0),
|
|
122
|
-
|
|
137
|
+
v("div", {
|
|
123
138
|
ref_key: "tabsListWrapper",
|
|
124
139
|
ref: l,
|
|
125
140
|
class: "rds-e-top-bar__wrapper"
|
|
126
141
|
}, [
|
|
127
|
-
|
|
142
|
+
v("ul", {
|
|
128
143
|
ref_key: "tabsList",
|
|
129
144
|
ref: b,
|
|
130
|
-
class: "rds-e-top-bar__list",
|
|
145
|
+
class: c(["rds-e-top-bar__list", {
|
|
146
|
+
"rds-e-top-bar__list-inverse": r.inverse
|
|
147
|
+
}]),
|
|
131
148
|
role: "tablist"
|
|
132
149
|
}, [
|
|
133
|
-
(s(!0), d(
|
|
134
|
-
key:
|
|
135
|
-
class:
|
|
150
|
+
(s(!0), d(P, null, q(H(o), (n, m) => (s(), d("li", {
|
|
151
|
+
key: m,
|
|
152
|
+
class: c(["rds-e-top-bar__item", {
|
|
136
153
|
active: a.value === n.id
|
|
137
154
|
}]),
|
|
138
155
|
role: "tab",
|
|
139
156
|
"aria-selected": a.value === n.id,
|
|
140
157
|
tabindex: a.value === n.id ? 0 : -1,
|
|
141
|
-
onClick: (te) =>
|
|
158
|
+
onClick: (te) => u(n.id),
|
|
142
159
|
onKeydown: [
|
|
143
|
-
S(
|
|
144
|
-
S(
|
|
160
|
+
S(A(T, ["prevent"]), ["left"]),
|
|
161
|
+
S(A(x, ["prevent"]), ["right"])
|
|
145
162
|
]
|
|
146
163
|
}, [
|
|
147
|
-
|
|
148
|
-
n.icon ? (s(),
|
|
164
|
+
v("span", Y, [
|
|
165
|
+
n.icon ? (s(), O(w, {
|
|
149
166
|
key: 0,
|
|
150
167
|
class: "rds-e-top-bar__item-title--icon",
|
|
151
168
|
name: n.icon
|
|
@@ -153,29 +170,29 @@ import './style/tabBar.css';const X = ["aria-selected", "tabindex", "onClick", "
|
|
|
153
170
|
U(" " + j(n.title), 1)
|
|
154
171
|
])
|
|
155
172
|
], 42, X))), 128))
|
|
156
|
-
],
|
|
173
|
+
], 2)
|
|
157
174
|
], 512),
|
|
158
|
-
|
|
175
|
+
D.value ? (s(), d("div", {
|
|
159
176
|
key: 1,
|
|
160
|
-
class:
|
|
177
|
+
class: c([
|
|
161
178
|
"rds-e-top-bar__button",
|
|
162
|
-
|
|
179
|
+
r.backgroundAlternative ? "rds-e-top-bar__button--right-bg2" : "rds-e-top-bar__button--right"
|
|
163
180
|
]),
|
|
164
|
-
onClick:
|
|
181
|
+
onClick: x
|
|
165
182
|
}, [
|
|
166
183
|
R(w, {
|
|
167
184
|
class: "rds-e-top-bar__icon",
|
|
168
185
|
name: "arrow_right"
|
|
169
186
|
})
|
|
170
187
|
], 2)) : g("", !0),
|
|
171
|
-
|
|
188
|
+
v("div", Z, [
|
|
172
189
|
G(e.$slots, a.value, {
|
|
173
190
|
tab: k(!0)
|
|
174
191
|
}, void 0, !0)
|
|
175
192
|
])
|
|
176
193
|
], 2));
|
|
177
194
|
}
|
|
178
|
-
}),
|
|
195
|
+
}), oe = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-1fc895db"]]);
|
|
179
196
|
export {
|
|
180
|
-
|
|
197
|
+
oe as default
|
|
181
198
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, toRefs as
|
|
1
|
+
import { defineComponent as H, toRefs as F, ref as i, watch as M, watchEffect as N, createElementBlock as v, openBlock as u, createBlock as V, withDirectives as K, Fragment as z, renderList as g, unref as k, renderSlot as h, mergeProps as q, createSlots as S, withCtx as B, normalizeProps as C, guardReactiveProps as w, 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";
|
|
@@ -26,23 +26,24 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
26
26
|
showSelectAll: { type: Boolean, default: !0 },
|
|
27
27
|
showEmptyState: { type: Boolean, default: !0 },
|
|
28
28
|
asynchrone: { type: Boolean, default: !0 },
|
|
29
|
-
jumpTo: { type: Boolean, default: !1 }
|
|
29
|
+
jumpTo: { type: Boolean, default: !1 },
|
|
30
|
+
disableFirstLoad: { type: Boolean }
|
|
30
31
|
},
|
|
31
32
|
emits: ["update:options", "update:reset", "update:selection", "update:selectedAll", "update:sort", "onItemExpansion"],
|
|
32
33
|
setup(A, { expose: E, emit: _ }) {
|
|
33
34
|
const t = A, s = _, {
|
|
34
35
|
loading: I,
|
|
35
36
|
items: d,
|
|
36
|
-
selectableKey:
|
|
37
|
-
header:
|
|
37
|
+
selectableKey: L,
|
|
38
|
+
header: $,
|
|
38
39
|
asynchrone: P
|
|
39
|
-
} =
|
|
40
|
+
} = F(t), c = i(), p = i([]), n = i([]), b = i({
|
|
40
41
|
item: {
|
|
41
|
-
header:
|
|
42
|
+
header: $,
|
|
42
43
|
items: p
|
|
43
44
|
},
|
|
44
|
-
selectableKey:
|
|
45
|
-
listChecked:
|
|
45
|
+
selectableKey: L,
|
|
46
|
+
listChecked: n,
|
|
46
47
|
checkedAll: t.checkedAll,
|
|
47
48
|
initChecked: [],
|
|
48
49
|
variant: t.variant,
|
|
@@ -52,68 +53,68 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
52
53
|
hideSelectAll: t.hideSelectAll,
|
|
53
54
|
showEmptyState: t.showEmptyState,
|
|
54
55
|
mockItems: t.itemsPerPage[0]
|
|
55
|
-
}),
|
|
56
|
+
}), y = i(null), m = i(1), r = i(), D = () => {
|
|
56
57
|
p.value = [], m.value = 1, r.value = void 0, s("update:reset");
|
|
57
|
-
},
|
|
58
|
+
}, O = () => {
|
|
58
59
|
p.value = d.value;
|
|
59
|
-
},
|
|
60
|
+
}, T = (e) => {
|
|
60
61
|
const a = {};
|
|
61
62
|
if ("pagination" in e) {
|
|
62
|
-
const
|
|
63
|
-
|
|
63
|
+
const o = e.pagination;
|
|
64
|
+
o.reset && D();
|
|
64
65
|
let l = !1;
|
|
65
|
-
r.value =
|
|
66
|
+
r.value = o, (o.page ?? 0) > m.value && (m.value = o.page ?? 0, l = !0), r.value && (r.value.isNewPage = l);
|
|
66
67
|
}
|
|
67
68
|
r.value && Object.assign(a, r.value), c.value && c.value.clearVisibleDetails(), s("update:options", a);
|
|
68
|
-
},
|
|
69
|
-
const a =
|
|
70
|
-
a > -1 ?
|
|
71
|
-
},
|
|
69
|
+
}, j = (e) => {
|
|
70
|
+
const a = n.value.indexOf(e);
|
|
71
|
+
a > -1 ? n.value.splice(a, 1) : n.value.push(e), s("update:selection", n.value);
|
|
72
|
+
}, x = () => {
|
|
72
73
|
var e;
|
|
73
|
-
(e =
|
|
74
|
+
(e = y.value) == null || e.resetPagination();
|
|
74
75
|
}, R = (e) => {
|
|
75
|
-
e && (
|
|
76
|
+
e && (n.value = []), b.value.checkedAll = e, s("update:selectedAll", e);
|
|
76
77
|
};
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
}, { deep: !0 }),
|
|
78
|
+
return n.value = [...t.initChecked], P.value || (p.value = d.value), M(d, () => {
|
|
79
|
+
O();
|
|
80
|
+
}, { deep: !0 }), N(() => {
|
|
80
81
|
if (!P.value && d.value.length >= 0) {
|
|
81
82
|
const e = (t.activePage - 1) * t.itemsPerPage[0], a = e + t.itemsPerPage[0];
|
|
82
83
|
p.value = d.value.slice(e, a);
|
|
83
84
|
}
|
|
84
85
|
}), E({
|
|
85
86
|
/** Fuerza a refrescar la paginacion y la tabla */
|
|
86
|
-
$reset:
|
|
87
|
-
}), (e, a) => (u(),
|
|
88
|
-
e.$slots.mobile && e.isMobileDevice ? (u(!0),
|
|
87
|
+
$reset: x
|
|
88
|
+
}), (e, a) => (u(), v("div", X, [
|
|
89
|
+
e.$slots.mobile && e.isMobileDevice ? (u(!0), v(z, { key: 0 }, g(k(d), (o, l) => (u(), v("div", {
|
|
89
90
|
key: `mobile-${l}`,
|
|
90
91
|
class: "table_paginted__mobile_item"
|
|
91
92
|
}, [
|
|
92
|
-
h(e.$slots, "mobile", { item:
|
|
93
|
-
]))), 128)) : (u(),
|
|
93
|
+
h(e.$slots, "mobile", { item: o }, void 0, !0)
|
|
94
|
+
]))), 128)) : (u(), V(Q, q({
|
|
94
95
|
key: 1,
|
|
95
96
|
ref_key: "tableSloted",
|
|
96
97
|
ref: c,
|
|
97
98
|
class: "mb-5"
|
|
98
|
-
},
|
|
99
|
+
}, b.value, {
|
|
99
100
|
loading: k(I),
|
|
100
101
|
"is-mobile-device": e.isMobileDevice,
|
|
101
102
|
"items-expanded": e.itemsExpanded,
|
|
102
|
-
onOnClickCheckbox:
|
|
103
|
+
onOnClickCheckbox: j,
|
|
103
104
|
onSelectAll: R,
|
|
104
|
-
onOnItemExpansion: a[0] || (a[0] = (
|
|
105
|
-
onOnHeaderSort: a[1] || (a[1] = (
|
|
105
|
+
onOnItemExpansion: a[0] || (a[0] = (o) => s("onItemExpansion", o)),
|
|
106
|
+
onOnHeaderSort: a[1] || (a[1] = (o) => s("update:sort", o))
|
|
106
107
|
}), S({ _: 2 }, [
|
|
107
|
-
|
|
108
|
+
g(e.$slots, (o, l) => ({
|
|
108
109
|
name: l,
|
|
109
110
|
fn: B((f) => [
|
|
110
111
|
h(e.$slots, l, C(w(f || {})), void 0, !0)
|
|
111
112
|
])
|
|
112
113
|
}))
|
|
113
114
|
]), 1040, ["loading", "is-mobile-device", "items-expanded"])),
|
|
114
|
-
|
|
115
|
+
K(G(U, {
|
|
115
116
|
ref_key: "paginationComponentRef",
|
|
116
|
-
ref:
|
|
117
|
+
ref: y,
|
|
117
118
|
class: "rds-mt-16",
|
|
118
119
|
"total-items": t.totalItemsLength,
|
|
119
120
|
"current-page": t.activePage,
|
|
@@ -121,20 +122,21 @@ import './style/tablepaginatedcomponent.css';const X = { class: "table_paginated
|
|
|
121
122
|
"hide-leyend": t.hideLeyend,
|
|
122
123
|
"jump-to": t.jumpTo,
|
|
123
124
|
selected: !0,
|
|
124
|
-
|
|
125
|
+
"disable-first-load": t.disableFirstLoad,
|
|
126
|
+
onPageChanged: a[2] || (a[2] = (o) => T({ pagination: o }))
|
|
125
127
|
}, S({ _: 2 }, [
|
|
126
|
-
|
|
128
|
+
g(e.$slots, (o, l) => ({
|
|
127
129
|
name: l,
|
|
128
130
|
fn: B((f) => [
|
|
129
131
|
h(e.$slots, l, C(w(f || {})), void 0, !0)
|
|
130
132
|
])
|
|
131
133
|
}))
|
|
132
|
-
]), 1032, ["total-items", "current-page", "items-per-page", "hide-leyend", "jump-to"]), [
|
|
134
|
+
]), 1032, ["total-items", "current-page", "items-per-page", "hide-leyend", "jump-to", "disable-first-load"]), [
|
|
133
135
|
[J, !e.hidePagination]
|
|
134
136
|
])
|
|
135
137
|
]));
|
|
136
138
|
}
|
|
137
|
-
}),
|
|
139
|
+
}), oe = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-862118a8"]]);
|
|
138
140
|
export {
|
|
139
|
-
|
|
141
|
+
oe as default
|
|
140
142
|
};
|