@adapttable/unstyled 0.2.2 → 0.3.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/CHANGELOG.md +28 -0
- package/README.md +1 -1
- package/dist/index.cjs +134 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -88
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @adapttable/unstyled
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a90a2c2: Logical column pinning, so pinning stays correct under RTL.
|
|
8
|
+
|
|
9
|
+
**Breaking.** Pinned-side values are now `"start"` / `"end"` (were `"left"` /
|
|
10
|
+
`"right"`) — this is the public `pinned` layout value and the `colPin` URL token
|
|
11
|
+
(e.g. `colPin=name:start`); pre-existing `left`/`right` URLs no longer parse. The
|
|
12
|
+
label keys `pinLeft` / `pinRight` / `moveLeft` / `moveRight` are renamed to
|
|
13
|
+
`pinStart` / `pinEnd` / `moveStart` / `moveEnd`, with logical display strings
|
|
14
|
+
shipped for every locale. Pinning a data column is now a start-only toggle; the
|
|
15
|
+
injected actions column keeps its one-click end-pin.
|
|
16
|
+
|
|
17
|
+
To migrate: update any `defaultColumnLayout={{ pinned: { x: "left" } }}` to
|
|
18
|
+
`"start"` (and `"right"` → `"end"`), any persisted `colPin` URLs, and any custom
|
|
19
|
+
`labels` overriding the renamed keys.
|
|
20
|
+
|
|
21
|
+
- a90a2c2: Numbered page buttons in every adapter's pagination (with first/last and
|
|
22
|
+
ellipsis truncation), replacing the prev/next-only control — driven by a shared
|
|
23
|
+
`paginationItems` builder in `@adapttable/core`.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [a90a2c2]
|
|
28
|
+
- Updated dependencies [a90a2c2]
|
|
29
|
+
- @adapttable/core@0.3.0
|
|
30
|
+
|
|
3
31
|
## 0.2.2
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @adapttable/unstyled
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
|
|
5
5
|
**[📖 Documentation](https://orwa-mahmoud.github.io/adapttable/)** · **[🚀 Live demo](https://orwa-mahmoud.github.io/adapttable/demo/)** · **[Get started](https://orwa-mahmoud.github.io/adapttable/getting-started/)**
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -1438,7 +1438,7 @@ function _temp$1(n) {
|
|
|
1438
1438
|
}, n);
|
|
1439
1439
|
}
|
|
1440
1440
|
function Footer(t0) {
|
|
1441
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
1441
|
+
const $ = (0, react_compiler_runtime.c)(53);
|
|
1442
1442
|
const { pagination, source, labels, classNames } = t0;
|
|
1443
1443
|
const { safePage, totalPages, fromIndex, toIndex } = pagination;
|
|
1444
1444
|
const t1 = classNames.footer;
|
|
@@ -1467,95 +1467,142 @@ function Footer(t0) {
|
|
|
1467
1467
|
$[7] = toIndex;
|
|
1468
1468
|
$[8] = t3;
|
|
1469
1469
|
} else t3 = $[8];
|
|
1470
|
-
|
|
1470
|
+
const t4 = classNames.pager;
|
|
1471
|
+
let t5;
|
|
1471
1472
|
if ($[9] !== labels || $[10] !== safePage || $[11] !== totalPages) {
|
|
1472
|
-
|
|
1473
|
+
t5 = labels.pageOf({
|
|
1473
1474
|
page: safePage,
|
|
1474
1475
|
total: totalPages
|
|
1475
1476
|
});
|
|
1476
1477
|
$[9] = labels;
|
|
1477
1478
|
$[10] = safePage;
|
|
1478
1479
|
$[11] = totalPages;
|
|
1479
|
-
$[12] =
|
|
1480
|
-
} else
|
|
1481
|
-
let
|
|
1482
|
-
if ($[13] !==
|
|
1483
|
-
|
|
1484
|
-
$[13] =
|
|
1485
|
-
$[14] =
|
|
1486
|
-
} else
|
|
1487
|
-
const
|
|
1488
|
-
let
|
|
1480
|
+
$[12] = t5;
|
|
1481
|
+
} else t5 = $[12];
|
|
1482
|
+
let t6;
|
|
1483
|
+
if ($[13] !== t5) {
|
|
1484
|
+
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t5 });
|
|
1485
|
+
$[13] = t5;
|
|
1486
|
+
$[14] = t6;
|
|
1487
|
+
} else t6 = $[14];
|
|
1488
|
+
const t7 = safePage <= 1;
|
|
1489
|
+
let t8;
|
|
1489
1490
|
if ($[15] !== safePage || $[16] !== source) {
|
|
1490
|
-
|
|
1491
|
+
t8 = () => source.setPage(safePage - 1);
|
|
1491
1492
|
$[15] = safePage;
|
|
1492
1493
|
$[16] = source;
|
|
1493
|
-
$[17] =
|
|
1494
|
-
} else
|
|
1495
|
-
let
|
|
1496
|
-
if ($[18] !== classNames.pageButton || $[19] !== labels.previousPage || $[20] !==
|
|
1497
|
-
|
|
1494
|
+
$[17] = t8;
|
|
1495
|
+
} else t8 = $[17];
|
|
1496
|
+
let t9;
|
|
1497
|
+
if ($[18] !== classNames.pageButton || $[19] !== labels.previousPage || $[20] !== t7 || $[21] !== t8) {
|
|
1498
|
+
t9 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1498
1499
|
type: "button",
|
|
1499
1500
|
"aria-label": labels.previousPage,
|
|
1500
1501
|
"data-adapttable-part": "page-prev",
|
|
1501
1502
|
className: classNames.pageButton,
|
|
1502
|
-
disabled:
|
|
1503
|
-
onClick:
|
|
1503
|
+
disabled: t7,
|
|
1504
|
+
onClick: t8,
|
|
1504
1505
|
children: "‹"
|
|
1505
1506
|
});
|
|
1506
1507
|
$[18] = classNames.pageButton;
|
|
1507
1508
|
$[19] = labels.previousPage;
|
|
1508
|
-
$[20] =
|
|
1509
|
-
$[21] =
|
|
1510
|
-
$[22] =
|
|
1511
|
-
} else
|
|
1512
|
-
const t9 = safePage >= totalPages;
|
|
1509
|
+
$[20] = t7;
|
|
1510
|
+
$[21] = t8;
|
|
1511
|
+
$[22] = t9;
|
|
1512
|
+
} else t9 = $[22];
|
|
1513
1513
|
let t10;
|
|
1514
|
-
if ($[23] !==
|
|
1515
|
-
|
|
1516
|
-
$[
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1514
|
+
if ($[23] !== classNames.pageButton || $[24] !== classNames.pageEllipsis || $[25] !== safePage || $[26] !== source || $[27] !== totalPages) {
|
|
1515
|
+
let t11;
|
|
1516
|
+
if ($[29] !== classNames.pageButton || $[30] !== classNames.pageEllipsis || $[31] !== safePage || $[32] !== source) {
|
|
1517
|
+
t11 = (item, i) => item === "ellipsis" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1518
|
+
"data-adapttable-part": "page-ellipsis",
|
|
1519
|
+
"aria-hidden": "true",
|
|
1520
|
+
className: classNames.pageEllipsis,
|
|
1521
|
+
children: "…"
|
|
1522
|
+
}, `ellipsis-${i}`) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1523
|
+
type: "button",
|
|
1524
|
+
"data-adapttable-part": "page-number",
|
|
1525
|
+
"aria-current": item === safePage ? "page" : void 0,
|
|
1526
|
+
className: classNames.pageButton,
|
|
1527
|
+
onClick: () => source.setPage(item),
|
|
1528
|
+
children: item
|
|
1529
|
+
}, item);
|
|
1530
|
+
$[29] = classNames.pageButton;
|
|
1531
|
+
$[30] = classNames.pageEllipsis;
|
|
1532
|
+
$[31] = safePage;
|
|
1533
|
+
$[32] = source;
|
|
1534
|
+
$[33] = t11;
|
|
1535
|
+
} else t11 = $[33];
|
|
1536
|
+
t10 = (0, _adapttable_core.paginationItems)(safePage, totalPages).map(t11);
|
|
1537
|
+
$[23] = classNames.pageButton;
|
|
1538
|
+
$[24] = classNames.pageEllipsis;
|
|
1539
|
+
$[25] = safePage;
|
|
1540
|
+
$[26] = source;
|
|
1541
|
+
$[27] = totalPages;
|
|
1542
|
+
$[28] = t10;
|
|
1543
|
+
} else t10 = $[28];
|
|
1544
|
+
const t11 = safePage >= totalPages;
|
|
1545
|
+
let t12;
|
|
1546
|
+
if ($[34] !== safePage || $[35] !== source) {
|
|
1547
|
+
t12 = () => source.setPage(safePage + 1);
|
|
1548
|
+
$[34] = safePage;
|
|
1549
|
+
$[35] = source;
|
|
1550
|
+
$[36] = t12;
|
|
1551
|
+
} else t12 = $[36];
|
|
1552
|
+
let t13;
|
|
1553
|
+
if ($[37] !== classNames.pageButton || $[38] !== labels.nextPage || $[39] !== t11 || $[40] !== t12) {
|
|
1554
|
+
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1523
1555
|
type: "button",
|
|
1524
1556
|
"aria-label": labels.nextPage,
|
|
1525
1557
|
"data-adapttable-part": "page-next",
|
|
1526
1558
|
className: classNames.pageButton,
|
|
1527
|
-
disabled:
|
|
1528
|
-
onClick:
|
|
1559
|
+
disabled: t11,
|
|
1560
|
+
onClick: t12,
|
|
1529
1561
|
children: "›"
|
|
1530
1562
|
});
|
|
1531
|
-
$[
|
|
1532
|
-
$[
|
|
1533
|
-
$[
|
|
1534
|
-
$[
|
|
1535
|
-
$[
|
|
1536
|
-
} else
|
|
1537
|
-
let
|
|
1538
|
-
if ($[
|
|
1539
|
-
|
|
1563
|
+
$[37] = classNames.pageButton;
|
|
1564
|
+
$[38] = labels.nextPage;
|
|
1565
|
+
$[39] = t11;
|
|
1566
|
+
$[40] = t12;
|
|
1567
|
+
$[41] = t13;
|
|
1568
|
+
} else t13 = $[41];
|
|
1569
|
+
let t14;
|
|
1570
|
+
if ($[42] !== classNames.pager || $[43] !== t10 || $[44] !== t13 || $[45] !== t6 || $[46] !== t9) {
|
|
1571
|
+
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1572
|
+
"data-adapttable-part": "pager",
|
|
1573
|
+
className: t4,
|
|
1574
|
+
children: [
|
|
1575
|
+
t6,
|
|
1576
|
+
t9,
|
|
1577
|
+
t10,
|
|
1578
|
+
t13
|
|
1579
|
+
]
|
|
1580
|
+
});
|
|
1581
|
+
$[42] = classNames.pager;
|
|
1582
|
+
$[43] = t10;
|
|
1583
|
+
$[44] = t13;
|
|
1584
|
+
$[45] = t6;
|
|
1585
|
+
$[46] = t9;
|
|
1586
|
+
$[47] = t14;
|
|
1587
|
+
} else t14 = $[47];
|
|
1588
|
+
let t15;
|
|
1589
|
+
if ($[48] !== classNames.footer || $[49] !== t14 || $[50] !== t2 || $[51] !== t3) {
|
|
1590
|
+
t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1540
1591
|
"data-adapttable-part": "footer",
|
|
1541
1592
|
className: t1,
|
|
1542
1593
|
children: [
|
|
1543
1594
|
t2,
|
|
1544
1595
|
t3,
|
|
1545
|
-
|
|
1546
|
-
t8,
|
|
1547
|
-
t11
|
|
1596
|
+
t14
|
|
1548
1597
|
]
|
|
1549
1598
|
});
|
|
1550
|
-
$[
|
|
1551
|
-
$[
|
|
1552
|
-
$[
|
|
1553
|
-
$[
|
|
1554
|
-
$[
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
} else t12 = $[37];
|
|
1558
|
-
return t12;
|
|
1599
|
+
$[48] = classNames.footer;
|
|
1600
|
+
$[49] = t14;
|
|
1601
|
+
$[50] = t2;
|
|
1602
|
+
$[51] = t3;
|
|
1603
|
+
$[52] = t15;
|
|
1604
|
+
} else t15 = $[52];
|
|
1605
|
+
return t15;
|
|
1559
1606
|
}
|
|
1560
1607
|
/** Inline error with optional retry. */
|
|
1561
1608
|
function ErrorState(t0) {
|
|
@@ -1860,7 +1907,7 @@ function ColumnMenuRowItem(t0) {
|
|
|
1860
1907
|
$[12] = t6;
|
|
1861
1908
|
} else t6 = $[12];
|
|
1862
1909
|
const t7 = classNames.columnMenuGrip;
|
|
1863
|
-
const t8 = `${labels.
|
|
1910
|
+
const t8 = `${labels.moveStart} / ${labels.moveEnd}: ${name}`;
|
|
1864
1911
|
let t9;
|
|
1865
1912
|
if ($[13] !== index || $[14] !== key || $[15] !== layout.move || $[16] !== t8) {
|
|
1866
1913
|
t9 = (0, _adapttable_core.columnReorderKeyProps)(key, index, layout.move, t8);
|
|
@@ -2003,7 +2050,7 @@ function ActionsMenuRowItem(t0) {
|
|
|
2003
2050
|
const pinned = layout.state.pinned[_adapttable_core.ACTIONS_COLUMN_KEY] !== void 0;
|
|
2004
2051
|
const name = labels.actions;
|
|
2005
2052
|
const t2 = hidden || void 0;
|
|
2006
|
-
const t3 = pinned ? "
|
|
2053
|
+
const t3 = pinned ? "end" : void 0;
|
|
2007
2054
|
let t4;
|
|
2008
2055
|
if ($[2] !== layout) {
|
|
2009
2056
|
t4 = () => layout.toggleVisible(_adapttable_core.ACTIONS_COLUMN_KEY);
|
|
@@ -2038,10 +2085,10 @@ function ActionsMenuRowItem(t0) {
|
|
|
2038
2085
|
$[12] = name;
|
|
2039
2086
|
$[13] = t6;
|
|
2040
2087
|
} else t6 = $[13];
|
|
2041
|
-
const t7 = `${pinned ? labels.unpin : labels.
|
|
2088
|
+
const t7 = `${pinned ? labels.unpin : labels.pinEnd}: ${name}`;
|
|
2042
2089
|
let t8;
|
|
2043
2090
|
if ($[14] !== layout || $[15] !== pinned) {
|
|
2044
|
-
t8 = () => layout.setPinned(_adapttable_core.ACTIONS_COLUMN_KEY, pinned ? void 0 : "
|
|
2091
|
+
t8 = () => layout.setPinned(_adapttable_core.ACTIONS_COLUMN_KEY, pinned ? void 0 : "end");
|
|
2045
2092
|
$[14] = layout;
|
|
2046
2093
|
$[15] = pinned;
|
|
2047
2094
|
$[16] = t8;
|
|
@@ -2337,11 +2384,11 @@ function ExpandButton(t0) {
|
|
|
2337
2384
|
* Cell render-props are not re-invoked).
|
|
2338
2385
|
*/
|
|
2339
2386
|
function desktopRowPropsEqual(prev, next) {
|
|
2340
|
-
return prev.row === next.row && prev.index === next.index && prev.id === next.id && prev.selected === next.selected && prev.expanded === next.expanded && prev.columns === next.columns && prev.labels === next.labels && prev.classNames === next.classNames && prev.showActions === next.showActions && prev.rowActions === next.rowActions && prev.columnSpan === next.columnSpan && prev.columnWidths === next.columnWidths && prev.pinSignature === next.pinSignature && prev.
|
|
2387
|
+
return prev.row === next.row && prev.index === next.index && prev.id === next.id && prev.selected === next.selected && prev.expanded === next.expanded && prev.columns === next.columns && prev.labels === next.labels && prev.classNames === next.classNames && prev.showActions === next.showActions && prev.rowActions === next.rowActions && prev.columnSpan === next.columnSpan && prev.columnWidths === next.columnWidths && prev.pinSignature === next.pinSignature && prev.hasStartPin === next.hasStartPin && prev.hasEndPin === next.hasEndPin && prev.actionsPinned === next.actionsPinned && prev.rowClass === next.rowClass && prev.clickable === next.clickable && prev.hasPrefetch === next.hasPrefetch;
|
|
2341
2388
|
}
|
|
2342
2389
|
function DesktopRowBase(props) {
|
|
2343
2390
|
const $ = (0, react_compiler_runtime.c)(98);
|
|
2344
|
-
const { row, index, id, table, columns, labels, classNames, selected, expanded, showActions, rowActions, confirm, columnSpan, pinOffset,
|
|
2391
|
+
const { row, index, id, table, columns, labels, classNames, selected, expanded, showActions, rowActions, confirm, columnSpan, pinOffset, hasStartPin, hasEndPin, actionsPinned, rowClass, clickable, hasPrefetch, onRowClick, onPrefetch, onToggleSelect, onToggleExpand, renderDetail, measureElement } = props;
|
|
2345
2392
|
const expandable = expanded !== void 0;
|
|
2346
2393
|
const t0 = selected === void 0 ? 0 : SELECTION_WIDTH;
|
|
2347
2394
|
const t1 = showActions ? ACTIONS_WIDTH : 0;
|
|
@@ -2356,10 +2403,10 @@ function DesktopRowBase(props) {
|
|
|
2356
2403
|
let t7;
|
|
2357
2404
|
let t8;
|
|
2358
2405
|
let t9;
|
|
2359
|
-
if ($[0] !== classNames || $[1] !== clickable || $[2] !== columns || $[3] !== expandable || $[4] !== expanded || $[5] !==
|
|
2406
|
+
if ($[0] !== classNames || $[1] !== clickable || $[2] !== columns || $[3] !== expandable || $[4] !== expanded || $[5] !== hasPrefetch || $[6] !== hasStartPin || $[7] !== id || $[8] !== index || $[9] !== labels || $[10] !== measureElement || $[11] !== onPrefetch || $[12] !== onRowClick || $[13] !== onToggleExpand || $[14] !== onToggleSelect || $[15] !== pinOffset || $[16] !== row || $[17] !== rowClass || $[18] !== selected || $[19] !== t0 || $[20] !== t1 || $[21] !== table) {
|
|
2360
2407
|
const leads = {
|
|
2361
|
-
|
|
2362
|
-
|
|
2408
|
+
start: t0,
|
|
2409
|
+
end: t1
|
|
2363
2410
|
};
|
|
2364
2411
|
const bodyPinStyle = (key) => (0, _adapttable_core.pinnedCellStyle)(pinOffset?.(key), _adapttable_core.PIN_Z.body, leads);
|
|
2365
2412
|
let t13;
|
|
@@ -2421,11 +2468,11 @@ function DesktopRowBase(props) {
|
|
|
2421
2468
|
$[54] = onToggleExpand;
|
|
2422
2469
|
$[55] = t10;
|
|
2423
2470
|
} else t10 = $[55];
|
|
2424
|
-
if ($[56] !== classNames.cell || $[57] !== classNames.checkbox || $[58] !== classNames.selectionCell || $[59] !==
|
|
2471
|
+
if ($[56] !== classNames.cell || $[57] !== classNames.checkbox || $[58] !== classNames.selectionCell || $[59] !== hasStartPin || $[60] !== id || $[61] !== labels || $[62] !== onToggleSelect || $[63] !== selected) {
|
|
2425
2472
|
t11 = selected !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
2426
2473
|
"data-adapttable-part": "selection-cell",
|
|
2427
|
-
"data-pinned":
|
|
2428
|
-
style: (0, _adapttable_core.edgePinStyle)("
|
|
2474
|
+
"data-pinned": hasStartPin ? "start" : void 0,
|
|
2475
|
+
style: (0, _adapttable_core.edgePinStyle)("start", hasStartPin, _adapttable_core.PIN_Z.body),
|
|
2429
2476
|
className: cx(classNames.cell, classNames.selectionCell),
|
|
2430
2477
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2431
2478
|
type: "checkbox",
|
|
@@ -2438,7 +2485,7 @@ function DesktopRowBase(props) {
|
|
|
2438
2485
|
$[56] = classNames.cell;
|
|
2439
2486
|
$[57] = classNames.checkbox;
|
|
2440
2487
|
$[58] = classNames.selectionCell;
|
|
2441
|
-
$[59] =
|
|
2488
|
+
$[59] = hasStartPin;
|
|
2442
2489
|
$[60] = id;
|
|
2443
2490
|
$[61] = labels;
|
|
2444
2491
|
$[62] = onToggleSelect;
|
|
@@ -2463,8 +2510,8 @@ function DesktopRowBase(props) {
|
|
|
2463
2510
|
$[2] = columns;
|
|
2464
2511
|
$[3] = expandable;
|
|
2465
2512
|
$[4] = expanded;
|
|
2466
|
-
$[5] =
|
|
2467
|
-
$[6] =
|
|
2513
|
+
$[5] = hasPrefetch;
|
|
2514
|
+
$[6] = hasStartPin;
|
|
2468
2515
|
$[7] = id;
|
|
2469
2516
|
$[8] = index;
|
|
2470
2517
|
$[9] = labels;
|
|
@@ -2505,11 +2552,11 @@ function DesktopRowBase(props) {
|
|
|
2505
2552
|
t9 = $[32];
|
|
2506
2553
|
}
|
|
2507
2554
|
let t13;
|
|
2508
|
-
if ($[65] !== actionsPinned || $[66] !== classNames || $[67] !== confirm || $[68] !==
|
|
2555
|
+
if ($[65] !== actionsPinned || $[66] !== classNames || $[67] !== confirm || $[68] !== hasEndPin || $[69] !== labels || $[70] !== row || $[71] !== rowActions || $[72] !== showActions) {
|
|
2509
2556
|
t13 = showActions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
2510
2557
|
"data-adapttable-part": "actions-cell",
|
|
2511
|
-
"data-pinned":
|
|
2512
|
-
style: (0, _adapttable_core.edgePinStyle)("
|
|
2558
|
+
"data-pinned": hasEndPin || actionsPinned ? "end" : void 0,
|
|
2559
|
+
style: (0, _adapttable_core.edgePinStyle)("end", hasEndPin || actionsPinned, _adapttable_core.PIN_Z.body),
|
|
2513
2560
|
className: cx(classNames.cell, classNames.actionsCell),
|
|
2514
2561
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActionButtons, {
|
|
2515
2562
|
row,
|
|
@@ -2522,7 +2569,7 @@ function DesktopRowBase(props) {
|
|
|
2522
2569
|
$[65] = actionsPinned;
|
|
2523
2570
|
$[66] = classNames;
|
|
2524
2571
|
$[67] = confirm;
|
|
2525
|
-
$[68] =
|
|
2572
|
+
$[68] = hasEndPin;
|
|
2526
2573
|
$[69] = labels;
|
|
2527
2574
|
$[70] = row;
|
|
2528
2575
|
$[71] = rowActions;
|
|
@@ -2643,11 +2690,11 @@ function DesktopTable({ table, rows, rowActions, confirm, getRowId, classNames,
|
|
|
2643
2690
|
} : void 0;
|
|
2644
2691
|
const stickyAttr = stickyHeader || void 0;
|
|
2645
2692
|
const leads = {
|
|
2646
|
-
|
|
2647
|
-
|
|
2693
|
+
start: selection ? SELECTION_WIDTH : 0,
|
|
2694
|
+
end: showActions ? ACTIONS_WIDTH : 0
|
|
2648
2695
|
};
|
|
2649
|
-
const
|
|
2650
|
-
const
|
|
2696
|
+
const hasStartPin = columns.some((c_0) => pinOffset?.(c_0.key)?.side === "start");
|
|
2697
|
+
const hasEndPin = columns.some((c_1) => pinOffset?.(c_1.key)?.side === "end");
|
|
2651
2698
|
const pinSignature = columns.map((c_2) => {
|
|
2652
2699
|
const pin = pinOffset?.(c_2.key);
|
|
2653
2700
|
return pin ? `${c_2.key}:${pin.side}:${pin.inset}` : "";
|
|
@@ -2727,8 +2774,8 @@ function DesktopTable({ table, rows, rowActions, confirm, getRowId, classNames,
|
|
|
2727
2774
|
selection && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
2728
2775
|
"data-adapttable-part": "selection-header",
|
|
2729
2776
|
"data-sticky": stickyAttr,
|
|
2730
|
-
"data-pinned":
|
|
2731
|
-
style: edgeHeadStyle("
|
|
2777
|
+
"data-pinned": hasStartPin ? "start" : void 0,
|
|
2778
|
+
style: edgeHeadStyle("start", hasStartPin),
|
|
2732
2779
|
className: cx(classNames.headerCell, classNames.selectionCell),
|
|
2733
2780
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2734
2781
|
type: "checkbox",
|
|
@@ -2781,8 +2828,8 @@ function DesktopTable({ table, rows, rowActions, confirm, getRowId, classNames,
|
|
|
2781
2828
|
showActions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
2782
2829
|
"data-adapttable-part": "actions-header",
|
|
2783
2830
|
"data-sticky": stickyAttr,
|
|
2784
|
-
"data-pinned":
|
|
2785
|
-
style: edgeHeadStyle("
|
|
2831
|
+
"data-pinned": hasEndPin || stickActions ? "end" : void 0,
|
|
2832
|
+
style: edgeHeadStyle("end", hasEndPin || stickActions),
|
|
2786
2833
|
className: cx(classNames.headerCell, classNames.actionsCell),
|
|
2787
2834
|
children: labels.actions
|
|
2788
2835
|
})
|
|
@@ -2819,8 +2866,8 @@ function DesktopTable({ table, rows, rowActions, confirm, getRowId, classNames,
|
|
|
2819
2866
|
columnWidths,
|
|
2820
2867
|
pinOffset,
|
|
2821
2868
|
pinSignature,
|
|
2822
|
-
|
|
2823
|
-
|
|
2869
|
+
hasStartPin,
|
|
2870
|
+
hasEndPin,
|
|
2824
2871
|
actionsPinned: stickActions,
|
|
2825
2872
|
rowClass: rowClassName?.(row_2, index),
|
|
2826
2873
|
clickable: Boolean(onRowClick),
|