@trudb/tru-common-lib 0.2.107 → 0.2.108
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.
|
@@ -6005,6 +6005,7 @@ class TruDataGridPkeyCellRenderer {
|
|
|
6005
6005
|
displayValue = '';
|
|
6006
6006
|
copyIsDisabled = true;
|
|
6007
6007
|
pasteIsDisabled = true;
|
|
6008
|
+
insertAtTopIsDisabled = true;
|
|
6008
6009
|
// private eGui: is an empty element to satisfy the getGui method.
|
|
6009
6010
|
eGui;
|
|
6010
6011
|
constructor(dataContext, dataGridClipboard, util) {
|
|
@@ -6016,6 +6017,7 @@ class TruDataGridPkeyCellRenderer {
|
|
|
6016
6017
|
event.preventDefault();
|
|
6017
6018
|
this.copyIsDisabled = this.params.api.getSelectedRows().length ? false : true;
|
|
6018
6019
|
this.pasteIsDisabled = this.dataGridClipboard.getCopiedRows().length && this.params.api.getSelectedRows().length ? false : true;
|
|
6020
|
+
this.insertAtTopIsDisabled = this.dataGridClipboard.getCopiedRows().length && this.params.api.getSelectedRows().length ? false : true;
|
|
6019
6021
|
this.contextMenuPosition.x = event.pageX + 'px';
|
|
6020
6022
|
this.contextMenuPosition.y = (event.pageY) + 'px';
|
|
6021
6023
|
this.contextMenu.menu?.focusFirstItem('mouse');
|
|
@@ -6047,7 +6049,6 @@ class TruDataGridPkeyCellRenderer {
|
|
|
6047
6049
|
});
|
|
6048
6050
|
};
|
|
6049
6051
|
onInsertAtTop = (event) => {
|
|
6050
|
-
let copiedRowData = this.dataGridClipboard.getCopiedRows();
|
|
6051
6052
|
this.dataGridClipboard.insertRowsAtTop(this.dataContext, this.params.context.grid.config, this.params.context.grid.addEntity);
|
|
6052
6053
|
};
|
|
6053
6054
|
agInit(params) {
|
|
@@ -6086,8 +6087,8 @@ class TruDataGridPkeyCellRenderer {
|
|
|
6086
6087
|
<mat-icon [svgIcon]="'paste-icon'"></mat-icon>
|
|
6087
6088
|
<span>Paste</span>
|
|
6088
6089
|
</button>
|
|
6089
|
-
<button mat-menu-item>
|
|
6090
|
-
<mat-icon [svgIcon]="'insert-icon'"
|
|
6090
|
+
<button mat-menu-item [disabled]="insertAtTopIsDisabled" (click)="onInsertAtTop($event)">
|
|
6091
|
+
<mat-icon [svgIcon]="'insert-icon'"></mat-icon>
|
|
6091
6092
|
<span>Insert At Top</span>
|
|
6092
6093
|
</button>
|
|
6093
6094
|
</mat-menu>
|
|
@@ -6116,8 +6117,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
6116
6117
|
<mat-icon [svgIcon]="'paste-icon'"></mat-icon>
|
|
6117
6118
|
<span>Paste</span>
|
|
6118
6119
|
</button>
|
|
6119
|
-
<button mat-menu-item>
|
|
6120
|
-
<mat-icon [svgIcon]="'insert-icon'"
|
|
6120
|
+
<button mat-menu-item [disabled]="insertAtTopIsDisabled" (click)="onInsertAtTop($event)">
|
|
6121
|
+
<mat-icon [svgIcon]="'insert-icon'"></mat-icon>
|
|
6121
6122
|
<span>Insert At Top</span>
|
|
6122
6123
|
</button>
|
|
6123
6124
|
</mat-menu>
|