@3kles/kles-material-table-v2 22.1.0 → 22.1.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.
|
@@ -4009,7 +4009,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
4009
4009
|
}] }] });
|
|
4010
4010
|
|
|
4011
4011
|
class HeaderService {
|
|
4012
|
-
constructor(fm, filterService, filterStore, datasourceService, loader, columnsService, eventsService) {
|
|
4012
|
+
constructor(fm, filterService, filterStore, datasourceService, loader, columnsService, eventsService, paginatorService) {
|
|
4013
4013
|
this.fm = fm;
|
|
4014
4014
|
this.filterService = filterService;
|
|
4015
4015
|
this.filterStore = filterStore;
|
|
@@ -4017,6 +4017,7 @@ class HeaderService {
|
|
|
4017
4017
|
this.loader = loader;
|
|
4018
4018
|
this.columnsService = columnsService;
|
|
4019
4019
|
this.eventsService = eventsService;
|
|
4020
|
+
this.paginatorService = paginatorService;
|
|
4020
4021
|
this.destroyRef = inject(DestroyRef);
|
|
4021
4022
|
this.filterableColumns = this.columnsService
|
|
4022
4023
|
.columns()
|
|
@@ -4057,6 +4058,7 @@ class HeaderService {
|
|
|
4057
4058
|
changedFilter: undefined,
|
|
4058
4059
|
}))
|
|
4059
4060
|
.subscribe(({ filters, changedFilter }) => {
|
|
4061
|
+
this.paginatorService.firstPage();
|
|
4060
4062
|
if (this.filterService) {
|
|
4061
4063
|
const prepared = this.filterService.formatData(filters);
|
|
4062
4064
|
this.datasourceService.datasource.filter = JSON.stringify(prepared);
|
|
@@ -4082,7 +4084,7 @@ class HeaderService {
|
|
|
4082
4084
|
this.fm.getHeader().patchValue(header, { emitEvent: false });
|
|
4083
4085
|
});
|
|
4084
4086
|
}
|
|
4085
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderService, deps: [{ token: KlesForm }, { token: FilterService, optional: true }, { token: FilterStore, optional: true }, { token: DATASOURCE_SERVICE }, { token: LOADER_SERVICE }, { token: ColumnsService }, { token: EventsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4087
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderService, deps: [{ token: KlesForm }, { token: FilterService, optional: true }, { token: FilterStore, optional: true }, { token: DATASOURCE_SERVICE }, { token: LOADER_SERVICE }, { token: ColumnsService }, { token: EventsService }, { token: PaginatorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4086
4088
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderService }); }
|
|
4087
4089
|
}
|
|
4088
4090
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderService, decorators: [{
|
|
@@ -4097,14 +4099,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
4097
4099
|
}] }, { type: undefined, decorators: [{
|
|
4098
4100
|
type: Inject,
|
|
4099
4101
|
args: [LOADER_SERVICE]
|
|
4100
|
-
}] }, { type: ColumnsService }, { type: EventsService }] });
|
|
4102
|
+
}] }, { type: ColumnsService }, { type: EventsService }, { type: PaginatorService }] });
|
|
4101
4103
|
class HeaderLazyService {
|
|
4102
|
-
constructor(fm, filterStore, loader, columnsService, eventsService) {
|
|
4104
|
+
constructor(fm, filterStore, loader, columnsService, eventsService, paginatorService) {
|
|
4103
4105
|
this.fm = fm;
|
|
4104
4106
|
this.filterStore = filterStore;
|
|
4105
4107
|
this.loader = loader;
|
|
4106
4108
|
this.columnsService = columnsService;
|
|
4107
4109
|
this.eventsService = eventsService;
|
|
4110
|
+
this.paginatorService = paginatorService;
|
|
4108
4111
|
this.destroyRef = inject(DestroyRef);
|
|
4109
4112
|
this.filterableColumns = this.columnsService
|
|
4110
4113
|
.columns()
|
|
@@ -4145,6 +4148,7 @@ class HeaderLazyService {
|
|
|
4145
4148
|
changedFilter: undefined,
|
|
4146
4149
|
}))
|
|
4147
4150
|
.subscribe(({ filters, changedFilter }) => {
|
|
4151
|
+
this.paginatorService.firstPage();
|
|
4148
4152
|
this.filterStore?.setFilters(filters);
|
|
4149
4153
|
this.eventsService.emit('filterChange', {
|
|
4150
4154
|
filters,
|
|
@@ -4162,7 +4166,7 @@ class HeaderLazyService {
|
|
|
4162
4166
|
this.fm.getHeader().patchValue(header, { emitEvent: false });
|
|
4163
4167
|
});
|
|
4164
4168
|
}
|
|
4165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderLazyService, deps: [{ token: KlesForm }, { token: FilterStore, optional: true }, { token: LOADER_SERVICE }, { token: ColumnsService }, { token: EventsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4169
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderLazyService, deps: [{ token: KlesForm }, { token: FilterStore, optional: true }, { token: LOADER_SERVICE }, { token: ColumnsService }, { token: EventsService }, { token: PaginatorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4166
4170
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderLazyService }); }
|
|
4167
4171
|
}
|
|
4168
4172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HeaderLazyService, decorators: [{
|
|
@@ -4172,7 +4176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
4172
4176
|
}] }, { type: undefined, decorators: [{
|
|
4173
4177
|
type: Inject,
|
|
4174
4178
|
args: [LOADER_SERVICE]
|
|
4175
|
-
}] }, { type: ColumnsService }, { type: EventsService }] });
|
|
4179
|
+
}] }, { type: ColumnsService }, { type: EventsService }, { type: PaginatorService }] });
|
|
4176
4180
|
|
|
4177
4181
|
function getMultipleValuesInSingleSelectionError() {
|
|
4178
4182
|
return Error('Cannot pass multiple values into SelectionModel with single-value mode.');
|