@coolon/angular-ui-powerups 14.20.0 → 14.21.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/esm2020/lib/components/tables/abstract-table-model.mjs +5 -3
- package/esm2020/lib/components/tables/table/table-model.mjs +7 -5
- package/esm2020/lib/components/tables/tree-table/tree-table-model.mjs +3 -2
- package/fesm2015/coolon-angular-ui-powerups.mjs +12 -6
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +12 -6
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/abstract-table-model.d.ts +2 -1
- package/lib/components/tables/table/table-model.d.ts +1 -1
- package/package.json +2 -2
|
@@ -3421,7 +3421,7 @@ class RowClass {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
3423
3423
|
class AbstractTableModel extends GarbageCollector {
|
|
3424
|
-
constructor(
|
|
3424
|
+
constructor() {
|
|
3425
3425
|
super();
|
|
3426
3426
|
this._dataSource$ = this.registerDisposable(new DelegatingListModel());
|
|
3427
3427
|
this._visibleRows$ = this.registerDisposable(new DelegatingListModel());
|
|
@@ -3431,7 +3431,6 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3431
3431
|
this.rowClickListeners = new EventListenerList();
|
|
3432
3432
|
this._createForm = (row) => new DirtyTrackingForm();
|
|
3433
3433
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
3434
|
-
this._dataSource$.setDelegate(source$);
|
|
3435
3434
|
this._rowsBeingEdited$ = new MutableListModel([], {
|
|
3436
3435
|
identifiedWith: row => this.identityOf(row)
|
|
3437
3436
|
});
|
|
@@ -3448,6 +3447,9 @@ class AbstractTableModel extends GarbageCollector {
|
|
|
3448
3447
|
this.rowSelectionDisabledOnAllColumns$ = chain(this._columnList).select(column => column.isRowSelectionEnabled()).count().equals(0);
|
|
3449
3448
|
this.dataSourceEmpty$ = chain(this.dataSource$).isEmpty();
|
|
3450
3449
|
}
|
|
3450
|
+
setDataSource(dataSource$) {
|
|
3451
|
+
this._dataSource$.setDelegate(dataSource$);
|
|
3452
|
+
}
|
|
3451
3453
|
/**
|
|
3452
3454
|
* Todo: make this force one table at a time
|
|
3453
3455
|
* @param injector
|
|
@@ -3924,11 +3926,14 @@ TrackExternal.oneTimeBinding(TableFilterModel);
|
|
|
3924
3926
|
* });
|
|
3925
3927
|
*/
|
|
3926
3928
|
class TableModel extends AbstractTableModel {
|
|
3927
|
-
constructor(
|
|
3928
|
-
super(
|
|
3929
|
-
if (
|
|
3929
|
+
constructor(sourceOfTruth, builder) {
|
|
3930
|
+
super();
|
|
3931
|
+
if (builder) {
|
|
3930
3932
|
builder(this);
|
|
3931
3933
|
}
|
|
3934
|
+
if (sourceOfTruth) {
|
|
3935
|
+
this.setDataSource(sourceOfTruth);
|
|
3936
|
+
}
|
|
3932
3937
|
}
|
|
3933
3938
|
addSelectionColumn(selectionModel, showSelectionColumn) {
|
|
3934
3939
|
return this._addSelectionColumn(selectionModel, showSelectionColumn);
|
|
@@ -4606,12 +4611,13 @@ class TreeLabelColumnModel extends ColumnModel {
|
|
|
4606
4611
|
//
|
|
4607
4612
|
class TreeTableModel extends AbstractTableModel {
|
|
4608
4613
|
constructor(source$, childAccessor, builder) {
|
|
4609
|
-
super(
|
|
4614
|
+
super();
|
|
4610
4615
|
this._isExpandedPredicate$ = this.registerDisposable(new DelegatingValueModel());
|
|
4611
4616
|
if (builder)
|
|
4612
4617
|
builder(this);
|
|
4613
4618
|
this.childExtractor = isFunction(childAccessor) ? childAccessor : row => row[childAccessor];
|
|
4614
4619
|
this.addRowClass('aup-node-collapsed', row => this.isCollapsed(row));
|
|
4620
|
+
this.setDataSource(source$);
|
|
4615
4621
|
}
|
|
4616
4622
|
get isExpandedPredicate$() {
|
|
4617
4623
|
return this._isExpandedPredicate$.readonly;
|