twico-ui 1.17.1 → 1.17.2
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 +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Twico UI are documented here (newest first). This file is generated automatically on each release by [semantic-release](https://semantic-release.gitbook.io/) from [Conventional Commits](https://www.conventionalcommits.org/) — do not edit it by hand. The same notes appear on each [GitHub Release](https://github.com/EncryptionL/twico-ui/releases).
|
|
4
4
|
|
|
5
|
+
## [1.17.2](https://github.com/EncryptionL/twico-ui/compare/v1.17.1...v1.17.2) (2026-07-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **datatable:** clamp footer range + title on truncated cells/headers ([#252](https://github.com/EncryptionL/twico-ui/issues/252), [#253](https://github.com/EncryptionL/twico-ui/issues/253)) ([21a023e](https://github.com/EncryptionL/twico-ui/commit/21a023eb20aa8d05b5413ea752c18e32e15a03dc))
|
|
11
|
+
|
|
5
12
|
## [1.17.1](https://github.com/EncryptionL/twico-ui/compare/v1.17.0...v1.17.1) (2026-07-15)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.cjs
CHANGED
|
@@ -10328,6 +10328,8 @@ function Datatable({
|
|
|
10328
10328
|
const editable = isColEditable(c);
|
|
10329
10329
|
const isEditing = editing && editing.key === k && editing.field === c.field;
|
|
10330
10330
|
const cellActive = selectionMode === "cell" && activeCell && activeCell.key === k && activeCell.field === c.field;
|
|
10331
|
+
const display = c.valueFormatter ? c.valueFormatter(val, row) : val;
|
|
10332
|
+
const cellTitle = !isActions && !c.renderCell && !isEditing && (typeof display === "string" || typeof display === "number") ? String(display) : void 0;
|
|
10331
10333
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10332
10334
|
"td",
|
|
10333
10335
|
{
|
|
@@ -10346,14 +10348,14 @@ function Datatable({
|
|
|
10346
10348
|
"data-pin": st.pin,
|
|
10347
10349
|
"data-pin-edge": st.edge,
|
|
10348
10350
|
style: { width: widthOf(c), ...st.style },
|
|
10349
|
-
title:
|
|
10351
|
+
title: cellTitle,
|
|
10350
10352
|
onClick: selectionMode === "cell" ? (e) => handleCellClick(e, k, row, c) : void 0,
|
|
10351
10353
|
onFocus: () => setFocus((f) => f.r === ri && f.c === ci ? f : { r: ri, c: ci }),
|
|
10352
10354
|
onDoubleClick: editable ? () => beginEdit(k, c, row) : void 0,
|
|
10353
10355
|
children: [
|
|
10354
10356
|
!checkboxSelection && reorderable && ci === 0 && !isEditing ? /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, maxWidth: "100%" }, children: [
|
|
10355
10357
|
rowHandle(k, midIdx, row),
|
|
10356
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: isActions ? renderActions(c, row) : c.renderCell ? c.renderCell(val, row) :
|
|
10358
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: isActions ? renderActions(c, row) : c.renderCell ? c.renderCell(val, row) : display })
|
|
10357
10359
|
] }) : isEditing ? c.renderEditCell ? (
|
|
10358
10360
|
// #236: full escape hatch — the host drops in its own editor (searchable/creatable/
|
|
10359
10361
|
// async Combobox, …) and drives the lifecycle via commit/cancel. Wrapped in
|
|
@@ -10372,7 +10374,7 @@ function Datatable({
|
|
|
10372
10374
|
onCancel: cancelEdit,
|
|
10373
10375
|
onKeyDown: onEditKey
|
|
10374
10376
|
}
|
|
10375
|
-
) : isActions ? renderActions(c, row) : c.renderCell ? c.renderCell(val, row) :
|
|
10377
|
+
) : isActions ? renderActions(c, row) : c.renderCell ? c.renderCell(val, row) : display,
|
|
10376
10378
|
editable && !isEditing ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "twc-dt__edit-hint", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Svg, { d: I.pencil }) }) : null
|
|
10377
10379
|
]
|
|
10378
10380
|
},
|
|
@@ -10788,6 +10790,7 @@ function Datatable({
|
|
|
10788
10790
|
className: "twc-dt__th-label",
|
|
10789
10791
|
role: c.sortable ? "button" : void 0,
|
|
10790
10792
|
tabIndex: c.sortable ? 0 : void 0,
|
|
10793
|
+
title: typeof c.headerName === "string" ? c.headerName : void 0,
|
|
10791
10794
|
"aria-label": c.sortable ? `${c.headerName}, sort` : void 0,
|
|
10792
10795
|
draggable: reorderable || void 0,
|
|
10793
10796
|
onDragStart: reorderable ? (e) => {
|
|
@@ -10919,8 +10922,8 @@ function Datatable({
|
|
|
10919
10922
|
const nf = (n) => n.toLocaleString();
|
|
10920
10923
|
if (totalRows === 0) return "No rows";
|
|
10921
10924
|
const shown = paged.length;
|
|
10922
|
-
const start = paginated ? pageVal * sizeVal + 1 : 1;
|
|
10923
|
-
const end = paginated ? start + shown - 1 : shown;
|
|
10925
|
+
const start = paginated ? Math.min(pageVal * sizeVal + 1, totalRows) : 1;
|
|
10926
|
+
const end = paginated ? Math.min(start + shown - 1, totalRows) : shown;
|
|
10924
10927
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10925
10928
|
paginated ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10926
10929
|
"Showing ",
|