@3kles/kles-material-table-v2 21.0.1 → 21.0.3
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.
|
@@ -22,7 +22,7 @@ import * as i21 from '@angular/cdk/drag-drop';
|
|
|
22
22
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
23
23
|
import * as i22 from '@angular/material/progress-spinner';
|
|
24
24
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
25
|
-
import { Subject, BehaviorSubject, combineLatest, startWith, of, auditTime, switchMap, concat, catchError, map, filter, take, merge, debounceTime, distinctUntilChanged, scan, concatMap, shareReplay } from 'rxjs';
|
|
25
|
+
import { Subject, BehaviorSubject, combineLatest, startWith, of, auditTime, switchMap, concat, catchError, map, filter, take, merge, debounceTime, distinctUntilChanged, scan, concatMap, withLatestFrom, shareReplay } from 'rxjs';
|
|
26
26
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
27
27
|
import * as _ from 'lodash';
|
|
28
28
|
import ___default from 'lodash';
|
|
@@ -628,6 +628,7 @@ class KlesForm {
|
|
|
628
628
|
}
|
|
629
629
|
setRows(rows) {
|
|
630
630
|
this.getRows().clear({ emitEvent: false });
|
|
631
|
+
this.getUiRows().clear();
|
|
631
632
|
rows.forEach((r) => {
|
|
632
633
|
this.uiStore.set(r.formGroup, r.groupUi);
|
|
633
634
|
this.getRows().push(r.formGroup, { emitEvent: false });
|
|
@@ -2886,7 +2887,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
2886
2887
|
args: [LINES_SERVICE]
|
|
2887
2888
|
}] }] });
|
|
2888
2889
|
class SelectionLazyService extends AbstractSelectionService {
|
|
2889
|
-
constructor(selectionConfig, fm, selectionLoaderService, scrollbarService, loadingService, datasourceService, linesService) {
|
|
2890
|
+
constructor(selectionConfig, fm, selectionLoaderService, scrollbarService, loadingService, datasourceService, linesService, filterStore) {
|
|
2890
2891
|
super(selectionConfig);
|
|
2891
2892
|
this.fm = fm;
|
|
2892
2893
|
this.selectionLoaderService = selectionLoaderService;
|
|
@@ -2894,6 +2895,7 @@ class SelectionLazyService extends AbstractSelectionService {
|
|
|
2894
2895
|
this.loadingService = loadingService;
|
|
2895
2896
|
this.datasourceService = datasourceService;
|
|
2896
2897
|
this.linesService = linesService;
|
|
2898
|
+
this.filterStore = filterStore;
|
|
2897
2899
|
this.destroyRef = inject(DestroyRef);
|
|
2898
2900
|
this._count = signal(0, ...(ngDevMode ? [{ debugName: "_count" }] : /* istanbul ignore next */ []));
|
|
2899
2901
|
}
|
|
@@ -2946,12 +2948,15 @@ class SelectionLazyService extends AbstractSelectionService {
|
|
|
2946
2948
|
return merge(...rows
|
|
2947
2949
|
.map((row) => {
|
|
2948
2950
|
return row.controls[this.selectionLoaderService.key]?.valueChanges.pipe(map((value) => {
|
|
2949
|
-
return {
|
|
2951
|
+
return {
|
|
2952
|
+
row,
|
|
2953
|
+
selected: !!value,
|
|
2954
|
+
};
|
|
2950
2955
|
}));
|
|
2951
2956
|
})
|
|
2952
2957
|
.filter(Boolean));
|
|
2953
|
-
}), concatMap(({ row, selected }) => {
|
|
2954
|
-
return this.selectionLoaderService.select(row, selected).pipe(map((response) => {
|
|
2958
|
+
}), withLatestFrom(this.filterStore?.filters$ ?? of({})), concatMap(([{ row, selected }, filters]) => {
|
|
2959
|
+
return this.selectionLoaderService.select(row, selected, filters).pipe(map((response) => {
|
|
2955
2960
|
return {
|
|
2956
2961
|
row,
|
|
2957
2962
|
response,
|
|
@@ -2991,7 +2996,7 @@ class SelectionLazyService extends AbstractSelectionService {
|
|
|
2991
2996
|
// this.updateHeader();
|
|
2992
2997
|
});
|
|
2993
2998
|
}
|
|
2994
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SelectionLazyService, deps: [{ token: SELECTION_CONFIG, optional: true }, { token: KlesForm }, { token: SelectionLoaderService }, { token: ScrollbarService }, { token: LoadingService }, { token: DATASOURCE_SERVICE }, { token: LINES_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2999
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SelectionLazyService, deps: [{ token: SELECTION_CONFIG, optional: true }, { token: KlesForm }, { token: SelectionLoaderService }, { token: ScrollbarService }, { token: LoadingService }, { token: DATASOURCE_SERVICE }, { token: LINES_SERVICE }, { token: FilterStore, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2995
3000
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SelectionLazyService }); }
|
|
2996
3001
|
}
|
|
2997
3002
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SelectionLazyService, decorators: [{
|
|
@@ -3007,6 +3012,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
3007
3012
|
}] }, { type: undefined, decorators: [{
|
|
3008
3013
|
type: Inject,
|
|
3009
3014
|
args: [LINES_SERVICE]
|
|
3015
|
+
}] }, { type: FilterStore, decorators: [{
|
|
3016
|
+
type: Optional
|
|
3010
3017
|
}] }] });
|
|
3011
3018
|
|
|
3012
3019
|
class LoaderService {
|