@oliasoft-open-source/react-ui-library 3.9.0 → 3.9.1
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 +19 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58161,11 +58161,11 @@ const Cell = (props) => {
|
|
|
58161
58161
|
isHeader,
|
|
58162
58162
|
columnHeaderAlignment,
|
|
58163
58163
|
columnAlignment,
|
|
58164
|
-
width,
|
|
58164
|
+
width: widthProp,
|
|
58165
58165
|
snapshot,
|
|
58166
58166
|
testId
|
|
58167
58167
|
} = props;
|
|
58168
|
-
const { style:
|
|
58168
|
+
const { style: styleProp, colSpan, rowSpan } = cell2;
|
|
58169
58169
|
const ref2 = useRef(null);
|
|
58170
58170
|
const alignment = {
|
|
58171
58171
|
bodyAlignment: columnAlignment,
|
|
@@ -58187,30 +58187,13 @@ const Cell = (props) => {
|
|
|
58187
58187
|
cell2.breakWord ? styles$7.breakWord : ""
|
|
58188
58188
|
);
|
|
58189
58189
|
const isWidthCustomSelect = cell2.type === "Select" && cell2.native !== true && cell2.width !== void 0;
|
|
58190
|
-
|
|
58191
|
-
|
|
58192
|
-
|
|
58193
|
-
|
|
58194
|
-
...isWidthCustomSelect ? { width: "1%" } : {},
|
|
58195
|
-
...width && !colSpan ? { minWidth: width } : {}
|
|
58196
|
-
},
|
|
58197
|
-
colSpan,
|
|
58198
|
-
rowSpan,
|
|
58199
|
-
children: /* @__PURE__ */ jsx(CellWrapper, {
|
|
58200
|
-
cell: cell2,
|
|
58201
|
-
columnAlignment: cellAlignmentText,
|
|
58202
|
-
isHeader,
|
|
58203
|
-
testId
|
|
58204
|
-
})
|
|
58205
|
-
}) : /* @__PURE__ */ jsx("td", {
|
|
58190
|
+
const width = isWidthCustomSelect ? "1%" : widthProp && !(colSpan && colSpan > 1) ? widthProp : (snapshot == null ? void 0 : snapshot.isDragging) && ref2.current ? ref2.current.offsetWidth : void 0;
|
|
58191
|
+
const style2 = { ...styleProp, width };
|
|
58192
|
+
const Element2 = isHeader ? "th" : "td";
|
|
58193
|
+
return /* @__PURE__ */ jsx(Element2, {
|
|
58206
58194
|
ref: ref2,
|
|
58207
58195
|
className,
|
|
58208
|
-
style:
|
|
58209
|
-
...style2,
|
|
58210
|
-
...isWidthCustomSelect ? { width: "1%" } : {},
|
|
58211
|
-
...width && !colSpan ? { minWidth: width } : {},
|
|
58212
|
-
...(snapshot == null ? void 0 : snapshot.isDragging) ? { width: ref2.current ? ref2.current.offsetWidth : 0 } : {}
|
|
58213
|
-
},
|
|
58196
|
+
style: style2,
|
|
58214
58197
|
colSpan,
|
|
58215
58198
|
rowSpan,
|
|
58216
58199
|
children: /* @__PURE__ */ jsx(CellWrapper, {
|
|
@@ -58694,7 +58677,13 @@ const hasRowActions = (rows, headers) => {
|
|
|
58694
58677
|
return hasActions(headers) > 0 || hasActions(rows) > 0;
|
|
58695
58678
|
};
|
|
58696
58679
|
const TableScrollWrapper = ({ table: table2, children }) => {
|
|
58697
|
-
const {
|
|
58680
|
+
const {
|
|
58681
|
+
fixedWidth: width,
|
|
58682
|
+
maxHeight: maxHeight2,
|
|
58683
|
+
rows,
|
|
58684
|
+
infiniteScroll,
|
|
58685
|
+
bordered: bordered2 = true
|
|
58686
|
+
} = table2;
|
|
58698
58687
|
const pageSize = Math.ceil(window.innerHeight / 38);
|
|
58699
58688
|
const [visibleRows, setVisibleRows] = infiniteScroll ? useState(pageSize) : [rows.length, null];
|
|
58700
58689
|
const [hasMore, setHasMore] = infiniteScroll ? useState(visibleRows < rows.length) : [false, null];
|
|
@@ -58712,7 +58701,11 @@ const TableScrollWrapper = ({ table: table2, children }) => {
|
|
|
58712
58701
|
bordered2 ? styles$a.bordered : "",
|
|
58713
58702
|
maxHeight2 ? styles$a.maxHeight : ""
|
|
58714
58703
|
),
|
|
58715
|
-
style: {
|
|
58704
|
+
style: {
|
|
58705
|
+
maxHeight: maxHeight2,
|
|
58706
|
+
width,
|
|
58707
|
+
display: width === "auto" ? "inline-block" : null
|
|
58708
|
+
},
|
|
58716
58709
|
children: infiniteScroll ? /* @__PURE__ */ jsx(InfiniteScroll, {
|
|
58717
58710
|
dataLength: Math.min(rows.length, visibleRows + pageSize),
|
|
58718
58711
|
next: loadMoreItems,
|
|
@@ -58809,9 +58802,6 @@ const Table = (props) => {
|
|
|
58809
58802
|
table: table2,
|
|
58810
58803
|
children: ({ visibleRows }) => /* @__PURE__ */ jsxs("table", {
|
|
58811
58804
|
className: cx$2(styles$a.table, striped2 ? styles$a.striped : ""),
|
|
58812
|
-
style: {
|
|
58813
|
-
minWidth: fixedWidth || ""
|
|
58814
|
-
},
|
|
58815
58805
|
"data-testid": testId,
|
|
58816
58806
|
ref: provided.innerRef,
|
|
58817
58807
|
children: [
|
|
@@ -58881,7 +58871,6 @@ const Table = (props) => {
|
|
|
58881
58871
|
table: table2,
|
|
58882
58872
|
children: ({ visibleRows }) => /* @__PURE__ */ jsxs("table", {
|
|
58883
58873
|
className: cx$2(styles$a.table, striped2 ? styles$a.striped : ""),
|
|
58884
|
-
style: { minWidth: fixedWidth || "" },
|
|
58885
58874
|
"data-testid": testId,
|
|
58886
58875
|
children: [
|
|
58887
58876
|
/* @__PURE__ */ jsxs("thead", {
|