pwa-auth 2.0.7 → 3.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/CHANGELOG.md +15 -0
- package/README.md +65 -54
- package/demonstration/compiled/pwa-auth.js +880 -0
- package/{website → demonstration}/css/styles.css +4 -2
- package/{demo → demonstration}/index.html +7 -4
- package/package.json +12 -10
- package/pwa-auth.js +4 -3
- package/{website → src}/THIRD_PARTY_LICENSES.txt +56 -56
- package/src/compiled/pwa-auth.js +880 -0
- package/{source → src-typescript}/css/form/label.ts +0 -2
- package/src-typescript/css/toggle.ts +9 -0
- package/src-typescript/development/junk/firebase-object.ts +49 -0
- package/src-typescript/development/junk/notes.md +96 -0
- package/src-typescript/development/junk/phone.ts +146 -0
- package/src-typescript/development/junk/photo.ts +440 -0
- package/src-typescript/development/junk/telephone.ts +282 -0
- package/{source/firebase/firebase-login.ts → src-typescript/development/login.ts} +1 -1
- package/{source/firebase/firebase.ts → src-typescript/development/object.ts} +1 -1
- package/src-typescript/firebase/authentication.ts +11 -0
- package/{source/firebase/start.ts → src-typescript/firebase/interface.ts} +35 -64
- package/{source/custom-elements → src-typescript/webcomponents}/drawer/drawer.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/drawer/input/forgot.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/drawer/input/login.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/drawer/input/sign-up.ts +2 -1
- package/{deploy/custom-elements/icon/css/icon.js → src-typescript/webcomponents/icon/css/icon.ts} +4 -3
- package/{source/custom-elements → src-typescript/webcomponents}/icon/icon.ts +2 -21
- package/{source/custom-elements → src-typescript/webcomponents}/settings/input/delete.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/input/email.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/input/images.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/input/name.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/input/password.ts +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/input/uploader.ts +2 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/settings.ts +2 -2
- package/demo/css/styles.css +0 -67
- package/deploy/css/default.d.ts +0 -5
- package/deploy/css/default.d.ts.map +0 -1
- package/deploy/css/default.js +0 -99
- package/deploy/css/font.d.ts +0 -2
- package/deploy/css/font.d.ts.map +0 -1
- package/deploy/css/font.js +0 -16
- package/deploy/css/form/button.d.ts +0 -3
- package/deploy/css/form/button.d.ts.map +0 -1
- package/deploy/css/form/button.js +0 -54
- package/deploy/css/form/input.d.ts +0 -3
- package/deploy/css/form/input.d.ts.map +0 -1
- package/deploy/css/form/input.js +0 -24
- package/deploy/css/form/label.d.ts +0 -3
- package/deploy/css/form/label.d.ts.map +0 -1
- package/deploy/css/form/label.js +0 -24
- package/deploy/css/form/list.d.ts +0 -3
- package/deploy/css/form/list.d.ts.map +0 -1
- package/deploy/css/form/list.js +0 -22
- package/deploy/css/svg.d.ts +0 -4
- package/deploy/css/svg.d.ts.map +0 -1
- package/deploy/css/svg.js +0 -4
- package/deploy/css/toggle.d.ts +0 -2
- package/deploy/css/toggle.d.ts.map +0 -1
- package/deploy/css/toggle.js +0 -8
- package/deploy/custom-elements/drawer/css/drawer.d.ts +0 -3
- package/deploy/custom-elements/drawer/css/drawer.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/css/drawer.js +0 -55
- package/deploy/custom-elements/drawer/css/exit.d.ts +0 -3
- package/deploy/custom-elements/drawer/css/exit.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/css/exit.js +0 -48
- package/deploy/custom-elements/drawer/css/link.d.ts +0 -3
- package/deploy/custom-elements/drawer/css/link.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/css/link.js +0 -12
- package/deploy/custom-elements/drawer/css/paragraph.d.ts +0 -3
- package/deploy/custom-elements/drawer/css/paragraph.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/css/paragraph.js +0 -10
- package/deploy/custom-elements/drawer/css/toggle.d.ts +0 -3
- package/deploy/custom-elements/drawer/css/toggle.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/css/toggle.js +0 -18
- package/deploy/custom-elements/drawer/drawer.d.ts +0 -37
- package/deploy/custom-elements/drawer/drawer.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/drawer.js +0 -128
- package/deploy/custom-elements/drawer/input/forgot.d.ts +0 -16
- package/deploy/custom-elements/drawer/input/forgot.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/input/forgot.js +0 -60
- package/deploy/custom-elements/drawer/input/login.d.ts +0 -20
- package/deploy/custom-elements/drawer/input/login.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/input/login.js +0 -128
- package/deploy/custom-elements/drawer/input/sign-up.d.ts +0 -20
- package/deploy/custom-elements/drawer/input/sign-up.d.ts.map +0 -1
- package/deploy/custom-elements/drawer/input/sign-up.js +0 -137
- package/deploy/custom-elements/icon/css/icon.d.ts +0 -2
- package/deploy/custom-elements/icon/css/icon.d.ts.map +0 -1
- package/deploy/custom-elements/icon/icon.d.ts +0 -33
- package/deploy/custom-elements/icon/icon.d.ts.map +0 -1
- package/deploy/custom-elements/icon/icon.js +0 -72
- package/deploy/custom-elements/settings/css/navigation.d.ts +0 -2
- package/deploy/custom-elements/settings/css/navigation.d.ts.map +0 -1
- package/deploy/custom-elements/settings/css/navigation.js +0 -51
- package/deploy/custom-elements/settings/input/delete.d.ts +0 -34
- package/deploy/custom-elements/settings/input/delete.d.ts.map +0 -1
- package/deploy/custom-elements/settings/input/delete.js +0 -87
- package/deploy/custom-elements/settings/input/email.d.ts +0 -34
- package/deploy/custom-elements/settings/input/email.d.ts.map +0 -1
- package/deploy/custom-elements/settings/input/email.js +0 -98
- package/deploy/custom-elements/settings/input/images.d.ts +0 -2
- package/deploy/custom-elements/settings/input/images.d.ts.map +0 -1
- package/deploy/custom-elements/settings/input/images.js +0 -22
- package/deploy/custom-elements/settings/input/name.d.ts +0 -33
- package/deploy/custom-elements/settings/input/name.d.ts.map +0 -1
- package/deploy/custom-elements/settings/input/name.js +0 -90
- package/deploy/custom-elements/settings/input/password.d.ts +0 -36
- package/deploy/custom-elements/settings/input/password.d.ts.map +0 -1
- package/deploy/custom-elements/settings/input/password.js +0 -145
- package/deploy/custom-elements/settings/input/uploader.d.ts +0 -37
- package/deploy/custom-elements/settings/input/uploader.d.ts.map +0 -1
- package/deploy/custom-elements/settings/input/uploader.js +0 -224
- package/deploy/custom-elements/settings/settings.d.ts +0 -37
- package/deploy/custom-elements/settings/settings.d.ts.map +0 -1
- package/deploy/custom-elements/settings/settings.js +0 -197
- package/deploy/firebase/firebase-login.d.ts +0 -21
- package/deploy/firebase/firebase-login.d.ts.map +0 -1
- package/deploy/firebase/firebase-login.js +0 -85
- package/deploy/firebase/firebase.d.ts +0 -20
- package/deploy/firebase/firebase.d.ts.map +0 -1
- package/deploy/firebase/firebase.js +0 -76
- package/deploy/firebase/start.d.ts +0 -14
- package/deploy/firebase/start.d.ts.map +0 -1
- package/deploy/firebase/start.js +0 -86
- package/deploy/lazy-loader.d.ts +0 -11
- package/deploy/lazy-loader.d.ts.map +0 -1
- package/deploy/lazy-loader.js +0 -20
- package/deploy/redux/backend.d.ts +0 -16
- package/deploy/redux/backend.d.ts.map +0 -1
- package/deploy/redux/backend.js +0 -43
- package/deploy/redux/drawer.d.ts +0 -18
- package/deploy/redux/drawer.d.ts.map +0 -1
- package/deploy/redux/drawer.js +0 -21
- package/deploy/redux/frontend.d.ts +0 -17
- package/deploy/redux/frontend.d.ts.map +0 -1
- package/deploy/redux/frontend.js +0 -67
- package/deploy/redux/object.d.ts +0 -24
- package/deploy/redux/object.d.ts.map +0 -1
- package/deploy/redux/object.js +0 -1
- package/deploy/store.d.ts +0 -19
- package/deploy/store.d.ts.map +0 -1
- package/deploy/store.js +0 -13
- package/npm/THIRD_PARTY_LICENSES.txt +0 -303
- package/npm/pwa-auth.js +0 -306
- package/source/css/toggle.ts +0 -9
- package/source/custom-elements/icon/css/icon.ts +0 -70
- package/website/404.html +0 -33
- package/website/css/pwa-styles.css +0 -36
- package/website/images/empty.jpg +0 -0
- package/website/images/favicon.ico +0 -0
- package/website/images/manifest/logo-144.png +0 -0
- package/website/images/manifest/logo-192.png +0 -0
- package/website/images/manifest/logo-48.png +0 -0
- package/website/images/manifest/logo-512.png +0 -0
- package/website/images/manifest/logo-72.png +0 -0
- package/website/images/manifest/logo-96.png +0 -0
- package/website/images/manifest/maskable_icon_x128.png +0 -0
- package/website/images/manifest/maskable_icon_x192.png +0 -0
- package/website/images/manifest/maskable_icon_x384.png +0 -0
- package/website/images/manifest/maskable_icon_x48.png +0 -0
- package/website/images/manifest/maskable_icon_x512.png +0 -0
- package/website/images/manifest/maskable_icon_x72.png +0 -0
- package/website/images/manifest/maskable_icon_x96.png +0 -0
- package/website/index.html +0 -72
- package/website/js/pwa-auth.js +0 -306
- package/website/sitemap.xml +0 -11
- /package/{demo → demonstration}/css/pwa-styles.css +0 -0
- /package/{demo → demonstration}/images/empty.jpg +0 -0
- /package/{npm/images → src}/empty.jpg +0 -0
- /package/{npm → src}/pwa-styles.css +0 -0
- /package/{source → src-typescript}/css/default.ts +0 -0
- /package/{source → src-typescript}/css/font.ts +0 -0
- /package/{source → src-typescript}/css/form/button.ts +0 -0
- /package/{source → src-typescript}/css/form/input.ts +0 -0
- /package/{source → src-typescript}/css/form/list.ts +0 -0
- /package/{source → src-typescript}/css/svg.ts +0 -0
- /package/{source → src-typescript}/lazy-loader.ts +0 -0
- /package/{source → src-typescript}/redux/backend.ts +0 -0
- /package/{source → src-typescript}/redux/drawer.ts +0 -0
- /package/{source → src-typescript}/redux/frontend.ts +0 -0
- /package/{source → src-typescript}/redux/object.ts +0 -0
- /package/{source → src-typescript}/store.ts +0 -0
- /package/{source/custom-elements → src-typescript/webcomponents}/drawer/css/drawer.ts +0 -0
- /package/{source/custom-elements → src-typescript/webcomponents}/drawer/css/exit.ts +0 -0
- /package/{source/custom-elements → src-typescript/webcomponents}/drawer/css/link.ts +0 -0
- /package/{source/custom-elements → src-typescript/webcomponents}/drawer/css/paragraph.ts +0 -0
- /package/{source/custom-elements → src-typescript/webcomponents}/drawer/css/toggle.ts +0 -0
- /package/{source/custom-elements → src-typescript/webcomponents}/settings/css/navigation.ts +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { initializeApp, FirebaseApp } from 'firebase/app';
|
|
2
|
+
import { getFirestore, Firestore } from "firebase/firestore";
|
|
3
|
+
import { getStorage, FirebaseStorage } from "@firebase/storage";
|
|
4
|
+
import { getAuth, Auth, User } from 'firebase/auth';
|
|
5
|
+
// Memory Reference to Services - Object Type
|
|
6
|
+
export const firebaseConfig = JSON.parse(process.env.FIREBASE_CONFIG || "{}");
|
|
7
|
+
export const application : FirebaseApp = initializeApp(firebaseConfig);
|
|
8
|
+
export const db : Firestore = getFirestore(application);
|
|
9
|
+
export const storage : FirebaseStorage = getStorage(application);
|
|
10
|
+
export const auth : Auth = getAuth(application);
|
|
11
|
+
export const user : User | null = auth.currentUser;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
// Representational State Transfer - Application Programming Interface
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
2
5
|
// Module Imports ---------------- ---------------- ----------------
|
|
3
6
|
|
|
7
|
+
|
|
8
|
+
|
|
4
9
|
// Redux
|
|
5
10
|
import { store } from '../store';
|
|
6
11
|
import { closeSign, iconAuth, nameAuth, userAuth } from '../redux/frontend';
|
|
7
12
|
import { accID, accEmail, accImage, accName } from '../redux/backend';
|
|
8
13
|
|
|
9
|
-
// Firebase App
|
|
10
|
-
import { FirebaseApp, initializeApp } from 'firebase/app';
|
|
11
|
-
|
|
12
14
|
// Firebase Auth
|
|
13
|
-
import {
|
|
15
|
+
import { getAuth, onAuthStateChanged, sendEmailVerification, signOut } from 'firebase/auth';
|
|
14
16
|
|
|
15
17
|
// Firebase Firestore
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
// Firebase Storage
|
|
19
|
-
import { getStorage, FirebaseStorage } from "@firebase/storage";
|
|
18
|
+
import { doc, deleteDoc } from "firebase/firestore";
|
|
20
19
|
|
|
21
20
|
//Firebase Analytics
|
|
22
21
|
import { Analytics, getAnalytics, logEvent } from "firebase/analytics";
|
|
@@ -24,25 +23,17 @@ import { Analytics, getAnalytics, logEvent } from "firebase/analytics";
|
|
|
24
23
|
// Firebse Messaginmg
|
|
25
24
|
import { isSupported } from "firebase/messaging";
|
|
26
25
|
|
|
26
|
+
// Start Authentication
|
|
27
|
+
import { application, auth, db } from './authentication'
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// LANGUAGE
|
|
30
|
+
getAuth().useDeviceLanguage();
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
const firebaseConfig: any = JSON.parse(process.env.FIREBASE_CONFIG || "{}");
|
|
34
33
|
|
|
35
|
-
//
|
|
36
|
-
export const application : FirebaseApp = initializeApp(firebaseConfig); // Initialize Application
|
|
37
|
-
export const db : Firestore = getFirestore(application); // Initialize Database
|
|
38
|
-
export const storage : FirebaseStorage = getStorage(application); // Reference: Represents a reference to a file or directory in Storage, returned by ref(). // UploadTask: Represents an ongoing upload operation, returned by upload methods. // ListResult: Represents the result of listing files in a directory.
|
|
39
|
-
export const auth : Auth = getAuth(application);
|
|
40
|
-
export const user : User | null = auth.currentUser;
|
|
34
|
+
// START ANALYTICS ----------------
|
|
41
35
|
|
|
42
|
-
// LANGUAGE
|
|
43
|
-
getAuth().useDeviceLanguage();
|
|
44
36
|
|
|
45
|
-
// START ANALYTICS ----------------
|
|
46
37
|
|
|
47
38
|
// const analytics : Analytics = getAnalytics();
|
|
48
39
|
let analytics: Analytics;
|
|
@@ -58,10 +49,16 @@ let analytics: Analytics;
|
|
|
58
49
|
}
|
|
59
50
|
})();
|
|
60
51
|
|
|
52
|
+
|
|
53
|
+
|
|
61
54
|
// END ANALYTICS ----------------
|
|
62
55
|
|
|
56
|
+
|
|
57
|
+
|
|
63
58
|
// Start Support Checks
|
|
64
59
|
|
|
60
|
+
|
|
61
|
+
|
|
65
62
|
// Check for Service Worker support
|
|
66
63
|
if ('serviceWorker' in navigator) { console.log('Service Worker is supported'); }
|
|
67
64
|
else { console.log('Service Worker is not supported'); }
|
|
@@ -70,10 +67,16 @@ else { console.log('Service Worker is not supported'); }
|
|
|
70
67
|
if ('PushManager' in window) { console.log('Push API is supported'); }
|
|
71
68
|
else { console.log('Push API is not supported'); }
|
|
72
69
|
|
|
70
|
+
|
|
71
|
+
|
|
73
72
|
// End Support Checks
|
|
74
73
|
|
|
74
|
+
|
|
75
|
+
|
|
75
76
|
// Start Distribute Information ---------------- ----------------
|
|
76
77
|
|
|
78
|
+
|
|
79
|
+
|
|
77
80
|
// Flag to track if an email change is pending verification
|
|
78
81
|
let pendingEmailVerification = false;
|
|
79
82
|
|
|
@@ -111,6 +114,7 @@ onAuthStateChanged(auth, (user) => {
|
|
|
111
114
|
|
|
112
115
|
// Email Change Listener - Custom Event
|
|
113
116
|
if (pendingEmailVerification && !user.emailVerified) {
|
|
117
|
+
|
|
114
118
|
// Send verification email for the updated email
|
|
115
119
|
sendEmailVerification(user)
|
|
116
120
|
.then(() => {
|
|
@@ -121,8 +125,10 @@ onAuthStateChanged(auth, (user) => {
|
|
|
121
125
|
console.error("Error sending verification email:", error.message);
|
|
122
126
|
pendingEmailVerification = false; // Reset flag on error
|
|
123
127
|
});
|
|
128
|
+
|
|
124
129
|
} else if (user.emailVerified) {
|
|
125
130
|
console.log("User's email is already verified:"/*, user.email*/);
|
|
131
|
+
|
|
126
132
|
} else {
|
|
127
133
|
console.log("User signed in, no email verification pending:"/*, user.email*/);
|
|
128
134
|
}
|
|
@@ -161,56 +167,21 @@ onAuthStateChanged(auth, (user) => {
|
|
|
161
167
|
|
|
162
168
|
});
|
|
163
169
|
|
|
164
|
-
// End Distribute Informatiom ---------------- ----------------
|
|
165
|
-
|
|
166
|
-
// Exact Name Reference - Firebase Action
|
|
167
|
-
export const logOut = async () => { return signOut(auth); };
|
|
168
|
-
export const logAccount = async () => { logEvent(analytics, 'create_account'); };
|
|
169
|
-
export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
|
|
170
|
-
export const deleteDocument = async (collect:string, item:string) => {
|
|
171
|
-
|
|
172
|
-
await deleteDoc(doc(db, collect, item));
|
|
173
|
-
|
|
174
|
-
};
|
|
175
170
|
|
|
176
171
|
|
|
172
|
+
// End Distribute Informatiom ---------------- ----------------
|
|
177
173
|
|
|
178
174
|
|
|
179
175
|
|
|
180
|
-
|
|
181
|
-
// Object Initializer Notation
|
|
182
|
-
export interface fire {
|
|
183
|
-
apiKey: string,
|
|
184
|
-
authDomain: string,
|
|
185
|
-
databaseURL: string,
|
|
186
|
-
projectId: string,
|
|
187
|
-
storageBucket: string,
|
|
188
|
-
messagingSenderId: string,
|
|
189
|
-
appId: string,
|
|
190
|
-
measurementId: string
|
|
191
|
-
};
|
|
176
|
+
// Module Exports ---------------- Exact Name Reference ---------------- Firebase Action
|
|
192
177
|
|
|
193
178
|
|
|
194
|
-
// Initialize Firebase Data
|
|
195
|
-
const admin: fire = {
|
|
196
|
-
appId: connect.appId,
|
|
197
|
-
apiKey: connect.apiKey,
|
|
198
|
-
authDomain: connect.authDomain,
|
|
199
|
-
databaseURL: connect.databaseURL,
|
|
200
|
-
projectId: connect.projectId,
|
|
201
|
-
storageBucket: connect.storageBucket,
|
|
202
|
-
messagingSenderId: connect.messagingSenderId,
|
|
203
|
-
measurementId: connect.measurementId
|
|
204
|
-
};
|
|
205
|
-
*/
|
|
206
179
|
|
|
180
|
+
export const logOut = async () => { return signOut(auth); };
|
|
181
|
+
export const logAccount = async () => { logEvent(analytics, 'create_account'); };
|
|
182
|
+
export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
|
|
183
|
+
export const deleteDocument = async (collect:string, item:string) => {
|
|
207
184
|
|
|
208
|
-
|
|
209
|
-
window.connect = {};
|
|
185
|
+
await deleteDoc(doc(db, collect, item));
|
|
210
186
|
|
|
211
|
-
|
|
212
|
-
interface Window {
|
|
213
|
-
connect: any;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
*/
|
|
187
|
+
};
|
|
@@ -12,7 +12,7 @@ import { lineStyle } from './css/paragraph';
|
|
|
12
12
|
import { listStyle } from '../../css/form/list';
|
|
13
13
|
|
|
14
14
|
import { toggleSign } from '../../redux/frontend';
|
|
15
|
-
import { logOut } from '../../firebase/
|
|
15
|
+
import { logOut } from '../../firebase/interface';
|
|
16
16
|
|
|
17
17
|
import './input/login';
|
|
18
18
|
import './input/sign-up';
|
|
@@ -4,7 +4,7 @@ import { html, TemplateResult, } from 'lit';
|
|
|
4
4
|
import { customElement, state } from "lit/decorators.js"
|
|
5
5
|
import { LazyLoader } from '../../../lazy-loader';
|
|
6
6
|
import { sendPasswordResetEmail/*, verifyPasswordResetCode*/ } from 'firebase/auth';
|
|
7
|
-
import { auth } from '../../../firebase/
|
|
7
|
+
import { auth } from '../../../firebase/authentication';
|
|
8
8
|
|
|
9
9
|
@customElement('reset-email')
|
|
10
10
|
export class ResetEmail extends LazyLoader {
|
|
@@ -2,7 +2,7 @@ import { html, LitElement, css } from 'lit';
|
|
|
2
2
|
import { customElement, state } from 'lit/decorators.js';
|
|
3
3
|
|
|
4
4
|
import { EmailAuthProvider, signInWithCredential } from 'firebase/auth';
|
|
5
|
-
import { auth } from '../../../firebase/
|
|
5
|
+
import { auth } from '../../../firebase/authentication';
|
|
6
6
|
|
|
7
7
|
import { buttonStyle } from '../../../css/form/button';
|
|
8
8
|
import { labelStyle } from '../../../css/form/label';
|
|
@@ -2,7 +2,8 @@ import { css, html, LitElement } from 'lit';
|
|
|
2
2
|
import { customElement, state } from 'lit/decorators.js';
|
|
3
3
|
|
|
4
4
|
import { createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
|
|
5
|
-
import { auth
|
|
5
|
+
import { auth } from '../../../firebase/authentication';
|
|
6
|
+
import { logAccount } from '../../../firebase/interface';
|
|
6
7
|
|
|
7
8
|
import { buttonStyle } from '../../../css/form/button';
|
|
8
9
|
import { labelStyle } from '../../../css/form/label';
|
|
@@ -25,6 +25,7 @@ export class UserIcon extends connect(store)(LitElement) {
|
|
|
25
25
|
this.shadowRoot!.querySelector('.toggles')!.addEventListener('click', () => {
|
|
26
26
|
// console.log('logged-in: ',this._user);
|
|
27
27
|
store.dispatch(toggleSign());
|
|
28
|
+
console.log('here');
|
|
28
29
|
} );
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -67,24 +68,4 @@ declare global {
|
|
|
67
68
|
interface HTMLElementTagNameMap {
|
|
68
69
|
'user-icon': UserIcon;
|
|
69
70
|
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/*
|
|
73
|
-
<!--
|
|
74
|
-
-->
|
|
75
|
-
<!--
|
|
76
|
-
\${ this._user
|
|
77
|
-
\? html\`
|
|
78
|
-
<div
|
|
79
|
-
class = "iconArea">
|
|
80
|
-
<input
|
|
81
|
-
type = "image"
|
|
82
|
-
class = "userImage"
|
|
83
|
-
alt = "Login"
|
|
84
|
-
height = "32px"
|
|
85
|
-
width = "32px"
|
|
86
|
-
src = "\${this._photoURL}"><!-- id = "image"
|
|
87
|
-
</div>
|
|
88
|
-
\`
|
|
89
|
-
\: faceIcon }-->
|
|
90
|
-
*/
|
|
71
|
+
}
|
|
@@ -3,7 +3,7 @@ import { state } from "lit/decorators.js";
|
|
|
3
3
|
import { connect } from "pwa-helpers";
|
|
4
4
|
import store, { AppState } from "../../../store";
|
|
5
5
|
import { buttonStyle } from "../../../css/form/button";
|
|
6
|
-
import { auth } from '../../../firebase/
|
|
6
|
+
import { auth } from '../../../firebase/authentication';
|
|
7
7
|
|
|
8
8
|
export class DeleteUser extends connect(store)(LitElement) {
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@ import { CSSResultArray, LitElement, css, html } from "lit";
|
|
|
2
2
|
import { property, state } from "lit/decorators.js";
|
|
3
3
|
import { connect } from "pwa-helpers";
|
|
4
4
|
import store, { AppState } from "../../../store";
|
|
5
|
-
import { auth } from "../../../firebase/
|
|
5
|
+
import { auth } from "../../../firebase/authentication";
|
|
6
6
|
import { labelStyle } from "../../../css/form/label";
|
|
7
7
|
import { inputStyle } from "../../../css/form/input";
|
|
8
8
|
import { buttonStyle } from "../../../css/form/button";
|
|
@@ -4,7 +4,7 @@ import { connect } from "pwa-helpers";
|
|
|
4
4
|
import { store, AppState } from "../../../store";
|
|
5
5
|
import { updateProfile } from "firebase/auth";
|
|
6
6
|
import { accName } from "../../../redux/backend";
|
|
7
|
-
import { auth } from "../../../firebase/
|
|
7
|
+
import { auth } from "../../../firebase/authentication";
|
|
8
8
|
import { labelStyle } from "../../../css/form/label";
|
|
9
9
|
import { inputStyle } from "../../../css/form/input";
|
|
10
10
|
import { buttonStyle } from "../../../css/form/button";
|
|
@@ -3,7 +3,7 @@ import { CSSResultArray, LitElement, css, html } from "lit";
|
|
|
3
3
|
import { state } from "lit/decorators.js";
|
|
4
4
|
import { connect } from "pwa-helpers";
|
|
5
5
|
import store, { AppState } from "../../../store";
|
|
6
|
-
import { auth } from "../../../firebase/
|
|
6
|
+
import { auth } from "../../../firebase/authentication";
|
|
7
7
|
import { labelStyle } from "../../../css/form/label";
|
|
8
8
|
import { inputStyle } from "../../../css/form/input";
|
|
9
9
|
import { buttonStyle } from "../../../css/form/button";
|
|
@@ -3,7 +3,7 @@ import { html, css, LitElement, CSSResultArray } from 'lit';
|
|
|
3
3
|
import { property, state } from 'lit/decorators.js';
|
|
4
4
|
import { store, AppState } from '../../../store';
|
|
5
5
|
import { connect } from 'pwa-helpers';
|
|
6
|
-
import { auth, storage, user }
|
|
6
|
+
import { auth, storage, user } from '../../../firebase/authentication';
|
|
7
7
|
import { updateProfile } from 'firebase/auth';
|
|
8
8
|
import { accImage } from '../../../redux/backend';
|
|
9
9
|
import { ref, updateMetadata, getDownloadURL, uploadBytesResumable } from "@firebase/storage";
|
|
@@ -115,6 +115,7 @@ export class ContactPhoto extends connect(store)(LitElement) {
|
|
|
115
115
|
border: 2px dashed;
|
|
116
116
|
border-radius: 6px;
|
|
117
117
|
overflow: hidden;
|
|
118
|
+
margin: 0 16px;
|
|
118
119
|
padding: 0 16px 16px 16px;
|
|
119
120
|
"
|
|
120
121
|
for ="photoURL">Photo:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit';
|
|
1
|
+
import { css, CSSResultArray, html, LitElement } from 'lit';
|
|
2
2
|
import { state, customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import { connect } from 'pwa-helpers/connect-mixin.js';
|
|
4
4
|
import { store, AppState } from '../../store';
|
|
@@ -57,7 +57,7 @@ export class UserSettings extends connect(store)(LitElement) {
|
|
|
57
57
|
this.name = state.backend!.name; // Username
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
static get styles() { return [
|
|
60
|
+
static get styles():CSSResultArray { return [
|
|
61
61
|
navigation,
|
|
62
62
|
listStyle,
|
|
63
63
|
css`
|
package/demo/css/styles.css
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
html {
|
|
2
|
-
overflow: auto;
|
|
3
|
-
scroll-behavior: smooth;
|
|
4
|
-
display: grid;
|
|
5
|
-
height: 100%;
|
|
6
|
-
padding: 16px;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
transition-duration: 1s;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
body {
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
margin: 0;
|
|
14
|
-
font-family: Space Grotesk, system-ui, sans-serif;
|
|
15
|
-
-webkit-font-smoothing: antialiased;
|
|
16
|
-
font-size: .875rem;
|
|
17
|
-
line-height: 1.25rem;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
body {
|
|
21
|
-
display: grid;
|
|
22
|
-
grid-gap: 16px;
|
|
23
|
-
grid-template-areas:
|
|
24
|
-
"head"
|
|
25
|
-
"main"
|
|
26
|
-
"foot";
|
|
27
|
-
grid-template-rows: auto 1fr auto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
header { grid-area: head; }
|
|
31
|
-
main { grid-area: main; }
|
|
32
|
-
footer { grid-area: foot; }
|
|
33
|
-
|
|
34
|
-
header {
|
|
35
|
-
display: grid;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
main {
|
|
39
|
-
border: 2px solid black;
|
|
40
|
-
border-radius: 6px;
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
footer {
|
|
45
|
-
display: grid;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
body {
|
|
49
|
-
background: linear-gradient(124deg, #e8891d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
|
|
50
|
-
background-size: 1800%;
|
|
51
|
-
-webkit-animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
|
|
52
|
-
-z-animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
|
|
53
|
-
-o-animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
|
|
54
|
-
animation: rainbow 64s cubic-bezier(0.6,0.8,0.8,0.6) infinite;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@keyframes rainbow {
|
|
58
|
-
0% {
|
|
59
|
-
background-position: 0% 100%;
|
|
60
|
-
}
|
|
61
|
-
50% {
|
|
62
|
-
background-position: 100% 0%;
|
|
63
|
-
}
|
|
64
|
-
100% {
|
|
65
|
-
background-position: 0% 100%;
|
|
66
|
-
}
|
|
67
|
-
}
|
package/deploy/css/default.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const iconRoot: import("lit").CSSResult;
|
|
2
|
-
export declare const drawerRoot: import("lit").CSSResult;
|
|
3
|
-
export declare const settingsRoot: import("lit").CSSResult;
|
|
4
|
-
export declare const themeRoot: import("lit").CSSResult;
|
|
5
|
-
//# sourceMappingURL=default.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../source/css/default.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,yBA4BpB,CAAC;AAEF,eAAO,MAAM,UAAU,yBAyBtB,CAAC;AAEF,eAAO,MAAM,YAAY,yBAiCxB,CAAC;AAUF,eAAO,MAAM,SAAS,yBAQrB,CAAC"}
|
package/deploy/css/default.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export const iconRoot = css `
|
|
3
|
-
|
|
4
|
-
/* CSS: Custom Variables: <head> tag */
|
|
5
|
-
|
|
6
|
-
:root {
|
|
7
|
-
|
|
8
|
-
/* WebComponent 1 : User Icon
|
|
9
|
-
<user-icon>
|
|
10
|
-
<button> */
|
|
11
|
-
--pwa_icon_hover: lightgrey; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
12
|
-
--pwa_icon_background: #6cc04a; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
13
|
-
--pwa_icon_border: 2px solid black; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
14
|
-
|
|
15
|
-
/* WebComponent 1: logged-out
|
|
16
|
-
<user-icon>
|
|
17
|
-
<button class="login"> */
|
|
18
|
-
--pwa_icon_height: 32px; /* sync to --pwa_icon_diameter */ /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
19
|
-
--pwa_icon_padding: 0px 16px; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
20
|
-
--pwa_icon_radius: 6px; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
21
|
-
--pwa_icon_font: 'Arial', sans-serif; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
22
|
-
|
|
23
|
-
/* WebComponent 1: logged-in
|
|
24
|
-
<user-icon>
|
|
25
|
-
<button class="icon"> */
|
|
26
|
-
--pwa_icon_diameter: 32px; /* sync to --pwa_icon_height */ /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
`;
|
|
31
|
-
export const drawerRoot = css `
|
|
32
|
-
|
|
33
|
-
/* CSS: Custom Variables: <head> tag */
|
|
34
|
-
|
|
35
|
-
:root {
|
|
36
|
-
|
|
37
|
-
/* WebComponent 2: Drop-down Drawer
|
|
38
|
-
<user-drawer>
|
|
39
|
-
<section>
|
|
40
|
-
<header></header>
|
|
41
|
-
<div class="spec"> */
|
|
42
|
-
--pwa_drawer_border: 3px #303030 solid; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
|
|
43
|
-
--pwa_drawer_z-index: 2; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
|
|
44
|
-
--pwa_drawer_border-radius: 20px; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
|
|
45
|
-
|
|
46
|
-
/* WebComponent 2: Drop-down Drawer - logged-out
|
|
47
|
-
<div class="spec"> */
|
|
48
|
-
--pwa_drawer_text_color: #303030; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
|
|
49
|
-
--pwa_drawer_background_color: #fff; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
|
|
50
|
-
|
|
51
|
-
/* WebComponent 2: Drop-down Drawer - logged-in
|
|
52
|
-
<div class="spec" on> */
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
`;
|
|
57
|
-
export const settingsRoot = css `
|
|
58
|
-
|
|
59
|
-
/* CSS: Custom Variables: <head> tag */
|
|
60
|
-
|
|
61
|
-
:root {
|
|
62
|
-
|
|
63
|
-
/* WebComponent 3: Settings Page
|
|
64
|
-
<user-settings>
|
|
65
|
-
<nav></nav>
|
|
66
|
-
<section></section> */
|
|
67
|
-
--pwa_settings_background: white; /* custom-elements Folder > settings Folder > settings.ts */
|
|
68
|
-
--pwa_divider: black; /* custom-elements Folder > settings Folder > settings.ts */
|
|
69
|
-
|
|
70
|
-
/* Navigation */
|
|
71
|
-
--pwa_nav_button: grey; /* custom-elements Folder > settings Folder > CSS Folder > navigation.ts */
|
|
72
|
-
--pwa_nav_select: black; /* custom-elements Folder > settings Folder > CSS Folder > navigation.ts */
|
|
73
|
-
|
|
74
|
-
/* Section Header */
|
|
75
|
-
--pwa_section_header: black; /* custom-elements Folder > settings Folder > settings.ts */
|
|
76
|
-
|
|
77
|
-
/* Label */
|
|
78
|
-
--pwa_label_text_color: black; /* Form Folder > label.ts */
|
|
79
|
-
|
|
80
|
-
/* Input */
|
|
81
|
-
--pwa_input_background: #E1E5EB; /* Form Folder > input.ts */
|
|
82
|
-
|
|
83
|
-
/* Button */
|
|
84
|
-
--pwa_action_text_color: #fff; /* Form Folder > button.ts */
|
|
85
|
-
--pwa_action_background_color: #6cc04a; /* Form Folder > button.ts */
|
|
86
|
-
--pwa_action_border_color: #60b23e; /* Form Folder > button.ts */
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
`;
|
|
91
|
-
export const themeRoot = css `
|
|
92
|
-
|
|
93
|
-
/* Dark Theme */
|
|
94
|
-
@media (prefers-color-scheme: dark) { }
|
|
95
|
-
|
|
96
|
-
/* Light Theme */
|
|
97
|
-
@media (prefers-color-scheme: light) { }
|
|
98
|
-
|
|
99
|
-
`;
|
package/deploy/css/font.d.ts
DELETED
package/deploy/css/font.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../source/css/font.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBActB,CAAC"}
|
package/deploy/css/font.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export const fontStyles = css `
|
|
3
|
-
|
|
4
|
-
/* */
|
|
5
|
-
.x-font {
|
|
6
|
-
font-family: Roboto, Arial, sans-serif; /* 'Montserrat' */
|
|
7
|
-
line-height: 1.1;
|
|
8
|
-
letter-spacing: .007em;
|
|
9
|
-
font-size: 14px;
|
|
10
|
-
font-weight: 500;
|
|
11
|
-
text-align: center;
|
|
12
|
-
text-decoration-style: solid;
|
|
13
|
-
text-transform: uppercase;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../source/css/form/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,eAAO,MAAM,WAAW,EAAE,SAoDzB,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export const buttonStyle = css `
|
|
3
|
-
|
|
4
|
-
.action-button:focus { outline:0; }
|
|
5
|
-
|
|
6
|
-
.action-button {
|
|
7
|
-
display: inline-block;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
white-space: nowrap;
|
|
10
|
-
margin: 16px 16px 16px auto;
|
|
11
|
-
font-weight: 400;
|
|
12
|
-
text-align: center;
|
|
13
|
-
vertical-align: middle;
|
|
14
|
-
touch-action: manipulation;
|
|
15
|
-
-webkit-appearance: button;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
font-size: 16px;
|
|
18
|
-
height: 38px;
|
|
19
|
-
line-height: 16px;
|
|
20
|
-
padding: 10px 16px;
|
|
21
|
-
border-radius: 6px;
|
|
22
|
-
color: var(--pwa_action_text_color, #fff);
|
|
23
|
-
background-color: var(--pwa_action_background_color, #6cc04a);
|
|
24
|
-
border-color: var(--pwa_action_border_color, #60b23e);
|
|
25
|
-
box-shadow: 1px 1px 1px grey;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.saving{
|
|
29
|
-
transition: background-color 0.3s; /* Smooth transition for hover effect */
|
|
30
|
-
background-color: #D6EBD3;
|
|
31
|
-
border: 0.5px solid black;
|
|
32
|
-
border-radius: 4px;
|
|
33
|
-
height: 50px;
|
|
34
|
-
width: 100%;
|
|
35
|
-
margin: auto;
|
|
36
|
-
box-shadow: 1px 1px 1px grey;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* */
|
|
40
|
-
.submit:hover { background-color: #45a049; }
|
|
41
|
-
|
|
42
|
-
.submit {
|
|
43
|
-
box-sizing: border-box;
|
|
44
|
-
width: 100%;
|
|
45
|
-
background-color: #4CAF50;
|
|
46
|
-
color: white;
|
|
47
|
-
padding: 14px 20px;
|
|
48
|
-
margin: 8px 0;
|
|
49
|
-
border: none;
|
|
50
|
-
border-radius: 4px;
|
|
51
|
-
cursor: pointer;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../source/css/form/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,UAAU,EAAG,SAsBzB,CAAC"}
|