@infrab4a/connect-angular 4.3.0-beta.6 → 4.3.0-beta.8
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 +0 -1
- package/angular-firestore.module.d.ts +1 -2
- package/esm2022/angular-connect.module.mjs +97 -0
- package/esm2022/angular-elastic-search.module.mjs +34 -0
- package/esm2022/angular-firebase-auth.module.mjs +115 -0
- package/esm2022/angular-firestore.module.mjs +483 -0
- package/esm2022/angular-hasura-graphql.module.mjs +265 -0
- package/{esm2020 → esm2022}/services/auth.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/cart.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/catalog/adapters/new-category-structure.adapter.mjs +6 -6
- package/{esm2020 → esm2022}/services/catalog/adapters/old-category-structure.adapter.mjs +6 -6
- package/{esm2020 → esm2022}/services/catalog/catalog.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/catalog/category.service.mjs +6 -6
- package/esm2022/services/catalog/index.mjs +8 -0
- package/{esm2020 → esm2022}/services/catalog/models/category-with-tree.model.mjs +1 -1
- package/esm2022/services/catalog/wishlist.service.mjs +116 -0
- package/{esm2020 → esm2022}/services/checkout-subscription.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/checkout.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/coupon.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/home-shop.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/order.service.mjs +6 -6
- package/{esm2020 → esm2022}/services/shipping.service.mjs +6 -6
- package/{fesm2020 → fesm2022}/infrab4a-connect-angular.mjs +570 -596
- package/fesm2022/infrab4a-connect-angular.mjs.map +1 -0
- package/package.json +8 -14
- package/services/catalog/index.d.ts +1 -0
- package/services/catalog/wishlist.service.d.ts +21 -4
- package/consts/storage-base-url.const.d.ts +0 -1
- package/esm2020/angular-connect.module.mjs +0 -113
- package/esm2020/angular-elastic-search.module.mjs +0 -34
- package/esm2020/angular-firebase-auth.module.mjs +0 -115
- package/esm2020/angular-firestore.module.mjs +0 -502
- package/esm2020/angular-hasura-graphql.module.mjs +0 -265
- package/esm2020/consts/storage-base-url.const.mjs +0 -2
- package/esm2020/services/catalog/index.mjs +0 -7
- package/esm2020/services/catalog/wishlist.service.mjs +0 -107
- package/fesm2015/infrab4a-connect-angular.mjs +0 -2340
- package/fesm2015/infrab4a-connect-angular.mjs.map +0 -1
- package/fesm2020/infrab4a-connect-angular.mjs.map +0 -1
- /package/{esm2020 → esm2022}/consts/backend-url.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/category-structure.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/default-shop.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/es-config.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/firebase-const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/hasura-options.const.mjs +0 -0
- /package/{esm2020 → esm2022}/consts/index.mjs +0 -0
- /package/{esm2020 → esm2022}/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/helpers/mobile-operation-system-checker.helper.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/infrab4a-connect-angular.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/adapters/category-structure.adapter.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/adapters/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/enums/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/enums/product-sorts.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/catalog/types/product-sort.type.mjs +0 -0
- /package/{esm2020 → esm2022}/services/helpers/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/helpers/util.helper.mjs +0 -0
- /package/{esm2020 → esm2022}/services/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/required-checkout-data.type.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/required-checkout-subscription-data.type.mjs +0 -0
- /package/{esm2020 → esm2022}/services/types/shipping-methods.type.mjs +0 -0
- /package/{esm2020 → esm2022}/types/firebase-app-config.type.mjs +0 -0
- /package/{esm2020 → esm2022}/types/index.mjs +0 -0
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
3
|
import * as i1$4 from '@angular/fire/app';
|
|
4
|
-
import { FirebaseApp,
|
|
4
|
+
import { FirebaseApp, getApp, initializeApp, provideFirebaseApp } from '@angular/fire/app';
|
|
5
5
|
import * as i1$2 from '@infrab4a/connect';
|
|
6
|
-
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, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository,
|
|
6
|
+
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, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, isNil, NotFoundError, Checkout, pick, LineItem, RoundProductPricesHelper, set, InvalidArgumentError, Category, Wishlist, CheckoutSubscription, Product, RequiredArgumentError, add, Order } from '@infrab4a/connect';
|
|
7
7
|
import * as i1 from '@angular/fire/auth';
|
|
8
|
-
import { Auth,
|
|
8
|
+
import { Auth, getAuth, provideAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
9
9
|
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
10
10
|
import * as i1$1 from '@angular/fire/firestore';
|
|
11
|
-
import { Firestore,
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import { combineLatest, from, of, throwError, Subject, iif, forkJoin } from 'rxjs';
|
|
15
|
-
import { map, mergeMap, catchError, concatMap, tap } from 'rxjs/operators';
|
|
11
|
+
import { Firestore, getFirestore, memoryLocalCache, initializeFirestore, provideFirestore, doc, docSnapshots } from '@angular/fire/firestore';
|
|
12
|
+
import { combineLatest, of, from, throwError, Subject, iif, forkJoin } from 'rxjs';
|
|
13
|
+
import { map, catchError, mergeMap, concatMap, tap } from 'rxjs/operators';
|
|
16
14
|
import cookie from 'js-cookie';
|
|
17
|
-
import {
|
|
15
|
+
import { __metadata, __decorate } from 'tslib';
|
|
18
16
|
import { Type } from 'class-transformer';
|
|
19
17
|
import * as i1$3 from '@angular/common/http';
|
|
20
18
|
|
|
@@ -27,17 +25,17 @@ class AngularElasticSeachModule {
|
|
|
27
25
|
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
28
26
|
};
|
|
29
27
|
}
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
29
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule }); }
|
|
30
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
31
|
+
{
|
|
32
|
+
provide: ProductsIndex,
|
|
33
|
+
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
34
|
+
deps: [ES_CONFIG],
|
|
35
|
+
},
|
|
36
|
+
] }); }
|
|
30
37
|
}
|
|
31
|
-
|
|
32
|
-
AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule });
|
|
33
|
-
AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, providers: [
|
|
34
|
-
{
|
|
35
|
-
provide: ProductsIndex,
|
|
36
|
-
useFactory: (configuration) => new ProductsIndex(new AxiosAdapter(configuration)),
|
|
37
|
-
deps: [ES_CONFIG],
|
|
38
|
-
},
|
|
39
|
-
] });
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
|
|
41
39
|
type: NgModule,
|
|
42
40
|
args: [{
|
|
43
41
|
providers: [
|
|
@@ -71,54 +69,54 @@ class AngularFirebaseAuthModule {
|
|
|
71
69
|
],
|
|
72
70
|
};
|
|
73
71
|
}
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
73
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] }); }
|
|
74
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
75
|
+
{
|
|
76
|
+
provide: 'Authentication',
|
|
77
|
+
useFactory: (authenticationService, userRepository) => {
|
|
78
|
+
return new Authentication(authenticationService, userRepository);
|
|
79
|
+
},
|
|
80
|
+
deps: ['AuthenticationService', 'UserRepository'],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
provide: 'AuthenticationService',
|
|
84
|
+
useFactory: (angularFireAuth) => {
|
|
85
|
+
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
86
|
+
},
|
|
87
|
+
deps: [Auth],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
provide: 'Register',
|
|
91
|
+
useFactory: (registerService, userRepository) => {
|
|
92
|
+
return new Register(registerService, userRepository);
|
|
93
|
+
},
|
|
94
|
+
deps: ['RegisterService', 'UserRepository'],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
provide: 'RegisterService',
|
|
98
|
+
useFactory: (angularFireAuth) => {
|
|
99
|
+
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
100
|
+
},
|
|
101
|
+
deps: [Auth],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
provide: 'SignOut',
|
|
105
|
+
useFactory: (authenticationService) => {
|
|
106
|
+
return new SignOut(authenticationService);
|
|
107
|
+
},
|
|
108
|
+
deps: ['AuthenticationService'],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
provide: 'RecoveryPassword',
|
|
112
|
+
useFactory: (authenticationService) => {
|
|
113
|
+
return new RecoveryPassword(authenticationService);
|
|
114
|
+
},
|
|
115
|
+
deps: ['AuthenticationService'],
|
|
116
|
+
},
|
|
117
|
+
], imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))] }); }
|
|
74
118
|
}
|
|
75
|
-
|
|
76
|
-
AngularFirebaseAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, imports: [i1.AuthModule] });
|
|
77
|
-
AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
|
|
78
|
-
{
|
|
79
|
-
provide: 'Authentication',
|
|
80
|
-
useFactory: (authenticationService, userRepository) => {
|
|
81
|
-
return new Authentication(authenticationService, userRepository);
|
|
82
|
-
},
|
|
83
|
-
deps: ['AuthenticationService', 'UserRepository'],
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
provide: 'AuthenticationService',
|
|
87
|
-
useFactory: (angularFireAuth) => {
|
|
88
|
-
return new AuthenticationFirebaseAuthService(angularFireAuth);
|
|
89
|
-
},
|
|
90
|
-
deps: [Auth],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
provide: 'Register',
|
|
94
|
-
useFactory: (registerService, userRepository) => {
|
|
95
|
-
return new Register(registerService, userRepository);
|
|
96
|
-
},
|
|
97
|
-
deps: ['RegisterService', 'UserRepository'],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
provide: 'RegisterService',
|
|
101
|
-
useFactory: (angularFireAuth) => {
|
|
102
|
-
return new RegisterFirebaseAuthService(angularFireAuth);
|
|
103
|
-
},
|
|
104
|
-
deps: [Auth],
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
provide: 'SignOut',
|
|
108
|
-
useFactory: (authenticationService) => {
|
|
109
|
-
return new SignOut(authenticationService);
|
|
110
|
-
},
|
|
111
|
-
deps: ['AuthenticationService'],
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
provide: 'RecoveryPassword',
|
|
115
|
-
useFactory: (authenticationService) => {
|
|
116
|
-
return new RecoveryPassword(authenticationService);
|
|
117
|
-
},
|
|
118
|
-
deps: ['AuthenticationService'],
|
|
119
|
-
},
|
|
120
|
-
], imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))] });
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
|
|
122
120
|
type: NgModule,
|
|
123
121
|
args: [{
|
|
124
122
|
imports: [provideAuth((injector) => getAuth(injector.get(FirebaseApp)))],
|
|
@@ -169,8 +167,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
169
167
|
}]
|
|
170
168
|
}] });
|
|
171
169
|
|
|
172
|
-
const STORAGE_BASE_URL = 'STORAGE_BASE_URL';
|
|
173
|
-
|
|
174
170
|
class MobileOperationSystemCheckerHelper {
|
|
175
171
|
static isAppleDevice() {
|
|
176
172
|
return (['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(navigator?.platform) ||
|
|
@@ -189,243 +185,235 @@ class AngularFirestoreModule {
|
|
|
189
185
|
],
|
|
190
186
|
};
|
|
191
187
|
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
189
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, imports: [AngularElasticSeachModule, i1$1.FirestoreModule] }); }
|
|
190
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, providers: [
|
|
191
|
+
{
|
|
192
|
+
provide: 'FirestoreOptions',
|
|
193
|
+
useFactory: (firestore, platformId) => ({
|
|
194
|
+
firestore,
|
|
195
|
+
interceptors: {
|
|
196
|
+
request: (request) => {
|
|
197
|
+
if (isPlatformBrowser(platformId))
|
|
198
|
+
return request;
|
|
199
|
+
const interval = setInterval(() => { }, 100);
|
|
200
|
+
request.interval = interval;
|
|
203
201
|
return request;
|
|
204
|
-
|
|
205
|
-
request
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if (isPlatformBrowser(platformId))
|
|
202
|
+
},
|
|
203
|
+
response: (response, request) => {
|
|
204
|
+
if (isPlatformBrowser(platformId))
|
|
205
|
+
return response;
|
|
206
|
+
clearInterval(request.interval);
|
|
210
207
|
return response;
|
|
211
|
-
|
|
212
|
-
return response;
|
|
208
|
+
},
|
|
213
209
|
},
|
|
210
|
+
}),
|
|
211
|
+
deps: [Firestore, PLATFORM_ID],
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
provide: 'BeautyProfileRepository',
|
|
215
|
+
useFactory: (config, userRepository) => {
|
|
216
|
+
return new UserBeautyProfileFirestoreRepository(config, userRepository);
|
|
214
217
|
},
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
return
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
], imports: [AngularElasticSeachModule,
|
|
415
|
-
provideFirestore((injector) => {
|
|
416
|
-
const platformId = injector.get(PLATFORM_ID);
|
|
417
|
-
if (isPlatformServer(platformId))
|
|
418
|
-
return getFirestore(injector.get(FirebaseApp));
|
|
419
|
-
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
420
|
-
return getFirestore(injector.get(FirebaseApp));
|
|
421
|
-
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
422
|
-
experimentalForceLongPolling: true,
|
|
423
|
-
localCache: memoryLocalCache(),
|
|
424
|
-
});
|
|
425
|
-
return firestore;
|
|
426
|
-
}),
|
|
427
|
-
provideStorage(() => getStorage())] });
|
|
428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
218
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
provide: 'Buy2WinRepository',
|
|
222
|
+
useFactory: (options) => {
|
|
223
|
+
return new Buy2WinFirestoreRepository(options);
|
|
224
|
+
},
|
|
225
|
+
deps: ['FirestoreOptions'],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
provide: CategoryFirestoreRepository,
|
|
229
|
+
useFactory: (options) => {
|
|
230
|
+
return new CategoryFirestoreRepository(options);
|
|
231
|
+
},
|
|
232
|
+
deps: ['FirestoreOptions'],
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
provide: 'CheckoutRepository',
|
|
236
|
+
useFactory: (options) => {
|
|
237
|
+
return new CheckoutFirestoreRepository(options);
|
|
238
|
+
},
|
|
239
|
+
deps: ['FirestoreOptions'],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
provide: 'CheckoutSubscriptionRepository',
|
|
243
|
+
useFactory: (options) => {
|
|
244
|
+
return new CheckoutSubscriptionFirestoreRepository(options);
|
|
245
|
+
},
|
|
246
|
+
deps: ['FirestoreOptions'],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
provide: 'CouponRepository',
|
|
250
|
+
useFactory: (options) => {
|
|
251
|
+
return new CouponFirestoreRepository(options);
|
|
252
|
+
},
|
|
253
|
+
deps: ['FirestoreOptions'],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
provide: 'CampaignHashtagRepository',
|
|
257
|
+
useFactory: (options) => {
|
|
258
|
+
return new CampaignHashtagFirestoreRepository(options);
|
|
259
|
+
},
|
|
260
|
+
deps: ['FirestoreOptions'],
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
provide: 'CampaignDashboardRepository',
|
|
264
|
+
useFactory: (options) => {
|
|
265
|
+
return new CampaignDashboardFirestoreRepository(options);
|
|
266
|
+
},
|
|
267
|
+
deps: ['FirestoreOptions'],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
provide: 'EditionRepository',
|
|
271
|
+
useFactory: (options, subscriptionRepository) => {
|
|
272
|
+
return new SubscriptionEditionFirestoreRepository(options, subscriptionRepository);
|
|
273
|
+
},
|
|
274
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
provide: 'HomeRepository',
|
|
278
|
+
useFactory: (options) => {
|
|
279
|
+
return new HomeFirestoreRepository(options);
|
|
280
|
+
},
|
|
281
|
+
deps: ['FirestoreOptions'],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
provide: 'LeadRepository',
|
|
285
|
+
useFactory: (options) => {
|
|
286
|
+
return new LeadFirestoreRepository(options);
|
|
287
|
+
},
|
|
288
|
+
deps: ['FirestoreOptions'],
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
provide: 'LegacyOrderRepository',
|
|
292
|
+
useFactory: (options) => {
|
|
293
|
+
return new LegacyOrderFirestoreRepository(options);
|
|
294
|
+
},
|
|
295
|
+
deps: ['FirestoreOptions'],
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
provide: 'ShopMenuRepository',
|
|
299
|
+
useFactory: (options) => {
|
|
300
|
+
return new ShopMenuFirestoreRepository(options);
|
|
301
|
+
},
|
|
302
|
+
deps: ['FirestoreOptions'],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
provide: 'OrderRepository',
|
|
306
|
+
useFactory: (options) => {
|
|
307
|
+
return new OrderFirestoreRepository(options);
|
|
308
|
+
},
|
|
309
|
+
deps: ['FirestoreOptions'],
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
provide: 'PaymentRepository',
|
|
313
|
+
useFactory: (options) => {
|
|
314
|
+
return new PaymentFirestoreRepository(options);
|
|
315
|
+
},
|
|
316
|
+
deps: ['FirestoreOptions'],
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
provide: ProductFirestoreRepository,
|
|
320
|
+
useFactory: (options) => {
|
|
321
|
+
return new ProductFirestoreRepository(options);
|
|
322
|
+
},
|
|
323
|
+
deps: ['FirestoreOptions'],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
provide: 'ShopSettingsRepository',
|
|
327
|
+
useFactory: (options) => {
|
|
328
|
+
return new ShopSettingsFirestoreRepository(options);
|
|
329
|
+
},
|
|
330
|
+
deps: ['FirestoreOptions'],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
provide: 'SubscriptionPaymentRepository',
|
|
334
|
+
useFactory: (options, subscriptionRepository) => {
|
|
335
|
+
return new SubscriptionPaymentFirestoreRepository(options, subscriptionRepository);
|
|
336
|
+
},
|
|
337
|
+
deps: ['FirestoreOptions', 'SubscriptionRepository'],
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
provide: 'SubscriptionPlanRepository',
|
|
341
|
+
useFactory: (options) => {
|
|
342
|
+
return new SubscriptionPlanFirestoreRepository(options);
|
|
343
|
+
},
|
|
344
|
+
deps: ['FirestoreOptions'],
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
provide: 'SubscriptionProductRepository',
|
|
348
|
+
useFactory: (options) => {
|
|
349
|
+
return new SubscriptionProductFirestoreRepository(options);
|
|
350
|
+
},
|
|
351
|
+
deps: ['FirestoreOptions'],
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
provide: 'SubscriptionRepository',
|
|
355
|
+
useFactory: (options) => {
|
|
356
|
+
return new SubscriptionFirestoreRepository(options);
|
|
357
|
+
},
|
|
358
|
+
deps: ['FirestoreOptions'],
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
provide: 'UserRepository',
|
|
362
|
+
useFactory: (options) => {
|
|
363
|
+
return new UserFirestoreRepository(options);
|
|
364
|
+
},
|
|
365
|
+
deps: ['FirestoreOptions'],
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
provide: 'UserAddressRepository',
|
|
369
|
+
useFactory: (options, userRepository) => {
|
|
370
|
+
return new UserAddressFirestoreRepository(options, userRepository);
|
|
371
|
+
},
|
|
372
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
provide: 'UserPaymentMethodRepository',
|
|
376
|
+
useFactory: (options, userRepository) => {
|
|
377
|
+
return new UserPaymentMethodFirestoreRepository(options, userRepository);
|
|
378
|
+
},
|
|
379
|
+
deps: ['FirestoreOptions', 'UserRepository'],
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
provide: 'SubscriptionMaterializationRepository',
|
|
383
|
+
useFactory: (options) => {
|
|
384
|
+
return new SubscriptionMaterializationFirestoreRepository(options);
|
|
385
|
+
},
|
|
386
|
+
deps: ['FirestoreOptions'],
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
provide: 'SubscriptionSummaryRepository',
|
|
390
|
+
useFactory: (options) => {
|
|
391
|
+
return new SubscriptionSummaryFirestoreRepository(options);
|
|
392
|
+
},
|
|
393
|
+
deps: ['FirestoreOptions'],
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
provide: ProductVariantFirestoreRepository,
|
|
397
|
+
useFactory: (options, productRepository) => {
|
|
398
|
+
return new ProductVariantFirestoreRepository(options, productRepository);
|
|
399
|
+
},
|
|
400
|
+
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
401
|
+
},
|
|
402
|
+
], imports: [AngularElasticSeachModule,
|
|
403
|
+
provideFirestore((injector) => {
|
|
404
|
+
const platformId = injector.get(PLATFORM_ID);
|
|
405
|
+
if (isPlatformServer(platformId))
|
|
406
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
407
|
+
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
408
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
409
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
410
|
+
experimentalForceLongPolling: true,
|
|
411
|
+
localCache: memoryLocalCache(),
|
|
412
|
+
});
|
|
413
|
+
return firestore;
|
|
414
|
+
})] }); }
|
|
415
|
+
}
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
429
417
|
type: NgModule,
|
|
430
418
|
args: [{
|
|
431
419
|
imports: [
|
|
@@ -442,7 +430,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
442
430
|
});
|
|
443
431
|
return firestore;
|
|
444
432
|
}),
|
|
445
|
-
provideStorage(() => getStorage()),
|
|
446
433
|
],
|
|
447
434
|
providers: [
|
|
448
435
|
{
|
|
@@ -656,13 +643,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
656
643
|
},
|
|
657
644
|
deps: ['FirestoreOptions', ProductFirestoreRepository],
|
|
658
645
|
},
|
|
659
|
-
{
|
|
660
|
-
provide: 'FileUploaderService',
|
|
661
|
-
useFactory: (storage, baseUrl) => {
|
|
662
|
-
return new FirebaseFileUploaderService(storage, baseUrl);
|
|
663
|
-
},
|
|
664
|
-
deps: [Storage, STORAGE_BASE_URL],
|
|
665
|
-
},
|
|
666
646
|
],
|
|
667
647
|
}]
|
|
668
648
|
}] });
|
|
@@ -674,132 +654,132 @@ class AngularHasuraGraphQLModule {
|
|
|
674
654
|
providers: [{ provide: HASURA_OPTIONS, useValue: options }],
|
|
675
655
|
};
|
|
676
656
|
}
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
657
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
658
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule }); }
|
|
659
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
|
|
660
|
+
{
|
|
661
|
+
provide: 'HasuraConfig',
|
|
662
|
+
useFactory: (options, platformId) => ({
|
|
663
|
+
endpoint: options.endpoint,
|
|
664
|
+
authOptions: options.credentials,
|
|
665
|
+
interceptors: {
|
|
666
|
+
request: (request) => {
|
|
667
|
+
if (isPlatformBrowser(platformId))
|
|
668
|
+
return request;
|
|
669
|
+
const interval = setInterval(() => { }, 100);
|
|
670
|
+
request.interval = interval;
|
|
689
671
|
return request;
|
|
690
|
-
|
|
691
|
-
request
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
if (isPlatformBrowser(platformId))
|
|
672
|
+
},
|
|
673
|
+
response: (response, request) => {
|
|
674
|
+
if (isPlatformBrowser(platformId))
|
|
675
|
+
return response;
|
|
676
|
+
clearInterval(request.interval);
|
|
696
677
|
return response;
|
|
697
|
-
|
|
698
|
-
return response;
|
|
678
|
+
},
|
|
699
679
|
},
|
|
680
|
+
}),
|
|
681
|
+
deps: [HASURA_OPTIONS, PLATFORM_ID],
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
provide: 'CategoryRepository',
|
|
685
|
+
useExisting: CategoryHasuraGraphQLRepository,
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
provide: CategoryHasuraGraphQLRepository,
|
|
689
|
+
useFactory: (options, productRepository, categoryFilterRepository) => {
|
|
690
|
+
return new CategoryHasuraGraphQLRepository(options, productRepository, categoryFilterRepository);
|
|
700
691
|
},
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
useFactory: (options, categoryFilterRepository) => {
|
|
793
|
-
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
794
|
-
},
|
|
795
|
-
deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
|
|
796
|
-
},
|
|
797
|
-
{
|
|
798
|
-
provide: 'WishlistRepository',
|
|
799
|
-
useExisting: WishlistHasuraGraphQLRepository,
|
|
800
|
-
},
|
|
801
|
-
] });
|
|
802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
692
|
+
deps: ['HasuraConfig', ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
provide: 'ProductRepository',
|
|
696
|
+
useExisting: ProductHasuraGraphQLRepository,
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
provide: ProductHasuraGraphQLRepository,
|
|
700
|
+
useFactory: (hasuraConfig) => {
|
|
701
|
+
return new ProductHasuraGraphQLRepository(hasuraConfig);
|
|
702
|
+
},
|
|
703
|
+
deps: ['HasuraConfig'],
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
provide: 'ProductReviewsRepository',
|
|
707
|
+
useExisting: ProductReviewsHasuraGraphQLRepository,
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
provide: ProductReviewsHasuraGraphQLRepository,
|
|
711
|
+
useFactory: (hasuraConfig) => {
|
|
712
|
+
return new ProductReviewsHasuraGraphQLRepository(hasuraConfig);
|
|
713
|
+
},
|
|
714
|
+
deps: ['HasuraConfig'],
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
provide: 'VariantRepository',
|
|
718
|
+
useExisting: VariantHasuraGraphQLRepository,
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
provide: VariantHasuraGraphQLRepository,
|
|
722
|
+
useFactory: (hasuraConfig) => {
|
|
723
|
+
return new VariantHasuraGraphQLRepository(hasuraConfig);
|
|
724
|
+
},
|
|
725
|
+
deps: ['HasuraConfig'],
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
provide: 'CategoryFilterRepository',
|
|
729
|
+
useExisting: CategoryFilterHasuraGraphQLRepository,
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
provide: CategoryFilterHasuraGraphQLRepository,
|
|
733
|
+
useFactory: (options) => {
|
|
734
|
+
return new CategoryFilterHasuraGraphQLRepository(options);
|
|
735
|
+
},
|
|
736
|
+
deps: ['HasuraConfig'],
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
provide: 'FilterOptionRepository',
|
|
740
|
+
useExisting: FilterOptionHasuraGraphQLRepository,
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
provide: FilterOptionHasuraGraphQLRepository,
|
|
744
|
+
useFactory: (options) => {
|
|
745
|
+
return new FilterOptionHasuraGraphQLRepository(options);
|
|
746
|
+
},
|
|
747
|
+
deps: ['HasuraConfig'],
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
provide: 'FilterRepository',
|
|
751
|
+
useExisting: FilterHasuraGraphQLRepository,
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
provide: FilterHasuraGraphQLRepository,
|
|
755
|
+
useFactory: (options, filterOptionRepository, categoryFilterRepository) => {
|
|
756
|
+
return new FilterHasuraGraphQLRepository(options, filterOptionRepository, categoryFilterRepository);
|
|
757
|
+
},
|
|
758
|
+
deps: ['HasuraConfig', FilterOptionHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository],
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
provide: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
762
|
+
useFactory: (options) => new CategoryCollectionChildrenHasuraGraphQLRepository(options),
|
|
763
|
+
deps: ['HasuraConfig'],
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
provide: 'CategoryCollectionChildrenRepository',
|
|
767
|
+
useExisting: CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
provide: WishlistHasuraGraphQLRepository,
|
|
771
|
+
useFactory: (options, categoryFilterRepository) => {
|
|
772
|
+
return new WishlistHasuraGraphQLRepository(options, categoryFilterRepository);
|
|
773
|
+
},
|
|
774
|
+
deps: ['HasuraConfig', CategoryFilterHasuraGraphQLRepository],
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
provide: 'WishlistRepository',
|
|
778
|
+
useExisting: WishlistHasuraGraphQLRepository,
|
|
779
|
+
},
|
|
780
|
+
] }); }
|
|
781
|
+
}
|
|
782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
803
783
|
type: NgModule,
|
|
804
784
|
args: [{
|
|
805
785
|
providers: [
|
|
@@ -948,15 +928,15 @@ class AuthService {
|
|
|
948
928
|
getFireUser() {
|
|
949
929
|
return authState(this.angularFireAuth).pipe(catchError(() => of(null)));
|
|
950
930
|
}
|
|
931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService, deps: [{ token: i1.Auth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
932
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService }); }
|
|
951
933
|
}
|
|
952
|
-
|
|
953
|
-
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService });
|
|
954
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AuthService, decorators: [{
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AuthService, decorators: [{
|
|
955
935
|
type: Injectable
|
|
956
|
-
}], ctorParameters:
|
|
936
|
+
}], ctorParameters: () => [{ type: i1.Auth }, { type: undefined, decorators: [{
|
|
957
937
|
type: Inject,
|
|
958
938
|
args: ['UserRepository']
|
|
959
|
-
}] }]
|
|
939
|
+
}] }] });
|
|
960
940
|
|
|
961
941
|
class CouponService {
|
|
962
942
|
constructor(couponRepository, defaultShop, orderRepository, categoryRepository) {
|
|
@@ -1147,15 +1127,15 @@ class CouponService {
|
|
|
1147
1127
|
}
|
|
1148
1128
|
return couponUseLimits;
|
|
1149
1129
|
}
|
|
1130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, deps: [{ token: 'CouponRepository' }, { token: DEFAULT_SHOP }, { token: 'OrderRepository' }, { token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1131
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, providedIn: 'root' }); }
|
|
1150
1132
|
}
|
|
1151
|
-
|
|
1152
|
-
CouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, providedIn: 'root' });
|
|
1153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CouponService, decorators: [{
|
|
1133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CouponService, decorators: [{
|
|
1154
1134
|
type: Injectable,
|
|
1155
1135
|
args: [{
|
|
1156
1136
|
providedIn: 'root',
|
|
1157
1137
|
}]
|
|
1158
|
-
}], ctorParameters:
|
|
1138
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1159
1139
|
type: Inject,
|
|
1160
1140
|
args: ['CouponRepository']
|
|
1161
1141
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
@@ -1167,7 +1147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1167
1147
|
}] }, { type: undefined, decorators: [{
|
|
1168
1148
|
type: Inject,
|
|
1169
1149
|
args: ['CategoryRepository']
|
|
1170
|
-
}] }]
|
|
1150
|
+
}] }] });
|
|
1171
1151
|
|
|
1172
1152
|
class CheckoutService {
|
|
1173
1153
|
constructor(couponService, checkoutRepository, orderRepository, userRepository, defaultShop) {
|
|
@@ -1211,12 +1191,12 @@ class CheckoutService {
|
|
|
1211
1191
|
cookie.set('checkoutId', checkout.id);
|
|
1212
1192
|
return checkout;
|
|
1213
1193
|
}
|
|
1194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'OrderRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1195
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService }); }
|
|
1214
1196
|
}
|
|
1215
|
-
|
|
1216
|
-
CheckoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService });
|
|
1217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutService, decorators: [{
|
|
1218
1198
|
type: Injectable
|
|
1219
|
-
}], ctorParameters:
|
|
1199
|
+
}], ctorParameters: () => [{ type: CouponService }, { type: undefined, decorators: [{
|
|
1220
1200
|
type: Inject,
|
|
1221
1201
|
args: ['CheckoutRepository']
|
|
1222
1202
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1228,7 +1208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1228
1208
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1229
1209
|
type: Inject,
|
|
1230
1210
|
args: [DEFAULT_SHOP]
|
|
1231
|
-
}] }]
|
|
1211
|
+
}] }] });
|
|
1232
1212
|
|
|
1233
1213
|
class CartService {
|
|
1234
1214
|
constructor(authService, checkoutService, defaultShop, productRepository, categoryRepository, variantRepository, buy2WinRepository) {
|
|
@@ -1478,12 +1458,12 @@ class CartService {
|
|
|
1478
1458
|
});
|
|
1479
1459
|
});
|
|
1480
1460
|
}
|
|
1461
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'VariantRepository' }, { token: 'Buy2WinRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1462
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService }); }
|
|
1481
1463
|
}
|
|
1482
|
-
|
|
1483
|
-
CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService });
|
|
1484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CartService, decorators: [{
|
|
1464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CartService, decorators: [{
|
|
1485
1465
|
type: Injectable
|
|
1486
|
-
}], ctorParameters:
|
|
1466
|
+
}], ctorParameters: () => [{ type: AuthService }, { type: CheckoutService }, { type: i1$2.Shops, decorators: [{
|
|
1487
1467
|
type: Inject,
|
|
1488
1468
|
args: [DEFAULT_SHOP]
|
|
1489
1469
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1498,7 +1478,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1498
1478
|
}] }, { type: i1$2.Buy2WinFirestoreRepository, decorators: [{
|
|
1499
1479
|
type: Inject,
|
|
1500
1480
|
args: ['Buy2WinRepository']
|
|
1501
|
-
}] }]
|
|
1481
|
+
}] }] });
|
|
1482
|
+
|
|
1483
|
+
class NewCategoryStructureAdapter {
|
|
1484
|
+
constructor(categoryRepository) {
|
|
1485
|
+
this.categoryRepository = categoryRepository;
|
|
1486
|
+
}
|
|
1487
|
+
async buildProductFilterByCategory(category) {
|
|
1488
|
+
const loadedCategory = await this.getCategory(category);
|
|
1489
|
+
if (loadedCategory.isCollection)
|
|
1490
|
+
return { id: { operator: Where.IN, value: loadedCategory.products } };
|
|
1491
|
+
const categoryIds = [...(await this.getAllCategoriesIdFromCategory(category)), category.id.toString()];
|
|
1492
|
+
return {
|
|
1493
|
+
category: {
|
|
1494
|
+
id: {
|
|
1495
|
+
operator: Where.IN,
|
|
1496
|
+
value: categoryIds,
|
|
1497
|
+
},
|
|
1498
|
+
},
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
async getAllCategoriesIdFromCategory(category) {
|
|
1502
|
+
return this.categoryRepository
|
|
1503
|
+
.getChildren(+category.id)
|
|
1504
|
+
.then((categories) => categories.map((category) => category.id.toString()));
|
|
1505
|
+
}
|
|
1506
|
+
async getCategory(category) {
|
|
1507
|
+
return isNil(category.isCollection) || (category.isCollection && !category.products?.length)
|
|
1508
|
+
? this.categoryRepository.get({ id: category.id })
|
|
1509
|
+
: category;
|
|
1510
|
+
}
|
|
1511
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1512
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter }); }
|
|
1513
|
+
}
|
|
1514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1515
|
+
type: Injectable
|
|
1516
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1517
|
+
type: Inject,
|
|
1518
|
+
args: ['CategoryRepository']
|
|
1519
|
+
}] }] });
|
|
1520
|
+
|
|
1521
|
+
class OldCategoryStructureAdapter {
|
|
1522
|
+
constructor(categoryRepository) {
|
|
1523
|
+
this.categoryRepository = categoryRepository;
|
|
1524
|
+
}
|
|
1525
|
+
async buildProductFilterByCategory(category) {
|
|
1526
|
+
const productsIds = category.products?.length
|
|
1527
|
+
? category.products
|
|
1528
|
+
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1529
|
+
return { id: { operator: Where.IN, value: productsIds } };
|
|
1530
|
+
}
|
|
1531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1532
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter }); }
|
|
1533
|
+
}
|
|
1534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1535
|
+
type: Injectable
|
|
1536
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1537
|
+
type: Inject,
|
|
1538
|
+
args: ['CategoryRepository']
|
|
1539
|
+
}] }] });
|
|
1502
1540
|
|
|
1503
1541
|
class CatalogService {
|
|
1504
1542
|
constructor(productRepository, categoryStructureAdapter, shop, productIndex) {
|
|
@@ -1649,12 +1687,12 @@ class CatalogService {
|
|
|
1649
1687
|
return [...new Set(sorted.map(({ _source }) => _source.id))];
|
|
1650
1688
|
}));
|
|
1651
1689
|
}
|
|
1690
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, deps: [{ token: 'ProductRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1691
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService }); }
|
|
1652
1692
|
}
|
|
1653
|
-
|
|
1654
|
-
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
1655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
1693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CatalogService, decorators: [{
|
|
1656
1694
|
type: Injectable
|
|
1657
|
-
}], ctorParameters:
|
|
1695
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1658
1696
|
type: Inject,
|
|
1659
1697
|
args: ['ProductRepository']
|
|
1660
1698
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1663,7 +1701,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1663
1701
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1664
1702
|
type: Inject,
|
|
1665
1703
|
args: [DEFAULT_SHOP]
|
|
1666
|
-
}] }, { type: i1$2.ProductsIndex }]
|
|
1704
|
+
}] }, { type: i1$2.ProductsIndex }] });
|
|
1667
1705
|
|
|
1668
1706
|
class CategoryService {
|
|
1669
1707
|
constructor(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop) {
|
|
@@ -1689,12 +1727,12 @@ class CategoryService {
|
|
|
1689
1727
|
.find({ filters: { categoryId: +category.id } })
|
|
1690
1728
|
.then(({ data }) => data.map((categoryFilter) => categoryFilter.filter));
|
|
1691
1729
|
}
|
|
1730
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService, deps: [{ token: 'ProductRepository' }, { token: 'CategoryRepository' }, { token: 'CategoryFilterRepository' }, { token: CATEGORY_STRUCTURE }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1731
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService }); }
|
|
1692
1732
|
}
|
|
1693
|
-
|
|
1694
|
-
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CategoryService, decorators: [{
|
|
1696
1734
|
type: Injectable
|
|
1697
|
-
}], ctorParameters:
|
|
1735
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1698
1736
|
type: Inject,
|
|
1699
1737
|
args: ['ProductRepository']
|
|
1700
1738
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1709,7 +1747,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1709
1747
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1710
1748
|
type: Inject,
|
|
1711
1749
|
args: [DEFAULT_SHOP]
|
|
1712
|
-
}] }]
|
|
1750
|
+
}] }] });
|
|
1713
1751
|
|
|
1714
1752
|
var ProductSorts;
|
|
1715
1753
|
(function (ProductSorts) {
|
|
@@ -1729,71 +1767,14 @@ __decorate([
|
|
|
1729
1767
|
__metadata("design:type", Array)
|
|
1730
1768
|
], CategoryWithTree.prototype, "children", void 0);
|
|
1731
1769
|
|
|
1732
|
-
class NewCategoryStructureAdapter {
|
|
1733
|
-
constructor(categoryRepository) {
|
|
1734
|
-
this.categoryRepository = categoryRepository;
|
|
1735
|
-
}
|
|
1736
|
-
async buildProductFilterByCategory(category) {
|
|
1737
|
-
const loadedCategory = await this.getCategory(category);
|
|
1738
|
-
if (loadedCategory.isCollection)
|
|
1739
|
-
return { id: { operator: Where.IN, value: loadedCategory.products } };
|
|
1740
|
-
const categoryIds = [...(await this.getAllCategoriesIdFromCategory(category)), category.id.toString()];
|
|
1741
|
-
return {
|
|
1742
|
-
category: {
|
|
1743
|
-
id: {
|
|
1744
|
-
operator: Where.IN,
|
|
1745
|
-
value: categoryIds,
|
|
1746
|
-
},
|
|
1747
|
-
},
|
|
1748
|
-
};
|
|
1749
|
-
}
|
|
1750
|
-
async getAllCategoriesIdFromCategory(category) {
|
|
1751
|
-
return this.categoryRepository
|
|
1752
|
-
.getChildren(+category.id)
|
|
1753
|
-
.then((categories) => categories.map((category) => category.id.toString()));
|
|
1754
|
-
}
|
|
1755
|
-
async getCategory(category) {
|
|
1756
|
-
return isNil(category.isCollection) || (category.isCollection && !category.products?.length)
|
|
1757
|
-
? this.categoryRepository.get({ id: category.id })
|
|
1758
|
-
: category;
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
NewCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1762
|
-
NewCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter });
|
|
1763
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: NewCategoryStructureAdapter, decorators: [{
|
|
1764
|
-
type: Injectable
|
|
1765
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1766
|
-
type: Inject,
|
|
1767
|
-
args: ['CategoryRepository']
|
|
1768
|
-
}] }]; } });
|
|
1769
|
-
|
|
1770
|
-
class OldCategoryStructureAdapter {
|
|
1771
|
-
constructor(categoryRepository) {
|
|
1772
|
-
this.categoryRepository = categoryRepository;
|
|
1773
|
-
}
|
|
1774
|
-
async buildProductFilterByCategory(category) {
|
|
1775
|
-
const productsIds = category.products?.length
|
|
1776
|
-
? category.products
|
|
1777
|
-
: await this.categoryRepository.get({ id: category.id }).then((categoryFound) => categoryFound.products);
|
|
1778
|
-
return { id: { operator: Where.IN, value: productsIds } };
|
|
1779
|
-
}
|
|
1780
|
-
}
|
|
1781
|
-
OldCategoryStructureAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, deps: [{ token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1782
|
-
OldCategoryStructureAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter });
|
|
1783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OldCategoryStructureAdapter, decorators: [{
|
|
1784
|
-
type: Injectable
|
|
1785
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1786
|
-
type: Inject,
|
|
1787
|
-
args: ['CategoryRepository']
|
|
1788
|
-
}] }]; } });
|
|
1789
|
-
|
|
1790
1770
|
class WishlistService {
|
|
1791
|
-
constructor(wishlistRepository, shop, productRepository, categoryFilterRepository, productIndex) {
|
|
1771
|
+
constructor(wishlistRepository, categoryRepository, shop, productRepository, categoryFilterRepository, productIndex) {
|
|
1792
1772
|
this.wishlistRepository = wishlistRepository;
|
|
1773
|
+
this.categoryRepository = categoryRepository;
|
|
1793
1774
|
this.shop = shop;
|
|
1794
1775
|
const categoryStructureAdapter = new NewCategoryStructureAdapter(wishlistRepository);
|
|
1795
1776
|
this.catalogService = new CatalogService(productRepository, categoryStructureAdapter, shop, productIndex);
|
|
1796
|
-
this.categoryService = new CategoryService(productRepository,
|
|
1777
|
+
this.categoryService = new CategoryService(productRepository, categoryRepository, categoryFilterRepository, categoryStructureAdapter, shop);
|
|
1797
1778
|
}
|
|
1798
1779
|
getCatalogService() {
|
|
1799
1780
|
return this.catalogService;
|
|
@@ -1801,7 +1782,7 @@ class WishlistService {
|
|
|
1801
1782
|
getCategoryService() {
|
|
1802
1783
|
return this.categoryService;
|
|
1803
1784
|
}
|
|
1804
|
-
async create(personId, title, description, userFullName, userPhoto) {
|
|
1785
|
+
async create({ personId, title, description, userFullName, userPhoto, theme, bannerUrl, }) {
|
|
1805
1786
|
const data = {
|
|
1806
1787
|
slug: '',
|
|
1807
1788
|
name: title,
|
|
@@ -1817,11 +1798,14 @@ class WishlistService {
|
|
|
1817
1798
|
personPhoto: userPhoto,
|
|
1818
1799
|
brandCategory: false,
|
|
1819
1800
|
published: true,
|
|
1801
|
+
theme,
|
|
1802
|
+
bannerUrl,
|
|
1820
1803
|
};
|
|
1821
1804
|
const newWishlist = await this.wishlistRepository.create(data);
|
|
1822
|
-
|
|
1805
|
+
await this.wishlistRepository.update({ id: newWishlist.id, slug: newWishlist.id });
|
|
1806
|
+
return Wishlist.toInstance({ ...newWishlist.toPlain(), slug: newWishlist.id });
|
|
1823
1807
|
}
|
|
1824
|
-
update(id, title, description, userFullName, userPhoto) {
|
|
1808
|
+
update({ id, title, description, userFullName, userPhoto, theme, bannerUrl, }) {
|
|
1825
1809
|
const data = {
|
|
1826
1810
|
id,
|
|
1827
1811
|
name: title,
|
|
@@ -1832,6 +1816,8 @@ class WishlistService {
|
|
|
1832
1816
|
},
|
|
1833
1817
|
personName: userFullName,
|
|
1834
1818
|
personPhoto: userPhoto,
|
|
1819
|
+
theme,
|
|
1820
|
+
bannerUrl,
|
|
1835
1821
|
};
|
|
1836
1822
|
return this.wishlistRepository.update(data);
|
|
1837
1823
|
}
|
|
@@ -1867,14 +1853,17 @@ class WishlistService {
|
|
|
1867
1853
|
}
|
|
1868
1854
|
return wishlist;
|
|
1869
1855
|
}
|
|
1856
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, deps: [{ token: 'WishlistRepository' }, { token: 'CategoryRepository' }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'CategoryFilterRepository' }, { token: i1$2.ProductsIndex }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1857
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService }); }
|
|
1870
1858
|
}
|
|
1871
|
-
|
|
1872
|
-
WishlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService });
|
|
1873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: WishlistService, decorators: [{
|
|
1859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: WishlistService, decorators: [{
|
|
1874
1860
|
type: Injectable
|
|
1875
|
-
}], ctorParameters:
|
|
1861
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1876
1862
|
type: Inject,
|
|
1877
1863
|
args: ['WishlistRepository']
|
|
1864
|
+
}] }, { type: undefined, decorators: [{
|
|
1865
|
+
type: Inject,
|
|
1866
|
+
args: ['CategoryRepository']
|
|
1878
1867
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
1879
1868
|
type: Inject,
|
|
1880
1869
|
args: [DEFAULT_SHOP]
|
|
@@ -1884,7 +1873,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1884
1873
|
}] }, { type: undefined, decorators: [{
|
|
1885
1874
|
type: Inject,
|
|
1886
1875
|
args: ['CategoryFilterRepository']
|
|
1887
|
-
}] }, { type: i1$2.ProductsIndex }]
|
|
1876
|
+
}] }, { type: i1$2.ProductsIndex }] });
|
|
1888
1877
|
|
|
1889
1878
|
class CheckoutSubscriptionService {
|
|
1890
1879
|
constructor(checkoutSubscriptionRepository, subscriptionRepository, couponService) {
|
|
@@ -1918,18 +1907,18 @@ class CheckoutSubscriptionService {
|
|
|
1918
1907
|
calcDiscountSubscription(coupon) {
|
|
1919
1908
|
return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.calcDiscountSubscription(coupon, checkout).pipe()));
|
|
1920
1909
|
}
|
|
1910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: 'SubscriptionRepository' }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1911
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService }); }
|
|
1921
1912
|
}
|
|
1922
|
-
|
|
1923
|
-
CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService });
|
|
1924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
|
|
1925
1914
|
type: Injectable
|
|
1926
|
-
}], ctorParameters:
|
|
1915
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1927
1916
|
type: Inject,
|
|
1928
1917
|
args: ['CheckoutSubscriptionRepository']
|
|
1929
1918
|
}] }, { type: undefined, decorators: [{
|
|
1930
1919
|
type: Inject,
|
|
1931
1920
|
args: ['SubscriptionRepository']
|
|
1932
|
-
}] }, { type: CouponService }]
|
|
1921
|
+
}] }, { type: CouponService }] });
|
|
1933
1922
|
|
|
1934
1923
|
class UtilHelper {
|
|
1935
1924
|
static createSlug(name) {
|
|
@@ -2037,12 +2026,12 @@ class HomeShopService {
|
|
|
2037
2026
|
data,
|
|
2038
2027
|
})).pipe(tap(() => (this.homeConfiguration.data = data)), map(() => this.homeConfiguration));
|
|
2039
2028
|
}
|
|
2029
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService, deps: [{ token: 'CategoryRepository' }, { token: 'HomeRepository' }, { token: 'ProductRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2030
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService }); }
|
|
2040
2031
|
}
|
|
2041
|
-
|
|
2042
|
-
HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService });
|
|
2043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: HomeShopService, decorators: [{
|
|
2032
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: HomeShopService, decorators: [{
|
|
2044
2033
|
type: Injectable
|
|
2045
|
-
}], ctorParameters:
|
|
2034
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2046
2035
|
type: Inject,
|
|
2047
2036
|
args: ['CategoryRepository']
|
|
2048
2037
|
}] }, { type: undefined, decorators: [{
|
|
@@ -2054,7 +2043,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2054
2043
|
}] }, { type: i1$2.Shops, decorators: [{
|
|
2055
2044
|
type: Inject,
|
|
2056
2045
|
args: [DEFAULT_SHOP]
|
|
2057
|
-
}] }]
|
|
2046
|
+
}] }] });
|
|
2058
2047
|
|
|
2059
2048
|
class OrderService {
|
|
2060
2049
|
constructor(angularFirestore, orderRepository) {
|
|
@@ -2068,15 +2057,15 @@ class OrderService {
|
|
|
2068
2057
|
.subscribe((doc) => this.orderSubject.next(doc));
|
|
2069
2058
|
return this.orderSubject;
|
|
2070
2059
|
}
|
|
2060
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService, deps: [{ token: i1$1.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2061
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService }); }
|
|
2071
2062
|
}
|
|
2072
|
-
|
|
2073
|
-
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
2074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
2063
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: OrderService, decorators: [{
|
|
2075
2064
|
type: Injectable
|
|
2076
|
-
}], ctorParameters:
|
|
2065
|
+
}], ctorParameters: () => [{ type: i1$1.Firestore }, { type: i1$2.OrderFirestoreRepository, decorators: [{
|
|
2077
2066
|
type: Inject,
|
|
2078
2067
|
args: ['OrderRepository']
|
|
2079
|
-
}] }]
|
|
2068
|
+
}] }] });
|
|
2080
2069
|
|
|
2081
2070
|
class ShippingService {
|
|
2082
2071
|
constructor(http, apiUrl, homeService) {
|
|
@@ -2154,15 +2143,15 @@ class ShippingService {
|
|
|
2154
2143
|
}
|
|
2155
2144
|
return false;
|
|
2156
2145
|
}
|
|
2146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService, deps: [{ token: i1$3.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2147
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService }); }
|
|
2157
2148
|
}
|
|
2158
|
-
|
|
2159
|
-
ShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService });
|
|
2160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ShippingService, decorators: [{
|
|
2149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: ShippingService, decorators: [{
|
|
2161
2150
|
type: Injectable
|
|
2162
|
-
}], ctorParameters:
|
|
2151
|
+
}], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: undefined, decorators: [{
|
|
2163
2152
|
type: Inject,
|
|
2164
2153
|
args: [BACKEND_URL]
|
|
2165
|
-
}] }, { type: HomeShopService }]
|
|
2154
|
+
}] }, { type: HomeShopService }] });
|
|
2166
2155
|
|
|
2167
2156
|
class AngularConnectModule {
|
|
2168
2157
|
static initializeApp(defaultShop, options, nameOrConfig) {
|
|
@@ -2181,49 +2170,41 @@ class AngularConnectModule {
|
|
|
2181
2170
|
...(isNil(options?.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]),
|
|
2182
2171
|
...(isNil(options?.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]),
|
|
2183
2172
|
...(isNil(options?.backendUrl) ? [] : [{ provide: BACKEND_URL, useValue: options.backendUrl }]),
|
|
2184
|
-
...(isNil(options?.storageBaseUrl) ? [] : [{ provide: STORAGE_BASE_URL, useValue: options.storageBaseUrl }]),
|
|
2185
2173
|
],
|
|
2186
2174
|
};
|
|
2187
2175
|
}
|
|
2176
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2177
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
|
|
2178
|
+
AngularFirebaseAuthModule,
|
|
2179
|
+
AngularFirestoreModule,
|
|
2180
|
+
AngularHasuraGraphQLModule] }); }
|
|
2181
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2182
|
+
AuthService,
|
|
2183
|
+
CartService,
|
|
2184
|
+
CatalogService,
|
|
2185
|
+
CategoryService,
|
|
2186
|
+
CheckoutService,
|
|
2187
|
+
CheckoutSubscriptionService,
|
|
2188
|
+
CouponService,
|
|
2189
|
+
HomeShopService,
|
|
2190
|
+
OrderService,
|
|
2191
|
+
ShippingService,
|
|
2192
|
+
WishlistService,
|
|
2193
|
+
], imports: [provideFirebaseApp((injector) => {
|
|
2194
|
+
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2195
|
+
try {
|
|
2196
|
+
return getApp(appName);
|
|
2197
|
+
}
|
|
2198
|
+
catch (error) {
|
|
2199
|
+
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2200
|
+
}
|
|
2201
|
+
}),
|
|
2202
|
+
AngularElasticSeachModule,
|
|
2203
|
+
AngularFirebaseAuthModule,
|
|
2204
|
+
AngularFirestoreModule,
|
|
2205
|
+
AngularHasuraGraphQLModule] }); }
|
|
2188
2206
|
}
|
|
2189
|
-
|
|
2190
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$4.FirebaseAppModule, AngularElasticSeachModule,
|
|
2191
|
-
AngularFirebaseAuthModule,
|
|
2192
|
-
AngularFirestoreModule,
|
|
2193
|
-
AngularHasuraGraphQLModule] });
|
|
2194
|
-
AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, providers: [
|
|
2195
|
-
AuthService,
|
|
2196
|
-
CartService,
|
|
2197
|
-
CatalogService,
|
|
2198
|
-
CategoryService,
|
|
2199
|
-
CheckoutService,
|
|
2200
|
-
CheckoutSubscriptionService,
|
|
2201
|
-
CouponService,
|
|
2202
|
-
HomeShopService,
|
|
2203
|
-
OrderService,
|
|
2204
|
-
ShippingService,
|
|
2205
|
-
WishlistService,
|
|
2206
|
-
{
|
|
2207
|
-
provide: UpdateUserImage,
|
|
2208
|
-
useFactory: (userRepository, fileUploader) => {
|
|
2209
|
-
return new UpdateUserImage(userRepository, fileUploader);
|
|
2210
|
-
},
|
|
2211
|
-
deps: ['UserRepository', 'FileUploaderService'],
|
|
2212
|
-
},
|
|
2213
|
-
], imports: [provideFirebaseApp((injector) => {
|
|
2214
|
-
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2215
|
-
try {
|
|
2216
|
-
return getApp(appName);
|
|
2217
|
-
}
|
|
2218
|
-
catch (error) {
|
|
2219
|
-
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2220
|
-
}
|
|
2221
|
-
}),
|
|
2222
|
-
AngularElasticSeachModule,
|
|
2223
|
-
AngularFirebaseAuthModule,
|
|
2224
|
-
AngularFirestoreModule,
|
|
2225
|
-
AngularHasuraGraphQLModule] });
|
|
2226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.3", ngImport: i0, type: AngularConnectModule, decorators: [{
|
|
2227
2208
|
type: NgModule,
|
|
2228
2209
|
args: [{
|
|
2229
2210
|
imports: [
|
|
@@ -2253,13 +2234,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2253
2234
|
OrderService,
|
|
2254
2235
|
ShippingService,
|
|
2255
2236
|
WishlistService,
|
|
2256
|
-
{
|
|
2257
|
-
provide: UpdateUserImage,
|
|
2258
|
-
useFactory: (userRepository, fileUploader) => {
|
|
2259
|
-
return new UpdateUserImage(userRepository, fileUploader);
|
|
2260
|
-
},
|
|
2261
|
-
deps: ['UserRepository', 'FileUploaderService'],
|
|
2262
|
-
},
|
|
2263
2237
|
],
|
|
2264
2238
|
}]
|
|
2265
2239
|
}] });
|
|
@@ -2268,5 +2242,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2268
2242
|
* Generated bundle index. Do not edit.
|
|
2269
2243
|
*/
|
|
2270
2244
|
|
|
2271
|
-
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CouponService, HomeShopService, OrderService, ProductSorts, ShippingService, UtilHelper, WishlistService };
|
|
2245
|
+
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderService, ProductSorts, ShippingService, UtilHelper, WishlistService };
|
|
2272
2246
|
//# sourceMappingURL=infrab4a-connect-angular.mjs.map
|