@trudb/tru-common-lib 0.2.128 → 0.2.129

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.
@@ -6014,12 +6014,11 @@ class TruDataGridCellRenderer {
6014
6014
  };
6015
6015
  onRightClick = (event) => {
6016
6016
  event.preventDefault();
6017
- this.copyIsDisabled = this.params.api.getSelectedRows().length ? false : true;
6018
6017
  this.pasteIsDisabled = this.dataGridClipboard.getCopiedRows().length && this.params.api.getSelectedRows().length ? false : true;
6019
6018
  let clickedElement = event.target;
6020
6019
  if (clickedElement instanceof Element) {
6021
6020
  let rect = clickedElement.getBoundingClientRect();
6022
- this.contextMenuPosition.x = event.pageX + 'px';
6021
+ this.contextMenuPosition.x = rect.x + 'px';
6023
6022
  this.contextMenuPosition.y = (event.pageY) + 'px';
6024
6023
  this.contextMenu.menu?.focusFirstItem('mouse');
6025
6024
  this.contextMenu.openMenu();
@@ -6069,12 +6068,12 @@ class TruDataGridCellRenderer {
6069
6068
  }
6070
6069
  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 });
6071
6070
  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: MatMenuTrigger, descendants: true }], ngImport: i0, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
6072
- <div style="visibility: hidden; position: absolute; left: 0"
6071
+ <div style="visibility: hidden; position: absolute;"
6073
6072
  [style.left]="contextMenuPosition.x"
6074
6073
  [matMenuTriggerFor]="truDataGridContextMenu">
6075
6074
  </div>
6076
6075
  <mat-menu #truDataGridContextMenu="matMenu">
6077
- <button mat-menu-item [disabled]="copyIsDisabled" (click)="onCopy($event)">
6076
+ <button mat-menu-item (click)="onCopy($event)">
6078
6077
  <mat-icon [svgIcon]="'copy-icon'"></mat-icon>
6079
6078
  <span>Copy</span>
6080
6079
  </button>
@@ -6095,12 +6094,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
6095
6094
  MatButtonModule,
6096
6095
  MatMenuModule
6097
6096
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
6098
- <div style="visibility: hidden; position: absolute; left: 0"
6097
+ <div style="visibility: hidden; position: absolute;"
6099
6098
  [style.left]="contextMenuPosition.x"
6100
6099
  [matMenuTriggerFor]="truDataGridContextMenu">
6101
6100
  </div>
6102
6101
  <mat-menu #truDataGridContextMenu="matMenu">
6103
- <button mat-menu-item [disabled]="copyIsDisabled" (click)="onCopy($event)">
6102
+ <button mat-menu-item (click)="onCopy($event)">
6104
6103
  <mat-icon [svgIcon]="'copy-icon'"></mat-icon>
6105
6104
  <span>Copy</span>
6106
6105
  </button>