pwa-auth 3.2.2 → 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.
Files changed (83) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +4 -2
  3. package/base/css/form/button.d.ts +2 -2
  4. package/base/css/form/button.js +2 -2
  5. package/base/css/form/input.d.ts +2 -2
  6. package/base/css/form/input.js +2 -2
  7. package/base/css/form/label.d.ts +2 -2
  8. package/base/css/form/label.js +2 -2
  9. package/base/css/form/list.d.ts +2 -2
  10. package/base/css/form/list.js +2 -2
  11. package/base/css/svg.d.ts +3 -3
  12. package/base/css/svg.js +4 -4
  13. package/base/css/toggle.d.ts +1 -1
  14. package/base/css/toggle.js +2 -2
  15. package/base/export/pwa-auth.d.ts +4 -4
  16. package/base/export/pwa-auth.js +4 -4
  17. package/base/firebase/authentication.d.ts +10 -10
  18. package/base/firebase/authentication.js +10 -10
  19. package/base/firebase/interface.d.ts +4 -4
  20. package/base/firebase/interface.js +79 -79
  21. package/base/firebase/interface.js.map +1 -1
  22. package/base/redux/backend.d.ts +113 -15
  23. package/base/redux/backend.js +43 -43
  24. package/base/redux/backend.js.map +1 -1
  25. package/base/redux/drawer.d.ts +17 -19
  26. package/base/redux/drawer.js +21 -21
  27. package/base/redux/drawer.js.map +1 -1
  28. package/base/redux/frontend.d.ts +159 -16
  29. package/base/redux/frontend.js +67 -67
  30. package/base/redux/frontend.js.map +1 -1
  31. package/base/redux/object.d.ts +23 -23
  32. package/base/redux/object.js +1 -1
  33. package/base/store.d.ts +60 -18
  34. package/base/store.js +13 -13
  35. package/base/webcomponents/drawer/css/drawer.d.ts +2 -2
  36. package/base/webcomponents/drawer/css/drawer.js +2 -2
  37. package/base/webcomponents/drawer/css/exit.d.ts +2 -2
  38. package/base/webcomponents/drawer/css/exit.js +2 -2
  39. package/base/webcomponents/drawer/css/link.d.ts +2 -2
  40. package/base/webcomponents/drawer/css/link.js +2 -2
  41. package/base/webcomponents/drawer/css/paragraph.d.ts +2 -2
  42. package/base/webcomponents/drawer/css/paragraph.js +2 -2
  43. package/base/webcomponents/drawer/css/toggle.d.ts +2 -2
  44. package/base/webcomponents/drawer/css/toggle.js +2 -2
  45. package/base/webcomponents/drawer/drawer.d.ts +57 -36
  46. package/base/webcomponents/drawer/drawer.js +95 -95
  47. package/base/webcomponents/drawer/drawer.js.map +1 -1
  48. package/base/webcomponents/drawer/input/login.d.ts +19 -19
  49. package/base/webcomponents/drawer/input/login.js +83 -83
  50. package/base/webcomponents/drawer/input/login.js.map +1 -1
  51. package/base/webcomponents/drawer/input/sign-up.d.ts +19 -19
  52. package/base/webcomponents/drawer/input/sign-up.js +90 -90
  53. package/base/webcomponents/drawer/input/sign-up.js.map +1 -1
  54. package/base/webcomponents/icon/css/icon.d.ts +1 -1
  55. package/base/webcomponents/icon/css/icon.js +2 -2
  56. package/base/webcomponents/icon/icon.d.ts +53 -32
  57. package/base/webcomponents/icon/icon.js +59 -59
  58. package/base/webcomponents/icon/icon.js.map +1 -1
  59. package/base/webcomponents/settings/css/navigation.d.ts +1 -1
  60. package/base/webcomponents/settings/css/navigation.js +2 -2
  61. package/base/webcomponents/settings/input/delete.d.ts +54 -33
  62. package/base/webcomponents/settings/input/delete.js +73 -73
  63. package/base/webcomponents/settings/input/delete.js.map +1 -1
  64. package/base/webcomponents/settings/input/email.d.ts +54 -33
  65. package/base/webcomponents/settings/input/email.js +72 -72
  66. package/base/webcomponents/settings/input/email.js.map +1 -1
  67. package/base/webcomponents/settings/input/name.d.ts +53 -32
  68. package/base/webcomponents/settings/input/name.js +67 -67
  69. package/base/webcomponents/settings/input/name.js.map +1 -1
  70. package/base/webcomponents/settings/input/password.d.ts +56 -35
  71. package/base/webcomponents/settings/input/password.js +97 -97
  72. package/base/webcomponents/settings/input/password.js.map +1 -1
  73. package/base/webcomponents/settings/input/uploader.d.ts +57 -36
  74. package/base/webcomponents/settings/input/uploader.js +150 -150
  75. package/base/webcomponents/settings/input/uploader.js.map +1 -1
  76. package/base/webcomponents/settings/settings.d.ts +57 -36
  77. package/base/webcomponents/settings/settings.js +78 -78
  78. package/base/webcomponents/settings/settings.js.map +1 -1
  79. package/package.json +6 -8
  80. package/source/esm/pwa-auth.js +881 -0
  81. package/source/esm/pwa-auth.js.map +1 -0
  82. package/export/auth-helpers.ts +0 -1
  83. package/export/export/tsconfigs.production.md +0 -53
@@ -1,58 +1,58 @@
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 { updateProfile } from "firebase/auth";
15
- import { accName } from "../../../redux/backend";
16
- import { auth } from "../../../firebase/authentication";
17
- import { labelStyle } from "../../../css/form/label";
18
- import { inputStyle } from "../../../css/form/input";
19
- import { buttonStyle } from "../../../css/form/button";
20
- export class InputName extends connect(store)(LitElement) {
21
- constructor() {
22
- super();
23
- this.value = '';
24
- this.login = false;
25
- this.default = (e) => {
26
- e.preventDefault();
27
- };
28
- this.alertProfile = async () => {
29
- if (auth.currentUser) {
30
- await updateProfile(auth.currentUser, { displayName: this.value })
31
- .then(() => { store.dispatch(accName(this.value)); })
32
- .then(() => { alert('updated name:' + this.value); });
33
- }
34
- else {
35
- alert('Please Login');
36
- }
37
- };
38
- }
39
- stateChanged(state) {
40
- this.login = state.frontend.login;
41
- this.value = state.backend.name;
42
- }
43
- static get styles() {
44
- return [
45
- labelStyle,
46
- inputStyle,
47
- 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 { updateProfile } from "firebase/auth";
15
+ import { accName } from "../../../redux/backend";
16
+ import { auth } from "../../../firebase/authentication";
17
+ import { labelStyle } from "../../../css/form/label";
18
+ import { inputStyle } from "../../../css/form/input";
19
+ import { buttonStyle } from "../../../css/form/button";
20
+ export class InputName extends connect(store)(LitElement) {
21
+ constructor() {
22
+ super();
23
+ this.value = '';
24
+ this.login = false;
25
+ this.default = (e) => {
26
+ e.preventDefault();
27
+ };
28
+ this.alertProfile = async () => {
29
+ if (auth.currentUser) {
30
+ await updateProfile(auth.currentUser, { displayName: this.value })
31
+ .then(() => { store.dispatch(accName(this.value)); })
32
+ .then(() => { alert('updated name:' + this.value); });
33
+ }
34
+ else {
35
+ alert('Please Login');
36
+ }
37
+ };
38
+ }
39
+ stateChanged(state) {
40
+ this.login = state.frontend.login;
41
+ this.value = state.backend.name;
42
+ }
43
+ static get styles() {
44
+ return [
45
+ labelStyle,
46
+ inputStyle,
47
+ buttonStyle,
48
48
  css `
49
49
 
50
50
  :host, form { display: grid; }
51
51
 
52
- `
53
- ];
54
- }
55
- render() {
52
+ `
53
+ ];
54
+ }
55
+ render() {
56
56
  return html `
57
57
 
58
58
  <form
@@ -77,20 +77,20 @@ export class InputName extends connect(store)(LitElement) {
77
77
 
78
78
  </form>
79
79
 
80
- `;
81
- }
82
- handleInput(event) {
83
- const input = event.target;
84
- this.value = input.value;
85
- }
86
- }
87
- __decorate([
88
- property({ type: String, reflect: true }),
89
- __metadata("design:type", Object)
90
- ], InputName.prototype, "value", void 0);
91
- __decorate([
92
- state(),
93
- __metadata("design:type", Boolean)
94
- ], InputName.prototype, "login", void 0);
95
- customElements.define('input-name', InputName);
80
+ `;
81
+ }
82
+ handleInput(event) {
83
+ const input = event.target;
84
+ this.value = input.value;
85
+ }
86
+ }
87
+ __decorate([
88
+ property({ type: String, reflect: true }),
89
+ __metadata("design:type", Object)
90
+ ], InputName.prototype, "value", void 0);
91
+ __decorate([
92
+ state(),
93
+ __metadata("design:type", Boolean)
94
+ ], InputName.prototype, "login", void 0);
95
+ customElements.define('input-name', InputName);
96
96
  //# sourceMappingURL=name.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"name.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/name.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAS,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAiB,aAAa,CAAC;AACjD,OAAO,EAAE,KAAK,EAAY,MAAS,gBAAgB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAW,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAiB,wBAAwB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAoB,kCAAkC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAc,yB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AC;IAQO,WAAW,CAAC,KAAY;QAC9B,MAAM,KAAK,GAAK,KAAK,CAAC,MAA0B,CAAC;QACjD,IAAI,CAAC,KAAK,GAAM,KAAK,CAAC,KAAK,CAAC;IAC9B,CAAC;CAkBF;AA5EkD;IAAhD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;wCAAmB;AAE3C;IAAhB,KAAK,EAAE;;wCAAiC;AA4E3C,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC"}
@@ -1,35 +1,56 @@
1
- import { CSSResultArray, LitElement } from "lit";
2
- import { AppState } from "../../../store";
3
- declare const InputPassword_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 InputPassword extends InputPassword_base {
17
- private message;
18
- private password;
19
- private login;
20
- constructor();
21
- protected firstUpdated(): void;
22
- stateChanged(state: AppState): void;
23
- private handleInputChange;
24
- static get styles(): CSSResultArray;
25
- render(): import("lit-html").TemplateResult<1>;
26
- private default;
27
- private alertPassword;
28
- private updatePass;
29
- }
30
- declare global {
31
- interface HTMLElementTagNameMap {
32
- 'input-password': InputPassword;
33
- }
34
- }
35
- export {};
1
+ import { CSSResultArray, LitElement } from "lit";
2
+ import { AppState } from "../../../store";
3
+ declare const InputPassword_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 InputPassword extends InputPassword_base {
38
+ private message;
39
+ private password;
40
+ private login;
41
+ constructor();
42
+ protected firstUpdated(): void;
43
+ stateChanged(state: AppState): void;
44
+ private handleInputChange;
45
+ static get styles(): CSSResultArray;
46
+ render(): import("lit-html").TemplateResult<1>;
47
+ private default;
48
+ private alertPassword;
49
+ private updatePass;
50
+ }
51
+ declare global {
52
+ interface HTMLElementTagNameMap {
53
+ 'input-password': InputPassword;
54
+ }
55
+ }
56
+ export {};
@@ -1,58 +1,58 @@
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 { 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 { updatePassword } from "firebase/auth";
19
- export class InputPassword extends connect(store)(LitElement) {
20
- constructor() {
21
- super();
22
- this.message = '';
23
- this.password = '';
24
- this.login = false;
25
- this.default = (e) => {
26
- e.preventDefault();
27
- };
28
- this.updatePass = async (newPassword) => {
29
- if (auth.currentUser) {
30
- await updatePassword(auth.currentUser, newPassword)
31
- .then(() => { console.log("Password successful!"); })
32
- .catch((error) => { console.log("Problem: " + error.messge); });
33
- }
34
- else {
35
- alert('Please Login');
36
- }
37
- };
38
- }
39
- firstUpdated() {
40
- this.shadowRoot.querySelector('.pass').addEventListener('click', () => {
41
- this.alertPassword();
42
- });
43
- }
44
- stateChanged(state) {
45
- this.login = state.frontend.login;
46
- }
47
- handleInputChange(event) {
48
- const input = event.target;
49
- this.password = input.value;
50
- }
51
- static get styles() {
52
- return [
53
- labelStyle,
54
- inputStyle,
55
- 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 { 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 { updatePassword } from "firebase/auth";
19
+ export class InputPassword extends connect(store)(LitElement) {
20
+ constructor() {
21
+ super();
22
+ this.message = '';
23
+ this.password = '';
24
+ this.login = false;
25
+ this.default = (e) => {
26
+ e.preventDefault();
27
+ };
28
+ this.updatePass = async (newPassword) => {
29
+ if (auth.currentUser) {
30
+ await updatePassword(auth.currentUser, newPassword)
31
+ .then(() => { console.log("Password successful!"); })
32
+ .catch((error) => { console.log("Problem: " + error.messge); });
33
+ }
34
+ else {
35
+ alert('Please Login');
36
+ }
37
+ };
38
+ }
39
+ firstUpdated() {
40
+ this.shadowRoot.querySelector('.pass').addEventListener('click', () => {
41
+ this.alertPassword();
42
+ });
43
+ }
44
+ stateChanged(state) {
45
+ this.login = state.frontend.login;
46
+ }
47
+ handleInputChange(event) {
48
+ const input = event.target;
49
+ this.password = input.value;
50
+ }
51
+ static get styles() {
52
+ return [
53
+ labelStyle,
54
+ inputStyle,
55
+ buttonStyle,
56
56
  css `
57
57
 
58
58
  :host{
@@ -63,10 +63,10 @@ export class InputPassword extends connect(store)(LitElement) {
63
63
 
64
64
  p.error { color: red; }
65
65
 
66
- `
67
- ];
68
- }
69
- render() {
66
+ `
67
+ ];
68
+ }
69
+ render() {
70
70
  return html `
71
71
 
72
72
  <form
@@ -111,42 +111,42 @@ export class InputPassword extends connect(store)(LitElement) {
111
111
 
112
112
  </form>
113
113
 
114
- `;
115
- }
116
- alertPassword() {
117
- if (!this.password) {
118
- this.message = 'Please enter a password';
119
- }
120
- else if (this.password.length < 8) {
121
- this.message = 'Password must be at least 8 characters long';
122
- }
123
- else {
124
- this.message = `Password entered:`;
125
- if (!/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.test(this.password)) {
126
- this.message = 'Password must include letters, numbers, and be 8+ characters';
127
- }
128
- else {
129
- if (auth.currentUser) {
130
- this.updatePass(this.password);
131
- }
132
- else {
133
- alert('Please Login');
134
- }
135
- }
136
- }
137
- }
138
- }
139
- __decorate([
140
- state(),
141
- __metadata("design:type", String)
142
- ], InputPassword.prototype, "message", void 0);
143
- __decorate([
144
- state(),
145
- __metadata("design:type", String)
146
- ], InputPassword.prototype, "password", void 0);
147
- __decorate([
148
- state(),
149
- __metadata("design:type", Boolean)
150
- ], InputPassword.prototype, "login", void 0);
151
- customElements.define('input-password', InputPassword);
114
+ `;
115
+ }
116
+ alertPassword() {
117
+ if (!this.password) {
118
+ this.message = 'Please enter a password';
119
+ }
120
+ else if (this.password.length < 8) {
121
+ this.message = 'Password must be at least 8 characters long';
122
+ }
123
+ else {
124
+ this.message = `Password entered:`;
125
+ if (!/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.test(this.password)) {
126
+ this.message = 'Password must include letters, numbers, and be 8+ characters';
127
+ }
128
+ else {
129
+ if (auth.currentUser) {
130
+ this.updatePass(this.password);
131
+ }
132
+ else {
133
+ alert('Please Login');
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ __decorate([
140
+ state(),
141
+ __metadata("design:type", String)
142
+ ], InputPassword.prototype, "message", void 0);
143
+ __decorate([
144
+ state(),
145
+ __metadata("design:type", String)
146
+ ], InputPassword.prototype, "password", void 0);
147
+ __decorate([
148
+ state(),
149
+ __metadata("design:type", Boolean)
150
+ ], InputPassword.prototype, "login", void 0);
151
+ customElements.define('input-password', InputPassword);
152
152
  //# sourceMappingURL=password.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"password.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/settings/input/password.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAkB,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAiB,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,EA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,CAAC,CAAC,OAAO;;;gBAG9D,IAAI,CAAC,OAAO;;;;WAIjB,CAAC,CAAC,CAAC,EACN;;;;KAIH,CAAC;IACJ,CAAC;IAQO,aAAa;QAEnB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;QAC3C,CAAC;aAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,GAAG,6CAA6C,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC;YAEnC,IAAI,CAAC,wCAAwC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAClE,IAAI,CAAC,OAAO,GAAG,8DAA8D,CAAC;YAChF,CAAC;iBAAM,CAAC;gBAEN,IAAI,IAAI,CAAC,WAAW,EAAM,CAAC;oBAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAAC,CAAC;qBACnC,CAAC;oBAAC,KAAK,CAAC,cAAc,CAAC,CAAC;gBAAC,CAAC;YAEtD,CAAC;QAEH,CAAC;IAEH,CAAC;CAgBF;AAnIkB;IAAhB,KAAK,EAAE;;8CAAqC;AAC5B;IAAhB,KAAK,EAAE;;+CAAqC;AAC5B;IAAhB,KAAK,EAAE;;4CAAwC;AAmIlD,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC"}
@@ -1,36 +1,57 @@
1
- import { LitElement, CSSResultArray } from 'lit';
2
- import { AppState } from '../../../store';
3
- declare const ContactPhoto_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 ContactPhoto extends ContactPhoto_base {
17
- photo: string | void | any;
18
- emptyArtwork: string;
19
- private user;
20
- private login;
21
- private progress;
22
- private error;
23
- private status;
24
- constructor();
25
- stateChanged(state: AppState): void;
26
- static get styles(): CSSResultArray;
27
- protected render(): import("lit-html").TemplateResult<1>;
28
- private saveImage;
29
- private dispatchPhoto;
30
- }
31
- declare global {
32
- interface HTMLElementTagNameMap {
33
- 'contact-photo': ContactPhoto;
34
- }
35
- }
36
- export {};
1
+ import { LitElement, CSSResultArray } from 'lit';
2
+ import { AppState } from '../../../store';
3
+ declare const ContactPhoto_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 ContactPhoto extends ContactPhoto_base {
38
+ photo: string | void | any;
39
+ emptyArtwork: string;
40
+ private user;
41
+ private login;
42
+ private progress;
43
+ private error;
44
+ private status;
45
+ constructor();
46
+ stateChanged(state: AppState): void;
47
+ static get styles(): CSSResultArray;
48
+ protected render(): import("lit-html").TemplateResult<1>;
49
+ private saveImage;
50
+ private dispatchPhoto;
51
+ }
52
+ declare global {
53
+ interface HTMLElementTagNameMap {
54
+ 'contact-photo': ContactPhoto;
55
+ }
56
+ }
57
+ export {};