pwa-auth 0.0.16 → 1.1.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.
@@ -1,17 +0,0 @@
1
- {
2
- "name": "pwa-shell",
3
- "author": "Modern Projects <jack.solutionbox@gmail.com>(https://www.contractorscentre.com)",
4
- "version": "0.0.1",
5
- "description": "Application Shell for Progressive Website Application.",
6
- "homepage": "https://www.inmostfire.com",
7
- "main": "application-shell.js",
8
- "license": "BSD-3-Clause",
9
- "flat": true,
10
- "dependencies": {
11
- "@polymer/app-layout": "^3.1.0",
12
- "i": "^0.3.6",
13
- "npm": "^6.11.3",
14
- "pwa-auth": "^0.0.15",
15
- "submit-content": "^0.0.2"
16
- }
17
- }
package/manifest.json DELETED
@@ -1,44 +0,0 @@
1
- {
2
- "name": "pwa-auth",
3
- "short_name": "pwa-auth",
4
- "description": "A User Management Component is designed with 3 HTML Tags, and 1 Boilerplate Function to sign up, sign in, log out, change account details, delete account.",
5
- "start_url": "/",
6
- "homepage": "https://www.inmostfire.com",
7
- "manifest_version": 1,
8
- "display": "standalone",
9
- "orientation": "any",
10
- "theme_color": "#303030",
11
- "background_color": "#303030",
12
- "icons": [
13
- {
14
- "src": "images/icon-48x48.png",
15
- "sizes": "48x48",
16
- "type": "image/png"
17
- },
18
- {
19
- "src": "images/icon-512x512.png",
20
- "sizes": "72x72",
21
- "type": "image/png"
22
- },
23
- {
24
- "src": "images/icon-96x96.png",
25
- "sizes": "96x96",
26
- "type": "image/png"
27
- },
28
- {
29
- "src": "images/icon-144x144.png",
30
- "sizes": "144x144",
31
- "type": "image/png"
32
- },
33
- {
34
- "src": "images/icon-192x192.png",
35
- "sizes": "192x192",
36
- "type": "image/png"
37
- },
38
- {
39
- "src": "images/icon-512x512.png",
40
- "sizes": "512x512",
41
- "type": "image/png"
42
- }
43
- ]
44
- }
package/polymer.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "entrypoint": "index.html",
3
- "shell": "pwa-auth.js",
4
- "moduleResolution": "node",
5
- "npm": true,
6
- "license": "MIT",
7
- "extraDependencies": [
8
- "manifest.json",
9
- "robots.txt",
10
- "node_modules/@webcomponents/webcomponentsjs/**",
11
- "node_modules/@webcomponents/webcomponentsjs/bundles/**"
12
- ],
13
- "builds":
14
- [
15
- {
16
- "name": "es5-bundled",
17
- "js": { "minify": true, "compile": true, "transformModulesToAmd": true },
18
- "css": { "minify": true },
19
- "html": { "minify": true },
20
- "bundle": { "inlineScripts": false },
21
- "addServiceWorker": true
22
- }
23
- ]
24
- }
package/pwa-auth.js DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- @license
3
- Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
4
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
- Code distributed by Google as part of the polymer project is also
8
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
- */
10
-
11
- export { UserDrawer } from './deploy/user-drawer.js';
12
- export { UserSettings } from './deploy/user-settings.js';
13
- export { UserIcon } from './deploy/user-icon.js';
14
- // module.exports = require('./src/user-drawer.js');
15
- // module.exports = require('./src/user-settings.js');
16
- // module.exports = require('./src/user-icon.js');
package/src/store.ts DELETED
@@ -1,52 +0,0 @@
1
- /**
2
- @license
3
- Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
4
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
- Code distributed by Google as part of the polymer project is also
8
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
- */
10
-
11
- declare global {
12
- interface Window {
13
- process?: Object;
14
- __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: typeof compose;
15
- }
16
- }
17
-
18
- import {
19
- createStore,
20
- compose,
21
- applyMiddleware,
22
- combineReducers,
23
- Reducer,
24
- StoreEnhancer } from 'redux';
25
- import thunk, { ThunkMiddleware } from 'redux-thunk';
26
- import { lazyReducerEnhancer } from 'pwa-helpers/lazy-reducer-enhancer.js';
27
- import user, { AppState } from './user-reducer';
28
- import { AppAction } from './user-action';
29
-
30
- // Overall state extends static states and partials lazy states.
31
- export interface RootState {
32
- user?: AppState;
33
- }
34
-
35
- export type RootAction = AppAction ;
36
-
37
- // Sets up a Chrome extension for time travel debugging.
38
- // See https://github.com/zalmoxisus/redux-devtools-extension for more information.
39
- const devCompose: <Ext0, Ext1, StateExt0, StateExt1>(
40
- f1: StoreEnhancer<Ext0, StateExt0>, f2: StoreEnhancer<Ext1, StateExt1>
41
- ) => StoreEnhancer<Ext0 & Ext1, StateExt0 & StateExt1> =
42
- window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
43
-
44
- export const store = createStore(
45
- state => state as Reducer<RootState, RootAction>,
46
- devCompose(
47
- lazyReducerEnhancer(combineReducers),
48
- applyMiddleware(thunk as ThunkMiddleware<RootState, RootAction>)
49
- )
50
- );
51
-
52
- store.addReducers({ user });
@@ -1,143 +0,0 @@
1
-
2
- /**
3
- @license
4
- Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
5
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
- Code distributed by Google as part of the polymer project is also
9
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
- */
11
-
12
- // @ts-check
13
-
14
- import { css } from 'lit-element';
15
-
16
- export const User = css`
17
-
18
- /* Google Icon Load */
19
- .icon {
20
- background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/28px-Google_%22G%22_Logo.svg.png') transparent 5px 50% no-repeat;
21
- display: inline-block;
22
- vertical-align: middle;
23
- width: 42px;
24
- height: 42px;
25
- }
26
-
27
- .visibility[on] {
28
- visibility: visible;
29
- transform: translate3d(0, 0, 0);
30
- }
31
-
32
- .visibility {
33
- position: fixed;
34
- right: 0;
35
- visibility: hidden;
36
- will-change: transform;
37
- transform: translate3d(0, -150%, 0);
38
- transition-property: visibility, transform;
39
- transition-duration: 1.4s;
40
- display: block;
41
- }
42
-
43
- .userDrawer {
44
- z-index: 1;
45
- max-width: 600px;
46
- margin: auto;
47
- background-color: #fff;
48
- color: #303030;
49
- padding: 8px 18px;
50
- box-sizing: border-box;
51
- border: 3px #303030 solid;
52
- border-radius: 20px;
53
- }
54
-
55
- .exit {
56
- display: grid;
57
- grid-template-columns: 80px 1fr 80px;
58
- }
59
-
60
- .exit > h3 {
61
- font-weight: 800;
62
- font-size: .9em;
63
- margin: 0px auto;
64
- opacity: .8;
65
- line-height: 36px;
66
- }
67
-
68
- .exit > .remove {
69
- background-color: transparent;
70
- border: 0px;
71
- color: red;
72
- font-weight: 800;
73
- font-size: .7em;
74
- text-transform: uppercase;
75
- opacity: .6;
76
- }
77
-
78
- .exit > .refresh {
79
- background-color: transparent;
80
- border: 0px;
81
- fill: blue;
82
- height: 36px;
83
- width: 36px;
84
- padding: 0px;
85
- }
86
-
87
- .sign-right {
88
- height: 36px;
89
- width: 36px;
90
- margin: auto;
91
- background-color: transparent;
92
- border: 0px;
93
- fill: red;
94
- opacity: .8;
95
- }
96
-
97
- .google {
98
- margin: auto;
99
- color: #444;
100
- width: 210px;
101
- border-radius: 5px;
102
- border: thin solid #888;
103
- box-shadow: 1px 1px 1px grey;
104
- white-space: nowrap;
105
-
106
- background-color: #ffffff;
107
- size: 14px;
108
- font: Roboto-Medium;
109
- line-height: 26px;
110
- padding: 8dp;
111
- border-color: #4267b2;
112
- border-radius: 10px;
113
- -webkit-font-smoothing: antialiased;
114
- font-weight: bold;
115
- justify-content: center;
116
- text-align: center;
117
- text-shadow: none;
118
- }
119
-
120
- .google:hover {
121
- cursor: pointer;
122
- }
123
-
124
- .imageGoogle { height: 18dp; width: 18xp; }
125
- label { font-size: .9em; }
126
- .setLog > p { margin: 12px; box-sizing: border-box; }
127
- .divide { border: 2px solid #606060; margin: 6px 0 0 0; border-radius: 50%; }
128
- @media (max-width: 460px) { .google, label, #bat { font-size: .8em; } }
129
-
130
- input {
131
- box-sizing: border-box;
132
- width: 100%;
133
- padding: 12px 20px;
134
- margin: 8px 0 0 0;
135
- display: inline-block;
136
- border: 1px solid #ccc;
137
- border-radius: 4px;
138
- }
139
-
140
- a { text-transform: uppercase; font-size: .6em; color: rgb(105,105,105); font-weight: 800; text-decoration: none; }
141
- p {text-align: center;}
142
- .inpat { display:grid; grid-template-columns: 60% 40%;}
143
- `;
@@ -1,61 +0,0 @@
1
-
2
- /**
3
- @license
4
- Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
5
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
- Code distributed by Google as part of the polymer project is also
9
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
- */
11
-
12
- // @ts-check
13
-
14
- import { css } from 'lit-element';
15
-
16
- export const Settings = css`
17
-
18
- form { box-sizing: border-box; }
19
- .pageTitle { margin: 0; }
20
-
21
- form {
22
- max-width: 600px;
23
- margin: auto;
24
- border: 0;
25
- }
26
-
27
- .setMenu {
28
- display: grid;
29
- grid-template-columns: 1fr 1fr 1fr 1fr;
30
- grid-gap: 8px;
31
- margin: 0px;
32
- padding: 0px;
33
- }
34
-
35
- .topButton {
36
- color: grey;
37
- border: 0;
38
- width: 100%;
39
- height: 36px;
40
- margin: auto;
41
- padding: 0px;
42
- font-weight: 800;
43
- font-size: .8em;
44
- border-radius: 5px;
45
- background-color: transparent;
46
- }
47
-
48
- .topButton[on] {
49
- /* background-color: rgba(0,0,0, .1); */
50
- color: var(--app-black-color);
51
- }
52
-
53
- .topButton:hover {
54
- cursor: pointer;
55
- }
56
-
57
- .topButton > p {
58
- margin: 0px;
59
- }
60
-
61
- `;
package/src/styles.ts DELETED
@@ -1,95 +0,0 @@
1
-
2
- /**
3
- @license
4
- Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
5
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
- Code distributed by Google as part of the polymer project is also
9
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
- */
11
-
12
- // @ts-check
13
-
14
- import { html, css } from 'lit-element';
15
-
16
- export const userStyles = css`
17
-
18
- .spec[on] { display: block; }
19
- .spec { display: none; }
20
-
21
- .x-font {
22
- font-family: Roboto, Arial, sans-serif; /* 'Montserrat' */
23
- line-height: 1.1;
24
- letter-spacing: .007em;
25
- font-size: 14px;
26
- font-weight: 500;
27
- text-align: center;
28
- text-decoration-style: solid;
29
- text-transform: uppercase;
30
- }
31
-
32
- ul {
33
- list-style-type: none;
34
- padding: 0;
35
- margin: 0;
36
- }
37
-
38
- input[type=submit]:hover { background-color: #45a049; }
39
- input[type=submit] {
40
- box-sizing: border-box;
41
- width: 100%;
42
- background-color: #4CAF50;
43
- color: white;
44
- padding: 14px 20px;
45
- margin: 8px 0;
46
- border: none;
47
- border-radius: 4px;
48
- cursor: pointer;
49
- }
50
-
51
- input.invalid { background-color: #ffdddd; }
52
- input[type=text],
53
- input[type=email],
54
- input[type=password], select {
55
- box-sizing: border-box;
56
- width: 100%;
57
- padding: 8px 16px;
58
- border-radius: 4px;
59
- background-color: rgba(228, 241, 254, 1);
60
- border: 1px #ccc solid;
61
- border-bottom: 2px var(--app-black-color) solid;
62
- border-radius: 5px;
63
- text-align: center;
64
- }
65
-
66
- .action-button:focus, .topButton:focus {outline:0;}
67
- .action-button {
68
- display: inline-block;
69
- box-sizing: border-box;
70
- white-space: nowrap;
71
- margin: 10px 0 10px 0;
72
- font-weight: 400;
73
- text-align: center;
74
- vertical-align: middle;
75
- touch-action: manipulation;
76
- -webkit-appearance: button;
77
- cursor: pointer;
78
- font-size: 16px;
79
- height: 38px;
80
- line-height: 16px;
81
- width: 100%;
82
- padding: 10px 16px;
83
- border-radius: 6px;
84
- color: #fff;
85
- background-color: #6cc04a;
86
- border-color: #60b23e;
87
- box-shadow: 1px 1px 1px grey;
88
- }
89
-
90
- `;
91
-
92
- 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>`;
93
- 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>`;
94
-
95
-
@@ -1,91 +0,0 @@
1
-
2
- /**
3
- @license
4
- Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
5
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
- Code distributed by Google as part of the polymer project is also
9
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
- */
11
-
12
- import { Action, ActionCreator } from 'redux';
13
- import { ThunkAction } from 'redux-thunk';
14
- import { RootState } from './store.js';
15
-
16
- export const LOGGED_IN = 'LOGGED_IN';
17
- export const SETTINGS_PAGE = 'SETTINGS_PAGE';
18
-
19
- export const PROFILE_TYPE = 'PROFILE_TYPE';
20
- export const SIGN_IN = 'SIGN_IN';
21
-
22
- export const SET_USER = 'SET_USER';
23
- export const SET_IMAGE = 'SET_IMAGE';
24
- export const SET_NAME = 'SET_NAME';
25
-
26
- export const OPEN_SIGN = 'OPEN_SIGN';
27
- export const CLOSE_SIGN = 'CLOSE_SIGN';
28
-
29
- export const SIGN_UP_OPEN = "SIGN_UP_OPEN";
30
- export const SIGN_UP_CLOSE = "SIGN_UP_CLOSE";
31
-
32
- // export interface updateLoginX extends Action<'LOGGED_IN'> { logged: boolean };
33
- export interface navigateX extends Action<'SETTINGS_PAGE'> { option: string };
34
- export interface setImageX extends Action<'SET_IMAGE'> { image: string };
35
- export interface setNameX extends Action<'SET_NAME'> { name: string };
36
-
37
- export interface setAuthX extends Action<'LOGGED_IN'> { currentUser: boolean };
38
- export interface setUserX extends Action<'SET_USER'> { user: string };
39
- export interface profileX extends Action<'PROFILE_TYPE'> { profileType: string };
40
-
41
- export interface openSignX extends Action<'OPEN_SIGN'> { };
42
- export interface closeSignX extends Action<'CLOSE_SIGN'> { };
43
-
44
- export interface signUpOpen extends Action<'SIGN_UP_OPEN'> { };
45
- export interface signUpClose extends Action<'SIGN_UP_CLOSE'> { };
46
-
47
- export type AppAction = closeSignX | openSignX | signUpOpen | signUpClose | navigateX | setImageX | setNameX | setAuthX | setUserX | profileX;
48
-
49
- // export type AppAction = closeSignX | openSignX | signUpOpen | signUpClose | setImageX | setNameX ;
50
-
51
- type ThunkResult = ThunkAction<void, RootState, undefined, AppAction>;
52
-
53
- // NAVIGATION
54
- export const navigate: ActionCreator<navigateX> = (option: string) => {
55
- switch(option) {
56
-
57
- case 'profile':
58
- break;
59
- case 'email':
60
- break;
61
- case 'password':
62
- break;
63
- case 'delete':
64
- break;
65
-
66
- default: option = 'profile';
67
-
68
- }
69
- return { type: SETTINGS_PAGE, option }
70
- }
71
-
72
- export const openSign: ActionCreator<ThunkResult> = ( snackState: boolean ) => (dispatch, getState) => {
73
- if ( getState().user!.snackState === true) { dispatch({ type: CLOSE_SIGN, snackState }); }
74
- else { dispatch({ type: OPEN_SIGN, snackState }); }
75
- }
76
- export const signUp: ActionCreator<ThunkResult> = ( register: boolean ) => (dispatch, getState) => {
77
- if ( getState().user!.register === false) { dispatch({ type: SIGN_UP_OPEN, register }); }
78
- else { dispatch({ type: SIGN_UP_CLOSE, register }); }
79
- }
80
-
81
- // export const updateLogin: ActionCreator<updateLoginX> = ( logged: boolean ) => { return { type: LOGGED_IN, logged }; };
82
- export const setAuth: ActionCreator<setAuthX> = ( currentUser: boolean ) => { return { type: LOGGED_IN, currentUser }; };
83
- export const setUser: ActionCreator<setUserX> = ( user: string ) => { return { type: SET_USER, user }; };
84
-
85
- export const setImage: ActionCreator<setImageX> = ( image: string ) => { return { type: SET_IMAGE, image }; };
86
- export const setName: ActionCreator<setNameX> = ( name: string ) => { return { type: SET_NAME, name }; };
87
- export const closeSign: ActionCreator<closeSignX> = ( closeLogIN: boolean ) => { return { type: CLOSE_SIGN, closeLogIN } };
88
-
89
- // export const profile: ActionCreator<profileX> = ( profileType: string ) => { return { type: PROFILE_TYPE, profileType } };
90
- // export const signUp = (register) => { return { type: IN_UP, register }; }
91
-