pwa-auth 3.2.1 → 3.2.3
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 +5 -0
- package/README.md +6 -5
- package/base/css/form/button.d.ts +2 -2
- package/base/css/form/button.js +2 -2
- package/base/css/form/input.d.ts +2 -2
- package/base/css/form/input.js +2 -2
- package/base/css/form/label.d.ts +2 -2
- package/base/css/form/label.js +2 -2
- package/base/css/form/list.d.ts +2 -2
- package/base/css/form/list.js +2 -2
- package/base/css/svg.d.ts +3 -3
- package/base/css/svg.js +4 -4
- package/base/css/toggle.d.ts +1 -1
- package/base/css/toggle.js +2 -2
- package/base/export/pwa-auth.d.ts +4 -4
- package/base/export/pwa-auth.js +4 -4
- package/base/firebase/authentication.d.ts +10 -10
- package/base/firebase/authentication.js +10 -10
- package/base/firebase/interface.d.ts +4 -4
- package/base/firebase/interface.js +79 -79
- package/base/firebase/interface.js.map +1 -1
- package/base/redux/backend.d.ts +113 -15
- package/base/redux/backend.js +43 -43
- package/base/redux/backend.js.map +1 -1
- package/base/redux/drawer.d.ts +17 -19
- package/base/redux/drawer.js +21 -21
- package/base/redux/drawer.js.map +1 -1
- package/base/redux/frontend.d.ts +159 -16
- package/base/redux/frontend.js +67 -67
- package/base/redux/frontend.js.map +1 -1
- package/base/redux/object.d.ts +23 -23
- package/base/redux/object.js +1 -1
- package/base/store.d.ts +60 -18
- package/base/store.js +13 -13
- package/base/webcomponents/drawer/css/drawer.d.ts +2 -2
- package/base/webcomponents/drawer/css/drawer.js +2 -2
- package/base/webcomponents/drawer/css/exit.d.ts +2 -2
- package/base/webcomponents/drawer/css/exit.js +2 -2
- 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 +2 -2
- package/base/webcomponents/drawer/css/toggle.d.ts +2 -2
- package/base/webcomponents/drawer/css/toggle.js +2 -2
- package/base/webcomponents/drawer/drawer.d.ts +57 -36
- package/base/webcomponents/drawer/drawer.js +95 -95
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/drawer/input/login.d.ts +19 -19
- package/base/webcomponents/drawer/input/login.js +83 -83
- package/base/webcomponents/drawer/input/login.js.map +1 -1
- package/base/webcomponents/drawer/input/sign-up.d.ts +19 -19
- package/base/webcomponents/drawer/input/sign-up.js +90 -90
- package/base/webcomponents/drawer/input/sign-up.js.map +1 -1
- package/base/webcomponents/icon/css/icon.d.ts +1 -1
- package/base/webcomponents/icon/css/icon.js +2 -2
- package/base/webcomponents/icon/icon.d.ts +53 -32
- package/base/webcomponents/icon/icon.js +59 -59
- package/base/webcomponents/icon/icon.js.map +1 -1
- package/base/webcomponents/settings/css/navigation.d.ts +1 -1
- package/base/webcomponents/settings/css/navigation.js +2 -2
- package/base/webcomponents/settings/input/delete.d.ts +54 -33
- 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 +54 -33
- 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 +53 -32
- 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 +56 -35
- 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 +57 -36
- package/base/webcomponents/settings/input/uploader.js +150 -150
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/settings.d.ts +57 -36
- package/base/webcomponents/settings/settings.js +78 -78
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/package.json +6 -8
- package/source/esm/pwa-auth.js +881 -0
- package/source/esm/pwa-auth.js.map +1 -0
- package/export/auth-helpers.ts +0 -1
- package/export/export/tsconfigs.production.md +0 -53
|
@@ -1,44 +1,44 @@
|
|
|
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 { LitElement, css, html } from "lit";
|
|
11
|
-
import { state } from "lit/decorators.js";
|
|
12
|
-
import { connect } from "pwa-helpers";
|
|
13
|
-
import store from "../../../store";
|
|
14
|
-
import { buttonStyle } from "../../../css/form/button";
|
|
15
|
-
import { auth } from '../../../firebase/authentication';
|
|
16
|
-
export class DeleteUser extends connect(store)(LitElement) {
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
this.login = false;
|
|
20
|
-
this.email = '';
|
|
21
|
-
this.officialDelete = async () => {
|
|
22
|
-
if (auth.currentUser) {
|
|
23
|
-
return auth.currentUser.delete().then(() => { }).catch(() => { });
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
alert('Please Sign-in');
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
firstUpdated() {
|
|
31
|
-
this.shadowRoot.querySelector('.deleteUser').addEventListener('click', () => {
|
|
32
|
-
this.alertDelete();
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
stateChanged(state) {
|
|
36
|
-
this.login = state.frontend.login;
|
|
37
|
-
this.email = state.backend.email;
|
|
38
|
-
}
|
|
39
|
-
static get styles() {
|
|
40
|
-
return [
|
|
41
|
-
buttonStyle,
|
|
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 { LitElement, css, html } from "lit";
|
|
11
|
+
import { state } from "lit/decorators.js";
|
|
12
|
+
import { connect } from "pwa-helpers";
|
|
13
|
+
import store from "../../../store";
|
|
14
|
+
import { buttonStyle } from "../../../css/form/button";
|
|
15
|
+
import { auth } from '../../../firebase/authentication';
|
|
16
|
+
export class DeleteUser extends connect(store)(LitElement) {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.login = false;
|
|
20
|
+
this.email = '';
|
|
21
|
+
this.officialDelete = async () => {
|
|
22
|
+
if (auth.currentUser) {
|
|
23
|
+
return auth.currentUser.delete().then(() => { }).catch(() => { });
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
alert('Please Sign-in');
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
firstUpdated() {
|
|
31
|
+
this.shadowRoot.querySelector('.deleteUser').addEventListener('click', () => {
|
|
32
|
+
this.alertDelete();
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
stateChanged(state) {
|
|
36
|
+
this.login = state.frontend.login;
|
|
37
|
+
this.email = state.backend.email;
|
|
38
|
+
}
|
|
39
|
+
static get styles() {
|
|
40
|
+
return [
|
|
41
|
+
buttonStyle,
|
|
42
42
|
css `
|
|
43
43
|
|
|
44
44
|
:host {
|
|
@@ -50,10 +50,10 @@ export class DeleteUser extends connect(store)(LitElement) {
|
|
|
50
50
|
padding: 0 16px;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
`
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
render() {
|
|
53
|
+
`
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
57
|
return html `
|
|
58
58
|
|
|
59
59
|
<p>Permanently delete the user account and data related to: ${this.email}</p>
|
|
@@ -62,32 +62,32 @@ export class DeleteUser extends connect(store)(LitElement) {
|
|
|
62
62
|
class="action-button deleteUser"
|
|
63
63
|
?disabled="${this.login === false}">Delete</button>
|
|
64
64
|
|
|
65
|
-
`;
|
|
66
|
-
}
|
|
67
|
-
alertDelete() { if (auth.currentUser) {
|
|
68
|
-
this.deleteUser();
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
alert('Please Login');
|
|
72
|
-
} }
|
|
73
|
-
deleteUser() {
|
|
74
|
-
const d = confirm("Delete Account?");
|
|
75
|
-
if (d == true) {
|
|
76
|
-
this.officialDelete();
|
|
77
|
-
console.log("user gone");
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
console.log("user here");
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
__decorate([
|
|
85
|
-
state(),
|
|
86
|
-
__metadata("design:type", Boolean)
|
|
87
|
-
], DeleteUser.prototype, "login", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
state(),
|
|
90
|
-
__metadata("design:type", String)
|
|
91
|
-
], DeleteUser.prototype, "email", void 0);
|
|
92
|
-
customElements.define('delete-user', DeleteUser);
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
alertDelete() { if (auth.currentUser) {
|
|
68
|
+
this.deleteUser();
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
alert('Please Login');
|
|
72
|
+
} }
|
|
73
|
+
deleteUser() {
|
|
74
|
+
const d = confirm("Delete Account?");
|
|
75
|
+
if (d == true) {
|
|
76
|
+
this.officialDelete();
|
|
77
|
+
console.log("user gone");
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
console.log("user here");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
__decorate([
|
|
85
|
+
state(),
|
|
86
|
+
__metadata("design:type", Boolean)
|
|
87
|
+
], DeleteUser.prototype, "login", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
state(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], DeleteUser.prototype, "email", void 0);
|
|
92
|
+
customElements.define('delete-user', DeleteUser);
|
|
93
93
|
//# sourceMappingURL=delete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/delete.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAmB,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAiB,aAAa,CAAC;AACjD,OAAO,KAAmB,MAAS,gBAAgB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAa,0BAA0B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAoB,kCAAkC,CAAC;AAEtE,MAAM,OAAO,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAKxD;QAAgB,KAAK,EAAE,CAAC;QAHP,UAAK,GAAa,KAAK,CAAC;QACxB,UAAK,GAAW,EAAE,CA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AI,CAAC,KAAK,GAAG,KAAK,CAAC,QAAS,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAQ,CAAC,KAAK,CAAC;IACpC,CAAC;IAED,MAAM,KAAK,MAAM;QAAqB,OAAO;YAC3C,WAAW;YACX,GAAG,CAAA;;;;;;;;;;;KAWF;SAAE,CAAC;IAAC,CAAC;IAER,MAAM;QACJ,OAAO,IAAI,CAAA;;oEAEqD,IAAI,CAAC,KAAK;;;;qBAIzD,IAAI,CAAC,KAAK,KAAK,KAAK;;KAEpC,CAAC;IACJ,CAAC;IAGO,WAAW,KAAM,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QAAC,IAAI,CAAC,UAAU,EAAE,CAAC;IAAC,CAAC;SAAM,CAAC;QAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,CAAC;IAC/F,UAAU;QAChB,MAAM,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACrC,IAAQ,CAAC,IAAI,IAAI,EAAG,CAAC;YAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAAC,CAAC;aAClE,CAAC;YAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAAC,CAAC;IACrC,CAAC;CAaF;AAhEkB;IAAhB,KAAK,EAAE;;yCAAiC;AACxB;IAAhB,KAAK,EAAE;;yCAA4B;AAiEtC,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1,33 +1,54 @@
|
|
|
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:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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: {
|
|
9
|
+
settings: string;
|
|
10
|
+
login: boolean;
|
|
11
|
+
drawer: boolean;
|
|
12
|
+
register: boolean;
|
|
13
|
+
userId: string;
|
|
14
|
+
customer: string;
|
|
15
|
+
profileChoice: string;
|
|
16
|
+
name: string;
|
|
17
|
+
photoURL: string;
|
|
18
|
+
phone: string;
|
|
19
|
+
email: string;
|
|
20
|
+
};
|
|
21
|
+
drawer: {
|
|
22
|
+
drawer: boolean;
|
|
23
|
+
};
|
|
24
|
+
backend: {
|
|
25
|
+
verified: boolean;
|
|
26
|
+
anon: boolean;
|
|
27
|
+
userId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
email: string;
|
|
30
|
+
photoURL: string;
|
|
31
|
+
phone: string;
|
|
32
|
+
msgToken: string;
|
|
33
|
+
};
|
|
34
|
+
}): void;
|
|
35
|
+
readonly isConnected: boolean;
|
|
36
|
+
}) & typeof LitElement;
|
|
37
|
+
export declare class ContactEmail extends ContactEmail_base {
|
|
38
|
+
email: string;
|
|
39
|
+
private login;
|
|
40
|
+
private mail;
|
|
41
|
+
constructor();
|
|
42
|
+
stateChanged(state: AppState): void;
|
|
43
|
+
private handleEmail;
|
|
44
|
+
static get styles(): CSSResultArray;
|
|
45
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
private default;
|
|
47
|
+
private saveEmail;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
'contact-email': ContactEmail;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -1,55 +1,55 @@
|
|
|
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 { LitElement, css, html } from "lit";
|
|
11
|
-
import { property, state } from "lit/decorators.js";
|
|
12
|
-
import { connect } from "pwa-helpers";
|
|
13
|
-
import store from "../../../store";
|
|
14
|
-
import { auth } from "../../../firebase/authentication";
|
|
15
|
-
import { labelStyle } from "../../../css/form/label";
|
|
16
|
-
import { inputStyle } from "../../../css/form/input";
|
|
17
|
-
import { buttonStyle } from "../../../css/form/button";
|
|
18
|
-
import { updateEmail } from "firebase/auth";
|
|
19
|
-
export class ContactEmail extends connect(store)(LitElement) {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
this.email = '';
|
|
23
|
-
this.login = false;
|
|
24
|
-
this.mail = "";
|
|
25
|
-
this.default = (e) => {
|
|
26
|
-
e.preventDefault();
|
|
27
|
-
};
|
|
28
|
-
this.saveEmail = async () => {
|
|
29
|
-
if (auth.currentUser) {
|
|
30
|
-
let contactMail = this.shadowRoot?.querySelector('#pwa-email');
|
|
31
|
-
await updateEmail(auth.currentUser, contactMail.value).catch((error) => { console.log(error); });
|
|
32
|
-
const emailChangedEvent = new CustomEvent("userEmailChanged", {
|
|
33
|
-
detail: { email: contactMail.value }
|
|
34
|
-
});
|
|
35
|
-
window.dispatchEvent(emailChangedEvent);
|
|
36
|
-
alert('Email Updated');
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
stateChanged(state) {
|
|
41
|
-
this.login = state.frontend.login;
|
|
42
|
-
this.mail = state.backend.email;
|
|
43
|
-
}
|
|
44
|
-
handleEmail(event) {
|
|
45
|
-
const input = event.target;
|
|
46
|
-
this.mail = input.value;
|
|
47
|
-
}
|
|
48
|
-
static get styles() {
|
|
49
|
-
return [
|
|
50
|
-
labelStyle,
|
|
51
|
-
inputStyle,
|
|
52
|
-
buttonStyle,
|
|
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 { LitElement, css, html } from "lit";
|
|
11
|
+
import { property, state } from "lit/decorators.js";
|
|
12
|
+
import { connect } from "pwa-helpers";
|
|
13
|
+
import store from "../../../store";
|
|
14
|
+
import { auth } from "../../../firebase/authentication";
|
|
15
|
+
import { labelStyle } from "../../../css/form/label";
|
|
16
|
+
import { inputStyle } from "../../../css/form/input";
|
|
17
|
+
import { buttonStyle } from "../../../css/form/button";
|
|
18
|
+
import { updateEmail } from "firebase/auth";
|
|
19
|
+
export class ContactEmail extends connect(store)(LitElement) {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.email = '';
|
|
23
|
+
this.login = false;
|
|
24
|
+
this.mail = "";
|
|
25
|
+
this.default = (e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
};
|
|
28
|
+
this.saveEmail = async () => {
|
|
29
|
+
if (auth.currentUser) {
|
|
30
|
+
let contactMail = this.shadowRoot?.querySelector('#pwa-email');
|
|
31
|
+
await updateEmail(auth.currentUser, contactMail.value).catch((error) => { console.log(error); });
|
|
32
|
+
const emailChangedEvent = new CustomEvent("userEmailChanged", {
|
|
33
|
+
detail: { email: contactMail.value }
|
|
34
|
+
});
|
|
35
|
+
window.dispatchEvent(emailChangedEvent);
|
|
36
|
+
alert('Email Updated');
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
stateChanged(state) {
|
|
41
|
+
this.login = state.frontend.login;
|
|
42
|
+
this.mail = state.backend.email;
|
|
43
|
+
}
|
|
44
|
+
handleEmail(event) {
|
|
45
|
+
const input = event.target;
|
|
46
|
+
this.mail = input.value;
|
|
47
|
+
}
|
|
48
|
+
static get styles() {
|
|
49
|
+
return [
|
|
50
|
+
labelStyle,
|
|
51
|
+
inputStyle,
|
|
52
|
+
buttonStyle,
|
|
53
53
|
css `
|
|
54
54
|
|
|
55
55
|
:host {
|
|
@@ -58,10 +58,10 @@ export class ContactEmail extends connect(store)(LitElement) {
|
|
|
58
58
|
|
|
59
59
|
form { display: grid; }
|
|
60
60
|
|
|
61
|
-
`
|
|
62
|
-
];
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
61
|
+
`
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
65
|
return html `
|
|
66
66
|
|
|
67
67
|
<form
|
|
@@ -86,20 +86,20 @@ export class ContactEmail extends connect(store)(LitElement) {
|
|
|
86
86
|
|
|
87
87
|
</form>
|
|
88
88
|
|
|
89
|
-
`;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
__decorate([
|
|
93
|
-
property({ type: String, reflect: true }),
|
|
94
|
-
__metadata("design:type", Object)
|
|
95
|
-
], ContactEmail.prototype, "email", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
state(),
|
|
98
|
-
__metadata("design:type", Boolean)
|
|
99
|
-
], ContactEmail.prototype, "login", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
state(),
|
|
102
|
-
__metadata("design:type", String)
|
|
103
|
-
], ContactEmail.prototype, "mail", void 0);
|
|
104
|
-
customElements.define('contact-email', ContactEmail);
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ type: String, reflect: true }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], ContactEmail.prototype, "email", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
state(),
|
|
98
|
+
__metadata("design:type", Boolean)
|
|
99
|
+
], ContactEmail.prototype, "login", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
state(),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], ContactEmail.prototype, "mail", void 0);
|
|
104
|
+
customElements.define('contact-email', ContactEmail);
|
|
105
105
|
//# sourceMappingURL=email.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/email.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EA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AC,IAAI,GAAK,KAAK,CAAC,OAAQ,CAAC,KAAK,CAAE;IACtC,CAAC;IAGO,WAAW,CAAC,KAAY;QAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,MAAM,KAAK,MAAM;QAAqB,OAAO;YAC3C,UAAU;YACV,UAAU;YACV,WAAW;YACX,GAAG,CAAA;;;;;;;;KAQF;SACA,CAAC;IAAC,CAAC;IAEN,MAAM;QACJ,OAAO,IAAI,CAAA;;;;iBAIE,IAAI,CAAC,OAAO;;;;;;;;;;2BAUF,IAAI,CAAC,WAAW;2BAChB,IAAI,CAAC,IAAI;;;;2BAIT,IAAI,CAAC,SAAS;2BACd,IAAI,CAAC,KAAK,KAAK,KAAK;;;;KAI1C,CAAC;IACJ,CAAC;CA8BF;AAzF2C;IAAzC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;2CAAY;AAEpC;IAAhB,KAAK,EAAE;;2CAAwC;AAC/B;IAAhB,KAAK,EAAE;;0CAAqC;AAwF/C,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC"}
|
|
@@ -1,32 +1,53 @@
|
|
|
1
|
-
import { CSSResultArray, LitElement } from "lit";
|
|
2
|
-
import { AppState } from "../../../store";
|
|
3
|
-
declare const InputName_base: (new (...args: any[]) => {
|
|
4
|
-
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
|
-
connectedCallback(): void;
|
|
6
|
-
disconnectedCallback(): void;
|
|
7
|
-
stateChanged(_state: {
|
|
8
|
-
frontend:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { CSSResultArray, LitElement } from "lit";
|
|
2
|
+
import { AppState } from "../../../store";
|
|
3
|
+
declare const InputName_base: (new (...args: any[]) => {
|
|
4
|
+
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
disconnectedCallback(): void;
|
|
7
|
+
stateChanged(_state: {
|
|
8
|
+
frontend: {
|
|
9
|
+
settings: string;
|
|
10
|
+
login: boolean;
|
|
11
|
+
drawer: boolean;
|
|
12
|
+
register: boolean;
|
|
13
|
+
userId: string;
|
|
14
|
+
customer: string;
|
|
15
|
+
profileChoice: string;
|
|
16
|
+
name: string;
|
|
17
|
+
photoURL: string;
|
|
18
|
+
phone: string;
|
|
19
|
+
email: string;
|
|
20
|
+
};
|
|
21
|
+
drawer: {
|
|
22
|
+
drawer: boolean;
|
|
23
|
+
};
|
|
24
|
+
backend: {
|
|
25
|
+
verified: boolean;
|
|
26
|
+
anon: boolean;
|
|
27
|
+
userId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
email: string;
|
|
30
|
+
photoURL: string;
|
|
31
|
+
phone: string;
|
|
32
|
+
msgToken: string;
|
|
33
|
+
};
|
|
34
|
+
}): void;
|
|
35
|
+
readonly isConnected: boolean;
|
|
36
|
+
}) & typeof LitElement;
|
|
37
|
+
export declare class InputName extends InputName_base {
|
|
38
|
+
value: string;
|
|
39
|
+
private login;
|
|
40
|
+
constructor();
|
|
41
|
+
stateChanged(state: AppState): void;
|
|
42
|
+
static get styles(): CSSResultArray;
|
|
43
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
44
|
+
private default;
|
|
45
|
+
private handleInput;
|
|
46
|
+
private alertProfile;
|
|
47
|
+
}
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
'input-name': InputName;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export {};
|