@seniorsistemas/angular-components 14.16.4 → 14.16.5
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 +24 -6
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/custom-fields/custom-fields.component.d.ts +6 -3
- package/esm2015/components/custom-fields/custom-fields.component.js +22 -12
- package/esm5/components/custom-fields/custom-fields.component.js +30 -12
- package/fesm2015/seniorsistemas-angular-components.js +18 -8
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +26 -8
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -5684,11 +5684,12 @@
|
|
|
5684
5684
|
})(CustomFieldType || (CustomFieldType = {}));
|
|
5685
5685
|
var moment$3 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
5686
5686
|
var CustomFieldsComponent = /** @class */ (function () {
|
|
5687
|
-
function CustomFieldsComponent(customFieldsService, localeService, sanitizer, translateService) {
|
|
5687
|
+
function CustomFieldsComponent(customFieldsService, localeService, sanitizer, translateService, controlContainer) {
|
|
5688
5688
|
this.customFieldsService = customFieldsService;
|
|
5689
5689
|
this.localeService = localeService;
|
|
5690
5690
|
this.sanitizer = sanitizer;
|
|
5691
5691
|
this.translateService = translateService;
|
|
5692
|
+
this.controlContainer = controlContainer;
|
|
5692
5693
|
this.customFieldsEndpoint = "platform/field_customization/queries/getEntity";
|
|
5693
5694
|
this.fileLocationEndpoint = "platform/field_customization/actions/requestUpload";
|
|
5694
5695
|
this.requestAccessEndpoint = "platform/field_customization/actions/requestAccess";
|
|
@@ -5697,6 +5698,20 @@
|
|
|
5697
5698
|
this.ngUsubscribe = new rxjs.Subject();
|
|
5698
5699
|
}
|
|
5699
5700
|
CustomFieldsComponent_1 = CustomFieldsComponent;
|
|
5701
|
+
Object.defineProperty(CustomFieldsComponent.prototype, "parentForm", {
|
|
5702
|
+
get: function () {
|
|
5703
|
+
return this.controlContainer.control;
|
|
5704
|
+
},
|
|
5705
|
+
enumerable: true,
|
|
5706
|
+
configurable: true
|
|
5707
|
+
});
|
|
5708
|
+
Object.defineProperty(CustomFieldsComponent.prototype, "parentControl", {
|
|
5709
|
+
get: function () {
|
|
5710
|
+
return this.parentForm.get("custom");
|
|
5711
|
+
},
|
|
5712
|
+
enumerable: true,
|
|
5713
|
+
configurable: true
|
|
5714
|
+
});
|
|
5700
5715
|
CustomFieldsComponent.prototype.registerOnChange = function (fn) {
|
|
5701
5716
|
var _this = this;
|
|
5702
5717
|
this.onChange = fn;
|
|
@@ -5740,7 +5755,10 @@
|
|
|
5740
5755
|
this.formGroup = new forms.FormGroup({});
|
|
5741
5756
|
var observables = [this.getCustomFields(), this.localeService.get()];
|
|
5742
5757
|
rxjs.forkJoin(observables)
|
|
5743
|
-
.pipe(operators.takeUntil(this.ngUsubscribe))
|
|
5758
|
+
.pipe(operators.takeUntil(this.ngUsubscribe), operators.finalize(function () {
|
|
5759
|
+
_this.formGroup.markAsPristine();
|
|
5760
|
+
_this.parentControl.markAsPristine();
|
|
5761
|
+
}))
|
|
5744
5762
|
.subscribe(function (response) {
|
|
5745
5763
|
var _a = __read(response, 2), customFieldsResponse = _a[0], localeOptions = _a[1];
|
|
5746
5764
|
var defaults = {};
|
|
@@ -5787,13 +5805,11 @@
|
|
|
5787
5805
|
validators.push(forms.Validators.required);
|
|
5788
5806
|
}
|
|
5789
5807
|
var control = new forms.FormControl({ value: defaults[fieldType].defaultValue, disabled: _this.formGroup.disabled }, validators);
|
|
5790
|
-
control.markAsDirty({ onlySelf: true });
|
|
5791
5808
|
_this.formGroup.addControl(formField.name, control);
|
|
5792
5809
|
_this.fields.push(formField);
|
|
5793
5810
|
});
|
|
5794
5811
|
_this.createFieldCustomization(fields);
|
|
5795
5812
|
_this.formGroup.patchValue(_this.parseValuesForFields(_this.value));
|
|
5796
|
-
_this.formGroup.markAsDirty({ onlySelf: true });
|
|
5797
5813
|
_this.ready = true;
|
|
5798
5814
|
});
|
|
5799
5815
|
};
|
|
@@ -6158,7 +6174,8 @@
|
|
|
6158
6174
|
{ type: CustomFieldsService },
|
|
6159
6175
|
{ type: LocaleService },
|
|
6160
6176
|
{ type: platformBrowser.DomSanitizer },
|
|
6161
|
-
{ type: core$1.TranslateService }
|
|
6177
|
+
{ type: core$1.TranslateService },
|
|
6178
|
+
{ type: forms.ControlContainer, decorators: [{ type: core.Optional }] }
|
|
6162
6179
|
]; };
|
|
6163
6180
|
__decorate([
|
|
6164
6181
|
core.Input()
|
|
@@ -6203,7 +6220,8 @@
|
|
|
6203
6220
|
multi: true,
|
|
6204
6221
|
},
|
|
6205
6222
|
]
|
|
6206
|
-
})
|
|
6223
|
+
}),
|
|
6224
|
+
__param(4, core.Optional())
|
|
6207
6225
|
], CustomFieldsComponent);
|
|
6208
6226
|
return CustomFieldsComponent;
|
|
6209
6227
|
}());
|