tuain-ng-forms-lib 15.0.10 → 15.0.12
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/field.mjs +3 -1
- package/esm2020/lib/components/elements/field.component.mjs +12 -3
- package/fesm2015/tuain-ng-forms-lib.mjs +16 -2
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +13 -2
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -154,6 +154,8 @@ class FieldComponent extends ElementComponent {
|
|
|
154
154
|
// Subscripción a cambios en atributos
|
|
155
155
|
this.field?.attributeChange.subscribe(event => {
|
|
156
156
|
const { name: componentAttr, value } = event;
|
|
157
|
+
console.log('El llamado defaultProcessAttributeChange es pos suscripción...');
|
|
158
|
+
console.log(event);
|
|
157
159
|
this.defaultProcessAttributeChange(componentAttr, value);
|
|
158
160
|
this.customProcessAttributeChange(componentAttr, value);
|
|
159
161
|
});
|
|
@@ -161,6 +163,7 @@ class FieldComponent extends ElementComponent {
|
|
|
161
163
|
}
|
|
162
164
|
defaultProcessAttributeChange(attribute, value) {
|
|
163
165
|
if (attribute === VALUE) {
|
|
166
|
+
console.log(`Llegó un update value de ${this.field?.fieldCode} por defaultProcessAttributeChange`);
|
|
164
167
|
this.updateValue();
|
|
165
168
|
}
|
|
166
169
|
else if (attribute === FOCUS) {
|
|
@@ -171,12 +174,18 @@ class FieldComponent extends ElementComponent {
|
|
|
171
174
|
}
|
|
172
175
|
return true;
|
|
173
176
|
}
|
|
174
|
-
updateValue() {
|
|
177
|
+
updateValue() {
|
|
178
|
+
console.log(`Update value de ${this.field?.fieldCode}`);
|
|
179
|
+
this.value = this.field?.value;
|
|
180
|
+
}
|
|
175
181
|
onInputChange() { setTimeout(() => this.field?.notifyEditionPartial(), 50); }
|
|
176
182
|
onChangeContent() { setTimeout(() => this.field?.notifyEditionFinish(), 50); }
|
|
177
183
|
onShowInfo(detail = null) { setTimeout(() => this.field?.notifyEditionDetailRequest(detail), 50); }
|
|
178
184
|
focus() { }
|
|
179
|
-
updateObject(widgetUpdate = true) {
|
|
185
|
+
updateObject(widgetUpdate = true) {
|
|
186
|
+
console.log(`updateObject ${this.field?.fieldCode} update ${widgetUpdate}`);
|
|
187
|
+
this.field?.setValue(this.value, widgetUpdate);
|
|
188
|
+
}
|
|
180
189
|
inputChanged() {
|
|
181
190
|
this.field?.setValue(this.value);
|
|
182
191
|
this.onChangeContent();
|
|
@@ -1176,9 +1185,11 @@ class FieldDescriptor extends FormElement {
|
|
|
1176
1185
|
if (this._value !== newFinalValue) {
|
|
1177
1186
|
this.hasChanged = true;
|
|
1178
1187
|
if (widgetUpdate) {
|
|
1188
|
+
console.log(`SetValue ${this.fieldCode} CON update`);
|
|
1179
1189
|
this.setAttr(attrs$1._value, newFinalValue);
|
|
1180
1190
|
}
|
|
1181
1191
|
else {
|
|
1192
|
+
console.log(`SetValue ${this.fieldCode} sin update`);
|
|
1182
1193
|
this._value = newFinalValue;
|
|
1183
1194
|
}
|
|
1184
1195
|
}
|