@trudb/tru-common-lib 0.0.298 → 0.0.299

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.
@@ -111,6 +111,51 @@ class TruSearchControlConfigBase {
111
111
  constructor() { }
112
112
  }
113
113
 
114
+ /*
115
+ * The abstract class needs the Angular @Component decorator in order in implement @Input
116
+ */
117
+ class TruSearchControlRangeBase {
118
+ constructor() {
119
+ this.operatorLookup = {
120
+ 'equal': 'eq',
121
+ 'not-equal': 'not-eq',
122
+ 'greater-than': 'gt',
123
+ 'greater-than-or-equal': 'ge',
124
+ 'less-than': 'lt',
125
+ 'less-than-or-equal': 'le',
126
+ 'contains': 'contains',
127
+ 'default': 'eq'
128
+ };
129
+ this.operatorIconLookup = {
130
+ 'equal': 'equal-operator-icon',
131
+ 'not-equal': 'not-equal-operator-icon',
132
+ 'greater-than': 'greater-than-operator-icon',
133
+ 'greater-than-or-equal': 'greater-than-or-equal-operator-icon',
134
+ 'less-than': 'less-than-operator-icon',
135
+ 'less-than-or-equal': 'less-than-or-equal-operator-icon',
136
+ 'contains': 'contains-operator-icon',
137
+ 'default': 'equal-operator-icon',
138
+ };
139
+ this.operatorIconTitleLookup = {
140
+ 'equal': 'Equal To',
141
+ 'not-equal': 'Not Equal To',
142
+ 'greater-than': 'Greater Than',
143
+ 'greater-than-or-equal': 'Greater Than Or Equal To',
144
+ 'less-than': 'Less Than',
145
+ 'less-than-or-equal': 'Less Than Or Equal To',
146
+ 'contains': 'Contains',
147
+ 'default': 'Equal To',
148
+ };
149
+ }
150
+ }
151
+ TruSearchControlRangeBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruSearchControlRangeBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
152
+ TruSearchControlRangeBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: TruSearchControlRangeBase, inputs: { config: "config" }, ngImport: i0 });
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruSearchControlRangeBase, decorators: [{
154
+ type: Directive
155
+ }], propDecorators: { config: [{
156
+ type: Input
157
+ }] } });
158
+
114
159
  class TruSearchConfigBase {
115
160
  constructor() { }
116
161
  }
@@ -1786,7 +1831,7 @@ class TruDataGrid {
1786
1831
  this.gridOptions.api.forEachNode((rowNode, index) => {
1787
1832
  return rowNodes.push(rowNode);
1788
1833
  });
1789
- for (var i = rowNodes.length - 1; i >= 0; --i)
1834
+ for (let i = rowNodes.length - 1; i >= 0; --i)
1790
1835
  if (rowNodes[i].data.$entity[this.selectedResultConfig.value.entityType.name + 'Ref'] < 0)
1791
1836
  this.gridOptions.api.updateRowData({ remove: [rowNodes[i].data] });
1792
1837
  this.gridOptions.api.redrawRows();
@@ -1795,8 +1840,8 @@ class TruDataGrid {
1795
1840
  this.appEnvironment.onDeleteComplete$.subscribe(event => {
1796
1841
  if (event?.successful && event.entities && event.entities.length) {
1797
1842
  let rowsToRemove = [];
1798
- for (var i = this.rowData.length - 1; i >= 0; i--) {
1799
- for (var j = event.entities.length - 1; j >= 0; j--) {
1843
+ for (let i = this.rowData.length - 1; i >= 0; i--) {
1844
+ for (let j = event.entities.length - 1; j >= 0; j--) {
1800
1845
  if (this.rowData[i].$entity === event.entities[j])
1801
1846
  rowsToRemove.push(this.rowData[i]);
1802
1847
  }
@@ -1817,8 +1862,8 @@ class TruDataGrid {
1817
1862
  this.rowData = associatedEntities.map(this.enhanceRowDataForEntity, associatedEntities);
1818
1863
  else
1819
1864
  associatedEntities = this.rowData.map((e) => { return e.$entity; });
1820
- var associatableTypeName = this.selectedResultConfig.value.entityManyToManyType.name;
1821
- var associatedMapOfAssociatable = _.map(associatedEntities, function (e) { return e['o' + associatableTypeName]; });
1865
+ let associatableTypeName = this.selectedResultConfig.value.entityManyToManyType.name;
1866
+ let associatedMapOfAssociatable = _.map(associatedEntities, function (e) { return e['o' + associatableTypeName]; });
1822
1867
  this.unassociatedChoices = associatableEntities.filter(object1 => {
1823
1868
  return !associatedMapOfAssociatable.some(object2 => { return object1.value.$ === object2[associatableTypeName + 'Ref']; });
1824
1869
  });
@@ -1827,7 +1872,7 @@ class TruDataGrid {
1827
1872
  this.uiNotification.showExportDialog().then((result) => {
1828
1873
  if (!result)
1829
1874
  return;
1830
- var exportGridSpec;
1875
+ let exportGridSpec;
1831
1876
  if (this.selectedResultConfig.value.entityType)
1832
1877
  exportGridSpec = this.selectedResultConfig.value.entityType.name;
1833
1878
  else
@@ -1914,7 +1959,7 @@ class TruDataGrid {
1914
1959
  }
1915
1960
  }
1916
1961
  else {
1917
- var newEntity = this.enhanceRowDataForEntity(this.dataContext.entityAccess().add(this.selectedResultConfig.value.entityType));
1962
+ let newEntity = this.enhanceRowDataForEntity(this.dataContext.entityAccess().add(this.selectedResultConfig.value.entityType));
1918
1963
  this.gridOptions.api.applyTransaction({ add: [newEntity], addIndex: 0 });
1919
1964
  }
1920
1965
  };
@@ -1961,7 +2006,7 @@ class TruDataGrid {
1961
2006
  this.onSearch(this.selectedResultConfig.value.setupQuery(this.entity));
1962
2007
  }
1963
2008
  ngAfterViewInit() {
1964
- var mappedResultConfigs = this.config.resultConfigs.map((config) => { return { label: config.name, value: config }; }, this.resultConfigs);
2009
+ let mappedResultConfigs = this.config.resultConfigs.map((config) => { return { label: config.name, value: config }; }, this.resultConfigs);
1965
2010
  this.resultConfigs = mappedResultConfigs;
1966
2011
  this.selectedResultConfig = mappedResultConfigs[0];
1967
2012
  this.columnDefs = mappedResultConfigs[0].value.columnDefs;
@@ -4871,5 +4916,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
4871
4916
  * Generated bundle index. Do not edit.
4872
4917
  */
4873
4918
 
4874
- export { DetailViewModule, TruAppEnvironment, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruChoice, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDetailViewBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruUtil, TruWindowActionEventHandler, TruWindowAddViewEventArgs, TruWindowEventArgs, TruWindowEventHandler };
4919
+ export { DetailViewModule, TruAppEnvironment, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruChoice, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDetailViewBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchControlRangeBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruUtil, TruWindowActionEventHandler, TruWindowAddViewEventArgs, TruWindowEventArgs, TruWindowEventHandler };
4875
4920
  //# sourceMappingURL=trudb-tru-common-lib.mjs.map