@coolon/angular-ui-powerups 14.4.0 → 14.5.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/column/selection-column-model.mjs +10 -1
- package/esm2020/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.mjs +3 -3
- package/esm2020/lib/components/tables/renderer/selection-cell/selection-cell.component.mjs +3 -3
- package/fesm2015/coolon-angular-ui-powerups.mjs +13 -4
- package/fesm2015/coolon-angular-ui-powerups.mjs.map +1 -1
- package/fesm2020/coolon-angular-ui-powerups.mjs +13 -4
- package/fesm2020/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/column/selection-column-model.d.ts +6 -0
- package/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.d.ts +2 -0
- package/lib/components/tables/renderer/selection-cell/selection-cell.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -2950,10 +2950,10 @@ class SelectionCellComponent extends DisposableComponent {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
}
|
|
2952
2952
|
SelectionCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectionCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2953
|
-
SelectionCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SelectionCellComponent, selector: "aup-selection-cell", inputs: { row: "row" }, usesInheritance: true, ngImport: i0, template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n", styles: [""], dependencies: [{ kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { kind: "component", type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
|
|
2953
|
+
SelectionCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SelectionCellComponent, selector: "aup-selection-cell", inputs: { row: "row" }, usesInheritance: true, ngImport: i0, template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [color]=\"color\"></mat-checkbox>\n", styles: [""], dependencies: [{ kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { kind: "component", type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
|
|
2954
2954
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectionCellComponent, decorators: [{
|
|
2955
2955
|
type: Component,
|
|
2956
|
-
args: [{ selector: 'aup-selection-cell', template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n" }]
|
|
2956
|
+
args: [{ selector: 'aup-selection-cell', template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [color]=\"color\"></mat-checkbox>\n" }]
|
|
2957
2957
|
}], ctorParameters: function () { return []; }, propDecorators: { row: [{
|
|
2958
2958
|
type: Input
|
|
2959
2959
|
}] } });
|
|
@@ -2976,10 +2976,10 @@ class SelectionHeaderCellComponent extends DisposableComponent {
|
|
|
2976
2976
|
}
|
|
2977
2977
|
}
|
|
2978
2978
|
SelectionHeaderCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectionHeaderCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2979
|
-
SelectionHeaderCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SelectionHeaderCellComponent, selector: "aup-selection-header-cell", usesInheritance: true, ngImport: i0, template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { kind: "component", type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
|
|
2979
|
+
SelectionHeaderCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SelectionHeaderCellComponent, selector: "aup-selection-header-cell", usesInheritance: true, ngImport: i0, template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\" [color]=\"color\"></mat-checkbox>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CommandDirective, selector: "[pectinCommand]", inputs: ["pectinCommand", "commandParameter"] }, { kind: "component", type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
|
|
2980
2980
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectionHeaderCellComponent, decorators: [{
|
|
2981
2981
|
type: Component,
|
|
2982
|
-
args: [{ selector: 'aup-selection-header-cell', template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n" }]
|
|
2982
|
+
args: [{ selector: 'aup-selection-header-cell', template: "<mat-checkbox *ngIf=\"isVisible()\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\" [color]=\"color\"></mat-checkbox>\n" }]
|
|
2983
2983
|
}], ctorParameters: function () { return []; } });
|
|
2984
2984
|
|
|
2985
2985
|
class ColumnListModel extends AbstractComputedListModel {
|
|
@@ -3237,15 +3237,18 @@ class SelectionColumnModel extends ColumnModel {
|
|
|
3237
3237
|
constructor(columnId, defaults, selectionModel) {
|
|
3238
3238
|
super(columnId, defaults);
|
|
3239
3239
|
this._enableHeaderControls = true;
|
|
3240
|
+
this._color = "accent";
|
|
3240
3241
|
this.selectionModel = DelegatingSelectionModel.createDelegate();
|
|
3241
3242
|
this._selectRowOnClick(false);
|
|
3242
3243
|
this.cellHeaderRenderer(SelectionHeaderCellComponent, (component) => {
|
|
3243
3244
|
component.selectionModel = this.selectionModel;
|
|
3244
3245
|
component.enableHeaderControls = this._enableHeaderControls;
|
|
3246
|
+
component.color = this._color;
|
|
3245
3247
|
});
|
|
3246
3248
|
this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectionCellComponent, (component, rowData) => {
|
|
3247
3249
|
component.row = rowData.row;
|
|
3248
3250
|
component.selectionModel = this.selectionModel;
|
|
3251
|
+
component.color = this._color;
|
|
3249
3252
|
}));
|
|
3250
3253
|
this.setSelectionModel(selectionModel);
|
|
3251
3254
|
}
|
|
@@ -3260,6 +3263,12 @@ class SelectionColumnModel extends ColumnModel {
|
|
|
3260
3263
|
this._enableHeaderControls = enable;
|
|
3261
3264
|
return this;
|
|
3262
3265
|
}
|
|
3266
|
+
/**
|
|
3267
|
+
* Set the checkbox to use a theme color e.g. "primary" | "accent" | "warn"
|
|
3268
|
+
*/
|
|
3269
|
+
color(color) {
|
|
3270
|
+
this._color = color;
|
|
3271
|
+
}
|
|
3263
3272
|
selectRow(row) {
|
|
3264
3273
|
this.selectionModel.selectCommand.execute(row);
|
|
3265
3274
|
}
|