@trudb/tru-common-lib 0.2.7 → 0.2.8
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.
|
@@ -5892,20 +5892,22 @@ class TruDataGridPkeyCellRenderer {
|
|
|
5892
5892
|
contextMenu;
|
|
5893
5893
|
params;
|
|
5894
5894
|
contextMenuPosition = { x: '0px', y: '0px' };
|
|
5895
|
+
displayValue = '';
|
|
5895
5896
|
// private eGui: is an empty element to satisfy the getGui method.
|
|
5896
5897
|
eGui;
|
|
5897
5898
|
onRightClick = (event) => {
|
|
5898
5899
|
event.preventDefault();
|
|
5899
|
-
this.contextMenuPosition.x =
|
|
5900
|
-
this.contextMenuPosition.y = event.clientY + 'px';
|
|
5900
|
+
this.contextMenuPosition.x = event.clientX + 'px';
|
|
5901
|
+
this.contextMenuPosition.y = (event.clientY - 27) + 'px';
|
|
5901
5902
|
this.contextMenu.menu?.focusFirstItem('mouse');
|
|
5902
5903
|
this.contextMenu.openMenu();
|
|
5903
5904
|
};
|
|
5904
5905
|
agInit(params) {
|
|
5905
5906
|
this.params = params;
|
|
5906
|
-
let value = params.value;
|
|
5907
5907
|
if (params.value < 0)
|
|
5908
|
-
|
|
5908
|
+
this.displayValue = 'NEW';
|
|
5909
|
+
else
|
|
5910
|
+
this.displayValue = params.value;
|
|
5909
5911
|
params.eGridCell.addEventListener('contextmenu', this.onRightClick);
|
|
5910
5912
|
}
|
|
5911
5913
|
getGui() {
|
|
@@ -5916,7 +5918,7 @@ class TruDataGridPkeyCellRenderer {
|
|
|
5916
5918
|
}
|
|
5917
5919
|
destroy() { }
|
|
5918
5920
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridPkeyCellRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5919
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridPkeyCellRenderer, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "contextMenu", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: `<div (contextmenu)="onRightClick($event)">{{
|
|
5921
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridPkeyCellRenderer, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "contextMenu", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
|
|
5920
5922
|
<div style="visibility: hidden; position: fixed"
|
|
5921
5923
|
[style.left]="contextMenuPosition.x"
|
|
5922
5924
|
[style.top]="contextMenuPosition.y"
|
|
@@ -5945,7 +5947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
5945
5947
|
MatButtonModule,
|
|
5946
5948
|
MatMenuModule,
|
|
5947
5949
|
MatIconModule
|
|
5948
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div (contextmenu)="onRightClick($event)">{{
|
|
5950
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
|
|
5949
5951
|
<div style="visibility: hidden; position: fixed"
|
|
5950
5952
|
[style.left]="contextMenuPosition.x"
|
|
5951
5953
|
[style.top]="contextMenuPosition.y"
|