@coolon/angular-ui-powerups 16.1.0-alpha.315 → 16.1.0-alpha.317
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/esm2022/lib/components/tables/abstract-table-model.mjs +4 -8
- package/esm2022/lib/components/tables/column/column-manager.mjs +5 -10
- package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +8 -2
- package/fesm2022/coolon-angular-ui-powerups.mjs +14 -17
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/abstract-table-model.d.ts +2 -4
- package/lib/components/tables/column/column-manager.d.ts +3 -5
- package/package.json +1 -1
|
@@ -5845,13 +5845,11 @@ class ColumnManager extends GarbageCollector {
|
|
|
5845
5845
|
columnDisplayScopes$ = new WatchList();
|
|
5846
5846
|
columnFlexes$ = new WatchList();
|
|
5847
5847
|
_displayScope$ = this.registerDisposable(new DelegatingValueModel());
|
|
5848
|
-
/** The columns shown: those visible in their own right and shown in the table's display scope. */
|
|
5849
|
-
visibleColumns$;
|
|
5850
5848
|
/**
|
|
5851
|
-
* The columns
|
|
5852
|
-
*
|
|
5849
|
+
* The columns shown: those visible in their own right and shown in the table's display scope. A search covers these
|
|
5850
|
+
* and no others, so a row is never found by a column the user cannot see.
|
|
5853
5851
|
*/
|
|
5854
|
-
|
|
5852
|
+
visibleColumns$;
|
|
5855
5853
|
constructor() {
|
|
5856
5854
|
super();
|
|
5857
5855
|
const { chain } = Dsl.disposeWith(this);
|
|
@@ -5863,9 +5861,6 @@ class ColumnManager extends GarbageCollector {
|
|
|
5863
5861
|
this.visibleColumns$ = chain(this.allColumns$).select(it => it.visible$.value && it.displayScopes$.value.includes(this._displayScope$.value), {
|
|
5864
5862
|
dependsOn: [this.columnVisibilities$, this.columnDisplayScopes$, this._displayScope$]
|
|
5865
5863
|
});
|
|
5866
|
-
this.searchedColumns$ = chain(this.allColumns$).select(it => it.visible$.value && it.displayScopes$.value.includes(undefined), {
|
|
5867
|
-
dependsOn: [this.columnVisibilities$, this.columnDisplayScopes$]
|
|
5868
|
-
});
|
|
5869
5864
|
}
|
|
5870
5865
|
useDisplayScope(scope$) {
|
|
5871
5866
|
this._displayScope$.setDelegate(scope$);
|
|
@@ -5885,7 +5880,7 @@ class ColumnManager extends GarbageCollector {
|
|
|
5885
5880
|
return !!this._columnsById$.get(id);
|
|
5886
5881
|
}
|
|
5887
5882
|
hasMatchingColumn(row, regex) {
|
|
5888
|
-
return !!this.
|
|
5883
|
+
return !!this.visibleColumns$.value.find(c => regex.test(c.getSearchTextFor(row)));
|
|
5889
5884
|
}
|
|
5890
5885
|
addColumn(column, position) {
|
|
5891
5886
|
if (this.hasColumn(column.columnId)) {
|
|
@@ -6590,7 +6585,7 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
6590
6585
|
// show the full data source when a filter matches nothing.)
|
|
6591
6586
|
this._filteredRows$.setDelegate(this._dataSource$);
|
|
6592
6587
|
this._visibleRows$.setDelegate(this._filteredRows$);
|
|
6593
|
-
this.textSearchPredicate$ = chain(this.
|
|
6588
|
+
this.textSearchPredicate$ = chain(this.visibleColumns$).reduceAll(columns => {
|
|
6594
6589
|
const cache = new WeakMap();
|
|
6595
6590
|
return (row, regex, searchText) => {
|
|
6596
6591
|
if (!regex)
|
|
@@ -6680,17 +6675,13 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
6680
6675
|
get visibleColumns$() {
|
|
6681
6676
|
return this.columnManager.visibleColumns$;
|
|
6682
6677
|
}
|
|
6683
|
-
/** The columns a search covers: those the default display scope shows, whichever scope the table is in. */
|
|
6684
|
-
get searchedColumns$() {
|
|
6685
|
-
return this.columnManager.searchedColumns$;
|
|
6686
|
-
}
|
|
6687
6678
|
/** Whether each column flexes, so a view can redraw when one starts or stops. */
|
|
6688
6679
|
get columnFlexes$() {
|
|
6689
6680
|
return this.columnManager.columnFlexes$;
|
|
6690
6681
|
}
|
|
6691
6682
|
/**
|
|
6692
|
-
* Shows the columns of a display scope in place of the default ones, such as a phone layout's
|
|
6693
|
-
* default scope. A column shows in the default scope only, until it is given scopes with
|
|
6683
|
+
* Shows the columns of a display scope in place of the default ones, such as a phone layout's, and searches those
|
|
6684
|
+
* columns only. Undefined is the default scope. A column shows in the default scope only, until it is given scopes with
|
|
6694
6685
|
* {@link ColumnModel.onlyDisplayIn}, {@link ColumnModel.alsoDisplayIn} or {@link ColumnModel.displayInEveryScope}.
|
|
6695
6686
|
*/
|
|
6696
6687
|
useDisplayScope(scope$) {
|
|
@@ -7071,7 +7062,13 @@ class TableBodyComponent extends ResizeAwareComponent {
|
|
|
7071
7062
|
// document, where no theme variable resolves. Its first reported size is the moment it is, so take
|
|
7072
7063
|
// the heights again then; the report arrives outside change detection, so this is safe. A change of
|
|
7073
7064
|
// layout that themes other heights (a phone's taller rows) resizes the body too, so it is taken then.
|
|
7074
|
-
when
|
|
7065
|
+
// The virtual viewport measures its height when it is created and keeps that figure until told to measure
|
|
7066
|
+
// again. A body created hidden, in an inactive tab or a closed drawer, measures 0px and renders no rows once
|
|
7067
|
+
// shown, so each resize re-measures it too.
|
|
7068
|
+
when(this.bounds$).changes(() => {
|
|
7069
|
+
this.takeHeightsFromTheme();
|
|
7070
|
+
this.scrollViewport?.checkViewportSize();
|
|
7071
|
+
});
|
|
7075
7072
|
const delayedData$ = chain(this.data$).postponeWhile(this.virtualScrollActive$);
|
|
7076
7073
|
when(delayedData$).changes(delatedData => {
|
|
7077
7074
|
this.animationsDisabled$.value = true;
|