pwa-auth 3.4.9 → 3.5.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/LICENSES.txt +18 -23
- package/README.md +547 -326
- package/base/api/drawer.d.ts +4 -0
- package/base/api/drawer.d.ts.map +1 -0
- package/base/api/drawer.js +12 -0
- package/base/api/drawer.js.map +1 -0
- package/base/api/user.d.ts +4 -0
- package/base/api/user.d.ts.map +1 -0
- package/base/api/user.js +25 -0
- package/base/api/user.js.map +1 -0
- package/base/api/verify.d.ts +4 -0
- package/base/api/verify.d.ts.map +1 -0
- package/base/api/verify.js +113 -0
- package/base/api/verify.js.map +1 -0
- package/base/deprecated/email-changed.d.ts +5 -0
- package/base/deprecated/email-changed.d.ts.map +1 -0
- package/base/deprecated/email-changed.js +9 -0
- package/base/deprecated/email-changed.js.map +1 -0
- package/base/events/emit.d.ts +12 -0
- package/base/events/emit.d.ts.map +1 -0
- package/base/events/emit.js +30 -0
- package/base/events/emit.js.map +1 -0
- package/base/events/names.d.ts +31 -0
- package/base/events/names.d.ts.map +1 -0
- package/base/events/names.js +31 -0
- package/base/events/names.js.map +1 -0
- package/base/events/types.d.ts +71 -0
- package/base/events/types.d.ts.map +1 -0
- package/base/events/types.js +2 -0
- package/base/events/types.js.map +1 -0
- package/base/export/pwa-auth.d.ts +17 -7
- package/base/export/pwa-auth.d.ts.map +1 -0
- package/base/export/pwa-auth.js +13 -7
- package/base/export/pwa-auth.js.map +1 -1
- package/base/firebase/attribute.d.ts +2 -0
- package/base/firebase/attribute.d.ts.map +1 -0
- package/base/firebase/attribute.js +17 -0
- package/base/firebase/attribute.js.map +1 -0
- package/base/firebase/authentication.d.ts +21 -10
- package/base/firebase/authentication.d.ts.map +1 -0
- package/base/firebase/authentication.js +65 -8
- package/base/firebase/authentication.js.map +1 -1
- package/base/firebase/interface.d.ts +7 -1
- package/base/firebase/interface.d.ts.map +1 -0
- package/base/firebase/interface.js +99 -68
- package/base/firebase/interface.js.map +1 -1
- package/base/firebase/message.d.ts +2 -0
- package/base/firebase/message.d.ts.map +1 -0
- package/base/firebase/message.js +34 -0
- package/base/firebase/message.js.map +1 -0
- package/base/firebase/password.d.ts +11 -0
- package/base/firebase/password.d.ts.map +1 -0
- package/base/firebase/password.js +16 -0
- package/base/firebase/password.js.map +1 -0
- package/base/lazyLoader.d.ts +1 -0
- package/base/lazyLoader.d.ts.map +1 -0
- package/base/redux/backend.d.ts +1 -0
- package/base/redux/backend.d.ts.map +1 -0
- package/base/redux/backend.js +1 -1
- package/base/redux/backend.js.map +1 -1
- package/base/redux/frontend.d.ts +16 -1
- package/base/redux/frontend.d.ts.map +1 -0
- package/base/redux/frontend.js +6 -3
- package/base/redux/frontend.js.map +1 -1
- package/base/store.d.ts +1 -6
- package/base/store.d.ts.map +1 -0
- package/base/store.js +2 -4
- package/base/store.js.map +1 -1
- package/base/webcomponents/css/animation.d.ts +1 -0
- package/base/webcomponents/css/animation.d.ts.map +1 -0
- package/base/webcomponents/css/animation.js +79 -67
- package/base/webcomponents/css/animation.js.map +1 -1
- package/base/webcomponents/css/svg.d.ts +1 -2
- package/base/webcomponents/css/svg.d.ts.map +1 -0
- package/base/webcomponents/css/svg.js +2 -4
- package/base/webcomponents/css/svg.js.map +1 -1
- package/base/webcomponents/css/tap.d.ts +3 -0
- package/base/webcomponents/css/tap.d.ts.map +1 -0
- package/base/webcomponents/css/tap.js +9 -0
- package/base/webcomponents/css/tap.js.map +1 -0
- package/base/webcomponents/css/toggle.d.ts +1 -0
- package/base/webcomponents/css/toggle.d.ts.map +1 -0
- package/base/webcomponents/css/toggle.js +5 -5
- package/base/webcomponents/drawer/css/drawer.d.ts +1 -0
- package/base/webcomponents/drawer/css/drawer.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/drawer.js +101 -74
- package/base/webcomponents/drawer/css/drawer.js.map +1 -1
- package/base/webcomponents/drawer/css/exit.d.ts +1 -0
- package/base/webcomponents/drawer/css/exit.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/exit.js +58 -52
- package/base/webcomponents/drawer/css/exit.js.map +1 -1
- package/base/webcomponents/drawer/css/link.d.ts +1 -0
- package/base/webcomponents/drawer/css/link.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/link.js +9 -10
- package/base/webcomponents/drawer/css/link.js.map +1 -1
- package/base/webcomponents/drawer/css/paragraph.d.ts +1 -0
- package/base/webcomponents/drawer/css/paragraph.d.ts.map +1 -0
- package/base/webcomponents/drawer/css/paragraph.js +37 -20
- package/base/webcomponents/drawer/css/paragraph.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +21 -7
- package/base/webcomponents/drawer/drawer.d.ts.map +1 -0
- package/base/webcomponents/drawer/drawer.js +292 -90
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/drawer/keys.d.ts +4 -0
- package/base/webcomponents/drawer/keys.d.ts.map +1 -0
- package/base/webcomponents/drawer/keys.js +57 -0
- package/base/webcomponents/drawer/keys.js.map +1 -0
- package/base/webcomponents/form/css/button.d.ts +1 -0
- package/base/webcomponents/form/css/button.d.ts.map +1 -0
- package/base/webcomponents/form/css/button.js +69 -51
- package/base/webcomponents/form/css/button.js.map +1 -1
- package/base/webcomponents/form/css/input.d.ts +1 -0
- package/base/webcomponents/form/css/input.d.ts.map +1 -0
- package/base/webcomponents/form/css/input.js +22 -21
- package/base/webcomponents/form/css/input.js.map +1 -1
- package/base/webcomponents/form/css/label.d.ts +1 -0
- package/base/webcomponents/form/css/label.d.ts.map +1 -0
- package/base/webcomponents/form/css/label.js +22 -21
- package/base/webcomponents/form/css/label.js.map +1 -1
- package/base/webcomponents/form/css/list.d.ts +1 -0
- package/base/webcomponents/form/css/list.d.ts.map +1 -0
- package/base/webcomponents/form/css/list.js +19 -19
- package/base/webcomponents/form/css/notice.d.ts +3 -0
- package/base/webcomponents/form/css/notice.d.ts.map +1 -0
- package/base/webcomponents/form/css/notice.js +20 -0
- package/base/webcomponents/form/css/notice.js.map +1 -0
- package/base/webcomponents/form/css/status.d.ts +4 -0
- package/base/webcomponents/form/css/status.d.ts.map +1 -0
- package/base/webcomponents/form/css/status.js +44 -0
- package/base/webcomponents/form/css/status.js.map +1 -0
- package/base/webcomponents/form/css/toggle.d.ts +1 -0
- package/base/webcomponents/form/css/toggle.d.ts.map +1 -0
- package/base/webcomponents/form/css/toggle.js +43 -17
- package/base/webcomponents/form/css/toggle.js.map +1 -1
- package/base/webcomponents/form/draft.d.ts +5 -0
- package/base/webcomponents/form/draft.d.ts.map +1 -0
- package/base/webcomponents/form/draft.js +22 -0
- package/base/webcomponents/form/draft.js.map +1 -0
- package/base/webcomponents/form/forgot.d.ts +26 -3
- package/base/webcomponents/form/forgot.d.ts.map +1 -0
- package/base/webcomponents/form/forgot.js +297 -30
- package/base/webcomponents/form/forgot.js.map +1 -1
- package/base/webcomponents/form/letters.d.ts +3 -0
- package/base/webcomponents/form/letters.d.ts.map +1 -0
- package/base/webcomponents/form/letters.js +21 -0
- package/base/webcomponents/form/letters.js.map +1 -0
- package/base/webcomponents/form/login.d.ts +10 -0
- package/base/webcomponents/form/login.d.ts.map +1 -0
- package/base/webcomponents/form/login.js +221 -89
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/notice.d.ts +4 -0
- package/base/webcomponents/form/notice.d.ts.map +1 -0
- package/base/webcomponents/form/notice.js +14 -0
- package/base/webcomponents/form/notice.js.map +1 -0
- package/base/webcomponents/form/reveal.d.ts +3 -0
- package/base/webcomponents/form/reveal.d.ts.map +1 -0
- package/base/webcomponents/form/reveal.js +14 -0
- package/base/webcomponents/form/reveal.js.map +1 -0
- package/base/webcomponents/form/signup.d.ts +8 -0
- package/base/webcomponents/form/signup.d.ts.map +1 -0
- package/base/webcomponents/form/signup.js +201 -100
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/form/verified.d.ts +3 -0
- package/base/webcomponents/form/verified.d.ts.map +1 -0
- package/base/webcomponents/form/verified.js +45 -0
- package/base/webcomponents/form/verified.js.map +1 -0
- package/base/webcomponents/icon/css/icon.d.ts +1 -0
- package/base/webcomponents/icon/css/icon.d.ts.map +1 -0
- package/base/webcomponents/icon/css/icon.js +63 -49
- package/base/webcomponents/icon/css/icon.js.map +1 -1
- package/base/webcomponents/icon/icon.d.ts +6 -4
- package/base/webcomponents/icon/icon.d.ts.map +1 -0
- package/base/webcomponents/icon/icon.js +48 -27
- package/base/webcomponents/icon/icon.js.map +1 -1
- package/base/webcomponents/login/css/auth.d.ts +1 -0
- package/base/webcomponents/login/css/auth.d.ts.map +1 -0
- package/base/webcomponents/login/css/auth.js +37 -36
- package/base/webcomponents/login/css/auth.js.map +1 -1
- package/base/webcomponents/login/css/link.d.ts +1 -0
- package/base/webcomponents/login/css/link.d.ts.map +1 -0
- package/base/webcomponents/login/css/link.js +9 -10
- package/base/webcomponents/login/css/link.js.map +1 -1
- package/base/webcomponents/login/css/paragraph.d.ts +1 -0
- package/base/webcomponents/login/css/paragraph.d.ts.map +1 -0
- package/base/webcomponents/login/css/paragraph.js +8 -8
- package/base/webcomponents/login/page.d.ts +10 -6
- package/base/webcomponents/login/page.d.ts.map +1 -0
- package/base/webcomponents/login/page.js +96 -55
- package/base/webcomponents/login/page.js.map +1 -1
- package/base/webcomponents/settings/css/navigation.d.ts +1 -0
- package/base/webcomponents/settings/css/navigation.d.ts.map +1 -0
- package/base/webcomponents/settings/css/navigation.js +78 -68
- package/base/webcomponents/settings/css/navigation.js.map +1 -1
- package/base/webcomponents/settings/input/delete.d.ts +7 -6
- package/base/webcomponents/settings/input/delete.d.ts.map +1 -0
- package/base/webcomponents/settings/input/delete.js +135 -48
- package/base/webcomponents/settings/input/delete.js.map +1 -1
- package/base/webcomponents/settings/input/email.d.ts +7 -5
- package/base/webcomponents/settings/input/email.d.ts.map +1 -0
- package/base/webcomponents/settings/input/email.js +155 -50
- package/base/webcomponents/settings/input/email.js.map +1 -1
- package/base/webcomponents/settings/input/name.d.ts +8 -5
- package/base/webcomponents/settings/input/name.d.ts.map +1 -0
- package/base/webcomponents/settings/input/name.js +116 -53
- package/base/webcomponents/settings/input/name.js.map +1 -1
- package/base/webcomponents/settings/input/password.d.ts +8 -5
- package/base/webcomponents/settings/input/password.d.ts.map +1 -0
- package/base/webcomponents/settings/input/password.js +200 -103
- package/base/webcomponents/settings/input/password.js.map +1 -1
- package/base/webcomponents/settings/input/uploader.d.ts +8 -6
- package/base/webcomponents/settings/input/uploader.d.ts.map +1 -0
- package/base/webcomponents/settings/input/uploader.js +209 -170
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/input/verify.d.ts +64 -0
- package/base/webcomponents/settings/input/verify.d.ts.map +1 -0
- package/base/webcomponents/settings/input/verify.js +272 -0
- package/base/webcomponents/settings/input/verify.js.map +1 -0
- package/base/webcomponents/settings/settings.d.ts +15 -10
- package/base/webcomponents/settings/settings.d.ts.map +1 -0
- package/base/webcomponents/settings/settings.js +226 -147
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/firebase.md +107 -0
- package/intro.md +19 -0
- package/license +21 -21
- package/package.json +116 -71
- package/source/pwa-auth.js +1098 -407
- package/source/pwa-styles.css +50 -68
- package/base/redux/drawer.d.ts +0 -17
- package/base/redux/drawer.js +0 -22
- package/base/redux/drawer.js.map +0 -1
- package/demonstration/index.html +0 -99
- package/demonstration/pwa-styles.css +0 -77
- package/demonstration/styles.css +0 -77
- package/notes.md +0 -11
- package/source/THIRD_PARTY_LICENSES.txt +0 -303
|
@@ -1,71 +1,81 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const navigation = css `
|
|
3
|
-
|
|
4
|
-
nav {
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
nav > ul {
|
|
11
|
-
|
|
12
|
-
list-style-type: none;
|
|
13
|
-
margin: 0px;
|
|
14
|
-
padding: 0px;
|
|
15
|
-
display: grid;
|
|
16
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
17
|
-
grid-gap: 8px;
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
nav > ul > li > button {
|
|
22
|
-
|
|
23
|
-
color: var(--pwa_nav_button_color,
|
|
24
|
-
border: 0;
|
|
25
|
-
width: 100%;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
font-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
2
|
+
export const navigation = css `
|
|
3
|
+
|
|
4
|
+
nav {
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
z-index: 3;
|
|
7
|
+
padding: 8px 8px 0; /* Required - space around the tabs */
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
nav > ul {
|
|
11
|
+
|
|
12
|
+
list-style-type: none;
|
|
13
|
+
margin: 0px;
|
|
14
|
+
padding: 0px;
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
|
|
17
|
+
grid-gap: 8px;
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
nav > ul > li > button {
|
|
22
|
+
|
|
23
|
+
color: var(--pwa_nav_button_color, #4e5b6a);
|
|
24
|
+
border: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
margin: auto;
|
|
27
|
+
padding: 0px;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
font-size: 0.85rem;
|
|
30
|
+
min-height: var(--pwa_tap, 44px); /* Required - minimum tap target */
|
|
31
|
+
height: auto;
|
|
32
|
+
border-radius: 6px 6px 0 0;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
nav > ul > li > button[on] {
|
|
38
|
+
|
|
39
|
+
color: var(--pwa_nav_highlight_color, #1c2430);
|
|
40
|
+
background-color: var(--pwa_nav_on_background, #f3efe6);
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
nav > ul > li > button:hover {
|
|
46
|
+
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Required - fit 320px */
|
|
52
|
+
@media (max-width: 320px) {
|
|
53
|
+
|
|
54
|
+
nav > ul {
|
|
55
|
+
grid-gap: 4px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
nav > ul > li > button {
|
|
59
|
+
white-space: normal;
|
|
60
|
+
font-size: .7em;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
section {
|
|
66
|
+
align-content: start; /* Required - tabs keep each button under its fields */
|
|
67
|
+
background-color: var(--section_background_color, #fffdf8);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
h2 {
|
|
72
|
+
color: var(--pwa_header_color, #1c2430);
|
|
73
|
+
text-align: center;
|
|
74
|
+
font-weight: 600;
|
|
75
|
+
font-size: 1.35rem;
|
|
76
|
+
margin: 0;
|
|
77
|
+
padding: 20px 16px 4px;
|
|
78
|
+
}
|
|
79
|
+
|
|
70
80
|
`;
|
|
71
81
|
//# sourceMappingURL=navigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/css/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/css/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8E5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSResultArray, LitElement } from "lit";
|
|
2
|
-
import { AppState } from "../../../store";
|
|
2
|
+
import { AppState } from "../../../store.js";
|
|
3
3
|
declare const DeleteUser_base: (new (...args: any[]) => {
|
|
4
4
|
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
5
|
connectedCallback(): void;
|
|
@@ -19,9 +19,6 @@ declare const DeleteUser_base: (new (...args: any[]) => {
|
|
|
19
19
|
phone: string;
|
|
20
20
|
email: string;
|
|
21
21
|
};
|
|
22
|
-
drawer: {
|
|
23
|
-
drawer: boolean;
|
|
24
|
-
};
|
|
25
22
|
backend: {
|
|
26
23
|
verified: boolean;
|
|
27
24
|
anon: boolean;
|
|
@@ -38,13 +35,16 @@ declare const DeleteUser_base: (new (...args: any[]) => {
|
|
|
38
35
|
export declare class DeleteUser extends DeleteUser_base {
|
|
39
36
|
private login;
|
|
40
37
|
private email;
|
|
38
|
+
private busy;
|
|
39
|
+
private status;
|
|
40
|
+
private tone;
|
|
41
|
+
private showPassword;
|
|
41
42
|
constructor();
|
|
42
|
-
protected firstUpdated(): void;
|
|
43
43
|
stateChanged(state: AppState): void;
|
|
44
44
|
static get styles(): CSSResultArray;
|
|
45
45
|
render(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
private show;
|
|
46
47
|
private alertDelete;
|
|
47
|
-
private deleteUser;
|
|
48
48
|
private officialDelete;
|
|
49
49
|
}
|
|
50
50
|
declare global {
|
|
@@ -53,3 +53,4 @@ declare global {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
export {};
|
|
56
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5D,OAAc,EAAE,QAAQ,EAAE,MAAS,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAavD,qBAAa,UAAW,SAAQ,eAA0B;IAE/C,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,YAAY,CAAS;;IAItC,YAAY,CAAC,KAAK,EAAE,QAAQ;IAK5B,MAAM,KAAK,MAAM,IAAI,cAAc,CAqB3B;IAER,MAAM;IAmCN,OAAO,CAAC,IAAI;IAOZ,OAAO,CAAC,WAAW,CAgBlB;IAGD,OAAO,CAAC,cAAc,CAyCpB;CAEH;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -10,27 +10,79 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { LitElement, css, html } from "lit";
|
|
11
11
|
import { state } from "lit/decorators.js";
|
|
12
12
|
import { connect } from "pwa-helpers";
|
|
13
|
-
import store from "../../../store";
|
|
14
|
-
import { buttonStyle } from "../../form/css/button";
|
|
15
|
-
import {
|
|
13
|
+
import store from "../../../store.js";
|
|
14
|
+
import { buttonStyle } from "../../form/css/button.js";
|
|
15
|
+
import { labelStyle } from "../../form/css/label.js";
|
|
16
|
+
import { inputStyle } from "../../form/css/input.js";
|
|
17
|
+
import { toggleStyle } from "../../form/css/toggle.js";
|
|
18
|
+
import { statusStyle, liveStatus } from "../../form/css/status.js";
|
|
19
|
+
import { revealControl } from "../../form/reveal.js";
|
|
20
|
+
import { auth } from '../../../firebase/authentication.js';
|
|
21
|
+
import { deleteUserFiles, logAccountDelete, reauthenticate, takeAuthFailure } from '../../../firebase/interface.js';
|
|
22
|
+
import { pwaAccountDeleted, pwaAuthError } from '../../../events/names.js';
|
|
23
|
+
import { emitWindow, toAuthError } from '../../../events/emit.js';
|
|
24
|
+
import { userMessage } from '../../../firebase/message.js';
|
|
16
25
|
export class DeleteUser extends connect(store)(LitElement) {
|
|
17
26
|
constructor() {
|
|
18
27
|
super();
|
|
19
28
|
this.login = false;
|
|
20
29
|
this.email = '';
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
this.busy = false;
|
|
31
|
+
this.status = '';
|
|
32
|
+
this.tone = '';
|
|
33
|
+
this.showPassword = false;
|
|
34
|
+
this.alertDelete = () => {
|
|
35
|
+
if (this.busy)
|
|
36
|
+
return;
|
|
37
|
+
const current = auth.currentUser;
|
|
38
|
+
if (!current) {
|
|
39
|
+
this.show({ code: 'pwa/signed-out', message: 'Sign in first.' });
|
|
40
|
+
return;
|
|
24
41
|
}
|
|
25
|
-
|
|
26
|
-
|
|
42
|
+
const password = this.shadowRoot.querySelector('#pwa-delete-password').value;
|
|
43
|
+
if (password.length < 6) {
|
|
44
|
+
this.show({ code: 'pwa/current-password', message: 'Enter your current password.' });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const d = confirm("Delete Account?");
|
|
48
|
+
if (d == true)
|
|
49
|
+
void this.officialDelete(password);
|
|
50
|
+
};
|
|
51
|
+
this.officialDelete = async (password) => {
|
|
52
|
+
this.busy = true;
|
|
53
|
+
this.tone = '';
|
|
54
|
+
this.status = '';
|
|
55
|
+
const ok = await reauthenticate(password);
|
|
56
|
+
if (!ok) {
|
|
57
|
+
const detail = takeAuthFailure();
|
|
58
|
+
this.tone = 'error';
|
|
59
|
+
this.status = userMessage(detail ?? { code: 'pwa/unknown', message: 'Something went wrong. Try again.' });
|
|
60
|
+
this.busy = false;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const current = auth.currentUser;
|
|
64
|
+
if (!current) {
|
|
65
|
+
this.show({ code: 'pwa/signed-out', message: 'Sign in first.' });
|
|
66
|
+
this.busy = false;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
const uid = current.uid;
|
|
71
|
+
await deleteUserFiles(uid);
|
|
72
|
+
await logAccountDelete();
|
|
73
|
+
await current.delete();
|
|
74
|
+
emitWindow(pwaAccountDeleted, { uid });
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
const detail = toAuthError(error);
|
|
78
|
+
this.tone = 'error';
|
|
79
|
+
this.status = userMessage(error);
|
|
80
|
+
emitWindow(pwaAuthError, detail);
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
this.busy = false;
|
|
27
84
|
}
|
|
28
85
|
};
|
|
29
|
-
}
|
|
30
|
-
firstUpdated() {
|
|
31
|
-
this.shadowRoot.querySelector('.deleteUser').addEventListener('click', () => {
|
|
32
|
-
this.alertDelete();
|
|
33
|
-
});
|
|
34
86
|
}
|
|
35
87
|
stateChanged(state) {
|
|
36
88
|
this.login = state.frontend.login;
|
|
@@ -39,47 +91,66 @@ export class DeleteUser extends connect(store)(LitElement) {
|
|
|
39
91
|
static get styles() {
|
|
40
92
|
return [
|
|
41
93
|
buttonStyle,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
94
|
+
labelStyle,
|
|
95
|
+
inputStyle,
|
|
96
|
+
toggleStyle,
|
|
97
|
+
statusStyle,
|
|
98
|
+
css `
|
|
99
|
+
|
|
100
|
+
:host {
|
|
101
|
+
display: grid;
|
|
102
|
+
grid-template-rows: auto auto auto auto;
|
|
103
|
+
align-content: start;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
p.lead {
|
|
107
|
+
margin: 0;
|
|
108
|
+
padding: 4px 20px 0;
|
|
109
|
+
line-height: 1.5;
|
|
110
|
+
color: var(--pwa_label_text_color, #1c2430);
|
|
111
|
+
}
|
|
112
|
+
|
|
54
113
|
`
|
|
55
114
|
];
|
|
56
115
|
}
|
|
57
116
|
render() {
|
|
58
|
-
return html `
|
|
59
|
-
|
|
60
|
-
<p>Permanently delete the user account and data related to: ${this.email}</p>
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
117
|
+
return html `
|
|
118
|
+
|
|
119
|
+
<p class="lead">Permanently delete the user account and data related to: ${this.email}</p>
|
|
120
|
+
|
|
121
|
+
<label for="pwa-delete-password">Current password
|
|
122
|
+
|
|
123
|
+
<span class="pair">
|
|
124
|
+
|
|
125
|
+
<input
|
|
126
|
+
id="pwa-delete-password"
|
|
127
|
+
name="current_password"
|
|
128
|
+
type="${this.showPassword ? 'text' : 'password'}"
|
|
129
|
+
autocomplete="current-password"
|
|
130
|
+
aria-describedby="pwa-delete-status"/>
|
|
131
|
+
|
|
132
|
+
${revealControl(this.showPassword, () => { this.showPassword = !this.showPassword; })}
|
|
133
|
+
|
|
134
|
+
</span>
|
|
135
|
+
|
|
136
|
+
</label>
|
|
137
|
+
|
|
138
|
+
${liveStatus('pwa-delete-status', this.status, this.tone)}
|
|
139
|
+
|
|
140
|
+
<button
|
|
141
|
+
type="button"
|
|
142
|
+
part="submit"
|
|
143
|
+
class="action-button deleteUser"
|
|
144
|
+
aria-busy="${this.busy ? 'true' : 'false'}"
|
|
145
|
+
?disabled="${this.login === false || this.busy}"
|
|
146
|
+
@click="${this.alertDelete}">${this.busy ? 'Deleting…' : 'Delete'}</button>
|
|
147
|
+
|
|
66
148
|
`;
|
|
67
149
|
}
|
|
68
|
-
|
|
69
|
-
this.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
alert('Please Login');
|
|
73
|
-
} }
|
|
74
|
-
deleteUser() {
|
|
75
|
-
const d = confirm("Delete Account?");
|
|
76
|
-
if (d == true) {
|
|
77
|
-
this.officialDelete();
|
|
78
|
-
console.log("user gone");
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
console.log("user here");
|
|
82
|
-
}
|
|
150
|
+
show(detail) {
|
|
151
|
+
this.tone = 'error';
|
|
152
|
+
this.status = userMessage(detail);
|
|
153
|
+
emitWindow(pwaAuthError, detail);
|
|
83
154
|
}
|
|
84
155
|
}
|
|
85
156
|
__decorate([
|
|
@@ -90,5 +161,21 @@ __decorate([
|
|
|
90
161
|
state(),
|
|
91
162
|
__metadata("design:type", String)
|
|
92
163
|
], DeleteUser.prototype, "email", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
state(),
|
|
166
|
+
__metadata("design:type", Object)
|
|
167
|
+
], DeleteUser.prototype, "busy", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
state(),
|
|
170
|
+
__metadata("design:type", Object)
|
|
171
|
+
], DeleteUser.prototype, "status", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
state(),
|
|
174
|
+
__metadata("design:type", Object)
|
|
175
|
+
], DeleteUser.prototype, "tone", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
state(),
|
|
178
|
+
__metadata("design:type", Object)
|
|
179
|
+
], DeleteUser.prototype, "showPassword", void 0);
|
|
93
180
|
customElements.define('delete-user', DeleteUser);
|
|
94
181
|
//# sourceMappingURL=delete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/delete.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAmB,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAiB,aAAa,CAAC;AACjD,OAAO,KAAmB,MAAS,
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/delete.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAmB,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAiB,aAAa,CAAC;AACjD,OAAO,KAAmB,MAAS,mBAAmB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAa,0BAA0B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAc,yBAAyB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAc,yBAAyB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAa,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAW,sBAAsB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAoB,qCAAqC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACpH,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,WAAW,E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CAAiC;AACxB;IAAhB,KAAK,EAAE;;yCAA4B;AACnB;IAAhB,KAAK,EAAE;;wCAAsB;AACb;IAAhB,KAAK,EAAE;;0CAAqB;AACZ;IAAhB,KAAK,EAAE;;wCAAmB;AACV;IAAhB,KAAK,EAAE;;gDAA8B;AA0IxC,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSResultArray, LitElement } from "lit";
|
|
2
|
-
import { AppState } from "../../../store";
|
|
2
|
+
import { AppState } from "../../../store.js";
|
|
3
3
|
declare const ContactEmail_base: (new (...args: any[]) => {
|
|
4
4
|
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
5
|
connectedCallback(): void;
|
|
@@ -19,9 +19,6 @@ declare const ContactEmail_base: (new (...args: any[]) => {
|
|
|
19
19
|
phone: string;
|
|
20
20
|
email: string;
|
|
21
21
|
};
|
|
22
|
-
drawer: {
|
|
23
|
-
drawer: boolean;
|
|
24
|
-
};
|
|
25
22
|
backend: {
|
|
26
23
|
verified: boolean;
|
|
27
24
|
anon: boolean;
|
|
@@ -39,12 +36,16 @@ export declare class ContactEmail extends ContactEmail_base {
|
|
|
39
36
|
email: string;
|
|
40
37
|
private login;
|
|
41
38
|
private mail;
|
|
39
|
+
private busy;
|
|
40
|
+
private status;
|
|
41
|
+
private tone;
|
|
42
|
+
private showPassword;
|
|
42
43
|
constructor();
|
|
43
44
|
stateChanged(state: AppState): void;
|
|
44
45
|
private handleEmail;
|
|
45
46
|
static get styles(): CSSResultArray;
|
|
46
47
|
render(): import("lit-html").TemplateResult<1>;
|
|
47
|
-
private
|
|
48
|
+
private show;
|
|
48
49
|
private saveEmail;
|
|
49
50
|
}
|
|
50
51
|
declare global {
|
|
@@ -53,3 +54,4 @@ declare global {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
export {};
|
|
57
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5D,OAAc,EAAE,QAAQ,EAAE,MAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBrD,qBAAa,YAAa,SAAQ,iBAA0B;IAGhB,KAAK,SAAM;IAE5C,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,IAAI,CAAwB;IACpC,OAAO,CAAC,IAAI,CAAe;IAC3B,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,YAAY,CAAS;;IAItC,YAAY,CAAC,KAAK,EAAE,QAAQ;IAK5B,OAAO,CAAC,WAAW;IAKnB,MAAM,KAAK,MAAM,IAAI,cAAc,CAW7B;IAEN,MAAM;IAyDN,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,SAAS,CA6DhB;CAEF;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|