pwa-auth 2.0.7 → 3.0.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/CHANGELOG.md +15 -0
- package/README.md +65 -54
- package/demonstration/compiled/pwa-auth.js +880 -0
- package/{website → demonstration}/css/styles.css +4 -2
- package/{demo → demonstration}/index.html +7 -4
- package/package.json +12 -10
- package/pwa-auth.js +4 -3
- package/{website → src}/THIRD_PARTY_LICENSES.txt +56 -56
- package/src/compiled/pwa-auth.js +880 -0
- package/{source → src-typescript}/css/form/label.ts +0 -2
- 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 +1 -1
- 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 +2 -1
- package/{source/custom-elements → src-typescript/webcomponents}/settings/settings.ts +2 -2
- package/demo/css/styles.css +0 -67
- 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 -24
- 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 -224
- 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/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 -72
- 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}/images/empty.jpg +0 -0
- /package/{npm/images → 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/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,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 };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class UserSignUp 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 _handleSubmit;
|
|
10
|
-
private handleEmail;
|
|
11
|
-
private handlePassword;
|
|
12
|
-
private signUp;
|
|
13
|
-
private newAccount;
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
'user-sign-up': UserSignUp;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=sign-up.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/drawer/input/sign-up.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAe,KAAK,CAAC;AAerD,qBACa,UAAW,SAAQ,UAAU;IAE/B,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,QAAQ,CAAU;;IAInC,MAAM,KAAK,MAAM,8BAcd;IAEH,SAAS,CAAC,MAAM;IAmDhB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,MAAM;IAOd,OAAO,CAAC,UAAU,CAiBjB;CAeF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,cAAc,EAAE,UAAU,CAAC;KAC9B;CACF"}
|
|
@@ -1,137 +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 { css, html, LitElement } from 'lit';
|
|
8
|
-
import { customElement, state } from 'lit/decorators.js';
|
|
9
|
-
import { createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
|
|
10
|
-
import { auth, logAccount } 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 UserSignUp = class UserSignUp extends LitElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super();
|
|
21
|
-
this.email = '';
|
|
22
|
-
this.password = '';
|
|
23
|
-
this.newAccount = async (email, password) => {
|
|
24
|
-
await createUserWithEmailAndPassword(auth, email, password)
|
|
25
|
-
.then((userCredential) => {
|
|
26
|
-
const user = userCredential.user;
|
|
27
|
-
sendEmailVerification(user)
|
|
28
|
-
.then(() => {
|
|
29
|
-
console.log("Verification email sent.");
|
|
30
|
-
});
|
|
31
|
-
}).then(() => { logAccount(); });
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
static get styles() {
|
|
35
|
-
return [
|
|
36
|
-
listStyle,
|
|
37
|
-
labelStyle,
|
|
38
|
-
inputStyle,
|
|
39
|
-
buttonStyle,
|
|
40
|
-
toggleStyle,
|
|
41
|
-
css `
|
|
42
|
-
|
|
43
|
-
.double {
|
|
44
|
-
display: grid;
|
|
45
|
-
grid-template-columns: 1fr auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
`
|
|
49
|
-
];
|
|
50
|
-
}
|
|
51
|
-
;
|
|
52
|
-
render() {
|
|
53
|
-
return html `
|
|
54
|
-
|
|
55
|
-
<!-- Sign Up State-->
|
|
56
|
-
<form
|
|
57
|
-
@submit=${this._handleSubmit}
|
|
58
|
-
autocomplete="on">
|
|
59
|
-
|
|
60
|
-
<ul>
|
|
61
|
-
|
|
62
|
-
<li>
|
|
63
|
-
<label for="pwa-signup-email">Email</label>
|
|
64
|
-
<input
|
|
65
|
-
id="pwa-signup-email"
|
|
66
|
-
type="email"
|
|
67
|
-
@change="${this.handleEmail}">
|
|
68
|
-
</li>
|
|
69
|
-
|
|
70
|
-
<!-- <label><input id="verifyEmail" type="email" >Verify Email</label> -->
|
|
71
|
-
|
|
72
|
-
<li>
|
|
73
|
-
<label for="pwa-signup-pass">Password</label>
|
|
74
|
-
<input
|
|
75
|
-
id="pwa-signup-pass"
|
|
76
|
-
type="password"
|
|
77
|
-
@change="${this.handlePassword}">
|
|
78
|
-
</li>
|
|
79
|
-
|
|
80
|
-
<li>
|
|
81
|
-
<button
|
|
82
|
-
class="newUser action-button"
|
|
83
|
-
@click="${this.signUp}">Sign up</button>
|
|
84
|
-
</li>
|
|
85
|
-
|
|
86
|
-
<!-- <label><input id="veriftPassword" type="password" >Verify Password</label> -->
|
|
87
|
-
|
|
88
|
-
<!-- Change State -->
|
|
89
|
-
<li>
|
|
90
|
-
<p class="divider">Or</p>
|
|
91
|
-
<button
|
|
92
|
-
class="new"
|
|
93
|
-
@click="${this.change}">login with existing email</button>
|
|
94
|
-
</li>
|
|
95
|
-
|
|
96
|
-
</ul>
|
|
97
|
-
|
|
98
|
-
</form>
|
|
99
|
-
|
|
100
|
-
`;
|
|
101
|
-
}
|
|
102
|
-
change() {
|
|
103
|
-
store.dispatch(signUpAction());
|
|
104
|
-
}
|
|
105
|
-
_handleSubmit(event) {
|
|
106
|
-
event.preventDefault();
|
|
107
|
-
}
|
|
108
|
-
handleEmail(event) {
|
|
109
|
-
const input = event.target;
|
|
110
|
-
this.email = input.value;
|
|
111
|
-
}
|
|
112
|
-
handlePassword(event) {
|
|
113
|
-
const input = event.target;
|
|
114
|
-
this.password = input.value;
|
|
115
|
-
}
|
|
116
|
-
signUp() {
|
|
117
|
-
if (this.email.length < 4) {
|
|
118
|
-
alert('Please enter an email address.');
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
if (this.password.length < 4) {
|
|
122
|
-
alert('Please enter a password.');
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
this.newAccount(this.email, this.password);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
__decorate([
|
|
129
|
-
state()
|
|
130
|
-
], UserSignUp.prototype, "email", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
state()
|
|
133
|
-
], UserSignUp.prototype, "password", void 0);
|
|
134
|
-
UserSignUp = __decorate([
|
|
135
|
-
customElement('user-sign-up')
|
|
136
|
-
], UserSignUp);
|
|
137
|
-
export { UserSignUp };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/icon/css/icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBAyDtB,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CSSResultArray, LitElement } from 'lit';
|
|
2
|
-
import { AppState } from '../../store';
|
|
3
|
-
declare const UserIcon_base: (new (...args: any[]) => {
|
|
4
|
-
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
|
-
connectedCallback(): void;
|
|
6
|
-
disconnectedCallback(): void;
|
|
7
|
-
stateChanged(_state: {
|
|
8
|
-
frontend: import("../../redux/object").frontendAuth;
|
|
9
|
-
drawer: {
|
|
10
|
-
drawer: boolean;
|
|
11
|
-
};
|
|
12
|
-
backend: import("../../redux/object").backendAuth;
|
|
13
|
-
}): void;
|
|
14
|
-
readonly isConnected: boolean;
|
|
15
|
-
}) & typeof LitElement;
|
|
16
|
-
export declare class UserIcon extends UserIcon_base {
|
|
17
|
-
subscribe: boolean;
|
|
18
|
-
emptyArtwork: string;
|
|
19
|
-
private _user;
|
|
20
|
-
private _photoURL;
|
|
21
|
-
constructor();
|
|
22
|
-
protected firstUpdated(): void;
|
|
23
|
-
stateChanged(state: AppState): void;
|
|
24
|
-
static get styles(): CSSResultArray;
|
|
25
|
-
protected render(): import("lit-html").TemplateResult<1>;
|
|
26
|
-
}
|
|
27
|
-
declare global {
|
|
28
|
-
interface HTMLElementTagNameMap {
|
|
29
|
-
'user-icon': UserIcon;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;;;;;;;;;;;;;;AAKjE,qBACa,QAAS,SAAQ,aAA0B;IAGL,SAAS,UAAS;IAGnB,YAAY,SAAM;IAEzD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAM;;IAKhC,SAAS,CAAC,YAAY;IAOtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAM5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAA0B;IAE5D,SAAS,CAAC,MAAM;CAyBjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACF"}
|
|
@@ -1,72 +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.js';
|
|
10
|
-
import { store } from '../../store';
|
|
11
|
-
import { iconStyles } from './css/icon';
|
|
12
|
-
import { toggleSign } from '../../redux/frontend';
|
|
13
|
-
let UserIcon = class UserIcon extends connect(store)(LitElement) {
|
|
14
|
-
constructor() {
|
|
15
|
-
super();
|
|
16
|
-
this.subscribe = false;
|
|
17
|
-
this.emptyArtwork = '';
|
|
18
|
-
this._user = false;
|
|
19
|
-
this._photoURL = '';
|
|
20
|
-
}
|
|
21
|
-
firstUpdated() {
|
|
22
|
-
this.shadowRoot.querySelector('.toggles').addEventListener('click', () => {
|
|
23
|
-
store.dispatch(toggleSign());
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
stateChanged(state) {
|
|
27
|
-
this._user = state.frontend.login;
|
|
28
|
-
this._photoURL = state.backend.photoURL;
|
|
29
|
-
}
|
|
30
|
-
static get styles() { return [iconStyles]; }
|
|
31
|
-
render() {
|
|
32
|
-
return html `
|
|
33
|
-
|
|
34
|
-
<!-- two classes: icon / login -->
|
|
35
|
-
<button
|
|
36
|
-
class="${this._user ? 'icon' : 'login'} toggles"
|
|
37
|
-
aria-label="login">
|
|
38
|
-
|
|
39
|
-
${this._user ? html `
|
|
40
|
-
<!-- <div
|
|
41
|
-
class = "iconArea"> -->
|
|
42
|
-
<input
|
|
43
|
-
type = "image"
|
|
44
|
-
class = "userImage"
|
|
45
|
-
alt = "Login"
|
|
46
|
-
height = "38px"
|
|
47
|
-
width = "38px"
|
|
48
|
-
src = "${this._photoURL ? this._photoURL : this.emptyArtwork}">
|
|
49
|
-
<!-- </div> -->
|
|
50
|
-
` : this.subscribe ? 'Subscribe' : 'Login'}
|
|
51
|
-
|
|
52
|
-
</button>
|
|
53
|
-
|
|
54
|
-
`;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
__decorate([
|
|
58
|
-
property({ type: Boolean, reflect: true })
|
|
59
|
-
], UserIcon.prototype, "subscribe", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
property({ type: String, reflect: true })
|
|
62
|
-
], UserIcon.prototype, "emptyArtwork", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
state()
|
|
65
|
-
], UserIcon.prototype, "_user", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
state()
|
|
68
|
-
], UserIcon.prototype, "_photoURL", void 0);
|
|
69
|
-
UserIcon = __decorate([
|
|
70
|
-
customElement('user-icon')
|
|
71
|
-
], UserIcon);
|
|
72
|
-
export { UserIcon };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/settings/css/navigation.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBAiDtB,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
export const navigation = css `
|
|
3
|
-
|
|
4
|
-
nav { overflow: hidden; }
|
|
5
|
-
|
|
6
|
-
/* Navigation Menu */
|
|
7
|
-
nav > ul {
|
|
8
|
-
|
|
9
|
-
list-style-type: none;
|
|
10
|
-
margin: 0px;
|
|
11
|
-
padding: 0px;
|
|
12
|
-
display: grid;
|
|
13
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
14
|
-
grid-gap: 8px;
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Navigation Button */
|
|
19
|
-
nav > ul > li > button {
|
|
20
|
-
|
|
21
|
-
color: var(--pwa_nav_button, grey);
|
|
22
|
-
border: 0;
|
|
23
|
-
width: 100%;
|
|
24
|
-
height: 36px;
|
|
25
|
-
margin: auto;
|
|
26
|
-
padding: 0px;
|
|
27
|
-
font-weight: 800;
|
|
28
|
-
font-size: .8em;
|
|
29
|
-
border-radius: 5px;
|
|
30
|
-
background-color: transparent;
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* Navigation Button - Active */
|
|
35
|
-
nav > ul > li > button[on] {
|
|
36
|
-
|
|
37
|
-
color: var(--pwa_nav_select, black);
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Navigation Button - Hover */
|
|
42
|
-
nav > ul > li > button:hover {
|
|
43
|
-
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
section[on] { display: grid; }
|
|
49
|
-
section { display: none; }
|
|
50
|
-
|
|
51
|
-
`;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { CSSResultArray, LitElement } from "lit";
|
|
2
|
-
import { AppState } from "../../../store";
|
|
3
|
-
declare const DeleteUser_base: (new (...args: any[]) => {
|
|
4
|
-
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
|
-
connectedCallback(): void;
|
|
6
|
-
disconnectedCallback(): void;
|
|
7
|
-
stateChanged(_state: {
|
|
8
|
-
frontend: import("../../../redux/object").frontendAuth;
|
|
9
|
-
drawer: {
|
|
10
|
-
drawer: boolean;
|
|
11
|
-
};
|
|
12
|
-
backend: import("../../../redux/object").backendAuth;
|
|
13
|
-
}): void;
|
|
14
|
-
readonly isConnected: boolean;
|
|
15
|
-
}) & typeof LitElement;
|
|
16
|
-
export declare class DeleteUser extends DeleteUser_base {
|
|
17
|
-
private login;
|
|
18
|
-
private email;
|
|
19
|
-
constructor();
|
|
20
|
-
protected firstUpdated(): void;
|
|
21
|
-
stateChanged(state: AppState): void;
|
|
22
|
-
static get styles(): CSSResultArray;
|
|
23
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
24
|
-
private alertDelete;
|
|
25
|
-
private deleteUser;
|
|
26
|
-
private officialDelete;
|
|
27
|
-
}
|
|
28
|
-
declare global {
|
|
29
|
-
interface HTMLElementTagNameMap {
|
|
30
|
-
'delete-user': DeleteUser;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/settings/input/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5D,OAAc,EAAE,QAAQ,EAAE,MAAS,gBAAgB,CAAC;;;;;;;;;;;;;;AAIpD,qBAAa,UAAW,SAAQ,eAA0B;IAE/C,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,KAAK,CAAc;;IAIpC,SAAS,CAAC,YAAY;IAQtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAK5B,MAAM,KAAK,MAAM,IAAI,cAAc,CAa3B;IAER,MAAM;IAaN,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,cAAc,CAQpB;CAEH;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -1,87 +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 { LitElement, css, html } from "lit";
|
|
8
|
-
import { state } from "lit/decorators.js";
|
|
9
|
-
import { connect } from "pwa-helpers";
|
|
10
|
-
import store from "../../../store";
|
|
11
|
-
import { buttonStyle } from "../../../css/form/button";
|
|
12
|
-
import { auth } from '../../../firebase/start';
|
|
13
|
-
export class DeleteUser extends connect(store)(LitElement) {
|
|
14
|
-
constructor() {
|
|
15
|
-
super();
|
|
16
|
-
this.login = false;
|
|
17
|
-
this.email = '';
|
|
18
|
-
this.officialDelete = async () => {
|
|
19
|
-
if (auth.currentUser) {
|
|
20
|
-
return auth.currentUser.delete().then(() => { }).catch(() => { });
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
alert('Please Sign-in');
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
firstUpdated() {
|
|
28
|
-
this.shadowRoot.querySelector('.deleteUser').addEventListener('click', () => {
|
|
29
|
-
this.alertDelete();
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
stateChanged(state) {
|
|
33
|
-
this.login = state.frontend.login;
|
|
34
|
-
this.email = state.backend.email;
|
|
35
|
-
}
|
|
36
|
-
static get styles() {
|
|
37
|
-
return [
|
|
38
|
-
buttonStyle,
|
|
39
|
-
css `
|
|
40
|
-
|
|
41
|
-
:host {
|
|
42
|
-
display: grid;
|
|
43
|
-
grid-template-rows: auto auto;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
p {
|
|
47
|
-
padding: 0 16px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
`
|
|
51
|
-
];
|
|
52
|
-
}
|
|
53
|
-
render() {
|
|
54
|
-
return html `
|
|
55
|
-
|
|
56
|
-
<p>Permanently delete the user account and data related to: ${this.email}</p>
|
|
57
|
-
|
|
58
|
-
<button
|
|
59
|
-
class="action-button deleteUser"
|
|
60
|
-
?disabled="${this.login === false}">Delete</button>
|
|
61
|
-
|
|
62
|
-
`;
|
|
63
|
-
}
|
|
64
|
-
alertDelete() { if (auth.currentUser) {
|
|
65
|
-
this.deleteUser();
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
alert('Please Login');
|
|
69
|
-
} }
|
|
70
|
-
deleteUser() {
|
|
71
|
-
const d = confirm("Delete Account?");
|
|
72
|
-
if (d == true) {
|
|
73
|
-
this.officialDelete();
|
|
74
|
-
console.log("user gone");
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
console.log("user here");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
__decorate([
|
|
82
|
-
state()
|
|
83
|
-
], DeleteUser.prototype, "login", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
state()
|
|
86
|
-
], DeleteUser.prototype, "email", void 0);
|
|
87
|
-
customElements.define('delete-user', DeleteUser);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { CSSResultArray, LitElement } from "lit";
|
|
2
|
-
import { AppState } from "../../../store";
|
|
3
|
-
declare const ContactEmail_base: (new (...args: any[]) => {
|
|
4
|
-
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
|
-
connectedCallback(): void;
|
|
6
|
-
disconnectedCallback(): void;
|
|
7
|
-
stateChanged(_state: {
|
|
8
|
-
frontend: import("../../../redux/object").frontendAuth;
|
|
9
|
-
drawer: {
|
|
10
|
-
drawer: boolean;
|
|
11
|
-
};
|
|
12
|
-
backend: import("../../../redux/object").backendAuth;
|
|
13
|
-
}): void;
|
|
14
|
-
readonly isConnected: boolean;
|
|
15
|
-
}) & typeof LitElement;
|
|
16
|
-
export declare class ContactEmail extends ContactEmail_base {
|
|
17
|
-
email: string;
|
|
18
|
-
private login;
|
|
19
|
-
private mail;
|
|
20
|
-
constructor();
|
|
21
|
-
stateChanged(state: AppState): void;
|
|
22
|
-
private handleEmail;
|
|
23
|
-
static get styles(): CSSResultArray;
|
|
24
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
-
private default;
|
|
26
|
-
private saveEmail;
|
|
27
|
-
}
|
|
28
|
-
declare global {
|
|
29
|
-
interface HTMLElementTagNameMap {
|
|
30
|
-
'contact-email': ContactEmail;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=email.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/settings/input/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5D,OAAc,EAAE,QAAQ,EAAE,MAAO,gBAAgB,CAAC;;;;;;;;;;;;;;AAOlD,qBAAa,YAAa,SAAQ,iBAA0B;IAGhB,KAAK,SAAM;IAE5C,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,IAAI,CAAwB;;IAI7C,YAAY,CAAC,KAAK,EAAE,QAAQ;IAM5B,OAAO,CAAC,WAAW;IAKnB,MAAM,KAAK,MAAM,IAAI,cAAc,CAa7B;IAEN,MAAM;IA6BN,OAAO,CAAC,OAAO,CAEd;IAGD,OAAO,CAAC,SAAS,CAoBhB;CAEF;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|