@pepperi-addons/ngx-lib 0.3.15-beta.24 → 0.3.15-beta.25
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/pepperi-addons-ngx-lib.umd.js +19 -12
- package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
- package/core/common/services/utilities.service.d.ts +1 -1
- package/esm2015/core/common/services/utilities.service.js +21 -14
- package/fesm2015/pepperi-addons-ngx-lib.js +20 -13
- package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
- package/package.json +1 -1
|
@@ -863,13 +863,13 @@
|
|
|
863
863
|
document.createElementNS('http://www.w3.org/2000/svg', 'path'));
|
|
864
864
|
};
|
|
865
865
|
PepUtilitiesService.prototype.formatPercent = function (value, digitsInfo) {
|
|
866
|
-
if (digitsInfo === void 0) { digitsInfo = '1.
|
|
866
|
+
if (digitsInfo === void 0) { digitsInfo = '1.0-2'; }
|
|
867
867
|
var number = this.coerceNumberProperty(value);
|
|
868
868
|
if (number === 0) {
|
|
869
869
|
return '0';
|
|
870
870
|
}
|
|
871
871
|
else {
|
|
872
|
-
return i1$1.formatPercent(
|
|
872
|
+
return i1$1.formatPercent(number / 100, this.culture, digitsInfo);
|
|
873
873
|
}
|
|
874
874
|
};
|
|
875
875
|
PepUtilitiesService.prototype.formatCurrency = function (value, currencySign, digitsInfo) {
|
|
@@ -931,16 +931,23 @@
|
|
|
931
931
|
*/
|
|
932
932
|
PepUtilitiesService.prototype.formatDuration = function (value, options) {
|
|
933
933
|
if (options === void 0) { options = { leading: true }; }
|
|
934
|
-
var
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
934
|
+
var isNumber = coercion._isNumberValue(value);
|
|
935
|
+
if (!isNumber) {
|
|
936
|
+
return value;
|
|
937
|
+
}
|
|
938
|
+
else {
|
|
939
|
+
var number = this.coerceNumberProperty(value);
|
|
940
|
+
var leading = options && options.leading;
|
|
941
|
+
var unsignedMs = number < 0 ? -number : number;
|
|
942
|
+
var sign = number <= -1000 ? '-' : '';
|
|
943
|
+
var t = this.parseMs(unsignedMs);
|
|
944
|
+
var seconds = this.addZero(t.seconds);
|
|
945
|
+
if (t.days)
|
|
946
|
+
return sign + t.days + ':' + this.addZero(t.hours) + ':' + this.addZero(t.minutes) + ':' + seconds;
|
|
947
|
+
if (t.hours)
|
|
948
|
+
return sign + (leading ? this.addZero(t.hours) : t.hours) + ':' + this.addZero(t.minutes) + ':' + seconds;
|
|
949
|
+
return sign + (leading ? this.addZero(t.minutes) : t.minutes) + ':' + seconds;
|
|
950
|
+
}
|
|
944
951
|
};
|
|
945
952
|
PepUtilitiesService.prototype.incrementNumber = function (value) {
|
|
946
953
|
var numberValue = this.coerceNumberProperty(value);
|