pwa-auth 3.4.8 → 3.5.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.
Files changed (234) hide show
  1. package/LICENSES.txt +36 -15
  2. package/README.md +547 -311
  3. package/base/api/drawer.d.ts +4 -0
  4. package/base/api/drawer.d.ts.map +1 -0
  5. package/base/api/drawer.js +12 -0
  6. package/base/api/drawer.js.map +1 -0
  7. package/base/api/user.d.ts +4 -0
  8. package/base/api/user.d.ts.map +1 -0
  9. package/base/api/user.js +25 -0
  10. package/base/api/user.js.map +1 -0
  11. package/base/api/verify.d.ts +4 -0
  12. package/base/api/verify.d.ts.map +1 -0
  13. package/base/api/verify.js +113 -0
  14. package/base/api/verify.js.map +1 -0
  15. package/base/deprecated/email-changed.d.ts +5 -0
  16. package/base/deprecated/email-changed.d.ts.map +1 -0
  17. package/base/deprecated/email-changed.js +9 -0
  18. package/base/deprecated/email-changed.js.map +1 -0
  19. package/base/events/emit.d.ts +12 -0
  20. package/base/events/emit.d.ts.map +1 -0
  21. package/base/events/emit.js +30 -0
  22. package/base/events/emit.js.map +1 -0
  23. package/base/events/names.d.ts +31 -0
  24. package/base/events/names.d.ts.map +1 -0
  25. package/base/events/names.js +31 -0
  26. package/base/events/names.js.map +1 -0
  27. package/base/events/types.d.ts +71 -0
  28. package/base/events/types.d.ts.map +1 -0
  29. package/base/events/types.js +2 -0
  30. package/base/events/types.js.map +1 -0
  31. package/base/export/pwa-auth.d.ts +17 -7
  32. package/base/export/pwa-auth.d.ts.map +1 -0
  33. package/base/export/pwa-auth.js +13 -7
  34. package/base/export/pwa-auth.js.map +1 -1
  35. package/base/firebase/attribute.d.ts +2 -0
  36. package/base/firebase/attribute.d.ts.map +1 -0
  37. package/base/firebase/attribute.js +17 -0
  38. package/base/firebase/attribute.js.map +1 -0
  39. package/base/firebase/authentication.d.ts +21 -10
  40. package/base/firebase/authentication.d.ts.map +1 -0
  41. package/base/firebase/authentication.js +65 -8
  42. package/base/firebase/authentication.js.map +1 -1
  43. package/base/firebase/interface.d.ts +7 -1
  44. package/base/firebase/interface.d.ts.map +1 -0
  45. package/base/firebase/interface.js +99 -68
  46. package/base/firebase/interface.js.map +1 -1
  47. package/base/firebase/message.d.ts +2 -0
  48. package/base/firebase/message.d.ts.map +1 -0
  49. package/base/firebase/message.js +34 -0
  50. package/base/firebase/message.js.map +1 -0
  51. package/base/firebase/password.d.ts +11 -0
  52. package/base/firebase/password.d.ts.map +1 -0
  53. package/base/firebase/password.js +16 -0
  54. package/base/firebase/password.js.map +1 -0
  55. package/base/lazyLoader.d.ts +1 -0
  56. package/base/lazyLoader.d.ts.map +1 -0
  57. package/base/redux/backend.d.ts +1 -0
  58. package/base/redux/backend.d.ts.map +1 -0
  59. package/base/redux/backend.js +1 -1
  60. package/base/redux/backend.js.map +1 -1
  61. package/base/redux/frontend.d.ts +16 -1
  62. package/base/redux/frontend.d.ts.map +1 -0
  63. package/base/redux/frontend.js +6 -3
  64. package/base/redux/frontend.js.map +1 -1
  65. package/base/store.d.ts +1 -6
  66. package/base/store.d.ts.map +1 -0
  67. package/base/store.js +2 -4
  68. package/base/store.js.map +1 -1
  69. package/base/webcomponents/css/animation.d.ts +1 -0
  70. package/base/webcomponents/css/animation.d.ts.map +1 -0
  71. package/base/webcomponents/css/animation.js +79 -67
  72. package/base/webcomponents/css/animation.js.map +1 -1
  73. package/base/webcomponents/css/svg.d.ts +1 -2
  74. package/base/webcomponents/css/svg.d.ts.map +1 -0
  75. package/base/webcomponents/css/svg.js +2 -4
  76. package/base/webcomponents/css/svg.js.map +1 -1
  77. package/base/webcomponents/css/tap.d.ts +3 -0
  78. package/base/webcomponents/css/tap.d.ts.map +1 -0
  79. package/base/webcomponents/css/tap.js +9 -0
  80. package/base/webcomponents/css/tap.js.map +1 -0
  81. package/base/webcomponents/css/toggle.d.ts +1 -0
  82. package/base/webcomponents/css/toggle.d.ts.map +1 -0
  83. package/base/webcomponents/css/toggle.js +5 -5
  84. package/base/webcomponents/drawer/css/drawer.d.ts +1 -0
  85. package/base/webcomponents/drawer/css/drawer.d.ts.map +1 -0
  86. package/base/webcomponents/drawer/css/drawer.js +101 -74
  87. package/base/webcomponents/drawer/css/drawer.js.map +1 -1
  88. package/base/webcomponents/drawer/css/exit.d.ts +1 -0
  89. package/base/webcomponents/drawer/css/exit.d.ts.map +1 -0
  90. package/base/webcomponents/drawer/css/exit.js +58 -52
  91. package/base/webcomponents/drawer/css/exit.js.map +1 -1
  92. package/base/webcomponents/drawer/css/link.d.ts +1 -0
  93. package/base/webcomponents/drawer/css/link.d.ts.map +1 -0
  94. package/base/webcomponents/drawer/css/link.js +9 -10
  95. package/base/webcomponents/drawer/css/link.js.map +1 -1
  96. package/base/webcomponents/drawer/css/paragraph.d.ts +1 -0
  97. package/base/webcomponents/drawer/css/paragraph.d.ts.map +1 -0
  98. package/base/webcomponents/drawer/css/paragraph.js +37 -20
  99. package/base/webcomponents/drawer/css/paragraph.js.map +1 -1
  100. package/base/webcomponents/drawer/drawer.d.ts +21 -7
  101. package/base/webcomponents/drawer/drawer.d.ts.map +1 -0
  102. package/base/webcomponents/drawer/drawer.js +292 -90
  103. package/base/webcomponents/drawer/drawer.js.map +1 -1
  104. package/base/webcomponents/drawer/keys.d.ts +4 -0
  105. package/base/webcomponents/drawer/keys.d.ts.map +1 -0
  106. package/base/webcomponents/drawer/keys.js +57 -0
  107. package/base/webcomponents/drawer/keys.js.map +1 -0
  108. package/base/webcomponents/form/css/button.d.ts +1 -0
  109. package/base/webcomponents/form/css/button.d.ts.map +1 -0
  110. package/base/webcomponents/form/css/button.js +69 -51
  111. package/base/webcomponents/form/css/button.js.map +1 -1
  112. package/base/webcomponents/form/css/input.d.ts +1 -0
  113. package/base/webcomponents/form/css/input.d.ts.map +1 -0
  114. package/base/webcomponents/form/css/input.js +22 -21
  115. package/base/webcomponents/form/css/input.js.map +1 -1
  116. package/base/webcomponents/form/css/label.d.ts +1 -0
  117. package/base/webcomponents/form/css/label.d.ts.map +1 -0
  118. package/base/webcomponents/form/css/label.js +22 -21
  119. package/base/webcomponents/form/css/label.js.map +1 -1
  120. package/base/webcomponents/form/css/list.d.ts +1 -0
  121. package/base/webcomponents/form/css/list.d.ts.map +1 -0
  122. package/base/webcomponents/form/css/list.js +19 -19
  123. package/base/webcomponents/form/css/notice.d.ts +3 -0
  124. package/base/webcomponents/form/css/notice.d.ts.map +1 -0
  125. package/base/webcomponents/form/css/notice.js +20 -0
  126. package/base/webcomponents/form/css/notice.js.map +1 -0
  127. package/base/webcomponents/form/css/status.d.ts +4 -0
  128. package/base/webcomponents/form/css/status.d.ts.map +1 -0
  129. package/base/webcomponents/form/css/status.js +44 -0
  130. package/base/webcomponents/form/css/status.js.map +1 -0
  131. package/base/webcomponents/form/css/toggle.d.ts +1 -0
  132. package/base/webcomponents/form/css/toggle.d.ts.map +1 -0
  133. package/base/webcomponents/form/css/toggle.js +43 -17
  134. package/base/webcomponents/form/css/toggle.js.map +1 -1
  135. package/base/webcomponents/form/draft.d.ts +5 -0
  136. package/base/webcomponents/form/draft.d.ts.map +1 -0
  137. package/base/webcomponents/form/draft.js +22 -0
  138. package/base/webcomponents/form/draft.js.map +1 -0
  139. package/base/webcomponents/form/forgot.d.ts +26 -3
  140. package/base/webcomponents/form/forgot.d.ts.map +1 -0
  141. package/base/webcomponents/form/forgot.js +297 -30
  142. package/base/webcomponents/form/forgot.js.map +1 -1
  143. package/base/webcomponents/form/letters.d.ts +3 -0
  144. package/base/webcomponents/form/letters.d.ts.map +1 -0
  145. package/base/webcomponents/form/letters.js +21 -0
  146. package/base/webcomponents/form/letters.js.map +1 -0
  147. package/base/webcomponents/form/login.d.ts +10 -0
  148. package/base/webcomponents/form/login.d.ts.map +1 -0
  149. package/base/webcomponents/form/login.js +221 -89
  150. package/base/webcomponents/form/login.js.map +1 -1
  151. package/base/webcomponents/form/notice.d.ts +4 -0
  152. package/base/webcomponents/form/notice.d.ts.map +1 -0
  153. package/base/webcomponents/form/notice.js +14 -0
  154. package/base/webcomponents/form/notice.js.map +1 -0
  155. package/base/webcomponents/form/reveal.d.ts +3 -0
  156. package/base/webcomponents/form/reveal.d.ts.map +1 -0
  157. package/base/webcomponents/form/reveal.js +14 -0
  158. package/base/webcomponents/form/reveal.js.map +1 -0
  159. package/base/webcomponents/form/signup.d.ts +8 -0
  160. package/base/webcomponents/form/signup.d.ts.map +1 -0
  161. package/base/webcomponents/form/signup.js +201 -100
  162. package/base/webcomponents/form/signup.js.map +1 -1
  163. package/base/webcomponents/form/verified.d.ts +3 -0
  164. package/base/webcomponents/form/verified.d.ts.map +1 -0
  165. package/base/webcomponents/form/verified.js +45 -0
  166. package/base/webcomponents/form/verified.js.map +1 -0
  167. package/base/webcomponents/icon/css/icon.d.ts +1 -0
  168. package/base/webcomponents/icon/css/icon.d.ts.map +1 -0
  169. package/base/webcomponents/icon/css/icon.js +63 -49
  170. package/base/webcomponents/icon/css/icon.js.map +1 -1
  171. package/base/webcomponents/icon/icon.d.ts +6 -4
  172. package/base/webcomponents/icon/icon.d.ts.map +1 -0
  173. package/base/webcomponents/icon/icon.js +48 -27
  174. package/base/webcomponents/icon/icon.js.map +1 -1
  175. package/base/webcomponents/login/css/auth.d.ts +1 -0
  176. package/base/webcomponents/login/css/auth.d.ts.map +1 -0
  177. package/base/webcomponents/login/css/auth.js +37 -36
  178. package/base/webcomponents/login/css/auth.js.map +1 -1
  179. package/base/webcomponents/login/css/link.d.ts +1 -0
  180. package/base/webcomponents/login/css/link.d.ts.map +1 -0
  181. package/base/webcomponents/login/css/link.js +9 -10
  182. package/base/webcomponents/login/css/link.js.map +1 -1
  183. package/base/webcomponents/login/css/paragraph.d.ts +1 -0
  184. package/base/webcomponents/login/css/paragraph.d.ts.map +1 -0
  185. package/base/webcomponents/login/css/paragraph.js +8 -8
  186. package/base/webcomponents/login/page.d.ts +10 -6
  187. package/base/webcomponents/login/page.d.ts.map +1 -0
  188. package/base/webcomponents/login/page.js +96 -55
  189. package/base/webcomponents/login/page.js.map +1 -1
  190. package/base/webcomponents/settings/css/navigation.d.ts +1 -0
  191. package/base/webcomponents/settings/css/navigation.d.ts.map +1 -0
  192. package/base/webcomponents/settings/css/navigation.js +78 -68
  193. package/base/webcomponents/settings/css/navigation.js.map +1 -1
  194. package/base/webcomponents/settings/input/delete.d.ts +7 -6
  195. package/base/webcomponents/settings/input/delete.d.ts.map +1 -0
  196. package/base/webcomponents/settings/input/delete.js +135 -47
  197. package/base/webcomponents/settings/input/delete.js.map +1 -1
  198. package/base/webcomponents/settings/input/email.d.ts +7 -5
  199. package/base/webcomponents/settings/input/email.d.ts.map +1 -0
  200. package/base/webcomponents/settings/input/email.js +155 -50
  201. package/base/webcomponents/settings/input/email.js.map +1 -1
  202. package/base/webcomponents/settings/input/name.d.ts +8 -5
  203. package/base/webcomponents/settings/input/name.d.ts.map +1 -0
  204. package/base/webcomponents/settings/input/name.js +116 -53
  205. package/base/webcomponents/settings/input/name.js.map +1 -1
  206. package/base/webcomponents/settings/input/password.d.ts +8 -5
  207. package/base/webcomponents/settings/input/password.d.ts.map +1 -0
  208. package/base/webcomponents/settings/input/password.js +200 -103
  209. package/base/webcomponents/settings/input/password.js.map +1 -1
  210. package/base/webcomponents/settings/input/uploader.d.ts +8 -6
  211. package/base/webcomponents/settings/input/uploader.d.ts.map +1 -0
  212. package/base/webcomponents/settings/input/uploader.js +209 -170
  213. package/base/webcomponents/settings/input/uploader.js.map +1 -1
  214. package/base/webcomponents/settings/input/verify.d.ts +64 -0
  215. package/base/webcomponents/settings/input/verify.d.ts.map +1 -0
  216. package/base/webcomponents/settings/input/verify.js +272 -0
  217. package/base/webcomponents/settings/input/verify.js.map +1 -0
  218. package/base/webcomponents/settings/settings.d.ts +15 -10
  219. package/base/webcomponents/settings/settings.d.ts.map +1 -0
  220. package/base/webcomponents/settings/settings.js +226 -146
  221. package/base/webcomponents/settings/settings.js.map +1 -1
  222. package/firebase.md +107 -0
  223. package/intro.md +19 -0
  224. package/license +21 -21
  225. package/package.json +116 -85
  226. package/source/pwa-auth.js +1097 -404
  227. package/source/pwa-styles.css +50 -68
  228. package/base/redux/drawer.d.ts +0 -17
  229. package/base/redux/drawer.js +0 -22
  230. package/base/redux/drawer.js.map +0 -1
  231. package/demonstration/index.html +0 -99
  232. package/demonstration/pwa-styles.css +0 -77
  233. package/demonstration/styles.css +0 -77
  234. package/source/THIRD_PARTY_LICENSES.txt +0 -303
@@ -9,31 +9,64 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { css, html, LitElement } from 'lit';
11
11
  import { customElement, property, state } from 'lit/decorators.js';
12
- import { createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
13
- import { auth } from '../../firebase/authentication';
14
- import { logAccount } from '../../firebase/interface';
15
- import { buttonStyle } from './css/button';
16
- import { labelStyle } from './css/label';
17
- import { inputStyle } from './css/input';
18
- import { listStyle } from './css/list';
19
- import { toggleStyle } from './css/toggle';
20
- import store from '../../store';
21
- import { universalToggle } from '../../redux/frontend';
12
+ import { createUserWithEmailAndPassword } from 'firebase/auth';
13
+ import { auth } from '../../firebase/authentication.js';
14
+ import { logAccount } from '../../firebase/interface.js';
15
+ import { sendVerification } from '../../api/verify.js';
16
+ import { pwaAuthError, pwaSignup } from '../../events/names.js';
17
+ import { emitWindow, toAuthError, toPwaUser } from '../../events/emit.js';
18
+ import { userMessage } from '../../firebase/message.js';
19
+ import { newPasswordIssue, passwordHint, passwordMax, passwordMin } from '../../firebase/password.js';
20
+ import { buttonStyle } from './css/button.js';
21
+ import { labelStyle } from './css/label.js';
22
+ import { inputStyle } from './css/input.js';
23
+ import { listStyle } from './css/list.js';
24
+ import { toggleStyle } from './css/toggle.js';
25
+ import { statusStyle, liveStatus } from './css/status.js';
26
+ import { noticeStyle } from './css/notice.js';
27
+ import { tapStyle } from '../css/tap.js';
28
+ import { revealControl } from './reveal.js';
29
+ import { markVerificationNotice } from './notice.js';
30
+ import store from '../../store.js';
31
+ import { universalToggle } from '../../redux/frontend.js';
32
+ const sentMessage = 'Check your inbox for the verification email. You can still sign in.';
22
33
  let FormSignup = class FormSignup extends LitElement {
23
34
  constructor() {
24
35
  super();
25
36
  this.source = '';
26
37
  this.email = '';
27
38
  this.password = '';
39
+ this.status = '';
40
+ this.tone = '';
41
+ this.busy = false;
42
+ this.showPassword = false;
43
+ this.notice = '';
28
44
  this.newAccount = async (email, password) => {
29
- await createUserWithEmailAndPassword(auth, email, password)
30
- .then((userCredential) => {
31
- const user = userCredential.user;
32
- sendEmailVerification(user)
33
- .then(() => {
34
- console.log("Verification email sent.");
35
- });
36
- }).then(() => { logAccount(); });
45
+ this.busy = true;
46
+ this.tone = '';
47
+ this.status = '';
48
+ try {
49
+ const userCredential = await createUserWithEmailAndPassword(auth, email, password);
50
+ await logAccount();
51
+ const person = toPwaUser(userCredential.user);
52
+ if (person)
53
+ emitWindow(pwaSignup, { user: person });
54
+ try {
55
+ await sendVerification();
56
+ this.notice = sentMessage;
57
+ markVerificationNotice(email);
58
+ }
59
+ catch (error) {
60
+ this.tone = 'error';
61
+ this.status = userMessage(error);
62
+ }
63
+ }
64
+ catch (error) {
65
+ this.show(toAuthError(error));
66
+ }
67
+ finally {
68
+ this.busy = false;
69
+ }
37
70
  };
38
71
  }
39
72
  static get styles() {
@@ -43,95 +76,139 @@ let FormSignup = class FormSignup extends LitElement {
43
76
  inputStyle,
44
77
  buttonStyle,
45
78
  toggleStyle,
46
- css `
47
-
48
- :host {
49
- background-color: white;
50
- }
51
-
52
- .double {
53
- display: grid;
54
- grid-template-columns: 1fr auto;
55
- }
56
-
57
- form { display: grid; }
58
-
79
+ statusStyle,
80
+ noticeStyle,
81
+ tapStyle,
82
+ css `
83
+
84
+ :host {
85
+ background-color: var(--section_background_color, #fffdf8);
86
+ }
87
+
88
+ .double {
89
+ display: grid;
90
+ grid-template-columns: 1fr auto;
91
+ }
92
+
93
+ form { display: grid; }
94
+
59
95
  `
60
96
  ];
61
97
  }
62
98
  ;
63
99
  render() {
64
- return html `
65
-
66
- <!-- Sign Up State-->
67
- <form
68
- @submit= ${this._handleSubmit}
69
- autocomplete= "on">
70
-
71
- <ul>
72
-
73
- <li>
74
-
75
- <label>Email
76
-
77
- <input
78
- id= "${this.source}-signup-email"
79
- type= "email"
80
- @change= "${this.handleEmail}">
81
-
82
- </label>
83
-
84
- </li>
85
-
86
- <!-- <label><input id="verifyEmail" type="email" >Verify Email</label> -->
87
-
88
- <li>
89
-
90
- <label>Password
91
-
92
- <input
93
- id= "${this.source}-signup-pass"
94
- type= "password"
95
- @change= "${this.handlePassword}">
96
-
97
- </label>
98
-
99
- </li>
100
-
101
- <li>
102
-
103
- <button
104
- class= "newUser action-button"
105
- @click= "${this.signUp}">Sign up</button>
106
-
107
- </li>
108
-
109
- <!-- <label><input id="veriftPassword" type="password" >Verify Password</label> -->
110
-
111
- <!-- Change State
112
- <li>
113
-
114
- <p class= "divider">Or</p>
115
-
116
-
117
-
118
- </li> -->
119
-
120
- </ul>
121
-
122
- <button
123
- class="new"
124
- @click="${this.change}">login with existing email</button>
125
-
126
- </form>
127
-
100
+ const emailId = `${this.source}-signup-email`;
101
+ const passId = `${this.source}-signup-pass`;
102
+ const hintId = `${this.source || 'page'}-signup-password-hint`;
103
+ const statusId = `${this.source || 'page'}-signup-status`;
104
+ return html `
105
+
106
+ <!-- Sign Up State-->
107
+ <form
108
+ @submit= ${this._handleSubmit}
109
+ autocomplete= "on"
110
+ aria-busy= "${this.busy ? 'true' : 'false'}"
111
+ novalidate>
112
+
113
+ <ul>
114
+
115
+ <li>
116
+
117
+ <label for="${emailId}">Email
118
+
119
+ <input
120
+ id= "${emailId}"
121
+ name= "email"
122
+ part= "email"
123
+ type= "email"
124
+ autocomplete= "email"
125
+ inputmode= "email"
126
+ autocapitalize="off"
127
+ spellcheck= "false"
128
+ aria-invalid= "${this.tone === 'error' ? 'true' : 'false'}"
129
+ aria-describedby="${statusId}"
130
+ @input= "${this.handleEmail}"
131
+ @change= "${this.handleEmail}">
132
+
133
+ </label>
134
+
135
+ </li>
136
+
137
+ <li>
138
+
139
+ <label for="${passId}">Password
140
+
141
+ <span class="pair">
142
+
143
+ <input
144
+ id= "${passId}"
145
+ name= "new-password"
146
+ part= "password"
147
+ type= "${this.showPassword ? 'text' : 'password'}"
148
+ autocomplete= "new-password"
149
+ minlength= "${passwordMin}"
150
+ maxlength= "${passwordMax}"
151
+ aria-invalid= "${this.tone === 'error' ? 'true' : 'false'}"
152
+ aria-describedby="${hintId} ${statusId}"
153
+ @input= "${this.handlePassword}"
154
+ @change= "${this.handlePassword}">
155
+
156
+ ${revealControl(this.showPassword, () => { this.showPassword = !this.showPassword; })}
157
+
158
+ </span>
159
+
160
+ <p id="${hintId}" class="hint" part="hint">${passwordHint}</p>
161
+
162
+ </label>
163
+
164
+ </li>
165
+
166
+ <li>
167
+
168
+ ${liveStatus(statusId, this.status, this.tone)}
169
+
170
+ <button
171
+ type= "submit"
172
+ part= "submit"
173
+ class= "newUser action-button"
174
+ aria-busy= "${this.busy ? 'true' : 'false'}"
175
+ ?disabled= "${this.busy}">${this.busy ? 'Creating account…' : 'Sign up'}</button>
176
+
177
+ </li>
178
+
179
+ </ul>
180
+
181
+ ${this.notice ? html `
182
+ <p class="notice" part="notice" role="status" aria-live="polite">${this.notice}</p>
183
+ ` : ''}
184
+
185
+ <button
186
+ type="button"
187
+ part="switch"
188
+ class="new"
189
+ @click="${this.change}">login with existing email</button>
190
+
191
+ </form>
192
+
128
193
  `;
129
194
  }
130
195
  change() {
131
196
  store.dispatch(universalToggle(this.source));
132
197
  }
198
+ show(detail) {
199
+ this.tone = 'error';
200
+ this.status = userMessage(detail);
201
+ emitWindow(pwaAuthError, detail);
202
+ }
203
+ readFields() {
204
+ const email = this.renderRoot.querySelector('input[type="email"]');
205
+ const password = this.renderRoot.querySelector('input[name="new-password"]');
206
+ this.email = email?.value ?? '';
207
+ this.password = password?.value ?? '';
208
+ }
133
209
  _handleSubmit(event) {
134
210
  event.preventDefault();
211
+ void this.signUp();
135
212
  }
136
213
  handleEmail(event) {
137
214
  const input = event.target;
@@ -141,16 +218,20 @@ let FormSignup = class FormSignup extends LitElement {
141
218
  const input = event.target;
142
219
  this.password = input.value;
143
220
  }
144
- signUp() {
221
+ async signUp() {
222
+ if (this.busy)
223
+ return;
224
+ this.readFields();
145
225
  if (this.email.length < 4) {
146
- alert('Please enter an email address.');
226
+ this.show({ code: 'pwa/missing-email', message: 'Enter an email address.' });
147
227
  return;
148
228
  }
149
- if (this.password.length < 4) {
150
- alert('Please enter a password.');
229
+ const issue = newPasswordIssue(this.password);
230
+ if (issue) {
231
+ this.show(issue);
151
232
  return;
152
233
  }
153
- this.newAccount(this.email, this.password);
234
+ await this.newAccount(this.email, this.password);
154
235
  }
155
236
  };
156
237
  __decorate([
@@ -165,6 +246,26 @@ __decorate([
165
246
  state(),
166
247
  __metadata("design:type", Object)
167
248
  ], FormSignup.prototype, "password", void 0);
249
+ __decorate([
250
+ state(),
251
+ __metadata("design:type", Object)
252
+ ], FormSignup.prototype, "status", void 0);
253
+ __decorate([
254
+ state(),
255
+ __metadata("design:type", Object)
256
+ ], FormSignup.prototype, "tone", void 0);
257
+ __decorate([
258
+ state(),
259
+ __metadata("design:type", Object)
260
+ ], FormSignup.prototype, "busy", void 0);
261
+ __decorate([
262
+ state(),
263
+ __metadata("design:type", Object)
264
+ ], FormSignup.prototype, "showPassword", void 0);
265
+ __decorate([
266
+ state(),
267
+ __metadata("design:type", Object)
268
+ ], FormSignup.prototype, "notice", void 0);
168
269
  FormSignup = __decorate([
169
270
  customElement('form-signup'),
170
271
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/signup.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EACX,MAA8B,KAAK,CAAC;AAErC,OAAO,EACL,aAAa,EACb,QAAQ,EACR,KAAK,EACN,MAA8B,mBAAmB,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T,CAAC;QACD,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;CAqCF,CAAA;AA5NkC;IAAhC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;0CAA2B;AACnC;IAAhB,KAAK,EAAE;;yCAA2B;AAClB;IAAhB,KAAK,EAAE;;4CAA2B;AAClB;IAAhB,KAAK,EAAE;;0CAA2B;AAClB;IAAhB,KAAK,EAAE;;wCAA2B;AAClB;IAAhB,KAAK,EAAE;;wCAA8B;AACrB;IAAhB,KAAK,EAAE;;gDAA8B;AACrB;IAAhB,KAAK,EAAE;;0CAA2B;AAVxB,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;;GAChB,UAAU,CA+NtB"}
@@ -0,0 +1,3 @@
1
+ export declare const verifiedMark: import("lit-html").TemplateResult<1>;
2
+ export declare const verifiedStyle: import("lit").CSSResult;
3
+ //# sourceMappingURL=verified.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/form/verified.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,sCAMxB,CAAC;AAEF,eAAO,MAAM,aAAa,yBAmCzB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { css, html } from 'lit';
2
+ export const verifiedMark = html `
3
+ <span class="verified" part="verified" role="img" aria-label="Email verified">
4
+ <svg viewBox="0 0 24 24" aria-hidden="true">
5
+ <path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path>
6
+ </svg>
7
+ </span>
8
+ `;
9
+ export const verifiedStyle = css `
10
+
11
+ .verified {
12
+ display: inline-grid;
13
+ place-items: center;
14
+ flex: 0 0 auto;
15
+ width: 1.25rem;
16
+ height: 1.25rem;
17
+ color: var(--pwa_verified_color, var(--pwa_action_background_color, #2a6b45));
18
+ fill: currentColor;
19
+ }
20
+
21
+ .verified svg {
22
+ width: 1.25rem;
23
+ height: 1.25rem;
24
+ display: block;
25
+ }
26
+
27
+ .unverified {
28
+ margin: 0;
29
+ color: var(--pwa_nav_button_color, #4e5b6a);
30
+ font-size: 0.85rem;
31
+ font-weight: 600;
32
+ line-height: 1.3;
33
+ }
34
+
35
+ .who {
36
+ display: inline-flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ gap: 8px;
40
+ flex-wrap: wrap;
41
+ min-width: 0;
42
+ }
43
+
44
+ `;
45
+ //# sourceMappingURL=verified.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified.js","sourceRoot":"","sources":["../../../typescript/webcomponents/form/verified.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA;;;;;;CAM/B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC/B,CAAC"}
@@ -1 +1,2 @@
1
1
  export declare const iconStyles: import("lit").CSSResult;
2
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../typescript/webcomponents/icon/css/icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yBA+DtB,CAAC"}
@@ -1,52 +1,66 @@
1
1
  import { css } from 'lit';
2
- export const iconStyles = css `
3
-
4
- .icon, .login {
5
- cursor: pointer;
6
- margin: auto;
7
- overflow: hidden;
8
- border: var(--pwa_icon_border, 2px solid black);
9
- background-color: var(--pwa_icon_background_color, #6cc04a);
10
- color: white;
11
- font-size: 15px;
12
- text-decoration: none;
13
- transition-duration: 0s;
14
- }
15
-
16
- .icon:hover,
17
- .login:hover {
18
- background-color: var(--pwa_icon_hover_color, lightgrey);
19
- }
20
-
21
- .icon {
22
- height: var(--pwa_icon_diameter, 40px);
23
- width: var(--pwa_icon_diameter, 40px);
24
- border-radius: 50%;
25
- padding: 0;
26
- }
27
-
28
- .login {
29
- width: auto;
30
- border-radius: var(--pwa_icon_radius, 6px);
31
- height: var(--pwa_icon_height, 40px);
32
- padding: var(--pwa_icon_padding, 0px 16px);
33
- font-family: var(--pwa_icon_font, 'Arial', sans-serif);
34
- font-weight: 500;
35
- text-align: center;
36
- /* box-shadow: 4px 4px 4px 0px;*/
37
- border-radius: 8px;
38
- }
39
-
40
- .userImage {
41
- object-fit: cover;
42
- transition-property: all;
43
- transition-duration: 2s;
44
- clip-path: circle(50%);
45
- overflow: hidden;
46
- width: calc(var(--pwa_icon_diameter, 40px) - 2px);
47
- height: calc(var(--pwa_icon_diameter, 40px) - 2px);
48
- margin: auto;
49
- }
50
-
2
+ export const iconStyles = css `
3
+
4
+ .icon, .login {
5
+ cursor: pointer;
6
+ margin: auto;
7
+ overflow: hidden;
8
+ border: var(--pwa_icon_border, 0);
9
+ background-color: var(--pwa_icon_background_color, #2a6b45);
10
+ color: white;
11
+ font-size: 15px;
12
+ text-decoration: none;
13
+ transition-duration: 0s;
14
+ }
15
+
16
+ .icon:hover,
17
+ .login:hover {
18
+ background-color: var(--pwa_icon_hover_color, #214f34);
19
+ }
20
+
21
+ .icon:focus-visible,
22
+ .login:focus-visible {
23
+ outline: 2px solid var(--pwa_action_border_color, #214f34);
24
+ outline-offset: 2px;
25
+ }
26
+
27
+ .icon {
28
+ height: var(--pwa_icon_diameter, 44px);
29
+ width: var(--pwa_icon_diameter, 44px);
30
+ border-radius: 50%;
31
+ padding: 0;
32
+ }
33
+
34
+ .login {
35
+ width: auto;
36
+ border-radius: var(--pwa_icon_radius, 10px);
37
+ height: var(--pwa_icon_height, 44px);
38
+ padding: var(--pwa_icon_padding, 0 18px);
39
+ font-family: var(--pwa_icon_font, "Avenir Next", "Segoe UI", system-ui, sans-serif);
40
+ font-weight: 500;
41
+ text-align: center;
42
+ }
43
+
44
+ .userImage {
45
+ object-fit: cover;
46
+ transition-property: all;
47
+ transition-duration: 2s;
48
+ clip-path: circle(50%);
49
+ overflow: hidden;
50
+ width: 100%;
51
+ height: 100%;
52
+ margin: auto;
53
+ }
54
+
55
+ .initials {
56
+ display: grid;
57
+ place-items: center;
58
+ width: 100%;
59
+ height: 100%;
60
+ font-weight: 600;
61
+ font-size: 0.85rem;
62
+ letter-spacing: 0.04em;
63
+ }
64
+
51
65
  `;
52
66
  //# sourceMappingURL=icon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/icon/css/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD5B,CAAC"}
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../../typescript/webcomponents/icon/css/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D5B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { CSSResultArray, LitElement } from 'lit';
2
- import { AppState } from '../../store';
2
+ import { AppState } from '../../store.js';
3
3
  declare const UserIcon_base: (new (...args: any[]) => {
4
4
  _storeUnsubscribe: import("redux").Unsubscribe;
5
5
  connectedCallback(): void;
@@ -19,9 +19,6 @@ declare const UserIcon_base: (new (...args: any[]) => {
19
19
  phone: string;
20
20
  email: string;
21
21
  };
22
- drawer: {
23
- drawer: boolean;
24
- };
25
22
  backend: {
26
23
  verified: boolean;
27
24
  anon: boolean;
@@ -40,11 +37,15 @@ export declare class UserIcon extends UserIcon_base {
40
37
  empty: string;
41
38
  private _user;
42
39
  private _photoURL;
40
+ private _name;
41
+ private _email;
43
42
  constructor();
43
+ connectedCallback(): void;
44
44
  protected firstUpdated(): void;
45
45
  stateChanged(state: AppState): void;
46
46
  static get styles(): CSSResultArray;
47
47
  protected render(): import("lit-html").TemplateResult<1>;
48
+ private face;
48
49
  }
49
50
  declare global {
50
51
  interface HTMLElementTagNameMap {
@@ -52,3 +53,4 @@ declare global {
52
53
  }
53
54
  }
54
55
  export {};
56
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAG9D,OAAO,EAAS,QAAQ,EAAE,MAAyB,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOpE,qBACa,QAAS,SAAQ,aAA0B;IAGL,SAAS,UAAS;IAGnB,KAAK,SAAM;IAElD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,MAAM,CAAM;;IAKpB,iBAAiB,IAAI,IAAI;IAKlC,SAAS,CAAC,YAAY;IAMtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAQ5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAA+D;IAEjG,SAAS,CAAC,MAAM;IAkBhB,OAAO,CAAC,IAAI;CAab;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACF"}