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.
Files changed (99) hide show
  1. package/dist/components/accordion.es.js +13 -13
  2. package/dist/components/accordionGroup.es.js +2 -2
  3. package/dist/components/actionButton.es.js +2 -2
  4. package/dist/components/breadcrumbs.es.js +3 -3
  5. package/dist/components/button.es.js +17 -17
  6. package/dist/components/card.es.js +5 -5
  7. package/dist/components/checkbox.es.js +5 -5
  8. package/dist/components/datepicker.es.js +588 -590
  9. package/dist/components/divider.es.js +2 -2
  10. package/dist/components/dragAndDrop.es.js +187 -0
  11. package/dist/components/dropdown.es.js +92 -92
  12. package/dist/components/filterChip.es.js +2 -2
  13. package/dist/components/floatingActionButton.es.js +2 -2
  14. package/dist/components/{icon-svg-DGp2yHJn.js → icon-svg-_WCkLP8-.js} +36 -71
  15. package/dist/components/iconList.es.js +4 -4
  16. package/dist/components/iconSvg.es.js +1 -1
  17. package/dist/components/index.es.js +81 -75
  18. package/dist/components/indicator.es.js +6 -6
  19. package/dist/components/infoBox.es.js +16 -16
  20. package/dist/components/link.es.js +2 -2
  21. package/dist/components/modal.es.js +26 -26
  22. package/dist/components/multiselect.es.js +5 -5
  23. package/dist/components/multiselectcontentwrapper.es.js +6 -6
  24. package/dist/components/overlay.es.js +3 -3
  25. package/dist/components/pagination.es.js +32 -21
  26. package/dist/components/persistentToast.es.js +12 -12
  27. package/dist/components/progressBar.es.js +86 -0
  28. package/dist/components/quantitySelector.es.js +9 -9
  29. 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
  30. package/dist/components/radioButton.es.js +4 -4
  31. package/dist/components/radioGroup.es.js +1 -1
  32. package/dist/components/selectionChip.es.js +3 -3
  33. package/dist/components/sidebar.es.js +13 -13
  34. package/dist/components/sidedrawer.es.js +41 -29
  35. package/dist/components/style/actionButton.css +1 -1
  36. package/dist/components/style/button.css +1 -1
  37. package/dist/components/style/dragAndDrop.css +1 -0
  38. package/dist/components/style/dropdown.css +1 -1
  39. package/dist/components/style/icon-svg.css +1 -1
  40. package/dist/components/style/pagination.css +1 -1
  41. package/dist/components/style/progressBar.css +1 -0
  42. package/dist/components/style/sidedrawer.css +1 -1
  43. package/dist/components/style/switch.css +1 -1
  44. package/dist/components/style/tabBar.css +1 -1
  45. package/dist/components/style/tablepaginatedcomponent.css +1 -1
  46. package/dist/components/style/textField.css +1 -1
  47. package/dist/components/style/tooltip.css +1 -1
  48. package/dist/components/switch.es.js +45 -38
  49. package/dist/components/tabBar.es.js +72 -55
  50. package/dist/components/tablepaginatedcomponent.es.js +42 -40
  51. package/dist/components/tableslotedcomponent.es.js +26 -26
  52. package/dist/components/tag.es.js +2 -2
  53. package/dist/components/textArea.es.js +2 -2
  54. package/dist/components/textField.es.js +30 -30
  55. package/dist/components/toggle.es.js +2 -2
  56. package/dist/components/tooltip.es.js +337 -325
  57. package/dist/energy-components.es.js +5062 -4776
  58. package/dist/energy-components.umd.js +2 -1
  59. package/dist/style.css +1 -1
  60. package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +1 -1
  61. package/dist/types/src/components/buttons/button/button.vue.d.ts +8 -13
  62. package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +1 -1
  63. package/dist/types/src/components/content/accordion/accordion.vue.d.ts +6 -17
  64. package/dist/types/src/components/content/acordion-group/accordion-group.vue.d.ts +6 -11
  65. package/dist/types/src/components/content/card/card.vue.d.ts +6 -11
  66. package/dist/types/src/components/content/divider/divider.vue.d.ts +1 -1
  67. package/dist/types/src/components/content/table/table-paginated/TablePaginatedComponent.vue.d.ts +88 -0
  68. package/dist/types/src/components/content/table/table-sloted/TableSlotedComponent.vue.d.ts +32 -31
  69. package/dist/types/src/components/content/tag/tag.vue.d.ts +1 -1
  70. package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +1 -4
  71. package/dist/types/src/components/feedback/info-box/info-box.vue.d.ts +8 -18
  72. package/dist/types/src/components/feedback/persistent-toast/persistent-toast.vue.d.ts +8 -12
  73. package/dist/types/src/components/feedback/progress-bar/progress-bar.vue.d.ts +101 -0
  74. package/dist/types/src/components/icon-svg/icon-svg.vue.d.ts +20 -1
  75. package/dist/types/src/components/index.d.ts +2 -0
  76. package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +6 -11
  77. package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +258 -0
  78. package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +203 -0
  79. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +30 -550
  80. package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +3 -5
  81. package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +2 -5
  82. package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +1 -1
  83. package/dist/types/src/components/input/radio-button/radio-group.vue.d.ts +6 -11
  84. package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +3 -5
  85. package/dist/types/src/components/input/switch/switch.vue.d.ts +24 -21
  86. package/dist/types/src/components/input/text-area/text-area.vue.d.ts +12 -15
  87. package/dist/types/src/components/input/text-field/text-field.vue.d.ts +12 -19
  88. package/dist/types/src/components/input/toggle/toggle.vue.d.ts +1 -1
  89. package/dist/types/src/components/layout/sidebar/sidebar.vue.d.ts +10 -17
  90. package/dist/types/src/components/layout/sidedrawer/sidedrawer.vue.d.ts +23 -16
  91. package/dist/types/src/components/navigation/link/link.vue.d.ts +7 -11
  92. package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +18 -1
  93. package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +24 -18
  94. package/dist/types/src/components/overlay/modal/modal.vue.d.ts +10 -141
  95. package/dist/types/src/components/overlay/overlay/overlay.vue.d.ts +5 -10
  96. package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +8 -19
  97. package/dist/types/src/helpers/mobileMockup.vue.d.ts +1 -1
  98. package/dist/types/tsconfig.tsbuildinfo +1 -1
  99. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
- import { defineComponent as y, mergeModels as c, useModel as g, ref as r, onMounted as S, onBeforeUnmount as B, openBlock as d, createElementBlock as u, normalizeClass as V, createElementVNode as m, renderSlot as p, createTextVNode as x, toDisplayString as E, createBlock as _, createCommentVNode as f } from "vue";
2
- import { R as C } from "./icon-svg-DGp2yHJn.js";
3
- import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import './style/switch.css';const N = ["id", "disabled", "checked"], D = ["for", "aria-label"], L = {
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
- }, F = /* @__PURE__ */ y({
7
+ }, R = /* @__PURE__ */ p({
8
8
  __name: "switch",
9
- props: /* @__PURE__ */ c({
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
- modelValue: { type: Boolean },
47
- modelModifiers: {}
48
- }),
49
- emits: /* @__PURE__ */ c(["update:checked"], ["update:modelValue"]),
50
- setup(e, { emit: h }) {
51
- const w = h, a = g(e, "modelValue"), l = r(!1), o = r(!1), b = () => {
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
- o.value = !1;
57
- }, k = (t) => {
58
- const n = t.target.checked;
59
- a.value = n, w("update:checked", n);
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 S(() => {
62
- window.addEventListener("keydown", s), window.addEventListener("mousedown", i);
63
- }), B(() => {
64
- window.removeEventListener("keydown", s), window.removeEventListener("mousedown", i);
65
- }), (t, n) => (d(), u("div", {
66
- class: V(["rds-e-switch", { "rds-e-switch--focused": l.value }])
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: a.value !== void 0 ? a.value : e.checked,
80
+ checked: w.value,
74
81
  onChange: k,
75
- onFocus: b,
76
- onBlur: v
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 || t.$slots["text-label"] ? (d(), u("span", L, [
84
- p(t.$slots, "text-label", {}, () => [
85
- x(E(e.label), 1)
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(), _(C, {
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"])) : f("", !0)
93
- ])) : f("", !0)
94
- ], 8, D)
99
+ }, null, 8, ["name"])) : h("", !0)
100
+ ])) : h("", !0)
101
+ ], 8, L)
95
102
  ], 2));
96
103
  }
97
- }), T = /* @__PURE__ */ M(F, [["__scopeId", "data-v-be80169d"]]);
104
+ }), M = /* @__PURE__ */ D(R, [["__scopeId", "data-v-16659a57"]]);
98
105
  export {
99
- T as default
106
+ M as default
100
107
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as N, mergeModels as B, toRefs as W, useModel as D, ref as m, computed as h, onMounted as K, nextTick as $, onUnmounted as F, watch as L, openBlock as s, createElementBlock as d, normalizeClass as u, createVNode as R, createCommentVNode as g, createElementVNode as f, Fragment as q, renderList as H, unref as O, withKeys as S, withModifiers as V, createBlock as P, createTextVNode as U, toDisplayString as j, renderSlot as G } from "vue";
2
- import { R as w } from "./icon-svg-DGp2yHJn.js";
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__ */ N({
8
+ }, ee = /* @__PURE__ */ E({
9
9
  __name: "tab-bar",
10
- props: /* @__PURE__ */ B({
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: (o, v) => {
53
- if (o === v.id) return Promise.resolve(!0);
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__ */ B(["activeTabChanged"], ["update:activeTab"]),
64
- setup(o, { emit: v }) {
65
- const i = o, A = v, {
66
- options: r
67
- } = W(i), M = D(o, "activeTab"), a = m(""), b = m(null), l = m(null);
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(() => r.value.findIndex((t) => t.id === a.value) > 0 && y.value), E = h(() => l.value ? r.value.findIndex((t) => t.id === a.value) < i.options.length - 1 && y.value : !1), k = (e) => {
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
- }, c = async (e) => {
73
- const t = r.value.find((_) => _.id === e);
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
- }, x = async () => {
76
- let e = r.value.findIndex((t) => t.id === a.value);
77
- for (; e > 0 && (e--, !await c(r.value[e].id)); )
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
- }, I = async () => {
80
- let e = r.value.findIndex((t) => t.id === a.value);
81
- for (; e < i.options.length - 1 && (e++, !await c(r.value[e].id)); )
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 T(e) {
85
- const t = r.value.findIndex((n) => n.id === e);
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 C = () => {
93
- T(a.value);
99
+ const B = () => {
100
+ I(a.value);
94
101
  };
95
- return K(async () => {
96
- await $(), b.value && (p = Array.from(
102
+ return $(async () => {
103
+ if (await K(), b.value && (p = Array.from(
97
104
  b.value.children
98
- )), a.value = i.options[0].id ?? "", window.addEventListener("resize", J(C, 200));
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", C);
112
+ window.removeEventListener("resize", B);
101
113
  }), L(a, (e) => {
102
- T(e), A("activeTabChanged", k(!1));
103
- }), L(M, (e) => c(e)), (e, t) => (s(), d("div", {
104
- class: u(["rds-e-top-bar", {
105
- "rds-e-top-bar--fluid": o.fluid,
106
- "rds-e-top-bar--divider": o.divider
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: u([
126
+ class: c([
112
127
  "rds-e-top-bar__button",
113
- o.backgroundAlternative ? "rds-e-top-bar__button--left-bg2" : "rds-e-top-bar__button--left"
128
+ r.backgroundAlternative ? "rds-e-top-bar__button--left-bg2" : "rds-e-top-bar__button--left"
114
129
  ]),
115
- onClick: x
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
- f("div", {
137
+ v("div", {
123
138
  ref_key: "tabsListWrapper",
124
139
  ref: l,
125
140
  class: "rds-e-top-bar__wrapper"
126
141
  }, [
127
- f("ul", {
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(q, null, H(O(r), (n, _) => (s(), d("li", {
134
- key: _,
135
- class: u(["rds-e-top-bar__item", {
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) => c(n.id),
158
+ onClick: (te) => u(n.id),
142
159
  onKeydown: [
143
- S(V(x, ["prevent"]), ["left"]),
144
- S(V(I, ["prevent"]), ["right"])
160
+ S(A(T, ["prevent"]), ["left"]),
161
+ S(A(x, ["prevent"]), ["right"])
145
162
  ]
146
163
  }, [
147
- f("span", Y, [
148
- n.icon ? (s(), P(w, {
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
- ], 512)
173
+ ], 2)
157
174
  ], 512),
158
- E.value ? (s(), d("div", {
175
+ D.value ? (s(), d("div", {
159
176
  key: 1,
160
- class: u([
177
+ class: c([
161
178
  "rds-e-top-bar__button",
162
- o.backgroundAlternative ? "rds-e-top-bar__button--right-bg2" : "rds-e-top-bar__button--right"
179
+ r.backgroundAlternative ? "rds-e-top-bar__button--right-bg2" : "rds-e-top-bar__button--right"
163
180
  ]),
164
- onClick: I
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
- f("div", Z, [
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
- }), ie = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-26223c41"]]);
195
+ }), oe = /* @__PURE__ */ Q(ee, [["__scopeId", "data-v-1fc895db"]]);
179
196
  export {
180
- ie as default
197
+ oe as default
181
198
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as H, toRefs as M, ref as i, watch as N, watchEffect as V, openBlock as u, createElementBlock as g, Fragment as K, renderList as v, unref as k, renderSlot as h, createBlock as z, mergeProps as F, createSlots as S, withCtx as B, normalizeProps as C, guardReactiveProps as w, withDirectives as q, createVNode as G, vShow as J } from "vue";
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: D,
37
+ selectableKey: L,
38
+ header: $,
38
39
  asynchrone: P
39
- } = M(t), c = i(), p = i([]), o = i([]), y = i({
40
+ } = F(t), c = i(), p = i([]), n = i([]), b = i({
40
41
  item: {
41
- header: D,
42
+ header: $,
42
43
  items: p
43
44
  },
44
- selectableKey: $,
45
- listChecked: o,
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
- }), b = i(null), m = i(1), r = i(), O = () => {
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
- }, T = () => {
58
+ }, O = () => {
58
59
  p.value = d.value;
59
- }, j = (e) => {
60
+ }, T = (e) => {
60
61
  const a = {};
61
62
  if ("pagination" in e) {
62
- const n = e.pagination;
63
- n.reset && O();
63
+ const o = e.pagination;
64
+ o.reset && D();
64
65
  let l = !1;
65
- r.value = n, (n.page ?? 0) > m.value && (m.value = n.page ?? 0, l = !0), r.value && (r.value.isNewPage = l);
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
- }, x = (e) => {
69
- const a = o.value.indexOf(e);
70
- a > -1 ? o.value.splice(a, 1) : o.value.push(e), s("update:selection", o.value);
71
- }, L = () => {
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 = b.value) == null || e.resetPagination();
74
+ (e = y.value) == null || e.resetPagination();
74
75
  }, R = (e) => {
75
- e && (o.value = []), y.value.checkedAll = e, s("update:selectedAll", e);
76
+ e && (n.value = []), b.value.checkedAll = e, s("update:selectedAll", e);
76
77
  };
77
- return o.value = [...t.initChecked], P.value || (p.value = d.value), N(d, () => {
78
- T();
79
- }, { deep: !0 }), V(() => {
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: L
87
- }), (e, a) => (u(), g("div", X, [
88
- e.$slots.mobile && e.isMobileDevice ? (u(!0), g(K, { key: 0 }, v(k(d), (n, l) => (u(), g("div", {
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: n }, void 0, !0)
93
- ]))), 128)) : (u(), z(Q, F({
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
- }, y.value, {
99
+ }, b.value, {
99
100
  loading: k(I),
100
101
  "is-mobile-device": e.isMobileDevice,
101
102
  "items-expanded": e.itemsExpanded,
102
- onOnClickCheckbox: x,
103
+ onOnClickCheckbox: j,
103
104
  onSelectAll: R,
104
- onOnItemExpansion: a[0] || (a[0] = (n) => s("onItemExpansion", n)),
105
- onOnHeaderSort: a[1] || (a[1] = (n) => s("update:sort", n))
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
- v(e.$slots, (n, l) => ({
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
- q(G(U, {
115
+ K(G(U, {
115
116
  ref_key: "paginationComponentRef",
116
- ref: b,
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
- onPageChanged: a[2] || (a[2] = (n) => j({ pagination: n }))
125
+ "disable-first-load": t.disableFirstLoad,
126
+ onPageChanged: a[2] || (a[2] = (o) => T({ pagination: o }))
125
127
  }, S({ _: 2 }, [
126
- v(e.$slots, (n, l) => ({
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
- }), ne = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-4d909f61"]]);
139
+ }), oe = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-862118a8"]]);
138
140
  export {
139
- ne as default
141
+ oe as default
140
142
  };