@orfium/ictinus 4.83.1 → 4.84.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/TableRowContext.d.ts +2 -1
- package/dist/components/Table/components/RenderRowOrNestedRow/RenderRowOrNestedRow.js +4 -4
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/ContentCell.d.ts +3 -2
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/ContentCell.js +17 -7
- package/dist/components/Table/components/TableRowWrapper/TableRowWrapper.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Row, TableType } from './Table';
|
|
3
|
+
import { ExtendedColumn } from 'components/Table/types';
|
|
3
4
|
export declare type TableRowContextProps<T extends {
|
|
4
5
|
[key: string]: unknown;
|
|
5
6
|
}> = {
|
|
@@ -9,7 +10,7 @@ export declare type TableRowContextProps<T extends {
|
|
|
9
10
|
onSelectionChangeExist: boolean;
|
|
10
11
|
isRowSelected: boolean;
|
|
11
12
|
columnCount: number;
|
|
12
|
-
columns: string[];
|
|
13
|
+
columns: (string | ExtendedColumn)[];
|
|
13
14
|
fixedHeader: boolean;
|
|
14
15
|
tChange: () => void;
|
|
15
16
|
type: TableType;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
5
|
var React = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _ContentCell = _interopRequireDefault(require("./components/ContentCell"));
|
|
7
|
+
var _ExpandedButtonCell = _interopRequireDefault(require("./components/ExpandedButtonCell"));
|
|
8
|
+
var _RenderRowOrNestedRow = require("./RenderRowOrNestedRow.style");
|
|
6
9
|
var _useToggle2 = _interopRequireDefault(require("../../../../hooks/useToggle"));
|
|
7
10
|
var _helpers = require("../../../../utils/helpers");
|
|
8
11
|
var _CheckBox = _interopRequireDefault(require("../../../CheckBox"));
|
|
@@ -10,9 +13,6 @@ var _Table = require("../../Table.style");
|
|
|
10
13
|
var _TableRowContext = require("../../TableRowContext");
|
|
11
14
|
var _TableCell = _interopRequireDefault(require("../TableCell"));
|
|
12
15
|
var _TableRow = _interopRequireDefault(require("../TableRow"));
|
|
13
|
-
var _ContentCell = _interopRequireDefault(require("./components/ContentCell"));
|
|
14
|
-
var _ExpandedButtonCell = _interopRequireDefault(require("./components/ExpandedButtonCell"));
|
|
15
|
-
var _RenderRowOrNestedRow = require("./RenderRowOrNestedRow.style");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -77,7 +77,7 @@ var RenderRowWithCells = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
77
77
|
cellCounter: index,
|
|
78
78
|
columnWidth: columnsWithWidth[index],
|
|
79
79
|
columns: columns,
|
|
80
|
-
tooltipContent: hasTruncatedTooltip ?
|
|
80
|
+
tooltipContent: hasTruncatedTooltip ? tooltipContent : null,
|
|
81
81
|
padded: padded,
|
|
82
82
|
colSpan: colSpan,
|
|
83
83
|
content: content,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContentComponent, TableType } from '../../../../Table';
|
|
3
|
+
import { ExtendedColumn } from 'components/Table/types';
|
|
3
4
|
declare type Props = {
|
|
4
|
-
columns: string[];
|
|
5
|
+
columns: (string | ExtendedColumn)[];
|
|
5
6
|
padded: boolean;
|
|
6
|
-
tooltipContent
|
|
7
|
+
tooltipContent: string | undefined | null;
|
|
7
8
|
columnWidth?: number;
|
|
8
9
|
content: number | string | ContentComponent<any>;
|
|
9
10
|
colSpan?: number;
|
package/dist/components/Table/components/RenderRowOrNestedRow/components/ContentCell/ContentCell.js
CHANGED
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = void 0;
|
|
5
|
-
var _react =
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _helpers = require("../../../../../../utils/helpers");
|
|
7
|
+
var _ContentCell = require("./ContentCell.style");
|
|
7
8
|
var _TruncatedContent = _interopRequireDefault(require("../../../../../TruncatedContent"));
|
|
8
9
|
var _TableCell = _interopRequireDefault(require("../../../TableCell"));
|
|
9
|
-
var _ContentCell = require("./ContentCell.style");
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
14
|
var ContentCell = function ContentCell(_ref) {
|
|
15
|
+
var _ref2;
|
|
13
16
|
var columns = _ref.columns,
|
|
14
17
|
padded = _ref.padded,
|
|
15
18
|
columnWidth = _ref.columnWidth,
|
|
@@ -24,6 +27,10 @@ var ContentCell = function ContentCell(_ref) {
|
|
|
24
27
|
rowIndex = _ref.rowIndex,
|
|
25
28
|
index = _ref.index;
|
|
26
29
|
var isNumeral = !Number.isNaN(Number(content));
|
|
30
|
+
var _useState = (0, _react.useState)(null),
|
|
31
|
+
contentElementRef = _useState[0],
|
|
32
|
+
setContentElementRef = _useState[1];
|
|
33
|
+
var col = columns[cellCounter];
|
|
27
34
|
return (0, _react2.jsx)(_TableCell["default"], {
|
|
28
35
|
textAlign: align ? align : isNumeral ? 'right' : 'left',
|
|
29
36
|
colSpan: colSpan,
|
|
@@ -35,14 +42,17 @@ var ContentCell = function ContentCell(_ref) {
|
|
|
35
42
|
index: index
|
|
36
43
|
}, rowType === 'nested-header' && (0, _react2.jsx)("div", {
|
|
37
44
|
css: (0, _ContentCell.nestedHeaderStyle)()
|
|
38
|
-
},
|
|
45
|
+
}, typeof col === 'string' ? col : col.content.label), (0, _react2.jsx)(_TruncatedContent["default"], {
|
|
39
46
|
placement: 'bottom',
|
|
40
|
-
tooltipContent: tooltipContent
|
|
47
|
+
tooltipContent: tooltipContent === null ? undefined : (_ref2 = tooltipContent != null ? tooltipContent : contentElementRef == null ? void 0 : contentElementRef.textContent) != null ? _ref2 : ''
|
|
48
|
+
}, (0, _react2.jsx)("span", {
|
|
49
|
+
ref: function ref(el) {
|
|
50
|
+
setContentElementRef(el);
|
|
51
|
+
},
|
|
52
|
+
"data-column": col
|
|
41
53
|
}, (0, _helpers.isComponentFunctionType)(content) ? content({
|
|
42
54
|
content: content,
|
|
43
55
|
colSpan: colSpan
|
|
44
|
-
}) :
|
|
45
|
-
"data-column": columns[cellCounter]
|
|
46
|
-
}, content)));
|
|
56
|
+
}) : content)));
|
|
47
57
|
};
|
|
48
58
|
var _default = exports["default"] = /*#__PURE__*/_react["default"].memo(ContentCell);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Row, Selection, TableType } from '../../Table';
|
|
2
|
+
import { ExtendedColumn } from 'components/Table/types';
|
|
2
3
|
declare type TableRowWrapperProps<T> = {
|
|
3
4
|
row: Row<T>;
|
|
4
5
|
isRowSelected: boolean;
|
|
@@ -7,7 +8,7 @@ declare type TableRowWrapperProps<T> = {
|
|
|
7
8
|
padded: boolean;
|
|
8
9
|
onSelectionChangeExist: boolean;
|
|
9
10
|
columnCount: number;
|
|
10
|
-
columns: string[];
|
|
11
|
+
columns: (string | ExtendedColumn)[];
|
|
11
12
|
fixedHeader: boolean;
|
|
12
13
|
type: TableType;
|
|
13
14
|
expanded: boolean;
|