@elderbyte/ngx-starter 14.9.0 → 14.10.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.
@@ -7083,6 +7083,7 @@ class SelectionModel {
7083
7083
  this.select([selected[0]]);
7084
7084
  }
7085
7085
  }
7086
+ this.selectionChanged('multi-selection-toggle');
7086
7087
  }
7087
7088
  }
7088
7089
  /***************************************************************************
@@ -11936,11 +11937,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.4", ngImpor
11936
11937
  }] } });
11937
11938
 
11938
11939
  class MasterSelectionState {
11939
- constructor(count, allSelected, someSelected, anySelected) {
11940
+ constructor(count, allSelected, someSelected, anySelected, isMultiSelection) {
11940
11941
  this.count = count;
11941
11942
  this.allSelected = allSelected;
11942
11943
  this.someSelected = someSelected;
11943
11944
  this.anySelected = anySelected;
11945
+ this.isMultiSelection = isMultiSelection;
11944
11946
  }
11945
11947
  }
11946
11948
 
@@ -12013,7 +12015,7 @@ class DataContextSelectionDirective {
12013
12015
  buildSelectionStateInner$(model, dc) {
12014
12016
  return combineLatest([model.selection, dc.data]).pipe(map(([selection, currentData]) => {
12015
12017
  const unselectable = currentData.filter(i => !model.isSelectable(i));
12016
- return new MasterSelectionState(selection.length, selection.length >= currentData.length - unselectable.length, selection.length > 0 && selection.length < currentData.length - unselectable.length, selection.length > 0);
12018
+ return new MasterSelectionState(selection.length, selection.length >= currentData.length - unselectable.length, selection.length > 0 && selection.length < currentData.length - unselectable.length, selection.length > 0, model.isMultipleSelection);
12017
12019
  }));
12018
12020
  }
12019
12021
  }
@@ -12059,10 +12061,10 @@ class ElderSelectionMasterCheckboxComponent {
12059
12061
  }
12060
12062
  }
12061
12063
  ElderSelectionMasterCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.4", ngImport: i0, type: ElderSelectionMasterCheckboxComponent, deps: [{ token: DataContextSelectionDirective }], target: i0.ɵɵFactoryTarget.Component });
12062
- ElderSelectionMasterCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.4", type: ElderSelectionMasterCheckboxComponent, selector: "elder-selection-master-checkbox", ngImport: i0, template: "<div\n *ngIf=\"\n dataContextSelection.selectionModel.isMultipleSelection\n && dataContextSelection?.selectionState$ | async as selectionState\"\n\n fxLayout=\"column\" fxFlex=\"none\"\n\n [matBadgeHidden]=\"selectionState.count === 0\"\n [matBadge]=\"selectionState.count + ''\"\n [matBadgePosition]=\"'above before'\"\n [matBadgeOverlap]=\"false\"\n [matBadgeSize]=\"'small'\"\n>\n <mat-checkbox fxFlex=\"none\"\n (change)=\"$event ? dataContextSelection.masterToggle() : null\"\n [checked]=\"selectionState.allSelected\"\n [indeterminate]=\"selectionState.someSelected\"\n >\n </mat-checkbox>\n</div>\n\n<!-- -->\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$8.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4$3.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12064
+ ElderSelectionMasterCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.4", type: ElderSelectionMasterCheckboxComponent, selector: "elder-selection-master-checkbox", ngImport: i0, template: "<ng-container *ngIf=\"dataContextSelection?.selectionState$ | async as selectionState\">\n <div\n *ngIf=\"selectionState.isMultiSelection\"\n fxLayout=\"column\" fxFlex=\"none\"\n [matBadgeHidden]=\"selectionState.count === 0\"\n [matBadge]=\"selectionState.count + ''\"\n [matBadgePosition]=\"'above before'\"\n [matBadgeOverlap]=\"false\"\n [matBadgeSize]=\"'small'\"\n >\n <mat-checkbox fxFlex=\"none\"\n (change)=\"$event ? dataContextSelection.masterToggle() : null\"\n [checked]=\"selectionState.allSelected\"\n [indeterminate]=\"selectionState.someSelected\"\n >\n </mat-checkbox>\n </div>\n</ng-container>\n\n\n\n<!-- -->\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$8.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4$3.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12063
12065
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.4", ngImport: i0, type: ElderSelectionMasterCheckboxComponent, decorators: [{
12064
12066
  type: Component,
12065
- args: [{ selector: 'elder-selection-master-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"\n dataContextSelection.selectionModel.isMultipleSelection\n && dataContextSelection?.selectionState$ | async as selectionState\"\n\n fxLayout=\"column\" fxFlex=\"none\"\n\n [matBadgeHidden]=\"selectionState.count === 0\"\n [matBadge]=\"selectionState.count + ''\"\n [matBadgePosition]=\"'above before'\"\n [matBadgeOverlap]=\"false\"\n [matBadgeSize]=\"'small'\"\n>\n <mat-checkbox fxFlex=\"none\"\n (change)=\"$event ? dataContextSelection.masterToggle() : null\"\n [checked]=\"selectionState.allSelected\"\n [indeterminate]=\"selectionState.someSelected\"\n >\n </mat-checkbox>\n</div>\n\n<!-- -->\n" }]
12067
+ args: [{ selector: 'elder-selection-master-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"dataContextSelection?.selectionState$ | async as selectionState\">\n <div\n *ngIf=\"selectionState.isMultiSelection\"\n fxLayout=\"column\" fxFlex=\"none\"\n [matBadgeHidden]=\"selectionState.count === 0\"\n [matBadge]=\"selectionState.count + ''\"\n [matBadgePosition]=\"'above before'\"\n [matBadgeOverlap]=\"false\"\n [matBadgeSize]=\"'small'\"\n >\n <mat-checkbox fxFlex=\"none\"\n (change)=\"$event ? dataContextSelection.masterToggle() : null\"\n [checked]=\"selectionState.allSelected\"\n [indeterminate]=\"selectionState.someSelected\"\n >\n </mat-checkbox>\n </div>\n</ng-container>\n\n\n\n<!-- -->\n" }]
12066
12068
  }], ctorParameters: function () { return [{ type: DataContextSelectionDirective }]; } });
12067
12069
 
12068
12070
  class DataContextStateIndicatorComponent {