plataforma-fundacao-componentes 2.22.20 → 2.22.21
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/index.js +32 -29
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +32 -29
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -9944,8 +9944,6 @@ var TableUpperHeader$1 = memo(TableUpperHeader);
|
|
|
9944
9944
|
var rootClassName$1B = 'component-table-with-overflow';
|
|
9945
9945
|
|
|
9946
9946
|
function TableWithOverflow(props) {
|
|
9947
|
-
var _props$lines;
|
|
9948
|
-
|
|
9949
9947
|
var mediaQuery = useScreenSize();
|
|
9950
9948
|
var wrapperClassName = useMemo(function () {
|
|
9951
9949
|
return getMergedClassNames([rootClassName$1B + "-wrapper", props.upperHeader ? 'has-upper-header' : '', props.noResultMessage && !props.lines.length ? 'no-result' : '', 'left-columns-padding']);
|
|
@@ -9995,7 +9993,7 @@ function TableWithOverflow(props) {
|
|
|
9995
9993
|
return prev + n;
|
|
9996
9994
|
}, 8) + "px" : '8px';
|
|
9997
9995
|
}, [props.columns, atLeastOneStaticColumn]);
|
|
9998
|
-
var
|
|
9996
|
+
var renderLinesKey = useMemo(function () {
|
|
9999
9997
|
return getUniqueKey();
|
|
10000
9998
|
}, [props.lines]);
|
|
10001
9999
|
var columnsHeader = useMemo(function () {
|
|
@@ -10013,7 +10011,36 @@ function TableWithOverflow(props) {
|
|
|
10013
10011
|
className: getMergedClassNames([column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
10014
10012
|
}), column.value);
|
|
10015
10013
|
});
|
|
10016
|
-
}, [props.columns,
|
|
10014
|
+
}, [props.columns, renderLinesKey]);
|
|
10015
|
+
var lines = useMemo(function () {
|
|
10016
|
+
var _props$lines;
|
|
10017
|
+
|
|
10018
|
+
return (_props$lines = props.lines) === null || _props$lines === void 0 ? void 0 : _props$lines.map(function (line, lineIndex) {
|
|
10019
|
+
var _props$columns2;
|
|
10020
|
+
|
|
10021
|
+
var k = line.key ? line.key : lineIndex;
|
|
10022
|
+
return React.createElement("tr", {
|
|
10023
|
+
key: k,
|
|
10024
|
+
"aria-disabled": line.disabled || false
|
|
10025
|
+
}, React.createElement("td", {
|
|
10026
|
+
"data-draggable": false,
|
|
10027
|
+
className: 'absolute left-0'
|
|
10028
|
+
}), (_props$columns2 = props.columns) === null || _props$columns2 === void 0 ? void 0 : _props$columns2.map(function (column) {
|
|
10029
|
+
var _column$props2, _column$props3;
|
|
10030
|
+
|
|
10031
|
+
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
10032
|
+
return React.createElement("td", Object.assign({
|
|
10033
|
+
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
10034
|
+
key: k + "-" + column.key + (column.absolute ? '' : renderLinesKey)
|
|
10035
|
+
}, column.props, {
|
|
10036
|
+
style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
|
|
10037
|
+
className: getMergedClassNames([(_column$props3 = column.props) === null || _column$props3 === void 0 ? void 0 : _column$props3.className, column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
10038
|
+
}), line[column.key]);
|
|
10039
|
+
}), React.createElement("td", {
|
|
10040
|
+
className: 'absolute right-0'
|
|
10041
|
+
}));
|
|
10042
|
+
});
|
|
10043
|
+
}, [props.lines, renderLinesKey]);
|
|
10017
10044
|
return React.createElement("div", {
|
|
10018
10045
|
className: rootClassName$1B
|
|
10019
10046
|
}, props.upperHeader ? React.createElement("div", {
|
|
@@ -10043,31 +10070,7 @@ function TableWithOverflow(props) {
|
|
|
10043
10070
|
className: 'absolute left-0'
|
|
10044
10071
|
}), columnsHeader, React.createElement("th", {
|
|
10045
10072
|
className: 'absolute right-0'
|
|
10046
|
-
})), React.createElement("tr", null)), React.createElement("tbody", null,
|
|
10047
|
-
var _props$columns2;
|
|
10048
|
-
|
|
10049
|
-
var k = line.key ? line.key : lineIndex;
|
|
10050
|
-
return React.createElement("tr", {
|
|
10051
|
-
key: k,
|
|
10052
|
-
"aria-disabled": line.disabled || false
|
|
10053
|
-
}, React.createElement("td", {
|
|
10054
|
-
"data-draggable": false,
|
|
10055
|
-
className: 'absolute left-0'
|
|
10056
|
-
}), (_props$columns2 = props.columns) === null || _props$columns2 === void 0 ? void 0 : _props$columns2.map(function (column) {
|
|
10057
|
-
var _column$props2, _column$props3;
|
|
10058
|
-
|
|
10059
|
-
var absoluteObj = atLeastOneStaticColumn && column.absolute ? column.absolute : {};
|
|
10060
|
-
return React.createElement("td", Object.assign({
|
|
10061
|
-
"data-draggable": atLeastOneStaticColumn && !Boolean(column.absolute),
|
|
10062
|
-
key: k + "-" + column.key
|
|
10063
|
-
}, column.props, {
|
|
10064
|
-
style: _extends({}, (_column$props2 = column.props) === null || _column$props2 === void 0 ? void 0 : _column$props2.style, absoluteObj),
|
|
10065
|
-
className: getMergedClassNames([(_column$props3 = column.props) === null || _column$props3 === void 0 ? void 0 : _column$props3.className, column.key + "-cell", atLeastOneStaticColumn && column.absolute ? 'absolute' : ''])
|
|
10066
|
-
}), line[column.key]);
|
|
10067
|
-
}), React.createElement("td", {
|
|
10068
|
-
className: 'absolute right-0'
|
|
10069
|
-
}));
|
|
10070
|
-
})))), props.noResultMessage && !props.lines.length ? React.createElement("div", {
|
|
10073
|
+
})), React.createElement("tr", null)), React.createElement("tbody", null, lines))), props.noResultMessage && !props.lines.length ? React.createElement("div", {
|
|
10071
10074
|
className: rootClassName$1B + "-no-result"
|
|
10072
10075
|
}, props.noResultMessage) : undefined));
|
|
10073
10076
|
}
|