@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.
@@ -7769,7 +7769,8 @@ var CustomFieldsComponent = /** @class */ (function () {
7769
7769
  _this.parentControl.markAsPristine();
7770
7770
  }))
7771
7771
  .subscribe(function (response) {
7772
- var _a = __read(response, 2), customFieldsResponse = _a[0], localeOptions = _a[1];
7772
+ var _a;
7773
+ var _b = __read(response, 2), customFieldsResponse = _b[0], localeOptions = _b[1];
7773
7774
  var defaults = {};
7774
7775
  defaults[CustomFieldType.String] = {};
7775
7776
  defaults[CustomFieldType.Boolean] = { defaultValue: false };
@@ -7786,12 +7787,13 @@ var CustomFieldsComponent = /** @class */ (function () {
7786
7787
  defaults[CustomFieldType.Any] = {};
7787
7788
  if (!customFieldsResponse || !customFieldsResponse.entity_)
7788
7789
  return;
7789
- var _b = customFieldsResponse.entity_, active = _b.active, fields = _b.fields;
7790
+ var _c = customFieldsResponse.entity_, active = _c.active, fields = _c.fields;
7790
7791
  if (!active)
7791
7792
  return;
7792
7793
  fields
7793
7794
  .filter(function (field) { return field.customizable && field.customization && field.customization.active; })
7794
7795
  .forEach(function (field) {
7796
+ var _a;
7795
7797
  var formField = _this.getFormField(field, localeOptions);
7796
7798
  var fieldType = field.type;
7797
7799
  if (field.type === CustomFieldType.Blob && _this.value && _this.value[formField.name])
@@ -7810,7 +7812,7 @@ var CustomFieldsComponent = /** @class */ (function () {
7810
7812
  validators.push(Validators.pattern(validationRegex));
7811
7813
  if (fieldType === CustomFieldType.Integer && !formField.mask)
7812
7814
  validators.push(Validators.pattern(/^\-?\d*$/));
7813
- if (formField.required()) {
7815
+ if ((_a = formField.required) === null || _a === void 0 ? void 0 : _a.call(formField)) {
7814
7816
  validators.push(Validators.required);
7815
7817
  }
7816
7818
  var control = new FormControl({ value: defaults[fieldType].defaultValue, disabled: _this.formGroup.disabled }, validators);
@@ -7820,6 +7822,7 @@ var CustomFieldsComponent = /** @class */ (function () {
7820
7822
  _this.createFieldCustomization(fields);
7821
7823
  _this.formGroup.patchValue(_this.parseValuesForFields(_this.value));
7822
7824
  _this.ready = true;
7825
+ (_a = _this.ready$) === null || _a === void 0 ? void 0 : _a.next(true);
7823
7826
  });
7824
7827
  };
7825
7828
  CustomFieldsComponent.prototype.ngOnDestroy = function () {
@@ -8220,6 +8223,9 @@ var CustomFieldsComponent = /** @class */ (function () {
8220
8223
  __decorate([
8221
8224
  Input()
8222
8225
  ], CustomFieldsComponent.prototype, "showFileUploadDate", void 0);
8226
+ __decorate([
8227
+ Input()
8228
+ ], CustomFieldsComponent.prototype, "ready$", void 0);
8223
8229
  CustomFieldsComponent = CustomFieldsComponent_1 = __decorate([
8224
8230
  Component({
8225
8231
  selector: "s-custom-fields",