@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
|
@@ -3919,6 +3919,13 @@
|
|
|
3919
3919
|
this._onChange(this.state);
|
|
3920
3920
|
this._onTouched();
|
|
3921
3921
|
};
|
|
3922
|
+
Object.defineProperty(CheckboxComponent.prototype, "renderType", {
|
|
3923
|
+
get: function () {
|
|
3924
|
+
return this.data.renderType || "inline";
|
|
3925
|
+
},
|
|
3926
|
+
enumerable: true,
|
|
3927
|
+
configurable: true
|
|
3928
|
+
});
|
|
3922
3929
|
CheckboxComponent.prototype._toggleChildrenCheck = function (item, state, checked) {
|
|
3923
3930
|
var _this = this;
|
|
3924
3931
|
var _a;
|
|
@@ -3946,7 +3953,7 @@
|
|
|
3946
3953
|
CheckboxComponent = CheckboxComponent_1 = __decorate([
|
|
3947
3954
|
core.Component({
|
|
3948
3955
|
selector: "s-checkbox",
|
|
3949
|
-
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",
|
|
3956
|
+
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",
|
|
3950
3957
|
providers: [
|
|
3951
3958
|
{
|
|
3952
3959
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -3954,7 +3961,7 @@
|
|
|
3954
3961
|
multi: true,
|
|
3955
3962
|
},
|
|
3956
3963
|
],
|
|
3957
|
-
styles: [".checkbox{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:10px;margin-bottom:10px}.checkbox .checkbox-wrapper{
|
|
3964
|
+
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}"]
|
|
3958
3965
|
})
|
|
3959
3966
|
], CheckboxComponent);
|
|
3960
3967
|
return CheckboxComponent;
|
|
@@ -6424,7 +6431,11 @@
|
|
|
6424
6431
|
var Field = /** @class */ (function () {
|
|
6425
6432
|
function Field(config) {
|
|
6426
6433
|
var _this = this;
|
|
6427
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6434
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6435
|
+
/**
|
|
6436
|
+
* 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.
|
|
6437
|
+
*/
|
|
6438
|
+
this.ignoreLabel = false;
|
|
6428
6439
|
if ((_a = config.footer) === null || _a === void 0 ? void 0 : _a.help) {
|
|
6429
6440
|
config.footer.help = __assign({ visible: function () { return true; } }, (_b = config.footer) === null || _b === void 0 ? void 0 : _b.help);
|
|
6430
6441
|
}
|
|
@@ -6452,6 +6463,7 @@
|
|
|
6452
6463
|
this.CustomFieldComponentClass = config.CustomFieldComponentClass;
|
|
6453
6464
|
this.displayTimeInfoSign = (_e = config.displayTimeInfoSign) !== null && _e !== void 0 ? _e : 5000;
|
|
6454
6465
|
this.useInfoSignFocusedInputRef = (_f = config.useInfoSignFocusedInputRef) !== null && _f !== void 0 ? _f : true;
|
|
6466
|
+
this.ignoreLabel = (_g = config.ignoreLabel) !== null && _g !== void 0 ? _g : false;
|
|
6455
6467
|
}
|
|
6456
6468
|
return Field;
|
|
6457
6469
|
}());
|
|
@@ -7072,6 +7084,10 @@
|
|
|
7072
7084
|
|
|
7073
7085
|
var FormField = /** @class */ (function () {
|
|
7074
7086
|
function FormField(config) {
|
|
7087
|
+
/**
|
|
7088
|
+
* 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.
|
|
7089
|
+
*/
|
|
7090
|
+
this.ignoreLabel = false;
|
|
7075
7091
|
switch (config.type) {
|
|
7076
7092
|
case exports.FieldType.Enum:
|
|
7077
7093
|
return new SelectField(config);
|
|
@@ -11341,7 +11357,7 @@
|
|
|
11341
11357
|
DynamicFieldComponent = __decorate([
|
|
11342
11358
|
core.Component({
|
|
11343
11359
|
selector: "s-dynamic-field",
|
|
11344
|
-
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
|
|
11360
|
+
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"
|
|
11345
11361
|
})
|
|
11346
11362
|
], DynamicFieldComponent);
|
|
11347
11363
|
return DynamicFieldComponent;
|
|
@@ -13523,6 +13539,7 @@
|
|
|
13523
13539
|
leftAddon: {
|
|
13524
13540
|
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$",
|
|
13525
13541
|
},
|
|
13542
|
+
ignoreLabel: true,
|
|
13526
13543
|
};
|
|
13527
13544
|
break;
|
|
13528
13545
|
case CustomFieldType.Double:
|
|
@@ -13532,6 +13549,7 @@
|
|
|
13532
13549
|
CustomFieldClass: NumberField,
|
|
13533
13550
|
precision: 15,
|
|
13534
13551
|
scale: 2,
|
|
13552
|
+
ignoreLabel: true,
|
|
13535
13553
|
};
|
|
13536
13554
|
break;
|
|
13537
13555
|
case CustomFieldType.Integer:
|
|
@@ -13541,6 +13559,7 @@
|
|
|
13541
13559
|
CustomFieldClass: NumberField,
|
|
13542
13560
|
precision: 15,
|
|
13543
13561
|
scale: 0,
|
|
13562
|
+
ignoreLabel: true,
|
|
13544
13563
|
};
|
|
13545
13564
|
break;
|
|
13546
13565
|
case CustomFieldType.Any:
|