@coolon/angular-ui-powerups 2.0.0-alpha.20 → 2.0.0-alpha.21
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/bundles/coolon-angular-ui-powerups.umd.js +4 -7
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/table/table-model.js +3 -5
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +1 -1
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +3 -6
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +1 -1
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +4 -6
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +4 -7
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/table-model.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2101,6 +2101,9 @@ var TableModel = /** @class */ (function () {
|
|
|
2101
2101
|
this._editorSessions = new MutableListModel();
|
|
2102
2102
|
this.rowClassNamePredicates = [];
|
|
2103
2103
|
this._createForm = function (row) { return new DirtyTrackingForm(); };
|
|
2104
|
+
this.trackBy = function (index, item) {
|
|
2105
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2106
|
+
};
|
|
2104
2107
|
this.identityOf = sourceOfTruth.identityOf;
|
|
2105
2108
|
var _a = Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2106
2109
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -2127,12 +2130,6 @@ var TableModel = /** @class */ (function () {
|
|
|
2127
2130
|
enumerable: true,
|
|
2128
2131
|
configurable: true
|
|
2129
2132
|
});
|
|
2130
|
-
TableModel.prototype.getTrackByFunction = function () {
|
|
2131
|
-
var _this = this;
|
|
2132
|
-
return function (index, item) {
|
|
2133
|
-
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2134
|
-
};
|
|
2135
|
-
};
|
|
2136
2133
|
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2137
2134
|
get: function () {
|
|
2138
2135
|
return this._columns.readonly;
|
|
@@ -2312,7 +2309,7 @@ var TableComponent = /** @class */ (function (_super) {
|
|
|
2312
2309
|
TableComponent = __decorate([
|
|
2313
2310
|
Component({
|
|
2314
2311
|
selector: 'aup-table',
|
|
2315
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.
|
|
2312
|
+
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"onCellClicked(column, row)\" [class.enable-cursor]=\"tableModel.isRowSelectionEnabledFor(column)\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n</table>\n",
|
|
2316
2313
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2317
2314
|
}),
|
|
2318
2315
|
__metadata("design:paramtypes", [])
|