@seniorsistemas/angular-components 17.19.0 → 17.19.2
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 +23 -4
- 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/checkbox/checkbox.component.d.ts +1 -0
- package/components/checkbox/models/checkbox-data.d.ts +1 -0
- 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/checkbox/checkbox.component.js +6 -3
- package/esm2015/components/checkbox/models/checkbox-data.js +1 -1
- 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/checkbox/checkbox.component.js +10 -3
- package/esm5/components/checkbox/models/checkbox-data.js +1 -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 +19 -4
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +23 -4
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -3774,6 +3774,13 @@ var CheckboxComponent = /** @class */ (function () {
|
|
|
3774
3774
|
this._onChange(this.state);
|
|
3775
3775
|
this._onTouched();
|
|
3776
3776
|
};
|
|
3777
|
+
Object.defineProperty(CheckboxComponent.prototype, "renderType", {
|
|
3778
|
+
get: function () {
|
|
3779
|
+
return this.data.renderType || "inline";
|
|
3780
|
+
},
|
|
3781
|
+
enumerable: true,
|
|
3782
|
+
configurable: true
|
|
3783
|
+
});
|
|
3777
3784
|
CheckboxComponent.prototype._toggleChildrenCheck = function (item, state, checked) {
|
|
3778
3785
|
var _this = this;
|
|
3779
3786
|
var _a;
|
|
@@ -3801,7 +3808,7 @@ var CheckboxComponent = /** @class */ (function () {
|
|
|
3801
3808
|
CheckboxComponent = CheckboxComponent_1 = __decorate([
|
|
3802
3809
|
Component({
|
|
3803
3810
|
selector: "s-checkbox",
|
|
3804
|
-
template: "<div class=\"checkbox\">\n <label>\n <div\n class=\"checkbox-wrapper\"\n [ngClass]=\"{ 'checkbox-wrapper--disabled': state.disabled }\">\n <input\n type=\"checkbox\"\n class=\"checkbox-input\"\n [disabled]=\"state.disabled\"\n [ngClass]=\"{\n 'checkbox-input--checked': state.checked,\n 'checkbox-input--indeterminate': state.indeterminate\n }\"\n (change)=\"onCheckboxChange()\"\n [attr.aria-checked]=\"state.indeterminate ? 'mixed' : state.checked\"\n [attr.aria-disabled]=\"state.disabled\"\n role=\"checkbox\" />\n {{ data.label }}\n </div>\n </label>\n <div *ngIf=\"data.children && data.children.length\" class=\"checkbox-children\">\n <s-checkbox\n *ngFor=\"let child of data.children\"\n [data]=\"child\"\n [ngModel]=\"state.children[child.label]\"\n (ngModelChange)=\"updateParent()\">\n </s-checkbox>\n </div>\n</div>\n",
|
|
3811
|
+
template: "<div class=\"checkbox\">\n <label>\n <div\n class=\"checkbox-wrapper\"\n [class.checkbox-wrapper-inline]=\"renderType === 'inline'\"\n [class.checkbox-wrapper-block]=\"renderType === 'block'\"\n [ngClass]=\"{ 'checkbox-wrapper--disabled': state.disabled }\">\n <input\n type=\"checkbox\"\n class=\"checkbox-input\"\n [disabled]=\"state.disabled\"\n [ngClass]=\"{\n 'checkbox-input--checked': state.checked,\n 'checkbox-input--indeterminate': state.indeterminate\n }\"\n (change)=\"onCheckboxChange()\"\n [attr.aria-checked]=\"state.indeterminate ? 'mixed' : state.checked\"\n [attr.aria-disabled]=\"state.disabled\"\n role=\"checkbox\" />\n {{ data.label }}\n </div>\n </label>\n <div *ngIf=\"data.children && data.children.length\" class=\"checkbox-children\">\n <s-checkbox\n *ngFor=\"let child of data.children\"\n [data]=\"child\"\n [ngModel]=\"state.children[child.label]\"\n (ngModelChange)=\"updateParent()\">\n </s-checkbox>\n </div>\n</div>\n",
|
|
3805
3812
|
providers: [
|
|
3806
3813
|
{
|
|
3807
3814
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -3809,7 +3816,7 @@ var CheckboxComponent = /** @class */ (function () {
|
|
|
3809
3816
|
multi: true,
|
|
3810
3817
|
},
|
|
3811
3818
|
],
|
|
3812
|
-
styles: [".checkbox{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:10px;margin-bottom:10px}.checkbox .checkbox-wrapper{
|
|
3819
|
+
styles: [".checkbox{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:10px;margin-bottom:10px}.checkbox .checkbox-wrapper{color:#212533;display:-ms-flexbox;display:flex;font-family:\"Open Sans\" sans-serif;font-size:14px;gap:12px}.checkbox .checkbox-wrapper-inline{-ms-flex-align:center;align-items:center}.checkbox .checkbox-wrapper-block{-ms-flex-direction:column-reverse;flex-direction:column-reverse}.checkbox .checkbox-wrapper .checkbox-input{-webkit-appearance:none;appearance:none;background-color:#fff;border:1px solid #c1c1cc;border-radius:4px;cursor:pointer;-ms-flex-negative:0;flex-shrink:0;height:20px;width:20px;position:relative}.checkbox .checkbox-wrapper .checkbox-input--checked{background-color:#428bca;border-color:#428bca}.checkbox .checkbox-wrapper .checkbox-input--checked::after{border:solid #fff;border-width:0 2px 2px 0;content:\"\";height:12px;left:6px;position:absolute;top:2px;transform:rotate(45deg);width:6px}.checkbox .checkbox-wrapper .checkbox-input--indeterminate{background-color:#428bca;border-color:#428bca}.checkbox .checkbox-wrapper .checkbox-input--indeterminate::after{background-color:#fff;content:\"\";height:2px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:10px}.checkbox .checkbox-wrapper:not(.checkbox-wrapper--disabled) .checkbox-input:not(.checkbox-input--checked):hover{background-color:#e5eaea;border-color:#ccc}.checkbox .checkbox-wrapper--disabled{opacity:.5;cursor:auto}.checkbox .checkbox-children{margin-left:20px}"]
|
|
3813
3820
|
})
|
|
3814
3821
|
], CheckboxComponent);
|
|
3815
3822
|
return CheckboxComponent;
|
|
@@ -6279,7 +6286,11 @@ var FieldSize = /** @class */ (function () {
|
|
|
6279
6286
|
var Field = /** @class */ (function () {
|
|
6280
6287
|
function Field(config) {
|
|
6281
6288
|
var _this = this;
|
|
6282
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6289
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6290
|
+
/**
|
|
6291
|
+
* 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.
|
|
6292
|
+
*/
|
|
6293
|
+
this.ignoreLabel = false;
|
|
6283
6294
|
if ((_a = config.footer) === null || _a === void 0 ? void 0 : _a.help) {
|
|
6284
6295
|
config.footer.help = __assign({ visible: function () { return true; } }, (_b = config.footer) === null || _b === void 0 ? void 0 : _b.help);
|
|
6285
6296
|
}
|
|
@@ -6307,6 +6318,7 @@ var Field = /** @class */ (function () {
|
|
|
6307
6318
|
this.CustomFieldComponentClass = config.CustomFieldComponentClass;
|
|
6308
6319
|
this.displayTimeInfoSign = (_e = config.displayTimeInfoSign) !== null && _e !== void 0 ? _e : 5000;
|
|
6309
6320
|
this.useInfoSignFocusedInputRef = (_f = config.useInfoSignFocusedInputRef) !== null && _f !== void 0 ? _f : true;
|
|
6321
|
+
this.ignoreLabel = (_g = config.ignoreLabel) !== null && _g !== void 0 ? _g : false;
|
|
6310
6322
|
}
|
|
6311
6323
|
return Field;
|
|
6312
6324
|
}());
|
|
@@ -6927,6 +6939,10 @@ var ProfilePictureField = /** @class */ (function (_super) {
|
|
|
6927
6939
|
|
|
6928
6940
|
var FormField = /** @class */ (function () {
|
|
6929
6941
|
function FormField(config) {
|
|
6942
|
+
/**
|
|
6943
|
+
* 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.
|
|
6944
|
+
*/
|
|
6945
|
+
this.ignoreLabel = false;
|
|
6930
6946
|
switch (config.type) {
|
|
6931
6947
|
case FieldType.Enum:
|
|
6932
6948
|
return new SelectField(config);
|
|
@@ -11196,7 +11212,7 @@ var DynamicFieldComponent = /** @class */ (function () {
|
|
|
11196
11212
|
DynamicFieldComponent = __decorate([
|
|
11197
11213
|
Component({
|
|
11198
11214
|
selector: "s-dynamic-field",
|
|
11199
|
-
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
|
|
11215
|
+
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"
|
|
11200
11216
|
})
|
|
11201
11217
|
], DynamicFieldComponent);
|
|
11202
11218
|
return DynamicFieldComponent;
|
|
@@ -13378,6 +13394,7 @@ var CustomFieldsComponent = /** @class */ (function () {
|
|
|
13378
13394
|
leftAddon: {
|
|
13379
13395
|
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$",
|
|
13380
13396
|
},
|
|
13397
|
+
ignoreLabel: true,
|
|
13381
13398
|
};
|
|
13382
13399
|
break;
|
|
13383
13400
|
case CustomFieldType.Double:
|
|
@@ -13387,6 +13404,7 @@ var CustomFieldsComponent = /** @class */ (function () {
|
|
|
13387
13404
|
CustomFieldClass: NumberField,
|
|
13388
13405
|
precision: 15,
|
|
13389
13406
|
scale: 2,
|
|
13407
|
+
ignoreLabel: true,
|
|
13390
13408
|
};
|
|
13391
13409
|
break;
|
|
13392
13410
|
case CustomFieldType.Integer:
|
|
@@ -13396,6 +13414,7 @@ var CustomFieldsComponent = /** @class */ (function () {
|
|
|
13396
13414
|
CustomFieldClass: NumberField,
|
|
13397
13415
|
precision: 15,
|
|
13398
13416
|
scale: 0,
|
|
13417
|
+
ignoreLabel: true,
|
|
13399
13418
|
};
|
|
13400
13419
|
break;
|
|
13401
13420
|
case CustomFieldType.Any:
|