pwa-auth 2.0.3 → 2.0.5
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 +36 -26
- package/README.md +101 -87
- package/demo/index.html +22 -126
- package/demo/pwa-styles.css +77 -0
- package/deploy/css/font.d.ts.map +1 -1
- package/deploy/css/form/button.d.ts.map +1 -1
- package/deploy/css/form/input.d.ts.map +1 -1
- package/deploy/css/form/label.d.ts.map +1 -1
- package/deploy/css/form/list.d.ts.map +1 -1
- package/deploy/css/svg.d.ts.map +1 -1
- package/deploy/css/toggle.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/css/drawer.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/css/exit.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/css/link.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/css/paragraph.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/css/toggle.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/drawer.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/drawer.js +1 -1
- package/deploy/custom-elements/drawer/input/forgot.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/input/forgot.js +1 -1
- package/deploy/custom-elements/drawer/input/login.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/input/login.js +1 -1
- package/deploy/custom-elements/drawer/input/sign-up.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/input/sign-up.js +1 -1
- package/deploy/custom-elements/icon/css/icon.d.ts.map +1 -1
- package/deploy/custom-elements/icon/css/icon.js +0 -1
- package/deploy/custom-elements/icon/icon.d.ts.map +1 -1
- package/deploy/custom-elements/settings/css/navigation.d.ts.map +1 -1
- package/deploy/custom-elements/settings/input/delete.d.ts.map +1 -1
- package/deploy/custom-elements/settings/input/delete.js +1 -1
- package/deploy/custom-elements/settings/input/email.d.ts.map +1 -1
- package/deploy/custom-elements/settings/input/email.js +1 -1
- package/deploy/custom-elements/settings/input/images.d.ts.map +1 -1
- package/deploy/custom-elements/settings/input/images.js +1 -1
- package/deploy/custom-elements/settings/input/name.d.ts.map +1 -1
- package/deploy/custom-elements/settings/input/name.js +1 -1
- package/deploy/custom-elements/settings/input/password.d.ts.map +1 -1
- package/deploy/custom-elements/settings/input/password.js +1 -1
- package/deploy/custom-elements/settings/input/uploader.d.ts +0 -2
- package/deploy/custom-elements/settings/input/uploader.d.ts.map +1 -1
- package/deploy/custom-elements/settings/input/uploader.js +11 -22
- package/deploy/custom-elements/settings/settings.d.ts.map +1 -1
- package/deploy/firebase/firebase-login.d.ts +21 -0
- package/deploy/firebase/firebase-login.d.ts.map +1 -0
- package/deploy/firebase/firebase-login.js +85 -0
- package/deploy/firebase/firebase.d.ts +20 -0
- package/deploy/firebase/firebase.d.ts.map +1 -0
- package/deploy/firebase/firebase.js +76 -0
- package/deploy/firebase/start.d.ts.map +1 -0
- package/deploy/{start.js → firebase/start.js} +5 -4
- package/deploy/lazy-loader.d.ts.map +1 -1
- package/deploy/redux/backend.d.ts.map +1 -1
- package/deploy/redux/drawer.d.ts.map +1 -1
- package/deploy/redux/frontend.d.ts.map +1 -1
- package/deploy/redux/object.d.ts.map +1 -1
- package/deploy/store.d.ts.map +1 -1
- package/npm/pwa-auth.js +1 -1
- package/npm/pwa-styles.css +66 -0
- package/package.json +4 -3
- package/source/css/font.ts +17 -0
- package/source/css/form/button.ts +55 -0
- package/source/css/form/input.ts +25 -0
- package/source/css/form/label.ts +25 -0
- package/source/css/form/list.ts +23 -0
- package/source/css/svg.ts +5 -0
- package/source/css/toggle.ts +9 -0
- package/source/custom-elements/drawer/css/drawer.ts +64 -0
- package/source/custom-elements/drawer/css/exit.ts +49 -0
- package/source/custom-elements/drawer/css/link.ts +15 -0
- package/source/custom-elements/drawer/css/paragraph.ts +11 -0
- package/source/custom-elements/drawer/css/toggle.ts +19 -0
- package/source/custom-elements/drawer/drawer.ts +120 -0
- package/source/custom-elements/drawer/input/forgot.ts +121 -0
- package/source/custom-elements/drawer/input/login.ts +135 -0
- package/source/custom-elements/drawer/input/sign-up.ts +158 -0
- package/source/custom-elements/icon/css/icon.ts +70 -0
- package/source/custom-elements/icon/icon.ts +87 -0
- package/source/custom-elements/settings/css/navigation.ts +92 -0
- package/source/custom-elements/settings/input/delete.ts +83 -0
- package/source/custom-elements/settings/input/email.ts +135 -0
- package/source/custom-elements/settings/input/images.ts +57 -0
- package/source/custom-elements/settings/input/name.ts +99 -0
- package/source/custom-elements/settings/input/password.ts +156 -0
- package/source/custom-elements/settings/input/uploader.ts +326 -0
- package/source/custom-elements/settings/settings.ts +202 -0
- package/source/firebase/firebase-login.ts +246 -0
- package/source/firebase/firebase.ts +214 -0
- package/source/firebase/start.ts +216 -0
- package/source/lazy-loader.ts +20 -0
- package/source/redux/backend.ts +94 -0
- package/source/redux/drawer.ts +37 -0
- package/source/redux/frontend.ts +134 -0
- package/source/redux/object.ts +31 -0
- package/source/store.ts +19 -0
- package/website/404.html +33 -0
- package/website/THIRD_PARTY_LICENSES.txt +303 -0
- package/website/css/pwa-styles.css +36 -0
- package/website/css/styles.css +67 -0
- 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 +64 -0
- package/website/js/pwa-auth.js +306 -0
- package/website/sitemap.xml +11 -0
- package/deploy/interface.d.ts +0 -36
- package/deploy/interface.d.ts.map +0 -1
- package/deploy/interface.js +0 -176
- package/deploy/start.d.ts.map +0 -1
- /package/deploy/{start.d.ts → firebase/start.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
==========
|
|
3
|
+
All notable changes to pwa-auth.js will be documented in this file.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
- Social Login Flow
|
|
7
|
+
- animated login and data
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
# [2.0.4] - 2025-09-06
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
# Changed
|
|
12
|
+
- user-icon: login button - line-height configuration
|
|
13
|
+
- (Public) Folder to (Website) Project Folder
|
|
14
|
+
|
|
15
|
+
## Added
|
|
16
|
+
- Firebase Functions: - well-rounded, all use.
|
|
17
|
+
- Firebase Configuration Object Module
|
|
18
|
+
- Partial-Dynamic - an individual export, for each property, of configuration object
|
|
19
|
+
- window object
|
|
20
|
+
|
|
21
|
+
# [2.0.4] - 2025-08-31
|
|
22
|
+
|
|
23
|
+
## Changed
|
|
24
|
+
- updated readme file
|
|
25
|
+
|
|
26
|
+
## Goals
|
|
27
|
+
- Photo Editor
|
|
28
|
+
- Password Verifier
|
|
29
|
+
- Email Verifier
|
|
14
30
|
|
|
15
31
|
# [1.2.4] - 2025-08-31
|
|
16
32
|
|
|
@@ -46,23 +62,6 @@ Security - in case of vulnerabilities.
|
|
|
46
62
|
## REMOVED
|
|
47
63
|
- Telephone Verification for version 1 simplicity
|
|
48
64
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## [Unreleased]
|
|
54
|
-
- Facebook Login
|
|
55
|
-
- Phone Login
|
|
56
|
-
- Play Games Login
|
|
57
|
-
- X Login
|
|
58
|
-
- Github Login
|
|
59
|
-
- display nested content after webcomponent loads
|
|
60
|
-
- create password after social Login
|
|
61
|
-
- animated login
|
|
62
|
-
- animated data
|
|
63
|
-
- update user info upon change submission
|
|
64
|
-
- change user-icon to "Login" text
|
|
65
|
-
|
|
66
65
|
## [1.0.0] - 2025-08-04
|
|
67
66
|
|
|
68
67
|
## To Do
|
|
@@ -152,4 +151,15 @@ Security - in case of vulnerabilities.
|
|
|
152
151
|
- settings > profile: user dashbaord
|
|
153
152
|
|
|
154
153
|
### Removed
|
|
155
|
-
- `<user-drawer>`: Custom Drawer Header Text
|
|
154
|
+
- `<user-drawer>`: Custom Drawer Header Text
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
# Footnotes
|
|
158
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
159
|
+
|
|
160
|
+
Added - for new features.
|
|
161
|
+
Changed - for changes in existing functionality.
|
|
162
|
+
Deprecated - for soon-to-be removed features.
|
|
163
|
+
Removed - for now removed features.
|
|
164
|
+
Fixed - for any bug fixes.
|
|
165
|
+
Security - in case of vulnerabilities.
|
package/README.md
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
Progressive Website Application - Authentication
|
|
2
2
|
======================
|
|
3
|
-
|
|
3
|
+
Jack's Publishing maintains Custom HTML Elements where developers can focus on UX rather than low-level API calls.
|
|
4
4
|
|
|
5
|
-
pwa-auth.js is a bundle of 3 Custom HTML Elements for Firebase (IAM) Authenication using email and password, with the ability to change username, icon, email, password, or delete your own account and it's content all together.
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
pwa-auth.js is a bundle of 3 Custom HTML Elements for Firebase (IAM) Authenication using email and password, with the ability to change username, icon, email, password, or delete your own account and it's content all together.
|
|
8
7
|
|
|
9
8
|
pwa-auth.js (Authentication Components) are for anyone who is looking for a quick and simple way to sign-up, log-in, log-out, modify, or delete a firebase account information from thier own personal domain.
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
pwa-auth.js meets basic user needs with the interplay of:
|
|
11
|
+
- Icon Button
|
|
12
|
+
- Drop-down Drawer
|
|
13
|
+
- Settings Page
|
|
12
14
|
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
You will learn how to place 3 Custom HTML Tags, reference CSS, and How to Initialize an Firebase Instance. By either <b>Standard</b> or <b>Modular</b> ECMA Script.
|
|
18
|
+
|
|
19
|
+
<!--
|
|
20
|
+
Jack's Publishing is dedicated to maintaining components for this project.
|
|
21
|
+
|
|
22
|
+
pwa-auth.js is designed to be simple, by meeting basic user needs with the interplay of an Icon Button, Drop-down Drawer, and a Settings Page.
|
|
23
|
+
-->
|
|
13
24
|
Continue reading to start installing the bundle:
|
|
14
25
|
- Pick the JavaScript File Type to Reference
|
|
15
26
|
- Understand the Library Features
|
|
@@ -18,7 +29,7 @@ Continue reading to start installing the bundle:
|
|
|
18
29
|
- Color Scheme: CSS Custom Properties
|
|
19
30
|
- Firebase Initialization
|
|
20
31
|
|
|
21
|
-
[Live Demo](https://pwa-authentic.firebaseapp.com)
|
|
32
|
+
Visit: [Live Demo](https://pwa-authentic.firebaseapp.com)
|
|
22
33
|
|
|
23
34
|
## pwa-auth.js Features:
|
|
24
35
|
- Register through Email and Password
|
|
@@ -33,12 +44,7 @@ Continue reading to start installing the bundle:
|
|
|
33
44
|
## Standard JavaScript
|
|
34
45
|
- copy the bundle
|
|
35
46
|
- node_modules/pwa-auth/npm/pwa-auth.js
|
|
36
|
-
|
|
37
|
-
## Technological Engineering
|
|
38
|
-
- Development Environment: [Node JavaScript](https://nodejs.org)
|
|
39
|
-
- Backend: Google Cloud: [Firebase](https://firebase.google.com/)
|
|
40
|
-
- Predicate State Behavior: [Redux](https://redux.js.org/)
|
|
41
|
-
- Frontend: [Lit](https://lit.dev)
|
|
47
|
+
- node_modules/pwa-auth/npm/pwa-styles.css
|
|
42
48
|
|
|
43
49
|
## Modular JavaScript
|
|
44
50
|
```javascript
|
|
@@ -46,60 +52,59 @@ import 'pwa-auth';
|
|
|
46
52
|
```
|
|
47
53
|
|
|
48
54
|
## Boilerplate
|
|
49
|
-
- 3 Tag Placements (Custom
|
|
55
|
+
- 3 Tag Placements (HTML - Custom Elements)
|
|
50
56
|
- user-icon
|
|
51
57
|
- user-drawer
|
|
52
58
|
- user-settings
|
|
53
|
-
- Cascading Style Sheets (CSS)
|
|
59
|
+
- Cascading Style Sheets (CSS - Custom Properties)
|
|
54
60
|
- ECMA Script (JavaScript)
|
|
55
61
|
|
|
56
|
-
## Custom Elements
|
|
62
|
+
## HTML Custom Elements
|
|
57
63
|
```html
|
|
58
|
-
<user-icon subscribe></user-icon>
|
|
59
|
-
<!-- Logged-out txt: Login Button (State) -->
|
|
60
|
-
<!-- Logged-out txt: Subscribe Button (State) -->
|
|
61
|
-
<!-- Logged-in Icon Button (State) -->
|
|
62
|
-
|
|
63
|
-
<user-drawer subscribe settingsURL=""></user-drawer>
|
|
64
|
-
<!-- Top-down, Drop-down Feature -->
|
|
65
|
-
<!-- Sign-up by Email Addresses and Password (State) -->
|
|
66
|
-
<!-- Sign-in by Email Addresses and Password (State) -->
|
|
67
|
-
<!-- logged-in (State) -->
|
|
68
|
-
<!-- logged-out (State) -->
|
|
69
|
-
|
|
70
|
-
<user-settings></user-settings>
|
|
71
|
-
<!-- 1 Photo Upload Feature, view uploaded bucket of photos, photo ediotr -->
|
|
72
|
-
<!-- Unavailable Photo -->
|
|
73
|
-
<!-- Update Username -->
|
|
74
|
-
<!-- Update Email / Verify -->
|
|
75
|
-
<!-- Update Password -->
|
|
76
|
-
<!-- Delete Account, Photos, Information -->
|
|
77
|
-
```
|
|
78
64
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<!--
|
|
88
|
-
<!-- subscribe:
|
|
89
|
-
<!--
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
65
|
+
<head>
|
|
66
|
+
<!-- CSS Custom Properties - Choice 1: Link Tag -->
|
|
67
|
+
<link type="stylesheet" href="pwa-styles.css">
|
|
68
|
+
</head>
|
|
69
|
+
|
|
70
|
+
<body>
|
|
71
|
+
|
|
72
|
+
<header>
|
|
73
|
+
<!-- subscribe property: (Initial State): Subscribe -->
|
|
74
|
+
<!-- subscribe property: else (Initial State): Login -->
|
|
75
|
+
<!-- Logged-out (State): txt: Login Button -->
|
|
76
|
+
<!-- Logged-out (State): txt: Subscribe Button -->
|
|
77
|
+
<!-- Logged-in (State): photo: Icon Button -->
|
|
78
|
+
<user-icon subscribe></user-icon>
|
|
79
|
+
</header>
|
|
80
|
+
|
|
81
|
+
<!-- settingsURL property: location of <pwa-settings> Tag -->
|
|
82
|
+
<!-- subscribe property: (Initial State): Subscribe -->
|
|
83
|
+
<!-- subscribe property: else (Initial State): Login -->
|
|
84
|
+
<!-- Top-down, Drop-down Feature: height, 1.4 seconds -->
|
|
85
|
+
<!-- logged-out (State): Sign-up by Email Addresses and Password -->
|
|
86
|
+
<!-- logged-out (State): Sign-in by Email Addresses and Password -->
|
|
87
|
+
<!-- logged-in (State): Settings Page Link, Log-out Button -->
|
|
88
|
+
<user-drawer subscribe settingsURL="/settings"></user-drawer>
|
|
89
|
+
|
|
90
|
+
<main>
|
|
91
|
+
<!-- 1 Photo Upload Feature, view uploaded bucket of photos, photo ediotr -->
|
|
92
|
+
<!-- Unavailable Photo -->
|
|
93
|
+
<!-- Update Username -->
|
|
94
|
+
<!-- Update Email / Verify -->
|
|
95
|
+
<!-- Update Password -->
|
|
96
|
+
<!-- Delete Account, Photos, Information -->
|
|
97
|
+
<user-settings></user-settings>
|
|
98
|
+
</main>
|
|
99
|
+
|
|
100
|
+
<script>/* Firebase Instance Configuration */</script>
|
|
101
|
+
<style>/* CSS Custom Properties - Choice 2: Style Tag */</style>
|
|
102
|
+
<script src="pwa-auth.js"></script>
|
|
103
|
+
|
|
104
|
+
</body>
|
|
99
105
|
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
| CSS Custom Property | Description | Default | Custom Element |
|
|
106
|
+
## CSS Custom Properties
|
|
107
|
+
| Custom Namespace | Description | Default | Custom Element |
|
|
103
108
|
| :--- | ---: | :---: | :--- |
|
|
104
109
|
| --pwa_icon_background | Button | #6cc04a; | user-icon |
|
|
105
110
|
| --pwa_icon_hover | Button | lightgrey | user-icon |
|
|
@@ -125,10 +130,9 @@ import 'pwa-auth';
|
|
|
125
130
|
| --pwa_action_background_color | Button | #6cc04a | user-settings |
|
|
126
131
|
| --pwa_action_border_color | Button | #60b23e | user-settings |
|
|
127
132
|
|
|
128
|
-
|
|
133
|
+
## CSS Design
|
|
129
134
|
```html
|
|
130
135
|
<!-- CSS: Custom Variables -->
|
|
131
|
-
<!-- Place this txt into your document -->
|
|
132
136
|
<style>
|
|
133
137
|
|
|
134
138
|
:root {
|
|
@@ -183,7 +187,7 @@ import 'pwa-auth';
|
|
|
183
187
|
--pwa_nav_select: black;
|
|
184
188
|
|
|
185
189
|
/* Section Header */
|
|
186
|
-
--pwa_section_header:
|
|
190
|
+
--pwa_section_header: black;
|
|
187
191
|
|
|
188
192
|
/* Label */
|
|
189
193
|
--pwa_label_text_color: black;
|
|
@@ -198,48 +202,58 @@ import 'pwa-auth';
|
|
|
198
202
|
|
|
199
203
|
}
|
|
200
204
|
|
|
201
|
-
/* Dark Theme */
|
|
202
|
-
@media (prefers-color-scheme: dark) { /* etc. */ }
|
|
203
|
-
|
|
204
|
-
/* Light Theme */
|
|
205
|
-
@media (prefers-color-scheme: light) { /* etc. */ }
|
|
206
|
-
|
|
207
205
|
</style>
|
|
208
206
|
```
|
|
209
207
|
|
|
210
|
-
## Google
|
|
208
|
+
## Google Prerequisites
|
|
211
209
|
- Google Analytics
|
|
212
210
|
- Firebase Project
|
|
213
211
|
|
|
214
|
-
## Firebase
|
|
212
|
+
## Firebase Services
|
|
215
213
|
- Authentication - email login
|
|
216
|
-
- Cloud Storage -
|
|
214
|
+
- Cloud Storage - storage bucket
|
|
217
215
|
|
|
218
|
-
## Firebase Instance Configuration
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
216
|
+
## JavaScript, Firebase Instance Configuration
|
|
217
|
+
```html
|
|
218
|
+
<script>
|
|
219
|
+
// Firebase configuration Object
|
|
220
|
+
window.process = { env: { FIREBASE_CONFIG: JSON.stringify({
|
|
221
|
+
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
222
|
+
authDomain: "xxxxxxx.xxxxxxx.xxx",
|
|
223
|
+
databaseURL: "https://xxxxxxx.xxxxxxx.xxx",
|
|
224
|
+
projectId: "xxxxxxx",
|
|
225
|
+
storageBucket: "xxxxxxx.xxxxxxx.xxx",
|
|
226
|
+
messagingSenderId: "xxxxxxxxxxx",
|
|
227
|
+
appId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
228
|
+
measurementId: "xxxxxxxxxxx"
|
|
229
|
+
})
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
// Localhost - Firebase Configuratioon Object
|
|
234
|
+
if (lolalhost) { window.process = { env: { FIREBASE_CONFIG: 'etc.' } } }
|
|
235
|
+
</script>
|
|
234
236
|
```
|
|
235
237
|
|
|
236
|
-
|
|
238
|
+
## Global Namespaced Firebase Instance Configuration
|
|
237
239
|
pwa-auth.js is built upon the Firebase SDK (Software Development Kit).
|
|
238
240
|
The entire bundle is one instance of firebase that takes in the configuration information, internally.
|
|
239
241
|
|
|
240
242
|
If you are looking for a Namespaced Firebase Configuration, please send it as feedback, and will make that version for you.
|
|
241
243
|
|
|
242
|
-
|
|
244
|
+
## Technological Engineering
|
|
245
|
+
- Development (Server-side) Environment: [Node JavaScript](https://nodejs.org)
|
|
246
|
+
- Backend: Google Cloud: [Firebase](https://firebase.google.com/)
|
|
247
|
+
- Predicate State Behavior: [Redux](https://redux.js.org/)
|
|
248
|
+
- Frontend (Client-side): [Lit](https://lit.dev)
|
|
249
|
+
|
|
250
|
+
### Both - Client-side and Server-side - Object - Libraries
|
|
251
|
+
- in browser: window
|
|
252
|
+
- in node.js: global
|
|
253
|
+
- in web workers: self
|
|
254
|
+
- ECMA Script 2020+: globalThis
|
|
255
|
+
|
|
256
|
+
## Feedback
|
|
243
257
|
All feedback, comments, bugs, and requests are welcome.
|
|
244
258
|
* [Jack's Publishing](https://www.jackspublishing.com)
|
|
245
259
|
* [contractor's centre](https://www.contractorscentre.com)
|
package/demo/index.html
CHANGED
|
@@ -1,46 +1,40 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
|
|
3
2
|
<html lang="en">
|
|
4
3
|
|
|
5
4
|
<head>
|
|
6
|
-
|
|
7
|
-
<meta charset="UTF-8">
|
|
8
|
-
<!-- BASE -->
|
|
9
|
-
<base href="/">
|
|
10
|
-
<!-- TITILE -->
|
|
11
5
|
<title>pwa-auth</title>
|
|
12
|
-
|
|
6
|
+
<meta charset="UTF-8">
|
|
13
7
|
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1" />
|
|
14
|
-
|
|
15
|
-
<meta name="theme-color" content="#272931" />
|
|
16
|
-
<!-- AUTHOR -->
|
|
17
|
-
<meta name="author" content="Jacek Markiewicz" />
|
|
18
|
-
<!-- DESCRIPTION -->
|
|
19
|
-
<meta name="description" content="To provide a personalized experience, Apps need to know the identity of a user to securely store data in the cloud. pwa-auth is powered by The Firebase Authentication backend, consistently providing a centralized and predictable state behaviour with Redux, and declaratively rendering straight into the DOM with Google Polymer's fast and light Lit-Element. This Component includes 3 HTML Tags, and 1 Boilerplate Function to display the user icon, sign up, login, log out, change account details, and delete the user's account." />
|
|
20
|
-
<!-- KEYWORDS -->
|
|
21
|
-
<meta name="keywords" content="lit, redux, firebase, authentication, drawer, settings, icon, username, email, password, delete" />
|
|
22
|
-
<!-- HTTPS REFERRER TAG-->
|
|
23
|
-
<meta name="referrer" content="origin" />
|
|
24
|
-
<!-- MANIFEST -->
|
|
25
|
-
<link rel="manifest" href="public/manifest.json" />
|
|
26
|
-
<!-- FAVICON -->
|
|
27
|
-
<link rel="icon" href="images/favicon.ico">
|
|
28
|
-
|
|
8
|
+
|
|
29
9
|
<!-- Preconnect -->
|
|
30
10
|
<link rel="preconnect" href="https://firebasestorage.googleapis.com">
|
|
11
|
+
|
|
31
12
|
<!-- Pre-Fetch -->
|
|
32
13
|
<link rel="dns-prefetch" href="https://firebasestorage.googleapis.com">
|
|
33
14
|
|
|
34
15
|
<!-- Cascading Style Sheets -->
|
|
35
|
-
<link rel="stylesheet" href="
|
|
16
|
+
<link rel="stylesheet" href="styles.css">
|
|
36
17
|
|
|
37
|
-
<!--
|
|
38
|
-
<
|
|
18
|
+
<!-- pwa-auth.js - CSS Custom Variables -->
|
|
19
|
+
<link rel="stylesheet" href="pwa-styles.css">
|
|
39
20
|
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
<!-- pwa-auth.js - Module Configuration Objects -->
|
|
22
|
+
<script>
|
|
23
|
+
window.process = { env: { NODE_ENV: 'production' } };
|
|
24
|
+
window.process = { env: { FIREBASE_CONFIG: JSON.stringify({
|
|
25
|
+
apiKey: "AIzaSyC1ZNYC9RAjSAE3syUBNi47AiqbAqkx99w",
|
|
26
|
+
authDomain: "pwa-authentic.firebaseapp.com",
|
|
27
|
+
projectId: "pwa-authentic",
|
|
28
|
+
storageBucket: "pwa-authentic.firebasestorage.app",
|
|
29
|
+
messagingSenderId: "749233996232",
|
|
30
|
+
appId: "1:749233996232:web:bbc410d53b7d39bdfb80fd",
|
|
31
|
+
measurementId: "G-G1GYM1HBJ4"
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
</head>
|
|
44
38
|
<body>
|
|
45
39
|
|
|
46
40
|
<header>
|
|
@@ -69,104 +63,6 @@
|
|
|
69
63
|
|
|
70
64
|
</footer>
|
|
71
65
|
|
|
72
|
-
<!-- CSS: Custom Variables: <head> tag -->
|
|
73
|
-
<style>
|
|
74
|
-
|
|
75
|
-
:root {
|
|
76
|
-
|
|
77
|
-
/* WebComponent 1 : User Icon
|
|
78
|
-
<user-icon>
|
|
79
|
-
<button> */
|
|
80
|
-
--pwa_icon_hover: lightgrey;
|
|
81
|
-
--pwa_icon_background: #6cc04a;
|
|
82
|
-
--pwa_icon_border: 2px solid black;
|
|
83
|
-
|
|
84
|
-
/* WebComponent 1: logged-out
|
|
85
|
-
<user-icon>
|
|
86
|
-
<button class="login"> */
|
|
87
|
-
--pwa_icon_height: 32px; /* sync to --pwa_icon_diameter */
|
|
88
|
-
--pwa_icon_padding: 0px 16px;
|
|
89
|
-
--pwa_icon_radius: 6px;
|
|
90
|
-
--pwa_icon_font: 'Arial', sans-serif;
|
|
91
|
-
|
|
92
|
-
/* WebComponent 1: logged-in
|
|
93
|
-
<user-icon>
|
|
94
|
-
<button class="icon"> */
|
|
95
|
-
--pwa_icon_diameter: 32px; /* sync to --pwa_icon_height */
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/* WebComponent 2: Drop-down Drawer
|
|
100
|
-
<user-drawer>
|
|
101
|
-
<section>
|
|
102
|
-
<header></header>
|
|
103
|
-
<div class="spec"> */
|
|
104
|
-
--pwa_drawer_border: 3px #303030 solid;
|
|
105
|
-
--pwa_drawer_z-index: 2;
|
|
106
|
-
--pwa_drawer_border-radius: 20px;
|
|
107
|
-
|
|
108
|
-
/* WebComponent 2: Drop-down Drawer - logged-out
|
|
109
|
-
<div class="spec"> */
|
|
110
|
-
--pwa_drawer_text_color: #303030;
|
|
111
|
-
--pwa_drawer_background_color: #fff;
|
|
112
|
-
|
|
113
|
-
/* WebComponent 2: Drop-down Drawer - logged-in
|
|
114
|
-
<div class="spec" on> */
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/* WebComponent 3: Settings Page
|
|
119
|
-
<user-settings>
|
|
120
|
-
<nav></nav>
|
|
121
|
-
<section></section> */
|
|
122
|
-
--pwa_settings_background: white;
|
|
123
|
-
--pwa_divider: black;
|
|
124
|
-
|
|
125
|
-
/* Navigation */
|
|
126
|
-
--pwa_nav_button: grey;
|
|
127
|
-
--pwa_nav_select: black;
|
|
128
|
-
|
|
129
|
-
/* Section Header */
|
|
130
|
-
--pwa_section_header: black;
|
|
131
|
-
|
|
132
|
-
/* Label */
|
|
133
|
-
--pwa_label_text_color: black;
|
|
134
|
-
|
|
135
|
-
/* Input */
|
|
136
|
-
--pwa_input_background: #E1E5EB;
|
|
137
|
-
|
|
138
|
-
/* Button */
|
|
139
|
-
--pwa_action_text_color: #fff;
|
|
140
|
-
--pwa_action_background_color: #6cc04a;
|
|
141
|
-
--pwa_action_border_color: #60b23e;
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* Dark Theme */
|
|
146
|
-
@media (prefers-color-scheme: dark) { }
|
|
147
|
-
|
|
148
|
-
/* Light Theme */
|
|
149
|
-
@media (prefers-color-scheme: light) { }
|
|
150
|
-
|
|
151
|
-
</style>
|
|
152
|
-
|
|
153
|
-
<!-- ECMA Script: Module: Firebase Information -->
|
|
154
|
-
<script>
|
|
155
|
-
|
|
156
|
-
// Global NameSpace - Create Object Initial State
|
|
157
|
-
let connect = {
|
|
158
|
-
apiKey: "AIzaSyC1ZNYC9RAjSAE3syUBNi47AiqbAqkx99w",
|
|
159
|
-
authDomain: "pwa-authentic.firebaseapp.com",
|
|
160
|
-
projectId: "pwa-authentic",
|
|
161
|
-
storageBucket: "pwa-authentic.firebasestorage.app",
|
|
162
|
-
messagingSenderId: "749233996232",
|
|
163
|
-
appId: "1:749233996232:web:bbc410d53b7d39bdfb80fd",
|
|
164
|
-
measurementId: "G-G1GYM1HBJ4"
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
</script>
|
|
168
|
-
<!-- End Custom JavaScript Module Information -->
|
|
169
|
-
|
|
170
66
|
<!-- Application Shell -->
|
|
171
67
|
<script type="module" src="pwa-auth.js" async></script>
|
|
172
68
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* CSS: Custom Variables: <head> tag */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
|
|
5
|
+
/* WebComponent 1 : User Icon
|
|
6
|
+
<user-icon>
|
|
7
|
+
<button> */
|
|
8
|
+
--pwa_icon_hover: lightgrey;
|
|
9
|
+
--pwa_icon_background: #6cc04a;
|
|
10
|
+
--pwa_icon_border: 2px solid black;
|
|
11
|
+
|
|
12
|
+
/* WebComponent 1: logged-out
|
|
13
|
+
<user-icon>
|
|
14
|
+
<button class="login"> */
|
|
15
|
+
--pwa_icon_height: 32px; /* sync to --pwa_icon_diameter */
|
|
16
|
+
--pwa_icon_padding: 0px 16px;
|
|
17
|
+
--pwa_icon_radius: 6px;
|
|
18
|
+
--pwa_icon_font: 'Arial', sans-serif;
|
|
19
|
+
|
|
20
|
+
/* WebComponent 1: logged-in
|
|
21
|
+
<user-icon>
|
|
22
|
+
<button class="icon"> */
|
|
23
|
+
--pwa_icon_diameter: 32px; /* sync to --pwa_icon_height */
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/* WebComponent 2: Drop-down Drawer
|
|
28
|
+
<user-drawer>
|
|
29
|
+
<section>
|
|
30
|
+
<header></header>
|
|
31
|
+
<div class="spec"> */
|
|
32
|
+
--pwa_drawer_border: 3px #303030 solid;
|
|
33
|
+
--pwa_drawer_z-index: 2;
|
|
34
|
+
--pwa_drawer_border-radius: 20px;
|
|
35
|
+
|
|
36
|
+
/* WebComponent 2: Drop-down Drawer - logged-out
|
|
37
|
+
<div class="spec"> */
|
|
38
|
+
--pwa_drawer_text_color: #303030;
|
|
39
|
+
--pwa_drawer_background_color: #fff;
|
|
40
|
+
|
|
41
|
+
/* WebComponent 2: Drop-down Drawer - logged-in
|
|
42
|
+
<div class="spec" on> */
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/* WebComponent 3: Settings Page
|
|
47
|
+
<user-settings>
|
|
48
|
+
<nav></nav>
|
|
49
|
+
<section></section> */
|
|
50
|
+
--pwa_settings_background: white;
|
|
51
|
+
--pwa_divider: black;
|
|
52
|
+
|
|
53
|
+
/* Navigation */
|
|
54
|
+
--pwa_nav_button: grey;
|
|
55
|
+
--pwa_nav_select: black;
|
|
56
|
+
|
|
57
|
+
/* Section Header */
|
|
58
|
+
--pwa_section_header: black;
|
|
59
|
+
|
|
60
|
+
/* Label */
|
|
61
|
+
--pwa_label_text_color: black;
|
|
62
|
+
|
|
63
|
+
/* Input */
|
|
64
|
+
--pwa_input_background: #E1E5EB;
|
|
65
|
+
|
|
66
|
+
/* Button */
|
|
67
|
+
--pwa_action_text_color: #fff;
|
|
68
|
+
--pwa_action_background_color: #6cc04a;
|
|
69
|
+
--pwa_action_border_color: #60b23e;
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Dark Theme */
|
|
74
|
+
@media (prefers-color-scheme: dark) { }
|
|
75
|
+
|
|
76
|
+
/* Light Theme */
|
|
77
|
+
@media (prefers-color-scheme: light) { }
|
package/deploy/css/font.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../source/css/font.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBActB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../source/css/form/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,UAAU,EAAG,SAsBzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../source/css/form/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,SAAS,EAAE,SAoBvB,CAAC"}
|
package/deploy/css/svg.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../source/css/svg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,sCAAmf,CAAC;AACzgB,eAAO,MAAM,QAAQ,sCAA4tB,CAAC;AAClvB,eAAO,MAAM,KAAK,sCAAoK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../source/css/toggle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,yBAMhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/css/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,WAAW,EAAE,SAqDzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["../../../../
|
|
1
|
+
{"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/css/exit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,SAAS,EAAE,SA8CvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/css/link.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,SAAS,EAAE,SAUvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../../
|
|
1
|
+
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/css/paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,SAAS,EAAE,SAQvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/css/toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,WAAW,EAAE,SAgBzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;AAajE,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;;;;;;;;;;;;;;AAEzB,qBACa,UAAW,SAAQ,eAA0B;IAGf,OAAO,CAAC,WAAW,CAAM;IAGD,MAAM,UAAS;IAGf,SAAS,UAAS;IAE1E,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,KAAK,CAAgB;;IAItC,YAAY,CAAC,KAAK,EAAE,QAAQ;IAO5B,SAAS,CAAC,YAAY;IAatB,MAAM,KAAK,MAAM,IAAI,cAAc,CAOhC;IAEH,SAAS,CAAC,MAAM;CA+CjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,aAAa,EAAE,UAAU,CAAC;KAC7B;CACF"}
|