pwa-auth 3.0.5 → 3.1.1
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 +6 -0
- package/README.md +53 -42
- package/demonstration/compiled/pwa-auth.js +34 -34
- package/demonstration/compiled/pwa-auth.js.map +1 -1
- package/demonstration/compiled/pwa-helpers-BN4uXXdl.js +8 -0
- package/demonstration/compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
- package/demonstration/compiled/pwa-helpers.js +8 -0
- package/demonstration/compiled/pwa-helpers.js.map +1 -0
- package/package.json +16 -3
- package/src/compiled/pwa-auth.js +34 -34
- package/src/compiled/pwa-auth.js.map +1 -1
- package/src/compiled/pwa-helpers-BN4uXXdl.js +8 -0
- package/src/compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
- package/src/compiled/pwa-helpers.js +8 -0
- package/src/compiled/pwa-helpers.js.map +1 -0
- package/src/pwa-auth.js +0 -1
- package/src/pwa-helpers.js +1 -0
- package/src-classes/pwa-auth.js +3 -0
- package/src-compiled/pwa-auth.js +881 -0
- package/src-compiled/pwa-auth.js.map +1 -0
- package/src-compiled/pwa-helpers-BN4uXXdl.js +8 -0
- package/src-compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
- package/src-compiled/pwa-helpers.js +8 -0
- package/src-compiled/pwa-helpers.js.map +1 -0
- package/src-export/pwa-auth.ts +3 -0
- package/src-export/pwa-helpers.ts +1 -0
- package/src-export/tsconfig.production.json +53 -0
- package/src-functions/pwa-helpers.js +1 -0
- package/src-typescript/development/helpers-array.ts +0 -0
- package/transpiled/src-export/pwa-auth.d.ts +4 -0
- package/transpiled/src-export/pwa-auth.d.ts.map +1 -0
- package/transpiled/src-export/pwa-auth.js +3 -0
- package/transpiled/src-export/pwa-helpers.d.ts +2 -0
- package/transpiled/src-export/pwa-helpers.d.ts.map +1 -0
- package/transpiled/src-export/pwa-helpers.js +1 -0
- package/transpiled/src-typescript/css/form/button.d.ts +3 -0
- package/transpiled/src-typescript/css/form/button.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/button.js +54 -0
- package/transpiled/src-typescript/css/form/input.d.ts +3 -0
- package/transpiled/src-typescript/css/form/input.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/input.js +24 -0
- package/transpiled/src-typescript/css/form/label.d.ts +3 -0
- package/transpiled/src-typescript/css/form/label.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/label.js +22 -0
- package/transpiled/src-typescript/css/form/list.d.ts +3 -0
- package/transpiled/src-typescript/css/form/list.d.ts.map +1 -0
- package/transpiled/src-typescript/css/form/list.js +22 -0
- package/transpiled/src-typescript/css/svg.d.ts +4 -0
- package/transpiled/src-typescript/css/svg.d.ts.map +1 -0
- package/transpiled/src-typescript/css/svg.js +4 -0
- package/transpiled/src-typescript/css/toggle.d.ts +2 -0
- package/transpiled/src-typescript/css/toggle.d.ts.map +1 -0
- package/transpiled/src-typescript/css/toggle.js +8 -0
- package/transpiled/src-typescript/firebase/authentication.d.ts +11 -0
- package/transpiled/src-typescript/firebase/authentication.d.ts.map +1 -0
- package/transpiled/src-typescript/firebase/authentication.js +10 -0
- package/transpiled/src-typescript/firebase/interface.d.ts +5 -0
- package/transpiled/src-typescript/firebase/interface.d.ts.map +1 -0
- package/transpiled/src-typescript/firebase/interface.js +79 -0
- package/transpiled/src-typescript/redux/backend.d.ts +16 -0
- package/transpiled/src-typescript/redux/backend.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/backend.js +43 -0
- package/transpiled/src-typescript/redux/drawer.d.ts +20 -0
- package/transpiled/src-typescript/redux/drawer.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/drawer.js +21 -0
- package/transpiled/src-typescript/redux/frontend.d.ts +17 -0
- package/transpiled/src-typescript/redux/frontend.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/frontend.js +67 -0
- package/transpiled/src-typescript/redux/object.d.ts +24 -0
- package/transpiled/src-typescript/redux/object.d.ts.map +1 -0
- package/transpiled/src-typescript/redux/object.js +1 -0
- package/transpiled/src-typescript/store.d.ts +19 -0
- package/transpiled/src-typescript/store.d.ts.map +1 -0
- package/transpiled/src-typescript/store.js +13 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/drawer.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/drawer.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/drawer.js +55 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/exit.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/exit.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/exit.js +48 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/link.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/link.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/link.js +12 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.js +10 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/toggle.d.ts +3 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/toggle.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/css/toggle.js +18 -0
- package/transpiled/src-typescript/webcomponents/drawer/drawer.d.ts +37 -0
- package/transpiled/src-typescript/webcomponents/drawer/drawer.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/drawer.js +138 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/login.d.ts +20 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/login.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/login.js +134 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.d.ts +20 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.js +144 -0
- package/transpiled/src-typescript/webcomponents/icon/css/icon.d.ts +2 -0
- package/transpiled/src-typescript/webcomponents/icon/css/icon.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/icon/css/icon.js +59 -0
- package/transpiled/src-typescript/webcomponents/icon/icon.d.ts +33 -0
- package/transpiled/src-typescript/webcomponents/icon/icon.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/icon/icon.js +81 -0
- package/transpiled/src-typescript/webcomponents/settings/css/navigation.d.ts +2 -0
- package/transpiled/src-typescript/webcomponents/settings/css/navigation.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/css/navigation.js +51 -0
- package/transpiled/src-typescript/webcomponents/settings/input/delete.d.ts +34 -0
- package/transpiled/src-typescript/webcomponents/settings/input/delete.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/delete.js +92 -0
- package/transpiled/src-typescript/webcomponents/settings/input/email.d.ts +34 -0
- package/transpiled/src-typescript/webcomponents/settings/input/email.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/email.js +104 -0
- package/transpiled/src-typescript/webcomponents/settings/input/name.d.ts +33 -0
- package/transpiled/src-typescript/webcomponents/settings/input/name.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/name.js +95 -0
- package/transpiled/src-typescript/webcomponents/settings/input/password.d.ts +36 -0
- package/transpiled/src-typescript/webcomponents/settings/input/password.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/password.js +151 -0
- package/transpiled/src-typescript/webcomponents/settings/input/uploader.d.ts +37 -0
- package/transpiled/src-typescript/webcomponents/settings/input/uploader.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/input/uploader.js +235 -0
- package/transpiled/src-typescript/webcomponents/settings/settings.d.ts +37 -0
- package/transpiled/src-typescript/webcomponents/settings/settings.d.ts.map +1 -0
- package/transpiled/src-typescript/webcomponents/settings/settings.js +204 -0
- package/pwa-auth.js +0 -4
- /package/src-typescript/development/{object.ts → utilities-object.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { firebaseConfig, application, db, storage, auth, user } from '../src-typescript/firebase/authentication';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
|
|
3
|
+
"include": [
|
|
4
|
+
"pwa-auth.ts",
|
|
5
|
+
"pwa-helpers.ts"
|
|
6
|
+
],
|
|
7
|
+
|
|
8
|
+
"exclude": [
|
|
9
|
+
"src-typescript/**/*.ts",
|
|
10
|
+
"demonstration/**/*.ts",
|
|
11
|
+
"src-typescript/development/**/*.ts"
|
|
12
|
+
],
|
|
13
|
+
|
|
14
|
+
"compilerOptions": {
|
|
15
|
+
|
|
16
|
+
"outDir": "../transpiled",
|
|
17
|
+
|
|
18
|
+
"target": "ES2022",
|
|
19
|
+
"module": "ESNext",
|
|
20
|
+
"moduleResolution": "node",
|
|
21
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
22
|
+
|
|
23
|
+
"strict": true,
|
|
24
|
+
"esModuleInterop": true,
|
|
25
|
+
"skipLibCheck": true,
|
|
26
|
+
|
|
27
|
+
"noUnusedLocals": true,
|
|
28
|
+
"noUnusedParameters": true,
|
|
29
|
+
"noImplicitReturns": true,
|
|
30
|
+
"noFallthroughCasesInSwitch": true,
|
|
31
|
+
|
|
32
|
+
// Lit - Declaration
|
|
33
|
+
"declaration": true,
|
|
34
|
+
"declarationMap": true,
|
|
35
|
+
"experimentalDecorators": true,
|
|
36
|
+
"emitDecoratorMetadata": true,
|
|
37
|
+
|
|
38
|
+
"useDefineForClassFields": false,
|
|
39
|
+
// true: Object.defineProperty, false: constructor
|
|
40
|
+
// true: Fields are initialized after the parent class constructor runs.
|
|
41
|
+
// false: Fields are initialized as assignments within the constructor.
|
|
42
|
+
|
|
43
|
+
// Comments
|
|
44
|
+
"removeComments": true,
|
|
45
|
+
|
|
46
|
+
"allowSyntheticDefaultImports": true, // Simplifies imports for Redux/Firebase
|
|
47
|
+
"forceConsistentCasingInFileNames": true,
|
|
48
|
+
|
|
49
|
+
"pretty": true
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { firebaseConfig, application, db, storage, auth, user } from '../src-javascript/firebase/authentication.js';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-auth.d.ts","sourceRoot":"","sources":["../../src-export/pwa-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAgB,+CAA+C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAc,mDAAmD,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAkB,2CAA2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-helpers.d.ts","sourceRoot":"","sources":["../../src-export/pwa-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { firebaseConfig, application, db, storage, auth, user } from '../src-typescript/firebase/authentication';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src-typescript/css/form/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,eAAO,MAAM,WAAW,EAAE,SAoDzB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export const buttonStyle = css `
|
|
3
|
+
|
|
4
|
+
.action-button:focus { outline:0; }
|
|
5
|
+
|
|
6
|
+
.action-button {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
margin: 16px 16px 16px auto;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
text-align: center;
|
|
13
|
+
vertical-align: middle;
|
|
14
|
+
touch-action: manipulation;
|
|
15
|
+
-webkit-appearance: button;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
height: 38px;
|
|
19
|
+
line-height: 16px;
|
|
20
|
+
padding: 10px 16px;
|
|
21
|
+
border-radius: 6px;
|
|
22
|
+
color: var(--pwa_action_text_color, #fff);
|
|
23
|
+
background-color: var(--pwa_action_background_color, #6cc04a);
|
|
24
|
+
border-color: var(--pwa_action_border_color, #60b23e);
|
|
25
|
+
box-shadow: 1px 1px 1px grey;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.saving{
|
|
29
|
+
transition: background-color 0.3s; /* Smooth transition for hover effect */
|
|
30
|
+
background-color: #D6EBD3;
|
|
31
|
+
border: 0.5px solid black;
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
height: 50px;
|
|
34
|
+
width: 100%;
|
|
35
|
+
margin: auto;
|
|
36
|
+
box-shadow: 1px 1px 1px grey;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* */
|
|
40
|
+
.submit:hover { background-color: #45a049; }
|
|
41
|
+
|
|
42
|
+
.submit {
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
width: 100%;
|
|
45
|
+
background-color: #4CAF50;
|
|
46
|
+
color: white;
|
|
47
|
+
padding: 14px 20px;
|
|
48
|
+
margin: 8px 0;
|
|
49
|
+
border: none;
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src-typescript/css/form/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,UAAU,EAAG,SAsBzB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export const inputStyle = css `
|
|
3
|
+
|
|
4
|
+
input[type=text],
|
|
5
|
+
input[type=email],
|
|
6
|
+
input[type=password],
|
|
7
|
+
select {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
-webkit-box-sizing: border-box;
|
|
10
|
+
height: 50px;
|
|
11
|
+
text-align: left;
|
|
12
|
+
margin: 0 16px 0 16px;
|
|
13
|
+
padding: 8px 16px;
|
|
14
|
+
background-color: var(--pwa_input_background, #E1E5EB);
|
|
15
|
+
border: 0;
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
-webkit-border-radius: 4px;
|
|
18
|
+
font-size: smaller;
|
|
19
|
+
box-shadow: 1px 1px 1px grey;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
input.invalid { background-color: #ffdddd; }
|
|
23
|
+
|
|
24
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src-typescript/css/form/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,UAAU,EAAG,SAoBzB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export const labelStyle = css `
|
|
3
|
+
|
|
4
|
+
label { font-size: .9em; }
|
|
5
|
+
label {
|
|
6
|
+
display: grid;
|
|
7
|
+
color: var(--pwa_label_text_color, black);
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
font-size: smaller;
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
line-height: 36px;
|
|
13
|
+
padding: 0 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (max-width: 460px) {
|
|
17
|
+
|
|
18
|
+
label { font-size: .8em; }
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src-typescript/css/form/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,SAAS,EAAE,SAoBvB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export const listStyle = css `
|
|
3
|
+
|
|
4
|
+
ul {
|
|
5
|
+
list-style-type: none;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
li {
|
|
11
|
+
display: grid;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.divider {
|
|
15
|
+
border-top: 2px dotted black;
|
|
16
|
+
border-bottom: 2px dotted black;
|
|
17
|
+
text-align: center;
|
|
18
|
+
width: 80%;
|
|
19
|
+
margin: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../../src-typescript/css/svg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,sCAAmf,CAAC;AACzgB,eAAO,MAAM,QAAQ,sCAA4tB,CAAC;AAClvB,eAAO,MAAM,KAAK,sCAAoK,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
export const faceIcon = html `<svg viewBox="0 0 24 24" height="34px" width="34px"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"></path></svg>`;
|
|
3
|
+
export const settings = html `<svg viewBox="0 0 24 24"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></svg>`;
|
|
4
|
+
export const close = html `<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></svg>`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src-typescript/css/toggle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,yBAMhB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FirebaseApp } from 'firebase/app';
|
|
2
|
+
import { Firestore } from "firebase/firestore";
|
|
3
|
+
import { FirebaseStorage } from "@firebase/storage";
|
|
4
|
+
import { Auth, User } from 'firebase/auth';
|
|
5
|
+
export declare const firebaseConfig: any;
|
|
6
|
+
export declare const application: FirebaseApp;
|
|
7
|
+
export declare const db: Firestore;
|
|
8
|
+
export declare const storage: FirebaseStorage;
|
|
9
|
+
export declare const auth: Auth;
|
|
10
|
+
export declare const user: User | null;
|
|
11
|
+
//# sourceMappingURL=authentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../../src-typescript/firebase/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAgB,cAAc,CAAC;AACpE,OAAO,EAAgB,SAAS,EAAE,MAAmB,oBAAoB,CAAC;AAC1E,OAAO,EAAc,eAAe,EAAE,MAAe,mBAAmB,CAAC;AACzE,OAAO,EAAW,IAAI,EAAE,IAAI,EAAE,MAAuB,eAAe,CAAC;AAErE,eAAO,MAAM,cAAc,KAAsE,CAAC;AAClG,eAAO,MAAM,WAAW,EAAG,WAAoD,CAAC;AAChF,eAAO,MAAM,EAAE,EAAG,SAAyD,CAAC;AAC5E,eAAO,MAAM,OAAO,EAAG,eAAkD,CAAC;AAC1E,eAAO,MAAM,IAAI,EAAG,IAAkD,CAAC;AACvE,eAAO,MAAM,IAAI,EAAG,IAAI,GAAG,IAAuC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { initializeApp } from 'firebase/app';
|
|
2
|
+
import { getFirestore } from "firebase/firestore";
|
|
3
|
+
import { getStorage } from "@firebase/storage";
|
|
4
|
+
import { getAuth } from 'firebase/auth';
|
|
5
|
+
export const firebaseConfig = JSON.parse(process.env.FIREBASE_CONFIG || "{}");
|
|
6
|
+
export const application = initializeApp(firebaseConfig);
|
|
7
|
+
export const db = getFirestore(application);
|
|
8
|
+
export const storage = getStorage(application);
|
|
9
|
+
export const auth = getAuth(application);
|
|
10
|
+
export const user = auth.currentUser;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const logOut: () => Promise<void>;
|
|
2
|
+
export declare const logAccount: () => Promise<void>;
|
|
3
|
+
export declare const logAccountDelete: () => Promise<void>;
|
|
4
|
+
export declare const deleteDocument: (collect: string, item: string) => Promise<void>;
|
|
5
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src-typescript/firebase/interface.ts"],"names":[],"mappings":"AAmLA,eAAO,MAAM,MAAM,qBAAoD,CAAC;AACxE,eAAO,MAAM,UAAU,qBAAiE,CAAC;AACzF,eAAO,MAAM,gBAAgB,qBAA2D,CAAC;AACzF,eAAO,MAAM,cAAc,YAAsB,MAAM,QAAO,MAAM,kBAInE,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { store } from '../store';
|
|
2
|
+
import { closeSign, iconAuth, nameAuth, userAuth } from '../redux/frontend';
|
|
3
|
+
import { accID, accEmail, accImage, accName } from '../redux/backend';
|
|
4
|
+
import { getAuth, onAuthStateChanged, sendEmailVerification, signOut } from 'firebase/auth';
|
|
5
|
+
import { doc, deleteDoc } from "firebase/firestore";
|
|
6
|
+
import { getAnalytics, logEvent } from "firebase/analytics";
|
|
7
|
+
import { isSupported } from "firebase/messaging";
|
|
8
|
+
import { application, auth, db } from './authentication';
|
|
9
|
+
getAuth().useDeviceLanguage();
|
|
10
|
+
let analytics;
|
|
11
|
+
(async () => {
|
|
12
|
+
if (await isSupported()) {
|
|
13
|
+
console.log('Firebase Analytics Supported');
|
|
14
|
+
analytics = getAnalytics(application);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
console.log("Firebase Analytics is not supported in this environment.");
|
|
18
|
+
}
|
|
19
|
+
})();
|
|
20
|
+
if ('serviceWorker' in navigator) {
|
|
21
|
+
console.log('Service Worker is supported');
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
console.log('Service Worker is not supported');
|
|
25
|
+
}
|
|
26
|
+
if ('PushManager' in window) {
|
|
27
|
+
console.log('Push API is supported');
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.log('Push API is not supported');
|
|
31
|
+
}
|
|
32
|
+
let pendingEmailVerification = false;
|
|
33
|
+
window.addEventListener("userEmailChanged", () => {
|
|
34
|
+
pendingEmailVerification = true;
|
|
35
|
+
});
|
|
36
|
+
onAuthStateChanged(auth, (user) => {
|
|
37
|
+
if (user) {
|
|
38
|
+
store.dispatch(userAuth(true));
|
|
39
|
+
store.dispatch(closeSign());
|
|
40
|
+
store.dispatch(accID(user.uid));
|
|
41
|
+
store.dispatch(accName(user.displayName || 'John Doe'));
|
|
42
|
+
store.dispatch(accEmail(user.email || ''));
|
|
43
|
+
store.dispatch(accImage(user.photoURL || ''));
|
|
44
|
+
store.dispatch(nameAuth(user.displayName || 'John Doe'));
|
|
45
|
+
store.dispatch(iconAuth(user.photoURL || ''));
|
|
46
|
+
if (pendingEmailVerification && !user.emailVerified) {
|
|
47
|
+
sendEmailVerification(user)
|
|
48
|
+
.then(() => {
|
|
49
|
+
console.log("Verification email sent to:");
|
|
50
|
+
pendingEmailVerification = false;
|
|
51
|
+
})
|
|
52
|
+
.catch((error) => {
|
|
53
|
+
console.error("Error sending verification email:", error.message);
|
|
54
|
+
pendingEmailVerification = false;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else if (user.emailVerified) {
|
|
58
|
+
console.log("User's email is already verified:");
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
console.log("User signed in, no email verification pending:");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
store.dispatch(userAuth(false));
|
|
66
|
+
store.dispatch(accID(''));
|
|
67
|
+
store.dispatch(accName('John Doe'));
|
|
68
|
+
store.dispatch(accEmail(''));
|
|
69
|
+
store.dispatch(accImage(''));
|
|
70
|
+
store.dispatch(nameAuth('John Doe'));
|
|
71
|
+
store.dispatch(iconAuth(''));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export const logOut = async () => { return signOut(auth); };
|
|
75
|
+
export const logAccount = async () => { logEvent(analytics, 'create_account'); };
|
|
76
|
+
export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
|
|
77
|
+
export const deleteDocument = async (collect, item) => {
|
|
78
|
+
await deleteDoc(doc(db, collect, item));
|
|
79
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { backendAuth } from "./object";
|
|
3
|
+
export declare const accountSlice: import("@reduxjs/toolkit").Slice<backendAuth, {
|
|
4
|
+
accVerified: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<boolean>) => void;
|
|
5
|
+
accAnon: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<boolean>) => void;
|
|
6
|
+
accID: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<string>) => void;
|
|
7
|
+
accName: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<string>) => void;
|
|
8
|
+
accPhone: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<string>) => void;
|
|
9
|
+
accEmail: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<string>) => void;
|
|
10
|
+
accImage: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<string>) => void;
|
|
11
|
+
messageId: (state: import("immer").WritableDraft<backendAuth>, action: PayloadAction<string>) => void;
|
|
12
|
+
}, "backend", "backend", import("@reduxjs/toolkit").SliceSelectors<backendAuth>>;
|
|
13
|
+
export declare const accVerified: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "backend/accVerified">, accID: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "backend/accID">, accName: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "backend/accName">, accPhone: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "backend/accPhone">, accEmail: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "backend/accEmail">, accImage: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "backend/accImage">, accAnon: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "backend/accAnon">, messageId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "backend/messageId">;
|
|
14
|
+
declare const _default: import("redux").Reducer<backendAuth, import("redux").UnknownAction, backendAuth>;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src-typescript/redux/backend.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,aAAa,EAAE,MAAS,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAiBvC,eAAO,MAAM,YAAY;6EAMU,cAAc,OAAO,CAAC;yEAK1B,cAAc,OAAO,CAAC;uEAKxB,cAAc,MAAM,CAAC;yEAKnB,cAAc,MAAM,CAAC;0EAKpB,cAAc,MAAM,CAAC;0EAKrB,cAAc,MAAM,CAAC;0EAKrB,cAAc,MAAM,CAAC;2EAKpB,cAAc,MAAM,CAAC;gFAKpD,CAAC;AAEH,eAAO,MAAQ,WAAW,uFAAE,KAAK,gFAAE,OAAO,kFAAE,QAAQ,mFAAE,QAAQ,mFAAE,QAAQ,mFAAE,OAAO,mFAAE,SAAS,kFAAyB,CAAC;;AAEtH,wBAAoC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
const initialState = {
|
|
3
|
+
verified: false,
|
|
4
|
+
anon: false,
|
|
5
|
+
userId: '',
|
|
6
|
+
name: 'John Doe',
|
|
7
|
+
email: '',
|
|
8
|
+
photoURL: '',
|
|
9
|
+
phone: '',
|
|
10
|
+
msgToken: ''
|
|
11
|
+
};
|
|
12
|
+
export const accountSlice = createSlice({
|
|
13
|
+
name: 'backend',
|
|
14
|
+
initialState,
|
|
15
|
+
reducers: {
|
|
16
|
+
accVerified: (state, action) => {
|
|
17
|
+
state.verified = action.payload;
|
|
18
|
+
},
|
|
19
|
+
accAnon: (state, action) => {
|
|
20
|
+
state.anon = action.payload;
|
|
21
|
+
},
|
|
22
|
+
accID: (state, action) => {
|
|
23
|
+
state.userId = action.payload;
|
|
24
|
+
},
|
|
25
|
+
accName: (state, action) => {
|
|
26
|
+
state.name = action.payload;
|
|
27
|
+
},
|
|
28
|
+
accPhone: (state, action) => {
|
|
29
|
+
state.phone = action.payload;
|
|
30
|
+
},
|
|
31
|
+
accEmail: (state, action) => {
|
|
32
|
+
state.email = action.payload;
|
|
33
|
+
},
|
|
34
|
+
accImage: (state, action) => {
|
|
35
|
+
state.photoURL = action.payload;
|
|
36
|
+
},
|
|
37
|
+
messageId: (state, action) => {
|
|
38
|
+
state.msgToken = action.payload;
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export const { accVerified, accID, accName, accPhone, accEmail, accImage, accAnon, messageId } = accountSlice.actions;
|
|
43
|
+
export default accountSlice.reducer;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const drawerSlice: import("@reduxjs/toolkit").Slice<{
|
|
2
|
+
drawer: boolean;
|
|
3
|
+
}, {
|
|
4
|
+
setDrawer: (state: import("immer").WritableDraft<{
|
|
5
|
+
drawer: boolean;
|
|
6
|
+
}>) => void;
|
|
7
|
+
closeDrawer: (state: import("immer").WritableDraft<{
|
|
8
|
+
drawer: boolean;
|
|
9
|
+
}>) => void;
|
|
10
|
+
}, "drawers", "drawers", import("@reduxjs/toolkit").SliceSelectors<{
|
|
11
|
+
drawer: boolean;
|
|
12
|
+
}>>;
|
|
13
|
+
export declare const setDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawers/setDrawer">, closeDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawers/closeDrawer">;
|
|
14
|
+
declare const _default: import("redux").Reducer<{
|
|
15
|
+
drawer: boolean;
|
|
16
|
+
}, import("redux").UnknownAction, {
|
|
17
|
+
drawer: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src-typescript/redux/drawer.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;GA0BtB,CAAC;AAEH,eAAO,MAAQ,SAAS,+EAAE,WAAW,+EAAwB,CAAC;;;;;;AAE9D,wBAAmC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
const initialState = { drawer: false };
|
|
3
|
+
export const drawerSlice = createSlice({
|
|
4
|
+
name: 'drawers',
|
|
5
|
+
initialState,
|
|
6
|
+
reducers: {
|
|
7
|
+
setDrawer: (state) => {
|
|
8
|
+
if (state.drawer === false) {
|
|
9
|
+
state.drawer = true;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
state.drawer = false;
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
closeDrawer: (state) => {
|
|
16
|
+
state.drawer = false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export const { setDrawer, closeDrawer } = drawerSlice.actions;
|
|
21
|
+
export default drawerSlice.reducer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { frontendAuth } from "./object";
|
|
3
|
+
export declare const initialState: frontendAuth;
|
|
4
|
+
export declare const userSlice: import("@reduxjs/toolkit").Slice<frontendAuth, {
|
|
5
|
+
navigateAuth: (state: import("immer").WritableDraft<frontendAuth>, action: PayloadAction<string>) => void;
|
|
6
|
+
userAuth: (state: import("immer").WritableDraft<frontendAuth>, action: PayloadAction<boolean>) => void;
|
|
7
|
+
toggleSign: (state: import("immer").WritableDraft<frontendAuth>) => void;
|
|
8
|
+
closeSign: (state: import("immer").WritableDraft<frontendAuth>) => void;
|
|
9
|
+
signUpAction: (state: import("immer").WritableDraft<frontendAuth>) => void;
|
|
10
|
+
signUpClose: (state: import("immer").WritableDraft<frontendAuth>, action: PayloadAction<boolean>) => void;
|
|
11
|
+
iconAuth: (state: import("immer").WritableDraft<frontendAuth>, action: PayloadAction<string>) => void;
|
|
12
|
+
nameAuth: (state: import("immer").WritableDraft<frontendAuth>, action: PayloadAction<string>) => void;
|
|
13
|
+
}, "user", "user", import("@reduxjs/toolkit").SliceSelectors<frontendAuth>>;
|
|
14
|
+
export declare const navigateAuth: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "user/navigateAuth">, iconAuth: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "user/iconAuth">, nameAuth: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "user/nameAuth">, userAuth: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "user/userAuth">, toggleSign: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"user/toggleSign">, closeSign: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"user/closeSign">, signUpAction: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"user/signUpAction">, signUpClose: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "user/signUpClose">;
|
|
15
|
+
declare const _default: import("redux").Reducer<frontendAuth, import("redux").UnknownAction, frontendAuth>;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=frontend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../../src-typescript/redux/frontend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,eAAO,MAAM,YAAY,EAAE,YA0B1B,CAAA;AAGD,eAAO,MAAM,SAAS;+EAKkB,cAAc,MAAM,CAAC;2EAsBxB,cAAc,OAAO,CAAC;;;;8EA0CvB,cAAc,OAAO,CAAC;2EAKtB,cAAc,MAAM,CAAC;2EAKpB,cAAc,MAAM,CAAC;2EAKxD,CAAC;AAEH,eAAO,MAAQ,YAAY,oFAAE,QAAQ,gFAAE,QAAQ,gFAAE,QAAQ,iFAAE,UAAU,6EAAE,SAAS,4EAAE,YAAY,+EAAE,WAAW,kFAAsB,CAAC;;AAElI,wBAAiC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
export const initialState = {
|
|
3
|
+
settings: 'profile',
|
|
4
|
+
login: false,
|
|
5
|
+
drawer: false,
|
|
6
|
+
register: true,
|
|
7
|
+
userId: "user",
|
|
8
|
+
customer: "John Doe",
|
|
9
|
+
profileChoice: 'unChosen',
|
|
10
|
+
name: 'Modern Business',
|
|
11
|
+
photoURL: '',
|
|
12
|
+
phone: '(...) ... - ....',
|
|
13
|
+
email: ''
|
|
14
|
+
};
|
|
15
|
+
export const userSlice = createSlice({
|
|
16
|
+
name: 'user',
|
|
17
|
+
initialState,
|
|
18
|
+
reducers: {
|
|
19
|
+
navigateAuth: (state, action) => {
|
|
20
|
+
switch (action.payload) {
|
|
21
|
+
case 'profile':
|
|
22
|
+
break;
|
|
23
|
+
case 'verification':
|
|
24
|
+
break;
|
|
25
|
+
case 'password':
|
|
26
|
+
break;
|
|
27
|
+
case 'delete':
|
|
28
|
+
break;
|
|
29
|
+
default: action.payload = 'profile';
|
|
30
|
+
}
|
|
31
|
+
state.settings = action.payload;
|
|
32
|
+
},
|
|
33
|
+
userAuth: (state, action) => {
|
|
34
|
+
state.login = action.payload;
|
|
35
|
+
},
|
|
36
|
+
toggleSign: (state) => {
|
|
37
|
+
if (state.drawer === true) {
|
|
38
|
+
state.drawer = false;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
state.drawer = true;
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
closeSign: (state) => {
|
|
45
|
+
state.drawer = false;
|
|
46
|
+
},
|
|
47
|
+
signUpAction: (state) => {
|
|
48
|
+
if (state.register === false) {
|
|
49
|
+
state.register = true;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
state.register = false;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
signUpClose: (state, action) => {
|
|
56
|
+
state.register = action.payload;
|
|
57
|
+
},
|
|
58
|
+
iconAuth: (state, action) => {
|
|
59
|
+
state.photoURL = action.payload;
|
|
60
|
+
},
|
|
61
|
+
nameAuth: (state, action) => {
|
|
62
|
+
state.name = action.payload;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export const { navigateAuth, iconAuth, nameAuth, userAuth, toggleSign, closeSign, signUpAction, signUpClose } = userSlice.actions;
|
|
67
|
+
export default userSlice.reducer;
|