ngx-firebase 1.1.12 → 22.0.0
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/README.md +51 -11
- package/fesm2022/ngx-firebase.mjs +158 -0
- package/fesm2022/ngx-firebase.mjs.map +1 -0
- package/package.json +40 -30
- package/types/ngx-firebase.d.ts +55 -0
- package/bundles/ngx-firebase-capacitor.umd.js +0 -763
- package/bundles/ngx-firebase-capacitor.umd.js.map +0 -1
- package/bundles/ngx-firebase-capacitor.umd.min.js +0 -16
- package/bundles/ngx-firebase-capacitor.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-iap.umd.js +0 -718
- package/bundles/ngx-firebase-iap.umd.js.map +0 -1
- package/bundles/ngx-firebase-iap.umd.min.js +0 -2
- package/bundles/ngx-firebase-iap.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-ionic-auth-ui.umd.js +0 -2116
- package/bundles/ngx-firebase-ionic-auth-ui.umd.js.map +0 -1
- package/bundles/ngx-firebase-ionic-auth-ui.umd.min.js +0 -16
- package/bundles/ngx-firebase-ionic-auth-ui.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-ionic.umd.js +0 -979
- package/bundles/ngx-firebase-ionic.umd.js.map +0 -1
- package/bundles/ngx-firebase-ionic.umd.min.js +0 -16
- package/bundles/ngx-firebase-ionic.umd.min.js.map +0 -1
- package/bundles/ngx-firebase-testing.umd.js +0 -801
- package/bundles/ngx-firebase-testing.umd.js.map +0 -1
- package/bundles/ngx-firebase-testing.umd.min.js +0 -2
- package/bundles/ngx-firebase-testing.umd.min.js.map +0 -1
- package/bundles/ngx-firebase.umd.js +0 -2271
- package/bundles/ngx-firebase.umd.js.map +0 -1
- package/bundles/ngx-firebase.umd.min.js +0 -2
- package/bundles/ngx-firebase.umd.min.js.map +0 -1
- package/capacitor/capacitor.module.d.ts +0 -9
- package/capacitor/interfaces/config.d.ts +0 -12
- package/capacitor/interfaces/index.d.ts +0 -1
- package/capacitor/ngx-firebase-capacitor.d.ts +0 -5
- package/capacitor/ngx-firebase-capacitor.metadata.json +0 -1
- package/capacitor/package.json +0 -25
- package/capacitor/public-api.d.ts +0 -3
- package/capacitor/services/analytics-firebase-capacitor.service.d.ts +0 -9
- package/capacitor/services/crashlytics-firebase-capacitor.service.d.ts +0 -8
- package/capacitor/services/credential-factory-capacitor.service.d.ts +0 -18
- package/capacitor/services/index.d.ts +0 -3
- package/esm2015/capacitor/capacitor.module.js +0 -78
- package/esm2015/capacitor/interfaces/config.js +0 -3
- package/esm2015/capacitor/interfaces/index.js +0 -2
- package/esm2015/capacitor/ngx-firebase-capacitor.js +0 -6
- package/esm2015/capacitor/public-api.js +0 -4
- package/esm2015/capacitor/services/analytics-firebase-capacitor.service.js +0 -43
- package/esm2015/capacitor/services/crashlytics-firebase-capacitor.service.js +0 -40
- package/esm2015/capacitor/services/credential-factory-capacitor.service.js +0 -182
- package/esm2015/capacitor/services/index.js +0 -4
- package/esm2015/iap/iap.module.js +0 -32
- package/esm2015/iap/interfaces/index.js +0 -5
- package/esm2015/iap/ngx-firebase-iap.js +0 -5
- package/esm2015/iap/public-api.js +0 -5
- package/esm2015/iap/services/iap.service.js +0 -317
- package/esm2015/iap/tokens/index.js +0 -4
- package/esm2015/ionic/animations/index.js +0 -30
- package/esm2015/ionic/components/avatar/avatar.component.js +0 -98
- package/esm2015/ionic/components/avatar/index.js +0 -2
- package/esm2015/ionic/components/index.js +0 -3
- package/esm2015/ionic/components/popover-menu/index.js +0 -3
- package/esm2015/ionic/components/popover-menu/interface.js +0 -2
- package/esm2015/ionic/components/popover-menu/popover-menu.component.js +0 -34
- package/esm2015/ionic/ionic.module.js +0 -46
- package/esm2015/ionic/ngx-firebase-ionic.js +0 -5
- package/esm2015/ionic/public-api.js +0 -5
- package/esm2015/ionic/services/alerts-ionic.service.js +0 -107
- package/esm2015/ionic/services/index.js +0 -6
- package/esm2015/ionic/services/legality-dialog-ionic.service.js +0 -85
- package/esm2015/ionic/services/loading-ionic.service.js +0 -46
- package/esm2015/ionic/services/picker-ionic.service.js +0 -44
- package/esm2015/ionic/services/toast-ionic.service.js +0 -49
- package/esm2015/ionic-auth-ui/animations/index.js +0 -30
- package/esm2015/ionic-auth-ui/components/email-confirmation/email-confirmation.component.js +0 -99
- package/esm2015/ionic-auth-ui/components/email-field/email-field.component.js +0 -25
- package/esm2015/ionic-auth-ui/components/form-field/form-field.component.js +0 -82
- package/esm2015/ionic-auth-ui/components/index.js +0 -12
- package/esm2015/ionic-auth-ui/components/name-field/name-field.component.js +0 -30
- package/esm2015/ionic-auth-ui/components/or-divider/or-divider.component.js +0 -11
- package/esm2015/ionic-auth-ui/components/password-field/password-field.component.js +0 -138
- package/esm2015/ionic-auth-ui/components/password-field/passwordValidatorFunctions.js +0 -62
- package/esm2015/ionic-auth-ui/components/providers/providers.component.js +0 -70
- package/esm2015/ionic-auth-ui/components/reauthenticate/reauthenticate.component.js +0 -99
- package/esm2015/ionic-auth-ui/components/register/register.component.js +0 -142
- package/esm2015/ionic-auth-ui/components/register-with-email/register-with-email.component.js +0 -60
- package/esm2015/ionic-auth-ui/components/register-with-email-popover/register-with-email-popover.component.js +0 -26
- package/esm2015/ionic-auth-ui/components/signin/signin.component.js +0 -92
- package/esm2015/ionic-auth-ui/components/terms-field/terms-field.component.js +0 -99
- package/esm2015/ionic-auth-ui/components/user/user.component.js +0 -195
- package/esm2015/ionic-auth-ui/ionic-auth-ui.module.js +0 -92
- package/esm2015/ionic-auth-ui/ngx-firebase-ionic-auth-ui.js +0 -23
- package/esm2015/ionic-auth-ui/pages/index.js +0 -5
- package/esm2015/ionic-auth-ui/pages/register/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/register/register.page.js +0 -56
- package/esm2015/ionic-auth-ui/pages/signin/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/signin/signin.page.js +0 -78
- package/esm2015/ionic-auth-ui/pages/user/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/user/user.page.js +0 -11
- package/esm2015/ionic-auth-ui/pages/verifyemail/index.js +0 -2
- package/esm2015/ionic-auth-ui/pages/verifyemail/verifyemail.page.js +0 -85
- package/esm2015/ionic-auth-ui/public-api.js +0 -5
- package/esm2015/ngx-firebase.js +0 -6
- package/esm2015/public-api.js +0 -6
- package/esm2015/shared/guards/index.js +0 -3
- package/esm2015/shared/guards/logged-in.guard.js +0 -60
- package/esm2015/shared/guards/verify-email.guard.js +0 -41
- package/esm2015/shared/interfaces/accounts.enum.js +0 -9
- package/esm2015/shared/interfaces/authprovider.enum.js +0 -15
- package/esm2015/shared/interfaces/config.interface.js +0 -61
- package/esm2015/shared/interfaces/index.js +0 -8
- package/esm2015/shared/interfaces/main.interface.js +0 -7
- package/esm2015/shared/interfaces/providers.interface.js +0 -2
- package/esm2015/shared/interfaces/tokens.js +0 -19
- package/esm2015/shared/interfaces/ui-providers.interface.js +0 -2
- package/esm2015/shared/services/analytics.service.js +0 -24
- package/esm2015/shared/services/auth-process.service.js +0 -752
- package/esm2015/shared/services/crashlytics.service.js +0 -42
- package/esm2015/shared/services/device-info.service.js +0 -14
- package/esm2015/shared/services/firebase.service.js +0 -37
- package/esm2015/shared/services/firestore-sync.service.js +0 -60
- package/esm2015/shared/services/index.js +0 -10
- package/esm2015/shared/services/performance.service.js +0 -28
- package/esm2015/shared/services/remoteconfig.service.js +0 -49
- package/esm2015/shared/services/ui.service.js +0 -45
- package/esm2015/shared/shared.module.js +0 -175
- package/esm2015/shared/types/DisplayWidth.js +0 -9
- package/esm2015/shared/types/Location.js +0 -2
- package/esm2015/shared/types/ValueAccessorControlComponent.js +0 -85
- package/esm2015/shared/types/ValueAccessorValueComponent.js +0 -40
- package/esm2015/shared/types/index.js +0 -5
- package/esm2015/testing/fakeavatar.module.js +0 -22
- package/esm2015/testing/fakes/FakeAuthProcessService.js +0 -31
- package/esm2015/testing/fakes/FakeAvatarComponent.js +0 -13
- package/esm2015/testing/fakes/FakeFireService.js +0 -21
- package/esm2015/testing/fakes/FakeFirestoreSyncService.js +0 -11
- package/esm2015/testing/fakes/FakeIAPurchaseService.js +0 -11
- package/esm2015/testing/fakes/FakePickerService.js +0 -9
- package/esm2015/testing/fakes/FakeRemoteConfigService.js +0 -44
- package/esm2015/testing/fakes/FakeTranslateService.js +0 -21
- package/esm2015/testing/fakes/FakeUiService.js +0 -26
- package/esm2015/testing/fakes/angular-fire/FakeAngularFireAuth.js +0 -30
- package/esm2015/testing/fakes/angular-fire/FakeAngularFireFunctions.js +0 -17
- package/esm2015/testing/fakes/angular-fire/FakeAngularFirePerformance.js +0 -17
- package/esm2015/testing/fakes/angular-fire/FakeAngularFireStorage.js +0 -8
- package/esm2015/testing/fakes/angular-fire/FakeAngularFirestore.js +0 -8
- package/esm2015/testing/fakes/angular-fire/FakeUserCredential.js +0 -18
- package/esm2015/testing/fakes/index.js +0 -19
- package/esm2015/testing/ngx-firebase-testing.js +0 -6
- package/esm2015/testing/public-api.js +0 -5
- package/esm2015/testing/test.module.js +0 -66
- package/esm2015/testing/utils/index.js +0 -17
- package/esm2015/testing/utils/patchConsole.js +0 -14
- package/fesm2015/ngx-firebase-capacitor.js +0 -328
- package/fesm2015/ngx-firebase-capacitor.js.map +0 -1
- package/fesm2015/ngx-firebase-iap.js +0 -354
- package/fesm2015/ngx-firebase-iap.js.map +0 -1
- package/fesm2015/ngx-firebase-ionic-auth-ui.js +0 -1482
- package/fesm2015/ngx-firebase-ionic-auth-ui.js.map +0 -1
- package/fesm2015/ngx-firebase-ionic.js +0 -495
- package/fesm2015/ngx-firebase-ionic.js.map +0 -1
- package/fesm2015/ngx-firebase-testing.js +0 -388
- package/fesm2015/ngx-firebase-testing.js.map +0 -1
- package/fesm2015/ngx-firebase.js +0 -1482
- package/fesm2015/ngx-firebase.js.map +0 -1
- package/iap/iap.module.d.ts +0 -5
- package/iap/interfaces/index.d.ts +0 -11
- package/iap/ngx-firebase-iap.d.ts +0 -4
- package/iap/ngx-firebase-iap.metadata.json +0 -1
- package/iap/package.json +0 -23
- package/iap/public-api.d.ts +0 -4
- package/iap/services/iap.service.d.ts +0 -47
- package/iap/tokens/index.d.ts +0 -3
- package/ionic/animations/index.d.ts +0 -1
- package/ionic/components/avatar/avatar.component.d.ts +0 -27
- package/ionic/components/avatar/index.d.ts +0 -1
- package/ionic/components/index.d.ts +0 -2
- package/ionic/components/popover-menu/index.d.ts +0 -2
- package/ionic/components/popover-menu/interface.d.ts +0 -6
- package/ionic/components/popover-menu/popover-menu.component.d.ts +0 -10
- package/ionic/ionic.module.d.ts +0 -2
- package/ionic/ngx-firebase-ionic.d.ts +0 -4
- package/ionic/ngx-firebase-ionic.metadata.json +0 -1
- package/ionic/package.json +0 -30
- package/ionic/public-api.d.ts +0 -4
- package/ionic/services/alerts-ionic.service.d.ts +0 -13
- package/ionic/services/index.d.ts +0 -5
- package/ionic/services/legality-dialog-ionic.service.d.ts +0 -10
- package/ionic/services/loading-ionic.service.d.ts +0 -17
- package/ionic/services/picker-ionic.service.d.ts +0 -9
- package/ionic/services/toast-ionic.service.d.ts +0 -11
- package/ionic-auth-ui/animations/index.d.ts +0 -1
- package/ionic-auth-ui/components/email-confirmation/email-confirmation.component.d.ts +0 -31
- package/ionic-auth-ui/components/email-field/email-field.component.d.ts +0 -7
- package/ionic-auth-ui/components/form-field/form-field.component.d.ts +0 -28
- package/ionic-auth-ui/components/index.d.ts +0 -11
- package/ionic-auth-ui/components/name-field/name-field.component.d.ts +0 -8
- package/ionic-auth-ui/components/or-divider/or-divider.component.d.ts +0 -2
- package/ionic-auth-ui/components/password-field/password-field.component.d.ts +0 -34
- package/ionic-auth-ui/components/password-field/passwordValidatorFunctions.d.ts +0 -4
- package/ionic-auth-ui/components/providers/providers.component.d.ts +0 -26
- package/ionic-auth-ui/components/reauthenticate/reauthenticate.component.d.ts +0 -30
- package/ionic-auth-ui/components/register/register.component.d.ts +0 -26
- package/ionic-auth-ui/components/register-with-email/register-with-email.component.d.ts +0 -24
- package/ionic-auth-ui/components/register-with-email-popover/register-with-email-popover.component.d.ts +0 -7
- package/ionic-auth-ui/components/signin/signin.component.d.ts +0 -28
- package/ionic-auth-ui/components/terms-field/terms-field.component.d.ts +0 -27
- package/ionic-auth-ui/components/user/user.component.d.ts +0 -45
- package/ionic-auth-ui/ionic-auth-ui.module.d.ts +0 -32
- package/ionic-auth-ui/ngx-firebase-ionic-auth-ui.d.ts +0 -22
- package/ionic-auth-ui/ngx-firebase-ionic-auth-ui.metadata.json +0 -1
- package/ionic-auth-ui/package.json +0 -30
- package/ionic-auth-ui/pages/index.d.ts +0 -4
- package/ionic-auth-ui/pages/register/index.d.ts +0 -1
- package/ionic-auth-ui/pages/register/register.page.d.ts +0 -16
- package/ionic-auth-ui/pages/signin/index.d.ts +0 -1
- package/ionic-auth-ui/pages/signin/signin.page.d.ts +0 -22
- package/ionic-auth-ui/pages/user/index.d.ts +0 -1
- package/ionic-auth-ui/pages/user/user.page.d.ts +0 -3
- package/ionic-auth-ui/pages/verifyemail/index.d.ts +0 -1
- package/ionic-auth-ui/pages/verifyemail/verifyemail.page.d.ts +0 -19
- package/ionic-auth-ui/public-api.d.ts +0 -4
- package/ngx-firebase.d.ts +0 -5
- package/ngx-firebase.metadata.json +0 -1
- package/public-api.d.ts +0 -5
- package/shared/guards/index.d.ts +0 -2
- package/shared/guards/logged-in.guard.d.ts +0 -13
- package/shared/guards/verify-email.guard.d.ts +0 -11
- package/shared/interfaces/accounts.enum.d.ts +0 -7
- package/shared/interfaces/authprovider.enum.d.ts +0 -13
- package/shared/interfaces/config.interface.d.ts +0 -63
- package/shared/interfaces/index.d.ts +0 -7
- package/shared/interfaces/main.interface.d.ts +0 -13
- package/shared/interfaces/providers.interface.d.ts +0 -63
- package/shared/interfaces/tokens.d.ts +0 -16
- package/shared/interfaces/ui-providers.interface.d.ts +0 -65
- package/shared/services/analytics.service.d.ts +0 -10
- package/shared/services/auth-process.service.d.ts +0 -172
- package/shared/services/crashlytics.service.d.ts +0 -11
- package/shared/services/device-info.service.d.ts +0 -3
- package/shared/services/firebase.service.d.ts +0 -16
- package/shared/services/firestore-sync.service.d.ts +0 -16
- package/shared/services/index.d.ts +0 -9
- package/shared/services/performance.service.d.ts +0 -12
- package/shared/services/remoteconfig.service.d.ts +0 -18
- package/shared/services/ui.service.d.ts +0 -22
- package/shared/shared.module.d.ts +0 -14
- package/shared/types/DisplayWidth.d.ts +0 -7
- package/shared/types/Location.d.ts +0 -8
- package/shared/types/ValueAccessorControlComponent.d.ts +0 -27
- package/shared/types/ValueAccessorValueComponent.d.ts +0 -19
- package/shared/types/index.d.ts +0 -4
- package/testing/fakeavatar.module.d.ts +0 -2
- package/testing/fakes/FakeAuthProcessService.d.ts +0 -28
- package/testing/fakes/FakeAvatarComponent.d.ts +0 -3
- package/testing/fakes/FakeFireService.d.ts +0 -20
- package/testing/fakes/FakeFirestoreSyncService.d.ts +0 -9
- package/testing/fakes/FakeIAPurchaseService.d.ts +0 -9
- package/testing/fakes/FakePickerService.d.ts +0 -6
- package/testing/fakes/FakeRemoteConfigService.d.ts +0 -19
- package/testing/fakes/FakeTranslateService.d.ts +0 -15
- package/testing/fakes/FakeUiService.d.ts +0 -25
- package/testing/fakes/angular-fire/FakeAngularFireAuth.d.ts +0 -52
- package/testing/fakes/angular-fire/FakeAngularFireFunctions.d.ts +0 -11
- package/testing/fakes/angular-fire/FakeAngularFirePerformance.d.ts +0 -10
- package/testing/fakes/angular-fire/FakeAngularFireStorage.d.ts +0 -5
- package/testing/fakes/angular-fire/FakeAngularFirestore.d.ts +0 -5
- package/testing/fakes/angular-fire/FakeUserCredential.d.ts +0 -9
- package/testing/fakes/index.d.ts +0 -16
- package/testing/ngx-firebase-testing.d.ts +0 -5
- package/testing/ngx-firebase-testing.metadata.json +0 -1
- package/testing/package.json +0 -29
- package/testing/public-api.d.ts +0 -4
- package/testing/test.module.d.ts +0 -4
- package/testing/utils/index.d.ts +0 -5
- package/testing/utils/patchConsole.d.ts +0 -4
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { FirebaseAppConfig } from '@angular/fire';
|
|
2
|
-
import { ConfigTemplate } from '@angular/fire/remote-config';
|
|
3
|
-
import { AuthProvider } from './authprovider.enum';
|
|
4
|
-
export interface MalAuthUIConfig {
|
|
5
|
-
authGuardFallbackURL: string;
|
|
6
|
-
authGuardLoggedInURL: string;
|
|
7
|
-
authGuardVerifyEmailURL?: string;
|
|
8
|
-
enableFirestoreSync: boolean;
|
|
9
|
-
reSignInUrl: string;
|
|
10
|
-
toastMessageOnAuthSuccess: boolean | string;
|
|
11
|
-
toastMessageOnAuthError: boolean | string;
|
|
12
|
-
toastDefaultDurationMil: number;
|
|
13
|
-
logoUrl?: string;
|
|
14
|
-
tosUrl?: string;
|
|
15
|
-
privacyPolicyUrl?: string;
|
|
16
|
-
passwordMaxLength: number;
|
|
17
|
-
passwordMinLength: number;
|
|
18
|
-
passwordRequireLowercase: boolean;
|
|
19
|
-
passwordRequireUppercase: boolean;
|
|
20
|
-
passwordRequireSpecial: boolean;
|
|
21
|
-
passwordRequireNumbers: boolean;
|
|
22
|
-
nameMaxLength: number;
|
|
23
|
-
nameMinLength: number;
|
|
24
|
-
verifyEmailBackground?: string;
|
|
25
|
-
supportedProviders: AuthProvider.ALL | AuthProvider[];
|
|
26
|
-
guestEnabled: boolean;
|
|
27
|
-
allowAccountEdit: boolean;
|
|
28
|
-
allowAccountDelete: boolean;
|
|
29
|
-
allowAccountLogout: boolean;
|
|
30
|
-
guardProtectedRoutesUntilEmailIsVerified: boolean;
|
|
31
|
-
enableEmailVerification: boolean;
|
|
32
|
-
}
|
|
33
|
-
export declare enum MalServiceEnabled {
|
|
34
|
-
emulate = 2,
|
|
35
|
-
enabled = 1,
|
|
36
|
-
disabled = 0
|
|
37
|
-
}
|
|
38
|
-
export declare type UseEmulatorArguments = [string, number];
|
|
39
|
-
export interface MalServicesConifg {
|
|
40
|
-
firebaseAnalytics: boolean;
|
|
41
|
-
firebaseCrashlytics: boolean;
|
|
42
|
-
firebasePerformance: boolean;
|
|
43
|
-
firebaseRemoteConfig: boolean;
|
|
44
|
-
inAppPurchase: boolean;
|
|
45
|
-
firebaseAuth: true | UseEmulatorArguments;
|
|
46
|
-
firebaseFirestore: true | UseEmulatorArguments;
|
|
47
|
-
firebaseFunctions: true | UseEmulatorArguments;
|
|
48
|
-
firebaseRegion?: string;
|
|
49
|
-
}
|
|
50
|
-
export interface MalUserProvidedConfig<T extends ConfigTemplate = ConfigTemplate> {
|
|
51
|
-
firebase: FirebaseAppConfig;
|
|
52
|
-
services?: Partial<MalServicesConifg>;
|
|
53
|
-
authUi?: Partial<MalAuthUIConfig>;
|
|
54
|
-
configDefaults?: T;
|
|
55
|
-
}
|
|
56
|
-
export interface MalSharedConfig<T extends ConfigTemplate = ConfigTemplate> {
|
|
57
|
-
firebase: FirebaseAppConfig;
|
|
58
|
-
services: MalServicesConifg;
|
|
59
|
-
authUi: MalAuthUIConfig;
|
|
60
|
-
configDefaults: T;
|
|
61
|
-
}
|
|
62
|
-
export declare const defaultAuthFirebaseUIConfig: Omit<MalSharedConfig, 'firebase' | 'configDefaults'>;
|
|
63
|
-
export declare function malSharedConfigFactory<T extends ConfigTemplate>(userProvidedConfig: MalUserProvidedConfig<T>): MalSharedConfig<T>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface ICredentials {
|
|
2
|
-
email: string;
|
|
3
|
-
password: string;
|
|
4
|
-
}
|
|
5
|
-
export interface ISignInOptions {
|
|
6
|
-
displayName?: string;
|
|
7
|
-
credentials?: ICredentials;
|
|
8
|
-
skipTosCheck?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const PHONE_NUMBER_REGEX: RegExp;
|
|
11
|
-
export declare enum FirebaseErrorCodes {
|
|
12
|
-
requiresRecentLogin = "auth/requires-recent-login"
|
|
13
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { AuthProvider } from './authprovider.enum';
|
|
3
|
-
import { ICredentials } from './main.interface';
|
|
4
|
-
import { User, AuthProvider as FirebaseAuthProvider, AuthCredential } from '@firebase/auth-types';
|
|
5
|
-
export declare type IFirebaseProvider = IAnalyticsProvider & ICrashlyticsProvider & IPerformanceProvider;
|
|
6
|
-
export interface IAnalyticsProvider {
|
|
7
|
-
logEvent(name: string, params?: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}): Promise<void>;
|
|
10
|
-
setScreenName(screenName: string, screenClass?: string): Promise<void>;
|
|
11
|
-
setUserId(userId: string | null): void;
|
|
12
|
-
}
|
|
13
|
-
export interface ICrashlyticsProvider {
|
|
14
|
-
recordException(_options: iOSException | AndroidException): Promise<void>;
|
|
15
|
-
addLogMessage(message: string): Promise<void>;
|
|
16
|
-
setUserId(uid: string | null): void;
|
|
17
|
-
}
|
|
18
|
-
export interface ICredentialFactoryProvider {
|
|
19
|
-
isProviderSupported(provider: AuthProvider): Promise<boolean>;
|
|
20
|
-
getCredential(provider: AuthProvider): Promise<AuthCredential | null>;
|
|
21
|
-
signOut(): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export interface IPerformanceProvider {
|
|
24
|
-
createTrace(label: string): Promise<IPerformanceTrace>;
|
|
25
|
-
}
|
|
26
|
-
export interface IPerformanceTrace {
|
|
27
|
-
start: () => void;
|
|
28
|
-
stop: () => void;
|
|
29
|
-
putAttribute: (key: string, value: any) => void;
|
|
30
|
-
}
|
|
31
|
-
export interface ContextOptions {
|
|
32
|
-
key: string;
|
|
33
|
-
value: string | number | boolean;
|
|
34
|
-
type: 'string' | 'long' | 'double' | 'boolean' | 'int' | 'float';
|
|
35
|
-
}
|
|
36
|
-
export interface iOSException {
|
|
37
|
-
code?: number;
|
|
38
|
-
domain?: string;
|
|
39
|
-
message: string;
|
|
40
|
-
}
|
|
41
|
-
export interface AndroidException {
|
|
42
|
-
message: string;
|
|
43
|
-
}
|
|
44
|
-
export interface IAuthProcessService {
|
|
45
|
-
listenToUserEvents(): void;
|
|
46
|
-
resetPassword(email: string): Promise<void>;
|
|
47
|
-
signInWith(provider: AuthProvider, credentials?: ICredentials): Promise<void>;
|
|
48
|
-
linkToProvider(provider: AuthProvider): Promise<void>;
|
|
49
|
-
signInOrLinkWithProvider(provider: AuthProvider): Promise<void>;
|
|
50
|
-
signUp(displayName: string, credentials: ICredentials): Promise<void>;
|
|
51
|
-
sendNewVerificationEmail(): Promise<void | never>;
|
|
52
|
-
signOut(): Promise<void>;
|
|
53
|
-
updateProfile(displayName: string, photoURL: string | null): Promise<void>;
|
|
54
|
-
getUserPhotoUrl(): Observable<string | null>;
|
|
55
|
-
getPhotoPath(image: string): string;
|
|
56
|
-
signInWithPhoneNumber(): Promise<void>;
|
|
57
|
-
reloadUserInfo(): Promise<void>;
|
|
58
|
-
getAuthProvider(provider: AuthProvider): FirebaseAuthProvider;
|
|
59
|
-
}
|
|
60
|
-
export interface IAuthMergeUserService {
|
|
61
|
-
prepareSource(sourceUser: User): Promise<any>;
|
|
62
|
-
applyToTarget(targetUser: User, context: any): Promise<void>;
|
|
63
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { MalSharedConfig, MalUserProvidedConfig } from './config.interface';
|
|
3
|
-
import { IAnalyticsProvider, IAuthMergeUserService, IAuthProcessService, ICrashlyticsProvider, ICredentialFactoryProvider } from './providers.interface';
|
|
4
|
-
import { ILoadingUIProvider, IAlertsUIProvider, IPickerUIProvider, IToastUIProvider, ILegalityDialogUIProvider } from './ui-providers.interface';
|
|
5
|
-
export declare const MalAnalyticsProviderToken: InjectionToken<IAnalyticsProvider>;
|
|
6
|
-
export declare const MalCrashlyticsProviderToken: InjectionToken<ICrashlyticsProvider>;
|
|
7
|
-
export declare const MalAuthServiceProviderToken: InjectionToken<IAuthProcessService>;
|
|
8
|
-
export declare const MalMergeUserServiceToken: InjectionToken<IAuthMergeUserService>;
|
|
9
|
-
export declare const MalCredentialFactoryProviderToken: InjectionToken<ICredentialFactoryProvider>;
|
|
10
|
-
export declare const MalUserProvidedConfigToken: InjectionToken<MalUserProvidedConfig<import("@angular/fire/remote-config").ConfigTemplate>>;
|
|
11
|
-
export declare const MalSharedConfigToken: InjectionToken<MalSharedConfig<import("@angular/fire/remote-config").ConfigTemplate>>;
|
|
12
|
-
export declare const MalLoadingUIProviderToken: InjectionToken<ILoadingUIProvider>;
|
|
13
|
-
export declare const MalAlertsUIProviderToken: InjectionToken<IAlertsUIProvider>;
|
|
14
|
-
export declare const MalPickerUIProviderToken: InjectionToken<IPickerUIProvider>;
|
|
15
|
-
export declare const MalToastUIProviderToken: InjectionToken<IToastUIProvider>;
|
|
16
|
-
export declare const MalLegaliyDialogUIProiderToken: InjectionToken<ILegalityDialogUIProvider>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Observable, Subscription } from "rxjs";
|
|
2
|
-
export declare type IUIProvider = ILoadingUIProvider & IAlertsUIProvider & IToastUIProvider & ILegalityDialogUIProvider;
|
|
3
|
-
export interface ILoadingUIProvider {
|
|
4
|
-
createLoading(message?: string): Promise<ILoadingElem>;
|
|
5
|
-
watchLoading(source: Observable<boolean>, options?: {
|
|
6
|
-
debounce?: number;
|
|
7
|
-
message?: string;
|
|
8
|
-
timeoutMs?: number | null;
|
|
9
|
-
debug?: string;
|
|
10
|
-
}): Promise<Subscription>;
|
|
11
|
-
}
|
|
12
|
-
export interface ILoadingElem {
|
|
13
|
-
present(): Promise<void>;
|
|
14
|
-
dismiss(): Promise<any>;
|
|
15
|
-
}
|
|
16
|
-
export interface IAlertsUIProvider {
|
|
17
|
-
yesNoAlert(message: string, options?: IYesNoAlertOptions): Promise<boolean>;
|
|
18
|
-
okAlert(message: string, options?: IOkAlertOptions): Promise<void>;
|
|
19
|
-
errorAlert(message: string, options?: IOkAlertOptions): Promise<void>;
|
|
20
|
-
infoAlert(message: string, options?: IOkAlertOptions): Promise<void>;
|
|
21
|
-
textboxInputAlert(options: ITextAlertOptions): Promise<string | null>;
|
|
22
|
-
}
|
|
23
|
-
export interface ITextAlertOptions extends IOkAlertOptions {
|
|
24
|
-
okText?: string;
|
|
25
|
-
value?: string;
|
|
26
|
-
placeholder?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface IYesNoAlertOptions extends IOkAlertOptions {
|
|
29
|
-
defaultToNo?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface IOkAlertOptions {
|
|
32
|
-
header?: string;
|
|
33
|
-
subHeader?: string;
|
|
34
|
-
interpolateParams?: object;
|
|
35
|
-
}
|
|
36
|
-
export interface IPickerUIProvider {
|
|
37
|
-
}
|
|
38
|
-
export interface IPickerServiceOptions {
|
|
39
|
-
title: string;
|
|
40
|
-
options: {
|
|
41
|
-
text: string;
|
|
42
|
-
value: any;
|
|
43
|
-
}[];
|
|
44
|
-
confirmText?: string;
|
|
45
|
-
cancelText?: string;
|
|
46
|
-
interpolateParams?: object;
|
|
47
|
-
}
|
|
48
|
-
export interface IToastUIProvider {
|
|
49
|
-
createToast(message: string, options?: IToastOptions): Promise<IToastElem>;
|
|
50
|
-
toast(message: string, options?: IToastOptions): Promise<void>;
|
|
51
|
-
errorToast(error: Error, messagePrefix?: string, options?: IToastOptions): Promise<void>;
|
|
52
|
-
}
|
|
53
|
-
export interface IToastElem {
|
|
54
|
-
present(): Promise<void>;
|
|
55
|
-
dismiss(): Promise<any>;
|
|
56
|
-
onDidDismiss(): Promise<any>;
|
|
57
|
-
}
|
|
58
|
-
export interface IToastOptions {
|
|
59
|
-
duration?: number;
|
|
60
|
-
interpolateParams?: object;
|
|
61
|
-
position?: 'middle' | 'top' | 'bottom';
|
|
62
|
-
}
|
|
63
|
-
export interface ILegalityDialogUIProvider {
|
|
64
|
-
confirmTos(): Promise<boolean | null>;
|
|
65
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IAnalyticsProvider } from '../interfaces';
|
|
2
|
-
export declare class AnalyticsService implements IAnalyticsProvider {
|
|
3
|
-
private analytics;
|
|
4
|
-
logEvent: (name: string, params?: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}) => Promise<void>;
|
|
7
|
-
setScreenName: (screenName: string, screenClass?: string) => Promise<void>;
|
|
8
|
-
setUserId: (userId: string | null) => void;
|
|
9
|
-
constructor(analytics: IAnalyticsProvider);
|
|
10
|
-
}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import 'firebase/auth';
|
|
4
|
-
import { User, UserInfo, UserCredential } from '@firebase/auth-types';
|
|
5
|
-
import { AngularFireAuth } from '@angular/fire/auth';
|
|
6
|
-
import { FirestoreSyncService } from './firestore-sync.service';
|
|
7
|
-
import { MalSharedConfig, AuthProvider, ISignInOptions, IAuthMergeUserService, ICredentialFactoryProvider } from '../interfaces';
|
|
8
|
-
import { UiService } from './ui.service';
|
|
9
|
-
import { FirebaseService } from './firebase.service';
|
|
10
|
-
export declare class AuthProcessService {
|
|
11
|
-
config: MalSharedConfig;
|
|
12
|
-
mergeService: IAuthMergeUserService;
|
|
13
|
-
credFactory: ICredentialFactoryProvider;
|
|
14
|
-
private fireStoreService;
|
|
15
|
-
private afa;
|
|
16
|
-
private fire;
|
|
17
|
-
private ui;
|
|
18
|
-
readonly onErrorEmitter: EventEmitter<any>;
|
|
19
|
-
readonly onSignInEmitter: EventEmitter<User>;
|
|
20
|
-
readonly onRegisterEmitter: EventEmitter<User>;
|
|
21
|
-
readonly onSignOutEmitter: EventEmitter<void>;
|
|
22
|
-
readonly onUserUpdatedEmitter: EventEmitter<UserInfo>;
|
|
23
|
-
readonly onUserDeletedEmitter: EventEmitter<void>;
|
|
24
|
-
readonly showProfileDialog: EventEmitter<any>;
|
|
25
|
-
/**
|
|
26
|
-
* Useful to know about auth state even between reloads.
|
|
27
|
-
*
|
|
28
|
-
**/
|
|
29
|
-
private _user$;
|
|
30
|
-
get user(): User | null;
|
|
31
|
-
readonly user$: Observable<import("firebase").default.User>;
|
|
32
|
-
/**
|
|
33
|
-
* Useful to know about auth state even between reloads.
|
|
34
|
-
**/
|
|
35
|
-
private _authState$;
|
|
36
|
-
readonly authState$: Observable<import("firebase").default.User>;
|
|
37
|
-
/**
|
|
38
|
-
* Obersable for current user - that only emits when the uid changes
|
|
39
|
-
* Useful to reset session info when user changes.
|
|
40
|
-
*/
|
|
41
|
-
uid$: Observable<string | null>;
|
|
42
|
-
/**
|
|
43
|
-
* UserInterface helper observables - indicating what user actions are currently permitted and
|
|
44
|
-
* the current status of authentication.
|
|
45
|
-
*/
|
|
46
|
-
readonly isLoggedIn$: Observable<boolean>;
|
|
47
|
-
readonly isAnonymous$: Observable<boolean>;
|
|
48
|
-
readonly isNamedUser$: Observable<boolean>;
|
|
49
|
-
readonly isNotNamedUser$: Observable<boolean>;
|
|
50
|
-
readonly canEdit$: Observable<boolean>;
|
|
51
|
-
readonly canRegister$: Observable<boolean>;
|
|
52
|
-
readonly canSignIn$: Observable<boolean>;
|
|
53
|
-
readonly canSignInAsGuest$: Observable<boolean>;
|
|
54
|
-
readonly canSignOut$: Observable<boolean>;
|
|
55
|
-
/**
|
|
56
|
-
* Observable. Emits whenever currentUser signsOut
|
|
57
|
-
*/
|
|
58
|
-
readonly onSignOut$: Observable<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Observable emits whenever a new user signsIn
|
|
61
|
-
*/
|
|
62
|
-
readonly onSignIn$: Observable<User>;
|
|
63
|
-
get reauthenticateProviders$(): Observable<AuthProvider[]>;
|
|
64
|
-
private readonly tokenRefreshed$;
|
|
65
|
-
emailConfirmationSent?: boolean;
|
|
66
|
-
emailToConfirm?: string;
|
|
67
|
-
constructor(config: MalSharedConfig, mergeService: IAuthMergeUserService, credFactory: ICredentialFactoryProvider, fireStoreService: FirestoreSyncService, afa: AngularFireAuth, // TODO should be private
|
|
68
|
-
fire: FirebaseService, ui: UiService);
|
|
69
|
-
/**
|
|
70
|
-
* Returns true if current platform is webplatform supported by @angular/fire
|
|
71
|
-
*/
|
|
72
|
-
get isWebPlatform(): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Indicates if the specified provider is supported on the current platform
|
|
75
|
-
*/
|
|
76
|
-
isProviderSupported(provider: AuthProvider): Promise<boolean>;
|
|
77
|
-
refreshToken(): Promise<void>;
|
|
78
|
-
selectCurrentUserClaim<T>(claim: string): Observable<T | null | undefined>;
|
|
79
|
-
getCurrentUserClaim<T>(claim: string): Promise<T | null | undefined>;
|
|
80
|
-
/**
|
|
81
|
-
* Reset the password of currently authenticated user via email
|
|
82
|
-
*
|
|
83
|
-
* @param email - the email to reset
|
|
84
|
-
*/
|
|
85
|
-
resetPassword(email: string): Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* General sign in mechanism to authenticate the users with a firebase project
|
|
88
|
-
* using a traditional way, via username and password or by using an authentication provider
|
|
89
|
-
* like google, facebook, twitter and github
|
|
90
|
-
*
|
|
91
|
-
* [Current State -> Target State]
|
|
92
|
-
* Null -> Anon/named: OK
|
|
93
|
-
* Anon -> Anon: Throws Error
|
|
94
|
-
* Anon -> Named: Triggers MergeService
|
|
95
|
-
* Named -> Any: Throws Error
|
|
96
|
-
*
|
|
97
|
-
* @param provider - the provider to authenticate with (google, facebook, twitter, github)
|
|
98
|
-
* @param credentials optional email and password
|
|
99
|
-
*/
|
|
100
|
-
signInWith(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
101
|
-
/**
|
|
102
|
-
*/
|
|
103
|
-
reauthenicateWithProvider(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
104
|
-
/**
|
|
105
|
-
* Link the current user to credentials from another auth provider.
|
|
106
|
-
*
|
|
107
|
-
* @param provider Provider to link.
|
|
108
|
-
*/
|
|
109
|
-
linkCurrentUserToProvider(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
110
|
-
/**
|
|
111
|
-
* Creates a firebase user account authenticated with the specified provider.
|
|
112
|
-
* If AuthProvider.EmailAndPassword is specified credentials and displayname must also be provided.
|
|
113
|
-
*/
|
|
114
|
-
registerWith(provider: AuthProvider, options?: ISignInOptions): Promise<UserCredential | null>;
|
|
115
|
-
/**
|
|
116
|
-
* Present dialog and confirm the user agress to the privacy policy and terms of service (if either configured).
|
|
117
|
-
* If nether configured returns true;
|
|
118
|
-
*
|
|
119
|
-
* @returns True if either user agrees to TOS/PrivacyUrl || no TOS/PrivacyUrl configured.
|
|
120
|
-
*/
|
|
121
|
-
private confirmTos;
|
|
122
|
-
/**
|
|
123
|
-
* Send the currently authenticated user another verficiation email.
|
|
124
|
-
*/
|
|
125
|
-
sendNewVerificationEmail(): Promise<void>;
|
|
126
|
-
/**
|
|
127
|
-
* SignOut the currently authenticated user.
|
|
128
|
-
*/
|
|
129
|
-
signOut(): Promise<void>;
|
|
130
|
-
/**
|
|
131
|
-
* Update the details for the authenticated user of in the firebase authentication and sync with firestore.
|
|
132
|
-
*
|
|
133
|
-
* @param userInfo - UserInfo object containing those properties for which change is requried. Only provider
|
|
134
|
-
* the properties actually to be changed. Others should be ommitted.
|
|
135
|
-
*/
|
|
136
|
-
updateUserInfo(userInfo: Partial<UserInfo>): Promise<void>;
|
|
137
|
-
/**
|
|
138
|
-
* Extract UserInfo object from the User object
|
|
139
|
-
* If multiple providers are supplied these are amalgamated to create the most complete
|
|
140
|
-
* UserInfo object possible
|
|
141
|
-
*/
|
|
142
|
-
parseUserInfo(user: User): UserInfo;
|
|
143
|
-
/**
|
|
144
|
-
* Returns the UserPhotoUrl, or an appropraite placeholder if not provided
|
|
145
|
-
* ToDo - this would probably bet better inside a user-photo component
|
|
146
|
-
*/
|
|
147
|
-
getUserPhotoUrl(): Observable<string | null>;
|
|
148
|
-
/**
|
|
149
|
-
* Common handler for successful signIn
|
|
150
|
-
* Refreshes FireStore User document based on current user (if enabled)
|
|
151
|
-
* And provides welcome back toast (if enabled)
|
|
152
|
-
*
|
|
153
|
-
* @param cred UserCredential object provided by signIn function
|
|
154
|
-
*/
|
|
155
|
-
handleSignInSuccess(cred: UserCredential): Promise<void>;
|
|
156
|
-
/**
|
|
157
|
-
* Refresh user info. Can be useful for instance to get latest status regarding email verification.
|
|
158
|
-
*/
|
|
159
|
-
reloadUserInfo(): Promise<void>;
|
|
160
|
-
/**
|
|
161
|
-
* Deletes the current user
|
|
162
|
-
*/
|
|
163
|
-
deleteUser(): Promise<void>;
|
|
164
|
-
/**
|
|
165
|
-
* Logs the error and provides user error notifcation if appropriate
|
|
166
|
-
*/
|
|
167
|
-
handleError(error: any): Promise<void>;
|
|
168
|
-
/**
|
|
169
|
-
* Returns a firebase auth provider object for the specified provider
|
|
170
|
-
*/
|
|
171
|
-
private getAuthProvider;
|
|
172
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AndroidException, ICrashlyticsProvider, iOSException } from '../interfaces';
|
|
2
|
-
export declare class CrashlyticsService implements ICrashlyticsProvider {
|
|
3
|
-
private crashlyticsProvider;
|
|
4
|
-
private _recordException;
|
|
5
|
-
private _addLogMessage;
|
|
6
|
-
private _setUserId;
|
|
7
|
-
constructor(crashlyticsProvider: ICrashlyticsProvider);
|
|
8
|
-
setUserId(uid: string | null): void;
|
|
9
|
-
recordException(options: string | iOSException | AndroidException | Error): Promise<void>;
|
|
10
|
-
addLogMessage(message: string): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IFirebaseProvider } from '../interfaces';
|
|
2
|
-
import { AnalyticsService } from './analytics.service';
|
|
3
|
-
import { CrashlyticsService } from './crashlytics.service';
|
|
4
|
-
import { PerformanceService } from './performance.service';
|
|
5
|
-
export declare class FirebaseService implements IFirebaseProvider {
|
|
6
|
-
private crashlyticsService;
|
|
7
|
-
private analyticsService;
|
|
8
|
-
private performanceService;
|
|
9
|
-
recordException: any;
|
|
10
|
-
addLogMessage: any;
|
|
11
|
-
setScreenName: any;
|
|
12
|
-
logEvent: any;
|
|
13
|
-
createTrace: (label: string) => Promise<import("../interfaces").IPerformanceTrace>;
|
|
14
|
-
constructor(crashlyticsService: CrashlyticsService, analyticsService: AnalyticsService, performanceService: PerformanceService);
|
|
15
|
-
setUserId(userId: string | null): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AngularFirestore } from '@angular/fire/firestore';
|
|
2
|
-
import { UserInfo } from '@firebase/auth-types';
|
|
3
|
-
import { SetOptions } from '@firebase/firestore-types';
|
|
4
|
-
import { FirebaseService } from './firebase.service';
|
|
5
|
-
export interface UserProfile extends UserInfo {
|
|
6
|
-
acceptedTos: string | null;
|
|
7
|
-
}
|
|
8
|
-
export declare class FirestoreSyncService {
|
|
9
|
-
afs: AngularFirestore;
|
|
10
|
-
fire: FirebaseService;
|
|
11
|
-
constructor(afs: AngularFirestore, fire: FirebaseService);
|
|
12
|
-
getUserData(uid: string): Promise<UserProfile | null>;
|
|
13
|
-
private getUserDocRefByUID;
|
|
14
|
-
setUserData(uid: string, user: Partial<UserProfile>, options?: SetOptions): Promise<void>;
|
|
15
|
-
updateUserData(uid: string, user: Partial<UserProfile>): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './device-info.service';
|
|
2
|
-
export * from './remoteconfig.service';
|
|
3
|
-
export * from './analytics.service';
|
|
4
|
-
export * from './crashlytics.service';
|
|
5
|
-
export * from './performance.service';
|
|
6
|
-
export * from './firestore-sync.service';
|
|
7
|
-
export * from './auth-process.service';
|
|
8
|
-
export * from './firebase.service';
|
|
9
|
-
export * from './ui.service';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AngularFirePerformance } from '@angular/fire/performance';
|
|
2
|
-
import { IPerformanceTrace, IPerformanceProvider } from '../interfaces';
|
|
3
|
-
export declare class PerformanceTraceNoop implements IPerformanceTrace {
|
|
4
|
-
start(): void;
|
|
5
|
-
stop(): void;
|
|
6
|
-
putAttribute(key: string, value: any): void;
|
|
7
|
-
}
|
|
8
|
-
export declare class PerformanceService implements IPerformanceProvider {
|
|
9
|
-
dataCollectionEnabled: Promise<boolean>;
|
|
10
|
-
createTrace(label: string): Promise<IPerformanceTrace>;
|
|
11
|
-
constructor(performanceProvider: AngularFirePerformance);
|
|
12
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
|
-
import { AngularFireRemoteConfig } from '@angular/fire/remote-config';
|
|
3
|
-
import { Value } from '@firebase/remote-config-types';
|
|
4
|
-
export declare class RemoteConfigService {
|
|
5
|
-
private injector;
|
|
6
|
-
defaults: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
remoteConfig$: import("rxjs").Observable<{
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}>;
|
|
12
|
-
parameters: import("rxjs").Observable<any[]>;
|
|
13
|
-
getBoolean(key: string): Promise<boolean>;
|
|
14
|
-
getNumber(key: string): Promise<number>;
|
|
15
|
-
getString(key: string): Promise<string>;
|
|
16
|
-
getValue(key: string): Promise<Value>;
|
|
17
|
-
constructor(remoteConfigProvider: AngularFireRemoteConfig, injector: Injector);
|
|
18
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ILegalityDialogUIProvider, IAlertsUIProvider, ILoadingUIProvider, IToastUIProvider, IUIProvider } from '../interfaces';
|
|
2
|
-
import { FirebaseService } from './firebase.service';
|
|
3
|
-
export declare class UiService implements IUIProvider {
|
|
4
|
-
private toastService;
|
|
5
|
-
private alertService;
|
|
6
|
-
private loadingService;
|
|
7
|
-
private legalityDialog;
|
|
8
|
-
private fire;
|
|
9
|
-
toast: any;
|
|
10
|
-
createToast: any;
|
|
11
|
-
errorToast: any;
|
|
12
|
-
okAlert: any;
|
|
13
|
-
infoAlert: any;
|
|
14
|
-
errorAlert: any;
|
|
15
|
-
textboxInputAlert: any;
|
|
16
|
-
yesNoAlert: any;
|
|
17
|
-
createLoading: any;
|
|
18
|
-
watchLoading: any;
|
|
19
|
-
confirmTos: any;
|
|
20
|
-
constructor(toastService: IToastUIProvider, alertService: IAlertsUIProvider, loadingService: ILoadingUIProvider, legalityDialog: ILegalityDialogUIProvider, fire: FirebaseService);
|
|
21
|
-
logError(error: Error, messagePrefix?: string | null): void;
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders, NgZone } from '@angular/core';
|
|
2
|
-
import { MalSharedConfig, MalUserProvidedConfig, UseEmulatorArguments } from './interfaces';
|
|
3
|
-
import { FirebaseAppConfig, FirebaseApp, FirebaseOptions } from '@angular/fire';
|
|
4
|
-
import { AngularFireRemoteConfig, ConfigTemplate } from '@angular/fire/remote-config';
|
|
5
|
-
import { Settings as RemoteConfigSettings } from '@firebase/remote-config-types';
|
|
6
|
-
import { AngularFirePerformance } from '@angular/fire/performance';
|
|
7
|
-
export declare class MalSharedModule {
|
|
8
|
-
static forRoot(config: MalUserProvidedConfig, appNameFactory?: () => string | undefined): ModuleWithProviders<MalSharedModule>;
|
|
9
|
-
}
|
|
10
|
-
export declare function performanceProviderFactory(config: MalSharedConfig, app: FirebaseApp, dataCollectionEnabled: boolean, instrumentationEnabled: boolean, zone: NgZone, platformId: any): AngularFirePerformance | null;
|
|
11
|
-
export declare function remoteConfigFirebaseService(config: MalSharedConfig, options: FirebaseOptions, nameOrConfig: string | FirebaseAppConfig, settings: RemoteConfigSettings, defaultConfig: ConfigTemplate, zone: NgZone, platformId: any): AngularFireRemoteConfig | null;
|
|
12
|
-
export declare function authEmulatorFactory(config: MalSharedConfig): UseEmulatorArguments | undefined;
|
|
13
|
-
export declare function firestoreEmulatorFactory(config: MalSharedConfig): UseEmulatorArguments | undefined;
|
|
14
|
-
export declare function functionsEmulatorFactory(config: MalSharedConfig): UseEmulatorArguments | undefined;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, AfterViewInit, Injector, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, Validator, ValidationErrors, AbstractControl, FormControl, NgControl } from '@angular/forms';
|
|
3
|
-
import { ReplaySubject } from 'rxjs';
|
|
4
|
-
export declare class ValueAccessorControlComponent<T> implements ControlValueAccessor, Validator, OnInit, OnDestroy, AfterViewInit {
|
|
5
|
-
private injector;
|
|
6
|
-
private cdRef;
|
|
7
|
-
parentControl?: NgControl | null;
|
|
8
|
-
control?: FormControl;
|
|
9
|
-
private get _control();
|
|
10
|
-
protected destroy$: ReplaySubject<void>;
|
|
11
|
-
set value(val: T | undefined);
|
|
12
|
-
get value(): T | undefined;
|
|
13
|
-
valueChange: EventEmitter<T | undefined>;
|
|
14
|
-
constructor(injector: Injector, cdRef: ChangeDetectorRef);
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
ngAfterViewInit(): void;
|
|
17
|
-
ngOnDestroy(): void;
|
|
18
|
-
propagateChange: (val: T | undefined) => void;
|
|
19
|
-
propagateTouch: () => void;
|
|
20
|
-
propagateValidatorChange: () => void;
|
|
21
|
-
writeValue(value: T | undefined): void;
|
|
22
|
-
registerOnChange(fn: any): void;
|
|
23
|
-
registerOnTouched(fn: any): void;
|
|
24
|
-
registerOnValidatorChange(fn: () => void): void;
|
|
25
|
-
setDisabledState(isDisabled: boolean): void;
|
|
26
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
27
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, Validator, ValidationErrors, AbstractControl } from '@angular/forms';
|
|
3
|
-
declare type ValueAccessorHandler<T> = (_: T) => void;
|
|
4
|
-
declare type ValidatorChangeHandler = () => void;
|
|
5
|
-
export declare class ValueAccessorValueComponent<T> implements ControlValueAccessor, Validator {
|
|
6
|
-
get value(): T | undefined;
|
|
7
|
-
set value(val: T | undefined);
|
|
8
|
-
protected _value: T | undefined;
|
|
9
|
-
valueChange: EventEmitter<T>;
|
|
10
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
11
|
-
propagateChange: ValueAccessorHandler<T>;
|
|
12
|
-
propagateTouch: ValueAccessorHandler<T>;
|
|
13
|
-
propagateValidatorChange: ValidatorChangeHandler;
|
|
14
|
-
writeValue(value: T): void;
|
|
15
|
-
registerOnChange(fn: ValueAccessorHandler<T>): void;
|
|
16
|
-
registerOnTouched(fn: ValueAccessorHandler<T>): void;
|
|
17
|
-
registerOnValidatorChange(fn: ValidatorChangeHandler): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
package/shared/types/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/// <reference types="jasmine" />
|
|
2
|
-
import { BehaviorSubject, Subject, Observable } from 'rxjs';
|
|
3
|
-
import { AuthProcessService } from 'ngx-firebase';
|
|
4
|
-
import { User } from '@firebase/auth-types';
|
|
5
|
-
import { EventEmitter } from '@angular/core';
|
|
6
|
-
export declare class FakeAuthProcessService {
|
|
7
|
-
readonly _user$: BehaviorSubject<User | null>;
|
|
8
|
-
readonly user$: Observable<User | null>;
|
|
9
|
-
get user(): User | null;
|
|
10
|
-
readonly _canRegister$: BehaviorSubject<boolean>;
|
|
11
|
-
readonly canRegister$: Observable<boolean>;
|
|
12
|
-
readonly _canSignIn$: BehaviorSubject<boolean>;
|
|
13
|
-
readonly canSignIn$: Observable<boolean>;
|
|
14
|
-
readonly _canSignOut$: BehaviorSubject<boolean>;
|
|
15
|
-
readonly canSignOut$: Observable<boolean>;
|
|
16
|
-
readonly _canEdit$: BehaviorSubject<boolean>;
|
|
17
|
-
readonly canEdit$: Observable<boolean>;
|
|
18
|
-
readonly _isLoggedIn$: BehaviorSubject<boolean>;
|
|
19
|
-
readonly isLoggedIn$: Observable<boolean>;
|
|
20
|
-
readonly _isAnonymous$: BehaviorSubject<boolean>;
|
|
21
|
-
readonly isAnonymous$: Observable<boolean>;
|
|
22
|
-
readonly _onSignOut$: Subject<void>;
|
|
23
|
-
onSignOut$: Observable<void>;
|
|
24
|
-
readonly showProfileDialog: EventEmitter<void>;
|
|
25
|
-
selectCurrentUserClaim: jasmine.Spy<(claim: string) => Observable<any>>;
|
|
26
|
-
constructor();
|
|
27
|
-
static create(): FakeAuthProcessService & AuthProcessService;
|
|
28
|
-
}
|