twico-ui 1.18.0 → 1.18.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/CHANGELOG.md +7 -0
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9430,7 +9430,8 @@ function Datatable({
|
|
|
9430
9430
|
return [...L, ...mid, ...R];
|
|
9431
9431
|
}, [pins, hidden, visibleCols, colByField, order]);
|
|
9432
9432
|
const NUM_W = 56;
|
|
9433
|
-
const
|
|
9433
|
+
const CHK_W = checkboxSelection ? rowReorder ? 68 : 44 : 0;
|
|
9434
|
+
const numLeft = CHK_W;
|
|
9434
9435
|
const leadW = numLeft + (showRowNum ? NUM_W : 0);
|
|
9435
9436
|
const stickyOf = (field) => {
|
|
9436
9437
|
if (pins.left.includes(field)) {
|
|
@@ -10353,7 +10354,7 @@ function Datatable({
|
|
|
10353
10354
|
onDragEnd: reorderable ? () => setRowDrag({ from: null, over: null, after: false }) : void 0,
|
|
10354
10355
|
onClick: (e) => handleRowClick(e, k, row),
|
|
10355
10356
|
children: [
|
|
10356
|
-
checkboxSelection ? /* @__PURE__ */ jsxs("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width:
|
|
10357
|
+
checkboxSelection ? /* @__PURE__ */ jsxs("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width: CHK_W }, children: [
|
|
10357
10358
|
/* @__PURE__ */ jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 }, children: [
|
|
10358
10359
|
reorderable ? rowHandle(k, midIdx, row) : null,
|
|
10359
10360
|
/* @__PURE__ */ jsx(
|
|
@@ -10761,7 +10762,7 @@ function Datatable({
|
|
|
10761
10762
|
onKeyDown: onGridKeyDown,
|
|
10762
10763
|
children: [
|
|
10763
10764
|
/* @__PURE__ */ jsx("thead", { ref: theadRef, children: /* @__PURE__ */ jsxs("tr", { role: "row", "aria-rowindex": 1, children: [
|
|
10764
|
-
checkboxSelection ? /* @__PURE__ */ jsx("th", { className: "twc-dt__th", role: "columnheader", "aria-label": "Select", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width:
|
|
10765
|
+
checkboxSelection ? /* @__PURE__ */ jsx("th", { className: "twc-dt__th", role: "columnheader", "aria-label": "Select", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width: CHK_W, minWidth: CHK_W }, children: /* @__PURE__ */ jsx("div", { className: "twc-dt__th-inner", style: { justifyContent: "center", padding: 0 }, children: /* @__PURE__ */ jsx(
|
|
10765
10766
|
"span",
|
|
10766
10767
|
{
|
|
10767
10768
|
className: "twc-dt__check",
|
|
@@ -10937,7 +10938,7 @@ function Datatable({
|
|
|
10937
10938
|
})
|
|
10938
10939
|
] }) }),
|
|
10939
10940
|
/* @__PURE__ */ jsx("tbody", { children: loading ? Array.from({ length: paginated ? Math.min(sizeVal, 8) : 8 }).map((_, ri) => /* @__PURE__ */ jsxs("tr", { className: "twc-dt__row", role: "row", children: [
|
|
10940
|
-
checkboxSelection ? /* @__PURE__ */ jsx("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", style: { insetInlineStart: 0, width:
|
|
10941
|
+
checkboxSelection ? /* @__PURE__ */ jsx("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", style: { insetInlineStart: 0, width: CHK_W }, children: /* @__PURE__ */ jsx("span", { className: "twc-dt__sk", "aria-hidden": "true", style: { "--_w": "18px", height: 18, borderRadius: 4 } }) }) : null,
|
|
10941
10942
|
showRowNum ? /* @__PURE__ */ jsx("td", { className: "twc-dt__td twc-dt__rownum", role: "gridcell", "aria-hidden": "true", "data-pin": "left", style: { insetInlineStart: numLeft, width: NUM_W }, children: /* @__PURE__ */ jsx("span", { className: "twc-dt__sk", "aria-hidden": "true", style: { "--_w": "16px", height: 14, borderRadius: 4 } }) }) : null,
|
|
10942
10943
|
ordered.map((c, ci) => {
|
|
10943
10944
|
const st = stickyOf(c.field);
|
|
@@ -10959,7 +10960,7 @@ function Datatable({
|
|
|
10959
10960
|
pinnedBottomRows.map((row) => renderLeaf(row, keyIndex.get(keyOf(row)), "bottom"))
|
|
10960
10961
|
] }) }),
|
|
10961
10962
|
hasAggregation && aggOn && !loading && paged.length > 0 ? /* @__PURE__ */ jsx("tfoot", { children: /* @__PURE__ */ jsxs("tr", { role: "row", children: [
|
|
10962
|
-
checkboxSelection ? /* @__PURE__ */ jsx("td", { role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width:
|
|
10963
|
+
checkboxSelection ? /* @__PURE__ */ jsx("td", { role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width: CHK_W } }) : null,
|
|
10963
10964
|
showRowNum ? /* @__PURE__ */ jsx("td", { className: "twc-dt__rownum", role: "gridcell", "aria-hidden": "true", "data-pin": "left", "data-pin-edge": pins.left.length ? void 0 : "left", style: { insetInlineStart: numLeft, width: NUM_W } }) : null,
|
|
10964
10965
|
ordered.map((c) => {
|
|
10965
10966
|
const st = stickyOf(c.field);
|