pwa-auth 3.3.4 → 3.3.6
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 +5 -5
- package/README.md +37 -23
- package/base/export/pwa-auth.d.ts +6 -6
- package/base/export/pwa-auth.js +6 -6
- package/base/firebase/authentication.d.ts +10 -10
- package/base/firebase/authentication.js +10 -10
- package/base/firebase/interface.d.ts +4 -4
- package/base/firebase/interface.js +79 -79
- 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 +2 -2
- 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 +33 -37
- package/source/{development/pwa-auth.js → pwa-auth.js} +30 -31
- package/export/pwa-auth.ts +0 -4
- package/source/development/pwa-auth.js.map +0 -1
- package/source/esm/pwa-auth.js +0 -1109
package/LICENSES.txt
CHANGED
|
@@ -154,7 +154,7 @@ SOFTWARE.
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
---
|
|
157
|
-
immer@10.
|
|
157
|
+
immer@10.2.0
|
|
158
158
|
MIT
|
|
159
159
|
MIT License
|
|
160
160
|
|
|
@@ -206,7 +206,7 @@ SOFTWARE.
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
---
|
|
209
|
-
@reduxjs/toolkit@2.
|
|
209
|
+
@reduxjs/toolkit@2.10.1
|
|
210
210
|
MIT
|
|
211
211
|
MIT License
|
|
212
212
|
|
|
@@ -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.5
|
|
262
262
|
Apache-2.0
|
|
263
263
|
No license text provided
|
|
264
264
|
|
|
265
265
|
---
|
|
266
|
-
@firebase/auth@1.11.
|
|
266
|
+
@firebase/auth@1.11.1
|
|
267
267
|
Apache-2.0
|
|
268
268
|
No license text provided
|
|
269
269
|
|
|
270
270
|
---
|
|
271
|
-
firebase@12.
|
|
271
|
+
firebase@12.5.0
|
|
272
272
|
Apache-2.0
|
|
273
273
|
No license text provided
|
|
274
274
|
|
package/README.md
CHANGED
|
@@ -20,19 +20,44 @@ Continue reading to understand how to install this project:
|
|
|
20
20
|
- Authentication - email login
|
|
21
21
|
- Cloud Storage - storage bucket
|
|
22
22
|
|
|
23
|
+
## Enrichment
|
|
24
|
+
- Development:
|
|
25
|
+
- Redux State Connection
|
|
26
|
+
- Global Functions
|
|
27
|
+
- Optional:
|
|
28
|
+
- CSS Custom Properties
|
|
29
|
+
|
|
30
|
+
## Atomic Design: - One Concept per Module
|
|
31
|
+
- Unique Identifiers:
|
|
32
|
+
- Links and Hashes:
|
|
33
|
+
- Semantics:
|
|
34
|
+
- Descriptions
|
|
35
|
+
|
|
23
36
|
## Technical Summary
|
|
24
37
|
- Type Strong with [TypeScript](https://www.typescriptlang.org)
|
|
25
38
|
- Stylable with [CSS Custom Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties)
|
|
26
39
|
- State Management with [ReduxJS](https://redux.js.org/)
|
|
27
|
-
- Authentication Google's [Firebase](https://www.firebase.com)
|
|
40
|
+
- Authentication with Google's [Firebase](https://www.firebase.com)
|
|
28
41
|
- Firebase Initialization Object: `window.process = { env: { FIREBASE_CONFIG: `
|
|
29
42
|
|
|
30
|
-
## Prototypes
|
|
31
|
-
-
|
|
32
|
-
- `<user-
|
|
33
|
-
-
|
|
34
|
-
- `<user-
|
|
35
|
-
-
|
|
43
|
+
## HTML Prototypes
|
|
44
|
+
- Button:
|
|
45
|
+
- `<user-icon>` Email Log-in / Email Subscribe / Icon
|
|
46
|
+
- Drop-down Drawer:
|
|
47
|
+
- `<user-drawer>` Email Log-in / Email Subscribe / Menu with Log-out
|
|
48
|
+
- Pages:
|
|
49
|
+
- `<user-settings>` Account Settings
|
|
50
|
+
- `<user-login>` Auth: Email Log-in / email Subscribe
|
|
51
|
+
- `<email-reset>` Password Reset
|
|
52
|
+
|
|
53
|
+
<!-- ## Entry Point / Content -->
|
|
54
|
+
|
|
55
|
+
## Abstraction Layer
|
|
56
|
+
- The Observer Patterns:
|
|
57
|
+
- Event emitters:
|
|
58
|
+
- Custom Events
|
|
59
|
+
|
|
60
|
+
<!-- ## Navigation -->
|
|
36
61
|
|
|
37
62
|
## Features: Library Logical States
|
|
38
63
|
- Register through Email and Password
|
|
@@ -43,19 +68,8 @@ Continue reading to understand how to install this project:
|
|
|
43
68
|
- Change Password
|
|
44
69
|
- Upload Profile Picture
|
|
45
70
|
- Delete Account
|
|
46
|
-
- Development:
|
|
47
|
-
- Global Functions
|
|
48
|
-
- Redux State Connection
|
|
49
71
|
|
|
50
|
-
|
|
51
|
-
- Button:
|
|
52
|
-
- Email Log-in / Email Subscribe / Icon
|
|
53
|
-
- Drop-down Drawer:
|
|
54
|
-
- Email Log-in / Email Subscribe / Menu with Log-out
|
|
55
|
-
- Pages:
|
|
56
|
-
- Account Settings
|
|
57
|
-
- Auth: Email Log-in / email Subscribe
|
|
58
|
-
- Password Reset
|
|
72
|
+
|
|
59
73
|
|
|
60
74
|
## Project Type: ECMA Script Modules
|
|
61
75
|
Eports: classes and objects
|
|
@@ -84,16 +98,16 @@ import { store } from 'pwa-auth';
|
|
|
84
98
|
|
|
85
99
|
## Project Type: Global Namespaces
|
|
86
100
|
```html
|
|
87
|
-
<!-- Optional: Copy the Project Files from '
|
|
101
|
+
<!-- Optional: Copy the Project Files from 'source' Folder -->
|
|
88
102
|
<script type="module" src="./pwa-auth.js"></script>
|
|
89
103
|
```
|
|
90
104
|
|
|
91
|
-
## HTML
|
|
105
|
+
## HTML Website Components
|
|
92
106
|
```html
|
|
93
107
|
<user-icon>
|
|
94
108
|
<!-- property: subscribe: (Initial State): Subscribe -->
|
|
95
109
|
<!-- property: subscribe: else (Initial State): Login -->
|
|
96
|
-
<!-- property
|
|
110
|
+
<!-- property: empty: location of empty image -->
|
|
97
111
|
<!-- state: Logged-out: txt: Login Button -->
|
|
98
112
|
<!-- state: Logged-out: txt: Subscribe Button -->
|
|
99
113
|
<!-- state: Logged-in: photo: Icon Button -->
|
|
@@ -128,7 +142,7 @@ import { store } from 'pwa-auth';
|
|
|
128
142
|
|
|
129
143
|
## Boilerplate
|
|
130
144
|
For HTML projects, copy js bundle to disk
|
|
131
|
-
- source/
|
|
145
|
+
- source/
|
|
132
146
|
- pwa-auth.js
|
|
133
147
|
- pwa-auth.js.map
|
|
134
148
|
- pwa-styles.css
|
|
@@ -1,6 +1,6 @@
|
|
|
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';
|
|
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';
|
package/base/export/pwa-auth.js
CHANGED
|
@@ -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';
|
|
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
7
|
//# 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,4 +1,4 @@
|
|
|
1
|
-
export declare const logOut: () => Promise<void>;
|
|
2
|
-
export declare const logAccount: () => Promise<void>;
|
|
3
|
-
export declare const logAccountDelete: () => Promise<void>;
|
|
4
|
-
export declare const deleteDocument: (collect: string, item: string) => Promise<void>;
|
|
1
|
+
export declare const logOut: () => Promise<void>;
|
|
2
|
+
export declare const logAccount: () => Promise<void>;
|
|
3
|
+
export declare const logAccountDelete: () => Promise<void>;
|
|
4
|
+
export declare const deleteDocument: (collect: string, item: string) => Promise<void>;
|
|
@@ -1,80 +1,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 logOut = async () => { return signOut(auth); };
|
|
75
|
-
export const logAccount = async () => { logEvent(analytics, 'create_account'); };
|
|
76
|
-
export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
|
|
77
|
-
export const deleteDocument = async (collect, item) => {
|
|
78
|
-
await deleteDoc(doc(db, collect, item));
|
|
79
|
-
};
|
|
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 logOut = async () => { return signOut(auth); };
|
|
75
|
+
export const logAccount = async () => { logEvent(analytics, 'create_account'); };
|
|
76
|
+
export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
|
|
77
|
+
export const deleteDocument = async (collect, item) => {
|
|
78
|
+
await deleteDoc(doc(db, collect, item));
|
|
79
|
+
};
|
|
80
80
|
//# 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,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAGxD,OAAO,EAAE,CAAC,iBAAiB,EAAE,CAAC;AAS9B,IAAI,SAAoB,CAAC;AAEzB,CAAC,KAAK,IAAI,EAAE;IACV,IAAI,MAAM,WAAW,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../typescript/firebase/interface.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAA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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"}
|