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.
- package/CHANGELOG.md +7 -1
- package/README.md +55 -33
- package/{base → bundle/base}/css/form/button.d.ts +2 -2
- package/{base → bundle/base}/css/form/button.js +2 -2
- package/bundle/base/css/form/button.js.map +1 -0
- package/{base → bundle/base}/css/form/input.d.ts +2 -2
- package/{base → bundle/base}/css/form/input.js +2 -2
- package/bundle/base/css/form/input.js.map +1 -0
- package/{base → bundle/base}/css/form/label.d.ts +2 -2
- package/{base → bundle/base}/css/form/label.js +2 -2
- package/bundle/base/css/form/label.js.map +1 -0
- package/{base → bundle/base}/css/form/list.d.ts +2 -2
- package/{base → bundle/base}/css/form/list.js +2 -2
- package/bundle/base/css/form/list.js.map +1 -0
- package/{base → bundle/base}/css/svg.d.ts +3 -3
- package/{base → bundle/base}/css/svg.js +4 -4
- package/bundle/base/css/svg.js.map +1 -0
- package/{base → bundle/base}/css/toggle.d.ts +1 -1
- package/{base → bundle/base}/css/toggle.js +2 -2
- package/bundle/base/css/toggle.js.map +1 -0
- package/{base → bundle/base}/export/pwa-auth.d.ts +4 -4
- package/{base → bundle/base}/export/pwa-auth.js +4 -4
- package/bundle/base/export/pwa-auth.js.map +1 -0
- package/{base → bundle/base}/firebase/authentication.d.ts +10 -10
- package/{base → bundle/base}/firebase/authentication.js +10 -10
- package/bundle/base/firebase/authentication.js.map +1 -0
- package/{base → bundle/base}/firebase/interface.d.ts +4 -4
- package/{base → bundle/base}/firebase/interface.js +79 -79
- package/bundle/base/firebase/interface.js.map +1 -0
- package/{base → bundle/base}/redux/backend.d.ts +122 -113
- package/{base → bundle/base}/redux/backend.js +43 -43
- package/bundle/base/redux/backend.js.map +1 -0
- package/{base → bundle/base}/redux/drawer.d.ts +19 -17
- package/{base → bundle/base}/redux/drawer.js +21 -21
- package/bundle/base/redux/drawer.js.map +1 -0
- package/{base → bundle/base}/redux/frontend.d.ts +171 -159
- package/{base → bundle/base}/redux/frontend.js +67 -67
- package/bundle/base/redux/frontend.js.map +1 -0
- package/{base → bundle/base}/store.d.ts +60 -60
- package/{base → bundle/base}/store.js +13 -13
- package/bundle/base/store.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/css/drawer.d.ts +2 -2
- package/{base → bundle/base}/webcomponents/drawer/css/drawer.js +2 -2
- package/bundle/base/webcomponents/drawer/css/drawer.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/css/exit.d.ts +2 -2
- package/{base → bundle/base}/webcomponents/drawer/css/exit.js +2 -2
- package/bundle/base/webcomponents/drawer/css/exit.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/css/link.d.ts +2 -2
- package/{base → bundle/base}/webcomponents/drawer/css/link.js +2 -2
- package/bundle/base/webcomponents/drawer/css/link.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/css/paragraph.d.ts +2 -2
- package/{base → bundle/base}/webcomponents/drawer/css/paragraph.js +2 -2
- package/bundle/base/webcomponents/drawer/css/paragraph.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/css/toggle.d.ts +2 -2
- package/{base → bundle/base}/webcomponents/drawer/css/toggle.js +2 -2
- package/bundle/base/webcomponents/drawer/css/toggle.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/drawer.d.ts +57 -57
- package/{base → bundle/base}/webcomponents/drawer/drawer.js +93 -95
- package/bundle/base/webcomponents/drawer/drawer.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/input/login.d.ts +19 -19
- package/{base → bundle/base}/webcomponents/drawer/input/login.js +81 -83
- package/bundle/base/webcomponents/drawer/input/login.js.map +1 -0
- package/{base → bundle/base}/webcomponents/drawer/input/sign-up.d.ts +19 -19
- package/{base → bundle/base}/webcomponents/drawer/input/sign-up.js +88 -90
- package/bundle/base/webcomponents/drawer/input/sign-up.js.map +1 -0
- package/{base → bundle/base}/webcomponents/icon/css/icon.d.ts +1 -1
- package/{base → bundle/base}/webcomponents/icon/css/icon.js +2 -2
- package/bundle/base/webcomponents/icon/css/icon.js.map +1 -0
- package/{base → bundle/base}/webcomponents/icon/icon.d.ts +53 -53
- package/{base → bundle/base}/webcomponents/icon/icon.js +57 -59
- package/bundle/base/webcomponents/icon/icon.js.map +1 -0
- package/{base → bundle/base}/webcomponents/settings/css/navigation.d.ts +1 -1
- package/{base → bundle/base}/webcomponents/settings/css/navigation.js +2 -2
- package/bundle/base/webcomponents/settings/css/navigation.js.map +1 -0
- package/{base → bundle/base}/webcomponents/settings/input/delete.d.ts +54 -54
- package/{base → bundle/base}/webcomponents/settings/input/delete.js +71 -73
- package/bundle/base/webcomponents/settings/input/delete.js.map +1 -0
- package/{base → bundle/base}/webcomponents/settings/input/email.d.ts +54 -54
- package/{base → bundle/base}/webcomponents/settings/input/email.js +70 -72
- package/bundle/base/webcomponents/settings/input/email.js.map +1 -0
- package/{base → bundle/base}/webcomponents/settings/input/name.d.ts +53 -53
- package/{base → bundle/base}/webcomponents/settings/input/name.js +65 -67
- package/bundle/base/webcomponents/settings/input/name.js.map +1 -0
- package/{base → bundle/base}/webcomponents/settings/input/password.d.ts +56 -56
- package/{base → bundle/base}/webcomponents/settings/input/password.js +95 -97
- package/bundle/base/webcomponents/settings/input/password.js.map +1 -0
- package/{base → bundle/base}/webcomponents/settings/input/uploader.d.ts +57 -57
- package/{base → bundle/base}/webcomponents/settings/input/uploader.js +150 -150
- package/bundle/base/webcomponents/settings/input/uploader.js.map +1 -0
- package/{base → bundle/base}/webcomponents/settings/settings.d.ts +57 -57
- package/{base → bundle/base}/webcomponents/settings/settings.js +76 -78
- package/bundle/base/webcomponents/settings/settings.js.map +1 -0
- package/export/pwa-auth.ts +5 -4
- package/package.json +1 -1
- package/source/esm/pwa-auth.js.map +1 -1
- package/base/css/form/button.js.map +0 -1
- package/base/css/form/input.js.map +0 -1
- package/base/css/form/label.js.map +0 -1
- package/base/css/form/list.js.map +0 -1
- package/base/css/svg.js.map +0 -1
- package/base/css/toggle.js.map +0 -1
- package/base/export/auth-helpers.d.ts +0 -1
- package/base/export/auth-helpers.js +0 -2
- package/base/export/auth-helpers.js.map +0 -1
- package/base/export/pwa-auth.js.map +0 -1
- package/base/firebase/authentication.js.map +0 -1
- package/base/firebase/interface.js.map +0 -1
- package/base/redux/backend.js.map +0 -1
- package/base/redux/drawer.js.map +0 -1
- package/base/redux/frontend.js.map +0 -1
- package/base/redux/object.d.ts +0 -23
- package/base/redux/object.js +0 -2
- package/base/redux/object.js.map +0 -1
- package/base/store.js.map +0 -1
- package/base/webcomponents/drawer/css/drawer.js.map +0 -1
- package/base/webcomponents/drawer/css/exit.js.map +0 -1
- package/base/webcomponents/drawer/css/link.js.map +0 -1
- package/base/webcomponents/drawer/css/paragraph.js.map +0 -1
- package/base/webcomponents/drawer/css/toggle.js.map +0 -1
- package/base/webcomponents/drawer/drawer.js.map +0 -1
- package/base/webcomponents/drawer/input/login.js.map +0 -1
- package/base/webcomponents/drawer/input/sign-up.js.map +0 -1
- package/base/webcomponents/icon/css/icon.js.map +0 -1
- package/base/webcomponents/icon/icon.js.map +0 -1
- package/base/webcomponents/settings/css/navigation.js.map +0 -1
- package/base/webcomponents/settings/input/delete.js.map +0 -1
- package/base/webcomponents/settings/input/email.js.map +0 -1
- package/base/webcomponents/settings/input/name.js.map +0 -1
- package/base/webcomponents/settings/input/password.js.map +0 -1
- package/base/webcomponents/settings/input/uploader.js.map +0 -1
- package/base/webcomponents/settings/settings.js.map +0 -1
|
@@ -1,58 +1,43 @@
|
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
value = '';
|
|
22
|
+
login = false;
|
|
23
|
+
constructor() { super(); }
|
|
24
|
+
stateChanged(state) {
|
|
25
|
+
this.login = state.frontend.login;
|
|
26
|
+
this.value = state.backend.name;
|
|
27
|
+
}
|
|
28
|
+
static get styles() {
|
|
29
|
+
return [
|
|
30
|
+
labelStyle,
|
|
31
|
+
inputStyle,
|
|
32
|
+
buttonStyle,
|
|
48
33
|
css `
|
|
49
34
|
|
|
50
35
|
:host, form { display: grid; }
|
|
51
36
|
|
|
52
|
-
`
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
render() {
|
|
37
|
+
`
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
56
41
|
return html `
|
|
57
42
|
|
|
58
43
|
<form
|
|
@@ -77,20 +62,33 @@ export class InputName extends connect(store)(LitElement) {
|
|
|
77
62
|
|
|
78
63
|
</form>
|
|
79
64
|
|
|
80
|
-
`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
default = (e) => {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
};
|
|
70
|
+
handleInput(event) {
|
|
71
|
+
const input = event.target;
|
|
72
|
+
this.value = input.value;
|
|
73
|
+
}
|
|
74
|
+
alertProfile = async () => {
|
|
75
|
+
if (auth.currentUser) {
|
|
76
|
+
await updateProfile(auth.currentUser, { displayName: this.value })
|
|
77
|
+
.then(() => { store.dispatch(accName(this.value)); })
|
|
78
|
+
.then(() => { alert('updated name:' + this.value); });
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
alert('Please Login');
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: String, reflect: true }),
|
|
87
|
+
__metadata("design:type", Object)
|
|
88
|
+
], InputName.prototype, "value", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
state(),
|
|
91
|
+
__metadata("design:type", Boolean)
|
|
92
|
+
], InputName.prototype, "login", void 0);
|
|
93
|
+
customElements.define('input-name', InputName);
|
|
96
94
|
//# sourceMappingURL=name.js.map
|
|
@@ -0,0 +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,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AM,KAAK,CAAC,KAAK,CAAC;IAC9B,CAAC;IAEO,YAAY,GAAG,KAAK,IAAI,EAAE;QAGhC,IAAI,IAAI,CAAC,WAAW,EAAE;YAEpB,MAAM,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;iBACjE,IAAI,CAAE,GAAG,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;iBACpD,IAAI,CAAE,GAAG,EAAE,GAAG,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAExD;aAAM;YAAE,KAAK,CAAC,cAAc,CAAC,CAAC;SAAE;IAEnC,CAAC,CAAA;CAKF;AA5EC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;wCAAmB;AAE5D;IAAC,KAAK,EAAE;;wCAAiC;AA4E3C,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -1,56 +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: {
|
|
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
|
+
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,43 @@
|
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
+
message = '';
|
|
21
|
+
password = '';
|
|
22
|
+
login = false;
|
|
23
|
+
constructor() { super(); }
|
|
24
|
+
firstUpdated() {
|
|
25
|
+
this.shadowRoot.querySelector('.pass').addEventListener('click', () => {
|
|
26
|
+
this.alertPassword();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
stateChanged(state) {
|
|
30
|
+
this.login = state.frontend.login;
|
|
31
|
+
}
|
|
32
|
+
handleInputChange(event) {
|
|
33
|
+
const input = event.target;
|
|
34
|
+
this.password = input.value;
|
|
35
|
+
}
|
|
36
|
+
static get styles() {
|
|
37
|
+
return [
|
|
38
|
+
labelStyle,
|
|
39
|
+
inputStyle,
|
|
40
|
+
buttonStyle,
|
|
56
41
|
css `
|
|
57
42
|
|
|
58
43
|
:host{
|
|
@@ -63,10 +48,10 @@ export class InputPassword extends connect(store)(LitElement) {
|
|
|
63
48
|
|
|
64
49
|
p.error { color: red; }
|
|
65
50
|
|
|
66
|
-
`
|
|
67
|
-
];
|
|
68
|
-
}
|
|
69
|
-
render() {
|
|
51
|
+
`
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
70
55
|
return html `
|
|
71
56
|
|
|
72
57
|
<form
|
|
@@ -111,42 +96,55 @@ export class InputPassword extends connect(store)(LitElement) {
|
|
|
111
96
|
|
|
112
97
|
</form>
|
|
113
98
|
|
|
114
|
-
`;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.message = '
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
this.message =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
99
|
+
`;
|
|
100
|
+
}
|
|
101
|
+
default = (e) => {
|
|
102
|
+
e.preventDefault();
|
|
103
|
+
};
|
|
104
|
+
alertPassword() {
|
|
105
|
+
if (!this.password) {
|
|
106
|
+
this.message = 'Please enter a password';
|
|
107
|
+
}
|
|
108
|
+
else if (this.password.length < 8) {
|
|
109
|
+
this.message = 'Password must be at least 8 characters long';
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
this.message = `Password entered:`;
|
|
113
|
+
if (!/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.test(this.password)) {
|
|
114
|
+
this.message = 'Password must include letters, numbers, and be 8+ characters';
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
if (auth.currentUser) {
|
|
118
|
+
this.updatePass(this.password);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
alert('Please Login');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
updatePass = async (newPassword) => {
|
|
127
|
+
if (auth.currentUser) {
|
|
128
|
+
await updatePassword(auth.currentUser, newPassword)
|
|
129
|
+
.then(() => { console.log("Password successful!"); })
|
|
130
|
+
.catch((error) => { console.log("Problem: " + error.messge); });
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
alert('Please Login');
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
__decorate([
|
|
138
|
+
state(),
|
|
139
|
+
__metadata("design:type", String)
|
|
140
|
+
], InputPassword.prototype, "message", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
state(),
|
|
143
|
+
__metadata("design:type", String)
|
|
144
|
+
], InputPassword.prototype, "password", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
state(),
|
|
147
|
+
__metadata("design:type", Boolean)
|
|
148
|
+
], InputPassword.prototype, "login", void 0);
|
|
149
|
+
customElements.define('input-password', InputPassword);
|
|
152
150
|
//# sourceMappingURL=password.js.map
|
|
@@ -0,0 +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,EAAE,MAAY,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAG,MAAU,0BAA0B,CAA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AAC,KAAK,EAAE;;+CAAqC;AAC7C;IAAC,KAAK,EAAE;;4CAAwC;AAmIlD,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -1,57 +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: {
|
|
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 {};
|
|
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 {};
|