tuain-ng-forms-lib 15.0.15 → 15.0.17
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 +4 -4
- package/esm2020/lib/components/elements/field.component.mjs +3 -7
- package/esm2020/lib/components/forms/basic-form.mjs +4 -1
- package/fesm2015/tuain-ng-forms-lib.mjs +19 -22
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +8 -9
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/lib/classes/forms/field.d.ts +1 -0
- package/package.json +1 -1
|
@@ -171,16 +171,12 @@ class FieldComponent extends ElementComponent {
|
|
|
171
171
|
}
|
|
172
172
|
return true;
|
|
173
173
|
}
|
|
174
|
-
updateValue() {
|
|
175
|
-
this.value = this.field?.value;
|
|
176
|
-
}
|
|
174
|
+
updateValue() { this.value = this.field?.value; }
|
|
177
175
|
onInputChange() { setTimeout(() => this.field?.notifyEditionPartial(), 50); }
|
|
178
176
|
onChangeContent() { setTimeout(() => this.field?.notifyEditionFinish(), 50); }
|
|
179
177
|
onShowInfo(detail = null) { setTimeout(() => this.field?.notifyEditionDetailRequest(detail), 50); }
|
|
180
178
|
focus() { }
|
|
181
|
-
updateObject(widgetUpdate = true) {
|
|
182
|
-
this.field?.setValue(this.value, widgetUpdate);
|
|
183
|
-
}
|
|
179
|
+
updateObject(widgetUpdate = true) { this.field?.setValue(this.value, widgetUpdate); }
|
|
184
180
|
inputChanged() {
|
|
185
181
|
this.field?.setValue(this.value);
|
|
186
182
|
this.onChangeContent();
|
|
@@ -827,6 +823,7 @@ class FieldDescriptor extends FormElement {
|
|
|
827
823
|
this._hasChanged = false;
|
|
828
824
|
this._outputOnly = false;
|
|
829
825
|
this._tooltipText = '';
|
|
826
|
+
this.placeholder = '';
|
|
830
827
|
this.fieldCode = '';
|
|
831
828
|
this.fieldOptions = null;
|
|
832
829
|
this.propagationCustomAttributes = this._formConfig?.propagationCustomAttributes?.fields ?? [];
|
|
@@ -834,6 +831,7 @@ class FieldDescriptor extends FormElement {
|
|
|
834
831
|
const fld = (inputFieldReceived) ? inputFieldReceived : {};
|
|
835
832
|
this.setAttr(attrs$1.fieldCode, fld.fieldCode);
|
|
836
833
|
this.title = fld.fieldTitle ?? this.fieldCode;
|
|
834
|
+
this.placeholder = fld.placeholder ?? this.title;
|
|
837
835
|
this.type = fld.fieldTypeCode;
|
|
838
836
|
this.captureType = fld.captureType ?? DEFAULT_CAPTURE_TYPE;
|
|
839
837
|
const defaultValue = fld.defaultValue ?? null;
|
|
@@ -1002,9 +1000,7 @@ class FieldDescriptor extends FormElement {
|
|
|
1002
1000
|
set validateOnServer(validateOnServer) { this.setAttr(attrs$1._validateOnServer, validateOnServer); }
|
|
1003
1001
|
get serverAction() { return this._validateOnServer; }
|
|
1004
1002
|
set serverAction(validateOnServer) { this.validateOnServer = validateOnServer; }
|
|
1005
|
-
set value(newValue) {
|
|
1006
|
-
this._setValue(newValue);
|
|
1007
|
-
}
|
|
1003
|
+
set value(newValue) { this._setValue(newValue); }
|
|
1008
1004
|
get visibleLabel() { return this._visibleLabel; }
|
|
1009
1005
|
set visibleLabel(visibleLabel) { this.setAttr(attrs$1._visibleLabel, visibleLabel); }
|
|
1010
1006
|
/**
|
|
@@ -3193,6 +3189,9 @@ class BasicFormComponent extends FormStructureAndData {
|
|
|
3193
3189
|
async startServerAction(actionInput) {
|
|
3194
3190
|
const action = (typeof actionInput === 'string')
|
|
3195
3191
|
? this.getAction(actionInput) : actionInput;
|
|
3192
|
+
if (!action) {
|
|
3193
|
+
return;
|
|
3194
|
+
}
|
|
3196
3195
|
let serverError = false;
|
|
3197
3196
|
let actionResult = null;
|
|
3198
3197
|
if (action.backend) {
|