pwa-auth 3.7.7 → 3.8.0
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/README.md +1 -1
- package/base/api/drawer.d.ts +3 -0
- package/base/api/drawer.d.ts.map +1 -1
- package/base/api/drawer.js +3 -0
- package/base/api/drawer.js.map +1 -1
- package/base/api/user.d.ts +2 -0
- package/base/api/user.d.ts.map +1 -1
- package/base/api/user.js +2 -0
- package/base/api/user.js.map +1 -1
- package/base/api/verify.d.ts +3 -0
- package/base/api/verify.d.ts.map +1 -1
- package/base/api/verify.js +7 -0
- package/base/api/verify.js.map +1 -1
- package/base/deprecated/email-changed.d.ts +1 -0
- package/base/deprecated/email-changed.d.ts.map +1 -1
- package/base/deprecated/email-changed.js +2 -0
- package/base/deprecated/email-changed.js.map +1 -1
- package/base/events/emit.d.ts +4 -0
- package/base/events/emit.d.ts.map +1 -1
- package/base/events/emit.js +5 -0
- package/base/events/emit.js.map +1 -1
- package/base/events/names.d.ts +15 -0
- package/base/events/names.d.ts.map +1 -1
- package/base/events/names.js +15 -0
- package/base/events/names.js.map +1 -1
- package/base/events/types.d.ts +17 -0
- package/base/events/types.d.ts.map +1 -1
- package/base/export/drawer.js +1 -0
- package/base/export/drawer.js.map +1 -1
- package/base/export/icon.js +1 -0
- package/base/export/icon.js.map +1 -1
- package/base/export/login.js +1 -0
- package/base/export/login.js.map +1 -1
- package/base/export/reset.js +1 -0
- package/base/export/reset.js.map +1 -1
- package/base/export/settings.js +1 -0
- package/base/export/settings.js.map +1 -1
- package/base/firebase/attribute.d.ts +1 -0
- package/base/firebase/attribute.d.ts.map +1 -1
- package/base/firebase/attribute.js +1 -0
- package/base/firebase/attribute.js.map +1 -1
- package/base/firebase/authentication.d.ts +7 -0
- package/base/firebase/authentication.d.ts.map +1 -1
- package/base/firebase/authentication.js +7 -0
- package/base/firebase/authentication.js.map +1 -1
- package/base/firebase/google.d.ts +4 -0
- package/base/firebase/google.d.ts.map +1 -1
- package/base/firebase/google.js +4 -0
- package/base/firebase/google.js.map +1 -1
- package/base/firebase/interface.js +26 -0
- package/base/firebase/interface.js.map +1 -1
- package/base/firebase/message.d.ts +1 -0
- package/base/firebase/message.d.ts.map +1 -1
- package/base/firebase/message.js +2 -0
- package/base/firebase/message.js.map +1 -1
- package/base/firebase/password.d.ts +3 -0
- package/base/firebase/password.d.ts.map +1 -1
- package/base/firebase/password.js +3 -0
- package/base/firebase/password.js.map +1 -1
- package/base/lazyLoader.d.ts +1 -0
- package/base/lazyLoader.d.ts.map +1 -1
- package/base/lazyLoader.js +2 -0
- package/base/lazyLoader.js.map +1 -1
- package/base/redux/session.d.ts +1 -0
- package/base/redux/session.d.ts.map +1 -1
- package/base/redux/session.js +1 -0
- package/base/redux/session.js.map +1 -1
- package/base/store.js +1 -0
- package/base/store.js.map +1 -1
- package/base/webcomponents/css/animation.js +10 -0
- package/base/webcomponents/css/animation.js.map +1 -1
- package/base/webcomponents/css/tap.js +1 -0
- package/base/webcomponents/css/tap.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +10 -0
- package/base/webcomponents/drawer/drawer.d.ts.map +1 -1
- package/base/webcomponents/drawer/drawer.js +53 -8
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/base/webcomponents/drawer/keys.d.ts +3 -0
- package/base/webcomponents/drawer/keys.d.ts.map +1 -1
- package/base/webcomponents/drawer/keys.js +4 -0
- package/base/webcomponents/drawer/keys.js.map +1 -1
- package/base/webcomponents/form/css/notice.d.ts +1 -0
- package/base/webcomponents/form/css/notice.d.ts.map +1 -1
- package/base/webcomponents/form/css/notice.js +1 -0
- package/base/webcomponents/form/css/notice.js.map +1 -1
- package/base/webcomponents/form/css/status.d.ts +2 -0
- package/base/webcomponents/form/css/status.d.ts.map +1 -1
- package/base/webcomponents/form/css/status.js +2 -0
- package/base/webcomponents/form/css/status.js.map +1 -1
- package/base/webcomponents/form/forgot.js +9 -0
- package/base/webcomponents/form/forgot.js.map +1 -1
- package/base/webcomponents/form/google-button.d.ts +1 -0
- package/base/webcomponents/form/google-button.d.ts.map +1 -1
- package/base/webcomponents/form/google-button.js +2 -0
- package/base/webcomponents/form/google-button.js.map +1 -1
- package/base/webcomponents/form/letters.d.ts +2 -0
- package/base/webcomponents/form/letters.d.ts.map +1 -1
- package/base/webcomponents/form/letters.js +2 -0
- package/base/webcomponents/form/letters.js.map +1 -1
- package/base/webcomponents/form/login.d.ts +1 -0
- package/base/webcomponents/form/login.d.ts.map +1 -1
- package/base/webcomponents/form/login.js +10 -0
- package/base/webcomponents/form/login.js.map +1 -1
- package/base/webcomponents/form/notice.js +1 -0
- package/base/webcomponents/form/notice.js.map +1 -1
- package/base/webcomponents/form/reveal.d.ts +1 -0
- package/base/webcomponents/form/reveal.d.ts.map +1 -1
- package/base/webcomponents/form/reveal.js +1 -0
- package/base/webcomponents/form/reveal.js.map +1 -1
- package/base/webcomponents/form/signup.d.ts +1 -0
- package/base/webcomponents/form/signup.d.ts.map +1 -1
- package/base/webcomponents/form/signup.js +10 -0
- package/base/webcomponents/form/signup.js.map +1 -1
- package/base/webcomponents/form/verified.d.ts +1 -0
- package/base/webcomponents/form/verified.d.ts.map +1 -1
- package/base/webcomponents/form/verified.js +1 -0
- package/base/webcomponents/form/verified.js.map +1 -1
- package/base/webcomponents/icon/icon.d.ts +2 -0
- package/base/webcomponents/icon/icon.d.ts.map +1 -1
- package/base/webcomponents/icon/icon.js +5 -0
- package/base/webcomponents/icon/icon.js.map +1 -1
- package/base/webcomponents/login/css/auth.js +3 -0
- package/base/webcomponents/login/css/auth.js.map +1 -1
- package/base/webcomponents/login/page.d.ts +6 -0
- package/base/webcomponents/login/page.d.ts.map +1 -1
- package/base/webcomponents/login/page.js +21 -6
- package/base/webcomponents/login/page.js.map +1 -1
- package/base/webcomponents/settings/input/delete.js +2 -0
- package/base/webcomponents/settings/input/delete.js.map +1 -1
- package/base/webcomponents/settings/input/email.d.ts +1 -0
- package/base/webcomponents/settings/input/email.d.ts.map +1 -1
- package/base/webcomponents/settings/input/email.js +3 -1
- package/base/webcomponents/settings/input/email.js.map +1 -1
- package/base/webcomponents/settings/input/name.js +1 -0
- package/base/webcomponents/settings/input/name.js.map +1 -1
- package/base/webcomponents/settings/input/password.js +2 -0
- package/base/webcomponents/settings/input/password.js.map +1 -1
- package/base/webcomponents/settings/input/uploader.d.ts +2 -0
- package/base/webcomponents/settings/input/uploader.d.ts.map +1 -1
- package/base/webcomponents/settings/input/uploader.js +7 -0
- package/base/webcomponents/settings/input/uploader.js.map +1 -1
- package/base/webcomponents/settings/input/verify.js +5 -0
- package/base/webcomponents/settings/input/verify.js.map +1 -1
- package/base/webcomponents/settings/settings.d.ts +8 -0
- package/base/webcomponents/settings/settings.d.ts.map +1 -1
- package/base/webcomponents/settings/settings.js +18 -2
- package/base/webcomponents/settings/settings.js.map +1 -1
- package/package.json +2 -2
- package/source/pwa-auth.js +2 -2
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/** Required - the opened form reads this once after a redirect. */
|
|
1
2
|
export declare function takeGoogleNotice(): {
|
|
2
3
|
code: string;
|
|
3
4
|
message: string;
|
|
4
5
|
} | null;
|
|
6
|
+
/** Required - phones use a full-page redirect. Popups are blocked there. */
|
|
5
7
|
export declare function prefersGoogleRedirect(ua: string): boolean;
|
|
6
8
|
export type GoogleSignInResult = 'ok' | 'quiet' | 'redirect';
|
|
9
|
+
/** Required - popup first. Redirect when the browser blocks it, or on a phone. */
|
|
7
10
|
export declare function signInWithGoogle(ua?: string): Promise<GoogleSignInResult>;
|
|
11
|
+
/** Required - read the redirect once the app exists. Null means there was none. */
|
|
8
12
|
export declare function watchGoogleRedirect(): void;
|
|
9
13
|
//# sourceMappingURL=google.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../typescript/firebase/google.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../typescript/firebase/google.ts"],"names":[],"mappings":"AAmBA,mEAAmE;AACnE,wBAAgB,gBAAgB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI3E;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEzD;AAUD,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7D,kFAAkF;AAClF,wBAAsB,gBAAgB,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAkB/E;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,IAAI,IAAI,CAQ1C"}
|
package/base/firebase/google.js
CHANGED
|
@@ -8,11 +8,13 @@ const quiet = new Set([
|
|
|
8
8
|
]);
|
|
9
9
|
let notice = null;
|
|
10
10
|
let watching = false;
|
|
11
|
+
/** Required - the opened form reads this once after a redirect. */
|
|
11
12
|
export function takeGoogleNotice() {
|
|
12
13
|
const found = notice;
|
|
13
14
|
notice = null;
|
|
14
15
|
return found;
|
|
15
16
|
}
|
|
17
|
+
/** Required - phones use a full-page redirect. Popups are blocked there. */
|
|
16
18
|
export function prefersGoogleRedirect(ua) {
|
|
17
19
|
return /Android|iPhone|iPad|iPod/i.test(ua);
|
|
18
20
|
}
|
|
@@ -22,6 +24,7 @@ function provider() {
|
|
|
22
24
|
function remember(error) {
|
|
23
25
|
notice = toAuthError(error);
|
|
24
26
|
}
|
|
27
|
+
/** Required - popup first. Redirect when the browser blocks it, or on a phone. */
|
|
25
28
|
export async function signInWithGoogle(ua) {
|
|
26
29
|
const agent = ua ?? (typeof navigator === 'undefined' ? '' : navigator.userAgent);
|
|
27
30
|
if (prefersGoogleRedirect(agent)) {
|
|
@@ -43,6 +46,7 @@ export async function signInWithGoogle(ua) {
|
|
|
43
46
|
throw error;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
49
|
+
/** Required - read the redirect once the app exists. Null means there was none. */
|
|
46
50
|
export function watchGoogleRedirect() {
|
|
47
51
|
if (watching)
|
|
48
52
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.js","sourceRoot":"","sources":["../../typescript/firebase/google.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC;IACpB,2BAA2B;IAC3B,8BAA8B;IAC9B,qBAAqB;CACtB,CAAC,CAAC;AAEH,IAAI,MAAM,GAA6C,IAAI,CAAC;AAC5D,IAAI,QAAQ,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"google.js","sourceRoot":"","sources":["../../typescript/firebase/google.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC;IACpB,2BAA2B;IAC3B,8BAA8B;IAC9B,qBAAqB;CACtB,CAAC,CAAC;AAEH,IAAI,MAAM,GAA6C,IAAI,CAAC;AAC5D,IAAI,QAAQ,GAAG,KAAK,CAAC;AAErB,mEAAmE;AACnE,MAAM,UAAU,gBAAgB;IAC9B,MAAM,KAAK,GAAG,MAAM,CAAC;IACrB,MAAM,GAAG,IAAI,CAAC;IACd,OAAO,KAAK,CAAC;AACf,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,qB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AI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YACpD,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
+
// Representational State Transfer - Application Programming Interface
|
|
2
|
+
// Module Imports ---------------- ---------------- ----------------
|
|
3
|
+
// Redux
|
|
1
4
|
import { store } from '../store.js';
|
|
2
5
|
import { accEmail, accImage, accName, accVerified, closeSign, userAuth } from '../redux/session.js';
|
|
6
|
+
// Firebase Auth
|
|
3
7
|
import { EmailAuthProvider, getAuth, onAuthStateChanged, reauthenticateWithCredential, signOut } from 'firebase/auth';
|
|
8
|
+
// Firebase Firestore
|
|
4
9
|
import { doc, deleteDoc } from "firebase/firestore";
|
|
10
|
+
// Firebase Analytics
|
|
5
11
|
import { getAnalytics, isSupported, logEvent } from "firebase/analytics";
|
|
12
|
+
// Firebase Storage
|
|
6
13
|
import { deleteObject, listAll, ref } from "firebase/storage";
|
|
14
|
+
// Start Authentication
|
|
7
15
|
import { application, auth, db, isReady, onReady, storage } from './authentication.js';
|
|
8
16
|
import { pwaAuthChanged, pwaAuthError, pwaLogout } from '../events/names.js';
|
|
9
17
|
import { watchGoogleRedirect } from './google.js';
|
|
10
18
|
import { emitWindow, toAuthError, toPwaUser } from '../events/emit.js';
|
|
19
|
+
/** Required - the form reads this after reauthenticate returns false. */
|
|
11
20
|
let failed = null;
|
|
12
21
|
export function takeAuthFailure() {
|
|
13
22
|
const found = failed;
|
|
@@ -18,11 +27,17 @@ function noteFailure(detail) {
|
|
|
18
27
|
failed = detail;
|
|
19
28
|
emitWindow(pwaAuthError, detail);
|
|
20
29
|
}
|
|
30
|
+
// START ANALYTICS ----------------
|
|
31
|
+
// Required - analytics, only when this browser supports it
|
|
21
32
|
let analytics;
|
|
22
33
|
let analyticsReady = Promise.resolve();
|
|
34
|
+
// END ANALYTICS ----------------
|
|
35
|
+
// Start Distribute Information ---------------- ----------------
|
|
23
36
|
export const pwaDrawerToggle = () => {
|
|
37
|
+
// Close Drawer State
|
|
24
38
|
store.dispatch(closeSign());
|
|
25
39
|
};
|
|
40
|
+
// Required - redux, analytics, and pwa-auth-changed once the app exists
|
|
26
41
|
onReady(() => {
|
|
27
42
|
watchGoogleRedirect();
|
|
28
43
|
getAuth(application).useDeviceLanguage();
|
|
@@ -32,16 +47,23 @@ onReady(() => {
|
|
|
32
47
|
}
|
|
33
48
|
})();
|
|
34
49
|
onAuthStateChanged(auth, (user) => {
|
|
50
|
+
// Required - every auth state, including the first
|
|
35
51
|
emitWindow(pwaAuthChanged, { user: toPwaUser(user) });
|
|
52
|
+
// Account Login
|
|
36
53
|
if (user) {
|
|
54
|
+
// Login Indicator
|
|
37
55
|
store.dispatch(userAuth(true));
|
|
56
|
+
// Close Drawer State
|
|
38
57
|
store.dispatch(closeSign());
|
|
39
58
|
store.dispatch(accName(user.displayName ?? ''));
|
|
40
59
|
store.dispatch(accEmail(user.email || ''));
|
|
41
60
|
store.dispatch(accImage(user.photoURL || ''));
|
|
42
61
|
store.dispatch(accVerified(user.emailVerified === true));
|
|
43
62
|
}
|
|
63
|
+
// Account Log out
|
|
44
64
|
else {
|
|
65
|
+
// console.log('logged out');
|
|
66
|
+
// Login Indicator
|
|
45
67
|
store.dispatch(userAuth(false));
|
|
46
68
|
store.dispatch(accName(''));
|
|
47
69
|
store.dispatch(accEmail(''));
|
|
@@ -50,6 +72,9 @@ onReady(() => {
|
|
|
50
72
|
}
|
|
51
73
|
});
|
|
52
74
|
});
|
|
75
|
+
// End Distribute Informatiom ---------------- ----------------
|
|
76
|
+
// Module Exports ---------------- Exact Name Reference ---------------- Firebase Action
|
|
77
|
+
// Required - recent login before email, password, or delete
|
|
53
78
|
export const reauthenticate = async (password) => {
|
|
54
79
|
const current = auth.currentUser;
|
|
55
80
|
if (!current || !current.email) {
|
|
@@ -95,6 +120,7 @@ export const logAccountDelete = async () => {
|
|
|
95
120
|
}
|
|
96
121
|
logEvent(analytics, 'delete_account');
|
|
97
122
|
};
|
|
123
|
+
// Required - delete this user's files under pwa-auth/{uid}
|
|
98
124
|
export const deleteUserFiles = async (uid) => {
|
|
99
125
|
const folder = ref(storage, 'pwa-auth/' + uid);
|
|
100
126
|
const listed = await listAll(folder);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../typescript/firebase/interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../typescript/firebase/interface.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAItE,oEAAoE;AAIpE,QAAQ;AACR,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpG,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEtH,qBAAqB;AACrB,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,qBAAqB;AACrB,OAAO,EAAa,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEpF,mBAAmB;AACnB,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE9D,uBAAuB;AACvB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAEtF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,O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,EAAE;IAC3C,MAAM,cAAc,CAAC;IACrB,IAAI,CAAC,SAAS,EAAE,CAAC;QAAC,OAAO;IAAC,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAM,KAAK,EAAE,GAAW,EAAE,EAAE;IAEtD,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,GAAG,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAErC,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAElE,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;QACrC,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpE,CAAC;AAEH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAO,KAAK,EAAE,OAAc,EAAE,IAAW,EAAE,EAAE;IAEtE,MAAM,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAE1C,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../typescript/firebase/message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../typescript/firebase/message.ts"],"names":[],"mappings":"AAoCA,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGlD"}
|
package/base/firebase/message.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { toAuthError } from '../events/emit.js';
|
|
2
2
|
import { passwordLong, passwordMismatch, passwordShort } from './password.js';
|
|
3
|
+
/** Required - plain sentences for the codes the forms actually hit. */
|
|
3
4
|
const known = {
|
|
4
5
|
'auth/invalid-email': 'Enter a valid email address.',
|
|
5
6
|
'auth/user-not-found': 'No account uses that email.',
|
|
@@ -31,6 +32,7 @@ const known = {
|
|
|
31
32
|
'pwa/not-ready': 'Sign-in is not ready yet.',
|
|
32
33
|
'pwa/unknown': 'Something went wrong. Try again.'
|
|
33
34
|
};
|
|
35
|
+
/** Required - sentence for the form. The event still carries the raw code. */
|
|
34
36
|
export function userMessage(error) {
|
|
35
37
|
const detail = toAuthError(error);
|
|
36
38
|
return known[detail.code] ?? 'Something went wrong. Try again.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../typescript/firebase/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../typescript/firebase/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9E,uEAAuE;AACvE,MAAM,KAAK,GAA2B;IACpC,oBAAoB,EAAY,8BAA8B;IAC9D,qBAAqB,EAAW,6BAA6B;IAC7D,qBAAqB,EAAW,yBAAyB;IACzD,yBAAyB,EAAO,kCAAkC;IAClE,gCAAgC,EAAE,kCAAkC;IACpE,yBAAyB,EAAO,sCAAsC;IACtE,yBAAyB,EAAO,sCAAsC;IACtE,oBAAoB,EAAY,2BAA2B;IAC3D,2BAA2B,EAAK,qCAAqC;IACrE,+CAA+C,EAAE,qEAAqE;IACtH,oBAAoB,EAAY,aAAa;IAC7C,wBAAwB,EAAQ,qCAAqC;IACrE,6BAA6B,EAAG,6BAA6B;IAC7D,4BAA4B,EAAI,4BAA4B;IAC5D,mBAAmB,EAAa,yBAAyB;IACzD,mBAAmB,EAAa,8BAA8B;IAC9D,sBAAsB,EAAU,mBAAmB;IACnD,oBAAoB,EAAY,aAAa;IAC7C,mBAAmB,EAAa,YAAY;IAC5C,sBAAsB,EAAU,8BAA8B;IAC9D,uBAAuB,EAAS,gBAAgB;IAChD,mBAAmB,EAAa,aAAa;IAC7C,gBAAgB,EAAgB,gBAAgB;IAChD,kBAAkB,EAAc,uBAAuB;IACvD,eAAe,EAAiB,uBAAuB;IACvD,qBAAqB,EAAW,6BAA6B;IAC7D,sBAAsB,EAAU,gDAAgD;IAChF,eAAe,EAAiB,2BAA2B;IAC3D,aAAa,EAAmB,kCAAkC;CACnE,CAAC;AAEF,8EAA8E;AAC9E,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,kCAAkC,CAAC;AAClE,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
/** Required - NIST SP 800-63B. Length only. No composition rules. No trim. No truncation. */
|
|
1
2
|
export declare const passwordMin = 8;
|
|
3
|
+
/** Required - at least 64. 128 is the field cap. */
|
|
2
4
|
export declare const passwordMax = 128;
|
|
3
5
|
export declare const passwordHint = "At least 8 characters. A passphrase works well.";
|
|
4
6
|
export declare const passwordShort = "Use at least 8 characters.";
|
|
5
7
|
export declare const passwordLong = "Use at most 128 characters.";
|
|
6
8
|
export declare const passwordMismatch = "Passwords don't match.";
|
|
9
|
+
/** Required - a new password. Spaces and other characters count. The string is not cut. */
|
|
7
10
|
export declare function newPasswordIssue(value: string): {
|
|
8
11
|
code: string;
|
|
9
12
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../typescript/firebase/password.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../typescript/firebase/password.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,oDAAoD;AACpD,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,eAAO,MAAM,YAAY,oDAAoD,CAAC;AAE9E,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,eAAO,MAAM,YAAY,gCAAgC,CAAC;AAE1D,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AAEzD,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAYxF"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
/** Required - NIST SP 800-63B. Length only. No composition rules. No trim. No truncation. */
|
|
1
2
|
export const passwordMin = 8;
|
|
3
|
+
/** Required - at least 64. 128 is the field cap. */
|
|
2
4
|
export const passwordMax = 128;
|
|
3
5
|
export const passwordHint = 'At least 8 characters. A passphrase works well.';
|
|
4
6
|
export const passwordShort = 'Use at least 8 characters.';
|
|
5
7
|
export const passwordLong = 'Use at most 128 characters.';
|
|
6
8
|
export const passwordMismatch = "Passwords don't match.";
|
|
9
|
+
/** Required - a new password. Spaces and other characters count. The string is not cut. */
|
|
7
10
|
export function newPasswordIssue(value) {
|
|
8
11
|
if (value.length < passwordMin) {
|
|
9
12
|
return { code: 'pwa/short-password', message: passwordShort };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../typescript/firebase/password.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../typescript/firebase/password.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAE7B,oDAAoD;AACpD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AAE9E,MAAM,CAAC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAE1D,MAAM,CAAC,MAAM,YAAY,GAAG,6BAA6B,CAAC;AAE1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAEzD,2FAA2F;AAC3F,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAE5C,IAAI,KAAK,CAAC,MAAM,GAAG,WAAW,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IAChE,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,WAAW,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,CAAC;AAEd,CAAC"}
|
package/base/lazyLoader.d.ts
CHANGED
package/base/lazyLoader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyLoader.d.ts","sourceRoot":"","sources":["../typescript/lazyLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAGjC,qBAAa,UAAW,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"lazyLoader.d.ts","sourceRoot":"","sources":["../typescript/lazyLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAGjC,qBAAa,UAAW,SAAQ,UAAU;IAExC,mBAAmB;IACe,MAAM,EAAG,OAAO,CAAS;;IAO3D,YAAY;CAEb;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
package/base/lazyLoader.js
CHANGED
|
@@ -12,8 +12,10 @@ import { property } from 'lit/decorators.js';
|
|
|
12
12
|
export class LazyLoader extends LitElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
15
|
+
/** @attr active */
|
|
15
16
|
this.active = false;
|
|
16
17
|
}
|
|
18
|
+
// Only render this page, if it is actually visible.
|
|
17
19
|
shouldUpdate() { return this.active; }
|
|
18
20
|
}
|
|
19
21
|
__decorate([
|
package/base/lazyLoader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyLoader.js","sourceRoot":"","sources":["../typescript/lazyLoader.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAQ,mBAAmB,CAAC;AAE/C,MAAM,OAAO,UAAW,SAAQ,UAAU;IAKxC;QACE,KAAK,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"lazyLoader.js","sourceRoot":"","sources":["../typescript/lazyLoader.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAQ,mBAAmB,CAAC;AAE/C,MAAM,OAAO,UAAW,SAAQ,UAAU;IAKxC;QACE,KAAK,EAAE,CAAC;QAJV,mBAAmB;QACe,WAAM,GAAa,KAAK,CAAC;IAI3D,CAAC;IAED,oDAAoD;IACpD,YAAY,KAAK,OAAO,IAAI,CAAC,MAAM,CAAC,CAAE,CAAC;CAExC;AATmC;IAAjC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;0CAAiC"}
|
package/base/redux/session.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../typescript/redux/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../typescript/redux/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9D,8EAA8E;AAC9E,eAAO,MAAM,YAAY;;;;;;;;;;CAUxB,CAAC;AAIF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;eAKO,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;eAIzB,aAAa,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgBf,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;eAK7B,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;eAIpB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;eAIrB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;eAIlB,aAAa,CAAC,OAAO,CAAC;;;;;;;;;;;GAKnD,CAAC;AAEH,eAAO,MACL,YAAY,uFACZ,QAAQ,oFACR,UAAU,gFACV,QAAQ,8EACR,SAAS,+EACT,eAAe,0FACf,OAAO,kFACP,QAAQ,mFACR,QAAQ,mFACR,WAAW,qFACW,CAAC;;;;;;;;;;;;AAEzB,wBAAoC"}
|
package/base/redux/session.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../typescript/redux/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../typescript/redux/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAA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AK,CAAC,WAAW,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC;QAC9C,CAAC;QAED,OAAO,CAAC,KAAK,EAAE,MAA6B;YAC1C,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,CAAC;QAED,QAAQ,CAAC,KAAK,EAAE,MAA6B;YAC3C,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,CAAC;QAED,QAAQ,CAAC,KAAK,EAAE,MAA6B;YAC3C,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;QAClC,CAAC;QAED,WAAW,CAAC,KAAK,EAAE,MAA8B;YAC/C,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;QAClC,CAAC;KAEF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAW,EACZ,GAAG,YAAY,CAAC,OAAO,CAAC;AAEzB,eAAe,YAAY,CAAC,OAAO,CAAC"}
|
package/base/store.js
CHANGED
package/base/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../typescript/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAU,kBAAkB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAY,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../typescript/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAU,kBAAkB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAY,oBAAoB,CAAC;AAExD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC;IAClC,OAAO,EAAE;QACP,OAAO,EAAE,YAAY,CAAC,OAAO;KAC9B;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAKH,eAAe,KAAK,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
+
/* --pwa_slide is the form-swap duration on this host only.
|
|
3
|
+
The drawer, page login, and settings each roll themselves.
|
|
4
|
+
Nothing here transitions :host height. slide-out is not used.
|
|
5
|
+
.content has no transition until .inner also has .motion,
|
|
6
|
+
so the first paint is the resting open/closed pair. */
|
|
2
7
|
export const animation = css `
|
|
3
8
|
|
|
4
9
|
:host {
|
|
@@ -94,6 +99,10 @@ export const animation = css `
|
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
`;
|
|
102
|
+
/* Drawer shell. Imported by user-drawer only.
|
|
103
|
+
No height or transform transition here. The clip's style binding does that,
|
|
104
|
+
and only after a user change. max-height: 0 with no transition is the
|
|
105
|
+
closed backstop, so the first paint cannot ease shut. */
|
|
97
106
|
export const drawerShell = css `
|
|
98
107
|
|
|
99
108
|
:host {
|
|
@@ -110,6 +119,7 @@ export const drawerShell = css `
|
|
|
110
119
|
}
|
|
111
120
|
|
|
112
121
|
`;
|
|
122
|
+
/* user-login host. The animation attribute is not set. No max-height ease. */
|
|
113
123
|
export const hostCollapse = css `
|
|
114
124
|
|
|
115
125
|
:host([animation]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.js","sourceRoot":"","sources":["../../../typescript/webcomponents/css/animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"animation.js","sourceRoot":"","sources":["../../../typescript/webcomponents/css/animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;AAErC;;;;yDAIyD;AAEzD,MAAM,CAAC,MAAM,SAAS,GAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FvC,CAAC;AAEF;;;2DAG2D;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAe,GAAG,CAAA;;;;;;;;;;;;;;;CAezC,CAAC;AAEF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAe,GAAG,CAAA;;;;;;CAM1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../typescript/webcomponents/css/tap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../typescript/webcomponents/css/tap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;AAErC,kCAAkC;AAClC,MAAM,CAAC,MAAM,QAAQ,GAAc,GAAG,CAAA;;;;;;CAMrC,CAAC"}
|
|
@@ -23,15 +23,20 @@ declare const UserDrawer_base: (new (...args: any[]) => {
|
|
|
23
23
|
readonly isConnected: boolean;
|
|
24
24
|
}) & typeof LitElement;
|
|
25
25
|
export declare class UserDrawer extends UserDrawer_base {
|
|
26
|
+
/** @attr url */
|
|
26
27
|
url: string;
|
|
28
|
+
/** @attr drawer */
|
|
27
29
|
drawer: boolean;
|
|
30
|
+
/** @attr subscribe */
|
|
28
31
|
subscribe: boolean;
|
|
32
|
+
/** @attr hide-google */
|
|
29
33
|
hideGoogle: boolean;
|
|
30
34
|
private name;
|
|
31
35
|
private email;
|
|
32
36
|
private verified;
|
|
33
37
|
private notice;
|
|
34
38
|
private user;
|
|
39
|
+
/** What the sheet paints. Stays on the account menu until a logout close reaches 0. */
|
|
35
40
|
private sheetSigned;
|
|
36
41
|
private holdSheet;
|
|
37
42
|
private openSheetPx;
|
|
@@ -39,10 +44,15 @@ export declare class UserDrawer extends UserDrawer_base {
|
|
|
39
44
|
private liveEmail;
|
|
40
45
|
private liveVerified;
|
|
41
46
|
private signup;
|
|
47
|
+
/** True while the panel is open or still rolling shut. Drops on transitionend. */
|
|
42
48
|
private sliding;
|
|
49
|
+
/** Arms the form-swap transition. False on the first paint. */
|
|
43
50
|
private motion;
|
|
51
|
+
/** Clip height. 0px is shut. auto is the resting open size. */
|
|
44
52
|
private clipHeight;
|
|
53
|
+
/** Sheet translate. -100% parks the sheet above the clip. */
|
|
45
54
|
private sheetShift;
|
|
55
|
+
/** True only while this drawer's clip and sheet are easing. */
|
|
46
56
|
private rollMotion;
|
|
47
57
|
private booted;
|
|
48
58
|
private wasOpen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAQ,KAAK,CAAC;AAM9E,OAAO,EAAS,QAAQ,EAAE,MAAO,gBAAgB,CAAC;AAwBlD,OAAO,6BAA6B,CAAC;AAErC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;AAI3B,qBACa,UAAW,SAAQ,eAA0B;
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAQ,KAAK,CAAC;AAM9E,OAAO,EAAS,QAAQ,EAAE,MAAO,gBAAgB,CAAC;AAwBlD,OAAO,6BAA6B,CAAC;AAErC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;AAI3B,qBACa,UAAW,SAAQ,eAA0B;IAExD,gBAAgB;IACgC,GAAG,SAAM;IAEzD,mBAAmB;IAC8C,MAAM,UAAS;IAEjF,sB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AAC,KAAK;IAKb,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,MAAM;IAiBd,OAAO,CAAC,OAAO;IAef,OAAO,CAAC,WAAW;IA+BnB,OAAO,CAAC,SAAS,CAcf;IAGF,OAAO,CAAC,KAAK,CAyBX;IAGF,OAAO,CAAC,YAAY,CASlB;IAEF,SAAS,CAAC,YAAY;IA0BtB,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,cAAc;IAUtB,MAAM,KAAK,MAAM,IAAI,cAAc,CAsFhC;IAEH,SAAS,CAAC,MAAM;IAsGhB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,UAAU,CAiBhB;CAEH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,aAAa,EAAE,UAAU,CAAC;KAC7B;CACF"}
|
|
@@ -39,26 +39,36 @@ import { tapStyle } from '../css/tap.js';
|
|
|
39
39
|
let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
40
40
|
constructor() {
|
|
41
41
|
super();
|
|
42
|
+
/** @attr url */
|
|
42
43
|
this.url = '';
|
|
43
|
-
|
|
44
|
-
this.
|
|
44
|
+
/** @attr drawer */
|
|
45
|
+
this.drawer = false; // Drawer State
|
|
46
|
+
/** @attr subscribe */
|
|
47
|
+
this.subscribe = false; // Drawer State
|
|
48
|
+
/** @attr hide-google */
|
|
45
49
|
this.hideGoogle = false;
|
|
46
|
-
this.name = "";
|
|
50
|
+
this.name = ""; // String Username
|
|
47
51
|
this.email = "";
|
|
48
52
|
this.verified = false;
|
|
49
53
|
this.notice = "";
|
|
50
|
-
this.user = false;
|
|
54
|
+
this.user = false; // True user is logged-in, false, user is logged-out, state
|
|
55
|
+
/** What the sheet paints. Stays on the account menu until a logout close reaches 0. */
|
|
51
56
|
this.sheetSigned = false;
|
|
52
57
|
this.holdSheet = false;
|
|
53
58
|
this.openSheetPx = 0;
|
|
54
59
|
this.liveName = '';
|
|
55
60
|
this.liveEmail = '';
|
|
56
61
|
this.liveVerified = false;
|
|
57
|
-
this.signup = false;
|
|
62
|
+
this.signup = false; // True sign-up, false log-in, State
|
|
63
|
+
/** True while the panel is open or still rolling shut. Drops on transitionend. */
|
|
58
64
|
this.sliding = false;
|
|
65
|
+
/** Arms the form-swap transition. False on the first paint. */
|
|
59
66
|
this.motion = false;
|
|
67
|
+
/** Clip height. 0px is shut. auto is the resting open size. */
|
|
60
68
|
this.clipHeight = '0px';
|
|
69
|
+
/** Sheet translate. -100% parks the sheet above the clip. */
|
|
61
70
|
this.sheetShift = 'translate3d(0, -100%, 0)';
|
|
71
|
+
/** True only while this drawer's clip and sheet are easing. */
|
|
62
72
|
this.rollMotion = false;
|
|
63
73
|
this.booted = false;
|
|
64
74
|
this.wasOpen = false;
|
|
@@ -68,6 +78,8 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
68
78
|
this.heldHeight = null;
|
|
69
79
|
this.columnWidth = 0;
|
|
70
80
|
this.columnObserver = null;
|
|
81
|
+
// Required - visibility, pointer-events, and inert drop when the close reaches 0.
|
|
82
|
+
// Only this clip. A form transition inside the sheet does not count.
|
|
71
83
|
this.onClipEnd = (event) => {
|
|
72
84
|
if (!(event instanceof TransitionEvent))
|
|
73
85
|
return;
|
|
@@ -88,6 +100,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
88
100
|
this.restShut();
|
|
89
101
|
this.releaseSheet();
|
|
90
102
|
};
|
|
103
|
+
// Required - Escape closes. Tab stays inside the open drawer.
|
|
91
104
|
this.onKey = (event) => {
|
|
92
105
|
if (!this.drawer)
|
|
93
106
|
return;
|
|
@@ -117,6 +130,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
117
130
|
first.focus({ preventScroll: true });
|
|
118
131
|
}
|
|
119
132
|
};
|
|
133
|
+
// Required - a host link or button in a slot closes the drawer. preventDefault keeps it open.
|
|
120
134
|
this.onLightClick = (event) => {
|
|
121
135
|
if (event.defaultPrevented)
|
|
122
136
|
return;
|
|
@@ -173,7 +187,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
173
187
|
super.disconnectedCallback();
|
|
174
188
|
}
|
|
175
189
|
stateChanged(state) {
|
|
176
|
-
const open = state.session.drawer;
|
|
190
|
+
const open = state.session.drawer; // Drawer State
|
|
177
191
|
const wasOpen = this.drawer;
|
|
178
192
|
const wasSigned = this.user === true;
|
|
179
193
|
this.liveName = state.session.name;
|
|
@@ -184,9 +198,10 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
184
198
|
else if (this.reduced())
|
|
185
199
|
this.sliding = false;
|
|
186
200
|
this.drawer = open;
|
|
187
|
-
this.user = state.session.login;
|
|
188
|
-
this.signup = state.session.registerOne;
|
|
201
|
+
this.user = state.session.login; // Logged in-out State
|
|
202
|
+
this.signup = state.session.registerOne; // Sign-up State
|
|
189
203
|
this.paintAccount(wasSigned, wasOpen);
|
|
204
|
+
// Required - UI event from this element. Skip the closed state on first read.
|
|
190
205
|
const changed = this.sawOpen ? open !== this.wasOpen : open;
|
|
191
206
|
if (changed) {
|
|
192
207
|
emitElement(this, pwaDrawerToggleName, { open });
|
|
@@ -194,6 +209,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
194
209
|
this.wasOpen = open;
|
|
195
210
|
this.sawOpen = true;
|
|
196
211
|
}
|
|
212
|
+
// Required - a logout close keeps the account menu until the clip is shut, so the roll measures that sheet.
|
|
197
213
|
paintAccount(wasSigned, wasOpen) {
|
|
198
214
|
if (this.user === true) {
|
|
199
215
|
this.holdSheet = false;
|
|
@@ -290,6 +306,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
290
306
|
sheet() {
|
|
291
307
|
return this.shadowRoot?.querySelector('.userDrawer') ?? null;
|
|
292
308
|
}
|
|
309
|
+
// Required - the account button, when nothing else had focus at open.
|
|
293
310
|
toggleButton() {
|
|
294
311
|
const icon = document.querySelector('user-icon');
|
|
295
312
|
const button = icon?.shadowRoot?.querySelector('button');
|
|
@@ -298,6 +315,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
298
315
|
reduced() {
|
|
299
316
|
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
300
317
|
}
|
|
318
|
+
// Required - closed, no transition. The first render binds this.
|
|
301
319
|
restShut() {
|
|
302
320
|
this.rollMotion = false;
|
|
303
321
|
this.clipHeight = '0px';
|
|
@@ -306,6 +324,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
306
324
|
if (sheet)
|
|
307
325
|
sheet.style.minHeight = '';
|
|
308
326
|
}
|
|
327
|
+
// Required - open at content size. No transition, so it does not ease.
|
|
309
328
|
restOpen() {
|
|
310
329
|
this.rollMotion = false;
|
|
311
330
|
this.clipHeight = 'auto';
|
|
@@ -328,6 +347,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
328
347
|
transition: travel ? 'transform var(--pwa_slide, 2s) ease-in-out' : 'none',
|
|
329
348
|
};
|
|
330
349
|
}
|
|
350
|
+
// Required - clip and sheet start together. Open from 0 is translate -100% → 0.
|
|
331
351
|
unroll() {
|
|
332
352
|
const clip = this.clip();
|
|
333
353
|
const sheet = this.sheet();
|
|
@@ -356,6 +376,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
356
376
|
if (this.reduced())
|
|
357
377
|
this.sliding = false;
|
|
358
378
|
}
|
|
379
|
+
// Sheet height in px. The clip cap is released for the read and put back. No paint.
|
|
359
380
|
sheetPx(clip, sheet) {
|
|
360
381
|
const transition = clip.style.transition;
|
|
361
382
|
const maxHeight = clip.style.maxHeight;
|
|
@@ -369,6 +390,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
369
390
|
clip.style.transition = transition;
|
|
370
391
|
return px;
|
|
371
392
|
}
|
|
393
|
+
// Ease the clip from → to. translateY = clip − sheetHeight, so the bottom stays glued.
|
|
372
394
|
rollBetween(clip, sheet, from, to, sheetHeight) {
|
|
373
395
|
const start = from - sheetHeight;
|
|
374
396
|
const end = to - sheetHeight;
|
|
@@ -422,6 +444,8 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
422
444
|
});
|
|
423
445
|
this.watchColumn();
|
|
424
446
|
}
|
|
447
|
+
// Required - a parent grid can park this tag after named areas. Shift it back under the previous element.
|
|
448
|
+
// A row of its own between the header and the page leaves top empty.
|
|
425
449
|
placeAnchor() {
|
|
426
450
|
const pos = getComputedStyle(this).position;
|
|
427
451
|
if (pos === 'fixed' || pos === 'absolute') {
|
|
@@ -442,6 +466,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
442
466
|
return;
|
|
443
467
|
this.style.top = Math.abs(delta) <= 0.5 ? '' : `${delta}px`;
|
|
444
468
|
}
|
|
469
|
+
// Required - a resize while the sheet is rolling retargets the measured height.
|
|
445
470
|
watchColumn() {
|
|
446
471
|
if (typeof ResizeObserver === 'undefined')
|
|
447
472
|
return;
|
|
@@ -459,6 +484,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
459
484
|
this.columnObserver.observe(prev);
|
|
460
485
|
this.placeAnchor();
|
|
461
486
|
}
|
|
487
|
+
// Required - keep the sheet bottom on the clip while the column reflows.
|
|
462
488
|
onColumnResize() {
|
|
463
489
|
if (!this.rollMotion)
|
|
464
490
|
return;
|
|
@@ -561,6 +587,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
561
587
|
}
|
|
562
588
|
;
|
|
563
589
|
render() {
|
|
590
|
+
// Required - reflected attribute. The shell keeps the clip visible while it rolls.
|
|
564
591
|
this.toggleAttribute('sliding', this.sliding);
|
|
565
592
|
return html `
|
|
566
593
|
|
|
@@ -659,6 +686,7 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
659
686
|
|
|
660
687
|
`;
|
|
661
688
|
}
|
|
689
|
+
// Required - url is the href. Empty url stays on this page and tells the host.
|
|
662
690
|
destination() {
|
|
663
691
|
return (this.url || '').trim();
|
|
664
692
|
}
|
|
@@ -739,4 +767,21 @@ UserDrawer = __decorate([
|
|
|
739
767
|
__metadata("design:paramtypes", [])
|
|
740
768
|
], UserDrawer);
|
|
741
769
|
export { UserDrawer };
|
|
770
|
+
/*
|
|
771
|
+
|
|
772
|
+
\?on="\${ true === this._sign \? !this.subscribe \: this.subscribe }"
|
|
773
|
+
\?on="${ false === this._sign \? !this.subscribe \: this.subscribe }"
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
<h3>\${
|
|
777
|
+
this._log \? /* If logged-in state is true
|
|
778
|
+
this._name \: /* Show username
|
|
779
|
+
true \=== /* else logged-out, Show if true equals
|
|
780
|
+
/* this._sign \=== /*true sign-up state equals
|
|
781
|
+
this.subscribe \? /* If subscribe state is true
|
|
782
|
+
'Login' \: /* Show login txt, else
|
|
783
|
+
'Subscribe' /* Show subscribe txt
|
|
784
|
+
}</h3>
|
|
785
|
+
|
|
786
|
+
*/
|
|
742
787
|
//# sourceMappingURL=drawer.js.map
|