tuain-ng-forms-lib 12.0.69 → 12.0.73

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.
@@ -1490,7 +1490,7 @@
1490
1490
  if (operator === operators.LE && fieldValue > values[0]) {
1491
1491
  return false;
1492
1492
  }
1493
- if (operator === operators.IN && !values.include(fieldValue)) {
1493
+ if (operator === operators.IN && !values.includes(fieldValue)) {
1494
1494
  return false;
1495
1495
  }
1496
1496
  if (operator === operators.EQ) {
@@ -1620,7 +1620,7 @@
1620
1620
  // Filtros predefinidos en el formulario
1621
1621
  if (tableReceived.filters) {
1622
1622
  for (var index = 0; index < tableReceived.filters.length; index++) {
1623
- _this.addFilterDefinition(tableReceived.filters[index]);
1623
+ _this.addFilterDefinition(tableReceived.filters[index].fieldCode, tableReceived.filters[index]);
1624
1624
  }
1625
1625
  }
1626
1626
  return _this;
@@ -1842,10 +1842,16 @@
1842
1842
  };
1843
1843
  // Filtros
1844
1844
  RecordTable.prototype.setFilterById = function (id) {
1845
+ if (this.restrictedId === id) {
1846
+ return;
1847
+ }
1845
1848
  this.restrictedId = id;
1846
1849
  this.updateVisibleRecords();
1847
1850
  };
1848
1851
  RecordTable.prototype.cleanIdFilter = function () {
1852
+ if (this.restrictedId === null) {
1853
+ return;
1854
+ }
1849
1855
  this.restrictedId = null;
1850
1856
  this.updateVisibleRecords();
1851
1857
  };
@@ -1856,8 +1862,8 @@
1856
1862
  this.changePage(1);
1857
1863
  }
1858
1864
  };
1859
- RecordTable.prototype.addFilterDefinition = function (filterDefinition) {
1860
- var tableColumn = this.columnDefinition(filterDefinition.fieldCode);
1865
+ RecordTable.prototype.addFilterDefinition = function (columnName, filterDefinition) {
1866
+ var tableColumn = this.columnDefinition(columnName);
1861
1867
  tableColumn && tableColumn.addFilterDefinition(filterDefinition);
1862
1868
  };
1863
1869
  RecordTable.prototype.getFilteredRecords = function () {
@@ -3421,11 +3427,12 @@
3421
3427
  BasicFormComponent.prototype.subscribeSectionActivation = function () {
3422
3428
  var _this = this;
3423
3429
  var formSections = this._formStructure.sections;
3424
- if (Array.isArray(formSections)) {
3425
- formSections.forEach(function (section) {
3426
- section.activation.subscribe(function (code) { return _this.launchSectionActivation(code); });
3427
- section.inactivation.subscribe(function (code) { return _this.launchSectionInactivation(code); });
3428
- });
3430
+ var sectionNames = Object.keys(formSections);
3431
+ for (var index = 0; index < sectionNames.length; index++) {
3432
+ var sectionName = sectionNames[index];
3433
+ var section = formSections[sectionName];
3434
+ section.activation.subscribe(function (code) { return _this.launchSectionActivation(code); });
3435
+ section.inactivation.subscribe(function (code) { return _this.launchSectionInactivation(code); });
3429
3436
  }
3430
3437
  };
3431
3438
  BasicFormComponent.prototype.subscribeFieldsSubjects = function () {