@coolon/angular-ui-powerups 14.14.0 → 14.14.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.
@@ -39,7 +39,7 @@ import { MatTableModule } from '@angular/material/table';
39
39
  import * as i4 from '@angular/material/tooltip';
40
40
  import { MatTooltipModule } from '@angular/material/tooltip';
41
41
  import * as i1$3 from '@coolon/pectin';
42
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, Functions, SelectionModel, HasDelegate, MultipleSelectionModel, AbstractComputedListModel, DelegatingSelectionModel, DelegateProxyHandler, DirtyTrackingForm, PagedListModel, PageController, ComputedListModel, Deferred } from '@coolon/pectin';
42
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, DelegatingListModel, MutableValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, Functions, HasDelegate, MultipleSelectionModel, SelectionModel, AbstractComputedListModel, DelegatingSelectionModel, DelegateProxyHandler, DirtyTrackingForm, PagedListModel, PageController, ComputedListModel, Deferred } from '@coolon/pectin';
43
43
  import { __decorate, __param, __metadata } from 'tslib';
44
44
  import * as i1 from '@angular/platform-browser';
45
45
  import escapeStringRegexp from 'escape-string-regexp';
@@ -3028,28 +3028,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
3028
3028
  }] } });
3029
3029
 
3030
3030
  class SelectionCellComponent extends DisposableComponent {
3031
- constructor() {
3032
- super();
3033
- this.selectCommand = Command.create(() => {
3031
+ select() {
3032
+ if (this.selectionModel) {
3034
3033
  this.selectionModel.selectCommand.execute(this.row);
3035
- }, { enableWhile: this.selectionModel.enabled$ });
3034
+ }
3036
3035
  }
3037
3036
  isSelected() {
3038
3037
  return this.selectionModel.isSelected(this.row);
3039
3038
  }
3039
+ isDisabled() {
3040
+ return !this.selectionModel || !this.selectionModel.isEnabled();
3041
+ }
3040
3042
  }
3041
- SelectionCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectionCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3042
- 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"] }] });
3043
- __decorate([
3044
- TrackExternal(),
3045
- __metadata("design:type", SelectionModel)
3046
- ], SelectionCellComponent.prototype, "selectionModel", void 0);
3043
+ SelectionCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectionCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3044
+ 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 (click)=\"select()\" [checked]=\"isSelected()\" [color]=\"color\"></mat-checkbox>\n", styles: [""], dependencies: [{ kind: "component", type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
3047
3045
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SelectionCellComponent, decorators: [{
3048
3046
  type: Component,
3049
- args: [{ selector: 'aup-selection-cell', template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [color]=\"color\"></mat-checkbox>\n" }]
3050
- }], ctorParameters: function () { return []; }, propDecorators: { row: [{
3047
+ args: [{ selector: 'aup-selection-cell', template: "<mat-checkbox (click)=\"select()\" [checked]=\"isSelected()\" [color]=\"color\"></mat-checkbox>\n" }]
3048
+ }], propDecorators: { row: [{
3051
3049
  type: Input
3052
- }], selectionModel: [] } });
3050
+ }] } });
3053
3051
 
3054
3052
  class SelectionHeaderCellComponent extends DisposableComponent {
3055
3053
  constructor() {
@@ -3755,7 +3753,9 @@ class TableRowMenuComponent extends DisposableComponent {
3755
3753
  TableRowMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TableRowMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3756
3754
  TableRowMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: TableRowMenuComponent, selector: "aup-table-row-menu", inputs: { value: "value" }, viewQueries: [{ propertyName: "menu", first: true, predicate: MatMenuTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: `
3757
3755
  <aup-tool-bar>
3758
- <aup-command *ngFor="let action of actions" #comp [command]="action.factory.create(value, {disposedWith: comp})"
3756
+ <aup-command *ngFor="let action of actions"
3757
+ #comp
3758
+ [command]="action.factory.create(value, {disposedWith: comp})"
3759
3759
  [face]="action.face"></aup-command>
3760
3760
  </aup-tool-bar>
3761
3761
  <ng-container *ngIf="moreActions.length > 0">
@@ -3769,7 +3769,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
3769
3769
  type: Component,
3770
3770
  args: [{ selector: 'aup-table-row-menu', template: `
3771
3771
  <aup-tool-bar>
3772
- <aup-command *ngFor="let action of actions" #comp [command]="action.factory.create(value, {disposedWith: comp})"
3772
+ <aup-command *ngFor="let action of actions"
3773
+ #comp
3774
+ [command]="action.factory.create(value, {disposedWith: comp})"
3773
3775
  [face]="action.face"></aup-command>
3774
3776
  </aup-tool-bar>
3775
3777
  <ng-container *ngIf="moreActions.length > 0">