@seniorsistemas/angular-components 17.19.0 → 17.19.1
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 +14 -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/dynamic-form/configurations/fields/field.d.ts +5 -0
- package/components/dynamic-form/configurations/form-field.d.ts +4 -0
- package/esm2015/components/custom-fields/custom-fields.component.js +4 -1
- package/esm2015/components/dynamic-form/components/dynamic-field/dynamic-field.component.js +2 -2
- package/esm2015/components/dynamic-form/configurations/fields/field.js +7 -2
- package/esm2015/components/dynamic-form/configurations/form-field.js +5 -1
- package/esm5/components/custom-fields/custom-fields.component.js +4 -1
- package/esm5/components/dynamic-form/components/dynamic-field/dynamic-field.component.js +2 -2
- package/esm5/components/dynamic-form/configurations/fields/field.js +7 -2
- package/esm5/components/dynamic-form/configurations/form-field.js +5 -1
- package/fesm2015/seniorsistemas-angular-components.js +14 -2
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +14 -2
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -5914,7 +5914,11 @@ class FieldSize {
|
|
|
5914
5914
|
|
|
5915
5915
|
class Field {
|
|
5916
5916
|
constructor(config) {
|
|
5917
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5917
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
5918
|
+
/**
|
|
5919
|
+
* In some cases DynamicFormField use a custom field that alredy exists, this happen in CustomFields when convert 'Integer, Double & Money' types to 'Custom' this create two labels. activate this property hide the parent label.
|
|
5920
|
+
*/
|
|
5921
|
+
this.ignoreLabel = false;
|
|
5918
5922
|
if ((_a = config.footer) === null || _a === void 0 ? void 0 : _a.help) {
|
|
5919
5923
|
config.footer.help = Object.assign({ visible: () => true }, (_b = config.footer) === null || _b === void 0 ? void 0 : _b.help);
|
|
5920
5924
|
}
|
|
@@ -5942,6 +5946,7 @@ class Field {
|
|
|
5942
5946
|
this.CustomFieldComponentClass = config.CustomFieldComponentClass;
|
|
5943
5947
|
this.displayTimeInfoSign = (_e = config.displayTimeInfoSign) !== null && _e !== void 0 ? _e : 5000;
|
|
5944
5948
|
this.useInfoSignFocusedInputRef = (_f = config.useInfoSignFocusedInputRef) !== null && _f !== void 0 ? _f : true;
|
|
5949
|
+
this.ignoreLabel = (_g = config.ignoreLabel) !== null && _g !== void 0 ? _g : false;
|
|
5945
5950
|
}
|
|
5946
5951
|
}
|
|
5947
5952
|
|
|
@@ -6471,6 +6476,10 @@ class ProfilePictureField extends Field {
|
|
|
6471
6476
|
|
|
6472
6477
|
class FormField {
|
|
6473
6478
|
constructor(config) {
|
|
6479
|
+
/**
|
|
6480
|
+
* In some cases DynamicFormField use a custom field that alredy exists, this happen in CustomFields when convert 'Integer, Double & Money' types to 'Custom' this create two labels. activate this property hide the parent label.
|
|
6481
|
+
*/
|
|
6482
|
+
this.ignoreLabel = false;
|
|
6474
6483
|
switch (config.type) {
|
|
6475
6484
|
case FieldType.Enum:
|
|
6476
6485
|
return new SelectField(config);
|
|
@@ -10520,7 +10529,7 @@ __decorate([
|
|
|
10520
10529
|
DynamicFieldComponent = __decorate([
|
|
10521
10530
|
Component({
|
|
10522
10531
|
selector: "s-dynamic-field",
|
|
10523
|
-
template: "<div class=\"ui-fluid\" [formGroup]=\"form\">\n <div class=\"ui-g\">\n <ng-container *ngFor=\"let field of fields\">\n <div\n *ngIf=\"!field.visible || field.visible()\"\n [ngClass]=\"field.gridClass\">\n
|
|
10532
|
+
template: "<div class=\"ui-fluid\" [formGroup]=\"form\">\n <div class=\"ui-g\">\n <ng-container *ngFor=\"let field of fields\">\n <div\n *ngIf=\"!field.visible || field.visible()\"\n [ngClass]=\"field.gridClass\">\n <ng-container *ngIf=\"field.ignoreLabel ? false : field.label && field.type === FieldType.Custom\">\n <label\n *sInfoSign=\"field.infoSign; displayTime: field.displayTimeInfoSign; useFocusedInputRef: field.useInfoSignFocusedInputRef\"\n [for]=\"field.name\"\n [ngClass]=\"{ required: field.required() }\"\n >\n {{ field.label }}\n </label>\n </ng-container>\n\n <ng-container\n *sDynamicForm=\"{\n id: id,\n config: field,\n group: form\n }\"\n ></ng-container>\n\n <s-control-errors\n [form]=\"form\"\n [control]=\"form.controls[field.name]\"\n [errorMessages]=\"getErrorMessages(field.errorMessages)\"\n ></s-control-errors>\n\n <ng-container *ngIf=\"field.footer\">\n <ng-container *ngIf=\"field.footer.help\">\n <span\n *ngIf=\"\n field.footer.help.visible({\n abstractControl: form.controls[field.name],\n formField: field\n })\n \"\n style=\"color: #888b99\"\n >\n {{ field.footer.help.text }}\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"field.footer.link\">\n <div\n *ngIf=\"\n field.footer.link.visible({\n abstractControl: form.controls[field.name],\n formField: field\n })\n \"\n class=\"ui-g\"\n style=\"margin-left: -10px\"\n >\n <s-button\n [label]=\"field.footer.link.label\"\n priority=\"link\"\n (onClick)=\"\n field.footer.link.onClick({\n abstractControl:\n form.controls[field.name],\n formField: field\n })\n \"\n [auxiliary]=\"true\"\n ></s-button>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template\n *ngIf=\"field?.bottomTemplate\"\n [ngTemplateOutlet]=\"field.bottomTemplate\"\n ></ng-template>\n </div>\n </ng-container>\n </div>\n</div>\n"
|
|
10524
10533
|
})
|
|
10525
10534
|
], DynamicFieldComponent);
|
|
10526
10535
|
|
|
@@ -12533,6 +12542,7 @@ let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponen
|
|
|
12533
12542
|
leftAddon: {
|
|
12534
12543
|
label: (_b = (_a = localeOptions === null || localeOptions === void 0 ? void 0 : localeOptions.number) === null || _a === void 0 ? void 0 : _a.currencySymbol) !== null && _b !== void 0 ? _b : "R$",
|
|
12535
12544
|
},
|
|
12545
|
+
ignoreLabel: true,
|
|
12536
12546
|
};
|
|
12537
12547
|
break;
|
|
12538
12548
|
case CustomFieldType.Double:
|
|
@@ -12542,6 +12552,7 @@ let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponen
|
|
|
12542
12552
|
CustomFieldClass: NumberField,
|
|
12543
12553
|
precision: 15,
|
|
12544
12554
|
scale: 2,
|
|
12555
|
+
ignoreLabel: true,
|
|
12545
12556
|
};
|
|
12546
12557
|
break;
|
|
12547
12558
|
case CustomFieldType.Integer:
|
|
@@ -12551,6 +12562,7 @@ let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponen
|
|
|
12551
12562
|
CustomFieldClass: NumberField,
|
|
12552
12563
|
precision: 15,
|
|
12553
12564
|
scale: 0,
|
|
12565
|
+
ignoreLabel: true,
|
|
12554
12566
|
};
|
|
12555
12567
|
break;
|
|
12556
12568
|
case CustomFieldType.Any:
|