@trudb/tru-common-lib 0.1.950 → 0.1.953

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.
@@ -5901,6 +5901,7 @@ class TruDataGridHeader {
5901
5901
  noSort = 'inactive';
5902
5902
  isHovering = false;
5903
5903
  columnMenuIsOpen = false;
5904
+ showFilterMenu = false;
5904
5905
  agInit(params) {
5905
5906
  this.params = params;
5906
5907
  this.params.column.addEventListener('sortChanged', this.onSortChanged.bind(this));
@@ -5955,6 +5956,7 @@ class TruDataGridHeader {
5955
5956
  onFilterMenuButtonClicked(event) {
5956
5957
  if (!this.columnMenuIsOpen) {
5957
5958
  this.params.showColumnMenu(event.target, () => {
5959
+ this.columnMenuIsOpen = false;
5958
5960
  });
5959
5961
  this.columnMenuIsOpen = true;
5960
5962
  }
@@ -5963,6 +5965,14 @@ class TruDataGridHeader {
5963
5965
  this.columnMenuIsOpen = false;
5964
5966
  }
5965
5967
  }
5968
+ onHeaderMouseEnter(event) {
5969
+ this.isHovering = true;
5970
+ this.showFilterMenu = this.isHovering && this.params.api.getDisplayedRowCount() > 0 || this.columnMenuIsOpen;
5971
+ }
5972
+ onHeaderMouseLeave(event) {
5973
+ this.isHovering = false;
5974
+ this.showFilterMenu = this.isHovering && this.params.api.getDisplayedRowCount() > 0 || this.columnMenuIsOpen;
5975
+ }
5966
5976
  ngOnDestroy() {
5967
5977
  this.params.column.removeEventListener('sortChanged', this.onSortChanged.bind(this));
5968
5978
  this.params.api.removeEventListener('cellFocused', this.onCellFocused.bind(this));
@@ -5970,30 +5980,30 @@ class TruDataGridHeader {
5970
5980
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
5971
5981
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridHeader, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "headerRef", first: true, predicate: ["header"], descendants: true }], ngImport: i0, template: `
5972
5982
  <div #header class="ag-cell-label-container" role="presentation">
5973
- <div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="isHovering = true" (mouseleave)="isHovering = false">
5983
+ <div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="onHeaderMouseEnter($event)" (mouseleave)="onHeaderMouseLeave($event)">
5974
5984
  <div class="ag-header-control-container">
5975
5985
  <div>
5976
5986
  <span ref="eText" class="ag-header-cell-text">{{params.displayName}}</span>
5977
5987
  </div>
5978
- <div class="ag-header-control-filter-container">
5988
+ <div class="ag-header-control-filter-container" *ngIf="showFilterMenu">
5979
5989
  <span ref="eFilterButton" class="ag-filter-icon" (click)="onFilterMenuButtonClicked($event)">
5980
5990
  <mat-icon [svgIcon]="'more-icon'"></mat-icon>
5981
5991
  </span>
5982
5992
  </div>
5983
5993
  </div>
5984
5994
  </div>
5985
- </div>`, isInline: true, styles: [".ag-header-control-container{display:flex}.ag-header-control-filter-container{position:absolute;top:1px;right:3px}.ag-header-cell-text{position:relative;pointer-events:none;vertical-align:middle;vertical-align:-webkit-baseline-middle}.ag-sort-icon{height:100%;width:100%;margin-left:0!important}.tru-data-grid-select-all-icon{width:16px;font-size:28px;color:#ddd;float:right;position:absolute;top:-1px;right:4px}.ag-sort-icon mat-icon{height:16px;width:16px;padding-top:4px}.ag-column-focus .ag-header-cell-text{color:#3f51b5;font-weight:700}.ag-column-focus{background-color:#ddd;border-bottom:1px solid #3f51b5}::ng-deep .tru-data-grid-select-all-icon path{fill:#d3d3d3;position:relative;z-index:100;pointer-events:all}::ng-deep .ag-header-control-filter-container mat-icon{height:20px!important;width:20px!important;padding-top:2px!important}::ng-deep .ag-filter-icon mat-icon{height:18px!important;width:18px!important;color:#ddd}::ng-deep .ag-filter-icon mat-icon svg{fill:#949494!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
5995
+ </div>`, isInline: true, styles: [".ag-header-control-container{display:flex}.ag-header-control-filter-container{position:absolute;top:1px;right:3px}.ag-header-cell-text{position:relative;pointer-events:none;vertical-align:middle;vertical-align:-webkit-baseline-middle}.ag-sort-icon{height:100%;width:100%;margin-left:0!important}.tru-data-grid-select-all-icon{width:16px;font-size:28px;color:#ddd;float:right;position:absolute;top:-1px;right:4px}.ag-sort-icon mat-icon{height:16px;width:16px;padding-top:4px}.ag-column-focus .ag-header-cell-text{color:#3f51b5;font-weight:700}.ag-column-focus{background-color:#ddd;border-bottom:1px solid #3f51b5}::ng-deep .tru-data-grid-select-all-icon path{fill:#d3d3d3;position:relative;z-index:100;pointer-events:all}::ng-deep .ag-header-control-filter-container mat-icon{height:20px!important;width:20px!important;padding-top:2px!important}::ng-deep .ag-filter-icon mat-icon{height:18px!important;width:18px!important;color:#ddd}::ng-deep .ag-filter-icon mat-icon svg{fill:#949494!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
5986
5996
  }
5987
5997
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeader, decorators: [{
5988
5998
  type: Component,
5989
5999
  args: [{ standalone: true, imports: [NgIf, NgClass, CommonModule, MatIconModule], template: `
5990
6000
  <div #header class="ag-cell-label-container" role="presentation">
5991
- <div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="isHovering = true" (mouseleave)="isHovering = false">
6001
+ <div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="onHeaderMouseEnter($event)" (mouseleave)="onHeaderMouseLeave($event)">
5992
6002
  <div class="ag-header-control-container">
5993
6003
  <div>
5994
6004
  <span ref="eText" class="ag-header-cell-text">{{params.displayName}}</span>
5995
6005
  </div>
5996
- <div class="ag-header-control-filter-container">
6006
+ <div class="ag-header-control-filter-container" *ngIf="showFilterMenu">
5997
6007
  <span ref="eFilterButton" class="ag-filter-icon" (click)="onFilterMenuButtonClicked($event)">
5998
6008
  <mat-icon [svgIcon]="'more-icon'"></mat-icon>
5999
6009
  </span>