pwa-auth 3.5.1 → 3.6.0
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/README.md +8 -15
- package/base/firebase/google.d.ts +9 -0
- package/base/firebase/google.d.ts.map +1 -0
- package/base/firebase/google.js +56 -0
- package/base/firebase/google.js.map +1 -0
- package/base/firebase/interface.d.ts.map +1 -1
- package/base/firebase/interface.js +2 -0
- package/base/firebase/interface.js.map +1 -1
- package/base/firebase/message.d.ts.map +1 -1
- package/base/firebase/message.js +1 -0
- package/base/firebase/message.js.map +1 -1
- package/base/webcomponents/css/animation.d.ts +2 -0
- package/base/webcomponents/css/animation.d.ts.map +1 -1
- package/base/webcomponents/css/animation.js +83 -17
- package/base/webcomponents/css/animation.js.map +1 -1
- package/base/webcomponents/drawer/css/drawer.d.ts.map +1 -1
- package/base/webcomponents/drawer/css/drawer.js +0 -48
- package/base/webcomponents/drawer/css/drawer.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +1 -0
- package/base/webcomponents/drawer/drawer.d.ts.map +1 -1
- package/base/webcomponents/drawer/drawer.js +11 -3
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/form/css/button.d.ts.map +1 -1
- package/base/webcomponents/form/css/button.js +39 -0
- package/base/webcomponents/form/css/button.js.map +1 -1
- package/base/webcomponents/form/google-button.d.ts +3 -0
- package/base/webcomponents/form/google-button.d.ts.map +1 -0
- package/base/webcomponents/form/google-button.js +23 -0
- package/base/webcomponents/form/google-button.js.map +1 -0
- package/base/webcomponents/form/login.d.ts +5 -0
- package/base/webcomponents/form/login.d.ts.map +1 -1
- package/base/webcomponents/form/login.js +40 -0
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/signup.d.ts +5 -0
- package/base/webcomponents/form/signup.d.ts.map +1 -1
- package/base/webcomponents/form/signup.js +40 -0
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/login/css/auth.d.ts +2 -2
- package/base/webcomponents/login/css/auth.d.ts.map +1 -1
- package/base/webcomponents/login/css/auth.js +3 -9
- package/base/webcomponents/login/css/auth.js.map +1 -1
- package/base/webcomponents/login/page.d.ts +1 -0
- package/base/webcomponents/login/page.d.ts.map +1 -1
- package/base/webcomponents/login/page.js +9 -2
- package/base/webcomponents/login/page.js.map +1 -1
- package/docs/sliders.md +66 -0
- package/firebase.md +18 -0
- package/intro.md +1 -1
- package/package.json +2 -1
- package/source/pwa-auth.js +256 -183
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-button.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/form/google-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAa3C,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,cAAc,CAY/E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
const googleMark = html `
|
|
3
|
+
<svg class="g" viewBox="0 0 48 48" aria-hidden="true">
|
|
4
|
+
<path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"></path>
|
|
5
|
+
<path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"></path>
|
|
6
|
+
<path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"></path>
|
|
7
|
+
<path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"></path>
|
|
8
|
+
</svg>
|
|
9
|
+
`;
|
|
10
|
+
export function googleButton(busy, onClick) {
|
|
11
|
+
return html `
|
|
12
|
+
<button
|
|
13
|
+
type="button"
|
|
14
|
+
part="google"
|
|
15
|
+
class="google"
|
|
16
|
+
?disabled="${busy}"
|
|
17
|
+
@click="${onClick}">
|
|
18
|
+
${googleMark}
|
|
19
|
+
Continue with Google
|
|
20
|
+
</button>
|
|
21
|
+
`;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=google-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-button.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/google-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAG3C,MAAM,UAAU,GAAG,IAAI,CAAA;;;;;;;CAOtB,CAAC;AAGF,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,OAAmB;IAC7D,OAAO,IAAI,CAAA;;;;;mBAKM,IAAI;gBACP,OAAO;QACf,UAAU;;;GAGf,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
export declare class FormLogin extends LitElement {
|
|
3
3
|
source: string;
|
|
4
|
+
hideGoogle: boolean;
|
|
4
5
|
private email;
|
|
5
6
|
private password;
|
|
6
7
|
private status;
|
|
@@ -9,9 +10,13 @@ export declare class FormLogin extends LitElement {
|
|
|
9
10
|
private resetBusy;
|
|
10
11
|
private showPassword;
|
|
11
12
|
constructor();
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
protected updated(): void;
|
|
15
|
+
private adoptRedirect;
|
|
12
16
|
static get styles(): import("lit").CSSResult[];
|
|
13
17
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
14
18
|
private change;
|
|
19
|
+
private google;
|
|
15
20
|
private show;
|
|
16
21
|
private handleEmail;
|
|
17
22
|
private handlePassword;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/form/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAA8B,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/form/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAA8B,KAAK,CAAC;AAkCrC,qBACa,SAAU,SAAQ,UAAU;IAEN,MAAM,SAAW;IAGyB,UAAU,UAAS;IACrF,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,YAAY,CAAS;;IAI7B,iBAAiB,IAAI,IAAI;IAKlC,SAAS,CAAC,OAAO,IAAI,IAAI;IAIzB,OAAO,CAAC,aAAa;IAOrB,MAAM,KAAK,MAAM,8BAsBd;IAEH,SAAS,CAAC,MAAM;IAiGhB,OAAO,CAAC,MAAM;YAIA,MAAM;IAcpB,OAAO,CAAC,IAAI;IAOZ,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,aAAa;YAMP,KAAK;IAgBnB,OAAO,CAAC,MAAM,CAgBb;IAGD,OAAO,CAAC,MAAM,CA+Bb;IAED,OAAO,CAAC,IAAI;CAMb;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,YAAY,EAAE,SAAS,CAAC;KAC3B;CACF"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { html, LitElement, css } from 'lit';
|
|
11
11
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
12
|
import { sendPasswordResetEmail, signInWithEmailAndPassword } from 'firebase/auth';
|
|
13
|
+
import { signInWithGoogle, takeGoogleNotice } from '../../firebase/google.js';
|
|
13
14
|
import { auth } from '../../firebase/authentication.js';
|
|
14
15
|
import { pwaAuthError, pwaLogin, pwaResetSent } from '../../events/names.js';
|
|
15
16
|
import { emitWindow, toAuthError, toPwaUser } from '../../events/emit.js';
|
|
@@ -22,6 +23,7 @@ import { toggleStyle } from './css/toggle.js';
|
|
|
22
23
|
import { statusStyle, liveStatus } from './css/status.js';
|
|
23
24
|
import { tapStyle } from '../css/tap.js';
|
|
24
25
|
import { revealControl } from './reveal.js';
|
|
26
|
+
import { googleButton } from './google-button.js';
|
|
25
27
|
import store from '../../store.js';
|
|
26
28
|
import { universalToggle } from '../../redux/frontend.js';
|
|
27
29
|
import { rememberEmail } from './draft.js';
|
|
@@ -30,6 +32,7 @@ let FormLogin = class FormLogin extends LitElement {
|
|
|
30
32
|
constructor() {
|
|
31
33
|
super();
|
|
32
34
|
this.source = '';
|
|
35
|
+
this.hideGoogle = false;
|
|
33
36
|
this.email = '';
|
|
34
37
|
this.password = '';
|
|
35
38
|
this.status = '';
|
|
@@ -85,6 +88,21 @@ let FormLogin = class FormLogin extends LitElement {
|
|
|
85
88
|
}
|
|
86
89
|
};
|
|
87
90
|
}
|
|
91
|
+
connectedCallback() {
|
|
92
|
+
super.connectedCallback();
|
|
93
|
+
this.adoptRedirect();
|
|
94
|
+
}
|
|
95
|
+
updated() {
|
|
96
|
+
this.adoptRedirect();
|
|
97
|
+
}
|
|
98
|
+
adoptRedirect() {
|
|
99
|
+
if (!this.classList.contains('opened'))
|
|
100
|
+
return;
|
|
101
|
+
const pending = takeGoogleNotice();
|
|
102
|
+
if (!pending)
|
|
103
|
+
return;
|
|
104
|
+
this.show(pending);
|
|
105
|
+
}
|
|
88
106
|
static get styles() {
|
|
89
107
|
return [
|
|
90
108
|
listStyle,
|
|
@@ -177,6 +195,8 @@ let FormLogin = class FormLogin extends LitElement {
|
|
|
177
195
|
|
|
178
196
|
${liveStatus(statusId, this.status, this.tone)}
|
|
179
197
|
|
|
198
|
+
${this.hideGoogle ? '' : googleButton(this.busy || this.resetBusy, () => { void this.google(); })}
|
|
199
|
+
|
|
180
200
|
<button
|
|
181
201
|
type= "submit"
|
|
182
202
|
part= "submit"
|
|
@@ -208,6 +228,22 @@ let FormLogin = class FormLogin extends LitElement {
|
|
|
208
228
|
change() {
|
|
209
229
|
store.dispatch(universalToggle(this.source));
|
|
210
230
|
}
|
|
231
|
+
async google() {
|
|
232
|
+
if (this.busy || this.resetBusy)
|
|
233
|
+
return;
|
|
234
|
+
this.busy = true;
|
|
235
|
+
this.tone = '';
|
|
236
|
+
this.status = '';
|
|
237
|
+
try {
|
|
238
|
+
await signInWithGoogle();
|
|
239
|
+
}
|
|
240
|
+
catch (error) {
|
|
241
|
+
this.show(toAuthError(error));
|
|
242
|
+
}
|
|
243
|
+
finally {
|
|
244
|
+
this.busy = false;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
211
247
|
show(detail, error = true) {
|
|
212
248
|
this.tone = error ? 'error' : '';
|
|
213
249
|
this.status = userMessage(detail);
|
|
@@ -258,6 +294,10 @@ __decorate([
|
|
|
258
294
|
property({ type: String }),
|
|
259
295
|
__metadata("design:type", Object)
|
|
260
296
|
], FormLogin.prototype, "source", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
property({ type: Boolean, attribute: 'hide-google', reflect: true }),
|
|
299
|
+
__metadata("design:type", Object)
|
|
300
|
+
], FormLogin.prototype, "hideGoogle", void 0);
|
|
261
301
|
__decorate([
|
|
262
302
|
state(),
|
|
263
303
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/login.ts"],"names":[],"mappings":";;;;;;;;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AAE;;2CAA2B;AAClB;IAAhB,KAAK,EAAE;;yCAA2B;AAClB;IAAhB,KAAK,EAAE;;uCAA2B;AAClB;IAAhB,KAAK,EAAE;;uCAA8B;AACrB;IAAhB,KAAK,EAAE;;4CAA8B;AACrB;IAAhB,KAAK,EAAE;;+CAA8B;AAZ3B,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;;GACf,SAAS,CAwRrB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
export declare class FormSignup extends LitElement {
|
|
3
3
|
source: string;
|
|
4
|
+
hideGoogle: boolean;
|
|
4
5
|
private email;
|
|
5
6
|
private password;
|
|
6
7
|
private status;
|
|
@@ -9,9 +10,13 @@ export declare class FormSignup extends LitElement {
|
|
|
9
10
|
private showPassword;
|
|
10
11
|
private notice;
|
|
11
12
|
constructor();
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
protected updated(): void;
|
|
15
|
+
private adoptRedirect;
|
|
12
16
|
static get styles(): import("lit").CSSResult[];
|
|
13
17
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
14
18
|
private change;
|
|
19
|
+
private google;
|
|
15
20
|
private show;
|
|
16
21
|
private readFields;
|
|
17
22
|
private _handleSubmit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/form/signup.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAA8B,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/form/signup.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAA8B,KAAK,CAAC;AAwCrC,qBACa,UAAW,SAAQ,UAAU;IAGP,MAAM,SAAa;IAGuB,UAAU,UAAS;IACrF,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,MAAM,CAAY;;IAI1B,iBAAiB,IAAI,IAAI;IAKlC,SAAS,CAAC,OAAO,IAAI,IAAI;IAIzB,OAAO,CAAC,aAAa;IAOrB,MAAM,KAAK,MAAM,8BAuBd;IAEH,SAAS,CAAC,MAAM;IAmGhB,OAAO,CAAC,MAAM;YAIA,MAAM;IAcpB,OAAO,CAAC,IAAI;IAOZ,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,cAAc;YAMR,MAAM;IAgBpB,OAAO,CAAC,UAAU,CAgCjB;CAEF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,aAAa,EAAE,UAAU,CAAC;KAC7B;CACF"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { css, html, LitElement } from 'lit';
|
|
11
11
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
12
|
import { createUserWithEmailAndPassword } from 'firebase/auth';
|
|
13
|
+
import { signInWithGoogle, takeGoogleNotice } from '../../firebase/google.js';
|
|
13
14
|
import { auth } from '../../firebase/authentication.js';
|
|
14
15
|
import { logAccount } from '../../firebase/interface.js';
|
|
15
16
|
import { sendVerification } from '../../api/verify.js';
|
|
@@ -26,6 +27,7 @@ import { statusStyle, liveStatus } from './css/status.js';
|
|
|
26
27
|
import { noticeStyle } from './css/notice.js';
|
|
27
28
|
import { tapStyle } from '../css/tap.js';
|
|
28
29
|
import { revealControl } from './reveal.js';
|
|
30
|
+
import { googleButton } from './google-button.js';
|
|
29
31
|
import { markVerificationNotice } from './notice.js';
|
|
30
32
|
import store from '../../store.js';
|
|
31
33
|
import { universalToggle } from '../../redux/frontend.js';
|
|
@@ -34,6 +36,7 @@ let FormSignup = class FormSignup extends LitElement {
|
|
|
34
36
|
constructor() {
|
|
35
37
|
super();
|
|
36
38
|
this.source = '';
|
|
39
|
+
this.hideGoogle = false;
|
|
37
40
|
this.email = '';
|
|
38
41
|
this.password = '';
|
|
39
42
|
this.status = '';
|
|
@@ -69,6 +72,21 @@ let FormSignup = class FormSignup extends LitElement {
|
|
|
69
72
|
}
|
|
70
73
|
};
|
|
71
74
|
}
|
|
75
|
+
connectedCallback() {
|
|
76
|
+
super.connectedCallback();
|
|
77
|
+
this.adoptRedirect();
|
|
78
|
+
}
|
|
79
|
+
updated() {
|
|
80
|
+
this.adoptRedirect();
|
|
81
|
+
}
|
|
82
|
+
adoptRedirect() {
|
|
83
|
+
if (!this.classList.contains('opened'))
|
|
84
|
+
return;
|
|
85
|
+
const pending = takeGoogleNotice();
|
|
86
|
+
if (!pending)
|
|
87
|
+
return;
|
|
88
|
+
this.show(pending);
|
|
89
|
+
}
|
|
72
90
|
static get styles() {
|
|
73
91
|
return [
|
|
74
92
|
listStyle,
|
|
@@ -167,6 +185,8 @@ let FormSignup = class FormSignup extends LitElement {
|
|
|
167
185
|
|
|
168
186
|
${liveStatus(statusId, this.status, this.tone)}
|
|
169
187
|
|
|
188
|
+
${this.hideGoogle ? '' : googleButton(this.busy, () => { void this.google(); })}
|
|
189
|
+
|
|
170
190
|
<button
|
|
171
191
|
type= "submit"
|
|
172
192
|
part= "submit"
|
|
@@ -195,6 +215,22 @@ let FormSignup = class FormSignup extends LitElement {
|
|
|
195
215
|
change() {
|
|
196
216
|
store.dispatch(universalToggle(this.source));
|
|
197
217
|
}
|
|
218
|
+
async google() {
|
|
219
|
+
if (this.busy)
|
|
220
|
+
return;
|
|
221
|
+
this.busy = true;
|
|
222
|
+
this.tone = '';
|
|
223
|
+
this.status = '';
|
|
224
|
+
try {
|
|
225
|
+
await signInWithGoogle();
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
this.show(toAuthError(error));
|
|
229
|
+
}
|
|
230
|
+
finally {
|
|
231
|
+
this.busy = false;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
198
234
|
show(detail) {
|
|
199
235
|
this.tone = 'error';
|
|
200
236
|
this.status = userMessage(detail);
|
|
@@ -238,6 +274,10 @@ __decorate([
|
|
|
238
274
|
property({ type: String }),
|
|
239
275
|
__metadata("design:type", Object)
|
|
240
276
|
], FormSignup.prototype, "source", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
property({ type: Boolean, attribute: 'hide-google', reflect: true }),
|
|
279
|
+
__metadata("design:type", Object)
|
|
280
|
+
], FormSignup.prototype, "hideGoogle", void 0);
|
|
241
281
|
__decorate([
|
|
242
282
|
state(),
|
|
243
283
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/signup.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EACX,MAA8B,KAAK,CAAC;AAErC,OAAO,EACL,aAAa,EACb,QAAQ,EACR,KAAK,EACN,MAA8B,mBAAmB,CAAC;AAEnD,OAAO,EACL,8BAA8B,EAC/B,MAA8B,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/signup.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EACX,MAA8B,KAAK,CAAC;AAErC,OAAO,EACL,aAAa,EACb,QAAQ,EACR,KAAK,EACN,MAA8B,mBAAmB,CAAC;AAEnD,OAAO,EACL,8BAA8B,EAC/B,MAA8B,eAAe,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAgB,kCAAkC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAU,6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up;
|
|
3
3
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../typescript/webcomponents/login/css/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../typescript/webcomponents/login/css/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C,eAAO,MAAM,UAAU,EAAE,cA8BvB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
import { hostCollapse } from "../../css/animation.js";
|
|
3
|
+
export const authStyles = [hostCollapse, css `
|
|
3
4
|
|
|
4
5
|
:host {
|
|
5
|
-
transition: max-height 1.4s ease-out;
|
|
6
6
|
overflow: hidden;
|
|
7
7
|
display: grid;
|
|
8
8
|
}
|
|
@@ -22,12 +22,6 @@ export const authStyles = css `
|
|
|
22
22
|
background-color: var(--section_background_color, #fffdf8);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
:host([animation]) {
|
|
26
|
-
transition-duration: 1.4s;
|
|
27
|
-
max-height: 100%;
|
|
28
|
-
transition: max-height 1.4s ease-out;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
25
|
h3 {
|
|
32
26
|
margin: 0;
|
|
33
27
|
padding: 18px 16px 14px;
|
|
@@ -36,5 +30,5 @@ export const authStyles = css `
|
|
|
36
30
|
border-bottom: 1px solid var(--pwa_line_color, #e3daca);
|
|
37
31
|
}
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
`];
|
|
40
34
|
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/login/css/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/login/css/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAmB,CAAC,YAAY,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B3D,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/login/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,gBAAgB,CAAC;AASpE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAO3B,qBACa,SAAU,SAAQ,cAA0B;IAGU,SAAS,UAAS;
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/login/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,gBAAgB,CAAC;AASpE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAO3B,qBACa,SAAU,SAAQ,cAA0B;IAGU,SAAS,UAAS;IAGR,UAAU,UAAS;IAErF,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,OAAO,CAAW;IAC1B,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,KAAK,CAAgB;IAEtC,OAAO,CAAC,UAAU,CAA6B;;IAItC,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAMrC,YAAY,CAAC,KAAK,EAAE,QAAQ;IAU5B,MAAM,KAAK,MAAM,IAAI,cAAc,CAQhC;IAEH,SAAS,CAAC,MAAM;CAwDjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,YAAY,EAAE,SAAS,CAAC;KAC3B;CACF"}
|
|
@@ -27,6 +27,7 @@ let UserLogin = class UserLogin extends connect(store)(LitElement) {
|
|
|
27
27
|
constructor() {
|
|
28
28
|
super();
|
|
29
29
|
this.subscribe = false;
|
|
30
|
+
this.hideGoogle = false;
|
|
30
31
|
this._name = "";
|
|
31
32
|
this._email = "";
|
|
32
33
|
this._verified = false;
|
|
@@ -85,14 +86,16 @@ let UserLogin = class UserLogin extends connect(store)(LitElement) {
|
|
|
85
86
|
<!-- Required - subscribe chooses the open form -->
|
|
86
87
|
<form-login
|
|
87
88
|
source= "page"
|
|
88
|
-
|
|
89
|
+
?hide-google= "${this.hideGoogle}"
|
|
90
|
+
exportparts= "email: login-email, password: login-password, submit: login-submit, switch: login-switch, forgot: login-forgot, status: login-status, reveal: login-reveal, google: login-google"
|
|
89
91
|
?inert= "${this._sign !== this.subscribe}"
|
|
90
92
|
class= "content ${this._sign === this.subscribe ? 'opened' : 'closed'} "></form-login>
|
|
91
93
|
|
|
92
94
|
<!-- Sign-up State -->
|
|
93
95
|
<form-signup
|
|
94
96
|
source= "page"
|
|
95
|
-
|
|
97
|
+
?hide-google= "${this.hideGoogle}"
|
|
98
|
+
exportparts= "email: signup-email, password: signup-password, submit: signup-submit, switch: signup-switch, status: signup-status, reveal: signup-reveal, notice: signup-notice, google: signup-google"
|
|
96
99
|
?inert= "${this._sign === this.subscribe}"
|
|
97
100
|
class= "content ${!this._sign === this.subscribe ? 'opened' : 'closed'}"></form-signup>
|
|
98
101
|
|
|
@@ -123,6 +126,10 @@ __decorate([
|
|
|
123
126
|
property({ type: Boolean, attribute: true, reflect: true }),
|
|
124
127
|
__metadata("design:type", Object)
|
|
125
128
|
], UserLogin.prototype, "subscribe", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ type: Boolean, attribute: 'hide-google', reflect: true }),
|
|
131
|
+
__metadata("design:type", Object)
|
|
132
|
+
], UserLogin.prototype, "hideGoogle", void 0);
|
|
126
133
|
__decorate([
|
|
127
134
|
state(),
|
|
128
135
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../typescript/webcomponents/login/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,UAAU,EAAE,MAAQ,KAAK,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAU,mBAAmB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAiC,8BAA8B,CAAC;AAClF,OAAO,EAAE,KAAK,EAAY,MAAyB,gBAAgB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAQ,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAS,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAS,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAS,qBAAqB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAS,qBAAqB,CAAC;AAEnD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAA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KAAK,EAAE;;uCAA8B;AACrB;IAAhB,KAAK,EAAE;;wCAA8B;AAb3B,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;;GACf,SAAS,CA4GrB"}
|
package/docs/sliders.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Slides
|
|
2
|
+
|
|
3
|
+
The slide is one module: `typescript/webcomponents/css/animation.ts`. `user-drawer`, `user-login`, and `user-settings` import it.
|
|
4
|
+
|
|
5
|
+
Three parts.
|
|
6
|
+
|
|
7
|
+
- The container carries `max-height`.
|
|
8
|
+
- The moving child carries `transform`.
|
|
9
|
+
- Closed content runs both. Class `closed` translates `translate3d(0, -102%, 0)` and plays `slide-out`, which animates `max-height`.
|
|
10
|
+
|
|
11
|
+
## How it works
|
|
12
|
+
|
|
13
|
+
The slide is two motions that run together. The container's `max-height` grows or shrinks the space. The child's `transform` slides the panel into that space. `inner` clips, so it looks like it comes from behind an edge.
|
|
14
|
+
|
|
15
|
+
On close, visibility is held for `1.4s`, so the panel does not vanish before the motion ends.
|
|
16
|
+
|
|
17
|
+
Closed content translates to `-102%` and runs `slide-out`, so height and position change together.
|
|
18
|
+
|
|
19
|
+
If either motion loses its timing, they fall out of step and the slide snaps.
|
|
20
|
+
|
|
21
|
+
## Elements
|
|
22
|
+
|
|
23
|
+
On the drawer, inside `.userDrawer`:
|
|
24
|
+
|
|
25
|
+
`spec` → `wrapper` → `inner` → `content`
|
|
26
|
+
|
|
27
|
+
`wrapper` does not transition. `inner` clips the slide.
|
|
28
|
+
|
|
29
|
+
| Piece | Element | What moves |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Shell | `:host`, and `.userDrawer` with `in` / `out` | `max-height` |
|
|
32
|
+
| Sheet | `.spec` with `spec-in` / `spec-out` | `transform` |
|
|
33
|
+
| Forms and settings panels | `.content` with `opened` / `closed` | `transform`, and `slide-out` on `closed` |
|
|
34
|
+
|
|
35
|
+
Page login uses `spec` / `wrapper` / `inner` / `content` for the form swap. It has no collapsing shell. The four settings panels (`profile`, `verification`, `password`, `delete`) are `.content` inside `wrapper` / `inner`. They have no `.spec`.
|
|
36
|
+
|
|
37
|
+
`user-login` host uses the same max-height timing as the drawer shell. Nothing sets the `animation` attribute, so that host does not collapse.
|
|
38
|
+
|
|
39
|
+
## Triggers
|
|
40
|
+
|
|
41
|
+
- Attribute `drawer` on `user-drawer`. Classes `in` and `out` on `.userDrawer`. That opens and closes the shell.
|
|
42
|
+
- Classes `spec-in` and `spec-out` on `.spec`. Same flag. The sheet moves.
|
|
43
|
+
- Classes `opened` and `closed` on `.content`. Drawer and page forms follow sign-in versus sign-up. Settings panels follow the tab.
|
|
44
|
+
- Attribute `on` on `.spec` is `display`. It is not a slide.
|
|
45
|
+
- Attribute `animation` on `user-login` would open the host `max-height`. It is not set.
|
|
46
|
+
|
|
47
|
+
## Timings
|
|
48
|
+
|
|
49
|
+
Durations are literals. The shell beat is `1.4s`. Leave it there.
|
|
50
|
+
|
|
51
|
+
| Piece | Duration | Easing |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| Host and `.in` / `.out` `max-height` | `1.4s` | `ease-in-out` |
|
|
54
|
+
| `.in` visibility delay | `1.4s` | `linear` |
|
|
55
|
+
| `.spec-out` transform, open | `2.2s` | `ease` |
|
|
56
|
+
| `.spec-in` transform, close | `1.5s` | `ease` |
|
|
57
|
+
| `.content` transform | `2s` | `ease-in-out` |
|
|
58
|
+
| `slide-out` on `.closed` | `2s` | `ease-out` |
|
|
59
|
+
|
|
60
|
+
The sheet moves from `translate3d(0, -100%, 0)` to `translate3d(0, 0, 0)`. Opening was measured at `2.2s` (`.spec-out`). Closing uses `.spec-in` at `1.5s`.
|
|
61
|
+
|
|
62
|
+
No slide timing is a custom property. Hosts do not set one.
|
|
63
|
+
|
|
64
|
+
## Reduced motion
|
|
65
|
+
|
|
66
|
+
`prefers-reduced-motion: reduce` sets `transition-duration` and `animation-duration` to `0s` on the shell, the sheet, and `.content`. Only inside that media query. It does not go through a custom property.
|
package/firebase.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## Project
|
|
4
4
|
|
|
5
5
|
- Firebase Authentication with email and password
|
|
6
|
+
- Google sign-in, if you leave Continue with Google on (the default)
|
|
6
7
|
- Cloud Storage bucket
|
|
7
8
|
- Google Analytics, if you call `logAccount` or `logAccountDelete`
|
|
8
9
|
|
|
@@ -98,6 +99,23 @@ Firebase Auth's own minimum is 6 characters. Sign-up and a password change in `<
|
|
|
98
99
|
|
|
99
100
|
In the Firebase console, open Authentication and turn on the password policy. Set the minimum to 8 so the server uses the same rule. This package does not change that policy.
|
|
100
101
|
|
|
102
|
+
## Google sign-in
|
|
103
|
+
|
|
104
|
+
Continue with Google uses Firebase `signInWithPopup`. A blocked popup, or a phone, uses `signInWithRedirect`. The first success creates the Firebase user.
|
|
105
|
+
|
|
106
|
+
On [pwa-authentic.firebaseapp.com](https://pwa-authentic.firebaseapp.com) the redirect works, because that host is Firebase Hosting and `authDomain` is the same site. A host on another domain should keep the popup. Redirect there needs the [Firebase redirect guidance](https://firebase.google.com/docs/auth/web/redirect-best-practices): `authDomain` must be that site, or the sign-in must be proxied through Firebase Hosting. Browsers block the third-party storage the redirect handler uses.
|
|
107
|
+
|
|
108
|
+
Enable Google in the Firebase console:
|
|
109
|
+
|
|
110
|
+
1. Open the project. Go to Build, Authentication.
|
|
111
|
+
2. Open Sign-in method.
|
|
112
|
+
3. Choose Google. Turn on Enable.
|
|
113
|
+
4. Set a public-facing support email. Save.
|
|
114
|
+
5. Open Settings, then Authorized domains.
|
|
115
|
+
6. `localhost` and your `firebaseapp.com` / `web.app` domains are already there. Add every other domain that embeds the component. Save.
|
|
116
|
+
|
|
117
|
+
`hide-google` on `<user-login>` or `<user-drawer>` removes the button.
|
|
118
|
+
|
|
101
119
|
## Emulators
|
|
102
120
|
|
|
103
121
|
```bash
|
package/intro.md
CHANGED
|
@@ -8,7 +8,7 @@ pwa-auth is the sign-in for your website. It stays on your site, in your own loo
|
|
|
8
8
|
|
|
9
9
|
Your visitors see a button. Before they sign in it says Login, or Subscribe if you prefer that word. After they sign in it shows their photo.
|
|
10
10
|
|
|
11
|
-
A panel drops down from the top. They can create an account or sign in. Once they are in, they see their name, a link to their settings, and a way to log out.
|
|
11
|
+
A panel drops down from the top. They can create an account or sign in, or continue with Google in one click. Once they are in, they see their name, a link to their settings, and a way to log out.
|
|
12
12
|
|
|
13
13
|
In settings they can change their photo, name, email, and password, or delete the account. Creating an account sends a verification email. They can still sign in before they open that email.
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://www.jackspublishing.com",
|
|
7
7
|
"email": "jack.solutionbox@gmail.com"
|
|
8
8
|
},
|
|
9
|
-
"version": "3.
|
|
9
|
+
"version": "3.6.0",
|
|
10
10
|
"description": "Five elements: user-icon, user-drawer, user-login, user-settings, and email-reset. pwa- events, a small API, and --pwa_ theme variables.",
|
|
11
11
|
"homepage": "https://pwa-authentic.firebaseapp.com",
|
|
12
12
|
"repository": {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"README.md",
|
|
57
57
|
"intro.md",
|
|
58
58
|
"firebase.md",
|
|
59
|
+
"docs/sliders.md",
|
|
59
60
|
"license",
|
|
60
61
|
"LICENSES.txt"
|
|
61
62
|
],
|