@zauru-sdk/components 6.5.3 → 6.5.5
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/CHANGELOG.md +22 -0
- package/dist/esm/Table/ZauruTable.js +30 -5
- package/package.json +2 -2
- package/src/Table/ZauruTable.tsx +31 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.5.5](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.5.4...@zauru-sdk/components@6.5.5) (2026-09-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* estirar filas de ZauruTable al ancho del contenido al hacer scroll ([de57d25](https://github.com/intuitiva/zauru-typescript-sdk/commit/de57d25243d907a889aba0a5e05328646b50b5cb))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [6.5.4](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.5.3...@zauru-sdk/components@6.5.4) (2026-09-16)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* envolver celdas de ZauruTable por palabra sin recortar números ([02d734b](https://github.com/intuitiva/zauru-typescript-sdk/commit/02d734b66d3089c8002b0d5bd04db82c90691722))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [6.5.3](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.5.1...@zauru-sdk/components@6.5.3) (2026-09-16)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -10,13 +10,18 @@ const headerTextWrapStyle = {
|
|
|
10
10
|
overflow: "visible",
|
|
11
11
|
textOverflow: "clip",
|
|
12
12
|
overflowWrap: "break-word",
|
|
13
|
-
wordBreak: "
|
|
13
|
+
wordBreak: "normal",
|
|
14
14
|
lineHeight: "1.25",
|
|
15
15
|
};
|
|
16
|
+
const fullContentWidthStyle = {
|
|
17
|
+
width: "max-content",
|
|
18
|
+
minWidth: "100%",
|
|
19
|
+
maxWidth: "none",
|
|
20
|
+
};
|
|
16
21
|
const customStyles = {
|
|
17
22
|
table: {
|
|
18
23
|
style: {
|
|
19
|
-
|
|
24
|
+
...fullContentWidthStyle,
|
|
20
25
|
},
|
|
21
26
|
},
|
|
22
27
|
tableWrapper: {
|
|
@@ -36,11 +41,17 @@ const customStyles = {
|
|
|
36
41
|
overflowX: "auto",
|
|
37
42
|
},
|
|
38
43
|
},
|
|
44
|
+
head: {
|
|
45
|
+
style: {
|
|
46
|
+
...fullContentWidthStyle,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
39
49
|
headRow: {
|
|
40
50
|
style: {
|
|
41
51
|
minHeight: "40px",
|
|
42
52
|
height: "auto",
|
|
43
53
|
alignItems: "stretch",
|
|
54
|
+
...fullContentWidthStyle,
|
|
44
55
|
},
|
|
45
56
|
denseStyle: {
|
|
46
57
|
minHeight: "36px",
|
|
@@ -68,8 +79,11 @@ const customStyles = {
|
|
|
68
79
|
},
|
|
69
80
|
cells: {
|
|
70
81
|
style: {
|
|
71
|
-
whiteSpace: "normal",
|
|
72
|
-
|
|
82
|
+
whiteSpace: "normal",
|
|
83
|
+
overflow: "visible",
|
|
84
|
+
textOverflow: "clip",
|
|
85
|
+
overflowWrap: "break-word",
|
|
86
|
+
wordBreak: "normal",
|
|
73
87
|
},
|
|
74
88
|
},
|
|
75
89
|
expanderRow: {
|
|
@@ -83,6 +97,9 @@ const customStyles = {
|
|
|
83
97
|
},
|
|
84
98
|
},
|
|
85
99
|
rows: {
|
|
100
|
+
style: {
|
|
101
|
+
...fullContentWidthStyle,
|
|
102
|
+
},
|
|
86
103
|
highlightOnHoverStyle: {
|
|
87
104
|
backgroundColor: "rgb(230, 244, 244)",
|
|
88
105
|
borderBottomColor: "#FFFFFF",
|
|
@@ -211,7 +228,15 @@ export const ZauruTable = (props) => {
|
|
|
211
228
|
};
|
|
212
229
|
const loadSubHeader = !!(search || offlineSearch.length > 0);
|
|
213
230
|
const subHeaderComponent = loadSubHeader ? subHeaderComponentMemo : undefined;
|
|
214
|
-
|
|
231
|
+
const normalizedColumns = Array.isArray(columns)
|
|
232
|
+
? columns.map((column) => {
|
|
233
|
+
if (!column || typeof column !== "object") {
|
|
234
|
+
return column;
|
|
235
|
+
}
|
|
236
|
+
return { wrap: true, ...column };
|
|
237
|
+
})
|
|
238
|
+
: columns;
|
|
239
|
+
return (_jsx("div", { className: "w-full min-w-0 max-w-full overflow-x-auto", children: _jsx(DataTable, { className: className, subHeaderWrap: true, theme: theme ?? "solarized", columns: normalizedColumns, conditionalRowStyles: conditionalRowStyles, data: filteredData, customStyles: customStyles, progressPending: loading, highlightOnHover: true, pointerOnHover: true, dense: true, striped: true, pagination: !whitOutPagination, persistTableHead: true, responsive: true, noHeader: true, expandableRows: !!expandable, expandOnRowClicked: !!expandable, expandableRowExpanded: expandable ? expandable.expandableRowExpanded : undefined, expandableRowsComponent: expandable ? expandable.expandableRowsComponent : undefined, subHeader: loadSubHeader, subHeaderComponent: subHeaderComponent, paginationServer: !!pagination, paginationTotalRows: pagination?.totalRows ?? undefined, onChangeRowsPerPage: pagination ? handlePerRowsChange : undefined, onChangePage: pagination ? handlePageChange : undefined, paginationComponentOptions: paginationComponentOptions, paginationRowsPerPageOptions: pagination?.rowsPerPageOptions
|
|
215
240
|
? pagination.rowsPerPageOptions
|
|
216
241
|
: [10, 50, 100], ...others }) }));
|
|
217
242
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/components",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.5",
|
|
4
4
|
"description": "Componentes reutilizables en las WebApps de Zauru.",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"styled-components": "^5.3.5",
|
|
63
63
|
"zod": "^3.23.8"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c157999c77c4d4a5cbb926466b8f3947b00f12f4"
|
|
66
66
|
}
|
package/src/Table/ZauruTable.tsx
CHANGED
|
@@ -16,14 +16,20 @@ const headerTextWrapStyle = {
|
|
|
16
16
|
overflow: "visible",
|
|
17
17
|
textOverflow: "clip",
|
|
18
18
|
overflowWrap: "break-word",
|
|
19
|
-
wordBreak: "
|
|
19
|
+
wordBreak: "normal",
|
|
20
20
|
lineHeight: "1.25",
|
|
21
21
|
} as const;
|
|
22
22
|
|
|
23
|
+
const fullContentWidthStyle = {
|
|
24
|
+
width: "max-content",
|
|
25
|
+
minWidth: "100%",
|
|
26
|
+
maxWidth: "none",
|
|
27
|
+
} as const;
|
|
28
|
+
|
|
23
29
|
const customStyles: TableStyles = {
|
|
24
30
|
table: {
|
|
25
31
|
style: {
|
|
26
|
-
|
|
32
|
+
...fullContentWidthStyle,
|
|
27
33
|
},
|
|
28
34
|
},
|
|
29
35
|
tableWrapper: {
|
|
@@ -43,11 +49,17 @@ const customStyles: TableStyles = {
|
|
|
43
49
|
overflowX: "auto",
|
|
44
50
|
},
|
|
45
51
|
},
|
|
52
|
+
head: {
|
|
53
|
+
style: {
|
|
54
|
+
...fullContentWidthStyle,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
46
57
|
headRow: {
|
|
47
58
|
style: {
|
|
48
59
|
minHeight: "40px",
|
|
49
60
|
height: "auto",
|
|
50
61
|
alignItems: "stretch",
|
|
62
|
+
...fullContentWidthStyle,
|
|
51
63
|
},
|
|
52
64
|
denseStyle: {
|
|
53
65
|
minHeight: "36px",
|
|
@@ -75,8 +87,11 @@ const customStyles: TableStyles = {
|
|
|
75
87
|
},
|
|
76
88
|
cells: {
|
|
77
89
|
style: {
|
|
78
|
-
whiteSpace: "normal",
|
|
79
|
-
|
|
90
|
+
whiteSpace: "normal",
|
|
91
|
+
overflow: "visible",
|
|
92
|
+
textOverflow: "clip",
|
|
93
|
+
overflowWrap: "break-word",
|
|
94
|
+
wordBreak: "normal",
|
|
80
95
|
},
|
|
81
96
|
},
|
|
82
97
|
expanderRow: {
|
|
@@ -90,6 +105,9 @@ const customStyles: TableStyles = {
|
|
|
90
105
|
},
|
|
91
106
|
},
|
|
92
107
|
rows: {
|
|
108
|
+
style: {
|
|
109
|
+
...fullContentWidthStyle,
|
|
110
|
+
},
|
|
93
111
|
highlightOnHoverStyle: {
|
|
94
112
|
backgroundColor: "rgb(230, 244, 244)",
|
|
95
113
|
borderBottomColor: "#FFFFFF",
|
|
@@ -289,6 +307,14 @@ export const ZauruTable = (props: Props) => {
|
|
|
289
307
|
|
|
290
308
|
const loadSubHeader = !!(search || offlineSearch.length > 0);
|
|
291
309
|
const subHeaderComponent = loadSubHeader ? subHeaderComponentMemo : undefined;
|
|
310
|
+
const normalizedColumns = Array.isArray(columns)
|
|
311
|
+
? columns.map((column: any) => {
|
|
312
|
+
if (!column || typeof column !== "object") {
|
|
313
|
+
return column;
|
|
314
|
+
}
|
|
315
|
+
return { wrap: true, ...column };
|
|
316
|
+
})
|
|
317
|
+
: columns;
|
|
292
318
|
|
|
293
319
|
return (
|
|
294
320
|
<div className="w-full min-w-0 max-w-full overflow-x-auto">
|
|
@@ -296,7 +322,7 @@ export const ZauruTable = (props: Props) => {
|
|
|
296
322
|
className={className}
|
|
297
323
|
subHeaderWrap
|
|
298
324
|
theme={theme ?? "solarized"}
|
|
299
|
-
columns={
|
|
325
|
+
columns={normalizedColumns}
|
|
300
326
|
conditionalRowStyles={conditionalRowStyles}
|
|
301
327
|
data={filteredData}
|
|
302
328
|
customStyles={customStyles}
|