@infrab4a/connect-angular 4.1.7-beta.0 → 4.2.0-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/angular-connect.module.d.ts +5 -6
- package/angular-firebase-auth.module.d.ts +3 -2
- package/angular-firestore.module.d.ts +4 -3
- package/angular-hasura-graphql.module.d.ts +1 -1
- package/esm2020/angular-connect.module.mjs +4 -35
- package/esm2020/angular-firebase-auth.module.mjs +21 -6
- package/esm2020/angular-firestore.module.mjs +26 -22
- package/esm2020/angular-hasura-graphql.module.mjs +2 -24
- package/esm2020/services/catalog/catalog.service.mjs +2 -41
- package/esm2020/services/home-shop.service.mjs +8 -8
- package/fesm2015/infrab4a-connect-angular.mjs +74 -151
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +74 -147
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +5 -6
- package/services/cart.service.d.ts +1 -1
- package/services/catalog/catalog.service.d.ts +5 -8
- package/services/catalog/types/product-sort.type.d.ts +1 -1
- package/services/home-shop.service.d.ts +1 -1
- package/services/types/required-checkout-data.type.d.ts +1 -1
- package/services/types/required-checkout-subscription-data.type.d.ts +1 -1
- package/types/firebase-app-config.type.d.ts +1 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
|
-
import * as i1$
|
|
4
|
-
import {
|
|
5
|
-
import * as i1
|
|
6
|
-
import {
|
|
7
|
-
import * as i1 from '@angular/fire/auth';
|
|
3
|
+
import * as i1$3 from '@infrab4a/connect';
|
|
4
|
+
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, Category, CheckoutSubscription, Product, RequiredArgumentError, add, Order } from '@infrab4a/connect';
|
|
5
|
+
import * as i1 from '@angular/fire/app';
|
|
6
|
+
import { provideFirebaseApp, initializeApp, FirebaseApp } from '@angular/fire/app';
|
|
7
|
+
import * as i1$1 from '@angular/fire/auth';
|
|
8
8
|
import { Auth, provideAuth, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
9
|
-
import { isPlatformBrowser
|
|
10
|
-
import * as i1$
|
|
11
|
-
import { Firestore, provideFirestore, getFirestore, initializeFirestore,
|
|
9
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
10
|
+
import * as i1$2 from '@angular/fire/firestore';
|
|
11
|
+
import { Firestore, provideFirestore, getFirestore, initializeFirestore, enableIndexedDbPersistence, docSnapshots, doc } from '@angular/fire/firestore';
|
|
12
|
+
import { initializeApp as initializeApp$1 } from 'firebase/app';
|
|
12
13
|
import { combineLatest, from, of, throwError, Subject, iif, forkJoin } from 'rxjs';
|
|
13
14
|
import { map, mergeMap, catchError, concatMap, tap } from 'rxjs/operators';
|
|
14
15
|
import cookie from 'js-cookie';
|
|
15
16
|
import { __decorate, __metadata } from 'tslib';
|
|
16
17
|
import { Type } from 'class-transformer';
|
|
17
|
-
import * as i1$
|
|
18
|
+
import * as i1$4 from '@angular/common/http';
|
|
18
19
|
|
|
19
20
|
const ES_CONFIG = 'ES_CONFIG';
|
|
20
21
|
|
|
@@ -71,7 +72,7 @@ class AngularFirebaseAuthModule {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
AngularFirebaseAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
74
|
-
AngularFirebaseAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] });
|
|
75
|
+
AngularFirebaseAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.FirebaseAppModule, i1$1.AuthModule] });
|
|
75
76
|
AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
76
77
|
{
|
|
77
78
|
provide: 'Authentication',
|
|
@@ -115,11 +116,25 @@ AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0
|
|
|
115
116
|
},
|
|
116
117
|
deps: ['AuthenticationService'],
|
|
117
118
|
},
|
|
118
|
-
], imports: [
|
|
119
|
+
], imports: [provideFirebaseApp((injector) => {
|
|
120
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
121
|
+
return appName
|
|
122
|
+
? initializeApp(injector.get(FIREBASE_OPTIONS), appName)
|
|
123
|
+
: initializeApp(injector.get(FIREBASE_OPTIONS));
|
|
124
|
+
}),
|
|
125
|
+
provideAuth(() => getAuth())] });
|
|
119
126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
120
127
|
type: NgModule,
|
|
121
128
|
args: [{
|
|
122
|
-
imports: [
|
|
129
|
+
imports: [
|
|
130
|
+
provideFirebaseApp((injector) => {
|
|
131
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
132
|
+
return appName
|
|
133
|
+
? initializeApp(injector.get(FIREBASE_OPTIONS), appName)
|
|
134
|
+
: initializeApp(injector.get(FIREBASE_OPTIONS));
|
|
135
|
+
}),
|
|
136
|
+
provideAuth(() => getAuth()),
|
|
137
|
+
],
|
|
123
138
|
providers: [
|
|
124
139
|
{
|
|
125
140
|
provide: 'Authentication',
|
|
@@ -187,7 +202,7 @@ class AngularFirestoreModule {
|
|
|
187
202
|
}
|
|
188
203
|
}
|
|
189
204
|
AngularFirestoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
190
|
-
AngularFirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1$
|
|
205
|
+
AngularFirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1.FirebaseAppModule, i1$2.FirestoreModule] });
|
|
191
206
|
AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, providers: [
|
|
192
207
|
{
|
|
193
208
|
provide: 'FirestoreOptions',
|
|
@@ -387,16 +402,17 @@ AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
387
402
|
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
388
403
|
},
|
|
389
404
|
], imports: [AngularElasticSeachModule,
|
|
405
|
+
provideFirebaseApp((injector) => {
|
|
406
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
407
|
+
return appName
|
|
408
|
+
? initializeApp$1(injector.get(FIREBASE_OPTIONS), appName)
|
|
409
|
+
: initializeApp$1(injector.get(FIREBASE_OPTIONS));
|
|
410
|
+
}),
|
|
390
411
|
provideFirestore((injector) => {
|
|
391
|
-
const platformId = injector.get(PLATFORM_ID);
|
|
392
|
-
if (isPlatformServer(platformId))
|
|
393
|
-
return getFirestore(injector.get(FirebaseApp));
|
|
394
412
|
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
395
|
-
return getFirestore(
|
|
396
|
-
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
397
|
-
|
|
398
|
-
localCache: memoryLocalCache(),
|
|
399
|
-
});
|
|
413
|
+
return getFirestore();
|
|
414
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), { experimentalForceLongPolling: true });
|
|
415
|
+
enableIndexedDbPersistence(firestore).catch(console.error);
|
|
400
416
|
return firestore;
|
|
401
417
|
})] });
|
|
402
418
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
@@ -404,16 +420,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
404
420
|
args: [{
|
|
405
421
|
imports: [
|
|
406
422
|
AngularElasticSeachModule,
|
|
423
|
+
provideFirebaseApp((injector) => {
|
|
424
|
+
const appName = injector.get(FIREBASE_APP_NAME);
|
|
425
|
+
return appName
|
|
426
|
+
? initializeApp$1(injector.get(FIREBASE_OPTIONS), appName)
|
|
427
|
+
: initializeApp$1(injector.get(FIREBASE_OPTIONS));
|
|
428
|
+
}),
|
|
407
429
|
provideFirestore((injector) => {
|
|
408
|
-
const platformId = injector.get(PLATFORM_ID);
|
|
409
|
-
if (isPlatformServer(platformId))
|
|
410
|
-
return getFirestore(injector.get(FirebaseApp));
|
|
411
430
|
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
412
|
-
return getFirestore(
|
|
413
|
-
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
414
|
-
|
|
415
|
-
localCache: memoryLocalCache(),
|
|
416
|
-
});
|
|
431
|
+
return getFirestore();
|
|
432
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), { experimentalForceLongPolling: true });
|
|
433
|
+
enableIndexedDbPersistence(firestore).catch(console.error);
|
|
417
434
|
return firestore;
|
|
418
435
|
}),
|
|
419
436
|
],
|
|
@@ -675,17 +692,6 @@ AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
675
692
|
},
|
|
676
693
|
deps: ['HasuraConfig'],
|
|
677
694
|
},
|
|
678
|
-
{
|
|
679
|
-
provide: 'ProductReviewsRepository',
|
|
680
|
-
useExisting: ProductReviewsHasuraGraphQLRepository,
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
provide: ProductReviewsHasuraGraphQLRepository,
|
|
684
|
-
useFactory: (hasuraConfig) => {
|
|
685
|
-
return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
|
|
686
|
-
},
|
|
687
|
-
deps: ['HasuraConfig'],
|
|
688
|
-
},
|
|
689
695
|
{
|
|
690
696
|
provide: 'VariantRepository',
|
|
691
697
|
useExisting: VariantHasuraGraphQLRepository,
|
|
@@ -800,17 +806,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
800
806
|
},
|
|
801
807
|
deps: ['HasuraConfig'],
|
|
802
808
|
},
|
|
803
|
-
{
|
|
804
|
-
provide: 'ProductReviewsRepository',
|
|
805
|
-
useExisting: ProductReviewsHasuraGraphQLRepository,
|
|
806
|
-
},
|
|
807
|
-
{
|
|
808
|
-
provide: ProductReviewsHasuraGraphQLRepository,
|
|
809
|
-
useFactory: (hasuraConfig) => {
|
|
810
|
-
return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
|
|
811
|
-
},
|
|
812
|
-
deps: ['HasuraConfig'],
|
|
813
|
-
},
|
|
814
809
|
{
|
|
815
810
|
provide: 'VariantRepository',
|
|
816
811
|
useExisting: VariantHasuraGraphQLRepository,
|
|
@@ -901,11 +896,11 @@ class AuthService {
|
|
|
901
896
|
return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
|
|
902
897
|
}
|
|
903
898
|
}
|
|
904
|
-
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, deps: [{ token: i1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
899
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, deps: [{ token: i1$1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
905
900
|
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService });
|
|
906
901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, decorators: [{
|
|
907
902
|
type: Injectable
|
|
908
|
-
}], ctorParameters: function () { return [{ type: i1.Auth }, { type: undefined, decorators: [{
|
|
903
|
+
}], ctorParameters: function () { return [{ type: i1$1.Auth }, { type: undefined, decorators: [{
|
|
909
904
|
type: Inject,
|
|
910
905
|
args: ['UserRepository']
|
|
911
906
|
}] }]; } });
|
|
@@ -1110,7 +1105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1110
1105
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1111
1106
|
type: Inject,
|
|
1112
1107
|
args: ['CouponRepository']
|
|
1113
|
-
}] }, { type: i1$
|
|
1108
|
+
}] }, { type: i1$3.Shops, decorators: [{
|
|
1114
1109
|
type: Inject,
|
|
1115
1110
|
args: [DEFAULT_SHOP]
|
|
1116
1111
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1177,7 +1172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1177
1172
|
}] }, { type: undefined, decorators: [{
|
|
1178
1173
|
type: Inject,
|
|
1179
1174
|
args: ['UserRepository']
|
|
1180
|
-
}] }, { type: i1$
|
|
1175
|
+
}] }, { type: i1$3.Shops, decorators: [{
|
|
1181
1176
|
type: Inject,
|
|
1182
1177
|
args: [DEFAULT_SHOP]
|
|
1183
1178
|
}] }]; } });
|
|
@@ -1435,7 +1430,7 @@ CartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15
|
|
|
1435
1430
|
CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService });
|
|
1436
1431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, decorators: [{
|
|
1437
1432
|
type: Injectable
|
|
1438
|
-
}], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i1$
|
|
1433
|
+
}], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i1$3.Shops, decorators: [{
|
|
1439
1434
|
type: Inject,
|
|
1440
1435
|
args: [DEFAULT_SHOP]
|
|
1441
1436
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1447,7 +1442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1447
1442
|
}] }, { type: undefined, decorators: [{
|
|
1448
1443
|
type: Inject,
|
|
1449
1444
|
args: ['VariantRepository']
|
|
1450
|
-
}] }, { type: i1$
|
|
1445
|
+
}] }, { type: i1$3.Buy2WinFirestoreRepository, decorators: [{
|
|
1451
1446
|
type: Inject,
|
|
1452
1447
|
args: ['Buy2WinRepository']
|
|
1453
1448
|
}] }]; } });
|
|
@@ -1458,7 +1453,6 @@ class CatalogService {
|
|
|
1458
1453
|
this.categoryStructureAdapter = categoryStructureAdapter;
|
|
1459
1454
|
this.shop = shop;
|
|
1460
1455
|
this.productIndex = productIndex;
|
|
1461
|
-
this.productsByTerm = {};
|
|
1462
1456
|
this.buildFilterQuery = ({ clubDiscount, brands, prices, gender, tags, rate, customOptions, }) => {
|
|
1463
1457
|
const filters = {};
|
|
1464
1458
|
if (clubDiscount?.length)
|
|
@@ -1529,8 +1523,6 @@ class CatalogService {
|
|
|
1529
1523
|
}));
|
|
1530
1524
|
}
|
|
1531
1525
|
async findCatalog(options, limits) {
|
|
1532
|
-
if (this.hasTerm(options) && options.sort === 'most-relevant')
|
|
1533
|
-
return this.findCatalogByTermAndSortByMostRevelant(options, limits);
|
|
1534
1526
|
const repoParams = {
|
|
1535
1527
|
filters: {
|
|
1536
1528
|
...(await this.buildMainFilter(options)),
|
|
@@ -1558,44 +1550,8 @@ class CatalogService {
|
|
|
1558
1550
|
.search(term, 999, this.shop)
|
|
1559
1551
|
.then((data) => ({ id: { operator: Where.IN, value: data.hits.map(({ _source }) => _source.id) } }));
|
|
1560
1552
|
}
|
|
1561
|
-
async findCatalogByTermAndSortByMostRevelant(options, limits) {
|
|
1562
|
-
const productIds = await this.findCatalogIdsByElasticSearch(options.term);
|
|
1563
|
-
const limitedProductId = productIds.slice(limits.offset, limits.offset + limits.limit);
|
|
1564
|
-
const productResult = await this.productRepository.findCatalog({
|
|
1565
|
-
filters: { id: { operator: Where.IN, value: limitedProductId } },
|
|
1566
|
-
}, options?.mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female');
|
|
1567
|
-
const totalResult = await this.productRepository.findCatalog({
|
|
1568
|
-
fields: ['id'],
|
|
1569
|
-
filters: { id: { operator: Where.IN, value: productIds } },
|
|
1570
|
-
limits: { limit: 1, offset: 0 },
|
|
1571
|
-
options: {
|
|
1572
|
-
minimal: ['price'],
|
|
1573
|
-
maximum: ['price'],
|
|
1574
|
-
distinct: ['brand'],
|
|
1575
|
-
},
|
|
1576
|
-
}, options?.mainGender || this.shop === Shops.MENSMARKET ? 'male' : 'female');
|
|
1577
|
-
return {
|
|
1578
|
-
data: limitedProductId.map((id) => productResult.data.find((product) => product.id === id)).filter(Boolean),
|
|
1579
|
-
count: totalResult.count,
|
|
1580
|
-
maximum: totalResult.maximum,
|
|
1581
|
-
minimal: totalResult.minimal,
|
|
1582
|
-
distinct: totalResult.distinct,
|
|
1583
|
-
};
|
|
1584
|
-
}
|
|
1585
|
-
async findCatalogIdsByElasticSearch(term) {
|
|
1586
|
-
if (this.productsByTerm[term])
|
|
1587
|
-
return this.productsByTerm[term];
|
|
1588
|
-
return (this.productsByTerm[term] = await this.productIndex
|
|
1589
|
-
.search(term, 999, this.shop)
|
|
1590
|
-
.then(({ hits: products }) => {
|
|
1591
|
-
const withStock = products.filter(({ _source }) => _source.stock.quantity > 0);
|
|
1592
|
-
const withOutStock = products.filter(({ _source }) => _source.stock.quantity <= 0);
|
|
1593
|
-
const sorted = [...withStock, ...withOutStock];
|
|
1594
|
-
return [...new Set(sorted.map(({ _source }) => _source.id))];
|
|
1595
|
-
}));
|
|
1596
|
-
}
|
|
1597
1553
|
}
|
|
1598
|
-
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$
|
|
1554
|
+
CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$3.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1599
1555
|
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1600
1556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1601
1557
|
type: Injectable
|
|
@@ -1605,10 +1561,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1605
1561
|
}] }, { type: undefined, decorators: [{
|
|
1606
1562
|
type: Inject,
|
|
1607
1563
|
args: [CATEGORY_STRUCTURE]
|
|
1608
|
-
}] }, { type: i1$
|
|
1564
|
+
}] }, { type: i1$3.Shops, decorators: [{
|
|
1609
1565
|
type: Inject,
|
|
1610
1566
|
args: [DEFAULT_SHOP]
|
|
1611
|
-
}] }, { type: i1$
|
|
1567
|
+
}] }, { type: i1$3.ProductsIndex }]; } });
|
|
1612
1568
|
|
|
1613
1569
|
class CategoryService {
|
|
1614
1570
|
constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
|
|
@@ -1651,7 +1607,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1651
1607
|
}] }, { type: undefined, decorators: [{
|
|
1652
1608
|
type: Inject,
|
|
1653
1609
|
args: [CATEGORY_STRUCTURE]
|
|
1654
|
-
}] }, { type: i1$
|
|
1610
|
+
}] }, { type: i1$3.Shops, decorators: [{
|
|
1655
1611
|
type: Inject,
|
|
1656
1612
|
args: [DEFAULT_SHOP]
|
|
1657
1613
|
}] }]; } });
|
|
@@ -1813,14 +1769,14 @@ class WishlistService {
|
|
|
1813
1769
|
return wishlist;
|
|
1814
1770
|
}
|
|
1815
1771
|
}
|
|
1816
|
-
WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: i1$
|
|
1772
|
+
WishlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: i1$3.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1817
1773
|
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
1818
1774
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
1819
1775
|
type: Injectable
|
|
1820
1776
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1821
1777
|
type: Inject,
|
|
1822
1778
|
args: ['WishlistRepository']
|
|
1823
|
-
}] }, { type: i1$
|
|
1779
|
+
}] }, { type: i1$3.Shops, decorators: [{
|
|
1824
1780
|
type: Inject,
|
|
1825
1781
|
args: [DEFAULT_SHOP]
|
|
1826
1782
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1829,7 +1785,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1829
1785
|
}] }, { type: undefined, decorators: [{
|
|
1830
1786
|
type: Inject,
|
|
1831
1787
|
args: ['CategoryFilterRepository']
|
|
1832
|
-
}] }, { type: i1$
|
|
1788
|
+
}] }, { type: i1$3.ProductsIndex }]; } });
|
|
1833
1789
|
|
|
1834
1790
|
class CheckoutSubscriptionService {
|
|
1835
1791
|
constructor(checkoutSubscriptionRepository, subscriptionRepository, couponService) {
|
|
@@ -1895,13 +1851,6 @@ class UtilHelper {
|
|
|
1895
1851
|
}
|
|
1896
1852
|
|
|
1897
1853
|
class HomeShopService {
|
|
1898
|
-
get homeId() {
|
|
1899
|
-
if (this.defaultShop === Shops.GLAMSHOP)
|
|
1900
|
-
return 'glamshop';
|
|
1901
|
-
if (this.defaultShop === Shops.MENSMARKET)
|
|
1902
|
-
return 'mens_market';
|
|
1903
|
-
return null;
|
|
1904
|
-
}
|
|
1905
1854
|
constructor(categoryRepository, homeRepository, productRepository, defaultShop) {
|
|
1906
1855
|
this.categoryRepository = categoryRepository;
|
|
1907
1856
|
this.homeRepository = homeRepository;
|
|
@@ -1927,6 +1876,13 @@ class HomeShopService {
|
|
|
1927
1876
|
]))) || [],
|
|
1928
1877
|
});
|
|
1929
1878
|
}
|
|
1879
|
+
get homeId() {
|
|
1880
|
+
if (this.defaultShop === Shops.GLAMSHOP)
|
|
1881
|
+
return 'glamshop';
|
|
1882
|
+
if (this.defaultShop === Shops.MENSMARKET)
|
|
1883
|
+
return 'mens_market';
|
|
1884
|
+
return null;
|
|
1885
|
+
}
|
|
1930
1886
|
getHomeData() {
|
|
1931
1887
|
return this.getHomeConfiguration().pipe(map((home) => (home?.data?.expiresAt > new Date() ? home : null)), concatMap((home) => home
|
|
1932
1888
|
? of(home)
|
|
@@ -1996,7 +1952,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1996
1952
|
}] }, { type: undefined, decorators: [{
|
|
1997
1953
|
type: Inject,
|
|
1998
1954
|
args: ['ProductRepository']
|
|
1999
|
-
}] }, { type: i1$
|
|
1955
|
+
}] }, { type: i1$3.Shops, decorators: [{
|
|
2000
1956
|
type: Inject,
|
|
2001
1957
|
args: [DEFAULT_SHOP]
|
|
2002
1958
|
}] }]; } });
|
|
@@ -2014,11 +1970,11 @@ class OrderService {
|
|
|
2014
1970
|
return this.orderSubject;
|
|
2015
1971
|
}
|
|
2016
1972
|
}
|
|
2017
|
-
OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, deps: [{ token: i1$
|
|
1973
|
+
OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, deps: [{ token: i1$2.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2018
1974
|
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
2019
1975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
2020
1976
|
type: Injectable
|
|
2021
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1977
|
+
}], ctorParameters: function () { return [{ type: i1$2.Firestore }, { type: i1$3.OrderFirestoreRepository, decorators: [{
|
|
2022
1978
|
type: Inject,
|
|
2023
1979
|
args: ['OrderRepository']
|
|
2024
1980
|
}] }]; } });
|
|
@@ -2100,11 +2056,11 @@ class ShippingService {
|
|
|
2100
2056
|
return false;
|
|
2101
2057
|
}
|
|
2102
2058
|
}
|
|
2103
|
-
ShippingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, deps: [{ token: i1$
|
|
2059
|
+
ShippingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, deps: [{ token: i1$4.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2104
2060
|
ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
|
|
2105
2061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
|
|
2106
2062
|
type: Injectable
|
|
2107
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
2063
|
+
}], ctorParameters: function () { return [{ type: i1$4.HttpClient }, { type: undefined, decorators: [{
|
|
2108
2064
|
type: Inject,
|
|
2109
2065
|
args: [BACKEND_URL]
|
|
2110
2066
|
}] }, { type: HomeShopService }]; } });
|
|
@@ -2131,10 +2087,7 @@ class AngularConnectModule {
|
|
|
2131
2087
|
}
|
|
2132
2088
|
}
|
|
2133
2089
|
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2134
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [
|
|
2135
|
-
AngularFirebaseAuthModule,
|
|
2136
|
-
AngularFirestoreModule,
|
|
2137
|
-
AngularHasuraGraphQLModule] });
|
|
2090
|
+
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
|
|
2138
2091
|
AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2139
2092
|
AuthService,
|
|
2140
2093
|
CartService,
|
|
@@ -2147,37 +2100,11 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2147
2100
|
OrderService,
|
|
2148
2101
|
ShippingService,
|
|
2149
2102
|
WishlistService,
|
|
2150
|
-
], imports: [
|
|
2151
|
-
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2152
|
-
try {
|
|
2153
|
-
return getApp(appName);
|
|
2154
|
-
}
|
|
2155
|
-
catch (error) {
|
|
2156
|
-
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2157
|
-
}
|
|
2158
|
-
}),
|
|
2159
|
-
AngularElasticSeachModule,
|
|
2160
|
-
AngularFirebaseAuthModule,
|
|
2161
|
-
AngularFirestoreModule,
|
|
2162
|
-
AngularHasuraGraphQLModule] });
|
|
2103
|
+
], imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
|
|
2163
2104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2164
2105
|
type: NgModule,
|
|
2165
2106
|
args: [{
|
|
2166
|
-
imports: [
|
|
2167
|
-
provideFirebaseApp((injector) => {
|
|
2168
|
-
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2169
|
-
try {
|
|
2170
|
-
return getApp(appName);
|
|
2171
|
-
}
|
|
2172
|
-
catch (error) {
|
|
2173
|
-
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2174
|
-
}
|
|
2175
|
-
}),
|
|
2176
|
-
AngularElasticSeachModule,
|
|
2177
|
-
AngularFirebaseAuthModule,
|
|
2178
|
-
AngularFirestoreModule,
|
|
2179
|
-
AngularHasuraGraphQLModule,
|
|
2180
|
-
],
|
|
2107
|
+
imports: [AngularElasticSeachModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule],
|
|
2181
2108
|
providers: [
|
|
2182
2109
|
AuthService,
|
|
2183
2110
|
CartService,
|