tosijs-ui 1.5.19 → 1.5.22
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/data-table.d.ts +1 -1
- package/dist/data-table.js +18 -19
- package/dist/iife.js +34 -34
- package/dist/iife.js.map +7 -7
- package/dist/menu.js +2 -2
- package/dist/tab-selector.d.ts +1 -1
- package/dist/tab-selector.js +5 -8
- package/dist/tag-list.js +31 -14
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/data-table.d.ts
CHANGED
package/dist/data-table.js
CHANGED
|
@@ -120,7 +120,8 @@ test('row selection: data model + aria-selected on row (incl. custom dataCell)',
|
|
|
120
120
|
expect(table.selectedRows.length).toBe(2)
|
|
121
121
|
|
|
122
122
|
// DOM: aria-selected lives on the row element. CSS targets
|
|
123
|
-
// .tr[aria-selected
|
|
123
|
+
// .tr[aria-selected] .td to highlight cells. The attribute is set via
|
|
124
|
+
// toggleAttribute, so its value is "" (presence-only) — match accordingly.
|
|
124
125
|
const cells0 = table.getCells(items[0])
|
|
125
126
|
const cells1 = table.getCells(items[1])
|
|
126
127
|
expect(cells0.length).toBe(table.visibleColumns.length)
|
|
@@ -615,7 +616,7 @@ export class TosiTable extends WebComponent {
|
|
|
615
616
|
zIndex: '3',
|
|
616
617
|
background: varDefault.tosiTableHeaderBg(varDefault.tosiTableBg('var(--tosi-bg, #fff)')),
|
|
617
618
|
},
|
|
618
|
-
':host .tr[aria-selected
|
|
619
|
+
':host .tr[aria-selected] .td': {
|
|
619
620
|
background: varDefault.tosiTableSelectedBg('var(--tosi-accent, #007AFF22)'),
|
|
620
621
|
},
|
|
621
622
|
':host .td:focus, :host .th:focus': {
|
|
@@ -1090,8 +1091,13 @@ export class TosiTable extends WebComponent {
|
|
|
1090
1091
|
// its own non-virtualised listBinding so each pinned row goes through the
|
|
1091
1092
|
// same dataCell / rowRendered / `^.prop` pipeline as the virtual rows. The
|
|
1092
1093
|
// wrapper has no box of its own, so its stamped rows are layout children of
|
|
1093
|
-
// .scroll-area and share its single sticky context.
|
|
1094
|
-
|
|
1094
|
+
// .scroll-area and share its single sticky context. Returns null when the
|
|
1095
|
+
// region is empty so render() can drop it from the DOM.
|
|
1096
|
+
buildPinnedBody(rowsProxy, cols, stickyInfo, region) {
|
|
1097
|
+
const data = tosiValue(rowsProxy);
|
|
1098
|
+
if (!data || data.length === 0)
|
|
1099
|
+
return null;
|
|
1100
|
+
const part = region === 'pinned-top' ? 'pinnedTopRows' : 'pinnedBottomRows';
|
|
1095
1101
|
const rowClass = this.rowClasses(region);
|
|
1096
1102
|
const binding = rowsProxy.listBinding((_elements, item) => this.buildRow(item, cols, stickyInfo, rowClass), {});
|
|
1097
1103
|
return div({
|
|
@@ -1641,25 +1647,18 @@ export class TosiTable extends WebComponent {
|
|
|
1641
1647
|
// so their stamped rows participate in .scroll-area's layout directly,
|
|
1642
1648
|
// sharing one sticky context with the visible rows and the header.
|
|
1643
1649
|
this._head = this.buildHeader(cols, stickyInfo);
|
|
1644
|
-
this._tbodyTop =
|
|
1645
|
-
|
|
1646
|
-
? this.buildPinnedBody(this.rowData.pinnedTopData, cols, stickyInfo, 'pinned-top', 'pinnedTopRows')
|
|
1647
|
-
: null;
|
|
1648
|
-
this._tbodyBottom =
|
|
1649
|
-
pinnedBottomData.length > 0
|
|
1650
|
-
? this.buildPinnedBody(this.rowData.pinnedBottomData, cols, stickyInfo, 'pinned-bottom', 'pinnedBottomRows')
|
|
1651
|
-
: null;
|
|
1650
|
+
this._tbodyTop = this.buildPinnedBody(this.rowData.pinnedTopData, cols, stickyInfo, 'pinned-top');
|
|
1651
|
+
this._tbodyBottom = this.buildPinnedBody(this.rowData.pinnedBottomData, cols, stickyInfo, 'pinned-bottom');
|
|
1652
1652
|
// The visible-rows listBinding is bound directly to .scroll-area so
|
|
1653
1653
|
// virtualisation observes the same scroll container that sticky cells
|
|
1654
1654
|
// stick against.
|
|
1655
1655
|
const visibleBinding = this.rowData.visible.listBinding((_elements, item) => this.buildRow(item, cols, stickyInfo), this.rowHeight > 0 ? { virtual: { height: this.rowHeight } } : {});
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
this._scrollArea = div({ class: 'scroll-area', part: 'visibleRows' }, ...scrollAreaChildren);
|
|
1656
|
+
this._scrollArea = div({ class: 'scroll-area', part: 'visibleRows' }, ...[
|
|
1657
|
+
this._head,
|
|
1658
|
+
this._tbodyTop,
|
|
1659
|
+
...visibleBinding,
|
|
1660
|
+
this._tbodyBottom,
|
|
1661
|
+
].filter(Boolean));
|
|
1663
1662
|
this._scrollArea.addEventListener('scrollend', this.onScrollEnd);
|
|
1664
1663
|
this.append(this._scrollArea);
|
|
1665
1664
|
this.observePinnedRowMutations();
|