@rxap/material-table-system 13.3.0 → 13.4.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.
@@ -766,6 +766,7 @@ class TableDataSourceDirective {
766
766
  this.tableFilter = tableFilter;
767
767
  this._tableFilter = _tableFilter;
768
768
  this.loading$ = new ToggleSubject(true);
769
+ this.hasError$ = new ToggleSubject();
769
770
  this._subscription = new Subscription();
770
771
  this.adapterFactory = null;
771
772
  this.matTable.trackBy = this.trackBy;
@@ -824,6 +825,7 @@ class TableDataSourceDirective {
824
825
  this.dataSource.setParameters(this.parameters, this.id);
825
826
  }
826
827
  this._subscription.add(this.dataSource.loading$.pipe(tap(loading => this.loading$.next(!!loading))).subscribe());
828
+ this._subscription.add(this.dataSource.hasError$.pipe(tap(hasError => this.hasError$.next(!!hasError))).subscribe());
827
829
  // create the id property for the mat table component.
828
830
  // the instance of the mat table component is used as viewer object
829
831
  // with the set of the id property it is possible to use the same data source
@@ -840,11 +842,14 @@ class TableDataSourceDirective {
840
842
  .subscribe());
841
843
  }
842
844
  ngOnDestroy() {
843
- this._subscription.unsubscribe();
845
+ this._subscription?.unsubscribe();
844
846
  }
845
847
  refresh() {
846
848
  this.dataSource?.refresh();
847
849
  }
850
+ retry() {
851
+ this.dataSource?.retry();
852
+ }
848
853
  }
849
854
  TableDataSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableDataSourceDirective, deps: [{ token: CdkTable }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_METHOD, optional: true }, { token: TABLE_DATA_SOURCE, optional: true }, { token: TABLE_REMOTE_METHOD_ADAPTER_FACTORY, optional: true }, { token: MatSort, optional: true }, { token: TableFilterService, optional: true }, { token: RXAP_TABLE_FILTER, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
850
855
  TableDataSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: TableDataSourceDirective, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: { setDataSource: ["rxapTableDataSource", "setDataSource"], paginator: "paginator", id: "id", parameters: "parameters", dataSource: "dataSource" }, exportAs: ["rxapTableDataSource"], ngImport: i0 });
@@ -980,6 +985,12 @@ class FilterHeaderRowDirective extends FormDirective {
980
985
  super(cdr, formDefinition);
981
986
  this.tableFilter = tableFilter;
982
987
  }
988
+ set useFormDefinition(value) {
989
+ if (value) {
990
+ this._formDefinition = value;
991
+ this.form = value.rxapFormGroup;
992
+ }
993
+ }
983
994
  ngOnInit() {
984
995
  super.ngOnInit();
985
996
  this._subscription = this.form.value$
@@ -992,7 +1003,7 @@ class FilterHeaderRowDirective extends FormDirective {
992
1003
  }
993
1004
  }
994
1005
  FilterHeaderRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FilterHeaderRowDirective, deps: [{ token: TableFilterService }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_FILTER_FORM_DEFINITION, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
995
- FilterHeaderRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FilterHeaderRowDirective, selector: "table[rxap-filter-header-row]", providers: [
1006
+ FilterHeaderRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FilterHeaderRowDirective, selector: "table[rxap-filter-header-row]", inputs: { useFormDefinition: ["rxap-filter-header-row", "useFormDefinition"] }, providers: [
996
1007
  {
997
1008
  provide: ControlContainer,
998
1009
  // ignore coverage
@@ -1017,7 +1028,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
1017
1028
  }, {
1018
1029
  type: Inject,
1019
1030
  args: [RXAP_TABLE_FILTER_FORM_DEFINITION]
1020
- }] }]; } });
1031
+ }] }]; }, propDecorators: { useFormDefinition: [{
1032
+ type: Input,
1033
+ args: ['rxap-filter-header-row']
1034
+ }] } });
1021
1035
 
1022
1036
  class ToFilterColumnNamesPipe {
1023
1037
  transform(columns) {