pwa-auth 3.2.3 → 3.2.4

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.
Files changed (131) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/README.md +55 -33
  3. package/{base → bundle/base}/css/form/button.d.ts +2 -2
  4. package/{base → bundle/base}/css/form/button.js +2 -2
  5. package/bundle/base/css/form/button.js.map +1 -0
  6. package/{base → bundle/base}/css/form/input.d.ts +2 -2
  7. package/{base → bundle/base}/css/form/input.js +2 -2
  8. package/bundle/base/css/form/input.js.map +1 -0
  9. package/{base → bundle/base}/css/form/label.d.ts +2 -2
  10. package/{base → bundle/base}/css/form/label.js +2 -2
  11. package/bundle/base/css/form/label.js.map +1 -0
  12. package/{base → bundle/base}/css/form/list.d.ts +2 -2
  13. package/{base → bundle/base}/css/form/list.js +2 -2
  14. package/bundle/base/css/form/list.js.map +1 -0
  15. package/{base → bundle/base}/css/svg.d.ts +3 -3
  16. package/{base → bundle/base}/css/svg.js +4 -4
  17. package/bundle/base/css/svg.js.map +1 -0
  18. package/{base → bundle/base}/css/toggle.d.ts +1 -1
  19. package/{base → bundle/base}/css/toggle.js +2 -2
  20. package/bundle/base/css/toggle.js.map +1 -0
  21. package/{base → bundle/base}/export/pwa-auth.d.ts +4 -4
  22. package/{base → bundle/base}/export/pwa-auth.js +4 -4
  23. package/bundle/base/export/pwa-auth.js.map +1 -0
  24. package/{base → bundle/base}/firebase/authentication.d.ts +10 -10
  25. package/{base → bundle/base}/firebase/authentication.js +10 -10
  26. package/bundle/base/firebase/authentication.js.map +1 -0
  27. package/{base → bundle/base}/firebase/interface.d.ts +4 -4
  28. package/{base → bundle/base}/firebase/interface.js +79 -79
  29. package/bundle/base/firebase/interface.js.map +1 -0
  30. package/{base → bundle/base}/redux/backend.d.ts +122 -113
  31. package/{base → bundle/base}/redux/backend.js +43 -43
  32. package/bundle/base/redux/backend.js.map +1 -0
  33. package/{base → bundle/base}/redux/drawer.d.ts +19 -17
  34. package/{base → bundle/base}/redux/drawer.js +21 -21
  35. package/bundle/base/redux/drawer.js.map +1 -0
  36. package/{base → bundle/base}/redux/frontend.d.ts +171 -159
  37. package/{base → bundle/base}/redux/frontend.js +67 -67
  38. package/bundle/base/redux/frontend.js.map +1 -0
  39. package/{base → bundle/base}/store.d.ts +60 -60
  40. package/{base → bundle/base}/store.js +13 -13
  41. package/bundle/base/store.js.map +1 -0
  42. package/{base → bundle/base}/webcomponents/drawer/css/drawer.d.ts +2 -2
  43. package/{base → bundle/base}/webcomponents/drawer/css/drawer.js +2 -2
  44. package/bundle/base/webcomponents/drawer/css/drawer.js.map +1 -0
  45. package/{base → bundle/base}/webcomponents/drawer/css/exit.d.ts +2 -2
  46. package/{base → bundle/base}/webcomponents/drawer/css/exit.js +2 -2
  47. package/bundle/base/webcomponents/drawer/css/exit.js.map +1 -0
  48. package/{base → bundle/base}/webcomponents/drawer/css/link.d.ts +2 -2
  49. package/{base → bundle/base}/webcomponents/drawer/css/link.js +2 -2
  50. package/bundle/base/webcomponents/drawer/css/link.js.map +1 -0
  51. package/{base → bundle/base}/webcomponents/drawer/css/paragraph.d.ts +2 -2
  52. package/{base → bundle/base}/webcomponents/drawer/css/paragraph.js +2 -2
  53. package/bundle/base/webcomponents/drawer/css/paragraph.js.map +1 -0
  54. package/{base → bundle/base}/webcomponents/drawer/css/toggle.d.ts +2 -2
  55. package/{base → bundle/base}/webcomponents/drawer/css/toggle.js +2 -2
  56. package/bundle/base/webcomponents/drawer/css/toggle.js.map +1 -0
  57. package/{base → bundle/base}/webcomponents/drawer/drawer.d.ts +57 -57
  58. package/{base → bundle/base}/webcomponents/drawer/drawer.js +93 -95
  59. package/bundle/base/webcomponents/drawer/drawer.js.map +1 -0
  60. package/{base → bundle/base}/webcomponents/drawer/input/login.d.ts +19 -19
  61. package/{base → bundle/base}/webcomponents/drawer/input/login.js +81 -83
  62. package/bundle/base/webcomponents/drawer/input/login.js.map +1 -0
  63. package/{base → bundle/base}/webcomponents/drawer/input/sign-up.d.ts +19 -19
  64. package/{base → bundle/base}/webcomponents/drawer/input/sign-up.js +88 -90
  65. package/bundle/base/webcomponents/drawer/input/sign-up.js.map +1 -0
  66. package/{base → bundle/base}/webcomponents/icon/css/icon.d.ts +1 -1
  67. package/{base → bundle/base}/webcomponents/icon/css/icon.js +2 -2
  68. package/bundle/base/webcomponents/icon/css/icon.js.map +1 -0
  69. package/{base → bundle/base}/webcomponents/icon/icon.d.ts +53 -53
  70. package/{base → bundle/base}/webcomponents/icon/icon.js +57 -59
  71. package/bundle/base/webcomponents/icon/icon.js.map +1 -0
  72. package/{base → bundle/base}/webcomponents/settings/css/navigation.d.ts +1 -1
  73. package/{base → bundle/base}/webcomponents/settings/css/navigation.js +2 -2
  74. package/bundle/base/webcomponents/settings/css/navigation.js.map +1 -0
  75. package/{base → bundle/base}/webcomponents/settings/input/delete.d.ts +54 -54
  76. package/{base → bundle/base}/webcomponents/settings/input/delete.js +71 -73
  77. package/bundle/base/webcomponents/settings/input/delete.js.map +1 -0
  78. package/{base → bundle/base}/webcomponents/settings/input/email.d.ts +54 -54
  79. package/{base → bundle/base}/webcomponents/settings/input/email.js +70 -72
  80. package/bundle/base/webcomponents/settings/input/email.js.map +1 -0
  81. package/{base → bundle/base}/webcomponents/settings/input/name.d.ts +53 -53
  82. package/{base → bundle/base}/webcomponents/settings/input/name.js +65 -67
  83. package/bundle/base/webcomponents/settings/input/name.js.map +1 -0
  84. package/{base → bundle/base}/webcomponents/settings/input/password.d.ts +56 -56
  85. package/{base → bundle/base}/webcomponents/settings/input/password.js +95 -97
  86. package/bundle/base/webcomponents/settings/input/password.js.map +1 -0
  87. package/{base → bundle/base}/webcomponents/settings/input/uploader.d.ts +57 -57
  88. package/{base → bundle/base}/webcomponents/settings/input/uploader.js +150 -150
  89. package/bundle/base/webcomponents/settings/input/uploader.js.map +1 -0
  90. package/{base → bundle/base}/webcomponents/settings/settings.d.ts +57 -57
  91. package/{base → bundle/base}/webcomponents/settings/settings.js +76 -78
  92. package/bundle/base/webcomponents/settings/settings.js.map +1 -0
  93. package/export/pwa-auth.ts +5 -4
  94. package/package.json +1 -1
  95. package/source/esm/pwa-auth.js.map +1 -1
  96. package/base/css/form/button.js.map +0 -1
  97. package/base/css/form/input.js.map +0 -1
  98. package/base/css/form/label.js.map +0 -1
  99. package/base/css/form/list.js.map +0 -1
  100. package/base/css/svg.js.map +0 -1
  101. package/base/css/toggle.js.map +0 -1
  102. package/base/export/auth-helpers.d.ts +0 -1
  103. package/base/export/auth-helpers.js +0 -2
  104. package/base/export/auth-helpers.js.map +0 -1
  105. package/base/export/pwa-auth.js.map +0 -1
  106. package/base/firebase/authentication.js.map +0 -1
  107. package/base/firebase/interface.js.map +0 -1
  108. package/base/redux/backend.js.map +0 -1
  109. package/base/redux/drawer.js.map +0 -1
  110. package/base/redux/frontend.js.map +0 -1
  111. package/base/redux/object.d.ts +0 -23
  112. package/base/redux/object.js +0 -2
  113. package/base/redux/object.js.map +0 -1
  114. package/base/store.js.map +0 -1
  115. package/base/webcomponents/drawer/css/drawer.js.map +0 -1
  116. package/base/webcomponents/drawer/css/exit.js.map +0 -1
  117. package/base/webcomponents/drawer/css/link.js.map +0 -1
  118. package/base/webcomponents/drawer/css/paragraph.js.map +0 -1
  119. package/base/webcomponents/drawer/css/toggle.js.map +0 -1
  120. package/base/webcomponents/drawer/drawer.js.map +0 -1
  121. package/base/webcomponents/drawer/input/login.js.map +0 -1
  122. package/base/webcomponents/drawer/input/sign-up.js.map +0 -1
  123. package/base/webcomponents/icon/css/icon.js.map +0 -1
  124. package/base/webcomponents/icon/icon.js.map +0 -1
  125. package/base/webcomponents/settings/css/navigation.js.map +0 -1
  126. package/base/webcomponents/settings/input/delete.js.map +0 -1
  127. package/base/webcomponents/settings/input/email.js.map +0 -1
  128. package/base/webcomponents/settings/input/name.js.map +0 -1
  129. package/base/webcomponents/settings/input/password.js.map +0 -1
  130. package/base/webcomponents/settings/input/uploader.js.map +0 -1
  131. package/base/webcomponents/settings/settings.js.map +0 -1
@@ -1,44 +1,34 @@
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
+ login = false;
18
+ email = '';
19
+ constructor() { super(); }
20
+ firstUpdated() {
21
+ this.shadowRoot.querySelector('.deleteUser').addEventListener('click', () => {
22
+ this.alertDelete();
23
+ });
24
+ }
25
+ stateChanged(state) {
26
+ this.login = state.frontend.login;
27
+ this.email = state.backend.email;
28
+ }
29
+ static get styles() {
30
+ return [
31
+ buttonStyle,
42
32
  css `
43
33
 
44
34
  :host {
@@ -50,10 +40,10 @@ export class DeleteUser extends connect(store)(LitElement) {
50
40
  padding: 0 16px;
51
41
  }
52
42
 
53
- `
54
- ];
55
- }
56
- render() {
43
+ `
44
+ ];
45
+ }
46
+ render() {
57
47
  return html `
58
48
 
59
49
  <p>Permanently delete the user account and data related to: ${this.email}</p>
@@ -62,32 +52,40 @@ export class DeleteUser extends connect(store)(LitElement) {
62
52
  class="action-button deleteUser"
63
53
  ?disabled="${this.login === false}">Delete</button>
64
54
 
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);
55
+ `;
56
+ }
57
+ alertDelete() { if (auth.currentUser) {
58
+ this.deleteUser();
59
+ }
60
+ else {
61
+ alert('Please Login');
62
+ } }
63
+ deleteUser() {
64
+ const d = confirm("Delete Account?");
65
+ if (d == true) {
66
+ this.officialDelete();
67
+ console.log("user gone");
68
+ }
69
+ else {
70
+ console.log("user here");
71
+ }
72
+ }
73
+ officialDelete = async () => {
74
+ if (auth.currentUser) {
75
+ return auth.currentUser.delete().then(() => { }).catch(() => { });
76
+ }
77
+ else {
78
+ alert('Please Sign-in');
79
+ }
80
+ };
81
+ }
82
+ __decorate([
83
+ state(),
84
+ __metadata("design:type", Boolean)
85
+ ], DeleteUser.prototype, "login", void 0);
86
+ __decorate([
87
+ state(),
88
+ __metadata("design:type", String)
89
+ ], DeleteUser.prototype, "email", void 0);
90
+ customElements.define('delete-user', DeleteUser);
93
91
  //# sourceMappingURL=delete.js.map
@@ -0,0 +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;IAEvC,KAAK,GAAa,KAAK,CAAC;IACxB,KAAK,GAAW,EAAE,CAAC;IAEpC,gBAAgB,KAAK,EAAE,CAAC,CAAC,CAAC;IAEhB,Y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AErE;aAAM;YAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;SAAE;IAEpC,CAAC,CAAC;CAEH;AAhEC;IAAC,KAAK,EAAE;;yCAAiC;AACzC;IAAC,KAAK,EAAE;;yCAA4B;AAiEtC,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC"}
@@ -1,54 +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
- 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
+ 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,39 @@
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
+ email = '';
21
+ login = false;
22
+ mail = "";
23
+ constructor() { super(); }
24
+ stateChanged(state) {
25
+ this.login = state.frontend.login;
26
+ this.mail = state.backend.email;
27
+ }
28
+ handleEmail(event) {
29
+ const input = event.target;
30
+ this.mail = input.value;
31
+ }
32
+ static get styles() {
33
+ return [
34
+ labelStyle,
35
+ inputStyle,
36
+ buttonStyle,
53
37
  css `
54
38
 
55
39
  :host {
@@ -58,10 +42,10 @@ export class ContactEmail extends connect(store)(LitElement) {
58
42
 
59
43
  form { display: grid; }
60
44
 
61
- `
62
- ];
63
- }
64
- render() {
45
+ `
46
+ ];
47
+ }
48
+ render() {
65
49
  return html `
66
50
 
67
51
  <form
@@ -86,20 +70,34 @@ export class ContactEmail extends connect(store)(LitElement) {
86
70
 
87
71
  </form>
88
72
 
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);
73
+ `;
74
+ }
75
+ default = (e) => {
76
+ e.preventDefault();
77
+ };
78
+ saveEmail = async () => {
79
+ if (auth.currentUser) {
80
+ let contactMail = this.shadowRoot?.querySelector('#pwa-email');
81
+ await updateEmail(auth.currentUser, contactMail.value).catch((error) => { console.log(error); });
82
+ const emailChangedEvent = new CustomEvent("userEmailChanged", {
83
+ detail: { email: contactMail.value }
84
+ });
85
+ window.dispatchEvent(emailChangedEvent);
86
+ alert('Email Updated');
87
+ }
88
+ };
89
+ }
90
+ __decorate([
91
+ property({ type: String, reflect: true }),
92
+ __metadata("design:type", Object)
93
+ ], ContactEmail.prototype, "email", void 0);
94
+ __decorate([
95
+ state(),
96
+ __metadata("design:type", Boolean)
97
+ ], ContactEmail.prototype, "login", void 0);
98
+ __decorate([
99
+ state(),
100
+ __metadata("design:type", String)
101
+ ], ContactEmail.prototype, "mail", void 0);
102
+ customElements.define('contact-email', ContactEmail);
105
103
  //# sourceMappingURL=email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.js","sourceRoot":"","sources":["../../../../../typescript/webcomponents/settings/input/email.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAO,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAe,aAAa,CAAC;AAC/C,OAAO,KAAmB,MAAO,gBAAgB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAkB,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAY,yBAAyB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAY,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAW,0BAA0B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAW,eAAe,CAAC;AAEjD,MAAM,OAAO,YAAa,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAGhB,KAAK,GAAG,EAAE,CAAC;IAEpC,KAAK,GAAoB,KAAK,CAAC;IAC/B,IAAI,GAAqB,EAAE,CAAC;IAE7C,gBAAgB,KAAK,EAAE,CAAC,CAAC,CAAC;IAE1B,YAAY,CAAC,KAAe;QAC1B,IAAI,CAAC,KAAK,GAAI,KAAK,CAAC,QAAS,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,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,C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C;AAwF/C,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC"}
@@ -1,53 +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
- 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 {};
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 {};