energy-components 2.7.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.
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsable.es.js +1 -1
- 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
- package/dist/components/datepicker.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 +68 -67
- package/dist/components/fileUploadItem.es.js +1 -1
- package/dist/components/filterChip.es.js +1 -1
- package/dist/components/filterTag.es.js +1 -1
- package/dist/components/{icon-svg-CW3eQRcp.js → icon-svg-BWxX0W6p.js} +15 -3
- package/dist/components/iconList.es.js +1 -1
- package/dist/components/iconSvg.es.js +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/indicator.es.js +1 -1
- package/dist/components/indicatorDots.es.js +1 -1
- package/dist/components/infoBox.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/modal.es.js +1 -1
- package/dist/components/multiselect.es.js +14 -8
- package/dist/components/multiselectcontentwrapper.es.js +42 -36
- package/dist/components/persistentToast.es.js +1 -1
- package/dist/components/popover.es.js +90 -71
- package/dist/components/popoverMenu.es.js +67 -60
- 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/searchField.es.js +1 -1
- package/dist/components/selectionChip.es.js +1 -1
- package/dist/components/sidedrawer.es.js +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/popover.css +1 -1
- package/dist/components/style/popoverMenu.css +1 -1
- package/dist/components/style/table.css +1 -1
- package/dist/components/style/tableRenderer.css +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabBar.es.js +1 -1
- package/dist/components/table.es.js +74 -69
- package/dist/components/tableRenderer.es.js +358 -214
- package/dist/components/tag.es.js +1 -1
- package/dist/components/textArea.es.js +1 -1
- package/dist/components/textField.es.js +1 -1
- package/dist/components/toggle.es.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/energy-components.css +1 -1
- package/dist/energy-components.es.js +5905 -5705
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/content/table/table-renderer.vue.d.ts +5 -2
- package/dist/types/src/components/content/table/table.vue.d.ts +18 -1
- package/dist/types/src/components/content/table/use-column-reorder.d.ts +29 -0
- package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts +9 -0
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +4 -0
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +10 -4
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/llms/rdsdropdown.md +2 -2
- package/llms/rdspopover-menu.md +2 -0
- package/llms/rdspopover.md +2 -0
- package/llms/rdstable.md +2 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TableHeader } from './types';
|
|
1
|
+
import type { ColumnReorderEvent, TableHeader } from './types';
|
|
2
2
|
declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
4
|
readonly onHeaderClick?: ((header: TableHeader<any>) => any) | undefined;
|
|
@@ -9,7 +9,8 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
9
9
|
key: string;
|
|
10
10
|
width: number;
|
|
11
11
|
}) => any) | undefined;
|
|
12
|
-
|
|
12
|
+
readonly onColumnReorder?: ((payload: ColumnReorderEvent) => any) | undefined;
|
|
13
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onHeaderClick" | "onToggleSelectAll" | "onToggleRowSelection" | "onRowClick" | "onColumnResize" | "onColumnReorder"> & {
|
|
13
14
|
headers: TableHeader<T>[];
|
|
14
15
|
rows: T[];
|
|
15
16
|
rowKey: keyof T;
|
|
@@ -25,6 +26,7 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
25
26
|
selectAllAriaLabel?: string;
|
|
26
27
|
rowAriaLabel?: (row: T, index: number) => string;
|
|
27
28
|
resizableColumns?: boolean;
|
|
29
|
+
reorderableColumns?: boolean;
|
|
28
30
|
rowClass?: (row: T, index: number) => string;
|
|
29
31
|
cellClass?: (row: T, header: TableHeader, index: number) => string;
|
|
30
32
|
isRowDisabled?: (row: T) => boolean;
|
|
@@ -57,6 +59,7 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
57
59
|
key: string;
|
|
58
60
|
width: number;
|
|
59
61
|
}): void;
|
|
62
|
+
(e: "columnReorder", payload: ColumnReorderEvent): void;
|
|
60
63
|
};
|
|
61
64
|
}>) => import("vue").VNode & {
|
|
62
65
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -5,6 +5,11 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
5
5
|
key: string;
|
|
6
6
|
width: number;
|
|
7
7
|
}) => any) | undefined;
|
|
8
|
+
readonly onColumnReorder?: ((v: {
|
|
9
|
+
keys: string[];
|
|
10
|
+
fromIndex: number;
|
|
11
|
+
toIndex: number;
|
|
12
|
+
}) => any) | undefined;
|
|
8
13
|
readonly "onUpdate:page"?: ((v: number) => any) | undefined;
|
|
9
14
|
readonly "onUpdate:pageSize"?: ((v: number) => any) | undefined;
|
|
10
15
|
readonly "onUpdate:sort"?: ((v: SortDescriptor | null) => any) | undefined;
|
|
@@ -16,7 +21,7 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
16
21
|
}) => any) | undefined;
|
|
17
22
|
readonly onSelectionChange?: ((v: (string | number)[]) => any) | undefined;
|
|
18
23
|
readonly onRowExpand?: ((v: T) => any) | undefined;
|
|
19
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onColumnResize" | "onUpdate:page" | "onUpdate:pageSize" | "onUpdate:sort" | "onUpdate:checkedKeys" | "onOptionsChange" | "onSelectionChange" | "onRowExpand"> & {
|
|
24
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onColumnResize" | "onColumnReorder" | "onUpdate:page" | "onUpdate:pageSize" | "onUpdate:sort" | "onUpdate:checkedKeys" | "onOptionsChange" | "onSelectionChange" | "onRowExpand"> & {
|
|
20
25
|
/**
|
|
21
26
|
* Definición de las columnas de la tabla.
|
|
22
27
|
* Cada objeto define clave, texto, ancho, alineación y si es ordenable.
|
|
@@ -157,6 +162,13 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
157
162
|
* Activa el resize de columnas arrastrando el borde derecho del encabezado.
|
|
158
163
|
*/
|
|
159
164
|
resizableColumns?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Activa el reorder de columnas arrastrando el encabezado.
|
|
167
|
+
* Las columnas de selección permanecen ancladas y no participan en el reorder.
|
|
168
|
+
* Columnas individuales pueden excluirse con `reorderable: false` en su definición.
|
|
169
|
+
* El evento `columnReorder` se emite al soltar con `{ keys, fromIndex, toIndex }`.
|
|
170
|
+
*/
|
|
171
|
+
reorderableColumns?: boolean;
|
|
160
172
|
/**
|
|
161
173
|
* Si es `true` (por defecto), al cambiar el orden de una columna la página se resetea a 1.
|
|
162
174
|
* Pasa `false` para mantener la página actual al ordenar (útil en modo server-side con lógica propia).
|
|
@@ -192,6 +204,11 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
192
204
|
key: string;
|
|
193
205
|
width: number;
|
|
194
206
|
}): void;
|
|
207
|
+
(e: "columnReorder", v: {
|
|
208
|
+
keys: string[];
|
|
209
|
+
fromIndex: number;
|
|
210
|
+
toIndex: number;
|
|
211
|
+
}): void;
|
|
195
212
|
};
|
|
196
213
|
}>) => import("vue").VNode & {
|
|
197
214
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { ColumnType, TableHeader } from './types';
|
|
3
|
+
export interface UseColumnReorderOptions {
|
|
4
|
+
/** Column types that are always excluded from reordering (default: ['selection', 'actions']) */
|
|
5
|
+
excludeTypes?: ColumnType[];
|
|
6
|
+
}
|
|
7
|
+
export interface UseColumnReorderReturn<T> {
|
|
8
|
+
/** Headers in the current display order */
|
|
9
|
+
reorderedHeaders: ComputedRef<TableHeader<T>[]>;
|
|
10
|
+
/** Whether a drag is currently in progress */
|
|
11
|
+
isDragging: Ref<boolean>;
|
|
12
|
+
/** Horizontal offset in pixels of the actively dragged column */
|
|
13
|
+
dragOffsetX: Ref<number>;
|
|
14
|
+
/** The index in reorderedHeaders where the drop indicator should appear */
|
|
15
|
+
dragOverIndex: Ref<number | null>;
|
|
16
|
+
/** The key of the column being dragged */
|
|
17
|
+
dragSourceKey: Ref<string | null>;
|
|
18
|
+
/** Start a drag for the given header key */
|
|
19
|
+
startDrag: (key: string, event: PointerEvent, onEnd: (payload: {
|
|
20
|
+
keys: string[];
|
|
21
|
+
fromIndex: number;
|
|
22
|
+
toIndex: number;
|
|
23
|
+
}) => void) => void;
|
|
24
|
+
/** Cancel the current drag and restore original order */
|
|
25
|
+
cancelDrag: () => void;
|
|
26
|
+
/** Update the drop target index based on pointer position over the thead */
|
|
27
|
+
updateDragOver: (index: number) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function useColumnReorder<T = any>(headers: Ref<TableHeader<T>[]>, options?: UseColumnReorderOptions): UseColumnReorderReturn<T>;
|
package/dist/types/src/components/input/dropdown/Multiselect/MultiselectContentWrapper.vue.d.ts
CHANGED
|
@@ -28,6 +28,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
28
|
options: ArrayConstructor;
|
|
29
29
|
hasOptionGroup: BooleanConstructor;
|
|
30
30
|
search: StringConstructor;
|
|
31
|
+
externalSearch: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
31
35
|
loading: BooleanConstructor;
|
|
32
36
|
showNoResults: BooleanConstructor;
|
|
33
37
|
showNoOptions: BooleanConstructor;
|
|
@@ -67,6 +71,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
67
71
|
options: ArrayConstructor;
|
|
68
72
|
hasOptionGroup: BooleanConstructor;
|
|
69
73
|
search: StringConstructor;
|
|
74
|
+
externalSearch: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
70
78
|
loading: BooleanConstructor;
|
|
71
79
|
showNoResults: BooleanConstructor;
|
|
72
80
|
showNoOptions: BooleanConstructor;
|
|
@@ -84,6 +92,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
84
92
|
id: string | number;
|
|
85
93
|
multiple: boolean;
|
|
86
94
|
showNoResults: boolean;
|
|
95
|
+
externalSearch: string;
|
|
87
96
|
showNoOptions: boolean;
|
|
88
97
|
hasOptionGroup: boolean;
|
|
89
98
|
contentStyle: Record<string, any>;
|
|
@@ -17,6 +17,8 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
|
17
17
|
autoFlip: boolean;
|
|
18
18
|
closeOnTriggerHidden: boolean;
|
|
19
19
|
triggerOnHover: boolean;
|
|
20
|
+
triggerTag: string;
|
|
21
|
+
triggerAriaLabel?: string | undefined;
|
|
20
22
|
$props: {
|
|
21
23
|
readonly width?: number | undefined;
|
|
22
24
|
readonly placement?: string | undefined;
|
|
@@ -27,6 +29,8 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
|
27
29
|
readonly autoFlip?: boolean | undefined;
|
|
28
30
|
readonly closeOnTriggerHidden?: boolean | undefined;
|
|
29
31
|
readonly triggerOnHover?: boolean | undefined;
|
|
32
|
+
readonly triggerTag?: string | undefined;
|
|
33
|
+
readonly triggerAriaLabel?: string | undefined;
|
|
30
34
|
};
|
|
31
35
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
36
|
type __VLS_Slots = {
|
|
@@ -28,18 +28,22 @@ interface RDSPopoverMenuProps {
|
|
|
28
28
|
closeOnTriggerHidden: boolean;
|
|
29
29
|
/** Si true abre/cierra con hover/focus (desktop). Por defecto sólo click */
|
|
30
30
|
triggerOnHover?: boolean;
|
|
31
|
+
/** Tag HTML para el contenedor del trigger */
|
|
32
|
+
triggerTag?: string;
|
|
33
|
+
/** Aria-label del contenedor del trigger */
|
|
34
|
+
triggerAriaLabel?: string;
|
|
31
35
|
}
|
|
32
|
-
declare var
|
|
36
|
+
declare var __VLS_15: {}, __VLS_21: {}, __VLS_23: {
|
|
33
37
|
item: RDSPopoverMenuItem;
|
|
34
38
|
index: number;
|
|
35
39
|
onSelect: () => void;
|
|
36
40
|
};
|
|
37
41
|
type __VLS_Slots = {} & {
|
|
38
|
-
trigger?: (props: typeof
|
|
42
|
+
trigger?: (props: typeof __VLS_15) => any;
|
|
39
43
|
} & {
|
|
40
|
-
default?: (props: typeof
|
|
44
|
+
default?: (props: typeof __VLS_21) => any;
|
|
41
45
|
} & {
|
|
42
|
-
item?: (props: typeof
|
|
46
|
+
item?: (props: typeof __VLS_23) => any;
|
|
43
47
|
};
|
|
44
48
|
declare const __VLS_component: import("vue").DefineComponent<RDSPopoverMenuProps, {
|
|
45
49
|
/** Alterna el estado abierto/cerrado del popover */
|
|
@@ -66,6 +70,8 @@ declare const __VLS_component: import("vue").DefineComponent<RDSPopoverMenuProps
|
|
|
66
70
|
autoFlip: boolean;
|
|
67
71
|
closeOnTriggerHidden: boolean;
|
|
68
72
|
triggerOnHover: boolean;
|
|
73
|
+
triggerTag: string;
|
|
74
|
+
triggerAriaLabel: string;
|
|
69
75
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
70
76
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
71
77
|
export default _default;
|