@trudb/tru-common-lib 0.2.140 → 0.2.145

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.
@@ -6073,11 +6073,12 @@ class TruDataGridCellRenderer {
6073
6073
  this.pasteIsDisabled = this.dataGridClipboard.getCopiedRows().length && this.params.api.getSelectedRows().length ? false : true;
6074
6074
  let clickedElement = event.target;
6075
6075
  if (clickedElement instanceof Element) {
6076
- let rect = clickedElement.getBoundingClientRect();
6077
- this.contextMenuPosition.x = event.clientX + 'px';
6078
- this.contextMenuPosition.y = event.clientY + 'px';
6079
- this.contextMenu.menu?.focusFirstItem('mouse');
6080
- this.contextMenu.openMenu();
6076
+ if (this.params.api.getEditingCells().length <= 0) {
6077
+ this.contextMenuPosition.x = event.clientX + 'px';
6078
+ this.contextMenuPosition.y = event.clientY + 'px';
6079
+ this.contextMenu.menu?.focusFirstItem('mouse');
6080
+ this.contextMenu.openMenu();
6081
+ }
6081
6082
  }
6082
6083
  };
6083
6084
  onCopy = (event) => {
@@ -6121,9 +6122,11 @@ class TruDataGridCellRenderer {
6121
6122
  }
6122
6123
  destroy() {
6123
6124
  document.removeEventListener('mouseover', this.onMouseOver);
6125
+ this.contextMenu.closeMenu();
6126
+ this.contextMenu.ngOnDestroy();
6124
6127
  }
6125
6128
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridCellRenderer, deps: [{ token: TruDataContext }, { token: TruDataGridClipboard }], target: i0.ɵɵFactoryTarget.Component });
6126
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridCellRenderer, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "contextMenu", first: true, predicate: TruContextMenuTrigger, descendants: true }], ngImport: i0, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
6129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridCellRenderer, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "contextMenu", first: true, predicate: TruContextMenuTrigger, descendants: true }], ngImport: i0, template: `<div>{{displayValue}}
6127
6130
  <div style="visibility: hidden; position: absolute;"
6128
6131
  [truContextMenuTriggerFor]="truDataGridCellContextMenu">
6129
6132
  </div>
@@ -6149,7 +6152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
6149
6152
  MatButtonModule,
6150
6153
  MatMenuModule,
6151
6154
  TruContextMenuTrigger
6152
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
6155
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div>{{displayValue}}
6153
6156
  <div style="visibility: hidden; position: absolute;"
6154
6157
  [truContextMenuTriggerFor]="truDataGridCellContextMenu">
6155
6158
  </div>