@bwp-web/components 0.13.4 → 0.13.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/dist/BiampTable/BiampTable.d.ts +0 -1
- package/dist/BiampTable/BiampTable.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableTruncatedCell.d.ts.map +1 -1
- package/dist/BiampTable/tanstack-meta.d.ts +2 -0
- package/dist/BiampTable/tanstack-meta.d.ts.map +1 -1
- package/dist/index.cjs +12 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -566,6 +566,7 @@ function BiampTableTruncatedCell({
|
|
|
566
566
|
children: /* @__PURE__ */ jsx7(
|
|
567
567
|
Box3,
|
|
568
568
|
{
|
|
569
|
+
"data-truncate": true,
|
|
569
570
|
ref: textRef,
|
|
570
571
|
onMouseEnter: handleMouseEnter,
|
|
571
572
|
onMouseLeave: handleMouseLeave,
|
|
@@ -645,7 +646,11 @@ function cellSx(sticky, minWidth, zIndex) {
|
|
|
645
646
|
};
|
|
646
647
|
}
|
|
647
648
|
const mw = minWidth ?? 40;
|
|
648
|
-
return {
|
|
649
|
+
return {
|
|
650
|
+
minWidth: mw,
|
|
651
|
+
whiteSpace: "nowrap",
|
|
652
|
+
"&:has([data-truncate])": { maxWidth: mw, whiteSpace: "normal" }
|
|
653
|
+
};
|
|
649
654
|
}
|
|
650
655
|
var rowCursorPointerSx = { cursor: "pointer" };
|
|
651
656
|
var selectionCellSx = {
|
|
@@ -732,19 +737,19 @@ function BiampTableRowInner({
|
|
|
732
737
|
row.getVisibleCells().map((cell, cellIndex, cells) => {
|
|
733
738
|
const sticky = cell.column.columnDef.meta?.sticky;
|
|
734
739
|
const isExpandCell = enableExpanding && !sticky && cellIndex === cells.findIndex((c) => !c.column.columnDef.meta?.sticky);
|
|
740
|
+
const content = flexRender(
|
|
741
|
+
cell.column.columnDef.cell,
|
|
742
|
+
cell.getContext()
|
|
743
|
+
);
|
|
735
744
|
return /* @__PURE__ */ jsx8(
|
|
736
745
|
TableCell,
|
|
737
746
|
{
|
|
738
747
|
"data-sticky": sticky || void 0,
|
|
739
748
|
sx: cellSx(sticky, cell.column.columnDef.meta?.minWidth, 2),
|
|
740
749
|
children: (() => {
|
|
741
|
-
const content = flexRender(
|
|
742
|
-
cell.column.columnDef.cell,
|
|
743
|
-
cell.getContext()
|
|
744
|
-
);
|
|
745
750
|
if (sticky) return content;
|
|
746
|
-
const
|
|
747
|
-
const truncated =
|
|
751
|
+
const truncate = cell.column.columnDef.meta?.truncate ?? true;
|
|
752
|
+
const truncated = truncate ? /* @__PURE__ */ jsx8(BiampTableTruncatedCell, { children: content }) : content;
|
|
748
753
|
if (!isExpandCell) return truncated;
|
|
749
754
|
const rowLabel = getRowLabel ? getRowLabel(row.original) : `row ${row.index + 1}`;
|
|
750
755
|
return /* @__PURE__ */ jsxs5(
|