@seniorsistemas/angular-components 14.9.5 → 14.9.6

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.
@@ -4931,6 +4931,9 @@ var CustomFieldsComponent = /** @class */ (function () {
4931
4931
  validators.push(Validators.pattern(validationRegex));
4932
4932
  if (fieldType === CustomFieldType.Integer && !formField.mask)
4933
4933
  validators.push(Validators.pattern(/^\-?\d*$/));
4934
+ if (formField.required()) {
4935
+ validators.push(Validators.required);
4936
+ }
4934
4937
  var control = new FormControl({ value: defaults[fieldType].defaultValue, disabled: _this.formGroup.disabled }, validators);
4935
4938
  control.markAsDirty({ onlySelf: true });
4936
4939
  _this.formGroup.addControl(formField.name, control);
@@ -5091,7 +5094,7 @@ var CustomFieldsComponent = /** @class */ (function () {
5091
5094
  parameters = {};
5092
5095
  break;
5093
5096
  }
5094
- return new FormField(__assign({ name: field.id, label: field.customization.label, tooltip: field.customization.tooltip, type: field.type, mask: field.customization.mask, calendarOptions: localeOptions.calendar, currencyOptions: localeOptions.number }, parameters));
5097
+ return new FormField(__assign({ name: field.id, label: field.customization.label, tooltip: field.customization.tooltip, type: field.type, mask: field.customization.mask, required: function () { return field.customization.mandatory; }, calendarOptions: localeOptions.calendar, currencyOptions: localeOptions.number }, parameters));
5095
5098
  };
5096
5099
  CustomFieldsComponent.prototype.getEnumParameters = function (field) {
5097
5100
  return {
@@ -5323,10 +5326,13 @@ var CustomFieldsComponent = /** @class */ (function () {
5323
5326
  __decorate([
5324
5327
  Input()
5325
5328
  ], CustomFieldsComponent.prototype, "requestAccessEndpoint", void 0);
5329
+ __decorate([
5330
+ Input()
5331
+ ], CustomFieldsComponent.prototype, "requiredErrorMessage", void 0);
5326
5332
  CustomFieldsComponent = CustomFieldsComponent_1 = __decorate([
5327
5333
  Component({
5328
5334
  selector: "s-custom-fields",
5329
- template: "<s-dynamic-form [fields]=\"fields\" [form]=\"formGroup\" [errorMessages]=\"{pattern: invalidErrorLabel}\"></s-dynamic-form>",
5335
+ template: "<s-dynamic-form [fields]=\"fields\" [form]=\"formGroup\" [errorMessages]=\"{pattern: invalidErrorLabel, required: requiredErrorMessage}\"></s-dynamic-form>",
5330
5336
  providers: [
5331
5337
  {
5332
5338
  provide: NG_VALUE_ACCESSOR,