pwa-auth 3.4.8 → 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 +36 -15
- package/README.md +547 -311
- 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 -47
- 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 -146
- 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 -85
- package/source/pwa-auth.js +1097 -404
- 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/source/THIRD_PARTY_LICENSES.txt +0 -303
|
@@ -10,37 +10,69 @@ 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 { auth } from "../../../firebase/authentication";
|
|
15
|
-
import { labelStyle } from "../../form/css/label";
|
|
16
|
-
import { inputStyle } from "../../form/css/input";
|
|
17
|
-
import { buttonStyle } from "../../form/css/button";
|
|
13
|
+
import store from "../../../store.js";
|
|
14
|
+
import { auth } from "../../../firebase/authentication.js";
|
|
15
|
+
import { labelStyle } from "../../form/css/label.js";
|
|
16
|
+
import { inputStyle } from "../../form/css/input.js";
|
|
17
|
+
import { buttonStyle } from "../../form/css/button.js";
|
|
18
|
+
import { toggleStyle } from "../../form/css/toggle.js";
|
|
19
|
+
import { statusStyle, liveStatus } from "../../form/css/status.js";
|
|
20
|
+
import { revealControl } from "../../form/reveal.js";
|
|
18
21
|
import { updatePassword } from "firebase/auth";
|
|
22
|
+
import { reauthenticate, takeAuthFailure } from "../../../firebase/interface.js";
|
|
23
|
+
import { pwaAuthError, pwaPasswordChanged } from "../../../events/names.js";
|
|
24
|
+
import { emitWindow, toAuthError } from "../../../events/emit.js";
|
|
25
|
+
import { userMessage } from "../../../firebase/message.js";
|
|
26
|
+
import { newPasswordIssue, passwordHint, passwordMax, passwordMin, passwordMismatch } from "../../../firebase/password.js";
|
|
19
27
|
export class InputPassword extends connect(store)(LitElement) {
|
|
20
28
|
constructor() {
|
|
21
29
|
super();
|
|
22
30
|
this.message = '';
|
|
31
|
+
this.tone = '';
|
|
23
32
|
this.password = '';
|
|
24
33
|
this.login = false;
|
|
25
|
-
this.
|
|
26
|
-
|
|
34
|
+
this.busy = false;
|
|
35
|
+
this.showCurrent = false;
|
|
36
|
+
this.showNext = false;
|
|
37
|
+
this.showVerify = false;
|
|
38
|
+
this.default = (event) => {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
void this.alertPassword();
|
|
27
41
|
};
|
|
28
|
-
this.updatePass = async (newPassword) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
this.updatePass = async (currentPassword, newPassword) => {
|
|
43
|
+
const current = auth.currentUser;
|
|
44
|
+
if (!current) {
|
|
45
|
+
this.show({ code: 'pwa/signed-out', message: 'Sign in first.' });
|
|
46
|
+
return;
|
|
33
47
|
}
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
this.busy = true;
|
|
49
|
+
this.tone = '';
|
|
50
|
+
this.message = '';
|
|
51
|
+
const ok = await reauthenticate(currentPassword);
|
|
52
|
+
if (!ok) {
|
|
53
|
+
const detail = takeAuthFailure();
|
|
54
|
+
this.tone = 'error';
|
|
55
|
+
this.message = userMessage(detail ?? { code: 'pwa/unknown', message: 'Something went wrong. Try again.' });
|
|
56
|
+
this.busy = false;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
await updatePassword(current, newPassword);
|
|
61
|
+
this.tone = '';
|
|
62
|
+
this.message = 'Password saved.';
|
|
63
|
+
emitWindow(pwaPasswordChanged, { uid: current.uid });
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
const detail = toAuthError(error);
|
|
67
|
+
this.tone = 'error';
|
|
68
|
+
this.message = userMessage(error);
|
|
69
|
+
emitWindow(pwaAuthError, detail);
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
this.busy = false;
|
|
36
73
|
}
|
|
37
74
|
};
|
|
38
75
|
}
|
|
39
|
-
firstUpdated() {
|
|
40
|
-
this.shadowRoot.querySelector('.pass').addEventListener('click', () => {
|
|
41
|
-
this.alertPassword();
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
76
|
stateChanged(state) {
|
|
45
77
|
this.login = state.frontend.login;
|
|
46
78
|
}
|
|
@@ -53,105 +85,154 @@ export class InputPassword extends connect(store)(LitElement) {
|
|
|
53
85
|
labelStyle,
|
|
54
86
|
inputStyle,
|
|
55
87
|
buttonStyle,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
88
|
+
toggleStyle,
|
|
89
|
+
statusStyle,
|
|
90
|
+
css `
|
|
91
|
+
|
|
92
|
+
:host{
|
|
93
|
+
display: grid;
|
|
94
|
+
align-content: start;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
form { display: grid; align-content: start; }
|
|
98
|
+
|
|
66
99
|
`
|
|
67
100
|
];
|
|
68
101
|
}
|
|
69
102
|
render() {
|
|
70
|
-
return html `
|
|
71
|
-
|
|
72
|
-
<form
|
|
73
|
-
autocomplete="
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<div>
|
|
78
|
-
|
|
79
|
-
<label for="pwa-
|
|
80
|
-
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
103
|
+
return html `
|
|
104
|
+
|
|
105
|
+
<form
|
|
106
|
+
autocomplete="on"
|
|
107
|
+
aria-busy="${this.busy ? 'true' : 'false'}"
|
|
108
|
+
@submit="${this.default}">
|
|
109
|
+
|
|
110
|
+
<div>
|
|
111
|
+
|
|
112
|
+
<label for="pwa-current-password">Current Password
|
|
113
|
+
|
|
114
|
+
<span class="pair">
|
|
115
|
+
|
|
116
|
+
<input
|
|
117
|
+
id = "pwa-current-password"
|
|
118
|
+
name = "current_password"
|
|
119
|
+
type = "${this.showCurrent ? 'text' : 'password'}"
|
|
120
|
+
autocomplete = "current-password"
|
|
121
|
+
aria-describedby = "pwa-password-status">
|
|
122
|
+
|
|
123
|
+
${revealControl(this.showCurrent, () => { this.showCurrent = !this.showCurrent; })}
|
|
124
|
+
|
|
125
|
+
</span>
|
|
126
|
+
|
|
127
|
+
</label>
|
|
128
|
+
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div>
|
|
132
|
+
|
|
133
|
+
<label for="pwa-new-password">New Password
|
|
134
|
+
|
|
135
|
+
<span class="pair">
|
|
136
|
+
|
|
137
|
+
<input
|
|
138
|
+
id = "pwa-new-password"
|
|
139
|
+
name = "new_password"
|
|
140
|
+
part = "password"
|
|
141
|
+
type = "${this.showNext ? 'text' : 'password'}"
|
|
142
|
+
autocomplete = "new-password"
|
|
143
|
+
minlength = "${passwordMin}"
|
|
144
|
+
maxlength = "${passwordMax}"
|
|
145
|
+
.value = "${this.password}"
|
|
146
|
+
@input = "${this.handleInputChange}"
|
|
147
|
+
aria-describedby = "pwa-new-password-hint pwa-password-status">
|
|
148
|
+
|
|
149
|
+
${revealControl(this.showNext, () => { this.showNext = !this.showNext; })}
|
|
150
|
+
|
|
151
|
+
</span>
|
|
152
|
+
|
|
153
|
+
<p id="pwa-new-password-hint" class="hint" part="hint">${passwordHint}</p>
|
|
154
|
+
|
|
155
|
+
</label>
|
|
156
|
+
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div>
|
|
160
|
+
|
|
161
|
+
<label for="pwa-verify-password">Verify Password
|
|
162
|
+
|
|
163
|
+
<span class="pair">
|
|
164
|
+
|
|
165
|
+
<input
|
|
166
|
+
id = "pwa-verify-password"
|
|
167
|
+
name = "verify_password"
|
|
168
|
+
part = "verify"
|
|
169
|
+
type = "${this.showVerify ? 'text' : 'password'}"
|
|
170
|
+
autocomplete = "new-password"
|
|
171
|
+
minlength = "${passwordMin}"
|
|
172
|
+
maxlength = "${passwordMax}"
|
|
173
|
+
aria-describedby = "pwa-password-status">
|
|
174
|
+
|
|
175
|
+
${revealControl(this.showVerify, () => { this.showVerify = !this.showVerify; })}
|
|
176
|
+
|
|
177
|
+
</span>
|
|
178
|
+
|
|
179
|
+
</label>
|
|
180
|
+
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
${liveStatus('pwa-password-status', this.message, this.tone)}
|
|
184
|
+
|
|
185
|
+
<button
|
|
186
|
+
type="submit"
|
|
187
|
+
part="submit"
|
|
188
|
+
class="action-button pass"
|
|
189
|
+
aria-busy="${this.busy ? 'true' : 'false'}"
|
|
190
|
+
?disabled="${this.login === false || this.busy}">${this.busy ? 'Saving…' : 'Update'}</button>
|
|
191
|
+
|
|
192
|
+
</form>
|
|
193
|
+
|
|
126
194
|
`;
|
|
127
195
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
196
|
+
show(detail) {
|
|
197
|
+
this.tone = 'error';
|
|
198
|
+
this.message = userMessage(detail);
|
|
199
|
+
emitWindow(pwaAuthError, detail);
|
|
200
|
+
}
|
|
201
|
+
async alertPassword() {
|
|
202
|
+
if (this.busy)
|
|
203
|
+
return;
|
|
204
|
+
const currentPassword = this.shadowRoot.querySelector('#pwa-current-password').value;
|
|
205
|
+
const entered = this.shadowRoot.querySelector('#pwa-new-password').value;
|
|
206
|
+
const verify = this.shadowRoot.querySelector('#pwa-verify-password').value;
|
|
207
|
+
this.password = entered;
|
|
208
|
+
if (currentPassword.length < 6) {
|
|
209
|
+
this.show({ code: 'pwa/current-password', message: 'Enter your current password.' });
|
|
210
|
+
return;
|
|
131
211
|
}
|
|
132
|
-
|
|
133
|
-
|
|
212
|
+
const issue = newPasswordIssue(this.password);
|
|
213
|
+
if (issue) {
|
|
214
|
+
this.show(issue);
|
|
215
|
+
return;
|
|
134
216
|
}
|
|
135
|
-
|
|
136
|
-
this.message
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.updatePass(this.password);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
alert('Please Login');
|
|
146
|
-
}
|
|
147
|
-
}
|
|
217
|
+
if (this.password !== verify) {
|
|
218
|
+
this.show({ code: 'pwa/password-mismatch', message: passwordMismatch });
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (!auth.currentUser) {
|
|
222
|
+
this.show({ code: 'pwa/signed-out', message: 'Sign in first.' });
|
|
223
|
+
return;
|
|
148
224
|
}
|
|
225
|
+
await this.updatePass(currentPassword, this.password);
|
|
149
226
|
}
|
|
150
227
|
}
|
|
151
228
|
__decorate([
|
|
152
229
|
state(),
|
|
153
230
|
__metadata("design:type", String)
|
|
154
231
|
], InputPassword.prototype, "message", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
state(),
|
|
234
|
+
__metadata("design:type", String)
|
|
235
|
+
], InputPassword.prototype, "tone", void 0);
|
|
155
236
|
__decorate([
|
|
156
237
|
state(),
|
|
157
238
|
__metadata("design:type", String)
|
|
@@ -160,5 +241,21 @@ __decorate([
|
|
|
160
241
|
state(),
|
|
161
242
|
__metadata("design:type", Boolean)
|
|
162
243
|
], InputPassword.prototype, "login", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
state(),
|
|
246
|
+
__metadata("design:type", Boolean)
|
|
247
|
+
], InputPassword.prototype, "busy", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
state(),
|
|
250
|
+
__metadata("design:type", Object)
|
|
251
|
+
], InputPassword.prototype, "showCurrent", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
state(),
|
|
254
|
+
__metadata("design:type", Object)
|
|
255
|
+
], InputPassword.prototype, "showNext", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
state(),
|
|
258
|
+
__metadata("design:type", Object)
|
|
259
|
+
], InputPassword.prototype, "showVerify", void 0);
|
|
163
260
|
customElements.define('input-password', InputPassword);
|
|
164
261
|
//# sourceMappingURL=password.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/password.ts"],"names":[],"mapp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C5B;IAAhB,KAAK,EAAE;;4CAAwC;AAC/B;IAAhB,KAAK,EAAE;;2CAAwC;AAC/B;IAAhB,KAAK,EAAE;;kDAA6B;AACpB;IAAhB,KAAK,EAAE;;+CAA0B;AACjB;IAAhB,KAAK,EAAE;;iDAA4B;AAmNtC,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement, CSSResultArray } from 'lit';
|
|
2
|
-
import { AppState } from '../../../store';
|
|
2
|
+
import { AppState } from '../../../store.js';
|
|
3
3
|
declare const ContactPhoto_base: (new (...args: any[]) => {
|
|
4
4
|
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
5
|
connectedCallback(): void;
|
|
@@ -19,9 +19,6 @@ declare const ContactPhoto_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,17 +35,21 @@ declare const ContactPhoto_base: (new (...args: any[]) => {
|
|
|
38
35
|
export declare class ContactPhoto extends ContactPhoto_base {
|
|
39
36
|
photo: string | void | any;
|
|
40
37
|
emptyArtwork: string;
|
|
41
|
-
private user;
|
|
42
38
|
private login;
|
|
39
|
+
private person;
|
|
40
|
+
private mail;
|
|
43
41
|
private progress;
|
|
44
42
|
private error;
|
|
45
43
|
private status;
|
|
44
|
+
private tone;
|
|
45
|
+
private busy;
|
|
46
46
|
constructor();
|
|
47
47
|
stateChanged(state: AppState): void;
|
|
48
48
|
static get styles(): CSSResultArray;
|
|
49
|
+
private letters;
|
|
49
50
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
51
|
+
private fail;
|
|
50
52
|
private saveImage;
|
|
51
|
-
private dispatchPhoto;
|
|
52
53
|
}
|
|
53
54
|
declare global {
|
|
54
55
|
interface HTMLElementTagNameMap {
|
|
@@ -56,3 +57,4 @@ declare global {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
export {};
|
|
60
|
+
//# sourceMappingURL=uploader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/uploader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAE,MAAQ,KAAK,CAAC;AAE9D,OAAO,EAAS,QAAQ,EAAE,MAAe,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAc7D,qBAAa,YAAa,SAAQ,iBAA0B;IAGvC,KAAK,EAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAM;IAGJ,YAAY,SAAM;IAEzD,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,IAAI,CAAM;IAElB,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,IAAI,CAAS;;IAO9B,YAAY,CAAC,KAAK,EAAE,QAAQ;IAO5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAkDjC;IAED,OAAO,CAAC,OAAO;IAIf,SAAS,CAAC,MAAM;IAgEhB,OAAO,CAAC,IAAI;IAUZ,OAAO,CAAC,SAAS,CAwEhB;CAEF;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
|