@infrab4a/connect-angular 4.1.2-beta.14 → 4.1.2-beta.16
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/esm2020/angular-connect.module.mjs +1 -9
- package/esm2020/angular-firestore.module.mjs +17 -9
- package/fesm2015/infrab4a-connect-angular.mjs +16 -16
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +16 -16
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -6,9 +6,9 @@ import * as i1$2 from '@infrab4a/connect';
|
|
|
6
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, 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';
|
|
7
7
|
import * as i1 from '@angular/fire/auth';
|
|
8
8
|
import { Auth, provideAuth, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
9
|
-
import { isPlatformBrowser } from '@angular/common';
|
|
9
|
+
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
|
|
10
10
|
import * as i1$1 from '@angular/fire/firestore';
|
|
11
|
-
import { Firestore, provideFirestore, getFirestore, initializeFirestore,
|
|
11
|
+
import { Firestore, provideFirestore, getFirestore, initializeFirestore, memoryLocalCache, docSnapshots, doc } from '@angular/fire/firestore';
|
|
12
12
|
import { combineLatest, from, of, throwError, Subject, iif, forkJoin } from 'rxjs';
|
|
13
13
|
import { map, mergeMap, catchError, concatMap, tap } from 'rxjs/operators';
|
|
14
14
|
import cookie from 'js-cookie';
|
|
@@ -389,10 +389,14 @@ AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
389
389
|
], imports: [AngularElasticSeachModule,
|
|
390
390
|
provideFirestore((injector) => {
|
|
391
391
|
const platformId = injector.get(PLATFORM_ID);
|
|
392
|
-
if (
|
|
392
|
+
if (isPlatformServer(platformId))
|
|
393
393
|
return getFirestore(injector.get(FirebaseApp));
|
|
394
|
-
|
|
395
|
-
|
|
394
|
+
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
395
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
396
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
397
|
+
experimentalForceLongPolling: true,
|
|
398
|
+
localCache: memoryLocalCache(),
|
|
399
|
+
});
|
|
396
400
|
return firestore;
|
|
397
401
|
})] });
|
|
398
402
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularFirestoreModule, decorators: [{
|
|
@@ -402,10 +406,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
402
406
|
AngularElasticSeachModule,
|
|
403
407
|
provideFirestore((injector) => {
|
|
404
408
|
const platformId = injector.get(PLATFORM_ID);
|
|
405
|
-
if (
|
|
409
|
+
if (isPlatformServer(platformId))
|
|
410
|
+
return getFirestore(injector.get(FirebaseApp));
|
|
411
|
+
if (!MobileOperationSystemCheckerHelper.isAppleDevice())
|
|
406
412
|
return getFirestore(injector.get(FirebaseApp));
|
|
407
|
-
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
408
|
-
|
|
413
|
+
const firestore = initializeFirestore(injector.get(FirebaseApp), {
|
|
414
|
+
experimentalForceLongPolling: true,
|
|
415
|
+
localCache: memoryLocalCache(),
|
|
416
|
+
});
|
|
409
417
|
return firestore;
|
|
410
418
|
}),
|
|
411
419
|
],
|
|
@@ -2080,14 +2088,10 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2080
2088
|
WishlistService,
|
|
2081
2089
|
], imports: [provideFirebaseApp((injector) => {
|
|
2082
2090
|
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2083
|
-
console.log('fire', appName);
|
|
2084
|
-
console.log('options', FIREBASE_OPTIONS);
|
|
2085
|
-
console.log('fire', getApp);
|
|
2086
2091
|
try {
|
|
2087
2092
|
return getApp(appName);
|
|
2088
2093
|
}
|
|
2089
2094
|
catch (error) {
|
|
2090
|
-
console.log('initializeApp', error instanceof Error && error.message);
|
|
2091
2095
|
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2092
2096
|
}
|
|
2093
2097
|
}),
|
|
@@ -2101,14 +2105,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2101
2105
|
imports: [
|
|
2102
2106
|
provideFirebaseApp((injector) => {
|
|
2103
2107
|
const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
|
|
2104
|
-
console.log('fire', appName);
|
|
2105
|
-
console.log('options', FIREBASE_OPTIONS);
|
|
2106
|
-
console.log('fire', getApp);
|
|
2107
2108
|
try {
|
|
2108
2109
|
return getApp(appName);
|
|
2109
2110
|
}
|
|
2110
2111
|
catch (error) {
|
|
2111
|
-
console.log('initializeApp', error instanceof Error && error.message);
|
|
2112
2112
|
return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
|
|
2113
2113
|
}
|
|
2114
2114
|
}),
|