pwa-auth 2.0.8 → 3.0.2
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 +6 -0
- package/README.md +37 -18
- package/demonstration/compiled/pwa-auth.js +880 -0
- package/{demo → demonstration}/index.html +1 -1
- package/package.json +8 -7
- package/pwa-auth.js +4 -3
- package/{website → src}/THIRD_PARTY_LICENSES.txt +56 -56
- package/src/compiled/pwa-auth.js +871 -0
- 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 +2 -2
- 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 +1 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/settings.ts +2 -2
- 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 -22
- 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 -225
- 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/css/styles.css +0 -48
- 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 -69
- package/website/js/images/empty.jpg +0 -0
- 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}/css/styles.css +0 -0
- /package/{demo → demonstration}/images/empty.jpg +0 -0
- /package/{npm → 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/label.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
|
@@ -1 +0,0 @@
|
|
|
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/form/list.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export const listStyle = css `
|
|
3
|
-
|
|
4
|
-
ul {
|
|
5
|
-
list-style-type: none;
|
|
6
|
-
padding: 0;
|
|
7
|
-
margin: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
li {
|
|
11
|
-
display: grid;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.divider {
|
|
15
|
-
border-top: 2px dotted black;
|
|
16
|
-
border-bottom: 2px dotted black;
|
|
17
|
-
text-align: center;
|
|
18
|
-
width: 80%;
|
|
19
|
-
margin: auto;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
`;
|
package/deploy/css/svg.d.ts
DELETED
package/deploy/css/svg.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/deploy/css/svg.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { html } from "lit";
|
|
2
|
-
export const faceIcon = html `<svg viewBox="0 0 24 24" height="34px" width="34px"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"></path></svg>`;
|
|
3
|
-
export const settings = html `<svg viewBox="0 0 24 24"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></svg>`;
|
|
4
|
-
export const close = html `<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></svg>`;
|
package/deploy/css/toggle.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../source/css/toggle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,yBAMhB,CAAC"}
|
package/deploy/css/toggle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,55 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export const drawerStyle = css `
|
|
3
|
-
|
|
4
|
-
/* <user-drawer> : parent container */
|
|
5
|
-
:host {
|
|
6
|
-
position: absolute;
|
|
7
|
-
max-height: 0px;
|
|
8
|
-
transition: max-height 1.4s ease-out;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
height: auto;
|
|
11
|
-
display: grid;
|
|
12
|
-
padding-top: env(safe-area-inset-top);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host([drawer]) {
|
|
16
|
-
transition-duration: 1.4s;
|
|
17
|
-
max-height: 100%;
|
|
18
|
-
transition: max-height 1.4s ease-out;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* wrapper : child container*/
|
|
22
|
-
.userDrawer {
|
|
23
|
-
position: fixed;
|
|
24
|
-
top: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
right: 0;
|
|
27
|
-
transition-duration: 1.4s;
|
|
28
|
-
border: var(--pwa_drawer_border, 3px #303030 solid);
|
|
29
|
-
z-index: var(--pwa_drawer_z-index, 2);
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
background-color: var(--pwa_drawer_background_color, #fff);
|
|
32
|
-
color: var(--pwa_drawer_text_color, #303030);
|
|
33
|
-
box-sizing: border-box;
|
|
34
|
-
border-radius: var(--pwa_drawer_border-radius, 20px);
|
|
35
|
-
height: auto;
|
|
36
|
-
transition-property: visibility, max-height;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* wrapper closed */
|
|
40
|
-
.closed {
|
|
41
|
-
max-height: 0px;
|
|
42
|
-
transition: max-height 1.4s ease-out;
|
|
43
|
-
visibility: hidden;
|
|
44
|
-
transition-property: visibility, max-height;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* wrapper opened */
|
|
48
|
-
.opened {
|
|
49
|
-
max-height: 100%;
|
|
50
|
-
transition: max-height 1.4s ease-out;
|
|
51
|
-
visibility: visible;
|
|
52
|
-
transition-property: visibility, max-height;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
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,48 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export const exitStyle = css `
|
|
3
|
-
|
|
4
|
-
.exit {
|
|
5
|
-
display: grid;
|
|
6
|
-
grid-template-columns: 80px 1fr 80px;
|
|
7
|
-
padding: 16px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.exit > h3 {
|
|
11
|
-
font-weight: 800;
|
|
12
|
-
font-size: .9em;
|
|
13
|
-
margin: 0px auto;
|
|
14
|
-
opacity: .8;
|
|
15
|
-
line-height: 36px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.exit > .remove {
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
background-color: transparent;
|
|
21
|
-
border: 0px;
|
|
22
|
-
color: red;
|
|
23
|
-
font-weight: 800;
|
|
24
|
-
font-size: .7em;
|
|
25
|
-
text-transform: uppercase;
|
|
26
|
-
opacity: .6;
|
|
27
|
-
}
|
|
28
|
-
/*
|
|
29
|
-
.exit > .refresh {
|
|
30
|
-
background-color: transparent;
|
|
31
|
-
border: 0px;
|
|
32
|
-
fill: blue;
|
|
33
|
-
height: 36px;
|
|
34
|
-
width: 36px;
|
|
35
|
-
padding: 0px;
|
|
36
|
-
}
|
|
37
|
-
*/
|
|
38
|
-
.close {
|
|
39
|
-
height: 30px;
|
|
40
|
-
width: 42px;
|
|
41
|
-
margin: auto;
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
border: 0px;
|
|
44
|
-
fill: red;
|
|
45
|
-
opacity: .8;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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,18 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export const toggleStyle = css `
|
|
3
|
-
|
|
4
|
-
/* Switch Login / Sign-up Button */
|
|
5
|
-
.new {
|
|
6
|
-
padding: 12px;
|
|
7
|
-
border-radius: 4px;
|
|
8
|
-
appearance: none;
|
|
9
|
-
background-color: transparent;
|
|
10
|
-
border: 0px;
|
|
11
|
-
color: inherit;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
text-decoration: underline;
|
|
14
|
-
font-size: small;
|
|
15
|
-
line-height: 42px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
`;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { CSSResultArray, LitElement } from 'lit';
|
|
2
|
-
import { AppState } from '../../store';
|
|
3
|
-
import './input/login';
|
|
4
|
-
import './input/sign-up';
|
|
5
|
-
declare const UserDrawer_base: (new (...args: any[]) => {
|
|
6
|
-
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
7
|
-
connectedCallback(): void;
|
|
8
|
-
disconnectedCallback(): void;
|
|
9
|
-
stateChanged(_state: {
|
|
10
|
-
frontend: import("../../redux/object").frontendAuth;
|
|
11
|
-
drawer: {
|
|
12
|
-
drawer: boolean;
|
|
13
|
-
};
|
|
14
|
-
backend: import("../../redux/object").backendAuth;
|
|
15
|
-
}): void;
|
|
16
|
-
readonly isConnected: boolean;
|
|
17
|
-
}) & typeof LitElement;
|
|
18
|
-
export declare class UserDrawer extends UserDrawer_base {
|
|
19
|
-
private settingsURL;
|
|
20
|
-
drawer: boolean;
|
|
21
|
-
subscribe: boolean;
|
|
22
|
-
private _name;
|
|
23
|
-
private _log;
|
|
24
|
-
private _sign;
|
|
25
|
-
constructor();
|
|
26
|
-
stateChanged(state: AppState): void;
|
|
27
|
-
protected firstUpdated(): void;
|
|
28
|
-
static get styles(): CSSResultArray;
|
|
29
|
-
protected render(): import("lit-html").TemplateResult<1>;
|
|
30
|
-
}
|
|
31
|
-
declare global {
|
|
32
|
-
interface HTMLElementTagNameMap {
|
|
33
|
-
'user-drawer': UserDrawer;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,128 +0,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
|
-
import { html, LitElement } from 'lit';
|
|
8
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
-
import { connect } from 'pwa-helpers/connect-mixin';
|
|
10
|
-
import { store } from '../../store';
|
|
11
|
-
import { close } from '../../css/svg';
|
|
12
|
-
import { show } from '../../css/toggle';
|
|
13
|
-
import { drawerStyle } from './css/drawer';
|
|
14
|
-
import { exitStyle } from './css/exit';
|
|
15
|
-
import { linkStyle } from './css/link';
|
|
16
|
-
import { lineStyle } from './css/paragraph';
|
|
17
|
-
import { listStyle } from '../../css/form/list';
|
|
18
|
-
import { toggleSign } from '../../redux/frontend';
|
|
19
|
-
import { logOut } from '../../firebase/start';
|
|
20
|
-
import './input/login';
|
|
21
|
-
import './input/sign-up';
|
|
22
|
-
let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
this.settingsURL = '';
|
|
26
|
-
this.drawer = false;
|
|
27
|
-
this.subscribe = false;
|
|
28
|
-
this._name = "";
|
|
29
|
-
this._log = false;
|
|
30
|
-
this._sign = false;
|
|
31
|
-
}
|
|
32
|
-
stateChanged(state) {
|
|
33
|
-
this._name = state.backend.name;
|
|
34
|
-
this.drawer = state.frontend.drawer;
|
|
35
|
-
this._log = state.frontend.login;
|
|
36
|
-
this._sign = state.frontend.register;
|
|
37
|
-
}
|
|
38
|
-
firstUpdated() {
|
|
39
|
-
this.shadowRoot.querySelector('.close').addEventListener('click', () => {
|
|
40
|
-
store.dispatch(toggleSign());
|
|
41
|
-
});
|
|
42
|
-
this.shadowRoot.querySelector('.leave').addEventListener('click', () => {
|
|
43
|
-
if (this._log) {
|
|
44
|
-
logOut();
|
|
45
|
-
}
|
|
46
|
-
store.dispatch(toggleSign());
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
static get styles() {
|
|
50
|
-
return [
|
|
51
|
-
show,
|
|
52
|
-
drawerStyle,
|
|
53
|
-
exitStyle,
|
|
54
|
-
linkStyle,
|
|
55
|
-
lineStyle,
|
|
56
|
-
listStyle
|
|
57
|
-
];
|
|
58
|
-
}
|
|
59
|
-
;
|
|
60
|
-
render() {
|
|
61
|
-
return html `
|
|
62
|
-
|
|
63
|
-
<!-- Drawer Wrapper -->
|
|
64
|
-
<section
|
|
65
|
-
class="userDrawer ${this.drawer ? 'opened' : 'closed'}">
|
|
66
|
-
|
|
67
|
-
<!-- Exit Button -->
|
|
68
|
-
<header class="exit">
|
|
69
|
-
<div></div>
|
|
70
|
-
<h3>${this._log ? this._name : this._sign === this.subscribe ? "Subscribe" : "Login"} </h3>
|
|
71
|
-
<button class="close">${close}</button>
|
|
72
|
-
</header>
|
|
73
|
-
|
|
74
|
-
<!-- Logged-out State -->
|
|
75
|
-
<div
|
|
76
|
-
class="spec"
|
|
77
|
-
?on="${this._log === false}">
|
|
78
|
-
|
|
79
|
-
<!-- Log-in State -->
|
|
80
|
-
<user-log-in
|
|
81
|
-
class="spec"
|
|
82
|
-
?on="${true === this._sign ? !this.subscribe : this.subscribe}"></user-log-in>
|
|
83
|
-
|
|
84
|
-
<!-- Sign-up State -->
|
|
85
|
-
<user-sign-up
|
|
86
|
-
class="spec"
|
|
87
|
-
?on="${false === this._sign ? !this.subscribe : this.subscribe}"></user-sign-up>
|
|
88
|
-
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<!-- Logged-in State -->
|
|
92
|
-
<div
|
|
93
|
-
class="spec setLog"
|
|
94
|
-
?on="${this._log === true}">
|
|
95
|
-
|
|
96
|
-
<p><a href="${this.settingsURL}">Settings</a></p>
|
|
97
|
-
|
|
98
|
-
<p><a class="leave" aria-label="log out">log out</a></p>
|
|
99
|
-
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
</section>
|
|
103
|
-
|
|
104
|
-
`;
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
__decorate([
|
|
108
|
-
property({ type: String, reflect: true })
|
|
109
|
-
], UserDrawer.prototype, "settingsURL", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
property({ type: Boolean, attribute: true, reflect: true })
|
|
112
|
-
], UserDrawer.prototype, "drawer", void 0);
|
|
113
|
-
__decorate([
|
|
114
|
-
property({ type: Boolean, attribute: true, reflect: true })
|
|
115
|
-
], UserDrawer.prototype, "subscribe", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
state()
|
|
118
|
-
], UserDrawer.prototype, "_name", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
state()
|
|
121
|
-
], UserDrawer.prototype, "_log", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
state()
|
|
124
|
-
], UserDrawer.prototype, "_sign", void 0);
|
|
125
|
-
UserDrawer = __decorate([
|
|
126
|
-
customElement('user-drawer')
|
|
127
|
-
], UserDrawer);
|
|
128
|
-
export { UserDrawer };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
2
|
-
import { LazyLoader } from '../../../lazy-loader';
|
|
3
|
-
export declare class ResetEmail extends LazyLoader {
|
|
4
|
-
private userEmail;
|
|
5
|
-
constructor();
|
|
6
|
-
protected firstUpdated(): void;
|
|
7
|
-
private handleEmail;
|
|
8
|
-
protected render(): TemplateResult;
|
|
9
|
-
private restPassword;
|
|
10
|
-
}
|
|
11
|
-
declare global {
|
|
12
|
-
interface HTMLElementTagNameMap {
|
|
13
|
-
'reset-email': ResetEmail;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=forgot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forgot.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/input/forgot.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,cAAc,EAAI,MAAU,KAAK,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAsB,sBAAsB,CAAC;AAIlE,qBACa,UAAW,SAAQ,UAAU;IAE/B,OAAO,CAAC,SAAS,CAAc;;IAKxC,SAAS,CAAC,YAAY;IAStB,OAAO,CAAC,WAAW;IAKjB,SAAS,CAAC,MAAM,IAAG,cAAc;IA0BnC,OAAO,CAAC,YAAY,CAKnB;CASF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -1,60 +0,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
|
-
import { html, } from 'lit';
|
|
8
|
-
import { customElement, state } from "lit/decorators.js";
|
|
9
|
-
import { LazyLoader } from '../../../lazy-loader';
|
|
10
|
-
import { sendPasswordResetEmail } from 'firebase/auth';
|
|
11
|
-
import { auth } from '../../../firebase/start';
|
|
12
|
-
let ResetEmail = class ResetEmail extends LazyLoader {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this.userEmail = '';
|
|
16
|
-
this.restPassword = async () => {
|
|
17
|
-
await sendPasswordResetEmail(auth, this.userEmail)
|
|
18
|
-
.catch((error) => { console.log(error); });
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
firstUpdated() {
|
|
22
|
-
this.shadowRoot.querySelector(".reset").addEventListener("click", () => {
|
|
23
|
-
this.restPassword();
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
handleEmail(event) {
|
|
27
|
-
const input = event.target;
|
|
28
|
-
this.userEmail = input.value;
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
return html `
|
|
32
|
-
|
|
33
|
-
<form class="resetPass">
|
|
34
|
-
|
|
35
|
-
<input
|
|
36
|
-
class ="email"
|
|
37
|
-
type ="text"
|
|
38
|
-
placeholder ="email"
|
|
39
|
-
@change ="${this.handleEmail}">
|
|
40
|
-
|
|
41
|
-
<button
|
|
42
|
-
type ="submit"
|
|
43
|
-
class ="reset">Forgot Password</button>
|
|
44
|
-
|
|
45
|
-
</form>
|
|
46
|
-
|
|
47
|
-
<input
|
|
48
|
-
class ="phoneVerify"
|
|
49
|
-
type ="text" />
|
|
50
|
-
|
|
51
|
-
`;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
__decorate([
|
|
55
|
-
state()
|
|
56
|
-
], ResetEmail.prototype, "userEmail", void 0);
|
|
57
|
-
ResetEmail = __decorate([
|
|
58
|
-
customElement('reset-email')
|
|
59
|
-
], ResetEmail);
|
|
60
|
-
export { ResetEmail };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class UserLogIn extends LitElement {
|
|
3
|
-
private email;
|
|
4
|
-
private password;
|
|
5
|
-
constructor();
|
|
6
|
-
static get styles(): import("lit").CSSResult[];
|
|
7
|
-
protected render(): import("lit-html").TemplateResult<1>;
|
|
8
|
-
private change;
|
|
9
|
-
private handleEmail;
|
|
10
|
-
private handlePassword;
|
|
11
|
-
private _handleSubmit;
|
|
12
|
-
private login;
|
|
13
|
-
private signIn;
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
'user-log-in': UserLogIn;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/input/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAO,MAAe,KAAK,CAAC;AAerD,qBACa,SAAU,SAAQ,UAAU;IAE9B,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,QAAQ,CAAU;;IAInC,MAAM,KAAK,MAAM,8BAcd;IAEH,SAAS,CAAC,MAAM;IAgDhB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,KAAK;IAQb,OAAO,CAAC,MAAM,CASb;CAEF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,aAAa,EAAE,SAAS,CAAC;KAC5B;CACF"}
|
|
@@ -1,128 +0,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
|
-
import { html, LitElement, css } from 'lit';
|
|
8
|
-
import { customElement, state } from 'lit/decorators.js';
|
|
9
|
-
import { EmailAuthProvider, signInWithCredential } from 'firebase/auth';
|
|
10
|
-
import { auth } from '../../../firebase/start';
|
|
11
|
-
import { buttonStyle } from '../../../css/form/button';
|
|
12
|
-
import { labelStyle } from '../../../css/form/label';
|
|
13
|
-
import { inputStyle } from '../../../css/form/input';
|
|
14
|
-
import { listStyle } from '../../../css/form/list';
|
|
15
|
-
import { toggleStyle } from '../css/toggle';
|
|
16
|
-
import store from '../../../store';
|
|
17
|
-
import { signUpAction } from '../../../redux/frontend';
|
|
18
|
-
let UserLogIn = class UserLogIn extends LitElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super();
|
|
21
|
-
this.email = '';
|
|
22
|
-
this.password = '';
|
|
23
|
-
this.signIn = async (email, password) => {
|
|
24
|
-
const authCredential = EmailAuthProvider.credential(email, password);
|
|
25
|
-
await signInWithCredential(auth, authCredential).catch((error) => { console.log(error); });
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
static get styles() {
|
|
29
|
-
return [
|
|
30
|
-
listStyle,
|
|
31
|
-
labelStyle,
|
|
32
|
-
inputStyle,
|
|
33
|
-
buttonStyle,
|
|
34
|
-
toggleStyle,
|
|
35
|
-
css `
|
|
36
|
-
|
|
37
|
-
.double {
|
|
38
|
-
display: grid;
|
|
39
|
-
grid-template-columns: 1fr auto;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
`
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
;
|
|
46
|
-
render() {
|
|
47
|
-
return html `
|
|
48
|
-
|
|
49
|
-
<!-- Log-in State -->
|
|
50
|
-
<form
|
|
51
|
-
@submit=${this._handleSubmit}
|
|
52
|
-
autocomplete="on">
|
|
53
|
-
|
|
54
|
-
<ul>
|
|
55
|
-
|
|
56
|
-
<li>
|
|
57
|
-
<label for="pwa-login-email">Email</label>
|
|
58
|
-
<input
|
|
59
|
-
id="pwa-login-email"
|
|
60
|
-
type="email"
|
|
61
|
-
@change="${this.handleEmail}">
|
|
62
|
-
</li>
|
|
63
|
-
|
|
64
|
-
<li>
|
|
65
|
-
<label for="pwa-login-pass">Password</label>
|
|
66
|
-
<input
|
|
67
|
-
id="pwa-login-pass"
|
|
68
|
-
type="password"
|
|
69
|
-
@change="${this.handlePassword}">
|
|
70
|
-
</li>
|
|
71
|
-
|
|
72
|
-
<li>
|
|
73
|
-
<button
|
|
74
|
-
class="login action-button"
|
|
75
|
-
@click="${this.login}">Sign in</button>
|
|
76
|
-
|
|
77
|
-
</li>
|
|
78
|
-
|
|
79
|
-
<!-- Change State -->
|
|
80
|
-
<li>
|
|
81
|
-
<p class="divider">Or</p>
|
|
82
|
-
<button
|
|
83
|
-
class="new"
|
|
84
|
-
@click="${this.change}">create a new account</button>
|
|
85
|
-
</li>
|
|
86
|
-
|
|
87
|
-
</ul>
|
|
88
|
-
|
|
89
|
-
</form>
|
|
90
|
-
|
|
91
|
-
`;
|
|
92
|
-
}
|
|
93
|
-
change() {
|
|
94
|
-
store.dispatch(signUpAction());
|
|
95
|
-
}
|
|
96
|
-
handleEmail(event) {
|
|
97
|
-
const input = event.target;
|
|
98
|
-
this.email = input.value;
|
|
99
|
-
}
|
|
100
|
-
handlePassword(event) {
|
|
101
|
-
const input = event.target;
|
|
102
|
-
this.password = input.value;
|
|
103
|
-
}
|
|
104
|
-
_handleSubmit(event) {
|
|
105
|
-
event.preventDefault();
|
|
106
|
-
}
|
|
107
|
-
login() {
|
|
108
|
-
if (this.email.length < 4) {
|
|
109
|
-
alert('Please enter an email address.');
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (this.password.length < 4) {
|
|
113
|
-
alert('Please enter a password.');
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
this.signIn(this.email, this.password);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
__decorate([
|
|
120
|
-
state()
|
|
121
|
-
], UserLogIn.prototype, "email", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
state()
|
|
124
|
-
], UserLogIn.prototype, "password", void 0);
|
|
125
|
-
UserLogIn = __decorate([
|
|
126
|
-
customElement('user-log-in')
|
|
127
|
-
], UserLogIn);
|
|
128
|
-
export { UserLogIn };
|