ngx-wapp-components 1.3.2 → 1.3.4

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.
@@ -2156,6 +2156,9 @@ class LocalStorageService {
2156
2156
  getLastFilterPanelQuery() {
2157
2157
  return JSON.parse(localStorage.getItem(this.lastQuery));
2158
2158
  }
2159
+ removeLastFilterPanelQuery() {
2160
+ localStorage.removeItem(this.lastQuery);
2161
+ }
2159
2162
  }
2160
2163
  LocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2161
2164
  LocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: LocalStorageService, providedIn: 'root' });
@@ -2539,7 +2542,7 @@ class WFilterPanelComponent {
2539
2542
  this.localStorage = localStorage;
2540
2543
  this.persistValueOnFieldChange = false;
2541
2544
  this.queryConfigReady = false;
2542
- this.isAdvancedSearch = false;
2545
+ this.isAdvancedSearch = this.localStorage.getLastFilterPanelQuery()?.advancedQueryValue ? true : false;
2543
2546
  this.qbDataTypeEnum = QBDataTypeEnum;
2544
2547
  this.qbDataEnums = Object.values(QBDataTypeEnum);
2545
2548
  this.basicQuery = {
@@ -2622,8 +2625,6 @@ class WFilterPanelComponent {
2622
2625
  };
2623
2626
  this.setEntity(queries);
2624
2627
  queries = this.initializeOperators(queries);
2625
- queries = this.deleteFieldsWithoutValue(queries);
2626
- queries = this.handleEmptyFieldsQuery(queries);
2627
2628
  let storedQuery = {
2628
2629
  id: this.filterId,
2629
2630
  basicQueryValue: queries.basic,
@@ -2631,12 +2632,15 @@ class WFilterPanelComponent {
2631
2632
  groupedQueryValue: queries.grouped
2632
2633
  };
2633
2634
  this.localStorage.setLastFilterPanelQuery(storedQuery);
2635
+ queries = this.deleteFieldsWithoutValue(queries);
2636
+ queries = this.handleEmptyFieldsQuery(queries);
2634
2637
  this.searchClicked.emit(queries);
2635
2638
  }
2636
2639
  onClearClicked() {
2637
2640
  this.resetBasicQueryValues();
2638
2641
  this.advancedQuery.rules = [];
2639
2642
  this.groupedQuery.rules = [];
2643
+ this.localStorage.removeLastFilterPanelQuery();
2640
2644
  this.clearClicked.emit(true);
2641
2645
  }
2642
2646
  handleEmptyFieldsQuery(queries) {