@recursyve/nice-data-filter-kit 14.5.0 → 14.5.2

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.
@@ -1,5 +1,5 @@
1
1
  import { plainToInstance } from 'class-transformer';
2
- import { map, takeUntil, debounceTime, switchMap, distinctUntilChanged, withLatestFrom } from 'rxjs/operators';
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';
@@ -3239,6 +3239,7 @@ class NiceFilterViewService {
3239
3239
  this.store.update({
3240
3240
  filterResult: null
3241
3241
  });
3242
+ this.store.set([]);
3242
3243
  }
3243
3244
  else {
3244
3245
  this.store.update({
@@ -3249,89 +3250,18 @@ class NiceFilterViewService {
3249
3250
  }
3250
3251
  NiceFilterViewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewService, deps: [{ token: NiceFilterViewStore }, { token: NiceFilterService }], target: i0.ɵɵFactoryTarget.Injectable });
3251
3252
  NiceFilterViewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewService });
3253
+ __decorate([
3254
+ transaction(),
3255
+ __metadata("design:type", Function),
3256
+ __metadata("design:paramtypes", [Boolean]),
3257
+ __metadata("design:returntype", void 0)
3258
+ ], NiceFilterViewService.prototype, "resetResult", null);
3252
3259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewService, decorators: [{
3253
3260
  type: Injectable
3254
3261
  }], ctorParameters: function () { return [{ type: NiceFilterViewStore }, { type: undefined, decorators: [{
3255
3262
  type: Inject,
3256
3263
  args: [NiceFilterService]
3257
- }] }]; } });
3258
-
3259
- class AdvancedFiltersUtils {
3260
- static isSingleInput(filterOperator) {
3261
- if (!filterOperator) {
3262
- return false;
3263
- }
3264
- return AdvancedFiltersUtils.singleInputOperators.includes(filterOperator);
3265
- }
3266
- static isDoubleInput(filterOperator) {
3267
- if (!filterOperator) {
3268
- return false;
3269
- }
3270
- return AdvancedFiltersUtils.doubleInputOperators.includes(filterOperator);
3271
- }
3272
- static isNoInput(filterOperator) {
3273
- if (!filterOperator) {
3274
- return false;
3275
- }
3276
- return AdvancedFiltersUtils.noInputOperators.includes(filterOperator);
3277
- }
3278
- static createRule(config, operator) {
3279
- const base = {
3280
- id: config.id,
3281
- operation: operator || config.operators[0].id
3282
- };
3283
- switch (config.type) {
3284
- case FilterType.Text:
3285
- return {
3286
- ...base,
3287
- value: AdvancedFiltersUtils.isDoubleInput(operator) ? ["", ""] : ""
3288
- };
3289
- case FilterType.Number:
3290
- case FilterType.Select:
3291
- return {
3292
- ...base,
3293
- value: AdvancedFiltersUtils.isDoubleInput(operator) ? [null, null] : null
3294
- };
3295
- case FilterType.Date:
3296
- return {
3297
- ...base,
3298
- value: AdvancedFiltersUtils.isDoubleInput(operator) ? [new Date(), new Date()] : new Date()
3299
- };
3300
- case FilterType.Radio:
3301
- return {
3302
- ...base,
3303
- value: AdvancedFiltersUtils.isDoubleInput(operator)
3304
- ? [config.options?.[0].key, config.options?.[0].key]
3305
- : config.options?.[0].key
3306
- };
3307
- }
3308
- }
3309
- }
3310
- AdvancedFiltersUtils.noInputOperators = [
3311
- FilterOperatorTypes.IsEmpty,
3312
- FilterOperatorTypes.IsNotEmpty,
3313
- FilterOperatorTypes.IsNull,
3314
- FilterOperatorTypes.IsNotNull,
3315
- FilterOperatorTypes.None
3316
- ];
3317
- AdvancedFiltersUtils.singleInputOperators = [
3318
- FilterOperatorTypes.Equal,
3319
- FilterOperatorTypes.NotEqual,
3320
- FilterOperatorTypes.Less,
3321
- FilterOperatorTypes.LessOrEqual,
3322
- FilterOperatorTypes.Greater,
3323
- FilterOperatorTypes.GreaterOrEqual,
3324
- FilterOperatorTypes.BeginsWith,
3325
- FilterOperatorTypes.NotBeginsWith,
3326
- FilterOperatorTypes.EndsWith,
3327
- FilterOperatorTypes.NotEndsWith,
3328
- FilterOperatorTypes.Contains,
3329
- FilterOperatorTypes.NotContains
3330
- ];
3331
- AdvancedFiltersUtils.doubleInputOperators = [
3332
- FilterOperatorTypes.Between,
3333
- FilterOperatorTypes.NotBetween
3334
- ];
3264
+ }] }]; }, propDecorators: { resetResult: [] } });
3335
3265
 
3336
3266
  const ADVANCED_FILTER_ICONS = new InjectionToken("advanced_filter_icons");
3337
3267
 
@@ -3476,7 +3406,7 @@ class NiceAdvancedFiltersButtonComponent {
3476
3406
  this.query = query;
3477
3407
  this.service = service;
3478
3408
  this.shouldShowAdvancedFilters$ = this.query.selectSubState("showAdvancedFilters");
3479
- this.hasParameters$ = this.query.selectFilterParameters().pipe(withLatestFrom(this.query.selectFilterConfig()), map(([parameter, config]) => !!parameter
3409
+ this.hasParameters$ = this.query.selectFilterParameters().pipe(combineLatestWith(this.query.selectFilterConfig()), map(([parameter, config]) => !!parameter
3480
3410
  .rules
3481
3411
  ?.filter((rule) => config.some((conf) => conf?.id === rule.rules[0]?.id))
3482
3412
  ?.length));
@@ -3485,16 +3415,15 @@ class NiceAdvancedFiltersButtonComponent {
3485
3415
  this.service.updateSubState("showAdvancedFilters", !this.query.getSubState("showAdvancedFilters"));
3486
3416
  }
3487
3417
  onSelectedFilter(filter) {
3488
- const rule = AdvancedFiltersUtils.createRule(filter);
3489
- this.service.setRules([{ condition: "and", rules: [rule] }]);
3490
3418
  this.service.updateSubState("showAdvancedFilters", true);
3419
+ this.service.updateSubState("selectedFilter", filter);
3491
3420
  }
3492
3421
  }
3493
3422
  NiceAdvancedFiltersButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersButtonComponent, deps: [{ token: ADVANCED_FILTER_ICONS, optional: true }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
3494
- NiceAdvancedFiltersButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", 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-2 right-2 w-1 h-1 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.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-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 });
3423
+ NiceAdvancedFiltersButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", 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.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-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 });
3495
3424
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersButtonComponent, decorators: [{
3496
3425
  type: Component,
3497
- 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-2 right-2 w-1 h-1 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"] }]
3426
+ 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"] }]
3498
3427
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
3499
3428
  type: Optional
3500
3429
  }, {
@@ -3645,6 +3574,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
3645
3574
  type: Injectable
3646
3575
  }], ctorParameters: function () { return [{ type: NiceFilterService }]; } });
3647
3576
 
3577
+ class AdvancedFiltersUtils {
3578
+ static isSingleInput(filterOperator) {
3579
+ if (!filterOperator) {
3580
+ return false;
3581
+ }
3582
+ return AdvancedFiltersUtils.singleInputOperators.includes(filterOperator);
3583
+ }
3584
+ static isDoubleInput(filterOperator) {
3585
+ if (!filterOperator) {
3586
+ return false;
3587
+ }
3588
+ return AdvancedFiltersUtils.doubleInputOperators.includes(filterOperator);
3589
+ }
3590
+ static isNoInput(filterOperator) {
3591
+ if (!filterOperator) {
3592
+ return false;
3593
+ }
3594
+ return AdvancedFiltersUtils.noInputOperators.includes(filterOperator);
3595
+ }
3596
+ static createRule(config, operator) {
3597
+ const base = {
3598
+ id: config.id,
3599
+ operation: operator || config.operators[0].id
3600
+ };
3601
+ switch (config.type) {
3602
+ case FilterType.Text:
3603
+ return {
3604
+ ...base,
3605
+ value: AdvancedFiltersUtils.isDoubleInput(operator) ? ["", ""] : ""
3606
+ };
3607
+ case FilterType.Number:
3608
+ case FilterType.Select:
3609
+ return {
3610
+ ...base,
3611
+ value: AdvancedFiltersUtils.isDoubleInput(operator) ? [null, null] : null
3612
+ };
3613
+ case FilterType.Date:
3614
+ return {
3615
+ ...base,
3616
+ value: AdvancedFiltersUtils.isDoubleInput(operator) ? [new Date(), new Date()] : new Date()
3617
+ };
3618
+ case FilterType.Radio:
3619
+ return {
3620
+ ...base,
3621
+ value: AdvancedFiltersUtils.isDoubleInput(operator)
3622
+ ? [config.options?.[0].key, config.options?.[0].key]
3623
+ : config.options?.[0].key
3624
+ };
3625
+ }
3626
+ }
3627
+ }
3628
+ AdvancedFiltersUtils.noInputOperators = [
3629
+ FilterOperatorTypes.IsEmpty,
3630
+ FilterOperatorTypes.IsNotEmpty,
3631
+ FilterOperatorTypes.IsNull,
3632
+ FilterOperatorTypes.IsNotNull,
3633
+ FilterOperatorTypes.None
3634
+ ];
3635
+ AdvancedFiltersUtils.singleInputOperators = [
3636
+ FilterOperatorTypes.Equal,
3637
+ FilterOperatorTypes.NotEqual,
3638
+ FilterOperatorTypes.Less,
3639
+ FilterOperatorTypes.LessOrEqual,
3640
+ FilterOperatorTypes.Greater,
3641
+ FilterOperatorTypes.GreaterOrEqual,
3642
+ FilterOperatorTypes.BeginsWith,
3643
+ FilterOperatorTypes.NotBeginsWith,
3644
+ FilterOperatorTypes.EndsWith,
3645
+ FilterOperatorTypes.NotEndsWith,
3646
+ FilterOperatorTypes.Contains,
3647
+ FilterOperatorTypes.NotContains
3648
+ ];
3649
+ AdvancedFiltersUtils.doubleInputOperators = [
3650
+ FilterOperatorTypes.Between,
3651
+ FilterOperatorTypes.NotBetween
3652
+ ];
3653
+
3648
3654
  class FilterComponent {
3649
3655
  constructor() {
3650
3656
  this.propagateChanges = (_) => { };
@@ -3877,10 +3883,17 @@ class NiceAdvancedFiltersComponent {
3877
3883
  this.rules$ = this.rulesFormArray.valueChanges.pipe(startWith(this.rulesFormArray.value));
3878
3884
  }
3879
3885
  ngOnInit() {
3880
- const { filterParameters } = this.query.getValue();
3886
+ const { filterParameters, subStates } = this.query.getValue();
3881
3887
  if (filterParameters.rules?.length) {
3882
3888
  this.formGroup.patchValue(new AdvancedFiltersForm(filterParameters.rules[0]));
3883
3889
  }
3890
+ if (subStates.selectedFilter) {
3891
+ this.onClickAddRule(subStates.selectedFilter);
3892
+ return;
3893
+ }
3894
+ }
3895
+ ngOnDestroy() {
3896
+ this.removeEmptyRules({ reload: false });
3884
3897
  }
3885
3898
  onClickAddRule(filterConfigurationModel) {
3886
3899
  this.rulesFormArray.push(new FilterForm(AdvancedFiltersUtils.createRule(filterConfigurationModel)));
@@ -3895,6 +3908,7 @@ class NiceAdvancedFiltersComponent {
3895
3908
  }
3896
3909
  }
3897
3910
  onClose() {
3911
+ this.removeEmptyRules();
3898
3912
  this.service.updateSubState("showAdvancedFilters", false);
3899
3913
  }
3900
3914
  onRefresh() {
@@ -3902,6 +3916,31 @@ class NiceAdvancedFiltersComponent {
3902
3916
  this.service.resetResult(true);
3903
3917
  this.service.filter();
3904
3918
  }
3919
+ removeEmptyRules({ reload } = { reload: true }) {
3920
+ if (this.rulesFormArray.length !== 1) {
3921
+ return;
3922
+ }
3923
+ const values = this.rulesFormArray.get([0, "values"]).getRawValue();
3924
+ if (values.length !== 1) {
3925
+ return;
3926
+ }
3927
+ const value = values[0];
3928
+ if (value.value || value.value === false || value.secondValue || value.secondValue === true) {
3929
+ return;
3930
+ }
3931
+ this.rulesFormArray.removeAt(0);
3932
+ const { filterParameters } = this.query.getValue();
3933
+ if (!filterParameters.rules.length || !filterParameters.rules[0].rules.length) {
3934
+ return;
3935
+ }
3936
+ this.service.setRules([]);
3937
+ if (!reload) {
3938
+ return;
3939
+ }
3940
+ if (filterParameters.rules[0].rules[0].value) {
3941
+ this.service.filter();
3942
+ }
3943
+ }
3905
3944
  }
3906
3945
  NiceAdvancedFiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", 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 });
3907
3946
  NiceAdvancedFiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedFiltersComponent, selector: "nice-advanced-filters", providers: [
@@ -4139,6 +4178,9 @@ class NiceSelectableListStateService {
4139
4178
  get preloadedWindow() {
4140
4179
  return this.options?.preloadWindow ?? 2;
4141
4180
  }
4181
+ get queryParamsDisabled() {
4182
+ return this.options?.disableQueryParams ?? false;
4183
+ }
4142
4184
  setActive(entity) {
4143
4185
  this.store.setActive(entity[this.idKey]);
4144
4186
  }
@@ -4327,10 +4369,12 @@ class NiceSelectableListStateService {
4327
4369
  };
4328
4370
  }
4329
4371
  setQueryParams() {
4330
- this.router.navigate([], {
4331
- queryParams: this.generateQueryParams(),
4332
- queryParamsHandling: "merge"
4333
- });
4372
+ if (!this.queryParamsDisabled) {
4373
+ this.router.navigate([], {
4374
+ queryParams: this.generateQueryParams(),
4375
+ queryParamsHandling: "merge"
4376
+ });
4377
+ }
4334
4378
  }
4335
4379
  }
4336
4380
 
@@ -4960,6 +5004,9 @@ class NiceSelectableListDirective {
4960
5004
  this.unsubscribeQuerySub$ = new Subject();
4961
5005
  }
4962
5006
  ngOnInit() {
5007
+ if (this.options?.disableQueryParams) {
5008
+ return;
5009
+ }
4963
5010
  combineLatest([
4964
5011
  this.route.queryParams.pipe(map((params) => params.selection), distinct()),
4965
5012
  this.route.queryParams.pipe(map((params) => params.selected), distinct())
@@ -4992,7 +5039,7 @@ class NiceSelectableListDirective {
4992
5039
  }
4993
5040
  if ("state" in changes) {
4994
5041
  this.service.setState(this.state);
4995
- this.stateService = this.selectableListService.withState(this.state);
5042
+ this.stateService = this.selectableListService.withState(this.state, this.options);
4996
5043
  this.stateQuery = this.selectableListService.query(this.state);
4997
5044
  this.listenOnStateChanges();
4998
5045
  }