@rxap/material-table-system 14.0.1 → 14.2.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.
@@ -283,10 +283,7 @@ const RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS = new InjectionToken('rxap-m
283
283
  class SelectRowService {
284
284
  constructor(options = null) {
285
285
  this.selectionModel = new SelectionModel(true);
286
- this.selectionModel = new SelectionModel(options?.multiple);
287
- if (options?.selected) {
288
- this.selectionModel.select(...options?.selected);
289
- }
286
+ this.selectionModel = new SelectionModel(options?.multiple, options?.selected, options?.emitChanges, options?.compareWith);
290
287
  this.selectedRows$ = this.selectionModel.changed.pipe(map(() => this.selectionModel.selected));
291
288
  }
292
289
  get selectedRows() {
@@ -595,7 +592,20 @@ class TableDataSourceDirective {
595
592
  this.dataSource.sort = this.matSort ?? undefined;
596
593
  this.dataSource.filter = tableFilter;
597
594
  this.dataSource.parameters = this.parameters;
595
+ if (this.dataSource instanceof DynamicTableDataSource) {
596
+ this.dataSource.setPaginator(this.paginator, this.id);
597
+ this.dataSource.setSort(this.matSort, this.id);
598
+ this.dataSource.setFilter(tableFilter, this.id);
599
+ this.dataSource.setParameters(this.parameters, this.id);
600
+ }
598
601
  this._subscription.add(this.dataSource.loading$.pipe(tap(loading => this.loading$.next(!!loading))).subscribe());
602
+ // create the id property for the mat table component.
603
+ // the instance of the mat table component is used as viewer object
604
+ // with the set of the id property it is possible to use the same data source
605
+ // instance for multiple table component simultaneously
606
+ // on connect the data source can then use the correct paginator/matSort/tableFilter/parameters instance
607
+ // to create the TableEvent objects
608
+ Reflect.set(this.matTable, 'id', this.id);
599
609
  this.matTable.dataSource = pipeDataSource(this.dataSource, tap(rowList => rowList.forEach((element) => {
600
610
  element.__metadata__ = { loading$: new ToggleSubject() };
601
611
  })));
@@ -1529,6 +1539,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImpor
1529
1539
  }] });
1530
1540
 
1531
1541
  class LinkCellComponent {
1542
+ constructor() {
1543
+ this.short = true;
1544
+ }
1532
1545
  get href() {
1533
1546
  if (this.protocol) {
1534
1547
  return [this.protocol, this.value].join(':');
@@ -1537,15 +1550,17 @@ class LinkCellComponent {
1537
1550
  }
1538
1551
  }
1539
1552
  LinkCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LinkCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1540
- LinkCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: LinkCellComponent, selector: "td[rxap-link-cell]", inputs: { value: ["rxap-link-cell", "value"], protocol: "protocol" }, host: { classAttribute: "rxap-link-cell" }, ngImport: i0, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.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: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3$2.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: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1553
+ LinkCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: LinkCellComponent, selector: "td[rxap-link-cell]", inputs: { value: ["rxap-link-cell", "value"], protocol: "protocol", short: "short" }, host: { classAttribute: "rxap-link-cell" }, ngImport: i0, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <span *ngIf=\"short\" i18n fxFlex=\"nogrow\" class=\"content\">Open</span>\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span *ngIf=\"!short\" fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.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: i3$2.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3$2.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: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1541
1554
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LinkCellComponent, decorators: [{
1542
1555
  type: Component,
1543
- args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-link-cell' }, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
1556
+ args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-link-cell' }, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <span *ngIf=\"short\" i18n fxFlex=\"nogrow\" class=\"content\">Open</span>\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span *ngIf=\"!short\" fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
1544
1557
  }], propDecorators: { value: [{
1545
1558
  type: Input,
1546
1559
  args: ['rxap-link-cell']
1547
1560
  }], protocol: [{
1548
1561
  type: Input
1562
+ }], short: [{
1563
+ type: Input
1549
1564
  }] } });
1550
1565
 
1551
1566
  class LinkCellComponentModule {