@angular/fire 7.6.1 → 16.0.0-canary.5793d6f

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 (515) 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/esm2022/firestore/firebase.mjs +54 -0
  113. package/{esm2015/firestore/firestore.js → esm2022/firestore/firestore.mjs} +1 -1
  114. package/esm2022/firestore/firestore.module.mjs +74 -0
  115. package/{esm2015/firestore/lite/lite.js → esm2022/firestore/lite/lite.mjs} +1 -1
  116. package/esm2022/firestore/lite/lite.module.mjs +73 -0
  117. package/esm2022/firestore/rxfire.mjs +15 -0
  118. package/{esm2015/functions/functions.js → esm2022/functions/functions.mjs} +1 -1
  119. package/esm2022/functions/functions.module.mjs +74 -0
  120. package/esm2022/messaging/is-messaging-supported-factory.mjs +16 -0
  121. package/{esm2015/messaging/messaging.js → esm2022/messaging/messaging.mjs} +1 -1
  122. package/esm2022/messaging/messaging.module.mjs +86 -0
  123. package/esm2022/messaging/overrides.mjs +3 -0
  124. package/{esm2015/performance/performance.js → esm2022/performance/performance.mjs} +1 -1
  125. package/esm2022/performance/performance.module.mjs +81 -0
  126. package/esm2022/remote-config/is-remote-config-supported-factory.mjs +16 -0
  127. package/esm2022/remote-config/overrides.mjs +3 -0
  128. package/{esm2015/remote-config/remote-config.js → esm2022/remote-config/remote-config.mjs} +1 -1
  129. package/esm2022/remote-config/remote-config.module.mjs +86 -0
  130. package/{esm2015/storage/storage.js → esm2022/storage/storage.mjs} +1 -1
  131. package/esm2022/storage/storage.module.mjs +74 -0
  132. package/esm2022/zones.mjs +194 -0
  133. package/{fesm2015/angular-fire-analytics.js → fesm2022/angular-fire-analytics.mjs} +64 -40
  134. package/fesm2022/angular-fire-analytics.mjs.map +1 -0
  135. package/{fesm2015/angular-fire-app-check.js → fesm2022/angular-fire-app-check.mjs} +16 -24
  136. package/fesm2022/angular-fire-app-check.mjs.map +1 -0
  137. package/{fesm2015/angular-fire-app.js → fesm2022/angular-fire-app.mjs} +10 -9
  138. package/fesm2022/angular-fire-app.mjs.map +1 -0
  139. package/{fesm2015/angular-fire-auth-guard.js → fesm2022/angular-fire-auth-guard.mjs} +31 -27
  140. package/fesm2022/angular-fire-auth-guard.mjs.map +1 -0
  141. package/{fesm2015/angular-fire-auth.js → fesm2022/angular-fire-auth.mjs} +10 -11
  142. package/fesm2022/angular-fire-auth.mjs.map +1 -0
  143. package/{fesm2015/angular-fire-compat-analytics.js → fesm2022/angular-fire-compat-analytics.mjs} +43 -41
  144. package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -0
  145. package/{fesm2015/angular-fire-compat-auth-guard.js → fesm2022/angular-fire-compat-auth-guard.mjs} +30 -26
  146. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -0
  147. package/{fesm2015/angular-fire-compat-auth.js → fesm2022/angular-fire-compat-auth.mjs} +38 -16
  148. package/fesm2022/angular-fire-compat-auth.mjs.map +1 -0
  149. package/{fesm2015/angular-fire-compat-database.js → fesm2022/angular-fire-compat-database.mjs} +138 -132
  150. package/fesm2022/angular-fire-compat-database.mjs.map +1 -0
  151. package/{fesm2015/angular-fire-compat-firestore.js → fesm2022/angular-fire-compat-firestore.mjs} +119 -98
  152. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -0
  153. package/{fesm2015/angular-fire-compat-functions.js → fesm2022/angular-fire-compat-functions.mjs} +13 -12
  154. package/fesm2022/angular-fire-compat-functions.mjs.map +1 -0
  155. package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs} +25 -19
  156. package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -0
  157. package/{fesm2015/angular-fire-compat-performance.js → fesm2022/angular-fire-compat-performance.mjs} +29 -34
  158. package/fesm2022/angular-fire-compat-performance.mjs.map +1 -0
  159. package/{fesm2015/angular-fire-compat-remote-config.js → fesm2022/angular-fire-compat-remote-config.mjs} +35 -22
  160. package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -0
  161. package/{fesm2015/angular-fire-compat-storage.js → fesm2022/angular-fire-compat-storage.mjs} +30 -23
  162. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -0
  163. package/{fesm2015/angular-fire-compat.js → fesm2022/angular-fire-compat.mjs} +25 -25
  164. package/fesm2022/angular-fire-compat.mjs.map +1 -0
  165. package/{fesm2015/angular-fire-database.js → fesm2022/angular-fire-database.mjs} +11 -12
  166. package/fesm2022/angular-fire-database.mjs.map +1 -0
  167. package/{fesm2015/angular-fire-firestore-lite.js → fesm2022/angular-fire-firestore-lite.mjs} +11 -12
  168. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -0
  169. package/{fesm2015/angular-fire-firestore.js → fesm2022/angular-fire-firestore.mjs} +17 -15
  170. package/fesm2022/angular-fire-firestore.mjs.map +1 -0
  171. package/{fesm2015/angular-fire-functions.js → fesm2022/angular-fire-functions.mjs} +12 -13
  172. package/fesm2022/angular-fire-functions.mjs.map +1 -0
  173. package/{fesm2015/angular-fire-messaging.js → fesm2022/angular-fire-messaging.mjs} +33 -19
  174. package/fesm2022/angular-fire-messaging.mjs.map +1 -0
  175. package/{fesm2015/angular-fire-performance.js → fesm2022/angular-fire-performance.mjs} +11 -11
  176. package/fesm2022/angular-fire-performance.mjs.map +1 -0
  177. package/{fesm2015/angular-fire-remote-config.js → fesm2022/angular-fire-remote-config.mjs} +34 -20
  178. package/fesm2022/angular-fire-remote-config.mjs.map +1 -0
  179. package/{fesm2015/angular-fire-storage.js → fesm2022/angular-fire-storage.mjs} +10 -11
  180. package/fesm2022/angular-fire-storage.mjs.map +1 -0
  181. package/{fesm2015/angular-fire.js → fesm2022/angular-fire.mjs} +33 -58
  182. package/fesm2022/angular-fire.mjs.map +1 -0
  183. package/firestore/firebase.d.ts +2 -1
  184. package/firestore/firestore.module.d.ts +2 -2
  185. package/firestore/lite/lite.module.d.ts +2 -2
  186. package/firestore/rxfire.d.ts +3 -1
  187. package/functions/functions.module.d.ts +2 -2
  188. package/messaging/is-messaging-supported-factory.d.ts +4 -0
  189. package/messaging/messaging.module.d.ts +2 -2
  190. package/package.json +158 -7
  191. package/performance/performance.module.d.ts +2 -2
  192. package/publish.sh +1 -0
  193. package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
  194. package/remote-config/remote-config.module.d.ts +2 -2
  195. package/schematics/add/index.js +2 -2
  196. package/schematics/common.js +9 -5
  197. package/schematics/deploy/actions.js +69 -69
  198. package/schematics/deploy/builder.js +7 -7
  199. package/schematics/firebaseTools.js +9 -5
  200. package/schematics/setup/index.js +27 -27
  201. package/schematics/setup/prompts.js +22 -18
  202. package/schematics/update/index.js +1 -1
  203. package/schematics/update/v7/index.js +7 -7
  204. package/schematics/utils.js +34 -34
  205. package/storage/storage.module.d.ts +2 -2
  206. package/README.md +0 -216
  207. package/analytics/package.json +0 -11
  208. package/app/package.json +0 -11
  209. package/app-check/package.json +0 -11
  210. package/auth/package.json +0 -11
  211. package/auth-guard/package.json +0 -11
  212. package/bundles/angular-fire-analytics.umd.js +0 -673
  213. package/bundles/angular-fire-analytics.umd.js.map +0 -1
  214. package/bundles/angular-fire-app-check.umd.js +0 -465
  215. package/bundles/angular-fire-app-check.umd.js.map +0 -1
  216. package/bundles/angular-fire-app.umd.js +0 -477
  217. package/bundles/angular-fire-app.umd.js.map +0 -1
  218. package/bundles/angular-fire-auth-guard.umd.js +0 -109
  219. package/bundles/angular-fire-auth-guard.umd.js.map +0 -1
  220. package/bundles/angular-fire-auth.umd.js +0 -557
  221. package/bundles/angular-fire-auth.umd.js.map +0 -1
  222. package/bundles/angular-fire-compat-analytics.umd.js +0 -672
  223. package/bundles/angular-fire-compat-analytics.umd.js.map +0 -1
  224. package/bundles/angular-fire-compat-auth-guard.umd.js +0 -112
  225. package/bundles/angular-fire-compat-auth-guard.umd.js.map +0 -1
  226. package/bundles/angular-fire-compat-auth.umd.js +0 -559
  227. package/bundles/angular-fire-compat-auth.umd.js.map +0 -1
  228. package/bundles/angular-fire-compat-database.umd.js +0 -799
  229. package/bundles/angular-fire-compat-database.umd.js.map +0 -1
  230. package/bundles/angular-fire-compat-firestore.umd.js +0 -1073
  231. package/bundles/angular-fire-compat-firestore.umd.js.map +0 -1
  232. package/bundles/angular-fire-compat-functions.umd.js +0 -443
  233. package/bundles/angular-fire-compat-functions.umd.js.map +0 -1
  234. package/bundles/angular-fire-compat-messaging.umd.js +0 -465
  235. package/bundles/angular-fire-compat-messaging.umd.js.map +0 -1
  236. package/bundles/angular-fire-compat-performance.umd.js +0 -212
  237. package/bundles/angular-fire-compat-performance.umd.js.map +0 -1
  238. package/bundles/angular-fire-compat-remote-config.umd.js +0 -605
  239. package/bundles/angular-fire-compat-remote-config.umd.js.map +0 -1
  240. package/bundles/angular-fire-compat-storage.umd.js +0 -598
  241. package/bundles/angular-fire-compat-storage.umd.js.map +0 -1
  242. package/bundles/angular-fire-compat.umd.js +0 -535
  243. package/bundles/angular-fire-compat.umd.js.map +0 -1
  244. package/bundles/angular-fire-database.umd.js +0 -557
  245. package/bundles/angular-fire-database.umd.js.map +0 -1
  246. package/bundles/angular-fire-firestore-lite.umd.js +0 -531
  247. package/bundles/angular-fire-firestore-lite.umd.js.map +0 -1
  248. package/bundles/angular-fire-firestore.umd.js +0 -565
  249. package/bundles/angular-fire-firestore.umd.js.map +0 -1
  250. package/bundles/angular-fire-functions.umd.js +0 -461
  251. package/bundles/angular-fire-functions.umd.js.map +0 -1
  252. package/bundles/angular-fire-messaging.umd.js +0 -473
  253. package/bundles/angular-fire-messaging.umd.js.map +0 -1
  254. package/bundles/angular-fire-performance.umd.js +0 -473
  255. package/bundles/angular-fire-performance.umd.js.map +0 -1
  256. package/bundles/angular-fire-remote-config.umd.js +0 -499
  257. package/bundles/angular-fire-remote-config.umd.js.map +0 -1
  258. package/bundles/angular-fire-storage.umd.js +0 -485
  259. package/bundles/angular-fire-storage.umd.js.map +0 -1
  260. package/bundles/angular-fire.umd.js +0 -308
  261. package/bundles/angular-fire.umd.js.map +0 -1
  262. package/compat/analytics/package.json +0 -11
  263. package/compat/auth/package.json +0 -11
  264. package/compat/auth-guard/package.json +0 -11
  265. package/compat/database/package.json +0 -11
  266. package/compat/firestore/package.json +0 -11
  267. package/compat/functions/package.json +0 -11
  268. package/compat/messaging/package.json +0 -11
  269. package/compat/package.json +0 -11
  270. package/compat/performance/package.json +0 -11
  271. package/compat/remote-config/package.json +0 -11
  272. package/compat/storage/package.json +0 -11
  273. package/database/package.json +0 -11
  274. package/docs/analytics.md +0 -67
  275. package/docs/app-check.md +0 -53
  276. package/docs/auth.md +0 -165
  277. package/docs/compat/analytics/getting-started.md +0 -137
  278. package/docs/compat/auth/getting-started.md +0 -162
  279. package/docs/compat/auth/router-guards.md +0 -104
  280. package/docs/compat/emulators/emulators.md +0 -134
  281. package/docs/compat/firestore/collections.md +0 -326
  282. package/docs/compat/firestore/documents.md +0 -115
  283. package/docs/compat/firestore/offline-data.md +0 -39
  284. package/docs/compat/firestore/querying-collections.md +0 -204
  285. package/docs/compat/functions/functions.md +0 -166
  286. package/docs/compat/messaging/messaging.md +0 -232
  287. package/docs/compat/performance/getting-started.md +0 -132
  288. package/docs/compat/remote-config/getting-started.md +0 -134
  289. package/docs/compat/rtdb/lists.md +0 -257
  290. package/docs/compat/rtdb/objects.md +0 -182
  291. package/docs/compat/rtdb/querying-lists.md +0 -155
  292. package/docs/compat/storage/storage.md +0 -257
  293. package/docs/compat.md +0 -70
  294. package/docs/database.md +0 -175
  295. package/docs/deploy/getting-started.md +0 -204
  296. package/docs/firebase.json +0 -16
  297. package/docs/firestore.md +0 -148
  298. package/docs/functions.md +0 -52
  299. package/docs/images/analytics-illo_1x.png +0 -0
  300. package/docs/images/auth-illo_1x.png +0 -0
  301. package/docs/images/cloud-messaging-illo_1x.png +0 -0
  302. package/docs/images/database-illo_1x.png +0 -0
  303. package/docs/images/firestore-illo_1x.png +0 -0
  304. package/docs/images/functions-illo_1x.png +0 -0
  305. package/docs/images/hosting-illo_1x.png +0 -0
  306. package/docs/images/performance-illo_1x.png +0 -0
  307. package/docs/images/reCAPTCHA-logo@1x.png +0 -0
  308. package/docs/images/remote-config-illo_1x.png +0 -0
  309. package/docs/images/storage-illo_1x.png +0 -0
  310. package/docs/install-and-setup.md +0 -114
  311. package/docs/install-angular-cli-windows10.md +0 -82
  312. package/docs/messaging.md +0 -25
  313. package/docs/performance.md +0 -57
  314. package/docs/remote-config.md +0 -53
  315. package/docs/storage.md +0 -90
  316. package/docs/universal/cloud-functions.md +0 -75
  317. package/docs/universal/getting-started.md +0 -153
  318. package/docs/universal/prerendering.md +0 -72
  319. package/docs/version-4-upgrade.md +0 -119
  320. package/docs/version-5-upgrade.md +0 -82
  321. package/docs/version-6-upgrade.md +0 -16
  322. package/docs/version-7-upgrade.md +0 -298
  323. package/esm2015/analytics/analytics.module.js +0 -93
  324. package/esm2015/analytics/overrides.js +0 -3
  325. package/esm2015/analytics/screen-tracking.service.js +0 -139
  326. package/esm2015/analytics/user-tracking.service.js +0 -43
  327. package/esm2015/app/app.module.js +0 -84
  328. package/esm2015/app-check/app-check.js +0 -16
  329. package/esm2015/app-check/app-check.module.js +0 -81
  330. package/esm2015/app-check/public_api.js +0 -4
  331. package/esm2015/auth/auth.module.js +0 -71
  332. package/esm2015/auth-guard/auth-guard.js +0 -49
  333. package/esm2015/compat/analytics/analytics.js +0 -163
  334. package/esm2015/compat/analytics/analytics.module.js +0 -32
  335. package/esm2015/compat/analytics/screen-tracking.service.js +0 -49
  336. package/esm2015/compat/analytics/user-tracking.service.js +0 -52
  337. package/esm2015/compat/auth/auth.js +0 -139
  338. package/esm2015/compat/auth-guard/auth-guard.js +0 -49
  339. package/esm2015/compat/database/database.js +0 -117
  340. package/esm2015/compat/database/interfaces.js +0 -2
  341. package/esm2015/compat/database/list/changes.js +0 -85
  342. package/esm2015/compat/database/list/create-reference.js +0 -41
  343. package/esm2015/compat/database/observable/fromRef.js +0 -47
  344. package/esm2015/compat/firebase.app.module.js +0 -69
  345. package/esm2015/compat/firestore/collection/changes.js +0 -107
  346. package/esm2015/compat/firestore/collection/collection.js +0 -117
  347. package/esm2015/compat/firestore/collection-group/collection-group.js +0 -81
  348. package/esm2015/compat/firestore/document/document.js +0 -82
  349. package/esm2015/compat/firestore/firestore.js +0 -254
  350. package/esm2015/compat/firestore/interfaces.js +0 -2
  351. package/esm2015/compat/firestore/observable/fromRef.js +0 -39
  352. package/esm2015/compat/functions/functions.js +0 -68
  353. package/esm2015/compat/messaging/messaging.js +0 -75
  354. package/esm2015/compat/performance/performance.js +0 -110
  355. package/esm2015/compat/performance/performance.module.js +0 -28
  356. package/esm2015/compat/performance/performance.service.js +0 -27
  357. package/esm2015/compat/proxy.js +0 -61
  358. package/esm2015/compat/remote-config/remote-config.js +0 -193
  359. package/esm2015/compat/storage/observable/fromTask.js +0 -34
  360. package/esm2015/compat/storage/pipes/storageUrl.pipe.js +0 -54
  361. package/esm2015/compat/storage/storage.js +0 -94
  362. package/esm2015/compat/storage/storage.module.js +0 -22
  363. package/esm2015/core.js +0 -79
  364. package/esm2015/database/database.module.js +0 -74
  365. package/esm2015/firestore/firebase.js +0 -53
  366. package/esm2015/firestore/firestore.module.js +0 -74
  367. package/esm2015/firestore/lite/lite.module.js +0 -74
  368. package/esm2015/firestore/rxfire.js +0 -13
  369. package/esm2015/functions/functions.module.js +0 -74
  370. package/esm2015/messaging/messaging.module.js +0 -85
  371. package/esm2015/messaging/overrides.js +0 -3
  372. package/esm2015/performance/performance.module.js +0 -81
  373. package/esm2015/remote-config/overrides.js +0 -3
  374. package/esm2015/remote-config/remote-config.module.js +0 -85
  375. package/esm2015/storage/storage.module.js +0 -74
  376. package/esm2015/zones.js +0 -183
  377. package/fesm2015/angular-fire-analytics.js.map +0 -1
  378. package/fesm2015/angular-fire-app-check.js.map +0 -1
  379. package/fesm2015/angular-fire-app.js.map +0 -1
  380. package/fesm2015/angular-fire-auth-guard.js.map +0 -1
  381. package/fesm2015/angular-fire-auth.js.map +0 -1
  382. package/fesm2015/angular-fire-compat-analytics.js.map +0 -1
  383. package/fesm2015/angular-fire-compat-auth-guard.js.map +0 -1
  384. package/fesm2015/angular-fire-compat-auth.js.map +0 -1
  385. package/fesm2015/angular-fire-compat-database.js.map +0 -1
  386. package/fesm2015/angular-fire-compat-firestore.js.map +0 -1
  387. package/fesm2015/angular-fire-compat-functions.js.map +0 -1
  388. package/fesm2015/angular-fire-compat-messaging.js.map +0 -1
  389. package/fesm2015/angular-fire-compat-performance.js.map +0 -1
  390. package/fesm2015/angular-fire-compat-remote-config.js.map +0 -1
  391. package/fesm2015/angular-fire-compat-storage.js.map +0 -1
  392. package/fesm2015/angular-fire-compat.js.map +0 -1
  393. package/fesm2015/angular-fire-database.js.map +0 -1
  394. package/fesm2015/angular-fire-firestore-lite.js.map +0 -1
  395. package/fesm2015/angular-fire-firestore.js.map +0 -1
  396. package/fesm2015/angular-fire-functions.js.map +0 -1
  397. package/fesm2015/angular-fire-messaging.js.map +0 -1
  398. package/fesm2015/angular-fire-performance.js.map +0 -1
  399. package/fesm2015/angular-fire-remote-config.js.map +0 -1
  400. package/fesm2015/angular-fire-storage.js.map +0 -1
  401. package/fesm2015/angular-fire.js.map +0 -1
  402. package/firestore/lite/package.json +0 -11
  403. package/firestore/package.json +0 -11
  404. package/firestore-protos.js +0 -4
  405. package/functions/package.json +0 -11
  406. package/messaging/package.json +0 -11
  407. package/performance/package.json +0 -11
  408. package/remote-config/package.json +0 -11
  409. package/schematics/add/schema.json +0 -16
  410. package/schematics/builders.json +0 -10
  411. package/schematics/collection.json +0 -15
  412. package/schematics/deploy/schema.json +0 -119
  413. package/schematics/migration.json +0 -15
  414. package/schematics/setup/schema.json +0 -16
  415. package/storage/package.json +0 -11
  416. /package/analytics/{angular-fire-analytics.d.ts → index.d.ts} +0 -0
  417. /package/app/{angular-fire-app.d.ts → index.d.ts} +0 -0
  418. /package/app-check/{angular-fire-app-check.d.ts → index.d.ts} +0 -0
  419. /package/auth/{angular-fire-auth.d.ts → index.d.ts} +0 -0
  420. /package/auth-guard/{angular-fire-auth-guard.d.ts → index.d.ts} +0 -0
  421. /package/compat/analytics/{angular-fire-compat-analytics.d.ts → index.d.ts} +0 -0
  422. /package/compat/auth/{angular-fire-compat-auth.d.ts → index.d.ts} +0 -0
  423. /package/compat/auth-guard/{angular-fire-compat-auth-guard.d.ts → index.d.ts} +0 -0
  424. /package/compat/database/{angular-fire-compat-database.d.ts → index.d.ts} +0 -0
  425. /package/compat/firestore/{angular-fire-compat-firestore.d.ts → index.d.ts} +0 -0
  426. /package/compat/functions/{angular-fire-compat-functions.d.ts → index.d.ts} +0 -0
  427. /package/compat/{angular-fire-compat.d.ts → index.d.ts} +0 -0
  428. /package/compat/messaging/{angular-fire-compat-messaging.d.ts → index.d.ts} +0 -0
  429. /package/compat/performance/{angular-fire-compat-performance.d.ts → index.d.ts} +0 -0
  430. /package/compat/remote-config/{angular-fire-compat-remote-config.d.ts → index.d.ts} +0 -0
  431. /package/compat/storage/{angular-fire-compat-storage.d.ts → index.d.ts} +0 -0
  432. /package/database/{angular-fire-database.d.ts → index.d.ts} +0 -0
  433. /package/{esm2015/analytics/angular-fire-analytics.js → esm2022/analytics/angular-fire-analytics.mjs} +0 -0
  434. /package/{esm2015/analytics/firebase.js → esm2022/analytics/firebase.mjs} +0 -0
  435. /package/{esm2015/analytics/public_api.js → esm2022/analytics/public_api.mjs} +0 -0
  436. /package/{esm2015/angular-fire.js → esm2022/angular-fire.mjs} +0 -0
  437. /package/{esm2015/app/angular-fire-app.js → esm2022/app/angular-fire-app.mjs} +0 -0
  438. /package/{esm2015/app/firebase.js → esm2022/app/firebase.mjs} +0 -0
  439. /package/{esm2015/app/public_api.js → esm2022/app/public_api.mjs} +0 -0
  440. /package/{esm2015/app-check/angular-fire-app-check.js → esm2022/app-check/angular-fire-app-check.mjs} +0 -0
  441. /package/{esm2015/app-check/firebase.js → esm2022/app-check/firebase.mjs} +0 -0
  442. /package/{esm2015/auth/angular-fire-auth.js → esm2022/auth/angular-fire-auth.mjs} +0 -0
  443. /package/{esm2015/auth/firebase.js → esm2022/auth/firebase.mjs} +0 -0
  444. /package/{esm2015/auth/public_api.js → esm2022/auth/public_api.mjs} +0 -0
  445. /package/{esm2015/auth/rxfire.js → esm2022/auth/rxfire.mjs} +0 -0
  446. /package/{esm2015/auth-guard/angular-fire-auth-guard.js → esm2022/auth-guard/angular-fire-auth-guard.mjs} +0 -0
  447. /package/{esm2015/auth-guard/public_api.js → esm2022/auth-guard/public_api.mjs} +0 -0
  448. /package/{esm2015/compat/analytics/angular-fire-compat-analytics.js → esm2022/compat/analytics/angular-fire-compat-analytics.mjs} +0 -0
  449. /package/{esm2015/compat/analytics/base.js → esm2022/compat/analytics/base.mjs} +0 -0
  450. /package/{esm2015/compat/analytics/public_api.js → esm2022/compat/analytics/public_api.mjs} +0 -0
  451. /package/{esm2015/compat/angular-fire-compat.js → esm2022/compat/angular-fire-compat.mjs} +0 -0
  452. /package/{esm2015/compat/auth/angular-fire-compat-auth.js → esm2022/compat/auth/angular-fire-compat-auth.mjs} +0 -0
  453. /package/{esm2015/compat/auth/base.js → esm2022/compat/auth/base.mjs} +0 -0
  454. /package/{esm2015/compat/auth-guard/angular-fire-compat-auth-guard.js → esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs} +0 -0
  455. /package/{esm2015/compat/auth-guard/public_api.js → esm2022/compat/auth-guard/public_api.mjs} +0 -0
  456. /package/{esm2015/compat/database/angular-fire-compat-database.js → esm2022/compat/database/angular-fire-compat-database.mjs} +0 -0
  457. /package/{esm2015/compat/database/list/remove.js → esm2022/compat/database/list/remove.mjs} +0 -0
  458. /package/{esm2015/compat/database/list/utils.js → esm2022/compat/database/list/utils.mjs} +0 -0
  459. /package/{esm2015/compat/database/public_api.js → esm2022/compat/database/public_api.mjs} +0 -0
  460. /package/{esm2015/compat/firestore/angular-fire-compat-firestore.js → esm2022/compat/firestore/angular-fire-compat-firestore.mjs} +0 -0
  461. /package/{esm2015/compat/firestore/public_api.js → esm2022/compat/firestore/public_api.mjs} +0 -0
  462. /package/{esm2015/compat/functions/angular-fire-compat-functions.js → esm2022/compat/functions/angular-fire-compat-functions.mjs} +0 -0
  463. /package/{esm2015/compat/functions/base.js → esm2022/compat/functions/base.mjs} +0 -0
  464. /package/{esm2015/compat/messaging/angular-fire-compat-messaging.js → esm2022/compat/messaging/angular-fire-compat-messaging.mjs} +0 -0
  465. /package/{esm2015/compat/messaging/base.js → esm2022/compat/messaging/base.mjs} +0 -0
  466. /package/{esm2015/compat/messaging/public_api.js → esm2022/compat/messaging/public_api.mjs} +0 -0
  467. /package/{esm2015/compat/performance/angular-fire-compat-performance.js → esm2022/compat/performance/angular-fire-compat-performance.mjs} +0 -0
  468. /package/{esm2015/compat/performance/base.js → esm2022/compat/performance/base.mjs} +0 -0
  469. /package/{esm2015/compat/performance/public_api.js → esm2022/compat/performance/public_api.mjs} +0 -0
  470. /package/{esm2015/compat/public_api.js → esm2022/compat/public_api.mjs} +0 -0
  471. /package/{esm2015/compat/remote-config/angular-fire-compat-remote-config.js → esm2022/compat/remote-config/angular-fire-compat-remote-config.mjs} +0 -0
  472. /package/{esm2015/compat/remote-config/base.js → esm2022/compat/remote-config/base.mjs} +0 -0
  473. /package/{esm2015/compat/remote-config/interfaces.js → esm2022/compat/remote-config/interfaces.mjs} +0 -0
  474. /package/{esm2015/compat/remote-config/public_api.js → esm2022/compat/remote-config/public_api.mjs} +0 -0
  475. /package/{esm2015/compat/storage/angular-fire-compat-storage.js → esm2022/compat/storage/angular-fire-compat-storage.mjs} +0 -0
  476. /package/{esm2015/compat/storage/interfaces.js → esm2022/compat/storage/interfaces.mjs} +0 -0
  477. /package/{esm2015/compat/storage/public_api.js → esm2022/compat/storage/public_api.mjs} +0 -0
  478. /package/{esm2015/database/angular-fire-database.js → esm2022/database/angular-fire-database.mjs} +0 -0
  479. /package/{esm2015/database/firebase.js → esm2022/database/firebase.mjs} +0 -0
  480. /package/{esm2015/database/public_api.js → esm2022/database/public_api.mjs} +0 -0
  481. /package/{esm2015/database/rxfire.js → esm2022/database/rxfire.mjs} +0 -0
  482. /package/{esm2015/firestore/angular-fire-firestore.js → esm2022/firestore/angular-fire-firestore.mjs} +0 -0
  483. /package/{esm2015/firestore/lite/angular-fire-firestore-lite.js → esm2022/firestore/lite/angular-fire-firestore-lite.mjs} +0 -0
  484. /package/{esm2015/firestore/lite/firebase.js → esm2022/firestore/lite/firebase.mjs} +0 -0
  485. /package/{esm2015/firestore/lite/public_api.js → esm2022/firestore/lite/public_api.mjs} +0 -0
  486. /package/{esm2015/firestore/lite/rxfire.js → esm2022/firestore/lite/rxfire.mjs} +0 -0
  487. /package/{esm2015/firestore/public_api.js → esm2022/firestore/public_api.mjs} +0 -0
  488. /package/{esm2015/functions/angular-fire-functions.js → esm2022/functions/angular-fire-functions.mjs} +0 -0
  489. /package/{esm2015/functions/firebase.js → esm2022/functions/firebase.mjs} +0 -0
  490. /package/{esm2015/functions/public_api.js → esm2022/functions/public_api.mjs} +0 -0
  491. /package/{esm2015/functions/rxfire.js → esm2022/functions/rxfire.mjs} +0 -0
  492. /package/{esm2015/messaging/angular-fire-messaging.js → esm2022/messaging/angular-fire-messaging.mjs} +0 -0
  493. /package/{esm2015/messaging/firebase.js → esm2022/messaging/firebase.mjs} +0 -0
  494. /package/{esm2015/messaging/public_api.js → esm2022/messaging/public_api.mjs} +0 -0
  495. /package/{esm2015/performance/angular-fire-performance.js → esm2022/performance/angular-fire-performance.mjs} +0 -0
  496. /package/{esm2015/performance/firebase.js → esm2022/performance/firebase.mjs} +0 -0
  497. /package/{esm2015/performance/public_api.js → esm2022/performance/public_api.mjs} +0 -0
  498. /package/{esm2015/performance/rxfire.js → esm2022/performance/rxfire.mjs} +0 -0
  499. /package/{esm2015/public_api.js → esm2022/public_api.mjs} +0 -0
  500. /package/{esm2015/remote-config/angular-fire-remote-config.js → esm2022/remote-config/angular-fire-remote-config.mjs} +0 -0
  501. /package/{esm2015/remote-config/firebase.js → esm2022/remote-config/firebase.mjs} +0 -0
  502. /package/{esm2015/remote-config/public_api.js → esm2022/remote-config/public_api.mjs} +0 -0
  503. /package/{esm2015/remote-config/rxfire.js → esm2022/remote-config/rxfire.mjs} +0 -0
  504. /package/{esm2015/storage/angular-fire-storage.js → esm2022/storage/angular-fire-storage.mjs} +0 -0
  505. /package/{esm2015/storage/firebase.js → esm2022/storage/firebase.mjs} +0 -0
  506. /package/{esm2015/storage/public_api.js → esm2022/storage/public_api.mjs} +0 -0
  507. /package/{esm2015/storage/rxfire.js → esm2022/storage/rxfire.mjs} +0 -0
  508. /package/firestore/{angular-fire-firestore.d.ts → index.d.ts} +0 -0
  509. /package/firestore/lite/{angular-fire-firestore-lite.d.ts → index.d.ts} +0 -0
  510. /package/functions/{angular-fire-functions.d.ts → index.d.ts} +0 -0
  511. /package/{angular-fire.d.ts → index.d.ts} +0 -0
  512. /package/messaging/{angular-fire-messaging.d.ts → index.d.ts} +0 -0
  513. /package/performance/{angular-fire-performance.d.ts → index.d.ts} +0 -0
  514. /package/remote-config/{angular-fire-remote-config.d.ts → index.d.ts} +0 -0
  515. /package/storage/{angular-fire-storage.d.ts → index.d.ts} +0 -0
@@ -1,182 +0,0 @@
1
- # 2. Retrieving data as objects
2
-
3
- > **NOTE**: [AngularFire has a new tree-shakable API](../../../README.md#developer-guide), you're looking at the documentation for the compatability version of the library. [See the v7 upgrade guide for more information on this change.](../../version-7-upgrade.md).
4
-
5
- > The `AngularFireObject` is a service for manipulating and streaming object data.
6
-
7
- The `AngularFireObject` service is not created by itself, but through the `AngularFireDatabase` service.
8
-
9
- The guide below demonstrates how to retrieve, save, and remove data as objects.
10
-
11
- ## Injecting the `AngularFireDatabase` service
12
-
13
- **Make sure you have bootstrapped your application for AngularFire. See the Installation guide for bootstrap setup.**
14
-
15
- `AngularFireDatabase` is a service which can be injected through the constructor of your Angular component or `@Injectable()` service.
16
-
17
- If you've followed the earlier step "Installation and Setup" your `/src/app/app.component.ts` should look like below.
18
-
19
- ```ts
20
- import { Component } from '@angular/core';
21
- import { AngularFireDatabase } from '@angular/fire/compat/database';
22
- import { Observable } from 'rxjs';
23
-
24
- @Component({
25
- selector: 'app-root',
26
- templateUrl: 'app.component.html',
27
- styleUrls: ['app.component.css']
28
- })
29
- export class AppComponent {
30
- items: Observable<any[]>;
31
- constructor(db: AngularFireDatabase) {
32
- this.items = db.list('items').valueChanges();
33
- }
34
- }
35
- ```
36
-
37
- In this section, we're going to modify the `/src/app/app.component.ts` to retrieve data as object.
38
-
39
- ## Create an object binding
40
-
41
- ```ts
42
- const relative = db.object('item').valueChanges();
43
- ```
44
-
45
- ### Retrieve data
46
-
47
- To get the object in realtime, create an object binding as a property of your component or service.
48
-
49
- Then in your template, you can use the `async` pipe to unwrap the binding.
50
-
51
- ```ts
52
- import { Component } from '@angular/core';
53
- import { AngularFireDatabase } from '@angular/fire/compat/database';
54
- import { Observable } from 'rxjs';
55
-
56
- @Component({
57
- selector: 'app-root',
58
- template: `
59
- <h1>{{ (item | async)?.name }}</h1>
60
- `,
61
- })
62
- export class AppComponent {
63
- item: Observable<any>;
64
- constructor(db: AngularFireDatabase) {
65
- this.item = db.object('item').valueChanges();
66
- }
67
- }
68
- ```
69
-
70
- ## Saving data
71
-
72
- ### API Summary
73
-
74
- The table below highlights some of the common methods on the `AngularFireObject`.
75
-
76
- | method | |
77
- | ---------|--------------------|
78
- | `set(value: T)` | Replaces the current value in the database with the new value specified as the parameter. This is called a **destructive** update, because it deletes everything currently in place and saves the new value. |
79
- | `update(value: T)` | Updates the current value with in the database with the new value specified as the parameter. This is called a **non-destructive** update, because it only updates the values specified. |
80
- | `remove()` | Deletes all data present at that location. Same as calling `set(null)`. |
81
-
82
- ## Returning promises
83
-
84
- Each data operation method in the table above returns a promise. However,
85
- you should rarely need to use the completion promise to indicate success,
86
- because the realtime database keeps the object in sync.
87
-
88
- The promise can be useful to chain multiple operations, catching possible errors from security rules denials, or for debugging.
89
-
90
- ```ts
91
- const promise = db.object('item').remove();
92
- promise
93
- .then(_ => console.log('success'))
94
- .catch(err => console.log(err, 'You dont have access!'));
95
- ```
96
-
97
- ### Saving data
98
-
99
- Use the `set()` method for **destructive updates**.
100
-
101
- ```ts
102
- const itemRef = db.object('item');
103
- itemRef.set({ name: 'new name!'});
104
- ```
105
-
106
- ### Updating data
107
-
108
- Use the `update()` method for **non-destructive updates**.
109
-
110
- ```ts
111
- const itemRef = db.object('item');
112
- itemRef.update({ age: newAge });
113
- ```
114
-
115
- **Only objects are allowed for updates, not primitives**. This is because
116
- using an update with a primitive is the exact same as doing a `.set()` with a primitive.
117
-
118
- ### Deleting data
119
-
120
- Use the `remove()` method to remove data at the object's location.
121
-
122
- ```ts
123
- const itemRef = db.object('item');
124
- itemRef.remove();
125
- ```
126
-
127
- **Example app**:
128
-
129
- ```ts
130
- import { Component } from '@angular/core';
131
- import { AngularFireDatabase, AngularFireObject } from '@angular/fire/compat/database';
132
- import { Observable } from 'rxjs';
133
-
134
- @Component({
135
- selector: 'app-root',
136
- template: `
137
- <h1>{{ item | async | json }}</h1>
138
- <input type="text" #newname placeholder="Name" />
139
- <input type="text" #newsize placeholder="Size" />
140
- <br />
141
- <button (click)="save(newname.value)">Set Name</button>
142
- <button (click)="update(newsize.value)">Update Size</button>
143
- <button (click)="delete()">Delete</button>
144
- `,
145
- })
146
- export class AppComponent {
147
- itemRef: AngularFireObject<any>;
148
- item: Observable<any>;
149
- constructor(db: AngularFireDatabase) {
150
- this.itemRef = db.object('item');
151
- this.item = this.itemRef.valueChanges();
152
- }
153
- save(newName: string) {
154
- this.itemRef.set({ name: newName });
155
- }
156
- update(newSize: string) {
157
- this.itemRef.update({ size: newSize });
158
- }
159
- delete() {
160
- this.itemRef.remove();
161
- }
162
- }
163
- ```
164
-
165
- ## Retrieving the snapshot
166
-
167
- AngularFire `valueChanges()` unwraps the Firebase DataSnapshot by default, but you can get the data as the original snapshot by using the `snapshotChanges()` option.
168
-
169
- ```ts
170
- this.itemRef = db.object('item');
171
- this.itemRef.snapshotChanges().subscribe(action => {
172
- console.log(action.type);
173
- console.log(action.key)
174
- console.log(action.payload.val())
175
- });
176
- ```
177
-
178
- ## Querying?
179
-
180
- Because `AngularFireObject` synchronizes objects from the realtime database, sorting will have no effect for queries that are not also limited by a range. For example, when paginating you would provide a query with a sort and filter. Both the sort operation and the filter operation affect which subset of the data is returned by the query; however, because the resulting object is simply json, the sort order will not be preseved locally. Hence, for operations that require sorting, you are probably looking for a [list](lists.md)
181
-
182
- ### [Next Step: Retrieving data as lists](lists.md)
@@ -1,155 +0,0 @@
1
- # 4. Querying lists
2
-
3
- > **NOTE**: [AngularFire has a new tree-shakable API](../../../README.md#developer-guide), you're looking at the documentation for the compatability version of the library. [See the v7 upgrade guide for more information on this change.](../../version-7-upgrade.md).
4
-
5
- ## Creating a query with primitive/scalar values
6
-
7
- Queries are created by building on the [`firebase.database.Reference`](https://firebase.google.com/docs/reference/js/firebase.database.Reference).
8
-
9
- ```ts
10
- db.list('/items', ref => ref.orderByChild('size').equalTo('large'))
11
- ```
12
-
13
- ### Query options
14
-
15
- | Method | Purpose |
16
- | ---------|--------------------|
17
- | `orderByChild` | Specify a child to order by. |
18
- | `orderByKey` | Boolean to order by Firebase Database keys. |
19
- | `orderByValue` | Specify a value to order by. |
20
- | ~~`orderByPriority`~~<sup>1</sup> | Boolean to order by Firebase Database priority.|
21
- | `equalTo`<sup>2</sup> | Limit list to items that contain certain value. |
22
- | `limitToFirst` | Sets the maximum number of items to return from the beginning of the ordered list of results. |
23
- | `limitToLast` | Sets the maximum number of items to return from the end of the ordered list of results. |
24
- | `startAt`<sup>2</sup> | Return items greater than or equal to the specified key or value, depending on the order-by method chosen. |
25
- | `endAt`<sup>2</sup> | Return items less than or equal to the specified key or value, depending on the order-by method chosen. |
26
-
27
- <sup>1</sup> [This is the old way of doing things and is no longer recommended for use](https://youtu.be/3WTQZV5-roY?t=3m). Anything you can achieve with `orderByPriority` you should be doing with `orderByChild`.
28
-
29
- <sup>2</sup> The Firebase SDK supports an optional `key` parameter for [`startAt`](https://firebase.google.com/docs/reference/js/firebase.database.Reference#startAt), [`endAt`](https://firebase.google.com/docs/reference/js/firebase.database.Reference#endAt), and [`equalTo`](https://firebase.google.com/docs/reference/js/firebase.database.Reference#equalTo) when ordering by child, value, or priority. You can specify the `key` parameter using an object literal that contains the `value` and the `key`. For example: `startAt: { value: 'some-value', key: 'some-key' }`.
30
-
31
- To learn more about how sorting and ordering data works in Firebase, check out the Firebase documentation on [working with lists of data](https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data).
32
-
33
- ## Invalid query combinations
34
-
35
- **Queries can only be ordered by one method.** This means you can only specify
36
- `orderByChild`, `orderByKey`, `orderByPriority`, or `orderByValue`.
37
-
38
- ```ts
39
- // WARNING: Do not copy and paste. This will not work!
40
- ref.orderByChild('size').equalTo('large').orderByKey(true)
41
- ```
42
-
43
- You can only use `limitToFirst` or `limitToLast`, but not both in combination.
44
-
45
- ```ts
46
- // WARNING: Do not copy and paste. This will not work!
47
- ref.limitToFirst(10).limitToLast(100)
48
- ```
49
-
50
- ## Dynamic querying
51
-
52
- To enable dynamic queries one should lean on RxJS Operators like `switchMap`.
53
-
54
- An RxJS Subject is imported below. A Subject is like an Observable, but can multicast to many Observers. Subjects are like EventEmitters: they maintain a registry of many listeners. See, [What is a Subject](http://reactivex.io/rxjs/manual/overview.html#subject) for more information.
55
-
56
- When we call [`switchMap` on the Subject](https://www.learnrxjs.io/operators/transformation/switchmap.html), we can map each value to a new Observable; in this case a database query.
57
-
58
- ```ts
59
- const size$ = new Subject<string>();
60
- const queryObservable = size$.pipe(
61
- switchMap(size =>
62
- db.list('/items', ref => ref.orderByChild('size').equalTo(size)).valueChanges()
63
- )
64
- );
65
-
66
- // subscribe to changes
67
- queryObservable.subscribe(queriedItems => {
68
- console.log(queriedItems);
69
- });
70
-
71
- // trigger the query
72
- size$.next('large');
73
-
74
- // re-trigger the query!!!
75
- size$.next('small');
76
- ```
77
-
78
- **Example app:**
79
-
80
- [See this example in action on StackBlitz](https://stackblitz.com/edit/angularfire-db-api-s8ip7m).
81
-
82
- ```ts
83
- import { Component } from '@angular/core';
84
- import { AngularFireDatabase, AngularFireAction } from '@angular/fire/compat/database';
85
- import { Observable, Subscription, BehaviorSubject } from 'rxjs';
86
- import { switchMap } from 'rxjs/operators';
87
-
88
- @Component({
89
- selector: 'app-root',
90
- template: `
91
- <h1>Firebase widgets!</h1>
92
- <div *ngIf="items$ | async; let items; else loading">
93
- <ul>
94
- <li *ngFor="let item of items">
95
- {{ item.payload.val().text }}
96
- <code>{{ item.payload.key }}</code>
97
- </li>
98
- </ul>
99
- <div *ngIf="items.length === 0">No results, try clearing filters</div>
100
- </div>
101
- <ng-template #loading>Loading&hellip;</ng-template>
102
- <div>
103
- <h4>Filter by size</h4>
104
- <button (click)="filterBy('small')">Small</button>
105
- <button (click)="filterBy('medium')">Medium</button>
106
- <button (click)="filterBy('large')">Large</button>
107
- <button (click)="filterBy('x-large')">Extra Large</button>
108
- <button (click)="filterBy(null)" *ngIf="this.size$.getValue()">
109
- <em>clear filter</em>
110
- </button>
111
- </div>
112
- `,
113
- })
114
- export class AppComponent {
115
- items$: Observable<AngularFireAction<firebase.database.DataSnapshot>[]>;
116
- size$: BehaviorSubject<string|null>;
117
-
118
- constructor(db: AngularFireDatabase) {
119
- this.size$ = new BehaviorSubject(null);
120
- this.items$ = this.size$.pipe(
121
- switchMap(size =>
122
- db.list('/items', ref =>
123
- size ? ref.orderByChild('size').equalTo(size) : ref
124
- ).snapshotChanges()
125
- )
126
- );
127
- }
128
- filterBy(size: string|null) {
129
- this.size$.next(size);
130
- }
131
- }
132
- ```
133
-
134
- **To run the above example as is, you need to have sample data in you firebase database with the following structure:**
135
-
136
- ```json
137
- {
138
- "items": {
139
- "a" : {
140
- "size" : "small",
141
- "text" : "small thing"
142
- },
143
- "b" : {
144
- "size" : "medium",
145
- "text" : "medium sample"
146
- },
147
- "c" : {
148
- "size" : "large",
149
- "text" : "large widget"
150
- }
151
- }
152
- }
153
- ```
154
-
155
- ### [Next Step: Getting started with Firebase Authentication](../auth/getting-started.md)
@@ -1,257 +0,0 @@
1
- # AngularFireStorage
2
-
3
- > Cloud Storage is designed to help you quickly and easily store and serve user-generated content, such as photos and videos.
4
-
5
- > **NOTE**: [AngularFire has a new tree-shakable API](../../../README.md#developer-guide), you're looking at the documentation for the compatability version of the library. [See the v7 upgrade guide for more information on this change.](../../version-7-upgrade.md).
6
-
7
- ### Import the `NgModule`
8
-
9
- Cloud Storage for AngularFire is contained in the `@angular/fire/storage` module namespace. Import the `AngularFireStorageModule` in your `NgModule`. This sets up the `AngularFireStorage` service for dependency injection.
10
-
11
- ```ts
12
- import { BrowserModule } from '@angular/platform-browser';
13
- import { NgModule } from '@angular/core';
14
- import { AppComponent } from './app.component';
15
- import { AngularFireModule } from '@angular/fire/compat';
16
- import { AngularFireStorageModule } from '@angular/fire/compat/storage';
17
- import { environment } from '../environments/environment';
18
-
19
- @NgModule({
20
- imports: [
21
- BrowserModule,
22
- AngularFireModule.initializeApp(environment.firebase),
23
- AngularFireStorageModule
24
- ],
25
- declarations: [ AppComponent ],
26
- bootstrap: [ AppComponent ]
27
- })
28
- export class AppModule {}
29
- ```
30
-
31
- The `BUCKET` injection token can be used to customise the storage bucket.
32
-
33
- ```ts
34
- import {AngularFireStorageModule, BUCKET } from '@angular/fire/compat/storage';
35
-
36
- @NgModule({
37
- providers: [
38
- { provide: BUCKET, useValue: 'my-bucket-name' }
39
- ],
40
- ...
41
- })
42
- export class AppModule {}
43
- ```
44
-
45
- ### Injecting the AngularFireStorage service
46
-
47
- Once the `AngularFireStorageModule` is registered you can inject the `AngularFireStorage` service.
48
-
49
- ```ts
50
- import { Component } from '@angular/core';
51
- import { AngularFireStorage } from '@angular/fire/compat/storage';
52
-
53
- @Component({
54
- selector: 'app-component',
55
- template: ``
56
- })
57
- export class AppComponent {
58
- constructor(private storage: AngularFireStorage) { }
59
- }
60
- ```
61
-
62
- ### Uploading blobs
63
-
64
- There are three options for uploading files.
65
-
66
-
67
- | method | |
68
- | ---------|--------------------|
69
- | `put(data: Blob, metadata?: storage.UploadMetadata): AngularFireUploadTask` | Starts the upload of the blob to the storage reference's path. Returns an `AngularFireUploadTask` for upload monitoring. |
70
- | `putString(data: string, format?: StringFormat, metadata?: UploadMetadata): AngularFireUploadTask` | Updates an existing item in the array. Accepts a key, database reference, or an unwrapped snapshot. |
71
- | `upload(path: string, data: StringFormat, metadata?: UploadMetadata): AngularFireUploadTask` | Upload or update a new file to the storage reference's path. Returns an `AngularFireUploadTask` for upload monitoring. |
72
-
73
- ### Examples
74
-
75
- #### Uploading blobs with put
76
-
77
- ```ts
78
- import { Component } from '@angular/core';
79
- import { AngularFireStorage } from '@angular/fire/compat/storage';
80
-
81
- @Component({
82
- selector: 'app-root',
83
- template: `
84
- <input type="file" (change)="uploadFile($event)">
85
- `
86
- })
87
- export class AppComponent {
88
- constructor(private storage: AngularFireStorage) { }
89
- uploadFile(event) {
90
- const file = event.target.files[0];
91
- const filePath = 'name-your-file-path-here';
92
- const ref = this.storage.ref(filePath);
93
- const task = ref.put(file);
94
- }
95
- }
96
- ```
97
-
98
- #### Uploading blobs with putString
99
-
100
- ```ts
101
- import { Component } from '@angular/core';
102
- import { AngularFireStorage } from '@angular/fire/compat/storage';
103
-
104
- @Component({
105
- selector: 'app-root',
106
- template: `
107
- <input type="file" (change)="uploadFile($event)">
108
- `
109
- })
110
- export class AppComponent {
111
- constructor(private storage: AngularFireStorage) { }
112
- uploadFile(event) {
113
- const file = event.target.files[0];
114
- const filePath = 'name-your-file-path-here';
115
- const ref = this.storage.ref(filePath);
116
- const task = ref.putString(file);
117
- }
118
- }
119
- ```
120
-
121
- #### Uploading files with upload
122
-
123
- ```ts
124
- import { Component } from '@angular/core';
125
- import { AngularFireStorage } from '@angular/fire/compat/storage';
126
-
127
- @Component({
128
- selector: 'app-root',
129
- template: `
130
- <input type="file" (change)="uploadFile($event)">
131
- `
132
- })
133
- export class AppComponent {
134
- constructor(private storage: AngularFireStorage) { }
135
- uploadFile(event) {
136
- const file = event.target.files[0];
137
- const filePath = 'name-your-file-path-here';
138
- const task = this.storage.upload(filePath, file);
139
- }
140
- }
141
- ```
142
-
143
- ### Monitoring upload percentage
144
-
145
- An `AngularFireUploadTask` has methods for observing upload percentage as well as the final download URL.
146
-
147
- | method | |
148
- | ---------|--------------------|
149
- | `snapshotChanges(): Observable<FirebaseStorage.UploadTaskSnapshot>` | Emits the raw `UploadTaskSnapshot` as the file upload progresses. |
150
- | `percentageChanges(): Observable<number>` | Emits the upload completion percentage. |
151
- | `getDownloadURL(): Observable<any>` | Emits the download url when available |
152
-
153
- #### Example Usage
154
-
155
- The method `getDownloadURL()` doesn't rely on the task anymore, hence, in order to get the url we should use the finalize method from RxJS on top of the storage ref.
156
-
157
- ```ts
158
- import { finalize } from 'rxjs/operators';
159
-
160
- @Component({
161
- selector: 'app-root',
162
- template: `
163
- <input type="file" (change)="uploadFile($event)" />
164
- <div>{{ uploadPercent | async }}</div>
165
- <a [href]="downloadURL | async">{{ downloadURL | async }}</a>
166
- `
167
- })
168
- export class AppComponent {
169
- uploadPercent: Observable<number>;
170
- downloadURL: Observable<string>;
171
- constructor(private storage: AngularFireStorage) {}
172
- uploadFile(event) {
173
- const file = event.target.files[0];
174
- const filePath = 'name-your-file-path-here';
175
- const fileRef = this.storage.ref(filePath);
176
- const task = this.storage.upload(filePath, file);
177
-
178
- // observe percentage changes
179
- this.uploadPercent = task.percentageChanges();
180
- // get notified when the download URL is available
181
- task.snapshotChanges().pipe(
182
- finalize(() => this.downloadURL = fileRef.getDownloadURL() )
183
- )
184
- .subscribe()
185
- }
186
- }
187
- ```
188
-
189
- ### Downloading Files
190
-
191
- A convenient pipe exists for simple in page references.
192
-
193
- ```ts
194
- @Component({
195
- selector: 'app-root',
196
- template: `<img [src]="'users/davideast.jpg' | getDownloadURL" />`
197
- })
198
- export class AppComponent {}
199
- ```
200
-
201
- To download a file you'll need to create a reference and call the `getDownloadURL()` method on an `AngularFireStorageReference`.
202
-
203
- ```ts
204
- @Component({
205
- selector: 'app-root',
206
- template: `<img [src]="profileUrl | async" />`
207
- })
208
- export class AppComponent {
209
- profileUrl: Observable<string | null>;
210
- constructor(private storage: AngularFireStorage) {
211
- const ref = this.storage.ref('users/davideast.jpg');
212
- this.profileUrl = ref.getDownloadURL();
213
- }
214
- }
215
- ```
216
-
217
- ### Managing Metadata
218
-
219
- Cloud Storage for Firebase allows you to upload and download metadata associated with files. This is useful because you can store important metadata and download it without needing to download the entire file.
220
-
221
- ### Examples
222
-
223
- #### Downloading metadata
224
-
225
- ```ts
226
- @Component({
227
- selector: 'app-root',
228
- template: `<pre><code>{{ meta | async }}</code></pre>`
229
- })
230
- export class AppComponent {
231
- meta: Observable<any>;
232
- constructor(private storage: AngularFireStorage) {
233
- const ref = this.storage.ref('users/davideast.jpg');
234
- this.meta = ref.getMetadata();
235
- }
236
- }
237
- ```
238
-
239
- #### Uploading metadata with files
240
-
241
- ```ts
242
- @Component({
243
- selector: 'app-root',
244
- template: `
245
- <input type="file" (change)="uploadFile($event)" />
246
- `
247
- })
248
- export class AppComponent {
249
- constructor(private storage: AngularFireStorage) {}
250
- uploadFile(event) {
251
- const file = event.target.files[0];
252
- const filePath = 'name-your-file-path-here';
253
- const ref = this.storage.ref(filePath);
254
- const task = ref.put(file, { customMetadata: { blah: 'blah' } });
255
- }
256
- }
257
- ```
package/docs/compat.md DELETED
@@ -1,70 +0,0 @@
1
- # AngularFire
2
- The official [Angular](https://angular.io/) library for [Firebase](https://firebase.google.com/).
3
-
4
- <strong><pre>ng add @angular/fire</pre></strong>
5
-
6
- ## Compatibility Developer Guide
7
-
8
- AngularFire has a new tree-shakable API, you're looking at the documentation for the compatability version of the library. [Find the new developer guide here](../README.md#developer-guide).
9
-
10
- [See the v7 upgrade guide for more information on this change.](version-7-upgrade.md).
11
-
12
- ### Monitor usage of your application in production
13
-
14
- > `AngularFireAnalytics` provides a convenient method of interacting with Google Analytics in your Angular application. The provided `ScreenTrackingService` and `UserTrackingService` automatically log events when you're using the Angular Router or Firebase Authentication respectively. [Learn more about Google Analytics](https://firebase.google.com/docs/analytics).
15
-
16
- - [Getting started with Google Analytics](compat/analytics/getting-started.md)
17
-
18
- ### Interacting with your database(s)
19
-
20
- Firebase offers two cloud-based, client-accessible database solutions that support realtime data syncing. [Learn about the differences between them in the Firebase Documentation](https://firebase.google.com/docs/firestore/rtdb-vs-firestore).
21
-
22
- #### Cloud Firestore
23
-
24
- > `AngularFirestore` allows you to work with Cloud Firestore, the new flagship database for mobile app development. It improves on the successes of Realtime Database with a new, more intuitive data model. Cloud Firestore also features richer, faster queries and scales better than Realtime Database.
25
-
26
- - [Documents](compat/firestore/documents.md)
27
- - [Collections](compat/firestore/collections.md)
28
- - [Querying Collections](compat/firestore/querying-collections.md)
29
- - [Offline data](compat/firestore/offline-data.md)
30
-
31
- #### Realtime Database
32
-
33
- > `AngularFireDatabase` allows you to work with the Realtime Database, Firebase's original database. It's an efficient, low-latency solution for mobile apps that require synced states across clients in realtime.
34
-
35
- - [Objects](compat/rtdb/objects.md)
36
- - [Lists](compat/rtdb/lists.md)
37
- - [Querying lists](compat/rtdb/querying-lists.md)
38
-
39
- ### Authenticate users
40
-
41
- - [Getting started with Firebase Authentication](acompat/uth/getting-started.md)
42
- - [Route users with AngularFire guards](compat/auth/router-guards.md)
43
-
44
- ### Local Emulator Suite
45
-
46
- - [Getting started with Firebase Emulator Suite](compat/emulators/emulators.md)
47
-
48
- ### Upload files
49
-
50
- - [Getting started with Cloud Storage](compat/storage/storage.md)
51
-
52
- ### Receive push notifications
53
-
54
- - [Getting started with Firebase Messaging](compat/messaging/messaging.md)
55
-
56
- ### **BETA:** Change behavior and appearance of your application without deploying
57
-
58
- > Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update. [Learn more about Remote Config](https://firebase.google.com/docs/remote-config).
59
-
60
- - [Getting started with Remote Config](compat/remote-config/getting-started.md)
61
-
62
- ### Monitor your application performance in production
63
-
64
- > Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS, Android, and web apps. [Learn more about Performance Monitoring](https://firebase.google.com/docs/perf-mon).
65
-
66
- - [Getting started with Performance Monitoring](compat/performance/getting-started.md)
67
-
68
- ### Directly call Cloud Functions
69
-
70
- - [Getting started with Callable Functions](compat/functions/functions.md)