@infrab4a/connect 3.13.2 → 3.13.3-beta.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/infrab4a-connect.umd.js +19 -13
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/helpers/RoundProdutcPriceHelper.d.ts +4 -0
- package/domain/catalog/helpers/index.d.ts +1 -0
- package/domain/catalog/index.d.ts +1 -0
- package/esm2015/domain/catalog/helpers/RoundProdutcPriceHelper.js +15 -0
- package/esm2015/domain/catalog/helpers/index.js +2 -0
- package/esm2015/domain/catalog/index.js +2 -1
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +4 -4
- package/esm2015/utils/index.js +1 -2
- package/fesm2015/infrab4a-connect.js +16 -13
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/package.json +2 -2
- package/utils/index.d.ts +0 -1
- package/esm2015/utils/round-product-price.js +0 -12
- package/utils/round-product-price.d.ts +0 -2
|
@@ -856,17 +856,6 @@
|
|
|
856
856
|
return date;
|
|
857
857
|
};
|
|
858
858
|
|
|
859
|
-
var roundProductPrices = function (product) {
|
|
860
|
-
product.price.price = Number(product.price.price.toFixed(2));
|
|
861
|
-
product.price.fullPrice = Number(product.price.fullPrice.toFixed(2));
|
|
862
|
-
if (product.price.subscriberPrice) {
|
|
863
|
-
product.price.subscriberPrice = Number(product.price.subscriberPrice.toFixed(2));
|
|
864
|
-
}
|
|
865
|
-
if (product instanceof LineItem && product.pricePaid) {
|
|
866
|
-
product.pricePaid = Number(product.pricePaid.toFixed(2));
|
|
867
|
-
}
|
|
868
|
-
};
|
|
869
|
-
|
|
870
859
|
exports.CheckoutTypes = void 0;
|
|
871
860
|
(function (CheckoutTypes) {
|
|
872
861
|
CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
|
|
@@ -1634,6 +1623,23 @@
|
|
|
1634
1623
|
__metadata("design:type", Coupon)
|
|
1635
1624
|
], CheckoutSubscription.prototype, "coupon", void 0);
|
|
1636
1625
|
|
|
1626
|
+
var RoundProductPricesHelper = /** @class */ (function () {
|
|
1627
|
+
function RoundProductPricesHelper() {
|
|
1628
|
+
}
|
|
1629
|
+
RoundProductPricesHelper.roundProductPrices = function (product) {
|
|
1630
|
+
product.price.price = Number(product.price.price.toFixed(2));
|
|
1631
|
+
product.price.fullPrice = Number(product.price.fullPrice.toFixed(2));
|
|
1632
|
+
if (product.price.subscriberPrice) {
|
|
1633
|
+
product.price.subscriberPrice = Number(product.price.subscriberPrice.toFixed(2));
|
|
1634
|
+
}
|
|
1635
|
+
if (product instanceof LineItem && product.pricePaid) {
|
|
1636
|
+
product.pricePaid = Number(product.pricePaid.toFixed(2));
|
|
1637
|
+
}
|
|
1638
|
+
return product;
|
|
1639
|
+
};
|
|
1640
|
+
return RoundProductPricesHelper;
|
|
1641
|
+
}());
|
|
1642
|
+
|
|
1637
1643
|
exports.FilterType = void 0;
|
|
1638
1644
|
(function (FilterType) {
|
|
1639
1645
|
FilterType["ACCESSORY_IMPORTANCE"] = "accessoryImportance";
|
|
@@ -5028,7 +5034,7 @@
|
|
|
5028
5034
|
case 1:
|
|
5029
5035
|
result = _c.sent();
|
|
5030
5036
|
product = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.shift();
|
|
5031
|
-
roundProductPrices(product);
|
|
5037
|
+
RoundProductPricesHelper.roundProductPrices(product);
|
|
5032
5038
|
return [2 /*return*/, product];
|
|
5033
5039
|
}
|
|
5034
5040
|
});
|
|
@@ -5734,6 +5740,7 @@
|
|
|
5734
5740
|
exports.Register = Register;
|
|
5735
5741
|
exports.RegisterFirebaseAuthService = RegisterFirebaseAuthService;
|
|
5736
5742
|
exports.RequiredArgumentError = RequiredArgumentError;
|
|
5743
|
+
exports.RoundProductPricesHelper = RoundProductPricesHelper;
|
|
5737
5744
|
exports.ShippingMethod = ShippingMethod;
|
|
5738
5745
|
exports.ShopMenu = ShopMenu;
|
|
5739
5746
|
exports.ShopMenuFirestoreRepository = ShopMenuFirestoreRepository;
|
|
@@ -5763,7 +5770,6 @@
|
|
|
5763
5770
|
exports.WeakPasswordError = WeakPasswordError;
|
|
5764
5771
|
exports.isUUID = isUUID;
|
|
5765
5772
|
exports.parseDateTime = parseDateTime;
|
|
5766
|
-
exports.roundProductPrices = roundProductPrices;
|
|
5767
5773
|
exports.withCreateFirestore = withCreateFirestore;
|
|
5768
5774
|
exports.withCreateHasuraGraphQL = withCreateHasuraGraphQL;
|
|
5769
5775
|
exports.withCrudFirestore = withCrudFirestore;
|