tuain-ng-forms-lib 15.0.15 → 15.0.18

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.
@@ -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();
@@ -829,11 +825,13 @@ class FieldDescriptor extends FormElement {
829
825
  this._tooltipText = '';
830
826
  this.fieldCode = '';
831
827
  this.fieldOptions = null;
828
+ this.placeholder = '';
832
829
  this.propagationCustomAttributes = this._formConfig?.propagationCustomAttributes?.fields ?? [];
833
830
  this.elementType = elementTypes.field;
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) {