pwa-auth 3.3.7 → 3.3.9
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 +116 -106
- package/base/export/pwa-auth.d.ts +7 -6
- package/base/export/pwa-auth.js +7 -6
- package/base/export/pwa-auth.js.map +1 -1
- package/base/firebase/authentication.d.ts +10 -10
- package/base/firebase/authentication.js +10 -10
- package/base/firebase/authentication.js.map +1 -1
- package/base/firebase/interface.d.ts +5 -4
- package/base/firebase/interface.js +80 -79
- package/base/firebase/interface.js.map +1 -1
- package/base/lazy-loader.d.ts +11 -11
- package/base/lazy-loader.js +22 -22
- package/base/lazy-loader.js.map +1 -1
- package/base/redux/backend.d.ts +122 -113
- package/base/redux/backend.js +43 -43
- package/base/redux/drawer.d.ts +19 -17
- package/base/redux/drawer.js +21 -21
- package/base/redux/drawer.js.map +1 -1
- package/base/redux/frontend.d.ts +198 -185
- package/base/redux/frontend.js +86 -86
- package/base/redux/frontend.js.map +1 -1
- package/base/store.d.ts +62 -62
- package/base/store.js +13 -13
- package/base/webcomponents/css/animation.d.ts +2 -2
- package/base/webcomponents/css/animation.js +8 -6
- package/base/webcomponents/css/animation.js.map +1 -1
- package/base/webcomponents/css/svg.d.ts +3 -3
- package/base/webcomponents/css/svg.js +4 -4
- package/base/webcomponents/css/toggle.d.ts +1 -1
- package/base/webcomponents/css/toggle.js +2 -2
- package/base/webcomponents/drawer/css/drawer.d.ts +2 -2
- package/base/webcomponents/drawer/css/drawer.js +42 -18
- package/base/webcomponents/drawer/css/drawer.js.map +1 -1
- package/base/webcomponents/drawer/css/exit.d.ts +2 -2
- package/base/webcomponents/drawer/css/exit.js +8 -2
- package/base/webcomponents/drawer/css/exit.js.map +1 -1
- package/base/webcomponents/drawer/css/link.d.ts +2 -2
- package/base/webcomponents/drawer/css/link.js +2 -2
- package/base/webcomponents/drawer/css/paragraph.d.ts +2 -2
- package/base/webcomponents/drawer/css/paragraph.js +18 -6
- package/base/webcomponents/drawer/css/paragraph.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +58 -58
- package/base/webcomponents/drawer/drawer.js +108 -104
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/form/css/button.d.ts +2 -2
- package/base/webcomponents/form/css/button.js +3 -3
- package/base/webcomponents/form/css/input.d.ts +2 -2
- package/base/webcomponents/form/css/input.js +4 -4
- package/base/webcomponents/form/css/label.d.ts +2 -2
- package/base/webcomponents/form/css/label.js +4 -3
- package/base/webcomponents/form/css/label.js.map +1 -1
- package/base/webcomponents/form/css/list.d.ts +2 -2
- package/base/webcomponents/form/css/list.js +2 -2
- package/base/webcomponents/form/css/toggle.d.ts +2 -2
- package/base/webcomponents/form/css/toggle.js +6 -4
- package/base/webcomponents/form/css/toggle.js.map +1 -1
- package/base/webcomponents/form/forgot.d.ts +15 -15
- package/base/webcomponents/form/forgot.js +45 -45
- package/base/webcomponents/form/forgot.js.map +1 -1
- package/base/webcomponents/form/login.d.ts +20 -20
- package/base/webcomponents/form/login.js +97 -93
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/signup.d.ts +20 -20
- package/base/webcomponents/form/signup.js +104 -100
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/icon/css/icon.d.ts +1 -1
- package/base/webcomponents/icon/css/icon.js +6 -8
- package/base/webcomponents/icon/css/icon.js.map +1 -1
- package/base/webcomponents/icon/icon.d.ts +54 -54
- package/base/webcomponents/icon/icon.js +59 -59
- package/base/webcomponents/icon/icon.js.map +1 -1
- package/base/webcomponents/login/css/auth.d.ts +2 -2
- package/base/webcomponents/login/css/auth.js +5 -3
- package/base/webcomponents/login/css/auth.js.map +1 -1
- package/base/webcomponents/login/css/link.d.ts +2 -2
- package/base/webcomponents/login/css/link.js +2 -2
- package/base/webcomponents/login/css/paragraph.d.ts +2 -2
- package/base/webcomponents/login/css/paragraph.js +2 -2
- package/base/webcomponents/login/page.d.ts +55 -55
- package/base/webcomponents/login/page.js +73 -73
- package/base/webcomponents/login/page.js.map +1 -1
- package/base/webcomponents/settings/css/navigation.d.ts +1 -1
- package/base/webcomponents/settings/css/navigation.js +24 -4
- package/base/webcomponents/settings/css/navigation.js.map +1 -1
- package/base/webcomponents/settings/input/delete.d.ts +55 -55
- package/base/webcomponents/settings/input/delete.js +73 -73
- package/base/webcomponents/settings/input/delete.js.map +1 -1
- package/base/webcomponents/settings/input/email.d.ts +55 -55
- package/base/webcomponents/settings/input/email.js +72 -72
- package/base/webcomponents/settings/input/email.js.map +1 -1
- package/base/webcomponents/settings/input/name.d.ts +54 -54
- package/base/webcomponents/settings/input/name.js +67 -67
- package/base/webcomponents/settings/input/name.js.map +1 -1
- package/base/webcomponents/settings/input/password.d.ts +57 -57
- package/base/webcomponents/settings/input/password.js +97 -97
- package/base/webcomponents/settings/input/password.js.map +1 -1
- package/base/webcomponents/settings/input/uploader.d.ts +58 -58
- package/base/webcomponents/settings/input/uploader.js +152 -151
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/settings.d.ts +58 -58
- package/base/webcomponents/settings/settings.js +80 -91
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/package.json +11 -10
- package/source/pwa-auth.js +106 -56
|
@@ -1,41 +1,41 @@
|
|
|
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
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { html, LitElement, css } from 'lit';
|
|
11
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
|
-
import { EmailAuthProvider, signInWithCredential } from 'firebase/auth';
|
|
13
|
-
import { auth } from '../../firebase/authentication';
|
|
14
|
-
import { buttonStyle } from './css/button';
|
|
15
|
-
import { labelStyle } from './css/label';
|
|
16
|
-
import { inputStyle } from './css/input';
|
|
17
|
-
import { listStyle } from './css/list';
|
|
18
|
-
import { toggleStyle } from './css/toggle';
|
|
19
|
-
import store from '../../store';
|
|
20
|
-
import { universalToggle } from '../../redux/frontend';
|
|
21
|
-
let FormLogin = class FormLogin extends LitElement {
|
|
22
|
-
constructor() {
|
|
23
|
-
super();
|
|
24
|
-
this.source = '';
|
|
25
|
-
this.email = '';
|
|
26
|
-
this.password = '';
|
|
27
|
-
this.signIn = async (email, password) => {
|
|
28
|
-
const authCredential = EmailAuthProvider.credential(email, password);
|
|
29
|
-
await signInWithCredential(auth, authCredential).catch((error) => { console.log(error); });
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
static get styles() {
|
|
33
|
-
return [
|
|
34
|
-
listStyle,
|
|
35
|
-
labelStyle,
|
|
36
|
-
inputStyle,
|
|
37
|
-
buttonStyle,
|
|
38
|
-
toggleStyle,
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { html, LitElement, css } from 'lit';
|
|
11
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
|
+
import { EmailAuthProvider, signInWithCredential } from 'firebase/auth';
|
|
13
|
+
import { auth } from '../../firebase/authentication';
|
|
14
|
+
import { buttonStyle } from './css/button';
|
|
15
|
+
import { labelStyle } from './css/label';
|
|
16
|
+
import { inputStyle } from './css/input';
|
|
17
|
+
import { listStyle } from './css/list';
|
|
18
|
+
import { toggleStyle } from './css/toggle';
|
|
19
|
+
import store from '../../store';
|
|
20
|
+
import { universalToggle } from '../../redux/frontend';
|
|
21
|
+
let FormLogin = class FormLogin extends LitElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.source = '';
|
|
25
|
+
this.email = '';
|
|
26
|
+
this.password = '';
|
|
27
|
+
this.signIn = async (email, password) => {
|
|
28
|
+
const authCredential = EmailAuthProvider.credential(email, password);
|
|
29
|
+
await signInWithCredential(auth, authCredential).catch((error) => { console.log(error); });
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get styles() {
|
|
33
|
+
return [
|
|
34
|
+
listStyle,
|
|
35
|
+
labelStyle,
|
|
36
|
+
inputStyle,
|
|
37
|
+
buttonStyle,
|
|
38
|
+
toggleStyle,
|
|
39
39
|
css `
|
|
40
40
|
|
|
41
41
|
:host {
|
|
@@ -47,11 +47,13 @@ let FormLogin = class FormLogin extends LitElement {
|
|
|
47
47
|
grid-template-columns: 1fr auto;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
form { display: grid; }
|
|
51
|
+
|
|
52
|
+
`
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
;
|
|
56
|
+
render() {
|
|
55
57
|
return html `
|
|
56
58
|
|
|
57
59
|
<!-- Log-in State -->
|
|
@@ -95,64 +97,66 @@ let FormLogin = class FormLogin extends LitElement {
|
|
|
95
97
|
|
|
96
98
|
</li>
|
|
97
99
|
|
|
98
|
-
<!-- Change State
|
|
100
|
+
<!-- Change State
|
|
99
101
|
<li>
|
|
100
102
|
|
|
101
103
|
<p class= "divider">Or</p>
|
|
102
104
|
|
|
103
|
-
<button
|
|
104
|
-
class= "new"
|
|
105
|
-
@click= "${this.change}">create a new account</button>
|
|
106
105
|
|
|
107
|
-
|
|
106
|
+
|
|
107
|
+
</li> -->
|
|
108
108
|
|
|
109
109
|
</ul>
|
|
110
110
|
|
|
111
|
+
<button
|
|
112
|
+
class="new"
|
|
113
|
+
@click="${this.change}">create a new account</button>
|
|
114
|
+
|
|
111
115
|
</form>
|
|
112
116
|
|
|
113
|
-
`;
|
|
114
|
-
}
|
|
115
|
-
change() {
|
|
116
|
-
store.dispatch(universalToggle(this.source));
|
|
117
|
-
}
|
|
118
|
-
handleEmail(event) {
|
|
119
|
-
const input = event.target;
|
|
120
|
-
this.email = input.value;
|
|
121
|
-
}
|
|
122
|
-
handlePassword(event) {
|
|
123
|
-
const input = event.target;
|
|
124
|
-
this.password = input.value;
|
|
125
|
-
}
|
|
126
|
-
_handleSubmit(event) {
|
|
127
|
-
event.preventDefault();
|
|
128
|
-
}
|
|
129
|
-
login() {
|
|
130
|
-
if (this.email.length < 4) {
|
|
131
|
-
alert('Please enter an email address.');
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
if (this.password.length < 4) {
|
|
135
|
-
alert('Please enter a password.');
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
this.signIn(this.email, this.password);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
__decorate([
|
|
142
|
-
property({ type: String }),
|
|
143
|
-
__metadata("design:type", Object)
|
|
144
|
-
], FormLogin.prototype, "source", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
state(),
|
|
147
|
-
__metadata("design:type", Object)
|
|
148
|
-
], FormLogin.prototype, "email", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
state(),
|
|
151
|
-
__metadata("design:type", Object)
|
|
152
|
-
], FormLogin.prototype, "password", void 0);
|
|
153
|
-
FormLogin = __decorate([
|
|
154
|
-
customElement('form-login'),
|
|
155
|
-
__metadata("design:paramtypes", [])
|
|
156
|
-
], FormLogin);
|
|
157
|
-
export { FormLogin };
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
change() {
|
|
120
|
+
store.dispatch(universalToggle(this.source));
|
|
121
|
+
}
|
|
122
|
+
handleEmail(event) {
|
|
123
|
+
const input = event.target;
|
|
124
|
+
this.email = input.value;
|
|
125
|
+
}
|
|
126
|
+
handlePassword(event) {
|
|
127
|
+
const input = event.target;
|
|
128
|
+
this.password = input.value;
|
|
129
|
+
}
|
|
130
|
+
_handleSubmit(event) {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
}
|
|
133
|
+
login() {
|
|
134
|
+
if (this.email.length < 4) {
|
|
135
|
+
alert('Please enter an email address.');
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (this.password.length < 4) {
|
|
139
|
+
alert('Please enter a password.');
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this.signIn(this.email, this.password);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
__decorate([
|
|
146
|
+
property({ type: String }),
|
|
147
|
+
__metadata("design:type", Object)
|
|
148
|
+
], FormLogin.prototype, "source", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
state(),
|
|
151
|
+
__metadata("design:type", Object)
|
|
152
|
+
], FormLogin.prototype, "email", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
state(),
|
|
155
|
+
__metadata("design:type", Object)
|
|
156
|
+
], FormLogin.prototype, "password", void 0);
|
|
157
|
+
FormLogin = __decorate([
|
|
158
|
+
customElement('form-login'),
|
|
159
|
+
__metadata("design:paramtypes", [])
|
|
160
|
+
], FormLogin);
|
|
161
|
+
export { FormLogin };
|
|
158
162
|
//# sourceMappingURL=login.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/login.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,GAAG,EACJ,MAA8B,KAAK,CAAC;AAErC,OAAO,EACL,aAAa,EACb,QAAQ,EACR,KAAK,EACN,MAA8B,mBAAmB,CAAC;AAEnD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACrB,MAA8B,eAAe,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,MAAgB,+BAA+B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAS,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAU,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAU,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAW,YAAY,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAS,cAAc,CAAC;AAE9C,OAAO,KAAK,MAAuB,aAAa,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAS,sBAAsB,CAAC;AAGnD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAMvC;QAAgB,KAAK,EAAE,CAAC;QAJS,WAAM,GAAQ,EAAE,CAAC;QACjC,UAAK,GAAU,EAAE,CAAC;QAClB,aAAQ,GAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/login.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,GAAG,EACJ,MAA8B,KAAK,CAAC;AAErC,OAAO,EACL,aAAa,EACb,QAAQ,EACR,KAAK,EACN,MAA8B,mBAAmB,CAAC;AAEnD,OAAO,EACL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|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class FormSignup extends LitElement {
|
|
3
|
-
source: string;
|
|
4
|
-
private email;
|
|
5
|
-
private password;
|
|
6
|
-
constructor();
|
|
7
|
-
static get styles(): import("lit").CSSResult[];
|
|
8
|
-
protected render(): import("lit-html").TemplateResult<1>;
|
|
9
|
-
private change;
|
|
10
|
-
private _handleSubmit;
|
|
11
|
-
private handleEmail;
|
|
12
|
-
private handlePassword;
|
|
13
|
-
private signUp;
|
|
14
|
-
private newAccount;
|
|
15
|
-
}
|
|
16
|
-
declare global {
|
|
17
|
-
interface HTMLElementTagNameMap {
|
|
18
|
-
'form-signup': FormSignup;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class FormSignup extends LitElement {
|
|
3
|
+
source: string;
|
|
4
|
+
private email;
|
|
5
|
+
private password;
|
|
6
|
+
constructor();
|
|
7
|
+
static get styles(): import("lit").CSSResult[];
|
|
8
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
private change;
|
|
10
|
+
private _handleSubmit;
|
|
11
|
+
private handleEmail;
|
|
12
|
+
private handlePassword;
|
|
13
|
+
private signUp;
|
|
14
|
+
private newAccount;
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
'form-signup': FormSignup;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
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
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { css, html, LitElement } from 'lit';
|
|
11
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
|
-
import { createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
|
|
13
|
-
import { auth } from '../../firebase/authentication';
|
|
14
|
-
import { logAccount } from '../../firebase/interface';
|
|
15
|
-
import { buttonStyle } from './css/button';
|
|
16
|
-
import { labelStyle } from './css/label';
|
|
17
|
-
import { inputStyle } from './css/input';
|
|
18
|
-
import { listStyle } from './css/list';
|
|
19
|
-
import { toggleStyle } from './css/toggle';
|
|
20
|
-
import store from '../../store';
|
|
21
|
-
import { universalToggle } from '../../redux/frontend';
|
|
22
|
-
let FormSignup = class FormSignup extends LitElement {
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
this.source = '';
|
|
26
|
-
this.email = '';
|
|
27
|
-
this.password = '';
|
|
28
|
-
this.newAccount = async (email, password) => {
|
|
29
|
-
await createUserWithEmailAndPassword(auth, email, password)
|
|
30
|
-
.then((userCredential) => {
|
|
31
|
-
const user = userCredential.user;
|
|
32
|
-
sendEmailVerification(user)
|
|
33
|
-
.then(() => {
|
|
34
|
-
console.log("Verification email sent.");
|
|
35
|
-
});
|
|
36
|
-
}).then(() => { logAccount(); });
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
static get styles() {
|
|
40
|
-
return [
|
|
41
|
-
listStyle,
|
|
42
|
-
labelStyle,
|
|
43
|
-
inputStyle,
|
|
44
|
-
buttonStyle,
|
|
45
|
-
toggleStyle,
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { css, html, LitElement } from 'lit';
|
|
11
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
12
|
+
import { createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
|
|
13
|
+
import { auth } from '../../firebase/authentication';
|
|
14
|
+
import { logAccount } from '../../firebase/interface';
|
|
15
|
+
import { buttonStyle } from './css/button';
|
|
16
|
+
import { labelStyle } from './css/label';
|
|
17
|
+
import { inputStyle } from './css/input';
|
|
18
|
+
import { listStyle } from './css/list';
|
|
19
|
+
import { toggleStyle } from './css/toggle';
|
|
20
|
+
import store from '../../store';
|
|
21
|
+
import { universalToggle } from '../../redux/frontend';
|
|
22
|
+
let FormSignup = class FormSignup extends LitElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.source = '';
|
|
26
|
+
this.email = '';
|
|
27
|
+
this.password = '';
|
|
28
|
+
this.newAccount = async (email, password) => {
|
|
29
|
+
await createUserWithEmailAndPassword(auth, email, password)
|
|
30
|
+
.then((userCredential) => {
|
|
31
|
+
const user = userCredential.user;
|
|
32
|
+
sendEmailVerification(user)
|
|
33
|
+
.then(() => {
|
|
34
|
+
console.log("Verification email sent.");
|
|
35
|
+
});
|
|
36
|
+
}).then(() => { logAccount(); });
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get styles() {
|
|
40
|
+
return [
|
|
41
|
+
listStyle,
|
|
42
|
+
labelStyle,
|
|
43
|
+
inputStyle,
|
|
44
|
+
buttonStyle,
|
|
45
|
+
toggleStyle,
|
|
46
46
|
css `
|
|
47
47
|
|
|
48
48
|
:host {
|
|
@@ -54,11 +54,13 @@ let FormSignup = class FormSignup extends LitElement {
|
|
|
54
54
|
grid-template-columns: 1fr auto;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
form { display: grid; }
|
|
58
|
+
|
|
59
|
+
`
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
;
|
|
63
|
+
render() {
|
|
62
64
|
return html `
|
|
63
65
|
|
|
64
66
|
<!-- Sign Up State-->
|
|
@@ -106,64 +108,66 @@ let FormSignup = class FormSignup extends LitElement {
|
|
|
106
108
|
|
|
107
109
|
<!-- <label><input id="veriftPassword" type="password" >Verify Password</label> -->
|
|
108
110
|
|
|
109
|
-
<!-- Change State
|
|
111
|
+
<!-- Change State
|
|
110
112
|
<li>
|
|
111
113
|
|
|
112
114
|
<p class= "divider">Or</p>
|
|
113
115
|
|
|
114
|
-
<button
|
|
115
|
-
class= "new"
|
|
116
|
-
@click= "${this.change}">login with existing email</button>
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
|
|
118
|
+
</li> -->
|
|
119
119
|
|
|
120
120
|
</ul>
|
|
121
121
|
|
|
122
|
+
<button
|
|
123
|
+
class="new"
|
|
124
|
+
@click="${this.change}">login with existing email</button>
|
|
125
|
+
|
|
122
126
|
</form>
|
|
123
127
|
|
|
124
|
-
`;
|
|
125
|
-
}
|
|
126
|
-
change() {
|
|
127
|
-
store.dispatch(universalToggle(this.source));
|
|
128
|
-
}
|
|
129
|
-
_handleSubmit(event) {
|
|
130
|
-
event.preventDefault();
|
|
131
|
-
}
|
|
132
|
-
handleEmail(event) {
|
|
133
|
-
const input = event.target;
|
|
134
|
-
this.email = input.value;
|
|
135
|
-
}
|
|
136
|
-
handlePassword(event) {
|
|
137
|
-
const input = event.target;
|
|
138
|
-
this.password = input.value;
|
|
139
|
-
}
|
|
140
|
-
signUp() {
|
|
141
|
-
if (this.email.length < 4) {
|
|
142
|
-
alert('Please enter an email address.');
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (this.password.length < 4) {
|
|
146
|
-
alert('Please enter a password.');
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
this.newAccount(this.email, this.password);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
__decorate([
|
|
153
|
-
property({ type: String }),
|
|
154
|
-
__metadata("design:type", Object)
|
|
155
|
-
], FormSignup.prototype, "source", void 0);
|
|
156
|
-
__decorate([
|
|
157
|
-
state(),
|
|
158
|
-
__metadata("design:type", Object)
|
|
159
|
-
], FormSignup.prototype, "email", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
state(),
|
|
162
|
-
__metadata("design:type", Object)
|
|
163
|
-
], FormSignup.prototype, "password", void 0);
|
|
164
|
-
FormSignup = __decorate([
|
|
165
|
-
customElement('form-signup'),
|
|
166
|
-
__metadata("design:paramtypes", [])
|
|
167
|
-
], FormSignup);
|
|
168
|
-
export { FormSignup };
|
|
128
|
+
`;
|
|
129
|
+
}
|
|
130
|
+
change() {
|
|
131
|
+
store.dispatch(universalToggle(this.source));
|
|
132
|
+
}
|
|
133
|
+
_handleSubmit(event) {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
}
|
|
136
|
+
handleEmail(event) {
|
|
137
|
+
const input = event.target;
|
|
138
|
+
this.email = input.value;
|
|
139
|
+
}
|
|
140
|
+
handlePassword(event) {
|
|
141
|
+
const input = event.target;
|
|
142
|
+
this.password = input.value;
|
|
143
|
+
}
|
|
144
|
+
signUp() {
|
|
145
|
+
if (this.email.length < 4) {
|
|
146
|
+
alert('Please enter an email address.');
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (this.password.length < 4) {
|
|
150
|
+
alert('Please enter a password.');
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
this.newAccount(this.email, this.password);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
__decorate([
|
|
157
|
+
property({ type: String }),
|
|
158
|
+
__metadata("design:type", Object)
|
|
159
|
+
], FormSignup.prototype, "source", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
state(),
|
|
162
|
+
__metadata("design:type", Object)
|
|
163
|
+
], FormSignup.prototype, "email", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
state(),
|
|
166
|
+
__metadata("design:type", Object)
|
|
167
|
+
], FormSignup.prototype, "password", void 0);
|
|
168
|
+
FormSignup = __decorate([
|
|
169
|
+
customElement('form-signup'),
|
|
170
|
+
__metadata("design:paramtypes", [])
|
|
171
|
+
], FormSignup);
|
|
172
|
+
export { FormSignup };
|
|
169
173
|
//# sourceMappingURL=signup.js.map
|
|
@@ -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,EAC9B,qBAAqB,EACtB,MAA8B,eAAe,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,MAAgB,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAU,0BAA0B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAS,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAU,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAU,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAW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CAAC;QACnD,IAAI,CAAC,KAAK,GAAQ,KAAK,CAAC,KAAK,CAAC;IAChC,CAAC;IAGO,cAAc,CAAC,KAAY;QACjC,MAAM,KAAK,GAAO,KAAK,CAAC,MAA0B,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAK,KAAK,CAAC,KAAK,CAAC;IAChC,CAAC;IAGO,MAAM;QACZ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAAC,OAAO;SAAE;QAC/E,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAG;YAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAAC,OAAO;SAAE;QAC7E,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;CAmCA,CAAA;AA7JC;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;0CAA2B;AACpD;IAAC,KAAK,EAAE;;yCAA2B;AACnC;IAAC,KAAK,EAAE;;4CAA2B;AALxB,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;;GAChB,UAAU,CAgKtB;SAhKY,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const iconStyles: import("lit").CSSResult;
|
|
1
|
+
export declare const iconStyles: import("lit").CSSResult;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
1
|
+
import { css } from 'lit';
|
|
2
2
|
export const iconStyles = css `
|
|
3
3
|
|
|
4
|
-
:host {
|
|
5
|
-
margin: auto;
|
|
6
|
-
display: grid;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
4
|
.icon, .login {
|
|
10
5
|
cursor: pointer;
|
|
11
6
|
margin: auto;
|
|
@@ -15,7 +10,7 @@ export const iconStyles = css `
|
|
|
15
10
|
color: white;
|
|
16
11
|
font-size: 15px;
|
|
17
12
|
text-decoration: none;
|
|
18
|
-
transition-duration:
|
|
13
|
+
transition-duration: 0s;
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
.icon:hover,
|
|
@@ -28,6 +23,7 @@ export const iconStyles = css `
|
|
|
28
23
|
width: var(--pwa_icon_diameter, 32px);
|
|
29
24
|
border-radius: 50%;
|
|
30
25
|
padding: 0;
|
|
26
|
+
box-shadow: 4px 4px 4px 0px;
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
.login {
|
|
@@ -38,6 +34,8 @@ export const iconStyles = css `
|
|
|
38
34
|
font-family: var(--pwa_icon_font, 'Arial', sans-serif);
|
|
39
35
|
font-weight: 500;
|
|
40
36
|
text-align: center;
|
|
37
|
+
box-shadow: 4px 4px 4px 0px;
|
|
38
|
+
border-radius: 8px;
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
.userImage {
|
|
@@ -51,5 +49,5 @@ export const iconStyles = css `
|
|
|
51
49
|
margin: auto;
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
`;
|
|
52
|
+
`;
|
|
55
53
|
//# sourceMappingURL=icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/icon/css/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/icon/css/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD5B,CAAC"}
|