pwa-auth 3.0.5 → 3.1.2

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.
Files changed (127) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +53 -42
  3. package/demonstration/compiled/pwa-auth.js +34 -34
  4. package/demonstration/compiled/pwa-auth.js.map +1 -1
  5. package/demonstration/compiled/pwa-helpers-BN4uXXdl.js +8 -0
  6. package/demonstration/compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
  7. package/demonstration/compiled/pwa-helpers.js +8 -0
  8. package/demonstration/compiled/pwa-helpers.js.map +1 -0
  9. package/package.json +16 -3
  10. package/src/compiled/pwa-auth.js +34 -34
  11. package/src/compiled/pwa-auth.js.map +1 -1
  12. package/src/compiled/pwa-helpers-BN4uXXdl.js +8 -0
  13. package/src/compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
  14. package/src/compiled/pwa-helpers.js +8 -0
  15. package/src/compiled/pwa-helpers.js.map +1 -0
  16. package/src/pwa-auth.js +0 -1
  17. package/src/pwa-helpers.js +1 -0
  18. package/src-classes/pwa-auth.js +3 -0
  19. package/src-compiled/pwa-auth.js +881 -0
  20. package/src-compiled/pwa-auth.js.map +1 -0
  21. package/src-compiled/pwa-helpers-BN4uXXdl.js +8 -0
  22. package/src-compiled/pwa-helpers-BN4uXXdl.js.map +1 -0
  23. package/src-compiled/pwa-helpers.js +8 -0
  24. package/src-compiled/pwa-helpers.js.map +1 -0
  25. package/src-export/pwa-auth.ts +3 -0
  26. package/src-export/pwa-helpers.ts +1 -0
  27. package/src-export/tsconfig.production.json +53 -0
  28. package/src-functions/pwa-helpers.js +1 -0
  29. package/src-typescript/development/helpers-array.ts +0 -0
  30. package/transpiled/src-export/pwa-auth.d.ts +4 -0
  31. package/transpiled/src-export/pwa-auth.d.ts.map +1 -0
  32. package/transpiled/src-export/pwa-auth.js +3 -0
  33. package/transpiled/src-export/pwa-helpers.d.ts +2 -0
  34. package/transpiled/src-export/pwa-helpers.d.ts.map +1 -0
  35. package/transpiled/src-export/pwa-helpers.js +1 -0
  36. package/transpiled/src-typescript/css/form/button.d.ts +3 -0
  37. package/transpiled/src-typescript/css/form/button.d.ts.map +1 -0
  38. package/transpiled/src-typescript/css/form/button.js +54 -0
  39. package/transpiled/src-typescript/css/form/input.d.ts +3 -0
  40. package/transpiled/src-typescript/css/form/input.d.ts.map +1 -0
  41. package/transpiled/src-typescript/css/form/input.js +24 -0
  42. package/transpiled/src-typescript/css/form/label.d.ts +3 -0
  43. package/transpiled/src-typescript/css/form/label.d.ts.map +1 -0
  44. package/transpiled/src-typescript/css/form/label.js +22 -0
  45. package/transpiled/src-typescript/css/form/list.d.ts +3 -0
  46. package/transpiled/src-typescript/css/form/list.d.ts.map +1 -0
  47. package/transpiled/src-typescript/css/form/list.js +22 -0
  48. package/transpiled/src-typescript/css/svg.d.ts +4 -0
  49. package/transpiled/src-typescript/css/svg.d.ts.map +1 -0
  50. package/transpiled/src-typescript/css/svg.js +4 -0
  51. package/transpiled/src-typescript/css/toggle.d.ts +2 -0
  52. package/transpiled/src-typescript/css/toggle.d.ts.map +1 -0
  53. package/transpiled/src-typescript/css/toggle.js +8 -0
  54. package/transpiled/src-typescript/firebase/authentication.d.ts +11 -0
  55. package/transpiled/src-typescript/firebase/authentication.d.ts.map +1 -0
  56. package/transpiled/src-typescript/firebase/authentication.js +10 -0
  57. package/transpiled/src-typescript/firebase/interface.d.ts +5 -0
  58. package/transpiled/src-typescript/firebase/interface.d.ts.map +1 -0
  59. package/transpiled/src-typescript/firebase/interface.js +79 -0
  60. package/transpiled/src-typescript/redux/backend.d.ts +16 -0
  61. package/transpiled/src-typescript/redux/backend.d.ts.map +1 -0
  62. package/transpiled/src-typescript/redux/backend.js +43 -0
  63. package/transpiled/src-typescript/redux/drawer.d.ts +20 -0
  64. package/transpiled/src-typescript/redux/drawer.d.ts.map +1 -0
  65. package/transpiled/src-typescript/redux/drawer.js +21 -0
  66. package/transpiled/src-typescript/redux/frontend.d.ts +17 -0
  67. package/transpiled/src-typescript/redux/frontend.d.ts.map +1 -0
  68. package/transpiled/src-typescript/redux/frontend.js +67 -0
  69. package/transpiled/src-typescript/redux/object.d.ts +24 -0
  70. package/transpiled/src-typescript/redux/object.d.ts.map +1 -0
  71. package/transpiled/src-typescript/redux/object.js +1 -0
  72. package/transpiled/src-typescript/store.d.ts +19 -0
  73. package/transpiled/src-typescript/store.d.ts.map +1 -0
  74. package/transpiled/src-typescript/store.js +13 -0
  75. package/transpiled/src-typescript/webcomponents/drawer/css/drawer.d.ts +3 -0
  76. package/transpiled/src-typescript/webcomponents/drawer/css/drawer.d.ts.map +1 -0
  77. package/transpiled/src-typescript/webcomponents/drawer/css/drawer.js +55 -0
  78. package/transpiled/src-typescript/webcomponents/drawer/css/exit.d.ts +3 -0
  79. package/transpiled/src-typescript/webcomponents/drawer/css/exit.d.ts.map +1 -0
  80. package/transpiled/src-typescript/webcomponents/drawer/css/exit.js +48 -0
  81. package/transpiled/src-typescript/webcomponents/drawer/css/link.d.ts +3 -0
  82. package/transpiled/src-typescript/webcomponents/drawer/css/link.d.ts.map +1 -0
  83. package/transpiled/src-typescript/webcomponents/drawer/css/link.js +12 -0
  84. package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.d.ts +3 -0
  85. package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.d.ts.map +1 -0
  86. package/transpiled/src-typescript/webcomponents/drawer/css/paragraph.js +10 -0
  87. package/transpiled/src-typescript/webcomponents/drawer/css/toggle.d.ts +3 -0
  88. package/transpiled/src-typescript/webcomponents/drawer/css/toggle.d.ts.map +1 -0
  89. package/transpiled/src-typescript/webcomponents/drawer/css/toggle.js +18 -0
  90. package/transpiled/src-typescript/webcomponents/drawer/drawer.d.ts +37 -0
  91. package/transpiled/src-typescript/webcomponents/drawer/drawer.d.ts.map +1 -0
  92. package/transpiled/src-typescript/webcomponents/drawer/drawer.js +138 -0
  93. package/transpiled/src-typescript/webcomponents/drawer/input/login.d.ts +20 -0
  94. package/transpiled/src-typescript/webcomponents/drawer/input/login.d.ts.map +1 -0
  95. package/transpiled/src-typescript/webcomponents/drawer/input/login.js +134 -0
  96. package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.d.ts +20 -0
  97. package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.d.ts.map +1 -0
  98. package/transpiled/src-typescript/webcomponents/drawer/input/sign-up.js +144 -0
  99. package/transpiled/src-typescript/webcomponents/icon/css/icon.d.ts +2 -0
  100. package/transpiled/src-typescript/webcomponents/icon/css/icon.d.ts.map +1 -0
  101. package/transpiled/src-typescript/webcomponents/icon/css/icon.js +59 -0
  102. package/transpiled/src-typescript/webcomponents/icon/icon.d.ts +33 -0
  103. package/transpiled/src-typescript/webcomponents/icon/icon.d.ts.map +1 -0
  104. package/transpiled/src-typescript/webcomponents/icon/icon.js +81 -0
  105. package/transpiled/src-typescript/webcomponents/settings/css/navigation.d.ts +2 -0
  106. package/transpiled/src-typescript/webcomponents/settings/css/navigation.d.ts.map +1 -0
  107. package/transpiled/src-typescript/webcomponents/settings/css/navigation.js +51 -0
  108. package/transpiled/src-typescript/webcomponents/settings/input/delete.d.ts +34 -0
  109. package/transpiled/src-typescript/webcomponents/settings/input/delete.d.ts.map +1 -0
  110. package/transpiled/src-typescript/webcomponents/settings/input/delete.js +92 -0
  111. package/transpiled/src-typescript/webcomponents/settings/input/email.d.ts +34 -0
  112. package/transpiled/src-typescript/webcomponents/settings/input/email.d.ts.map +1 -0
  113. package/transpiled/src-typescript/webcomponents/settings/input/email.js +104 -0
  114. package/transpiled/src-typescript/webcomponents/settings/input/name.d.ts +33 -0
  115. package/transpiled/src-typescript/webcomponents/settings/input/name.d.ts.map +1 -0
  116. package/transpiled/src-typescript/webcomponents/settings/input/name.js +95 -0
  117. package/transpiled/src-typescript/webcomponents/settings/input/password.d.ts +36 -0
  118. package/transpiled/src-typescript/webcomponents/settings/input/password.d.ts.map +1 -0
  119. package/transpiled/src-typescript/webcomponents/settings/input/password.js +151 -0
  120. package/transpiled/src-typescript/webcomponents/settings/input/uploader.d.ts +37 -0
  121. package/transpiled/src-typescript/webcomponents/settings/input/uploader.d.ts.map +1 -0
  122. package/transpiled/src-typescript/webcomponents/settings/input/uploader.js +235 -0
  123. package/transpiled/src-typescript/webcomponents/settings/settings.d.ts +37 -0
  124. package/transpiled/src-typescript/webcomponents/settings/settings.d.ts.map +1 -0
  125. package/transpiled/src-typescript/webcomponents/settings/settings.js +204 -0
  126. package/pwa-auth.js +0 -4
  127. /package/src-typescript/development/{object.ts → utilities-object.ts} +0 -0
@@ -0,0 +1,204 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { css, html, LitElement } from 'lit';
11
+ import { state, customElement, property } from 'lit/decorators.js';
12
+ import { connect } from 'pwa-helpers/connect-mixin.js';
13
+ import { store } from '../../store';
14
+ import { navigateAuth } from '../../redux/frontend';
15
+ import { navigation } from './css/navigation';
16
+ import './input/uploader';
17
+ import './input/name';
18
+ import './input/email';
19
+ import './input/password';
20
+ import './input/delete';
21
+ import { listStyle } from '../../css/form/list';
22
+ let UserSettings = class UserSettings extends connect(store)(LitElement) {
23
+ constructor() {
24
+ super();
25
+ this.emptyArtwork = '';
26
+ this.profileTopic = '';
27
+ this.name = '';
28
+ }
29
+ firstUpdated() {
30
+ const forms = this.querySelectorAll('form');
31
+ forms.forEach(item => {
32
+ item.preventDefault();
33
+ });
34
+ this.shadowRoot.querySelector('button[value=profile]').addEventListener('click', () => {
35
+ store.dispatch(navigateAuth('profile'));
36
+ });
37
+ this.shadowRoot.querySelector('button[value=verification]').addEventListener('click', () => {
38
+ store.dispatch(navigateAuth('verification'));
39
+ });
40
+ this.shadowRoot.querySelector('button[value=password]').addEventListener('click', () => {
41
+ store.dispatch(navigateAuth('password'));
42
+ });
43
+ this.shadowRoot.querySelector('button[value=delete]').addEventListener('click', () => {
44
+ store.dispatch(navigateAuth('delete'));
45
+ });
46
+ }
47
+ stateChanged(state) {
48
+ this.profileTopic = state.frontend.settings;
49
+ this.name = state.backend.name;
50
+ }
51
+ static get styles() {
52
+ return [
53
+ navigation,
54
+ listStyle,
55
+ css `
56
+
57
+ /* Button Padding for Border Outline */
58
+ :host {
59
+ display: grid;
60
+ background-color: var(--pwa_settings_background, white);
61
+ }
62
+
63
+ /* Page Form */
64
+ form {
65
+ box-sizing: border-box;
66
+ display: grid;
67
+ border: 0;
68
+ }
69
+
70
+ /* Page Title */
71
+ .pageTitle { margin: 0; }
72
+
73
+ h2 {
74
+ color: var(--pwa_section_header, black);
75
+ text-align: center;
76
+ text-shadow: 1px 1px 2px black, 0 0 15px grey, 0 0 5px #fff;
77
+
78
+ border-top: 2px solid var(--pwa_divider, black);
79
+ border-bottom: 2px solid var(--pwa_divider, black);
80
+
81
+ margin: 0;
82
+ padding: 8px 0;
83
+ }
84
+
85
+ /* up to 576 pixels */
86
+ @media only screen and (max-width: 576px) {
87
+ h2 {
88
+ font-size: medium;
89
+ }
90
+ }
91
+
92
+ `
93
+ ];
94
+ }
95
+ render() {
96
+ return html `
97
+
98
+ <!-- Page Menu -->
99
+ <nav>
100
+
101
+ <ul>
102
+
103
+ <li>
104
+ <button
105
+ value="profile"
106
+ ?on="${this.profileTopic === 'profile'}">Icon
107
+ </button>
108
+ </li>
109
+
110
+ <li>
111
+ <button
112
+ value="verification"
113
+ ?on="${this.profileTopic === 'verification'}">Profile
114
+ </button>
115
+ </li>
116
+
117
+ <li>
118
+ <button
119
+ value="password"
120
+ ?on="${this.profileTopic === 'password'}">Password
121
+ </button>
122
+ </li>
123
+
124
+ <li>
125
+ <button
126
+ value="delete"
127
+ ?on="${this.profileTopic === 'delete'}">Delete
128
+ </button>
129
+ </li>
130
+
131
+ </ul>
132
+
133
+ </nav>
134
+
135
+ <!-- Page 1: Profile -->
136
+ <section ?on="${this.profileTopic === 'profile'}">
137
+
138
+ <!-- Display Username -->
139
+ <h2>${this.name}</h2>
140
+
141
+ <!-- Custom Image Element - Display / Upload -->
142
+ <contact-photo emptyArtwork="${this.emptyArtwork}"></contact-photo>
143
+
144
+ </section>
145
+
146
+ <!-- Page 2: Verification -->
147
+ <section ?on="${this.profileTopic === 'verification'}">
148
+
149
+ <!-- Page Title -->
150
+ <h2>Contact Information</h2>
151
+
152
+ <!-- Custom - Username -->
153
+ <input-name></input-name>
154
+
155
+ <!-- Custom - Email -->
156
+ <contact-email></contact-email>
157
+
158
+ <!-- Indicator - Verified -->
159
+ <div class="verified"></div>
160
+
161
+ </section>
162
+
163
+ <!-- Page 3: Password -->
164
+ <section ?on="${this.profileTopic === 'password'}">
165
+
166
+ <!-- Page Title -->
167
+ <h2>Password</h2>
168
+
169
+ <!-- Custom - Password -->
170
+ <input-password></input-password>
171
+
172
+ </section>
173
+
174
+ <!-- Page 4: Delete -->
175
+ <section ?on="${this.profileTopic === 'delete'}">
176
+
177
+ <!-- Page Title -->
178
+ <h2>Delete Account</h2>
179
+
180
+ <!-- Custom - Delete -->
181
+ <delete-user></delete-user>
182
+
183
+ </section>
184
+
185
+ `;
186
+ }
187
+ };
188
+ __decorate([
189
+ property({ type: String, reflect: true }),
190
+ __metadata("design:type", Object)
191
+ ], UserSettings.prototype, "emptyArtwork", void 0);
192
+ __decorate([
193
+ state(),
194
+ __metadata("design:type", Object)
195
+ ], UserSettings.prototype, "profileTopic", void 0);
196
+ __decorate([
197
+ state(),
198
+ __metadata("design:type", Object)
199
+ ], UserSettings.prototype, "name", void 0);
200
+ UserSettings = __decorate([
201
+ customElement('user-settings'),
202
+ __metadata("design:paramtypes", [])
203
+ ], UserSettings);
204
+ export { UserSettings };
package/pwa-auth.js DELETED
@@ -1,4 +0,0 @@
1
- export { firebaseConfig, application, db, storage, auth, user } from './src/compiled/pwa-auth.js';
2
- export { UserDrawer } from './src/compiled/pwa-auth.js';
3
- export { UserSettings } from './src/compiled/pwa-auth.js';
4
- export { UserIcon } from './src/compiled/pwa-auth.js';