@seniorsistemas/angular-components 14.7.0 → 14.7.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 +6 -18
- 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/table/table-column/table-columns.component.d.ts +1 -1
- package/esm2015/components/table/table-column/table-columns.component.js +9 -18
- package/esm5/components/table/table-column/table-columns.component.js +9 -19
- package/fesm2015/seniorsistemas-angular-components.js +6 -17
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +6 -18
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -3892,7 +3892,7 @@
|
|
|
3892
3892
|
return uninformed;
|
|
3893
3893
|
}
|
|
3894
3894
|
else {
|
|
3895
|
-
var numberConfigs = __assign(__assign({}, locale.number), { scale: column.scale ? _this.getColumnScale(column.scale) : locale.number.scale });
|
|
3895
|
+
var numberConfigs = __assign(__assign({}, locale.number), { scale: column.scale ? _this.getColumnScale(column.scale) : locale.number.scale, prefix: locale.number.currencySymbol + " " });
|
|
3896
3896
|
switch (column.type) {
|
|
3897
3897
|
case exports.EnumColumnFieldType.ENUM:
|
|
3898
3898
|
if (column.badgeConfigs && column.badgeConfigs.length) {
|
|
@@ -3900,7 +3900,7 @@
|
|
|
3900
3900
|
}
|
|
3901
3901
|
return _this.translate.instant(column.enumPrefix + attributeValue.toString().toLowerCase());
|
|
3902
3902
|
case exports.EnumColumnFieldType.CURRENCY:
|
|
3903
|
-
return
|
|
3903
|
+
return ng2CurrencyMask.applyMask(attributeValue, numberConfigs, _this.isNumber(attributeValue));
|
|
3904
3904
|
case exports.EnumColumnFieldType.DATE:
|
|
3905
3905
|
var dateFormat = column.dateFormat ? column.dateFormat : locale.calendar.dateFormat;
|
|
3906
3906
|
return moment_(attributeValue).format(dateFormat);
|
|
@@ -3911,7 +3911,8 @@
|
|
|
3911
3911
|
case exports.EnumColumnFieldType.STRING:
|
|
3912
3912
|
return attributeValue;
|
|
3913
3913
|
case exports.EnumColumnFieldType.NUMBER:
|
|
3914
|
-
|
|
3914
|
+
numberConfigs.prefix = "";
|
|
3915
|
+
return ng2CurrencyMask.applyMask(attributeValue, numberConfigs, _this.isNumber(attributeValue));
|
|
3915
3916
|
case exports.EnumColumnFieldType.TOKENS:
|
|
3916
3917
|
return _this.getTokens(attributeValue);
|
|
3917
3918
|
}
|
|
@@ -3966,21 +3967,8 @@
|
|
|
3966
3967
|
return tooltip;
|
|
3967
3968
|
}
|
|
3968
3969
|
};
|
|
3969
|
-
TableColumnsComponent.prototype.
|
|
3970
|
-
|
|
3971
|
-
var scale = options.scale, thousandsSeparator = options.thousandsSeparator, decimalSeparator = options.decimalSeparator;
|
|
3972
|
-
var currencySymbol = useCurrencySymbol ? options.currencySymbol : "";
|
|
3973
|
-
var rawValue = Number(value ? value : 0).toFixed(scale);
|
|
3974
|
-
var onlyNumbers = rawValue.replace(/[^0-9]/g, "");
|
|
3975
|
-
var integerPart = onlyNumbers
|
|
3976
|
-
.slice(0, onlyNumbers.length - scale)
|
|
3977
|
-
.replace(/^0*/g, "")
|
|
3978
|
-
.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator) || "0";
|
|
3979
|
-
var decimalPart = onlyNumbers.slice(onlyNumbers.length - scale);
|
|
3980
|
-
var newValue = scale ? integerPart + decimalSeparator + decimalPart : integerPart;
|
|
3981
|
-
var isZero = !Number(onlyNumbers);
|
|
3982
|
-
var operator = rawValue.includes("-") && !isZero ? "-" : "";
|
|
3983
|
-
return "" + operator + currencySymbol + " " + newValue;
|
|
3970
|
+
TableColumnsComponent.prototype.isNumber = function (value) {
|
|
3971
|
+
return !(new BigNumber__default(value).isNaN());
|
|
3984
3972
|
};
|
|
3985
3973
|
TableColumnsComponent.prototype.getTokens = function (values) {
|
|
3986
3974
|
if (!this.isArray(values))
|