@rxap/material-table-system 13.0.0-next.3 → 13.0.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/table-data-source.directive.mjs +17 -15
- package/fesm2015/rxap-material-table-system.mjs +17 -16
- package/fesm2015/rxap-material-table-system.mjs.map +1 -1
- package/fesm2020/rxap-material-table-system.mjs +17 -16
- package/fesm2020/rxap-material-table-system.mjs.map +1 -1
- package/lib/table-data-source.directive.d.ts +1 -1
- package/package.json +18 -18
|
@@ -20,7 +20,8 @@ import * as i4 from '@angular/cdk/table';
|
|
|
20
20
|
import { CdkTable } from '@angular/cdk/table';
|
|
21
21
|
import * as i2$2 from '@angular/material/sort';
|
|
22
22
|
import { MatSort } from '@angular/material/sort';
|
|
23
|
-
import { DynamicTableDataSource } from '@rxap/data-source/table';
|
|
23
|
+
import { RXAP_TABLE_METHOD, DynamicTableDataSource } from '@rxap/data-source/table';
|
|
24
|
+
export { RXAP_TABLE_METHOD } from '@rxap/data-source/table';
|
|
24
25
|
import { ToggleSubject } from '@rxap/utilities/rxjs';
|
|
25
26
|
import { pipeDataSource } from '@rxap/data-source';
|
|
26
27
|
import * as i1$3 from '@angular/material/paginator';
|
|
@@ -524,8 +525,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
524
525
|
type: Injectable
|
|
525
526
|
}], ctorParameters: function () { return []; } });
|
|
526
527
|
|
|
527
|
-
// TODO : add migration schematic
|
|
528
|
-
const RXAP_TABLE_METHOD = new InjectionToken('rxap/material/table-system/table-method');
|
|
529
528
|
/**
|
|
530
529
|
* @deprecated use TABLE_METHOD instead
|
|
531
530
|
*/
|
|
@@ -573,20 +572,22 @@ class TableDataSourceDirective {
|
|
|
573
572
|
}
|
|
574
573
|
ngOnInit() {
|
|
575
574
|
const tableFilter = this._tableFilter ?? this.tableFilter ?? undefined;
|
|
576
|
-
if (this.
|
|
577
|
-
if (this.
|
|
578
|
-
this.
|
|
575
|
+
if (!this.dataSource) {
|
|
576
|
+
if (this.sourceDataSource) {
|
|
577
|
+
this.dataSource = this.sourceDataSource;
|
|
579
578
|
}
|
|
580
|
-
else {
|
|
581
|
-
this.
|
|
579
|
+
else if (this.sourceMethod) {
|
|
580
|
+
if (this.adapterFactory) {
|
|
581
|
+
this.method = this.adapterFactory(this.sourceMethod, this.paginator, this.matSort, tableFilter, this.parameters);
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
this.method = this.sourceMethod;
|
|
585
|
+
}
|
|
586
|
+
this.dataSource = new DynamicTableDataSource(this.method, this.paginator, this.matSort, tableFilter, this.parameters, this.method.metadata ?? { id: this.id });
|
|
587
|
+
}
|
|
588
|
+
if (!this.dataSource) {
|
|
589
|
+
throw new Error('The TABLE_DATA_SOURCE and TABLE_METHOD token are not defined!');
|
|
582
590
|
}
|
|
583
|
-
this.dataSource = new DynamicTableDataSource(this.method, this.paginator, this.matSort, tableFilter, this.parameters, this.method.metadata ?? { id: this.id });
|
|
584
|
-
}
|
|
585
|
-
else if (this.sourceDataSource) {
|
|
586
|
-
this.dataSource = this.sourceDataSource;
|
|
587
|
-
}
|
|
588
|
-
else if (!this.dataSource) {
|
|
589
|
-
throw new Error('The TABLE_DATA_SOURCE and TABLE_METHOD token are not defined!');
|
|
590
591
|
}
|
|
591
592
|
this.dataSource.paginator = this.paginator;
|
|
592
593
|
this.dataSource.sort = this.matSort ?? undefined;
|
|
@@ -2052,5 +2053,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
2052
2053
|
* Generated bundle index. Do not edit.
|
|
2053
2054
|
*/
|
|
2054
2055
|
|
|
2055
|
-
export { BooleanCellComponent, BooleanCellComponentModule, CheckboxCellComponent, CheckboxCellComponentModule, CheckboxHeaderCellComponent, CheckboxHeaderCellComponentModule, CopyToClipboardCellComponent, CopyToClipboardCellComponentModule, DateCellComponent, DateCellComponentModule, ExpandControlsCellComponent, ExpandControlsCellComponentModule, ExpandRowContainerComponent, ExpandRowContainerComponentModule, ExpandRowContentDirective, ExpandRowDirective, ExpandRowModule, ExpandRowService, FilterHeaderRowDirective, IconCellComponent, IconCellComponentModule, ImageCellComponent, ImageCellComponentModule, IsTableRowActionTypeMethod, IsTableRowActionTypeSwitchMethod, LinkCellComponent, LinkCellComponentModule, OptionsCellComponent, OptionsCellComponentModule, PersistentPaginatorDirective, PersistentPaginatorDirectiveModule, ROW_ARCHIVE_METHOD, ROW_DELETE_METHOD, ROW_EDIT_LOADER_METHOD, ROW_EDIT_METHOD, ROW_LINK_METHOD, ROW_RESTORE_METHOD, ROW_VIEW_METHOD, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION,
|
|
2056
|
+
export { BooleanCellComponent, BooleanCellComponentModule, CheckboxCellComponent, CheckboxCellComponentModule, CheckboxHeaderCellComponent, CheckboxHeaderCellComponentModule, CopyToClipboardCellComponent, CopyToClipboardCellComponentModule, DateCellComponent, DateCellComponentModule, ExpandControlsCellComponent, ExpandControlsCellComponentModule, ExpandRowContainerComponent, ExpandRowContainerComponentModule, ExpandRowContentDirective, ExpandRowDirective, ExpandRowModule, ExpandRowService, FilterHeaderRowDirective, IconCellComponent, IconCellComponentModule, ImageCellComponent, ImageCellComponentModule, IsTableRowActionTypeMethod, IsTableRowActionTypeSwitchMethod, LinkCellComponent, LinkCellComponentModule, OptionsCellComponent, OptionsCellComponentModule, PersistentPaginatorDirective, PersistentPaginatorDirectiveModule, ROW_ARCHIVE_METHOD, ROW_DELETE_METHOD, ROW_EDIT_LOADER_METHOD, ROW_EDIT_METHOD, ROW_LINK_METHOD, ROW_RESTORE_METHOD, ROW_VIEW_METHOD, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_TABLE_ROW_ACTION_METHOD, RowAnimation, RowControlsCellComponent, RowControlsCellComponentModule, RowControlsHeaderCellComponent, RowControlsHeaderCellComponentModule, SelectRowModule, SelectRowService, SelectedRowsDirective, TABLE_CREATE_REMOTE_METHOD, TABLE_DATA_SOURCE, TABLE_REMOTE_METHOD, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, TableActionMethod, TableColumnMenuComponent, TableColumnMenuComponentModule, TableColumnOptionComponent, TableCreateButtonDirective, TableCreateButtonDirectiveModule, TableDataSourceDirective, TableDataSourceModule, TableFilterModule, TableFilterService, TableRowActionDirective, TableRowActionExecutingDirective, TableRowActionStatus, TableRowActionsModule, TableRowControlsModule, TableRowHeaderActionDirective, TableSelectControlsComponent, TableSelectControlsComponentModule, TableShowArchivedSlideComponent, TableShowArchivedSlideComponentModule, ToFilterColumnNamesPipe };
|
|
2056
2057
|
//# sourceMappingURL=rxap-material-table-system.mjs.map
|