@recursyve/nice-data-filter-kit 13.3.0 → 13.3.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.
@@ -703,6 +703,7 @@ const LIST_TABLE = new InjectionToken("list_table");
703
703
  const TABLE_COLUMNS = new InjectionToken("table_columns");
704
704
  const EXPORTS_SETTINGS = new InjectionToken("exports_settings");
705
705
  const ENABLE_QUERY_BUILDER = new InjectionToken("enable_query_builder");
706
+ const DISABLE_QUERY_PARAMS = new InjectionToken("disable_query_param");
706
707
 
707
708
  const initialBaseListState = {
708
709
  disabled: false,
@@ -952,9 +953,10 @@ QBFilterUtils.doubleInputOperators = [
952
953
  ];
953
954
 
954
955
  class NiceBaseListService {
955
- constructor(store, filterService, activatedRoute, router, appRef) {
956
+ constructor(store, filterService, disableQueryParams, activatedRoute, router, appRef) {
956
957
  this.store = store;
957
958
  this.filterService = filterService;
959
+ this.disableQueryParams = disableQueryParams;
958
960
  this.activatedRoute = activatedRoute;
959
961
  this.router = router;
960
962
  this.appRef = appRef;
@@ -1016,6 +1018,9 @@ class NiceBaseListService {
1016
1018
  this.store.update({ queryParams });
1017
1019
  }
1018
1020
  loadQueryParams(autoLoad) {
1021
+ if (this.disableQueryParams) {
1022
+ return;
1023
+ }
1019
1024
  this.activatedRoute?.queryParams
1020
1025
  .pipe(takeUntil(this.unsubscribeAll$), map((params) => {
1021
1026
  return {
@@ -1263,7 +1268,7 @@ class NiceBaseListService {
1263
1268
  return parameters;
1264
1269
  }
1265
1270
  async updateQueryParams(queryParams) {
1266
- if (!this.activatedRoute) {
1271
+ if (!this.activatedRoute || this.disableQueryParams) {
1267
1272
  return;
1268
1273
  }
1269
1274
  await this.router.navigate([], {
@@ -1294,13 +1299,16 @@ class NiceBaseListService {
1294
1299
  }
1295
1300
  }
1296
1301
  }
1297
- NiceBaseListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceBaseListService, deps: [{ token: NiceBaseListStore }, { token: NiceFilterService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
1302
+ NiceBaseListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceBaseListService, deps: [{ token: NiceBaseListStore }, { token: NiceFilterService }, { token: DISABLE_QUERY_PARAMS }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
1298
1303
  NiceBaseListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceBaseListService });
1299
1304
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceBaseListService, decorators: [{
1300
1305
  type: Injectable
1301
1306
  }], ctorParameters: function () { return [{ type: NiceBaseListStore }, { type: undefined, decorators: [{
1302
1307
  type: Inject,
1303
1308
  args: [NiceFilterService]
1309
+ }] }, { type: undefined, decorators: [{
1310
+ type: Inject,
1311
+ args: [DISABLE_QUERY_PARAMS]
1304
1312
  }] }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i0.ApplicationRef }]; } });
1305
1313
 
1306
1314
  class QueryRuleForm {
@@ -2340,6 +2348,10 @@ class NiceBaseListModule {
2340
2348
  csv: true
2341
2349
  }
2342
2350
  },
2351
+ {
2352
+ provide: DISABLE_QUERY_PARAMS,
2353
+ useValue: options.disableQueryParams ?? false
2354
+ },
2343
2355
  options.disableQueryBuilder !== undefined ? {
2344
2356
  provide: ENABLE_QUERY_BUILDER,
2345
2357
  useValue: !options.disableQueryBuilder
@@ -2476,8 +2488,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
2476
2488
  const LIST_STATES = new InjectionToken("list_states");
2477
2489
 
2478
2490
  class NiceMultiStateListService extends NiceBaseListService {
2479
- constructor(states, store, activatedRoute, router, appRef, multiFilterService) {
2480
- super(store, multiFilterService, activatedRoute, router, appRef);
2491
+ constructor(states, disableQueryParams, store, activatedRoute, router, appRef, multiFilterService) {
2492
+ super(store, multiFilterService, disableQueryParams, activatedRoute, router, appRef);
2481
2493
  this.states = states;
2482
2494
  this.multiFilterService = multiFilterService;
2483
2495
  }
@@ -2499,13 +2511,16 @@ class NiceMultiStateListService extends NiceBaseListService {
2499
2511
  return newState.columns;
2500
2512
  }
2501
2513
  }
2502
- NiceMultiStateListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceMultiStateListService, deps: [{ token: LIST_STATES }, { token: NiceMultiStateListStore }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i0.ApplicationRef }, { token: NiceMultiStateFilterService }], target: i0.ɵɵFactoryTarget.Injectable });
2514
+ NiceMultiStateListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceMultiStateListService, deps: [{ token: LIST_STATES }, { token: DISABLE_QUERY_PARAMS }, { token: NiceMultiStateListStore }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i0.ApplicationRef }, { token: NiceMultiStateFilterService }], target: i0.ɵɵFactoryTarget.Injectable });
2503
2515
  NiceMultiStateListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceMultiStateListService });
2504
2516
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceMultiStateListService, decorators: [{
2505
2517
  type: Injectable
2506
2518
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2507
2519
  type: Inject,
2508
2520
  args: [LIST_STATES]
2521
+ }] }, { type: undefined, decorators: [{
2522
+ type: Inject,
2523
+ args: [DISABLE_QUERY_PARAMS]
2509
2524
  }] }, { type: NiceMultiStateListStore }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i0.ApplicationRef }, { type: NiceMultiStateFilterService }]; } });
2510
2525
 
2511
2526
  class NiceMultiStateListComponent extends NiceBaseListComponent {