@nanoporetech-digital/components 3.6.0 → 3.7.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 +11 -0
- package/dist/cjs/{nano-table-b031ec24.js → nano-table-56eb29c1.js} +13 -9
- package/dist/cjs/nano-table-56eb29c1.js.map +1 -0
- package/dist/cjs/nano-table.cjs.entry.js +1 -1
- package/dist/cjs/{table.worker-dadd1eb0.js → table.worker-b1c53001.js} +2 -2
- package/dist/cjs/table.worker-b1c53001.js.map +1 -0
- package/dist/collection/components/table/table.js +12 -8
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/components/table.js +12 -8
- package/dist/components/table.js.map +1 -1
- package/dist/custom-elements/index.js +11 -7
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{nano-table-74d627a5.js → nano-table-38f3c797.js} +13 -9
- package/dist/esm/nano-table-38f3c797.js.map +1 -0
- package/dist/esm/nano-table.entry.js +1 -1
- package/dist/esm/{table.worker-2908df63.js → table.worker-e57fffd8.js} +2 -2
- package/dist/esm/table.worker-e57fffd8.js.map +1 -0
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/p-0b29b22c.js +5 -0
- package/dist/nano-components/{p-d81d40d9.js.map → p-0b29b22c.js.map} +0 -0
- package/dist/nano-components/{p-f5ee07b3.entry.js → p-ba9cd047.entry.js} +2 -2
- package/dist/nano-components/{p-f5ee07b3.entry.js.map → p-ba9cd047.entry.js.map} +0 -0
- package/dist/nano-components/{p-d7ed2d6e.js → p-d26b97d1.js} +2 -2
- package/dist/nano-components/p-d26b97d1.js.map +1 -0
- package/dist/types/components/table/table.d.ts +1 -0
- package/docs-json.json +1 -1
- package/package.json +2 -2
- package/dist/cjs/nano-table-b031ec24.js.map +0 -1
- package/dist/cjs/table.worker-dadd1eb0.js.map +0 -1
- package/dist/esm/nano-table-74d627a5.js.map +0 -1
- package/dist/esm/table.worker-2908df63.js.map +0 -1
- package/dist/nano-components/p-d7ed2d6e.js.map +0 -1
- package/dist/nano-components/p-d81d40d9.js +0 -5
@@ -26257,9 +26257,6 @@ const Table = class extends H {
|
|
26257
26257
|
this.nanoTblBeforeSearch = createEvent(this, "nanoTblBeforeSearch", 7);
|
26258
26258
|
this.nanoTblAfterSearch = createEvent(this, "nanoTblAfterSearch", 7);
|
26259
26259
|
this.nanoTblBeforeEdit = createEvent(this, "nanoTblBeforeEdit", 7);
|
26260
|
-
this.debounceSetLoading = (l) => {
|
26261
|
-
this.internalLoading = l;
|
26262
|
-
};
|
26263
26260
|
this.renderId = 'tbl-' + id$1++;
|
26264
26261
|
this.filters = [];
|
26265
26262
|
this.currentFilters = '[]';
|
@@ -26376,8 +26373,7 @@ const Table = class extends H {
|
|
26376
26373
|
Math.max(0, blockIndex - 1),
|
26377
26374
|
];
|
26378
26375
|
if (potentialBlocks.toString() !== this.activeBlocks.toString()) {
|
26379
|
-
this.
|
26380
|
-
this.setBlockHeight();
|
26376
|
+
this.debouncedBlockChange(potentialBlocks);
|
26381
26377
|
}
|
26382
26378
|
}
|
26383
26379
|
// fire the event regardless
|
@@ -26427,6 +26423,7 @@ const Table = class extends H {
|
|
26427
26423
|
this.blocks = [];
|
26428
26424
|
this.activeBlocks = [0, 1, 2];
|
26429
26425
|
this.debounceSetLoading = debounce$2(this.debounceSetLoading.bind(this), 50);
|
26426
|
+
this.debouncedBlockChange = debounce$2(this.debouncedBlockChange.bind(this), 100);
|
26430
26427
|
}
|
26431
26428
|
get _loading() {
|
26432
26429
|
return this.loading !== undefined ? this.loading : this.internalLoading;
|
@@ -26436,6 +26433,9 @@ const Table = class extends H {
|
|
26436
26433
|
return;
|
26437
26434
|
this.debounceSetLoading(l);
|
26438
26435
|
}
|
26436
|
+
debounceSetLoading(l) {
|
26437
|
+
this.internalLoading = l;
|
26438
|
+
}
|
26439
26439
|
handleRowsChange() {
|
26440
26440
|
if (!this.rows) {
|
26441
26441
|
this._loading = true;
|
@@ -26796,6 +26796,10 @@ const Table = class extends H {
|
|
26796
26796
|
});
|
26797
26797
|
});
|
26798
26798
|
}
|
26799
|
+
debouncedBlockChange(newBlocks) {
|
26800
|
+
this.activeBlocks = newBlocks;
|
26801
|
+
this.setBlockHeight();
|
26802
|
+
}
|
26799
26803
|
/** Process slotted content */
|
26800
26804
|
processSlots() {
|
26801
26805
|
// see if we have slot content
|
@@ -26853,9 +26857,9 @@ const Table = class extends H {
|
|
26853
26857
|
} }, this.activeBlocks.includes(blockIndex) ? (block.rows.map((row, i) => {
|
26854
26858
|
const rowIndex = blockIndex > 0 ? blockIndex * this.perBlock + i : i;
|
26855
26859
|
return (h$1(TableRow, { rowRenderer: this.rowRender, rowModel: row, rowIndex: rowIndex }, this.store.config.state.columns.map((_colModel, colIndex) => (h$1(TableCell, { rowIndex: rowIndex, colIndex: colIndex })))));
|
26856
|
-
})) : (h$1("td", { colSpan: this.store.config.state.columns.length, style: {
|
26860
|
+
})) : (h$1("tr", null, h$1("td", { colSpan: this.store.config.state.columns.length, style: {
|
26857
26861
|
height: this.getBlockHeight(blockIndex),
|
26858
|
-
} }))))), this.showFooter && (h$1("tfoot", null, h$1(TableHeadFootRow, { rowRenderer: this.footRender, onColumnPinned: this.handleColumnPinned }, this.store.config.state.columns.map((colModel) => [
|
26862
|
+
} })))))), this.showFooter && (h$1("tfoot", null, h$1(TableHeadFootRow, { rowRenderer: this.footRender, onColumnPinned: this.handleColumnPinned }, this.store.config.state.columns.map((colModel) => [
|
26859
26863
|
h$1(TableColHead, { column: colModel, headRenderer: this.footRender, onColumnPinned: this.handleColumnPinned, onColumnSortClick: this.sortStart, defaults: {
|
26860
26864
|
sortable: this.defaultSort,
|
26861
26865
|
draggable: this.defaultColDraggable,
|