tuain-ng-forms-lib 15.1.10 → 15.1.11

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.
@@ -162,13 +162,11 @@ class FieldComponent extends ElementComponent {
162
162
  }
163
163
  // Subscripción a cambios en atributos
164
164
  (_l = this.field) === null || _l === void 0 ? void 0 : _l.attributeChange.subscribe(event => {
165
- console.log('FieldComponent attributeChange');
166
- console.log(event);
167
165
  const { name: componentAttr, value = null } = event !== null && event !== void 0 ? event : {};
168
- // if (componentAttr) {
169
- this.defaultProcessAttributeChange(componentAttr, value);
170
- this.customProcessAttributeChange(componentAttr, value);
171
- // }
166
+ if (componentAttr) {
167
+ this.defaultProcessAttributeChange(componentAttr, value);
168
+ this.customProcessAttributeChange(componentAttr, value);
169
+ }
172
170
  });
173
171
  if (this.field) {
174
172
  this.field.widget = this;
@@ -272,13 +270,11 @@ class SectionComponent extends PieceComponent {
272
270
  }
273
271
  // Subscripción a cambios en atributos
274
272
  (_d = this.section) === null || _d === void 0 ? void 0 : _d.attributeChange.subscribe(event => {
275
- console.log('SectionComponent attributeChange');
276
- console.log(event);
277
273
  const { name: attrName, value = null } = event !== null && event !== void 0 ? event : {};
278
- // if (attrName) {
279
- this.defaultProcessAttributeChange(attrName, value);
280
- this.customProcessAttributeChange(attrName, value);
281
- // }
274
+ if (attrName) {
275
+ this.defaultProcessAttributeChange(attrName, value);
276
+ this.customProcessAttributeChange(attrName, value);
277
+ }
282
278
  });
283
279
  this.start();
284
280
  }
@@ -312,13 +308,11 @@ class SubSectionComponent extends PieceComponent {
312
308
  }
313
309
  // Subscripción a cambios en atributos
314
310
  (_d = this.subSection) === null || _d === void 0 ? void 0 : _d.attributeChange.subscribe(event => {
315
- console.log('SubSectionComponent attributeChange');
316
- console.log(event);
317
311
  const { name: attrName, value = null } = event !== null && event !== void 0 ? event : {};
318
- // if (attrName) {
319
- this.defaultProcessAttributeChange(attrName, value);
320
- this.customProcessAttributeChange(attrName, value);
321
- // }
312
+ if (attrName) {
313
+ this.defaultProcessAttributeChange(attrName, value);
314
+ this.customProcessAttributeChange(attrName, value);
315
+ }
322
316
  });
323
317
  this.start();
324
318
  }
@@ -468,13 +462,11 @@ class LibTableComponent extends ElementComponent {
468
462
  }
469
463
  // Subscripción a cambios en atributos
470
464
  (_s = this.table) === null || _s === void 0 ? void 0 : _s.attributeChange.subscribe(event => {
471
- console.log('LibTableComponent attributeChange');
472
- console.log(event);
473
465
  const { name: attrName, value = null } = event !== null && event !== void 0 ? event : {};
474
- // if (attrName) {
475
- this.defaultProcessAttributeChange(attrName, value);
476
- this.customProcessAttributeChange(attrName, value);
477
- // }
466
+ if (attrName) {
467
+ this.defaultProcessAttributeChange(attrName, value);
468
+ this.customProcessAttributeChange(attrName, value);
469
+ }
478
470
  });
479
471
  this.start();
480
472
  }
@@ -688,7 +680,6 @@ class FormPiecePropagate extends FormPiece {
688
680
  get attributeChange() { return this._attributeChange; }
689
681
  propagateAttribute(name, value) {
690
682
  var _a;
691
- console.log(`Propagación ${name} : ${JSON.stringify(value)}`);
692
683
  (_a = this._attributeChange) === null || _a === void 0 ? void 0 : _a.next({ name, value });
693
684
  }
694
685
  setCustomAttribute(name, value) {
@@ -696,26 +687,21 @@ class FormPiecePropagate extends FormPiece {
696
687
  super.setCustomAttribute(name, value);
697
688
  if ((_a = this.propagationCustomAttributes) === null || _a === void 0 ? void 0 : _a.includes(name)) {
698
689
  const fullName = `customAttributes.${name}`;
699
- console.log('piece setCustomAttribute');
700
690
  this.propagateAttribute(fullName, value);
701
691
  }
702
692
  }
703
693
  setVisibility(visible, forced = null) {
704
694
  super.setVisibility(visible, forced);
705
- console.log('piece setVisibility');
706
695
  this.propagateAttribute(VISIBLE, this._visible);
707
696
  }
708
697
  set enabled(enabled) {
709
698
  super.enabled = enabled;
710
- console.log('piece enabled');
711
699
  this.propagateAttribute(DISABLED, this._disabled);
712
700
  }
713
701
  formStateChange(state) {
714
702
  super.formStateChange(state);
715
703
  if (state) {
716
- console.log('piece 1 formStateChange');
717
704
  this.propagateAttribute(VISIBLE, this._visible);
718
- console.log('piece 2 formStateChange');
719
705
  this.propagateAttribute(DISABLED, this._disabled);
720
706
  }
721
707
  }
@@ -730,8 +716,6 @@ class FormElement extends FormPiecePropagate {
730
716
  setAttr(attr, value) {
731
717
  const { name: attrName, propagate: name } = attr;
732
718
  this[attrName] = value;
733
- console.log(`Element setAttr name: ${name}`);
734
- console.log(value);
735
719
  name && this.propagateAttribute(name, value);
736
720
  }
737
721
  isField() { return this.elementType === elementTypes.field; }