ngx-firebase 1.1.13 → 22.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -13
- package/fesm2022/ngx-firebase.mjs +158 -0
- package/fesm2022/ngx-firebase.mjs.map +1 -0
- package/package.json +39 -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 -2299
- 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 -779
- 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 -1509
- 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 -70
- package/shared/interfaces/tokens.d.ts +0 -16
- package/shared/interfaces/ui-providers.interface.d.ts +0 -66
- package/shared/services/analytics.service.d.ts +0 -10
- package/shared/services/auth-process.service.d.ts +0 -197
- 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,763 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@capacitor/core'), require('@firebase/app'), require('firebase/auth'), require('ngx-firebase'), require('uuid'), require('js-sha256')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('ngx-firebase/capacitor', ['exports', '@angular/core', '@capacitor/core', '@firebase/app', 'firebase/auth', 'ngx-firebase', 'uuid', 'js-sha256'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['ngx-firebase'] = global['ngx-firebase'] || {}, global['ngx-firebase'].capacitor = {}), global.ng.core, global.Capacitor, global.firebase, null, global['ngx-firebase'], global.uuid, global.jsSha256));
|
|
5
|
-
}(this, (function (exports, i0, core, app, auth, i1, uuid, jsSha256) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var MalCapacitorConfigToken = new i0.InjectionToken('MalCapacitorConfigToken');
|
|
8
|
-
|
|
9
|
-
/*! *****************************************************************************
|
|
10
|
-
Copyright (c) Microsoft Corporation.
|
|
11
|
-
|
|
12
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
-
purpose with or without fee is hereby granted.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
-
***************************************************************************** */
|
|
23
|
-
/* global Reflect, Promise */
|
|
24
|
-
var extendStatics = function (d, b) {
|
|
25
|
-
extendStatics = Object.setPrototypeOf ||
|
|
26
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
27
|
-
function (d, b) { for (var p in b)
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
29
|
-
d[p] = b[p]; };
|
|
30
|
-
return extendStatics(d, b);
|
|
31
|
-
};
|
|
32
|
-
function __extends(d, b) {
|
|
33
|
-
if (typeof b !== "function" && b !== null)
|
|
34
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
35
|
-
extendStatics(d, b);
|
|
36
|
-
function __() { this.constructor = d; }
|
|
37
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
38
|
-
}
|
|
39
|
-
var __assign = function () {
|
|
40
|
-
__assign = Object.assign || function __assign(t) {
|
|
41
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
42
|
-
s = arguments[i];
|
|
43
|
-
for (var p in s)
|
|
44
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
45
|
-
t[p] = s[p];
|
|
46
|
-
}
|
|
47
|
-
return t;
|
|
48
|
-
};
|
|
49
|
-
return __assign.apply(this, arguments);
|
|
50
|
-
};
|
|
51
|
-
function __rest(s, e) {
|
|
52
|
-
var t = {};
|
|
53
|
-
for (var p in s)
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
55
|
-
t[p] = s[p];
|
|
56
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
57
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
58
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
59
|
-
t[p[i]] = s[p[i]];
|
|
60
|
-
}
|
|
61
|
-
return t;
|
|
62
|
-
}
|
|
63
|
-
function __decorate(decorators, target, key, desc) {
|
|
64
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
65
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
66
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
67
|
-
else
|
|
68
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
69
|
-
if (d = decorators[i])
|
|
70
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
71
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
72
|
-
}
|
|
73
|
-
function __param(paramIndex, decorator) {
|
|
74
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
75
|
-
}
|
|
76
|
-
function __metadata(metadataKey, metadataValue) {
|
|
77
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
78
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
79
|
-
}
|
|
80
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
81
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
82
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
83
|
-
function fulfilled(value) { try {
|
|
84
|
-
step(generator.next(value));
|
|
85
|
-
}
|
|
86
|
-
catch (e) {
|
|
87
|
-
reject(e);
|
|
88
|
-
} }
|
|
89
|
-
function rejected(value) { try {
|
|
90
|
-
step(generator["throw"](value));
|
|
91
|
-
}
|
|
92
|
-
catch (e) {
|
|
93
|
-
reject(e);
|
|
94
|
-
} }
|
|
95
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
96
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function __generator(thisArg, body) {
|
|
100
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
101
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
102
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
103
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
104
|
-
function step(op) {
|
|
105
|
-
if (f)
|
|
106
|
-
throw new TypeError("Generator is already executing.");
|
|
107
|
-
while (_)
|
|
108
|
-
try {
|
|
109
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
110
|
-
return t;
|
|
111
|
-
if (y = 0, t)
|
|
112
|
-
op = [op[0] & 2, t.value];
|
|
113
|
-
switch (op[0]) {
|
|
114
|
-
case 0:
|
|
115
|
-
case 1:
|
|
116
|
-
t = op;
|
|
117
|
-
break;
|
|
118
|
-
case 4:
|
|
119
|
-
_.label++;
|
|
120
|
-
return { value: op[1], done: false };
|
|
121
|
-
case 5:
|
|
122
|
-
_.label++;
|
|
123
|
-
y = op[1];
|
|
124
|
-
op = [0];
|
|
125
|
-
continue;
|
|
126
|
-
case 7:
|
|
127
|
-
op = _.ops.pop();
|
|
128
|
-
_.trys.pop();
|
|
129
|
-
continue;
|
|
130
|
-
default:
|
|
131
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
132
|
-
_ = 0;
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
136
|
-
_.label = op[1];
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
140
|
-
_.label = t[1];
|
|
141
|
-
t = op;
|
|
142
|
-
break;
|
|
143
|
-
}
|
|
144
|
-
if (t && _.label < t[2]) {
|
|
145
|
-
_.label = t[2];
|
|
146
|
-
_.ops.push(op);
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
if (t[2])
|
|
150
|
-
_.ops.pop();
|
|
151
|
-
_.trys.pop();
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
op = body.call(thisArg, _);
|
|
155
|
-
}
|
|
156
|
-
catch (e) {
|
|
157
|
-
op = [6, e];
|
|
158
|
-
y = 0;
|
|
159
|
-
}
|
|
160
|
-
finally {
|
|
161
|
-
f = t = 0;
|
|
162
|
-
}
|
|
163
|
-
if (op[0] & 5)
|
|
164
|
-
throw op[1];
|
|
165
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
169
|
-
if (k2 === undefined)
|
|
170
|
-
k2 = k;
|
|
171
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
172
|
-
}) : (function (o, m, k, k2) {
|
|
173
|
-
if (k2 === undefined)
|
|
174
|
-
k2 = k;
|
|
175
|
-
o[k2] = m[k];
|
|
176
|
-
});
|
|
177
|
-
function __exportStar(m, o) {
|
|
178
|
-
for (var p in m)
|
|
179
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
180
|
-
__createBinding(o, m, p);
|
|
181
|
-
}
|
|
182
|
-
function __values(o) {
|
|
183
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
184
|
-
if (m)
|
|
185
|
-
return m.call(o);
|
|
186
|
-
if (o && typeof o.length === "number")
|
|
187
|
-
return {
|
|
188
|
-
next: function () {
|
|
189
|
-
if (o && i >= o.length)
|
|
190
|
-
o = void 0;
|
|
191
|
-
return { value: o && o[i++], done: !o };
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
195
|
-
}
|
|
196
|
-
function __read(o, n) {
|
|
197
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
198
|
-
if (!m)
|
|
199
|
-
return o;
|
|
200
|
-
var i = m.call(o), r, ar = [], e;
|
|
201
|
-
try {
|
|
202
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
203
|
-
ar.push(r.value);
|
|
204
|
-
}
|
|
205
|
-
catch (error) {
|
|
206
|
-
e = { error: error };
|
|
207
|
-
}
|
|
208
|
-
finally {
|
|
209
|
-
try {
|
|
210
|
-
if (r && !r.done && (m = i["return"]))
|
|
211
|
-
m.call(i);
|
|
212
|
-
}
|
|
213
|
-
finally {
|
|
214
|
-
if (e)
|
|
215
|
-
throw e.error;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
return ar;
|
|
219
|
-
}
|
|
220
|
-
/** @deprecated */
|
|
221
|
-
function __spread() {
|
|
222
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
223
|
-
ar = ar.concat(__read(arguments[i]));
|
|
224
|
-
return ar;
|
|
225
|
-
}
|
|
226
|
-
/** @deprecated */
|
|
227
|
-
function __spreadArrays() {
|
|
228
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
229
|
-
s += arguments[i].length;
|
|
230
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
231
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
232
|
-
r[k] = a[j];
|
|
233
|
-
return r;
|
|
234
|
-
}
|
|
235
|
-
function __spreadArray(to, from) {
|
|
236
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
237
|
-
to[j] = from[i];
|
|
238
|
-
return to;
|
|
239
|
-
}
|
|
240
|
-
function __await(v) {
|
|
241
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
242
|
-
}
|
|
243
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
244
|
-
if (!Symbol.asyncIterator)
|
|
245
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
246
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
247
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
248
|
-
function verb(n) { if (g[n])
|
|
249
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
250
|
-
function resume(n, v) { try {
|
|
251
|
-
step(g[n](v));
|
|
252
|
-
}
|
|
253
|
-
catch (e) {
|
|
254
|
-
settle(q[0][3], e);
|
|
255
|
-
} }
|
|
256
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
257
|
-
function fulfill(value) { resume("next", value); }
|
|
258
|
-
function reject(value) { resume("throw", value); }
|
|
259
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
260
|
-
resume(q[0][0], q[0][1]); }
|
|
261
|
-
}
|
|
262
|
-
function __asyncDelegator(o) {
|
|
263
|
-
var i, p;
|
|
264
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
265
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
266
|
-
}
|
|
267
|
-
function __asyncValues(o) {
|
|
268
|
-
if (!Symbol.asyncIterator)
|
|
269
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
270
|
-
var m = o[Symbol.asyncIterator], i;
|
|
271
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
272
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
273
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
274
|
-
}
|
|
275
|
-
function __makeTemplateObject(cooked, raw) {
|
|
276
|
-
if (Object.defineProperty) {
|
|
277
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
cooked.raw = raw;
|
|
281
|
-
}
|
|
282
|
-
return cooked;
|
|
283
|
-
}
|
|
284
|
-
;
|
|
285
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
286
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
287
|
-
}) : function (o, v) {
|
|
288
|
-
o["default"] = v;
|
|
289
|
-
};
|
|
290
|
-
function __importStar(mod) {
|
|
291
|
-
if (mod && mod.__esModule)
|
|
292
|
-
return mod;
|
|
293
|
-
var result = {};
|
|
294
|
-
if (mod != null)
|
|
295
|
-
for (var k in mod)
|
|
296
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
297
|
-
__createBinding(result, mod, k);
|
|
298
|
-
__setModuleDefault(result, mod);
|
|
299
|
-
return result;
|
|
300
|
-
}
|
|
301
|
-
function __importDefault(mod) {
|
|
302
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
303
|
-
}
|
|
304
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
305
|
-
if (!privateMap.has(receiver)) {
|
|
306
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
307
|
-
}
|
|
308
|
-
return privateMap.get(receiver);
|
|
309
|
-
}
|
|
310
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
311
|
-
if (!privateMap.has(receiver)) {
|
|
312
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
313
|
-
}
|
|
314
|
-
privateMap.set(receiver, value);
|
|
315
|
-
return value;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
var FirebaseAnalytics = core.Plugins.FirebaseAnalytics;
|
|
319
|
-
var AnalyticsFirebaseCapacitorService = /** @class */ (function () {
|
|
320
|
-
function AnalyticsFirebaseCapacitorService() {
|
|
321
|
-
}
|
|
322
|
-
Object.defineProperty(AnalyticsFirebaseCapacitorService.prototype, "isWeb", {
|
|
323
|
-
get: function () {
|
|
324
|
-
return core.Capacitor.platform === 'web';
|
|
325
|
-
},
|
|
326
|
-
enumerable: false,
|
|
327
|
-
configurable: true
|
|
328
|
-
});
|
|
329
|
-
AnalyticsFirebaseCapacitorService.prototype.setUserId = function (userId) {
|
|
330
|
-
if (!this.isWeb) {
|
|
331
|
-
FirebaseAnalytics.setUserId({ userId: userId });
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
AnalyticsFirebaseCapacitorService.prototype.logEvent = function (name, params) {
|
|
335
|
-
if (params === void 0) { params = {}; }
|
|
336
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
337
|
-
return __generator(this, function (_a) {
|
|
338
|
-
if (!this.isWeb) {
|
|
339
|
-
FirebaseAnalytics.logEvent({ name: name, params: params });
|
|
340
|
-
}
|
|
341
|
-
else {
|
|
342
|
-
console.log('Firebase Analytics Event (not sent)>', name);
|
|
343
|
-
}
|
|
344
|
-
return [2 /*return*/];
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
};
|
|
348
|
-
AnalyticsFirebaseCapacitorService.prototype.setScreenName = function (screenName, screenClass) {
|
|
349
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
350
|
-
return __generator(this, function (_a) {
|
|
351
|
-
switch (_a.label) {
|
|
352
|
-
case 0:
|
|
353
|
-
if (!!this.isWeb) return [3 /*break*/, 2];
|
|
354
|
-
return [4 /*yield*/, this.logEvent('screen_view', {
|
|
355
|
-
screen_name: screenName,
|
|
356
|
-
screen_class: screenClass
|
|
357
|
-
})];
|
|
358
|
-
case 1:
|
|
359
|
-
_a.sent();
|
|
360
|
-
return [3 /*break*/, 3];
|
|
361
|
-
case 2:
|
|
362
|
-
console.log('Firebase Analytics ScreenName (not sent)>', screenName, screenClass);
|
|
363
|
-
_a.label = 3;
|
|
364
|
-
case 3: return [2 /*return*/];
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
});
|
|
368
|
-
};
|
|
369
|
-
return AnalyticsFirebaseCapacitorService;
|
|
370
|
-
}());
|
|
371
|
-
AnalyticsFirebaseCapacitorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AnalyticsFirebaseCapacitorService_Factory() { return new AnalyticsFirebaseCapacitorService(); }, token: AnalyticsFirebaseCapacitorService, providedIn: "root" });
|
|
372
|
-
AnalyticsFirebaseCapacitorService.decorators = [
|
|
373
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
374
|
-
];
|
|
375
|
-
|
|
376
|
-
var FirebaseCrashlytics = core.Plugins.FirebaseCrashlytics;
|
|
377
|
-
var CrashlyticsFirebaseCapacitorService = /** @class */ (function () {
|
|
378
|
-
function CrashlyticsFirebaseCapacitorService() {
|
|
379
|
-
}
|
|
380
|
-
CrashlyticsFirebaseCapacitorService.prototype.setUserId = function (uid) {
|
|
381
|
-
if (core.Capacitor.isPluginAvailable('FirebaseCrashlytics')) {
|
|
382
|
-
FirebaseCrashlytics.setUserId({ userId: uid });
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
CrashlyticsFirebaseCapacitorService.prototype.recordException = function (options) {
|
|
386
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
387
|
-
return __generator(this, function (_a) {
|
|
388
|
-
switch (_a.label) {
|
|
389
|
-
case 0:
|
|
390
|
-
if (!core.Capacitor.isPluginAvailable('FirebaseCrashlytics')) return [3 /*break*/, 2];
|
|
391
|
-
return [4 /*yield*/, FirebaseCrashlytics.recordException(options)];
|
|
392
|
-
case 1:
|
|
393
|
-
_a.sent();
|
|
394
|
-
return [3 /*break*/, 3];
|
|
395
|
-
case 2:
|
|
396
|
-
console.log('Crashlytics Exception (not sent)>', options.message, options);
|
|
397
|
-
_a.label = 3;
|
|
398
|
-
case 3: return [2 /*return*/];
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
});
|
|
402
|
-
};
|
|
403
|
-
CrashlyticsFirebaseCapacitorService.prototype.addLogMessage = function (message) {
|
|
404
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
405
|
-
return __generator(this, function (_a) {
|
|
406
|
-
switch (_a.label) {
|
|
407
|
-
case 0:
|
|
408
|
-
if (!core.Capacitor.isPluginAvailable('FirebaseCrashlytics')) return [3 /*break*/, 2];
|
|
409
|
-
return [4 /*yield*/, FirebaseCrashlytics.addLogMessage({ message: message })];
|
|
410
|
-
case 1:
|
|
411
|
-
_a.sent();
|
|
412
|
-
return [3 /*break*/, 3];
|
|
413
|
-
case 2:
|
|
414
|
-
console.log('Crashlytics Log (not sent)>', message);
|
|
415
|
-
_a.label = 3;
|
|
416
|
-
case 3: return [2 /*return*/];
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
|
-
});
|
|
420
|
-
};
|
|
421
|
-
return CrashlyticsFirebaseCapacitorService;
|
|
422
|
-
}());
|
|
423
|
-
CrashlyticsFirebaseCapacitorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CrashlyticsFirebaseCapacitorService_Factory() { return new CrashlyticsFirebaseCapacitorService(); }, token: CrashlyticsFirebaseCapacitorService, providedIn: "root" });
|
|
424
|
-
CrashlyticsFirebaseCapacitorService.decorators = [
|
|
425
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
426
|
-
];
|
|
427
|
-
CrashlyticsFirebaseCapacitorService.ctorParameters = function () { return []; };
|
|
428
|
-
|
|
429
|
-
if (!app.firebase.auth) {
|
|
430
|
-
throw new Error('firebase.auth is undefined');
|
|
431
|
-
}
|
|
432
|
-
core.WebPluginRegistry;
|
|
433
|
-
var Browser = core.Plugins.Browser, CapacitorFirebaseDynamicLinks = core.Plugins.CapacitorFirebaseDynamicLinks, CapacitorFirebaseAuth = core.Plugins.CapacitorFirebaseAuth;
|
|
434
|
-
var fireAuth = app.firebase.auth;
|
|
435
|
-
var AuthCredentialFactoryCapacitorService = /** @class */ (function () {
|
|
436
|
-
function AuthCredentialFactoryCapacitorService(fire, sharedConfig, capConfg) {
|
|
437
|
-
this.fire = fire;
|
|
438
|
-
this.sharedConfig = sharedConfig;
|
|
439
|
-
this.capConfg = capConfg;
|
|
440
|
-
}
|
|
441
|
-
Object.defineProperty(AuthCredentialFactoryCapacitorService.prototype, "isWebPlatform", {
|
|
442
|
-
/**
|
|
443
|
-
* Returns true if current platform is webplatform supported by @angular/fire
|
|
444
|
-
*/
|
|
445
|
-
get: function () {
|
|
446
|
-
return ['https:', 'http:', 'chrome-extension'].includes(location.protocol);
|
|
447
|
-
},
|
|
448
|
-
enumerable: false,
|
|
449
|
-
configurable: true
|
|
450
|
-
});
|
|
451
|
-
AuthCredentialFactoryCapacitorService.prototype.deviceSupportsNativeApple = function () {
|
|
452
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
453
|
-
var deviceInfo, osMajor;
|
|
454
|
-
return __generator(this, function (_a) {
|
|
455
|
-
switch (_a.label) {
|
|
456
|
-
case 0: return [4 /*yield*/, core.Device.getInfo()];
|
|
457
|
-
case 1:
|
|
458
|
-
deviceInfo = _a.sent();
|
|
459
|
-
osMajor = parseInt(deviceInfo.osVersion.split('.')[0], 10);
|
|
460
|
-
if (osMajor >= 13 && core.Capacitor.platform === 'ios') {
|
|
461
|
-
return [2 /*return*/, true];
|
|
462
|
-
}
|
|
463
|
-
else if (core.Capacitor.platform === 'ios') {
|
|
464
|
-
console.warn('Disabling native-support for signInWithApple as iOS version < 13');
|
|
465
|
-
}
|
|
466
|
-
return [2 /*return*/, false];
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
});
|
|
470
|
-
};
|
|
471
|
-
AuthCredentialFactoryCapacitorService.prototype.isProviderSupported = function (provider) {
|
|
472
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
473
|
-
var _a, _b;
|
|
474
|
-
return __generator(this, function (_c) {
|
|
475
|
-
switch (_c.label) {
|
|
476
|
-
case 0:
|
|
477
|
-
if (this.isWebPlatform) {
|
|
478
|
-
return [2 /*return*/, false];
|
|
479
|
-
}
|
|
480
|
-
_a = provider;
|
|
481
|
-
switch (_a) {
|
|
482
|
-
case i1.AuthProvider.Apple: return [3 /*break*/, 1];
|
|
483
|
-
case i1.AuthProvider.Google: return [3 /*break*/, 4];
|
|
484
|
-
case i1.AuthProvider.Facebook: return [3 /*break*/, 4];
|
|
485
|
-
case i1.AuthProvider.Twitter: return [3 /*break*/, 4];
|
|
486
|
-
}
|
|
487
|
-
return [3 /*break*/, 5];
|
|
488
|
-
case 1:
|
|
489
|
-
_b = !!this.capConfg.signInWithApple;
|
|
490
|
-
if (_b) return [3 /*break*/, 3];
|
|
491
|
-
return [4 /*yield*/, this.deviceSupportsNativeApple()];
|
|
492
|
-
case 2:
|
|
493
|
-
_b = ((_c.sent()) && core.Capacitor.isPluginAvailable('CapacitorFirebaseAuth'));
|
|
494
|
-
_c.label = 3;
|
|
495
|
-
case 3: return [2 /*return*/, _b];
|
|
496
|
-
case 4: return [2 /*return*/, core.Capacitor.isPluginAvailable('CapacitorFirebaseAuth')];
|
|
497
|
-
case 5: return [2 /*return*/, false];
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
});
|
|
501
|
-
};
|
|
502
|
-
AuthCredentialFactoryCapacitorService.prototype.getCredential = function (provider) {
|
|
503
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
504
|
-
var _a, googleAuthProvider, googleRes, facebookAuthProvider, facebookRes, appleAuthProvider, appleRes, signInConfig_1, twitterAuthProvider, twitterRes;
|
|
505
|
-
var _this = this;
|
|
506
|
-
return __generator(this, function (_b) {
|
|
507
|
-
switch (_b.label) {
|
|
508
|
-
case 0:
|
|
509
|
-
if (!this.isProviderSupported(provider)) {
|
|
510
|
-
throw new Error("Provider " + provider + " is not supported on this platform");
|
|
511
|
-
}
|
|
512
|
-
if (!CapacitorFirebaseAuth) {
|
|
513
|
-
throw new Error("CapacitorFirebaseAuth plugin not available");
|
|
514
|
-
}
|
|
515
|
-
_a = provider;
|
|
516
|
-
switch (_a) {
|
|
517
|
-
case i1.AuthProvider.Google: return [3 /*break*/, 1];
|
|
518
|
-
case i1.AuthProvider.Facebook: return [3 /*break*/, 3];
|
|
519
|
-
case i1.AuthProvider.Apple: return [3 /*break*/, 5];
|
|
520
|
-
case i1.AuthProvider.Twitter: return [3 /*break*/, 10];
|
|
521
|
-
}
|
|
522
|
-
return [3 /*break*/, 12];
|
|
523
|
-
case 1:
|
|
524
|
-
googleAuthProvider = new fireAuth.GoogleAuthProvider();
|
|
525
|
-
this.fire.addLogMessage("signIn using CapacitorFirebaseAuth; provider=" + provider);
|
|
526
|
-
return [4 /*yield*/, CapacitorFirebaseAuth.signIn({ providerId: googleAuthProvider.providerId })];
|
|
527
|
-
case 2:
|
|
528
|
-
googleRes = _b.sent();
|
|
529
|
-
if (googleRes.idToken) {
|
|
530
|
-
this.fire.addLogMessage("Creating credential using firebase; provider=" + provider);
|
|
531
|
-
return [2 /*return*/, fireAuth.GoogleAuthProvider.credential(googleRes.idToken)];
|
|
532
|
-
}
|
|
533
|
-
else {
|
|
534
|
-
return [2 /*return*/, null];
|
|
535
|
-
}
|
|
536
|
-
_b.label = 3;
|
|
537
|
-
case 3:
|
|
538
|
-
facebookAuthProvider = new fireAuth.FacebookAuthProvider();
|
|
539
|
-
this.fire.addLogMessage("signIn using CapacitorFirebaseAuth; provider=" + provider);
|
|
540
|
-
return [4 /*yield*/, CapacitorFirebaseAuth.signIn({ providerId: facebookAuthProvider.providerId })];
|
|
541
|
-
case 4:
|
|
542
|
-
facebookRes = _b.sent();
|
|
543
|
-
if (facebookRes.idToken) {
|
|
544
|
-
this.fire.addLogMessage("Creating credential using firebase; provider=" + provider);
|
|
545
|
-
return [2 /*return*/, fireAuth.FacebookAuthProvider.credential(facebookRes.idToken)];
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
548
|
-
return [2 /*return*/, null];
|
|
549
|
-
}
|
|
550
|
-
_b.label = 5;
|
|
551
|
-
case 5: return [4 /*yield*/, this.deviceSupportsNativeApple()];
|
|
552
|
-
case 6:
|
|
553
|
-
if (!_b.sent()) return [3 /*break*/, 8];
|
|
554
|
-
appleAuthProvider = new fireAuth.OAuthProvider('apple.com');
|
|
555
|
-
this.fire.addLogMessage("signIn using CapacitorFirebaseAuth; provider=" + provider);
|
|
556
|
-
return [4 /*yield*/, CapacitorFirebaseAuth.signIn({ providerId: appleAuthProvider.providerId })];
|
|
557
|
-
case 7:
|
|
558
|
-
appleRes = _b.sent();
|
|
559
|
-
if (appleRes.idToken) {
|
|
560
|
-
this.fire.addLogMessage("Creating credential using firebase; provider=" + provider);
|
|
561
|
-
return [2 /*return*/, appleAuthProvider.credential(appleRes)];
|
|
562
|
-
}
|
|
563
|
-
else {
|
|
564
|
-
return [2 /*return*/, null];
|
|
565
|
-
}
|
|
566
|
-
return [3 /*break*/, 10];
|
|
567
|
-
case 8:
|
|
568
|
-
if (!this.capConfg.signInWithApple) return [3 /*break*/, 10];
|
|
569
|
-
signInConfig_1 = this.capConfg.signInWithApple;
|
|
570
|
-
return [4 /*yield*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
571
|
-
var nonce, deepLinkHandler, browserCloseHandler;
|
|
572
|
-
var _this = this;
|
|
573
|
-
return __generator(this, function (_a) {
|
|
574
|
-
switch (_a.label) {
|
|
575
|
-
case 0:
|
|
576
|
-
nonce = uuid.v4();
|
|
577
|
-
deepLinkHandler = CapacitorFirebaseDynamicLinks.addListener('deepLinkOpen', function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
578
|
-
var params, idToken, error, appleAuthProvider;
|
|
579
|
-
return __generator(this, function (_a) {
|
|
580
|
-
switch (_a.label) {
|
|
581
|
-
case 0:
|
|
582
|
-
if (!(data.url && data.url.startsWith(signInConfig_1.redirectDeekLink))) return [3 /*break*/, 2];
|
|
583
|
-
params = new URLSearchParams(new URL(data.url).search);
|
|
584
|
-
idToken = params.get('id_token');
|
|
585
|
-
error = params.get('error');
|
|
586
|
-
deepLinkHandler.remove();
|
|
587
|
-
browserCloseHandler.remove();
|
|
588
|
-
return [4 /*yield*/, Browser.close()];
|
|
589
|
-
case 1:
|
|
590
|
-
_a.sent();
|
|
591
|
-
if (idToken && !error) {
|
|
592
|
-
appleAuthProvider = new fireAuth.OAuthProvider('apple.com');
|
|
593
|
-
resolve(appleAuthProvider.credential({ idToken: idToken, rawNonce: nonce }));
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
reject(error);
|
|
597
|
-
}
|
|
598
|
-
_a.label = 2;
|
|
599
|
-
case 2: return [2 /*return*/];
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
}); });
|
|
603
|
-
browserCloseHandler = Browser.addListener('browserFinished', function (data) { return __awaiter(_this, void 0, void 0, function () {
|
|
604
|
-
return __generator(this, function (_a) {
|
|
605
|
-
// handle user close of browser (i.e. cancel operation)
|
|
606
|
-
deepLinkHandler.remove();
|
|
607
|
-
browserCloseHandler.remove();
|
|
608
|
-
resolve(null);
|
|
609
|
-
return [2 /*return*/];
|
|
610
|
-
});
|
|
611
|
-
}); });
|
|
612
|
-
return [4 /*yield*/, Browser.open({
|
|
613
|
-
url: "" + (signInConfig_1.authUrl || 'http://appleid.apple.com/auth/authorize')
|
|
614
|
-
+ ("?nonce=" + encodeURIComponent(jsSha256.sha256(nonce)))
|
|
615
|
-
+ ("&client_id=" + encodeURIComponent(signInConfig_1.clientId))
|
|
616
|
-
+ ("&redirect_uri=" + encodeURIComponent(signInConfig_1.redirectUrl))
|
|
617
|
-
+ "&response_type=code%20id_token&response_mode=form_post"
|
|
618
|
-
})];
|
|
619
|
-
case 1:
|
|
620
|
-
_a.sent();
|
|
621
|
-
return [2 /*return*/];
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
}); })];
|
|
625
|
-
case 9: return [2 /*return*/, _b.sent()];
|
|
626
|
-
case 10:
|
|
627
|
-
twitterAuthProvider = new fireAuth.TwitterAuthProvider();
|
|
628
|
-
this.fire.addLogMessage("signIn using CapacitorFirebaseAuth; provider=" + provider);
|
|
629
|
-
return [4 /*yield*/, CapacitorFirebaseAuth.signIn({ providerId: twitterAuthProvider.providerId })];
|
|
630
|
-
case 11:
|
|
631
|
-
twitterRes = _b.sent();
|
|
632
|
-
if (twitterRes.idToken && twitterRes.secret) {
|
|
633
|
-
this.fire.addLogMessage("Creating credential using firebase; provider=" + provider);
|
|
634
|
-
return [2 /*return*/, fireAuth.TwitterAuthProvider.credential(twitterRes.idToken, twitterRes.secret)];
|
|
635
|
-
}
|
|
636
|
-
else {
|
|
637
|
-
return [2 /*return*/, null];
|
|
638
|
-
}
|
|
639
|
-
_b.label = 12;
|
|
640
|
-
case 12:
|
|
641
|
-
this.fire.addLogMessage("Attempting unsupported native provider; provider=" + provider);
|
|
642
|
-
throw new Error(provider + " is not available as a credential provider for this platform");
|
|
643
|
-
}
|
|
644
|
-
});
|
|
645
|
-
});
|
|
646
|
-
};
|
|
647
|
-
AuthCredentialFactoryCapacitorService.prototype.signOut = function () {
|
|
648
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
649
|
-
return __generator(this, function (_a) {
|
|
650
|
-
switch (_a.label) {
|
|
651
|
-
case 0:
|
|
652
|
-
if (!CapacitorFirebaseAuth) return [3 /*break*/, 2];
|
|
653
|
-
this.fire.addLogMessage('signOut using CapacitorFirebaseAuth');
|
|
654
|
-
return [4 /*yield*/, CapacitorFirebaseAuth.signOut({})];
|
|
655
|
-
case 1:
|
|
656
|
-
_a.sent();
|
|
657
|
-
_a.label = 2;
|
|
658
|
-
case 2: return [2 /*return*/];
|
|
659
|
-
}
|
|
660
|
-
});
|
|
661
|
-
});
|
|
662
|
-
};
|
|
663
|
-
return AuthCredentialFactoryCapacitorService;
|
|
664
|
-
}());
|
|
665
|
-
AuthCredentialFactoryCapacitorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthCredentialFactoryCapacitorService_Factory() { return new AuthCredentialFactoryCapacitorService(i0.ɵɵinject(i1.FirebaseService), i0.ɵɵinject(i1.MalSharedConfigToken), i0.ɵɵinject(MalCapacitorConfigToken)); }, token: AuthCredentialFactoryCapacitorService, providedIn: "root" });
|
|
666
|
-
AuthCredentialFactoryCapacitorService.decorators = [
|
|
667
|
-
{ type: i0.Injectable, args: [{
|
|
668
|
-
providedIn: 'root'
|
|
669
|
-
},] }
|
|
670
|
-
];
|
|
671
|
-
AuthCredentialFactoryCapacitorService.ctorParameters = function () { return [
|
|
672
|
-
{ type: i1.FirebaseService },
|
|
673
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [i0.forwardRef(function () { return i1.MalSharedConfigToken; }),] }] },
|
|
674
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [i0.forwardRef(function () { return MalCapacitorConfigToken; }),] }] }
|
|
675
|
-
]; };
|
|
676
|
-
|
|
677
|
-
// @angular/*
|
|
678
|
-
var MalCapacitorModule = /** @class */ (function () {
|
|
679
|
-
function MalCapacitorModule() {
|
|
680
|
-
}
|
|
681
|
-
MalCapacitorModule.forRoot = function (config) {
|
|
682
|
-
return {
|
|
683
|
-
ngModule: MalCapacitorModule,
|
|
684
|
-
providers: [
|
|
685
|
-
{
|
|
686
|
-
provide: MalCapacitorConfigToken,
|
|
687
|
-
useValue: config
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
provide: i1.MalAnalyticsProviderToken,
|
|
691
|
-
useFactory: analyticsProviderFactory,
|
|
692
|
-
deps: [i1.MalSharedConfigToken]
|
|
693
|
-
},
|
|
694
|
-
{
|
|
695
|
-
provide: i1.MalCrashlyticsProviderToken,
|
|
696
|
-
useFactory: crashlyticsProviderFactory,
|
|
697
|
-
deps: [i1.MalSharedConfigToken]
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
provide: i1.MalCredentialFactoryProviderToken,
|
|
701
|
-
useFactory: credFactoryProviderFactory,
|
|
702
|
-
deps: [i1.FirebaseService, i1.MalSharedConfigToken, MalCapacitorConfigToken]
|
|
703
|
-
}
|
|
704
|
-
]
|
|
705
|
-
};
|
|
706
|
-
};
|
|
707
|
-
return MalCapacitorModule;
|
|
708
|
-
}());
|
|
709
|
-
MalCapacitorModule.decorators = [
|
|
710
|
-
{ type: i0.NgModule }
|
|
711
|
-
];
|
|
712
|
-
function analyticsProviderFactory(config) {
|
|
713
|
-
if (config.services.firebaseAnalytics) {
|
|
714
|
-
if (core.Capacitor.platform === 'web') {
|
|
715
|
-
console.info('Unable to instantiate firebaseeAnalytics, Capacitor plugin not supported on web platforn.');
|
|
716
|
-
}
|
|
717
|
-
else if (core.Capacitor.isPluginAvailable('FirebaseAnalytics')) {
|
|
718
|
-
return new AnalyticsFirebaseCapacitorService();
|
|
719
|
-
}
|
|
720
|
-
else {
|
|
721
|
-
console.info('Unable to instantiate firebaseeAnalytics, Capacitor plugin is not available');
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
return null;
|
|
725
|
-
}
|
|
726
|
-
function crashlyticsProviderFactory(config) {
|
|
727
|
-
if (true === config.services.firebaseCrashlytics) {
|
|
728
|
-
if (core.Capacitor.isPluginAvailable('FirebaseCrashlytics')) {
|
|
729
|
-
return new CrashlyticsFirebaseCapacitorService();
|
|
730
|
-
}
|
|
731
|
-
else {
|
|
732
|
-
console.info('Unable to instantiate FirebaseCrashlytics, Capacitor plugin is not available');
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
return null;
|
|
736
|
-
}
|
|
737
|
-
function credFactoryProviderFactory(fire, sharedConfig, capConfig) {
|
|
738
|
-
if (core.Capacitor.isNative) {
|
|
739
|
-
return new AuthCredentialFactoryCapacitorService(fire, sharedConfig, capConfig);
|
|
740
|
-
}
|
|
741
|
-
else {
|
|
742
|
-
return null;
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
/**
|
|
747
|
-
* Generated bundle index. Do not edit.
|
|
748
|
-
*/
|
|
749
|
-
|
|
750
|
-
exports.AnalyticsFirebaseCapacitorService = AnalyticsFirebaseCapacitorService;
|
|
751
|
-
exports.AuthCredentialFactoryCapacitorService = AuthCredentialFactoryCapacitorService;
|
|
752
|
-
exports.CrashlyticsFirebaseCapacitorService = CrashlyticsFirebaseCapacitorService;
|
|
753
|
-
exports.MalCapacitorConfigToken = MalCapacitorConfigToken;
|
|
754
|
-
exports.MalCapacitorModule = MalCapacitorModule;
|
|
755
|
-
exports.analyticsProviderFactory = analyticsProviderFactory;
|
|
756
|
-
exports.crashlyticsProviderFactory = crashlyticsProviderFactory;
|
|
757
|
-
exports.credFactoryProviderFactory = credFactoryProviderFactory;
|
|
758
|
-
exports.ɵa = MalCapacitorConfigToken;
|
|
759
|
-
|
|
760
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
761
|
-
|
|
762
|
-
})));
|
|
763
|
-
//# sourceMappingURL=ngx-firebase-capacitor.umd.js.map
|