@annalib/anna-core 9.0.10 → 9.0.11

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.
@@ -3629,12 +3629,7 @@ class AnnaGtHelperService {
3629
3629
  }
3630
3630
  enableOrDisableClearAllBtn() {
3631
3631
  let isFilterApplied = this.annaFilterService.appliedFiltersArray.length > 0;
3632
- let isSortApplied = false;
3633
- for (let val of this.annaSortService.columnSortState.values()) {
3634
- if (val == "ASC" || val == "DESC") {
3635
- isSortApplied = true;
3636
- }
3637
- }
3632
+ let isSortApplied = this.isSortingAppliedToTable();
3638
3633
  return isFilterApplied || isSortApplied ? false : true;
3639
3634
  }
3640
3635
  updateFiltersInURL() {
@@ -3696,6 +3691,24 @@ class AnnaGtHelperService {
3696
3691
  }
3697
3692
  return usersTable;
3698
3693
  }
3694
+ isSortingAppliedToTable() {
3695
+ let isSortingApplied = false;
3696
+ for (let val of this.annaSortService.columnSortState.values()) {
3697
+ if (val == "ASC" || val == "DESC") {
3698
+ isSortingApplied = true;
3699
+ }
3700
+ }
3701
+ return isSortingApplied;
3702
+ }
3703
+ updateQueryParamsFilter(key, value, operation, queryParamObj) {
3704
+ if (operation == "ADD") {
3705
+ queryParamObj[key] = value;
3706
+ }
3707
+ else if (operation == "DELETE") {
3708
+ delete queryParamObj[key];
3709
+ }
3710
+ return queryParamObj;
3711
+ }
3699
3712
  }
3700
3713
  AnnaGtHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGtHelperService, deps: [{ token: AnnaFilterService }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }, { token: AnnaSortService }], target: i0.ɵɵFactoryTarget.Injectable });
3701
3714
  AnnaGtHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGtHelperService, providedIn: "root" });