@trudb/tru-common-lib 0.2.24 → 0.2.27
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.
|
@@ -1985,7 +1985,9 @@ class TruDataContext {
|
|
|
1985
1985
|
this._breezeContext = this.breezeContextFactory.createContext();
|
|
1986
1986
|
this.entityAccessor.context = this;
|
|
1987
1987
|
this.entityManager.entityChanged.subscribe((changeArgs) => {
|
|
1988
|
-
if (changeArgs.entityAction !== EntityAction.AttachOnQuery &&
|
|
1988
|
+
if (changeArgs.entityAction !== EntityAction.AttachOnQuery &&
|
|
1989
|
+
changeArgs.entityAction !== EntityAction.MergeOnQuery &&
|
|
1990
|
+
changeArgs.entityAction !== EntityAction.MergeOnSave) {
|
|
1989
1991
|
this.propertyChanged(changeArgs);
|
|
1990
1992
|
this.entityChangedHandler(changeArgs);
|
|
1991
1993
|
}
|
|
@@ -4017,7 +4019,7 @@ class TruDetailViewBase {
|
|
|
4017
4019
|
this.setEntityDisplayValues(this.tableName);
|
|
4018
4020
|
}));
|
|
4019
4021
|
this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
|
|
4020
|
-
if (this.view.active) {
|
|
4022
|
+
if (this.view.active && this.view.window.active) {
|
|
4021
4023
|
let keySequence = this.util.getKeySequence(event);
|
|
4022
4024
|
if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
|
|
4023
4025
|
//this.onAddEntity();
|
|
@@ -7176,7 +7178,7 @@ class TruDataGrid {
|
|
|
7176
7178
|
this.api.refreshCells({ force: true });
|
|
7177
7179
|
}));
|
|
7178
7180
|
this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
|
|
7179
|
-
if (this.config.view.active) {
|
|
7181
|
+
if (this.config.view.active && this.config.view.window.active) {
|
|
7180
7182
|
let keySequence = this.util.getKeySequence(event);
|
|
7181
7183
|
if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
|
|
7182
7184
|
this.onAdd();
|
|
@@ -7200,7 +7202,10 @@ class TruDataGrid {
|
|
|
7200
7202
|
}
|
|
7201
7203
|
}));
|
|
7202
7204
|
this.subs.push(fromEvent(document, 'mousedown').subscribe((event) => {
|
|
7203
|
-
if (
|
|
7205
|
+
if (this.config.view.active &&
|
|
7206
|
+
this.config.view.window.active &&
|
|
7207
|
+
!this.dataGridContainer.nativeElement.contains(event.target) &&
|
|
7208
|
+
!this.util.findClosestAncestorByClass(event.target, '.cdk-overlay-container')) {
|
|
7204
7209
|
this.api.stopEditing();
|
|
7205
7210
|
}
|
|
7206
7211
|
}));
|
|
@@ -8741,7 +8746,7 @@ class TruDesktopWindow {
|
|
|
8741
8746
|
*
|
|
8742
8747
|
*/
|
|
8743
8748
|
onWindowKeydown = (event) => {
|
|
8744
|
-
if (!this.window.active)
|
|
8749
|
+
if (!this.window.active || event.key === 'Control' || event.key === 'Shift')
|
|
8745
8750
|
return;
|
|
8746
8751
|
var keySequence = this.util.getKeySequence(event);
|
|
8747
8752
|
if (keySequence === 'ctrl+s' || keySequence === 'meta+s') { //Save
|
|
@@ -9636,6 +9641,8 @@ class TruDesktop {
|
|
|
9636
9641
|
*
|
|
9637
9642
|
*/
|
|
9638
9643
|
onKeyDown = (event) => {
|
|
9644
|
+
if (event.key === 'Control' || event.key === 'Shift')
|
|
9645
|
+
return;
|
|
9639
9646
|
if (event.altKey)
|
|
9640
9647
|
event.preventDefault();
|
|
9641
9648
|
var keySequence = this.util.getKeySequence(event);
|