energy-components 2.6.0 → 2.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 (70) hide show
  1. package/dist/components/accordion.es.js +1 -1
  2. package/dist/components/avatar.es.js +1 -1
  3. package/dist/components/button.es.js +1 -1
  4. package/dist/components/checkbox.es.js +1 -1
  5. package/dist/components/collapsable.es.js +1 -1
  6. package/dist/components/{collapsable.scss_vue_type_style_index_0_src_true_lang-BfTKaP_f.js → collapsable.scss_vue_type_style_index_0_src_true_lang-CBOSJyvR.js} +1 -1
  7. package/dist/components/datepicker.es.js +1 -1
  8. package/dist/components/directAccess.es.js +1 -1
  9. package/dist/components/dragAndDrop.es.js +93 -75
  10. package/dist/components/dropdown.es.js +414 -272
  11. package/dist/components/fileUploadItem.es.js +1 -1
  12. package/dist/components/filterChip.es.js +1 -1
  13. package/dist/components/filterTag.es.js +1 -1
  14. package/dist/components/{icon-svg-CW3eQRcp.js → icon-svg-BWxX0W6p.js} +15 -3
  15. package/dist/components/iconList.es.js +1 -1
  16. package/dist/components/iconSvg.es.js +1 -1
  17. package/dist/components/index.es.js +2 -2
  18. package/dist/components/indicator.es.js +1 -1
  19. package/dist/components/indicatorDots.es.js +1 -1
  20. package/dist/components/infoBox.es.js +1 -1
  21. package/dist/components/link.es.js +1 -1
  22. package/dist/components/modal.es.js +1 -1
  23. package/dist/components/multiselect.es.js +14 -8
  24. package/dist/components/multiselectcontentwrapper.es.js +42 -36
  25. package/dist/components/persistentToast.es.js +1 -1
  26. package/dist/components/popover.es.js +90 -71
  27. package/dist/components/popoverMenu.es.js +67 -60
  28. package/dist/components/progressBar.es.js +1 -1
  29. package/dist/components/quantitySelector.es.js +1 -1
  30. package/dist/components/radioButton.es.js +1 -1
  31. package/dist/components/searchField.es.js +1 -1
  32. package/dist/components/selectionChip.es.js +1 -1
  33. package/dist/components/sidedrawer.es.js +1 -1
  34. package/dist/components/style/dragAndDrop.css +1 -1
  35. package/dist/components/style/dropdown.css +1 -1
  36. package/dist/components/style/multiselect.css +1 -1
  37. package/dist/components/style/multiselectcontentwrapper.css +1 -1
  38. package/dist/components/style/pagination.css +1 -1
  39. package/dist/components/style/popover.css +1 -1
  40. package/dist/components/style/popoverMenu.css +1 -1
  41. package/dist/components/style/table.css +1 -1
  42. package/dist/components/style/tableRenderer.css +1 -1
  43. package/dist/components/switch.es.js +1 -1
  44. package/dist/components/tabBar.es.js +1 -1
  45. package/dist/components/table.es.js +101 -92
  46. package/dist/components/tableRenderer.es.js +363 -214
  47. package/dist/components/tag.es.js +1 -1
  48. package/dist/components/textArea.es.js +1 -1
  49. package/dist/components/textField.es.js +1 -1
  50. package/dist/components/toggle.es.js +1 -1
  51. package/dist/components/tooltip.es.js +1 -1
  52. package/dist/energy-components.css +1 -1
  53. package/dist/energy-components.es.js +6511 -6143
  54. package/dist/energy-components.umd.js +2 -2
  55. package/dist/style.css +1 -1
  56. package/dist/types/src/components/content/table/table-renderer.vue.d.ts +7 -2
  57. package/dist/types/src/components/content/table/table.vue.d.ts +27 -1
  58. package/dist/types/src/components/content/table/use-column-reorder.d.ts +29 -0
  59. package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +15 -0
  60. package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +9 -0
  61. package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +25 -0
  62. package/dist/types/src/components/overlay/popover/popover.vue.d.ts +4 -0
  63. package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +10 -4
  64. package/dist/types/tsconfig.tsbuildinfo +1 -1
  65. package/llms/rdsdrag-and-drop.md +1 -0
  66. package/llms/rdsdropdown.md +4 -2
  67. package/llms/rdspopover-menu.md +2 -0
  68. package/llms/rdspopover.md +2 -0
  69. package/llms/rdstable.md +4 -0
  70. package/package.json +2 -2
@@ -1,18 +1,18 @@
1
- import { defineComponent as Y, toRefs as Z, ref as h, useSlots as _, computed as f, watch as w, openBlock as u, createElementBlock as g, Fragment as B, createVNode as x, renderList as T, renderSlot as $, toDisplayString as ee, createCommentVNode as D, createBlock as L, unref as K, withCtx as C, createSlots as te, normalizeProps as le, guardReactiveProps as ae, withModifiers as A } from "vue";
2
- import oe from "./tableRenderer.es.js";
3
- import ne from "./pagination.es.js";
1
+ import { defineComponent as Z, ref as h, useSlots as _, toRefs as ee, computed as f, watch as S, openBlock as u, createElementBlock as g, Fragment as B, createVNode as x, renderList as L, renderSlot as P, toDisplayString as le, createCommentVNode as T, createBlock as $, unref as K, withCtx as C, createSlots as te, normalizeProps as ae, guardReactiveProps as oe, withModifiers as D } from "vue";
2
+ import ne from "./tableRenderer.es.js";
3
+ import se from "./pagination.es.js";
4
4
  import E from "./radioButton.es.js";
5
- import { _ as se } from "./radio-group.vue_vue_type_script_setup_true_lang-CwgSZYeD.js";
6
- import ie from "./loader.es.js";
5
+ import { _ as ie } from "./radio-group.vue_vue_type_script_setup_true_lang-CwgSZYeD.js";
6
+ import re from "./loader.es.js";
7
7
  import { g as de } from "./getInstance-GhoEcxLF.js";
8
- import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import './style/table.css';const ue = { class: "rds-e-table__container" }, ce = {
8
+ import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ import './style/table.css';const ce = { class: "rds-e-table__container" }, me = {
10
10
  key: 0,
11
11
  class: "rds-e-table__loading-mobile"
12
- }, me = {
12
+ }, ve = {
13
13
  key: 0,
14
14
  class: "rds-e-table__empty"
15
- }, pe = /* @__PURE__ */ Y({
15
+ }, ye = /* @__PURE__ */ Z({
16
16
  __name: "table",
17
17
  props: {
18
18
  header: { default: () => [] },
@@ -26,6 +26,8 @@ import './style/table.css';const ue = { class: "rds-e-table__container" }, ce =
26
26
  selectionMode: { default: "none" },
27
27
  selectionPosition: { default: "right" },
28
28
  checkedKeys: { default: () => [] },
29
+ selectAllAriaLabel: {},
30
+ rowAriaLabel: {},
29
31
  loading: { type: Boolean },
30
32
  hideHeaders: { type: Boolean },
31
33
  hidePagination: { type: Boolean },
@@ -43,127 +45,130 @@ import './style/table.css';const ue = { class: "rds-e-table__container" }, ce =
43
45
  cellClass: {},
44
46
  isRowDisabled: {},
45
47
  resizableColumns: { type: Boolean },
48
+ reorderableColumns: { type: Boolean },
46
49
  resetPageOnSort: { type: Boolean, default: !1 }
47
50
  },
48
- emits: ["update:page", "update:pageSize", "update:sort", "update:checkedKeys", "optionsChange", "selectionChange", "rowExpand", "columnResize"],
51
+ emits: ["update:page", "update:pageSize", "update:sort", "update:checkedKeys", "optionsChange", "selectionChange", "rowExpand", "columnResize", "columnReorder"],
49
52
  setup(a, { expose: H, emit: O }) {
50
- const o = a, i = O, V = de(), { items: I, selectionMode: d, selectionPosition: P } = Z(o), c = h(o.page), p = h(o.pageSize), m = h(o.sort || null), n = h([...o.checkedKeys]), k = h([]), M = _(), j = f(() => o.rowKey), v = (e) => typeof e == "number" ? e : String(e), r = (e) => {
51
- const l = o.rowKey, t = e[l];
52
- return t === void 0 ? (console.warn(`[RDSTable] Row missing key '${String(o.rowKey)}'`, e), "unknown") : t;
53
- }, y = f(() => {
54
- if (o.asynchrone === !0) return I.value;
55
- const e = (c.value - 1) * p.value, l = e + p.value;
56
- return I.value.slice(e, l);
57
- }), F = f(() => y.value), N = f(() => {
58
- const e = o.header.map((t) => ({
59
- ...t,
60
- sort: t.sortable && m.value?.key === t.key ? m.value.order : null
61
- })), l = y.value.length > 0 && y.value.every((t) => n.value.includes(v(r(t))));
62
- if (d.value !== "none" && P.value === "left")
53
+ const o = a, i = O, c = h(o.page), v = h(o.pageSize), m = h(o.sort || null), n = h([...o.checkedKeys]), b = h([]), V = _(), M = de(), { items: A, selectionMode: r, selectionPosition: I } = ee(o), j = f(() => o.rowKey), y = (e) => typeof e == "number" ? e : String(e), d = (e) => {
54
+ const t = o.rowKey, l = e[t];
55
+ return l === void 0 ? (console.warn(`[RDSTable] Row missing key '${String(o.rowKey)}'`, e), "unknown") : l;
56
+ }, p = f(() => {
57
+ if (o.asynchrone === !0) return A.value;
58
+ const e = (c.value - 1) * v.value, t = e + v.value;
59
+ return A.value.slice(e, t);
60
+ }), F = f(() => p.value), N = f(() => {
61
+ const e = o.header.map((l) => ({
62
+ ...l,
63
+ sort: l.sortable && m.value?.key === l.key ? m.value.order : null
64
+ })), t = p.value.length > 0 && p.value.every((l) => n.value.includes(y(d(l))));
65
+ if (r.value !== "none" && I.value === "left")
63
66
  return [{
64
67
  key: "__select_all",
65
68
  text: "",
66
69
  type: "selection",
67
70
  width: "48px",
68
71
  align: "center",
69
- sticky: !0,
70
- allSelected: l
72
+ sticky: !1,
73
+ allSelected: t
71
74
  }, ...e];
72
- if (d.value !== "none" && P.value === "right") {
73
- const t = {
75
+ if (r.value !== "none" && I.value === "right") {
76
+ const l = {
74
77
  key: "checkbox",
75
78
  text: "",
76
79
  type: "selection",
77
80
  width: "48px",
78
81
  align: "right",
79
- sticky: !0,
80
- allSelected: l
82
+ sticky: !1,
83
+ allSelected: t
81
84
  };
82
- return [...e, t];
85
+ return [...e, l];
83
86
  }
84
87
  return e;
85
- }), U = f(() => o.hideSelectAll ? !0 : d.value !== "multiple"), R = () => {
88
+ }), U = f(() => o.hideSelectAll ? !0 : r.value !== "multiple"), R = () => {
86
89
  i("optionsChange", {
87
90
  page: c.value,
88
- pageSize: p.value,
91
+ pageSize: v.value,
89
92
  sort: m.value
90
93
  });
91
94
  }, G = (e) => {
92
95
  if (!e.sortable) return;
93
- const l = m.value?.key, t = m.value?.order;
96
+ const t = m.value?.key, l = m.value?.order;
94
97
  let s = "asc";
95
- l === e.key && (t === "asc" ? s = "desc" : t === "desc" && (s = null));
96
- const b = s ? { key: e.key, order: s } : null;
97
- o.resetPageOnSort && (c.value = 1, i("update:page", 1)), m.value = b, i("update:sort", b), R();
98
+ t === e.key && (l === "asc" ? s = "desc" : l === "desc" && (s = null));
99
+ const w = s ? { key: e.key, order: s } : null;
100
+ o.resetPageOnSort && (c.value = 1, i("update:page", 1)), m.value = w, i("update:sort", w), R();
98
101
  }, q = (e) => {
99
- e.page !== c.value && (c.value = e.page, i("update:page", e.page)), e.limit !== p.value && (p.value = e.limit, i("update:pageSize", e.limit)), R();
102
+ e.page !== c.value && (c.value = e.page, i("update:page", e.page)), e.limit !== v.value && (v.value = e.limit, i("update:pageSize", e.limit)), R();
100
103
  }, z = () => {
101
104
  i("update:checkedKeys", [...n.value]), i("selectionChange", [...n.value]);
102
105
  }, J = (e) => {
103
- if (d.value === "none") return;
104
- const l = v(r(e));
105
- if (d.value === "single")
106
- n.value = [l];
106
+ if (r.value === "none") return;
107
+ const t = y(d(e));
108
+ if (r.value === "single")
109
+ n.value = [t];
107
110
  else {
108
- const t = n.value.indexOf(l);
109
- t === -1 ? n.value.push(l) : n.value.splice(t, 1);
111
+ const l = n.value.indexOf(t);
112
+ l === -1 ? n.value.push(t) : n.value.splice(l, 1);
110
113
  }
111
114
  z();
112
115
  }, Q = (e) => {
113
- if (d.value !== "multiple") return;
114
- const l = y.value.map((t) => v(r(t)));
116
+ if (r.value !== "multiple") return;
117
+ const t = p.value.map((l) => y(d(l)));
115
118
  if (e) {
116
- const t = l.filter((s) => !n.value.includes(s));
117
- n.value.push(...t);
119
+ const l = t.filter((s) => !n.value.includes(s));
120
+ n.value.push(...l);
118
121
  } else
119
- n.value = n.value.filter((t) => !l.includes(t));
122
+ n.value = n.value.filter((l) => !t.includes(l));
120
123
  z();
121
- }, S = f({
124
+ }, k = f({
122
125
  get: () => n.value[0] || null,
123
126
  set: (e) => {
124
- e !== null && d.value === "single" && (n.value = [e], z());
127
+ e !== null && r.value === "single" && (n.value = [e], z());
125
128
  }
126
129
  }), W = (e) => {
127
- if (!e.expandible || !M.expandible) return;
128
- const l = v(r(e)), t = k.value.indexOf(l);
129
- t === -1 ? k.value.push(l) : k.value.splice(t, 1), i("rowExpand", e);
130
+ if (!e.expandible || !V.expandible) return;
131
+ const t = y(d(e)), l = b.value.indexOf(t);
132
+ l === -1 ? b.value.push(t) : b.value.splice(l, 1), i("rowExpand", e);
130
133
  }, X = (e) => {
131
134
  i("columnResize", e);
135
+ }, Y = (e) => {
136
+ i("columnReorder", e);
132
137
  };
133
- return w(() => o.page, (e) => {
138
+ return S(() => o.page, (e) => {
134
139
  e && (c.value = e);
135
- }), w(() => o.pageSize, (e) => {
136
- e && (p.value = e);
137
- }), w(() => o.sort, (e) => {
140
+ }), S(() => o.pageSize, (e) => {
141
+ e && (v.value = e);
142
+ }), S(() => o.sort, (e) => {
138
143
  m.value = e || null;
139
- }), w(() => o.checkedKeys, (e) => {
144
+ }), S(() => o.checkedKeys, (e) => {
140
145
  n.value = [...e || []];
141
146
  }), H({ reset: () => {
142
147
  c.value = 1, n.value = [], m.value = null, R();
143
- } }), (e, l) => (u(), g("div", ue, [
148
+ } }), (e, t) => (u(), g("div", ce, [
144
149
  a.isMobileDevice && e.$slots.mobile ? (u(), g(B, { key: 0 }, [
145
- a.loading ? (u(), g("div", ce, [
146
- x(ie, { size: 20 })
150
+ a.loading ? (u(), g("div", me, [
151
+ x(re, { size: 20 })
147
152
  ])) : (u(), g(B, { key: 1 }, [
148
- (u(!0), g(B, null, T(y.value, (t, s) => (u(), g("div", {
149
- key: `${v(r(t))}-m-${s}`,
153
+ (u(!0), g(B, null, L(p.value, (l, s) => (u(), g("div", {
154
+ key: `${y(d(l))}-m-${s}`,
150
155
  class: "rds-e-table__mobile-item"
151
156
  }, [
152
- $(e.$slots, "mobile", {
153
- item: t,
157
+ P(e.$slots, "mobile", {
158
+ item: l,
154
159
  index: s
155
160
  }, void 0, !0)
156
161
  ]))), 128)),
157
- y.value.length === 0 && a.showEmptyState ? (u(), g("div", me, ee(a.emptyStateText), 1)) : D("", !0)
162
+ p.value.length === 0 && a.showEmptyState ? (u(), g("div", ve, le(a.emptyStateText), 1)) : T("", !0)
158
163
  ], 64))
159
- ], 64)) : (u(), L(se, {
164
+ ], 64)) : (u(), $(ie, {
160
165
  key: 1,
161
- modelValue: S.value,
162
- "onUpdate:modelValue": l[2] || (l[2] = (t) => S.value = t),
163
- "group-name": `table-radio-${K(V)}`
166
+ modelValue: k.value,
167
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => k.value = l),
168
+ "group-name": `table-radio-${K(M)}`
164
169
  }, {
165
170
  default: C(() => [
166
- x(oe, {
171
+ x(ne, {
167
172
  headers: N.value,
168
173
  rows: F.value,
169
174
  "row-key": j.value,
@@ -174,60 +179,64 @@ import './style/table.css';const ue = { class: "rds-e-table__container" }, ce =
174
179
  condensed: a.condensed,
175
180
  "show-empty-state": a.showEmptyState,
176
181
  "empty-state-text": a.emptyStateText,
182
+ "select-all-aria-label": a.selectAllAriaLabel,
183
+ "row-aria-label": a.rowAriaLabel,
177
184
  "selected-keys": n.value,
178
- "expanded-keys": k.value,
185
+ "expanded-keys": b.value,
179
186
  "row-class": a.rowClass,
180
187
  "cell-class": a.cellClass,
181
188
  "is-row-disabled": a.isRowDisabled,
182
189
  "resizable-columns": a.resizableColumns,
190
+ "reorderable-columns": a.reorderableColumns,
183
191
  onColumnResize: X,
192
+ onColumnReorder: Y,
184
193
  onHeaderClick: G,
185
194
  onToggleSelectAll: Q,
186
195
  onToggleRowSelection: J,
187
196
  onRowClick: W
188
197
  }, te({ _: 2 }, [
189
- T(e.$slots, (t, s) => ({
198
+ L(e.$slots, (l, s) => ({
190
199
  name: s,
191
- fn: C((b) => [
192
- $(e.$slots, s, le(ae(b)), void 0, !0)
200
+ fn: C((w) => [
201
+ P(e.$slots, s, ae(oe(w)), void 0, !0)
193
202
  ])
194
203
  })),
195
- K(d) === "single" ? {
204
+ K(r) === "single" ? {
196
205
  name: "td-__select_all",
197
- fn: C(({ item: t }) => [
206
+ fn: C(({ item: l }) => [
198
207
  x(E, {
199
- id: `radio-left-${r(t)}`,
200
- option: v(r(t)),
201
- "model-value": S.value,
202
- onClick: l[0] || (l[0] = A(() => {
208
+ id: `radio-left-${d(l)}`,
209
+ option: y(d(l)),
210
+ "model-value": k.value,
211
+ onClick: t[0] || (t[0] = D(() => {
203
212
  }, ["stop"]))
204
213
  }, null, 8, ["id", "option", "model-value"])
205
214
  ]),
206
215
  key: "0"
207
216
  } : void 0,
208
- K(d) === "single" ? {
217
+ K(r) === "single" ? {
209
218
  name: "td-checkbox",
210
- fn: C(({ item: t }) => [
219
+ fn: C(({ item: l }) => [
211
220
  x(E, {
212
- id: `radio-right-${r(t)}`,
213
- option: v(r(t)),
214
- "model-value": S.value,
215
- onClick: l[1] || (l[1] = A(() => {
221
+ id: `radio-right-${d(l)}`,
222
+ option: y(d(l)),
223
+ "model-value": k.value,
224
+ onClick: t[1] || (t[1] = D(() => {
216
225
  }, ["stop"]))
217
226
  }, null, 8, ["id", "option", "model-value"])
218
227
  ]),
219
228
  key: "1"
220
229
  } : void 0
221
- ]), 1032, ["headers", "rows", "row-key", "loading", "hide-headers", "hide-select-all", "variant", "condensed", "show-empty-state", "empty-state-text", "selected-keys", "expanded-keys", "row-class", "cell-class", "is-row-disabled", "resizable-columns"])
230
+ ]), 1032, ["headers", "rows", "row-key", "loading", "hide-headers", "hide-select-all", "variant", "condensed", "show-empty-state", "empty-state-text", "select-all-aria-label", "row-aria-label", "selected-keys", "expanded-keys", "row-class", "cell-class", "is-row-disabled", "resizable-columns", "reorderable-columns"])
222
231
  ]),
223
232
  _: 3
224
233
  }, 8, ["modelValue", "group-name"])),
225
- a.hidePagination ? D("", !0) : (u(), L(ne, {
234
+ a.hidePagination ? T("", !0) : (u(), $(se, {
226
235
  key: 2,
227
236
  class: "rds-e-table__pagination",
228
237
  "total-items": a.totalItemsLength,
229
238
  "current-page": c.value,
230
- "items-per-page": p.value,
239
+ "items-per-page": v.value,
231
240
  "hide-leyend": a.hideLegend,
232
241
  "jump-to": a.jumpTo,
233
242
  "disable-first-load": a.disableFirstLoad,
@@ -237,7 +246,7 @@ import './style/table.css';const ue = { class: "rds-e-table__container" }, ce =
237
246
  }, null, 8, ["total-items", "current-page", "items-per-page", "hide-leyend", "jump-to", "disable-first-load", "legend-text"]))
238
247
  ]));
239
248
  }
240
- }), xe = /* @__PURE__ */ re(pe, [["__scopeId", "data-v-1b77e5df"]]);
249
+ }), Ce = /* @__PURE__ */ ue(ye, [["__scopeId", "data-v-5dbe1d27"]]);
241
250
  export {
242
- xe as default
251
+ Ce as default
243
252
  };