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
@@ -1,11 +1,68 @@
1
1
  import { initializeApp } from 'firebase/app';
2
- import { getFirestore } from "firebase/firestore";
3
- import { getStorage } from "@firebase/storage";
2
+ import { getFirestore } from 'firebase/firestore';
3
+ import { getStorage } from 'firebase/storage';
4
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;
5
+ export let firebaseConfig = {};
6
+ export let application;
7
+ export let db;
8
+ export let storage;
9
+ export let auth;
10
+ export let user = null;
11
+ let started = false;
12
+ const waiters = [];
13
+ let actionCodeSettings;
14
+ export function emailActionCodeSettings() {
15
+ return actionCodeSettings;
16
+ }
17
+ export function isReady() {
18
+ return started;
19
+ }
20
+ export function onReady(fn) {
21
+ if (started)
22
+ fn();
23
+ else
24
+ waiters.push(fn);
25
+ }
26
+ function legacyConfig() {
27
+ const env = typeof process === 'undefined' ? undefined : process.env;
28
+ const raw = env?.FIREBASE_CONFIG;
29
+ if (!raw)
30
+ return null;
31
+ const parsed = JSON.parse(raw);
32
+ if (!parsed || !parsed.apiKey)
33
+ return null;
34
+ return parsed;
35
+ }
36
+ export function initialize(options) {
37
+ if (options && Object.prototype.hasOwnProperty.call(options, 'actionCodeSettings')) {
38
+ actionCodeSettings = options.actionCodeSettings;
39
+ }
40
+ if (started) {
41
+ if (options?.app && options.app !== application) {
42
+ throw new Error('pwa-auth: Firebase app is already set');
43
+ }
44
+ return application;
45
+ }
46
+ if (options?.app) {
47
+ application = options.app;
48
+ firebaseConfig = application.options;
49
+ }
50
+ else {
51
+ const config = options?.config ?? legacyConfig();
52
+ if (!config)
53
+ throw new Error('pwa-auth: pass initialize({ config }) or set window.process.env.FIREBASE_CONFIG');
54
+ firebaseConfig = config;
55
+ application = initializeApp(firebaseConfig);
56
+ }
57
+ db = getFirestore(application);
58
+ storage = getStorage(application);
59
+ auth = getAuth(application);
60
+ user = auth.currentUser;
61
+ started = true;
62
+ waiters.splice(0).forEach((fn) => fn());
63
+ return application;
64
+ }
65
+ const legacy = legacyConfig();
66
+ if (legacy)
67
+ initialize({ config: legacy });
11
68
  //# sourceMappingURL=authentication.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../typescript/firebase/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAgB,cAAc,CAAC;AACpE,OAAO,EAAE,YAAY,EAAY,MAAoB,oBAAoB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAkB,MAAgB,mBAAmB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAc,MAAuB,eAAe,CAAC;AAErE,MAAM,CAAC,MAAM,cAAc,GAAuB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,WAAW,GAA0B,aAAa,CAAC,cAAc,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,EAAE,GAAmC,YAAY,CAAC,WAAW,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,OAAO,GAA8B,UAAU,CAAC,WAAW,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,IAAI,GAAiC,OAAO,CAAC,WAAW,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,IAAI,GAAiC,IAAI,CAAC,WAAW,CAAC"}
1
+ {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../typescript/fireb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AAC;AAC9B,IAAI,MAAM;IAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC"}
@@ -1,6 +1,12 @@
1
+ export declare function takeAuthFailure(): {
2
+ code: string;
3
+ message: string;
4
+ } | null;
1
5
  export declare const pwaDrawerToggle: () => void;
2
- export declare const alertEmail: (error: any) => void;
6
+ export declare const reauthenticate: (password: string) => Promise<boolean>;
3
7
  export declare const logOut: () => Promise<void>;
4
8
  export declare const logAccount: () => Promise<void>;
5
9
  export declare const logAccountDelete: () => Promise<void>;
10
+ export declare const deleteUserFiles: (uid: string) => Promise<void>;
6
11
  export declare const deleteDocument: (collect: string, item: string) => Promise<void>;
12
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../typescript/firebase/interface.ts"],"names":[],"mappings":"AAkCA,wBAAgB,eAAe,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI1E;AA4BD,eAAO,MAAM,eAAe,YAG3B,CAAA;AA0FD,eAAO,MAAM,cAAc,GAAU,UAAU,MAAM,qBAkBpD,CAAC;AAEF,eAAO,MAAM,MAAM,qBAalB,CAAC;AAEF,eAAO,MAAM,UAAU,qBAItB,CAAC;AAEF,eAAO,MAAM,gBAAgB,qBAI5B,CAAC;AAGF,eAAO,MAAM,eAAe,GAAa,KAAK,MAAM,kBAYnD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAc,SAAQ,MAAM,EAAE,MAAK,MAAM,kBAInE,CAAC"}
@@ -1,83 +1,114 @@
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';
1
+ import { store } from '../store.js';
2
+ import { closeSign, iconAuth, nameAuth, userAuth } from '../redux/frontend.js';
3
+ import { accID, accEmail, accImage, accName, accVerified } from '../redux/backend.js';
4
+ import { EmailAuthProvider, getAuth, onAuthStateChanged, reauthenticateWithCredential, signOut } from 'firebase/auth';
5
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');
6
+ import { getAnalytics, isSupported, logEvent } from "firebase/analytics";
7
+ import { deleteObject, listAll, ref } from "firebase/storage";
8
+ import { application, auth, db, isReady, onReady, storage } from './authentication.js';
9
+ import { pwaAuthChanged, pwaAuthError, pwaLogout } from '../events/names.js';
10
+ import { emitWindow, toAuthError, toPwaUser } from '../events/emit.js';
11
+ let failed = null;
12
+ export function takeAuthFailure() {
13
+ const found = failed;
14
+ failed = null;
15
+ return found;
22
16
  }
23
- else {
24
- console.log('Service Worker is not supported');
17
+ function noteFailure(detail) {
18
+ failed = detail;
19
+ emitWindow(pwaAuthError, detail);
25
20
  }
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
- });
21
+ let analytics;
22
+ let analyticsReady = Promise.resolve();
36
23
  export const pwaDrawerToggle = () => {
37
24
  store.dispatch(closeSign());
38
25
  };
39
- onAuthStateChanged(auth, (user) => {
40
- if (user) {
41
- store.dispatch(userAuth(true));
42
- store.dispatch(closeSign());
43
- store.dispatch(accID(user.uid));
44
- store.dispatch(accName(user.displayName || 'John Doe'));
45
- store.dispatch(accEmail(user.email || ''));
46
- store.dispatch(accImage(user.photoURL || ''));
47
- store.dispatch(nameAuth(user.displayName || 'John Doe'));
48
- store.dispatch(iconAuth(user.photoURL || ''));
49
- if (pendingEmailVerification && !user.emailVerified) {
50
- sendEmailVerification(user)
51
- .then(() => {
52
- console.log("Verification email sent to:");
53
- pendingEmailVerification = false;
54
- })
55
- .catch((error) => {
56
- console.error("Error sending verification email:", error.message);
57
- pendingEmailVerification = false;
58
- });
26
+ onReady(() => {
27
+ getAuth(application).useDeviceLanguage();
28
+ analyticsReady = (async () => {
29
+ if (await isSupported()) {
30
+ analytics = getAnalytics(application);
59
31
  }
60
- else if (user.emailVerified) {
61
- console.log("User's email is already verified:");
32
+ })();
33
+ onAuthStateChanged(auth, (user) => {
34
+ emitWindow(pwaAuthChanged, { user: toPwaUser(user) });
35
+ if (user) {
36
+ store.dispatch(userAuth(true));
37
+ store.dispatch(closeSign());
38
+ store.dispatch(accID(user.uid));
39
+ store.dispatch(accName(user.displayName ?? ''));
40
+ store.dispatch(accEmail(user.email || ''));
41
+ store.dispatch(accImage(user.photoURL || ''));
42
+ store.dispatch(accVerified(user.emailVerified === true));
43
+ store.dispatch(nameAuth(user.displayName ?? ''));
44
+ store.dispatch(iconAuth(user.photoURL || ''));
62
45
  }
63
46
  else {
64
- console.log("User signed in, no email verification pending:");
47
+ store.dispatch(userAuth(false));
48
+ store.dispatch(accID(''));
49
+ store.dispatch(accName(''));
50
+ store.dispatch(accEmail(''));
51
+ store.dispatch(accImage(''));
52
+ store.dispatch(accVerified(false));
53
+ store.dispatch(nameAuth(''));
54
+ store.dispatch(iconAuth(''));
65
55
  }
56
+ });
57
+ });
58
+ export const reauthenticate = async (password) => {
59
+ const current = auth.currentUser;
60
+ if (!current || !current.email) {
61
+ noteFailure({ code: 'pwa/signed-out', message: 'Sign in first.' });
62
+ return false;
66
63
  }
67
- else {
68
- store.dispatch(userAuth(false));
69
- store.dispatch(accID(''));
70
- store.dispatch(accName('John Doe'));
71
- store.dispatch(accEmail(''));
72
- store.dispatch(accImage(''));
73
- store.dispatch(nameAuth('John Doe'));
74
- store.dispatch(iconAuth(''));
64
+ try {
65
+ const credential = EmailAuthProvider.credential(current.email, password);
66
+ await reauthenticateWithCredential(current, credential);
67
+ return true;
75
68
  }
76
- });
77
- export const alertEmail = (error) => { console.log('Problem: ' + error); };
78
- export const logOut = async () => { return signOut(auth); };
79
- export const logAccount = async () => { logEvent(analytics, 'create_account'); };
80
- export const logAccountDelete = async () => { logEvent(analytics, 'delete_account'); };
69
+ catch (error) {
70
+ noteFailure(toAuthError(error));
71
+ return false;
72
+ }
73
+ };
74
+ export const logOut = async () => {
75
+ if (!isReady()) {
76
+ const detail = { code: 'pwa/not-ready', message: 'Sign-in is not ready yet.' };
77
+ emitWindow(pwaAuthError, detail);
78
+ throw new Error(detail.message);
79
+ }
80
+ try {
81
+ await signOut(auth);
82
+ emitWindow(pwaLogout, { user: null });
83
+ }
84
+ catch (error) {
85
+ emitWindow(pwaAuthError, toAuthError(error));
86
+ throw error;
87
+ }
88
+ };
89
+ export const logAccount = async () => {
90
+ await analyticsReady;
91
+ if (!analytics) {
92
+ return;
93
+ }
94
+ logEvent(analytics, 'create_account');
95
+ };
96
+ export const logAccountDelete = async () => {
97
+ await analyticsReady;
98
+ if (!analytics) {
99
+ return;
100
+ }
101
+ logEvent(analytics, 'delete_account');
102
+ };
103
+ export const deleteUserFiles = async (uid) => {
104
+ const folder = ref(storage, 'pwa-auth/' + uid);
105
+ const listed = await listAll(folder);
106
+ await Promise.all(listed.items.map((item) => deleteObject(item)));
107
+ for (const prefix of listed.prefixes) {
108
+ const nested = await listAll(prefix);
109
+ await Promise.all(nested.items.map((item) => deleteObject(item)));
110
+ }
111
+ };
81
112
  export const deleteDocument = async (collect, item) => {
82
113
  await deleteDoc(doc(db, collect, item));
83
114
  };
@@ -1 +1 @@
1
- {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../typescript/firebase/interface.ts"],"names":[],"mappings":"AASA,OAAO,E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AE1C,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function userMessage(error: unknown): string;
2
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../typescript/firebase/message.ts"],"names":[],"mappings":"AAiCA,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGlD"}
@@ -0,0 +1,34 @@
1
+ import { toAuthError } from '../events/emit.js';
2
+ import { passwordLong, passwordMismatch, passwordShort } from './password.js';
3
+ const known = {
4
+ 'auth/invalid-email': 'Enter a valid email address.',
5
+ 'auth/user-not-found': 'No account uses that email.',
6
+ 'auth/wrong-password': 'That password is wrong.',
7
+ 'auth/invalid-credential': 'That email or password is wrong.',
8
+ 'auth/invalid-login-credentials': 'That email or password is wrong.',
9
+ 'auth/user-token-expired': 'This account is no longer available.',
10
+ 'auth/invalid-user-token': 'This account is no longer available.',
11
+ 'auth/user-disabled': 'This account is disabled.',
12
+ 'auth/email-already-in-use': 'An account already uses that email.',
13
+ 'auth/weak-password': passwordShort,
14
+ 'auth/too-many-requests': 'Too many tries. Wait and try again.',
15
+ 'auth/network-request-failed': 'Network problem. Try again.',
16
+ 'auth/requires-recent-login': 'Sign in again, then retry.',
17
+ 'pwa/missing-email': 'Enter an email address.',
18
+ 'pwa/invalid-email': 'Enter a valid email address.',
19
+ 'pwa/missing-password': 'Enter a password.',
20
+ 'pwa/short-password': passwordShort,
21
+ 'pwa/long-password': passwordLong,
22
+ 'pwa/current-password': 'Enter your current password.',
23
+ 'pwa/password-mismatch': passwordMismatch,
24
+ 'pwa/weak-password': passwordShort,
25
+ 'pwa/signed-out': 'Sign in first.',
26
+ 'pwa/missing-file': 'Choose a photo first.',
27
+ 'pwa/not-ready': 'Sign-in is not ready yet.',
28
+ 'pwa/unknown': 'Something went wrong. Try again.'
29
+ };
30
+ export function userMessage(error) {
31
+ const detail = toAuthError(error);
32
+ return known[detail.code] ?? 'Something went wrong. Try again.';
33
+ }
34
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../typescript/firebase/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9E,MAAM,KAAK,GAA2B;IACpC,oBAAoB,EAAY,8BAA8B;IAC9D,qBAAqB,EAAW,6BAA6B;IAC7D,qBAAqB,EAAW,yBAAyB;IACzD,yBAAyB,EAAO,kCAAkC;IAClE,gCAAgC,EAAE,kCAAkC;IACpE,yBAAyB,EAAO,sCAAsC;IACtE,yBAAyB,EAAO,sCAAsC;IACtE,oBAAoB,EAAY,2BAA2B;IAC3D,2BAA2B,EAAK,qCAAqC;IACrE,oBAAoB,EAAY,aAAa;IAC7C,wBAAwB,EAAQ,qCAAqC;IACrE,6BAA6B,EAAG,6BAA6B;IAC7D,4BAA4B,EAAI,4BAA4B;IAC5D,mBAAmB,EAAa,yBAAyB;IACzD,mBAAmB,EAAa,8BAA8B;IAC9D,sBAAsB,EAAU,mBAAmB;IACnD,oBAAoB,EAAY,aAAa;IAC7C,mBAAmB,EAAa,YAAY;IAC5C,sBAAsB,EAAU,8BAA8B;IAC9D,uBAAuB,EAAS,gBAAgB;IAChD,mBAAmB,EAAa,aAAa;IAC7C,gBAAgB,EAAgB,gBAAgB;IAChD,kBAAkB,EAAc,uBAAuB;IACvD,eAAe,EAAiB,2BAA2B;IAC3D,aAAa,EAAmB,kCAAkC;CACnE,CAAC;AAGF,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,kCAAkC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const passwordMin = 8;
2
+ export declare const passwordMax = 128;
3
+ export declare const passwordHint = "At least 8 characters. A passphrase works well.";
4
+ export declare const passwordShort = "Use at least 8 characters.";
5
+ export declare const passwordLong = "Use at most 128 characters.";
6
+ export declare const passwordMismatch = "Passwords don't match.";
7
+ export declare function newPasswordIssue(value: string): {
8
+ code: string;
9
+ message: string;
10
+ } | null;
11
+ //# sourceMappingURL=password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../typescript/firebase/password.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,IAAI,CAAC;AAG7B,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,eAAO,MAAM,YAAY,oDAAoD,CAAC;AAE9E,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,eAAO,MAAM,YAAY,gCAAgC,CAAC;AAE1D,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AAGzD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAYxF"}
@@ -0,0 +1,16 @@
1
+ export const passwordMin = 8;
2
+ export const passwordMax = 128;
3
+ export const passwordHint = 'At least 8 characters. A passphrase works well.';
4
+ export const passwordShort = 'Use at least 8 characters.';
5
+ export const passwordLong = 'Use at most 128 characters.';
6
+ export const passwordMismatch = "Passwords don't match.";
7
+ export function newPasswordIssue(value) {
8
+ if (value.length < passwordMin) {
9
+ return { code: 'pwa/short-password', message: passwordShort };
10
+ }
11
+ if (value.length > passwordMax) {
12
+ return { code: 'pwa/long-password', message: passwordLong };
13
+ }
14
+ return null;
15
+ }
16
+ //# sourceMappingURL=password.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password.js","sourceRoot":"","sources":["../../typescript/firebase/password.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAG7B,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AAE9E,MAAM,CAAC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAE1D,MAAM,CAAC,MAAM,YAAY,GAAG,6BAA6B,CAAC;AAE1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAGzD,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAE5C,IAAI,KAAK,CAAC,MAAM,GAAG,WAAW,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IAChE,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,WAAW,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,CAAC;AAEd,CAAC"}
@@ -9,3 +9,4 @@ declare global {
9
9
  'lazy-loader': LazyLoader;
10
10
  }
11
11
  }
12
+ //# sourceMappingURL=lazyLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazyLoader.d.ts","sourceRoot":"","sources":["../typescript/lazyLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAGjC,qBAAa,UAAW,SAAQ,UAAU;IAGN,MAAM,EAAG,OAAO,CAAS;;IAO3D,YAAY;CAEb;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -111,3 +111,4 @@ declare const _default: import("redux").Reducer<{
111
111
  msgToken: string;
112
112
  }>;
113
113
  export default _default;
114
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../typescript/redux/backend.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,aAAa,EAAE,MAAS,kBAAkB,CAAC;AAkBjE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;eAMU,aAAa,CAAC,OAAO,CAAC;;;;;;;;;;eAK1B,aAAa,CAAC,OAAO,CAAC;;;;;;;;;;eAKxB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;eAKnB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;eAKpB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;eAKrB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;eAKrB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;eAKpB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;GAKpD,CAAC;AAEH,eAAO,MAAQ,WAAW,uFAAE,KAAK,gFAAE,OAAO,kFAAE,QAAQ,mFAAE,QAAQ,mFAAE,QAAQ,mFAAE,OAAO,mFAAE,SAAS,kFAAyB,CAAC;;;;;;;;;;;AAEtH,wBAAoC"}
@@ -3,7 +3,7 @@ const initialState = {
3
3
  verified: false,
4
4
  anon: false,
5
5
  userId: '',
6
- name: 'John Doe',
6
+ name: '',
7
7
  email: '',
8
8
  photoURL: '',
9
9
  phone: '',
@@ -1 +1 @@
1
- {"version":3,"file":"backend.js","sourceRoot":"","sources":["../../typescript/redux/backend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAiB,MAAS,kBAAkB,CAAC;AAIjE,MAAM,YAAY,GAAoB;IACpC,QAAQ,EAAU,KAAK;IACvB,IAAI,EAAc,KAAK;IAEvB,MAAM,EAAY,EAAE;IACpB,IAAI,EAAc,UAAU;IAC5B,KAAK,EAAa,EAAE;IACpB,QAAQ,EAAU,EAAE;IACpB,KAAK,EAAa,EAAE;IAEpB,QAAQ,EAAU,EAAE;CACrB,CAAA;AAGD,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;IACpC,IAAI,EAAE,SAAS;IACf,YAAY;IACZ,QAAQ,EAAE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YACnD,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;QAClC,CAAC;QAGD,SAAS,EAAE,CAAC,KAAK,EAAE,MAA6B,EAAE,EAAE;YAClD,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;QAClC,CAAC;KAEF;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC;AAEtH,eAAe,YAAY,CAAC,OAAO,CAAC"}
@@ -69,6 +69,20 @@ export declare const userSlice: import("@reduxjs/toolkit").Slice<{
69
69
  phone: string;
70
70
  email: string;
71
71
  }) => void;
72
+ openSign: (state: {
73
+ settings: string;
74
+ login: boolean;
75
+ drawer: boolean;
76
+ registerOne: boolean;
77
+ registerTwo: boolean;
78
+ userId: string;
79
+ customer: string;
80
+ profileChoice: string;
81
+ name: string;
82
+ photoURL: string;
83
+ phone: string;
84
+ email: string;
85
+ }) => void;
72
86
  closeSign: (state: {
73
87
  settings: string;
74
88
  login: boolean;
@@ -167,7 +181,7 @@ export declare const userSlice: import("@reduxjs/toolkit").Slice<{
167
181
  phone: string;
168
182
  email: string;
169
183
  }>>;
170
- export declare const universalToggle: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "user/universalToggle">, 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">;
184
+ export declare const universalToggle: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "user/universalToggle">, 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">, openSign: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"user/openSign">, closeSign: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"user/closeSign">, signUpAction: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"user/signUpAction">, signUpClose: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "user/signUpClose">;
171
185
  declare const _default: import("redux").Reducer<{
172
186
  settings: string;
173
187
  login: boolean;
@@ -183,3 +197,4 @@ declare const _default: import("redux").Reducer<{
183
197
  email: string;
184
198
  }>;
185
199
  export default _default;
200
+ //# sourceMappingURL=frontend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../typescript/redux/frontend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAI9D,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAaxB,CAAA;AAGD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;eAKkB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;;;;eAsBxB,aAAa,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA4BnB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;;;;eAoCzB,aAAa,CAAC,OAAO,CAAC;;;;;;;;;;;;;;eAKtB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;;;;eAKpB,aAAa,CAAC,MAAM,CAAC;;;;;;;;;;;;;;GAKxD,CAAC;AAEH,eAAO,MAAQ,eAAe,uFAAE,YAAY,oFAAE,QAAQ,gFAAE,QAAQ,gFAAE,QAAQ,iFAAE,UAAU,6EAAE,QAAQ,2EAAE,SAAS,4EAAE,YAAY,+EAAE,WAAW,kFAAsB,CAAC;;;;;;;;;;;;;;;AAE7J,wBAAiC"}
@@ -6,9 +6,9 @@ export const initialState = {
6
6
  registerOne: false,
7
7
  registerTwo: false,
8
8
  userId: "user",
9
- customer: "John Doe",
9
+ customer: '',
10
10
  profileChoice: 'unChosen',
11
- name: 'Modern Business',
11
+ name: '',
12
12
  photoURL: '',
13
13
  phone: '(...) ... - ....',
14
14
  email: ''
@@ -42,6 +42,9 @@ export const userSlice = createSlice({
42
42
  state.drawer = true;
43
43
  }
44
44
  },
45
+ openSign: (state) => {
46
+ state.drawer = true;
47
+ },
45
48
  closeSign: (state) => {
46
49
  state.drawer = false;
47
50
  },
@@ -82,6 +85,6 @@ export const userSlice = createSlice({
82
85
  }
83
86
  }
84
87
  });
85
- export const { universalToggle, navigateAuth, iconAuth, nameAuth, userAuth, toggleSign, closeSign, signUpAction, signUpClose } = userSlice.actions;
88
+ export const { universalToggle, navigateAuth, iconAuth, nameAuth, userAuth, toggleSign, openSign, closeSign, signUpAction, signUpClose } = userSlice.actions;
86
89
  export default userSlice.reducer;
87
90
  //# sourceMappingURL=frontend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend.js","sourceRoot":"","sources":["../../typescript/redux/frontend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI9D,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC5C,QAAQ,E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,GAAG,MAAM,CAAC,OAAO,CAAC;QACpC,CAAC;QAGF,QAAQ,EAAK,CAAE,KAAK,EAAE,MAA6B,EAAG,EAAE;YACtD,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAA;QAChC,CAAC;QAGF,QAAQ,EAAM,CAAE,KAAK,EAAE,MAA6B,EAAG,EAAE;YACvD,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;QAC7B,CAAC;KAEG;CACV,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC;AAE7J,eAAe,SAAS,CAAC,OAAO,CAAC"}
package/base/store.d.ts CHANGED
@@ -13,9 +13,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
13
13
  phone: string;
14
14
  email: string;
15
15
  };
16
- drawer: {
17
- drawer: boolean;
18
- };
19
16
  backend: {
20
17
  verified: boolean;
21
18
  anon: boolean;
@@ -42,9 +39,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
42
39
  phone: string;
43
40
  email: string;
44
41
  };
45
- drawer: {
46
- drawer: boolean;
47
- };
48
42
  backend: {
49
43
  verified: boolean;
50
44
  anon: boolean;
@@ -60,3 +54,4 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
60
54
  export type AppState = ReturnType<typeof store.getState>;
61
55
  export type AppDispatch = typeof store.dispatch;
62
56
  export default store;
57
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../typescript/store.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAMhB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;AACzD,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAC;AAEhD,eAAe,KAAK,CAAC"}
package/base/store.js CHANGED
@@ -1,11 +1,9 @@
1
1
  import { configureStore } from '@reduxjs/toolkit';
2
- import { userSlice } from './redux/frontend';
3
- import { drawerSlice } from './redux/drawer';
4
- import { accountSlice } from './redux/backend';
2
+ import { userSlice } from './redux/frontend.js';
3
+ import { accountSlice } from './redux/backend.js';
5
4
  export const store = configureStore({
6
5
  reducer: {
7
6
  frontend: userSlice.reducer,
8
- drawer: drawerSlice.reducer,
9
7
  backend: accountSlice.reducer,
10
8
  },
11
9
  devTools: true
package/base/store.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../typescript/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAU,kBAAkB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAe,kBAAkB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAa,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAY,iBAAiB,CAAC;AAErD,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC;IAClC,OAAO,EAAE;QACP,QAAQ,EAAI,SAAS,CAAC,OAAO;QAC7B,MAAM,EAAM,WAAW,CAAC,OAAO;QAC/B,OAAO,EAAK,YAAY,CAAC,OAAO;KACjC;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAKH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../typescript/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAU,kBAAkB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAe,qBAAqB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAY,oBAAoB,CAAC;AAGxD,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC;IAClC,OAAO,EAAE;QACP,QAAQ,EAAI,SAAS,CAAC,OAAO;QAC7B,OAAO,EAAK,YAAY,CAAC,OAAO;KACjC;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAKH,eAAe,KAAK,CAAC"}
@@ -1,2 +1,3 @@
1
1
  import { CSSResult } from "lit";
2
2
  export declare const animation: CSSResult;
3
+ //# sourceMappingURL=animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../typescript/webcomponents/css/animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,eAAO,MAAM,SAAS,EAAG,SA+ExB,CAAC"}