@trudb/tru-common-lib 0.2.23 → 0.2.26

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.
@@ -4017,7 +4017,7 @@ class TruDetailViewBase {
4017
4017
  this.setEntityDisplayValues(this.tableName);
4018
4018
  }));
4019
4019
  this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
4020
- if (this.view.active) {
4020
+ if (this.view.active && this.view.window.active) {
4021
4021
  let keySequence = this.util.getKeySequence(event);
4022
4022
  if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
4023
4023
  //this.onAddEntity();
@@ -7036,8 +7036,8 @@ class TruDataGrid {
7036
7036
  loadedEntities = [];
7037
7037
  latestSetupQuery;
7038
7038
  firstSearchRan = false;
7039
- rowCount = '';
7040
- selectedRowCount = '';
7039
+ rowCount = 'Rows: 0';
7040
+ selectedRowCount = 'Selected: 0';
7041
7041
  gridOptions = {
7042
7042
  animateRows: false,
7043
7043
  rowSelection: 'multiple',
@@ -7063,6 +7063,9 @@ class TruDataGrid {
7063
7063
  onRowDataUpdated: () => {
7064
7064
  this.config.viewMenuConfig.entities = this.getRowData();
7065
7065
  this.config.viewMenuConfig.actionRefs = this.getRefs();
7066
+ let count = 0;
7067
+ this.api?.forEachNodeAfterFilter(() => count++);
7068
+ this.rowCount = 'Rows: ' + count;
7066
7069
  },
7067
7070
  onCellEditingStarted: (params) => {
7068
7071
  if (params.colDef.cellEditorPopup && this.validationDialog)
@@ -7173,7 +7176,7 @@ class TruDataGrid {
7173
7176
  this.api.refreshCells({ force: true });
7174
7177
  }));
7175
7178
  this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
7176
- if (this.config.view.active) {
7179
+ if (this.config.view.active && this.config.view.window.active) {
7177
7180
  let keySequence = this.util.getKeySequence(event);
7178
7181
  if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
7179
7182
  this.onAdd();
@@ -7197,7 +7200,10 @@ class TruDataGrid {
7197
7200
  }
7198
7201
  }));
7199
7202
  this.subs.push(fromEvent(document, 'mousedown').subscribe((event) => {
7200
- if (!this.dataGridContainer.nativeElement.contains(event.target) && !this.util.findClosestAncestorByClass(event.target, '.cdk-overlay-container')) {
7203
+ if (this.config.view.active &&
7204
+ this.config.view.window.active &&
7205
+ !this.dataGridContainer.nativeElement.contains(event.target) &&
7206
+ !this.util.findClosestAncestorByClass(event.target, '.cdk-overlay-container')) {
7201
7207
  this.api.stopEditing();
7202
7208
  }
7203
7209
  }));
@@ -7401,9 +7407,6 @@ class TruDataGrid {
7401
7407
  this.setNoRowsTemplate();
7402
7408
  this.api.showNoRowsOverlay();
7403
7409
  }
7404
- let count = 0;
7405
- this.api?.forEachNodeAfterFilter(() => count++);
7406
- this.rowCount = 'Rows: ' + count;
7407
7410
  };
7408
7411
  onCellMouseDown = (cellData) => {
7409
7412
  this.rowSelectedOnMousedown = cellData.node.isSelected();
@@ -8741,7 +8744,7 @@ class TruDesktopWindow {
8741
8744
  *
8742
8745
  */
8743
8746
  onWindowKeydown = (event) => {
8744
- if (!this.window.active)
8747
+ if (!this.window.active || event.key === 'Control' || event.key === 'Shift')
8745
8748
  return;
8746
8749
  var keySequence = this.util.getKeySequence(event);
8747
8750
  if (keySequence === 'ctrl+s' || keySequence === 'meta+s') { //Save
@@ -9636,6 +9639,8 @@ class TruDesktop {
9636
9639
  *
9637
9640
  */
9638
9641
  onKeyDown = (event) => {
9642
+ if (event.key === 'Control' || event.key === 'Shift')
9643
+ return;
9639
9644
  if (event.altKey)
9640
9645
  event.preventDefault();
9641
9646
  var keySequence = this.util.getKeySequence(event);