@trudb/tru-common-lib 0.2.392 → 0.2.394

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.
@@ -4190,6 +4190,7 @@ class TruDetailViewBase {
4190
4190
  }
4191
4191
  else {
4192
4192
  this.entities.push(newEntity);
4193
+ this.setEntityDisplayValues(this.tableName);
4193
4194
  }
4194
4195
  };
4195
4196
  onCloneEntity = () => {
@@ -6517,6 +6518,7 @@ class TruDataGridClipboard {
6517
6518
  util;
6518
6519
  formatter;
6519
6520
  uiNotification;
6521
+ modelPropertyLookup;
6520
6522
  tableName = null;
6521
6523
  columnName = null;
6522
6524
  copiedCellData = null;
@@ -6524,10 +6526,11 @@ class TruDataGridClipboard {
6524
6526
  copiedCellEntity = null;
6525
6527
  copiedCellParams = null;
6526
6528
  copiedRows = [];
6527
- constructor(util, formatter, uiNotification) {
6529
+ constructor(util, formatter, uiNotification, modelPropertyLookup) {
6528
6530
  this.util = util;
6529
6531
  this.formatter = formatter;
6530
6532
  this.uiNotification = uiNotification;
6533
+ this.modelPropertyLookup = modelPropertyLookup;
6531
6534
  }
6532
6535
  formatCellValue = (controlConfig, propertyConfig, entity, value) => {
6533
6536
  if (propertyConfig.typeName === 'rich-text-unbounded')
@@ -6618,8 +6621,9 @@ class TruDataGridClipboard {
6618
6621
  let properties = copiedRow.$entity.entityType.getPropertyNames();
6619
6622
  properties
6620
6623
  .forEach((propertyName) => {
6624
+ let property = this.modelPropertyLookup.lookup.get(this.tableName + '.' + propertyName);
6621
6625
  if (typeof selectedRow.$entity.setProperty !== 'undefined' &&
6622
- selectedRow[propertyName] && selectedRow[propertyName].property.canEdit &&
6626
+ !property?.excludeFromCloning &&
6623
6627
  propertyName !== config.tableName + 'Ref' &&
6624
6628
  propertyName !== 'rowver' &&
6625
6629
  propertyName !== 'Merge_Data_Set' &&
@@ -6641,7 +6645,9 @@ class TruDataGridClipboard {
6641
6645
  let properties = row.$entity.entityType.getPropertyNames();
6642
6646
  properties
6643
6647
  .filter((propertyName) => {
6648
+ let property = this.modelPropertyLookup.lookup.get(this.tableName + '.' + propertyName);
6644
6649
  return propertyName !== 'Ref' &&
6650
+ !property?.excludeFromCloning &&
6645
6651
  propertyName !== config.resultConfig.entityType.name + 'Ref' &&
6646
6652
  !this.util.isLowerCase(propertyName.charAt(0));
6647
6653
  })
@@ -6659,7 +6665,7 @@ class TruDataGridClipboard {
6659
6665
  getCopiedCell = () => {
6660
6666
  return this.copiedCellEntity;
6661
6667
  };
6662
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruDataGridClipboard, deps: [{ token: TruUtil }, { token: TruFormatter }, { token: TruUiNotification }], target: i0.ɵɵFactoryTarget.Injectable });
6668
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruDataGridClipboard, deps: [{ token: TruUtil }, { token: TruFormatter }, { token: TruUiNotification }, { token: TruModelPropertyLookup }], target: i0.ɵɵFactoryTarget.Injectable });
6663
6669
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruDataGridClipboard, providedIn: 'root' });
6664
6670
  }
6665
6671
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruDataGridClipboard, decorators: [{
@@ -6667,7 +6673,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
6667
6673
  args: [{
6668
6674
  providedIn: 'root',
6669
6675
  }]
6670
- }], ctorParameters: () => [{ type: TruUtil }, { type: TruFormatter }, { type: TruUiNotification }] });
6676
+ }], ctorParameters: () => [{ type: TruUtil }, { type: TruFormatter }, { type: TruUiNotification }, { type: TruModelPropertyLookup }] });
6671
6677
 
6672
6678
  class TruDataGridPkeyCellRenderer {
6673
6679
  dataContext;