@trudb/tru-common-lib 0.1.985 → 0.1.987

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, Directive, Injectable, NgModule, Inject, Component, HostListener, InjectionToken, ViewChild, EventEmitter, Output, ViewEncapsulation, Pipe, ViewContainerRef, createComponent, Optional, ViewChildren, signal, ChangeDetectionStrategy, QueryList, ContentChildren } from '@angular/core';
2
+ import { Input, Directive, Injectable, NgModule, Inject, Component, HostListener, InjectionToken, ViewChild, EventEmitter, Output, ViewEncapsulation, Pipe, ViewContainerRef, ChangeDetectionStrategy, createComponent, Optional, ViewChildren, signal, QueryList, ContentChildren } from '@angular/core';
3
3
  import { EntityAspect, MetadataStore, DataService, EntityManager, EntityQuery, Predicate, FetchStrategy, EntityAction, breeze, EntityState, BinaryPredicate, AndOrPredicate } from 'breeze-client';
4
4
  import * as i1$1 from '@angular/common';
5
5
  import { CommonModule, NgIf, NgClass, DatePipe } from '@angular/common';
@@ -5851,7 +5851,7 @@ class TruDataGridCellRenderer {
5851
5851
  onRightClick = (event) => {
5852
5852
  event.stopPropagation();
5853
5853
  event.preventDefault();
5854
- alert('Test');
5854
+ alert('Cell Clicked');
5855
5855
  };
5856
5856
  init(params) {
5857
5857
  params.eGridCell.innerHTML = '';
@@ -5874,7 +5874,7 @@ class TruDataGridCellRenderer {
5874
5874
  params.eGridCell.appendChild(this.validationContainer);
5875
5875
  params.eGridCell.appendChild(validationFlag);
5876
5876
  params.eGridCell.addEventListener('mouseover', this.onMouseOver);
5877
- params.eGridCell.addEventListener('contextmenu', this.onMouseOver);
5877
+ params.eGridCell.addEventListener('contextmenu', this.onRightClick);
5878
5878
  Object.assign(params.eGridCell.style, new TruUtil().rulesEval(params.data[params.colDef.field].rules(params.data.$entity)));
5879
5879
  }
5880
5880
  getGui() {
@@ -5891,6 +5891,11 @@ class TruDataGridCellRenderer {
5891
5891
  class TruDataGridPkeyCellRenderer {
5892
5892
  // private eGui: is an empty element to satisfy the getGui method.
5893
5893
  eGui;
5894
+ onRightClick = (event) => {
5895
+ event.stopPropagation();
5896
+ event.preventDefault();
5897
+ alert('Right Cell Clicked');
5898
+ };
5894
5899
  init(params) {
5895
5900
  params.eGridCell.innerHTML = '';
5896
5901
  let value = params.value;
@@ -5898,6 +5903,7 @@ class TruDataGridPkeyCellRenderer {
5898
5903
  value = 'NEW';
5899
5904
  var content = document.createTextNode(value);
5900
5905
  params.eGridCell.appendChild(content);
5906
+ params.eGridCell.addEventListener('contextmenu', this.onRightClick);
5901
5907
  }
5902
5908
  getGui() {
5903
5909
  return this.eGui;
@@ -5906,7 +5912,13 @@ class TruDataGridPkeyCellRenderer {
5906
5912
  return false;
5907
5913
  }
5908
5914
  destroy() { }
5915
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridPkeyCellRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
5916
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridPkeyCellRenderer, isStandalone: true, selector: "ng-component", ngImport: i0, template: ``, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5909
5917
  }
5918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridPkeyCellRenderer, decorators: [{
5919
+ type: Component,
5920
+ args: [{ standalone: true, imports: [NgIf, NgClass, CommonModule, MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `` }]
5921
+ }] });
5910
5922
 
5911
5923
  var TruDataGridTypes;
5912
5924
  (function (TruDataGridTypes) {
@@ -6174,7 +6186,6 @@ class TruDataGridRefHeader {
6174
6186
  filterIsActive = false;
6175
6187
  agInit(params) {
6176
6188
  this.params = params;
6177
- this.params.api.addEventListener('cellFocused', this.onCellFocused.bind(this));
6178
6189
  }
6179
6190
  getHeaderParams() {
6180
6191
  return this.params;
@@ -6185,20 +6196,6 @@ class TruDataGridRefHeader {
6185
6196
  onSelectAllIconClicked() {
6186
6197
  this.params.api.selectAll();
6187
6198
  }
6188
- onCellFocused(event) {
6189
- var column = event.column;
6190
- if (column?.getColDef().pinned) {
6191
- this.headerRef.nativeElement.classList.add('ag-column-focus');
6192
- }
6193
- else {
6194
- if (this.params.column.getColId() === column.getColId()) {
6195
- this.headerRef.nativeElement.classList.add('ag-column-focus');
6196
- }
6197
- else {
6198
- this.headerRef.nativeElement.classList.remove('ag-column-focus');
6199
- }
6200
- }
6201
- }
6202
6199
  onFilterMenuButtonClicked(event) {
6203
6200
  if (!this.columnMenuIsOpen) {
6204
6201
  this.params.column.getColDef().headerComponentParams = this.params;
@@ -6226,9 +6223,7 @@ class TruDataGridRefHeader {
6226
6223
  this.showFilterMenu = this.isHovering && this.params.api.getDisplayedRowCount() > 0 || this.columnMenuIsOpen || this.params.column.isFilterActive() || this.ascSort || this.descSort;
6227
6224
  this.filterIsActive = this.params.column.isFilterActive();
6228
6225
  }
6229
- ngOnDestroy() {
6230
- this.params.api.removeEventListener('cellFocused', this.onCellFocused.bind(this));
6231
- }
6226
+ ngOnDestroy() { }
6232
6227
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridRefHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
6233
6228
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridRefHeader, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "headerRef", first: true, predicate: ["header"], descendants: true }], ngImport: i0, template: `
6234
6229
  <div #header class="ag-cell-label-container" role="presentation">
@@ -7395,7 +7390,7 @@ class TruDataGrid {
7395
7390
  this.validationDialog.destroy();
7396
7391
  }
7397
7392
  onRightClick(event) {
7398
- //event.preventDefault();
7393
+ event.preventDefault();
7399
7394
  }
7400
7395
  onSearch = (setupQuery) => {
7401
7396
  this.firstSearchRan = true;