@coolon/angular-ui-powerups 11.0.0-alpha.6 → 11.0.0-alpha.8
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/assets/table.scss +13 -6
- package/bundles/coolon-angular-ui-powerups.umd.js +35 -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/commands/command/command.component.js +5 -1
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +0 -3
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js +2 -1
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +30 -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 +36 -8
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +2 -1
- package/lib/components/table/column-model.d.ts +1 -0
- package/lib/components/table/table.component.d.ts +20 -2
- package/package.json +1 -1
package/assets/table.scss
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
aup-table {
|
|
2
|
-
--
|
|
3
|
-
--resolved-row-selected-background-color: var(--row-selected-background-color, rgba(0, 0, 255, 0.04));
|
|
4
|
-
--resolved-row-hover-background-color: var(--row-hover-background-color, rgba(0, 0, 0, 0.05));
|
|
2
|
+
--resolved-column-gap: var(--column-gap, var(--aup-table-column-gap, 24px)); // material design table column padding
|
|
3
|
+
--resolved-row-selected-background-color: var(--row-selected-background-color, var(--aup-table-row-selected-background-color, rgba(0, 0, 255, 0.04)));
|
|
4
|
+
--resolved-row-hover-background-color: var(--row-hover-background-color, var(--aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)));
|
|
5
|
+
--resolved-first-column-padding-left: var(--first-column-padding-left, var(--aup-table-first-column-padding-left, var(--resolved-column-gap)));
|
|
6
|
+
--resolved-last-column-padding-right: var(--last-column-padding-right, var(--aup-table-last-column-padding-right, var(--resolved-column-gap)));
|
|
5
7
|
|
|
6
8
|
&.hide-header {
|
|
7
9
|
.mat-table thead {
|
|
@@ -64,9 +66,14 @@ aup-table {
|
|
|
64
66
|
height: 100%;
|
|
65
67
|
min-height: 47px; // same as mat table row height - border bottom.
|
|
66
68
|
|
|
67
|
-
padding-left: var(--
|
|
69
|
+
padding-left: var(--resolved-column-gap);
|
|
70
|
+
|
|
71
|
+
&.first-visible-column {
|
|
72
|
+
padding-left: var(--resolved-first-column-padding-left);
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
&.last-visible-column {
|
|
69
|
-
padding-right: var(--
|
|
76
|
+
padding-right: var(--resolved-last-column-padding-right);
|
|
70
77
|
}
|
|
71
78
|
}
|
|
72
79
|
|
|
@@ -78,7 +85,7 @@ aup-table {
|
|
|
78
85
|
|
|
79
86
|
&.padChild {
|
|
80
87
|
> *:first-child {
|
|
81
|
-
padding-left: var(--
|
|
88
|
+
padding-left: var(--resolved-column-gap);
|
|
82
89
|
flex: 1;
|
|
83
90
|
}
|
|
84
91
|
}
|
|
@@ -1009,6 +1009,9 @@
|
|
|
1009
1009
|
_this.activeFace = _this.faces.first();
|
|
1010
1010
|
_this.buttonStyle = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getStyleOf(f); });
|
|
1011
1011
|
_this.colorModel = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getColorOf(f); });
|
|
1012
|
+
_this.iconOnly = _this.faces.select(function (face) {
|
|
1013
|
+
return ___default['default'].isEmpty(exports.CommandFace.getTextOf(face)) && !___default['default'].isEmpty(exports.CommandFace.getIconOf(face));
|
|
1014
|
+
}).count().equals(_this.faces.count());
|
|
1012
1015
|
return _this;
|
|
1013
1016
|
}
|
|
1014
1017
|
CommandComponent.prototype.isActive = function (face) {
|
|
@@ -1027,7 +1030,7 @@
|
|
|
1027
1030
|
CommandComponent.decorators = [
|
|
1028
1031
|
{ type: i0.Component, args: [{
|
|
1029
1032
|
selector: 'aup-command',
|
|
1030
|
-
template: "<ng-container [ngSwitch]=\"buttonStyle.value\">\n
|
|
1033
|
+
template: "<ng-container *ngIf=\"iconOnly.value\">\n <button mat-icon-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n</ng-container>\n<ng-container *ngIf=\"!iconOnly.value\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n",
|
|
1031
1034
|
styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
|
|
1032
1035
|
},] }
|
|
1033
1036
|
];
|
|
@@ -2707,6 +2710,7 @@
|
|
|
2707
2710
|
this._flex = false;
|
|
2708
2711
|
this._visibleModel = new pectin.DelegatingValueModel().withDefault(true);
|
|
2709
2712
|
this.installHeaderRenderer();
|
|
2713
|
+
this.dasherisedColumnId = typescriptUtilities.Stringy.from(columnId).dasherize().toString();
|
|
2710
2714
|
}
|
|
2711
2715
|
ColumnModel.prototype.installHeaderRenderer = function () {
|
|
2712
2716
|
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
|
|
@@ -3332,15 +3336,32 @@
|
|
|
3332
3336
|
*
|
|
3333
3337
|
* Styling
|
|
3334
3338
|
* @example
|
|
3339
|
+
* // global settings
|
|
3340
|
+
* :root {
|
|
3341
|
+
* --aup-table-column-gap: 10px; // defaults to 24px
|
|
3342
|
+
* --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
3343
|
+
* --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
3344
|
+
* --aup-table-first-column-padding-left: 18px // defaults to --column-gap
|
|
3345
|
+
* --aup-table-last-column-padding-right: 18px // defaults to --column-gap
|
|
3346
|
+
* }
|
|
3347
|
+
*
|
|
3348
|
+
* // per table settings.
|
|
3335
3349
|
* aup-table {
|
|
3336
3350
|
* --column-gap: 10px; // defaults to 24px
|
|
3337
3351
|
* --row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
3338
3352
|
* --row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
3353
|
+
* --first-column-padding-left: 18px // defaults to --column-gap
|
|
3354
|
+
* --last-column-padding-right: 18px // defaults to --column-gap
|
|
3355
|
+
*
|
|
3356
|
+
* aup-table-header-cell-renderer,
|
|
3339
3357
|
* aup-table-cell-renderer {
|
|
3340
|
-
*
|
|
3358
|
+
* &.aup-col-my-dasherised-column-id {
|
|
3359
|
+
* // do stuff
|
|
3360
|
+
* }
|
|
3361
|
+
* &.first-visible-column {
|
|
3341
3362
|
* // do stuff
|
|
3342
3363
|
* }
|
|
3343
|
-
*
|
|
3364
|
+
* &.last-visible-column {
|
|
3344
3365
|
* // do stuff
|
|
3345
3366
|
* }
|
|
3346
3367
|
* }
|
|
@@ -3410,12 +3431,22 @@
|
|
|
3410
3431
|
var _a;
|
|
3411
3432
|
return ((_a = this.tableModel.lastVisibleColumn.query().value) === null || _a === void 0 ? void 0 : _a.columnId) === columnId;
|
|
3412
3433
|
};
|
|
3434
|
+
TableComponent.prototype.getColumnClasses = function (columnId) {
|
|
3435
|
+
var classes = ["aup-col-" + this.columnsById.get(columnId).dasherisedColumnId];
|
|
3436
|
+
if (this.isFirstVisibleColumn(columnId)) {
|
|
3437
|
+
classes.push('first-visible-column');
|
|
3438
|
+
}
|
|
3439
|
+
if (this.isLastVisibleColumn(columnId)) {
|
|
3440
|
+
classes.push('last-visible-column');
|
|
3441
|
+
}
|
|
3442
|
+
return classes;
|
|
3443
|
+
};
|
|
3413
3444
|
return TableComponent;
|
|
3414
3445
|
}(ResizeAwareComponent));
|
|
3415
3446
|
TableComponent.decorators = [
|
|
3416
3447
|
{ type: i0.Component, args: [{
|
|
3417
3448
|
selector: 'aup-table',
|
|
3418
|
-
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
|
|
3449
|
+
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]=\"getColumnClasses(column.columnId)\"\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]=\"getColumnClasses(column.columnId)\"\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",
|
|
3419
3450
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:scroll;display:flex;flex-direction:column;align-items:stretch}"]
|
|
3420
3451
|
},] }
|
|
3421
3452
|
];
|
|
@@ -4481,12 +4512,9 @@
|
|
|
4481
4512
|
TreeTableComponent,
|
|
4482
4513
|
exports.TreeInheritanceIconComponent,
|
|
4483
4514
|
TreeLabelCellRendererComponent,
|
|
4484
|
-
exports.IconComponent,
|
|
4485
4515
|
BusyOverlayComponent,
|
|
4486
4516
|
EmptyStateComponent,
|
|
4487
4517
|
PaginatorComponent,
|
|
4488
|
-
exports.IconComponent,
|
|
4489
|
-
exports.IconComponent
|
|
4490
4518
|
],
|
|
4491
4519
|
imports: [
|
|
4492
4520
|
i2.CommonModule,
|