@trafilea/afrodita-components 6.7.0 → 6.8.0
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/build/index.esm.js +5 -9
- package/build/index.esm.js.map +1 -1
- package/build/index.js +5 -9
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3120,17 +3120,13 @@ var AssetsProvider = function (_a) {
|
|
|
3120
3120
|
};
|
|
3121
3121
|
var useThemeAssets = function () { return React$2.useContext(AssetsContext); };
|
|
3122
3122
|
|
|
3123
|
-
var localeOverrideByCurrency = {
|
|
3124
|
-
AUD: 'am-AM',
|
|
3125
|
-
};
|
|
3126
3123
|
var formatPrice = function (value, _a) {
|
|
3127
|
-
var _b
|
|
3128
|
-
var
|
|
3129
|
-
var
|
|
3124
|
+
var _b;
|
|
3125
|
+
var _c = _a === void 0 ? {} : _a, _d = _c.locale, locale = _d === void 0 ? 'en-US' : _d, _e = _c.currency, currency = _e === void 0 ? 'USD' : _e;
|
|
3126
|
+
var _f = value.toFixed(3).split('.'), integer = _f[0], fraction = _f[1];
|
|
3130
3127
|
// this prevents `Intl.NumberFormat` from rounding the number
|
|
3131
3128
|
var valueToFormat = parseFloat("".concat(integer, ".").concat((_b = fraction === null || fraction === void 0 ? void 0 : fraction.slice(0, 2)) !== null && _b !== void 0 ? _b : 0));
|
|
3132
|
-
|
|
3133
|
-
return new Intl.NumberFormat(overridedLocale, {
|
|
3129
|
+
return new Intl.NumberFormat(locale, {
|
|
3134
3130
|
style: 'currency',
|
|
3135
3131
|
currency: currency,
|
|
3136
3132
|
maximumFractionDigits: 3,
|
|
@@ -5515,7 +5511,7 @@ var PriceLabelV2 = function (_a) {
|
|
|
5515
5511
|
var isOriginalPrice = originalPrice && isDiffFinalAndOriginalPrice;
|
|
5516
5512
|
var isDiscount = discount && isDiffFinalAndOriginalPrice;
|
|
5517
5513
|
var isClubOffer = clubOffer && isDiffFinalAndOriginalPrice;
|
|
5518
|
-
var supportedCurrencies = ['
|
|
5514
|
+
var supportedCurrencies = ['A$', 'CA$', '£'];
|
|
5519
5515
|
var currencySymbol = '$';
|
|
5520
5516
|
if (typeof productFinalPrice === 'string') {
|
|
5521
5517
|
supportedCurrencies.forEach(function (availableCurrency) {
|