@infrab4a/connect-angular 4.3.3-beta.3 → 4.3.3
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/esm2022/angular-connect.module.mjs +1 -1
- package/esm2022/angular-elastic-search.module.mjs +1 -1
- package/esm2022/angular-firebase-auth.module.mjs +1 -1
- package/esm2022/angular-firestore.module.mjs +1 -1
- package/esm2022/angular-hasura-graphql.module.mjs +1 -1
- package/esm2022/consts/category-structure.mjs +1 -1
- package/esm2022/consts/default-shop.const.mjs +1 -1
- package/esm2022/consts/es-config.const.mjs +1 -1
- package/esm2022/consts/firebase-const.mjs +1 -1
- package/esm2022/consts/hasura-options.const.mjs +1 -1
- package/esm2022/consts/index.mjs +1 -1
- package/esm2022/consts/storage-base-url.const.mjs +1 -1
- package/esm2022/helpers/index.mjs +1 -1
- package/esm2022/helpers/mobile-operation-system-checker.helper.mjs +1 -1
- package/esm2022/index.mjs +1 -1
- package/esm2022/services/auth.service.mjs +1 -1
- package/esm2022/services/cart.service.mjs +3 -8
- package/esm2022/services/catalog/adapters/category-structure.adapter.mjs +1 -1
- package/esm2022/services/catalog/adapters/index.mjs +1 -1
- package/esm2022/services/catalog/adapters/new-category-structure.adapter.mjs +1 -1
- package/esm2022/services/catalog/adapters/old-category-structure.adapter.mjs +1 -1
- package/esm2022/services/catalog/catalog.service.mjs +8 -8
- package/esm2022/services/catalog/category.service.mjs +1 -1
- package/esm2022/services/catalog/enums/index.mjs +1 -1
- package/esm2022/services/catalog/enums/product-sorts.enum.mjs +1 -1
- package/esm2022/services/catalog/index.mjs +1 -1
- package/esm2022/services/catalog/models/category-with-tree.model.mjs +1 -1
- package/esm2022/services/catalog/models/index.mjs +1 -1
- package/esm2022/services/catalog/types/index.mjs +1 -1
- package/esm2022/services/catalog/types/product-sort.type.mjs +1 -1
- package/esm2022/services/catalog/wishlist.service.mjs +7 -8
- package/esm2022/services/checkout-subscription.service.mjs +1 -1
- package/esm2022/services/checkout.service.mjs +1 -1
- package/esm2022/services/coupon.service.mjs +1 -1
- package/esm2022/services/helpers/index.mjs +1 -1
- package/esm2022/services/helpers/util.helper.mjs +1 -1
- package/esm2022/services/home-shop.service.mjs +1 -1
- package/esm2022/services/index.mjs +1 -1
- package/esm2022/services/order.service.mjs +1 -1
- package/esm2022/services/shipping.service.mjs +1 -1
- package/esm2022/services/types/index.mjs +1 -1
- package/esm2022/services/types/required-checkout-data.type.mjs +1 -1
- package/esm2022/services/types/required-checkout-subscription-data.type.mjs +1 -1
- package/esm2022/services/types/shipping-methods.type.mjs +1 -1
- package/esm2022/types/firebase-app-config.type.mjs +1 -1
- package/esm2022/types/index.mjs +1 -1
- package/fesm2022/infrab4a-connect-angular.mjs +13 -19
- package/fesm2022/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/services/catalog/catalog.service.d.ts +2 -2
- package/services/catalog/wishlist.service.d.ts +1 -2
|
@@ -1418,17 +1418,14 @@ class CartService {
|
|
|
1418
1418
|
},
|
|
1419
1419
|
})
|
|
1420
1420
|
.then((data) => data.data);
|
|
1421
|
-
console.log('campaigns', campaigns.length);
|
|
1422
1421
|
if (!campaigns.length)
|
|
1423
1422
|
return { ...checkout, lineItems: notGiftItems };
|
|
1424
1423
|
const elegibleCampaigns = [];
|
|
1425
1424
|
for (const campaign of campaigns) {
|
|
1426
1425
|
const today = new Date().getTime();
|
|
1427
|
-
console.log(campaign.name, campaign.startDate.getTime() <= today, campaign.endDate.getTime() >= today);
|
|
1428
1426
|
if (!(campaign.startDate.getTime() <= today) && !(campaign.endDate.getTime() >= today))
|
|
1429
1427
|
continue;
|
|
1430
1428
|
if (campaign.activeCategory) {
|
|
1431
|
-
console.log('activeCategory', campaign.activeCategory);
|
|
1432
1429
|
const categoriesCampaing = campaign.categories.map((c) => c.id.toString());
|
|
1433
1430
|
const categoriesCampaingFullTree = [];
|
|
1434
1431
|
for (const id of categoriesCampaing) {
|
|
@@ -1454,7 +1451,6 @@ class CartService {
|
|
|
1454
1451
|
}
|
|
1455
1452
|
}
|
|
1456
1453
|
}
|
|
1457
|
-
console.log('elegibleCampaigns', elegibleCampaigns.length, elegibleCampaigns);
|
|
1458
1454
|
if (!elegibleCampaigns.length)
|
|
1459
1455
|
return { ...checkout, lineItems: notGiftItems };
|
|
1460
1456
|
const campaingnProducts = [];
|
|
@@ -1471,7 +1467,6 @@ class CartService {
|
|
|
1471
1467
|
}
|
|
1472
1468
|
campaingnProducts.push(elegibleProducts);
|
|
1473
1469
|
}
|
|
1474
|
-
console.log('campaingnProducts', campaingnProducts.length, campaingnProducts);
|
|
1475
1470
|
if (!campaingnProducts.length)
|
|
1476
1471
|
return { ...checkout, lineItems: notGiftItems };
|
|
1477
1472
|
const gifts = this.giftToLineItems([].concat(...campaingnProducts));
|
|
@@ -1581,12 +1576,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1581
1576
|
}] }] });
|
|
1582
1577
|
|
|
1583
1578
|
class CatalogService {
|
|
1584
|
-
constructor(productRepository, categoryStructureAdapter, shop, productIndex
|
|
1579
|
+
constructor(productRepository, categoryRepository, categoryStructureAdapter, shop, productIndex) {
|
|
1585
1580
|
this.productRepository = productRepository;
|
|
1581
|
+
this.categoryRepository = categoryRepository;
|
|
1586
1582
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1587
1583
|
this.shop = shop;
|
|
1588
1584
|
this.productIndex = productIndex;
|
|
1589
|
-
this.categoryRepository = categoryRepository;
|
|
1590
1585
|
this.productsByTerm = {};
|
|
1591
1586
|
this.buildFilterQuery = ({ clubDiscount, brands, prices, gender, tags, rate, customOptions, }) => {
|
|
1592
1587
|
const filters = {};
|
|
@@ -1741,7 +1736,7 @@ class CatalogService {
|
|
|
1741
1736
|
return [...new Set(sorted.map(({ _source }) => _source.id))];
|
|
1742
1737
|
}));
|
|
1743
1738
|
}
|
|
1744
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token:
|
|
1739
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1745
1740
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService }); }
|
|
1746
1741
|
}
|
|
1747
1742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, decorators: [{
|
|
@@ -1749,16 +1744,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1749
1744
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1750
1745
|
type: Inject,
|
|
1751
1746
|
args: ['ProductRepository']
|
|
1747
|
+
}] }, { type: undefined, decorators: [{
|
|
1748
|
+
type: Inject,
|
|
1749
|
+
args: ['CategoryRepository']
|
|
1752
1750
|
}] }, { type: undefined, decorators: [{
|
|
1753
1751
|
type: Inject,
|
|
1754
1752
|
args: [CATEGORY_STRUCTURE]
|
|
1755
1753
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1756
1754
|
type: Inject,
|
|
1757
1755
|
args: [DEFAULT_SHOP]
|
|
1758
|
-
}] }, { type: i1$2.ProductsIndex }
|
|
1759
|
-
type: Inject,
|
|
1760
|
-
args: ['CategoryRepository']
|
|
1761
|
-
}] }] });
|
|
1756
|
+
}] }, { type: i1$2.ProductsIndex }] });
|
|
1762
1757
|
|
|
1763
1758
|
class CategoryService {
|
|
1764
1759
|
constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
|
|
@@ -1825,12 +1820,11 @@ __decorate([
|
|
|
1825
1820
|
], CategoryWithTree.prototype, "children", void 0);
|
|
1826
1821
|
|
|
1827
1822
|
class WishlistService {
|
|
1828
|
-
constructor(wishlistRepository,
|
|
1823
|
+
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, categoryRepository, productIndex) {
|
|
1829
1824
|
this.wishlistRepository = wishlistRepository;
|
|
1830
|
-
this.categoryRepository = categoryRepository;
|
|
1831
1825
|
this.shop = shop;
|
|
1832
1826
|
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
|
|
1833
|
-
this.catalogService = new CatalogService(productRepository, categoryStructureAdapter, shop, productIndex
|
|
1827
|
+
this.catalogService = new CatalogService(productRepository, categoryRepository, categoryStructureAdapter, shop, productIndex);
|
|
1834
1828
|
this.categoryService = new CategoryService(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop);
|
|
1835
1829
|
}
|
|
1836
1830
|
getCatalogService() {
|
|
@@ -1910,7 +1904,7 @@ class WishlistService {
|
|
|
1910
1904
|
}
|
|
1911
1905
|
return wishlist;
|
|
1912
1906
|
}
|
|
1913
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token:
|
|
1907
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: 'CategoryRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1914
1908
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService }); }
|
|
1915
1909
|
}
|
|
1916
1910
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, decorators: [{
|
|
@@ -1918,9 +1912,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1918
1912
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1919
1913
|
type: Inject,
|
|
1920
1914
|
args: ['WishlistRepository']
|
|
1921
|
-
}] }, { type: undefined, decorators: [{
|
|
1922
|
-
type: Inject,
|
|
1923
|
-
args: ['CategoryRepository']
|
|
1924
1915
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1925
1916
|
type: Inject,
|
|
1926
1917
|
args: [DEFAULT_SHOP]
|
|
@@ -1930,6 +1921,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImpor
|
|
|
1930
1921
|
}] }, { type: undefined, decorators: [{
|
|
1931
1922
|
type: Inject,
|
|
1932
1923
|
args: ['CategoryFilterRepository']
|
|
1924
|
+
}] }, { type: undefined, decorators: [{
|
|
1925
|
+
type: Inject,
|
|
1926
|
+
args: ['CategoryRepository']
|
|
1933
1927
|
}] }, { type: i1$2.ProductsIndex }] });
|
|
1934
1928
|
|
|
1935
1929
|
class CheckoutSubscriptionService {
|