@patternfly/react-table 4.91.2 → 4.91.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 +24 -0
- package/dist/esm/components/Table/Body.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/cellActions.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/collapsible.d.ts.map +1 -1
- package/dist/esm/components/Table/utils/decorators/collapsible.js +1 -1
- package/dist/esm/components/Table/utils/decorators/collapsible.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/info.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/selectable.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/sortable.js.map +1 -1
- package/dist/esm/components/Table/utils/decorators/treeRow.d.ts.map +1 -1
- package/dist/esm/components/Table/utils/decorators/treeRow.js.map +1 -1
- package/dist/esm/components/Table/utils/formatters.d.ts.map +1 -1
- package/dist/esm/components/Table/utils/formatters.js.map +1 -1
- package/dist/js/components/Table/Body.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/cellActions.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/collapsible.d.ts.map +1 -1
- package/dist/js/components/Table/utils/decorators/collapsible.js +1 -1
- package/dist/js/components/Table/utils/decorators/collapsible.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/info.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/selectable.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/sortable.js.map +1 -1
- package/dist/js/components/Table/utils/decorators/treeRow.d.ts.map +1 -1
- package/dist/js/components/Table/utils/decorators/treeRow.js.map +1 -1
- package/dist/js/components/Table/utils/formatters.d.ts.map +1 -1
- package/dist/js/components/Table/utils/formatters.js.map +1 -1
- package/dist/umd/react-table.css +1 -5
- package/dist/umd/react-table.js +6 -5
- package/dist/umd/react-table.min.css +1 -5
- package/dist/umd/react-table.min.js +1 -1
- package/package.json +6 -6
- package/src/components/Table/Body.tsx +1 -1
- package/src/components/Table/utils/decorators/cellActions.tsx +1 -1
- package/src/components/Table/utils/decorators/collapsible.tsx +6 -2
- package/src/components/Table/utils/decorators/info.tsx +2 -2
- package/src/components/Table/utils/decorators/selectable.tsx +1 -1
- package/src/components/Table/utils/decorators/sortable.tsx +1 -1
- package/src/components/Table/utils/decorators/treeRow.tsx +6 -4
- package/src/components/Table/utils/formatters.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "4.91.
|
|
3
|
+
"version": "4.91.5",
|
|
4
4
|
"description": "This library provides a set of React table components for use with the PatternFly 4",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"clean": "rimraf dist"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@patternfly/react-core": "^4.222.
|
|
35
|
-
"@patternfly/react-icons": "^4.73.
|
|
36
|
-
"@patternfly/react-styles": "^4.72.
|
|
37
|
-
"@patternfly/react-tokens": "^4.74.
|
|
34
|
+
"@patternfly/react-core": "^4.222.5",
|
|
35
|
+
"@patternfly/react-icons": "^4.73.5",
|
|
36
|
+
"@patternfly/react-styles": "^4.72.5",
|
|
37
|
+
"@patternfly/react-tokens": "^4.74.5",
|
|
38
38
|
"lodash": "^4.17.19",
|
|
39
39
|
"tslib": "^2.0.0"
|
|
40
40
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": "^16.8.0 || ^17.0.0",
|
|
47
47
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "5e748b4b49ef95edbf3bf15eb0684724f416f6c3"
|
|
50
50
|
}
|
|
@@ -121,7 +121,7 @@ class ContextBody extends React.Component<TableBodyProps, {}> {
|
|
|
121
121
|
}
|
|
122
122
|
const mappedCell: IMappedCell = {
|
|
123
123
|
[headerData[cellIndex + additionalColsIndexShift].property]: {
|
|
124
|
-
title: mappedCellTitle,
|
|
124
|
+
title: mappedCellTitle as React.ReactNode,
|
|
125
125
|
formatters,
|
|
126
126
|
props: {
|
|
127
127
|
isVisible: true,
|
|
@@ -58,14 +58,18 @@ export const collapsible: IFormatter = (
|
|
|
58
58
|
id={expandId + rowId}
|
|
59
59
|
{...customProps}
|
|
60
60
|
>
|
|
61
|
-
{value}
|
|
61
|
+
{value as React.ReactNode}
|
|
62
62
|
</CollapseColumn>
|
|
63
63
|
)
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export const expandable: IFormatter = (value: IFormatterValueType, { rowData }: IExtra) =>
|
|
68
|
-
rowData && rowData.hasOwnProperty('parent') ?
|
|
68
|
+
rowData && rowData.hasOwnProperty('parent') ? (
|
|
69
|
+
<ExpandableRowContent>{value as React.ReactNode}</ExpandableRowContent>
|
|
70
|
+
) : (
|
|
71
|
+
value
|
|
72
|
+
);
|
|
69
73
|
|
|
70
74
|
export const expandedRow = (colSpan?: number) => {
|
|
71
75
|
const expandedRowFormatter = (
|
|
@@ -15,7 +15,7 @@ export const info = ({ tooltip, tooltipProps, popover, popoverProps, className,
|
|
|
15
15
|
ariaLabel={ariaLabel}
|
|
16
16
|
className={className}
|
|
17
17
|
>
|
|
18
|
-
{value}
|
|
18
|
+
{value as React.ReactNode}
|
|
19
19
|
</HeaderCellInfoWrapper>
|
|
20
20
|
) : (
|
|
21
21
|
<HeaderCellInfoWrapper
|
|
@@ -25,7 +25,7 @@ export const info = ({ tooltip, tooltipProps, popover, popoverProps, className,
|
|
|
25
25
|
ariaLabel={ariaLabel}
|
|
26
26
|
className={className}
|
|
27
27
|
>
|
|
28
|
-
{value}
|
|
28
|
+
{value as React.ReactNode}
|
|
29
29
|
</HeaderCellInfoWrapper>
|
|
30
30
|
)
|
|
31
31
|
});
|
|
@@ -33,12 +33,12 @@ export const treeRow = (
|
|
|
33
33
|
</span>
|
|
34
34
|
)}
|
|
35
35
|
<span className="pf-c-table__text" key="table-text">
|
|
36
|
-
{content}
|
|
36
|
+
{content as React.ReactNode}
|
|
37
37
|
</span>
|
|
38
38
|
</div>
|
|
39
39
|
);
|
|
40
40
|
const onChange = (isChecked: boolean, event: React.FormEvent<HTMLInputElement>) => {
|
|
41
|
-
onCheckChange(event, isChecked, rowIndex, content, rowData);
|
|
41
|
+
onCheckChange(event, isChecked, rowIndex, content as React.ReactNode, rowData);
|
|
42
42
|
};
|
|
43
43
|
return {
|
|
44
44
|
component: 'th',
|
|
@@ -50,7 +50,7 @@ export const treeRow = (
|
|
|
50
50
|
<span className={css(stylesTreeView.tableToggle)} key="table-toggle">
|
|
51
51
|
<Button
|
|
52
52
|
variant="plain"
|
|
53
|
-
onClick={event => onCollapse && onCollapse(event, rowIndex, content, rowData)}
|
|
53
|
+
onClick={event => onCollapse && onCollapse(event, rowIndex, content as React.ReactNode, rowData)}
|
|
54
54
|
className={css(isExpanded && styles.modifiers.expanded)}
|
|
55
55
|
aria-expanded={isExpanded}
|
|
56
56
|
aria-label={toggleAriaLabel || `${isExpanded ? 'Collapse' : 'Expand'} row ${rowIndex}`}
|
|
@@ -80,7 +80,9 @@ export const treeRow = (
|
|
|
80
80
|
variant="plain"
|
|
81
81
|
aria-expanded={isDetailsExpanded}
|
|
82
82
|
aria-label={showDetailsAriaLabel || 'Show row details'}
|
|
83
|
-
onClick={event =>
|
|
83
|
+
onClick={event =>
|
|
84
|
+
onToggleRowDetails && onToggleRowDetails(event, rowIndex, content as React.ReactNode, rowData)
|
|
85
|
+
}
|
|
84
86
|
>
|
|
85
87
|
<span className="pf-c-table__details-toggle-icon">
|
|
86
88
|
<EllipsisHIcon aria-hidden />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IFormatterValueType, IFormatter } from '../TableTypes';
|
|
2
2
|
|
|
3
3
|
const defaultTitle: IFormatter = (data: IFormatterValueType) =>
|
|
4
|
-
data && data.hasOwnProperty('title') ? data.title : data;
|
|
4
|
+
data && data.hasOwnProperty('title') ? (data.title as any) : data;
|
|
5
5
|
|
|
6
6
|
export { defaultTitle };
|