tuain-ng-forms-lib 14.5.33 → 14.5.34

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.
@@ -447,7 +447,6 @@ class LibTableComponent extends ElementComponent {
447
447
  // Subscripción a cambios en atributos
448
448
  (_s = this.table) === null || _s === void 0 ? void 0 : _s.attributeChange.subscribe(event => {
449
449
  const { name: attrName, value } = event;
450
- console.log(`Llegó atributo ${attrName} propagado...`);
451
450
  this.defaultProcessAttributeChange(attrName, value);
452
451
  this.customProcessAttributeChange(attrName, value);
453
452
  });
@@ -466,7 +465,6 @@ class LibTableComponent extends ElementComponent {
466
465
  defaultProcessAttributeChange(attribute, value) {
467
466
  try {
468
467
  if (attribute === 'visibleRecords') {
469
- console.log('Se deben actualizar los visibleRecords');
470
468
  this.updateTableData();
471
469
  }
472
470
  return super.defaultProcessAttributeChange(attribute, value);
@@ -660,7 +658,6 @@ class FormPiecePropagate extends FormPiece {
660
658
  get attributeChange() { return this._attributeChange; }
661
659
  propagateAttribute(name, value) {
662
660
  var _a;
663
- console.log(`Propagando atributo ${name}`);
664
661
  (_a = this._attributeChange) === null || _a === void 0 ? void 0 : _a.next({ name, value });
665
662
  }
666
663
  setCustomAttribute(name, value) {
@@ -696,7 +693,6 @@ class FormElement extends FormPiecePropagate {
696
693
  ;
697
694
  setAttr(attr, value) {
698
695
  const { name: attrName, propagate: name } = attr;
699
- console.log(`Asignando valor a ${attrName}`);
700
696
  this[attrName] = value;
701
697
  name && this.propagateAttribute(name, value);
702
698
  }
@@ -1384,17 +1380,13 @@ class TableRecordData {
1384
1380
  return true;
1385
1381
  }
1386
1382
  hasCondition(columnFilters) {
1387
- console.log(`Evaluación de condición sobre un registro...`);
1388
1383
  if (!columnFilters || columnFilters.length === 0) {
1389
1384
  return true;
1390
1385
  }
1391
1386
  for (const condition of columnFilters) {
1392
1387
  const { fieldCode, operator, values } = condition;
1393
- console.log(`1. Evaluación condición columna ${fieldCode} / ${operator}`);
1394
1388
  if (this.recordData.hasOwnProperty(fieldCode)) {
1395
1389
  const fieldValue = this.recordData[fieldCode];
1396
- console.log(`2. Evaluación condición columna ${fieldCode}/(${fieldValue}) con ${operator}`);
1397
- console.log(values);
1398
1390
  const stringValue = fieldValue.toString().toUpperCase();
1399
1391
  if (operator === operators.G && fieldValue <= values[0]) {
1400
1392
  return false;
@@ -1409,7 +1401,6 @@ class TableRecordData {
1409
1401
  return false;
1410
1402
  }
1411
1403
  if (operator === operators.IN && !values.includes(fieldValue)) {
1412
- console.log(`Evaluación falsa de condición IN...`);
1413
1404
  return false;
1414
1405
  }
1415
1406
  if (operator === operators.EQ) {
@@ -1662,17 +1653,12 @@ class RecordTable extends FormElement {
1662
1653
  }
1663
1654
  }
1664
1655
  updateVisibleRecords() {
1665
- console.log('updateVisibleRecords');
1666
1656
  let visibleRecords;
1667
1657
  if (this.clientPaging) {
1668
- console.log('this.clientPaging');
1669
- console.log('a por getFilteredRecords');
1670
1658
  let filteredRecords = this.getFilteredRecords();
1671
- console.log('regresando de getFilteredRecords');
1672
1659
  this.setAttr(attrs.totalRecordsNumber, filteredRecords.length);
1673
1660
  const sliceNumber1 = (this.currentPage - 1) * this.recordsPerPage;
1674
1661
  const sliceNumber2 = (this.currentPage - 1) * this.recordsPerPage + this.recordsPerPage;
1675
- console.log('Actualizando visibleRecords');
1676
1662
  visibleRecords = filteredRecords.slice(sliceNumber1, sliceNumber2);
1677
1663
  const recordsLastPage = this.totalRecordsNumber % this.recordsPerPage;
1678
1664
  const totalPages = Math.trunc(this.totalRecordsNumber / this.recordsPerPage + (recordsLastPage ? 1 : 0));
@@ -1683,7 +1669,6 @@ class RecordTable extends FormElement {
1683
1669
  else {
1684
1670
  visibleRecords = this.tableRecords;
1685
1671
  }
1686
- console.log('Actualizando visibleRecords al cierre');
1687
1672
  this.setAttr(attrs.visibleRecords, visibleRecords);
1688
1673
  }
1689
1674
  updateFromServer(tableReceived) {
@@ -1800,19 +1785,15 @@ class RecordTable extends FormElement {
1800
1785
  tableColumn && tableColumn.addFilterDefinition(filterDefinition);
1801
1786
  }
1802
1787
  getFilteredRecords() {
1803
- console.log('getFilteredRecords');
1804
1788
  let filteredRecords = this.tableRecords;
1805
1789
  if (this.restrictedId) {
1806
- console.log('por id');
1807
1790
  filteredRecords = filteredRecords.filter(record => record.recordId === this.restrictedId);
1808
1791
  }
1809
1792
  if (this.globalFilterStrings.length > 0) {
1810
- console.log('global');
1811
1793
  filteredRecords = filteredRecords.filter(record => record.hasPattern(this.globalFilterStrings, this._tableColumnObj));
1812
1794
  }
1813
1795
  const columnFilters = this.columns.filter(column => column.filter).map(column => column.filter);
1814
1796
  if (columnFilters.length > 0) {
1815
- console.log('Hay columnFilters...');
1816
1797
  filteredRecords = filteredRecords.filter(record => record.hasCondition(columnFilters));
1817
1798
  }
1818
1799
  return filteredRecords;
@@ -1824,23 +1805,12 @@ class RecordTable extends FormElement {
1824
1805
  }
1825
1806
  addColumnFilter(columnName, columnValues, operator = null) {
1826
1807
  var _a;
1827
- console.log('1. addColumnFilter');
1828
1808
  const tableColumn = this.columnDefinition(columnName);
1829
- console.log('2. addColumnFilter');
1830
- console.log(tableColumn);
1831
1809
  const columnFilterDefinition = (_a = tableColumn === null || tableColumn === void 0 ? void 0 : tableColumn.filterDefinition) !== null && _a !== void 0 ? _a : null;
1832
- console.log('3. addColumnFilter');
1833
- console.log(columnFilterDefinition);
1834
1810
  if (!columnFilterDefinition) {
1835
1811
  return;
1836
1812
  }
1837
- console.log('4. addColumnFilter');
1838
- console.log('tableColumn');
1839
- console.log(tableColumn);
1840
- console.log({ columnValues, operator });
1841
- console.log('5. Adicionando filtro');
1842
1813
  tableColumn && tableColumn.addFilter(columnValues, operator);
1843
- console.log('4. updateVisibleRecords');
1844
1814
  this.updateVisibleRecords();
1845
1815
  }
1846
1816
  removeColumnFilter(columnName) {