@bookipi/htmlgenerator 1.1.23-alpha2 → 1.1.23-alpha4
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/dist/index.js +26 -11
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +26 -11
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1601,15 +1601,23 @@ var numberFormat = {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
};
|
|
1603
1603
|
|
|
1604
|
-
Number.prototype.formatMoney = function (c, d, t) {
|
|
1605
|
-
var
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1604
|
+
Number.prototype.formatMoney = function (c, d, t, forcePositive) {
|
|
1605
|
+
var _this = this;
|
|
1606
|
+
|
|
1607
|
+
if (forcePositive === void 0) {
|
|
1608
|
+
forcePositive = false;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
return function (c, d, t) {
|
|
1612
|
+
var n = forcePositive ? Math.abs(_this) : _this,
|
|
1613
|
+
c = isNaN(c = Math.abs(c)) ? 2 : c,
|
|
1614
|
+
d = d == undefined ? "." : d,
|
|
1615
|
+
t = t == undefined ? "," : t,
|
|
1616
|
+
s = n < 0 ? "-" : "",
|
|
1617
|
+
i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
|
|
1618
|
+
j = (j = i.length) > 3 ? j % 3 : 0;
|
|
1619
|
+
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
|
|
1620
|
+
}(c, d, t);
|
|
1613
1621
|
};
|
|
1614
1622
|
|
|
1615
1623
|
var currencyFormat = function currencyFormat(value, currency, lang, cFormat, rtl, removeDecimal, showLongSymbol) {
|
|
@@ -1630,7 +1638,7 @@ var currencyFormat = function currencyFormat(value, currency, lang, cFormat, rtl
|
|
|
1630
1638
|
}
|
|
1631
1639
|
|
|
1632
1640
|
var format = numberFormat[numberFormatObj];
|
|
1633
|
-
var formattedValue = parseFloat(value).formatMoney(decimal, format.decimal, format.group);
|
|
1641
|
+
var formattedValue = parseFloat(value).formatMoney(decimal, format.decimal, format.group, true);
|
|
1634
1642
|
|
|
1635
1643
|
if (rtl && currencies[currencyName].rtl) {
|
|
1636
1644
|
formattedValue = formattedValue.split("").reverse().join("");
|
|
@@ -1638,7 +1646,7 @@ var currencyFormat = function currencyFormat(value, currency, lang, cFormat, rtl
|
|
|
1638
1646
|
|
|
1639
1647
|
formattedValue = format.format.replace("###", formattedValue);
|
|
1640
1648
|
formattedValue = formattedValue.replace("$$", symbol);
|
|
1641
|
-
return formattedValue;
|
|
1649
|
+
return (value < 0 ? "-" : "") + formattedValue;
|
|
1642
1650
|
};
|
|
1643
1651
|
|
|
1644
1652
|
var FormatCurrency = function FormatCurrency(value, currency, language, cFormat) {
|
|
@@ -9286,6 +9294,13 @@ var defaultLang = {
|
|
|
9286
9294
|
}
|
|
9287
9295
|
};
|
|
9288
9296
|
|
|
9297
|
+
Object.fromEntries = Object.fromEntries || function (arr) {
|
|
9298
|
+
return arr.reduce(function (acc, curr) {
|
|
9299
|
+
acc[curr[0]] = curr[1];
|
|
9300
|
+
return acc;
|
|
9301
|
+
}, {});
|
|
9302
|
+
};
|
|
9303
|
+
|
|
9289
9304
|
function sanitize(obj) {
|
|
9290
9305
|
var object = obj;
|
|
9291
9306
|
|