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