@angular/fire 7.6.1 → 16.0.0-canary.4172abd

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 (513) hide show
  1. package/analytics/analytics.module.d.ts +2 -2
  2. package/analytics/is-analytics-supported-factory.d.ts +4 -0
  3. package/analytics/screen-tracking.service.d.ts +3 -3
  4. package/app-check/app-check.d.ts +0 -6
  5. package/app-check/app-check.module.d.ts +3 -4
  6. package/app-check/public_api.d.ts +2 -1
  7. package/auth/auth.module.d.ts +2 -2
  8. package/auth-guard/auth-guard.d.ts +6 -6
  9. package/compat/analytics/analytics.d.ts +1 -3
  10. package/compat/analytics/analytics.module.d.ts +1 -1
  11. package/compat/analytics/screen-tracking.service.d.ts +1 -1
  12. package/compat/analytics/user-tracking.service.d.ts +1 -1
  13. package/compat/auth/auth.d.ts +4 -4
  14. package/compat/auth-guard/auth-guard.d.ts +8 -6
  15. package/compat/database/database.d.ts +4 -4
  16. package/compat/database/interfaces.d.ts +14 -14
  17. package/compat/database/list/audit-trail.d.ts +1 -1
  18. package/compat/database/list/create-reference.d.ts +1 -1
  19. package/compat/database/list/data-operation.d.ts +1 -1
  20. package/compat/database/list/state-changes.d.ts +1 -1
  21. package/compat/database/object/create-reference.d.ts +1 -1
  22. package/compat/database/observable/fromRef.d.ts +1 -1
  23. package/compat/database/utils.d.ts +1 -1
  24. package/compat/firebase.app.module.d.ts +1 -1
  25. package/compat/firestore/collection/collection.d.ts +2 -2
  26. package/compat/firestore/collection-group/collection-group.d.ts +2 -2
  27. package/compat/firestore/document/document.d.ts +4 -4
  28. package/compat/firestore/firestore.d.ts +7 -7
  29. package/compat/firestore/interfaces.d.ts +19 -19
  30. package/compat/functions/functions.d.ts +3 -3
  31. package/compat/messaging/messaging.d.ts +2 -2
  32. package/compat/performance/performance.d.ts +2 -2
  33. package/compat/proxy.d.ts +8 -8
  34. package/compat/remote-config/interfaces.d.ts +1 -1
  35. package/compat/remote-config/remote-config.d.ts +15 -49
  36. package/compat/storage/interfaces.d.ts +8 -8
  37. package/compat/storage/observable/fromTask.d.ts +1 -2
  38. package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -1
  39. package/compat/storage/ref.d.ts +1 -1
  40. package/compat/storage/storage.d.ts +3 -3
  41. package/compat/storage/task.d.ts +1 -1
  42. package/core.d.ts +8 -12
  43. package/database/database.module.d.ts +2 -2
  44. package/{esm2015/analytics/analytics.js → esm2022/analytics/analytics.mjs} +1 -1
  45. package/esm2022/analytics/analytics.module.mjs +94 -0
  46. package/esm2022/analytics/is-analytics-supported-factory.mjs +16 -0
  47. package/esm2022/analytics/overrides.mjs +3 -0
  48. package/esm2022/analytics/screen-tracking.service.mjs +148 -0
  49. package/esm2022/analytics/user-tracking.service.mjs +44 -0
  50. package/{esm2015/app/app.js → esm2022/app/app.mjs} +1 -1
  51. package/esm2022/app/app.module.mjs +85 -0
  52. package/esm2022/app-check/app-check.mjs +10 -0
  53. package/esm2022/app-check/app-check.module.mjs +78 -0
  54. package/esm2022/app-check/public_api.mjs +5 -0
  55. package/{esm2015/auth/auth.js → esm2022/auth/auth.mjs} +1 -1
  56. package/esm2022/auth/auth.module.mjs +71 -0
  57. package/esm2022/auth-guard/auth-guard.mjs +53 -0
  58. package/{esm2015/auth-guard/auth-guard.module.js → esm2022/auth-guard/auth-guard.module.mjs} +7 -7
  59. package/esm2022/compat/analytics/analytics.mjs +160 -0
  60. package/esm2022/compat/analytics/analytics.module.mjs +35 -0
  61. package/esm2022/compat/analytics/screen-tracking.service.mjs +49 -0
  62. package/esm2022/compat/analytics/user-tracking.service.mjs +53 -0
  63. package/esm2022/compat/auth/auth.mjs +161 -0
  64. package/{esm2015/compat/auth/auth.module.js → esm2022/compat/auth/auth.module.mjs} +7 -7
  65. package/{esm2015/compat/auth/public_api.js → esm2022/compat/auth/public_api.mjs} +1 -1
  66. package/esm2022/compat/auth-guard/auth-guard.mjs +53 -0
  67. package/{esm2015/compat/auth-guard/auth-guard.module.js → esm2022/compat/auth-guard/auth-guard.module.mjs} +7 -7
  68. package/{esm2015/compat/cache.js → esm2022/compat/cache.mjs} +4 -3
  69. package/esm2022/compat/database/database.mjs +119 -0
  70. package/{esm2015/compat/database/database.module.js → esm2022/compat/database/database.module.mjs} +7 -7
  71. package/esm2022/compat/database/interfaces.mjs +2 -0
  72. package/{esm2015/compat/database/list/audit-trail.js → esm2022/compat/database/list/audit-trail.mjs} +3 -3
  73. package/esm2022/compat/database/list/changes.mjs +85 -0
  74. package/esm2022/compat/database/list/create-reference.mjs +44 -0
  75. package/{esm2015/compat/database/list/data-operation.js → esm2022/compat/database/list/data-operation.mjs} +1 -1
  76. package/{esm2015/compat/database/list/snapshot-changes.js → esm2022/compat/database/list/snapshot-changes.mjs} +1 -1
  77. package/{esm2015/compat/database/list/state-changes.js → esm2022/compat/database/list/state-changes.mjs} +2 -2
  78. package/{esm2015/compat/database/object/create-reference.js → esm2022/compat/database/object/create-reference.mjs} +2 -2
  79. package/{esm2015/compat/database/object/snapshot-changes.js → esm2022/compat/database/object/snapshot-changes.mjs} +1 -1
  80. package/esm2022/compat/database/observable/fromRef.mjs +48 -0
  81. package/{esm2015/compat/database/utils.js → esm2022/compat/database/utils.mjs} +1 -1
  82. package/{esm2015/compat/firebase.app.js → esm2022/compat/firebase.app.mjs} +1 -1
  83. package/esm2022/compat/firebase.app.module.mjs +71 -0
  84. package/esm2022/compat/firestore/collection/changes.mjs +108 -0
  85. package/esm2022/compat/firestore/collection/collection.mjs +123 -0
  86. package/esm2022/compat/firestore/collection-group/collection-group.mjs +86 -0
  87. package/esm2022/compat/firestore/document/document.mjs +87 -0
  88. package/esm2022/compat/firestore/firestore.mjs +257 -0
  89. package/{esm2015/compat/firestore/firestore.module.js → esm2022/compat/firestore/firestore.module.mjs} +7 -7
  90. package/esm2022/compat/firestore/interfaces.mjs +2 -0
  91. package/esm2022/compat/firestore/observable/fromRef.mjs +40 -0
  92. package/esm2022/compat/functions/functions.mjs +69 -0
  93. package/{esm2015/compat/functions/functions.module.js → esm2022/compat/functions/functions.module.mjs} +7 -7
  94. package/{esm2015/compat/functions/public_api.js → esm2022/compat/functions/public_api.mjs} +1 -1
  95. package/esm2022/compat/messaging/messaging.mjs +81 -0
  96. package/{esm2015/compat/messaging/messaging.module.js → esm2022/compat/messaging/messaging.module.mjs} +7 -7
  97. package/esm2022/compat/performance/performance.mjs +105 -0
  98. package/esm2022/compat/performance/performance.module.mjs +27 -0
  99. package/esm2022/compat/performance/performance.service.mjs +28 -0
  100. package/esm2022/compat/proxy.mjs +58 -0
  101. package/esm2022/compat/remote-config/remote-config.mjs +206 -0
  102. package/{esm2015/compat/remote-config/remote-config.module.js → esm2022/compat/remote-config/remote-config.module.mjs} +7 -7
  103. package/esm2022/compat/storage/observable/fromTask.mjs +36 -0
  104. package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +58 -0
  105. package/{esm2015/compat/storage/ref.js → esm2022/compat/storage/ref.mjs} +3 -3
  106. package/esm2022/compat/storage/storage.mjs +95 -0
  107. package/esm2022/compat/storage/storage.module.mjs +22 -0
  108. package/{esm2015/compat/storage/task.js → esm2022/compat/storage/task.mjs} +2 -2
  109. package/esm2022/core.mjs +43 -0
  110. package/{esm2015/database/database.js → esm2022/database/database.mjs} +1 -1
  111. package/esm2022/database/database.module.mjs +74 -0
  112. package/{esm2015/firestore/firestore.js → esm2022/firestore/firestore.mjs} +1 -1
  113. package/esm2022/firestore/firestore.module.mjs +74 -0
  114. package/{esm2015/firestore/lite/lite.js → esm2022/firestore/lite/lite.mjs} +1 -1
  115. package/esm2022/firestore/lite/lite.module.mjs +73 -0
  116. package/esm2022/firestore/rxfire.mjs +15 -0
  117. package/{esm2015/functions/functions.js → esm2022/functions/functions.mjs} +1 -1
  118. package/esm2022/functions/functions.module.mjs +74 -0
  119. package/esm2022/messaging/is-messaging-supported-factory.mjs +16 -0
  120. package/{esm2015/messaging/messaging.js → esm2022/messaging/messaging.mjs} +1 -1
  121. package/esm2022/messaging/messaging.module.mjs +86 -0
  122. package/esm2022/messaging/overrides.mjs +3 -0
  123. package/{esm2015/performance/performance.js → esm2022/performance/performance.mjs} +1 -1
  124. package/esm2022/performance/performance.module.mjs +81 -0
  125. package/esm2022/remote-config/is-remote-config-supported-factory.mjs +16 -0
  126. package/esm2022/remote-config/overrides.mjs +3 -0
  127. package/{esm2015/remote-config/remote-config.js → esm2022/remote-config/remote-config.mjs} +1 -1
  128. package/esm2022/remote-config/remote-config.module.mjs +86 -0
  129. package/{esm2015/storage/storage.js → esm2022/storage/storage.mjs} +1 -1
  130. package/esm2022/storage/storage.module.mjs +74 -0
  131. package/esm2022/zones.mjs +194 -0
  132. package/{fesm2015/angular-fire-analytics.js → fesm2022/angular-fire-analytics.mjs} +64 -40
  133. package/fesm2022/angular-fire-analytics.mjs.map +1 -0
  134. package/{fesm2015/angular-fire-app-check.js → fesm2022/angular-fire-app-check.mjs} +16 -24
  135. package/fesm2022/angular-fire-app-check.mjs.map +1 -0
  136. package/{fesm2015/angular-fire-app.js → fesm2022/angular-fire-app.mjs} +10 -9
  137. package/fesm2022/angular-fire-app.mjs.map +1 -0
  138. package/{fesm2015/angular-fire-auth-guard.js → fesm2022/angular-fire-auth-guard.mjs} +31 -27
  139. package/fesm2022/angular-fire-auth-guard.mjs.map +1 -0
  140. package/{fesm2015/angular-fire-auth.js → fesm2022/angular-fire-auth.mjs} +10 -11
  141. package/fesm2022/angular-fire-auth.mjs.map +1 -0
  142. package/{fesm2015/angular-fire-compat-analytics.js → fesm2022/angular-fire-compat-analytics.mjs} +43 -41
  143. package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -0
  144. package/{fesm2015/angular-fire-compat-auth-guard.js → fesm2022/angular-fire-compat-auth-guard.mjs} +30 -26
  145. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -0
  146. package/{fesm2015/angular-fire-compat-auth.js → fesm2022/angular-fire-compat-auth.mjs} +38 -16
  147. package/fesm2022/angular-fire-compat-auth.mjs.map +1 -0
  148. package/{fesm2015/angular-fire-compat-database.js → fesm2022/angular-fire-compat-database.mjs} +138 -132
  149. package/fesm2022/angular-fire-compat-database.mjs.map +1 -0
  150. package/{fesm2015/angular-fire-compat-firestore.js → fesm2022/angular-fire-compat-firestore.mjs} +119 -98
  151. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -0
  152. package/{fesm2015/angular-fire-compat-functions.js → fesm2022/angular-fire-compat-functions.mjs} +13 -12
  153. package/fesm2022/angular-fire-compat-functions.mjs.map +1 -0
  154. package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs} +25 -19
  155. package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -0
  156. package/{fesm2015/angular-fire-compat-performance.js → fesm2022/angular-fire-compat-performance.mjs} +29 -34
  157. package/fesm2022/angular-fire-compat-performance.mjs.map +1 -0
  158. package/{fesm2015/angular-fire-compat-remote-config.js → fesm2022/angular-fire-compat-remote-config.mjs} +35 -22
  159. package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -0
  160. package/{fesm2015/angular-fire-compat-storage.js → fesm2022/angular-fire-compat-storage.mjs} +30 -23
  161. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -0
  162. package/{fesm2015/angular-fire-compat.js → fesm2022/angular-fire-compat.mjs} +25 -25
  163. package/fesm2022/angular-fire-compat.mjs.map +1 -0
  164. package/{fesm2015/angular-fire-database.js → fesm2022/angular-fire-database.mjs} +11 -12
  165. package/fesm2022/angular-fire-database.mjs.map +1 -0
  166. package/{fesm2015/angular-fire-firestore-lite.js → fesm2022/angular-fire-firestore-lite.mjs} +11 -12
  167. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -0
  168. package/{fesm2015/angular-fire-firestore.js → fesm2022/angular-fire-firestore.mjs} +15 -14
  169. package/fesm2022/angular-fire-firestore.mjs.map +1 -0
  170. package/{fesm2015/angular-fire-functions.js → fesm2022/angular-fire-functions.mjs} +12 -13
  171. package/fesm2022/angular-fire-functions.mjs.map +1 -0
  172. package/{fesm2015/angular-fire-messaging.js → fesm2022/angular-fire-messaging.mjs} +33 -19
  173. package/fesm2022/angular-fire-messaging.mjs.map +1 -0
  174. package/{fesm2015/angular-fire-performance.js → fesm2022/angular-fire-performance.mjs} +11 -11
  175. package/fesm2022/angular-fire-performance.mjs.map +1 -0
  176. package/{fesm2015/angular-fire-remote-config.js → fesm2022/angular-fire-remote-config.mjs} +34 -20
  177. package/fesm2022/angular-fire-remote-config.mjs.map +1 -0
  178. package/{fesm2015/angular-fire-storage.js → fesm2022/angular-fire-storage.mjs} +10 -11
  179. package/fesm2022/angular-fire-storage.mjs.map +1 -0
  180. package/{fesm2015/angular-fire.js → fesm2022/angular-fire.mjs} +33 -58
  181. package/fesm2022/angular-fire.mjs.map +1 -0
  182. package/firestore/firestore.module.d.ts +2 -2
  183. package/firestore/lite/lite.module.d.ts +2 -2
  184. package/firestore/rxfire.d.ts +3 -1
  185. package/functions/functions.module.d.ts +2 -2
  186. package/messaging/is-messaging-supported-factory.d.ts +4 -0
  187. package/messaging/messaging.module.d.ts +2 -2
  188. package/package.json +158 -7
  189. package/performance/performance.module.d.ts +2 -2
  190. package/publish.sh +1 -0
  191. package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
  192. package/remote-config/remote-config.module.d.ts +2 -2
  193. package/schematics/add/index.js +2 -2
  194. package/schematics/common.js +9 -5
  195. package/schematics/deploy/actions.js +69 -69
  196. package/schematics/deploy/builder.js +7 -7
  197. package/schematics/firebaseTools.js +9 -5
  198. package/schematics/setup/index.js +27 -27
  199. package/schematics/setup/prompts.js +22 -18
  200. package/schematics/update/index.js +1 -1
  201. package/schematics/update/v7/index.js +7 -7
  202. package/schematics/utils.js +34 -34
  203. package/storage/storage.module.d.ts +2 -2
  204. package/README.md +0 -216
  205. package/analytics/package.json +0 -11
  206. package/app/package.json +0 -11
  207. package/app-check/package.json +0 -11
  208. package/auth/package.json +0 -11
  209. package/auth-guard/package.json +0 -11
  210. package/bundles/angular-fire-analytics.umd.js +0 -673
  211. package/bundles/angular-fire-analytics.umd.js.map +0 -1
  212. package/bundles/angular-fire-app-check.umd.js +0 -465
  213. package/bundles/angular-fire-app-check.umd.js.map +0 -1
  214. package/bundles/angular-fire-app.umd.js +0 -477
  215. package/bundles/angular-fire-app.umd.js.map +0 -1
  216. package/bundles/angular-fire-auth-guard.umd.js +0 -109
  217. package/bundles/angular-fire-auth-guard.umd.js.map +0 -1
  218. package/bundles/angular-fire-auth.umd.js +0 -557
  219. package/bundles/angular-fire-auth.umd.js.map +0 -1
  220. package/bundles/angular-fire-compat-analytics.umd.js +0 -672
  221. package/bundles/angular-fire-compat-analytics.umd.js.map +0 -1
  222. package/bundles/angular-fire-compat-auth-guard.umd.js +0 -112
  223. package/bundles/angular-fire-compat-auth-guard.umd.js.map +0 -1
  224. package/bundles/angular-fire-compat-auth.umd.js +0 -559
  225. package/bundles/angular-fire-compat-auth.umd.js.map +0 -1
  226. package/bundles/angular-fire-compat-database.umd.js +0 -799
  227. package/bundles/angular-fire-compat-database.umd.js.map +0 -1
  228. package/bundles/angular-fire-compat-firestore.umd.js +0 -1073
  229. package/bundles/angular-fire-compat-firestore.umd.js.map +0 -1
  230. package/bundles/angular-fire-compat-functions.umd.js +0 -443
  231. package/bundles/angular-fire-compat-functions.umd.js.map +0 -1
  232. package/bundles/angular-fire-compat-messaging.umd.js +0 -465
  233. package/bundles/angular-fire-compat-messaging.umd.js.map +0 -1
  234. package/bundles/angular-fire-compat-performance.umd.js +0 -212
  235. package/bundles/angular-fire-compat-performance.umd.js.map +0 -1
  236. package/bundles/angular-fire-compat-remote-config.umd.js +0 -605
  237. package/bundles/angular-fire-compat-remote-config.umd.js.map +0 -1
  238. package/bundles/angular-fire-compat-storage.umd.js +0 -598
  239. package/bundles/angular-fire-compat-storage.umd.js.map +0 -1
  240. package/bundles/angular-fire-compat.umd.js +0 -535
  241. package/bundles/angular-fire-compat.umd.js.map +0 -1
  242. package/bundles/angular-fire-database.umd.js +0 -557
  243. package/bundles/angular-fire-database.umd.js.map +0 -1
  244. package/bundles/angular-fire-firestore-lite.umd.js +0 -531
  245. package/bundles/angular-fire-firestore-lite.umd.js.map +0 -1
  246. package/bundles/angular-fire-firestore.umd.js +0 -565
  247. package/bundles/angular-fire-firestore.umd.js.map +0 -1
  248. package/bundles/angular-fire-functions.umd.js +0 -461
  249. package/bundles/angular-fire-functions.umd.js.map +0 -1
  250. package/bundles/angular-fire-messaging.umd.js +0 -473
  251. package/bundles/angular-fire-messaging.umd.js.map +0 -1
  252. package/bundles/angular-fire-performance.umd.js +0 -473
  253. package/bundles/angular-fire-performance.umd.js.map +0 -1
  254. package/bundles/angular-fire-remote-config.umd.js +0 -499
  255. package/bundles/angular-fire-remote-config.umd.js.map +0 -1
  256. package/bundles/angular-fire-storage.umd.js +0 -485
  257. package/bundles/angular-fire-storage.umd.js.map +0 -1
  258. package/bundles/angular-fire.umd.js +0 -308
  259. package/bundles/angular-fire.umd.js.map +0 -1
  260. package/compat/analytics/package.json +0 -11
  261. package/compat/auth/package.json +0 -11
  262. package/compat/auth-guard/package.json +0 -11
  263. package/compat/database/package.json +0 -11
  264. package/compat/firestore/package.json +0 -11
  265. package/compat/functions/package.json +0 -11
  266. package/compat/messaging/package.json +0 -11
  267. package/compat/package.json +0 -11
  268. package/compat/performance/package.json +0 -11
  269. package/compat/remote-config/package.json +0 -11
  270. package/compat/storage/package.json +0 -11
  271. package/database/package.json +0 -11
  272. package/docs/analytics.md +0 -67
  273. package/docs/app-check.md +0 -53
  274. package/docs/auth.md +0 -165
  275. package/docs/compat/analytics/getting-started.md +0 -137
  276. package/docs/compat/auth/getting-started.md +0 -162
  277. package/docs/compat/auth/router-guards.md +0 -104
  278. package/docs/compat/emulators/emulators.md +0 -134
  279. package/docs/compat/firestore/collections.md +0 -326
  280. package/docs/compat/firestore/documents.md +0 -115
  281. package/docs/compat/firestore/offline-data.md +0 -39
  282. package/docs/compat/firestore/querying-collections.md +0 -204
  283. package/docs/compat/functions/functions.md +0 -166
  284. package/docs/compat/messaging/messaging.md +0 -232
  285. package/docs/compat/performance/getting-started.md +0 -132
  286. package/docs/compat/remote-config/getting-started.md +0 -134
  287. package/docs/compat/rtdb/lists.md +0 -257
  288. package/docs/compat/rtdb/objects.md +0 -182
  289. package/docs/compat/rtdb/querying-lists.md +0 -155
  290. package/docs/compat/storage/storage.md +0 -257
  291. package/docs/compat.md +0 -70
  292. package/docs/database.md +0 -175
  293. package/docs/deploy/getting-started.md +0 -204
  294. package/docs/firebase.json +0 -16
  295. package/docs/firestore.md +0 -148
  296. package/docs/functions.md +0 -52
  297. package/docs/images/analytics-illo_1x.png +0 -0
  298. package/docs/images/auth-illo_1x.png +0 -0
  299. package/docs/images/cloud-messaging-illo_1x.png +0 -0
  300. package/docs/images/database-illo_1x.png +0 -0
  301. package/docs/images/firestore-illo_1x.png +0 -0
  302. package/docs/images/functions-illo_1x.png +0 -0
  303. package/docs/images/hosting-illo_1x.png +0 -0
  304. package/docs/images/performance-illo_1x.png +0 -0
  305. package/docs/images/reCAPTCHA-logo@1x.png +0 -0
  306. package/docs/images/remote-config-illo_1x.png +0 -0
  307. package/docs/images/storage-illo_1x.png +0 -0
  308. package/docs/install-and-setup.md +0 -114
  309. package/docs/install-angular-cli-windows10.md +0 -82
  310. package/docs/messaging.md +0 -25
  311. package/docs/performance.md +0 -57
  312. package/docs/remote-config.md +0 -53
  313. package/docs/storage.md +0 -90
  314. package/docs/universal/cloud-functions.md +0 -75
  315. package/docs/universal/getting-started.md +0 -153
  316. package/docs/universal/prerendering.md +0 -72
  317. package/docs/version-4-upgrade.md +0 -119
  318. package/docs/version-5-upgrade.md +0 -82
  319. package/docs/version-6-upgrade.md +0 -16
  320. package/docs/version-7-upgrade.md +0 -298
  321. package/esm2015/analytics/analytics.module.js +0 -93
  322. package/esm2015/analytics/overrides.js +0 -3
  323. package/esm2015/analytics/screen-tracking.service.js +0 -139
  324. package/esm2015/analytics/user-tracking.service.js +0 -43
  325. package/esm2015/app/app.module.js +0 -84
  326. package/esm2015/app-check/app-check.js +0 -16
  327. package/esm2015/app-check/app-check.module.js +0 -81
  328. package/esm2015/app-check/public_api.js +0 -4
  329. package/esm2015/auth/auth.module.js +0 -71
  330. package/esm2015/auth-guard/auth-guard.js +0 -49
  331. package/esm2015/compat/analytics/analytics.js +0 -163
  332. package/esm2015/compat/analytics/analytics.module.js +0 -32
  333. package/esm2015/compat/analytics/screen-tracking.service.js +0 -49
  334. package/esm2015/compat/analytics/user-tracking.service.js +0 -52
  335. package/esm2015/compat/auth/auth.js +0 -139
  336. package/esm2015/compat/auth-guard/auth-guard.js +0 -49
  337. package/esm2015/compat/database/database.js +0 -117
  338. package/esm2015/compat/database/interfaces.js +0 -2
  339. package/esm2015/compat/database/list/changes.js +0 -85
  340. package/esm2015/compat/database/list/create-reference.js +0 -41
  341. package/esm2015/compat/database/observable/fromRef.js +0 -47
  342. package/esm2015/compat/firebase.app.module.js +0 -69
  343. package/esm2015/compat/firestore/collection/changes.js +0 -107
  344. package/esm2015/compat/firestore/collection/collection.js +0 -117
  345. package/esm2015/compat/firestore/collection-group/collection-group.js +0 -81
  346. package/esm2015/compat/firestore/document/document.js +0 -82
  347. package/esm2015/compat/firestore/firestore.js +0 -254
  348. package/esm2015/compat/firestore/interfaces.js +0 -2
  349. package/esm2015/compat/firestore/observable/fromRef.js +0 -39
  350. package/esm2015/compat/functions/functions.js +0 -68
  351. package/esm2015/compat/messaging/messaging.js +0 -75
  352. package/esm2015/compat/performance/performance.js +0 -110
  353. package/esm2015/compat/performance/performance.module.js +0 -28
  354. package/esm2015/compat/performance/performance.service.js +0 -27
  355. package/esm2015/compat/proxy.js +0 -61
  356. package/esm2015/compat/remote-config/remote-config.js +0 -193
  357. package/esm2015/compat/storage/observable/fromTask.js +0 -34
  358. package/esm2015/compat/storage/pipes/storageUrl.pipe.js +0 -54
  359. package/esm2015/compat/storage/storage.js +0 -94
  360. package/esm2015/compat/storage/storage.module.js +0 -22
  361. package/esm2015/core.js +0 -79
  362. package/esm2015/database/database.module.js +0 -74
  363. package/esm2015/firestore/firestore.module.js +0 -74
  364. package/esm2015/firestore/lite/lite.module.js +0 -74
  365. package/esm2015/firestore/rxfire.js +0 -13
  366. package/esm2015/functions/functions.module.js +0 -74
  367. package/esm2015/messaging/messaging.module.js +0 -85
  368. package/esm2015/messaging/overrides.js +0 -3
  369. package/esm2015/performance/performance.module.js +0 -81
  370. package/esm2015/remote-config/overrides.js +0 -3
  371. package/esm2015/remote-config/remote-config.module.js +0 -85
  372. package/esm2015/storage/storage.module.js +0 -74
  373. package/esm2015/zones.js +0 -183
  374. package/fesm2015/angular-fire-analytics.js.map +0 -1
  375. package/fesm2015/angular-fire-app-check.js.map +0 -1
  376. package/fesm2015/angular-fire-app.js.map +0 -1
  377. package/fesm2015/angular-fire-auth-guard.js.map +0 -1
  378. package/fesm2015/angular-fire-auth.js.map +0 -1
  379. package/fesm2015/angular-fire-compat-analytics.js.map +0 -1
  380. package/fesm2015/angular-fire-compat-auth-guard.js.map +0 -1
  381. package/fesm2015/angular-fire-compat-auth.js.map +0 -1
  382. package/fesm2015/angular-fire-compat-database.js.map +0 -1
  383. package/fesm2015/angular-fire-compat-firestore.js.map +0 -1
  384. package/fesm2015/angular-fire-compat-functions.js.map +0 -1
  385. package/fesm2015/angular-fire-compat-messaging.js.map +0 -1
  386. package/fesm2015/angular-fire-compat-performance.js.map +0 -1
  387. package/fesm2015/angular-fire-compat-remote-config.js.map +0 -1
  388. package/fesm2015/angular-fire-compat-storage.js.map +0 -1
  389. package/fesm2015/angular-fire-compat.js.map +0 -1
  390. package/fesm2015/angular-fire-database.js.map +0 -1
  391. package/fesm2015/angular-fire-firestore-lite.js.map +0 -1
  392. package/fesm2015/angular-fire-firestore.js.map +0 -1
  393. package/fesm2015/angular-fire-functions.js.map +0 -1
  394. package/fesm2015/angular-fire-messaging.js.map +0 -1
  395. package/fesm2015/angular-fire-performance.js.map +0 -1
  396. package/fesm2015/angular-fire-remote-config.js.map +0 -1
  397. package/fesm2015/angular-fire-storage.js.map +0 -1
  398. package/fesm2015/angular-fire.js.map +0 -1
  399. package/firestore/lite/package.json +0 -11
  400. package/firestore/package.json +0 -11
  401. package/firestore-protos.js +0 -4
  402. package/functions/package.json +0 -11
  403. package/messaging/package.json +0 -11
  404. package/performance/package.json +0 -11
  405. package/remote-config/package.json +0 -11
  406. package/schematics/add/schema.json +0 -16
  407. package/schematics/builders.json +0 -10
  408. package/schematics/collection.json +0 -15
  409. package/schematics/deploy/schema.json +0 -119
  410. package/schematics/migration.json +0 -15
  411. package/schematics/setup/schema.json +0 -16
  412. package/storage/package.json +0 -11
  413. /package/analytics/{angular-fire-analytics.d.ts → index.d.ts} +0 -0
  414. /package/app/{angular-fire-app.d.ts → index.d.ts} +0 -0
  415. /package/app-check/{angular-fire-app-check.d.ts → index.d.ts} +0 -0
  416. /package/auth/{angular-fire-auth.d.ts → index.d.ts} +0 -0
  417. /package/auth-guard/{angular-fire-auth-guard.d.ts → index.d.ts} +0 -0
  418. /package/compat/analytics/{angular-fire-compat-analytics.d.ts → index.d.ts} +0 -0
  419. /package/compat/auth/{angular-fire-compat-auth.d.ts → index.d.ts} +0 -0
  420. /package/compat/auth-guard/{angular-fire-compat-auth-guard.d.ts → index.d.ts} +0 -0
  421. /package/compat/database/{angular-fire-compat-database.d.ts → index.d.ts} +0 -0
  422. /package/compat/firestore/{angular-fire-compat-firestore.d.ts → index.d.ts} +0 -0
  423. /package/compat/functions/{angular-fire-compat-functions.d.ts → index.d.ts} +0 -0
  424. /package/compat/{angular-fire-compat.d.ts → index.d.ts} +0 -0
  425. /package/compat/messaging/{angular-fire-compat-messaging.d.ts → index.d.ts} +0 -0
  426. /package/compat/performance/{angular-fire-compat-performance.d.ts → index.d.ts} +0 -0
  427. /package/compat/remote-config/{angular-fire-compat-remote-config.d.ts → index.d.ts} +0 -0
  428. /package/compat/storage/{angular-fire-compat-storage.d.ts → index.d.ts} +0 -0
  429. /package/database/{angular-fire-database.d.ts → index.d.ts} +0 -0
  430. /package/{esm2015/analytics/angular-fire-analytics.js → esm2022/analytics/angular-fire-analytics.mjs} +0 -0
  431. /package/{esm2015/analytics/firebase.js → esm2022/analytics/firebase.mjs} +0 -0
  432. /package/{esm2015/analytics/public_api.js → esm2022/analytics/public_api.mjs} +0 -0
  433. /package/{esm2015/angular-fire.js → esm2022/angular-fire.mjs} +0 -0
  434. /package/{esm2015/app/angular-fire-app.js → esm2022/app/angular-fire-app.mjs} +0 -0
  435. /package/{esm2015/app/firebase.js → esm2022/app/firebase.mjs} +0 -0
  436. /package/{esm2015/app/public_api.js → esm2022/app/public_api.mjs} +0 -0
  437. /package/{esm2015/app-check/angular-fire-app-check.js → esm2022/app-check/angular-fire-app-check.mjs} +0 -0
  438. /package/{esm2015/app-check/firebase.js → esm2022/app-check/firebase.mjs} +0 -0
  439. /package/{esm2015/auth/angular-fire-auth.js → esm2022/auth/angular-fire-auth.mjs} +0 -0
  440. /package/{esm2015/auth/firebase.js → esm2022/auth/firebase.mjs} +0 -0
  441. /package/{esm2015/auth/public_api.js → esm2022/auth/public_api.mjs} +0 -0
  442. /package/{esm2015/auth/rxfire.js → esm2022/auth/rxfire.mjs} +0 -0
  443. /package/{esm2015/auth-guard/angular-fire-auth-guard.js → esm2022/auth-guard/angular-fire-auth-guard.mjs} +0 -0
  444. /package/{esm2015/auth-guard/public_api.js → esm2022/auth-guard/public_api.mjs} +0 -0
  445. /package/{esm2015/compat/analytics/angular-fire-compat-analytics.js → esm2022/compat/analytics/angular-fire-compat-analytics.mjs} +0 -0
  446. /package/{esm2015/compat/analytics/base.js → esm2022/compat/analytics/base.mjs} +0 -0
  447. /package/{esm2015/compat/analytics/public_api.js → esm2022/compat/analytics/public_api.mjs} +0 -0
  448. /package/{esm2015/compat/angular-fire-compat.js → esm2022/compat/angular-fire-compat.mjs} +0 -0
  449. /package/{esm2015/compat/auth/angular-fire-compat-auth.js → esm2022/compat/auth/angular-fire-compat-auth.mjs} +0 -0
  450. /package/{esm2015/compat/auth/base.js → esm2022/compat/auth/base.mjs} +0 -0
  451. /package/{esm2015/compat/auth-guard/angular-fire-compat-auth-guard.js → esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs} +0 -0
  452. /package/{esm2015/compat/auth-guard/public_api.js → esm2022/compat/auth-guard/public_api.mjs} +0 -0
  453. /package/{esm2015/compat/database/angular-fire-compat-database.js → esm2022/compat/database/angular-fire-compat-database.mjs} +0 -0
  454. /package/{esm2015/compat/database/list/remove.js → esm2022/compat/database/list/remove.mjs} +0 -0
  455. /package/{esm2015/compat/database/list/utils.js → esm2022/compat/database/list/utils.mjs} +0 -0
  456. /package/{esm2015/compat/database/public_api.js → esm2022/compat/database/public_api.mjs} +0 -0
  457. /package/{esm2015/compat/firestore/angular-fire-compat-firestore.js → esm2022/compat/firestore/angular-fire-compat-firestore.mjs} +0 -0
  458. /package/{esm2015/compat/firestore/public_api.js → esm2022/compat/firestore/public_api.mjs} +0 -0
  459. /package/{esm2015/compat/functions/angular-fire-compat-functions.js → esm2022/compat/functions/angular-fire-compat-functions.mjs} +0 -0
  460. /package/{esm2015/compat/functions/base.js → esm2022/compat/functions/base.mjs} +0 -0
  461. /package/{esm2015/compat/messaging/angular-fire-compat-messaging.js → esm2022/compat/messaging/angular-fire-compat-messaging.mjs} +0 -0
  462. /package/{esm2015/compat/messaging/base.js → esm2022/compat/messaging/base.mjs} +0 -0
  463. /package/{esm2015/compat/messaging/public_api.js → esm2022/compat/messaging/public_api.mjs} +0 -0
  464. /package/{esm2015/compat/performance/angular-fire-compat-performance.js → esm2022/compat/performance/angular-fire-compat-performance.mjs} +0 -0
  465. /package/{esm2015/compat/performance/base.js → esm2022/compat/performance/base.mjs} +0 -0
  466. /package/{esm2015/compat/performance/public_api.js → esm2022/compat/performance/public_api.mjs} +0 -0
  467. /package/{esm2015/compat/public_api.js → esm2022/compat/public_api.mjs} +0 -0
  468. /package/{esm2015/compat/remote-config/angular-fire-compat-remote-config.js → esm2022/compat/remote-config/angular-fire-compat-remote-config.mjs} +0 -0
  469. /package/{esm2015/compat/remote-config/base.js → esm2022/compat/remote-config/base.mjs} +0 -0
  470. /package/{esm2015/compat/remote-config/interfaces.js → esm2022/compat/remote-config/interfaces.mjs} +0 -0
  471. /package/{esm2015/compat/remote-config/public_api.js → esm2022/compat/remote-config/public_api.mjs} +0 -0
  472. /package/{esm2015/compat/storage/angular-fire-compat-storage.js → esm2022/compat/storage/angular-fire-compat-storage.mjs} +0 -0
  473. /package/{esm2015/compat/storage/interfaces.js → esm2022/compat/storage/interfaces.mjs} +0 -0
  474. /package/{esm2015/compat/storage/public_api.js → esm2022/compat/storage/public_api.mjs} +0 -0
  475. /package/{esm2015/database/angular-fire-database.js → esm2022/database/angular-fire-database.mjs} +0 -0
  476. /package/{esm2015/database/firebase.js → esm2022/database/firebase.mjs} +0 -0
  477. /package/{esm2015/database/public_api.js → esm2022/database/public_api.mjs} +0 -0
  478. /package/{esm2015/database/rxfire.js → esm2022/database/rxfire.mjs} +0 -0
  479. /package/{esm2015/firestore/angular-fire-firestore.js → esm2022/firestore/angular-fire-firestore.mjs} +0 -0
  480. /package/{esm2015/firestore/firebase.js → esm2022/firestore/firebase.mjs} +0 -0
  481. /package/{esm2015/firestore/lite/angular-fire-firestore-lite.js → esm2022/firestore/lite/angular-fire-firestore-lite.mjs} +0 -0
  482. /package/{esm2015/firestore/lite/firebase.js → esm2022/firestore/lite/firebase.mjs} +0 -0
  483. /package/{esm2015/firestore/lite/public_api.js → esm2022/firestore/lite/public_api.mjs} +0 -0
  484. /package/{esm2015/firestore/lite/rxfire.js → esm2022/firestore/lite/rxfire.mjs} +0 -0
  485. /package/{esm2015/firestore/public_api.js → esm2022/firestore/public_api.mjs} +0 -0
  486. /package/{esm2015/functions/angular-fire-functions.js → esm2022/functions/angular-fire-functions.mjs} +0 -0
  487. /package/{esm2015/functions/firebase.js → esm2022/functions/firebase.mjs} +0 -0
  488. /package/{esm2015/functions/public_api.js → esm2022/functions/public_api.mjs} +0 -0
  489. /package/{esm2015/functions/rxfire.js → esm2022/functions/rxfire.mjs} +0 -0
  490. /package/{esm2015/messaging/angular-fire-messaging.js → esm2022/messaging/angular-fire-messaging.mjs} +0 -0
  491. /package/{esm2015/messaging/firebase.js → esm2022/messaging/firebase.mjs} +0 -0
  492. /package/{esm2015/messaging/public_api.js → esm2022/messaging/public_api.mjs} +0 -0
  493. /package/{esm2015/performance/angular-fire-performance.js → esm2022/performance/angular-fire-performance.mjs} +0 -0
  494. /package/{esm2015/performance/firebase.js → esm2022/performance/firebase.mjs} +0 -0
  495. /package/{esm2015/performance/public_api.js → esm2022/performance/public_api.mjs} +0 -0
  496. /package/{esm2015/performance/rxfire.js → esm2022/performance/rxfire.mjs} +0 -0
  497. /package/{esm2015/public_api.js → esm2022/public_api.mjs} +0 -0
  498. /package/{esm2015/remote-config/angular-fire-remote-config.js → esm2022/remote-config/angular-fire-remote-config.mjs} +0 -0
  499. /package/{esm2015/remote-config/firebase.js → esm2022/remote-config/firebase.mjs} +0 -0
  500. /package/{esm2015/remote-config/public_api.js → esm2022/remote-config/public_api.mjs} +0 -0
  501. /package/{esm2015/remote-config/rxfire.js → esm2022/remote-config/rxfire.mjs} +0 -0
  502. /package/{esm2015/storage/angular-fire-storage.js → esm2022/storage/angular-fire-storage.mjs} +0 -0
  503. /package/{esm2015/storage/firebase.js → esm2022/storage/firebase.mjs} +0 -0
  504. /package/{esm2015/storage/public_api.js → esm2022/storage/public_api.mjs} +0 -0
  505. /package/{esm2015/storage/rxfire.js → esm2022/storage/rxfire.mjs} +0 -0
  506. /package/firestore/{angular-fire-firestore.d.ts → index.d.ts} +0 -0
  507. /package/firestore/lite/{angular-fire-firestore-lite.d.ts → index.d.ts} +0 -0
  508. /package/functions/{angular-fire-functions.d.ts → index.d.ts} +0 -0
  509. /package/{angular-fire.d.ts → index.d.ts} +0 -0
  510. /package/messaging/{angular-fire-messaging.d.ts → index.d.ts} +0 -0
  511. /package/performance/{angular-fire-performance.d.ts → index.d.ts} +0 -0
  512. /package/remote-config/{angular-fire-remote-config.d.ts → index.d.ts} +0 -0
  513. /package/storage/{angular-fire-storage.d.ts → index.d.ts} +0 -0
@@ -1,72 +0,0 @@
1
- # Prerendering your Universal application
2
-
3
- Prerendering a Universal application allows us to generate the HTML before the user requests it; increasing performance and decreasing cost. Let's configure your application to prerender and staticly serve it's most commonly accessed routes on Firebase Hosting.
4
-
5
- First create a `static.paths.js` in your project root, which lists the URLs you'd want to prerender:
6
-
7
- ```js
8
- export default [
9
- '/',
10
- '/another_path',
11
- '/yet_another_path'
12
- ];
13
- ```
14
-
15
- Let's install `mkdir-recursive` to make the next step a little easier:
16
-
17
- ```bash
18
- npm i --save-dev mkdir-recursive
19
- ```
20
-
21
- Now replace the listener in your `server.ts` with the following:
22
-
23
- ```ts
24
- import { readFileSync, writeFileSync, existsSync } from 'fs';
25
- import { renderModuleFactory } from '@angular/platform-server';
26
- import { mkdirSync } from 'mkdir-recursive';
27
-
28
- if (process.env.PRERENDER) {
29
-
30
- const routes = require('./static.paths').default;
31
- Promise.all(
32
- routes.map(route =>
33
- renderModuleFactory(AppServerModuleNgFactory, {
34
- document: template,
35
- url: route,
36
- extraProviders: [
37
- provideModuleMap(LAZY_MODULE_MAP)
38
- ]
39
- }).then(html => [route, html])
40
- )
41
- ).then(results => {
42
- results.forEach(([route, html]) => {
43
- const fullPath = join('./public', route);
44
- if (!existsSync(fullPath)) { mkdirSync(fullPath); }
45
- writeFileSync(join(fullPath, 'index.html'), html);
46
- });
47
- process.exit();
48
- });
49
-
50
- } else if (!process.env.FUNCTION_NAME) {
51
-
52
- // If we're not in the Cloud Functions environment, spin up a Node server
53
- const PORT = process.env.PORT || 4000;
54
- app.listen(PORT, () => {
55
- console.log(`Node server listening on http://localhost:${PORT}`);
56
- });
57
- }
58
- ```
59
-
60
- Now if the `PRERENDER` environment variable is passed any value, instead of serving your application it will iterate over the paths in `static.paths.js`, render them, and write them to your `public` directory. *You could always make this a seperate script.*
61
-
62
- Finally make some modifications to your `package.json`, to prerender your content when you build:
63
-
64
- ```js
65
- "scripts": {
66
- // ... omitted
67
- "build": "ng build && npm run copy:hosting && npm run build:functions && npm run prerender:ssr",
68
- "prerender:ssr": "PRERENDER=1 node dist/YOUR_PROJECT_NAME-webpack/server.js",
69
- },
70
- ```
71
-
72
- Now when you run `npm run build` the prerendered content should be available in your `/public` directory, ready for deployment on Firebase Hosting.
@@ -1,119 +0,0 @@
1
- # Upgrading to AngularFire2 4.0
2
-
3
- AngularFire2 4.0 is a refactor of the AngularFire2 package which implements
4
- @NgModule, simplifies authentication, and better supports Angular 4.
5
-
6
- ### Removing `AngularFire` for Modularity
7
-
8
- Prior to 4.0, AngularFire2 did not take advantage of the Firebase SDK's modularity for tree shaking. The `AngularFire` service has now been removed and the library is broken up into smaller `@NgModule`s:
9
-
10
- * `AngularFireModule`
11
- * `AngularFireDatabaseModule`
12
- * `AngularFireAuthModule`
13
-
14
- When upgrading, replace calls to `AngularFire.database` and `AngularFire.auth` with `AngularFireDatabase` and `AngularFireAuth` respectively.
15
-
16
- ```typescript
17
- constructor(af: AngularFire) {
18
- af.database.list('foo');
19
- af.auth;
20
- }
21
- ```
22
- Should now be:
23
-
24
- ```typescript
25
- constructor(db: AngularFireDatabase, afAuth: AngularFireAuth) {
26
- db.list('foo');
27
- afAuth.authState;
28
- }
29
- ```
30
-
31
- ### Simplified Authentication API
32
-
33
- In 4.0 we've reduced the complexity of the auth module by providing only [`firebase.User`](https://firebase.google.com/docs/reference/js/firebase.User) observers (`AngularFireAuth.authState`, `AngularFireAuth.idToken`) and cutting the methods that were wrapping the Firebase SDK.
34
-
35
-
36
- ```typescript
37
- import { AngularFireAuth } from 'angularfire2/auth';
38
- // Do not import from 'firebase' as you'd lose the tree shaking benefits
39
- import firebase from 'firebase/app';
40
- ...
41
-
42
- user: Observable<firebase.User>;
43
- constructor(afAuth: AngularFireAuth) {
44
- this.user = afAuth.authState; // only triggered on sign-in/out (for old behavior use .idToken)
45
- }
46
- ```
47
-
48
- AngularFire2 exposes the raw Firebase Auth object via `AngularFireAuth.auth`. For actions like login, logout, user creation, etc. you should use the [methods available to `firebase.auth.Auth`](https://firebase.google.com/docs/reference/js/firebase.auth.Auth).
49
-
50
- While convenient, the pre-configured login feature added unneeded complexity. `AngularFireModule.initializeApp` no longer takes a default sign in method. Sign in should be done with the Firebase SDK via `firebase.auth.Auth`:
51
-
52
- ```typescript
53
- login() {
54
- this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
55
- }
56
- logout() {
57
- this.afAuth.auth.signOut();
58
- }
59
- ```
60
-
61
- ### FirebaseListFactory and FirebaseObjectFactory API Changes
62
-
63
- If you directly use `FirebaseListFactory` or `FirebaseObjectFactory` you will no longer be able to pass in a string, it will instead expect a Firebase database reference.
64
-
65
- ## Putting this all together
66
-
67
- Here's an example of what AngularFire2 4.0 looks like:
68
-
69
- ```typescript
70
- import { NgModule, Component } from '@angular/core';
71
- import { Observable } from 'rxjs/Observable';
72
- import { AngularFireModule } from 'angularfire2';
73
- import { AngularFireDatabaseModule, AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
74
- import { AngularFireAuthModule, AngularFireAuth } from 'angularfire2/auth';
75
- import { environment } from '../environments/environment';
76
-
77
- // Do not import from 'firebase' as you'd lose the tree shaking benefits
78
- import firebase from 'firebase/app';
79
-
80
-
81
- @NgModule({
82
- declarations: [ App ],
83
- exports: [ App ],
84
- imports: [
85
- AngularFireModule.initializeApp(environment.firebase, 'my-app'),
86
- AngularFireDatabaseModule,
87
- AngularFireAuthModule
88
- ],
89
- bootstrap: [ App ]
90
- })
91
- export class MyModule { }
92
-
93
- ```
94
-
95
- ```typescript
96
- @Component({
97
- selector: 'my-app',
98
- template: `
99
- <div> {{ (items | async)? | json }} </div>
100
- <div> {{ (user | async)? | json }} </div>
101
- <button (click)="login()">Login</button>
102
- <button (click)="logout()">Logout</button>
103
- `
104
- })
105
- export class App {
106
- user: Observable<firebase.User>;
107
- items: FirebaseListObservable<any[]>;
108
- constructor(afAuth: AngularFireAuth, db: AngularFireDatabase) {
109
- this.user = afAuth.authState;
110
- this.items = db.list('items');
111
- }
112
- login() {
113
- this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
114
- }
115
- logout() {
116
- this.afAuth.auth.signOut();
117
- }
118
- }
119
- ```
@@ -1,82 +0,0 @@
1
- # Upgrading to AngularFire 5.0
2
-
3
- AngularFire 5.0 is a refactor of the `AngularFireDatabase` module. It removes the `FirebaseListObservable` and `FirebaseObjectObservable` in favor of a generic based service API.
4
-
5
- ## Updating `FirebaseListObservable` to `AngularFireList<T>`
6
-
7
- Rather than `.list()` returning a `FirebaseListObservable`, it now returns an `AngularFireList<T>`. This service contains methods that allow you to manipulate and stream data.
8
-
9
- In the case of streaming back data, you now call one of the observable methods on `AngularFireList`.
10
-
11
- ### 4.0
12
-
13
- ```ts
14
- constructor(afDb: AngularFireDatabase) {
15
- afDb.list('items').subscribe(console.log);
16
- }
17
- ```
18
-
19
- ### 5.0
20
-
21
- ```ts
22
- constructor(afDb: AngularFireDatabase) {
23
- afDb.list<Item>('items').valueChanges().subscribe(console.log);
24
- }
25
- ```
26
-
27
- The same concepts apply to `FirebaseObjectObservable` to `AngularFireObject`.
28
-
29
- ## Moving away from `$key` and `$value`
30
-
31
- In AngularFireDatabase 4.0 the snapshot was automatically unwrapped for you and metadata was placed in `$` property. The Firebase Database rejects any keys with `$` in them so this mechanism allowed us to provide you with important metadata alongside your actual data. However, persisting the object could be a pain in some cases as the SDK would reject any `$` based properties. In 5.0 we have moved away from `$` properties and we provide multiple observable methods for receiving the data.
32
-
33
- Calling `.valueChanges()` returns an Observable without any metadata. If you are already persisting the key as a property then you are fine. However, if you are relying on `$key`, then you need to use `.snapshotChanges()` and transform the data with an observable `.map()`.
34
-
35
- ### 4.0
36
-
37
- ```ts
38
- constructor(afDb: AngularFireDatabase) {
39
- afDb.list('items').subscribe(items => {
40
- const allKeys = items.map(item => item.$key);
41
- });
42
- }
43
- ```
44
-
45
- ### 5.0
46
-
47
- ```ts
48
- constructor(afDb: AngularFireDatabase) {
49
- afDb.list('items').snapshotChanges().pipe(
50
- map(actions =>
51
- actions.map(a => ({ key: a.key, ...a.payload.val() }))
52
- )
53
- ).subscribe(items => {
54
- return items.map(item => item.key);
55
- });
56
- }
57
- ```
58
-
59
- ## Data manipulation methods
60
-
61
- AngularFire 5.0 removes all custom observables which means their custom operators are gone as well. Instead of using custom operators on either a `FirebaseListObservable` or a `FirebaseObjectObservable`, use the methods on the service based APIs: `AngularFireList` and `AngularFireObject`. There is no resulting code change, but it worth pointing out.
62
-
63
- ### 4.0
64
-
65
- ```ts
66
- constructor(afDb: AngularFireDatabase) {
67
- const listObservable = afDb.list('items');
68
- listObservable.push({ name: 'item' });
69
- listObservable.subscribe();
70
- }
71
- ```
72
-
73
- ### 5.0
74
-
75
- ```ts
76
- constructor(afDb: AngularFireDatabase) {
77
- const afList = afDb.list('items');
78
- afList.push({ name: 'item' });
79
- const listObservable = afList.snapshotChanges();
80
- listObservable.subscribe();
81
- }
82
- ```
@@ -1,16 +0,0 @@
1
- # Upgrading to AngularFire 6.0
2
-
3
- Intended to be run with Angular 9; version 6 of AngularFire drops support for Angular version 8 and below, older versions of typescript, Firebase, drops `firebase-node`, `database-deprecated`, and more.
4
-
5
- ## Breaking changes:
6
-
7
- * Support for Angular versions less than 9 has been dropped
8
- * Support for Firebase JS SDK versions less than 7.13.1 has been dropped
9
- * Support for `firebase-tools` less than 8.0 has been dropped
10
- * The `angularfire2` NPM library will no longer be updated
11
- * Dropped `@angular/fire/firebase-node` and `@angular/fire/database-depreciated`
12
- * We make use of Proxy in more modules, you'll need to polyfill if you want to support IE 11
13
- * We've standardized our DI Token naming conventions across all modules
14
- * `AngularFireAuth` has dropped the `auth` property and instead Promise Proxies the underlying Firebase `auth.Auth` instance; allowing your development experience to more closely mirror the JS SDK. Similar changes have been made to `AngularFireFunctions`, `AngularFireMessaging`, and `AngularFirePerformance`.
15
- * `AngularFireAuthGuard` and `canActivate` have dropped support for raw pipes, this was never working correctly in AOT
16
- * `AngularFirePerformance` has been simplified, the RXJS pipes are now exported as pure-functions outside the class. Automatic tracking of `isStable` timing has now been moved into `PerformanceMonitoringService` and we've dropped the `AUTOMATICALLY_TRACE_CORE_NG_METRICS` DI token.
@@ -1,298 +0,0 @@
1
- # Upgrading to AngularFire 7.0
2
-
3
- Intended to be run with Angular 12, AngularFire 7.0 allows you to take full advantage of the new tree-shakable Firebase JS SDK (v9) while also providing a compatible experience with the prior API.
4
-
5
- `ng update @angular/fire`
6
-
7
- ## Breaking changes
8
-
9
- * Angular 12 is required
10
- * AngularFire now only works in Ivy applications
11
- * Firebase JS SDK v9 is required
12
- * The existing AngularFire v6 API surface has moved from `@angular/fire/*` to `@angular/fire/compat/*` (see compatibility mode)
13
- * **compat/auth:** `USE_EMULATOR` DI token is now in the form of `['http://localhost:9099']`
14
-
15
- ## Compatibility mode
16
-
17
- AngularFire v7.0 has a compatibility layer that supports the AngularFire v6.0 API. Just change your imports from `@angular/fire/*` to `@angular/fire/compat/*` and `firebase/*` to `firebase/compat/*`.
18
-
19
- While not as tree-shakable as the new modular SDK, this allows you to upgrade and take advantage of the benefits of the new SDK ASAP.
20
-
21
- **Most developers can stop here for now as the new API isn't feature complete.**
22
-
23
- ## **NEW** Modular SDK
24
-
25
- ### Initialization
26
-
27
- In order to better support the tree-shakability introduced in Firebase v9 & to reduce the maintence required when the JS SDK adds new configuration flags, AngularFire providers now take a factory for a fully instantiated instance of the SDK you'd like to inject.
28
-
29
- **Before:**
30
- ```ts
31
- @NgModule({
32
- imports: [
33
- AngularFireModule.initializeApp(config),
34
- AngularFirestoreModule.enablePersistence(),
35
- AngularFireStorageModule,
36
- ],
37
- providers: [
38
- { provide: USE_EMULATOR, useValue: ['localhost', 8080] },
39
- ],
40
- })
41
- ```
42
-
43
- **Modular SDK:**
44
- ```ts
45
- @NgModule({
46
- imports: [
47
- provideFirebaseApp(() => initializeApp(config)),
48
- provideFirestore(() => {
49
- const firestore = getFirestore();
50
- connectFirestoreEmulator(firestore, 'localhost', 8080);
51
- enableIndexedDbPersistence(firestore);
52
- return firestore;
53
- }),
54
- provideStorage(() => getStorage()),
55
- ],
56
- })
57
- ```
58
-
59
- ### Injecting services
60
-
61
- Before when you injected Firebase JS SDK services into AngularFire they would be lazy-loaded and a promise-proxy would be returned to you. In AngularFire v7 you get the intiated service directly. We no longer lazy load for you.
62
-
63
- ```ts
64
- import { Firestore, doc, onSnapshot, DocumentReference, docSnapshots } from '@angular/fire/firestore';
65
-
66
- @Component({})
67
- export class Foo {
68
- doc: DocumentReference;
69
- constructor(
70
- firestore: Firestore, // Injects the instantiated Firestore instance
71
- ) {
72
- // You can directly operate on the instance with JS SDK methods which we've
73
- // reexported in AngularFire
74
- this.doc = doc(firestore, 'foo/1');
75
- onSnapshot(doc, snap => {
76
- // ...
77
- });
78
- // or use the convenience observables
79
- docSnapshots(doc).subscribe(...);
80
- }
81
- async update() {
82
- await updateDoc(this.doc, { ... });
83
- ...
84
- }
85
- }
86
- ```
87
-
88
- ### Working with multiple apps / instances
89
-
90
- In AngularFire v7 working with multiple instances was difficult, in the new SDK we have new DI tokens that make working with them much more straight forward.
91
-
92
- ```ts
93
- @NgModule({
94
- imports: [
95
- provideFirebaseApp(() => initializeApp(config)),
96
- provideFirebaseApp(() => initializeApp(config2, 'anotherApp')),
97
- provideStorage(() => getStorage()),
98
- provideStorage(() => getStorage(getApp(), 'anotherBucket')),
99
- provideStorage(() => getStorage(getApp('anotherApp'))),
100
- ],
101
- })
102
- ```
103
-
104
- ```ts
105
- import { FirebaseApp, FirebaseApps } from '@angular/fire/app';
106
- import { Storage, StorageInstances } from '@angular/fire/storage';
107
-
108
- export class Foo {
109
- constructor(
110
- defaultApp: FirebaseApp, // Injects the default FirebaseApp
111
- allFirebaseApps: FirebaseApps, // Injects an array of all initialized Firebase Apps
112
- storage: Storage, // Injects the default storage instance
113
- allStorageInstances: StorageInstances, // Injects an array of all the intialized storage instances
114
- ) { }
115
- }
116
- ```
117
- How the main injection tokens (i.e, `FirebaseApp`, `Storage`) function have changed from v7 but it should provide a much more powerful and intuitive API.
118
-
119
- ### API
120
-
121
- Beyond Depdency Injection AngularFire is sporting an entirely new API:
122
-
123
- 1) We no longer handle lazy-loading the Firebase JS SDK modules for you
124
- 1) We no longer provide classes beyond Depedency Injection
125
- 1) No more Proxy / Promise-Proxy
126
- 1) We reexport and Zone-wrap all Firebase and RxFire APIs
127
-
128
- So developing with the new AngularFire is easy, you can use it just like the vanilla Firebase JS SDK. Just change all your `firebase/app` imports to `@angular/fire/app`, `firebase/firestore` to `@angular/fire/firestore`, `firebase/database` to `@angular/fire/database`, etc. Then if you're feeling comfortable with RXJS and would like to use some of our convenience operators you can just dip into that toolbox.
129
-
130
- #### Alternatives to v6 APIs
131
-
132
- <table>
133
- <thead>
134
- <tr>
135
- <th colspan="2">v6 / Compat</th>
136
- <th>v7 Modular</th>
137
- </tr>
138
- </thead>
139
- <tbody>
140
- <tr>
141
- <th rowspan="3">AngularFirestore</th>
142
- <td>doc</td>
143
- <td>
144
-
145
- ```ts
146
- import { doc } from '@angular/fire/firestore';
147
- doc<T>(firestore, 'foo/bar') // DocumentReference<T>
148
- ```
149
- </td>
150
- </tr>
151
- <tr>
152
- <td>collection</td>
153
- <td>
154
-
155
- ```ts
156
- import { collection } from '@angular/fire/firestore';
157
- collection<T>(firestore, 'foo') // CollectionReference<T>
158
- ```
159
- </td>
160
- </tr>
161
- <tr>
162
- <td>collectionGroup</td>
163
- <td>
164
-
165
- ```ts
166
- import { collectionGroup } from '@angular/fire/firestore';
167
- collectionGroup<T>(firestore, 'foo') // Query<T>
168
- ```
169
- </td>
170
- </tr>
171
- <tr>
172
- <th rowspan="7">AngularFirestoreDocument</th>
173
- <td>set</td>
174
- <td>
175
-
176
- ```ts
177
- import { setDoc } from '@angular/fire/firestore';
178
- setDoc(docRef, { ... }) // Promise<void>
179
- ```
180
- </td>
181
-
182
- </td>
183
- </tr>
184
- <tr>
185
- <td>update</td>
186
- <td>
187
-
188
- ```ts
189
- import { updateDoc } from '@angular/fire/firestore';
190
- updateDoc(docRef, { ... }) // Promise<void>
191
- ```
192
- </td>
193
- </tr>
194
- <tr>
195
- <td>delete</td>
196
- <td>
197
-
198
- ```ts
199
- import { deleteDoc } from '@angular/fire/firestore';
200
- deleteDoc(docRef) // Promise<void>
201
- ```
202
- </td>
203
- </tr>
204
- <tr>
205
- <td>collection</td>
206
- <td>
207
-
208
- ```ts
209
- import { collection } from '@angular/fire/firestore';
210
- collection<T>(docRef, 'bar') // CollectionReference<T>
211
- ```
212
- </td>
213
- </tr>
214
- <tr>
215
- <td>snapshotChanges</td>
216
- <td>
217
-
218
- ```ts
219
- import { docSnapshots } from '@angular/fire/firestore';
220
- docSnapshots<T>(docRef) // Observable<DocumentSnapshot<T>>
221
- ```
222
- </td>
223
-
224
- </td>
225
- </tr>
226
- <tr>
227
- <td>valueChanges</td>
228
- <td>
229
-
230
- ```ts
231
- import { docData } from '@angular/fire/firestore';
232
- docData<T>(docRef) // Observable<T>
233
- ```
234
- </td>
235
- </tr>
236
- <tr>
237
- <td>get</td>
238
- <td>
239
-
240
- ```ts
241
- import { getDoc } from '@angular/fire/firestore';
242
- getDoc<T>(docRef) // Promise<DocumentSnapshot<T>>
243
- ```
244
-
245
- </td>
246
- </tr>
247
- </tbody>
248
- </table>
249
-
250
- ### Code splitting and lazy-loading
251
-
252
- AngularFire does not lazy-load services any longer. We have provided a helper observable for detecting when a new service instance is instantiated. In this example we'll code split out of all the Firestore related code and lazy-load
253
-
254
- ```ts
255
- // firestore_operations.ts
256
- import {
257
- collectionData,
258
- firestoreInstance$,
259
- collection,
260
- getFirestore
261
- } from '@angular/fire/firestore';
262
- import { first } from 'rxjs/operators';
263
- import { IFoo } from '../interfaces';
264
-
265
- export { getFirestore };
266
-
267
- export const fooData = firestoreInstance$.pipe(
268
- first(),
269
- concatMap(firestore => collectionData<IFoo>(collection(firestore, 'foo'))),
270
- );
271
- ```
272
-
273
- ```ts
274
- export class AuthService {
275
- constructor() {
276
- getRedirectResult().then(result => {
277
- // Initialize Firestore only after a user logs in
278
- if (result.user) {
279
- const { getFirestore } = await import('./firestore_operations');
280
- getFirestore();
281
- }
282
- });
283
- }
284
- }
285
- ```
286
-
287
- ```ts
288
- @Component({})
289
- export class Foo {
290
- data: Observable<IFoo[]>;
291
- constructor() {
292
- this.data = of(undefined).pipe(
293
- concatMap(() => import('./firestore_operations')),
294
- concatMap(it => it.fooData)
295
- );
296
- }
297
- }
298
- ```