@seniorsistemas/angular-components 17.8.12 → 17.8.14
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 +54 -24
- 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/components/fields/index.d.ts +19 -0
- package/components/dynamic-form/configurations/fields/decimal-field.d.ts +2 -2
- package/components/dynamic-form/configurations/fields/field.d.ts +4 -0
- package/components/dynamic-form/configurations/fields/number-field.d.ts +2 -0
- package/components/navigation-button/index.d.ts +1 -1
- package/components/navigation-button/models/index.d.ts +2 -0
- package/components/navigation-button/models/navigation-button-step-changed-info.d.ts +5 -0
- package/components/navigation-button/navigation-button.component.d.ts +9 -6
- package/esm2015/components/custom-fields/custom-fields.component.js +29 -21
- package/esm2015/components/dynamic-form/components/fields/index.js +20 -0
- package/esm2015/components/dynamic-form/configurations/fields/decimal-field.js +3 -2
- package/esm2015/components/dynamic-form/configurations/fields/field.js +3 -1
- package/esm2015/components/dynamic-form/configurations/fields/number-field.js +2 -1
- package/esm2015/components/dynamic-form/dynamic-form.js +1 -1
- package/esm2015/components/navigation-button/index.js +1 -1
- package/esm2015/components/navigation-button/models/index.js +1 -0
- package/esm2015/components/navigation-button/models/navigation-button-step-changed-info.js +1 -0
- package/esm2015/components/navigation-button/navigation-button.component.js +29 -10
- package/esm5/components/custom-fields/custom-fields.component.js +26 -18
- package/esm5/components/dynamic-form/components/fields/index.js +20 -0
- package/esm5/components/dynamic-form/configurations/fields/decimal-field.js +3 -2
- package/esm5/components/dynamic-form/configurations/fields/field.js +3 -1
- package/esm5/components/dynamic-form/configurations/fields/number-field.js +2 -1
- package/esm5/components/dynamic-form/dynamic-form.js +1 -1
- package/esm5/components/navigation-button/index.js +1 -1
- package/esm5/components/navigation-button/models/index.js +1 -0
- package/esm5/components/navigation-button/models/navigation-button-step-changed-info.js +1 -0
- package/esm5/components/navigation-button/navigation-button.component.js +30 -11
- package/fesm2015/seniorsistemas-angular-components.js +56 -26
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +54 -24
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -4597,6 +4597,8 @@
|
|
|
4597
4597
|
this.gridClass = Object.keys(this.size).map(function (key) { return "ui-" + key + "-" + _this.size[key]; });
|
|
4598
4598
|
this.defaultValue = config.defaultValue;
|
|
4599
4599
|
this.representedBy = config.representedBy;
|
|
4600
|
+
this.CustomFieldClass = config.CustomFieldClass;
|
|
4601
|
+
this.CustomFieldComponentClass = config.CustomFieldComponentClass;
|
|
4600
4602
|
}
|
|
4601
4603
|
return Field;
|
|
4602
4604
|
}());
|
|
@@ -4919,6 +4921,7 @@
|
|
|
4919
4921
|
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
4920
4922
|
_this.browserAutocomplete = config.browserAutocomplete;
|
|
4921
4923
|
_this.precision = config.precision;
|
|
4924
|
+
_this.scale = config.scale;
|
|
4922
4925
|
_this.alignTo = config.alignTo || exports.NumberAlignmentOption.LEFT;
|
|
4923
4926
|
_this.mask = config.mask;
|
|
4924
4927
|
_this.leftAddon = config.leftAddon;
|
|
@@ -4938,10 +4941,11 @@
|
|
|
4938
4941
|
var DecimalField = /** @class */ (function (_super) {
|
|
4939
4942
|
__extends(DecimalField, _super);
|
|
4940
4943
|
function DecimalField(config) {
|
|
4944
|
+
var _a;
|
|
4941
4945
|
var _this = _super.call(this, config) || this;
|
|
4942
4946
|
_this.numberLocaleOptions = config.numberLocaleOptions;
|
|
4943
4947
|
_this.alignTo = config.alignTo || exports.NumberAlignmentOption.RIGHT;
|
|
4944
|
-
_this.scale = config.scale
|
|
4948
|
+
_this.scale = typeof config.scale === "function" ? config.scale() : (_a = config.scale) !== null && _a !== void 0 ? _a : 2;
|
|
4945
4949
|
return _this;
|
|
4946
4950
|
}
|
|
4947
4951
|
return DecimalField;
|
|
@@ -11503,7 +11507,7 @@
|
|
|
11503
11507
|
CustomFieldType.Date,
|
|
11504
11508
|
CustomFieldType.DateTime,
|
|
11505
11509
|
CustomFieldType.LocalDateTime,
|
|
11506
|
-
CustomFieldType.Time
|
|
11510
|
+
CustomFieldType.Time,
|
|
11507
11511
|
];
|
|
11508
11512
|
var validators = [];
|
|
11509
11513
|
if (validationRegex && !asIsTypes.includes(fieldType))
|
|
@@ -11651,7 +11655,9 @@
|
|
|
11651
11655
|
CustomFieldsComponent.prototype.createFilesIfSetFormValuesAfterInit = function () {
|
|
11652
11656
|
var _this = this;
|
|
11653
11657
|
if (!this.hasUploaded) {
|
|
11654
|
-
this.fields
|
|
11658
|
+
this.fields
|
|
11659
|
+
.filter(function (field) { return field.type === exports.FieldType.Blob; })
|
|
11660
|
+
.forEach(function (field) {
|
|
11655
11661
|
if (_this.formGroup.get(field.name).value)
|
|
11656
11662
|
_this.createBlobToFileUpload(field);
|
|
11657
11663
|
});
|
|
@@ -11695,10 +11701,7 @@
|
|
|
11695
11701
|
return parsedValues;
|
|
11696
11702
|
};
|
|
11697
11703
|
CustomFieldsComponent.prototype.isTypeNumberOrEnum = function (type) {
|
|
11698
|
-
var numberOrEnum = [
|
|
11699
|
-
exports.FieldType.Number,
|
|
11700
|
-
exports.FieldType.Enum
|
|
11701
|
-
];
|
|
11704
|
+
var numberOrEnum = [exports.FieldType.Number, exports.FieldType.Enum];
|
|
11702
11705
|
return numberOrEnum.includes(type);
|
|
11703
11706
|
};
|
|
11704
11707
|
CustomFieldsComponent.prototype.getFormField = function (field, localeOptions) {
|
|
@@ -11718,7 +11721,11 @@
|
|
|
11718
11721
|
break;
|
|
11719
11722
|
case CustomFieldType.Money:
|
|
11720
11723
|
parameters = {
|
|
11721
|
-
type: exports.FieldType.
|
|
11724
|
+
type: exports.FieldType.Custom,
|
|
11725
|
+
CustomFieldComponentClass: NumberFieldComponent,
|
|
11726
|
+
CustomFieldClass: NumberField,
|
|
11727
|
+
precision: 15,
|
|
11728
|
+
scale: 2,
|
|
11722
11729
|
leftAddon: {
|
|
11723
11730
|
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$",
|
|
11724
11731
|
},
|
|
@@ -11726,18 +11733,22 @@
|
|
|
11726
11733
|
break;
|
|
11727
11734
|
case CustomFieldType.Double:
|
|
11728
11735
|
parameters = {
|
|
11729
|
-
type: exports.FieldType.
|
|
11736
|
+
type: exports.FieldType.Custom,
|
|
11737
|
+
CustomFieldComponentClass: NumberFieldComponent,
|
|
11738
|
+
CustomFieldClass: NumberField,
|
|
11739
|
+
precision: 15,
|
|
11740
|
+
scale: 2,
|
|
11730
11741
|
};
|
|
11731
11742
|
break;
|
|
11732
11743
|
case CustomFieldType.Integer:
|
|
11733
11744
|
parameters = {
|
|
11734
|
-
type: exports.FieldType.
|
|
11735
|
-
|
|
11745
|
+
type: exports.FieldType.Custom,
|
|
11746
|
+
CustomFieldComponentClass: NumberFieldComponent,
|
|
11747
|
+
CustomFieldClass: NumberField,
|
|
11748
|
+
precision: 15,
|
|
11749
|
+
scale: 0,
|
|
11736
11750
|
};
|
|
11737
11751
|
break;
|
|
11738
|
-
default:
|
|
11739
|
-
parameters = {};
|
|
11740
|
-
break;
|
|
11741
11752
|
}
|
|
11742
11753
|
return new FormField(__assign({ name: field.id, label: field.customization.label, tooltip: field.customization.tooltip, infoSign: field.customization.infoSign, type: field.type, mask: field.customization.mask, required: function () { return field.customization.mandatory; }, calendarOptions: localeOptions.calendar, currencyOptions: localeOptions.number }, parameters));
|
|
11743
11754
|
};
|
|
@@ -11785,7 +11796,7 @@
|
|
|
11785
11796
|
onDownloadFile: function (event, formfield) {
|
|
11786
11797
|
_this.downloadFile(event, formfield);
|
|
11787
11798
|
},
|
|
11788
|
-
showFileUploadDate: this.showFileUploadDate
|
|
11799
|
+
showFileUploadDate: this.showFileUploadDate,
|
|
11789
11800
|
};
|
|
11790
11801
|
};
|
|
11791
11802
|
/**
|
|
@@ -14888,7 +14899,9 @@
|
|
|
14888
14899
|
}());
|
|
14889
14900
|
|
|
14890
14901
|
var NavigationButtonComponent = /** @class */ (function () {
|
|
14891
|
-
function NavigationButtonComponent() {
|
|
14902
|
+
function NavigationButtonComponent(changeDetectorRef) {
|
|
14903
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
14904
|
+
this.changeOnInit = false;
|
|
14892
14905
|
this.stepChanged = new core.EventEmitter();
|
|
14893
14906
|
this.currentIndex = 0;
|
|
14894
14907
|
this.isDisabled = false;
|
|
@@ -14896,14 +14909,25 @@
|
|
|
14896
14909
|
}
|
|
14897
14910
|
NavigationButtonComponent_1 = NavigationButtonComponent;
|
|
14898
14911
|
NavigationButtonComponent.prototype.ngOnInit = function () {
|
|
14899
|
-
var _this = this;
|
|
14900
|
-
var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
|
|
14901
|
-
this.currentIndex = index !== -1 ? index : 0;
|
|
14902
|
-
this.stepChanged.emit({
|
|
14903
|
-
previous: undefined,
|
|
14904
|
-
current: this.steps[this.currentIndex],
|
|
14905
|
-
});
|
|
14906
14912
|
this._createTieredMenuItems();
|
|
14913
|
+
if (this.changeOnInit) {
|
|
14914
|
+
this.stepChanged.emit({
|
|
14915
|
+
previous: undefined,
|
|
14916
|
+
current: this.steps[this.currentIndex],
|
|
14917
|
+
});
|
|
14918
|
+
}
|
|
14919
|
+
};
|
|
14920
|
+
NavigationButtonComponent.prototype.ngAfterViewInit = function () {
|
|
14921
|
+
this._setDefaultValue();
|
|
14922
|
+
};
|
|
14923
|
+
NavigationButtonComponent.prototype._setDefaultValue = function () {
|
|
14924
|
+
var _this = this;
|
|
14925
|
+
if (this.defaultValue) {
|
|
14926
|
+
this._value = this.defaultValue;
|
|
14927
|
+
var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
|
|
14928
|
+
this.currentIndex = index !== -1 ? index : 0;
|
|
14929
|
+
this.changeDetectorRef.detectChanges();
|
|
14930
|
+
}
|
|
14907
14931
|
};
|
|
14908
14932
|
NavigationButtonComponent.prototype.writeValue = function (value) {
|
|
14909
14933
|
var _this = this;
|
|
@@ -14949,11 +14973,14 @@
|
|
|
14949
14973
|
this.steps.forEach(function (step) {
|
|
14950
14974
|
_this.tieredMenuItems.push({
|
|
14951
14975
|
label: step.label,
|
|
14952
|
-
command: function () { return _this.currentIndex = _this.steps.findIndex(function (s) { return s === step; }); },
|
|
14976
|
+
command: function () { return (_this.currentIndex = _this.steps.findIndex(function (s) { return s === step; })); },
|
|
14953
14977
|
});
|
|
14954
14978
|
});
|
|
14955
14979
|
};
|
|
14956
14980
|
var NavigationButtonComponent_1;
|
|
14981
|
+
NavigationButtonComponent.ctorParameters = function () { return [
|
|
14982
|
+
{ type: core.ChangeDetectorRef }
|
|
14983
|
+
]; };
|
|
14957
14984
|
__decorate([
|
|
14958
14985
|
core.Input()
|
|
14959
14986
|
], NavigationButtonComponent.prototype, "steps", void 0);
|
|
@@ -14963,6 +14990,9 @@
|
|
|
14963
14990
|
__decorate([
|
|
14964
14991
|
core.Input()
|
|
14965
14992
|
], NavigationButtonComponent.prototype, "tooltip", void 0);
|
|
14993
|
+
__decorate([
|
|
14994
|
+
core.Input()
|
|
14995
|
+
], NavigationButtonComponent.prototype, "changeOnInit", void 0);
|
|
14966
14996
|
__decorate([
|
|
14967
14997
|
core.Output()
|
|
14968
14998
|
], NavigationButtonComponent.prototype, "stepChanged", void 0);
|