@orfium/ictinus 4.47.1 → 4.48.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/Table/Table.d.ts +3 -1
- package/dist/components/Table/Table.js +3 -0
- package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.d.ts +2 -1
- package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.js +3 -2
- package/dist/components/Table/components/TableRowWrapper/TableRowWrapper.d.ts +1 -0
- package/dist/components/Table/components/TableRowWrapper/TableRowWrapper.js +3 -1
- package/package.json +1 -1
|
@@ -49,9 +49,11 @@ declare type Props<T> = {
|
|
|
49
49
|
topRightArea?: (data: Row<T>[], selectionData?: Selection[]) => React.Component | JSX.Element;
|
|
50
50
|
/** Action cell width for Table with Expandable Rows (in %)*/
|
|
51
51
|
actionWidth?: number;
|
|
52
|
+
/** If true, table's expandable rows will be expanded on initial render. */
|
|
53
|
+
initialExpanded?: boolean;
|
|
52
54
|
/** Data test id prefix for all th/td elements */
|
|
53
55
|
dataTestIdPrefix?: string;
|
|
54
56
|
};
|
|
55
|
-
declare function Table<T>({ data, columns, type, fixedHeader, fixedCTA, onCheck, padded, onSort, initialSort, sortDir, topLeftText, topRightArea, actionWidth, dataTestIdPrefix, }: Props<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
57
|
+
declare function Table<T>({ data, columns, type, fixedHeader, fixedCTA, onCheck, padded, onSort, initialSort, sortDir, topLeftText, topRightArea, actionWidth, initialExpanded, dataTestIdPrefix, }: Props<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
56
58
|
declare const _default: React.MemoExoticComponent<typeof Table>;
|
|
57
59
|
export default _default;
|
|
@@ -69,6 +69,8 @@ function Table(_ref) {
|
|
|
69
69
|
topLeftText = _ref.topLeftText,
|
|
70
70
|
topRightArea = _ref.topRightArea,
|
|
71
71
|
actionWidth = _ref.actionWidth,
|
|
72
|
+
_ref$initialExpanded = _ref.initialExpanded,
|
|
73
|
+
initialExpanded = _ref$initialExpanded === void 0 ? false : _ref$initialExpanded,
|
|
72
74
|
dataTestIdPrefix = _ref.dataTestIdPrefix;
|
|
73
75
|
var breakpoints = (0, _useBreakpoints["default"])();
|
|
74
76
|
var actionCellWidth = actionWidth ? actionWidth + "%" : breakpoints.des1920 ? '5%' : '7%';
|
|
@@ -258,6 +260,7 @@ function Table(_ref) {
|
|
|
258
260
|
onSelectionChangeExist: Boolean(onCheck),
|
|
259
261
|
expanded: Boolean(row.expanded),
|
|
260
262
|
actionWidth: actionWidth,
|
|
263
|
+
initialExpanded: initialExpanded,
|
|
261
264
|
dataTestIdPrefix: dataTestIdPrefix,
|
|
262
265
|
rowIndex: index + 1
|
|
263
266
|
})
|
|
@@ -2,10 +2,11 @@ import { Row } from '../../Table';
|
|
|
2
2
|
declare const _default: {
|
|
3
3
|
<T extends {
|
|
4
4
|
[key: string]: unknown;
|
|
5
|
-
}>({ row, dataTestIdPrefix, rowIndex, }: {
|
|
5
|
+
}>({ row, dataTestIdPrefix, rowIndex, initialExpanded, }: {
|
|
6
6
|
row: Row<T>;
|
|
7
7
|
dataTestIdPrefix?: string | undefined;
|
|
8
8
|
rowIndex?: number | undefined;
|
|
9
|
+
initialExpanded: boolean;
|
|
9
10
|
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
11
|
displayName: string;
|
|
11
12
|
};
|
|
@@ -124,7 +124,8 @@ RenderRowWithCells.displayName = 'RenderRowWithCells';
|
|
|
124
124
|
var RenderRowOrNestedRow = function RenderRowOrNestedRow(_ref3) {
|
|
125
125
|
var row = _ref3.row,
|
|
126
126
|
dataTestIdPrefix = _ref3.dataTestIdPrefix,
|
|
127
|
-
rowIndex = _ref3.rowIndex
|
|
127
|
+
rowIndex = _ref3.rowIndex,
|
|
128
|
+
initialExpanded = _ref3.initialExpanded;
|
|
128
129
|
|
|
129
130
|
var _React$useContext2 = React.useContext(_TableRowContext.TableRowContext),
|
|
130
131
|
isRowSelected = _React$useContext2.isRowSelected,
|
|
@@ -133,7 +134,7 @@ var RenderRowOrNestedRow = function RenderRowOrNestedRow(_ref3) {
|
|
|
133
134
|
|
|
134
135
|
var expanded = row.expanded;
|
|
135
136
|
|
|
136
|
-
var _useToggle = (0, _useToggle2["default"])(
|
|
137
|
+
var _useToggle = (0, _useToggle2["default"])(initialExpanded),
|
|
137
138
|
checked = _useToggle[0],
|
|
138
139
|
toggleChecked = _useToggle[1];
|
|
139
140
|
|
|
@@ -26,6 +26,7 @@ var TableRowWrapper = function TableRowWrapper(props) {
|
|
|
26
26
|
onSelectionChangeExist = props.onSelectionChangeExist,
|
|
27
27
|
expanded = props.expanded,
|
|
28
28
|
actionWidth = props.actionWidth,
|
|
29
|
+
initialExpanded = props.initialExpanded,
|
|
29
30
|
dataTestIdPrefix = props.dataTestIdPrefix,
|
|
30
31
|
rowIndex = props.rowIndex;
|
|
31
32
|
|
|
@@ -51,7 +52,8 @@ var TableRowWrapper = function TableRowWrapper(props) {
|
|
|
51
52
|
}, (0, _react2.jsx)(_RenderRowOrNestedRow["default"], {
|
|
52
53
|
row: row,
|
|
53
54
|
dataTestIdPrefix: dataTestIdPrefix,
|
|
54
|
-
rowIndex: rowIndex
|
|
55
|
+
rowIndex: rowIndex,
|
|
56
|
+
initialExpanded: initialExpanded
|
|
55
57
|
}));
|
|
56
58
|
};
|
|
57
59
|
|