tuain-ng-forms-lib 12.0.35 → 12.0.41

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.
@@ -388,7 +388,8 @@
388
388
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
389
389
  }
390
390
 
391
- var VALUE = '';
391
+ var VALUE = 'value';
392
+ var FOCUS = 'focus';
392
393
  var FieldComponent = /** @class */ (function () {
393
394
  function FieldComponent() {
394
395
  }
@@ -400,29 +401,35 @@
400
401
  // Inicialización
401
402
  var mapping = Object.entries(this.formConfig.componentFieldAttrMap);
402
403
  for (var index = 0; index < mapping.length; index++) {
403
- var _c = __read(mapping[index], 2), fieldAttr = _c[0], compAttr1 = _c[1];
404
+ var _c = __read(mapping[index], 2), fieldAttr1 = _c[0], compAttr1 = _c[1];
404
405
  var compAttr = compAttr1.toString();
405
- if (compAttr === VALUE) {
406
- this.updateValue();
407
- }
408
- else {
409
- this[compAttr] = (_b = this.field) === null || _b === void 0 ? void 0 : _b[fieldAttr.toString()];
410
- }
406
+ var fieldAttr = fieldAttr1.toString();
407
+ var attributeValue = (_b = this.field) === null || _b === void 0 ? void 0 : _b[fieldAttr];
408
+ this.dafaultProcessFieldChange(compAttr, attributeValue);
409
+ this.processFieldChange(compAttr, attributeValue);
411
410
  }
412
411
  // Subscripción a cambios en atributos
413
412
  this.field.attributeChange.subscribe(function (event) {
414
413
  var fieldAttr = event.name, value = event.value;
415
414
  var compAttr = _this.formConfig.componentFieldAttrMap[fieldAttr];
416
- if (compAttr === VALUE) {
417
- _this.updateValue();
418
- }
419
- else {
420
- _this[compAttr] = value;
421
- }
415
+ _this.dafaultProcessFieldChange(compAttr, value);
416
+ _this.processFieldChange(compAttr, value);
422
417
  });
423
418
  }
424
419
  this.start();
425
420
  };
421
+ FieldComponent.prototype.dafaultProcessFieldChange = function (attribute, value) {
422
+ if (attribute === VALUE) {
423
+ this.updateValue();
424
+ }
425
+ else if (attribute === FOCUS) {
426
+ this.focus();
427
+ }
428
+ else {
429
+ this[attribute] = value;
430
+ }
431
+ };
432
+ FieldComponent.prototype.processFieldChange = function (attribute, value) { };
426
433
  FieldComponent.prototype.start = function () { };
427
434
  FieldComponent.prototype.focus = function () { };
428
435
  FieldComponent.prototype.updateObject = function () {
@@ -660,7 +667,6 @@
660
667
  this._visibleForced = false;
661
668
  this.disabled = (_a = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.disabled) !== null && _a !== void 0 ? _a : false;
662
669
  this.setVisibility((_b = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.visible) !== null && _b !== void 0 ? _b : true);
663
- this.widget = null;
664
670
  this.customAttributes = (_c = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.customAttributes) !== null && _c !== void 0 ? _c : {};
665
671
  }
666
672
  FormElement.prototype.getCustomAttribute = function (name) { var _a, _b; return (_b = (_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null; };
@@ -940,9 +946,9 @@
940
946
  _this._selectionActionTrigger = new rxjs.Subject();
941
947
  _this._getDataTrigger = new rxjs.Subject();
942
948
  _this._attributeChange = new rxjs.Subject();
943
- _this.tableRecordObj = {};
944
949
  _this._tableColumnObj = {};
945
950
  _this._actionsObj = {};
951
+ _this.tableRecordObj = {};
946
952
  _this.allSelected = false;
947
953
  _this.elementType = elementTypes.table;
948
954
  _this.waiting = false;
@@ -1523,7 +1529,6 @@
1523
1529
  this.tableFieldStyles = this.formConfig.tableFieldStyles;
1524
1530
  this.selectable = this.table.selectable;
1525
1531
  this.hasActions = this.table.hasActions;
1526
- this.table.widget = this;
1527
1532
  this.inlineActions = this.table.getActions(this.formConfig.tableActions.inline);
1528
1533
  this.globalActions = this.table.getActions(this.formConfig.tableActions.global);
1529
1534
  this.selectionActions = this.table.getActions(this.formConfig.tableActions.selection);
@@ -1700,6 +1705,7 @@
1700
1705
  maxValue: '_maxValue',
1701
1706
  maxLength: '_maxLength',
1702
1707
  onValidation: '_onValidation',
1708
+ focus: 'focus',
1703
1709
  intrinsicErrorMessage: '_intrinsicErrorMessage',
1704
1710
  code: 'fieldCode',
1705
1711
  info: 'fieldInfo',
@@ -1803,6 +1809,7 @@
1803
1809
  enumerable: false,
1804
1810
  configurable: true
1805
1811
  });
1812
+ FieldDescriptor.prototype.focus = function () { this.setAttr(fldAttr.focus, true); };
1806
1813
  FieldDescriptor.prototype.setIntrinsicErrorMessage = function (message) { this.setAttr(fldAttr.intrinsicErrorMessage, message); };
1807
1814
  Object.defineProperty(FieldDescriptor.prototype, "intrinsicErrorMessage", {
1808
1815
  set: function (message) { this.setIntrinsicErrorMessage(message); },
@@ -1857,6 +1864,14 @@
1857
1864
  this.setError('99', this._intrinsicErrorMessage);
1858
1865
  }
1859
1866
  }
1867
+ if (intrinsicValidation && fieldValue && this._minValue && fieldValue < this._minValue) {
1868
+ intrinsicValidation = false;
1869
+ this.setError('99', 'Campo con valor inferior al mínimo');
1870
+ }
1871
+ if (intrinsicValidation && fieldValue && this._maxValue && fieldValue > this._maxValue) {
1872
+ intrinsicValidation = false;
1873
+ this.setError('99', 'Campo con valor superior al máximo');
1874
+ }
1860
1875
  this._editionFinish.next({ code: this.fieldCode, intrinsicValidation: intrinsicValidation });
1861
1876
  };
1862
1877
  FieldDescriptor.prototype.setAttr = function (name, value) {
@@ -1927,6 +1942,11 @@
1927
1942
  }
1928
1943
  return this._value;
1929
1944
  };
1945
+ FieldDescriptor.prototype.getOptionText = function () {
1946
+ var _this = this;
1947
+ var _a, _b;
1948
+ (_b = (_a = this.fieldOptions.find(function (item) { return item.fieldOptionId === _this._value; })) === null || _a === void 0 ? void 0 : _a.fieldOptionValue) !== null && _b !== void 0 ? _b : null;
1949
+ };
1930
1950
  FieldDescriptor.prototype.updateFromServer = function (fld) {
1931
1951
  var _a;
1932
1952
  var fieldKeys = Object.keys(fld);
@@ -1952,40 +1972,26 @@
1952
1972
  FieldDescriptor.prototype.setFieldType = function (inputFieldType) {
1953
1973
  this.setAttr(fldAttr.type, inputFieldType);
1954
1974
  };
1955
- FieldDescriptor.prototype.setMinValue = function (minValue) {
1956
- var _a, _b, _c;
1957
- if (this.fieldType === this._formConfig.fieldTypes.date
1958
- && ((_a = this.widget) === null || _a === void 0 ? void 0 : _a.setMinValue)) {
1959
- this.setAttr(fldAttr.minValue, minValue);
1960
- if (!minValue) {
1961
- (_b = this.widget) === null || _b === void 0 ? void 0 : _b.setMinValue(false);
1962
- }
1963
- else {
1964
- var minDate = new Date(minValue);
1965
- (_c = this.widget) === null || _c === void 0 ? void 0 : _c.setMinValue(minDate);
1966
- }
1975
+ FieldDescriptor.prototype.setMinValue = function (inputMinValue) {
1976
+ var minValue = inputMinValue;
1977
+ if (this.fieldType === this._formConfig.fieldTypes.date) {
1978
+ minValue = new Date(minValue);
1967
1979
  }
1980
+ this.setAttr(fldAttr.minValue, minValue);
1968
1981
  };
1969
- FieldDescriptor.prototype.setMaxValue = function (maxValue) {
1970
- var _a, _b, _c;
1971
- if (this.fieldType === this._formConfig.fieldTypes.date
1972
- && ((_a = this.widget) === null || _a === void 0 ? void 0 : _a.setMaxValue)) {
1973
- this.setAttr(fldAttr.maxValue, maxValue);
1974
- if (!maxValue) {
1975
- (_b = this.widget) === null || _b === void 0 ? void 0 : _b.setMaxValue(false);
1976
- }
1977
- else {
1978
- var maxDate = new Date(maxValue);
1979
- (_c = this.widget) === null || _c === void 0 ? void 0 : _c.setMaxValue(maxDate);
1980
- }
1982
+ FieldDescriptor.prototype.setMaxValue = function (inputMaxValue) {
1983
+ var maxValue = inputMaxValue;
1984
+ if (this.fieldType === this._formConfig.fieldTypes.date) {
1985
+ maxValue = new Date(maxValue);
1981
1986
  }
1987
+ this.setAttr(fldAttr.maxValue, maxValue);
1982
1988
  };
1983
1989
  FieldDescriptor.prototype.getFieldOptions = function () {
1984
1990
  return JSON.parse(JSON.stringify(this.fieldOptions));
1985
1991
  };
1986
1992
  FieldDescriptor.prototype.setFieldOptions = function (newOptions) {
1987
1993
  var _this = this;
1988
- var _a, _b, _c, _d;
1994
+ var _a;
1989
1995
  if ((this.captureType !== 'LIST' && this.captureType !== 'RADIO')
1990
1996
  || typeof newOptions === UNDEFINED || !newOptions
1991
1997
  || !Array.isArray(newOptions)) {
@@ -2001,12 +2007,9 @@
2001
2007
  fieldOptions = (fieldOptions && Array.isArray(fieldOptions)
2002
2008
  && fieldOptions.length > 0) ? fieldOptions : [];
2003
2009
  this.setAttr(fldAttr.options, fieldOptions);
2004
- if (this.fieldType === this._formConfig.fieldTypes.array && this.widget) {
2005
- return (_a = this.widget) === null || _a === void 0 ? void 0 : _a.refereshContent();
2006
- }
2007
2010
  if (this._value) {
2008
2011
  if (this.fieldType === this._formConfig.fieldTypes.array && Array.isArray(this._value)) {
2009
- var fieldValue = (_b = this._value) === null || _b === void 0 ? void 0 : _b.filter(function (item) { return _this.fieldOptions.find(function (opt) { return opt.fieldOptionId === item; }); });
2012
+ var fieldValue = (_a = this._value) === null || _a === void 0 ? void 0 : _a.filter(function (item) { return _this.fieldOptions.find(function (opt) { return opt.fieldOptionId === item; }); });
2010
2013
  this.setAttr(fldAttr.value, fieldValue);
2011
2014
  }
2012
2015
  else {
@@ -2019,57 +2022,41 @@
2019
2022
  }
2020
2023
  if (this.fieldRequired && this.fieldOptions.length === 1) {
2021
2024
  this.setValue(this.fieldOptions[0].fieldOptionId);
2022
- if ((_c = this.widget) === null || _c === void 0 ? void 0 : _c.onChangeContent) {
2023
- (_d = this.widget) === null || _d === void 0 ? void 0 : _d.onChangeContent();
2024
- }
2025
2025
  }
2026
2026
  };
2027
2027
  FieldDescriptor.prototype.setValue = function (newValue, widgetUpdate) {
2028
2028
  if (widgetUpdate === void 0) { widgetUpdate = true; }
2029
- var _a;
2030
2029
  if (typeof newValue === UNDEFINED || newValue === null) {
2031
2030
  return true;
2032
2031
  }
2033
2032
  var newFinalValue;
2034
- switch (this.fieldType) {
2035
- case 'BOOLEAN':
2036
- newFinalValue = !!newValue;
2037
- break;
2038
- case this._formConfig.fieldTypes.boolean:
2039
- newFinalValue = !!newValue;
2040
- break;
2041
- case this._formConfig.fieldTypes.check:
2042
- newFinalValue = !!newValue;
2043
- break;
2044
- case this._formConfig.fieldTypes.array:
2045
- if (newValue === null || newValue === '') {
2046
- newFinalValue = [];
2047
- }
2048
- else if (!Array.isArray(newValue)) {
2049
- if (typeof (newValue) !== 'string') {
2050
- newValue = newValue.toString();
2051
- }
2052
- newFinalValue = newValue.split(',');
2053
- }
2054
- else {
2055
- newFinalValue = newValue;
2056
- }
2057
- break;
2058
- case this._formConfig.fieldTypes.map:
2059
- newFinalValue = newValue;
2060
- if (newFinalValue && this.widget && widgetUpdate) {
2061
- var latitude = parseFloat(newFinalValue[0]);
2062
- var longitude = parseFloat(newFinalValue[1]);
2063
- (_a = this.widget) === null || _a === void 0 ? void 0 : _a.setLocation(latitude, longitude);
2064
- }
2065
- break;
2066
- default:
2033
+ if (this.fieldType === this._formConfig.fieldTypes.boolean
2034
+ || this.fieldType === this._formConfig.fieldTypes.check) {
2035
+ newFinalValue = yn__default['default'](newValue);
2036
+ }
2037
+ else if (this.fieldType === this._formConfig.fieldTypes.array
2038
+ || this.fieldType === this._formConfig.fieldTypes.map) {
2039
+ if (newValue === null || newValue === '') {
2040
+ newFinalValue = [];
2041
+ }
2042
+ else if (Array.isArray(newValue)) {
2067
2043
  newFinalValue = newValue;
2068
- break;
2044
+ }
2045
+ else {
2046
+ newFinalValue = newValue.toString().split(',');
2047
+ }
2048
+ }
2049
+ else {
2050
+ newFinalValue = newValue;
2069
2051
  }
2070
2052
  if (this._value !== newFinalValue) {
2071
2053
  this.setChanged(true);
2072
- this.setAttr(fldAttr.value, newFinalValue);
2054
+ if (widgetUpdate) {
2055
+ this.setAttr(fldAttr.value, newFinalValue);
2056
+ }
2057
+ else {
2058
+ this._value = newFinalValue;
2059
+ }
2073
2060
  }
2074
2061
  return true;
2075
2062
  };
@@ -2576,6 +2563,7 @@
2576
2563
  FormStructureAndData.prototype.enableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.enable(); };
2577
2564
  FormStructureAndData.prototype.disableField = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.disable(); };
2578
2565
  FormStructureAndData.prototype.getFieldValue = function (code) { var _a; return (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getValue(); };
2566
+ FormStructureAndData.prototype.getFieldOptionText = function (code) { var _a; return (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getOptionText(); };
2579
2567
  FormStructureAndData.prototype.getFieldOptions = function (code) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.getFieldOptions(); };
2580
2568
  FormStructureAndData.prototype.setFieldValue = function (code, value) { var _a; (_a = this.getField(code)) === null || _a === void 0 ? void 0 : _a.setValue(value); };
2581
2569
  FormStructureAndData.prototype.setFieldError = function (code, message, type) {
@@ -3040,90 +3028,28 @@
3040
3028
  this.cleanStart();
3041
3029
  this.customPreProcessing();
3042
3030
  }
3043
- BasicFormComponent.prototype.getTitle = function () {
3044
- var _a;
3045
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getTitle();
3046
- };
3047
- BasicFormComponent.prototype.setTitle = function (title) {
3048
- var _a;
3049
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setTitle(title);
3050
- };
3051
- BasicFormComponent.prototype.cleanData = function () {
3052
- var _a;
3053
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.cleanData();
3054
- };
3055
- BasicFormComponent.prototype.getCurrentState = function () {
3056
- var _a;
3057
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getCurrentState();
3058
- };
3059
- BasicFormComponent.prototype.supportState = function (state) {
3060
- var _a;
3061
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.supportState(state);
3062
- };
3063
- BasicFormComponent.prototype.changeState = function (state) {
3064
- var _a;
3065
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.changeState(state);
3066
- };
3067
- BasicFormComponent.prototype.getStates = function () {
3068
- var _a;
3069
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.states;
3070
- };
3071
- BasicFormComponent.prototype.getImmutableElement = function (name) {
3072
- var _a;
3073
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getImmutableElement(name);
3074
- };
3075
- BasicFormComponent.prototype.getExtraInfo = function (name) {
3076
- var _a;
3077
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getExtraInfo(name);
3078
- };
3079
- BasicFormComponent.prototype.getFields = function () {
3080
- var _a;
3081
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFields();
3082
- };
3083
- BasicFormComponent.prototype.getFieldNames = function () {
3084
- var _a;
3085
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldNames();
3086
- };
3087
- BasicFormComponent.prototype.getField = function (code) {
3088
- var _a;
3089
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getField(code);
3090
- };
3091
- BasicFormComponent.prototype.enableField = function (code) {
3092
- var _a;
3093
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.enableField(code);
3094
- };
3095
- BasicFormComponent.prototype.disableField = function (code) {
3096
- var _a;
3097
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.disableField(code);
3098
- };
3099
- BasicFormComponent.prototype.getFieldValue = function (code) {
3100
- var _a;
3101
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldValue(code);
3102
- };
3103
- BasicFormComponent.prototype.getFieldsValues = function (codes) {
3104
- var _a;
3105
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldsValues(codes);
3106
- };
3107
- BasicFormComponent.prototype.getFieldOptions = function (code) {
3108
- var _a;
3109
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldOptions(code);
3110
- };
3111
- BasicFormComponent.prototype.setFieldValue = function (code, value) {
3112
- var _a;
3113
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldValue(code, value);
3114
- };
3115
- BasicFormComponent.prototype.setFieldRequired = function (code, required) {
3116
- var _a;
3117
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldRequired(code, required);
3118
- };
3119
- BasicFormComponent.prototype.setFieldErrorMessage = function (code, errorMessage) {
3120
- var _a;
3121
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldErrorMessage(code, errorMessage);
3122
- };
3123
- BasicFormComponent.prototype.setFieldError = function (code, message, type) {
3124
- var _a;
3125
- return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldError(code, message, type);
3126
- };
3031
+ BasicFormComponent.prototype.getTitle = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getTitle(); };
3032
+ BasicFormComponent.prototype.setTitle = function (title) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setTitle(title); };
3033
+ BasicFormComponent.prototype.cleanData = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.cleanData(); };
3034
+ BasicFormComponent.prototype.getCurrentState = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getCurrentState(); };
3035
+ BasicFormComponent.prototype.supportState = function (state) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.supportState(state); };
3036
+ BasicFormComponent.prototype.changeState = function (state) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.changeState(state); };
3037
+ BasicFormComponent.prototype.getStates = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.states; };
3038
+ BasicFormComponent.prototype.getImmutableElement = function (name) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getImmutableElement(name); };
3039
+ BasicFormComponent.prototype.getExtraInfo = function (name) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getExtraInfo(name); };
3040
+ BasicFormComponent.prototype.getFields = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFields(); };
3041
+ BasicFormComponent.prototype.getFieldNames = function () { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldNames(); };
3042
+ BasicFormComponent.prototype.getField = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getField(code); };
3043
+ BasicFormComponent.prototype.enableField = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.enableField(code); };
3044
+ BasicFormComponent.prototype.disableField = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.disableField(code); };
3045
+ BasicFormComponent.prototype.getFieldValue = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldValue(code); };
3046
+ BasicFormComponent.prototype.getFieldOptionText = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldOptionText(code); };
3047
+ BasicFormComponent.prototype.getFieldsValues = function (codes) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldsValues(codes); };
3048
+ BasicFormComponent.prototype.getFieldOptions = function (code) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.getFieldOptions(code); };
3049
+ BasicFormComponent.prototype.setFieldValue = function (code, value) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldValue(code, value); };
3050
+ BasicFormComponent.prototype.setFieldRequired = function (code, required) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldRequired(code, required); };
3051
+ BasicFormComponent.prototype.setFieldErrorMessage = function (code, errorMessage) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldErrorMessage(code, errorMessage); };
3052
+ BasicFormComponent.prototype.setFieldError = function (code, message, type) { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldError(code, message, type); };
3127
3053
  BasicFormComponent.prototype.setFieldIntrinsicErrorMessage = function (code, message) {
3128
3054
  var _a;
3129
3055
  return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.setFieldIntrinsicErrorMessage(code, message);
@@ -4926,11 +4852,8 @@
4926
4852
  for (var requiredEmptyFields_1 = __values(requiredEmptyFields), requiredEmptyFields_1_1 = requiredEmptyFields_1.next(); !requiredEmptyFields_1_1.done; requiredEmptyFields_1_1 = requiredEmptyFields_1.next()) {
4927
4853
  var fieldCode = requiredEmptyFields_1_1.value;
4928
4854
  var requiredEmptyField = this.getField(fieldCode);
4929
- if (requiredEmptyField && requiredEmptyField.widget
4930
- && requiredEmptyField.widget.focus) {
4931
- requiredEmptyField.widget.focus();
4932
- break;
4933
- }
4855
+ requiredEmptyField === null || requiredEmptyField === void 0 ? void 0 : requiredEmptyField.focus();
4856
+ break;
4934
4857
  }
4935
4858
  }
4936
4859
  catch (e_21_1) { e_21 = { error: e_21_1 }; }
@@ -4949,11 +4872,8 @@
4949
4872
  for (var validationIssueFields_1 = __values(validationIssueFields), validationIssueFields_1_1 = validationIssueFields_1.next(); !validationIssueFields_1_1.done; validationIssueFields_1_1 = validationIssueFields_1.next()) {
4950
4873
  var fieldCode = validationIssueFields_1_1.value;
4951
4874
  var validationIssueField = this.getField(fieldCode);
4952
- if (validationIssueField && validationIssueField.widget
4953
- && validationIssueField.widget.focus) {
4954
- validationIssueField.widget.focus();
4955
- break;
4956
- }
4875
+ validationIssueField.focus();
4876
+ break;
4957
4877
  }
4958
4878
  }
4959
4879
  catch (e_22_1) { e_22 = { error: e_22_1 }; }