@zauru-sdk/components 6.5.5 → 6.5.6
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 +11 -0
- package/dist/esm/Table/ZauruTable.js +18 -7
- package/package.json +2 -2
- package/src/Table/ZauruTable.tsx +18 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.6](https://github.com/intuitiva/zauru-typescript-sdk/compare/@zauru-sdk/components@6.5.5...@zauru-sdk/components@6.5.6) (2026-09-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* resolver width % de ZauruTable contra el contenedor ([9518a4d](https://github.com/intuitiva/zauru-typescript-sdk/commit/9518a4d8d40d7655b26e0e25450e20cba271ac34))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [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
18
|
|
|
8
19
|
|
|
@@ -13,15 +13,15 @@ const headerTextWrapStyle = {
|
|
|
13
13
|
wordBreak: "normal",
|
|
14
14
|
lineHeight: "1.25",
|
|
15
15
|
};
|
|
16
|
-
const
|
|
17
|
-
width: "
|
|
16
|
+
const fillContainerWidthStyle = {
|
|
17
|
+
width: "100%",
|
|
18
18
|
minWidth: "100%",
|
|
19
19
|
maxWidth: "none",
|
|
20
20
|
};
|
|
21
21
|
const customStyles = {
|
|
22
22
|
table: {
|
|
23
23
|
style: {
|
|
24
|
-
...
|
|
24
|
+
...fillContainerWidthStyle,
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
tableWrapper: {
|
|
@@ -43,7 +43,7 @@ const customStyles = {
|
|
|
43
43
|
},
|
|
44
44
|
head: {
|
|
45
45
|
style: {
|
|
46
|
-
...
|
|
46
|
+
...fillContainerWidthStyle,
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
headRow: {
|
|
@@ -51,7 +51,7 @@ const customStyles = {
|
|
|
51
51
|
minHeight: "40px",
|
|
52
52
|
height: "auto",
|
|
53
53
|
alignItems: "stretch",
|
|
54
|
-
...
|
|
54
|
+
...fillContainerWidthStyle,
|
|
55
55
|
},
|
|
56
56
|
denseStyle: {
|
|
57
57
|
minHeight: "36px",
|
|
@@ -98,7 +98,7 @@ const customStyles = {
|
|
|
98
98
|
},
|
|
99
99
|
rows: {
|
|
100
100
|
style: {
|
|
101
|
-
...
|
|
101
|
+
...fillContainerWidthStyle,
|
|
102
102
|
},
|
|
103
103
|
highlightOnHoverStyle: {
|
|
104
104
|
backgroundColor: "rgb(230, 244, 244)",
|
|
@@ -233,7 +233,18 @@ export const ZauruTable = (props) => {
|
|
|
233
233
|
if (!column || typeof column !== "object") {
|
|
234
234
|
return column;
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
const next = { wrap: true, ...column };
|
|
237
|
+
// RDT `width` sets both min-width and max-width, wiping a px floor.
|
|
238
|
+
// Keep % as flex-basis so minWidth/maxWidth/grow still apply.
|
|
239
|
+
if (typeof next.width === "string" && next.width.endsWith("%")) {
|
|
240
|
+
const pct = next.width;
|
|
241
|
+
delete next.width;
|
|
242
|
+
next.style = {
|
|
243
|
+
flexBasis: pct,
|
|
244
|
+
...next.style,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
return next;
|
|
237
248
|
})
|
|
238
249
|
: columns;
|
|
239
250
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/components",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.6",
|
|
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": "563f879c95b2f3e76bc28623a9e09c8a103c599e"
|
|
66
66
|
}
|
package/src/Table/ZauruTable.tsx
CHANGED
|
@@ -20,8 +20,8 @@ const headerTextWrapStyle = {
|
|
|
20
20
|
lineHeight: "1.25",
|
|
21
21
|
} as const;
|
|
22
22
|
|
|
23
|
-
const
|
|
24
|
-
width: "
|
|
23
|
+
const fillContainerWidthStyle = {
|
|
24
|
+
width: "100%",
|
|
25
25
|
minWidth: "100%",
|
|
26
26
|
maxWidth: "none",
|
|
27
27
|
} as const;
|
|
@@ -29,7 +29,7 @@ const fullContentWidthStyle = {
|
|
|
29
29
|
const customStyles: TableStyles = {
|
|
30
30
|
table: {
|
|
31
31
|
style: {
|
|
32
|
-
...
|
|
32
|
+
...fillContainerWidthStyle,
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
tableWrapper: {
|
|
@@ -51,7 +51,7 @@ const customStyles: TableStyles = {
|
|
|
51
51
|
},
|
|
52
52
|
head: {
|
|
53
53
|
style: {
|
|
54
|
-
...
|
|
54
|
+
...fillContainerWidthStyle,
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
57
|
headRow: {
|
|
@@ -59,7 +59,7 @@ const customStyles: TableStyles = {
|
|
|
59
59
|
minHeight: "40px",
|
|
60
60
|
height: "auto",
|
|
61
61
|
alignItems: "stretch",
|
|
62
|
-
...
|
|
62
|
+
...fillContainerWidthStyle,
|
|
63
63
|
},
|
|
64
64
|
denseStyle: {
|
|
65
65
|
minHeight: "36px",
|
|
@@ -106,7 +106,7 @@ const customStyles: TableStyles = {
|
|
|
106
106
|
},
|
|
107
107
|
rows: {
|
|
108
108
|
style: {
|
|
109
|
-
...
|
|
109
|
+
...fillContainerWidthStyle,
|
|
110
110
|
},
|
|
111
111
|
highlightOnHoverStyle: {
|
|
112
112
|
backgroundColor: "rgb(230, 244, 244)",
|
|
@@ -312,7 +312,18 @@ export const ZauruTable = (props: Props) => {
|
|
|
312
312
|
if (!column || typeof column !== "object") {
|
|
313
313
|
return column;
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
const next = { wrap: true, ...column };
|
|
316
|
+
// RDT `width` sets both min-width and max-width, wiping a px floor.
|
|
317
|
+
// Keep % as flex-basis so minWidth/maxWidth/grow still apply.
|
|
318
|
+
if (typeof next.width === "string" && next.width.endsWith("%")) {
|
|
319
|
+
const pct = next.width;
|
|
320
|
+
delete next.width;
|
|
321
|
+
next.style = {
|
|
322
|
+
flexBasis: pct,
|
|
323
|
+
...next.style,
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
return next;
|
|
316
327
|
})
|
|
317
328
|
: columns;
|
|
318
329
|
|