tuain-ng-forms-lib 15.0.9 → 15.0.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.
- package/esm2020/lib/classes/forms/field.mjs +3 -1
- package/esm2020/lib/components/elements/field.component.mjs +10 -3
- package/esm2020/lib/components/forms/basic-form.mjs +2 -2
- package/fesm2015/tuain-ng-forms-lib.mjs +15 -3
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +12 -3
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -166,7 +166,9 @@ class FieldComponent extends ElementComponent {
|
|
|
166
166
|
this.start();
|
|
167
167
|
}
|
|
168
168
|
defaultProcessAttributeChange(attribute, value) {
|
|
169
|
+
var _a;
|
|
169
170
|
if (attribute === VALUE) {
|
|
171
|
+
console.log(`Llegó un update value de ${(_a = this.field) === null || _a === void 0 ? void 0 : _a.fieldCode} por defaultProcessAttributeChange`);
|
|
170
172
|
this.updateValue();
|
|
171
173
|
}
|
|
172
174
|
else if (attribute === FOCUS) {
|
|
@@ -177,12 +179,20 @@ class FieldComponent extends ElementComponent {
|
|
|
177
179
|
}
|
|
178
180
|
return true;
|
|
179
181
|
}
|
|
180
|
-
updateValue() {
|
|
182
|
+
updateValue() {
|
|
183
|
+
var _a, _b;
|
|
184
|
+
console.log(`Update value de ${(_a = this.field) === null || _a === void 0 ? void 0 : _a.fieldCode}`);
|
|
185
|
+
this.value = (_b = this.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
186
|
+
}
|
|
181
187
|
onInputChange() { setTimeout(() => { var _a; return (_a = this.field) === null || _a === void 0 ? void 0 : _a.notifyEditionPartial(); }, 50); }
|
|
182
188
|
onChangeContent() { setTimeout(() => { var _a; return (_a = this.field) === null || _a === void 0 ? void 0 : _a.notifyEditionFinish(); }, 50); }
|
|
183
189
|
onShowInfo(detail = null) { setTimeout(() => { var _a; return (_a = this.field) === null || _a === void 0 ? void 0 : _a.notifyEditionDetailRequest(detail); }, 50); }
|
|
184
190
|
focus() { }
|
|
185
|
-
updateObject(widgetUpdate = true) {
|
|
191
|
+
updateObject(widgetUpdate = true) {
|
|
192
|
+
var _a, _b;
|
|
193
|
+
console.log(`updateObject ${(_a = this.field) === null || _a === void 0 ? void 0 : _a.fieldCode} update ${widgetUpdate}`);
|
|
194
|
+
(_b = this.field) === null || _b === void 0 ? void 0 : _b.setValue(this.value, widgetUpdate);
|
|
195
|
+
}
|
|
186
196
|
inputChanged() {
|
|
187
197
|
var _a;
|
|
188
198
|
(_a = this.field) === null || _a === void 0 ? void 0 : _a.setValue(this.value);
|
|
@@ -1202,9 +1212,11 @@ class FieldDescriptor extends FormElement {
|
|
|
1202
1212
|
if (this._value !== newFinalValue) {
|
|
1203
1213
|
this.hasChanged = true;
|
|
1204
1214
|
if (widgetUpdate) {
|
|
1215
|
+
console.log(`SetValue ${this.fieldCode} CON update`);
|
|
1205
1216
|
this.setAttr(attrs$1._value, newFinalValue);
|
|
1206
1217
|
}
|
|
1207
1218
|
else {
|
|
1219
|
+
console.log(`SetValue ${this.fieldCode} sin update`);
|
|
1208
1220
|
this._value = newFinalValue;
|
|
1209
1221
|
}
|
|
1210
1222
|
}
|
|
@@ -3265,9 +3277,9 @@ class BasicFormComponent extends FormStructureAndData {
|
|
|
3265
3277
|
let actionResult = null;
|
|
3266
3278
|
if (action.backend) {
|
|
3267
3279
|
actionResult = yield this.requestFormAction(action.actionCode);
|
|
3268
|
-
serverError = !!this.errorOccured();
|
|
3269
3280
|
}
|
|
3270
3281
|
yield this.finishAction(action, actionResult, serverError);
|
|
3282
|
+
serverError = !!this.errorOccured();
|
|
3271
3283
|
if (!serverError) {
|
|
3272
3284
|
action.newState && this.changeState(action.newState);
|
|
3273
3285
|
}
|