@seniorsistemas/angular-components 16.10.3 → 16.10.4
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 +9 -3
- 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 +2 -1
- package/esm2015/components/custom-fields/custom-fields.component.js +9 -3
- package/esm5/components/custom-fields/custom-fields.component.js +11 -5
- package/fesm2015/seniorsistemas-angular-components.js +7 -1
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +9 -3
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -7937,7 +7937,8 @@
|
|
|
7937
7937
|
_this.parentControl.markAsPristine();
|
|
7938
7938
|
}))
|
|
7939
7939
|
.subscribe(function (response) {
|
|
7940
|
-
var _a
|
|
7940
|
+
var _a;
|
|
7941
|
+
var _b = __read(response, 2), customFieldsResponse = _b[0], localeOptions = _b[1];
|
|
7941
7942
|
var defaults = {};
|
|
7942
7943
|
defaults[CustomFieldType.String] = {};
|
|
7943
7944
|
defaults[CustomFieldType.Boolean] = { defaultValue: false };
|
|
@@ -7954,12 +7955,13 @@
|
|
|
7954
7955
|
defaults[CustomFieldType.Any] = {};
|
|
7955
7956
|
if (!customFieldsResponse || !customFieldsResponse.entity_)
|
|
7956
7957
|
return;
|
|
7957
|
-
var
|
|
7958
|
+
var _c = customFieldsResponse.entity_, active = _c.active, fields = _c.fields;
|
|
7958
7959
|
if (!active)
|
|
7959
7960
|
return;
|
|
7960
7961
|
fields
|
|
7961
7962
|
.filter(function (field) { return field.customizable && field.customization && field.customization.active; })
|
|
7962
7963
|
.forEach(function (field) {
|
|
7964
|
+
var _a;
|
|
7963
7965
|
var formField = _this.getFormField(field, localeOptions);
|
|
7964
7966
|
var fieldType = field.type;
|
|
7965
7967
|
if (field.type === CustomFieldType.Blob && _this.value && _this.value[formField.name])
|
|
@@ -7978,7 +7980,7 @@
|
|
|
7978
7980
|
validators.push(forms.Validators.pattern(validationRegex));
|
|
7979
7981
|
if (fieldType === CustomFieldType.Integer && !formField.mask)
|
|
7980
7982
|
validators.push(forms.Validators.pattern(/^\-?\d*$/));
|
|
7981
|
-
if (formField.required()) {
|
|
7983
|
+
if ((_a = formField.required) === null || _a === void 0 ? void 0 : _a.call(formField)) {
|
|
7982
7984
|
validators.push(forms.Validators.required);
|
|
7983
7985
|
}
|
|
7984
7986
|
var control = new forms.FormControl({ value: defaults[fieldType].defaultValue, disabled: _this.formGroup.disabled }, validators);
|
|
@@ -7988,6 +7990,7 @@
|
|
|
7988
7990
|
_this.createFieldCustomization(fields);
|
|
7989
7991
|
_this.formGroup.patchValue(_this.parseValuesForFields(_this.value));
|
|
7990
7992
|
_this.ready = true;
|
|
7993
|
+
(_a = _this.ready$) === null || _a === void 0 ? void 0 : _a.next(true);
|
|
7991
7994
|
});
|
|
7992
7995
|
};
|
|
7993
7996
|
CustomFieldsComponent.prototype.ngOnDestroy = function () {
|
|
@@ -8388,6 +8391,9 @@
|
|
|
8388
8391
|
__decorate([
|
|
8389
8392
|
core.Input()
|
|
8390
8393
|
], CustomFieldsComponent.prototype, "showFileUploadDate", void 0);
|
|
8394
|
+
__decorate([
|
|
8395
|
+
core.Input()
|
|
8396
|
+
], CustomFieldsComponent.prototype, "ready$", void 0);
|
|
8391
8397
|
CustomFieldsComponent = CustomFieldsComponent_1 = __decorate([
|
|
8392
8398
|
core.Component({
|
|
8393
8399
|
selector: "s-custom-fields",
|