@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.
- package/bundles/seniorsistemas-angular-components.umd.js +8 -2
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/custom-fields/custom-fields.component.d.ts +1 -0
- package/esm2015/components/custom-fields/custom-fields.component.js +9 -3
- package/esm5/components/custom-fields/custom-fields.component.js +9 -3
- package/fesm2015/seniorsistemas-angular-components.js +8 -2
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +8 -2
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -5114,6 +5114,9 @@
|
|
|
5114
5114
|
validators.push(forms.Validators.pattern(validationRegex));
|
|
5115
5115
|
if (fieldType === CustomFieldType.Integer && !formField.mask)
|
|
5116
5116
|
validators.push(forms.Validators.pattern(/^\-?\d*$/));
|
|
5117
|
+
if (formField.required()) {
|
|
5118
|
+
validators.push(forms.Validators.required);
|
|
5119
|
+
}
|
|
5117
5120
|
var control = new forms.FormControl({ value: defaults[fieldType].defaultValue, disabled: _this.formGroup.disabled }, validators);
|
|
5118
5121
|
control.markAsDirty({ onlySelf: true });
|
|
5119
5122
|
_this.formGroup.addControl(formField.name, control);
|
|
@@ -5274,7 +5277,7 @@
|
|
|
5274
5277
|
parameters = {};
|
|
5275
5278
|
break;
|
|
5276
5279
|
}
|
|
5277
|
-
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));
|
|
5280
|
+
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));
|
|
5278
5281
|
};
|
|
5279
5282
|
CustomFieldsComponent.prototype.getEnumParameters = function (field) {
|
|
5280
5283
|
return {
|
|
@@ -5506,10 +5509,13 @@
|
|
|
5506
5509
|
__decorate([
|
|
5507
5510
|
core.Input()
|
|
5508
5511
|
], CustomFieldsComponent.prototype, "requestAccessEndpoint", void 0);
|
|
5512
|
+
__decorate([
|
|
5513
|
+
core.Input()
|
|
5514
|
+
], CustomFieldsComponent.prototype, "requiredErrorMessage", void 0);
|
|
5509
5515
|
CustomFieldsComponent = CustomFieldsComponent_1 = __decorate([
|
|
5510
5516
|
core.Component({
|
|
5511
5517
|
selector: "s-custom-fields",
|
|
5512
|
-
template: "<s-dynamic-form [fields]=\"fields\" [form]=\"formGroup\" [errorMessages]=\"{pattern: invalidErrorLabel}\"></s-dynamic-form>",
|
|
5518
|
+
template: "<s-dynamic-form [fields]=\"fields\" [form]=\"formGroup\" [errorMessages]=\"{pattern: invalidErrorLabel, required: requiredErrorMessage}\"></s-dynamic-form>",
|
|
5513
5519
|
providers: [
|
|
5514
5520
|
{
|
|
5515
5521
|
provide: forms.NG_VALUE_ACCESSOR,
|