tuain-ng-forms-lib 15.1.9 → 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.
@@ -156,13 +156,11 @@ class FieldComponent extends ElementComponent {
156
156
  }
157
157
  // Subscripción a cambios en atributos
158
158
  this.field?.attributeChange.subscribe(event => {
159
- console.log('FieldComponent attributeChange');
160
- console.log(event);
161
159
  const { name: componentAttr, value = null } = event ?? {};
162
- // if (componentAttr) {
163
- this.defaultProcessAttributeChange(componentAttr, value);
164
- this.customProcessAttributeChange(componentAttr, value);
165
- // }
160
+ if (componentAttr) {
161
+ this.defaultProcessAttributeChange(componentAttr, value);
162
+ this.customProcessAttributeChange(componentAttr, value);
163
+ }
166
164
  });
167
165
  if (this.field) {
168
166
  this.field.widget = this;
@@ -264,13 +262,11 @@ class SectionComponent extends PieceComponent {
264
262
  }
265
263
  // Subscripción a cambios en atributos
266
264
  this.section?.attributeChange.subscribe(event => {
267
- console.log('SectionComponent attributeChange');
268
- console.log(event);
269
265
  const { name: attrName, value = null } = event ?? {};
270
- // if (attrName) {
271
- this.defaultProcessAttributeChange(attrName, value);
272
- this.customProcessAttributeChange(attrName, value);
273
- // }
266
+ if (attrName) {
267
+ this.defaultProcessAttributeChange(attrName, value);
268
+ this.customProcessAttributeChange(attrName, value);
269
+ }
274
270
  });
275
271
  this.start();
276
272
  }
@@ -302,13 +298,11 @@ class SubSectionComponent extends PieceComponent {
302
298
  }
303
299
  // Subscripción a cambios en atributos
304
300
  this.subSection?.attributeChange.subscribe(event => {
305
- console.log('SubSectionComponent attributeChange');
306
- console.log(event);
307
301
  const { name: attrName, value = null } = event ?? {};
308
- // if (attrName) {
309
- this.defaultProcessAttributeChange(attrName, value);
310
- this.customProcessAttributeChange(attrName, value);
311
- // }
302
+ if (attrName) {
303
+ this.defaultProcessAttributeChange(attrName, value);
304
+ this.customProcessAttributeChange(attrName, value);
305
+ }
312
306
  });
313
307
  this.start();
314
308
  }
@@ -454,13 +448,11 @@ class LibTableComponent extends ElementComponent {
454
448
  }
455
449
  // Subscripción a cambios en atributos
456
450
  this.table?.attributeChange.subscribe(event => {
457
- console.log('LibTableComponent attributeChange');
458
- console.log(event);
459
451
  const { name: attrName, value = null } = event ?? {};
460
- // if (attrName) {
461
- this.defaultProcessAttributeChange(attrName, value);
462
- this.customProcessAttributeChange(attrName, value);
463
- // }
452
+ if (attrName) {
453
+ this.defaultProcessAttributeChange(attrName, value);
454
+ this.customProcessAttributeChange(attrName, value);
455
+ }
464
456
  });
465
457
  this.start();
466
458
  }
@@ -670,33 +662,27 @@ class FormPiecePropagate extends FormPiece {
670
662
  }
671
663
  get attributeChange() { return this._attributeChange; }
672
664
  propagateAttribute(name, value) {
673
- console.log(`Propagación ${name} : ${JSON.stringify(value)}`);
674
665
  this._attributeChange?.next({ name, value });
675
666
  }
676
667
  setCustomAttribute(name, value) {
677
668
  super.setCustomAttribute(name, value);
678
669
  if (this.propagationCustomAttributes?.includes(name)) {
679
670
  const fullName = `customAttributes.${name}`;
680
- console.log('piece setCustomAttribute');
681
671
  this.propagateAttribute(fullName, value);
682
672
  }
683
673
  }
684
674
  setVisibility(visible, forced = null) {
685
675
  super.setVisibility(visible, forced);
686
- console.log('piece setVisibility');
687
676
  this.propagateAttribute(VISIBLE, this._visible);
688
677
  }
689
678
  set enabled(enabled) {
690
679
  super.enabled = enabled;
691
- console.log('piece enabled');
692
680
  this.propagateAttribute(DISABLED, this._disabled);
693
681
  }
694
682
  formStateChange(state) {
695
683
  super.formStateChange(state);
696
684
  if (state) {
697
- console.log('piece 1 formStateChange');
698
685
  this.propagateAttribute(VISIBLE, this._visible);
699
- console.log('piece 2 formStateChange');
700
686
  this.propagateAttribute(DISABLED, this._disabled);
701
687
  }
702
688
  }
@@ -711,8 +697,6 @@ class FormElement extends FormPiecePropagate {
711
697
  setAttr(attr, value) {
712
698
  const { name: attrName, propagate: name } = attr;
713
699
  this[attrName] = value;
714
- console.log(`Element setAttr name: ${name}`);
715
- console.log(value);
716
700
  name && this.propagateAttribute(name, value);
717
701
  }
718
702
  isField() { return this.elementType === elementTypes.field; }