@coolon/angular-ui-powerups 3.14.0 → 3.15.1
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 +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +13 -4
- 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/resize-aware.component.js +1 -1
- package/esm2015/lib/components/resize-aware.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.js +12 -3
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +13 -4
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/table/table.component.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.15.1](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.15.0...v3.15.1) (2021-02-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* removed console.logs ([9fdfba3](https://bitbucket.org/coolon/angular-ui-powerups/commit/9fdfba373e76d867b422304cb3479e36d0baa174))
|
|
11
|
+
|
|
12
|
+
## [3.15.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.14.0...v3.15.0) (2021-02-23)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* added aup-table enableScrolling property ([e2ec5c2](https://bitbucket.org/coolon/angular-ui-powerups/commit/e2ec5c2fe023bc645809d9278214a6956d38b19d))
|
|
18
|
+
|
|
5
19
|
## [3.14.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.13.0...v3.14.0) (2021-02-23)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -2389,13 +2389,13 @@
|
|
|
2389
2389
|
}
|
|
2390
2390
|
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
2391
2391
|
var _this = this;
|
|
2392
|
-
this._updateBounds();
|
|
2393
2392
|
var element = this.elementRef.nativeElement;
|
|
2394
2393
|
var ro = new ResizeObserver__default['default'](function (entries, observer) {
|
|
2395
2394
|
_this.ngZone.run(function () { return _this._updateBounds(); });
|
|
2396
2395
|
});
|
|
2397
2396
|
ro.observe(element);
|
|
2398
2397
|
this.onDispose(function () { return ro.disconnect(); });
|
|
2398
|
+
setTimeout(function () { return _this._updateBounds(); });
|
|
2399
2399
|
};
|
|
2400
2400
|
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
2401
2401
|
get: function () {
|
|
@@ -3305,6 +3305,12 @@
|
|
|
3305
3305
|
__extends(TableComponent, _super);
|
|
3306
3306
|
function TableComponent(elementRef, ngZone) {
|
|
3307
3307
|
var _this = _super.call(this, elementRef, ngZone) || this;
|
|
3308
|
+
/**
|
|
3309
|
+
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
3310
|
+
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
3311
|
+
* containment area.
|
|
3312
|
+
*/
|
|
3313
|
+
_this.enableScrolling = false;
|
|
3308
3314
|
// TODO: support user defined header and row heights via css vars.
|
|
3309
3315
|
_this.headerHeight = new pectin.MutableValueModel(56);
|
|
3310
3316
|
_this.rowHeight = new pectin.MutableValueModel(48);
|
|
@@ -3315,7 +3321,9 @@
|
|
|
3315
3321
|
_this.visibleRowCount = chain(_this.boundsModel).map(function (bounds) {
|
|
3316
3322
|
// TODO: this doesn't take into account any css styling adjustments etc. Will invistigate if it's an issue.
|
|
3317
3323
|
var rawRowCount = (bounds.height - actualHeaderHeight.value) / _this.rowHeight.value;
|
|
3318
|
-
|
|
3324
|
+
var rowCount = rawRowCount < 1 ? 0 : Math.floor(rawRowCount);
|
|
3325
|
+
// console.log({rowCount})
|
|
3326
|
+
return rowCount;
|
|
3319
3327
|
}, {
|
|
3320
3328
|
dependsOn: [actualHeaderHeight, _this.rowHeight],
|
|
3321
3329
|
postponeWhile: chain(_this.boundsModel).pluckNumeric('height').isLessThan(1)
|
|
@@ -3352,8 +3360,8 @@
|
|
|
3352
3360
|
TableComponent.decorators = [
|
|
3353
3361
|
{ type: i0.Component, args: [{
|
|
3354
3362
|
selector: 'aup-table',
|
|
3355
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n
|
|
3356
|
-
styles: [":host{align-items:stretch;display:flex;flex-direction:column}:host table{width:100%}"]
|
|
3363
|
+
template: "<div class=\"scroll-container\">\n <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\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\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)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\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)\" [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n",
|
|
3364
|
+
styles: [":host{align-items:stretch;display:flex;flex-direction:column}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{align-items:stretch;display:flex;flex:1;flex-basis:0;flex-direction:column;overflow-y:scroll}"]
|
|
3357
3365
|
},] }
|
|
3358
3366
|
];
|
|
3359
3367
|
TableComponent.ctorParameters = function () { return [
|
|
@@ -3364,6 +3372,7 @@
|
|
|
3364
3372
|
tableModel: [{ type: i0.Input }],
|
|
3365
3373
|
showHeaderModel: [{ type: i0.Input }],
|
|
3366
3374
|
showHeader: [{ type: i0.Input }],
|
|
3375
|
+
enableScrolling: [{ type: i0.Input }, { type: i0.HostBinding, args: ["class.enable-scrolling",] }],
|
|
3367
3376
|
hideHeader: [{ type: i0.HostBinding, args: ["class.hide-header",] }]
|
|
3368
3377
|
};
|
|
3369
3378
|
__decorate([
|