@recursyve/nice-data-filter-kit 15.1.1 → 15.3.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/components/nice-filter-view/components/advanced-filters/advanced-filters.component.mjs +24 -1
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/button/advanced-filters-button.component.mjs +5 -5
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.component.mjs +1 -1
- package/esm2020/lib/components/nice-filter-view/components/advanced-filters/utils/advanced-filters.utils.mjs +1 -1
- package/esm2020/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.mjs +6 -7
- package/esm2020/lib/components/nice-filter-view/directives/mat-paginator.mjs +13 -24
- package/esm2020/lib/components/nice-filter-view/directives/mat-sort.mjs +20 -30
- package/esm2020/lib/components/nice-filter-view/models/order-options.model.mjs +2 -0
- package/esm2020/lib/components/nice-filter-view/nice-base-filter-view.component.mjs +43 -2
- package/esm2020/lib/components/nice-filter-view/nice-filter-view.component.mjs +1 -1
- package/esm2020/lib/components/nice-filter-view/nice-nested-filter-view.mjs +46 -0
- package/esm2020/lib/components/nice-filter-view/public-api.mjs +2 -1
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.service.mjs +29 -2
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.store.mjs +10 -1
- package/esm2020/lib/models/filter.model.mjs +1 -1
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +269 -131
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +266 -140
- package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.d.ts +1 -0
- package/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.d.ts +1 -2
- package/lib/components/nice-filter-view/directives/mat-paginator.d.ts +4 -9
- package/lib/components/nice-filter-view/directives/mat-sort.d.ts +4 -9
- package/lib/components/nice-filter-view/models/order-options.model.d.ts +7 -0
- package/lib/components/nice-filter-view/nice-base-filter-view.component.d.ts +19 -0
- package/lib/components/nice-filter-view/nice-nested-filter-view.d.ts +23 -0
- package/lib/components/nice-filter-view/public-api.d.ts +1 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.service.d.ts +4 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.store.d.ts +4 -1
- package/lib/models/filter.model.d.ts +11 -11
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { plainToInstance } from 'class-transformer';
|
|
2
|
-
import { map, takeUntil, debounceTime, switchMap, distinctUntilChanged,
|
|
2
|
+
import { map, takeUntil, debounceTime, switchMap, distinctUntilChanged, combineLatestWith } from 'rxjs/operators';
|
|
3
3
|
import { HttpParams } from '@angular/common/http';
|
|
4
4
|
import * as i5$1 from '@recursyve/nice-ui-kit.v2';
|
|
5
5
|
import { isNullOrUndefined, ObjectUtils, FileUtils, ArrayUtils, ExportBottomSheetComponent, NiceLoadingSpinnerModule, NiceTypeaheadModule, NiceExportBottomSheetModule, NiceAsyncTypeaheadProvider, NICE_ASYNC_TYPEAHEAD_PROVIDER, NiceAsyncTypeaheadModule } from '@recursyve/nice-ui-kit.v2';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { Directive, Input, NgModule, Injectable, Inject, InjectionToken, Optional, Pipe, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, HostListener, forwardRef, TemplateRef, ContentChild, ContentChildren, QueryList, ViewChild } from '@angular/core';
|
|
7
|
+
import { Directive, Input, NgModule, Injectable, Inject, InjectionToken, Optional, Pipe, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, HostListener, forwardRef, TemplateRef, ContentChild, ContentChildren, inject, QueryList, ViewChild } from '@angular/core';
|
|
8
8
|
import { Store, StoreConfig, Query, arrayAdd, arrayUpsert, arrayRemove, EntityStore, transaction, QueryEntity, EntityActions } from '@datorama/akita';
|
|
9
9
|
import { combineLatest, Subject, firstValueFrom, of, lastValueFrom, startWith, tap, distinct, take } from 'rxjs';
|
|
10
10
|
import { __decorate, __metadata } from 'tslib';
|
|
@@ -2770,6 +2770,7 @@ const initialValue = {
|
|
|
2770
2770
|
},
|
|
2771
2771
|
baseRules: [],
|
|
2772
2772
|
queryParams: null,
|
|
2773
|
+
orderColumns: null,
|
|
2773
2774
|
resetResult: false
|
|
2774
2775
|
};
|
|
2775
2776
|
class NiceFilterViewStore extends EntityStore {
|
|
@@ -2789,6 +2790,14 @@ class NiceFilterViewStore extends EntityStore {
|
|
|
2789
2790
|
setParameters(filterParameters) {
|
|
2790
2791
|
this.update({ filterParameters });
|
|
2791
2792
|
}
|
|
2793
|
+
patchParameters(filterParameters) {
|
|
2794
|
+
this.update(({ filterParameters: currentFilterParameters }) => ({
|
|
2795
|
+
filterParameters: {
|
|
2796
|
+
...currentFilterParameters,
|
|
2797
|
+
...filterParameters
|
|
2798
|
+
}
|
|
2799
|
+
}));
|
|
2800
|
+
}
|
|
2792
2801
|
setResult(filterResult) {
|
|
2793
2802
|
const { mode, resetResult, initialLoadCompleted } = this.getValue();
|
|
2794
2803
|
if (mode === "accumulated") {
|
|
@@ -3129,6 +3138,9 @@ class NiceFilterViewService {
|
|
|
3129
3138
|
this.filter();
|
|
3130
3139
|
}
|
|
3131
3140
|
}
|
|
3141
|
+
patchParameters(filterParameters) {
|
|
3142
|
+
this.store.patchParameters(filterParameters);
|
|
3143
|
+
}
|
|
3132
3144
|
resetPaging() {
|
|
3133
3145
|
const { filterParameters } = this.store.getValue();
|
|
3134
3146
|
this.setParameters({
|
|
@@ -3148,6 +3160,30 @@ class NiceFilterViewService {
|
|
|
3148
3160
|
this.filter();
|
|
3149
3161
|
}
|
|
3150
3162
|
}
|
|
3163
|
+
addBaseRule(rule, reload) {
|
|
3164
|
+
this.store.update(({ baseRules }) => ({
|
|
3165
|
+
baseRules: arrayAdd(baseRules ?? [], rule)
|
|
3166
|
+
}));
|
|
3167
|
+
if (reload) {
|
|
3168
|
+
this.filter();
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
upsertBaseRules(rule, reload) {
|
|
3172
|
+
this.store.update(({ baseRules }) => ({
|
|
3173
|
+
baseRules: arrayUpsert(baseRules ?? [], rule.id, rule)
|
|
3174
|
+
}));
|
|
3175
|
+
if (reload) {
|
|
3176
|
+
this.filter();
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
removeBaseRules(key, reload) {
|
|
3180
|
+
this.store.update(({ baseRules }) => ({
|
|
3181
|
+
baseRules: arrayRemove(baseRules ?? [], key)
|
|
3182
|
+
}));
|
|
3183
|
+
if (reload) {
|
|
3184
|
+
this.filter();
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3151
3187
|
setRules(rules) {
|
|
3152
3188
|
if (!Array.isArray(rules)) {
|
|
3153
3189
|
rules = [rules];
|
|
@@ -3478,7 +3514,7 @@ class NiceAdvancedFiltersButtonComponent {
|
|
|
3478
3514
|
this.query = query;
|
|
3479
3515
|
this.service = service;
|
|
3480
3516
|
this.shouldShowAdvancedFilters$ = this.query.selectSubState("showAdvancedFilters");
|
|
3481
|
-
this.hasParameters$ = this.query.selectFilterParameters().pipe(
|
|
3517
|
+
this.hasParameters$ = this.query.selectFilterParameters().pipe(combineLatestWith(this.query.selectFilterConfig()), map(([parameter, config]) => !!parameter
|
|
3482
3518
|
.rules
|
|
3483
3519
|
?.filter((rule) => config.some((conf) => conf?.id === rule.rules[0]?.id))
|
|
3484
3520
|
?.length));
|
|
@@ -3493,10 +3529,10 @@ class NiceAdvancedFiltersButtonComponent {
|
|
|
3493
3529
|
}
|
|
3494
3530
|
}
|
|
3495
3531
|
NiceAdvancedFiltersButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceAdvancedFiltersButtonComponent, deps: [{ token: ADVANCED_FILTER_ICONS, optional: true }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3496
|
-
NiceAdvancedFiltersButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NiceAdvancedFiltersButtonComponent, selector: "nice-advanced-filters-button", ngImport: i0, template: "<div class=\"relative\">\n <ng-container *ngIf=\"(hasParameters$ | async) && (shouldShowAdvancedFilters$ | async) !== true\">\n <div class=\"absolute top-
|
|
3532
|
+
NiceAdvancedFiltersButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NiceAdvancedFiltersButtonComponent, selector: "nice-advanced-filters-button", ngImport: i0, template: "<div class=\"relative\">\n <ng-container *ngIf=\"(hasParameters$ | async) && (shouldShowAdvancedFilters$ | async) !== true\">\n <div class=\"absolute top-1 right-1 w-2 h-2 z-10 rounded bg-accent\"></div>\n\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"shouldShowAdvancedFilters$ | async\">\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"(hasParameters$ | async) !== true && (shouldShowAdvancedFilters$ | async) !== true\">\n <button mat-icon-button niceAdvancedFiltersTrigger (advancedFilterSelected)=\"onSelectedFilter($event)\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n</div>\n", styles: ["nice-advanced-filters-button{width:40px;height:40px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: AdvancedFiltersTriggerDirective, selector: "[niceAdvancedFiltersTrigger]", inputs: ["position"], outputs: ["advancedFilterSelected"], exportAs: ["niceAdvancedFiltersTrigger"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3497
3533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceAdvancedFiltersButtonComponent, decorators: [{
|
|
3498
3534
|
type: Component,
|
|
3499
|
-
args: [{ selector: "nice-advanced-filters-button", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative\">\n <ng-container *ngIf=\"(hasParameters$ | async) && (shouldShowAdvancedFilters$ | async) !== true\">\n <div class=\"absolute top-
|
|
3535
|
+
args: [{ selector: "nice-advanced-filters-button", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative\">\n <ng-container *ngIf=\"(hasParameters$ | async) && (shouldShowAdvancedFilters$ | async) !== true\">\n <div class=\"absolute top-1 right-1 w-2 h-2 z-10 rounded bg-accent\"></div>\n\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"shouldShowAdvancedFilters$ | async\">\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"(hasParameters$ | async) !== true && (shouldShowAdvancedFilters$ | async) !== true\">\n <button mat-icon-button niceAdvancedFiltersTrigger (advancedFilterSelected)=\"onSelectedFilter($event)\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n</div>\n", styles: ["nice-advanced-filters-button{width:40px;height:40px}\n"] }]
|
|
3500
3536
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
3501
3537
|
type: Optional
|
|
3502
3538
|
}, {
|
|
@@ -3897,6 +3933,7 @@ class NiceAdvancedFiltersComponent {
|
|
|
3897
3933
|
}
|
|
3898
3934
|
}
|
|
3899
3935
|
onClose() {
|
|
3936
|
+
this.removeEmptyRules();
|
|
3900
3937
|
this.service.updateSubState("showAdvancedFilters", false);
|
|
3901
3938
|
}
|
|
3902
3939
|
onRefresh() {
|
|
@@ -3904,6 +3941,28 @@ class NiceAdvancedFiltersComponent {
|
|
|
3904
3941
|
this.service.resetResult(true);
|
|
3905
3942
|
this.service.filter();
|
|
3906
3943
|
}
|
|
3944
|
+
removeEmptyRules() {
|
|
3945
|
+
if (this.rulesFormArray.length !== 1) {
|
|
3946
|
+
return;
|
|
3947
|
+
}
|
|
3948
|
+
const values = this.rulesFormArray.get([0, "values"]).getRawValue();
|
|
3949
|
+
if (values.length !== 1) {
|
|
3950
|
+
return;
|
|
3951
|
+
}
|
|
3952
|
+
const value = values[0];
|
|
3953
|
+
if (value.value || value.value === false || value.secondValue || value.secondValue === true) {
|
|
3954
|
+
return;
|
|
3955
|
+
}
|
|
3956
|
+
this.rulesFormArray.removeAt(0);
|
|
3957
|
+
const { filterParameters } = this.query.getValue();
|
|
3958
|
+
if (!filterParameters.rules.length || !filterParameters.rules[0].rules.length) {
|
|
3959
|
+
return;
|
|
3960
|
+
}
|
|
3961
|
+
this.service.setRules([]);
|
|
3962
|
+
if (filterParameters.rules[0].rules[0].value) {
|
|
3963
|
+
this.service.filter();
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3907
3966
|
}
|
|
3908
3967
|
NiceAdvancedFiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceAdvancedFiltersComponent, deps: [{ token: ADVANCED_FILTER_ICONS, optional: true }, { token: i1$3.GeneratedFormGroup }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3909
3968
|
NiceAdvancedFiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NiceAdvancedFiltersComponent, selector: "nice-advanced-filters", providers: [
|
|
@@ -4387,11 +4446,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4387
4446
|
}] }, { type: i2.ActivatedRoute }, { type: i2.Router }]; } });
|
|
4388
4447
|
|
|
4389
4448
|
class NiceFilterExportButtonsComponent {
|
|
4390
|
-
constructor(icons, exportsSettings, niceFilterViewQuery,
|
|
4449
|
+
constructor(icons, exportsSettings, niceFilterViewQuery, selectableListService, query, service, bottomSheet) {
|
|
4391
4450
|
this.icons = icons;
|
|
4392
4451
|
this.exportsSettings = exportsSettings;
|
|
4393
4452
|
this.niceFilterViewQuery = niceFilterViewQuery;
|
|
4394
|
-
this.niceFilterViewService = niceFilterViewService;
|
|
4395
4453
|
this.selectableListService = selectableListService;
|
|
4396
4454
|
this.query = query;
|
|
4397
4455
|
this.service = service;
|
|
@@ -4466,7 +4524,7 @@ class NiceFilterExportButtonsComponent {
|
|
|
4466
4524
|
this.service.downloadData("pdf", this.downloadFileName, ids);
|
|
4467
4525
|
}
|
|
4468
4526
|
}
|
|
4469
|
-
NiceFilterExportButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterExportButtonsComponent, deps: [{ token: FILTER_VIEW_ICONS }, { token: EXPORTS_SETTINGS }, { token: NiceFilterViewQuery }, { token:
|
|
4527
|
+
NiceFilterExportButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterExportButtonsComponent, deps: [{ token: FILTER_VIEW_ICONS }, { token: EXPORTS_SETTINGS }, { token: NiceFilterViewQuery }, { token: NiceSelectableListService }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i4$1.MatBottomSheet }], target: i0.ɵɵFactoryTarget.Component });
|
|
4470
4528
|
NiceFilterExportButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterExportButtonsComponent, selector: "nice-filter-export-buttons, div[nice-filter-export-buttons]", inputs: { customExport: "customExport", downloadFileName: "downloadFileName", canPrint: "canPrint" }, ngImport: i0, template: "<button\n *ngIf=\"canPrint\"\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n</button>\n\n<button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n</button>\n", styles: [""], dependencies: [{ kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i8.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
|
|
4471
4529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterExportButtonsComponent, decorators: [{
|
|
4472
4530
|
type: Component,
|
|
@@ -4477,7 +4535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4477
4535
|
}] }, { type: undefined, decorators: [{
|
|
4478
4536
|
type: Inject,
|
|
4479
4537
|
args: [EXPORTS_SETTINGS]
|
|
4480
|
-
}] }, { type: NiceFilterViewQuery }, { type:
|
|
4538
|
+
}] }, { type: NiceFilterViewQuery }, { type: NiceSelectableListService }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i4$1.MatBottomSheet }]; }, propDecorators: { customExport: [{
|
|
4481
4539
|
type: Input
|
|
4482
4540
|
}], downloadFileName: [{
|
|
4483
4541
|
type: Input
|
|
@@ -4583,113 +4641,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4583
4641
|
type: Input
|
|
4584
4642
|
}] } });
|
|
4585
4643
|
|
|
4586
|
-
class NiceFilterMatPaginatorPaginationDirective {
|
|
4587
|
-
constructor(query, service, paginator) {
|
|
4588
|
-
this.query = query;
|
|
4589
|
-
this.service = service;
|
|
4590
|
-
this.paginator = paginator;
|
|
4591
|
-
this.unsubscribeAll$ = new Subject();
|
|
4592
|
-
}
|
|
4593
|
-
ngOnInit() {
|
|
4594
|
-
this.query.selectFilterResult().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
|
|
4595
|
-
if (!res) {
|
|
4596
|
-
return;
|
|
4597
|
-
}
|
|
4598
|
-
const { page, total } = res;
|
|
4599
|
-
this.paginator.pageIndex = page.number;
|
|
4600
|
-
this.paginator.pageSize = page.size;
|
|
4601
|
-
this.paginator.length = total;
|
|
4602
|
-
});
|
|
4603
|
-
this.paginator.page.pipe(takeUntil(this.unsubscribeAll$)).subscribe((page) => {
|
|
4604
|
-
const { filterParameters } = this.query.getValue();
|
|
4605
|
-
this.service.setParameters({
|
|
4606
|
-
...filterParameters,
|
|
4607
|
-
start: page.pageIndex * page.pageSize,
|
|
4608
|
-
length: page.pageSize
|
|
4609
|
-
});
|
|
4610
|
-
this.service.filter();
|
|
4611
|
-
});
|
|
4612
|
-
}
|
|
4613
|
-
ngOnDestroy() {
|
|
4614
|
-
this.unsubscribeAll$.next();
|
|
4615
|
-
this.unsubscribeAll$.complete();
|
|
4616
|
-
}
|
|
4617
|
-
}
|
|
4618
|
-
NiceFilterMatPaginatorPaginationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i12.MatPaginator }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4619
|
-
NiceFilterMatPaginatorPaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterMatPaginatorPaginationDirective, selector: "mat-paginator[niceFilterPagination]", ngImport: i0 });
|
|
4620
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, decorators: [{
|
|
4621
|
-
type: Directive,
|
|
4622
|
-
args: [{ selector: "mat-paginator[niceFilterPagination]" }]
|
|
4623
|
-
}], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i12.MatPaginator }]; } });
|
|
4624
|
-
|
|
4625
|
-
class NiceFilterMatSortSortingDirective {
|
|
4626
|
-
constructor(query, service, sort) {
|
|
4627
|
-
this.query = query;
|
|
4628
|
-
this.service = service;
|
|
4629
|
-
this.sort = sort;
|
|
4630
|
-
this.unsubscribeAll$ = new Subject();
|
|
4631
|
-
}
|
|
4632
|
-
ngOnInit() {
|
|
4633
|
-
this.query.selectFilterParameters().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
|
|
4634
|
-
if (!res) {
|
|
4635
|
-
return;
|
|
4636
|
-
}
|
|
4637
|
-
const { order } = res;
|
|
4638
|
-
if (!order) {
|
|
4639
|
-
return;
|
|
4640
|
-
}
|
|
4641
|
-
this.sort.direction = order.direction;
|
|
4642
|
-
this.sort.active = order.column;
|
|
4643
|
-
});
|
|
4644
|
-
this.sort.sortChange.pipe(takeUntil(this.unsubscribeAll$)).subscribe((sort) => {
|
|
4645
|
-
const { filterParameters } = this.query.getValue();
|
|
4646
|
-
if (!sort.direction) {
|
|
4647
|
-
const { order, ...values } = filterParameters;
|
|
4648
|
-
this.service.setParameters({
|
|
4649
|
-
...values,
|
|
4650
|
-
order: {}
|
|
4651
|
-
});
|
|
4652
|
-
}
|
|
4653
|
-
else {
|
|
4654
|
-
this.service.setParameters({
|
|
4655
|
-
...filterParameters,
|
|
4656
|
-
order: {
|
|
4657
|
-
column: sort.active,
|
|
4658
|
-
direction: sort.direction
|
|
4659
|
-
}
|
|
4660
|
-
});
|
|
4661
|
-
}
|
|
4662
|
-
this.service.filter();
|
|
4663
|
-
});
|
|
4664
|
-
}
|
|
4665
|
-
ngOnDestroy() {
|
|
4666
|
-
this.unsubscribeAll$.next();
|
|
4667
|
-
this.unsubscribeAll$.complete();
|
|
4668
|
-
}
|
|
4669
|
-
}
|
|
4670
|
-
NiceFilterMatSortSortingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatSortSortingDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i14.MatSort }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4671
|
-
NiceFilterMatSortSortingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterMatSortSortingDirective, selector: "mat-table[matSort][niceFilterSorting]", ngImport: i0 });
|
|
4672
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatSortSortingDirective, decorators: [{
|
|
4673
|
-
type: Directive,
|
|
4674
|
-
args: [{ selector: "mat-table[matSort][niceFilterSorting]" }]
|
|
4675
|
-
}], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i14.MatSort }]; } });
|
|
4676
|
-
|
|
4677
|
-
class NiceFilterMatTableViewDirective {
|
|
4678
|
-
constructor(query, table) {
|
|
4679
|
-
this.query = query;
|
|
4680
|
-
this.table = table;
|
|
4681
|
-
}
|
|
4682
|
-
ngOnInit() {
|
|
4683
|
-
this.table.dataSource = this.query.selectAll();
|
|
4684
|
-
}
|
|
4685
|
-
}
|
|
4686
|
-
NiceFilterMatTableViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatTableViewDirective, deps: [{ token: NiceFilterViewQuery }, { token: i13.MatTable }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4687
|
-
NiceFilterMatTableViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterMatTableViewDirective, selector: "mat-table[niceFilterDataView]", ngImport: i0 });
|
|
4688
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatTableViewDirective, decorators: [{
|
|
4689
|
-
type: Directive,
|
|
4690
|
-
args: [{ selector: "mat-table[niceFilterDataView]" }]
|
|
4691
|
-
}], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: i13.MatTable }]; } });
|
|
4692
|
-
|
|
4693
4644
|
class NiceFilterQueryParamsDirective {
|
|
4694
4645
|
get initialized() {
|
|
4695
4646
|
return this._initialized;
|
|
@@ -4769,33 +4720,139 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4769
4720
|
type: Output
|
|
4770
4721
|
}] } });
|
|
4771
4722
|
|
|
4772
|
-
class
|
|
4773
|
-
constructor(
|
|
4774
|
-
this.
|
|
4775
|
-
this.
|
|
4723
|
+
class NiceNestedFilterView {
|
|
4724
|
+
constructor() {
|
|
4725
|
+
this._afterQueryParamHooks = new Set();
|
|
4726
|
+
this.unsubscribeAll$ = new Subject();
|
|
4727
|
+
this.filterViewService = inject(NiceFilterViewService);
|
|
4728
|
+
this.filterViewQuery = inject(NiceFilterViewQuery);
|
|
4729
|
+
this.queryParams = inject(NiceFilterQueryParamsDirective, { optional: true });
|
|
4776
4730
|
}
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4731
|
+
ngOnInit() {
|
|
4732
|
+
this.filterViewLoading$ = this.filterViewQuery.selectLoading();
|
|
4733
|
+
this.filterViewCount$ = this.filterViewQuery.selectCount();
|
|
4734
|
+
if (!this.queryParams || this.queryParams?.initialized) {
|
|
4735
|
+
this.onInit();
|
|
4736
|
+
return;
|
|
4737
|
+
}
|
|
4738
|
+
this.queryParams.init.pipe(take(1)).subscribe(() => this.onInit());
|
|
4739
|
+
}
|
|
4740
|
+
ngOnDestroy() {
|
|
4741
|
+
this.unsubscribeAll$.next();
|
|
4742
|
+
this.unsubscribeAll$.complete();
|
|
4743
|
+
}
|
|
4744
|
+
afterInit(fn) {
|
|
4745
|
+
if (!this.queryParams || this.queryParams?.initialized) {
|
|
4746
|
+
fn.bind(this)();
|
|
4747
|
+
return;
|
|
4748
|
+
}
|
|
4749
|
+
this._afterQueryParamHooks.add(fn);
|
|
4750
|
+
}
|
|
4751
|
+
onInit() {
|
|
4752
|
+
for (const hook of this._afterQueryParamHooks) {
|
|
4753
|
+
hook.bind(this)();
|
|
4780
4754
|
}
|
|
4781
4755
|
}
|
|
4782
4756
|
}
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4757
|
+
NiceNestedFilterView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceNestedFilterView, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4758
|
+
NiceNestedFilterView.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceNestedFilterView, ngImport: i0 });
|
|
4759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceNestedFilterView, decorators: [{
|
|
4760
|
+
type: Directive
|
|
4761
|
+
}] });
|
|
4762
|
+
|
|
4763
|
+
class NiceFilterMatPaginatorPaginationDirective extends NiceNestedFilterView {
|
|
4764
|
+
constructor(paginator) {
|
|
4765
|
+
super();
|
|
4766
|
+
this.paginator = paginator;
|
|
4767
|
+
}
|
|
4768
|
+
ngOnInit() {
|
|
4769
|
+
super.ngOnInit();
|
|
4770
|
+
this.filterViewQuery.selectFilterResult().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
|
|
4771
|
+
if (!res) {
|
|
4772
|
+
return;
|
|
4773
|
+
}
|
|
4774
|
+
const { page, total } = res;
|
|
4775
|
+
this.paginator.pageIndex = page.number;
|
|
4776
|
+
this.paginator.pageSize = page.size;
|
|
4777
|
+
this.paginator.length = total;
|
|
4778
|
+
});
|
|
4779
|
+
this.paginator.page.pipe(takeUntil(this.unsubscribeAll$)).subscribe((page) => {
|
|
4780
|
+
this.filterViewService.patchParameters({
|
|
4781
|
+
start: page.pageIndex * page.pageSize,
|
|
4782
|
+
length: page.pageSize
|
|
4783
|
+
});
|
|
4784
|
+
this.filterViewService.filter();
|
|
4785
|
+
});
|
|
4786
|
+
}
|
|
4787
|
+
}
|
|
4788
|
+
NiceFilterMatPaginatorPaginationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, deps: [{ token: i12.MatPaginator }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4789
|
+
NiceFilterMatPaginatorPaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterMatPaginatorPaginationDirective, selector: "mat-paginator[niceFilterPagination]", usesInheritance: true, ngImport: i0 });
|
|
4790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, decorators: [{
|
|
4791
|
+
type: Directive,
|
|
4792
|
+
args: [{ selector: "mat-paginator[niceFilterPagination]" }]
|
|
4793
|
+
}], ctorParameters: function () { return [{ type: i12.MatPaginator }]; } });
|
|
4794
|
+
|
|
4795
|
+
class NiceFilterMatSortSortingDirective extends NiceNestedFilterView {
|
|
4796
|
+
constructor(sort) {
|
|
4797
|
+
super();
|
|
4798
|
+
this.sort = sort;
|
|
4799
|
+
}
|
|
4800
|
+
ngOnInit() {
|
|
4801
|
+
super.ngOnInit();
|
|
4802
|
+
this.filterViewQuery.selectFilterParameters().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
|
|
4803
|
+
if (!res) {
|
|
4804
|
+
return;
|
|
4805
|
+
}
|
|
4806
|
+
const { order } = res;
|
|
4807
|
+
if (!order) {
|
|
4808
|
+
return;
|
|
4809
|
+
}
|
|
4810
|
+
this.sort.direction = order.direction;
|
|
4811
|
+
this.sort.active = order.column;
|
|
4812
|
+
});
|
|
4813
|
+
this.sort.sortChange.pipe(takeUntil(this.unsubscribeAll$)).subscribe((sort) => {
|
|
4814
|
+
const { orderColumns } = this.filterViewQuery.getValue();
|
|
4815
|
+
const column = orderColumns?.[sort.active];
|
|
4816
|
+
if (!sort.direction) {
|
|
4817
|
+
this.filterViewService.patchParameters({
|
|
4818
|
+
order: null
|
|
4819
|
+
});
|
|
4820
|
+
}
|
|
4821
|
+
else {
|
|
4822
|
+
this.filterViewService.patchParameters({
|
|
4823
|
+
order: {
|
|
4824
|
+
column: column?.column ?? sort.active,
|
|
4825
|
+
direction: sort.direction,
|
|
4826
|
+
nullLast: column?.nullLast
|
|
4827
|
+
}
|
|
4828
|
+
});
|
|
4829
|
+
}
|
|
4830
|
+
this.filterViewService.filter();
|
|
4831
|
+
});
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4834
|
+
NiceFilterMatSortSortingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatSortSortingDirective, deps: [{ token: i14.MatSort }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4835
|
+
NiceFilterMatSortSortingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterMatSortSortingDirective, selector: "mat-table[matSort][niceFilterSorting]", usesInheritance: true, ngImport: i0 });
|
|
4836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatSortSortingDirective, decorators: [{
|
|
4837
|
+
type: Directive,
|
|
4838
|
+
args: [{ selector: "mat-table[matSort][niceFilterSorting]" }]
|
|
4839
|
+
}], ctorParameters: function () { return [{ type: i14.MatSort }]; } });
|
|
4840
|
+
|
|
4841
|
+
class NiceFilterMatTableViewDirective {
|
|
4842
|
+
constructor(query, table) {
|
|
4843
|
+
this.query = query;
|
|
4844
|
+
this.table = table;
|
|
4845
|
+
}
|
|
4846
|
+
ngOnInit() {
|
|
4847
|
+
this.table.dataSource = this.query.selectAll();
|
|
4848
|
+
}
|
|
4849
|
+
}
|
|
4850
|
+
NiceFilterMatTableViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatTableViewDirective, deps: [{ token: NiceFilterViewQuery }, { token: i13.MatTable }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4851
|
+
NiceFilterMatTableViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterMatTableViewDirective, selector: "mat-table[niceFilterDataView]", ngImport: i0 });
|
|
4852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterMatTableViewDirective, decorators: [{
|
|
4853
|
+
type: Directive,
|
|
4854
|
+
args: [{ selector: "mat-table[niceFilterDataView]" }]
|
|
4855
|
+
}], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: i13.MatTable }]; } });
|
|
4799
4856
|
|
|
4800
4857
|
class NiceSelectableListContentService {
|
|
4801
4858
|
constructor() {
|
|
@@ -5039,7 +5096,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5039
5096
|
args: [NiceSelectableListCheckboxDirective, { descendants: true }]
|
|
5040
5097
|
}] } });
|
|
5041
5098
|
|
|
5099
|
+
class NiceFilterViewComponent {
|
|
5100
|
+
constructor(service) {
|
|
5101
|
+
this.service = service;
|
|
5102
|
+
this.queryParams = {};
|
|
5103
|
+
}
|
|
5104
|
+
ngOnChanges(changes) {
|
|
5105
|
+
if ("queryParams" in changes) {
|
|
5106
|
+
this.service.setQueryParams(this.queryParams);
|
|
5107
|
+
}
|
|
5108
|
+
}
|
|
5109
|
+
}
|
|
5110
|
+
NiceFilterViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterViewComponent, deps: [{ token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5111
|
+
NiceFilterViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NiceFilterViewComponent, selector: "nice-filter-view", inputs: { queryParams: "queryParams" }, providers: [
|
|
5112
|
+
NiceFilterViewQuery,
|
|
5113
|
+
NiceFilterViewService,
|
|
5114
|
+
NiceFilterViewStore
|
|
5115
|
+
], usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], encapsulation: i0.ViewEncapsulation.None });
|
|
5116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceFilterViewComponent, decorators: [{
|
|
5117
|
+
type: Component,
|
|
5118
|
+
args: [{ selector: "nice-filter-view", encapsulation: ViewEncapsulation.None, providers: [
|
|
5119
|
+
NiceFilterViewQuery,
|
|
5120
|
+
NiceFilterViewService,
|
|
5121
|
+
NiceFilterViewStore
|
|
5122
|
+
], template: "<ng-content></ng-content>\n" }]
|
|
5123
|
+
}], ctorParameters: function () { return [{ type: NiceFilterViewService }]; }, propDecorators: { queryParams: [{
|
|
5124
|
+
type: Input
|
|
5125
|
+
}] } });
|
|
5126
|
+
|
|
5042
5127
|
class NiceBaseFilterViewComponent {
|
|
5128
|
+
constructor() {
|
|
5129
|
+
this._afterQueryParamHooks = new Set();
|
|
5130
|
+
}
|
|
5043
5131
|
ngOnInit(autoLoad = true, { mode, loadConfig, configQueryParams } = {}) {
|
|
5044
5132
|
if (mode) {
|
|
5045
5133
|
this.filterViewService.setMode(mode);
|
|
@@ -5051,6 +5139,11 @@ class NiceBaseFilterViewComponent {
|
|
|
5051
5139
|
if (this.selectableListDirective) {
|
|
5052
5140
|
this.filterViewService.updateSubState("selectable", { stateName: this.selectableListDirective.state });
|
|
5053
5141
|
}
|
|
5142
|
+
if (!this.queryParams || this.queryParams?.initialized) {
|
|
5143
|
+
this.onInit();
|
|
5144
|
+
return;
|
|
5145
|
+
}
|
|
5146
|
+
this.queryParams.init.pipe(take(1)).subscribe(() => this.onInit());
|
|
5054
5147
|
}
|
|
5055
5148
|
/**
|
|
5056
5149
|
* Call the filter endpoint with the current filter parameters.
|
|
@@ -5083,6 +5176,27 @@ class NiceBaseFilterViewComponent {
|
|
|
5083
5176
|
setBaseRules(rule, reload = true) {
|
|
5084
5177
|
this.filterViewService.setBaseRules(rule, reload);
|
|
5085
5178
|
}
|
|
5179
|
+
/**
|
|
5180
|
+
* Add a rule to the set of rules that won't be saved in the current filterParameters config.
|
|
5181
|
+
* NOTE: These rules will be injected in each filter request.
|
|
5182
|
+
*/
|
|
5183
|
+
addBaseRule(rule, reload = true) {
|
|
5184
|
+
this.filterViewService.addBaseRule(rule, reload);
|
|
5185
|
+
}
|
|
5186
|
+
/**
|
|
5187
|
+
* Add a rule to the set of rules that won't be saved in the current filterParameters config.
|
|
5188
|
+
* NOTE: These rules will be injected in each filter request.
|
|
5189
|
+
*/
|
|
5190
|
+
upsertBaseRule(rule, reload = true) {
|
|
5191
|
+
this.filterViewService.upsertBaseRules(rule, reload);
|
|
5192
|
+
}
|
|
5193
|
+
/**
|
|
5194
|
+
* Remove a rule to the set of rules that won't be saved in the current filterParameters config.
|
|
5195
|
+
* NOTE: These rules will be injected in each filter request.
|
|
5196
|
+
*/
|
|
5197
|
+
removeBaseRule(id, reload = true) {
|
|
5198
|
+
this.filterViewService.removeBaseRules(id, reload);
|
|
5199
|
+
}
|
|
5086
5200
|
/**
|
|
5087
5201
|
* Reset all rules with a new set of rules.
|
|
5088
5202
|
*/
|
|
@@ -5112,6 +5226,13 @@ class NiceBaseFilterViewComponent {
|
|
|
5112
5226
|
this.filterViewService.filter();
|
|
5113
5227
|
}
|
|
5114
5228
|
}
|
|
5229
|
+
afterInit(fn) {
|
|
5230
|
+
if (!this.queryParams || this.queryParams?.initialized) {
|
|
5231
|
+
fn.bind(this)();
|
|
5232
|
+
return;
|
|
5233
|
+
}
|
|
5234
|
+
this._afterQueryParamHooks.add(fn);
|
|
5235
|
+
}
|
|
5115
5236
|
autoLoad(autoLoad) {
|
|
5116
5237
|
const { autoLoad: defaultAutoLoad } = this.filterViewQuery.getValue();
|
|
5117
5238
|
if (!this.queryParams) {
|
|
@@ -5141,6 +5262,11 @@ class NiceBaseFilterViewComponent {
|
|
|
5141
5262
|
this.filterViewService.loadConfig(configQueryParams);
|
|
5142
5263
|
}
|
|
5143
5264
|
}
|
|
5265
|
+
onInit() {
|
|
5266
|
+
for (const hook of this._afterQueryParamHooks) {
|
|
5267
|
+
hook.bind(this)();
|
|
5268
|
+
}
|
|
5269
|
+
}
|
|
5144
5270
|
}
|
|
5145
5271
|
NiceBaseFilterViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NiceBaseFilterViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5146
5272
|
NiceBaseFilterViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NiceBaseFilterViewComponent, selector: "ng-component", viewQueries: [{ propertyName: "filterViewService", first: true, predicate: NiceFilterViewComponent, descendants: true, read: NiceFilterViewService, static: true }, { propertyName: "filterViewQuery", first: true, predicate: NiceFilterViewComponent, descendants: true, read: NiceFilterViewQuery, static: true }, { propertyName: "queryParams", first: true, predicate: NiceFilterQueryParamsDirective, descendants: true, static: true }, { propertyName: "advancedFiltersButton", first: true, predicate: NiceAdvancedFiltersButtonComponent, descendants: true, static: true }, { propertyName: "advancedFilters", first: true, predicate: NiceAdvancedFiltersComponent, descendants: true, static: true }, { propertyName: "selectableListDirective", first: true, predicate: NiceSelectableListDirective, descendants: true, static: true }], ngImport: i0, template: ``, isInline: true });
|
|
@@ -5421,5 +5547,5 @@ String.prototype.toTableColumn = function (sortableOrOptions, nullLast) {
|
|
|
5421
5547
|
* Generated bundle index. Do not edit.
|
|
5422
5548
|
*/
|
|
5423
5549
|
|
|
5424
|
-
export { AdvancedFiltersForm, AdvancedFiltersTriggerDirective, DateFilterComponent, FilterComponent$1 as FilterComponent, FilterForm, FilterFormValues, FilterGroupIconPipe, FilterOperatorTypes, FilterSelectionComponent, FilterType, FilterUtils, LayoutContent, NiceAdvancedFiltersButtonComponent, NiceAdvancedFiltersComponent, NiceAdvancedFiltersModule, NiceBaseFilterViewComponent, NiceBaseListButtonsDirective, NiceBaseListCardsDirective, NiceBaseListComponent, NiceBaseListCustomContentDirective, NiceBaseListDirectiveModule, NiceBaseListEmptySearchResultStateDirective, NiceBaseListEmptyStateDirective, NiceBaseListFiltersDirective, NiceBaseListModule, NiceBaseListQuery, NiceBaseListService, NiceBaseListStore, NiceBaseListTableDirective, NiceBaseListTitleDirective, NiceCustomDateAdapter, NiceFilterApi, NiceFilterCustomDataViewComponent, NiceFilterDataDirective, NiceFilterExportButtonsComponent, NiceFilterExportDirective, NiceFilterGroupService, NiceFilterInfiniteScrollDataViewComponent, NiceFilterMatPaginatorPaginationDirective, NiceFilterMatSortSortingDirective, NiceFilterMatTableViewDirective, NiceFilterQueryParamsDirective, NiceFilterSearchComponent, NiceFilterService, NiceFilterViewComponent, NiceFilterViewModule, NiceFilterViewQuery, NiceFilterViewService, NiceListState, NiceMultiStateFilterService, NiceMultiStateListComponent, NiceMultiStateListModule, NiceMultiStateListQuery, NiceMultiStateListService, NiceMultiStateListStore, NicePreloadSelectedEntitiesProvider, NiceQueryBuilderComponent, NiceQueryBuilderModule, NiceSavedReportService, NiceSelectableListCheckboxDirective, NiceSelectableListDirective, NiceSelectableListIsEmptyDirective, NiceSelectableListModule, NiceSelectableListSelectAllDirective, NiceSelectableListService, NiceSelectableListStateQuery, NiceSelectableListStateService, NumberFilterComponent, OrderUtils, QBFilterUtils, QueryBuilderTriggerDirective, RadioFilterComponent, RuleComponent, SelectFilterComponent, StringUtils, TableColumns, TextFilterComponent, defaultLayout, initialBaseListState, initialValue$1 as initialValue, mixinNiceFilterApi };
|
|
5550
|
+
export { AdvancedFiltersForm, AdvancedFiltersTriggerDirective, DateFilterComponent, FilterComponent$1 as FilterComponent, FilterForm, FilterFormValues, FilterGroupIconPipe, FilterOperatorTypes, FilterSelectionComponent, FilterType, FilterUtils, LayoutContent, NiceAdvancedFiltersButtonComponent, NiceAdvancedFiltersComponent, NiceAdvancedFiltersModule, NiceBaseFilterViewComponent, NiceBaseListButtonsDirective, NiceBaseListCardsDirective, NiceBaseListComponent, NiceBaseListCustomContentDirective, NiceBaseListDirectiveModule, NiceBaseListEmptySearchResultStateDirective, NiceBaseListEmptyStateDirective, NiceBaseListFiltersDirective, NiceBaseListModule, NiceBaseListQuery, NiceBaseListService, NiceBaseListStore, NiceBaseListTableDirective, NiceBaseListTitleDirective, NiceCustomDateAdapter, NiceFilterApi, NiceFilterCustomDataViewComponent, NiceFilterDataDirective, NiceFilterExportButtonsComponent, NiceFilterExportDirective, NiceFilterGroupService, NiceFilterInfiniteScrollDataViewComponent, NiceFilterMatPaginatorPaginationDirective, NiceFilterMatSortSortingDirective, NiceFilterMatTableViewDirective, NiceFilterQueryParamsDirective, NiceFilterSearchComponent, NiceFilterService, NiceFilterViewComponent, NiceFilterViewModule, NiceFilterViewQuery, NiceFilterViewService, NiceListState, NiceMultiStateFilterService, NiceMultiStateListComponent, NiceMultiStateListModule, NiceMultiStateListQuery, NiceMultiStateListService, NiceMultiStateListStore, NiceNestedFilterView, NicePreloadSelectedEntitiesProvider, NiceQueryBuilderComponent, NiceQueryBuilderModule, NiceSavedReportService, NiceSelectableListCheckboxDirective, NiceSelectableListDirective, NiceSelectableListIsEmptyDirective, NiceSelectableListModule, NiceSelectableListSelectAllDirective, NiceSelectableListService, NiceSelectableListStateQuery, NiceSelectableListStateService, NumberFilterComponent, OrderUtils, QBFilterUtils, QueryBuilderTriggerDirective, RadioFilterComponent, RuleComponent, SelectFilterComponent, StringUtils, TableColumns, TextFilterComponent, defaultLayout, initialBaseListState, initialValue$1 as initialValue, mixinNiceFilterApi };
|
|
5425
5551
|
//# sourceMappingURL=recursyve-nice-data-filter-kit.mjs.map
|