pwa-auth 3.3.9 → 3.3.11
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/LICENSES.txt +27 -27
- package/README.md +6 -6
- package/base/export/pwa-auth.d.ts +7 -7
- package/base/export/pwa-auth.js +7 -7
- package/base/firebase/authentication.d.ts +10 -10
- package/base/firebase/authentication.js +10 -10
- package/base/firebase/interface.d.ts +5 -5
- package/base/firebase/interface.js +80 -80
- package/base/firebase/interface.js.map +1 -1
- package/base/lazy-loader.d.ts +11 -11
- package/base/lazy-loader.js +22 -22
- package/base/lazy-loader.js.map +1 -1
- package/base/redux/backend.d.ts +113 -122
- package/base/redux/backend.js +43 -43
- package/base/redux/drawer.d.ts +17 -19
- package/base/redux/drawer.js +21 -21
- package/base/redux/drawer.js.map +1 -1
- package/base/redux/frontend.d.ts +185 -198
- package/base/redux/frontend.js +86 -86
- package/base/redux/frontend.js.map +1 -1
- package/base/store.d.ts +62 -62
- package/base/store.js +13 -13
- package/base/webcomponents/css/animation.d.ts +2 -2
- package/base/webcomponents/css/animation.js +2 -2
- package/base/webcomponents/css/svg.d.ts +3 -3
- package/base/webcomponents/css/svg.js +4 -4
- package/base/webcomponents/css/toggle.d.ts +1 -1
- package/base/webcomponents/css/toggle.js +2 -2
- package/base/webcomponents/drawer/css/drawer.d.ts +2 -2
- package/base/webcomponents/drawer/css/drawer.js +2 -2
- package/base/webcomponents/drawer/css/exit.d.ts +2 -2
- package/base/webcomponents/drawer/css/exit.js +2 -2
- package/base/webcomponents/drawer/css/link.d.ts +2 -2
- package/base/webcomponents/drawer/css/link.js +2 -2
- package/base/webcomponents/drawer/css/paragraph.d.ts +2 -2
- package/base/webcomponents/drawer/css/paragraph.js +2 -2
- package/base/webcomponents/drawer/drawer.d.ts +58 -58
- package/base/webcomponents/drawer/drawer.js +100 -100
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/form/css/button.d.ts +2 -2
- package/base/webcomponents/form/css/button.js +2 -2
- package/base/webcomponents/form/css/input.d.ts +2 -2
- package/base/webcomponents/form/css/input.js +2 -2
- package/base/webcomponents/form/css/label.d.ts +2 -2
- package/base/webcomponents/form/css/label.js +2 -2
- package/base/webcomponents/form/css/list.d.ts +2 -2
- package/base/webcomponents/form/css/list.js +2 -2
- package/base/webcomponents/form/css/toggle.d.ts +2 -2
- package/base/webcomponents/form/css/toggle.js +2 -2
- package/base/webcomponents/form/forgot.d.ts +15 -15
- package/base/webcomponents/form/forgot.js +45 -45
- package/base/webcomponents/form/forgot.js.map +1 -1
- package/base/webcomponents/form/login.d.ts +20 -20
- package/base/webcomponents/form/login.js +88 -88
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/signup.d.ts +20 -20
- package/base/webcomponents/form/signup.js +95 -95
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/icon/css/icon.d.ts +1 -1
- package/base/webcomponents/icon/css/icon.js +3 -3
- package/base/webcomponents/icon/icon.d.ts +54 -54
- package/base/webcomponents/icon/icon.js +59 -59
- package/base/webcomponents/icon/icon.js.map +1 -1
- package/base/webcomponents/login/css/auth.d.ts +2 -2
- package/base/webcomponents/login/css/auth.js +2 -2
- package/base/webcomponents/login/css/link.d.ts +2 -2
- package/base/webcomponents/login/css/link.js +2 -2
- package/base/webcomponents/login/css/paragraph.d.ts +2 -2
- package/base/webcomponents/login/css/paragraph.js +2 -2
- package/base/webcomponents/login/page.d.ts +55 -55
- package/base/webcomponents/login/page.js +71 -71
- package/base/webcomponents/login/page.js.map +1 -1
- package/base/webcomponents/settings/css/navigation.d.ts +1 -1
- package/base/webcomponents/settings/css/navigation.js +2 -2
- package/base/webcomponents/settings/input/delete.d.ts +55 -55
- package/base/webcomponents/settings/input/delete.js +73 -73
- package/base/webcomponents/settings/input/delete.js.map +1 -1
- package/base/webcomponents/settings/input/email.d.ts +55 -55
- package/base/webcomponents/settings/input/email.js +72 -72
- package/base/webcomponents/settings/input/email.js.map +1 -1
- package/base/webcomponents/settings/input/name.d.ts +54 -54
- package/base/webcomponents/settings/input/name.js +67 -67
- package/base/webcomponents/settings/input/name.js.map +1 -1
- package/base/webcomponents/settings/input/password.d.ts +57 -57
- package/base/webcomponents/settings/input/password.js +97 -97
- package/base/webcomponents/settings/input/password.js.map +1 -1
- package/base/webcomponents/settings/input/uploader.d.ts +58 -58
- package/base/webcomponents/settings/input/uploader.js +150 -150
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/settings.d.ts +58 -58
- package/base/webcomponents/settings/settings.js +80 -80
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/package.json +8 -8
- package/source/pwa-auth.js +83 -64
package/LICENSES.txt
CHANGED
|
@@ -154,7 +154,7 @@ SOFTWARE.
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
---
|
|
157
|
-
immer@
|
|
157
|
+
immer@11.1.3
|
|
158
158
|
MIT
|
|
159
159
|
MIT License
|
|
160
160
|
|
|
@@ -206,29 +206,29 @@ SOFTWARE.
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
---
|
|
209
|
-
@reduxjs/toolkit@2.
|
|
209
|
+
@reduxjs/toolkit@2.11.2
|
|
210
210
|
MIT
|
|
211
|
-
MIT License
|
|
212
|
-
|
|
213
|
-
Copyright (c) 2018 Mark Erikson
|
|
214
|
-
|
|
215
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
216
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
217
|
-
in the Software without restriction, including without limitation the rights
|
|
218
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
219
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
220
|
-
furnished to do so, subject to the following conditions:
|
|
221
|
-
|
|
222
|
-
The above copyright notice and this permission notice shall be included in all
|
|
223
|
-
copies or substantial portions of the Software.
|
|
224
|
-
|
|
225
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
226
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
227
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
228
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
229
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
230
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
231
|
-
SOFTWARE.
|
|
211
|
+
MIT License
|
|
212
|
+
|
|
213
|
+
Copyright (c) 2018 Mark Erikson
|
|
214
|
+
|
|
215
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
216
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
217
|
+
in the Software without restriction, including without limitation the rights
|
|
218
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
219
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
220
|
+
furnished to do so, subject to the following conditions:
|
|
221
|
+
|
|
222
|
+
The above copyright notice and this permission notice shall be included in all
|
|
223
|
+
copies or substantial portions of the Software.
|
|
224
|
+
|
|
225
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
226
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
227
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
228
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
229
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
230
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
231
|
+
SOFTWARE.
|
|
232
232
|
|
|
233
233
|
|
|
234
234
|
---
|
|
@@ -258,17 +258,17 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
|
|
|
258
258
|
|
|
259
259
|
|
|
260
260
|
---
|
|
261
|
-
@firebase/app@0.14.
|
|
261
|
+
@firebase/app@0.14.6
|
|
262
262
|
Apache-2.0
|
|
263
263
|
No license text provided
|
|
264
264
|
|
|
265
265
|
---
|
|
266
|
-
@firebase/auth@1.
|
|
266
|
+
@firebase/auth@1.12.0
|
|
267
267
|
Apache-2.0
|
|
268
268
|
No license text provided
|
|
269
269
|
|
|
270
270
|
---
|
|
271
|
-
firebase@12.
|
|
271
|
+
firebase@12.7.0
|
|
272
272
|
Apache-2.0
|
|
273
273
|
No license text provided
|
|
274
274
|
|
|
@@ -278,7 +278,7 @@ Apache-2.0
|
|
|
278
278
|
No license text provided
|
|
279
279
|
|
|
280
280
|
---
|
|
281
|
-
@firebase/firestore@4.9.
|
|
281
|
+
@firebase/firestore@4.9.3
|
|
282
282
|
Apache-2.0
|
|
283
283
|
No license text provided
|
|
284
284
|
|
package/README.md
CHANGED
|
@@ -31,10 +31,10 @@ Continue reading to understand how to install this project:
|
|
|
31
31
|
## Library
|
|
32
32
|
```javascript
|
|
33
33
|
// ES - import Modules
|
|
34
|
-
import '
|
|
34
|
+
import 'pwa-auth';
|
|
35
35
|
|
|
36
36
|
// Optional - copy CoreJS files
|
|
37
|
-
'npm/pwa-auth/source/**/*'
|
|
37
|
+
'./npm/pwa-auth/source/**/*'
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Technical Summary
|
|
@@ -208,10 +208,10 @@ Eports: classes and objects
|
|
|
208
208
|
```javascript
|
|
209
209
|
// Custom HTML Element Classes
|
|
210
210
|
import 'pwa-auth';
|
|
211
|
-
`<user-icon
|
|
212
|
-
`<user-drawer
|
|
213
|
-
`<user-settings
|
|
214
|
-
`<user-login
|
|
211
|
+
`<user-icon>` // subscribe | empty= "./images/empty.jpg"
|
|
212
|
+
`<user-drawer>` // subscribe | url= "./settings"
|
|
213
|
+
`<user-settings>` // empty= "./images/empty.jpg"
|
|
214
|
+
`<user-login>` // subscribe |
|
|
215
215
|
|
|
216
216
|
// Firebase Objects
|
|
217
217
|
import { db, storage, auth, user } from 'pwa-auth';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { UserLogin } from '../webcomponents/login/page';
|
|
2
|
-
export { UserDrawer } from '../webcomponents/drawer/drawer';
|
|
3
|
-
export { UserSettings } from '../webcomponents/settings/settings';
|
|
4
|
-
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
|
-
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
|
-
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
-
export { logOut, logAccount, logAccountDelete, deleteDocument } from "../firebase/interface";
|
|
1
|
+
export { UserLogin } from '../webcomponents/login/page';
|
|
2
|
+
export { UserDrawer } from '../webcomponents/drawer/drawer';
|
|
3
|
+
export { UserSettings } from '../webcomponents/settings/settings';
|
|
4
|
+
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
|
+
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
|
+
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
+
export { logOut, logAccount, logAccountDelete, deleteDocument } from "../firebase/interface";
|
package/base/export/pwa-auth.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { UserLogin } from '../webcomponents/login/page';
|
|
2
|
-
export { UserDrawer } from '../webcomponents/drawer/drawer';
|
|
3
|
-
export { UserSettings } from '../webcomponents/settings/settings';
|
|
4
|
-
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
|
-
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
|
-
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
-
export { logOut, logAccount, logAccountDelete, deleteDocument } from "../firebase/interface";
|
|
1
|
+
export { UserLogin } from '../webcomponents/login/page';
|
|
2
|
+
export { UserDrawer } from '../webcomponents/drawer/drawer';
|
|
3
|
+
export { UserSettings } from '../webcomponents/settings/settings';
|
|
4
|
+
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
|
+
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
|
+
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
+
export { logOut, logAccount, logAccountDelete, deleteDocument } from "../firebase/interface";
|
|
8
8
|
//# sourceMappingURL=pwa-auth.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FirebaseApp } from 'firebase/app';
|
|
2
|
-
import { Firestore } from "firebase/firestore";
|
|
3
|
-
import { FirebaseStorage } from "@firebase/storage";
|
|
4
|
-
import { User, Auth } from 'firebase/auth';
|
|
5
|
-
export declare const firebaseConfig: any;
|
|
6
|
-
export declare const application: FirebaseApp;
|
|
7
|
-
export declare const db: Firestore;
|
|
8
|
-
export declare const storage: FirebaseStorage;
|
|
9
|
-
export declare const auth: Auth;
|
|
10
|
-
export declare const user: User | null;
|
|
1
|
+
import { FirebaseApp } from 'firebase/app';
|
|
2
|
+
import { Firestore } from "firebase/firestore";
|
|
3
|
+
import { FirebaseStorage } from "@firebase/storage";
|
|
4
|
+
import { User, Auth } from 'firebase/auth';
|
|
5
|
+
export declare const firebaseConfig: any;
|
|
6
|
+
export declare const application: FirebaseApp;
|
|
7
|
+
export declare const db: Firestore;
|
|
8
|
+
export declare const storage: FirebaseStorage;
|
|
9
|
+
export declare const auth: Auth;
|
|
10
|
+
export declare const user: User | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { initializeApp } from 'firebase/app';
|
|
2
|
-
import { getFirestore } from "firebase/firestore";
|
|
3
|
-
import { getStorage } from "@firebase/storage";
|
|
4
|
-
import { getAuth } from 'firebase/auth';
|
|
5
|
-
export const firebaseConfig = JSON.parse(process.env.FIREBASE_CONFIG || "{}");
|
|
6
|
-
export const application = initializeApp(firebaseConfig);
|
|
7
|
-
export const db = getFirestore(application);
|
|
8
|
-
export const storage = getStorage(application);
|
|
9
|
-
export const auth = getAuth(application);
|
|
10
|
-
export const user = auth.currentUser;
|
|
1
|
+
import { initializeApp } from 'firebase/app';
|
|
2
|
+
import { getFirestore } from "firebase/firestore";
|
|
3
|
+
import { getStorage } from "@firebase/storage";
|
|
4
|
+
import { getAuth } from 'firebase/auth';
|
|
5
|
+
export const firebaseConfig = JSON.parse(process.env.FIREBASE_CONFIG || "{}");
|
|
6
|
+
export const application = initializeApp(firebaseConfig);
|
|
7
|
+
export const db = getFirestore(application);
|
|
8
|
+
export const storage = getStorage(application);
|
|
9
|
+
export const auth = getAuth(application);
|
|
10
|
+
export const user = auth.currentUser;
|
|
11
11
|
//# sourceMappingURL=authentication.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const alertEmail: (error: any) => void;
|
|
2
|
-
export declare const logOut: () => Promise<void>;
|
|
3
|
-
export declare const logAccount: () => Promise<void>;
|
|
4
|
-
export declare const logAccountDelete: () => Promise<void>;
|
|
5
|
-
export declare const deleteDocument: (collect: string, item: string) => Promise<void>;
|
|
1
|
+
export declare const alertEmail: (error: any) => void;
|
|
2
|
+
export declare const logOut: () => Promise<void>;
|
|
3
|
+
export declare const logAccount: () => Promise<void>;
|
|
4
|
+
export declare const logAccountDelete: () => Promise<void>;
|
|
5
|
+
export declare const deleteDocument: (collect: string, item: string) => Promise<void>;
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { store } from '../store';
|
|
2
|
-
import { closeSign, iconAuth, nameAuth, userAuth } from '../redux/frontend';
|
|
3
|
-
import { accID, accEmail, accImage, accName } from '../redux/backend';
|
|
4
|
-
import { getAuth, onAuthStateChanged, sendEmailVerification, signOut } from 'firebase/auth';
|
|
5
|
-
import { doc, deleteDoc } from "firebase/firestore";
|
|
6
|
-
import { getAnalytics, logEvent } from "firebase/analytics";
|
|
7
|
-
import { isSupported } from "firebase/messaging";
|
|
8
|
-
import { application, auth, db } from './authentication';
|
|
9
|
-
getAuth().useDeviceLanguage();
|
|
10
|
-
let analytics;
|
|
11
|
-
(async () => {
|
|
12
|
-
if (await isSupported()) {
|
|
13
|
-
console.log('Firebase Analytics Supported');
|
|
14
|
-
analytics = getAnalytics(application);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
console.log("Firebase Analytics is not supported in this environment.");
|
|
18
|
-
}
|
|
19
|
-
})();
|
|
20
|
-
if ('serviceWorker' in navigator) {
|
|
21
|
-
console.log('Service Worker is supported');
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
console.log('Service Worker is not supported');
|
|
25
|
-
}
|
|
26
|
-
if ('PushManager' in window) {
|
|
27
|
-
console.log('Push API is supported');
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
console.log('Push API is not supported');
|
|
31
|
-
}
|
|
32
|
-
let pendingEmailVerification = false;
|
|
33
|
-
window.addEventListener("userEmailChanged", () => {
|
|
34
|
-
pendingEmailVerification = true;
|
|
35
|
-
});
|
|
36
|
-
onAuthStateChanged(auth, (user) => {
|
|
37
|
-
if (user) {
|
|
38
|
-
store.dispatch(userAuth(true));
|
|
39
|
-
store.dispatch(closeSign());
|
|
40
|
-
store.dispatch(accID(user.uid));
|
|
41
|
-
store.dispatch(accName(user.displayName || 'John Doe'));
|
|
42
|
-
store.dispatch(accEmail(user.email || ''));
|
|
43
|
-
store.dispatch(accImage(user.photoURL || ''));
|
|
44
|
-
store.dispatch(nameAuth(user.displayName || 'John Doe'));
|
|
45
|
-
store.dispatch(iconAuth(user.photoURL || ''));
|
|
46
|
-
if (pendingEmailVerification && !user.emailVerified) {
|
|
47
|
-
sendEmailVerification(user)
|
|
48
|
-
.then(() => {
|
|
49
|
-
console.log("Verification email sent to:");
|
|
50
|
-
pendingEmailVerification = false;
|
|
51
|
-
})
|
|
52
|
-
.catch((error) => {
|
|
53
|
-
console.error("Error sending verification email:", error.message);
|
|
54
|
-
pendingEmailVerification = false;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
else if (user.emailVerified) {
|
|
58
|
-
console.log("User's email is already verified:");
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
console.log("User signed in, no email verification pending:");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
store.dispatch(userAuth(false));
|
|
66
|
-
store.dispatch(accID(''));
|
|
67
|
-
store.dispatch(accName('John Doe'));
|
|
68
|
-
store.dispatch(accEmail(''));
|
|
69
|
-
store.dispatch(accImage(''));
|
|
70
|
-
store.dispatch(nameAuth('John Doe'));
|
|
71
|
-
store.dispatch(iconAuth(''));
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
export const alertEmail = (error) => { console.log('Problem: ' + error); };
|
|
75
|
-
export const logOut = async () => { return signOut(auth); };
|
|
76
|
-
export const logAccount = async () => { logEvent(analytics, 'create_account'); };
|
|
77
|
-
export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
|
|
78
|
-
export const deleteDocument = async (collect, item) => {
|
|
79
|
-
await deleteDoc(doc(db, collect, item));
|
|
80
|
-
};
|
|
1
|
+
import { store } from '../store';
|
|
2
|
+
import { closeSign, iconAuth, nameAuth, userAuth } from '../redux/frontend';
|
|
3
|
+
import { accID, accEmail, accImage, accName } from '../redux/backend';
|
|
4
|
+
import { getAuth, onAuthStateChanged, sendEmailVerification, signOut } from 'firebase/auth';
|
|
5
|
+
import { doc, deleteDoc } from "firebase/firestore";
|
|
6
|
+
import { getAnalytics, logEvent } from "firebase/analytics";
|
|
7
|
+
import { isSupported } from "firebase/messaging";
|
|
8
|
+
import { application, auth, db } from './authentication';
|
|
9
|
+
getAuth().useDeviceLanguage();
|
|
10
|
+
let analytics;
|
|
11
|
+
(async () => {
|
|
12
|
+
if (await isSupported()) {
|
|
13
|
+
console.log('Firebase Analytics Supported');
|
|
14
|
+
analytics = getAnalytics(application);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
console.log("Firebase Analytics is not supported in this environment.");
|
|
18
|
+
}
|
|
19
|
+
})();
|
|
20
|
+
if ('serviceWorker' in navigator) {
|
|
21
|
+
console.log('Service Worker is supported');
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
console.log('Service Worker is not supported');
|
|
25
|
+
}
|
|
26
|
+
if ('PushManager' in window) {
|
|
27
|
+
console.log('Push API is supported');
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.log('Push API is not supported');
|
|
31
|
+
}
|
|
32
|
+
let pendingEmailVerification = false;
|
|
33
|
+
window.addEventListener("userEmailChanged", () => {
|
|
34
|
+
pendingEmailVerification = true;
|
|
35
|
+
});
|
|
36
|
+
onAuthStateChanged(auth, (user) => {
|
|
37
|
+
if (user) {
|
|
38
|
+
store.dispatch(userAuth(true));
|
|
39
|
+
store.dispatch(closeSign());
|
|
40
|
+
store.dispatch(accID(user.uid));
|
|
41
|
+
store.dispatch(accName(user.displayName || 'John Doe'));
|
|
42
|
+
store.dispatch(accEmail(user.email || ''));
|
|
43
|
+
store.dispatch(accImage(user.photoURL || ''));
|
|
44
|
+
store.dispatch(nameAuth(user.displayName || 'John Doe'));
|
|
45
|
+
store.dispatch(iconAuth(user.photoURL || ''));
|
|
46
|
+
if (pendingEmailVerification && !user.emailVerified) {
|
|
47
|
+
sendEmailVerification(user)
|
|
48
|
+
.then(() => {
|
|
49
|
+
console.log("Verification email sent to:");
|
|
50
|
+
pendingEmailVerification = false;
|
|
51
|
+
})
|
|
52
|
+
.catch((error) => {
|
|
53
|
+
console.error("Error sending verification email:", error.message);
|
|
54
|
+
pendingEmailVerification = false;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else if (user.emailVerified) {
|
|
58
|
+
console.log("User's email is already verified:");
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
console.log("User signed in, no email verification pending:");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
store.dispatch(userAuth(false));
|
|
66
|
+
store.dispatch(accID(''));
|
|
67
|
+
store.dispatch(accName('John Doe'));
|
|
68
|
+
store.dispatch(accEmail(''));
|
|
69
|
+
store.dispatch(accImage(''));
|
|
70
|
+
store.dispatch(nameAuth('John Doe'));
|
|
71
|
+
store.dispatch(iconAuth(''));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export const alertEmail = (error) => { console.log('Problem: ' + error); };
|
|
75
|
+
export const logOut = async () => { return signOut(auth); };
|
|
76
|
+
export const logAccount = async () => { logEvent(analytics, 'create_account'); };
|
|
77
|
+
export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
|
|
78
|
+
export const deleteDocument = async (collect, item) => {
|
|
79
|
+
await deleteDoc(doc(db, collect, item));
|
|
80
|
+
};
|
|
81
81
|
//# sourceMappingURL=interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../typescript/firebase/interface.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG5F,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAa,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,IAAI,EAA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CAAE,WAAW,GAAG,KAAK,CAAE,CAAC,CAA8E,CAAC,CAAA;AAG7J,MAAM,CAAC,MAAM,MAAM,GAAe,KAAK,IAAI,EAAE,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,UAAU,GAAW,KAAK,IAAI,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAK,KAAK,IAAI,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,cAAc,GAAO,KAAK,EAAE,OAAc,EAAE,IAAW,EAAE,EAAE;IAEtE,MAAM,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAE1C,CAAC,CAAC"}
|
package/base/lazy-loader.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class LazyLoader extends LitElement {
|
|
3
|
-
active: boolean;
|
|
4
|
-
constructor();
|
|
5
|
-
shouldUpdate(): boolean;
|
|
6
|
-
}
|
|
7
|
-
declare global {
|
|
8
|
-
interface HTMLElementTagNameMap {
|
|
9
|
-
'lazy-loader': LazyLoader;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class LazyLoader extends LitElement {
|
|
3
|
+
active: boolean;
|
|
4
|
+
constructor();
|
|
5
|
+
shouldUpdate(): boolean;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'lazy-loader': LazyLoader;
|
|
10
|
+
}
|
|
11
|
+
}
|
package/base/lazy-loader.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { LitElement } from 'lit';
|
|
11
|
-
import { property } from 'lit/decorators.js';
|
|
12
|
-
export class LazyLoader extends LitElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this.active = false;
|
|
16
|
-
}
|
|
17
|
-
shouldUpdate() { return this.active; }
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
property({ type: Boolean }),
|
|
21
|
-
__metadata("design:type", Boolean)
|
|
22
|
-
], LazyLoader.prototype, "active", void 0);
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { LitElement } from 'lit';
|
|
11
|
+
import { property } from 'lit/decorators.js';
|
|
12
|
+
export class LazyLoader extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.active = false;
|
|
16
|
+
}
|
|
17
|
+
shouldUpdate() { return this.active; }
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
property({ type: Boolean }),
|
|
21
|
+
__metadata("design:type", Boolean)
|
|
22
|
+
], LazyLoader.prototype, "active", void 0);
|
|
23
23
|
//# sourceMappingURL=lazy-loader.js.map
|
package/base/lazy-loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-loader.js","sourceRoot":"","sources":["../typescript/lazy-loader.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAQ,mBAAmB,CAAC;AAE/C,MAAM,OAAO,UAAW,SAAQ,UAAU;IAKxC;QACE,KAAK,EAAE,CAAC;QAHwB,WAAM,GAAa,KAAK,CAAC;IAI3D,CAAC;IAGD,YAAY,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,CAAE,CAAC;CAExC;
|
|
1
|
+
{"version":3,"file":"lazy-loader.js","sourceRoot":"","sources":["../typescript/lazy-loader.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAQ,mBAAmB,CAAC;AAE/C,MAAM,OAAO,UAAW,SAAQ,UAAU;IAKxC;QACE,KAAK,EAAE,CAAC;QAHwB,WAAM,GAAa,KAAK,CAAC;IAI3D,CAAC;IAGD,YAAY,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,CAAE,CAAC;CAExC;AATmC;IAAjC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;0CAAiC"}
|