pwa-auth 1.1.5 → 1.1.6
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 +5 -4
- package/demo/index.html +2 -4
- package/demo/styles.css +8 -3
- package/deploy/custom-elements/drawer/drawer.d.ts +4 -3
- package/deploy/custom-elements/drawer/drawer.d.ts.map +1 -1
- package/deploy/custom-elements/drawer/drawer.js +46 -13
- package/deploy/custom-elements/icon/icon.d.ts +1 -0
- package/deploy/custom-elements/icon/icon.d.ts.map +1 -1
- package/deploy/custom-elements/icon/icon.js +6 -2
- package/deploy/custom-elements/settings/settings.d.ts.map +1 -1
- package/deploy/custom-elements/settings/settings.js +0 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,11 @@ Removed - for now removed features.
|
|
|
12
12
|
Fixed - for any bug fixes.
|
|
13
13
|
Security - in case of vulnerabilities.
|
|
14
14
|
|
|
15
|
+
# [1.1.6] - 2025-08-25
|
|
16
|
+
|
|
17
|
+
## Changed
|
|
18
|
+
- Drawer - should be the custome element itself, not internal wrapper
|
|
19
|
+
|
|
15
20
|
# [1.0.8] - 2025-08-23
|
|
16
21
|
|
|
17
22
|
## Changed
|
package/README.md
CHANGED
|
@@ -58,12 +58,13 @@ import 'pwa-auth';
|
|
|
58
58
|
# Website Setup:
|
|
59
59
|
```html
|
|
60
60
|
<header>
|
|
61
|
-
|
|
61
|
+
<!-- Indicate the 'register' boolean for 'subscribe state' -->
|
|
62
|
+
<!-- else 'login state' -->
|
|
63
|
+
<user-icon register></user-icon>
|
|
62
64
|
</header>
|
|
63
65
|
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
</user-drawer>
|
|
66
|
+
<!-- Indicate where the <pwa-settings> Tag will be Paged-->
|
|
67
|
+
<user-drawer url="/settings"></user-drawer>
|
|
67
68
|
|
|
68
69
|
<main>
|
|
69
70
|
<user-settings></user-settings>
|
package/demo/index.html
CHANGED
|
@@ -42,12 +42,10 @@
|
|
|
42
42
|
<body>
|
|
43
43
|
|
|
44
44
|
<!-- Button -->
|
|
45
|
-
<header><user-icon
|
|
45
|
+
<header><user-icon register></user-icon></header>
|
|
46
46
|
|
|
47
47
|
<!-- Drawer -->
|
|
48
|
-
<user-drawer>
|
|
49
|
-
<p><a href="/settings">Settings</a></p>
|
|
50
|
-
</user-drawer>
|
|
48
|
+
<user-drawer url="/demo/settings"></user-drawer>
|
|
51
49
|
|
|
52
50
|
<!-- Settings -->
|
|
53
51
|
<main><user-settings></user-settings></main>
|
package/demo/styles.css
CHANGED
|
@@ -19,17 +19,22 @@ body {
|
|
|
19
19
|
|
|
20
20
|
body {
|
|
21
21
|
display: grid;
|
|
22
|
+
grid-gap: 16px;
|
|
22
23
|
grid-template-areas:
|
|
23
24
|
"head"
|
|
24
|
-
"drawer"
|
|
25
25
|
"main";
|
|
26
|
-
grid-template-rows: auto
|
|
26
|
+
grid-template-rows: auto 1fr;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
header { grid-area: head; }
|
|
30
|
-
user-drawer { grid-area: drawer; }
|
|
31
30
|
main { grid-area: main; }
|
|
32
31
|
|
|
32
|
+
main {
|
|
33
|
+
border: 2px solid black;
|
|
34
|
+
border-radius: 6px;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
body {
|
|
34
39
|
background: linear-gradient(124deg, #e8891d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
|
|
35
40
|
background-size: 1800%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { CSSResultArray, LitElement } from 'lit';
|
|
2
2
|
import { AppState } from '../../store';
|
|
3
3
|
import './input/login';
|
|
4
4
|
import './input/sign-up';
|
|
@@ -16,14 +16,15 @@ declare const UserDrawer_base: (new (...args: any[]) => {
|
|
|
16
16
|
readonly isConnected: boolean;
|
|
17
17
|
}) & typeof LitElement;
|
|
18
18
|
export declare class UserDrawer extends UserDrawer_base {
|
|
19
|
+
private url;
|
|
20
|
+
drawer: boolean;
|
|
19
21
|
private _name;
|
|
20
|
-
private _subscribe;
|
|
21
22
|
private _log;
|
|
22
23
|
private _sign;
|
|
23
24
|
constructor();
|
|
24
25
|
protected firstUpdated(): void;
|
|
25
26
|
stateChanged(state: AppState): void;
|
|
26
|
-
static get styles():
|
|
27
|
+
static get styles(): CSSResultArray;
|
|
27
28
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
28
29
|
}
|
|
29
30
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/custom-elements/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,MAAoB,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/custom-elements/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,MAAoB,KAAK,CAAC;AAG1E,OAAO,EAAS,QAAQ,EAAE,MAAqB,aAAa,CAAC;AAc7D,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;;;;;;;;;;;;;;AAEzB,qBACa,UAAW,SAAQ,eAA0B;IAGf,OAAO,CAAC,GAAG,CAAM;IAGO,MAAM,UAAS;IAEvE,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,KAAK,CAAgB;;IAItC,SAAS,CAAC,YAAY;IAatB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAO5B,MAAM,KAAK,MAAM,IAAI,cAAc,CA+BhC;IAEH,SAAS,CAAC,MAAM;CAgDjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,aAAa,EAAE,UAAU,CAAC;KAC7B;CACF"}
|
|
@@ -4,8 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, LitElement } from 'lit';
|
|
8
|
-
import { customElement, state } from 'lit/decorators.js';
|
|
7
|
+
import { css, html, LitElement } from 'lit';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
9
|
import { connect } from 'pwa-helpers/connect-mixin';
|
|
10
10
|
import { store } from '../../store';
|
|
11
11
|
import { close } from '../../css/svg';
|
|
@@ -23,18 +23,26 @@ import './input/sign-up';
|
|
|
23
23
|
let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
24
24
|
constructor() {
|
|
25
25
|
super();
|
|
26
|
+
this.url = '';
|
|
27
|
+
this.drawer = false;
|
|
26
28
|
this._name = "";
|
|
27
|
-
this._subscribe = false;
|
|
28
29
|
this._log = false;
|
|
29
30
|
this._sign = false;
|
|
30
31
|
}
|
|
31
32
|
firstUpdated() {
|
|
32
|
-
this.shadowRoot.querySelector('.close').addEventListener('click', () => {
|
|
33
|
-
|
|
33
|
+
this.shadowRoot.querySelector('.close').addEventListener('click', () => {
|
|
34
|
+
store.dispatch(toggleSign());
|
|
35
|
+
});
|
|
36
|
+
this.shadowRoot.querySelector('.leave').addEventListener('click', () => {
|
|
37
|
+
if (this._log) {
|
|
38
|
+
logOut();
|
|
39
|
+
}
|
|
40
|
+
store.dispatch(toggleSign());
|
|
41
|
+
});
|
|
34
42
|
}
|
|
35
43
|
stateChanged(state) {
|
|
36
44
|
this._name = state.backend.name;
|
|
37
|
-
this.
|
|
45
|
+
this.drawer = state.frontend.drawer;
|
|
38
46
|
this._log = state.frontend.login;
|
|
39
47
|
this._sign = state.frontend.register;
|
|
40
48
|
}
|
|
@@ -46,7 +54,29 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
46
54
|
exitStyle,
|
|
47
55
|
linkStyle,
|
|
48
56
|
lineStyle,
|
|
49
|
-
listStyle
|
|
57
|
+
listStyle,
|
|
58
|
+
css `
|
|
59
|
+
|
|
60
|
+
:host {
|
|
61
|
+
position: fixed;
|
|
62
|
+
top: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
right: 0;
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
will-change: transform;
|
|
67
|
+
transform: translate3d(0, -150%, 0);
|
|
68
|
+
transition-property: visibility, transform;
|
|
69
|
+
/*transition-duration: 1.4s;*/
|
|
70
|
+
display: block;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([drawer]) {
|
|
74
|
+
transition-duration: 1.4s;
|
|
75
|
+
visibility: visible;
|
|
76
|
+
transform: translate3d(0, 0, 0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
`
|
|
50
80
|
];
|
|
51
81
|
}
|
|
52
82
|
;
|
|
@@ -55,8 +85,8 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
55
85
|
|
|
56
86
|
<!-- Drawer Wrapper -->
|
|
57
87
|
<div
|
|
58
|
-
class="
|
|
59
|
-
?on="${this.
|
|
88
|
+
class=" userDrawer"
|
|
89
|
+
?on="${this.drawer === true}">
|
|
60
90
|
|
|
61
91
|
<!-- Exit Button -->
|
|
62
92
|
<div class="exit">
|
|
@@ -87,7 +117,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
87
117
|
class="spec setLog"
|
|
88
118
|
?on="${this._log === true}">
|
|
89
119
|
|
|
90
|
-
<
|
|
120
|
+
<p><a href="${this.url}">Settings</a></p>
|
|
91
121
|
|
|
92
122
|
<p><a class="leave" aria-label="log out">log out</a></p>
|
|
93
123
|
|
|
@@ -99,11 +129,14 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
99
129
|
}
|
|
100
130
|
};
|
|
101
131
|
__decorate([
|
|
102
|
-
|
|
103
|
-
], UserDrawer.prototype, "
|
|
132
|
+
property({ type: String, reflect: true })
|
|
133
|
+
], UserDrawer.prototype, "url", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: Boolean, attribute: true, reflect: true })
|
|
136
|
+
], UserDrawer.prototype, "drawer", void 0);
|
|
104
137
|
__decorate([
|
|
105
138
|
state()
|
|
106
|
-
], UserDrawer.prototype, "
|
|
139
|
+
], UserDrawer.prototype, "_name", void 0);
|
|
107
140
|
__decorate([
|
|
108
141
|
state()
|
|
109
142
|
], UserDrawer.prototype, "_log", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/custom-elements/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,MAAwB,KAAK,CAAC;AAG9E,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;;;;;;;;;;;;;;AAKjE,qBACa,QAAS,SAAQ,aAA0B;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/custom-elements/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,MAAwB,KAAK,CAAC;AAG9E,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;;;;;;;;;;;;;;AAKjE,qBACa,QAAS,SAAQ,aAA0B;IAGL,QAAQ,UAAS;IACzD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAM;;IAKhC,SAAS,CAAC,YAAY;IAOtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAM5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAM3B;IAEP,SAAS,CAAC,MAAM;CAwBjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACF"}
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { css, html, LitElement } from 'lit';
|
|
8
|
-
import { customElement, state } from 'lit/decorators.js';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
9
|
import { connect } from 'pwa-helpers/connect-mixin.js';
|
|
10
10
|
import { store } from '../../store';
|
|
11
11
|
import { iconStyles } from './css/icon';
|
|
@@ -13,6 +13,7 @@ import { toggleSign } from '../../redux/frontend';
|
|
|
13
13
|
let UserIcon = class UserIcon extends connect(store)(LitElement) {
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
16
|
+
this.register = false;
|
|
16
17
|
this._user = false;
|
|
17
18
|
this._photoURL = '';
|
|
18
19
|
}
|
|
@@ -54,13 +55,16 @@ let UserIcon = class UserIcon extends connect(store)(LitElement) {
|
|
|
54
55
|
width = "38px"
|
|
55
56
|
src = "${this._photoURL}">
|
|
56
57
|
<!-- </div> -->
|
|
57
|
-
` :
|
|
58
|
+
` : this.register ? 'Subscribe' : 'Login'}
|
|
58
59
|
|
|
59
60
|
</button>
|
|
60
61
|
|
|
61
62
|
`;
|
|
62
63
|
}
|
|
63
64
|
};
|
|
65
|
+
__decorate([
|
|
66
|
+
property({ type: Boolean, reflect: true })
|
|
67
|
+
], UserIcon.prototype, "register", void 0);
|
|
64
68
|
__decorate([
|
|
65
69
|
state()
|
|
66
70
|
], UserIcon.prototype, "_user", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/custom-elements/settings/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAe,KAAK,CAAC;AAGrD,OAAO,EAAS,QAAQ,EAAE,MAAqB,aAAa,CAAC;AAG7D,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;AAGxB,qBACa,YAAa,SAAQ,iBAA0B;IAEjD,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,IAAI,CAAM;;IAI3B,SAAS,CAAC,YAAY;IA8BtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAK5B,MAAM,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/custom-elements/settings/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAe,KAAK,CAAC;AAGrD,OAAO,EAAS,QAAQ,EAAE,MAAqB,aAAa,CAAC;AAG7D,OAAO,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;AAGxB,qBACa,YAAa,SAAQ,iBAA0B;IAEjD,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,IAAI,CAAM;;IAI3B,SAAS,CAAC,YAAY;IA8BtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAK5B,MAAM,KAAK,MAAM,8BAkCX;IAEN,SAAS,CAAC,MAAM;CA6FjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pwa-auth",
|
|
3
|
-
"author": "
|
|
4
|
-
"version": "1.1.
|
|
3
|
+
"author": "Jacek Markiewicz <jack.solutionbox@gmail.com>(https://www.jackspublishing.com)",
|
|
4
|
+
"version": "1.1.6",
|
|
5
5
|
"description": "User Management Component with 3 HTML Tags, and 1 Boilerplate Function to display user icon, sign up, login, log out, change account details, delete account.",
|
|
6
6
|
"homepage": "https://pwa-authentic.firebaseapp.com",
|
|
7
7
|
"main": "pwa-auth.js",
|